@realtek/core-theme 0.0.355 → 0.0.356

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.
package/dist-lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
2
  import { C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, l as g, m as _, o as v, p as y, r as b, s as x, t as S, u as C, v as w, w as T, x as E, y as D } from "./authApi-CX_5lqr6.js";
3
- import { $ as O, $n as k, $r as ee, $t as A, A as j, An as te, Ar as ne, At as re, B as M, Bn as N, Br as ie, Bt as ae, C as oe, Ci as se, Cn as ce, Cr as le, Ct as ue, D as de, Dn as fe, Dr as pe, Dt as me, E as he, En as ge, Er as _e, Et as ve, F as ye, Fn as be, Fr as xe, Ft as Se, G as Ce, Gn as we, Gr as Te, Gt as Ee, H as De, Hn as Oe, Hr as P, Ht as ke, I as Ae, In as je, Ir as Me, It as Ne, J as Pe, Jn as Fe, Jr as Ie, Jt as Le, K as Re, Kn as ze, Kr as Be, Kt as Ve, L as He, Ln as Ue, Lr as We, Lt as Ge, M as Ke, Mn as qe, Mr as Je, Mt as Ye, N as Xe, Nn as Ze, Nr as Qe, Nt as $e, O as et, On as tt, Or as nt, Ot as rt, P as it, Pn as at, Pr as ot, Pt as st, Q as ct, Qn as lt, Qr as ut, Qt as dt, R as ft, Rn as pt, Rr as mt, Rt as ht, S as gt, Si as _t, Sn as vt, Sr as yt, St as bt, T as xt, Ti as St, Tn as Ct, Tr as wt, Tt, U as Et, Un as Dt, Ur as Ot, Ut as kt, V as At, Vn as jt, Vr as Mt, Vt as Nt, W as Pt, Wn as Ft, Wr as It, Wt as Lt, X as Rt, Xn as zt, Xr as Bt, Xt as Vt, Y as Ht, Yn as Ut, Yr as Wt, Yt as Gt, Z as Kt, Zn as qt, Zr as Jt, Zt as Yt, _ as Xt, _i as Zt, _n as Qt, _r as $t, _t as en, a as tn, ai as nn, an as rn, ar as an, at as on, b as sn, bi as cn, bn as ln, br as un, bt as dn, c as fn, ci as pn, cn as mn, cr as hn, ct as gn, d as _n, di as vn, dn as yn, dr as bn, dt as xn, ei as Sn, en as Cn, er as wn, et as Tn, f as En, fi as Dn, fn as On, fr as kn, ft as An, g as jn, gi as Mn, gn as Nn, gr as Pn, gt as Fn, h as In, hi as Ln, hn as Rn, hr as zn, ht as Bn, i as Vn, ii as Hn, in as Un, ir as Wn, it as Gn, j as Kn, jn as qn, jr as Jn, jt as Yn, k as Xn, kn as Zn, kr as Qn, kt as $n, l as er, li as tr, ln as nr, lr as rr, lt as ir, m as ar, mi as or, mn as sr, mr as cr, mt as lr, n as ur, ni as dr, nn as fr, nr as pr, nt as mr, o as hr, oi as gr, on as _r, or as vr, ot as yr, p as br, pi as xr, pn as Sr, pr as Cr, pt as wr, q as Tr, qn as Er, qr as Dr, qt as Or, r as kr, ri as Ar, rn as jr, rr as Mr, rt as Nr, s as Pr, si as Fr, sn as Ir, sr as Lr, st as Rr, t as zr, ti as Br, tn as Vr, tr as Hr, tt as Ur, u as Wr, ui as Gr, un as Kr, ur as qr, ut as Jr, v as Yr, vi as Xr, vn as Zr, vr as Qr, vt as $r, w as ei, wi as ti, wn as ni, wr as ri, wt as ii, x as ai, xi as oi, xn as si, xr as ci, xt as li, y as ui, yi as di, yn as fi, yr as pi, yt as mi, z as hi, zn as gi, zr as _i, zt as vi } from "./Breadcrumb-K-8UJ3Qh.js";
3
+ import { $ as O, $n as k, $r as A, $t as j, A as M, An as ee, Ar as te, At as ne, B as re, Bn as N, Br as ie, Bt as ae, C as oe, Ci as se, Cn as ce, Cr as le, Ct as ue, D as de, Dn as fe, Dr as pe, Dt as me, E as he, En as ge, Er as _e, Et as ve, F as ye, Fn as be, Fr as xe, Ft as Se, G as Ce, Gn as we, Gr as Te, Gt as Ee, H as De, Hn as Oe, Hr as P, Ht as ke, I as Ae, In as je, Ir as Me, It as Ne, J as Pe, Jn as Fe, Jr as Ie, Jt as Le, K as Re, Kn as ze, Kr as Be, Kt as Ve, L as He, Ln as Ue, Lr as We, Lt as Ge, M as Ke, Mn as qe, Mr as Je, Mt as Ye, N as Xe, Nn as Ze, Nr as Qe, Nt as $e, O as et, On as tt, Or as nt, Ot as rt, P as it, Pn as at, Pr as ot, Pt as st, Q as ct, Qn as lt, Qr as ut, Qt as dt, R as ft, Rn as pt, Rr as mt, Rt as ht, S as gt, Si as _t, Sn as vt, Sr as yt, St as bt, T as xt, Ti as St, Tn as Ct, Tr as wt, Tt, U as Et, Un as Dt, Ur as Ot, Ut as kt, V as At, Vn as jt, Vr as Mt, Vt as Nt, W as Pt, Wn as Ft, Wr as It, Wt as Lt, X as Rt, Xn as zt, Xr as Bt, Xt as Vt, Y as Ht, Yn as Ut, Yr as Wt, Yt as Gt, Z as Kt, Zn as qt, Zr as Jt, Zt as Yt, _ as Xt, _i as Zt, _n as Qt, _r as $t, _t as en, a as tn, ai as nn, an as rn, ar as an, at as on, b as sn, bi as cn, bn as ln, br as un, bt as dn, c as fn, ci as pn, cn as mn, cr as hn, ct as gn, d as _n, di as vn, dn as yn, dr as bn, dt as xn, ei as Sn, en as Cn, er as wn, et as Tn, f as En, fi as Dn, fn as On, fr as kn, ft as An, g as jn, gi as Mn, gn as Nn, gr as Pn, gt as Fn, h as In, hi as Ln, hn as Rn, hr as zn, ht as Bn, i as Vn, ii as Hn, in as Un, ir as Wn, it as Gn, j as Kn, jn as qn, jr as Jn, jt as Yn, k as Xn, kn as Zn, kr as Qn, kt as $n, l as er, li as tr, ln as nr, lr as rr, lt as ir, m as ar, mi as or, mn as sr, mr as cr, mt as lr, n as ur, ni as dr, nn as fr, nr as pr, nt as mr, o as hr, oi as gr, on as _r, or as vr, ot as yr, p as br, pi as xr, pn as Sr, pr as Cr, pt as wr, q as Tr, qn as Er, qr as Dr, qt as Or, r as kr, ri as Ar, rn as jr, rr as Mr, rt as Nr, s as Pr, si as Fr, sn as Ir, sr as Lr, st as Rr, t as zr, ti as Br, tn as Vr, tr as Hr, tt as Ur, u as Wr, ui as Gr, un as Kr, ur as qr, ut as Jr, v as Yr, vi as Xr, vn as Zr, vr as Qr, vt as $r, w as ei, wi as ti, wn as ni, wr as ri, wt as ii, x as ai, xi as oi, xn as si, xr as ci, xt as li, y as ui, yi as di, yn as fi, yr as pi, yt as mi, z as hi, zn as gi, zr as _i, zt as vi } from "./Breadcrumb-K-8UJ3Qh.js";
4
4
  import { r as yi } from "./diceCandidateMapper-DqBO4EhL.js";
5
5
  import { t as bi } from "./formGroupsCache-JeC59oNe.js";
6
6
  import { n as xi, r as Si } from "./addFormApi-B-fsXzPP.js";
@@ -211,7 +211,7 @@ function Js({ userIds: e = [], days: t = void 0, startDay: n = "Sun", renderDayC
211
211
  }), b = u != null && d != null ? {
212
212
  year: Number(u),
213
213
  month: Number(d) - 1
214
- } : v, [x, S] = L({}), [C, w] = L([]), [T, E] = L(!1), [D, O] = L(null), k = JSON.stringify(e), ee = n === "Mon" ? Rs : Ls, A = Ai(async () => {
214
+ } : v, [x, S] = L({}), [C, w] = L([]), [T, E] = L(!1), [D, O] = L(null), k = JSON.stringify(e), A = n === "Mon" ? Rs : Ls, j = Ai(async () => {
215
215
  E(!0);
216
216
  try {
217
217
  let t = await Ns({ userIds: e });
@@ -223,25 +223,25 @@ function Js({ userIds: e = [], days: t = void 0, startDay: n = "Sun", renderDayC
223
223
  }
224
224
  }, [k]);
225
225
  F(() => {
226
- g || A();
227
- }, [g, A]), F(() => (window.addEventListener("dashboard-calendar:refresh", A), () => window.removeEventListener("dashboard-calendar:refresh", A)), [A]);
228
- let j = f ?? (() => y((e) => e.month === 0 ? {
226
+ g || j();
227
+ }, [g, j]), F(() => (window.addEventListener("dashboard-calendar:refresh", j), () => window.removeEventListener("dashboard-calendar:refresh", j)), [j]);
228
+ let M = f ?? (() => y((e) => e.month === 0 ? {
229
229
  year: e.year - 1,
230
230
  month: 11
231
231
  } : {
232
232
  ...e,
233
233
  month: e.month - 1
234
- })), te = p ?? (() => y((e) => e.month === 11 ? {
234
+ })), ee = p ?? (() => y((e) => e.month === 11 ? {
235
235
  year: e.year + 1,
236
236
  month: 0
237
237
  } : {
238
238
  ...e,
239
239
  month: e.month + 1
240
- })), ne = Ws(Us(b.year, b.month, n), 7), re = {};
240
+ })), te = Ws(Us(b.year, b.month, n), 7), ne = {};
241
241
  t !== void 0 && (t || []).forEach((e) => {
242
- e?.date && (re[e.date] = e);
242
+ e?.date && (ne[e.date] = e);
243
243
  });
244
- let M = o ?? C, N = l ?? `${zs[b.month]} ${b.year}`;
244
+ let re = o ?? C, N = l ?? `${zs[b.month]} ${b.year}`;
245
245
  return /* @__PURE__ */ Y(Bi, {
246
246
  className: `calendar-card${c ? ` ${c}` : ""}`,
247
247
  title: /* @__PURE__ */ X("div", {
@@ -269,7 +269,7 @@ function Js({ userIds: e = [], days: t = void 0, startDay: n = "Sun", renderDayC
269
269
  type: "text",
270
270
  icon: /* @__PURE__ */ Y(wo, {}),
271
271
  size: "small",
272
- onClick: j,
272
+ onClick: M,
273
273
  disabled: m
274
274
  })
275
275
  }), /* @__PURE__ */ Y(K, {
@@ -278,7 +278,7 @@ function Js({ userIds: e = [], days: t = void 0, startDay: n = "Sun", renderDayC
278
278
  type: "text",
279
279
  icon: /* @__PURE__ */ Y(Wo, {}),
280
280
  size: "small",
281
- onClick: te,
281
+ onClick: ee,
282
282
  disabled: h
283
283
  })
284
284
  })]
@@ -289,7 +289,7 @@ function Js({ userIds: e = [], days: t = void 0, startDay: n = "Sun", renderDayC
289
289
  /* @__PURE__ */ Y(oa, {
290
290
  gutter: [6, 0],
291
291
  className: "calendar-day-names",
292
- children: ee.map((e) => /* @__PURE__ */ Y(z, {
292
+ children: A.map((e) => /* @__PURE__ */ Y(z, {
293
293
  flex: "1",
294
294
  className: "calendar-day-name",
295
295
  children: e
@@ -297,7 +297,7 @@ function Js({ userIds: e = [], days: t = void 0, startDay: n = "Sun", renderDayC
297
297
  }),
298
298
  /* @__PURE__ */ Y("div", {
299
299
  className: "calendar-weeks",
300
- children: ne.map((e, t) => /* @__PURE__ */ Y(oa, {
300
+ children: te.map((e, t) => /* @__PURE__ */ Y(oa, {
301
301
  gutter: [6, 6],
302
302
  align: "top",
303
303
  className: "calendar-week-row",
@@ -308,7 +308,7 @@ function Js({ userIds: e = [], days: t = void 0, startDay: n = "Sun", renderDayC
308
308
  }, t);
309
309
  let n = `${b.year}-${Hs(b.month + 1)}-${Hs(e.day)}`, a = e.day === _.getDate() && b.month === _.getMonth() && b.year === _.getFullYear();
310
310
  if (g) {
311
- let o = re[n] ?? null;
311
+ let o = ne[n] ?? null;
312
312
  return r ? /* @__PURE__ */ Y(z, {
313
313
  flex: "1",
314
314
  children: r(n, o, {
@@ -366,9 +366,9 @@ function Js({ userIds: e = [], days: t = void 0, startDay: n = "Sun", renderDayC
366
366
  })
367
367
  }, t))
368
368
  }),
369
- M.length > 0 && /* @__PURE__ */ Y("div", {
369
+ re.length > 0 && /* @__PURE__ */ Y("div", {
370
370
  className: "calendar-legend",
371
- children: M.map(({ label: e, color: t, icon: n }) => /* @__PURE__ */ X("div", {
371
+ children: re.map(({ label: e, color: t, icon: n }) => /* @__PURE__ */ X("div", {
372
372
  className: "calendar-legend-item",
373
373
  children: [n ? /* @__PURE__ */ Y("span", {
374
374
  className: "calendar-legend-badge",
@@ -1133,7 +1133,7 @@ function $c({ current: e, pageSize: t, total: n, onChange: r, onPageSizeChange:
1133
1133
  align: "center",
1134
1134
  justify: "space-between",
1135
1135
  className: "custom-pagination",
1136
- style: { color: te.textSecondary },
1136
+ style: { color: ee.textSecondary },
1137
1137
  children: [/* @__PURE__ */ X(U, {
1138
1138
  size: 5,
1139
1139
  align: "center",
@@ -4406,8 +4406,8 @@ function gp({ moduleName: e, open: t = !1, filters: n = [], onClose: r, onApply:
4406
4406
  let { values: t } = e;
4407
4407
  return typeof t == "string" ? t.trim() === "" : !Array.isArray(t) || t.length === 0 || t.every((e) => e == null || e === "");
4408
4408
  }
4409
- let ee = s.length === 0 || s.every(k);
4410
- function A(e, t) {
4409
+ let A = s.length === 0 || s.every(k);
4410
+ function j(e, t) {
4411
4411
  let n = o.getFieldValue("filters") ?? [];
4412
4412
  o.setFieldValue("filters", n.map((t, n) => n === e ? {
4413
4413
  ...t,
@@ -4449,7 +4449,7 @@ function gp({ moduleName: e, open: t = !1, filters: n = [], onClose: r, onApply:
4449
4449
  }), /* @__PURE__ */ Y(An, {
4450
4450
  variant: "primary",
4451
4451
  onClick: O,
4452
- disabled: ee,
4452
+ disabled: A,
4453
4453
  children: "Apply"
4454
4454
  })]
4455
4455
  }),
@@ -4537,7 +4537,7 @@ function gp({ moduleName: e, open: t = !1, filters: n = [], onClose: r, onApply:
4537
4537
  options: x,
4538
4538
  optionFilterProp: "label",
4539
4539
  loading: l,
4540
- onChange: (e) => A(t.name, e)
4540
+ onChange: (e) => j(t.name, e)
4541
4541
  })
4542
4542
  })
4543
4543
  }), /* @__PURE__ */ Y(B.Item, {
@@ -5439,7 +5439,7 @@ function dh({ filters: e, onRemove: t, onClearAll: n }) {
5439
5439
  ]
5440
5440
  });
5441
5441
  }
5442
- function fh({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [], breadcrumbItems: i = [], dataSource: a = [], className: o = "", initialPageSize: s = 10, onAction: c, onSummaryClick: u, rowKey: d, showSummaryButton: f = !1, summaryButtonLabel: m = "View Summary", summaryRoute: h, showFieldButton: g = !0, showFilterButton: _ = !0, fieldButtonLabel: y = "View Field", fieldButtonRoute: x, tabs: S, tabTitleOverrides: C = null, tableClassName: w = "job-list-table", fields: T = ah, fieldOverrides: D = null, extraFields: O = ah, listName: k = "", loading: ee = !1, total: A, current: j, pageSize: te, onPageChange: ne, onPageSizeChange: re, onSearch: M, toolbarExtra: N = null, showSearch: ie = !0, searchPlaceholder: ae = "Min 3 Chars, press Enter to search", searchFields: oe = ah, showViewToggle: se = !1, activeView: ce = "list", onViewChange: le, autoCardForExternalRows: ue = !0, createAction: de, onRecordClick: fe, selectedRecordId: pe, selectionMode: me = "checkbox", compact: he = !1, onSelectionChange: ge, selectedSource: _e, onTabChange: ve, fetchData: ye = Vu, responseMapper: be = Mf, queryParams: xe = oh, defaultVisibleColumnCount: Se = 6, showAdd: Ce = !0, redirectOnViewDenied: we = !0, lockOuterPageScroll: Te = !1 }) {
5442
+ function fh({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [], breadcrumbItems: i = [], dataSource: a = [], className: o = "", initialPageSize: s = 10, onAction: c, onSummaryClick: u, rowKey: d, showSummaryButton: f = !1, summaryButtonLabel: m = "View Summary", summaryRoute: h, showFieldButton: g = !0, showFilterButton: _ = !0, fieldButtonLabel: y = "View Field", fieldButtonRoute: x, tabs: S, tabTitleOverrides: C = null, tableClassName: w = "job-list-table", fields: T = ah, fieldOverrides: D = null, extraFields: O = ah, listName: k = "", loading: A = !1, total: j, current: M, pageSize: ee, onPageChange: te, onPageSizeChange: ne, onSearch: re, toolbarExtra: N = null, showSearch: ie = !0, searchPlaceholder: ae = "Min 3 Chars, press Enter to search", searchFields: oe = ah, showViewToggle: se = !1, activeView: ce = "list", onViewChange: le, autoCardForExternalRows: ue = !0, createAction: de, onRecordClick: fe, selectedRecordId: pe, selectionMode: me = "checkbox", compact: he = !1, onSelectionChange: ge, selectedSource: _e, onTabChange: ve, fetchData: ye = Vu, responseMapper: be = Mf, queryParams: xe = oh, defaultVisibleColumnCount: Se = 6, showAdd: Ce = !0, redirectOnViewDenied: we = !0, lockOuterPageScroll: Te = !1 }) {
5443
5443
  let Ee = Os(), De = Ds(), Oe = ni(e), [P, ke] = L(() => /* @__PURE__ */ new Set()), [Ae, je] = L(() => /* @__PURE__ */ new Set());
5444
5444
  F(() => {
5445
5445
  if (jm(Oe) !== "submissions") {
@@ -5490,7 +5490,7 @@ function fh({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5490
5490
  n && fe?.(e, n);
5491
5491
  }, Ct = (e, t) => {
5492
5492
  $e(e), tt(t), ge?.(e, t);
5493
- }, [wt, Tt] = L(a), [Et, Dt] = L(a.length), [Ot, kt] = L([]), [At, jt] = L([]), [Mt, Nt] = L(""), [Pt, Ft] = L([]), [It, Lt] = L([]), [Rt, zt] = L(!1), [Bt, Vt] = L(!1), [Ht, Ut] = L(null), [Wt, Gt] = L(null), [Kt, qt] = L(!1), Jt = !!(ne || re || M), Yt = Jt ? a : wt, Xt = Jt ? A ?? 0 : Et, Zt = Jt ? T : At, Qt = I(() => Yt.some((e) => Ap(e)), [Yt]), $t = I(() => Zt.some((e) => kp(e)), [Zt]), en = ue && (Qt || $t) ? "card" : ce, tn = n.length > 0 ? n : Pt, nn = r.length > 0 ? r : It, rn = I(() => Km(tn), [tn]), an = I(() => new Map(Gm(rn).map((e) => [e.key, e])), [rn]), on = I(() => Wm(rn, (e) => {
5493
+ }, [wt, Tt] = L(a), [Et, Dt] = L(a.length), [Ot, kt] = L([]), [At, jt] = L([]), [Mt, Nt] = L(""), [Pt, Ft] = L([]), [It, Lt] = L([]), [Rt, zt] = L(!1), [Bt, Vt] = L(!1), [Ht, Ut] = L(null), [Wt, Gt] = L(null), [Kt, qt] = L(!1), Jt = !!(te || ne || re), Yt = Jt ? a : wt, Xt = Jt ? j ?? 0 : Et, Zt = Jt ? T : At, Qt = I(() => Yt.some((e) => Ap(e)), [Yt]), $t = I(() => Zt.some((e) => kp(e)), [Zt]), en = ue && (Qt || $t) ? "card" : ce, tn = n.length > 0 ? n : Pt, nn = r.length > 0 ? r : It, rn = I(() => Km(tn), [tn]), an = I(() => new Map(Gm(rn).map((e) => [e.key, e])), [rn]), on = I(() => Wm(rn, (e) => {
5494
5494
  let t = jd(e);
5495
5495
  return t === "add" && !Pe || t === "edit" && !Fe || t === "delete" && !Ie || !it(Le, e.permission, Oe) || e.showInList === !1 ? !1 : !e.allowedTabs || e.allowedTabs.some((e) => jm(e) === jm(He));
5496
5496
  }), [
@@ -5539,9 +5539,9 @@ function fh({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5539
5539
  ct({
5540
5540
  sort: r,
5541
5541
  sortDir: n
5542
- }), typeof M == "function" && M(r, n), fn();
5542
+ }), typeof re == "function" && re(r, n), fn();
5543
5543
  }, [
5544
- M,
5544
+ re,
5545
5545
  fn,
5546
5546
  st.sort,
5547
5547
  st.sortDir
@@ -5553,15 +5553,15 @@ function fh({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5553
5553
  });
5554
5554
  }, [Ve]), F(() => {
5555
5555
  Jt && ot((e) => {
5556
- let t = nh(j ?? e.current), n = Number(te) > 0 ? Number(te) : e.pageSize;
5556
+ let t = nh(M ?? e.current), n = Number(ee) > 0 ? Number(ee) : e.pageSize;
5557
5557
  return e.current === t && e.pageSize === n ? e : {
5558
5558
  current: t,
5559
5559
  pageSize: n
5560
5560
  };
5561
5561
  });
5562
5562
  }, [
5563
- j,
5564
- te,
5563
+ M,
5564
+ ee,
5565
5565
  Jt
5566
5566
  ]);
5567
5567
  let _n = De.state?.refreshTimestamp;
@@ -6204,7 +6204,7 @@ function fh({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
6204
6204
  ref: ht,
6205
6205
  className: "job-table-measure",
6206
6206
  children: /* @__PURE__ */ Y(la, {
6207
- spinning: Jt ? ee : mn || Rt,
6207
+ spinning: Jt ? A : mn || Rt,
6208
6208
  children: en === "card" ? Rn.length === 0 ? /* @__PURE__ */ Y(qi, {
6209
6209
  image: qi.PRESENTED_IMAGE_SIMPLE,
6210
6210
  description: Wn,
@@ -6290,15 +6290,15 @@ function fh({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
6290
6290
  pageSize: at.pageSize,
6291
6291
  total: zn,
6292
6292
  onChange: (e, t) => {
6293
- if (Jt && typeof ne == "function") {
6294
- ne(e, t ?? at.pageSize);
6293
+ if (Jt && typeof te == "function") {
6294
+ te(e, t ?? at.pageSize);
6295
6295
  return;
6296
6296
  }
6297
6297
  dn(e);
6298
6298
  },
6299
6299
  onPageSizeChange: (e) => {
6300
- if (Jt && typeof re == "function") {
6301
- re(e);
6300
+ if (Jt && typeof ne == "function") {
6301
+ ne(e);
6302
6302
  return;
6303
6303
  }
6304
6304
  ot({
@@ -6761,7 +6761,7 @@ function lg(e, t) {
6761
6761
  ]) {
6762
6762
  if (!n) continue;
6763
6763
  let t = e[n];
6764
- if (t ??= A(e, n), t != null) return t;
6764
+ if (t ??= j(e, n), t != null) return t;
6765
6765
  }
6766
6766
  }
6767
6767
  function ug(e) {
@@ -7054,12 +7054,12 @@ function jg(e, t, n = {}, r = "") {
7054
7054
  return a.schemaVersion = 1, i.append("json", JSON.stringify(a)), i;
7055
7055
  }
7056
7056
  function Mg({ field: e, form: t, name: n, moduleName: r, value: i, checked: a, onChange: o, scopeValues: s = {}, onAiUpload: c, onDuplicateBlur: l, onRegionBlocked: u, onRowOrderChange: d, formDisabled: f, rowFieldKeys: p }) {
7057
- let m = e.type ?? "text", h = !Wh(e, r), [g, _] = L(null), [y, b] = L(!1), [x, S] = L(""), [C, w] = L(""), [T, D] = L(""), [O, k] = L(0), [ee, A] = L({
7057
+ let m = e.type ?? "text", h = !Wh(e, r), [g, _] = L(null), [y, b] = L(!1), [x, S] = L(""), [C, w] = L(""), [T, D] = L(""), [O, k] = L(0), [A, j] = L({
7058
7058
  open: !1,
7059
7059
  docs: [],
7060
7060
  index: 0
7061
- }), [j, te] = L(null), ne = Pi([]), re = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", N = e.lookupFilterValueFrom ? Kh(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], ie = e.lookupFilterValueFrom && re ? [...n.slice(0, 2), ...Kh(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], ae = B.useWatch(N, t), oe = B.useWatch(ie, t), se = dg(oe) ? ae : oe, ce = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], le = B.useWatch(ce, t), ue = e.disabledIf?.field ? Kh(e.disabledIf.field) : ["__noop_disabled_if__"], de = e.disabledIf?.field && re ? [...n.slice(0, 2), ...Kh(e.disabledIf.field)] : ["__noop_disabled_if_row__"], fe = B.useWatch(ue, t), pe = B.useWatch(de, t), me = e.disabledIf?.field ? Vn(e.disabledIf, dg(pe) ? fe : pe) : !1, he = e.optionsFromField || "", _e = he ? Kh(he) : ["__noop_options_from__"], ye = he && re && (!p || p.has(he)) ? [...n.slice(0, 2), ...Kh(he)] : ["__noop_options_from_row__"], be = B.useWatch(_e, t), xe = B.useWatch(ye, t), Se = dg(xe) ? be : xe, we = Uh(e.prefillWhenExclusive) && e.prefillWhen?.length ? e.prefillWhen : null, Te = B.useWatch((e) => we ? JSON.stringify(Re(we).map((t) => {
7062
- let r = (t) => t.reduce((e, t) => e == null ? e : e[t], e), i = re && (!p || p.has(t)) ? r([...n.slice(0, 2), ...Kh(t)]) : void 0;
7061
+ }), [M, ee] = L(null), te = Pi([]), ne = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", N = e.lookupFilterValueFrom ? Kh(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], ie = e.lookupFilterValueFrom && ne ? [...n.slice(0, 2), ...Kh(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], ae = B.useWatch(N, t), oe = B.useWatch(ie, t), se = dg(oe) ? ae : oe, ce = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], le = B.useWatch(ce, t), ue = e.disabledIf?.field ? Kh(e.disabledIf.field) : ["__noop_disabled_if__"], de = e.disabledIf?.field && ne ? [...n.slice(0, 2), ...Kh(e.disabledIf.field)] : ["__noop_disabled_if_row__"], fe = B.useWatch(ue, t), pe = B.useWatch(de, t), me = e.disabledIf?.field ? Vn(e.disabledIf, dg(pe) ? fe : pe) : !1, he = e.optionsFromField || "", _e = he ? Kh(he) : ["__noop_options_from__"], ye = he && ne && (!p || p.has(he)) ? [...n.slice(0, 2), ...Kh(he)] : ["__noop_options_from_row__"], be = B.useWatch(_e, t), xe = B.useWatch(ye, t), Se = dg(xe) ? be : xe, we = Uh(e.prefillWhenExclusive) && e.prefillWhen?.length ? e.prefillWhen : null, Te = B.useWatch((e) => we ? JSON.stringify(Re(we).map((t) => {
7062
+ let r = (t) => t.reduce((e, t) => e == null ? e : e[t], e), i = ne && (!p || p.has(t)) ? r([...n.slice(0, 2), ...Kh(t)]) : void 0;
7063
7063
  return (dg(i) ? r(Kh(t)) : i) ?? null;
7064
7064
  })) : "", {
7065
7065
  form: t,
@@ -7070,13 +7070,13 @@ function Mg({ field: e, form: t, name: n, moduleName: r, value: i, checked: a, o
7070
7070
  return Re(we).forEach((n, r) => {
7071
7071
  t[n] = e[r];
7072
7072
  }), t;
7073
- }, [Te]), Oe = ji(ng), P = e.exclusiveInGroup && re ? [n[0]] : ["__noop_exclusive_watch__"], ke = B.useWatch(P, t), Ae = I(() => {
7074
- if (!e.exclusiveInGroup || !re || !Array.isArray(ke)) return !1;
7073
+ }, [Te]), Oe = ji(ng), P = e.exclusiveInGroup && ne ? [n[0]] : ["__noop_exclusive_watch__"], ke = B.useWatch(P, t), Ae = I(() => {
7074
+ if (!e.exclusiveInGroup || !ne || !Array.isArray(ke)) return !1;
7075
7075
  let t = n[1], r = n[n.length - 1];
7076
7076
  return ke.some((e, n) => n !== t && Uh(e?.[r]));
7077
7077
  }, [
7078
7078
  e.exclusiveInGroup,
7079
- re,
7079
+ ne,
7080
7080
  ke,
7081
7081
  n
7082
7082
  ]), je = e.lookupFilterValueFrom ? s[e.lookupFilterValueFrom] : void 0, Me = dg(je) ? se : je, Ne = Pi(He);
@@ -7093,7 +7093,7 @@ function Mg({ field: e, form: t, name: n, moduleName: r, value: i, checked: a, o
7093
7093
  errors: []
7094
7094
  }]);
7095
7095
  }, [Me]);
7096
- let Pe = e.locationCountryFrom ? Kh(e.locationCountryFrom) : ["__noop_loc_country__"], Fe = e.locationCountryFrom && re ? [...n.slice(0, 2), ...Kh(e.locationCountryFrom)] : ["__noop_loc_country_row__"], Ie = B.useWatch(Pe, t), Le = B.useWatch(Fe, t), ze = dg(Le) ? Ie : Le, Be = e.locationStateFrom ? Kh(e.locationStateFrom) : ["__noop_loc_state__"], Ve = e.locationStateFrom && re ? [...n.slice(0, 2), ...Kh(e.locationStateFrom)] : ["__noop_loc_state_row__"], Ue = B.useWatch(Be, t), We = B.useWatch(Ve, t), Ge = dg(We) ? Ue : We, Ke = e.dataSource === "locationMaster" && (e.locationLevel === "state" && dg(ze) || e.locationLevel === "city" && (dg(ze) || dg(Ge))), qe = h || !!e.disabled || me || (e.disabledByField ? Uh(le) : !1) || !!f || Oe || Ae || Ke;
7096
+ let Pe = e.locationCountryFrom ? Kh(e.locationCountryFrom) : ["__noop_loc_country__"], Fe = e.locationCountryFrom && ne ? [...n.slice(0, 2), ...Kh(e.locationCountryFrom)] : ["__noop_loc_country_row__"], Ie = B.useWatch(Pe, t), Le = B.useWatch(Fe, t), ze = dg(Le) ? Ie : Le, Be = e.locationStateFrom ? Kh(e.locationStateFrom) : ["__noop_loc_state__"], Ve = e.locationStateFrom && ne ? [...n.slice(0, 2), ...Kh(e.locationStateFrom)] : ["__noop_loc_state_row__"], Ue = B.useWatch(Be, t), We = B.useWatch(Ve, t), Ge = dg(We) ? Ue : We, Ke = e.dataSource === "locationMaster" && (e.locationLevel === "state" && dg(ze) || e.locationLevel === "city" && (dg(ze) || dg(Ge))), qe = h || !!e.disabled || me || (e.disabledByField ? Uh(le) : !1) || !!f || Oe || Ae || Ke;
7097
7097
  F(() => {
7098
7098
  if (m === "location") {
7099
7099
  let t = !1;
@@ -7157,7 +7157,7 @@ function Mg({ field: e, form: t, name: n, moduleName: r, value: i, checked: a, o
7157
7157
  }, r = Et(n);
7158
7158
  r = At(e, r), r.length && t.set("extraFields", r.join(","));
7159
7159
  let a = await v(E, `/admin/lookup-dropdown-values?${t}`);
7160
- i = a?.data ?? a ?? [], i = M(i, e, Me, { source: "AddFormV1" }), i = De(i, n, { source: "AddFormV1" });
7160
+ i = a?.data ?? a ?? [], i = re(i, e, Me, { source: "AddFormV1" }), i = De(i, n, { source: "AddFormV1" });
7161
7161
  } else if (t === "locationMaster") {
7162
7162
  let t = e.locationLevel || "country";
7163
7163
  if (t === "state" && dg(ze)) i = [];
@@ -7182,7 +7182,7 @@ function Mg({ field: e, form: t, name: n, moduleName: r, value: i, checked: a, o
7182
7182
  })) : [];
7183
7183
  }
7184
7184
  }
7185
- n || (ne.current = Array.isArray(i) ? i : [], _(Gh(ne.current)));
7185
+ n || (te.current = Array.isArray(i) ? i : [], _(Gh(te.current)));
7186
7186
  } catch (t) {
7187
7187
  console.error(`[AddFormV1] Failed to fetch options for "${e.field}":`, t), n || _([]);
7188
7188
  } finally {
@@ -7272,14 +7272,14 @@ function Mg({ field: e, form: t, name: n, moduleName: r, value: i, checked: a, o
7272
7272
  let n = e.formatter ? Eg(t.target.value, e.formatter) : t.target.value;
7273
7273
  if (ht) {
7274
7274
  let { cleaned: e, error: t } = Tt(n, ht, "change");
7275
- te(t), n = e;
7275
+ ee(t), n = e;
7276
7276
  }
7277
7277
  pt(n);
7278
7278
  },
7279
7279
  onBlur: (t) => {
7280
7280
  if (ht) {
7281
7281
  let { cleaned: e, error: n } = Tt(t.target.value, ht, "blur");
7282
- te(n), e !== t.target.value && pt(e);
7282
+ ee(n), e !== t.target.value && pt(e);
7283
7283
  }
7284
7284
  e.checkDuplicateOnBlur && String(t.target.value ?? "").trim() && l?.(e);
7285
7285
  },
@@ -7291,7 +7291,7 @@ function Mg({ field: e, form: t, name: n, moduleName: r, value: i, checked: a, o
7291
7291
  if (!t.test(n)) {
7292
7292
  e.preventDefault();
7293
7293
  let t = `${ht.title} — invalid character.`;
7294
- te(t), setTimeout(() => te((e) => e === t ? null : e), 1800);
7294
+ ee(t), setTimeout(() => ee((e) => e === t ? null : e), 1800);
7295
7295
  }
7296
7296
  },
7297
7297
  maxLength: ht.maxLength ?? ut.maxLength
@@ -7345,8 +7345,8 @@ function Mg({ field: e, form: t, name: n, moduleName: r, value: i, checked: a, o
7345
7345
  let r = a ? [...n.slice(0, 2), ...Kh(e)] : Kh(e);
7346
7346
  t.setFieldValue(r, null);
7347
7347
  });
7348
- else if (ne.current.length > 0) {
7349
- let i = e.valueField ?? "_id", o = ne.current.find((e) => ig(e, i) === r || e._id === r || e.id === r || e.value === r);
7348
+ else if (te.current.length > 0) {
7349
+ let i = e.valueField ?? "_id", o = te.current.find((e) => ig(e, i) === r || e._id === r || e.id === r || e.value === r);
7350
7350
  o && e.autofillFrom.forEach(({ optionKey: e, targetField: r }) => {
7351
7351
  let i = ig(o, e) ?? o.extraData?.[e] ?? null, s = a ? [...n.slice(0, 2), ...Kh(r)] : Kh(r);
7352
7352
  t.setFieldValue(s, i);
@@ -7387,21 +7387,21 @@ function Mg({ field: e, form: t, name: n, moduleName: r, value: i, checked: a, o
7387
7387
  onChange: (e) => {
7388
7388
  if (ht) {
7389
7389
  let { error: t } = Tt(e, ht, "change");
7390
- te(t);
7390
+ ee(t);
7391
7391
  }
7392
7392
  pt(e);
7393
7393
  }
7394
- }), j && /* @__PURE__ */ Y("div", {
7394
+ }), M && /* @__PURE__ */ Y("div", {
7395
7395
  className: "v1-input-validator-hint",
7396
- children: j
7396
+ children: M
7397
7397
  })] });
7398
7398
  if (m === "textarea") return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(zh, {
7399
7399
  ...gt,
7400
7400
  rows: e.rows ?? 3,
7401
7401
  className: "v1-scroll-textarea"
7402
- }), j && /* @__PURE__ */ Y("div", {
7402
+ }), M && /* @__PURE__ */ Y("div", {
7403
7403
  className: "v1-input-validator-hint",
7404
- children: j
7404
+ children: M
7405
7405
  })] });
7406
7406
  if (m === "date") return /* @__PURE__ */ Y(Ui, {
7407
7407
  disabled: qe,
@@ -7447,7 +7447,7 @@ function Mg({ field: e, form: t, name: n, moduleName: r, value: i, checked: a, o
7447
7447
  name: e.name ?? "file"
7448
7448
  };
7449
7449
  }).filter((e) => e.url);
7450
- A({
7450
+ j({
7451
7451
  open: !0,
7452
7452
  docs: n,
7453
7453
  index: t ?? 0
@@ -7511,13 +7511,13 @@ function Mg({ field: e, form: t, name: n, moduleName: r, value: i, checked: a, o
7511
7511
  })
7512
7512
  ]
7513
7513
  }, e.uid ?? t)), E = /* @__PURE__ */ Y(ge, {
7514
- documents: ee.docs,
7515
- open: ee.open,
7516
- onClose: () => A((e) => ({
7514
+ documents: A.docs,
7515
+ open: A.open,
7516
+ onClose: () => j((e) => ({
7517
7517
  ...e,
7518
7518
  open: !1
7519
7519
  })),
7520
- initialIndex: ee.index
7520
+ initialIndex: A.index
7521
7521
  });
7522
7522
  if (_) {
7523
7523
  let t = d.length > 0 ? `Upload more ${e.label ?? "files"}` : e.buttonLabel ?? `Upload ${e.label ?? "File"}`;
@@ -7609,9 +7609,9 @@ function Mg({ field: e, form: t, name: n, moduleName: r, value: i, checked: a, o
7609
7609
  type: m === "number" ? "number" : m,
7610
7610
  ...m === "number" && Uh(e.decimal) ? { step: "any" } : {},
7611
7611
  ...e.suffix ? { suffix: e.suffix } : {}
7612
- }), j && /* @__PURE__ */ Y("div", {
7612
+ }), M && /* @__PURE__ */ Y("div", {
7613
7613
  className: "v1-input-validator-hint",
7614
- children: j
7614
+ children: M
7615
7615
  })] });
7616
7616
  }
7617
7617
  function Ng({ icon: e, title: t }) {
@@ -7705,7 +7705,7 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
7705
7705
  F(() => (n && p(n), () => {
7706
7706
  n && b();
7707
7707
  }), [n]);
7708
- let D = l === "search", O = u ?? (D ? "Search" : "Create"), k = Os(), ee = Ds(), A = Pi(null), te = Pi(null), ne = ks(), [M] = As(), [N] = B.useForm();
7708
+ let D = l === "search", O = u ?? (D ? "Search" : "Create"), k = Os(), A = Ds(), j = Pi(null), ee = Pi(null), te = ks(), [re] = As(), [N] = B.useForm();
7709
7709
  Ni(E, () => ({
7710
7710
  submit: () => N.submit(),
7711
7711
  validate: () => N.validateFields(),
@@ -7723,7 +7723,7 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
7723
7723
  }), [P, ke] = L({
7724
7724
  current: 1,
7725
7725
  pageSize: 10
7726
- }), [je, Me] = L({}), [Ne, Pe] = L("internal"), [Fe, Ie] = L([]), [Re, ze] = L({}), [Be, He] = L([]), [Ue, We] = L(r ?? ""), [Ge, qe] = L(i ?? ""), [Je, Ye] = L(null), [Ze, Qe] = L(!1), [$e, tt] = L(null), [nt, rt] = L(() => /* @__PURE__ */ new Set()), it = e ? fe : a ?? Bh, at = e ? me : o, ot = e ? ve : s, [st, ct] = L(""), lt = ne?.jobId && ne.jobId !== "_" ? ne.jobId : M.get("jobId") || "";
7726
+ }), [je, Me] = L({}), [Ne, Pe] = L("internal"), [Fe, Ie] = L([]), [Re, ze] = L({}), [Be, He] = L([]), [Ue, We] = L(r ?? ""), [Ge, qe] = L(i ?? ""), [Je, Ye] = L(null), [Ze, Qe] = L(!1), [$e, tt] = L(null), [nt, rt] = L(() => /* @__PURE__ */ new Set()), it = e ? fe : a ?? Bh, at = e ? me : o, ot = e ? ve : s, [st, ct] = L(""), lt = te?.jobId && te.jobId !== "_" ? te.jobId : re.get("jobId") || "";
7727
7727
  F(() => {
7728
7728
  if (r || _ || !lt) return;
7729
7729
  let e = !1;
@@ -7844,7 +7844,7 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
7844
7844
  }), At = Ai((e) => {
7845
7845
  let t = Dt().region, n = ft.find((t) => (t.fields ?? []).some((t) => t.field === e.field));
7846
7846
  if (!n) return !1;
7847
- let r = j(n, t), i = r.orderBy?.inProgressField ?? "currentStudyingHere";
7847
+ let r = M(n, t), i = r.orderBy?.inProgressField ?? "currentStudyingHere";
7848
7848
  if (e.field !== i || ei(r)) return !1;
7849
7849
  let a = xt(r);
7850
7850
  return Lt({
@@ -7863,7 +7863,7 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
7863
7863
  }, [ft]), jt = Ai((e, t) => {
7864
7864
  let n = ft.find((e) => e.name === t);
7865
7865
  if (!n) return;
7866
- let r = j(n, Dt().region), i = r.orderBy?.inProgressField ?? "currentStudyingHere";
7866
+ let r = M(n, Dt().region), i = r.orderBy?.inProgressField ?? "currentStudyingHere";
7867
7867
  if (e.field !== i) return;
7868
7868
  let a = gt(r);
7869
7869
  return a ? [a] : void 0;
@@ -7871,7 +7871,7 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
7871
7871
  if (!Array.isArray(t) || t.length < 3 || typeof t[1] != "number") return;
7872
7872
  let n = t[0], r = t[1], i = ft.find((e) => e.name === n);
7873
7873
  if (!i) return;
7874
- let a = j(i, Dt().region);
7874
+ let a = M(i, Dt().region);
7875
7875
  if (!a.orderBy) return;
7876
7876
  await Promise.resolve();
7877
7877
  let o = N.getFieldValue(n);
@@ -7997,7 +7997,7 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
7997
7997
  ]);
7998
7998
  let Qt = I(() => {
7999
7999
  if (!h) return null;
8000
- let e = M.get("candidateId") || "", t = M.get("submissionId") || "", n = String(M.get("isFromSubmission")) === "true", r = ne.jobId && ne.jobId !== "_" ? ne.jobId : M.get("jobId") || "", i = n && t ? {
8000
+ let e = re.get("candidateId") || "", t = re.get("submissionId") || "", n = String(re.get("isFromSubmission")) === "true", r = te.jobId && te.jobId !== "_" ? te.jobId : re.get("jobId") || "", i = n && t ? {
8001
8001
  module: "submissions",
8002
8002
  id: t
8003
8003
  } : e ? {
@@ -8010,8 +8010,8 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
8010
8010
  };
8011
8011
  }, [
8012
8012
  h,
8013
- M,
8014
- ne
8013
+ re,
8014
+ te
8015
8015
  ]);
8016
8016
  F(() => {
8017
8017
  let e = Qt?.source;
@@ -8114,15 +8114,15 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
8114
8114
  ft,
8115
8115
  N
8116
8116
  ]), F(() => {
8117
- let e = ee?.state?.relevantSkillsToken, t = ee?.state?.relevantSkillsInputs, n = t?.jobId ?? Qt?.linkage?.jobId ?? "", r = t?.applicantId ?? t?.candidateId ?? Qt?.linkage?.applicantId ?? "";
8117
+ let e = A?.state?.relevantSkillsToken, t = A?.state?.relevantSkillsInputs, n = t?.jobId ?? Qt?.linkage?.jobId ?? "", r = t?.applicantId ?? t?.candidateId ?? Qt?.linkage?.applicantId ?? "";
8118
8118
  if (!(e || t) || at || ft.length === 0) return;
8119
8119
  let i = ft.filter((e) => Uh(e.addRow) && e.skillMatchField);
8120
8120
  if (i.length === 0) return;
8121
8121
  let a = e || `inputs:${n}:${r}`, o;
8122
- if (A.current === a && te.current ? o = te.current : (o = e ? gh(e) : void 0, (!o || typeof o.then != "function") && n && r && (o = _h({
8122
+ if (j.current === a && ee.current ? o = ee.current : (o = e ? gh(e) : void 0, (!o || typeof o.then != "function") && n && r && (o = _h({
8123
8123
  jobId: n,
8124
8124
  applicantId: r
8125
- }).catch(() => [])), A.current = a, te.current = o), !o || typeof o.then != "function") return;
8125
+ }).catch(() => [])), j.current = a, ee.current = o), !o || typeof o.then != "function") return;
8126
8126
  let s = !1;
8127
8127
  return o.then((e) => {
8128
8128
  if (s || !Array.isArray(e) || e.length === 0) return;
@@ -8138,8 +8138,8 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
8138
8138
  s = !0;
8139
8139
  };
8140
8140
  }, [
8141
- ee?.state?.relevantSkillsToken,
8142
- ee?.state?.relevantSkillsInputs,
8141
+ A?.state?.relevantSkillsToken,
8142
+ A?.state?.relevantSkillsInputs,
8143
8143
  Qt?.linkage?.jobId,
8144
8144
  Qt?.linkage?.applicantId,
8145
8145
  at,
@@ -8341,7 +8341,7 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
8341
8341
  }) }, N), !0);
8342
8342
  }, wn = Ai(async (e) => {
8343
8343
  try {
8344
- let t = Dt().region, n = ft.map((e) => j(e, t)), r = et(n, e);
8344
+ let t = Dt().region, n = ft.map((e) => M(e, t)), r = et(n, e);
8345
8345
  return r.severity === "allow" ? !0 : r.severity === "block" ? (Lt({
8346
8346
  tone: "duplicate",
8347
8347
  title: "This qualification history is incomplete",
@@ -8516,7 +8516,7 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
8516
8516
  children: T
8517
8517
  })
8518
8518
  }) : T, O = C.length > 0 ? (() => {
8519
- let e = re(C), n = (n) => /* @__PURE__ */ Y($n, {
8519
+ let e = ne(C), n = (n) => /* @__PURE__ */ Y($n, {
8520
8520
  position: n,
8521
8521
  actions: e[n],
8522
8522
  aiActions: Ot,
@@ -8535,7 +8535,7 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
8535
8535
  n("bottom-right")
8536
8536
  ]
8537
8537
  });
8538
- })() : E, k = (e) => n === void 0 ? e : [n, e], ee = t.verifyAction ? /* @__PURE__ */ X(J, { children: [t.verifyResultField && /* @__PURE__ */ Y(B.Item, {
8538
+ })() : E, k = (e) => n === void 0 ? e : [n, e], A = t.verifyAction ? /* @__PURE__ */ X(J, { children: [t.verifyResultField && /* @__PURE__ */ Y(B.Item, {
8539
8539
  name: k(t.verifyResultField),
8540
8540
  hidden: !0,
8541
8541
  noStyle: !0,
@@ -8545,7 +8545,7 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
8545
8545
  hidden: !0,
8546
8546
  noStyle: !0,
8547
8547
  children: /* @__PURE__ */ Y(V, {})
8548
- })] }) : null, A = t.verifyAction ? /* @__PURE__ */ X("div", {
8548
+ })] }) : null, j = t.verifyAction ? /* @__PURE__ */ X("div", {
8549
8549
  className: "v1-verify-field-row",
8550
8550
  children: [
8551
8551
  O,
@@ -8554,22 +8554,22 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
8554
8554
  field: t,
8555
8555
  absoluteName: c
8556
8556
  }),
8557
- ee
8557
+ A
8558
8558
  ]
8559
- }) : O, j = m ? /* @__PURE__ */ X(J, { children: [A, /* @__PURE__ */ Y(B.Item, {
8559
+ }) : O, M = m ? /* @__PURE__ */ X(J, { children: [j, /* @__PURE__ */ Y(B.Item, {
8560
8560
  name: n === void 0 ? h[h.length - 1] : [n, h[h.length - 1]],
8561
8561
  valuePropName: "checked",
8562
8562
  hidden: !0,
8563
8563
  noStyle: !0,
8564
8564
  children: /* @__PURE__ */ Y(Vi, {})
8565
- })] }) : A, te = i.inline ? {
8565
+ })] }) : j, ee = i.inline ? {
8566
8566
  flex: `${Number(t.combineWidth) > 0 ? Number(t.combineWidth) : 1} 1 0`,
8567
8567
  maxWidth: "none"
8568
- } : void 0, ne = t.autoFillFromApi ? /* @__PURE__ */ Y($h, {
8568
+ } : void 0, te = t.autoFillFromApi ? /* @__PURE__ */ Y($h, {
8569
8569
  form: N,
8570
8570
  config: t.autoFillFromApi,
8571
8571
  watchPath: c
8572
- }, `${t.field}-autoFillFromApi`) : null, M = t.prefillWhen?.length ? /* @__PURE__ */ Y(Qh, {
8572
+ }, `${t.field}-autoFillFromApi`) : null, re = t.prefillWhen?.length ? /* @__PURE__ */ Y(Qh, {
8573
8573
  form: N,
8574
8574
  rules: t.prefillWhen,
8575
8575
  watchPaths: Tr(t.prefillWhen, c, gn, p),
@@ -8577,8 +8577,8 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
8577
8577
  resetOnNoMatch: t.prefillWhenReset !== !1
8578
8578
  }, `${t.field}-prefillWhen`) : null;
8579
8579
  if (t.show === 0) return /* @__PURE__ */ X(wi, { children: [
8580
- M,
8581
- ne,
8580
+ re,
8581
+ te,
8582
8582
  /* @__PURE__ */ Y(B.Item, {
8583
8583
  name: s,
8584
8584
  hidden: !0,
@@ -8588,28 +8588,28 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
8588
8588
  ] }, t.field);
8589
8589
  let ie = !i.inline && ur(t).length > 0, ae = (e) => ie ? Pr(t, b, (t) => e(kr(t, p(t.field)))) : b;
8590
8590
  return An(t.showIf) || ie ? /* @__PURE__ */ X(wi, { children: [
8591
- M,
8592
- ne,
8591
+ re,
8592
+ te,
8593
8593
  /* @__PURE__ */ Y(B.Item, {
8594
8594
  shouldUpdate: !0,
8595
8595
  noStyle: !0,
8596
8596
  children: ({ getFieldValue: e }) => !An(t.showIf) || kn(t.showIf, e, p) ? /* @__PURE__ */ Y(z, {
8597
8597
  xs: 24,
8598
8598
  md: ae(e),
8599
- style: te,
8599
+ style: ee,
8600
8600
  className: i.inline ? "v1-combine-cell" : void 0,
8601
- children: j
8601
+ children: M
8602
8602
  }) : null
8603
8603
  })
8604
8604
  ] }, t.field) : /* @__PURE__ */ X(wi, { children: [
8605
- M,
8606
- ne,
8605
+ re,
8606
+ te,
8607
8607
  /* @__PURE__ */ Y(z, {
8608
8608
  xs: 24,
8609
8609
  md: b,
8610
- style: te,
8610
+ style: ee,
8611
8611
  className: i.inline ? "v1-combine-cell" : void 0,
8612
- children: j
8612
+ children: M
8613
8613
  })
8614
8614
  ] }, t.field);
8615
8615
  }, In = (t) => {
@@ -8818,7 +8818,7 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
8818
8818
  n,
8819
8819
  t,
8820
8820
  ...T
8821
- ] : T.length > 1 ? T : w.field : null, D = d.some((e) => yg(e)), O = [12, 24].includes(C) ? C : d.length >= 3 ? 24 : 12, k = (e) => p && (!s || s.has(e)) ? p : null, ee = d.some((e) => An(e.showIf)), A = (e) => d.some((t) => !An(t.showIf) || kn(t.showIf, e, k)), j = /* @__PURE__ */ Y(z, {
8821
+ ] : T.length > 1 ? T : w.field : null, D = d.some((e) => yg(e)), O = [12, 24].includes(C) ? C : d.length >= 3 ? 24 : 12, k = (e) => p && (!s || s.has(e)) ? p : null, A = d.some((e) => An(e.showIf)), j = (e) => d.some((t) => !An(t.showIf) || kn(t.showIf, e, k)), M = /* @__PURE__ */ Y(z, {
8822
8822
  xs: 24,
8823
8823
  md: O,
8824
8824
  children: /* @__PURE__ */ Y(B.Item, {
@@ -8861,11 +8861,11 @@ var zg = Oi(function({ moduleName: e, action: t, authToken: n, clientId: r, regi
8861
8861
  })
8862
8862
  })
8863
8863
  }, u);
8864
- o.push(ee ? /* @__PURE__ */ Y(B.Item, {
8864
+ o.push(A ? /* @__PURE__ */ Y(B.Item, {
8865
8865
  shouldUpdate: !0,
8866
8866
  noStyle: !0,
8867
- children: ({ getFieldValue: e }) => A(e) ? j : null
8868
- }, u) : j);
8867
+ children: ({ getFieldValue: e }) => j(e) ? M : null
8868
+ }, u) : M);
8869
8869
  }), o;
8870
8870
  }, Bn = I(() => {
8871
8871
  if (De.fields?.length) return De.fields;
@@ -9889,9 +9889,9 @@ function __() {
9889
9889
  });
9890
9890
  }
9891
9891
  function v_({ title: e, description: t, breadcrumbItems: n, backTo: r, backLabel: i = "Back", templateLabel: a = "Download Sample Template", templateTitle: o = "Sample template", templateHint: s = "Pre-filled with the exact column names the importer expects. Do not rename or reorder the columns.", instructions: c = [], accept: l = l_, maxSizeMB: u = 10, onDownloadTemplate: d, onUpload: f, renderResult: p, extraSidebar: m }) {
9892
- let h = Pi(null), [g, _] = L(!1), [v, y] = L(!1), [b, x] = L(!1), [S, C] = L(null), [w, T] = L(null), [E, D] = L(null), [O, k] = L(0), ee = I(() => l.map((e) => e.toLowerCase()), [l]), A = I(() => h_(ee), [ee]), j = Ai(() => {
9892
+ let h = Pi(null), [g, _] = L(!1), [v, y] = L(!1), [b, x] = L(!1), [S, C] = L(null), [w, T] = L(null), [E, D] = L(null), [O, k] = L(0), A = I(() => l.map((e) => e.toLowerCase()), [l]), j = I(() => h_(A), [A]), M = Ai(() => {
9893
9893
  C(null), T(null), D(null), _(!1), k((e) => e + 1);
9894
- }, []), te = Ai(async () => {
9894
+ }, []), ee = Ai(async () => {
9895
9895
  if (d) {
9896
9896
  y(!0);
9897
9897
  try {
@@ -9902,11 +9902,11 @@ function v_({ title: e, description: t, breadcrumbItems: n, backTo: r, backLabel
9902
9902
  y(!1);
9903
9903
  }
9904
9904
  }
9905
- }, [d]), ne = Ai(async (e) => {
9905
+ }, [d]), te = Ai(async (e) => {
9906
9906
  if (!e || b) return;
9907
9907
  k((e) => e + 1);
9908
9908
  let t = g_(e, {
9909
- accept: ee,
9909
+ accept: A,
9910
9910
  maxSizeMB: u
9911
9911
  });
9912
9912
  if (t) {
@@ -9926,13 +9926,13 @@ function v_({ title: e, description: t, breadcrumbItems: n, backTo: r, backLabel
9926
9926
  x(!1);
9927
9927
  }
9928
9928
  }, [
9929
- ee,
9929
+ A,
9930
9930
  u,
9931
9931
  f,
9932
9932
  b
9933
- ]), re = () => {
9933
+ ]), ne = () => {
9934
9934
  b || h.current?.click();
9935
- }, M = [
9935
+ }, re = [
9936
9936
  "bulk-upload-dropzone",
9937
9937
  g ? "is-dragging" : "",
9938
9938
  b ? "is-busy" : "",
@@ -9996,17 +9996,17 @@ function v_({ title: e, description: t, breadcrumbItems: n, backTo: r, backLabel
9996
9996
  tabIndex: b ? -1 : 0,
9997
9997
  "aria-disabled": b,
9998
9998
  "aria-label": "Upload the filled file — click to browse, or drop a file here",
9999
- className: M,
10000
- onClick: re,
9999
+ className: re,
10000
+ onClick: ne,
10001
10001
  onKeyDown: (e) => {
10002
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), re());
10002
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), ne());
10003
10003
  },
10004
10004
  onDragOver: (e) => {
10005
10005
  e.preventDefault(), b || _(!0);
10006
10006
  },
10007
10007
  onDragLeave: () => _(!1),
10008
10008
  onDrop: (e) => {
10009
- e.preventDefault(), _(!1), ne(e.dataTransfer.files?.[0]);
10009
+ e.preventDefault(), _(!1), te(e.dataTransfer.files?.[0]);
10010
10010
  },
10011
10011
  children: [
10012
10012
  /* @__PURE__ */ Y(__, {}),
@@ -10023,7 +10023,7 @@ function v_({ title: e, description: t, breadcrumbItems: n, backTo: r, backLabel
10023
10023
  }),
10024
10024
  /* @__PURE__ */ X("div", {
10025
10025
  className: "bulk-upload-chips",
10026
- children: [ee.map((e) => /* @__PURE__ */ Y(G, {
10026
+ children: [A.map((e) => /* @__PURE__ */ Y(G, {
10027
10027
  className: "bulk-upload-chip bulk-upload-chip--ok",
10028
10028
  children: e
10029
10029
  }, e)), /* @__PURE__ */ Y(K, {
@@ -10048,8 +10048,8 @@ function v_({ title: e, description: t, breadcrumbItems: n, backTo: r, backLabel
10048
10048
  ref: h,
10049
10049
  hidden: !0,
10050
10050
  type: "file",
10051
- accept: A,
10052
- onChange: (e) => ne(e.target.files?.[0])
10051
+ accept: j,
10052
+ onChange: (e) => te(e.target.files?.[0])
10053
10053
  }, O),
10054
10054
  S ? /* @__PURE__ */ X("div", {
10055
10055
  className: `bulk-upload-file ${w ? "is-error" : ""}`,
@@ -10073,7 +10073,7 @@ function v_({ title: e, description: t, breadcrumbItems: n, backTo: r, backLabel
10073
10073
  type: "text",
10074
10074
  size: "small",
10075
10075
  icon: Y(E ? Ho : qa, {}),
10076
- onClick: j,
10076
+ onClick: M,
10077
10077
  children: E ? "Upload another" : "Remove"
10078
10078
  })
10079
10079
  ]
@@ -10117,7 +10117,7 @@ function v_({ title: e, description: t, breadcrumbItems: n, backTo: r, backLabel
10117
10117
  block: !0,
10118
10118
  icon: /* @__PURE__ */ Y(Za, {}),
10119
10119
  loading: v,
10120
- onClick: te,
10120
+ onClick: ee,
10121
10121
  className: "bulk-upload-template-btn",
10122
10122
  children: a
10123
10123
  })
@@ -10139,7 +10139,7 @@ function v_({ title: e, description: t, breadcrumbItems: n, backTo: r, backLabel
10139
10139
  }),
10140
10140
  E && p ? /* @__PURE__ */ Y("div", {
10141
10141
  className: "bulk-upload-result",
10142
- children: p(E, { reset: j })
10142
+ children: p(E, { reset: M })
10143
10143
  }) : null
10144
10144
  ]
10145
10145
  })]
@@ -11409,18 +11409,18 @@ function Fy({ value: e }) {
11409
11409
  children: t
11410
11410
  });
11411
11411
  }
11412
- function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r }) {
11413
- let [i, a] = L([]), [o, s] = L(!!e), [c, l] = L(""), [u, d] = L(!1), [f, p] = L(""), [m, h] = L(!1), [g, _] = L([]);
11412
+ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r, masterLabelFields: i = [] }) {
11413
+ let [a, o] = L([]), [s, c] = L(!!e), [l, u] = L(""), [d, f] = L(!1), [p, m] = L(""), [h, g] = L(!1), [_, y] = L([]), b = Array.isArray(i) ? [...new Set(i.map((e) => String(e ?? "").trim()).filter(Boolean))].sort().join("|") : "", x = I(() => new Set(b ? b.split("|") : []), [b]), [S, C] = L({});
11414
11414
  F(() => {
11415
11415
  if (!e || !t) {
11416
- Promise.resolve().then(() => _([]));
11416
+ Promise.resolve().then(() => y([]));
11417
11417
  return;
11418
11418
  }
11419
11419
  let n = !1;
11420
11420
  return fi(e, t).then((e) => {
11421
- n || _(Array.isArray(e) ? e : e?.data ?? []);
11421
+ n || y(Array.isArray(e) ? e : e?.data ?? []);
11422
11422
  }).catch(() => {
11423
- n || _([]);
11423
+ n || y([]);
11424
11424
  }), () => {
11425
11425
  n = !0;
11426
11426
  };
@@ -11429,18 +11429,18 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11429
11429
  t,
11430
11430
  n
11431
11431
  ]);
11432
- let [y, b] = L(null), [x, S] = L({}), [C, w] = L({});
11432
+ let [w, T] = L(null), [D, O] = L({}), [k, A] = L({});
11433
11433
  F(() => {
11434
11434
  if (!e || !t) {
11435
- b(null);
11435
+ T(null);
11436
11436
  return;
11437
11437
  }
11438
11438
  let n = !1;
11439
11439
  return v(E, `/module/list?module=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`).then((e) => {
11440
11440
  let t = e?.data?.data ?? e?.data ?? [];
11441
- n || b(Array.isArray(t) ? t[0] : null);
11441
+ n || T(Array.isArray(t) ? t[0] : null);
11442
11442
  }).catch(() => {
11443
- n || b(null);
11443
+ n || T(null);
11444
11444
  }), () => {
11445
11445
  n = !0;
11446
11446
  };
@@ -11452,7 +11452,7 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11452
11452
  let e = !1;
11453
11453
  return v(E, "/module/list?module=users").then((t) => {
11454
11454
  let n = t?.data?.data ?? t?.data ?? [];
11455
- e || S(xn(n));
11455
+ e || O(xn(n));
11456
11456
  }).catch(() => {}), () => {
11457
11457
  e = !0;
11458
11458
  };
@@ -11461,17 +11461,17 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11461
11461
  let n = !1;
11462
11462
  async function r() {
11463
11463
  try {
11464
- s(!0), l("");
11464
+ c(!0), u("");
11465
11465
  let [r] = await Promise.all([Xu({
11466
11466
  module: e,
11467
11467
  id: t,
11468
11468
  view: "detail"
11469
11469
  }), Ft()]), i = await Ny(Array.isArray(r) ? r : [], t, e);
11470
- n || a(i);
11470
+ n || o(i);
11471
11471
  } catch (t) {
11472
- console.error(`Failed to fetch ${e} detail fields:`, t), n || l(t?.message || "Failed to fetch detail fields");
11472
+ console.error(`Failed to fetch ${e} detail fields:`, t), n || u(t?.message || "Failed to fetch detail fields");
11473
11473
  } finally {
11474
- n || s(!1);
11474
+ n || c(!1);
11475
11475
  }
11476
11476
  }
11477
11477
  return r(), () => {
@@ -11481,29 +11481,73 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11481
11481
  e,
11482
11482
  t,
11483
11483
  n
11484
+ ]), F(() => {
11485
+ if (!e || !b || !a.length) {
11486
+ C((e) => Object.keys(e).length ? {} : e);
11487
+ return;
11488
+ }
11489
+ let t = [], n = /* @__PURE__ */ new Set();
11490
+ for (let e of a) for (let r of e?.fields ?? []) {
11491
+ let e = String(r?.field ?? "").trim();
11492
+ !e || n.has(e) || !x.has(e) || (n.add(e), !(String(r?.dataSource ?? "").trim().toLowerCase() !== "master" || !r?.masterName) && t.push(r));
11493
+ }
11494
+ if (!t.length) {
11495
+ C((e) => Object.keys(e).length ? {} : e);
11496
+ return;
11497
+ }
11498
+ let r = !1;
11499
+ return Promise.all(t.map(async (t) => {
11500
+ try {
11501
+ let n = await si(e, t.field, "", t.limit ?? 100, 0, {
11502
+ dataSource: "master",
11503
+ masterName: t.masterName
11504
+ }), r = Array.isArray(n) ? n : n?.data ?? n?.items ?? n?.rows ?? n?.records ?? [], i = {};
11505
+ for (let e of Array.isArray(r) ? r : []) {
11506
+ if (e == null) continue;
11507
+ if (typeof e != "object") {
11508
+ i[String(e)] = String(e);
11509
+ continue;
11510
+ }
11511
+ let t = e.value ?? e.uniqueId ?? e.id ?? e._id ?? e.name ?? e.label, n = e.label ?? e.name ?? e.text ?? e.title ?? e.value;
11512
+ t != null && n != null && (i[String(t)] = String(n));
11513
+ }
11514
+ return [t.field, i];
11515
+ } catch (e) {
11516
+ return console.warn(`[DetailViewV1] Unable to resolve master label for "${t.field}":`, e), [t.field, {}];
11517
+ }
11518
+ })).then((e) => {
11519
+ r || C(Object.fromEntries(e));
11520
+ }), () => {
11521
+ r = !0;
11522
+ };
11523
+ }, [
11524
+ e,
11525
+ a,
11526
+ b,
11527
+ x
11484
11528
  ]);
11485
- let T = I(() => Dy(i), [i]), D = I(() => {
11529
+ let M = I(() => Dy(a), [a]), ee = I(() => {
11486
11530
  let e = /* @__PURE__ */ new Set();
11487
- return i.forEach((t) => {
11531
+ return a.forEach((t) => {
11488
11532
  wy(t.appendHistory) && [t.historyField, ...t.historyFields || []].filter(Boolean).forEach((t) => e.add(t));
11489
11533
  }), e;
11490
- }, [i]);
11534
+ }, [a]);
11491
11535
  F(() => {
11492
- if (!y || !D.size) return;
11536
+ if (!w || !ee.size) return;
11493
11537
  let e = /* @__PURE__ */ new Set();
11494
- if (D.forEach((t) => {
11495
- let n = y[t];
11538
+ if (ee.forEach((t) => {
11539
+ let n = w[t];
11496
11540
  Array.isArray(n) && n.forEach((t) => {
11497
11541
  let n = t?.updatedBy ?? t?.changedBy;
11498
11542
  if (n == null || n === "") return;
11499
11543
  let r = String(n);
11500
- !x[r] && !C[r] && e.add(r);
11544
+ !D[r] && !k[r] && e.add(r);
11501
11545
  });
11502
11546
  }), !e.size) return;
11503
11547
  let t = !1;
11504
11548
  return Promise.all([...e].map((e) => Jr(e).then((t) => [e, t]))).then((e) => {
11505
11549
  let n = Object.fromEntries(e.filter(([, e]) => e));
11506
- !t && Object.keys(n).length && w((e) => ({
11550
+ !t && Object.keys(n).length && A((e) => ({
11507
11551
  ...e,
11508
11552
  ...n
11509
11553
  }));
@@ -11511,15 +11555,15 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11511
11555
  t = !0;
11512
11556
  };
11513
11557
  }, [
11514
- y,
11558
+ w,
11559
+ ee,
11515
11560
  D,
11516
- x,
11517
- C
11561
+ k
11518
11562
  ]);
11519
- let O = {
11563
+ let te = {
11520
11564
  proposedRate: "Proposed Rate",
11521
11565
  candidateBudget: "Candidate Rate"
11522
- }, k = (e, t, n) => {
11566
+ }, ne = (e, t, n) => {
11523
11567
  let r = `${e}.`, i = (t) => [t?.historyField, ...t?.historyFields || []].includes(e);
11524
11568
  for (let r of t ?? []) {
11525
11569
  if (!i(r)) continue;
@@ -11528,108 +11572,130 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11528
11572
  let a = r.historyLabelFrom?.[e];
11529
11573
  if (a) {
11530
11574
  let t = (r.fields ?? []).find((e) => e?.field === a);
11531
- if (t) return Ev(t, n) || O[e] || e;
11575
+ if (t) return Ev(t, n) || te[e] || e;
11532
11576
  }
11533
11577
  }
11534
- for (let i of t ?? []) for (let t of i?.fields ?? []) if (String(t?.field ?? "").startsWith(r)) return Ev(t, n) || O[e] || e;
11535
- return O[e] || e;
11536
- }, ee = (e, t) => {
11537
- let { amount: n, currency: r, unit: a } = Bv(e, t, i), o = e?.timestamp?.$date ?? e?.timestamp ?? e?.updatedAt?.$date ?? e?.updatedAt ?? e?.changedAt?.$date ?? e?.changedAt, s = e?.updatedBy ?? e?.changedBy, c = n == null || n === "" ? null : Number(n);
11578
+ for (let i of t ?? []) for (let t of i?.fields ?? []) if (String(t?.field ?? "").startsWith(r)) return Ev(t, n) || te[e] || e;
11579
+ return te[e] || e;
11580
+ }, re = (e, t) => {
11581
+ let { amount: n, currency: r, unit: i } = Bv(e, t, a), o = e?.timestamp?.$date ?? e?.timestamp ?? e?.updatedAt?.$date ?? e?.updatedAt ?? e?.changedAt?.$date ?? e?.changedAt, s = e?.updatedBy ?? e?.changedBy, c = n == null || n === "" ? null : Number(n);
11538
11582
  return {
11539
11583
  amount: c != null && !Number.isNaN(c) ? `${Hv(r)}${Jv(c)}` : "—",
11540
- unit: Wv(a),
11584
+ unit: Wv(i),
11541
11585
  when: o && bs(o).isValid() ? at(o) : "",
11542
- by: s == null ? "" : x[String(s)] || C[String(s)] || ""
11586
+ by: s == null ? "" : D[String(s)] || k[String(s)] || ""
11543
11587
  };
11544
- }, j = I(() => {
11545
- if (!y) return [];
11546
- let e = Cv(i), t = [];
11547
- return D.forEach((n) => {
11548
- let r = y[n];
11588
+ }, N = I(() => {
11589
+ if (!w) return [];
11590
+ let e = Cv(a), t = [];
11591
+ return ee.forEach((n) => {
11592
+ let r = w[n];
11549
11593
  if (!Array.isArray(r) || r.length === 0) return;
11550
- let a = r.filter((e) => e && (e.timestamp || e.updatedAt || e.changedAt));
11551
- a.length !== 0 && t.push({
11594
+ let i = r.filter((e) => e && (e.timestamp || e.updatedAt || e.changedAt));
11595
+ i.length !== 0 && t.push({
11552
11596
  key: n,
11553
- label: k(n, i, e),
11554
- entries: [...a].reverse().map((e) => ee(e, n))
11597
+ label: ne(n, a, e),
11598
+ entries: [...i].reverse().map((e) => re(e, n))
11555
11599
  });
11556
11600
  }), t;
11557
11601
  }, [
11558
- y,
11559
- i,
11602
+ w,
11603
+ a,
11604
+ ee,
11560
11605
  D,
11561
- x,
11562
- C
11563
- ]), te = I(() => {
11564
- let e = new Set(j.map((e) => e.key));
11565
- return e.size ? T.map((t) => {
11606
+ k
11607
+ ]), ie = I(() => {
11608
+ let e = new Set(N.map((e) => e.key));
11609
+ return e.size ? M.map((t) => {
11566
11610
  if (!wy(t.appendHistory)) return t;
11567
11611
  let n = [t.historyField, ...t.historyFields || []].filter((t) => t && e.has(t));
11568
11612
  return n.length ? {
11569
11613
  ...t,
11570
11614
  fields: t.fields.filter((e) => !n.some((t) => String(e.field ?? "").startsWith(`${t}.`)))
11571
11615
  } : t;
11572
- }).filter((e) => e.fields.length) : T;
11573
- }, [T, j]), ne = I(() => {
11574
- let e = new Set(j.map((e) => e.key)), t = i.find((t) => wy(t.appendHistory) && [t.historyField, ...t.historyFields || []].some((t) => t && e.has(t)));
11616
+ }).filter((e) => e.fields.length) : M;
11617
+ }, [M, N]), oe = I(() => {
11618
+ let e = new Set(N.map((e) => e.key)), t = a.find((t) => wy(t.appendHistory) && [t.historyField, ...t.historyFields || []].some((t) => t && e.has(t)));
11575
11619
  return t?.label ?? t?.name ?? "Rate Details";
11576
- }, [i, j]), re = e === "job", M = I(() => re ? Ey(i) : null, [re, i]), N = () => {
11577
- d(!1), p("");
11578
- }, ie = async () => {
11579
- if (!f.trim()) {
11620
+ }, [a, N]), se = e === "job", ce = I(() => se ? Ey(a) : null, [se, a]), le = () => {
11621
+ f(!1), m("");
11622
+ }, ue = async () => {
11623
+ if (!p.trim()) {
11580
11624
  q.warning("Please enter a job description");
11581
11625
  return;
11582
11626
  }
11583
- h(!0);
11627
+ g(!0);
11584
11628
  try {
11585
- await O_(t, f.trim()), d(!1), p(""), s(!0);
11629
+ await O_(t, p.trim()), f(!1), m(""), c(!0);
11586
11630
  let n = await Xu({
11587
11631
  module: e,
11588
11632
  id: t,
11589
11633
  view: "detail"
11590
11634
  });
11591
- a(Array.isArray(n) ? n : []), q.success("Description updated and parsed successfully"), r?.();
11635
+ o(Array.isArray(n) ? n : []), q.success("Description updated and parsed successfully"), r?.();
11592
11636
  } catch {
11593
11637
  q.error("Failed to update description");
11594
11638
  } finally {
11595
- h(!1), s(!1);
11639
+ g(!1), c(!1);
11596
11640
  }
11597
- }, oe = (e) => {
11641
+ }, de = (e) => {
11598
11642
  let t = Number(e.detailCol);
11599
11643
  if (Number.isFinite(t) && t > 0) return Math.max(1, Math.min(3, Math.round(t / 8)));
11600
11644
  let n = typeof e.value == "string" ? e.value : "";
11601
11645
  return e.renderType === "document" || e.type === "text-editor" || n.length > 120 ? 3 : /\s(?:·|-|–|\/)\s/.test(n) && n.length >= 16 ? 2 : 1;
11602
- }, se = (e) => e.renderType === "document" || e.type === "text-editor" || (typeof e.value == "string" ? e.value : "").length > 60, ce = I(() => Cv(i), [i]), le = (e, t = "", n = ce) => {
11603
- let r = e.label ?? e.field, i = se(e), a = typeof e.value == "string" ? e.value : void 0;
11646
+ }, fe = (e) => e.renderType === "document" || e.type === "text-editor" || (typeof e.value == "string" ? e.value : "").length > 60, pe = I(() => Cv(a), [a]), me = (e, t) => {
11647
+ let n = String(e?.field ?? "").trim();
11648
+ if (!n || !x.has(n)) return t;
11649
+ let r = S[n];
11650
+ if (!r || !Object.keys(r).length) return t;
11651
+ let i = (e) => {
11652
+ if (e == null || e === "") return e;
11653
+ if (typeof e == "object") {
11654
+ let t = e.label ?? e.name ?? e.text ?? e.title;
11655
+ if (t != null && t !== "") return t;
11656
+ let n = e.value ?? e.uniqueId ?? e.id ?? e._id;
11657
+ return n == null ? e : r[String(n)] ?? n;
11658
+ }
11659
+ return r[String(e)] ?? e;
11660
+ };
11661
+ return Array.isArray(t) ? t.map(i) : i(t);
11662
+ }, he = (e) => {
11663
+ let t = me(e, e?.value);
11664
+ return t === e?.value ? e : {
11665
+ ...e,
11666
+ value: t
11667
+ };
11668
+ }, ge = (e, t = "", n = pe) => {
11669
+ let r = he(e), i = r.label ?? r.field, a = fe(r), o = typeof r.value == "string" ? r.value : void 0;
11604
11670
  return /* @__PURE__ */ Y("div", {
11605
- className: `v1-detail-cell${i ? " v1-detail-cell--wrap" : ""}`,
11606
- style: { "--v1-cell-span": oe(e) },
11671
+ className: `v1-detail-cell${a ? " v1-detail-cell--wrap" : ""}`,
11672
+ style: { "--v1-cell-span": de(r) },
11607
11673
  children: /* @__PURE__ */ X("div", {
11608
11674
  className: "v1-detail-field",
11609
- title: !i && a ? `${r}: ${a}` : void 0,
11675
+ title: !a && o ? `${i}: ${o}` : void 0,
11610
11676
  children: [/* @__PURE__ */ Y(Sy, {
11611
11677
  type: "secondary",
11612
11678
  className: "v1-detail-label",
11613
- title: r,
11614
- children: r
11679
+ title: i,
11680
+ children: i
11615
11681
  }), /* @__PURE__ */ Y(xy, {
11616
- field: e,
11682
+ field: r,
11617
11683
  record: n
11618
11684
  })]
11619
11685
  })
11620
11686
  }, `${e.field}${t}`);
11621
- }, ue = /^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}|$)/, de = (e, t, n = ce) => {
11622
- let r = xv(e, t, Dt());
11623
- if (r) return r.join("; ");
11624
- if (t == null || typeof t == "object") return "";
11625
- let i = String(t).trim();
11626
- if (!i) return "";
11627
- if (e?.type === "date" || e?.renderType === "date" || ue.test(i)) {
11628
- let t = bs(i);
11687
+ }, _e = /^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}|$)/, ve = (e, t, n = pe) => {
11688
+ let r = me(e, t), i = xv(e, r, Dt());
11689
+ if (i) return i.join("; ");
11690
+ if (r == null || typeof r == "object" && !Array.isArray(r)) return "";
11691
+ let a = Array.isArray(r) ? r.map((e) => String(e ?? "").trim()).filter(Boolean).join(", ") : String(r).trim();
11692
+ if (!a) return "";
11693
+ if (e?.type === "date" || e?.renderType === "date" || _e.test(a)) {
11694
+ let t = bs(a);
11629
11695
  if (t.isValid()) return t.format(e?.renderOptions?.dateFormat || Dt().dateFormat);
11630
11696
  }
11631
- return (e?.formatter === "phone" || e?.type === "phone" || e?.renderType === "phone") && ke(e, i, n) || i;
11632
- }, fe = (e, t) => {
11697
+ return (e?.formatter === "phone" || e?.type === "phone" || e?.renderType === "phone") && ke(e, a, n) || a;
11698
+ }, ye = (e, t) => {
11633
11699
  if (e?.hidePartLabel || e?.renderOptions?.hidePartLabel) return "";
11634
11700
  let n = String(e?.label ?? "").trim();
11635
11701
  if (!n) return "";
@@ -11640,11 +11706,11 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11640
11706
  a += 1;
11641
11707
  }
11642
11708
  return i.slice(a).join(" ").trim();
11643
- }, pe = (e, t, n, r, i = ce) => {
11709
+ }, be = (e, t, n, r, i = pe) => {
11644
11710
  let a = e.map((e) => ({
11645
11711
  field: e,
11646
11712
  cell: n(e)
11647
- })), o = a.filter(({ cell: e }) => ge(e)).map(({ cell: e }) => ({
11713
+ })), o = a.filter(({ cell: e }) => Ce(e)).map(({ cell: e }) => ({
11648
11714
  ...e,
11649
11715
  renderType: "document"
11650
11716
  })).filter((e) => nv(e.value)), s = /* @__PURE__ */ new Set();
@@ -11655,13 +11721,13 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11655
11721
  n !== e && t.includes(n.field) && s.add(n.field);
11656
11722
  });
11657
11723
  });
11658
- let c = typeof t.combineLabel == "string" && t.combineLabel.trim() ? t.combineLabel : t.label ?? t.field, l = a.filter(({ cell: e }) => !ge(e)).filter(({ field: e }) => !s.has(e.field)).filter(({ cell: e }) => !ov(e, e.value)).map(({ field: e, cell: t }) => ({
11724
+ let c = typeof t.combineLabel == "string" && t.combineLabel.trim() ? t.combineLabel : t.label ?? t.field, l = a.filter(({ cell: e }) => !Ce(e)).filter(({ field: e }) => !s.has(e.field)).filter(({ cell: e }) => !ov(e, e.value)).map(({ field: e, cell: t }) => ({
11659
11725
  key: e.field,
11660
- label: fe(e, c),
11661
- text: de(e, t.value, i)
11726
+ label: ye(e, c),
11727
+ text: ve(e, t.value, i)
11662
11728
  })).filter((e) => e.text !== "");
11663
11729
  if (!l.length && !o.length && ov(t, void 0)) return null;
11664
- let u = l.map((e) => `${e.label ? `${e.label} ` : ""}${e.text}`).join(" · "), d = oe({
11730
+ let u = l.map((e) => `${e.label ? `${e.label} ` : ""}${e.text}`).join(" · "), d = de({
11665
11731
  detailCol: t.detailCol,
11666
11732
  value: u
11667
11733
  }), f = o.length ? Math.max(d, 2) : d;
@@ -11699,7 +11765,7 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11699
11765
  ]
11700
11766
  })
11701
11767
  }, `${t.field}-merged${r}`);
11702
- }, me = (e, t, n = "", r = ce) => {
11768
+ }, xe = (e, t, n = "", r = pe) => {
11703
11769
  let i = /* @__PURE__ */ new Set(), a = [];
11704
11770
  return e.forEach((o) => {
11705
11771
  let s = o.combineKey?.trim?.();
@@ -11708,17 +11774,17 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11708
11774
  i.add(s);
11709
11775
  let o = e.filter((e) => e.combineKey?.trim?.() === s);
11710
11776
  if (o.length > 1) {
11711
- let e = o.find((e) => e.combineLabel) ?? o[0], i = pe(o, e, t, n, r);
11777
+ let e = o.find((e) => e.combineLabel) ?? o[0], i = be(o, e, t, n, r);
11712
11778
  i && a.push(i);
11713
11779
  return;
11714
11780
  }
11715
11781
  }
11716
11782
  let c = t(o);
11717
- ov(c, c.value) || a.push(le(c, n, r));
11783
+ ov(c, c.value) || a.push(ge(c, n, r));
11718
11784
  }), a;
11719
- }, he = I(() => {
11785
+ }, Se = I(() => {
11720
11786
  let e = {};
11721
- for (let t of g) {
11787
+ for (let t of _) {
11722
11788
  let n = t.fieldName || t.field || "file";
11723
11789
  (e[n] ??= []).push({
11724
11790
  location: t.s3Key ?? t.location ?? t.uniqueName ?? "",
@@ -11727,48 +11793,48 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11727
11793
  });
11728
11794
  }
11729
11795
  return e;
11730
- }, [g]), ge = (e) => e.type === "file" || e.type === "document" || e.renderType === "document", _e = (e) => he[e.field] || e.fileKey && he[e.fileKey] || null, ve = (e) => String(e?.name || e?.location || "").trim().toLowerCase(), ye = (e) => {
11796
+ }, [_]), Ce = (e) => e.type === "file" || e.type === "document" || e.renderType === "document", we = (e) => Se[e.field] || e.fileKey && Se[e.fileKey] || null, Te = (e) => String(e?.name || e?.location || "").trim().toLowerCase(), Ee = (e) => {
11731
11797
  let [t] = ae(e);
11732
- return !t || !t.location && !t.url ? null : ve(t);
11733
- }, be = (e, t = []) => {
11798
+ return !t || !t.location && !t.url ? null : Te(t);
11799
+ }, De = (e, t = []) => {
11734
11800
  let n = /* @__PURE__ */ new Set(), r = [], i = (e) => {
11735
11801
  if (e == null || e === "") return;
11736
- let t = ye(e);
11802
+ let t = Ee(e);
11737
11803
  t !== null && (t && n.has(t) || (t && n.add(t), r.push(e)));
11738
11804
  };
11739
11805
  return t.forEach(i), (Array.isArray(e) ? e : [e]).forEach(i), r;
11740
- }, xe = (e) => ae(e).map(ve).filter(Boolean), Se = (e) => {
11806
+ }, Oe = (e) => ae(e).map(Te).filter(Boolean), P = (e) => {
11741
11807
  let t = (e.validations ?? []).find((e) => e?.type === "maxFiles");
11742
11808
  return t ? Math.max(1, Number(t.value ?? 1)) : wy(e.multiple) ? Math.max(1, Number(e.maxCount ?? 5)) : Math.max(1, Number(e.maxCount ?? 1));
11743
- }, Ce = (e, t, n) => {
11744
- let r = Se(e);
11809
+ }, Ae = (e, t, n) => {
11810
+ let r = P(e);
11745
11811
  if (t.length <= r) return t;
11746
- let [i] = xe(n);
11747
- return (i ? [...t].sort((e, t) => Number(ye(t) === i) - Number(ye(e) === i)) : t).slice(0, r);
11748
- }, we = (e, t) => {
11812
+ let [i] = Oe(n);
11813
+ return (i ? [...t].sort((e, t) => Number(Ee(t) === i) - Number(Ee(e) === i)) : t).slice(0, r);
11814
+ }, je = (e, t) => {
11749
11815
  if (e.type === "file" || e.type === "document") return {
11750
11816
  ...e,
11751
11817
  renderType: "document",
11752
11818
  value: t
11753
11819
  };
11754
- let n = [e.field, e.payloadKey].filter(Boolean).map((e) => A(t, e)).find((e) => e != null);
11820
+ let n = [e.field, e.payloadKey].filter(Boolean).map((e) => j(t, e)).find((e) => e != null);
11755
11821
  return {
11756
11822
  ...e,
11757
11823
  value: n
11758
11824
  };
11759
- }, Te = (e) => {
11760
- if (!ge(e)) return e;
11761
- let t = Ce(e, be(e.value, _e(e) ?? []), e.value);
11825
+ }, Me = (e) => {
11826
+ if (!Ce(e)) return e;
11827
+ let t = Ae(e, De(e.value, we(e) ?? []), e.value);
11762
11828
  return t.length ? {
11763
11829
  ...e,
11764
11830
  renderType: "document",
11765
11831
  value: t
11766
11832
  } : e;
11767
- }, Ee = (e, t, n) => {
11768
- let r = e.name ?? e.id ?? String(t), i = Array.isArray(e.rows) ? e.rows : [], a = new Set(i.flatMap((e) => xe(e))), o = [], s = /* @__PURE__ */ new Set();
11769
- return n.filter(ge).forEach((e) => {
11770
- (_e(e) ?? []).forEach((e) => {
11771
- let t = ve(e);
11833
+ }, Ne = (e, t, n) => {
11834
+ let r = e.name ?? e.id ?? String(t), i = Array.isArray(e.rows) ? e.rows : [], a = new Set(i.flatMap((e) => Oe(e))), o = [], s = /* @__PURE__ */ new Set();
11835
+ return n.filter(Ce).forEach((e) => {
11836
+ (we(e) ?? []).forEach((e) => {
11837
+ let t = Te(e);
11772
11838
  !t || a.has(t) || s.has(t) || (s.add(t), o.push(e));
11773
11839
  });
11774
11840
  }), /* @__PURE__ */ X(Bi, {
@@ -11793,13 +11859,13 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11793
11859
  ]
11794
11860
  }), /* @__PURE__ */ Y("div", {
11795
11861
  className: "v1-detail-grid",
11796
- children: me(n, (e) => we(e, t), `-${r}`, t)
11862
+ children: xe(n, (e) => je(e, t), `-${r}`, t)
11797
11863
  })]
11798
11864
  }, r)), o.length > 0 && /* @__PURE__ */ Y("div", {
11799
11865
  className: "v1-detail-addrow-item",
11800
11866
  children: /* @__PURE__ */ Y("div", {
11801
11867
  className: "v1-detail-grid",
11802
- children: le({
11868
+ children: ge({
11803
11869
  field: `${r}-files`,
11804
11870
  label: "Uploaded Files",
11805
11871
  renderType: "document",
@@ -11809,9 +11875,9 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11809
11875
  })
11810
11876
  })]
11811
11877
  }, r);
11812
- }, De = (e, t) => {
11813
- let n = e.name ?? e.id ?? String(t), r = M ? e.fields.filter((e) => e.field !== M.key) : e.fields;
11814
- return r.length ? e.addRow ? Ee(e, t, r) : /* @__PURE__ */ Y(Bi, {
11878
+ }, Pe = (e, t) => {
11879
+ let n = e.name ?? e.id ?? String(t), r = ce ? e.fields.filter((e) => e.field !== ce.key) : e.fields;
11880
+ return r.length ? e.addRow ? Ne(e, t, r) : /* @__PURE__ */ Y(Bi, {
11815
11881
  size: "small",
11816
11882
  className: "v1-card v1-detail-card",
11817
11883
  title: /* @__PURE__ */ Y(Py, {
@@ -11820,17 +11886,17 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11820
11886
  }),
11821
11887
  children: /* @__PURE__ */ Y("div", {
11822
11888
  className: "v1-detail-grid",
11823
- children: me(r, Te)
11889
+ children: xe(r, Me)
11824
11890
  })
11825
11891
  }, n) : null;
11826
- }, Oe = () => /* @__PURE__ */ Y(Bi, {
11892
+ }, Fe = () => /* @__PURE__ */ Y(Bi, {
11827
11893
  size: "small",
11828
11894
  className: "v1-card v1-detail-card",
11829
11895
  title: /* @__PURE__ */ Y(Py, {
11830
11896
  icon: /* @__PURE__ */ Y(_o, {}),
11831
- title: ne
11897
+ title: oe
11832
11898
  }),
11833
- children: j.map((e, t) => /* @__PURE__ */ X("div", {
11899
+ children: N.map((e, t) => /* @__PURE__ */ X("div", {
11834
11900
  className: `v1-rh-section${t > 0 ? " v1-rh-section--gap" : ""}`,
11835
11901
  children: [/* @__PURE__ */ Y("div", {
11836
11902
  className: "v1-rh-section-title",
@@ -11872,37 +11938,37 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11872
11938
  }, t))
11873
11939
  })]
11874
11940
  }, e.key))
11875
- }, "rate-details-history"), P = I(() => {
11876
- let e = i.find((e) => wy(e.appendHistory) && e.historyAfterGroup);
11941
+ }, "rate-details-history"), Ie = I(() => {
11942
+ let e = a.find((e) => wy(e.appendHistory) && e.historyAfterGroup);
11877
11943
  return String(e?.historyAfterGroup ?? "").trim().toLowerCase();
11878
- }, [i]), Ae = (e) => P ? String(e.name ?? "").trim().toLowerCase() === P : /current_employer|employer_details/i.test(e.name || "") || (e.fields || []).some((e) => e.field === "employerId");
11944
+ }, [a]), Le = (e) => Ie ? String(e.name ?? "").trim().toLowerCase() === Ie : /current_employer|employer_details/i.test(e.name || "") || (e.fields || []).some((e) => e.field === "employerId");
11879
11945
  return /* @__PURE__ */ Y(la, {
11880
- spinning: o,
11946
+ spinning: s,
11881
11947
  tip: "Loading detail fields...",
11882
11948
  children: /* @__PURE__ */ X("div", {
11883
11949
  className: "v1-detail-left",
11884
11950
  children: [
11885
- c && /* @__PURE__ */ Y(Fi, {
11951
+ l && /* @__PURE__ */ Y(Fi, {
11886
11952
  type: "error",
11887
11953
  showIcon: !0,
11888
11954
  message: "Unable to load detail fields",
11889
- description: c,
11955
+ description: l,
11890
11956
  className: "v1-detail-alert"
11891
11957
  }),
11892
- !o && !c && te.length === 0 && j.length === 0 && /* @__PURE__ */ Y(qi, { description: "No detail fields are configured." }),
11893
- te.flatMap((e, t) => {
11894
- let n = [De(e, t)];
11895
- return Ae(e) && j.length > 0 && n.push(Oe()), n;
11958
+ !s && !l && ie.length === 0 && N.length === 0 && /* @__PURE__ */ Y(qi, { description: "No detail fields are configured." }),
11959
+ ie.flatMap((e, t) => {
11960
+ let n = [Pe(e, t)];
11961
+ return Le(e) && N.length > 0 && n.push(Fe()), n;
11896
11962
  }),
11897
- j.length > 0 && !te.some(Ae) && Oe(),
11898
- re && M?.value && /* @__PURE__ */ Y(Bi, {
11963
+ N.length > 0 && !ie.some(Le) && Fe(),
11964
+ se && ce?.value && /* @__PURE__ */ Y(Bi, {
11899
11965
  size: "small",
11900
11966
  className: "v1-card v1-detail-card",
11901
11967
  title: /* @__PURE__ */ Y(Py, {
11902
11968
  icon: /* @__PURE__ */ Y(po, {}),
11903
11969
  title: "Description"
11904
11970
  }),
11905
- children: u ? /* @__PURE__ */ X("div", {
11971
+ children: d ? /* @__PURE__ */ X("div", {
11906
11972
  style: {
11907
11973
  display: "flex",
11908
11974
  flexDirection: "column",
@@ -11918,9 +11984,9 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11918
11984
  },
11919
11985
  children: /* @__PURE__ */ Y(V.TextArea, {
11920
11986
  rows: 10,
11921
- value: f,
11922
- onChange: (e) => p(e.target.value),
11923
- placeholder: M.hidePlaceholder ? void 0 : M.placeholder,
11987
+ value: p,
11988
+ onChange: (e) => m(e.target.value),
11989
+ placeholder: ce.hidePlaceholder ? void 0 : ce.placeholder,
11924
11990
  style: {
11925
11991
  fontSize: 13,
11926
11992
  lineHeight: 1.65,
@@ -11938,16 +12004,16 @@ function Iy({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
11938
12004
  children: [/* @__PURE__ */ Y(An, {
11939
12005
  variant: "primary",
11940
12006
  size: "small",
11941
- loading: m,
11942
- onClick: ie,
12007
+ loading: h,
12008
+ onClick: ue,
11943
12009
  children: "Save & Parse"
11944
12010
  }), /* @__PURE__ */ Y(An, {
11945
12011
  size: "small",
11946
- onClick: N,
12012
+ onClick: le,
11947
12013
  children: "Cancel"
11948
12014
  })]
11949
12015
  })]
11950
- }) : /* @__PURE__ */ Y(Fy, { value: M.value })
12016
+ }) : /* @__PURE__ */ Y(Fy, { value: ce.value })
11951
12017
  })
11952
12018
  ]
11953
12019
  })
@@ -13407,10 +13473,10 @@ function zx({ moduleName: e, id: t, customConfigName: n, auxRecords: r, authToke
13407
13473
  u,
13408
13474
  D
13409
13475
  ]);
13410
- let [ee, A] = L({
13476
+ let [A, j] = L({
13411
13477
  signature: "",
13412
13478
  groups: {}
13413
- }), j = Cb(r);
13479
+ }), M = Cb(r);
13414
13480
  F(() => {
13415
13481
  let e = Sb(r);
13416
13482
  if (!e.length) return;
@@ -13423,28 +13489,28 @@ function zx({ moduleName: e, id: t, customConfigName: n, auxRecords: r, authToke
13423
13489
  }).catch(() => []);
13424
13490
  return [e.key, Array.isArray(t) ? t : []];
13425
13491
  })).then((e) => {
13426
- t || A({
13427
- signature: j,
13492
+ t || j({
13493
+ signature: M,
13428
13494
  groups: Object.fromEntries(e)
13429
13495
  });
13430
13496
  }).catch(() => {
13431
- t || A({
13432
- signature: j,
13497
+ t || j({
13498
+ signature: M,
13433
13499
  groups: {}
13434
13500
  });
13435
13501
  }), () => {
13436
13502
  t = !0;
13437
13503
  };
13438
- }, [j, u]);
13439
- let te = I(() => Tb(ee.signature === j ? ee.groups : {}), [ee, j]), ne = I(() => hb(k, m, { aux: te }), [
13504
+ }, [M, u]);
13505
+ let ee = I(() => Tb(A.signature === M ? A.groups : {}), [A, M]), te = I(() => hb(k, m, { aux: ee }), [
13440
13506
  k,
13441
13507
  m,
13442
- te
13508
+ ee
13443
13509
  ]);
13444
13510
  F(() => {
13445
- ne && s && s(ne);
13446
- }, [ne]);
13447
- let { eyebrow: re, title: M = "-", status: N, titleIds: ie = [], meta: ae = [], ids: oe = [], tabs: se = [], stats: ce = [], timestamp: le = null } = ne ?? {}, { canAdd: ue, canEdit: de, canDelete: fe } = xd(e), pe = I(() => Ax(m, t), [m, t]), me = N_(se, {
13511
+ te && s && s(te);
13512
+ }, [te]);
13513
+ let { eyebrow: ne, title: re = "-", status: N, titleIds: ie = [], meta: ae = [], ids: oe = [], tabs: se = [], stats: ce = [], timestamp: le = null } = te ?? {}, { canAdd: ue, canEdit: de, canDelete: fe } = xd(e), pe = I(() => Ax(m, t), [m, t]), me = N_(se, {
13448
13514
  id: t,
13449
13515
  moduleName: e,
13450
13516
  record: pe
@@ -13493,7 +13559,7 @@ function zx({ moduleName: e, id: t, customConfigName: n, auxRecords: r, authToke
13493
13559
  let t = e.allowedTabs ?? [];
13494
13560
  return !t.length || t.some((e) => Px(e) === Px(Te)) || _e && t.some((e) => Px(e) === Px(_e)) ? !0 : !t.some((e) => Ee.has(Px(e))) && !_e;
13495
13561
  }, Oe = be.filter((e) => e.detailPlacement === "primary" && xe(e) && De(e)), P = be.filter((e) => e.detailPlacement !== "primary" && xe(e) && De(e));
13496
- if (!ne) return null;
13562
+ if (!te) return null;
13497
13563
  let ke = (n) => {
13498
13564
  let r = [...Oe, ...P].find((e) => e.key === n);
13499
13565
  if (r?.actionType === "document" && r.documentField) {
@@ -13612,7 +13678,7 @@ function zx({ moduleName: e, id: t, customConfigName: n, auxRecords: r, authToke
13612
13678
  children: [/* @__PURE__ */ X("div", {
13613
13679
  className: "fin-dh__identity",
13614
13680
  children: [/* @__PURE__ */ Y(vx, {
13615
- name: M,
13681
+ name: re,
13616
13682
  size: "lg"
13617
13683
  }), /* @__PURE__ */ X("div", {
13618
13684
  className: "fin-dh__who",
@@ -13620,11 +13686,11 @@ function zx({ moduleName: e, id: t, customConfigName: n, auxRecords: r, authToke
13620
13686
  className: "fin-dh__name-row",
13621
13687
  children: [/* @__PURE__ */ Y("h2", {
13622
13688
  className: "fin-dh__name",
13623
- children: M || "Details"
13689
+ children: re || "Details"
13624
13690
  }), i ? /* @__PURE__ */ Y(ix, { status: i }) : null]
13625
- }), re ? /* @__PURE__ */ Y("span", {
13691
+ }), ne ? /* @__PURE__ */ Y("span", {
13626
13692
  className: "fin-dh__designation",
13627
- children: re
13693
+ children: ne
13628
13694
  }) : null]
13629
13695
  })]
13630
13696
  }), o.length ? /* @__PURE__ */ Y("div", {
@@ -13662,16 +13728,16 @@ function zx({ moduleName: e, id: t, customConfigName: n, auxRecords: r, authToke
13662
13728
  children: [/* @__PURE__ */ X("div", {
13663
13729
  className: "znx-dh-left",
13664
13730
  children: [
13665
- re && /* @__PURE__ */ Y("div", {
13731
+ ne && /* @__PURE__ */ Y("div", {
13666
13732
  className: "znx-dh-eyebrow",
13667
- children: re
13733
+ children: ne
13668
13734
  }),
13669
13735
  /* @__PURE__ */ X("div", {
13670
13736
  className: "znx-dh-titlerow",
13671
13737
  children: [
13672
13738
  /* @__PURE__ */ Y("span", {
13673
13739
  className: "znx-dh-title",
13674
- children: M
13740
+ children: re
13675
13741
  }),
13676
13742
  ie.map((e) => /* @__PURE__ */ X("span", {
13677
13743
  className: "znx-dh-titleid",
@@ -14504,11 +14570,11 @@ function BS(e, t) {
14504
14570
  return t ? t === "phone" ? Oe(e) : t === "digits" ? e.replace(/\D/g, "").slice(0, 10) : t === "email" || t === "noSpaces" ? e.replace(/\s/g, "") : t === "name" ? e.replace(/\s+/g, " ").trimStart().replace(/\b\w/g, (e) => e.toUpperCase()) : e : e;
14505
14571
  }
14506
14572
  function VS({ field: e, form: t, name: n, value: r, checked: i, fileList: a, moduleName: o, recordId: s, initialValue: c, scopeValues: l = {}, onAiUpload: u, onRegionBlocked: d, onRowOrderChange: f, formDisabled: p, rowFieldKeys: m }) {
14507
- let h = e.type ?? "text", g = !dS(e, o), [_, y] = L(null), [b, x] = L(!1), [S, C] = L(""), [w, T] = L(""), [D, O] = L(""), [k, ee] = L({
14573
+ let h = e.type ?? "text", g = !dS(e, o), [_, y] = L(null), [b, x] = L(!1), [S, C] = L(""), [w, T] = L(""), [D, O] = L(""), [k, A] = L({
14508
14574
  open: !1,
14509
14575
  docs: [],
14510
14576
  index: 0
14511
- }), [A, j] = L(null), [te, ne] = L(0), re = Pi([]), N = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", ie = e.lookupFilterValueFrom ? st(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], ae = e.lookupFilterValueFrom && N ? [...n.slice(0, 2), ...st(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], oe = B.useWatch(ie, t), se = B.useWatch(ae, t), ce = fS(se) ? oe : se, le = e.lookupFilterValueFrom ? l[e.lookupFilterValueFrom] : void 0, ue = fS(le) ? ce : le, de = Pi(He);
14577
+ }), [j, M] = L(null), [ee, te] = L(0), ne = Pi([]), N = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", ie = e.lookupFilterValueFrom ? st(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], ae = e.lookupFilterValueFrom && N ? [...n.slice(0, 2), ...st(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], oe = B.useWatch(ie, t), se = B.useWatch(ae, t), ce = fS(se) ? oe : se, le = e.lookupFilterValueFrom ? l[e.lookupFilterValueFrom] : void 0, ue = fS(le) ? ce : le, de = Pi(He);
14512
14578
  F(() => {
14513
14579
  if (!e.lookupFilterField || !e.lookupFilterValueFrom) return;
14514
14580
  let r = de.current;
@@ -14603,7 +14669,7 @@ function VS({ field: e, form: t, name: n, value: r, checked: i, fileList: a, mod
14603
14669
  }, i = Et(n);
14604
14670
  i = At(e, i), i.length && t.set("extraFields", i.join(","));
14605
14671
  let a = await v(E, `/admin/lookup-dropdown-values?${t}`);
14606
- r = a?.data ?? a ?? [], r = M(r, e, ue, { source: "EditFormV1" }), r = De(r, n, { source: "EditFormV1" });
14672
+ r = a?.data ?? a ?? [], r = re(r, e, ue, { source: "EditFormV1" }), r = De(r, n, { source: "EditFormV1" });
14607
14673
  } else if (t === "locationMaster") {
14608
14674
  let t = e.locationLevel || "country";
14609
14675
  if (t === "state" && fS(Be)) r = [];
@@ -14628,7 +14694,7 @@ function VS({ field: e, form: t, name: n, value: r, checked: i, fileList: a, mod
14628
14694
  })) : [];
14629
14695
  }
14630
14696
  }
14631
- n || (re.current = Array.isArray(r) ? r : [], y(hS(re.current)));
14697
+ n || (ne.current = Array.isArray(r) ? r : [], y(hS(ne.current)));
14632
14698
  } catch (t) {
14633
14699
  console.error(`[EditFormV1] Failed to fetch options for "${e.field}":`, t), n || y([]);
14634
14700
  } finally {
@@ -14661,7 +14727,7 @@ function VS({ field: e, form: t, name: n, value: r, checked: i, fileList: a, mod
14661
14727
  e.optionsRequireExtraValue,
14662
14728
  e.optionsHierarchyParentField,
14663
14729
  e.optionsHierarchySelfFrom,
14664
- te,
14730
+ ee,
14665
14731
  e.locationLevel,
14666
14732
  e.locationCountryFrom,
14667
14733
  e.locationStateFrom,
@@ -14702,7 +14768,7 @@ function VS({ field: e, form: t, name: n, value: r, checked: i, fileList: a, mod
14702
14768
  scopeValues: l,
14703
14769
  ownValue: r,
14704
14770
  onDone: (r, i) => {
14705
- ne((e) => e + 1);
14771
+ te((e) => e + 1);
14706
14772
  let a = dt(e) !== "array" && !e.multiSelect && !e.multiple;
14707
14773
  r === "create" && i != null && a && ((e.clearGroupOnChange || e.linkedClearField) && ai(t, e, n, m), gt(Un(e) ? { value: i } : i));
14708
14774
  }
@@ -14719,14 +14785,14 @@ function VS({ field: e, form: t, name: n, value: r, checked: i, fileList: a, mod
14719
14785
  let n = e.formatter ? BS(t.target.value, e.formatter) : t.target.value;
14720
14786
  if (vt) {
14721
14787
  let { cleaned: e, error: t } = Tt(n, vt, "change");
14722
- j(t), n = e;
14788
+ M(t), n = e;
14723
14789
  }
14724
14790
  gt(n);
14725
14791
  },
14726
14792
  ...vt && {
14727
14793
  onBlur: (e) => {
14728
14794
  let { cleaned: t, error: n } = Tt(e.target.value, vt, "blur");
14729
- j(n), t !== e.target.value && gt(t);
14795
+ M(n), t !== e.target.value && gt(t);
14730
14796
  },
14731
14797
  onKeyPress: (e) => {
14732
14798
  let t = ve(vt.type);
@@ -14735,7 +14801,7 @@ function VS({ field: e, form: t, name: n, value: r, checked: i, fileList: a, mod
14735
14801
  if (!t.test(n)) {
14736
14802
  e.preventDefault();
14737
14803
  let t = `${vt.title} — invalid character.`;
14738
- j(t), setTimeout(() => j((e) => e === t ? null : e), 1800);
14804
+ M(t), setTimeout(() => M((e) => e === t ? null : e), 1800);
14739
14805
  }
14740
14806
  },
14741
14807
  maxLength: vt.maxLength ?? mt.maxLength
@@ -14789,8 +14855,8 @@ function VS({ field: e, form: t, name: n, value: r, checked: i, fileList: a, mod
14789
14855
  let r = a ? [...n.slice(0, 2), ...st(e)] : st(e);
14790
14856
  t.setFieldValue(r, null);
14791
14857
  });
14792
- else if (re.current.length > 0) {
14793
- let i = e.valueField ?? "_id", o = re.current.find((e) => bS(e, i) === r || e._id === r || e.id === r || e.value === r);
14858
+ else if (ne.current.length > 0) {
14859
+ let i = e.valueField ?? "_id", o = ne.current.find((e) => bS(e, i) === r || e._id === r || e.id === r || e.value === r);
14794
14860
  o && e.autofillFrom.forEach(({ optionKey: e, targetField: r }) => {
14795
14861
  let i = bS(o, e) ?? o.extraData?.[e] ?? null, s = a ? [...n.slice(0, 2), ...st(r)] : st(r);
14796
14862
  t.setFieldValue(s, i);
@@ -14831,21 +14897,21 @@ function VS({ field: e, form: t, name: n, value: r, checked: i, fileList: a, mod
14831
14897
  onChange: (e) => {
14832
14898
  if (vt) {
14833
14899
  let { error: t } = Tt(e, vt, "change");
14834
- j(t);
14900
+ M(t);
14835
14901
  }
14836
14902
  gt(e);
14837
14903
  }
14838
- }), A && /* @__PURE__ */ Y("div", {
14904
+ }), j && /* @__PURE__ */ Y("div", {
14839
14905
  className: "v1-input-validator-hint",
14840
- children: A
14906
+ children: j
14841
14907
  })] });
14842
14908
  if (h === "textarea") return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(nS, {
14843
14909
  ...yt,
14844
14910
  rows: e.rows ?? 3,
14845
14911
  className: "v1-scroll-textarea"
14846
- }), A && /* @__PURE__ */ Y("div", {
14912
+ }), j && /* @__PURE__ */ Y("div", {
14847
14913
  className: "v1-input-validator-hint",
14848
- children: A
14914
+ children: j
14849
14915
  })] });
14850
14916
  if (h === "date") return /* @__PURE__ */ Y(Ui, {
14851
14917
  value: r,
@@ -14912,7 +14978,7 @@ function VS({ field: e, form: t, name: n, value: r, checked: i, fileList: a, mod
14912
14978
  return;
14913
14979
  }
14914
14980
  let c = Math.min(n ?? 0, a.length - 1);
14915
- ee({
14981
+ A({
14916
14982
  open: !0,
14917
14983
  docs: a,
14918
14984
  index: c
@@ -14978,7 +15044,7 @@ function VS({ field: e, form: t, name: n, value: r, checked: i, fileList: a, mod
14978
15044
  }, e.uid ?? t)), O = /* @__PURE__ */ Y(ge, {
14979
15045
  documents: k.docs,
14980
15046
  open: k.open,
14981
- onClose: () => ee((e) => ({
15047
+ onClose: () => A((e) => ({
14982
15048
  ...e,
14983
15049
  open: !1
14984
15050
  })),
@@ -15074,9 +15140,9 @@ function VS({ field: e, form: t, name: n, value: r, checked: i, fileList: a, mod
15074
15140
  type: h === "number" ? "number" : h,
15075
15141
  ...h === "number" && uS(e.decimal) ? { step: "any" } : {},
15076
15142
  ...e.suffix ? { suffix: e.suffix } : {}
15077
- }), A && /* @__PURE__ */ Y("div", {
15143
+ }), j && /* @__PURE__ */ Y("div", {
15078
15144
  className: "v1-input-validator-hint",
15079
- children: A
15145
+ children: j
15080
15146
  })] });
15081
15147
  }
15082
15148
  function HS({ icon: e, title: t }) {
@@ -15124,7 +15190,7 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15124
15190
  t = !0;
15125
15191
  };
15126
15192
  }, [e, n]);
15127
- let [D, k] = L(!1), [ee, A] = L(""), [te, ne] = L(!1), [M, N] = L(""), [ae, oe] = L(null), [se, ce] = L(() => /* @__PURE__ */ new Set()), [le, de] = L(""), fe = i || le, [pe, me] = L({});
15193
+ let [D, k] = L(!1), [A, j] = L(""), [ee, te] = L(!1), [re, N] = L(""), [ae, oe] = L(null), [se, ce] = L(() => /* @__PURE__ */ new Set()), [le, de] = L(""), fe = i || le, [pe, me] = L({});
15128
15194
  F(() => {
15129
15195
  Ft();
15130
15196
  }, []), F(() => {
@@ -15178,7 +15244,7 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15178
15244
  if (!Array.isArray(t) || t.length < 3 || typeof t[1] != "number") return;
15179
15245
  let n = t[0], r = t[1], i = ge.find((e) => e.name === n);
15180
15246
  if (!i) return;
15181
- let a = j(i, Dt().region);
15247
+ let a = M(i, Dt().region);
15182
15248
  if (!a.orderBy) return;
15183
15249
  await Promise.resolve();
15184
15250
  let o = y.getFieldValue(n);
@@ -15205,7 +15271,7 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15205
15271
  }, [ge, y]), ve = Ai((e) => {
15206
15272
  let t = Dt().region, n = ge.find((t) => (t.fields ?? []).some((t) => t.field === e.field));
15207
15273
  if (!n) return !1;
15208
- let r = j(n, t), i = r.orderBy?.inProgressField ?? "currentStudyingHere";
15274
+ let r = M(n, t), i = r.orderBy?.inProgressField ?? "currentStudyingHere";
15209
15275
  if (e.field !== i || ei(r)) return !1;
15210
15276
  let a = xt(r);
15211
15277
  return Lt({
@@ -15224,7 +15290,7 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15224
15290
  }, [ge]), ye = Ai((e, t) => {
15225
15291
  let n = ge.find((e) => e.name === t);
15226
15292
  if (!n) return;
15227
- let r = j(n, Dt().region), i = r.orderBy?.inProgressField ?? "currentStudyingHere";
15293
+ let r = M(n, Dt().region), i = r.orderBy?.inProgressField ?? "currentStudyingHere";
15228
15294
  if (e.field !== i) return;
15229
15295
  let a = gt(r);
15230
15296
  return a ? [a] : void 0;
@@ -15287,7 +15353,7 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15287
15353
  let r = !1;
15288
15354
  async function o() {
15289
15355
  try {
15290
- k(!0), A(""), N("");
15356
+ k(!0), j(""), N("");
15291
15357
  let o = await Si({
15292
15358
  module: e,
15293
15359
  id: n,
@@ -15308,7 +15374,7 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15308
15374
  !r && n && n !== le && de(n);
15309
15375
  }
15310
15376
  } catch (t) {
15311
- console.error(`Failed to fetch ${e} edit data:`, t), r || A(t?.message || "Failed to load record");
15377
+ console.error(`Failed to fetch ${e} edit data:`, t), r || j(t?.message || "Failed to load record");
15312
15378
  } finally {
15313
15379
  r || k(!1);
15314
15380
  }
@@ -15443,7 +15509,7 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15443
15509
  }
15444
15510
  async function Ue(t) {
15445
15511
  if (!(f && await Promise.resolve().then(() => f(t)).catch(() => !1) === !1)) try {
15446
- ne(!0), N("");
15512
+ te(!0), N("");
15447
15513
  let r = Yt(t, ge, {
15448
15514
  indexed: !0,
15449
15515
  module: e
@@ -15487,7 +15553,7 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15487
15553
  let n = Wr(ge, e, "edit", t?.message);
15488
15554
  N(n), q.error(n);
15489
15555
  } finally {
15490
- ne(!1);
15556
+ te(!1);
15491
15557
  }
15492
15558
  }
15493
15559
  function We(e) {
@@ -15579,7 +15645,7 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15579
15645
  children: D
15580
15646
  })
15581
15647
  }) : D, k = T.length > 0 ? (() => {
15582
- let e = re(T), n = (n) => /* @__PURE__ */ Y($n, {
15648
+ let e = ne(T), n = (n) => /* @__PURE__ */ Y($n, {
15583
15649
  position: n,
15584
15650
  actions: e[n],
15585
15651
  aiActions: ke,
@@ -15598,17 +15664,17 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15598
15664
  n("bottom-right")
15599
15665
  ]
15600
15666
  });
15601
- })() : O, ee = (e) => r === void 0 ? e : [r, e], A = t.verifyAction ? /* @__PURE__ */ X(J, { children: [t.verifyResultField && /* @__PURE__ */ Y(B.Item, {
15602
- name: ee(t.verifyResultField),
15667
+ })() : O, A = (e) => r === void 0 ? e : [r, e], j = t.verifyAction ? /* @__PURE__ */ X(J, { children: [t.verifyResultField && /* @__PURE__ */ Y(B.Item, {
15668
+ name: A(t.verifyResultField),
15603
15669
  hidden: !0,
15604
15670
  noStyle: !0,
15605
15671
  children: /* @__PURE__ */ Y(V, {})
15606
15672
  }), t.verifyTimestampField && /* @__PURE__ */ Y(B.Item, {
15607
- name: ee(t.verifyTimestampField),
15673
+ name: A(t.verifyTimestampField),
15608
15674
  hidden: !0,
15609
15675
  noStyle: !0,
15610
15676
  children: /* @__PURE__ */ Y(V, {})
15611
- })] }) : null, j = t.verifyAction ? /* @__PURE__ */ X("div", {
15677
+ })] }) : null, M = t.verifyAction ? /* @__PURE__ */ X("div", {
15612
15678
  className: "v1-verify-field-row",
15613
15679
  children: [
15614
15680
  k,
@@ -15617,22 +15683,22 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15617
15683
  field: t,
15618
15684
  absoluteName: u
15619
15685
  }),
15620
- A
15686
+ j
15621
15687
  ]
15622
- }) : k, te = g ? /* @__PURE__ */ X(J, { children: [j, /* @__PURE__ */ Y(B.Item, {
15688
+ }) : k, ee = g ? /* @__PURE__ */ X(J, { children: [M, /* @__PURE__ */ Y(B.Item, {
15623
15689
  name: r === void 0 ? _[_.length - 1] : [r, _[_.length - 1]],
15624
15690
  valuePropName: "checked",
15625
15691
  hidden: !0,
15626
15692
  noStyle: !0,
15627
15693
  children: /* @__PURE__ */ Y(Vi, {})
15628
- })] }) : j, ne = t.prefillWhen?.length ? /* @__PURE__ */ Y(sS, {
15694
+ })] }) : M, te = t.prefillWhen?.length ? /* @__PURE__ */ Y(sS, {
15629
15695
  form: y,
15630
15696
  rules: t.prefillWhen,
15631
15697
  watchPaths: Tr(t.prefillWhen, u, gn, h),
15632
15698
  targetPath: u,
15633
15699
  resetOnNoMatch: t.prefillWhenReset !== !1
15634
- }, `${t.field}-prefillWhen`) : null, M = !o.inline && ur(t).length > 0, N = (e) => M ? Pr(t, x, (t) => e(kr(t, h(t.field)))) : x;
15635
- return nt(t.showIf) || M ? /* @__PURE__ */ X(Ci.Fragment, { children: [ne, /* @__PURE__ */ Y(B.Item, {
15700
+ }, `${t.field}-prefillWhen`) : null, re = !o.inline && ur(t).length > 0, N = (e) => re ? Pr(t, x, (t) => e(kr(t, h(t.field)))) : x;
15701
+ return nt(t.showIf) || re ? /* @__PURE__ */ X(Ci.Fragment, { children: [te, /* @__PURE__ */ Y(B.Item, {
15636
15702
  shouldUpdate: !0,
15637
15703
  noStyle: !0,
15638
15704
  children: ({ getFieldValue: e }) => !nt(t.showIf) || tt(t.showIf, e, h) ? /* @__PURE__ */ Y(z, {
@@ -15640,14 +15706,14 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15640
15706
  md: N(e),
15641
15707
  style: w,
15642
15708
  className: o.inline ? "v1-combine-cell" : void 0,
15643
- children: te
15709
+ children: ee
15644
15710
  }) : null
15645
- })] }, t.field) : /* @__PURE__ */ X(Ci.Fragment, { children: [ne, /* @__PURE__ */ Y(z, {
15711
+ })] }, t.field) : /* @__PURE__ */ X(Ci.Fragment, { children: [te, /* @__PURE__ */ Y(z, {
15646
15712
  xs: 24,
15647
15713
  md: x,
15648
15714
  style: w,
15649
15715
  className: o.inline ? "v1-combine-cell" : void 0,
15650
- children: te
15716
+ children: ee
15651
15717
  })] }, t.field);
15652
15718
  }, it = (t) => {
15653
15719
  let r = typeof t.field == "string" && t.field.includes(".") ? t.field.split(".") : [t.field], a = !!t.editablePermission && !Ae(t.editablePermission, e), o = /* @__PURE__ */ Y(xS, {
@@ -15861,7 +15927,7 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15861
15927
  n,
15862
15928
  t,
15863
15929
  ...T
15864
- ] : T.length > 1 ? T : w.field : null, D = d.some((e) => NS(e)), O = [12, 24].includes(C) ? C : d.length >= 3 ? 24 : 12, k = (e) => p && (!s || s.has(e)) ? p : null, ee = d.some((e) => nt(e.showIf)), A = (e) => d.some((t) => !nt(t.showIf) || tt(t.showIf, e, k)), j = /* @__PURE__ */ Y(z, {
15930
+ ] : T.length > 1 ? T : w.field : null, D = d.some((e) => NS(e)), O = [12, 24].includes(C) ? C : d.length >= 3 ? 24 : 12, k = (e) => p && (!s || s.has(e)) ? p : null, A = d.some((e) => nt(e.showIf)), j = (e) => d.some((t) => !nt(t.showIf) || tt(t.showIf, e, k)), M = /* @__PURE__ */ Y(z, {
15865
15931
  xs: 24,
15866
15932
  md: O,
15867
15933
  children: /* @__PURE__ */ Y(B.Item, {
@@ -15904,11 +15970,11 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
15904
15970
  })
15905
15971
  })
15906
15972
  }, u);
15907
- o.push(ee ? /* @__PURE__ */ Y(B.Item, {
15973
+ o.push(A ? /* @__PURE__ */ Y(B.Item, {
15908
15974
  shouldUpdate: !0,
15909
15975
  noStyle: !0,
15910
- children: ({ getFieldValue: e }) => A(e) ? j : null
15911
- }, u) : j);
15976
+ children: ({ getFieldValue: e }) => j(e) ? M : null
15977
+ }, u) : M);
15912
15978
  }), o;
15913
15979
  }, ut = (e) => {
15914
15980
  let t = e.name ?? e.id ?? "", n = Ve(Oe, t), r = !!n && n.leaderName !== t, i = n ? ge.find((e) => e.name === n.leaderName) ?? e : e, a = Math.max(0, Number(i.minRows ?? 0) || 0), o = Math.max(0, Number(i.maxRows ?? 0) || 0), s = n ? n.memberNames : [t], c = () => {
@@ -16058,16 +16124,16 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
16058
16124
  spinning: D,
16059
16125
  tip: "Loading form fields…",
16060
16126
  children: [
16061
- ee && /* @__PURE__ */ Y(Fi, {
16127
+ A && /* @__PURE__ */ Y(Fi, {
16062
16128
  type: "error",
16063
16129
  showIcon: !0,
16064
- message: ee,
16130
+ message: A,
16065
16131
  style: { marginBottom: 16 }
16066
16132
  }),
16067
- M && /* @__PURE__ */ Y(Fi, {
16133
+ re && /* @__PURE__ */ Y(Fi, {
16068
16134
  type: "error",
16069
16135
  showIcon: !0,
16070
- message: M,
16136
+ message: re,
16071
16137
  style: { marginBottom: 16 }
16072
16138
  }),
16073
16139
  /* @__PURE__ */ X(B, {
@@ -16090,7 +16156,7 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
16090
16156
  showIf: e.showIf,
16091
16157
  render: () => mt(e, t)
16092
16158
  }) : mt(e, t)
16093
- }, e.name ?? `grp-${t}`)), !D && !ee && ge.length === 0 && /* @__PURE__ */ Y(Fi, {
16159
+ }, e.name ?? `grp-${t}`)), !D && !A && ge.length === 0 && /* @__PURE__ */ Y(Fi, {
16094
16160
  type: "info",
16095
16161
  showIcon: !0,
16096
16162
  message: "No form fields are configured."
@@ -16112,8 +16178,8 @@ function WS({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
16112
16178
  form: y,
16113
16179
  groups: ge,
16114
16180
  onClick: () => y.submit(),
16115
- disabled: D || te || be > 0,
16116
- loading: te,
16181
+ disabled: D || ee || be > 0,
16182
+ loading: ee,
16117
16183
  children: s
16118
16184
  })]
16119
16185
  })]
@@ -16480,21 +16546,21 @@ function oC({ listName: e = "List", moduleName: t = "", actions: n = [], fields:
16480
16546
  ...e,
16481
16547
  key: nC(e),
16482
16548
  label: tC(e)
16483
- })).filter((e) => e.key && e.label), [r]), k = typeof o == "number" ? o : i.length, ee = I(() => {
16549
+ })).filter((e) => e.key && e.label), [r]), k = typeof o == "number" ? o : i.length, A = I(() => {
16484
16550
  let e = g.toLowerCase();
16485
16551
  return !e || e.length < 3 ? i : i.filter((t) => O.some((n) => String(rC(t, n.key)).toLowerCase().includes(e)));
16486
16552
  }, [
16487
16553
  i,
16488
16554
  O,
16489
16555
  g
16490
- ]), A = I(() => {
16491
- if (w) return ee;
16556
+ ]), j = I(() => {
16557
+ if (w) return A;
16492
16558
  let e = (T.current - 1) * T.pageSize;
16493
- return ee.slice(e, e + T.pageSize);
16559
+ return A.slice(e, e + T.pageSize);
16494
16560
  }, [
16495
16561
  T.current,
16496
16562
  T.pageSize,
16497
- ee,
16563
+ A,
16498
16564
  w
16499
16565
  ]);
16500
16566
  return /* @__PURE__ */ X("div", {
@@ -16578,9 +16644,9 @@ function oC({ listName: e = "List", moduleName: t = "", actions: n = [], fields:
16578
16644
  }) }),
16579
16645
  /* @__PURE__ */ Y(la, {
16580
16646
  spinning: a,
16581
- children: A.length > 0 ? /* @__PURE__ */ Y("div", {
16647
+ children: j.length > 0 ? /* @__PURE__ */ Y("div", {
16582
16648
  className: "param-card-view__grid",
16583
- children: A.map((e, t) => /* @__PURE__ */ Y(aC, {
16649
+ children: j.map((e, t) => /* @__PURE__ */ Y(aC, {
16584
16650
  record: e,
16585
16651
  fields: O,
16586
16652
  selected: b.includes(e.id ?? e._id),
@@ -16637,7 +16703,7 @@ function fC({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
16637
16703
  let g = Os(), _ = Ds(), [v, y] = L("all"), [b, x] = L(""), [S, C] = L([]), [w, T] = L([]), [E, D] = L({
16638
16704
  current: 1,
16639
16705
  pageSize: 10
16640
- }), [O, k] = L([]), [ee, A] = L(!1), j = Pi(null), te = n.filter((e) => !e.maxSelect || S.length <= e.maxSelect).map((e) => ({
16706
+ }), [O, k] = L([]), [A, j] = L(!1), M = Pi(null), ee = n.filter((e) => !e.maxSelect || S.length <= e.maxSelect).map((e) => ({
16641
16707
  key: e.key ?? e.name,
16642
16708
  label: e.label ?? e.name,
16643
16709
  danger: e.danger ?? !1,
@@ -16659,32 +16725,32 @@ function fC({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
16659
16725
  } });
16660
16726
  }
16661
16727
  }
16662
- })), ne = typeof o == "number" && typeof s == "number", re = ne ? {
16728
+ })), te = typeof o == "number" && typeof s == "number", ne = te ? {
16663
16729
  current: o,
16664
16730
  pageSize: s
16665
- } : E, M = I(() => t.map((e) => ({
16731
+ } : E, re = I(() => t.map((e) => ({
16666
16732
  ...e,
16667
16733
  key: lC(e),
16668
16734
  label: cC(e)
16669
- })).filter((e) => e.key && e.label && !e.tableHidden), [t]), N = O.length ? O : M.map((e) => e.key), ie = I(() => {
16735
+ })).filter((e) => e.key && e.label && !e.tableHidden), [t]), N = O.length ? O : re.map((e) => e.key), ie = I(() => {
16670
16736
  if (u) return r;
16671
16737
  let e = b.toLowerCase();
16672
- return !e || e.length < 3 ? r : r.filter((t) => M.some((n) => String(uC(t, n.key)).toLowerCase().includes(e)));
16738
+ return !e || e.length < 3 ? r : r.filter((t) => re.some((n) => String(uC(t, n.key)).toLowerCase().includes(e)));
16673
16739
  }, [
16674
16740
  r,
16675
- M,
16741
+ re,
16676
16742
  u,
16677
16743
  b
16678
16744
  ]), ae = typeof a == "number" ? a : b.trim() ? ie.length : r.length, oe = I(() => {
16679
- if (ne) return ie;
16680
- let e = (re.current - 1) * re.pageSize;
16681
- return ie.slice(e, e + re.pageSize);
16745
+ if (te) return ie;
16746
+ let e = (ne.current - 1) * ne.pageSize;
16747
+ return ie.slice(e, e + ne.pageSize);
16682
16748
  }, [
16683
- re.current,
16684
- re.pageSize,
16749
+ ne.current,
16750
+ ne.pageSize,
16685
16751
  ie,
16686
- ne
16687
- ]), se = I(() => M.filter((e) => N.includes(e.key)).map((e) => ({
16752
+ te
16753
+ ]), se = I(() => re.filter((e) => N.includes(e.key)).map((e) => ({
16688
16754
  title: e.label,
16689
16755
  dataIndex: e.key,
16690
16756
  key: e.key,
@@ -16697,9 +16763,9 @@ function fC({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
16697
16763
  className: "job-cell-primary",
16698
16764
  children: uC(n, e.key)
16699
16765
  })
16700
- })), [M, N]), ce = N.length === M.length, le = N.length > 0 && !ce, ue = (e, t) => {
16766
+ })), [re, N]), ce = N.length === re.length, le = N.length > 0 && !ce, ue = (e, t) => {
16701
16767
  k((n) => {
16702
- let r = n.length ? n : M.map((e) => e.key);
16768
+ let r = n.length ? n : re.map((e) => e.key);
16703
16769
  return t ? r.includes(e) ? r : [...r, e] : r.filter((t) => t !== e);
16704
16770
  });
16705
16771
  }, de = /* @__PURE__ */ X("div", {
@@ -16709,10 +16775,10 @@ function fC({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
16709
16775
  checked: ce,
16710
16776
  indeterminate: le,
16711
16777
  onChange: (e) => {
16712
- k(e.target.checked ? M.map((e) => e.key) : []);
16778
+ k(e.target.checked ? re.map((e) => e.key) : []);
16713
16779
  },
16714
16780
  children: "Select All"
16715
- }), M.map((e) => /* @__PURE__ */ Y(Vi, {
16781
+ }), re.map((e) => /* @__PURE__ */ Y(Vi, {
16716
16782
  checked: N.includes(e.key),
16717
16783
  onChange: (t) => ue(e.key, t.target.checked),
16718
16784
  children: e.label
@@ -16746,9 +16812,9 @@ function fC({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
16746
16812
  value: b,
16747
16813
  onChange: (e) => {
16748
16814
  let t = e.target.value;
16749
- x(t), u ? (clearTimeout(j.current), j.current = setTimeout(() => {
16815
+ x(t), u ? (clearTimeout(M.current), M.current = setTimeout(() => {
16750
16816
  u(t), c?.(1);
16751
- }, 350)) : ne ? c?.(1) : D({
16817
+ }, 350)) : te ? c?.(1) : D({
16752
16818
  ...E,
16753
16819
  current: 1
16754
16820
  });
@@ -16786,8 +16852,8 @@ function fC({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
16786
16852
  align: "center",
16787
16853
  gap: 3,
16788
16854
  children: [/* @__PURE__ */ Y(Ki, {
16789
- open: ee,
16790
- onOpenChange: A,
16855
+ open: A,
16856
+ onOpenChange: j,
16791
16857
  trigger: ["click"],
16792
16858
  dropdownRender: () => de,
16793
16859
  placement: "bottomLeft",
@@ -16803,7 +16869,7 @@ function fC({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
16803
16869
  className: "job-actions-button"
16804
16870
  })
16805
16871
  }), S.length > 0 && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Ki, {
16806
- menu: { items: te },
16872
+ menu: { items: ee },
16807
16873
  trigger: ["click"],
16808
16874
  children: /* @__PURE__ */ X(R, {
16809
16875
  type: "text",
@@ -16850,17 +16916,17 @@ function fC({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
16850
16916
  })
16851
16917
  }),
16852
16918
  /* @__PURE__ */ Y($c, {
16853
- current: re.current,
16854
- pageSize: re.pageSize,
16919
+ current: ne.current,
16920
+ pageSize: ne.pageSize,
16855
16921
  total: ae,
16856
16922
  onChange: (e) => {
16857
- ne ? c?.(e) : D((t) => ({
16923
+ te ? c?.(e) : D((t) => ({
16858
16924
  ...t,
16859
16925
  current: e
16860
16926
  }));
16861
16927
  },
16862
16928
  onPageSizeChange: (e) => {
16863
- ne ? l?.(e) : D({
16929
+ te ? l?.(e) : D({
16864
16930
  current: 1,
16865
16931
  pageSize: e
16866
16932
  });
@@ -18344,10 +18410,10 @@ function pT(e, t = [], n = {}) {
18344
18410
  });
18345
18411
  }
18346
18412
  function mT({ moduleName: e, action: t, formType: n = "search", title: r, migrationJobId: i, sourceModules: a, searchActionContext: o, onBack: s }) {
18347
- let [c] = B.useForm(), l = Os(), [u, d] = L(null), [f, p] = L(!0), [m, h] = L(""), [g, _] = L(0), [y, b] = L("traditional"), [x, S] = L("internal"), [C, w] = L({}), [T, D] = L([]), [O, k] = L(aT), [ee, A] = L({
18413
+ let [c] = B.useForm(), l = Os(), [u, d] = L(null), [f, p] = L(!0), [m, h] = L(""), [g, _] = L(0), [y, b] = L("traditional"), [x, S] = L("internal"), [C, w] = L({}), [T, D] = L([]), [O, k] = L(aT), [A, j] = L({
18348
18414
  current: 1,
18349
18415
  pageSize: 10
18350
- }), [j, te] = L(null), [ne, re] = L({}), [M, N] = L({}), [ie, ae] = L(null), [oe, se] = L(0), [le, ue] = L(null), [de, fe] = L(null), [pe, me] = L(!1), he = Mi(), [ge, ve] = L(null), ye = Pi(!1), be = Ai((e) => {
18416
+ }), [M, ee] = L(null), [te, ne] = L({}), [re, N] = L({}), [ie, ae] = L(null), [oe, se] = L(0), [le, ue] = L(null), [de, fe] = L(null), [pe, me] = L(!1), he = Mi(), [ge, ve] = L(null), ye = Pi(!1), be = Ai((e) => {
18351
18417
  ye.current && (ye.current = !1, e && me(!0));
18352
18418
  }, []);
18353
18419
  F(() => {
@@ -18405,8 +18471,8 @@ function mT({ moduleName: e, action: t, formType: n = "search", title: r, migrat
18405
18471
  ...t
18406
18472
  }))), w({}), ae(null), b(e ? "boolean" : "traditional");
18407
18473
  }, je = Ai(async (t, n, r = {}) => {
18408
- let i = Number(r.pageSize) > 0 ? Number(r.pageSize) : ee.pageSize, a = Number(r.current), o = Number.isFinite(a) && a > 0 ? Math.floor(a) : 1, s = xh(t?.[rT]), c = we ? n ? Sh(n, x) : s.includes("internal") ? "internal" : Sh(t?.[rT], x) : "", l = Ce[bh(c)] || e;
18409
- te(t), A({
18474
+ let i = Number(r.pageSize) > 0 ? Number(r.pageSize) : A.pageSize, a = Number(r.current), o = Number.isFinite(a) && a > 0 ? Math.floor(a) : 1, s = xh(t?.[rT]), c = we ? n ? Sh(n, x) : s.includes("internal") ? "internal" : Sh(t?.[rT], x) : "", l = Ce[bh(c)] || e;
18475
+ ee(t), j({
18410
18476
  current: o,
18411
18477
  pageSize: i
18412
18478
  }), w({}), k((e) => ({
@@ -18470,7 +18536,7 @@ function mT({ moduleName: e, action: t, formType: n = "search", title: r, migrat
18470
18536
  we,
18471
18537
  De,
18472
18538
  e,
18473
- ee.pageSize,
18539
+ A.pageSize,
18474
18540
  u,
18475
18541
  x,
18476
18542
  be,
@@ -18550,7 +18616,7 @@ function mT({ moduleName: e, action: t, formType: n = "search", title: r, migrat
18550
18616
  ye.current = !1, me(!1), c.resetFields(), N({}), w({}), k(aT), D([]), S("internal"), ae(null), ue(null);
18551
18617
  }, ze = Ai(async (e, t) => {
18552
18618
  let n = Fh(e, t);
18553
- re((e) => ({
18619
+ ne((e) => ({
18554
18620
  ...e,
18555
18621
  [n]: {
18556
18622
  ...e[n],
@@ -18558,7 +18624,7 @@ function mT({ moduleName: e, action: t, formType: n = "search", title: r, migrat
18558
18624
  }
18559
18625
  }));
18560
18626
  try {
18561
- await Ih(e, t), re((e) => ({
18627
+ await Ih(e, t), ne((e) => ({
18562
18628
  ...e,
18563
18629
  [n]: {
18564
18630
  loading: !1,
@@ -18566,7 +18632,7 @@ function mT({ moduleName: e, action: t, formType: n = "search", title: r, migrat
18566
18632
  }
18567
18633
  })), q.success(e.successMessage);
18568
18634
  } catch (t) {
18569
- re((e) => ({
18635
+ ne((e) => ({
18570
18636
  ...e,
18571
18637
  [n]: { loading: !1 }
18572
18638
  })), q.error(t?.message || e.errorMessage);
@@ -18595,7 +18661,7 @@ function mT({ moduleName: e, action: t, formType: n = "search", title: r, migrat
18595
18661
  sorter: !1,
18596
18662
  render: (t, n) => {
18597
18663
  if (!Ph(e, n, x)) return null;
18598
- let r = Fh(e, n), i = ne[r] ?? {};
18664
+ let r = Fh(e, n), i = te[r] ?? {};
18599
18665
  return /* @__PURE__ */ Y(R, {
18600
18666
  type: "primary",
18601
18667
  size: "small",
@@ -18611,7 +18677,7 @@ function mT({ moduleName: e, action: t, formType: n = "search", title: r, migrat
18611
18677
  O.fields,
18612
18678
  O.rows,
18613
18679
  x,
18614
- ne
18680
+ te
18615
18681
  ]), Ve = I(() => o ?? (i ? { jobId: i } : null), [o, i]), He = I(() => {
18616
18682
  if (!Ve) return O.actions;
18617
18683
  let e = (t) => ({
@@ -18632,13 +18698,13 @@ function mT({ moduleName: e, action: t, formType: n = "search", title: r, migrat
18632
18698
  navigate: l,
18633
18699
  openPopup: Ke
18634
18700
  });
18635
- }, Je = ge ? Ew(ge) : null, Ye = { booleanMode: De }, Ze = Oe.some((e) => fT(e, M[e.field], {
18701
+ }, Je = ge ? Ew(ge) : null, Ye = { booleanMode: De }, Ze = Oe.some((e) => fT(e, re[e.field], {
18636
18702
  ...Ye,
18637
18703
  isPrimary: !0
18638
- })), Qe = P.filter((e) => sT(e.req) && !fT(e, M[e.field], {
18704
+ })), Qe = P.filter((e) => sT(e.req) && !fT(e, re[e.field], {
18639
18705
  ...Ye,
18640
18706
  isPrimary: RC(e)
18641
- })), $e = Qe.length > 0 || (De ? !Ze : !pT(M, P, Ye)), et = Qe.length ? `Enter ${Qe.map((e) => e.label ?? e.field).join(", ")} to search.` : De && !Ze && Oe.length ? `Enter a query in at least one of: ${Oe.map((e) => e.label ?? e.field).join(", ")}.` : "";
18707
+ })), $e = Qe.length > 0 || (De ? !Ze : !pT(re, P, Ye)), et = Qe.length ? `Enter ${Qe.map((e) => e.label ?? e.field).join(", ")} to search.` : De && !Ze && Oe.length ? `Enter a query in at least one of: ${Oe.map((e) => e.label ?? e.field).join(", ")}.` : "";
18642
18708
  return e ? f ? /* @__PURE__ */ Y("div", {
18643
18709
  className: "sbv1-page",
18644
18710
  children: /* @__PURE__ */ Y(Bi, {
@@ -18809,8 +18875,8 @@ function mT({ moduleName: e, action: t, formType: n = "search", title: r, migrat
18809
18875
  fields: Be,
18810
18876
  total: O.total,
18811
18877
  loading: O.loading,
18812
- current: ee.current,
18813
- pageSize: ee.pageSize,
18878
+ current: A.current,
18879
+ pageSize: A.pageSize,
18814
18880
  showSearch: !1,
18815
18881
  searchPlaceholder: We,
18816
18882
  showAdd: !1,
@@ -18819,12 +18885,12 @@ function mT({ moduleName: e, action: t, formType: n = "search", title: r, migrat
18819
18885
  showViewToggle: !0,
18820
18886
  tabs: T,
18821
18887
  selectedSource: x,
18822
- onTabChange: (e) => je(j ?? {}, e, { current: 1 }),
18823
- onPageChange: (e, t) => je(j ?? {}, x, {
18888
+ onTabChange: (e) => je(M ?? {}, e, { current: 1 }),
18889
+ onPageChange: (e, t) => je(M ?? {}, x, {
18824
18890
  current: e,
18825
18891
  pageSize: t
18826
18892
  }),
18827
- onPageSizeChange: (e, t) => je(j ?? {}, x, {
18893
+ onPageSizeChange: (e, t) => je(M ?? {}, x, {
18828
18894
  current: 1,
18829
18895
  pageSize: t
18830
18896
  }),
@@ -20099,8 +20165,8 @@ function nE({ status: e, loading: t = !1, readonly: n = !1, rejectionReason: r,
20099
20165
  })
20100
20166
  ]
20101
20167
  });
20102
- let ee = "Submit", A = !1;
20103
- return w && (ee = e === "resubmitted" ? "Re-Submitted" : "Submitted", A = !0), (S || T) && (ee = "Re-Submit", A = !1), C && (ee = "Approved", A = !0), /* @__PURE__ */ X(J, { children: [
20168
+ let A = "Submit", j = !1;
20169
+ return w && (A = e === "resubmitted" ? "Re-Submitted" : "Submitted", j = !0), (S || T) && (A = "Re-Submit", j = !1), C && (A = "Approved", j = !0), /* @__PURE__ */ X(J, { children: [
20104
20170
  r && S && /* @__PURE__ */ Y(Fi, {
20105
20171
  type: "error",
20106
20172
  showIcon: !0,
@@ -20115,10 +20181,10 @@ function nE({ status: e, loading: t = !1, readonly: n = !1, rejectionReason: r,
20115
20181
  variant: "primary",
20116
20182
  icon: /* @__PURE__ */ Y(Xo, {}),
20117
20183
  loading: t,
20118
- disabled: A,
20119
- onClick: A ? void 0 : d,
20184
+ disabled: j,
20185
+ onClick: j ? void 0 : d,
20120
20186
  block: !0,
20121
- children: ee
20187
+ children: A
20122
20188
  }),
20123
20189
  x && f && /* @__PURE__ */ Y(An, {
20124
20190
  variant: "primary",
@@ -21089,7 +21155,7 @@ function HE(e, t) {
21089
21155
  return OE(r?.taxValue ?? r?.taxPercent);
21090
21156
  }
21091
21157
  function UE(e, t = {}) {
21092
- let { contractType: n = "C2C", currency: r = DE.currency, currencyRaw: i, rateUnit: a = DE.rateUnit, clientJobRate: o = 0, clientJobRateFrom: s = 0, clientJobRateTo: c = 0, clientVmsPercent: l = 0, clientVmsPercentageType: u = "recurring", proposedRate: d = 0, employerRate: f = 0, employerVmsPercent: p = 0, employerVmsPercentConfigured: m = 0, employerVmsAvailable: h = !1, employerVmsType: g = "Recurring", employerVmsRequired: _ = !1, locationTaxPercent: v = 0 } = e ?? {}, y = Hv(r, DE.currency), b = t.proposedRate == null ? OE(d) : OE(t.proposedRate), x = !!t.includeReferral, S = x ? OE(t.referralRate) : 0, C = (t.deductReferral == null ? x : t.deductReferral) ? S : 0, w = BE(o, l), T = ME(o - w), E = BE(b, l), D = ME(b - E), O = n === "W2", k = O ? v : p, ee = BE(f, k), A = ME(f - ee), j = ME(D - A - C);
21158
+ let { contractType: n = "C2C", currency: r = DE.currency, currencyRaw: i, rateUnit: a = DE.rateUnit, clientJobRate: o = 0, clientJobRateFrom: s = 0, clientJobRateTo: c = 0, clientVmsPercent: l = 0, clientVmsPercentageType: u = "recurring", proposedRate: d = 0, employerRate: f = 0, employerVmsPercent: p = 0, employerVmsPercentConfigured: m = 0, employerVmsAvailable: h = !1, employerVmsType: g = "Recurring", employerVmsRequired: _ = !1, locationTaxPercent: v = 0 } = e ?? {}, y = Hv(r, DE.currency), b = t.proposedRate == null ? OE(d) : OE(t.proposedRate), x = !!t.includeReferral, S = x ? OE(t.referralRate) : 0, C = (t.deductReferral == null ? x : t.deductReferral) ? S : 0, w = BE(o, l), T = ME(o - w), E = BE(b, l), D = ME(b - E), O = n === "W2", k = O ? v : p, A = BE(f, k), j = ME(f - A), M = ME(D - j - C);
21093
21159
  return {
21094
21160
  contractType: n,
21095
21161
  currency: y,
@@ -21110,18 +21176,18 @@ function UE(e, t = {}) {
21110
21176
  netProposedRate: D,
21111
21177
  employerRate: ME(f),
21112
21178
  employerDeductionPercent: OE(k),
21113
- employerDeduction: ee,
21179
+ employerDeduction: A,
21114
21180
  employerDeductionLabel: O ? "Location Tax" : "Employer VMS",
21115
21181
  employerVmsType: g,
21116
21182
  employerVmsRequired: !!_,
21117
21183
  employerVmsPercentConfigured: OE(m),
21118
21184
  employerVmsAvailable: !!h,
21119
- netEmployerRate: A,
21185
+ netEmployerRate: j,
21120
21186
  includereferral: x,
21121
21187
  referralRate: ME(S),
21122
21188
  referralDeduction: ME(C),
21123
- totalMargin: j,
21124
- marginPositive: j >= 0
21189
+ totalMargin: M,
21190
+ marginPositive: M >= 0
21125
21191
  };
21126
21192
  }
21127
21193
  function WE(e, t, n = {}) {
@@ -21302,7 +21368,7 @@ function uD({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
21302
21368
  t,
21303
21369
  n,
21304
21370
  p
21305
- ]), h = wE(f), [g, _] = L(m.proposedRate), [v, y] = L(t?.engagement?.financeApproval?.referralId ?? t?.referral?._id ?? null), [b, x] = L(t?.engagement?.financeApproval?.referralRate ?? t?.referral?.referalRate ?? 0), [S, C] = L(t?.referral?.isNewReferral ? 0 : t?.referral?.referalRate ?? t?.referral?.referralRate ?? t?.engagement?.financeApproval?.referralRate ?? 0), [w, T] = L(t?.engagement?.financeApproval?.referralType ?? t?.referral?.referralType ?? t?.referral?.referalType ?? "Recurring"), [E, D] = L(!1), [O, k] = L(!1), [ee, A] = L(""), [j, te] = L(!1), [ne, re] = L(""), [M, N] = L(!1), [ie, ae] = L(""), oe = !!f.sections.rateBreakdown?.editToggle, [se, ce] = L(!1), le = !oe || se, [ue, de] = L(!1), [fe, pe] = L(!1), [me, he] = L({
21371
+ ]), h = wE(f), [g, _] = L(m.proposedRate), [v, y] = L(t?.engagement?.financeApproval?.referralId ?? t?.referral?._id ?? null), [b, x] = L(t?.engagement?.financeApproval?.referralRate ?? t?.referral?.referalRate ?? 0), [S, C] = L(t?.referral?.isNewReferral ? 0 : t?.referral?.referalRate ?? t?.referral?.referralRate ?? t?.engagement?.financeApproval?.referralRate ?? 0), [w, T] = L(t?.engagement?.financeApproval?.referralType ?? t?.referral?.referralType ?? t?.referral?.referalType ?? "Recurring"), [E, D] = L(!1), [O, k] = L(!1), [A, j] = L(""), [M, ee] = L(!1), [te, ne] = L(""), [re, N] = L(!1), [ie, ae] = L(""), oe = !!f.sections.rateBreakdown?.editToggle, [se, ce] = L(!1), le = !oe || se, [ue, de] = L(!1), [fe, pe] = L(!1), [me, he] = L({
21306
21372
  open: !1,
21307
21373
  title: "",
21308
21374
  rows: []
@@ -21448,11 +21514,11 @@ function uD({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
21448
21514
  de(!0);
21449
21515
  return;
21450
21516
  }
21451
- if (e.requireReason && !ee.trim()) {
21452
- te(!0);
21517
+ if (e.requireReason && !A.trim()) {
21518
+ ee(!0);
21453
21519
  return;
21454
21520
  }
21455
- if (e.requireCategory && !ne) {
21521
+ if (e.requireCategory && !te) {
21456
21522
  N(!0);
21457
21523
  return;
21458
21524
  }
@@ -21476,8 +21542,8 @@ function uD({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
21476
21542
  referralRate: 0
21477
21543
  },
21478
21544
  referralEnabled: be,
21479
- reason: ee.trim(),
21480
- category: ne,
21545
+ reason: A.trim(),
21546
+ category: te,
21481
21547
  rateHistory: f.persist?.rateHistory ? ZE(P, c) : void 0
21482
21548
  });
21483
21549
  } catch (e) {
@@ -22053,8 +22119,8 @@ function uD({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
22053
22119
  /* @__PURE__ */ Y(H, {
22054
22120
  id: "fa-rejection-category",
22055
22121
  placeholder: "Select where to return this rejection",
22056
- value: ne || void 0,
22057
- status: M ? "error" : "",
22122
+ value: te || void 0,
22123
+ status: re ? "error" : "",
22058
22124
  options: [{
22059
22125
  value: "submission",
22060
22126
  label: "Submission"
@@ -22063,14 +22129,14 @@ function uD({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
22063
22129
  label: "Onboarding"
22064
22130
  }],
22065
22131
  onChange: (e) => {
22066
- re(e), N(!1);
22132
+ ne(e), N(!1);
22067
22133
  },
22068
22134
  style: {
22069
22135
  width: "100%",
22070
22136
  marginBottom: 16
22071
22137
  }
22072
22138
  }),
22073
- M && /* @__PURE__ */ Y("div", {
22139
+ re && /* @__PURE__ */ Y("div", {
22074
22140
  className: "fa-reason-error",
22075
22141
  children: "! Select where to return the rejection."
22076
22142
  })
@@ -22085,14 +22151,14 @@ function uD({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
22085
22151
  rows: 3,
22086
22152
  maxLength: 500,
22087
22153
  showCount: !0,
22088
- value: ee,
22089
- status: j ? "error" : "",
22154
+ value: A,
22155
+ status: M ? "error" : "",
22090
22156
  placeholder: "Enter your comments here…",
22091
22157
  onChange: (e) => {
22092
- A(e.target.value), e.target.value.trim() && te(!1);
22158
+ j(e.target.value), e.target.value.trim() && ee(!1);
22093
22159
  }
22094
22160
  }),
22095
- j && /* @__PURE__ */ Y("div", {
22161
+ M && /* @__PURE__ */ Y("div", {
22096
22162
  className: "fa-reason-error",
22097
22163
  children: "! Comments are required when rejecting."
22098
22164
  })
@@ -22360,10 +22426,10 @@ async function xD(e, t = {}) {
22360
22426
  ...vD(S),
22361
22427
  ...vD(v)
22362
22428
  };
22363
- let T = (Array.isArray(_) ? _ : []).find((t) => PE(t.submissionId) === String(e)), E = PE(w.clientId) || PE(T?.clientId) || s, D = a.clientName ?? t.clientName ?? w.clientName, O = D ? m.filter((e) => dD(e.clientName) === dD(D)) : [], k = m.find(mD(E)) ?? O[0] ?? {}, ee = await yD("clients", PE(k._id ?? k.id) || E), A = {
22429
+ let T = (Array.isArray(_) ? _ : []).find((t) => PE(t.submissionId) === String(e)), E = PE(w.clientId) || PE(T?.clientId) || s, D = a.clientName ?? t.clientName ?? w.clientName, O = D ? m.filter((e) => dD(e.clientName) === dD(D)) : [], k = m.find(mD(E)) ?? O[0] ?? {}, A = await yD("clients", PE(k._id ?? k.id) || E), j = {
22364
22430
  ...k,
22365
- ...ee
22366
- }, j = h.find(mD(l)) ?? {}, te = g.find(mD(d)) ?? g.find((e) => dD(e.name) === dD(d)) ?? {};
22431
+ ...A
22432
+ }, M = h.find(mD(l)) ?? {}, ee = g.find(mD(d)) ?? g.find((e) => dD(e.name) === dD(d)) ?? {};
22367
22433
  return {
22368
22434
  record: {
22369
22435
  submission: {
@@ -22373,20 +22439,20 @@ async function xD(e, t = {}) {
22373
22439
  submission_current_employer: [o]
22374
22440
  },
22375
22441
  job: w,
22376
- client: A,
22377
- employer: j
22442
+ client: j,
22443
+ employer: M
22378
22444
  },
22379
22445
  lookups: {
22380
- clientVmsFee: A.vmsFee ?? a.clientVmsFee ?? a.vmsFee,
22381
- locationTaxPercent: o.tax ?? te.taxValue
22446
+ clientVmsFee: j.vmsFee ?? a.clientVmsFee ?? a.vmsFee,
22447
+ locationTaxPercent: o.tax ?? ee.taxValue
22382
22448
  },
22383
22449
  display: {
22384
- clientName: a.clientName ?? A.clientName,
22450
+ clientName: a.clientName ?? j.clientName,
22385
22451
  jobTitle: a.jobTitle ?? w.jobTitle,
22386
22452
  reqId: i.jobClientRefrenceId ?? a.jobRefrenceId ?? i.jobRefrenceId ?? i.mspReqId,
22387
22453
  jobLocation: a.jobLocation ?? w.jobLocation,
22388
- employerName: j.empCompanyName,
22389
- employerLocation: te.name ?? j.empCompanyLocation ?? d,
22454
+ employerName: M.empCompanyName,
22455
+ employerLocation: ee.name ?? M.empCompanyLocation ?? d,
22390
22456
  submittedBy: b.signatureEmail || a.signatureEmail || t.signatureEmail || _D(y),
22391
22457
  email: a.email,
22392
22458
  candidateName: [a.firstName, a.lastName].filter(Boolean).join(" ") || a.candidateFullName,
@@ -24362,7 +24428,7 @@ function gA({ field: e, collections: t, collFields: n, subfields: r, onCollectio
24362
24428
  }
24363
24429
  return !1;
24364
24430
  }
24365
- let D = e.renderType ?? "", O = !!e.commonStyle, k = e.commonStyle ?? {}, ee = e.valueStyles ?? [], A = e.renderConfig ?? {};
24431
+ let D = e.renderType ?? "", O = !!e.commonStyle, k = e.commonStyle ?? {}, A = e.valueStyles ?? [], j = e.renderConfig ?? {};
24366
24432
  return /* @__PURE__ */ X(J, { children: [
24367
24433
  /* @__PURE__ */ X("div", {
24368
24434
  className: "uss-detail-section",
@@ -24521,12 +24587,12 @@ function gA({ field: e, collections: t, collFields: n, subfields: r, onCollectio
24521
24587
  })]
24522
24588
  })]
24523
24589
  }),
24524
- ee.length === 0 && /* @__PURE__ */ Y(sA, {
24590
+ A.length === 0 && /* @__PURE__ */ Y(sA, {
24525
24591
  type: "secondary",
24526
24592
  style: { fontSize: 12 },
24527
24593
  children: "Click \"Auto-detect values\" to populate from live data, or \"Add\" to map manually."
24528
24594
  }),
24529
- ee.map((e, t) => /* @__PURE__ */ X("div", {
24595
+ A.map((e, t) => /* @__PURE__ */ X("div", {
24530
24596
  style: {
24531
24597
  display: "grid",
24532
24598
  gridTemplateColumns: "1fr 1fr 62px 62px 54px 26px",
@@ -24642,13 +24708,13 @@ function gA({ field: e, collections: t, collFields: n, subfields: r, onCollectio
24642
24708
  allowClear: !0,
24643
24709
  style: { width: "100%" },
24644
24710
  placeholder: r.length > 0 ? "Select a child field from the array" : "Enter child field, e.g. clientBudgetStart",
24645
- value: A.lastItemField || void 0,
24711
+ value: j.lastItemField || void 0,
24646
24712
  options: r.map((e) => ({
24647
24713
  value: e,
24648
24714
  label: e
24649
24715
  })),
24650
24716
  onChange: (e) => p({ renderConfig: {
24651
- ...A,
24717
+ ...j,
24652
24718
  lastItemField: e ?? ""
24653
24719
  } }),
24654
24720
  onSearch: (e) => {
@@ -24662,9 +24728,9 @@ function gA({ field: e, collections: t, collFields: n, subfields: r, onCollectio
24662
24728
  children: /* @__PURE__ */ Y(V, {
24663
24729
  size: "small",
24664
24730
  placeholder: "Custom child field",
24665
- value: A.lastItemField || "",
24731
+ value: j.lastItemField || "",
24666
24732
  onChange: (e) => p({ renderConfig: {
24667
- ...A,
24733
+ ...j,
24668
24734
  lastItemField: e.target.value.trim()
24669
24735
  } })
24670
24736
  })
@@ -24703,13 +24769,13 @@ function gA({ field: e, collections: t, collFields: n, subfields: r, onCollectio
24703
24769
  allowClear: !0,
24704
24770
  style: { width: "100%" },
24705
24771
  placeholder: "e.g. recruiterName",
24706
- value: A.labelField || void 0,
24772
+ value: j.labelField || void 0,
24707
24773
  options: r.length > 0 ? r.map((e) => ({
24708
24774
  value: e,
24709
24775
  label: e
24710
24776
  })) : [],
24711
24777
  onChange: (e) => p({ renderConfig: {
24712
- ...A,
24778
+ ...j,
24713
24779
  labelField: e ?? ""
24714
24780
  } })
24715
24781
  })] }),
@@ -24727,13 +24793,13 @@ function gA({ field: e, collections: t, collFields: n, subfields: r, onCollectio
24727
24793
  allowClear: !0,
24728
24794
  style: { width: "100%" },
24729
24795
  placeholder: "color",
24730
- value: A.colorField || void 0,
24796
+ value: j.colorField || void 0,
24731
24797
  options: r.length > 0 ? r.map((e) => ({
24732
24798
  value: e,
24733
24799
  label: e
24734
24800
  })) : [],
24735
24801
  onChange: (e) => p({ renderConfig: {
24736
- ...A,
24802
+ ...j,
24737
24803
  colorField: e ?? ""
24738
24804
  } })
24739
24805
  })] }),
@@ -24750,9 +24816,9 @@ function gA({ field: e, collections: t, collFields: n, subfields: r, onCollectio
24750
24816
  type: "number",
24751
24817
  min: 1,
24752
24818
  max: 10,
24753
- value: A.maxVisible || 3,
24819
+ value: j.maxVisible || 3,
24754
24820
  onChange: (e) => p({ renderConfig: {
24755
- ...A,
24821
+ ...j,
24756
24822
  maxVisible: Number(e.target.value) || 3
24757
24823
  } })
24758
24824
  })] })
@@ -24826,9 +24892,9 @@ function gA({ field: e, collections: t, collFields: n, subfields: r, onCollectio
24826
24892
  children: "Useful for integer fields where 0 means the value was not provided."
24827
24893
  })] }), /* @__PURE__ */ Y(W, {
24828
24894
  size: "small",
24829
- checked: !!A.treatZeroAsEmpty,
24895
+ checked: !!j.treatZeroAsEmpty,
24830
24896
  onChange: (e) => p({ renderConfig: {
24831
- ...A,
24897
+ ...j,
24832
24898
  treatZeroAsEmpty: e
24833
24899
  } })
24834
24900
  })]
@@ -24855,9 +24921,9 @@ function gA({ field: e, collections: t, collFields: n, subfields: r, onCollectio
24855
24921
  ]
24856
24922
  })] }), /* @__PURE__ */ Y(W, {
24857
24923
  size: "small",
24858
- checked: !!A.cleanEmptyTemplateSeparators,
24924
+ checked: !!j.cleanEmptyTemplateSeparators,
24859
24925
  onChange: (e) => p({ renderConfig: {
24860
- ...A,
24926
+ ...j,
24861
24927
  cleanEmptyTemplateSeparators: e
24862
24928
  } })
24863
24929
  })]
@@ -25695,12 +25761,12 @@ function SA({ field: e, index: t, configType: n, moduleKey: r, onUpdate: i, onRe
25695
25761
  function k(e) {
25696
25762
  i(t, e);
25697
25763
  }
25698
- function ee() {
25764
+ function A() {
25699
25765
  p(!1);
25700
25766
  let t = m.trim();
25701
25767
  t && t !== e.fieldName ? k({ fieldName: t }) : h(e.fieldName);
25702
25768
  }
25703
- async function A(t) {
25769
+ async function j(t) {
25704
25770
  k({ lookup: {
25705
25771
  ...e.lookup,
25706
25772
  collection: t,
@@ -25711,7 +25777,7 @@ function SA({ field: e, index: t, configType: n, moduleKey: r, onUpdate: i, onRe
25711
25777
  let n = await s(t);
25712
25778
  _(n);
25713
25779
  }
25714
- async function j(t, n) {
25780
+ async function M(t, n) {
25715
25781
  if (k({ lookup: {
25716
25782
  ...e.lookup,
25717
25783
  ...n
@@ -25721,14 +25787,14 @@ function SA({ field: e, index: t, configType: n, moduleKey: r, onUpdate: i, onRe
25721
25787
  y([]);
25722
25788
  }
25723
25789
  }
25724
- function te(t) {
25790
+ function ee(t) {
25725
25791
  let n = e.secondaryFields ?? [];
25726
25792
  !t || n.includes(t) || k({ secondaryFields: [...n, t] });
25727
25793
  }
25728
- function ne(t) {
25794
+ function te(t) {
25729
25795
  k({ secondaryFields: (e.secondaryFields ?? []).filter((e) => e !== t) });
25730
25796
  }
25731
- function re() {
25797
+ function ne() {
25732
25798
  let t = e.actionButtons ?? [];
25733
25799
  t.length >= 3 || k({ actionButtons: [...t, {
25734
25800
  name: "",
@@ -25739,7 +25805,7 @@ function SA({ field: e, index: t, configType: n, moduleKey: r, onUpdate: i, onRe
25739
25805
  permissionKey: ""
25740
25806
  }] });
25741
25807
  }
25742
- function M(t, n) {
25808
+ function re(t, n) {
25743
25809
  let r = [...e.actionButtons ?? []];
25744
25810
  r[t] = {
25745
25811
  ...r[t],
@@ -25775,9 +25841,9 @@ function SA({ field: e, index: t, configType: n, moduleKey: r, onUpdate: i, onRe
25775
25841
  autoFocus: !0,
25776
25842
  value: m,
25777
25843
  onChange: (e) => h(e.target.value),
25778
- onBlur: ee,
25844
+ onBlur: A,
25779
25845
  onKeyDown: (t) => {
25780
- t.key === "Enter" && ee(), t.key === "Escape" && (p(!1), h(e.fieldName));
25846
+ t.key === "Enter" && A(), t.key === "Escape" && (p(!1), h(e.fieldName));
25781
25847
  },
25782
25848
  onClick: (e) => e.stopPropagation()
25783
25849
  }) : /* @__PURE__ */ Y(K, {
@@ -25825,12 +25891,12 @@ function SA({ field: e, index: t, configType: n, moduleKey: r, onUpdate: i, onRe
25825
25891
  collections: o,
25826
25892
  collFields: g,
25827
25893
  subfields: v,
25828
- onCollectionChange: A,
25829
- onLookupFieldChange: j,
25830
- addSecondaryField: te,
25831
- removeSecondaryField: ne,
25832
- addActionButton: re,
25833
- updateActionButton: M,
25894
+ onCollectionChange: j,
25895
+ onLookupFieldChange: M,
25896
+ addSecondaryField: ee,
25897
+ removeSecondaryField: te,
25898
+ addActionButton: ne,
25899
+ updateActionButton: re,
25834
25900
  removeActionButton: N,
25835
25901
  moduleKey: r,
25836
25902
  fieldKey: e.fieldKey,
@@ -25841,8 +25907,8 @@ function SA({ field: e, index: t, configType: n, moduleKey: r, onUpdate: i, onRe
25841
25907
  configType: n,
25842
25908
  collections: o,
25843
25909
  collFields: g,
25844
- onCollectionChange: A,
25845
- onLookupFieldChange: j,
25910
+ onCollectionChange: j,
25911
+ onLookupFieldChange: M,
25846
25912
  availableFields: l
25847
25913
  })
25848
25914
  })] });
@@ -33063,7 +33129,7 @@ function gM({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
33063
33129
  t = !0;
33064
33130
  };
33065
33131
  }, [e, d]);
33066
- async function ee(e) {
33132
+ async function A(e) {
33067
33133
  if (!(!e || D.current[e])) {
33068
33134
  D.current[e] = "loading", g(!0);
33069
33135
  try {
@@ -33205,29 +33271,29 @@ function gM({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
33205
33271
  afterSubmitTarget: "",
33206
33272
  order: 0,
33207
33273
  fields: []
33208
- })), ee(r);
33274
+ })), A(r);
33209
33275
  }, [
33210
33276
  e,
33211
33277
  t,
33212
33278
  n,
33213
33279
  c
33214
33280
  ]);
33215
- function A(e) {
33216
- f(e), ee(e);
33281
+ function j(e) {
33282
+ f(e), A(e);
33217
33283
  }
33218
- function j() {
33284
+ function M() {
33219
33285
  S(/* @__PURE__ */ new Set()), w("settings"), E(!1), a();
33220
33286
  }
33221
- function te(e) {
33287
+ function ee(e) {
33222
33288
  w(e), e === "fields" && E(!0);
33223
33289
  }
33224
- function ne(e, t = !1) {
33290
+ function te(e, t = !1) {
33225
33291
  S((n) => {
33226
33292
  let r = new Set(n);
33227
33293
  return t ? r.add(e) : r.has(e) ? r.delete(e) : r.add(e), r;
33228
33294
  });
33229
33295
  }
33230
- function re(e) {
33296
+ function ne(e) {
33231
33297
  let n = i[e] ?? [], r = /* @__PURE__ */ new Set();
33232
33298
  return n.forEach((e) => {
33233
33299
  t && e.id === t.id || (e.fields ?? []).forEach((e) => {
@@ -33235,7 +33301,7 @@ function gM({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
33235
33301
  });
33236
33302
  }), r;
33237
33303
  }
33238
- function M(e, t) {
33304
+ function re(e, t) {
33239
33305
  let n = (p[d] ?? []).find((t) => t.value === e);
33240
33306
  if (!n) return;
33241
33307
  let r = c.getFieldValue(["fields", t]) ?? {};
@@ -33247,7 +33313,7 @@ function gM({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
33247
33313
  });
33248
33314
  }
33249
33315
  function N(e) {
33250
- let t = re(e);
33316
+ let t = ne(e);
33251
33317
  return (p[e] ?? []).map((e) => ({
33252
33318
  value: e.value,
33253
33319
  disabled: t.has(e.value),
@@ -33432,7 +33498,7 @@ function gM({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
33432
33498
  ]);
33433
33499
  return /* @__PURE__ */ Y($i, {
33434
33500
  open: e,
33435
- onCancel: j,
33501
+ onCancel: M,
33436
33502
  width: 1080,
33437
33503
  centered: !0,
33438
33504
  destroyOnClose: !0,
@@ -33445,7 +33511,7 @@ function gM({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
33445
33511
  footer: /* @__PURE__ */ X("div", {
33446
33512
  className: "fg-drawer-footer",
33447
33513
  children: [/* @__PURE__ */ Y(R, {
33448
- onClick: j,
33514
+ onClick: M,
33449
33515
  children: "Cancel"
33450
33516
  }), /* @__PURE__ */ Y(R, {
33451
33517
  type: "primary",
@@ -33469,7 +33535,7 @@ function gM({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
33469
33535
  role: "tab",
33470
33536
  "aria-selected": C === "settings",
33471
33537
  className: C === "settings" ? "is-active" : "",
33472
- onClick: () => te("settings"),
33538
+ onClick: () => ee("settings"),
33473
33539
  children: [/* @__PURE__ */ Y("span", {
33474
33540
  className: "fg-editor-tab-number",
33475
33541
  children: "1"
@@ -33479,7 +33545,7 @@ function gM({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
33479
33545
  role: "tab",
33480
33546
  "aria-selected": C === "fields",
33481
33547
  className: C === "fields" ? "is-active" : "",
33482
- onClick: () => te("fields"),
33548
+ onClick: () => ee("fields"),
33483
33549
  children: [/* @__PURE__ */ Y("span", {
33484
33550
  className: "fg-editor-tab-number",
33485
33551
  children: "2"
@@ -33505,7 +33571,7 @@ function gM({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
33505
33571
  children: /* @__PURE__ */ Y(H, {
33506
33572
  options: r,
33507
33573
  placeholder: "Select module",
33508
- onChange: A
33574
+ onChange: j
33509
33575
  })
33510
33576
  }),
33511
33577
  /* @__PURE__ */ Y(B.Item, {
@@ -34700,7 +34766,7 @@ function gM({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
34700
34766
  children: "Next, review the fields included in this group."
34701
34767
  }), /* @__PURE__ */ Y(R, {
34702
34768
  type: "primary",
34703
- onClick: () => te("fields"),
34769
+ onClick: () => ee("fields"),
34704
34770
  children: "Continue to Fields"
34705
34771
  })]
34706
34772
  })]
@@ -34738,9 +34804,9 @@ function gM({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
34738
34804
  dragIndexRef: O,
34739
34805
  dragOverIndex: y,
34740
34806
  setDragOverIndex: b,
34741
- onFieldKeySelect: (e, t) => M(e, t),
34807
+ onFieldKeySelect: (e, t) => re(e, t),
34742
34808
  expandedFieldKeys: x,
34743
- onToggleField: ne,
34809
+ onToggleField: te,
34744
34810
  defaultFieldSet: _,
34745
34811
  uniqueTarget: {
34746
34812
  primaryModule: c.getFieldValue("module") || n || "",
@@ -35954,7 +36020,7 @@ function bM() {
35954
36020
  }));
35955
36021
  t(n);
35956
36022
  let r = Jj(n);
35957
- a(Yj(r)), ee("all", r);
36023
+ a(Yj(r)), A("all", r);
35958
36024
  }).catch(() => t([])).finally(() => r(!1));
35959
36025
  }, []), F(() => {
35960
36026
  cr({ limit: 200 }).then(_).catch(() => _([]));
@@ -35969,7 +36035,7 @@ function bM() {
35969
36035
  }));
35970
36036
  }
35971
36037
  let D = (e) => e !== "all" && !!(v.clientId || v.region), O = (e) => D(e) ? v : {}, k = (e) => D(e) ? `${v.clientId}|${v.region}` : "";
35972
- function ee(e, t) {
36038
+ function A(e, t) {
35973
36039
  if (!(t ?? w).find((t) => t.key === e)) return;
35974
36040
  let n = k(e);
35975
36041
  E(e, {
@@ -35985,27 +36051,27 @@ function bM() {
35985
36051
  loading: !1
35986
36052
  }));
35987
36053
  }
35988
- function A(e) {
35989
- ee(e, null);
35990
- }
35991
36054
  function j(e) {
35992
- s(e), (!i[e]?.loaded || i[e]?.scopeKey !== k(e)) && A(e);
36055
+ A(e, null);
35993
36056
  }
35994
- function te() {
36057
+ function M(e) {
36058
+ s(e), (!i[e]?.loaded || i[e]?.scopeKey !== k(e)) && j(e);
36059
+ }
36060
+ function ee() {
35995
36061
  d(null), l(!0);
35996
36062
  }
35997
- function ne(e) {
36063
+ function te(e) {
35998
36064
  d(e), l(!0);
35999
36065
  }
36000
- function re() {
36066
+ function ne() {
36001
36067
  l(!1), d(null);
36002
36068
  }
36003
- async function M() {
36004
- re(), A(o), o !== "all" && A("all");
36069
+ async function re() {
36070
+ ne(), j(o), o !== "all" && j("all");
36005
36071
  }
36006
36072
  async function N(e) {
36007
36073
  try {
36008
- await pr(e, se()), q.success("Group deleted"), A(o), o !== "all" && A("all");
36074
+ await pr(e, se()), q.success("Group deleted"), j(o), o !== "all" && j("all");
36009
36075
  } catch (e) {
36010
36076
  q.error(e.message || "Could not delete group");
36011
36077
  }
@@ -36019,9 +36085,9 @@ function bM() {
36019
36085
  await Promise.all(t.map(({ g: e, index: t }) => xr(e.id, {
36020
36086
  ...e,
36021
36087
  order: t
36022
- }, se(e.module || o)))), q.success("Group order updated"), A(o), o !== "all" && A("all");
36088
+ }, se(e.module || o)))), q.success("Group order updated"), j(o), o !== "all" && j("all");
36023
36089
  } catch (e) {
36024
- q.error(e.message || "Could not reorder groups"), A(o);
36090
+ q.error(e.message || "Could not reorder groups"), j(o);
36025
36091
  }
36026
36092
  }
36027
36093
  function ae(e) {
@@ -36068,13 +36134,13 @@ function bM() {
36068
36134
  payloadKey: S.payloadKey ?? e.payloadKey,
36069
36135
  fields: JSON.parse(JSON.stringify(S.fields ?? []))
36070
36136
  };
36071
- await xr(e.id, t, se(e.module || o)), q.success(`Pasted settings into ${e.label || e.name}`), A(o), o !== "all" && A("all");
36137
+ await xr(e.id, t, se(e.module || o)), q.success(`Pasted settings into ${e.label || e.name}`), j(o), o !== "all" && j("all");
36072
36138
  } catch (e) {
36073
36139
  q.error(e.message || "Could not paste settings");
36074
36140
  }
36075
36141
  }
36076
36142
  function ue() {
36077
- p(null), a(Yj(w)), A(o), o !== "all" && A("all");
36143
+ p(null), a(Yj(w)), j(o), o !== "all" && j("all");
36078
36144
  }
36079
36145
  let de = w.map(({ key: e, label: t, color: n }) => {
36080
36146
  let r = i[e] ?? {
@@ -36118,7 +36184,7 @@ function bM() {
36118
36184
  icon: /* @__PURE__ */ Y(Ro, {}),
36119
36185
  disabled: e === "all",
36120
36186
  onClick: () => {
36121
- s(e), te();
36187
+ s(e), ee();
36122
36188
  },
36123
36189
  children: "Add Group"
36124
36190
  })
@@ -36127,7 +36193,7 @@ function bM() {
36127
36193
  spinning: r.loading,
36128
36194
  children: /* @__PURE__ */ Y(_M, {
36129
36195
  groups: a,
36130
- onEdit: ne,
36196
+ onEdit: te,
36131
36197
  onDelete: N,
36132
36198
  onCopy: ce,
36133
36199
  onPaste: le,
@@ -36180,7 +36246,7 @@ function bM() {
36180
36246
  /* @__PURE__ */ Y(R, {
36181
36247
  size: "small",
36182
36248
  icon: /* @__PURE__ */ Y(Ho, {}),
36183
- onClick: () => A(o),
36249
+ onClick: () => j(o),
36184
36250
  children: "Reload"
36185
36251
  }),
36186
36252
  /* @__PURE__ */ Y(R, {
@@ -36197,7 +36263,7 @@ function bM() {
36197
36263
  spinning: n,
36198
36264
  children: /* @__PURE__ */ Y(pa, {
36199
36265
  activeKey: o,
36200
- onChange: j,
36266
+ onChange: M,
36201
36267
  items: de,
36202
36268
  size: "middle",
36203
36269
  className: "fg-tabs"
@@ -36209,8 +36275,8 @@ function bM() {
36209
36275
  defaultModule: o === "all" ? T[0]?.value ?? "" : o,
36210
36276
  moduleOptions: T,
36211
36277
  allGroupsByModule: Object.fromEntries(Object.entries(i).filter(([e]) => e !== "all").map(([e, t]) => [e, t.groups ?? []])),
36212
- onClose: re,
36213
- onSaved: M,
36278
+ onClose: ne,
36279
+ onSaved: re,
36214
36280
  onSaveGroup: (e, t) => t ? xr(t.id, e, se(e.module)) : Ut(e, se(e.module))
36215
36281
  }),
36216
36282
  /* @__PURE__ */ Y(Ej, {
@@ -36285,7 +36351,7 @@ function bM() {
36285
36351
  type: "primary",
36286
36352
  size: "small",
36287
36353
  icon: /* @__PURE__ */ Y(xa, {}),
36288
- onClick: te,
36354
+ onClick: ee,
36289
36355
  children: "New Group"
36290
36356
  })]
36291
36357
  }) : null,
@@ -38317,7 +38383,7 @@ function eN({ open: e, onClose: t }) {
38317
38383
  });
38318
38384
  }
38319
38385
  function tN() {
38320
- let [e, t] = L([]), [n, r] = L(!0), [i, a] = L(""), [o, s] = L([]), [c, l] = L({}), [u, d] = L({}), [f, p] = L([]), [m, h] = L([]), [g, _] = L({}), [v, y] = L([]), [b, x] = L([]), [S, C] = L(!1), [w, T] = L(""), [E, D] = L(!1), [O, k] = L(null), [ee, A] = L(null), [j, te] = L(!1), [ne, re] = L(!1), [M, N] = L(null), [ie, ae] = L(0), [oe, se] = L(""), [ce, le] = L([]), [ue, de] = L(""), [fe, me] = L(""), [he, ge] = L({});
38386
+ let [e, t] = L([]), [n, r] = L(!0), [i, a] = L(""), [o, s] = L([]), [c, l] = L({}), [u, d] = L({}), [f, p] = L([]), [m, h] = L([]), [g, _] = L({}), [v, y] = L([]), [b, x] = L([]), [S, C] = L(!1), [w, T] = L(""), [E, D] = L(!1), [O, k] = L(null), [A, j] = L(null), [M, ee] = L(!1), [te, ne] = L(!1), [re, N] = L(null), [ie, ae] = L(0), [oe, se] = L(""), [ce, le] = L([]), [ue, de] = L(""), [fe, me] = L(""), [he, ge] = L({});
38321
38387
  function _e(e, t = {}) {
38322
38388
  N({
38323
38389
  ...MM[e],
@@ -38500,8 +38566,8 @@ function tN() {
38500
38566
  function ke(e) {
38501
38567
  y((t) => {
38502
38568
  let n = [...t];
38503
- return ee.index === null ? n.push(e) : n[ee.index] = e, n;
38504
- }), A(null);
38569
+ return A.index === null ? n.push(e) : n[A.index] = e, n;
38570
+ }), j(null);
38505
38571
  }
38506
38572
  function Ae(e, t, n = !1) {
38507
38573
  _((r) => {
@@ -38894,7 +38960,7 @@ function tN() {
38894
38960
  type: "text",
38895
38961
  size: "small",
38896
38962
  icon: /* @__PURE__ */ Y(Qa, {}),
38897
- onClick: () => A({
38963
+ onClick: () => j({
38898
38964
  index: n,
38899
38965
  merge: t
38900
38966
  })
@@ -38969,14 +39035,14 @@ function tN() {
38969
39035
  /* @__PURE__ */ Y(R, {
38970
39036
  size: "small",
38971
39037
  icon: /* @__PURE__ */ Y(Zo, {}),
38972
- onClick: () => re(!0),
39038
+ onClick: () => ne(!0),
38973
39039
  children: "Display Defaults"
38974
39040
  }),
38975
39041
  /* @__PURE__ */ Y(R, {
38976
39042
  size: "small",
38977
39043
  icon: /* @__PURE__ */ Y(ro, {}),
38978
39044
  disabled: !i,
38979
- onClick: () => te(!0),
39045
+ onClick: () => ee(!0),
38980
39046
  children: "Preview"
38981
39047
  }),
38982
39048
  /* @__PURE__ */ Y(R, {
@@ -39118,7 +39184,7 @@ function tN() {
39118
39184
  type: "dashed",
39119
39185
  icon: /* @__PURE__ */ Y(Ro, {}),
39120
39186
  disabled: !i,
39121
- onClick: () => A({
39187
+ onClick: () => j({
39122
39188
  index: null,
39123
39189
  merge: null
39124
39190
  }),
@@ -39154,37 +39220,37 @@ function tN() {
39154
39220
  onSave: Oe
39155
39221
  }, O?.key ?? "field-closed"),
39156
39222
  /* @__PURE__ */ Y(YM, {
39157
- open: !!ee,
39158
- merge: ee?.merge,
39223
+ open: !!A,
39224
+ merge: A?.merge,
39159
39225
  fieldOptions: we,
39160
39226
  groupOptions: m,
39161
- onClose: () => A(null),
39227
+ onClose: () => j(null),
39162
39228
  onSave: ke
39163
- }, ee ? `merge-${ee.index ?? "new"}` : "merge-closed"),
39229
+ }, A ? `merge-${A.index ?? "new"}` : "merge-closed"),
39164
39230
  /* @__PURE__ */ Y(eN, {
39165
- open: ne,
39166
- onClose: () => re(!1)
39231
+ open: te,
39232
+ onClose: () => ne(!1)
39167
39233
  }),
39168
39234
  /* @__PURE__ */ Y(XM, {
39169
- open: j,
39235
+ open: M,
39170
39236
  module: i,
39171
39237
  clientId: ue,
39172
39238
  onBeforeLoad: () => Te({ announce: !1 }),
39173
- onClose: () => te(!1)
39239
+ onClose: () => ee(!1)
39174
39240
  }),
39175
39241
  /* @__PURE__ */ Y(xj, {
39176
- open: !!M,
39242
+ open: !!re,
39177
39243
  scope: "detailConfig",
39178
- action: M?.action,
39179
- title: M?.title,
39180
- description: M?.description,
39181
- confirmLabel: M?.confirmLabel,
39182
- danger: M?.danger,
39244
+ action: re?.action,
39245
+ title: re?.title,
39246
+ description: re?.description,
39247
+ confirmLabel: re?.confirmLabel,
39248
+ danger: re?.danger,
39183
39249
  onCancel: () => N(null),
39184
39250
  onVerified: Ce,
39185
- onConfirm: M?.action === "discoverFields" ? (e) => kn({
39186
- module: M.module,
39187
- clientId: M.clientId,
39251
+ onConfirm: re?.action === "discoverFields" ? (e) => kn({
39252
+ module: re.module,
39253
+ clientId: re.clientId,
39188
39254
  otp: e
39189
39255
  }) : void 0
39190
39256
  })
@@ -39906,7 +39972,7 @@ function ON({ open: e, initial: t, isChild: n, popupForms: r, templateOptions: i
39906
39972
  });
39907
39973
  }
39908
39974
  function kN() {
39909
- let [e, t] = L([]), [n, r] = L(""), [i, a] = L([]), [o, s] = L(null), [c, l] = L([]), [u, d] = L(!1), [f, p] = L(!1), [m, h] = L(!1), [g, _] = L(null), [v, y] = L(!1), [b, x] = L(null), [S, C] = L([]), [w, T] = L([]), [E, D] = L(null), [O, k] = L(""), [ee, A] = L([]), [j, te] = L([]);
39975
+ let [e, t] = L([]), [n, r] = L(""), [i, a] = L([]), [o, s] = L(null), [c, l] = L([]), [u, d] = L(!1), [f, p] = L(!1), [m, h] = L(!1), [g, _] = L(null), [v, y] = L(!1), [b, x] = L(null), [S, C] = L([]), [w, T] = L([]), [E, D] = L(null), [O, k] = L(""), [A, j] = L([]), [M, ee] = L([]);
39910
39976
  F(() => {
39911
39977
  Me().then((e) => {
39912
39978
  let n = kA(e);
@@ -39916,10 +39982,10 @@ function kN() {
39916
39982
  });
39917
39983
  }, []), F(() => {
39918
39984
  Promise.all([Me().catch(() => []), xe().catch(() => [])]).then(([e, t]) => {
39919
- A([...new Set(e.map((e) => e.MENUNAME ?? e.menuName).filter(Boolean))]), te([...new Set(t.map((e) => e.permissionKey ?? e.PERMISSIONKEY).filter(Boolean))]);
39985
+ j([...new Set(e.map((e) => e.MENUNAME ?? e.menuName).filter(Boolean))]), ee([...new Set(t.map((e) => e.permissionKey ?? e.PERMISSIONKEY).filter(Boolean))]);
39920
39986
  });
39921
39987
  }, []);
39922
- let ne = Ai(async () => {
39988
+ let te = Ai(async () => {
39923
39989
  if (n) {
39924
39990
  p(!0), _(null), a([]);
39925
39991
  try {
@@ -39934,9 +40000,9 @@ function kN() {
39934
40000
  }, [n]);
39935
40001
  F(() => {
39936
40002
  queueMicrotask(() => {
39937
- ne();
40003
+ te();
39938
40004
  });
39939
- }, [ne]), F(() => {
40005
+ }, [te]), F(() => {
39940
40006
  Promise.all([_e(n, "popup").catch(() => []), uN({ module: n }).catch(() => [])]).then(([e, t]) => {
39941
40007
  C(e), T(t.map((e) => ({
39942
40008
  value: e._id ?? e.id,
@@ -39949,7 +40015,7 @@ function kN() {
39949
40015
  s(t ?? null), l(t ? t.rowActions ?? [] : []), d(!1);
39950
40016
  });
39951
40017
  }, [n, i]);
39952
- let re = async () => {
40018
+ let ne = async () => {
39953
40019
  h(!0);
39954
40020
  try {
39955
40021
  if (o) await oi(o.id ?? o._id, c), a((e) => e.map((e) => (e.id ?? e._id) === (o.id ?? o._id) ? {
@@ -39966,13 +40032,13 @@ function kN() {
39966
40032
  }
39967
40033
  d(!1);
39968
40034
  } catch (e) {
39969
- q.error(e.message), String(e.message ?? "").toLowerCase().includes("already exists") && ne();
40035
+ q.error(e.message), String(e.message ?? "").toLowerCase().includes("already exists") && te();
39970
40036
  } finally {
39971
40037
  h(!1);
39972
40038
  }
39973
- }, M = async () => {
40039
+ }, re = async () => {
39974
40040
  if (o) try {
39975
- await bn(o.id ?? o._id), q.success("Config deleted"), await ne();
40041
+ await bn(o.id ?? o._id), q.success("Config deleted"), await te();
39976
40042
  } catch (e) {
39977
40043
  q.error(e.message);
39978
40044
  }
@@ -40019,7 +40085,7 @@ function kN() {
40019
40085
  }
40020
40086
  l(t), d(!1), y(!1);
40021
40087
  } catch (e) {
40022
- q.error(e.message), String(e.message ?? "").toLowerCase().includes("already exists") && ne();
40088
+ q.error(e.message), String(e.message ?? "").toLowerCase().includes("already exists") && te();
40023
40089
  }
40024
40090
  }, ce = (e, t = null) => {
40025
40091
  l(t ? (n) => n.map((n) => n.key === t ? {
@@ -40036,7 +40102,7 @@ function kN() {
40036
40102
  D(yN[e]);
40037
40103
  }
40038
40104
  function de() {
40039
- D(null), ne();
40105
+ D(null), te();
40040
40106
  }
40041
40107
  let fe = I(() => {
40042
40108
  let e = O.trim().toLowerCase();
@@ -40346,7 +40412,7 @@ function kN() {
40346
40412
  className: "admin-config-reload",
40347
40413
  children: /* @__PURE__ */ Y(R, {
40348
40414
  icon: /* @__PURE__ */ Y(Ho, {}),
40349
- onClick: ne,
40415
+ onClick: te,
40350
40416
  loading: f,
40351
40417
  children: "Reload"
40352
40418
  })
@@ -40380,7 +40446,7 @@ function kN() {
40380
40446
  children: [
40381
40447
  o && /* @__PURE__ */ Y(ta, {
40382
40448
  title: "Delete this entire config?",
40383
- onConfirm: M,
40449
+ onConfirm: re,
40384
40450
  okText: "Delete",
40385
40451
  okType: "danger",
40386
40452
  children: /* @__PURE__ */ Y(R, {
@@ -40400,7 +40466,7 @@ function kN() {
40400
40466
  icon: /* @__PURE__ */ Y(Jo, {}),
40401
40467
  loading: m,
40402
40468
  disabled: !u,
40403
- onClick: re,
40469
+ onClick: ne,
40404
40470
  children: "Save Config"
40405
40471
  })
40406
40472
  ]
@@ -40456,8 +40522,8 @@ function kN() {
40456
40522
  isChild: !!N,
40457
40523
  popupForms: S,
40458
40524
  templateOptions: w,
40459
- permissionModules: ee,
40460
- permissionActions: j,
40525
+ permissionModules: A,
40526
+ permissionActions: M,
40461
40527
  onClose: () => y(!1),
40462
40528
  onSave: se
40463
40529
  }),
@@ -40663,7 +40729,7 @@ function UN() {
40663
40729
  isActive: e.isActive ?? !0
40664
40730
  }), d(!0);
40665
40731
  }
40666
- async function ee() {
40732
+ async function A() {
40667
40733
  if (m.name.trim()) {
40668
40734
  _(!0);
40669
40735
  try {
@@ -40678,7 +40744,7 @@ function UN() {
40678
40744
  }
40679
40745
  }
40680
40746
  }
40681
- async function A(e) {
40747
+ async function j(e) {
40682
40748
  try {
40683
40749
  await hn(e.id), q.success("Rule deleted");
40684
40750
  } catch (e) {
@@ -40686,7 +40752,7 @@ function UN() {
40686
40752
  }
40687
40753
  w(i);
40688
40754
  }
40689
- async function j() {
40755
+ async function M() {
40690
40756
  y(!0);
40691
40757
  try {
40692
40758
  for (let e of RN) await k({
@@ -40700,7 +40766,7 @@ function UN() {
40700
40766
  y(!1);
40701
40767
  }
40702
40768
  }
40703
- function te(e, t) {
40769
+ function ee(e, t) {
40704
40770
  h((n) => ({
40705
40771
  ...n,
40706
40772
  conditions: n.conditions.map((n, r) => r === e ? {
@@ -40709,13 +40775,13 @@ function UN() {
40709
40775
  } : n)
40710
40776
  }));
40711
40777
  }
40712
- function ne() {
40778
+ function te() {
40713
40779
  h((e) => ({
40714
40780
  ...e,
40715
40781
  conditions: [...e.conditions, zN()]
40716
40782
  }));
40717
40783
  }
40718
- function re(e) {
40784
+ function ne(e) {
40719
40785
  h((t) => ({
40720
40786
  ...t,
40721
40787
  conditions: t.conditions.filter((t, n) => n !== e)
@@ -40758,7 +40824,7 @@ function UN() {
40758
40824
  children: /* @__PURE__ */ Y(R, {
40759
40825
  icon: /* @__PURE__ */ Y(cs, {}),
40760
40826
  loading: v,
40761
- onClick: j,
40827
+ onClick: M,
40762
40828
  children: "Seed Job Defaults"
40763
40829
  })
40764
40830
  })
@@ -40875,7 +40941,7 @@ function UN() {
40875
40941
  })
40876
40942
  }), /* @__PURE__ */ Y(ta, {
40877
40943
  title: "Delete this rule?",
40878
- onConfirm: () => A(t),
40944
+ onConfirm: () => j(t),
40879
40945
  children: /* @__PURE__ */ Y(K, {
40880
40946
  title: "Delete",
40881
40947
  children: /* @__PURE__ */ Y(R, {
@@ -40908,7 +40974,7 @@ function UN() {
40908
40974
  }), /* @__PURE__ */ Y(R, {
40909
40975
  type: "primary",
40910
40976
  loading: g,
40911
- onClick: ee,
40977
+ onClick: A,
40912
40978
  children: "Save Rule"
40913
40979
  })]
40914
40980
  }),
@@ -40985,7 +41051,7 @@ function UN() {
40985
41051
  options: MN,
40986
41052
  value: e.operator,
40987
41053
  style: { width: 140 },
40988
- onChange: (e) => te(t, {
41054
+ onChange: (e) => ee(t, {
40989
41055
  operator: e,
40990
41056
  value: "",
40991
41057
  compareField: ""
@@ -41008,7 +41074,7 @@ function UN() {
41008
41074
  options: b,
41009
41075
  style: { width: "100%" },
41010
41076
  placeholder: "Select or type field name",
41011
- onChange: (e) => te(t, { field: e[e.length - 1] ?? "" }),
41077
+ onChange: (e) => ee(t, { field: e[e.length - 1] ?? "" }),
41012
41078
  filterOption: (e, t) => (t?.label ?? t?.value ?? "").toLowerCase().includes(e.toLowerCase())
41013
41079
  }), /* @__PURE__ */ X(AN, {
41014
41080
  type: "secondary",
@@ -41037,7 +41103,7 @@ function UN() {
41037
41103
  options: NN,
41038
41104
  style: { width: 200 },
41039
41105
  placeholder: "e.g. \"fulfilled\"",
41040
- onChange: (e) => te(t, { value: e[e.length - 1] ?? "" }),
41106
+ onChange: (e) => ee(t, { value: e[e.length - 1] ?? "" }),
41041
41107
  filterOption: (e, t) => (t?.label ?? t?.value ?? "").toLowerCase().includes(e.toLowerCase())
41042
41108
  }), /* @__PURE__ */ X(AN, {
41043
41109
  type: "secondary",
@@ -41060,7 +41126,7 @@ function UN() {
41060
41126
  value: e.value || void 0,
41061
41127
  style: { width: 150 },
41062
41128
  placeholder: "Select scope",
41063
- onChange: (e) => te(t, { value: e })
41129
+ onChange: (e) => ee(t, { value: e })
41064
41130
  }), /* @__PURE__ */ Y(AN, {
41065
41131
  type: "secondary",
41066
41132
  style: { fontSize: 11 },
@@ -41082,7 +41148,7 @@ function UN() {
41082
41148
  options: b,
41083
41149
  style: { width: 170 },
41084
41150
  placeholder: "Select or type field",
41085
- onChange: (e) => te(t, { compareField: e[e.length - 1] ?? "" }),
41151
+ onChange: (e) => ee(t, { compareField: e[e.length - 1] ?? "" }),
41086
41152
  filterOption: (e, t) => (t?.label ?? t?.value ?? "").toLowerCase().includes(e.toLowerCase())
41087
41153
  }), /* @__PURE__ */ X(AN, {
41088
41154
  type: "secondary",
@@ -41098,7 +41164,7 @@ function UN() {
41098
41164
  icon: /* @__PURE__ */ Y(qa, {}),
41099
41165
  size: "small",
41100
41166
  type: "text",
41101
- onClick: () => re(t)
41167
+ onClick: () => ne(t)
41102
41168
  })
41103
41169
  })
41104
41170
  ]
@@ -41117,7 +41183,7 @@ function UN() {
41117
41183
  /* @__PURE__ */ Y(R, {
41118
41184
  size: "small",
41119
41185
  style: { marginBottom: 16 },
41120
- onClick: ne,
41186
+ onClick: te,
41121
41187
  children: "+ Add Condition"
41122
41188
  }),
41123
41189
  /* @__PURE__ */ X(Wi, {
@@ -44443,7 +44509,7 @@ function EP() {
44443
44509
  [e]: t
44444
44510
  }));
44445
44511
  }
44446
- function ee(e, t) {
44512
+ function A(e, t) {
44447
44513
  d((n) => {
44448
44514
  let r = n.duplicateCheck ?? {}, i = [...r.stages ?? []];
44449
44515
  return i[e] = t, {
@@ -44455,7 +44521,7 @@ function EP() {
44455
44521
  };
44456
44522
  });
44457
44523
  }
44458
- function A() {
44524
+ function j() {
44459
44525
  h(!0);
44460
44526
  let e = {
44461
44527
  ...u,
@@ -44475,20 +44541,20 @@ function EP() {
44475
44541
  l(o.storage || "mongo"), q.success("Automations saved");
44476
44542
  }).catch((e) => q.error(e?.message || "Could not save automations")).finally(() => h(!1));
44477
44543
  }
44478
- function j() {
44544
+ function M() {
44479
44545
  if ((o.storage || "mongo") !== c) {
44480
44546
  $i.confirm({
44481
44547
  title: "Change how this module persists writes?",
44482
44548
  content: `You're switching ${i} from "${c}" to "${o.storage}". ` + (o.storage === "mongo" ? "This module will stop calling its downstream service and this gateway will own the write + every Strategy below." : "This module will stop using the Strategies below and go back to calling its downstream service.") + " Make sure the downstream service / e2e checks are ready before confirming.",
44483
44549
  okText: "Confirm cutover",
44484
44550
  okButtonProps: { danger: !0 },
44485
- onOk: A
44551
+ onOk: j
44486
44552
  });
44487
44553
  return;
44488
44554
  }
44489
- A();
44555
+ j();
44490
44556
  }
44491
- let te = [
44557
+ let ee = [
44492
44558
  {
44493
44559
  title: "Source module",
44494
44560
  dataIndex: "sourceModule",
@@ -44526,7 +44592,7 @@ function EP() {
44526
44592
  children: "optional"
44527
44593
  })
44528
44594
  }
44529
- ], ne = [
44595
+ ], te = [
44530
44596
  {
44531
44597
  title: "Source field",
44532
44598
  dataIndex: "sourceField",
@@ -44559,7 +44625,7 @@ function EP() {
44559
44625
  color: "var(--color-brand)"
44560
44626
  })
44561
44627
  }
44562
- ], re = [
44628
+ ], ne = [
44563
44629
  {
44564
44630
  title: "Source field",
44565
44631
  dataIndex: "sourceField",
@@ -44598,7 +44664,7 @@ function EP() {
44598
44664
  children: "—"
44599
44665
  })
44600
44666
  }
44601
- ], M = [
44667
+ ], re = [
44602
44668
  {
44603
44669
  title: "Name",
44604
44670
  dataIndex: "name",
@@ -44692,7 +44758,7 @@ function EP() {
44692
44758
  icon: /* @__PURE__ */ Y(Jo, {}),
44693
44759
  loading: m,
44694
44760
  disabled: !i,
44695
- onClick: j,
44761
+ onClick: M,
44696
44762
  children: "Save Automations"
44697
44763
  }),
44698
44764
  children: [/* @__PURE__ */ Y("div", { className: "admin-accent-bar" }), /* @__PURE__ */ Y($, {
@@ -45031,7 +45097,7 @@ function EP() {
45031
45097
  style: { width: "100%" },
45032
45098
  placeholder: "email, contactNumber",
45033
45099
  value: e.fields ?? [],
45034
- onChange: (n) => ee(t, {
45100
+ onChange: (n) => A(t, {
45035
45101
  ...e,
45036
45102
  fields: n
45037
45103
  })
@@ -45047,7 +45113,7 @@ function EP() {
45047
45113
  size: "small",
45048
45114
  style: { width: "100%" },
45049
45115
  value: e.match ?? "all",
45050
- onChange: (n) => ee(t, {
45116
+ onChange: (n) => A(t, {
45051
45117
  ...e,
45052
45118
  match: n
45053
45119
  }),
@@ -45070,7 +45136,7 @@ function EP() {
45070
45136
  size: "small",
45071
45137
  style: { width: "100%" },
45072
45138
  value: e.weight ?? "strong",
45073
- onChange: (n) => ee(t, {
45139
+ onChange: (n) => A(t, {
45074
45140
  ...e,
45075
45141
  weight: n
45076
45142
  }),
@@ -45093,7 +45159,7 @@ function EP() {
45093
45159
  size: "small",
45094
45160
  placeholder: "A candidate with this email already exists — {name}, last updated {age}.",
45095
45161
  value: e.message ?? "",
45096
- onChange: (n) => ee(t, {
45162
+ onChange: (n) => A(t, {
45097
45163
  ...e,
45098
45164
  message: n.target.value
45099
45165
  })
@@ -45436,7 +45502,7 @@ function EP() {
45436
45502
  title: "Denormalizations",
45437
45503
  description: "Copy fields from ANOTHER module's record onto this payload before insert (e.g. a submission snapshotting job title/client).",
45438
45504
  rules: u.denormalizations ?? [],
45439
- columns: te,
45505
+ columns: ee,
45440
45506
  onAdd: () => y({
45441
45507
  index: null,
45442
45508
  rule: null
@@ -45452,7 +45518,7 @@ function EP() {
45452
45518
  title: "Array Enrichments",
45453
45519
  description: "Enrich a payload array of ids (e.g. recruitersData) into objects carrying looked-up fields (name, email) before insert.",
45454
45520
  rules: u.arrayEnrichments ?? [],
45455
- columns: ne,
45521
+ columns: te,
45456
45522
  onAdd: () => x({
45457
45523
  index: null,
45458
45524
  rule: null
@@ -45468,7 +45534,7 @@ function EP() {
45468
45534
  title: "File Field Maps",
45469
45535
  description: "Turn an uploaded file field into a nested object (location + filename + who/when) or an array of such objects, instead of a flat S3 path string — needed for schemas like resume/passport/visa.",
45470
45536
  rules: u.fileFieldMaps ?? [],
45471
- columns: re,
45537
+ columns: ne,
45472
45538
  onAdd: () => C({
45473
45539
  index: null,
45474
45540
  rule: null
@@ -45521,7 +45587,7 @@ function EP() {
45521
45587
  title: "Hierarchy Expansions",
45522
45588
  description: "Walk the reporting chain up (toward admin) or down (toward a team) from a seed user, publishing the result as {{hierarchy.<name>}} for Related Updates / Notify to use.",
45523
45589
  rules: u.hierarchyExpands ?? [],
45524
- columns: M,
45590
+ columns: re,
45525
45591
  onAdd: () => T({
45526
45592
  index: null,
45527
45593
  rule: null
@@ -46145,7 +46211,7 @@ function PP() {
46145
46211
  let [e, t] = L([]), [n, r] = L([]), [i, a] = L(!0), [o, s] = L(""), [c, l] = L(null), [u, d] = L(""), [f, p] = L(0);
46146
46212
  F(() => {
46147
46213
  let e = !1;
46148
- return ee("workflows").then((n) => {
46214
+ return A("workflows").then((n) => {
46149
46215
  e || t(n);
46150
46216
  }).catch((t) => {
46151
46217
  e || s(t?.message || "Failed to load workflows");
@@ -47821,7 +47887,7 @@ function EF({ title: e, description: t, selectedName: n, loading: r, saving: i,
47821
47887
  });
47822
47888
  }
47823
47889
  function DF({ onLogout: e }) {
47824
- let [t] = B.useForm(), [n] = B.useForm(), [r, i] = L("users"), [a, o] = L(!0), [s, c] = L(!1), [l, u] = L(!1), [f, p] = L([]), [m, h] = L(0), [g, _] = L(1), [v, y] = L(10), [b, x] = L(""), [S, C] = L(!1), [w, T] = L([]), [E, D] = L([]), [O, k] = L([]), [ee, A] = L(null), [j, te] = L([]), [ne, re] = L(!1), [M, N] = L(null), [ie, ae] = L(!1), [oe, se] = L(null), [ce, le] = L([]), [ue, de] = L(!1), [fe, pe] = L(!1), [me, he] = L(null), [ge, _e] = L(!1), [ve, ye] = L(null), [be, xe] = L("listView"), [Se, Ce] = L([]), [we, Te] = L([]), [Ee, De] = L(!1), [Oe, P] = L(!1), ke = d(), Ae = I(() => Se.filter((e) => !e.disabled), [Se]), je = !Ee && Ae.length === 0, Me = Ai(async () => {
47890
+ let [t] = B.useForm(), [n] = B.useForm(), [r, i] = L("users"), [a, o] = L(!0), [s, c] = L(!1), [l, u] = L(!1), [f, p] = L([]), [m, h] = L(0), [g, _] = L(1), [v, y] = L(10), [b, x] = L(""), [S, C] = L(!1), [w, T] = L([]), [E, D] = L([]), [O, k] = L([]), [A, j] = L(null), [M, ee] = L([]), [te, ne] = L(!1), [re, N] = L(null), [ie, ae] = L(!1), [oe, se] = L(null), [ce, le] = L([]), [ue, de] = L(!1), [fe, pe] = L(!1), [me, he] = L(null), [ge, _e] = L(!1), [ve, ye] = L(null), [be, xe] = L("listView"), [Se, Ce] = L([]), [we, Te] = L([]), [Ee, De] = L(!1), [Oe, P] = L(!1), ke = d(), Ae = I(() => Se.filter((e) => !e.disabled), [Se]), je = !Ee && Ae.length === 0, Me = Ai(async () => {
47825
47891
  De(!0);
47826
47892
  try {
47827
47893
  let [e, t] = await Promise.all([Qn(), ci()]), n = vF(e.modules, t), r = new Set(n.filter((e) => !e.disabled).map((e) => e.value));
@@ -47857,7 +47923,7 @@ function DF({ onLogout: e }) {
47857
47923
  Zk(),
47858
47924
  tA()
47859
47925
  ]), r = e.status === "fulfilled" ? e.value : [];
47860
- e.status === "rejected" && q.error(e.reason?.message || "Unable to load user types"), T(r ?? []), D(t.status === "fulfilled" ? t.value ?? [] : []), k(n.status === "fulfilled" ? wF(n.value) : []), A((r ?? [])[0]?.user_type_id ?? null);
47926
+ e.status === "rejected" && q.error(e.reason?.message || "Unable to load user types"), T(r ?? []), D(t.status === "fulfilled" ? t.value ?? [] : []), k(n.status === "fulfilled" ? wF(n.value) : []), j((r ?? [])[0]?.user_type_id ?? null);
47861
47927
  } catch (e) {
47862
47928
  q.error(e.message || "Unable to load admin data");
47863
47929
  } finally {
@@ -47892,15 +47958,15 @@ function DF({ onLogout: e }) {
47892
47958
  Fe();
47893
47959
  }, [Fe]), F(() => {
47894
47960
  queueMicrotask(() => {
47895
- if (!ee) {
47896
- te([]);
47961
+ if (!A) {
47962
+ ee([]);
47897
47963
  return;
47898
47964
  }
47899
- c(!0), console.log("DEBUG requesting role permissions for selectedUserTypeId=", ee, "localStorage scope=", {
47965
+ c(!0), console.log("DEBUG requesting role permissions for selectedUserTypeId=", A, "localStorage scope=", {
47900
47966
  tenantId: localStorage.getItem("tenantId"),
47901
47967
  businessId: localStorage.getItem("businessId"),
47902
47968
  businessUnitId: localStorage.getItem("businessUnitId")
47903
- }), nA(ee).then((e) => {
47969
+ }), nA(A).then((e) => {
47904
47970
  console.log("DEBUG raw groups from /get-role-details", e);
47905
47971
  let t = xF(e ?? []);
47906
47972
  console.log("DEBUG savedRows (jobs only)", t.filter((e) => SF(e) === "jobs" || SF(e) === "job"));
@@ -47918,15 +47984,15 @@ function DF({ onLogout: e }) {
47918
47984
  accessValue: n.get(`${r}:${i}`) ?? 0
47919
47985
  };
47920
47986
  }));
47921
- console.log("DEBUG final rows (jobs only)", r.filter((e) => SF(e) === "jobs" || SF(e) === "job")), te(r);
47987
+ console.log("DEBUG final rows (jobs only)", r.filter((e) => SF(e) === "jobs" || SF(e) === "job")), ee(r);
47922
47988
  }).catch((e) => q.error(e.message || "Unable to load role permissions")).finally(() => c(!1));
47923
47989
  });
47924
47990
  }, [
47925
- ee,
47991
+ A,
47926
47992
  E,
47927
47993
  O
47928
47994
  ]);
47929
- let Ie = I(() => w.find((e) => e.user_type_id === ee), [ee, w]), Le = I(() => w.reduce((e, t) => ({
47995
+ let Ie = I(() => w.find((e) => e.user_type_id === A), [A, w]), Le = I(() => w.reduce((e, t) => ({
47930
47996
  ...e,
47931
47997
  [t.user_type_id]: t.user_type_name
47932
47998
  }), {}), [w]), Re = I(() => f.reduce((e, t) => ({
@@ -47937,7 +48003,7 @@ function DF({ onLogout: e }) {
47937
48003
  user_type_name: Le[e.user_type_id]
47938
48004
  })), [Le, f]);
47939
48005
  F(() => {
47940
- if (!ne) {
48006
+ if (!te) {
47941
48007
  le([]);
47942
48008
  return;
47943
48009
  }
@@ -47948,7 +48014,7 @@ function DF({ onLogout: e }) {
47948
48014
  }
47949
48015
  let n = !1;
47950
48016
  return de(!0), Uk(e).then((e) => {
47951
- n || le(e.filter((e) => !M || e.user_id !== M.user_id));
48017
+ n || le(e.filter((e) => !re || e.user_id !== re.user_id));
47952
48018
  }).catch((e) => {
47953
48019
  n || (q.error(e.message || "Unable to load reporting users"), le([]));
47954
48020
  }).finally(() => {
@@ -47957,21 +48023,21 @@ function DF({ onLogout: e }) {
47957
48023
  n = !0;
47958
48024
  };
47959
48025
  }, [
47960
- M,
48026
+ re,
47961
48027
  t,
47962
- ne
48028
+ te
47963
48029
  ]);
47964
48030
  let Ve = I(() => {
47965
48031
  let e = ce.map((e) => ({
47966
48032
  label: bF(e),
47967
48033
  value: e.user_id
47968
- })), t = Number(M?.reporting_id ?? M?.reportingId ?? 0);
48034
+ })), t = Number(re?.reporting_id ?? re?.reportingId ?? 0);
47969
48035
  return !t || e.some((e) => Number(e.value) === t) ? e : [{
47970
- label: M?.reportingName ?? M?.reporting_name ?? Re[t] ?? `User ${t}`,
48036
+ label: re?.reportingName ?? re?.reporting_name ?? Re[t] ?? `User ${t}`,
47971
48037
  value: t
47972
48038
  }, ...e];
47973
48039
  }, [
47974
- M,
48040
+ re,
47975
48041
  ce,
47976
48042
  Re
47977
48043
  ]), He = I(() => {
@@ -47979,14 +48045,14 @@ function DF({ onLogout: e }) {
47979
48045
  label: e.user_type_name,
47980
48046
  value: e.user_type_id
47981
48047
  }));
47982
- if (!M) return e;
47983
- let t = Number(M.user_type_id ?? 0);
48048
+ if (!re) return e;
48049
+ let t = Number(re.user_type_id ?? 0);
47984
48050
  return e.some((e) => Number(e.value) === t) ? e : [{
47985
- label: Le[t] ?? M.userType ?? M.roleName ?? (t > 0 ? `Type ${t}` : "Unassigned"),
48051
+ label: Le[t] ?? re.userType ?? re.roleName ?? (t > 0 ? `Type ${t}` : "Unassigned"),
47986
48052
  value: t
47987
48053
  }, ...e];
47988
48054
  }, [
47989
- M,
48055
+ re,
47990
48056
  ze,
47991
48057
  Le
47992
48058
  ]);
@@ -48090,7 +48156,7 @@ function DF({ onLogout: e }) {
48090
48156
  }
48091
48157
  ];
48092
48158
  function Ge(e, t) {
48093
- te((n) => {
48159
+ ee((n) => {
48094
48160
  let r = n.filter((t) => t.key === e).length;
48095
48161
  return console.log("DEBUG updateRolePermission", {
48096
48162
  key: e,
@@ -48105,7 +48171,7 @@ function DF({ onLogout: e }) {
48105
48171
  async function Ke() {
48106
48172
  u(!0);
48107
48173
  try {
48108
- console.log("DEBUG saveRolePermissions jobs rows", j.filter((e) => SF(e) === "jobs" || SF(e) === "job")), await rA(ee, j.map((e) => ({
48174
+ console.log("DEBUG saveRolePermissions jobs rows", M.filter((e) => SF(e) === "jobs" || SF(e) === "job")), await rA(A, M.map((e) => ({
48109
48175
  menu_id: e.menuId,
48110
48176
  menu_name: e.menuName,
48111
48177
  menu_key: e.menuKey,
@@ -48125,7 +48191,7 @@ function DF({ onLogout: e }) {
48125
48191
  status: "ACTIVE",
48126
48192
  user_type_id: ze[0]?.user_type_id,
48127
48193
  reporting_id: 0
48128
- }), re(!0);
48194
+ }), ne(!0);
48129
48195
  }
48130
48196
  function Je(e) {
48131
48197
  N(e), t.setFieldsValue({
@@ -48138,7 +48204,7 @@ function DF({ onLogout: e }) {
48138
48204
  reporting_id: e.reporting_id ?? e.reportingId ?? 0,
48139
48205
  profile_image: e.profile_image,
48140
48206
  status: e.status
48141
- }), re(!0);
48207
+ }), ne(!0);
48142
48208
  }
48143
48209
  async function Ye(e) {
48144
48210
  ae(!0);
@@ -48149,7 +48215,7 @@ function DF({ onLogout: e }) {
48149
48215
  updated_by: ke?.userId ?? null,
48150
48216
  created_by: ke?.userId ?? null
48151
48217
  };
48152
- t.password || delete t.password, M ? (await Gk(M.user_id, t), q.success("User updated")) : (await Wk(t), q.success("User created")), re(!1), N(null), await Fe();
48218
+ t.password || delete t.password, re ? (await Gk(re.user_id, t), q.success("User updated")) : (await Wk(t), q.success("User created")), ne(!1), N(null), await Fe();
48153
48219
  } catch (e) {
48154
48220
  q.error(e.message || "Unable to save user");
48155
48221
  } finally {
@@ -48170,10 +48236,10 @@ function DF({ onLogout: e }) {
48170
48236
  xe("listView"), ye({
48171
48237
  kind: e,
48172
48238
  record: t
48173
- }), e === "role" && A(t.user_type_id);
48239
+ }), e === "role" && j(t.user_type_id);
48174
48240
  }
48175
48241
  function Qe(e, t) {
48176
- te((n) => {
48242
+ ee((n) => {
48177
48243
  let r = [...new Set(n.map(SF))], i = r.indexOf(e), a = i + t;
48178
48244
  if (i < 0 || a < 0 || a >= r.length) return n;
48179
48245
  [r[i], r[a]] = [r[a], r[i]];
@@ -48198,7 +48264,7 @@ function DF({ onLogout: e }) {
48198
48264
  created_by: t,
48199
48265
  visible_menu_ids: []
48200
48266
  }), i = r.user_type_id;
48201
- q.success(n ? "User type updated" : "User type created. Customize its menus and permissions."), pe(!1), await Pe(), A(i), n || (xe("permissions"), ye({
48267
+ q.success(n ? "User type updated" : "User type created. Customize its menus and permissions."), pe(!1), await Pe(), j(i), n || (xe("permissions"), ye({
48202
48268
  kind: "role",
48203
48269
  record: {
48204
48270
  ...e,
@@ -48605,7 +48671,7 @@ function DF({ onLogout: e }) {
48605
48671
  selectedName: Ie?.user_type_name,
48606
48672
  loading: s,
48607
48673
  saving: l,
48608
- rows: j,
48674
+ rows: M,
48609
48675
  onChange: Ge,
48610
48676
  onMove: Qe,
48611
48677
  onSave: Ke
@@ -48665,9 +48731,9 @@ function DF({ onLogout: e }) {
48665
48731
  }),
48666
48732
  /* @__PURE__ */ Y($i, {
48667
48733
  className: "admin-user-modal",
48668
- title: M ? "Edit User" : "Add User",
48669
- open: ne,
48670
- onCancel: () => re(!1),
48734
+ title: re ? "Edit User" : "Add User",
48735
+ open: te,
48736
+ onCancel: () => ne(!1),
48671
48737
  onOk: () => t.submit(),
48672
48738
  confirmLoading: ie,
48673
48739
  destroyOnHidden: !0,
@@ -48717,11 +48783,11 @@ function DF({ onLogout: e }) {
48717
48783
  /* @__PURE__ */ Y(B.Item, {
48718
48784
  label: "Password",
48719
48785
  name: "password",
48720
- rules: M ? [] : [{
48786
+ rules: re ? [] : [{
48721
48787
  required: !0,
48722
48788
  message: "Password is required"
48723
48789
  }],
48724
- children: /* @__PURE__ */ Y(V.Password, { placeholder: M ? "Leave empty to keep current password" : "Password" })
48790
+ children: /* @__PURE__ */ Y(V.Password, { placeholder: re ? "Leave empty to keep current password" : "Password" })
48725
48791
  }),
48726
48792
  /* @__PURE__ */ X("div", {
48727
48793
  className: "admin-form-row",
@@ -48742,7 +48808,7 @@ function DF({ onLogout: e }) {
48742
48808
  le([]), queueMicrotask(() => {
48743
48809
  let e = Number(t.getFieldValue("user_type_id") ?? 0);
48744
48810
  e && (de(!0), Uk(e).then((e) => {
48745
- le(e.filter((e) => !M || e.user_id !== M.user_id));
48811
+ le(e.filter((e) => !re || e.user_id !== re.user_id));
48746
48812
  }).catch((e) => {
48747
48813
  q.error(e.message || "Unable to load reporting users"), le([]);
48748
48814
  }).finally(() => {
@@ -49237,11 +49303,11 @@ function sI() {
49237
49303
  attachments: s,
49238
49304
  showCc: !1,
49239
49305
  showBcc: !1
49240
- }), [C, w] = L(!y), [T, E] = L(!1), [D, O] = L([]), [k, ee] = L(!1), [A, j] = L(!1), te = Pi(!1), ne = Pi(""), re = Pi(0);
49306
+ }), [C, w] = L(!y), [T, E] = L(!1), [D, O] = L([]), [k, A] = L(!1), [j, M] = L(!1), ee = Pi(!1), te = Pi(""), ne = Pi(0);
49241
49307
  F(() => {
49242
- if (!$F(l) || te.current || MF(x.to).length > 0 || n.length === 0 || ne.current === p) return;
49308
+ if (!$F(l) || ee.current || MF(x.to).length > 0 || n.length === 0 || te.current === p) return;
49243
49309
  let e = !1;
49244
- return ne.current = p, Promise.all(n.map((e) => Rn(l, e).catch(() => null))).then((t) => {
49310
+ return te.current = p, Promise.all(n.map((e) => Rn(l, e).catch(() => null))).then((t) => {
49245
49311
  if (e) return;
49246
49312
  let n = rI(t.map(iI).filter(Boolean), f);
49247
49313
  n.length && S((e) => MF(e.to).length > 0 ? e : {
@@ -49262,7 +49328,7 @@ function sI() {
49262
49328
  w(!0);
49263
49329
  return;
49264
49330
  }
49265
- let e = ++re.current, t = !1;
49331
+ let e = ++ne.current, t = !1;
49266
49332
  async function n() {
49267
49333
  w(!1), E(!0), S((e) => ({
49268
49334
  ...e,
@@ -49273,9 +49339,9 @@ function sI() {
49273
49339
  if (o.trim()) try {
49274
49340
  o = await Eu(o, n.subject || a);
49275
49341
  } catch (n) {
49276
- !t && e === re.current && q.warning(n?.message || "Mail content formatting failed. Showing original content.");
49342
+ !t && e === ne.current && q.warning(n?.message || "Mail content formatting failed. Showing original content.");
49277
49343
  }
49278
- if (t || e !== re.current) return;
49344
+ if (t || e !== ne.current) return;
49279
49345
  S((e) => ({
49280
49346
  ...e,
49281
49347
  subject: n.subject || e.subject,
@@ -49288,16 +49354,16 @@ function sI() {
49288
49354
  showBcc: e.showBcc || !!n.bccMail?.length
49289
49355
  }));
49290
49356
  } catch (n) {
49291
- !t && e === re.current && d && q.error(n?.message || "Could not load mail template for this Job ID");
49357
+ !t && e === ne.current && d && q.error(n?.message || "Could not load mail template for this Job ID");
49292
49358
  } finally {
49293
- !t && e === re.current && (w(!0), E(!1));
49359
+ !t && e === ne.current && (w(!0), E(!1));
49294
49360
  }
49295
49361
  }
49296
49362
  return n(), () => {
49297
49363
  t = !0;
49298
49364
  };
49299
49365
  }, [y, d]);
49300
- function M(e = _) {
49366
+ function re(e = _) {
49301
49367
  let t = String(e ?? "").trim();
49302
49368
  if (!JF.test(t)) {
49303
49369
  b(""), t && q.warning("Enter a valid 24-character Job ID");
@@ -49315,7 +49381,7 @@ function sI() {
49315
49381
  return;
49316
49382
  }
49317
49383
  let n = t?.label ?? "";
49318
- v(String(n || (e ?? ""))), M(e);
49384
+ v(String(n || (e ?? ""))), re(e);
49319
49385
  }
49320
49386
  function ie(e) {
49321
49387
  let t = String(e ?? "").trim();
@@ -49323,15 +49389,15 @@ function sI() {
49323
49389
  O([]);
49324
49390
  return;
49325
49391
  }
49326
- ee(!0), fc(t).then((e) => {
49392
+ A(!0), fc(t).then((e) => {
49327
49393
  let t = (Array.isArray(e) ? e : []).map(nI).filter(Boolean);
49328
49394
  O(t);
49329
- }).catch((e) => q.error(e?.message || "Unable to search jobs")).finally(() => ee(!1));
49395
+ }).catch((e) => q.error(e?.message || "Unable to search jobs")).finally(() => A(!1));
49330
49396
  }
49331
49397
  let ae = C && (!d || JF.test(y)) && MF(x.to).length + MF(x.cc).length + MF(x.bcc).length > 0 && NF(x.to) && NF(x.cc) && NF(x.bcc) && x.subject.trim() && x.contents.trim();
49332
49398
  async function oe() {
49333
- if (!(!ae || A)) {
49334
- j(!0);
49399
+ if (!(!ae || j)) {
49400
+ M(!0);
49335
49401
  try {
49336
49402
  await Du({
49337
49403
  jobId: y,
@@ -49349,12 +49415,12 @@ function sI() {
49349
49415
  } catch (e) {
49350
49416
  q.error(e?.message || "Failed to send mail");
49351
49417
  } finally {
49352
- j(!1);
49418
+ M(!1);
49353
49419
  }
49354
49420
  }
49355
49421
  }
49356
49422
  function se(e) {
49357
- e?.to !== x.to && (te.current = !0), S(e);
49423
+ e?.to !== x.to && (ee.current = !0), S(e);
49358
49424
  }
49359
49425
  return /* @__PURE__ */ Y(Gi, {
49360
49426
  open: !0,
@@ -49371,7 +49437,7 @@ function sI() {
49371
49437
  children: "Cancel"
49372
49438
  }), /* @__PURE__ */ Y(R, {
49373
49439
  type: "primary",
49374
- loading: A,
49440
+ loading: j,
49375
49441
  disabled: !ae,
49376
49442
  onClick: oe,
49377
49443
  children: "Send"
@@ -51218,10 +51284,10 @@ function ZL({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
51218
51284
  let E = _.filter((e) => e.required), D = E.every((e) => {
51219
51285
  let t = d[e.name];
51220
51286
  return !(t == null || t === "" || Array.isArray(t) && t.length === 0 || typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0);
51221
- }), O = (f.removedIds ?? []).length, k = l.length > O, ee = E.some((e) => {
51287
+ }), O = (f.removedIds ?? []).length, k = l.length > O, A = E.some((e) => {
51222
51288
  let t = d[e.name];
51223
51289
  return !(t == null || t === "" || Array.isArray(t) && t.length === 0);
51224
- }), { handleOk: A, confirming: j, deleteError: te, resetSubmitState: ne } = XL({
51290
+ }), { handleOk: j, confirming: M, deleteError: ee, resetSubmitState: te } = XL({
51225
51291
  form: o,
51226
51292
  config: t,
51227
51293
  api: a,
@@ -51230,20 +51296,20 @@ function ZL({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
51230
51296
  dynamicOptions: y,
51231
51297
  extraData: x,
51232
51298
  removedIds: l,
51233
- removalOnlySubmit: !!t?.allowRemovalOnlySubmit && k && !ee,
51299
+ removalOnlySubmit: !!t?.allowRemovalOnlySubmit && k && !A,
51234
51300
  fields: _,
51235
51301
  onClose: T,
51236
51302
  onSubmit: i
51237
51303
  });
51238
51304
  F(() => {
51239
- e && (o.resetFields(), c(v ?? {}), u(f.removedIds ?? []), ne());
51305
+ e && (o.resetFields(), c(v ?? {}), u(f.removedIds ?? []), te());
51240
51306
  }, [e, v]);
51241
- let re = !!t?.autoSubmitWhenNoFields && _.length === 0;
51307
+ let ne = !!t?.autoSubmitWhenNoFields && _.length === 0;
51242
51308
  F(() => {
51243
- !e || !re || A();
51244
- }, [e, re]);
51245
- let M = p.length, N = String(h).replace(/s$/i, ""), ie = M === 1 ? N : h, ae = m[0] ?? {}, oe = t?.getTitleText ? t.getTitleText(M, ie, ae, f) : t?.title, se = M === 1 ? ae.jobTitle ?? ae.title ?? ae.name ?? ae.fullName ?? ae.candidateName ?? null : null, ce = t?.getBodyText ? t.getBodyText(M, N, ie, se, f) : t?.bodyText ?? null, le = typeof t?.getNote == "function" ? t.getNote(f) : t?.note, ue = t?.disabledUntilFilled && !D && !k;
51246
- if (!t || !e || re) return null;
51309
+ !e || !ne || j();
51310
+ }, [e, ne]);
51311
+ let re = p.length, N = String(h).replace(/s$/i, ""), ie = re === 1 ? N : h, ae = m[0] ?? {}, oe = t?.getTitleText ? t.getTitleText(re, ie, ae, f) : t?.title, se = re === 1 ? ae.jobTitle ?? ae.title ?? ae.name ?? ae.fullName ?? ae.candidateName ?? null : null, ce = t?.getBodyText ? t.getBodyText(re, N, ie, se, f) : t?.bodyText ?? null, le = typeof t?.getNote == "function" ? t.getNote(f) : t?.note, ue = t?.disabledUntilFilled && !D && !k;
51312
+ if (!t || !e || ne) return null;
51247
51313
  let de = t.component;
51248
51314
  return de ? /* @__PURE__ */ Y($i, {
51249
51315
  open: e,
@@ -51272,15 +51338,15 @@ function ZL({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
51272
51338
  }),
51273
51339
  okText: t.okText || "OK",
51274
51340
  cancelText: t.cancelText ?? "Cancel",
51275
- onOk: A,
51341
+ onOk: j,
51276
51342
  onCancel: () => T(),
51277
51343
  okButtonProps: {
51278
51344
  danger: t.okButtonDanger,
51279
51345
  disabled: ue,
51280
- loading: j
51346
+ loading: M
51281
51347
  },
51282
- cancelButtonProps: { disabled: j },
51283
- closable: !j,
51348
+ cancelButtonProps: { disabled: M },
51349
+ closable: !M,
51284
51350
  maskClosable: !1,
51285
51351
  width: t.width ?? 480,
51286
51352
  centered: !0,
@@ -51290,10 +51356,10 @@ function ZL({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
51290
51356
  note: le,
51291
51357
  description: t.description,
51292
51358
  showSelectedCount: t.showSelectedCount,
51293
- count: M,
51359
+ count: re,
51294
51360
  itemLabel: ie,
51295
51361
  bodyText: ce,
51296
- deleteError: te
51362
+ deleteError: ee
51297
51363
  }),
51298
51364
  /* @__PURE__ */ Y(qI, { footerNote: t.footerNote }),
51299
51365
  /* @__PURE__ */ Y(AL, {
@@ -52668,7 +52734,7 @@ function $z(e = {}) {
52668
52734
  };
52669
52735
  }
52670
52736
  function eB({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onClose: i }) {
52671
- let a = n?.[0] ?? {}, o = t?.[0] ?? PE(a), [s, c] = L(null), [l, u] = L(!0), [d, f] = L([]), [p, m] = L(!1), [h, g] = L("vms"), [_, v] = L(null), [y, b] = L(null), [x, S] = L(!1), [C, w] = L(!1), [T, E] = L(!1), [D, O] = L(!1), [k, ee] = L({
52737
+ let a = n?.[0] ?? {}, o = t?.[0] ?? PE(a), [s, c] = L(null), [l, u] = L(!0), [d, f] = L([]), [p, m] = L(!1), [h, g] = L("vms"), [_, v] = L(null), [y, b] = L(null), [x, S] = L(!1), [C, w] = L(!1), [T, E] = L(!1), [D, O] = L(!1), [k, A] = L({
52672
52738
  to: "",
52673
52739
  cc: "",
52674
52740
  bcc: "",
@@ -52701,13 +52767,13 @@ function eB({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
52701
52767
  e = !0;
52702
52768
  };
52703
52769
  }, []);
52704
- let A = async () => {
52770
+ let j = async () => {
52705
52771
  if (_) {
52706
52772
  if (h === "mail") {
52707
52773
  m(!1), w(!0), E(!0);
52708
52774
  try {
52709
52775
  let [e, t] = await Promise.all([Nz(o).then($z), Qz(o, s, a).catch((e) => (console.warn("Unable to resolve resume attachment:", e), []))]), n = s?.record?.submission ?? a;
52710
- ee({
52776
+ A({
52711
52777
  to: Vz(e.to, n, _, s, a),
52712
52778
  cc: Vz(e.cc, n, _, s, a),
52713
52779
  bcc: Vz(e.bcc, n, _, s, a),
@@ -52739,8 +52805,8 @@ function eB({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
52739
52805
  S(!1);
52740
52806
  }
52741
52807
  }
52742
- }, j = !T && MF(k.to).length > 0 && NF(k.to) && NF(k.cc) && NF(k.bcc) && k.subject.trim() && k.contents.trim(), te = async () => {
52743
- if (!_ || !j || D) return;
52808
+ }, M = !T && MF(k.to).length > 0 && NF(k.to) && NF(k.cc) && NF(k.bcc) && k.subject.trim() && k.contents.trim(), ee = async () => {
52809
+ if (!_ || !M || D) return;
52744
52810
  O(!0);
52745
52811
  let e = {
52746
52812
  candidateProposedRate: _.proposedRate,
@@ -52774,7 +52840,7 @@ function eB({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
52774
52840
  } finally {
52775
52841
  O(!1);
52776
52842
  }
52777
- }, ne = I(() => ({
52843
+ }, te = I(() => ({
52778
52844
  submissionApprove: async ({ computed: e, referral: t }) => {
52779
52845
  v(e), b(t ?? null), g("vms"), m(!0);
52780
52846
  },
@@ -52811,7 +52877,7 @@ function eB({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
52811
52877
  referralOptions: d,
52812
52878
  onAddReferral: () => e?.navigate?.("/referrals-create"),
52813
52879
  currentUserId: typeof localStorage < "u" ? localStorage.getItem("userId") ?? void 0 : void 0,
52814
- actions: ne,
52880
+ actions: te,
52815
52881
  onClose: () => i?.(),
52816
52882
  variant: "popup"
52817
52883
  }),
@@ -52820,7 +52886,7 @@ function eB({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
52820
52886
  open: p,
52821
52887
  okText: "Approve",
52822
52888
  confirmLoading: x,
52823
- onOk: A,
52889
+ onOk: j,
52824
52890
  onCancel: () => {
52825
52891
  x || (m(!1), v(null), b(null));
52826
52892
  },
@@ -52859,8 +52925,8 @@ function eB({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
52859
52925
  }), /* @__PURE__ */ Y(R, {
52860
52926
  type: "primary",
52861
52927
  loading: D,
52862
- disabled: !j,
52863
- onClick: te,
52928
+ disabled: !M,
52929
+ onClick: ee,
52864
52930
  children: "Send"
52865
52931
  })]
52866
52932
  }),
@@ -52873,7 +52939,7 @@ function eB({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
52873
52939
  children: /* @__PURE__ */ Y(la, { size: "large" })
52874
52940
  }) : /* @__PURE__ */ Y(KF, {
52875
52941
  value: k,
52876
- onChange: ee,
52942
+ onChange: A,
52877
52943
  moduleName: "submissions",
52878
52944
  ready: !T,
52879
52945
  title: "Submit Via Mail",
@@ -53533,11 +53599,11 @@ function RB() {
53533
53599
  contents: "",
53534
53600
  showCc: !1,
53535
53601
  showBcc: !1
53536
- }), [f, p] = L(!l), [m, h] = L(FB.defaultTab), [g, _] = L(""), [v, y] = L([]), [b, x] = L(0), [S, C] = L(0), [w, T] = L(0), [E, D] = L(1), [O, k] = L(FB.defaultPageSize), [ee, A] = L(!1), [j, te] = L([]);
53602
+ }), [f, p] = L(!l), [m, h] = L(FB.defaultTab), [g, _] = L(""), [v, y] = L([]), [b, x] = L(0), [S, C] = L(0), [w, T] = L(0), [E, D] = L(1), [O, k] = L(FB.defaultPageSize), [A, j] = L(!1), [M, ee] = L([]);
53537
53603
  F(() => {
53538
53604
  if (!l) return;
53539
53605
  let e = !1;
53540
- A(!0);
53606
+ j(!0);
53541
53607
  let t = g ? 100 : O, n = g ? 0 : (E - 1) * O;
53542
53608
  return IB.getVendorList({
53543
53609
  jobId: l,
@@ -53551,7 +53617,7 @@ function RB() {
53551
53617
  }).catch(() => {
53552
53618
  e || (y([]), T(0));
53553
53619
  }).finally(() => {
53554
- e || A(!1);
53620
+ e || j(!1);
53555
53621
  }), () => {
53556
53622
  e = !0;
53557
53623
  };
@@ -53570,34 +53636,34 @@ function RB() {
53570
53636
  cc: e.ccMail?.length ? Array.isArray(e.ccMail) ? e.ccMail.join(", ") : String(e.ccMail) : t.cc
53571
53637
  }))).catch(() => {}).finally(() => p(!0));
53572
53638
  }, [l]);
53573
- let ne = I(() => j.map((e) => v.find((t) => t.vendorId === e)?.vendorEmail ?? "").filter(Boolean), [j, v]), re = I(() => ({
53639
+ let te = I(() => M.map((e) => v.find((t) => t.vendorId === e)?.vendorEmail ?? "").filter(Boolean), [M, v]), ne = I(() => ({
53574
53640
  ...u,
53575
- bcc: [.../* @__PURE__ */ new Set([...MF(u.bcc), ...ne])].join(", "),
53576
- showBcc: u.showBcc || ne.length > 0
53577
- }), [u, ne]);
53578
- function M(e) {
53579
- let t = new Set(ne);
53641
+ bcc: [.../* @__PURE__ */ new Set([...MF(u.bcc), ...te])].join(", "),
53642
+ showBcc: u.showBcc || te.length > 0
53643
+ }), [u, te]);
53644
+ function re(e) {
53645
+ let t = new Set(te);
53580
53646
  d({
53581
53647
  ...e,
53582
53648
  bcc: MF(e.bcc).filter((e) => !t.has(e)).join(", ")
53583
53649
  });
53584
53650
  }
53585
- let N = (MF(re.to).length || MF(re.bcc).length) && NF(re.to) && NF(re.cc) && NF(re.bcc) && re.subject.trim(), ie = (e) => e === "myVendor" ? b : S;
53651
+ let N = (MF(ne.to).length || MF(ne.bcc).length) && NF(ne.to) && NF(ne.cc) && NF(ne.bcc) && ne.subject.trim(), ie = (e) => e === "myVendor" ? b : S;
53586
53652
  function ae() {
53587
53653
  e(-1);
53588
53654
  }
53589
53655
  function oe() {
53590
53656
  N && IB.submit({
53591
53657
  jobId: l,
53592
- toMail: MF(re.to),
53593
- ccMail: MF(re.cc),
53594
- bccMail: MF(re.bcc),
53595
- subject: re.subject,
53596
- contents: re.contents
53658
+ toMail: MF(ne.to),
53659
+ ccMail: MF(ne.cc),
53660
+ bccMail: MF(ne.bcc),
53661
+ subject: ne.subject,
53662
+ contents: ne.contents
53597
53663
  }).then((t) => {
53598
53664
  t?.status === !0 ? (q.success(t?.data || "Mail sent successfully."), typeof o == "function" && o({
53599
- ...re,
53600
- message: re.contents,
53665
+ ...ne,
53666
+ message: ne.contents,
53601
53667
  selectedIds: n
53602
53668
  }), e(-1)) : q.error(t?.message || t?.data || "Failed to send mail. Please try again.");
53603
53669
  }).catch((e) => {
@@ -53671,7 +53737,7 @@ function RB() {
53671
53737
  children: FB.vendorTabs.map((e) => /* @__PURE__ */ X("span", {
53672
53738
  className: `vendor-share__vendor-tab${m === e.key ? " vendor-share__vendor-tab--active" : ""}`,
53673
53739
  onClick: () => {
53674
- h(e.key), D(1), te([]);
53740
+ h(e.key), D(1), ee([]);
53675
53741
  },
53676
53742
  children: [
53677
53743
  e.label,
@@ -53688,13 +53754,13 @@ function RB() {
53688
53754
  rowKey: (e) => e.vendorId,
53689
53755
  columns: LB,
53690
53756
  dataSource: se,
53691
- loading: ee,
53757
+ loading: A,
53692
53758
  pagination: !1,
53693
53759
  size: "small",
53694
53760
  rowSelection: {
53695
- selectedRowKeys: j,
53761
+ selectedRowKeys: M,
53696
53762
  onChange: (e) => {
53697
- e.length > FB.maxVendorSelect || te(e);
53763
+ e.length > FB.maxVendorSelect || ee(e);
53698
53764
  }
53699
53765
  },
53700
53766
  scroll: { y: "calc(100vh - 340px)" }
@@ -53714,8 +53780,8 @@ function RB() {
53714
53780
  }), /* @__PURE__ */ Y("div", {
53715
53781
  className: "vendor-share__right",
53716
53782
  children: /* @__PURE__ */ Y(KF, {
53717
- value: re,
53718
- onChange: M,
53783
+ value: ne,
53784
+ onChange: re,
53719
53785
  moduleName: s,
53720
53786
  defaultTemplateId: c.defaultTemplateId ?? t.state?.defaultTemplateId ?? "",
53721
53787
  ready: f,
@@ -53723,10 +53789,10 @@ function RB() {
53723
53789
  title: "Share",
53724
53790
  hint: "Select vendors or add email addresses",
53725
53791
  bccHint: "Vendor emails are added automatically",
53726
- afterBcc: j.length > 0 ? /* @__PURE__ */ X("div", {
53792
+ afterBcc: M.length > 0 ? /* @__PURE__ */ X("div", {
53727
53793
  className: "vendor-share__selected-count",
53728
53794
  children: [
53729
- j.length,
53795
+ M.length,
53730
53796
  " / ",
53731
53797
  FB.maxVendorSelect,
53732
53798
  " Vendors selected"
@@ -55580,7 +55646,7 @@ function RV({ open: e, onClose: t }) {
55580
55646
  q.error("Failed to delete action");
55581
55647
  }
55582
55648
  }
55583
- let ee = [{
55649
+ let A = [{
55584
55650
  key: "modules",
55585
55651
  label: "Modules",
55586
55652
  children: /* @__PURE__ */ X(la, {
@@ -55679,7 +55745,7 @@ function RV({ open: e, onClose: t }) {
55679
55745
  activeKey: n,
55680
55746
  onChange: r,
55681
55747
  size: "small",
55682
- items: ee
55748
+ items: A
55683
55749
  })
55684
55750
  });
55685
55751
  }
@@ -56932,7 +56998,7 @@ function hH() {
56932
56998
  let e = Os(), t = I(() => g(), []), n = Pi(null), r = Pi(null), [i, a] = L([]), [o, s] = L(""), [c, l] = L("idle"), [u, d] = L(!1), [f, p] = L(null), [m, h] = L([]), [_, v] = L("all"), [y, b] = L(null), [x, S] = L(null), [C, w] = L(!1), T = i.map((e) => ({
56933
56999
  value: e.modulename,
56934
57000
  label: e.modulename
56935
- })), E = dH(m), D = c === "encoding" || c === "validating", O = !!o && !D, k = sH[c] ?? 0, ee = m.find((e) => e.row_status === "invalid")?.id, A = Ai(() => {
57001
+ })), E = dH(m), D = c === "encoding" || c === "validating", O = !!o && !D, k = sH[c] ?? 0, A = m.find((e) => e.row_status === "invalid")?.id, j = Ai(() => {
56936
57002
  s(""), l("idle"), d(!1), p(null), h([]), v("all"), b(null), S(null), n.current && (n.current.value = "");
56937
57003
  }, []);
56938
57004
  F(() => {
@@ -56949,9 +57015,9 @@ function hH() {
56949
57015
  }
56950
57016
  e();
56951
57017
  }, [t?.name]);
56952
- let j = (e) => {
57018
+ let M = (e) => {
56953
57019
  s(e ?? ""), h([]), S(null), b(null), p(null), w(!1), l(e ? "module_set" : "idle");
56954
- }, te = async (e) => {
57020
+ }, ee = async (e) => {
56955
57021
  if (!e || !O) return;
56956
57022
  let n = e.name.split(".").pop()?.toLowerCase();
56957
57023
  if (!["xlsx", "csv"].includes(n)) {
@@ -56983,7 +57049,7 @@ function hH() {
56983
57049
  message: e.message || "Could not reach the server."
56984
57050
  }), l("error");
56985
57051
  }
56986
- }, ne = async () => {
57052
+ }, te = async () => {
56987
57053
  try {
56988
57054
  let e = await fetch(iH);
56989
57055
  if (!e.ok) throw Error(`Template file not found (${e.status})`);
@@ -56994,7 +57060,7 @@ function hH() {
56994
57060
  } catch (e) {
56995
57061
  console.error(e), q.error("Unable to download sample template.");
56996
57062
  }
56997
- }, re = async () => {
57063
+ }, ne = async () => {
56998
57064
  l("inserting"), b(null);
56999
57065
  try {
57000
57066
  let n = await ok({
@@ -57010,7 +57076,7 @@ function hH() {
57010
57076
  message: e.message || "Could not reach the server."
57011
57077
  }), l("preview");
57012
57078
  }
57013
- }, M = Ai(() => {
57079
+ }, re = Ai(() => {
57014
57080
  r.current?.scrollIntoView({
57015
57081
  behavior: "smooth",
57016
57082
  block: "center"
@@ -57079,7 +57145,7 @@ function hH() {
57079
57145
  placeholder: "Choose a module",
57080
57146
  options: T,
57081
57147
  value: o || void 0,
57082
- onChange: j
57148
+ onChange: M
57083
57149
  })
57084
57150
  }),
57085
57151
  o && /* @__PURE__ */ X(Bi, {
@@ -57087,7 +57153,7 @@ function hH() {
57087
57153
  title: "2. File upload",
57088
57154
  extra: /* @__PURE__ */ Y(R, {
57089
57155
  icon: /* @__PURE__ */ Y(Za, {}),
57090
- onClick: ne,
57156
+ onClick: te,
57091
57157
  children: "Download Sample Template"
57092
57158
  }),
57093
57159
  children: [
@@ -57108,7 +57174,7 @@ function hH() {
57108
57174
  },
57109
57175
  onDragLeave: () => d(!1),
57110
57176
  onDrop: (e) => {
57111
- e.preventDefault(), d(!1), te(e.dataTransfer.files?.[0]);
57177
+ e.preventDefault(), d(!1), ee(e.dataTransfer.files?.[0]);
57112
57178
  },
57113
57179
  children: [/* @__PURE__ */ Y(Ha, { className: "bulk-upload-icon" }), f ? /* @__PURE__ */ X("span", {
57114
57180
  className: "bulk-file-chip",
@@ -57125,7 +57191,7 @@ function hH() {
57125
57191
  hidden: !0,
57126
57192
  type: "file",
57127
57193
  accept: ".xlsx,.csv",
57128
- onChange: (e) => te(e.target.files?.[0])
57194
+ onChange: (e) => ee(e.target.files?.[0])
57129
57195
  }),
57130
57196
  D && /* @__PURE__ */ Y(ra, {
57131
57197
  percent: c === "encoding" ? 45 : 82,
@@ -57148,7 +57214,7 @@ function hH() {
57148
57214
  errors: E,
57149
57215
  expanded: C,
57150
57216
  onToggle: () => w((e) => !e),
57151
- onSummaryClick: M
57217
+ onSummaryClick: re
57152
57218
  }),
57153
57219
  y && c === "preview" && /* @__PURE__ */ Y(Fi, {
57154
57220
  type: "error",
@@ -57160,10 +57226,10 @@ function hH() {
57160
57226
  rows: m,
57161
57227
  view: _,
57162
57228
  onViewChange: v,
57163
- onConfirm: re,
57164
- onReset: A,
57229
+ onConfirm: ne,
57230
+ onReset: j,
57165
57231
  saving: c === "inserting",
57166
- firstInvalidRowId: ee,
57232
+ firstInvalidRowId: A,
57167
57233
  firstInvalidRowRef: r
57168
57234
  })
57169
57235
  ]
@@ -57202,7 +57268,7 @@ function hH() {
57202
57268
  }),
57203
57269
  /* @__PURE__ */ Y(R, {
57204
57270
  icon: /* @__PURE__ */ Y(Ho, {}),
57205
- onClick: A,
57271
+ onClick: j,
57206
57272
  children: "Upload another file"
57207
57273
  })
57208
57274
  ]
@@ -57411,7 +57477,7 @@ function DH() {
57411
57477
  typeKey: "module"
57412
57478
  }), [m, h] = L(!1), [g, _] = L(!1), [v, y] = L(!1), b = Os(), x = bH[f.typeKey], S = I(() => xH(n), [n]), C = B.useWatch("module", e), w = B.useWatch("flow", e), T = !!SH(C), E = !!SH(w), D = !T, O = !T || !E, k = (e, t = []) => {
57413
57479
  e === "module" && r(t);
57414
- }, ee = async () => {
57480
+ }, A = async () => {
57415
57481
  l(!0);
57416
57482
  try {
57417
57483
  let e = await ek(bH.module.dbName);
@@ -57421,7 +57487,7 @@ function DH() {
57421
57487
  } finally {
57422
57488
  l(!1);
57423
57489
  }
57424
- }, A = Ai(async (t) => {
57490
+ }, j = Ai(async (t) => {
57425
57491
  let n = SH(t);
57426
57492
  if (a([]), s([]), e.setFieldsValue({ step_order: void 0 }), n) {
57427
57493
  d(!0);
@@ -57438,7 +57504,7 @@ function DH() {
57438
57504
  d(!1);
57439
57505
  }
57440
57506
  }
57441
- }, [e]), j = Ai(async (t, n, r) => {
57507
+ }, [e]), M = Ai(async (t, n, r) => {
57442
57508
  let i = SH(t), a = SH(n);
57443
57509
  if (!i || !a) {
57444
57510
  e.setFieldsValue({ step_order: void 0 });
@@ -57454,18 +57520,18 @@ function DH() {
57454
57520
  }
57455
57521
  }, [e]);
57456
57522
  F(() => {
57457
- Promise.resolve().then(ee);
57523
+ Promise.resolve().then(A);
57458
57524
  }, []), F(() => {
57459
- Promise.resolve().then(() => A(C));
57460
- }, [A, C]), F(() => {
57461
- Promise.resolve().then(() => j(C, w, i));
57525
+ Promise.resolve().then(() => j(C));
57526
+ }, [j, C]), F(() => {
57527
+ Promise.resolve().then(() => M(C, w, i));
57462
57528
  }, [
57463
57529
  i,
57464
- j,
57530
+ M,
57465
57531
  w,
57466
57532
  C
57467
57533
  ]);
57468
- let te = async (t) => {
57534
+ let ee = async (t) => {
57469
57535
  let n = {
57470
57536
  module: SH(t.module),
57471
57537
  flow: SH(t.flow),
@@ -57486,9 +57552,9 @@ function DH() {
57486
57552
  } finally {
57487
57553
  y(!1);
57488
57554
  }
57489
- }, ne = (t, n) => {
57555
+ }, te = (t, n) => {
57490
57556
  e.setFieldsValue({ [t]: SH(n) });
57491
- }, re = (t) => {
57557
+ }, ne = (t) => {
57492
57558
  e.setFieldsValue({
57493
57559
  module: SH(t),
57494
57560
  flow: void 0,
@@ -57500,7 +57566,7 @@ function DH() {
57500
57566
  value: void 0,
57501
57567
  expected: void 0
57502
57568
  });
57503
- }, M = (t) => {
57569
+ }, re = (t) => {
57504
57570
  e.setFieldsValue({
57505
57571
  flow: SH(t),
57506
57572
  step_order: void 0
@@ -57571,7 +57637,7 @@ function DH() {
57571
57637
  children: " *"
57572
57638
  })] }),
57573
57639
  initialValues: yH,
57574
- onFinish: te,
57640
+ onFinish: ee,
57575
57641
  autoComplete: "off",
57576
57642
  children: [/* @__PURE__ */ Y(Bi, {
57577
57643
  className: "v1-card",
@@ -57603,7 +57669,7 @@ function DH() {
57603
57669
  optionFilterProp: "label",
57604
57670
  placeholder: "Select module",
57605
57671
  options: S,
57606
- onChange: re
57672
+ onChange: ne
57607
57673
  })
57608
57674
  }), /* @__PURE__ */ Y(R, {
57609
57675
  "aria-label": "Add module",
@@ -57625,7 +57691,7 @@ function DH() {
57625
57691
  disabled: D,
57626
57692
  options: o,
57627
57693
  placeholder: u ? "Loading flows" : "Enter flow",
57628
- onChange: M,
57694
+ onChange: re,
57629
57695
  filterOption: (e, t) => t?.value?.toLowerCase().includes(e.toLowerCase())
57630
57696
  })
57631
57697
  })
@@ -57672,7 +57738,7 @@ function DH() {
57672
57738
  disabled: O,
57673
57739
  placeholder: "Enter description",
57674
57740
  showCount: !0,
57675
- onBlur: (e) => ne("description", e.target.value)
57741
+ onBlur: (e) => te("description", e.target.value)
57676
57742
  })
57677
57743
  })
57678
57744
  }),
@@ -57686,7 +57752,7 @@ function DH() {
57686
57752
  maxLength: 255,
57687
57753
  disabled: O,
57688
57754
  placeholder: "Enter target",
57689
- onBlur: (e) => ne("target", e.target.value)
57755
+ onBlur: (e) => te("target", e.target.value)
57690
57756
  })
57691
57757
  })
57692
57758
  }),
@@ -57701,7 +57767,7 @@ function DH() {
57701
57767
  disabled: O,
57702
57768
  placeholder: "Enter tags",
57703
57769
  prefix: /* @__PURE__ */ Y(os, { className: "v1-input-icon" }),
57704
- onBlur: (e) => ne("tags", e.target.value)
57770
+ onBlur: (e) => te("tags", e.target.value)
57705
57771
  })
57706
57772
  })
57707
57773
  }),
@@ -57715,7 +57781,7 @@ function DH() {
57715
57781
  rows: 4,
57716
57782
  disabled: O,
57717
57783
  placeholder: "Enter value",
57718
- onBlur: (e) => ne("value", e.target.value)
57784
+ onBlur: (e) => te("value", e.target.value)
57719
57785
  })
57720
57786
  })
57721
57787
  }),
@@ -57729,7 +57795,7 @@ function DH() {
57729
57795
  rows: 4,
57730
57796
  disabled: O,
57731
57797
  placeholder: "Enter expected result",
57732
- onBlur: (e) => ne("expected", e.target.value)
57798
+ onBlur: (e) => te("expected", e.target.value)
57733
57799
  })
57734
57800
  })
57735
57801
  })
@@ -57864,7 +57930,7 @@ function FH(e, t) {
57864
57930
  })));
57865
57931
  }
57866
57932
  function IH() {
57867
- let [e] = B.useForm(), t = Os(), [n] = As(), r = n.get("edit"), i = !!r, a = I(() => g(), []), [o, s] = L([]), [c, l] = L([]), [u, d] = L([]), [f, p] = L(gH), [m, h] = L({}), [_, v] = L(!1), [y, b] = L(!1), [x, S] = L(!1), [C, w] = L(!1), [T, E] = L(!1), D = B.useWatch("module", e), O = B.useWatch("submodule", e), k = B.useWatch("actions", e), ee = !!D, A = !!O, j = I(() => PH(m, k), [m, k]), te = I(() => jH(o, "modulename"), [o]), ne = I(() => jH(c, "submodulename"), [c]), re = I(() => o.find((e) => e.id === D)?.modulename ?? "", [o, D]), M = I(() => c.find((e) => e.id === O)?.submodulename ?? "", [O, c]), N = Ai(async () => {
57933
+ let [e] = B.useForm(), t = Os(), [n] = As(), r = n.get("edit"), i = !!r, a = I(() => g(), []), [o, s] = L([]), [c, l] = L([]), [u, d] = L([]), [f, p] = L(gH), [m, h] = L({}), [_, v] = L(!1), [y, b] = L(!1), [x, S] = L(!1), [C, w] = L(!1), [T, E] = L(!1), D = B.useWatch("module", e), O = B.useWatch("submodule", e), k = B.useWatch("actions", e), A = !!D, j = !!O, M = I(() => PH(m, k), [m, k]), ee = I(() => jH(o, "modulename"), [o]), te = I(() => jH(c, "submodulename"), [c]), ne = I(() => o.find((e) => e.id === D)?.modulename ?? "", [o, D]), re = I(() => c.find((e) => e.id === O)?.submodulename ?? "", [O, c]), N = Ai(async () => {
57868
57934
  try {
57869
57935
  let e = await nk();
57870
57936
  Array.isArray(e?.options) && e.options.length > 0 && p(e.options), e?.rules && typeof e.rules == "object" && h(e.rules);
@@ -58093,7 +58159,7 @@ function IH() {
58093
58159
  optionFilterProp: "label",
58094
58160
  loading: _,
58095
58161
  placeholder: "Select module",
58096
- options: te,
58162
+ options: ee,
58097
58163
  onChange: (t) => {
58098
58164
  let n = o.find((e) => e.id === t)?.modulename ?? "";
58099
58165
  e.setFieldsValue({
@@ -58124,10 +58190,10 @@ function IH() {
58124
58190
  allowClear: !0,
58125
58191
  showSearch: !0,
58126
58192
  optionFilterProp: "label",
58127
- disabled: !ee,
58193
+ disabled: !A,
58128
58194
  loading: y,
58129
- placeholder: ee ? "Select submodule" : "Select module first",
58130
- options: ne,
58195
+ placeholder: A ? "Select submodule" : "Select module first",
58196
+ options: te,
58131
58197
  onChange: (t) => {
58132
58198
  e.setFieldsValue({
58133
58199
  submodule: t,
@@ -58153,7 +58219,7 @@ function IH() {
58153
58219
  name: "scenario",
58154
58220
  valuePropName: "checked",
58155
58221
  children: /* @__PURE__ */ Y(W, {
58156
- disabled: !A,
58222
+ disabled: !j,
58157
58223
  checkedChildren: "Positive",
58158
58224
  unCheckedChildren: "Negative"
58159
58225
  })
@@ -58175,7 +58241,7 @@ function IH() {
58175
58241
  ]
58176
58242
  })
58177
58243
  }),
58178
- A && /* @__PURE__ */ X(Bi, {
58244
+ j && /* @__PURE__ */ X(Bi, {
58179
58245
  className: "v1-card zt-fall",
58180
58246
  title: /* @__PURE__ */ X(U, {
58181
58247
  size: 8,
@@ -58192,9 +58258,9 @@ function IH() {
58192
58258
  extra: /* @__PURE__ */ X(OH, {
58193
58259
  type: "secondary",
58194
58260
  children: [
58195
- re,
58261
+ ne,
58196
58262
  " / ",
58197
- M
58263
+ re
58198
58264
  ]
58199
58265
  }),
58200
58266
  children: [/* @__PURE__ */ X(oa, {
@@ -58251,13 +58317,13 @@ function IH() {
58251
58317
  label: "Key",
58252
58318
  name: "key",
58253
58319
  rules: [{
58254
- required: j.key,
58320
+ required: M.key,
58255
58321
  message: "Key is required for this action"
58256
58322
  }],
58257
58323
  children: /* @__PURE__ */ Y(V, {
58258
58324
  maxLength: 255,
58259
- disabled: k && !j.key,
58260
- placeholder: k ? j.key ? "Required — Enter selector / locator" : "Not needed for this action" : "Select an action first"
58325
+ disabled: k && !M.key,
58326
+ placeholder: k ? M.key ? "Required — Enter selector / locator" : "Not needed for this action" : "Select an action first"
58261
58327
  })
58262
58328
  })
58263
58329
  }),
@@ -58268,7 +58334,7 @@ function IH() {
58268
58334
  label: "Value",
58269
58335
  name: "value",
58270
58336
  rules: [{
58271
- required: j.value,
58337
+ required: M.value,
58272
58338
  message: "Value is required for this action"
58273
58339
  }],
58274
58340
  children: /* @__PURE__ */ Y(V.TextArea, {
@@ -58277,8 +58343,8 @@ function IH() {
58277
58343
  minRows: 1,
58278
58344
  maxRows: 4
58279
58345
  },
58280
- disabled: k && !j.value,
58281
- placeholder: k ? j.value ? "Required — Enter value" : "Not needed for this action" : "Select an action first"
58346
+ disabled: k && !M.value,
58347
+ placeholder: k ? M.value ? "Required — Enter value" : "Not needed for this action" : "Select an action first"
58282
58348
  })
58283
58349
  })
58284
58350
  }),
@@ -58289,13 +58355,13 @@ function IH() {
58289
58355
  label: "Expected",
58290
58356
  name: "expected",
58291
58357
  rules: [{
58292
- required: j.expected,
58358
+ required: M.expected,
58293
58359
  message: "Expected result is required for this action"
58294
58360
  }],
58295
58361
  children: /* @__PURE__ */ Y(V.TextArea, {
58296
58362
  rows: 2,
58297
- disabled: k && !j.expected,
58298
- placeholder: k ? j.expected ? "Required — Enter expected result" : "Not needed for this action" : "Select an action first"
58363
+ disabled: k && !M.expected,
58364
+ placeholder: k ? M.expected ? "Required — Enter expected result" : "Not needed for this action" : "Select an action first"
58299
58365
  })
58300
58366
  })
58301
58367
  }),
@@ -58333,7 +58399,7 @@ function IH() {
58333
58399
  })]
58334
58400
  })]
58335
58401
  }, `${D}-${O}`),
58336
- A && /* @__PURE__ */ Y(Bi, {
58402
+ j && /* @__PURE__ */ Y(Bi, {
58337
58403
  className: "v1-card zt-fall",
58338
58404
  title: /* @__PURE__ */ X(U, {
58339
58405
  size: 6,
@@ -59094,9 +59160,9 @@ function oU() {
59094
59160
  let [e] = B.useForm(), [t] = B.useForm(), [n, r] = L([]), [i, a] = L([]), [o, s] = L([]), [c, l] = L(gH), [u, d] = L({}), [f, p] = L(!1), [m, h] = L(!1), [g, _] = L({
59095
59161
  open: !1,
59096
59162
  typeKey: "module"
59097
- }), [v, y] = L(!1), [b, x] = L(!1), [S, C] = L(!1), w = Os(), T = ZH[g.typeKey], E = I(() => tU(n), [n]), D = B.useWatch("module", e), O = B.useWatch("flow", e), k = B.useWatch("keyword", e), ee = !!nU(D), A = !!nU(O), j = !ee, te = !ee || !A, ne = I(() => $H(u, k), [u, k]), re = (e, t = []) => {
59163
+ }), [v, y] = L(!1), [b, x] = L(!1), [S, C] = L(!1), w = Os(), T = ZH[g.typeKey], E = I(() => tU(n), [n]), D = B.useWatch("module", e), O = B.useWatch("flow", e), k = B.useWatch("keyword", e), A = !!nU(D), j = !!nU(O), M = !A, ee = !A || !j, te = I(() => $H(u, k), [u, k]), ne = (e, t = []) => {
59098
59164
  e === "module" && r(t);
59099
- }, M = async () => {
59165
+ }, re = async () => {
59100
59166
  p(!0);
59101
59167
  try {
59102
59168
  let e = await ek(ZH.module.dbName);
@@ -59147,7 +59213,7 @@ function oU() {
59147
59213
  }, [e]);
59148
59214
  F(() => {
59149
59215
  Promise.resolve().then(async () => {
59150
- await Promise.all([M(), N()]);
59216
+ await Promise.all([re(), N()]);
59151
59217
  });
59152
59218
  }, []), F(() => {
59153
59219
  Promise.resolve().then(() => ie(D));
@@ -59245,7 +59311,7 @@ function oU() {
59245
59311
  name: n,
59246
59312
  type: T.dbName
59247
59313
  });
59248
- re(g.typeKey, r?.items ?? []), e.setFieldsValue({ [T.formField]: n }), q.success(`${T.label} added successfully.`), fe();
59314
+ ne(g.typeKey, r?.items ?? []), e.setFieldsValue({ [T.formField]: n }), q.success(`${T.label} added successfully.`), fe();
59249
59315
  } catch (e) {
59250
59316
  if (e?.errorFields) return;
59251
59317
  console.error("Unable to save testing option:", e), q.error(`Unable to add ${T.label.toLowerCase()}.`);
@@ -59342,7 +59408,7 @@ function oU() {
59342
59408
  children: /* @__PURE__ */ Y(Ii, {
59343
59409
  maxLength: 100,
59344
59410
  allowClear: !0,
59345
- disabled: j,
59411
+ disabled: M,
59346
59412
  options: o,
59347
59413
  placeholder: m ? "Loading flows" : "Enter flow",
59348
59414
  onChange: le,
@@ -59373,7 +59439,7 @@ function oU() {
59373
59439
  children: /* @__PURE__ */ Y(H, {
59374
59440
  allowClear: !0,
59375
59441
  showSearch: !0,
59376
- disabled: te,
59442
+ disabled: ee,
59377
59443
  optionFilterProp: "label",
59378
59444
  placeholder: "Select action",
59379
59445
  options: c,
@@ -59389,7 +59455,7 @@ function oU() {
59389
59455
  children: /* @__PURE__ */ Y(V.TextArea, {
59390
59456
  rows: 3,
59391
59457
  maxLength: 255,
59392
- disabled: te,
59458
+ disabled: ee,
59393
59459
  placeholder: "Enter description",
59394
59460
  showCount: !0,
59395
59461
  onBlur: (e) => se("description", e.target.value)
@@ -59403,13 +59469,13 @@ function oU() {
59403
59469
  label: "Key",
59404
59470
  name: "target",
59405
59471
  rules: [{
59406
- required: ne.key,
59472
+ required: te.key,
59407
59473
  message: "Key is required for this action"
59408
59474
  }],
59409
59475
  children: /* @__PURE__ */ Y(V, {
59410
59476
  maxLength: 255,
59411
- disabled: te || !!k && !ne.key,
59412
- placeholder: te ? "Select module and flow first" : k ? ne.key ? "Required — Enter selector / locator" : "Not needed for this action" : "Select an action first",
59477
+ disabled: ee || !!k && !te.key,
59478
+ placeholder: ee ? "Select module and flow first" : k ? te.key ? "Required — Enter selector / locator" : "Not needed for this action" : "Select an action first",
59413
59479
  onBlur: (e) => se("target", e.target.value)
59414
59480
  })
59415
59481
  })
@@ -59422,7 +59488,7 @@ function oU() {
59422
59488
  name: "tags",
59423
59489
  children: /* @__PURE__ */ Y(V, {
59424
59490
  maxLength: 200,
59425
- disabled: te,
59491
+ disabled: ee,
59426
59492
  placeholder: "Enter tags",
59427
59493
  prefix: /* @__PURE__ */ Y(os, { className: "v1-input-icon" }),
59428
59494
  onBlur: (e) => se("tags", e.target.value)
@@ -59436,13 +59502,13 @@ function oU() {
59436
59502
  label: "Value",
59437
59503
  name: "value",
59438
59504
  rules: [{
59439
- required: ne.value,
59505
+ required: te.value,
59440
59506
  message: "Value is required for this action"
59441
59507
  }],
59442
59508
  children: /* @__PURE__ */ Y(V.TextArea, {
59443
59509
  rows: 4,
59444
- disabled: te || !!k && !ne.value,
59445
- placeholder: te ? "Select module and flow first" : k ? ne.value ? "Required — Enter value" : "Not needed for this action" : "Select an action first",
59510
+ disabled: ee || !!k && !te.value,
59511
+ placeholder: ee ? "Select module and flow first" : k ? te.value ? "Required — Enter value" : "Not needed for this action" : "Select an action first",
59446
59512
  onBlur: (e) => se("value", e.target.value)
59447
59513
  })
59448
59514
  })
@@ -59454,13 +59520,13 @@ function oU() {
59454
59520
  label: "Expected",
59455
59521
  name: "expected",
59456
59522
  rules: [{
59457
- required: ne.expected,
59523
+ required: te.expected,
59458
59524
  message: "Expected result is required for this action"
59459
59525
  }],
59460
59526
  children: /* @__PURE__ */ Y(V.TextArea, {
59461
59527
  rows: 4,
59462
- disabled: te || !!k && !ne.expected,
59463
- placeholder: te ? "Select module and flow first" : k ? ne.expected ? "Required — Enter expected result" : "Not needed for this action" : "Select an action first",
59528
+ disabled: ee || !!k && !te.expected,
59529
+ placeholder: ee ? "Select module and flow first" : k ? te.expected ? "Required — Enter expected result" : "Not needed for this action" : "Select an action first",
59464
59530
  onBlur: (e) => se("expected", e.target.value)
59465
59531
  })
59466
59532
  })
@@ -59473,7 +59539,7 @@ function oU() {
59473
59539
  type: "primary",
59474
59540
  htmlType: "submit",
59475
59541
  loading: S,
59476
- disabled: te,
59542
+ disabled: ee,
59477
59543
  children: "Submit"
59478
59544
  }), /* @__PURE__ */ Y(R, {
59479
59545
  onClick: () => {
@@ -59866,9 +59932,9 @@ async function LU(e, t, n, r = 10, i = 0, a = {}) {
59866
59932
  }
59867
59933
  //#endregion
59868
59934
  //#region src/index.js
59869
- typeof window < "u" && (window.__CORE_THEME_BUILD__ = "2026-09-17T13:54:20.428Z");
59935
+ typeof window < "u" && (window.__CORE_THEME_BUILD__ = "2026-09-17T14:52:59.941Z");
59870
59936
  var RU = eV, zU = wk(QV), BU = wk(eH), VU = wk(hH), HU = wk(DH), UU = wk(IH), WU = wk(zH), GU = wk(HH), KU = wk(GH), qU = wk(qH), JU = wk(oU), YU = wk(cU);
59871
59937
  //#endregion
59872
- export { w as ADMIN_API_URL, D as ADMIN_APP_ID, l as APP_ID, E as AUTH_URL, s_ as ActivityNotesCard, n_ as ActivityTab, kB as AddBatchCandidatePopup, zg as AddFormV1, eV as AdminDashboard, DF as AdminDashboardContent, RU as AdminPage, Bg as AppAlert, An as AppButton, qO as AppShell, nE as ApprovalActionBar, c_ as AssigneeAvatars, BO as AuthGuard, Lb as BILLING_STATUS_FLOW, Hw as BOOLEAN_API_KEYS, DC as BOOLEAN_PARSEABLE_API_KEYS, l_ as BULK_UPLOAD_DEFAULT_ACCEPT, u_ as BULK_UPLOAD_DEFAULT_MAX_SIZE_MB, zr as Breadcrumb, VU as BulkUploadPage, v_ as BulkUploadPanel, a as CANDIDATES_URL, EE as CONTRACT_C2C, TE as CONTRACT_W2, Vv as CURRENCY_SYMBOLS, Js as CalendarCard, jF as CoreThemeAdminApp, AF as CoreThemeAdminRoutes, $c as CustomPagination, wT as DEFAULT_HOURS_POLICY, Rw as DEFAULT_RESULTS_VIEW, JT as DayLogModal, j_ as DescriptionBlock, zx as DetailHeaderCard, Kx as DetailViewPage, Iy as DetailViewV1, ge as DocumentViewer, $l as DynamicCards, ZL as DynamicPopup, PB as DynamicPopupRoute, Qs as DynamicTabs, WS as EditFormV1, cw as FIELD_TYPE_REGISTRY, _E as FINANCE_APPROVAL_CONFIG, uE as FINANCE_TYPE_CFO, lE as FINANCE_TYPE_ONBOARDING_MANAGER, pE as FINANCE_TYPE_ONBOARDING_MANAGER_REAPPROVE, dE as FINANCE_TYPE_ONLY_FINANCE, cE as FINANCE_TYPE_SUBMISSION_MANAGER, fE as FINANCE_TYPE_SUBMISSION_MANAGER_REAPPROVE, jD as FileListCard, uD as FinanceApprovalPanel, vx as FinanceAvatar, Sx as FinanceBadge, iE as FinanceDayCell, ux as FinanceDivider, yx as FinanceEmployeeCell, sx as FinanceEmptyState, dx as FinanceEquation, hx as FinanceHistoryTimeline, ox as FinanceHoursGrid, ax as FinanceKpiRow, lx as FinanceLine, CT as FinanceListToolbar, Cx as FinanceMarginBadge, xx as FinanceMoneyCell, Ex as FinanceRecordsTable, wx as FinanceRowChevron, cx as FinanceSection, ix as FinanceStatusPill, bx as FinanceTextCell, oE as FinanceTimesheetAnalysis, fx as FinanceWorkflowSteps, TT as HOURS_MESSAGES, oO as Header, iu as HierarchyUserFilter, t as JOBS_URL, zU as LegacyAdminPage, fh as ListView, YU as LmsHomePage, JU as LmsTestForm, JO as Login, sI as MailPopup, WU as ManageModules, GU as ManageSubmodules, $S as ModuleRowActions, tE as NotesPanel, o_ as NotesTab, kw as OPEN_AS_OPTIONS, Rb as PAYROLL_STATUS_FLOW, bB as POPUP_CONFIGS, oC as ParamCardView, fC as ParamListView, WB as PaymentInvoicePopup, LT as PeriodBadgeTag, RI as PreviewPopup, Ck as ProjectSelect, eE as ProofUploadPreview, ZT as QuickLogBar, YT as QuickLogSelectionBar, Lw as RESULTS_VIEW_OPTIONS, XT as RejectionReasonModal, o as SUBMISSIONS_URL, mT as SearchBuilderV1, IO as Sidebar, gT as StatusBadge, IT as StatusBadgeTag, BU as StickyNotesFullPage, vT as StylishDynamicTabs, bT as TemplateEditor, HU as TestForm, qU as TestingHomePage, Jg as TimelineGroups, GT as TimesheetDayCell, tt as TipTapEditor, $B as UserForm, RB as VendorShareDrawer, ip as ViewSummaryWidget, WI as WizardPopup, KU as ZinnextTableView, UU as ZinnextTestForm, qe as appNow, Fe as applyIntegrationStatus, Ac as approveSubmission, h_ as buildAcceptAttr, qw as buildBooleanRequest, Qb as buildCsv, Kb as buildDailyRows, UT as buildDayGradient, ZE as buildRateHistoryEntries, Yb as buildWeeklyRollup, h as clearSelectedProject, qn as colors, UE as computeFinance, jT as computeHoursPolicy, Xb as computeMarginBand, Vn as conditionMatches, r as configureCoreTheme, tn as configuredFieldLabel, FU as createAllWorkflowsListFetcher, kU as createMergedListFetcher, SU as createModuleListFetchAdapter, AU as createWorkflowStageListFetcher, Hv as currencySymbol, mU as defaultMergeRow, an as deleteIntegrationConfig, Gb as deriveDayStats, NT as describeCapacity, nx as downloadCsv, hr as evaluateShowIfWith, LE as findEmployerRow, FE as flattenGroups, Jv as formatAmount, Ze as formatApp, at as formatAppDateTime, m_ as formatFileSize, QE as formatFinanceMoney, Ob as formatHours, Yv as formatMoney, Ab as formatPercent, Xv as formatRate, Sr as getActivity, IU as getAllWorkflowsModuleList, be as getAppTimeZone, Pb as getApprovalDate, le as getBgcIntegrationConfig, ri as getBgcIntegrationSummary, zb as getBillingActionStates, mw as getBooleanEligibleTypes, u as getCurrentRoleName, ex as getFieldLabel, uw as getFieldType, p_ as getFileExtension, SE as getFinanceApprovalConfig, bD as getFormGroupsRaw, ne as getIntegrationConfig, Jn as getIntegrationConfigs, Je as getIntegrationSummary, Xc as getModuleConfig, Rn as getModuleDataDetail, Bb as getPayrollActionStates, Qc as getPeriodBadgeConfig, Ew as getSearchPopup, g as getSelectedProject, C as getStoredToken, d as getStoredUser, f as getUserRoles, jc as getVMSApprove, tx as getValueStyle, LU as getWorkflowStageModuleList, Vb as getWorkflowSteps, Nb as humanizeEvent, Lh as i, $b as indexFieldConfig, jb as initialsOf, jC as insertTokenAtCursor, dw as isBooleanEligible, kC as isBooleanParsable, y as isTester, m as logout, wE as marginIncludesReferral, HE as matchLocationTax, eS as n, zE as normalizeContract, y_ as r, Wv as rateUnitLabel, Kv as rateUnitShort, Nw as readActionButtons, MT as reconcileHours, lw as registerFieldType, Tw as registerSearchPopup, Nc as rejectSubmission, $g as resolveActivityMeta, WE as resolveAndCompute, kT as resolveDayKind, VE as resolveFinanceInputs, fU as resolveMergeKey, fU as resolveMergedListKey, jw as resolveOpenAs, CE as resolveRejectionReason, Vw as resolveResultsSearchPlaceholder, Bw as resolveResultsView, xD as resolveSubmissionFinance, dr as saveBgcIntegrationConfig, nn as saveIntegrationConfig, s as setSelectedProject, fn as showIfConditions, jU as stageCountKey, YO as t, Dn as testIntegrationConnection, Ue as toApp, qv as toNumber, pt as tzLabel, gi as tzShortLabel, Dw as unregisterSearchPopup, rd as useDropdownFields, ap as useDropdownValues, MD as useEditForm, id as useFieldConfig, ad as useFilterFields, xd as useMenuPermission, KS as useModuleActions, Ux as useRecordRefresh, AC as validateBooleanQuery, g_ as validateBulkFile, n as withAdminAppId, i as withAppId, wk as withAuthGuard };
59938
+ export { w as ADMIN_API_URL, D as ADMIN_APP_ID, l as APP_ID, E as AUTH_URL, s_ as ActivityNotesCard, n_ as ActivityTab, kB as AddBatchCandidatePopup, zg as AddFormV1, eV as AdminDashboard, DF as AdminDashboardContent, RU as AdminPage, Bg as AppAlert, An as AppButton, qO as AppShell, nE as ApprovalActionBar, c_ as AssigneeAvatars, BO as AuthGuard, Lb as BILLING_STATUS_FLOW, Hw as BOOLEAN_API_KEYS, DC as BOOLEAN_PARSEABLE_API_KEYS, l_ as BULK_UPLOAD_DEFAULT_ACCEPT, u_ as BULK_UPLOAD_DEFAULT_MAX_SIZE_MB, zr as Breadcrumb, VU as BulkUploadPage, v_ as BulkUploadPanel, a as CANDIDATES_URL, EE as CONTRACT_C2C, TE as CONTRACT_W2, Vv as CURRENCY_SYMBOLS, Js as CalendarCard, jF as CoreThemeAdminApp, AF as CoreThemeAdminRoutes, $c as CustomPagination, wT as DEFAULT_HOURS_POLICY, Rw as DEFAULT_RESULTS_VIEW, JT as DayLogModal, j_ as DescriptionBlock, zx as DetailHeaderCard, Kx as DetailViewPage, Iy as DetailViewV1, ge as DocumentViewer, $l as DynamicCards, ZL as DynamicPopup, PB as DynamicPopupRoute, Qs as DynamicTabs, WS as EditFormV1, cw as FIELD_TYPE_REGISTRY, _E as FINANCE_APPROVAL_CONFIG, uE as FINANCE_TYPE_CFO, lE as FINANCE_TYPE_ONBOARDING_MANAGER, pE as FINANCE_TYPE_ONBOARDING_MANAGER_REAPPROVE, dE as FINANCE_TYPE_ONLY_FINANCE, cE as FINANCE_TYPE_SUBMISSION_MANAGER, fE as FINANCE_TYPE_SUBMISSION_MANAGER_REAPPROVE, jD as FileListCard, uD as FinanceApprovalPanel, vx as FinanceAvatar, Sx as FinanceBadge, iE as FinanceDayCell, ux as FinanceDivider, yx as FinanceEmployeeCell, sx as FinanceEmptyState, dx as FinanceEquation, hx as FinanceHistoryTimeline, ox as FinanceHoursGrid, ax as FinanceKpiRow, lx as FinanceLine, CT as FinanceListToolbar, Cx as FinanceMarginBadge, xx as FinanceMoneyCell, Ex as FinanceRecordsTable, wx as FinanceRowChevron, cx as FinanceSection, ix as FinanceStatusPill, bx as FinanceTextCell, oE as FinanceTimesheetAnalysis, fx as FinanceWorkflowSteps, TT as HOURS_MESSAGES, oO as Header, iu as HierarchyUserFilter, t as JOBS_URL, zU as LegacyAdminPage, fh as ListView, YU as LmsHomePage, JU as LmsTestForm, JO as Login, sI as MailPopup, WU as ManageModules, GU as ManageSubmodules, $S as ModuleRowActions, tE as NotesPanel, o_ as NotesTab, kw as OPEN_AS_OPTIONS, Rb as PAYROLL_STATUS_FLOW, bB as POPUP_CONFIGS, oC as ParamCardView, fC as ParamListView, WB as PaymentInvoicePopup, LT as PeriodBadgeTag, RI as PreviewPopup, Ck as ProjectSelect, eE as ProofUploadPreview, ZT as QuickLogBar, YT as QuickLogSelectionBar, Lw as RESULTS_VIEW_OPTIONS, XT as RejectionReasonModal, o as SUBMISSIONS_URL, mT as SearchBuilderV1, IO as Sidebar, gT as StatusBadge, IT as StatusBadgeTag, BU as StickyNotesFullPage, vT as StylishDynamicTabs, bT as TemplateEditor, HU as TestForm, qU as TestingHomePage, Jg as TimelineGroups, GT as TimesheetDayCell, tt as TipTapEditor, $B as UserForm, RB as VendorShareDrawer, ip as ViewSummaryWidget, WI as WizardPopup, KU as ZinnextTableView, UU as ZinnextTestForm, qe as appNow, Fe as applyIntegrationStatus, Ac as approveSubmission, h_ as buildAcceptAttr, qw as buildBooleanRequest, Qb as buildCsv, Kb as buildDailyRows, UT as buildDayGradient, ZE as buildRateHistoryEntries, Yb as buildWeeklyRollup, h as clearSelectedProject, qn as colors, UE as computeFinance, jT as computeHoursPolicy, Xb as computeMarginBand, Vn as conditionMatches, r as configureCoreTheme, tn as configuredFieldLabel, FU as createAllWorkflowsListFetcher, kU as createMergedListFetcher, SU as createModuleListFetchAdapter, AU as createWorkflowStageListFetcher, Hv as currencySymbol, mU as defaultMergeRow, an as deleteIntegrationConfig, Gb as deriveDayStats, NT as describeCapacity, nx as downloadCsv, hr as evaluateShowIfWith, LE as findEmployerRow, FE as flattenGroups, Jv as formatAmount, Ze as formatApp, at as formatAppDateTime, m_ as formatFileSize, QE as formatFinanceMoney, Ob as formatHours, Yv as formatMoney, Ab as formatPercent, Xv as formatRate, Sr as getActivity, IU as getAllWorkflowsModuleList, be as getAppTimeZone, Pb as getApprovalDate, le as getBgcIntegrationConfig, ri as getBgcIntegrationSummary, zb as getBillingActionStates, mw as getBooleanEligibleTypes, u as getCurrentRoleName, ex as getFieldLabel, uw as getFieldType, p_ as getFileExtension, SE as getFinanceApprovalConfig, bD as getFormGroupsRaw, te as getIntegrationConfig, Jn as getIntegrationConfigs, Je as getIntegrationSummary, Xc as getModuleConfig, Rn as getModuleDataDetail, Bb as getPayrollActionStates, Qc as getPeriodBadgeConfig, Ew as getSearchPopup, g as getSelectedProject, C as getStoredToken, d as getStoredUser, f as getUserRoles, jc as getVMSApprove, tx as getValueStyle, LU as getWorkflowStageModuleList, Vb as getWorkflowSteps, Nb as humanizeEvent, Lh as i, $b as indexFieldConfig, jb as initialsOf, jC as insertTokenAtCursor, dw as isBooleanEligible, kC as isBooleanParsable, y as isTester, m as logout, wE as marginIncludesReferral, HE as matchLocationTax, eS as n, zE as normalizeContract, y_ as r, Wv as rateUnitLabel, Kv as rateUnitShort, Nw as readActionButtons, MT as reconcileHours, lw as registerFieldType, Tw as registerSearchPopup, Nc as rejectSubmission, $g as resolveActivityMeta, WE as resolveAndCompute, kT as resolveDayKind, VE as resolveFinanceInputs, fU as resolveMergeKey, fU as resolveMergedListKey, jw as resolveOpenAs, CE as resolveRejectionReason, Vw as resolveResultsSearchPlaceholder, Bw as resolveResultsView, xD as resolveSubmissionFinance, dr as saveBgcIntegrationConfig, nn as saveIntegrationConfig, s as setSelectedProject, fn as showIfConditions, jU as stageCountKey, YO as t, Dn as testIntegrationConnection, Ue as toApp, qv as toNumber, pt as tzLabel, gi as tzShortLabel, Dw as unregisterSearchPopup, rd as useDropdownFields, ap as useDropdownValues, MD as useEditForm, id as useFieldConfig, ad as useFilterFields, xd as useMenuPermission, KS as useModuleActions, Ux as useRecordRefresh, AC as validateBooleanQuery, g_ as validateBulkFile, n as withAdminAppId, i as withAppId, wk as withAuthGuard };
59873
59939
 
59874
59940
  //# sourceMappingURL=index.js.map