@declarion/react 0.1.90 → 0.1.91

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
@@ -16225,10 +16225,17 @@ var _u = () => {};
16225
16225
  function vu(e, t) {
16226
16226
  return e.length === t.length ? JSON.stringify(e) === JSON.stringify(t) : !1;
16227
16227
  }
16228
- function yu({ screenCode: e }) {
16229
- return /* @__PURE__ */ Q(_t, { children: /* @__PURE__ */ Q(bu, { screenCode: e }) });
16228
+ function yu(e, t) {
16229
+ if (e) {
16230
+ let n = Ne(fe(e, t));
16231
+ if (n.replace(/^\|+|\|+$/g, "")) return n;
16232
+ }
16233
+ return t.id == null ? crypto.randomUUID() : String(t.id);
16230
16234
  }
16231
16235
  function bu({ screenCode: e }) {
16236
+ return /* @__PURE__ */ Q(_t, { children: /* @__PURE__ */ Q(xu, { screenCode: e }) });
16237
+ }
16238
+ function xu({ screenCode: e }) {
16232
16239
  let { id: t } = zt(), n = Lt(), [i, o] = Vt(), { data: s } = r(), c = re((e) => e.user), l = ut(), u = s?.screens[e], d = u?.entity ? s?.entities[u.entity] : void 0, f = u?.entity, p = Ee(d, "create"), m = Ee(d, "update"), h = Ee(d, "delete"), g = Ee(d, "restore"), _ = (() => {
16233
16240
  if (!d || !d.singleton || !d.prefilter) return;
16234
16241
  let e = he(d);
@@ -16319,7 +16326,7 @@ function bu({ screenCode: e }) {
16319
16326
  return e;
16320
16327
  }, [d, _e]);
16321
16328
  G(() => {
16322
- if (!(!P || !B || !d || !m || Re.size === 0)) {
16329
+ if (!(!P || !B || !d || !m)) {
16323
16330
  if (ee || te(!0), Object.keys(I).length === 0) {
16324
16331
  let e = y ? bc(y) : null;
16325
16332
  e && de(Te({
@@ -16344,6 +16351,20 @@ function bu({ screenCode: e }) {
16344
16351
  t[n] = Fe(d, n) ? i ?? null : i ?? "";
16345
16352
  }), ne(t);
16346
16353
  }
16354
+ if (d.children !== void 0 && d.children.length > 0 && se === void 0) {
16355
+ let e = B.$children;
16356
+ if (e && Object.keys(e).length > 0) {
16357
+ let t = {};
16358
+ for (let [n, r] of Object.entries(e)) {
16359
+ let e = s?.entities[n];
16360
+ t[n] = r.map((t) => ({
16361
+ ...t,
16362
+ _key: yu(e, t)
16363
+ }));
16364
+ }
16365
+ ce(t), z(e);
16366
+ } else ce({}), z({});
16367
+ }
16347
16368
  o((e) => {
16348
16369
  let t = new URLSearchParams(e);
16349
16370
  return t.delete("edit"), t;
@@ -16353,7 +16374,10 @@ function bu({ screenCode: e }) {
16353
16374
  P,
16354
16375
  B,
16355
16376
  Re,
16356
- m
16377
+ m,
16378
+ d,
16379
+ se,
16380
+ s
16357
16381
  ]), G(() => {
16358
16382
  !b || !p || !d?.children || d.children.length === 0 || se === void 0 && (ce({}), z({}));
16359
16383
  }, [
@@ -16586,7 +16610,7 @@ function bu({ screenCode: e }) {
16586
16610
  pendingChildren: ve ? se : void 0,
16587
16611
  onChildrenChange: ve ? Ke : void 0,
16588
16612
  childValidationErrors: ve ? Xe : void 0
16589
- }, rt = u.sidebar && u.sidebar.length > 0, it = /* @__PURE__ */ Q(xu, {
16613
+ }, rt = u.sidebar && u.sidebar.length > 0, it = /* @__PURE__ */ Q(Su, {
16590
16614
  title: tt,
16591
16615
  recordId: y,
16592
16616
  editing: ve,
@@ -16776,7 +16800,7 @@ function bu({ screenCode: e }) {
16776
16800
  ]
16777
16801
  });
16778
16802
  }
16779
- function xu({ title: e, recordId: t, editing: r, isNew: i, isSingletonByCaller: a, isRecordDeleted: o, dirty: s, isSaving: c, hasChildErrors: u, canRestore: d, entity: p, screen: h, globalActions: g, entityCode: _, record: v, id: y, listRoute: b, listRouteExists: S, onBack: C, onCancelEdit: w, onSave: T, onRestore: E, isRestoring: D }) {
16803
+ function Su({ title: e, recordId: t, editing: r, isNew: i, isSingletonByCaller: a, isRecordDeleted: o, dirty: s, isSaving: c, hasChildErrors: u, canRestore: d, entity: p, screen: h, globalActions: g, entityCode: _, record: v, id: y, listRoute: b, listRouteExists: S, onBack: C, onCancelEdit: w, onSave: T, onRestore: E, isRestoring: D }) {
16780
16804
  let { run: O } = Yi(), k = bn(), A = Lt(), j = Ge(), M = h?.action_layout ?? null, N = p?.action_layout ?? null, P = M ?? N, F = Co(P ? jo(P, p?.actions, g, "detail") : Po(p?.actions, "detail"), p?.actions, g, v ?? {}, []), ee = K(() => {
16781
16805
  if (!p) return;
16782
16806
  let e = y ? [y] : [];
@@ -16916,7 +16940,7 @@ function xu({ title: e, recordId: t, editing: r, isNew: i, isSingletonByCaller:
16916
16940
  }
16917
16941
  //#endregion
16918
16942
  //#region src/api/status.ts
16919
- async function Su(e, t, n, r, i) {
16943
+ async function Cu(e, t, n, r, i) {
16920
16944
  let a = {
16921
16945
  status_group_code: n,
16922
16946
  status_code: r
@@ -16933,10 +16957,10 @@ async function Su(e, t, n, r, i) {
16933
16957
  }
16934
16958
  //#endregion
16935
16959
  //#region src/hooks/useObjectStatus.ts
16936
- function Cu(e, t) {
16960
+ function wu(e, t) {
16937
16961
  let n = qt();
16938
16962
  return Gt({
16939
- mutationFn: ({ groupCode: n, statusCode: r, note: i }) => Su(e, t, n, r, i),
16963
+ mutationFn: ({ groupCode: n, statusCode: r, note: i }) => Cu(e, t, n, r, i),
16940
16964
  onSuccess: () => {
16941
16965
  n.invalidateQueries({ queryKey: ["entity-item", e] });
16942
16966
  },
@@ -16947,7 +16971,7 @@ function Cu(e, t) {
16947
16971
  }
16948
16972
  //#endregion
16949
16973
  //#region src/api/properties.ts
16950
- async function wu(e, t, n, r) {
16974
+ async function Tu(e, t, n, r) {
16951
16975
  let i = (await dt(`/api/data/${e}`, {
16952
16976
  method: "PATCH",
16953
16977
  body: JSON.stringify([{
@@ -16960,7 +16984,7 @@ async function wu(e, t, n, r) {
16960
16984
  }))[0]?.$properties ?? [];
16961
16985
  return i.find((e) => e.property_code === n) ?? i[0];
16962
16986
  }
16963
- async function Tu(e, t, n) {
16987
+ async function Eu(e, t, n) {
16964
16988
  await dt(`/api/data/${e}`, {
16965
16989
  method: "PATCH",
16966
16990
  body: JSON.stringify([{
@@ -16974,10 +16998,10 @@ async function Tu(e, t, n) {
16974
16998
  }
16975
16999
  //#endregion
16976
17000
  //#region src/hooks/useProperties.ts
16977
- function Eu(e, t) {
17001
+ function Du(e, t) {
16978
17002
  let n = qt();
16979
17003
  return Gt({
16980
- mutationFn: ({ propertyCode: n, value: r }) => wu(e, t, n, r),
17004
+ mutationFn: ({ propertyCode: n, value: r }) => Tu(e, t, n, r),
16981
17005
  onSuccess: () => {
16982
17006
  n.invalidateQueries({ queryKey: ["entity-item", e] });
16983
17007
  },
@@ -16986,10 +17010,10 @@ function Eu(e, t) {
16986
17010
  }
16987
17011
  });
16988
17012
  }
16989
- function Du(e, t) {
17013
+ function Ou(e, t) {
16990
17014
  let n = qt();
16991
17015
  return Gt({
16992
- mutationFn: (n) => Tu(e, t, n),
17016
+ mutationFn: (n) => Eu(e, t, n),
16993
17017
  onSuccess: () => {
16994
17018
  n.invalidateQueries({ queryKey: ["entity-item", e] });
16995
17019
  },
@@ -17000,7 +17024,7 @@ function Du(e, t) {
17000
17024
  }
17001
17025
  //#endregion
17002
17026
  //#region src/components/pages/SmartRecordListPage.tsx
17003
- function Ou({ screenCode: e }) {
17027
+ function ku({ screenCode: e }) {
17004
17028
  let [t, n] = Vt(), { data: i } = r(), a = i?.screens[e], o = a?.entity ? i?.entities[a.entity] : void 0, s = a?.entity, { openTab: c } = yn();
17005
17029
  G(() => {
17006
17030
  if (a?.route && o) {
@@ -17188,7 +17212,7 @@ function Ou({ screenCode: e }) {
17188
17212
  color: "var(--text-3)"
17189
17213
  },
17190
17214
  children: "No records found"
17191
- }) : g.map((e) => /* @__PURE__ */ Q(ku, {
17215
+ }) : g.map((e) => /* @__PURE__ */ Q(Au, {
17192
17216
  record: e,
17193
17217
  entity: o,
17194
17218
  columns: M,
@@ -17217,7 +17241,7 @@ function Ou({ screenCode: e }) {
17217
17241
  minWidth: 0,
17218
17242
  overflow: "hidden"
17219
17243
  },
17220
- children: l ? /* @__PURE__ */ Q(Au, {
17244
+ children: l ? /* @__PURE__ */ Q(ju, {
17221
17245
  entityCode: s,
17222
17246
  recordId: l,
17223
17247
  items: a.items,
@@ -17244,7 +17268,7 @@ function Ou({ screenCode: e }) {
17244
17268
  ]
17245
17269
  });
17246
17270
  }
17247
- function ku({ record: e, entity: t, columns: n, refs: r, isSelected: i, onClick: a }) {
17271
+ function Au({ record: e, entity: t, columns: n, refs: r, isSelected: i, onClick: a }) {
17248
17272
  let o = Ge(), s = n[0], c = n[1], l = n.slice(2, 4);
17249
17273
  return /* @__PURE__ */ $("button", {
17250
17274
  onClick: a,
@@ -17331,8 +17355,8 @@ function ku({ record: e, entity: t, columns: n, refs: r, isSelected: i, onClick:
17331
17355
  })]
17332
17356
  });
17333
17357
  }
17334
- function Au({ entityCode: e, recordId: t, items: n, schema: r, entity: i }) {
17335
- return /* @__PURE__ */ Q(_t, { children: /* @__PURE__ */ Q(ju, {
17358
+ function ju({ entityCode: e, recordId: t, items: n, schema: r, entity: i }) {
17359
+ return /* @__PURE__ */ Q(_t, { children: /* @__PURE__ */ Q(Mu, {
17336
17360
  entityCode: e,
17337
17361
  recordId: t,
17338
17362
  items: n,
@@ -17340,8 +17364,8 @@ function Au({ entityCode: e, recordId: t, items: n, schema: r, entity: i }) {
17340
17364
  entity: i
17341
17365
  }) });
17342
17366
  }
17343
- function ju({ entityCode: e, recordId: t, items: r, schema: i, entity: a }) {
17344
- let o = Ee(a, "update"), { data: s, isLoading: c } = rl(e, t), l = lo(e), u = ut(), [d, f] = J(!1), [p, h] = J({}), g = s?.data, _ = g?.$statuses, v = g?.$properties, y = Cu(e, t), b = Eu(e, t), S = K(() => {
17367
+ function Mu({ entityCode: e, recordId: t, items: r, schema: i, entity: a }) {
17368
+ let o = Ee(a, "update"), { data: s, isLoading: c } = rl(e, t), l = lo(e), u = ut(), [d, f] = J(!1), [p, h] = J({}), g = s?.data, _ = g?.$statuses, v = g?.$properties, y = wu(e, t), b = Du(e, t), S = K(() => {
17345
17369
  let e = /* @__PURE__ */ new Set();
17346
17370
  for (let [t, n] of a.fields) !n.auto && !n.primary && e.add(t);
17347
17371
  for (let [t] of a.files ?? []) e.add(t);
@@ -17505,7 +17529,7 @@ function ju({ entityCode: e, recordId: t, items: r, schema: i, entity: a }) {
17505
17529
  }
17506
17530
  //#endregion
17507
17531
  //#region src/components/shared/ErrorBoundary.tsx
17508
- var Mu = class extends xt {
17532
+ var Nu = class extends xt {
17509
17533
  constructor(e) {
17510
17534
  super(e), this.state = {
17511
17535
  hasError: !1,
@@ -17573,7 +17597,7 @@ var Mu = class extends xt {
17573
17597
  };
17574
17598
  //#endregion
17575
17599
  //#region src/hooks/useVersionWatcher.ts
17576
- function Nu() {
17600
+ function Pu() {
17577
17601
  let e = qt();
17578
17602
  G(() => {
17579
17603
  let t = !1, n = null, r = 6e4, i = r, a = 0, o = 0;
@@ -17629,39 +17653,39 @@ function Nu() {
17629
17653
  }
17630
17654
  //#endregion
17631
17655
  //#region src/lib/capabilityPrefetch.ts
17632
- var Pu = [
17656
+ var Fu = [
17633
17657
  () => import("./MarkdownRenderer-Dl3GDuY9.js"),
17634
17658
  () => import("./JsonEditor-CexL5HXN.js"),
17635
17659
  () => import("./Grid-BJAiAeHo.js"),
17636
17660
  () => import("./DraggableChildrenTable-BNjHMCeC.js")
17637
17661
  ];
17638
- function Fu() {
17639
- for (let e of Pu) e().catch(() => {});
17662
+ function Iu() {
17663
+ for (let e of Fu) e().catch(() => {});
17640
17664
  }
17641
- var Iu = !1;
17642
- function Lu() {
17643
- if (Iu) return;
17644
- Iu = !0;
17665
+ var Lu = !1;
17666
+ function Ru() {
17667
+ if (Lu) return;
17668
+ Lu = !0;
17645
17669
  let e = globalThis.requestIdleCallback;
17646
- typeof e == "function" ? e(Fu) : setTimeout(Fu, 0);
17670
+ typeof e == "function" ? e(Iu) : setTimeout(Iu, 0);
17647
17671
  }
17648
17672
  //#endregion
17649
17673
  //#region src/stores/screen-registry.ts
17650
- var Ru = /* @__PURE__ */ new Map();
17651
- function zu(e, t) {
17652
- Ru.set(e, t);
17674
+ var zu = /* @__PURE__ */ new Map();
17675
+ function Bu(e, t) {
17676
+ zu.set(e, t);
17653
17677
  }
17654
- function Bu(e) {
17655
- return Ru.get(e);
17678
+ function Vu(e) {
17679
+ return zu.get(e);
17656
17680
  }
17657
17681
  //#endregion
17658
17682
  //#region src/app.tsx
17659
- zu("Profile", bs);
17660
- var Vu = "declarion-managed-favicon", Hu = new Ht({ defaultOptions: { queries: {
17683
+ Bu("Profile", bs);
17684
+ var Hu = "declarion-managed-favicon", Uu = new Ht({ defaultOptions: { queries: {
17661
17685
  staleTime: 300 * 1e3,
17662
17686
  retry: 1
17663
17687
  } } });
17664
- function Uu(e) {
17688
+ function Wu(e) {
17665
17689
  if (typeof window > "u") return null;
17666
17690
  try {
17667
17691
  let t = new URL(e, window.location.origin);
@@ -17670,7 +17694,7 @@ function Uu(e) {
17670
17694
  return null;
17671
17695
  }
17672
17696
  }
17673
- function Wu() {
17697
+ function Gu() {
17674
17698
  let { data: e } = r();
17675
17699
  return {
17676
17700
  routes: K(() => {
@@ -17682,29 +17706,29 @@ function Wu() {
17682
17706
  if ((i ? e.entities?.[i] : void 0)?.singleton) continue;
17683
17707
  t.push(/* @__PURE__ */ Q(Y, {
17684
17708
  path: r.route,
17685
- element: /* @__PURE__ */ Q(Mu, { children: /* @__PURE__ */ Q(tl, { screenCode: n }) })
17709
+ element: /* @__PURE__ */ Q(Nu, { children: /* @__PURE__ */ Q(tl, { screenCode: n }) })
17686
17710
  }, n));
17687
17711
  continue;
17688
17712
  }
17689
17713
  if (r.type === "detail") {
17690
17714
  t.push(/* @__PURE__ */ Q(Y, {
17691
17715
  path: r.route,
17692
- element: /* @__PURE__ */ Q(Mu, { children: /* @__PURE__ */ Q(yu, { screenCode: n }) })
17716
+ element: /* @__PURE__ */ Q(Nu, { children: /* @__PURE__ */ Q(bu, { screenCode: n }) })
17693
17717
  }, n));
17694
17718
  continue;
17695
17719
  }
17696
17720
  if (r.type === "record_list") {
17697
17721
  t.push(/* @__PURE__ */ Q(Y, {
17698
17722
  path: r.route,
17699
- element: /* @__PURE__ */ Q(Mu, { children: /* @__PURE__ */ Q(Ou, { screenCode: n }) })
17723
+ element: /* @__PURE__ */ Q(Nu, { children: /* @__PURE__ */ Q(ku, { screenCode: n }) })
17700
17724
  }, n));
17701
17725
  continue;
17702
17726
  }
17703
17727
  if (r.type === "custom") {
17704
- let e = r.component ? Bu(r.component) : void 0;
17728
+ let e = r.component ? Vu(r.component) : void 0;
17705
17729
  e && t.push(/* @__PURE__ */ Q(Y, {
17706
17730
  path: r.route,
17707
- element: /* @__PURE__ */ Q(Mu, { children: /* @__PURE__ */ Q(e, {}) })
17731
+ element: /* @__PURE__ */ Q(Nu, { children: /* @__PURE__ */ Q(e, {}) })
17708
17732
  }, n));
17709
17733
  }
17710
17734
  }
@@ -17713,12 +17737,12 @@ function Wu() {
17713
17737
  defaultRoute: K(() => Ea(e), [e])
17714
17738
  };
17715
17739
  }
17716
- function Gu() {
17717
- let e = re((e) => e.initialize), t = re((e) => e.isLoading), { data: n, isLoading: i } = r(), { data: a, isLoading: o } = qn(), { routes: s, defaultRoute: c } = Wu();
17740
+ function Ku() {
17741
+ let e = re((e) => e.initialize), t = re((e) => e.isLoading), { data: n, isLoading: i } = r(), { data: a, isLoading: o } = qn(), { routes: s, defaultRoute: c } = Gu();
17718
17742
  G(() => {
17719
17743
  e();
17720
17744
  }, [e]), G(() => {
17721
- Lu();
17745
+ Ru();
17722
17746
  }, []);
17723
17747
  let l = a?.branding;
17724
17748
  G(() => {
@@ -17727,7 +17751,7 @@ function Gu() {
17727
17751
  e && (document.title = e);
17728
17752
  }, [l?.app_name]), G(() => {
17729
17753
  if (typeof document > "u") return;
17730
- let e = l?.app_logo, t = tn(e) ? Uu(e.trim()) : null, n = document.getElementById(Vu);
17754
+ let e = l?.app_logo, t = tn(e) ? Wu(e.trim()) : null, n = document.getElementById(Hu);
17731
17755
  if (!t) {
17732
17756
  n && n.remove();
17733
17757
  return;
@@ -17735,7 +17759,7 @@ function Gu() {
17735
17759
  if (!n) {
17736
17760
  document.querySelectorAll("link[rel=\"icon\"], link[rel=\"shortcut icon\"]").forEach((e) => e.remove());
17737
17761
  let e = document.createElement("link");
17738
- e.id = Vu, e.rel = "icon", e.href = t, document.head.appendChild(e);
17762
+ e.id = Hu, e.rel = "icon", e.href = t, document.head.appendChild(e);
17739
17763
  return;
17740
17764
  }
17741
17765
  n.href !== t && (n.href = t);
@@ -17748,7 +17772,7 @@ function Gu() {
17748
17772
  t && t.remove();
17749
17773
  return;
17750
17774
  }
17751
- let n = Uu(u);
17775
+ let n = Wu(u);
17752
17776
  if (!n) {
17753
17777
  t && t.remove(), console.error(`[declarion] branding.css_url rejected: ${u}. Only same-origin, relative URLs are allowed (e.g. /crm-brand.css).`);
17754
17778
  return;
@@ -17821,33 +17845,33 @@ function Gu() {
17821
17845
  })
17822
17846
  ] });
17823
17847
  }
17824
- function Ku() {
17825
- return Nu(), /* @__PURE__ */ $(kt, { children: [/* @__PURE__ */ Q(Gu, {}), /* @__PURE__ */ Q(Jt, {
17848
+ function qu() {
17849
+ return Pu(), /* @__PURE__ */ $(kt, { children: [/* @__PURE__ */ Q(Ku, {}), /* @__PURE__ */ Q(Jt, {
17826
17850
  richColors: !0,
17827
17851
  position: "top-right",
17828
17852
  closeButton: !0,
17829
17853
  visibleToasts: 5
17830
17854
  })] });
17831
17855
  }
17832
- function qu() {
17833
- return /* @__PURE__ */ Q(Mu, { children: /* @__PURE__ */ Q(Ut, {
17834
- client: Hu,
17835
- children: /* @__PURE__ */ Q(Ku, {})
17856
+ function Ju() {
17857
+ return /* @__PURE__ */ Q(Nu, { children: /* @__PURE__ */ Q(Ut, {
17858
+ client: Uu,
17859
+ children: /* @__PURE__ */ Q(qu, {})
17836
17860
  }) });
17837
17861
  }
17838
17862
  //#endregion
17839
17863
  //#region src/api/entities.ts
17840
- function Ju(e, t) {
17864
+ function Yu(e, t) {
17841
17865
  return e.$statuses?.find((e) => e.group_code === t);
17842
17866
  }
17843
- function Yu(e, t) {
17867
+ function Xu(e, t) {
17844
17868
  return e.$properties?.find((e) => e.property_code === t);
17845
17869
  }
17846
- function Xu(e) {
17870
+ function Zu(e) {
17847
17871
  let t = { ...e };
17848
- return t.$status = (e) => Ju(t, e), t.$property = (e) => Yu(t, e), t;
17872
+ return t.$status = (e) => Yu(t, e), t.$property = (e) => Xu(t, e), t;
17849
17873
  }
17850
- var Zu = class {
17874
+ var Qu = class {
17851
17875
  cache = {};
17852
17876
  merge(e) {
17853
17877
  if (e) for (let t of Object.keys(e)) {
@@ -17869,24 +17893,24 @@ var Zu = class {
17869
17893
  this.cache = {};
17870
17894
  }
17871
17895
  };
17872
- function Qu(e, t) {
17896
+ function $u(e, t) {
17873
17897
  let n = new URL(`/api/data/${e}`, window.location.origin);
17874
17898
  return t.select && t.select.length > 0 && n.searchParams.set("select", t.select.join(",")), t.expand && t.expand.length > 0 && n.searchParams.set("expand", t.expand.join(",")), t.sort && n.searchParams.set("sort", t.sort), t.search && n.searchParams.set("search", t.search), t.limit && n.searchParams.set("limit", String(t.limit)), t.after && n.searchParams.set("after", t.after), t.include_deleted && n.searchParams.set("include_deleted", "true"), t.filters && t.filters.length > 0 && n.searchParams.set("filters", JSON.stringify(t.filters)), n.pathname + n.search;
17875
17899
  }
17876
- var $u = class {
17900
+ var ed = class {
17877
17901
  entity;
17878
17902
  refs;
17879
17903
  constructor(e, t) {
17880
- this.entity = e, this.refs = t ?? new Zu();
17904
+ this.entity = e, this.refs = t ?? new Qu();
17881
17905
  }
17882
17906
  async get(e) {
17883
17907
  let t = new URLSearchParams({ id: e });
17884
- return Xu((await dt(`/api/data/${this.entity}?${t.toString()}`)).data);
17908
+ return Zu((await dt(`/api/data/${this.entity}?${t.toString()}`)).data);
17885
17909
  }
17886
17910
  async list(e = {}) {
17887
- let t = await dt(Qu(this.entity, e));
17911
+ let t = await dt($u(this.entity, e));
17888
17912
  return this.refs.merge(t.$refs), {
17889
- data: t.data.map((e) => Xu(e)),
17913
+ data: t.data.map((e) => Zu(e)),
17890
17914
  meta: t.meta,
17891
17915
  $refs: this.refs.all()
17892
17916
  };
@@ -17898,7 +17922,7 @@ var $u = class {
17898
17922
  return (await dt(`/api/data/${this.entity}`, {
17899
17923
  method: "POST",
17900
17924
  body: JSON.stringify(e)
17901
- })).map((e) => Xu(e));
17925
+ })).map((e) => Zu(e));
17902
17926
  }
17903
17927
  async update(e, t) {
17904
17928
  return (await this.updateMany([{
@@ -17910,7 +17934,7 @@ var $u = class {
17910
17934
  return (await dt(`/api/data/${this.entity}`, {
17911
17935
  method: "PATCH",
17912
17936
  body: JSON.stringify(e)
17913
- })).map((e) => Xu(e));
17937
+ })).map((e) => Zu(e));
17914
17938
  }
17915
17939
  async delete(e) {
17916
17940
  await this.deleteMany([e]);
@@ -17935,20 +17959,20 @@ var $u = class {
17935
17959
  return (await dt(`/api/data/${this.entity}?unique_fields=${n}`, {
17936
17960
  method: "POST",
17937
17961
  body: JSON.stringify(e)
17938
- })).map((e) => Xu(e));
17962
+ })).map((e) => Zu(e));
17939
17963
  }
17940
17964
  };
17941
- function ed(e, t) {
17942
- return new $u(e, t);
17965
+ function td(e, t) {
17966
+ return new ed(e, t);
17943
17967
  }
17944
17968
  //#endregion
17945
17969
  //#region src/api/batch.ts
17946
- var td = class {
17970
+ var nd = class {
17947
17971
  ops = [];
17948
17972
  call(e, t) {
17949
17973
  return this.ops.push({
17950
17974
  action: e,
17951
- params: nd(t)
17975
+ params: rd(t)
17952
17976
  }), this;
17953
17977
  }
17954
17978
  upsert(e, t, n = "upsert", r = []) {
@@ -17970,13 +17994,13 @@ var td = class {
17970
17994
  return this.ops;
17971
17995
  }
17972
17996
  };
17973
- function nd(e) {
17997
+ function rd(e) {
17974
17998
  return e == null ? null : typeof e == "object" && !Array.isArray(e) ? e : { value: e };
17975
17999
  }
17976
18000
  //#endregion
17977
18001
  //#region src/hooks/useAllEntityData.ts
17978
- var rd = 1e3, id = 20;
17979
- function ad(e, t = {}) {
18002
+ var id = 1e3, ad = 20;
18003
+ function od(e, t = {}) {
17980
18004
  return Kt({
17981
18005
  queryKey: [
17982
18006
  "entity-data-all",
@@ -17987,18 +18011,18 @@ function ad(e, t = {}) {
17987
18011
  queryFn: async ({ signal: n }) => {
17988
18012
  let r = {
17989
18013
  ...t,
17990
- per_page: rd,
18014
+ per_page: id,
17991
18015
  count: "with"
17992
18016
  }, i = await w(e, {
17993
18017
  ...r,
17994
18018
  page: 1
17995
18019
  }, { signal: n }), a = i.meta.total_pages ?? 1;
17996
18020
  if (a <= 1) return i;
17997
- if (a > id) throw Error(`useAllEntityData: entity "${e}" spans ${a} pages (limit ${id}); it is not a bounded entity. Use useEntityData with server-side pagination instead.`);
18021
+ if (a > ad) throw Error(`useAllEntityData: entity "${e}" spans ${a} pages (limit ${ad}); it is not a bounded entity. Use useEntityData with server-side pagination instead.`);
17998
18022
  let o = await Promise.all(Array.from({ length: a - 1 }, (t, i) => w(e, {
17999
18023
  ...r,
18000
18024
  page: i + 2
18001
- }, { signal: n }))), s = new Zu();
18025
+ }, { signal: n }))), s = new Qu();
18002
18026
  s.merge(i.$refs);
18003
18027
  let c = [...i.data];
18004
18028
  for (let e of o) c.push(...e.data), s.merge(e.$refs);
@@ -18017,7 +18041,7 @@ function ad(e, t = {}) {
18017
18041
  }
18018
18042
  //#endregion
18019
18043
  //#region src/hooks/useColumns.ts
18020
- function od(e, t) {
18044
+ function sd(e, t) {
18021
18045
  let [n, r] = Vt(), i = K(() => {
18022
18046
  let r = n.get("columns");
18023
18047
  return r ? r.split(",").filter(Boolean).filter((t) => e.includes(t)) : t.length > 0 ? t : e;
@@ -18027,7 +18051,7 @@ function od(e, t) {
18027
18051
  t
18028
18052
  ]), a = W((e) => {
18029
18053
  let i = new URLSearchParams(n);
18030
- e.length === 0 || sd(e, t) ? i.delete("columns") : i.set("columns", e.join(",")), r(i);
18054
+ e.length === 0 || cd(e, t) ? i.delete("columns") : i.set("columns", e.join(",")), r(i);
18031
18055
  }, [
18032
18056
  n,
18033
18057
  r,
@@ -18053,12 +18077,12 @@ function od(e, t) {
18053
18077
  }, [i, a])
18054
18078
  };
18055
18079
  }
18056
- function sd(e, t) {
18080
+ function cd(e, t) {
18057
18081
  return e.length === t.length ? e.every((e, n) => e === t[n]) : !1;
18058
18082
  }
18059
18083
  //#endregion
18060
18084
  //#region src/components/shared/PageHeader.tsx
18061
- function cd({ title: e, backTo: t, actions: n }) {
18085
+ function ld({ title: e, backTo: t, actions: n }) {
18062
18086
  let r = Lt(), { switchTab: i, findTabByPathname: a } = yn();
18063
18087
  function o() {
18064
18088
  if (!t) return;
@@ -18109,7 +18133,7 @@ function cd({ title: e, backTo: t, actions: n }) {
18109
18133
  }
18110
18134
  //#endregion
18111
18135
  //#region src/components/list/BulkBar.tsx
18112
- function ld({ count: e, actions: t, onClear: n, onDelete: r, onExport: i }) {
18136
+ function ud({ count: e, actions: t, onClear: n, onDelete: r, onExport: i }) {
18113
18137
  let [a, o] = J(!1), s = q(null), c = t.filter((e) => e.primary), l = t.filter((e) => !e.primary);
18114
18138
  return /* @__PURE__ */ $("div", {
18115
18139
  style: {
@@ -18175,7 +18199,7 @@ function ld({ count: e, actions: t, onClear: n, onDelete: r, onExport: i }) {
18175
18199
  background: "var(--inverted-overlay)",
18176
18200
  margin: "0 4px"
18177
18201
  } }),
18178
- c.map((e) => /* @__PURE__ */ Q(ud, {
18202
+ c.map((e) => /* @__PURE__ */ Q(dd, {
18179
18203
  icon: e.icon,
18180
18204
  label: e.label,
18181
18205
  onClick: e.onRun
@@ -18239,7 +18263,7 @@ function ld({ count: e, actions: t, onClear: n, onDelete: r, onExport: i }) {
18239
18263
  ]
18240
18264
  });
18241
18265
  }
18242
- function ud({ icon: e, label: t, onClick: n }) {
18266
+ function dd({ icon: e, label: t, onClick: n }) {
18243
18267
  return /* @__PURE__ */ $("button", {
18244
18268
  onClick: n,
18245
18269
  style: {
@@ -18263,7 +18287,7 @@ function ud({ icon: e, label: t, onClick: n }) {
18263
18287
  }
18264
18288
  //#endregion
18265
18289
  //#region src/components/list/RowMenu.tsx
18266
- function dd({ x: e, y: t, onClose: n, onPeek: r, onOpen: i, onEditInline: a, onDuplicate: o, onCopyLink: s, onDelete: c, actions: l }) {
18290
+ function fd({ x: e, y: t, onClose: n, onPeek: r, onOpen: i, onEditInline: a, onDuplicate: o, onCopyLink: s, onDelete: c, actions: l }) {
18267
18291
  let u = (e) => () => {
18268
18292
  n(), e && e();
18269
18293
  }, d = r || i || a || o || s, f = l && l.length > 0;
@@ -18341,23 +18365,23 @@ function dd({ x: e, y: t, onClose: n, onPeek: r, onOpen: i, onEditInline: a, onD
18341
18365
  }
18342
18366
  //#endregion
18343
18367
  //#region src/components/list/resolveActions.ts
18344
- var fd = "list_toolbar", pd = "list_floatbar";
18345
- function md(e) {
18368
+ var pd = "list_toolbar", md = "list_floatbar";
18369
+ function hd(e) {
18346
18370
  return !1;
18347
18371
  }
18348
- function hd(e) {
18372
+ function gd(e) {
18349
18373
  let { actions: t, screen: n, selectionCount: r } = e, i = e.hasPermission ?? (() => !0), a = e.maxPrimary ?? 2, o = [];
18350
18374
  for (let [e, n] of Object.entries(t)) (n.visibility ?? []).includes("list_toolbar") && i(e) && o.push({
18351
18375
  code: e,
18352
18376
  action: n
18353
18377
  });
18354
- let s = new Map(o.map((e) => [e.code, e])), c = o.filter((e) => !md(e.action)), l, u = n?.primary_actions;
18378
+ let s = new Map(o.map((e) => [e.code, e])), c = o.filter((e) => !hd(e.action)), l, u = n?.primary_actions;
18355
18379
  if (u && u.length > 0) {
18356
18380
  let e = new Set(c.map((e) => e.code));
18357
18381
  l = u.filter((t) => s.has(t) && e.has(t)).slice(0, a).map((e) => s.get(e));
18358
18382
  } else l = c.filter((e) => (e.action.position ?? 0) <= 10).slice(0, a);
18359
18383
  let d = [], f = [];
18360
- for (let e of o) md(e.action) ? f.push(e) : d.push(e);
18384
+ for (let e of o) hd(e.action) ? f.push(e) : d.push(e);
18361
18385
  return {
18362
18386
  primary: l,
18363
18387
  global: d,
@@ -18365,7 +18389,7 @@ function hd(e) {
18365
18389
  selectionCount: r
18366
18390
  };
18367
18391
  }
18368
- function gd(e) {
18392
+ function _d(e) {
18369
18393
  let { actions: t, screen: n } = e, r = e.hasPermission ?? (() => !0), i = e.maxPrimary ?? 2, a = [];
18370
18394
  for (let [e, n] of Object.entries(t)) (n.visibility ?? []).includes("list_floatbar") && r(e) && a.push({
18371
18395
  code: e,
@@ -18379,7 +18403,7 @@ function gd(e) {
18379
18403
  }
18380
18404
  //#endregion
18381
18405
  //#region src/components/list/ListPage.tsx
18382
- function _d(e, t = 12) {
18406
+ function vd(e, t = 12) {
18383
18407
  let n = e.display?.icon;
18384
18408
  if (!n) return null;
18385
18409
  let r = x[n];
@@ -18388,8 +18412,8 @@ function _d(e, t = 12) {
18388
18412
  size: t
18389
18413
  });
18390
18414
  }
18391
- function vd({ title: e, singular: t, total: n, shown: r, selectionCount: i, clearSelection: a, onNewRecord: o, screen: s, actions: c, hasPermission: l, executeAction: u, children: d, onBulkDelete: f, onBulkExport: p, onToolbarExport: h, onManageActions: g }) {
18392
- let _ = q(null), [v, y] = J(!1), { run: b } = Yi(), S = K(() => hd({
18415
+ function yd({ title: e, singular: t, total: n, shown: r, selectionCount: i, clearSelection: a, onNewRecord: o, screen: s, actions: c, hasPermission: l, executeAction: u, children: d, onBulkDelete: f, onBulkExport: p, onToolbarExport: h, onManageActions: g }) {
18416
+ let _ = q(null), [v, y] = J(!1), { run: b } = Yi(), S = K(() => gd({
18393
18417
  actions: c,
18394
18418
  screen: s,
18395
18419
  selectionCount: i,
@@ -18399,7 +18423,7 @@ function vd({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
18399
18423
  s,
18400
18424
  i,
18401
18425
  l
18402
- ]), C = K(() => gd({
18426
+ ]), C = K(() => _d({
18403
18427
  actions: c,
18404
18428
  screen: s,
18405
18429
  selectionCount: i,
@@ -18420,7 +18444,7 @@ function vd({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
18420
18444
  }, E = K(() => C.entries.map(({ code: e, action: t }) => ({
18421
18445
  id: e,
18422
18446
  label: H(t.display?.name) || e,
18423
- icon: _d(t),
18447
+ icon: vd(t),
18424
18448
  primary: C.primaryCodes.has(e),
18425
18449
  destructive: t.destructive,
18426
18450
  onRun: () => w({
@@ -18477,7 +18501,7 @@ function vd({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
18477
18501
  }),
18478
18502
  S.primary.map((e) => /* @__PURE__ */ Q(m, {
18479
18503
  kind: "default",
18480
- icon: _d(e.action, 13),
18504
+ icon: vd(e.action, 13),
18481
18505
  onClick: () => w(e, !1),
18482
18506
  children: H(e.action.display?.name) || e.code
18483
18507
  }, e.code)),
@@ -18500,9 +18524,9 @@ function vd({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
18500
18524
  width: 240,
18501
18525
  align: "end",
18502
18526
  children: [
18503
- S.global.length > 0 && /* @__PURE__ */ Q(yd, { children: "Global" }),
18527
+ S.global.length > 0 && /* @__PURE__ */ Q(bd, { children: "Global" }),
18504
18528
  S.global.map((e) => /* @__PURE__ */ Q(T, {
18505
- icon: _d(e.action),
18529
+ icon: vd(e.action),
18506
18530
  danger: e.action.destructive,
18507
18531
  onClick: () => {
18508
18532
  y(!1), w(e, !1);
@@ -18542,7 +18566,7 @@ function vd({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
18542
18566
  pointerEvents: i === 0 ? "none" : "auto"
18543
18567
  },
18544
18568
  children: /* @__PURE__ */ Q(T, {
18545
- icon: _d(e.action),
18569
+ icon: vd(e.action),
18546
18570
  danger: e.action.destructive,
18547
18571
  onClick: () => {
18548
18572
  y(!1), w(e, !0);
@@ -18586,7 +18610,7 @@ function vd({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
18586
18610
  ]
18587
18611
  }),
18588
18612
  d,
18589
- i > 0 && /* @__PURE__ */ Q(ld, {
18613
+ i > 0 && /* @__PURE__ */ Q(ud, {
18590
18614
  count: i,
18591
18615
  actions: E,
18592
18616
  onClear: a,
@@ -18596,7 +18620,7 @@ function vd({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
18596
18620
  ]
18597
18621
  });
18598
18622
  }
18599
- function yd({ children: e }) {
18623
+ function bd({ children: e }) {
18600
18624
  return /* @__PURE__ */ Q("div", {
18601
18625
  style: {
18602
18626
  padding: "6px 8px 4px",
@@ -18611,7 +18635,7 @@ function yd({ children: e }) {
18611
18635
  }
18612
18636
  //#endregion
18613
18637
  //#region src/components/list/InlineEditCell.tsx
18614
- var bd = {
18638
+ var xd = {
18615
18639
  padding: "4px 6px",
18616
18640
  margin: "-4px -6px",
18617
18641
  borderRadius: 4,
@@ -18622,7 +18646,7 @@ var bd = {
18622
18646
  alignItems: "center",
18623
18647
  gap: 4
18624
18648
  };
18625
- function xd({ value: e, onSave: t, type: n = "text", options: r, trigger: i = "always", label: a, placeholder: o }) {
18649
+ function Sd({ value: e, onSave: t, type: n = "text", options: r, trigger: i = "always", label: a, placeholder: o }) {
18626
18650
  let [s, c] = J(e), [l, u] = J(e), [d, f] = J(!1), [p, m] = J(e), h = q(null);
18627
18651
  G(() => {
18628
18652
  c(e), u(e), m(e);
@@ -18694,7 +18718,7 @@ function xd({ value: e, onSave: t, type: n = "text", options: r, trigger: i = "a
18694
18718
  onMouseLeave: (e) => {
18695
18719
  e.currentTarget.style.borderColor = "transparent";
18696
18720
  },
18697
- style: bd,
18721
+ style: xd,
18698
18722
  children: l ?? /* @__PURE__ */ Q("span", {
18699
18723
  style: { color: "var(--text-4)" },
18700
18724
  children: "Click to edit"
@@ -18703,7 +18727,7 @@ function xd({ value: e, onSave: t, type: n = "text", options: r, trigger: i = "a
18703
18727
  }
18704
18728
  //#endregion
18705
18729
  //#region src/components/pages/home/HomeStub.tsx
18706
- var Sd = [
18730
+ var Cd = [
18707
18731
  {
18708
18732
  id: "a1",
18709
18733
  title: "James Gallagher moved to Discovery",
@@ -18719,7 +18743,7 @@ var Sd = [
18719
18743
  title: "Refill enrichment job completed (32 leads)",
18720
18744
  when: "10:00 AM"
18721
18745
  }
18722
- ], Cd = [
18746
+ ], wd = [
18723
18747
  {
18724
18748
  label: "Open leads",
18725
18749
  val: "127",
@@ -18744,7 +18768,7 @@ var Sd = [
18744
18768
  delta: "2 failed",
18745
18769
  tone: "amber"
18746
18770
  }
18747
- ], wd = [
18771
+ ], Td = [
18748
18772
  [
18749
18773
  "leads",
18750
18774
  "Leads",
@@ -18776,7 +18800,7 @@ var Sd = [
18776
18800
  "entity"
18777
18801
  ]
18778
18802
  ];
18779
- function Td({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLabel: n = "Acme · production" }) {
18803
+ function Ed({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLabel: n = "Acme · production" }) {
18780
18804
  return /* @__PURE__ */ Q("div", {
18781
18805
  style: {
18782
18806
  padding: "22px 24px",
@@ -18820,7 +18844,7 @@ function Td({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
18820
18844
  gap: 10,
18821
18845
  margin: "16px 0"
18822
18846
  },
18823
- children: Cd.map((e) => /* @__PURE__ */ $("div", {
18847
+ children: wd.map((e) => /* @__PURE__ */ $("div", {
18824
18848
  style: {
18825
18849
  padding: 14,
18826
18850
  background: "var(--surface)",
@@ -18868,7 +18892,7 @@ function Td({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
18868
18892
  gridTemplateColumns: "repeat(3,1fr)",
18869
18893
  gap: 8
18870
18894
  },
18871
- children: wd.map(([t, n, r]) => {
18895
+ children: Td.map(([t, n, r]) => {
18872
18896
  let i = x[r];
18873
18897
  return /* @__PURE__ */ $("button", {
18874
18898
  onClick: () => e?.(t),
@@ -18913,7 +18937,7 @@ function Td({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
18913
18937
  flexDirection: "column",
18914
18938
  gap: 8
18915
18939
  },
18916
- children: Sd.slice(0, 3).map((e) => /* @__PURE__ */ $("div", {
18940
+ children: Cd.slice(0, 3).map((e) => /* @__PURE__ */ $("div", {
18917
18941
  style: {
18918
18942
  fontSize: 12,
18919
18943
  color: "var(--text-2)"
@@ -18942,19 +18966,19 @@ function Td({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
18942
18966
  }
18943
18967
  //#endregion
18944
18968
  //#region src/components/pages/pipeline/Pipeline.tsx
18945
- var Ed = {
18969
+ var Dd = {
18946
18970
  "1-New": { color: "slate" },
18947
18971
  "2-Contacted": { color: "sky" },
18948
18972
  "3-Qualified": { color: "violet" },
18949
18973
  "4-Proposal": { color: "amber" },
18950
18974
  "5-Won": { color: "emerald" },
18951
18975
  "6-Lost": { color: "rose" }
18952
- }, Dd = {
18976
+ }, Od = {
18953
18977
  P0: "rose",
18954
18978
  P1: "amber",
18955
18979
  P2: "sky",
18956
18980
  P3: "slate"
18957
- }, Od = [
18981
+ }, kd = [
18958
18982
  {
18959
18983
  id: "l1",
18960
18984
  contact: "James Gallagher",
@@ -19020,11 +19044,11 @@ var Ed = {
19020
19044
  score: 58
19021
19045
  }
19022
19046
  ];
19023
- function kd() {
19024
- let e = Object.entries(Ed).map(([e, t]) => ({
19047
+ function Ad() {
19048
+ let e = Object.entries(Dd).map(([e, t]) => ({
19025
19049
  key: e,
19026
19050
  color: t.color,
19027
- leads: Od.filter((t) => t.pipeline === e)
19051
+ leads: kd.filter((t) => t.pipeline === e)
19028
19052
  }));
19029
19053
  return /* @__PURE__ */ $("div", {
19030
19054
  style: {
@@ -19055,7 +19079,7 @@ function kd() {
19055
19079
  fontSize: 12,
19056
19080
  color: "var(--text-3)"
19057
19081
  },
19058
- children: [Od.length, " leads · $2.4M pipeline"]
19082
+ children: [kd.length, " leads · $2.4M pipeline"]
19059
19083
  })]
19060
19084
  }), /* @__PURE__ */ Q("div", {
19061
19085
  style: {
@@ -19141,7 +19165,7 @@ function kd() {
19141
19165
  flexWrap: "wrap"
19142
19166
  },
19143
19167
  children: [e.priority && e.priority !== "-" && /* @__PURE__ */ Q(L, {
19144
- tone: Dd[e.priority] ?? "slate",
19168
+ tone: Od[e.priority] ?? "slate",
19145
19169
  size: "xs",
19146
19170
  dot: !0,
19147
19171
  children: e.priority
@@ -19160,7 +19184,7 @@ function kd() {
19160
19184
  }
19161
19185
  //#endregion
19162
19186
  //#region src/components/pages/jobs/Jobs.tsx
19163
- var Ad = [
19187
+ var jd = [
19164
19188
  {
19165
19189
  id: "job_91a4",
19166
19190
  name: "reparse_leads_with_llm",
@@ -19204,12 +19228,12 @@ var Ad = [
19204
19228
  worker: "wk-us-01",
19205
19229
  took: "2m 02s"
19206
19230
  }
19207
- ], jd = {
19231
+ ], Md = {
19208
19232
  running: "sky",
19209
19233
  success: "emerald",
19210
19234
  queued: "slate",
19211
19235
  failed: "rose"
19212
- }, Md = [
19236
+ }, Nd = [
19213
19237
  "ID",
19214
19238
  "Name",
19215
19239
  "Status",
@@ -19219,7 +19243,7 @@ var Ad = [
19219
19243
  "Worker",
19220
19244
  ""
19221
19245
  ];
19222
- function Nd() {
19246
+ function Pd() {
19223
19247
  return /* @__PURE__ */ $("div", {
19224
19248
  style: {
19225
19249
  padding: "14px 20px",
@@ -19268,7 +19292,7 @@ function Nd() {
19268
19292
  background: "var(--surface-2)",
19269
19293
  color: "var(--text-3)"
19270
19294
  },
19271
- children: Md.map((e, t) => /* @__PURE__ */ Q("th", {
19295
+ children: Nd.map((e, t) => /* @__PURE__ */ Q("th", {
19272
19296
  style: {
19273
19297
  padding: "0 10px",
19274
19298
  textAlign: "left",
@@ -19280,7 +19304,7 @@ function Nd() {
19280
19304
  },
19281
19305
  children: e
19282
19306
  }, e || `_h${t}`))
19283
- }) }), /* @__PURE__ */ Q("tbody", { children: Ad.map((e) => /* @__PURE__ */ $("tr", {
19307
+ }) }), /* @__PURE__ */ Q("tbody", { children: jd.map((e) => /* @__PURE__ */ $("tr", {
19284
19308
  style: { height: 32 },
19285
19309
  children: [
19286
19310
  /* @__PURE__ */ Q("td", {
@@ -19312,7 +19336,7 @@ function Nd() {
19312
19336
  borderBottom: "1px solid var(--divider)"
19313
19337
  },
19314
19338
  children: /* @__PURE__ */ Q(L, {
19315
- tone: jd[e.status],
19339
+ tone: Md[e.status],
19316
19340
  size: "xs",
19317
19341
  dot: !0,
19318
19342
  children: e.status
@@ -19342,7 +19366,7 @@ function Nd() {
19342
19366
  display: "block",
19343
19367
  height: "100%",
19344
19368
  width: `${e.progress}%`,
19345
- background: `var(--pill-${jd[e.status]})`
19369
+ background: `var(--pill-${Md[e.status]})`
19346
19370
  } })
19347
19371
  }), /* @__PURE__ */ $("span", {
19348
19372
  className: "mono num",
@@ -19397,7 +19421,7 @@ function Nd() {
19397
19421
  }
19398
19422
  //#endregion
19399
19423
  //#region src/components/layout/ImpersonationStartModal.tsx
19400
- function Pd({ open: e, targetUserId: t, targetUserLabel: n, onClose: r, onStarted: i }) {
19424
+ function Fd({ open: e, targetUserId: t, targetUserLabel: n, onClose: r, onStarted: i }) {
19401
19425
  let { start: a, isStarting: o } = Dn(), { value: s } = Yn("impersonation.require_reason_min_length", 10), [c, l] = J(""), [u, d] = J("");
19402
19426
  if (!e) return null;
19403
19427
  let f = c.trim(), p = f.length >= s;
@@ -19557,7 +19581,7 @@ function Pd({ open: e, targetUserId: t, targetUserLabel: n, onClose: r, onStarte
19557
19581
  }
19558
19582
  //#endregion
19559
19583
  //#region src/components/agents/AgentVisualHints.tsx
19560
- function Fd({ turn: e, navigate: t }) {
19584
+ function Id({ turn: e, navigate: t }) {
19561
19585
  return G(() => {
19562
19586
  for (let n of e.hints) switch (n.kind) {
19563
19587
  case "navigate":
@@ -19596,7 +19620,7 @@ function Fd({ turn: e, navigate: t }) {
19596
19620
  }
19597
19621
  //#endregion
19598
19622
  //#region src/components/agents/AgentConversationDrawer.tsx
19599
- function Id({ open: e, onClose: t, conversations: n, activeId: r, onSelect: i, onNew: a, onRefresh: o }) {
19623
+ function Ld({ open: e, onClose: t, conversations: n, activeId: r, onSelect: i, onNew: a, onRefresh: o }) {
19600
19624
  return G(() => {
19601
19625
  e && o();
19602
19626
  }, [e, o]), e ? /* @__PURE__ */ $("aside", {
@@ -19623,7 +19647,7 @@ function Id({ open: e, onClose: t, conversations: n, activeId: r, onSelect: i, o
19623
19647
  className: `block w-full px-4 py-3 text-left border-b border-divider hover:bg-surface ${e.id === r ? "bg-surface" : ""}`,
19624
19648
  children: [/* @__PURE__ */ Q("div", {
19625
19649
  className: "text-sm font-medium truncate",
19626
- children: e.title || e.context ? Ld(e.context) : "Untitled"
19650
+ children: e.title || e.context ? Rd(e.context) : "Untitled"
19627
19651
  }), /* @__PURE__ */ $("div", {
19628
19652
  className: "text-xs text-muted-foreground",
19629
19653
  children: [
@@ -19646,12 +19670,12 @@ function Id({ open: e, onClose: t, conversations: n, activeId: r, onSelect: i, o
19646
19670
  ]
19647
19671
  }) : null;
19648
19672
  }
19649
- function Ld(e) {
19673
+ function Rd(e) {
19650
19674
  if (!e) return "";
19651
19675
  let t = e.entity ? String(e.entity) : "", n = e.pk ? `:${String(e.pk).slice(0, 6)}` : "";
19652
19676
  return t ? `${t}${n}` : "";
19653
19677
  }
19654
19678
  //#endregion
19655
- export { te as ActionBatchError, Zi as ActionRunnerProvider, Ur as AgentChatPanel, Id as AgentConversationDrawer, Ir as AgentElicitForm, Fd as AgentVisualHints, qu as App, qu as Declarion, Sa as AuthShell, ie as Avatar, td as Batch, D as BoolToggle, i as BrandGlyph, In as Breadcrumbs, m as Btn, ld as BulkBar, no as ChangePasswordDialog, De as Check, C as Chip, ye as CircleImage, Vc as ColumnPicker, tr as CommandPalette, io as ConfirmDialog, tt as DateInput, nt as Dropdown, zn as DynamicIcon, Js as EmptyState, $u as EntityClient, z as FieldLabel, _t as FileDraftScope, Ec as FilterChips, kc as FilterDrawer, Ga as Forgot, Td as HomeStub, P as HoverCard, x as Icon, R as IconBtn, Un as ImpersonationBanner, Xn as ImpersonationFrame, Pd as ImpersonationStartModal, xd as InlineEditCell, Nd as JobsStub, $e as JsonField, g as Kbd, Ci as MULTIPLE_VALUES, T as MenuItem, nc as NO_VALUE_OPS, rc as OP_LABELS, cd as PageHeader, ee as PasswordInput, L as Pill, kd as PipelineStub, As as Preferences, bs as Profile, wi as PropertyGridEditor, _c as QEField, o as QuickEditCell, gc as QuickPeek, an as Rail, f as RecordIdBadge, Zu as RefCache, Ze as RefField, Qa as Reset, j as RowField, dd as RowMenu, v as SectionCard, I as Select, vd as ShellListPage, xn as Sidebar, Ba as SignIn, Ua as SignUp, yu as SmartDetailPage, tl as SmartListPage, Ou as SmartRecordListPage, n as Spinner, Le as SquareImage, Bn as TabStrip, u as TagsInput, Nn as TenantChip, c as TextArea, k as TextInput, Rn as TopBar, $a as TwoFA, gt as UploadError, pd as VISIBILITY_LIST_BULK_BAR, fd as VISIBILITY_LIST_TOOLBAR, ke as ViewField, Uc as ViewSwitcher, ge as WideBanner, ar as approveInvocation, l as buildActionBody, Ke as buildDetailHrefFromId, Pe as buildEntityDetailHref, yi as buildMassEditTargets, He as buildRowDetailHref, Sn as buildSections, sr as cancelConversation, cc as countActiveFilters, nr as createConversation, Be as cx, O as deleteEntity, ki as detectCommonValue, pt as discardFile, ed as entityClient, Mn as envTone, Oe as executeAction, fe as extractPkValues, Ie as fieldDisplayName, ft as formatBytes, Tc as formatCount, Cc as formatEstimatedCount, wc as formatExactCount, xe as getFileWidget, Me as getImageCropper, he as getPrimaryKeyFields, le as hasFileWidget, oc as hasOrGroups, cr as listConversations, ur as listPendingInvocations, dr as loadHistory, H as loc, ic as parseFiltersFromURL, vi as parseTargetFilter, _e as pkValuePartsToId, be as pkValuesFromId, Re as pkValuesToDetailId, Ne as pkValuesToId, Je as registerFileWidget, zu as registerScreen, or as rejectInvocation, lr as rerunMessageTurn, gd as resolveBulkBarActions, Se as resolveDetailRoute, hd as resolveToolbarActions, A as restoreEntity, ir as sendElicitResponse, rr as sendMessage, ac as setFiltersInURL, Ce as setImageCropper, lt as uploadFile, Yi as useActionRunner, Fr as useAgentConversation, ad as useAllEntityData, En as useAuth, od as useColumns, co as useCreateEntity, qs as useDebounce, uo as useDeleteEntity, Du as useDeleteProperty, mt as useDraftRegistration, et as useEntity, pe as useEntityCount, Qe as useEntityData, rl as useEntityItem, ut as useFileDraftScope, dc as useFilters, Dn as useImpersonation, Pt as useLocation, It as useNavigate, Yn as useParam, Rt as useParams, qn as usePublicParams, Jn as useResolvedParam, r as useSchema, Wc as useScreen, Bt as useSearchParams, Eu as useSetProperty, Cu as useSetStatus, bn as useTabNavigate, yn as useTabStore, lo as useUpdateEntity, Gc as useViews, vt as validateClientSide };
19679
+ export { te as ActionBatchError, Zi as ActionRunnerProvider, Ur as AgentChatPanel, Ld as AgentConversationDrawer, Ir as AgentElicitForm, Id as AgentVisualHints, Ju as App, Ju as Declarion, Sa as AuthShell, ie as Avatar, nd as Batch, D as BoolToggle, i as BrandGlyph, In as Breadcrumbs, m as Btn, ud as BulkBar, no as ChangePasswordDialog, De as Check, C as Chip, ye as CircleImage, Vc as ColumnPicker, tr as CommandPalette, io as ConfirmDialog, tt as DateInput, nt as Dropdown, zn as DynamicIcon, Js as EmptyState, ed as EntityClient, z as FieldLabel, _t as FileDraftScope, Ec as FilterChips, kc as FilterDrawer, Ga as Forgot, Ed as HomeStub, P as HoverCard, x as Icon, R as IconBtn, Un as ImpersonationBanner, Xn as ImpersonationFrame, Fd as ImpersonationStartModal, Sd as InlineEditCell, Pd as JobsStub, $e as JsonField, g as Kbd, Ci as MULTIPLE_VALUES, T as MenuItem, nc as NO_VALUE_OPS, rc as OP_LABELS, ld as PageHeader, ee as PasswordInput, L as Pill, Ad as PipelineStub, As as Preferences, bs as Profile, wi as PropertyGridEditor, _c as QEField, o as QuickEditCell, gc as QuickPeek, an as Rail, f as RecordIdBadge, Qu as RefCache, Ze as RefField, Qa as Reset, j as RowField, fd as RowMenu, v as SectionCard, I as Select, yd as ShellListPage, xn as Sidebar, Ba as SignIn, Ua as SignUp, bu as SmartDetailPage, tl as SmartListPage, ku as SmartRecordListPage, n as Spinner, Le as SquareImage, Bn as TabStrip, u as TagsInput, Nn as TenantChip, c as TextArea, k as TextInput, Rn as TopBar, $a as TwoFA, gt as UploadError, md as VISIBILITY_LIST_BULK_BAR, pd as VISIBILITY_LIST_TOOLBAR, ke as ViewField, Uc as ViewSwitcher, ge as WideBanner, ar as approveInvocation, l as buildActionBody, Ke as buildDetailHrefFromId, Pe as buildEntityDetailHref, yi as buildMassEditTargets, He as buildRowDetailHref, Sn as buildSections, sr as cancelConversation, cc as countActiveFilters, nr as createConversation, Be as cx, O as deleteEntity, ki as detectCommonValue, pt as discardFile, td as entityClient, Mn as envTone, Oe as executeAction, fe as extractPkValues, Ie as fieldDisplayName, ft as formatBytes, Tc as formatCount, Cc as formatEstimatedCount, wc as formatExactCount, xe as getFileWidget, Me as getImageCropper, he as getPrimaryKeyFields, le as hasFileWidget, oc as hasOrGroups, cr as listConversations, ur as listPendingInvocations, dr as loadHistory, H as loc, ic as parseFiltersFromURL, vi as parseTargetFilter, _e as pkValuePartsToId, be as pkValuesFromId, Re as pkValuesToDetailId, Ne as pkValuesToId, Je as registerFileWidget, Bu as registerScreen, or as rejectInvocation, lr as rerunMessageTurn, _d as resolveBulkBarActions, Se as resolveDetailRoute, gd as resolveToolbarActions, A as restoreEntity, ir as sendElicitResponse, rr as sendMessage, ac as setFiltersInURL, Ce as setImageCropper, lt as uploadFile, Yi as useActionRunner, Fr as useAgentConversation, od as useAllEntityData, En as useAuth, sd as useColumns, co as useCreateEntity, qs as useDebounce, uo as useDeleteEntity, Ou as useDeleteProperty, mt as useDraftRegistration, et as useEntity, pe as useEntityCount, Qe as useEntityData, rl as useEntityItem, ut as useFileDraftScope, dc as useFilters, Dn as useImpersonation, Pt as useLocation, It as useNavigate, Yn as useParam, Rt as useParams, qn as usePublicParams, Jn as useResolvedParam, r as useSchema, Wc as useScreen, Bt as useSearchParams, Du as useSetProperty, wu as useSetStatus, bn as useTabNavigate, yn as useTabStore, lo as useUpdateEntity, Gc as useViews, vt as validateClientSide };
19656
19680
 
19657
19681
  //# sourceMappingURL=index.js.map