@declarion/react 0.47.0 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist-lib/{DraggableChildrenTable-B6KjWkwD.js → DraggableChildrenTable-p2ZSdwzj.js} +1 -1
  2. package/dist-lib/{Grid-OdquWJNX.js → Grid-CjLFAKMZ.js} +2 -2
  3. package/dist-lib/{LayoutRenderer-CzAdhjNT.js → LayoutRenderer-X3p4yfo_.js} +124 -118
  4. package/dist-lib/{MarkdownRenderer-C6bhrAIe.js → MarkdownRenderer-Sb7zcvj0.js} +1 -1
  5. package/dist-lib/{RefreshControl-F9Ib9asP.js → RefreshControl-Cnl9nE0x.js} +255 -225
  6. package/dist-lib/{SmartDetailPage.impl-DdSu3kmW.js → SmartDetailPage.impl-bb0UNOII.js} +465 -463
  7. package/dist-lib/{SmartRecordListPage.impl-SkIp0_Rd.js → SmartRecordListPage.impl-BFh8auUZ.js} +141 -139
  8. package/dist-lib/api/agents.d.ts +8 -11
  9. package/dist-lib/components/agents/AgentChatPanel.d.ts +1 -0
  10. package/dist-lib/components/agents/AgentPicker.d.ts +9 -0
  11. package/dist-lib/components/primitives/Tooltip.d.ts +4 -0
  12. package/dist-lib/components/shared/ResponsiveActionBar.d.ts +10 -5
  13. package/dist-lib/declarion-react.css +1 -1
  14. package/dist-lib/hooks/useAgentConversation.d.ts +5 -7
  15. package/dist-lib/hooks/useBrandingChrome.d.ts +11 -0
  16. package/dist-lib/hooks/useLongPress.d.ts +29 -0
  17. package/dist-lib/hooks/useResponsiveMode.d.ts +2 -21
  18. package/dist-lib/index.d.ts +2 -2
  19. package/dist-lib/index.js +2351 -2144
  20. package/dist-lib/lib/actions.d.ts +12 -4
  21. package/dist-lib/lib/longPressGesture.d.ts +55 -0
  22. package/dist-lib/lib/page-inset.d.ts +3 -0
  23. package/dist-lib/lib/viewport-category.d.ts +44 -0
  24. package/dist-lib/{registry-C2VD-5MD.js → registry-CWDnxiLJ.js} +1013 -954
  25. package/dist-lib/testing.js +10 -10
  26. package/dist-lib/types/api.d.ts +15 -2
  27. package/dist-lib/{useCurrentScreen-ow4r-nWa.js → useCurrentScreen-BshVTPVq.js} +979 -971
  28. package/dist-lib/{useProperties-lEKfzm2X.js → useProperties-B5p9mIH8.js} +2 -2
  29. package/dist-lib/{value-CXohNH6a.js → value-B1O6QikE.js} +1 -1
  30. package/package.json +1 -1
  31. package/dist-lib/components/agents/AgentVisualHints.d.ts +0 -6
@@ -1,16 +1,16 @@
1
1
  import { s as e, t } from "./DynamicIcon-Dc2j-rg_.js";
2
- import { A as n, At as r, B as i, C as a, Dn as o, E as s, Gt as c, I as l, K as u, Kn as d, L as f, Ln as p, Nn as m, O as h, P as g, Qn as _, R as v, Rn as y, Sn as b, St as x, T as S, Tn as C, Tt as w, U as T, V as E, W as D, X as O, Yn as k, Zn as A, _ as j, _t as M, b as N, bn as P, bt as F, cr as I, d as L, g as ee, gt as R, i as te, j as z, jn as ne, kt as re, lr as B, mn as ie, or as V, ot as ae, pt as oe, rr as se, rt as H, st as ce, u as le, ur as U, v as ue, vt as de, wn as fe, wt as pe, xn as me, yt as he, z as ge } from "./useCurrentScreen-ow4r-nWa.js";
3
- import { a as _e, c as ve, d as ye, f as be, i as xe, l as Se, n as Ce, o as we, p as Te, r as Ee, s as De, t as Oe, u as ke } from "./value-CXohNH6a.js";
4
- import { n as Ae, r as je, t as Me } from "./dataTableStyles-vwD1mVOP.js";
5
- import { Component as Ne, Suspense as Pe, lazy as Fe, useCallback as W, useEffect as G, useId as Ie, useLayoutEffect as Le, useMemo as K, useRef as q, useState as J } from "react";
2
+ import { A as n, At as r, B as i, C as a, Dn as o, E as s, Gt as c, I as l, K as u, Kn as d, L as f, Ln as p, Nn as m, O as h, P as g, Qn as _, R as v, Rn as y, Sn as b, St as x, T as S, Tn as C, Tt as w, U as T, V as E, W as D, X as O, Yn as k, Zn as A, _ as j, _t as M, b as N, bn as P, bt as F, cr as I, d as L, g as R, gt as z, i as ee, j as B, jn as te, kt as ne, lr as V, mn as re, or as H, ot as ie, pt as ae, rt as U, st as oe, tr as se, u as ce, ur as W, v as le, vt as ue, wn as de, wt as fe, xn as pe, yt as me, z as he } from "./useCurrentScreen-BshVTPVq.js";
3
+ import { a as ge, c as _e, d as ve, f as ye, i as be, l as xe, n as Se, o as Ce, p as we, r as Te, s as Ee, t as De, u as Oe } from "./value-B1O6QikE.js";
4
+ import { n as ke, r as Ae, t as je } from "./dataTableStyles-vwD1mVOP.js";
5
+ import { Component as Me, Fragment as Ne, Suspense as Pe, lazy as Fe, useCallback as G, useEffect as K, useId as Ie, useLayoutEffect as Le, useMemo as q, useRef as J, useState as Y } from "react";
6
6
  import { parsePath as Re, useNavigate as ze } from "react-router";
7
7
  import { useInfiniteQuery as Be, useMutation as Ve, useQuery as He, useQueryClient as Ue } from "@tanstack/react-query";
8
- import { Fragment as Y, jsx as X, jsxs as Z } from "react/jsx-runtime";
9
- import { create as We } from "zustand";
10
- import { clsx as Ge } from "clsx";
11
- import { twMerge as Ke } from "tailwind-merge";
8
+ import { Fragment as We, jsx as X, jsxs as Z } from "react/jsx-runtime";
9
+ import { create as Ge } from "zustand";
10
+ import { clsx as Ke } from "clsx";
11
+ import { twMerge as qe } from "tailwind-merge";
12
12
  //#region src/components/primitives/SectionCard.tsx
13
- var qe = {
13
+ var Je = {
14
14
  primary: {
15
15
  surface: "var(--surface)",
16
16
  shadow: "var(--shadow-xs)"
@@ -20,8 +20,8 @@ var qe = {
20
20
  shadow: "none"
21
21
  }
22
22
  };
23
- function Je({ title: t, subtitle: n, right: r, badge: i, count: a, children: o, footer: s, collapsible: c = !0, defaultOpen: l = !0, icon: u, emphasis: d = "primary", headingLevel: f = 2, padding: p = "16px" }) {
24
- let [m, h] = J(l), g = qe[d] ?? qe.primary;
23
+ function Ye({ title: t, subtitle: n, right: r, badge: i, count: a, children: o, footer: s, collapsible: c = !0, defaultOpen: l = !0, icon: u, emphasis: d = "primary", headingLevel: f = 2, padding: p = "16px" }) {
24
+ let [m, h] = Y(l), g = Je[d] ?? Je.primary;
25
25
  return /* @__PURE__ */ Z("div", {
26
26
  "data-emphasis": d,
27
27
  style: {
@@ -126,7 +126,7 @@ function Je({ title: t, subtitle: n, right: r, badge: i, count: a, children: o,
126
126
  children: i.text
127
127
  }),
128
128
  r,
129
- c && /* @__PURE__ */ X(B, {
129
+ c && /* @__PURE__ */ X(V, {
130
130
  size: 24,
131
131
  icon: X(m ? e.up : e.down, { size: 14 }),
132
132
  onClick: () => h((e) => !e),
@@ -153,7 +153,7 @@ function Je({ title: t, subtitle: n, right: r, badge: i, count: a, children: o,
153
153
  }
154
154
  //#endregion
155
155
  //#region src/components/primitives/ClassifiedFieldLocked.tsx
156
- function Ye({ tier: t, tierDef: n, requiredPermission: r, locale: i = "en", variant: a = "value" }) {
156
+ function Xe({ tier: t, tierDef: n, requiredPermission: r, locale: i = "en", variant: a = "value" }) {
157
157
  let o = n?.name?.[i] ?? n?.name?.en ?? t, s = r ? `Locked: requires permission "${r}". Ask your administrator to grant it to your role.` : `Locked: ${o} classification — requires explicit grant.`;
158
158
  return /* @__PURE__ */ Z("span", {
159
159
  title: s,
@@ -164,7 +164,7 @@ function Ye({ tier: t, tierDef: n, requiredPermission: r, locale: i = "en", vari
164
164
  }
165
165
  //#endregion
166
166
  //#region src/stores/preferences.ts
167
- var Xe = {
167
+ var Ze = {
168
168
  colorScheme: "light",
169
169
  accent: "violet",
170
170
  density: "compact",
@@ -176,22 +176,22 @@ var Xe = {
176
176
  zebra: !0,
177
177
  aiSurface: "both",
178
178
  toastPosition: "bottom-right"
179
- }, Ze = ["light", "dark"], Qe = [
179
+ }, Qe = ["light", "dark"], $e = [
180
180
  "violet",
181
181
  "blue",
182
182
  "teal",
183
183
  "amber",
184
184
  "rose"
185
- ], $e = [
185
+ ], et = [
186
186
  "compact",
187
187
  "comfortable",
188
188
  "cozy"
189
- ], et = ["wide", "collapsed"], tt = ["top", "bottom"], nt = [
189
+ ], tt = ["wide", "collapsed"], nt = ["top", "bottom"], rt = [
190
190
  "command",
191
191
  "panel",
192
192
  "both",
193
193
  "off"
194
- ], rt = [
194
+ ], it = [
195
195
  "top-left",
196
196
  "top-center",
197
197
  "top-right",
@@ -199,37 +199,37 @@ var Xe = {
199
199
  "bottom-center",
200
200
  "bottom-right"
201
201
  ];
202
- function it(e, t) {
202
+ function at(e, t) {
203
203
  return typeof t == "string" && e.includes(t) ? t : void 0;
204
204
  }
205
- function at(e) {
206
- let t = {}, n = it(Ze, e.colorScheme);
205
+ function ot(e) {
206
+ let t = {}, n = at(Qe, e.colorScheme);
207
207
  n && (t.colorScheme = n);
208
- let r = it(Qe, e.accent);
208
+ let r = at($e, e.accent);
209
209
  r && (t.accent = r);
210
- let i = it($e, e.density);
210
+ let i = at(et, e.density);
211
211
  i && (t.density = i);
212
- let a = it(et, e.sidebar);
212
+ let a = at(tt, e.sidebar);
213
213
  a && (t.sidebar = a);
214
- let o = it(tt, e.tabsPosition);
214
+ let o = at(nt, e.tabsPosition);
215
215
  o && (t.tabsPosition = o);
216
- let s = it(nt, e.aiSurface);
216
+ let s = at(rt, e.aiSurface);
217
217
  s && (t.aiSurface = s);
218
- let c = it(rt, e.toastPosition);
218
+ let c = at(it, e.toastPosition);
219
219
  return c && (t.toastPosition = c), typeof e.tabsMaxOpen == "number" && e.tabsMaxOpen > 0 && (t.tabsMaxOpen = e.tabsMaxOpen), typeof e.radius == "number" && e.radius >= 0 && e.radius <= 32 && (t.radius = e.radius), typeof e.zebra == "boolean" && (t.zebra = e.zebra), typeof e.tabsPersist == "boolean" && (t.tabsPersist = e.tabsPersist), t;
220
220
  }
221
- var ot = ["declarion-preferences", "declarion-appearance"];
222
- function st() {
221
+ var st = ["declarion-preferences", "declarion-appearance"];
222
+ function ct() {
223
223
  if (!(typeof window > "u")) try {
224
- for (let e of ot) localStorage.removeItem(e);
224
+ for (let e of st) localStorage.removeItem(e);
225
225
  } catch {}
226
226
  }
227
- function ct(e) {
227
+ function lt(e) {
228
228
  if (typeof document > "u") return;
229
229
  let t = document.documentElement;
230
230
  t.dataset.colorScheme = e.colorScheme, t.dataset.accent = e.accent, t.dataset.density = e.density, t.dataset.sidebar = e.sidebar, t.dataset.tabbar = e.tabsPosition, t.dataset.zebra = e.zebra ? "on" : "off", t.dataset.ai = e.aiSurface, t.style.setProperty("--radius-md", `${e.radius}px`), t.style.setProperty("--radius-lg", `${e.radius + 3}px`);
231
231
  }
232
- function lt(e) {
232
+ function ut(e) {
233
233
  return {
234
234
  colorScheme: e.color_scheme,
235
235
  accent: e.accent,
@@ -244,70 +244,70 @@ function lt(e) {
244
244
  toastPosition: e.toast_position
245
245
  };
246
246
  }
247
- st();
248
- var ut = /* @__PURE__ */ new Set(), dt = { ...Xe };
249
- typeof window < "u" && ct(dt);
250
- var ft = We((e, t) => ({
251
- ...dt,
247
+ ct();
248
+ var dt = /* @__PURE__ */ new Set(), ft = { ...Ze };
249
+ typeof window < "u" && lt(ft);
250
+ var pt = Ge((e, t) => ({
251
+ ...ft,
252
252
  set: (n, r) => {
253
- let i = at({ [n]: r });
254
- i[n] !== void 0 && (ct({
253
+ let i = ot({ [n]: r });
254
+ i[n] !== void 0 && (lt({
255
255
  ...t(),
256
256
  ...i
257
- }), ut.add(n), e(i));
257
+ }), dt.add(n), e(i));
258
258
  },
259
259
  setMany: (n) => {
260
- let r = at(n);
260
+ let r = ot(n);
261
261
  if (Object.keys(r).length) {
262
- ct({
262
+ lt({
263
263
  ...t(),
264
264
  ...r
265
265
  });
266
- for (let e of Object.keys(r)) ut.add(e);
266
+ for (let e of Object.keys(r)) dt.add(e);
267
267
  e(r);
268
268
  }
269
269
  },
270
270
  hydrateFromBranding: (t) => {
271
271
  if (!t) return;
272
- let n = lt(t), r = {};
273
- for (let [e, t] of Object.entries(n)) ut.has(e) || t !== void 0 && (r[e] = t);
274
- let i = at(r);
275
- Object.keys(i).length && (ct({
276
- ...ft.getState(),
272
+ let n = ut(t), r = {};
273
+ for (let [e, t] of Object.entries(n)) dt.has(e) || t !== void 0 && (r[e] = t);
274
+ let i = ot(r);
275
+ Object.keys(i).length && (lt({
276
+ ...pt.getState(),
277
277
  ...i
278
278
  }), e(i));
279
279
  },
280
280
  resetToDefaults: (t) => {
281
- ut.clear(), st();
282
- let n = t ? at(lt(t)) : {}, r = {
283
- ...Xe,
281
+ dt.clear(), ct();
282
+ let n = t ? ot(ut(t)) : {}, r = {
283
+ ...Ze,
284
284
  ...n
285
285
  };
286
- ct(r), e(r);
286
+ lt(r), e(r);
287
287
  }
288
- })), pt = ["/login", "/signup"];
289
- function mt(e) {
290
- return pt.includes(e);
291
- }
288
+ })), mt = ["/login", "/signup"];
292
289
  function ht(e) {
293
- return typeof e == "string" && e.startsWith("/") && !e.startsWith("//");
290
+ return mt.includes(e);
294
291
  }
295
- var gt = 4096;
296
- function _t(e) {
297
- return typeof e == "string" && e.length <= gt;
292
+ function gt(e) {
293
+ return typeof e == "string" && e.startsWith("/") && !e.startsWith("//");
298
294
  }
295
+ var _t = 4096;
299
296
  function vt(e) {
297
+ return typeof e == "string" && e.length <= _t;
298
+ }
299
+ function yt(e) {
300
300
  if (e === null) return null;
301
301
  if (e === void 0 || typeof e != "object" || Array.isArray(e)) return;
302
302
  let t = e;
303
- if (!ht(t.pathname) || t.pathname.length > gt || t.pathname.includes("?") || t.pathname.includes("#")) return;
303
+ if (!gt(t.pathname) || t.pathname.length > _t || t.pathname.includes("?") || t.pathname.includes("#")) return;
304
304
  let n = { pathname: t.pathname };
305
305
  if (t.search !== void 0) {
306
- if (!_t(t.search) || t.search.startsWith("?")) return;
306
+ if (!vt(t.search) || t.search.startsWith("?")) return;
307
307
  t.search && (n.search = t.search);
308
308
  }
309
309
  if (t.hash !== void 0) {
310
- if (!_t(t.hash) || t.hash && !t.hash.startsWith("#")) return;
310
+ if (!vt(t.hash) || t.hash && !t.hash.startsWith("#")) return;
311
311
  t.hash && (n.hash = t.hash);
312
312
  }
313
313
  for (let e of [
@@ -316,29 +316,29 @@ function vt(e) {
316
316
  "icon",
317
317
  "screen"
318
318
  ]) if (t[e] !== void 0) {
319
- if (!_t(t[e])) return;
319
+ if (!vt(t[e])) return;
320
320
  t[e] && (n[e] = t[e]);
321
321
  }
322
322
  return n;
323
323
  }
324
- function yt(e) {
324
+ function bt(e) {
325
325
  return e.closable !== !1;
326
326
  }
327
- function bt(e, t, n, r) {
328
- if (n === "all") return e.filter(yt).map((e) => e.id);
327
+ function xt(e, t, n, r) {
328
+ if (n === "all") return e.filter(bt).map((e) => e.id);
329
329
  let i = r ?? t;
330
330
  if (!i) return [];
331
331
  let a = e.findIndex((e) => e.id === i);
332
- return a === -1 ? [] : n === "current" ? yt(e[a]) ? [e[a].id] : [] : n === "others" ? e.filter((e, t) => t !== a && yt(e)).map((e) => e.id) : e.slice(a + 1).filter(yt).map((e) => e.id);
332
+ return a === -1 ? [] : n === "current" ? bt(e[a]) ? [e[a].id] : [] : n === "others" ? e.filter((e, t) => t !== a && bt(e)).map((e) => e.id) : e.slice(a + 1).filter(bt).map((e) => e.id);
333
333
  }
334
- var xt = null, St = null;
335
- function Ct(e, t) {
334
+ var St = null, Ct = null;
335
+ function wt(e, t) {
336
336
  return `declarion::${e}::${t}::tabs`;
337
337
  }
338
- function wt() {
339
- return !xt || !St ? null : Ct(xt, St);
338
+ function Tt() {
339
+ return !St || !Ct ? null : wt(St, Ct);
340
340
  }
341
- function Tt(e) {
341
+ function Et(e) {
342
342
  let t;
343
343
  try {
344
344
  t = JSON.parse(e);
@@ -349,7 +349,7 @@ function Tt(e) {
349
349
  let n = t;
350
350
  return Array.isArray(n.tabs) ? {
351
351
  tabs: n.tabs.filter((e) => typeof e == "object" && !!e && typeof e.id == "string" && typeof e.pathname == "string").map((e) => {
352
- let t = vt(e.returnTo);
352
+ let t = yt(e.returnTo);
353
353
  if (t === void 0) {
354
354
  let { returnTo: t, ...n } = e;
355
355
  return n;
@@ -362,22 +362,22 @@ function Tt(e) {
362
362
  activeTabId: typeof n.activeTabId == "string" ? n.activeTabId : null
363
363
  } : null;
364
364
  }
365
- function Et(e, t) {
365
+ function Dt(e, t) {
366
366
  if (typeof window > "u") return null;
367
- let n = localStorage.getItem(Ct(e, t));
367
+ let n = localStorage.getItem(wt(e, t));
368
368
  if (!n) return null;
369
- let r = Tt(n);
369
+ let r = Et(n);
370
370
  if (!r) return null;
371
371
  let i = r.tabs.find((e) => e.id === r.activeTabId), a = i?.pathname;
372
- if (ht(a)) {
372
+ if (gt(a)) {
373
373
  let e = typeof i?.search == "string" ? i.search : "", t = e.startsWith("?") ? e.slice(1) : e;
374
374
  return t ? `${a}?${t}` : a;
375
375
  }
376
376
  return null;
377
377
  }
378
- function Dt(e, t) {
378
+ function Ot(e, t) {
379
379
  if (typeof window > "u") return;
380
- let n = ft.getState().tabsPersist, r = wt();
380
+ let n = pt.getState().tabsPersist, r = Tt();
381
381
  if (r) {
382
382
  if (!n) {
383
383
  try {
@@ -393,24 +393,24 @@ function Dt(e, t) {
393
393
  } catch {}
394
394
  }
395
395
  }
396
- function Ot() {
397
- if (typeof window > "u" || !ft.getState().tabsPersist) return null;
398
- let e = wt();
396
+ function kt() {
397
+ if (typeof window > "u" || !pt.getState().tabsPersist) return null;
398
+ let e = Tt();
399
399
  if (!e) return null;
400
400
  let t = localStorage.getItem(e);
401
- return t ? Tt(t) : null;
401
+ return t ? Et(t) : null;
402
402
  }
403
- var kt = We((e, t) => ({
403
+ var At = Ge((e, t) => ({
404
404
  tabs: [],
405
405
  activeTabId: null,
406
406
  openTab: (n) => {
407
- if (mt(n.pathname)) return "";
407
+ if (ht(n.pathname)) return "";
408
408
  let r = t(), i = r.tabs.find((e) => e.pathname === n.pathname);
409
- if (i) return e({ activeTabId: i.id }), Dt(r.tabs, i.id), i.id;
409
+ if (i) return e({ activeTabId: i.id }), Ot(r.tabs, i.id), i.id;
410
410
  let a = crypto.randomUUID(), o = {
411
411
  ...n,
412
412
  id: a
413
- }, s = [...r.tabs, o], c = ft.getState().tabsMaxOpen;
413
+ }, s = [...r.tabs, o], c = pt.getState().tabsMaxOpen;
414
414
  if (c > 0 && s.length > c) {
415
415
  let e = s.findIndex((e) => e.id !== a && e.closable !== !1 && !e.dirty);
416
416
  e !== -1 && (s = s.filter((t, n) => n !== e));
@@ -418,7 +418,7 @@ var kt = We((e, t) => ({
418
418
  return e({
419
419
  tabs: s,
420
420
  activeTabId: a
421
- }), Dt(s, a), a;
421
+ }), Ot(s, a), a;
422
422
  },
423
423
  closeTab: (e) => {
424
424
  let n = t(), r = n.tabs.findIndex((t) => t.id === e);
@@ -427,14 +427,14 @@ var kt = We((e, t) => ({
427
427
  closeTabs: (n) => {
428
428
  let r = t(), i = new Set(n);
429
429
  if (i.size === 0) return r.tabs.find((e) => e.id === r.activeTabId) ?? null;
430
- let a = r.tabs.findIndex((e) => e.id === r.activeTabId), o = r.tabs.filter((e) => !(i.has(e.id) && yt(e))), s = r.activeTabId;
430
+ let a = r.tabs.findIndex((e) => e.id === r.activeTabId), o = r.tabs.filter((e) => !(i.has(e.id) && bt(e))), s = r.activeTabId;
431
431
  return s && !o.some((e) => e.id === s) ? s = o.length === 0 ? null : o[Math.min(Math.max(a, 0), o.length - 1)].id : o.length === 0 && (s = null), e({
432
432
  tabs: o,
433
433
  activeTabId: s
434
- }), Dt(o, s), o.find((e) => e.id === s) ?? null;
434
+ }), Ot(o, s), o.find((e) => e.id === s) ?? null;
435
435
  },
436
436
  switchTab: (n) => {
437
- e({ activeTabId: n }), Dt(t().tabs, n);
437
+ e({ activeTabId: n }), Ot(t().tabs, n);
438
438
  },
439
439
  reorderTabs: (t, n) => {
440
440
  e((e) => {
@@ -461,7 +461,7 @@ var kt = We((e, t) => ({
461
461
  e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
462
462
  ...e,
463
463
  returnTo: r
464
- } : e) })), Dt(t().tabs, t().activeTabId);
464
+ } : e) })), Ot(t().tabs, t().activeTabId);
465
465
  },
466
466
  commitTabNavigation: (n, r) => {
467
467
  let i = "returnTo" in r;
@@ -472,37 +472,37 @@ var kt = We((e, t) => ({
472
472
  ...i ? { returnTo: r.returnTo } : {}
473
473
  } : e),
474
474
  activeTabId: n
475
- })), Dt(t().tabs, t().activeTabId);
475
+ })), Ot(t().tabs, t().activeTabId);
476
476
  },
477
477
  setDirty: (n, r) => {
478
478
  e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
479
479
  ...e,
480
480
  dirty: r
481
- } : e) })), Dt(t().tabs, t().activeTabId);
481
+ } : e) })), Ot(t().tabs, t().activeTabId);
482
482
  },
483
483
  setMode: (n, r) => {
484
484
  e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
485
485
  ...e,
486
486
  mode: r
487
- } : e) })), Dt(t().tabs, t().activeTabId);
487
+ } : e) })), Ot(t().tabs, t().activeTabId);
488
488
  },
489
489
  updateTab: (n, r) => {
490
490
  e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
491
491
  ...e,
492
492
  ...r
493
- } : e) })), Dt(t().tabs, t().activeTabId);
493
+ } : e) })), Ot(t().tabs, t().activeTabId);
494
494
  },
495
495
  setScope: (e, t) => {
496
- xt = e, St = t;
496
+ St = e, Ct = t;
497
497
  },
498
498
  hydrate: () => {
499
- let t = Ot();
499
+ let t = kt();
500
500
  t && e({
501
501
  tabs: t.tabs,
502
502
  activeTabId: t.activeTabId
503
503
  });
504
504
  }
505
- })), At = We((e) => ({
505
+ })), jt = Ge((e) => ({
506
506
  depth: 0,
507
507
  nextIsRoot: !1,
508
508
  applyNavigation: (t) => e((e) => e.nextIsRoot ? {
@@ -517,33 +517,33 @@ var kt = We((e, t) => ({
517
517
  }));
518
518
  //#endregion
519
519
  //#region src/lib/utils.ts
520
- function jt(...e) {
521
- return Ke(Ge(e));
520
+ function Mt(...e) {
521
+ return qe(Ke(e));
522
522
  }
523
- function Mt(e) {
523
+ function Nt(e) {
524
524
  return e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0;
525
525
  }
526
526
  //#endregion
527
527
  //#region src/lib/screen-back.ts
528
- function Nt(e) {
528
+ function Pt(e) {
529
529
  return e ? e.startsWith("?") ? e.slice(1) : e : "";
530
530
  }
531
- function Pt(e) {
531
+ function Ft(e) {
532
532
  if (e) return e.startsWith("?") ? e : `?${e}`;
533
533
  }
534
- function Ft(e, t, n) {
535
- if (!ht(e.pathname) || mt(e.pathname) || e.pathname === t) return;
536
- let r = Nt(e.search), i = { pathname: e.pathname };
534
+ function It(e, t, n) {
535
+ if (!gt(e.pathname) || ht(e.pathname) || e.pathname === t) return;
536
+ let r = Pt(e.search), i = { pathname: e.pathname };
537
537
  return r && (i.search = r), e.hash && (i.hash = e.hash), n?.id && (i.tabId = n.id), n?.title && (i.title = n.title), n?.icon && (i.icon = n.icon), n?.screen && (i.screen = n.screen), i;
538
538
  }
539
- function It(e, t) {
539
+ function Lt(e, t) {
540
540
  return t ? {
541
541
  hasOriginBack: !1,
542
542
  allowFallbackBack: !0
543
543
  } : e === null ? {
544
544
  hasOriginBack: !1,
545
545
  allowFallbackBack: !1
546
- } : e && ht(e.pathname) ? {
546
+ } : e && gt(e.pathname) ? {
547
547
  hasOriginBack: !0,
548
548
  allowFallbackBack: !0
549
549
  } : {
@@ -551,8 +551,8 @@ function It(e, t) {
551
551
  allowFallbackBack: !0
552
552
  };
553
553
  }
554
- function Lt(e, t, n) {
555
- if (n || !e || !ht(e.pathname)) return null;
554
+ function Rt(e, t, n) {
555
+ if (n || !e || !gt(e.pathname)) return null;
556
556
  let r = (e.tabId ? t.find((t) => t.id === e.tabId) : void 0) ?? t.find((t) => t.pathname === e.pathname);
557
557
  return {
558
558
  kind: r ? "live" : "reopen",
@@ -567,26 +567,26 @@ function Lt(e, t, n) {
567
567
  }
568
568
  //#endregion
569
569
  //#region src/hooks/useTabNavigate.ts
570
- function Rt(e, t) {
570
+ function zt(e, t) {
571
571
  let n = Re(e);
572
572
  return {
573
573
  pathname: n.pathname ?? e,
574
- search: zt(n.search) ?? zt(t),
574
+ search: Bt(n.search) ?? Bt(t),
575
575
  hash: n.hash
576
576
  };
577
577
  }
578
- function zt(e) {
578
+ function Bt(e) {
579
579
  if (!(!e || e === "?")) return e.startsWith("?") ? e : `?${e}`;
580
580
  }
581
- function Bt() {
582
- let e = ze(), { data: t } = r(), n = oe(), i = ce();
583
- return W((r, a) => {
584
- let { pathname: o, search: s, hash: c } = Rt(r, a?.search);
581
+ function Vt() {
582
+ let e = ze(), { data: t } = r(), n = ae(), i = oe();
583
+ return G((r, a) => {
584
+ let { pathname: o, search: s, hash: c } = zt(r, a?.search);
585
585
  if (n.enabled) {
586
586
  i(`${o}${s ?? ""}${c ?? ""}`, { replace: a?.replace });
587
587
  return;
588
588
  }
589
- let l = kt.getState(), u = a?.topLevel ?? !1, d = Nt(s), f = u || typeof window > "u" ? void 0 : Ft({
589
+ let l = At.getState(), u = a?.topLevel ?? !1, d = Pt(s), f = u || typeof window > "u" ? void 0 : It({
590
590
  pathname: window.location.pathname,
591
591
  search: window.location.search,
592
592
  hash: window.location.hash
@@ -636,49 +636,57 @@ function Bt() {
636
636
  ]);
637
637
  }
638
638
  //#endregion
639
+ //#region src/lib/page-inset.ts
640
+ function Ht(e) {
641
+ return {
642
+ paddingLeft: `calc(${e}px + var(--safe-area-left))`,
643
+ paddingRight: `calc(${e}px + var(--safe-area-right))`
644
+ };
645
+ }
646
+ //#endregion
639
647
  //#region src/components/file-widgets/registry.ts
640
- var Vt = /* @__PURE__ */ new Map();
641
- function Ht(e, t) {
642
- Vt.set(e, t);
648
+ var Ut = /* @__PURE__ */ new Map();
649
+ function Wt(e, t) {
650
+ Ut.set(e, t);
643
651
  }
644
- function Ut(e) {
645
- return Vt.get(e);
652
+ function Gt(e) {
653
+ return Ut.get(e);
646
654
  }
647
- function Wt(e) {
648
- return Vt.has(e);
655
+ function Kt(e) {
656
+ return Ut.has(e);
649
657
  }
650
658
  //#endregion
651
659
  //#region src/components/file-widgets/cropper.ts
652
- var Gt = ({ file: e }) => Promise.resolve({
660
+ var qt = ({ file: e }) => Promise.resolve({
653
661
  blob: e,
654
662
  filename: e.name
655
- }), Kt = Gt;
656
- function qt(e) {
657
- Kt = e ?? Gt;
663
+ }), Jt = qt;
664
+ function Yt(e) {
665
+ Jt = e ?? qt;
658
666
  }
659
- function Jt() {
660
- return Kt;
667
+ function Xt() {
668
+ return Jt;
661
669
  }
662
670
  //#endregion
663
671
  //#region src/components/file-widgets/ImageWidget.tsx
664
- function Yt(e, t) {
665
- return ve(e, t);
672
+ function Zt(e, t) {
673
+ return _e(e, t);
666
674
  }
667
- function Xt(e) {
675
+ function Qt(e) {
668
676
  let t = e.trim().split(/\s+/).filter(Boolean);
669
677
  return t.length === 0 ? "?" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[1][0]).toUpperCase();
670
678
  }
671
- function Zt(e) {
672
- let { field: t, fieldName: n, value: r, onChange: a, mode: o, alt: s, disabled: c, visual: u, uploadFieldCode: d, uploadSlotCode: p } = e, m = Ce(r), [h, _] = J("idle"), [v, y] = J(null), [b, x] = J(null), [S, C] = J(null), [w, T] = J(!1), E = q(null), D = q(!1), O = q(null), { register: k, unregister: A, isDraft: j } = g();
673
- G(() => () => {
679
+ function $t(e) {
680
+ let { field: t, fieldName: n, value: r, onChange: a, mode: o, alt: s, disabled: c, visual: u, uploadFieldCode: d, uploadSlotCode: p } = e, m = Se(r), [h, _] = Y("idle"), [v, y] = Y(null), [b, x] = Y(null), [S, C] = Y(null), [w, T] = Y(!1), E = J(null), D = J(!1), O = J(null), { register: k, unregister: A, isDraft: j } = g();
681
+ K(() => () => {
674
682
  E.current && E.current.abort();
675
683
  }, []);
676
- let M = K(() => be(m, s, t.display?.placeholder || n), [
684
+ let M = q(() => ye(m, s, t.display?.placeholder || n), [
677
685
  s,
678
686
  t.display?.placeholder,
679
687
  n,
680
688
  m
681
- ]), N = (t.accepts ?? ["image/*"]).join(","), P = W(async (r) => {
689
+ ]), N = (t.accepts ?? ["image/*"]).join(","), P = G(async (r) => {
682
690
  let o = i(r, t.accepts, t.max_size_bytes);
683
691
  if (o) {
684
692
  x(o), _("error");
@@ -686,9 +694,9 @@ function Zt(e) {
686
694
  }
687
695
  let s = r;
688
696
  if (t.display?.crop_on_upload) try {
689
- let { blob: e, filename: n } = await Jt()({
697
+ let { blob: e, filename: n } = await Xt()({
690
698
  file: r,
691
- aspectRatio: tn(t.display.aspect_ratio)
699
+ aspectRatio: rn(t.display.aspect_ratio)
692
700
  });
693
701
  s = new File([e], n, { type: e.type || r.type });
694
702
  } catch (e) {
@@ -706,7 +714,7 @@ function Zt(e) {
706
714
  let c = new AbortController();
707
715
  E.current = c;
708
716
  try {
709
- let r = await ge({
717
+ let r = await he({
710
718
  file: s,
711
719
  entityCode: e.entityCode,
712
720
  fieldCode: d ?? n,
@@ -757,13 +765,13 @@ function Zt(e) {
757
765
  A,
758
766
  d,
759
767
  p
760
- ]), F = W(() => {
768
+ ]), F = G(() => {
761
769
  h === "uploading" && E.current && (D.current = !0, E.current.abort(), E.current = null, _("idle"), y(null)), S && (f(S).catch(() => {}), A(S), C(null));
762
770
  }, [
763
771
  h,
764
772
  S,
765
773
  A
766
- ]), I = W(() => {
774
+ ]), I = G(() => {
767
775
  m && j(m.id) && (f(m.id).catch(() => {}), A(m.id), C(null)), a?.(t.mode === "array" ? [] : null);
768
776
  }, [
769
777
  m,
@@ -771,30 +779,30 @@ function Zt(e) {
771
779
  j,
772
780
  a,
773
781
  A
774
- ]), L = W(() => {
782
+ ]), L = G(() => {
775
783
  x(null), _("idle"), O.current?.click();
776
- }, []), ee = W(() => {
784
+ }, []), R = G(() => {
777
785
  c || O.current?.click();
778
- }, [c]), R = W((e) => {
779
- c || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), ee());
780
- }, [c, ee]), te = W((e) => {
786
+ }, [c]), z = G((e) => {
787
+ c || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), R());
788
+ }, [c, R]), ee = G((e) => {
781
789
  c || (e.preventDefault(), e.dataTransfer.dropEffect = "copy");
782
- }, [c]), z = W((e) => {
790
+ }, [c]), B = G((e) => {
783
791
  if (c) return;
784
792
  e.preventDefault();
785
793
  let t = e.dataTransfer.files?.[0];
786
794
  t && P(t);
787
- }, [c, P]), ne = W((e) => {
795
+ }, [c, P]), te = G((e) => {
788
796
  let t = e.target.files?.[0];
789
797
  e.target.value = "", t && P(t);
790
- }, [P]), re = u.aspectRatio ?? en(u.shape, t.display?.aspect_ratio), B = ye(m), ie = {
791
- aspectRatio: re,
798
+ }, [P]), ne = u.aspectRatio ?? nn(u.shape, t.display?.aspect_ratio), V = ve(m), re = {
799
+ aspectRatio: ne,
792
800
  width: u.width ?? (u.shape === "wide" ? "100%" : "120px")
793
- }, V = !!m, ae = Yt(m, t.display?.listable_thumbnail), oe = Se(m, t.display?.listable_thumbnail), se = xe(m?.id, oe, ae), H = o === "display", ce = W((e) => {
801
+ }, H = !!m, ie = Zt(m, t.display?.listable_thumbnail), ae = xe(m, t.display?.listable_thumbnail), U = be(m?.id, ae, ie), oe = o === "display", se = G((e) => {
794
802
  e.stopPropagation(), T((e) => !e);
795
- }, []), le = W((e) => {
803
+ }, []), ce = G((e) => {
796
804
  if (!m || !w) return;
797
- let n = e.currentTarget.getBoundingClientRect(), r = n.width > 0 ? (e.clientX - n.left) / n.width : .5, i = n.height > 0 ? (e.clientY - n.top) / n.height : .5, o = Te(m, {
805
+ let n = e.currentTarget.getBoundingClientRect(), r = n.width > 0 ? (e.clientX - n.left) / n.width : .5, i = n.height > 0 ? (e.clientY - n.top) / n.height : .5, o = we(m, {
798
806
  x: Math.max(0, Math.min(1, r)),
799
807
  y: Math.max(0, Math.min(1, i))
800
808
  });
@@ -805,69 +813,69 @@ function Zt(e) {
805
813
  w,
806
814
  a
807
815
  ]);
808
- return H ? /* @__PURE__ */ X("div", {
809
- className: Qt(u.shape, !1),
810
- style: ie,
816
+ return oe ? /* @__PURE__ */ X("div", {
817
+ className: en(u.shape, !1),
818
+ style: re,
811
819
  "aria-label": M,
812
- children: V && se ? /* @__PURE__ */ X("img", {
813
- src: se,
820
+ children: H && U ? /* @__PURE__ */ X("img", {
821
+ src: U,
814
822
  alt: M,
815
- className: $t(u.shape),
816
- style: { objectPosition: De(B) },
823
+ className: tn(u.shape),
824
+ style: { objectPosition: Ee(V) },
817
825
  loading: "lazy"
818
- }) : /* @__PURE__ */ X(nn, {
826
+ }) : /* @__PURE__ */ X(an, {
819
827
  shape: u.shape,
820
828
  label: M,
821
829
  placeholder: t.display?.placeholder
822
830
  })
823
831
  }) : /* @__PURE__ */ Z("div", {
824
- className: Qt(u.shape, !c),
825
- style: ie,
832
+ className: en(u.shape, !c),
833
+ style: re,
826
834
  tabIndex: c ? -1 : 0,
827
835
  role: "button",
828
836
  "aria-label": M,
829
837
  "aria-disabled": c || void 0,
830
838
  "aria-busy": h === "uploading" || void 0,
831
839
  "aria-invalid": h === "error" || void 0,
832
- onClick: h === "idle" && !V ? ee : void 0,
833
- onMouseDown: w ? le : void 0,
834
- onKeyDown: R,
835
- onDragOver: te,
836
- onDrop: z,
840
+ onClick: h === "idle" && !H ? R : void 0,
841
+ onMouseDown: w ? ce : void 0,
842
+ onKeyDown: z,
843
+ onDragOver: ee,
844
+ onDrop: B,
837
845
  "data-testid": w ? "focal-point-target" : `file-widget-${n}`,
838
846
  children: [
839
847
  /* @__PURE__ */ X("input", {
840
848
  ref: O,
841
849
  type: "file",
842
850
  accept: N,
843
- onChange: ne,
851
+ onChange: te,
844
852
  style: { display: "none" },
845
853
  "data-testid": `file-input-${n}`
846
854
  }),
847
- V && se ? /* @__PURE__ */ X("img", {
848
- src: se,
855
+ H && U ? /* @__PURE__ */ X("img", {
856
+ src: U,
849
857
  alt: M,
850
- className: $t(u.shape),
851
- style: { objectPosition: De(B) },
858
+ className: tn(u.shape),
859
+ style: { objectPosition: Ee(V) },
852
860
  loading: "lazy"
853
- }) : h === "uploading" ? null : /* @__PURE__ */ X(nn, {
861
+ }) : h === "uploading" ? null : /* @__PURE__ */ X(an, {
854
862
  shape: u.shape,
855
863
  label: M,
856
864
  placeholder: t.display?.placeholder
857
865
  }),
858
- h === "uploading" && /* @__PURE__ */ X(rn, { pct: v?.pct ?? 0 }),
866
+ h === "uploading" && /* @__PURE__ */ X(on, { pct: v?.pct ?? 0 }),
859
867
  S && /* @__PURE__ */ X("span", {
860
868
  className: "absolute right-1 top-1 h-2 w-2 rounded-full bg-warning",
861
869
  "aria-hidden": "true",
862
870
  "data-testid": "draft-indicator"
863
871
  }),
864
- V && h === "idle" && !c && /* @__PURE__ */ Z("div", {
872
+ H && h === "idle" && !c && /* @__PURE__ */ Z("div", {
865
873
  className: "absolute inset-0 flex items-center justify-center gap-2 bg-black/40 opacity-0 transition-opacity hover:opacity-100 focus-within:opacity-100",
866
874
  children: [
867
875
  t.display?.focal_point && /* @__PURE__ */ X("button", {
868
876
  type: "button",
869
877
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
870
- onClick: ce,
878
+ onClick: se,
871
879
  "data-testid": "focal-point-toggle",
872
880
  children: w ? "Cancel focus" : "Set focus"
873
881
  }),
@@ -875,7 +883,7 @@ function Zt(e) {
875
883
  type: "button",
876
884
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
877
885
  onClick: (e) => {
878
- e.stopPropagation(), ee();
886
+ e.stopPropagation(), R();
879
887
  },
880
888
  children: "Change"
881
889
  }),
@@ -889,11 +897,11 @@ function Zt(e) {
889
897
  })
890
898
  ]
891
899
  }),
892
- B && V && /* @__PURE__ */ X("span", {
900
+ V && H && /* @__PURE__ */ X("span", {
893
901
  className: "absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full border border-white bg-black/70",
894
902
  style: {
895
- left: `${B.x * 100}%`,
896
- top: `${B.y * 100}%`
903
+ left: `${V.x * 100}%`,
904
+ top: `${V.y * 100}%`
897
905
  },
898
906
  "data-testid": "focal-point-marker"
899
907
  }),
@@ -926,32 +934,32 @@ function Zt(e) {
926
934
  ]
927
935
  });
928
936
  }
929
- function Qt(e, t) {
937
+ function en(e, t) {
930
938
  return [
931
939
  "relative overflow-hidden border border-border bg-surface-2",
932
940
  e === "circle" ? "rounded-full" : "rounded-md",
933
941
  t ? "cursor-pointer focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent" : ""
934
942
  ].filter(Boolean).join(" ");
935
943
  }
936
- function $t(e) {
944
+ function tn(e) {
937
945
  return "h-full w-full object-cover";
938
946
  }
939
- function en(e, t) {
947
+ function nn(e, t) {
940
948
  return t ? t.replace(":", " / ") : e === "wide" ? "16 / 9" : "1 / 1";
941
949
  }
942
- function tn(e) {
950
+ function rn(e) {
943
951
  if (!e) return;
944
952
  let t = e.replace(/\s/g, "").match(/^(\d+(?:\.\d+)?)[:/](\d+(?:\.\d+)?)$/);
945
953
  if (!t) return;
946
954
  let n = Number(t[1]), r = Number(t[2]);
947
955
  if (!(!n || !r)) return n / r;
948
956
  }
949
- function nn({ shape: e, label: t, placeholder: n }) {
957
+ function an({ shape: e, label: t, placeholder: n }) {
950
958
  return n === "initials" ? /* @__PURE__ */ X("div", {
951
959
  className: "flex h-full w-full items-center justify-center bg-surface-3 text-text-3",
952
960
  children: /* @__PURE__ */ X("span", {
953
961
  className: e === "circle" ? "text-lg font-medium" : "text-base font-medium",
954
- children: Xt(t)
962
+ children: Qt(t)
955
963
  })
956
964
  }) : /* @__PURE__ */ X("div", {
957
965
  className: "flex h-full w-full items-center justify-center bg-surface-3 text-text-4",
@@ -961,7 +969,7 @@ function nn({ shape: e, label: t, placeholder: n }) {
961
969
  })
962
970
  });
963
971
  }
964
- function rn({ pct: e }) {
972
+ function on({ pct: e }) {
965
973
  let t = 2 * Math.PI * 18, n = t - Math.max(0, Math.min(100, e)) / 100 * t;
966
974
  return /* @__PURE__ */ Z("div", {
967
975
  className: "absolute inset-0 flex items-center justify-center bg-black/30",
@@ -1005,57 +1013,57 @@ function rn({ pct: e }) {
1005
1013
  }
1006
1014
  //#endregion
1007
1015
  //#region src/components/file-widgets/SquareImage.tsx
1008
- function an(e) {
1009
- return /* @__PURE__ */ X(Zt, {
1016
+ function sn(e) {
1017
+ return /* @__PURE__ */ X($t, {
1010
1018
  ...e,
1011
1019
  visual: { shape: "square" }
1012
1020
  });
1013
1021
  }
1014
1022
  //#endregion
1015
1023
  //#region src/components/file-widgets/CircleImage.tsx
1016
- function on(e) {
1017
- return /* @__PURE__ */ X(Zt, {
1024
+ function cn(e) {
1025
+ return /* @__PURE__ */ X($t, {
1018
1026
  ...e,
1019
1027
  visual: { shape: "circle" }
1020
1028
  });
1021
1029
  }
1022
1030
  //#endregion
1023
1031
  //#region src/components/file-widgets/WideBanner.tsx
1024
- function sn(e) {
1025
- return /* @__PURE__ */ X(Zt, {
1032
+ function ln(e) {
1033
+ return /* @__PURE__ */ X($t, {
1026
1034
  ...e,
1027
1035
  visual: { shape: "wide" }
1028
1036
  });
1029
1037
  }
1030
1038
  //#endregion
1031
1039
  //#region src/components/file-widgets/GridLazy.tsx
1032
- var cn = Fe(() => import("./Grid-OdquWJNX.js").then((e) => ({ default: e.Grid })));
1033
- function ln() {
1040
+ var un = Fe(() => import("./Grid-CjLFAKMZ.js").then((e) => ({ default: e.Grid })));
1041
+ function dn() {
1034
1042
  return /* @__PURE__ */ X("div", { className: "h-24 w-full rounded-md bg-muted animate-pulse" });
1035
1043
  }
1036
- function un(e) {
1044
+ function fn(e) {
1037
1045
  return /* @__PURE__ */ X(Pe, {
1038
- fallback: /* @__PURE__ */ X(ln, {}),
1039
- children: /* @__PURE__ */ X(cn, { ...e })
1046
+ fallback: /* @__PURE__ */ X(dn, {}),
1047
+ children: /* @__PURE__ */ X(un, { ...e })
1040
1048
  });
1041
1049
  }
1042
1050
  //#endregion
1043
1051
  //#region src/components/file-widgets/DocumentCard.tsx
1044
- function dn({ contentType: e }) {
1052
+ function pn({ contentType: e }) {
1045
1053
  let t = e ? e.includes("pdf") ? "PDF" : e.includes("word") ? "DOC" : e.includes("sheet") || e.includes("excel") ? "XLS" : e.startsWith("image/") ? "IMG" : e.split("/")[1]?.slice(0, 4).toUpperCase() ?? "FILE" : "FILE";
1046
1054
  return /* @__PURE__ */ X("div", {
1047
1055
  className: "flex h-16 w-16 flex-none items-center justify-center rounded-md border border-border bg-surface-3 text-xs font-medium text-muted-foreground",
1048
1056
  children: t
1049
1057
  });
1050
1058
  }
1051
- function fn(e) {
1052
- let { field: t, fieldName: n, value: r, onChange: a, mode: o, disabled: s, uploadFieldCode: c, uploadSlotCode: u } = e, d = Ce(r), [p, m] = J("idle"), [h, _] = J(null), [y, b] = J(null), [x, S] = J(!1), [C, w] = J(d?.filename ?? ""), T = q(null), E = q(!1), D = q(null), { register: O, unregister: k, isDraft: A } = g(), { open: j } = Ee();
1053
- G(() => () => {
1059
+ function mn(e) {
1060
+ let { field: t, fieldName: n, value: r, onChange: a, mode: o, disabled: s, uploadFieldCode: c, uploadSlotCode: u } = e, d = Se(r), [p, m] = Y("idle"), [h, _] = Y(null), [y, b] = Y(null), [x, S] = Y(!1), [C, w] = Y(d?.filename ?? ""), T = J(null), E = J(!1), D = J(null), { register: O, unregister: k, isDraft: A } = g(), { open: j } = Te();
1061
+ K(() => () => {
1054
1062
  T.current && T.current.abort();
1055
- }, []), G(() => {
1063
+ }, []), K(() => {
1056
1064
  w(d?.filename ?? "");
1057
1065
  }, [d?.filename]);
1058
- let M = (t.accepts ?? []).join(","), N = W(async (r) => {
1066
+ let M = (t.accepts ?? []).join(","), N = G(async (r) => {
1059
1067
  let o = i(r, t.accepts, t.max_size_bytes);
1060
1068
  if (o) {
1061
1069
  b(o), m("error");
@@ -1069,7 +1077,7 @@ function fn(e) {
1069
1077
  let s = new AbortController();
1070
1078
  T.current = s;
1071
1079
  try {
1072
- let i = await ge({
1080
+ let i = await he({
1073
1081
  file: r,
1074
1082
  entityCode: e.entityCode,
1075
1083
  fieldCode: c ?? n,
@@ -1118,12 +1126,12 @@ function fn(e) {
1118
1126
  k,
1119
1127
  c,
1120
1128
  u
1121
- ]), P = W(() => {
1129
+ ]), P = G(() => {
1122
1130
  s || D.current?.click();
1123
- }, [s]), F = W((e) => {
1131
+ }, [s]), F = G((e) => {
1124
1132
  let t = e.target.files?.[0];
1125
1133
  e.target.value = "", t && N(t);
1126
- }, [N]), I = W(() => {
1134
+ }, [N]), I = G(() => {
1127
1135
  d && A(d.id) && (f(d.id).catch(() => {}), k(d.id)), a?.(t.mode === "array" ? [] : null);
1128
1136
  }, [
1129
1137
  d,
@@ -1131,13 +1139,13 @@ function fn(e) {
1131
1139
  A,
1132
1140
  a,
1133
1141
  k
1134
- ]), L = W(() => {
1142
+ ]), L = G(() => {
1135
1143
  p === "uploading" && T.current && (E.current = !0, T.current.abort(), T.current = null, m("idle"), _(null));
1136
- }, [p]), ee = W(() => {
1137
- d && j(d.id, "download", we(d));
1138
- }, [d, j]), R = d ? _e(d) : !1, te = W(() => {
1139
- !d || !_e(d) || j(d.id, "preview", ke(d));
1140
- }, [d, j]), z = W(() => {
1144
+ }, [p]), R = G(() => {
1145
+ d && j(d.id, "download", Ce(d));
1146
+ }, [d, j]), z = d ? ge(d) : !1, ee = G(() => {
1147
+ !d || !ge(d) || j(d.id, "preview", Oe(d));
1148
+ }, [d, j]), B = G(() => {
1141
1149
  if (!d) {
1142
1150
  S(!1);
1143
1151
  return;
@@ -1157,18 +1165,18 @@ function fn(e) {
1157
1165
  d,
1158
1166
  a,
1159
1167
  t.mode
1160
- ]), ne = o === "display";
1168
+ ]), te = o === "display";
1161
1169
  return !d && p !== "uploading" ? /* @__PURE__ */ Z("div", {
1162
1170
  "data-testid": `file-widget-${n}`,
1163
1171
  className: "flex items-center gap-3 rounded-md border border-dashed border-border bg-surface p-3",
1164
1172
  children: [
1165
- /* @__PURE__ */ X(dn, {}),
1173
+ /* @__PURE__ */ X(pn, {}),
1166
1174
  /* @__PURE__ */ Z("div", {
1167
1175
  className: "flex flex-col gap-1",
1168
1176
  children: [/* @__PURE__ */ X("span", {
1169
1177
  className: "text-sm text-foreground",
1170
1178
  children: t.display?.placeholder || "No document attached"
1171
- }), !ne && /* @__PURE__ */ X("button", {
1179
+ }), !te && /* @__PURE__ */ X("button", {
1172
1180
  type: "button",
1173
1181
  className: "self-start rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
1174
1182
  onClick: P,
@@ -1177,7 +1185,7 @@ function fn(e) {
1177
1185
  children: "Upload"
1178
1186
  })]
1179
1187
  }),
1180
- !ne && /* @__PURE__ */ X("input", {
1188
+ !te && /* @__PURE__ */ X("input", {
1181
1189
  ref: D,
1182
1190
  type: "file",
1183
1191
  accept: M || void 0,
@@ -1197,7 +1205,7 @@ function fn(e) {
1197
1205
  "aria-busy": p === "uploading" || void 0,
1198
1206
  "aria-invalid": p === "error" || void 0,
1199
1207
  children: [
1200
- /* @__PURE__ */ X(dn, { contentType: d?.content_type }),
1208
+ /* @__PURE__ */ X(pn, { contentType: d?.content_type }),
1201
1209
  /* @__PURE__ */ Z("div", {
1202
1210
  className: "flex min-w-0 flex-1 flex-col gap-1",
1203
1211
  children: [
@@ -1207,16 +1215,16 @@ function fn(e) {
1207
1215
  value: C,
1208
1216
  autoFocus: !0,
1209
1217
  onChange: (e) => w(e.target.value),
1210
- onBlur: z,
1218
+ onBlur: B,
1211
1219
  onKeyDown: (e) => {
1212
- e.key === "Enter" ? z() : e.key === "Escape" && (S(!1), w(d.filename));
1220
+ e.key === "Enter" ? B() : e.key === "Escape" && (S(!1), w(d.filename));
1213
1221
  },
1214
1222
  "data-testid": "filename-input"
1215
1223
  }) : /* @__PURE__ */ X("button", {
1216
1224
  type: "button",
1217
1225
  className: "truncate text-left text-sm font-medium text-foreground hover:underline",
1218
- onClick: () => !ne && d && S(!0),
1219
- disabled: ne || s || !d,
1226
+ onClick: () => !te && d && S(!0),
1227
+ disabled: te || s || !d,
1220
1228
  title: d?.filename,
1221
1229
  "data-testid": "filename",
1222
1230
  children: d?.filename ?? "Uploading…"
@@ -1226,7 +1234,7 @@ function fn(e) {
1226
1234
  children: [
1227
1235
  d && /* @__PURE__ */ X("span", { children: v(d.size_bytes) }),
1228
1236
  d?.page_count != null && /* @__PURE__ */ Z("span", { children: [d.page_count, " pages"] }),
1229
- d?.uploaded_at && /* @__PURE__ */ X("span", { children: pn(d.uploaded_at) }),
1237
+ d?.uploaded_at && /* @__PURE__ */ X("span", { children: hn(d.uploaded_at) }),
1230
1238
  d?.uploaded_by && /* @__PURE__ */ Z("span", { children: ["by ", d.uploaded_by] }),
1231
1239
  d?.version?.number != null && /* @__PURE__ */ Z("span", {
1232
1240
  "data-testid": "version-badge",
@@ -1256,24 +1264,24 @@ function fn(e) {
1256
1264
  }),
1257
1265
  /* @__PURE__ */ Z("div", {
1258
1266
  className: "flex flex-none items-center gap-1",
1259
- children: [d && p !== "uploading" && /* @__PURE__ */ Z(Y, { children: [
1267
+ children: [d && p !== "uploading" && /* @__PURE__ */ Z(We, { children: [
1260
1268
  /* @__PURE__ */ X("button", {
1261
1269
  type: "button",
1262
1270
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
1263
- onClick: ee,
1271
+ onClick: R,
1264
1272
  "data-testid": "download",
1265
1273
  children: "Download"
1266
1274
  }),
1267
1275
  /* @__PURE__ */ X("button", {
1268
1276
  type: "button",
1269
1277
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",
1270
- onClick: te,
1271
- disabled: !R,
1272
- title: R ? void 0 : "Preview is available only for images and PDFs",
1278
+ onClick: ee,
1279
+ disabled: !z,
1280
+ title: z ? void 0 : "Preview is available only for images and PDFs",
1273
1281
  "data-testid": "preview",
1274
1282
  children: "Preview"
1275
1283
  }),
1276
- !ne && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("button", {
1284
+ !te && /* @__PURE__ */ Z(We, { children: [/* @__PURE__ */ X("button", {
1277
1285
  type: "button",
1278
1286
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
1279
1287
  onClick: P,
@@ -1296,7 +1304,7 @@ function fn(e) {
1296
1304
  children: "Cancel"
1297
1305
  })]
1298
1306
  }),
1299
- !ne && /* @__PURE__ */ X("input", {
1307
+ !te && /* @__PURE__ */ X("input", {
1300
1308
  ref: D,
1301
1309
  type: "file",
1302
1310
  accept: M || void 0,
@@ -1307,25 +1315,25 @@ function fn(e) {
1307
1315
  ]
1308
1316
  });
1309
1317
  }
1310
- function pn(e) {
1318
+ function hn(e) {
1311
1319
  let t = new Date(e);
1312
1320
  return isNaN(t.getTime()) ? e : t.toISOString().slice(0, 10);
1313
1321
  }
1314
1322
  //#endregion
1315
1323
  //#region src/components/file-widgets/FileList.tsx
1316
- function mn(e) {
1324
+ function gn(e) {
1317
1325
  return e ? (e.split("/")[1] ?? e).toUpperCase().slice(0, 6) : "";
1318
1326
  }
1319
- function hn(e) {
1320
- let { field: t, fieldName: n, value: r, onChange: a, mode: o, disabled: s } = e, c = Oe(r), [u, d] = J([]), { register: p, unregister: m, isDraft: h } = g(), _ = q(c);
1327
+ function _n(e) {
1328
+ let { field: t, fieldName: n, value: r, onChange: a, mode: o, disabled: s } = e, c = De(r), [u, d] = Y([]), { register: p, unregister: m, isDraft: h } = g(), _ = J(c);
1321
1329
  _.current = c;
1322
- let y = q(null), b = q(/* @__PURE__ */ new Set()), x = q([]);
1330
+ let y = J(null), b = J(/* @__PURE__ */ new Set()), x = J([]);
1323
1331
  x.current = u;
1324
- let { open: S } = Ee();
1325
- G(() => () => {
1332
+ let { open: S } = Te();
1333
+ K(() => () => {
1326
1334
  x.current.forEach((e) => e.abort());
1327
1335
  }, []);
1328
- let C = (t.accepts ?? []).join(","), w = o === "display", T = W(async (r) => {
1336
+ let C = (t.accepts ?? []).join(","), w = o === "display", T = G(async (r) => {
1329
1337
  let o = i(r, t.accepts, t.max_size_bytes), s = `row-${Math.random().toString(36).slice(2)}-${Date.now()}`, c = new AbortController();
1330
1338
  if (o) {
1331
1339
  d((e) => [...e, {
@@ -1349,7 +1357,7 @@ function hn(e) {
1349
1357
  abort: () => c.abort()
1350
1358
  }]);
1351
1359
  try {
1352
- let t = await ge({
1360
+ let t = await he({
1353
1361
  file: r,
1354
1362
  entityCode: e.entityCode,
1355
1363
  fieldCode: n,
@@ -1403,22 +1411,22 @@ function hn(e) {
1403
1411
  e.entityCode,
1404
1412
  p,
1405
1413
  m
1406
- ]), E = W((e) => {
1414
+ ]), E = G((e) => {
1407
1415
  Array.from(e).forEach((e) => void T(e));
1408
- }, [T]), D = W(() => {
1416
+ }, [T]), D = G(() => {
1409
1417
  s || y.current?.click();
1410
- }, [s]), O = W((e) => {
1418
+ }, [s]), O = G((e) => {
1411
1419
  let t = e.target.files;
1412
1420
  e.target.value = "", t && t.length > 0 && E(t);
1413
- }, [E]), k = W((e) => {
1421
+ }, [E]), k = G((e) => {
1414
1422
  h(e) && (f(e).catch(() => {}), m(e)), a?.(c.filter((t) => t.id !== e));
1415
1423
  }, [
1416
1424
  h,
1417
1425
  c,
1418
1426
  a,
1419
1427
  m
1420
- ]), A = W((e) => {
1421
- S(e.id, "download", we(e));
1428
+ ]), A = G((e) => {
1429
+ S(e.id, "download", Ce(e));
1422
1430
  }, [S]);
1423
1431
  return /* @__PURE__ */ Z("div", {
1424
1432
  "data-testid": `file-widget-${n}`,
@@ -1436,7 +1444,7 @@ function hn(e) {
1436
1444
  children: [
1437
1445
  /* @__PURE__ */ X("span", {
1438
1446
  className: "flex-none rounded-sm border border-border bg-surface-3 px-1.5 py-0.5 text-[10px] text-muted-foreground",
1439
- children: mn(e.content_type)
1447
+ children: gn(e.content_type)
1440
1448
  }),
1441
1449
  /* @__PURE__ */ X("button", {
1442
1450
  type: "button",
@@ -1501,7 +1509,7 @@ function hn(e) {
1501
1509
  ]
1502
1510
  }, e.localId))
1503
1511
  ]
1504
- }), !w && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("button", {
1512
+ }), !w && /* @__PURE__ */ Z(We, { children: [/* @__PURE__ */ X("button", {
1505
1513
  type: "button",
1506
1514
  className: "self-start rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
1507
1515
  onClick: D,
@@ -1521,16 +1529,16 @@ function hn(e) {
1521
1529
  }
1522
1530
  //#endregion
1523
1531
  //#region src/components/file-widgets/LabeledSlots.tsx
1524
- function gn(e) {
1532
+ function vn(e) {
1525
1533
  return !e || Array.isArray(e) || typeof e != "object" ? {} : e;
1526
1534
  }
1527
- function _n(e) {
1535
+ function yn(e) {
1528
1536
  return e.split("_").filter(Boolean).map((e) => e.slice(0, 1).toUpperCase() + e.slice(1)).join(" ");
1529
1537
  }
1530
- function vn(e, t) {
1538
+ function bn(e, t) {
1531
1539
  return t?.content_type?.startsWith("image/") ? !0 : (e?.accepts ?? []).some((e) => e === "image/*" || e.startsWith("image/"));
1532
1540
  }
1533
- function yn(e, t, n, r) {
1541
+ function xn(e, t, n, r) {
1534
1542
  return {
1535
1543
  ...e,
1536
1544
  name: `${e.name}.${t}`,
@@ -1540,14 +1548,14 @@ function yn(e, t, n, r) {
1540
1548
  slots: void 0,
1541
1549
  display: {
1542
1550
  ...e.display ?? { widget: "document_card" },
1543
- widget: vn(n, r) ? "square_image" : "document_card",
1551
+ widget: bn(n, r) ? "square_image" : "document_card",
1544
1552
  aspect_ratio: n?.aspect_ratio ?? e.display?.aspect_ratio,
1545
- placeholder: e.display?.placeholder ?? _n(t)
1553
+ placeholder: e.display?.placeholder ?? yn(t)
1546
1554
  }
1547
1555
  };
1548
1556
  }
1549
- function bn(e) {
1550
- let { field: t, fieldName: n, entityCode: r, value: i, onChange: a, mode: o, disabled: s } = e, c = Object.entries(t.slots ?? {}), l = gn(i);
1557
+ function Sn(e) {
1558
+ let { field: t, fieldName: n, entityCode: r, value: i, onChange: a, mode: o, disabled: s } = e, c = Object.entries(t.slots ?? {}), l = vn(i);
1551
1559
  return c.length === 0 ? /* @__PURE__ */ X("span", {
1552
1560
  className: "text-sm text-muted-foreground",
1553
1561
  children: "No slots configured"
@@ -1557,7 +1565,7 @@ function bn(e) {
1557
1565
  gap: 12
1558
1566
  },
1559
1567
  children: c.map(([e, i]) => {
1560
- let c = l[e] ?? null, u = yn(t, e, i, c), d = u.display?.widget ?? "document_card", f = Ut(d);
1568
+ let c = l[e] ?? null, u = xn(t, e, i, c), d = u.display?.widget ?? "document_card", f = Gt(d);
1561
1569
  return f ? /* @__PURE__ */ Z("div", {
1562
1570
  style: {
1563
1571
  display: "grid",
@@ -1569,7 +1577,7 @@ function bn(e) {
1569
1577
  fontWeight: 600,
1570
1578
  color: "var(--text-2)"
1571
1579
  },
1572
- children: _n(e)
1580
+ children: yn(e)
1573
1581
  }), /* @__PURE__ */ X(f, {
1574
1582
  field: u,
1575
1583
  fieldName: e,
@@ -1597,7 +1605,7 @@ function bn(e) {
1597
1605
  fontWeight: 600,
1598
1606
  color: "var(--text-2)"
1599
1607
  },
1600
- children: _n(e)
1608
+ children: yn(e)
1601
1609
  }), /* @__PURE__ */ X("span", {
1602
1610
  className: "text-sm text-muted-foreground",
1603
1611
  children: `Unknown file widget: ${d}`
@@ -1608,43 +1616,43 @@ function bn(e) {
1608
1616
  }
1609
1617
  //#endregion
1610
1618
  //#region src/components/file-widgets/builtins.ts
1611
- var xn = !1;
1612
- function Sn() {
1613
- xn ||= (Ht("square_image", an), Ht("circle_image", on), Ht("wide_banner", sn), Ht("grid", un), Ht("document_card", fn), Ht("file_list", hn), Ht("labeled_slots", bn), !0);
1619
+ var Cn = !1;
1620
+ function wn() {
1621
+ Cn ||= (Wt("square_image", sn), Wt("circle_image", cn), Wt("wide_banner", ln), Wt("grid", fn), Wt("document_card", mn), Wt("file_list", _n), Wt("labeled_slots", Sn), !0);
1614
1622
  }
1615
1623
  //#endregion
1616
1624
  //#region src/components/file-widgets/host.tsx
1617
- Sn();
1618
- function Cn(e, t) {
1625
+ wn();
1626
+ function Tn(e, t) {
1619
1627
  return e.files?.get(t);
1620
1628
  }
1621
- function wn(e, t) {
1629
+ function En(e, t) {
1622
1630
  return Object.prototype.hasOwnProperty.call(e, t) ? e[t] ?? null : e.$files?.[t] ?? null;
1623
1631
  }
1624
- function Tn(e, t, n) {
1625
- if (Cn(e, n)) return wn(t, n);
1632
+ function Dn(e, t, n) {
1633
+ if (Tn(e, n)) return En(t, n);
1626
1634
  let r = e.fields.get(n);
1627
- return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? E(t[n], wn(t, n)) : t[n];
1635
+ return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? E(t[n], En(t, n)) : t[n];
1628
1636
  }
1629
- function En(e, t, n) {
1637
+ function On(e, t, n) {
1630
1638
  let r = e.fields.get(t);
1631
1639
  return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? D(n) : n;
1632
1640
  }
1633
- function Dn(e, t, n) {
1634
- let r = Cn(e, t);
1641
+ function kn(e, t, n) {
1642
+ let r = Tn(e, t);
1635
1643
  if (r) return r.name || t;
1636
1644
  let i = e.fields.get(t);
1637
1645
  return i ? b(i, t, n) : t;
1638
1646
  }
1639
- function On(e) {
1640
- let { entity: t, entityCode: n, fieldName: r, record: i, mode: a, onChange: o, refs: s, disabled: c, surface: l, entities: u, screens: d, locale: f, fieldId: p, labelId: m, structure: h } = e, g = Cn(t, r);
1647
+ function An(e) {
1648
+ let { entity: t, entityCode: n, fieldName: r, record: i, mode: a, onChange: o, refs: s, disabled: c, surface: l, entities: u, screens: d, locale: f, fieldId: p, labelId: m, structure: h } = e, g = Tn(t, r);
1641
1649
  if (g) {
1642
- let e = g.display?.widget ?? "", t = Ut(e);
1650
+ let e = g.display?.widget ?? "", t = Gt(e);
1643
1651
  return t ? /* @__PURE__ */ X(t, {
1644
1652
  field: g,
1645
1653
  fieldName: r,
1646
1654
  entityCode: n,
1647
- value: wn(i, r),
1655
+ value: En(i, r),
1648
1656
  mode: a,
1649
1657
  onChange: o,
1650
1658
  disabled: c,
@@ -1658,11 +1666,11 @@ function On(e) {
1658
1666
  ..._,
1659
1667
  structure: h
1660
1668
  } : _;
1661
- return v ? z({
1669
+ return v ? B({
1662
1670
  field: v,
1663
1671
  entityCode: n,
1664
1672
  fieldName: r,
1665
- value: Tn(t, i, r),
1673
+ value: Dn(t, i, r),
1666
1674
  mode: a,
1667
1675
  onChange: o,
1668
1676
  record: i,
@@ -1678,80 +1686,80 @@ function On(e) {
1678
1686
  }
1679
1687
  //#endregion
1680
1688
  //#region src/components/file-widgets/payload.ts
1681
- function kn(e) {
1689
+ function jn(e) {
1682
1690
  return !e || Array.isArray(e) ? null : e;
1683
1691
  }
1684
- function An(e) {
1692
+ function Mn(e) {
1685
1693
  return Array.isArray(e) ? e : [];
1686
1694
  }
1687
- function jn(e) {
1695
+ function Nn(e) {
1688
1696
  return !e || Array.isArray(e) || typeof e != "object" ? {} : e;
1689
1697
  }
1690
- function Mn(e, t) {
1691
- return e.mode === "array" ? An(t) : e.mode === "named_map" ? jn(t) : kn(t);
1698
+ function Pn(e, t) {
1699
+ return e.mode === "array" ? Mn(t) : e.mode === "named_map" ? Nn(t) : jn(t);
1692
1700
  }
1693
- function Nn(e, t, n, r) {
1701
+ function Fn(e, t, n, r) {
1694
1702
  let i = {
1695
1703
  file_id: e.id,
1696
1704
  filename: e.filename
1697
1705
  };
1698
1706
  return r && (i.slot = r), n && (i.position = t), e.metadata !== void 0 && (i.metadata = e.metadata), i;
1699
1707
  }
1700
- function Pn(e, t) {
1708
+ function In(e, t) {
1701
1709
  if (e.mode === "array") {
1702
- let e = An(t);
1703
- return e.length === 0 ? { clear: !0 } : { set: e.map((e, t) => Nn(e, t, !0)) };
1710
+ let e = Mn(t);
1711
+ return e.length === 0 ? { clear: !0 } : { set: e.map((e, t) => Fn(e, t, !0)) };
1704
1712
  }
1705
1713
  if (e.mode === "named_map") {
1706
- let e = jn(t), n = Object.entries(e).filter(([, e]) => e != null).map(([e, t]) => Nn(t, 0, !1, e));
1714
+ let e = Nn(t), n = Object.entries(e).filter(([, e]) => e != null).map(([e, t]) => Fn(t, 0, !1, e));
1707
1715
  return n.length === 0 ? { clear: !0 } : { set: n };
1708
1716
  }
1709
- let n = kn(t);
1710
- return n ? { set: [Nn(n, 0, !0)] } : { clear: !0 };
1717
+ let n = jn(t);
1718
+ return n ? { set: [Fn(n, 0, !0)] } : { clear: !0 };
1711
1719
  }
1712
- function Fn(e) {
1720
+ function Ln(e) {
1713
1721
  return JSON.stringify(e);
1714
1722
  }
1715
- function In(e) {
1723
+ function Rn(e) {
1716
1724
  let { entity: t, formData: n, record: r, isNew: i } = e, a = {};
1717
1725
  for (let e of t.files?.names() ?? []) {
1718
1726
  if (!Object.prototype.hasOwnProperty.call(n, e)) continue;
1719
- let o = Cn(t, e);
1727
+ let o = Tn(t, e);
1720
1728
  if (!o) continue;
1721
- let s = Mn(o, n[e]);
1729
+ let s = Pn(o, n[e]);
1722
1730
  if (i) {
1723
- if (o.mode === "array" ? An(s).length === 0 : o.mode === "named_map" ? Object.values(jn(s)).every((e) => e == null) : kn(s) == null) continue;
1724
- a[e] = Pn(o, s);
1731
+ if (o.mode === "array" ? Mn(s).length === 0 : o.mode === "named_map" ? Object.values(Nn(s)).every((e) => e == null) : jn(s) == null) continue;
1732
+ a[e] = In(o, s);
1725
1733
  continue;
1726
1734
  }
1727
- let c = Mn(o, r ? wn(r, e) : null), l = Pn(o, s), u = Pn(o, c);
1728
- Fn(l) !== Fn(u) && (a[e] = l);
1735
+ let c = Pn(o, r ? En(r, e) : null), l = In(o, s), u = In(o, c);
1736
+ Ln(l) !== Ln(u) && (a[e] = l);
1729
1737
  }
1730
1738
  let o = t.fields;
1731
1739
  if (!o) return a;
1732
1740
  for (let e of o.names()) {
1733
1741
  let s = o.get(e)?.files;
1734
1742
  if (!s || s.mode !== "rich_text_inline" || !Object.prototype.hasOwnProperty.call(n, e)) continue;
1735
- let c = Rn(s, n[e]);
1743
+ let c = Bn(s, n[e]);
1736
1744
  if (i) {
1737
1745
  if (c.clear) continue;
1738
1746
  a[e] = c;
1739
1747
  continue;
1740
1748
  }
1741
- let l = Rn(s, r ? Tn({
1749
+ let l = Bn(s, r ? Dn({
1742
1750
  ...t,
1743
1751
  fields: o
1744
1752
  }, r, e) : null);
1745
- Fn(c) !== Fn(l) && (a[e] = c);
1753
+ Ln(c) !== Ln(l) && (a[e] = c);
1746
1754
  }
1747
1755
  return a;
1748
1756
  }
1749
- function Ln(e) {
1757
+ function zn(e) {
1750
1758
  let t = [];
1751
1759
  for (let n of Object.values(e)) for (let e of n.set ?? []) t.push(e.file_id);
1752
1760
  return t;
1753
1761
  }
1754
- function Rn(e, t) {
1762
+ function Bn(e, t) {
1755
1763
  if (e.mode !== "rich_text_inline") return { clear: !0 };
1756
1764
  let n = T(D(t));
1757
1765
  return n.length === 0 ? { clear: !0 } : { set: n.map((e, t) => ({
@@ -1759,24 +1767,24 @@ function Rn(e, t) {
1759
1767
  position: t
1760
1768
  })) };
1761
1769
  }
1762
- var zn = 1200, Bn = null, Vn = null;
1763
- function Hn() {
1764
- return !Bn || !Vn ? null : `declarion::${Bn}::${Vn}::listlayout`;
1770
+ var Vn = 1200, Hn = null, Un = null;
1771
+ function Wn() {
1772
+ return !Hn || !Un ? null : `declarion::${Hn}::${Un}::listlayout`;
1765
1773
  }
1766
- function Un() {
1774
+ function Gn() {
1767
1775
  return {
1768
1776
  v: 2,
1769
1777
  widths: {},
1770
1778
  resizeEduShown: !1
1771
1779
  };
1772
1780
  }
1773
- function Wn(e) {
1781
+ function Kn(e) {
1774
1782
  if (typeof e != "object" || !e) return {};
1775
1783
  let t = {};
1776
1784
  for (let [n, r] of Object.entries(e)) typeof r == "number" && Number.isFinite(r) && r >= 60 && (t[n] = r);
1777
1785
  return t;
1778
1786
  }
1779
- function Gn(e) {
1787
+ function qn(e) {
1780
1788
  let t;
1781
1789
  try {
1782
1790
  t = JSON.parse(e);
@@ -1787,21 +1795,21 @@ function Gn(e) {
1787
1795
  let n = t;
1788
1796
  if (n.v !== 2) return null;
1789
1797
  let r = {};
1790
- if (n.widths && typeof n.widths == "object") for (let [e, t] of Object.entries(n.widths)) r[e] = Wn(t);
1798
+ if (n.widths && typeof n.widths == "object") for (let [e, t] of Object.entries(n.widths)) r[e] = Kn(t);
1791
1799
  return {
1792
1800
  v: 2,
1793
1801
  widths: r,
1794
1802
  resizeEduShown: n.resizeEduShown === !0
1795
1803
  };
1796
1804
  }
1797
- function Kn(e) {
1805
+ function Jn(e) {
1798
1806
  if (typeof window > "u") return;
1799
- let t = Hn();
1807
+ let t = Wn();
1800
1808
  if (t) try {
1801
1809
  localStorage.setItem(t, JSON.stringify(e));
1802
1810
  } catch {}
1803
1811
  }
1804
- function qn(e, t) {
1812
+ function Yn(e, t) {
1805
1813
  return {
1806
1814
  v: 2,
1807
1815
  widths: {
@@ -1811,29 +1819,29 @@ function qn(e, t) {
1811
1819
  resizeEduShown: e.resizeEduShown || t.resizeEduShown
1812
1820
  };
1813
1821
  }
1814
- function Jn(e) {
1815
- return Math.min(zn, Math.max(60, Math.round(e)));
1822
+ function Xn(e) {
1823
+ return Math.min(Vn, Math.max(60, Math.round(e)));
1816
1824
  }
1817
- var Yn = We((e) => ({
1818
- ...Un(),
1825
+ var Zn = Ge((e) => ({
1826
+ ...Gn(),
1819
1827
  setScope: (e, t) => {
1820
- Bn = e, Vn = t;
1828
+ Hn = e, Un = t;
1821
1829
  },
1822
1830
  hydrate: () => {
1823
1831
  if (typeof window > "u") return;
1824
- let t = Hn();
1832
+ let t = Wn();
1825
1833
  if (!t) {
1826
- e(Un());
1834
+ e(Gn());
1827
1835
  return;
1828
1836
  }
1829
1837
  let n = localStorage.getItem(t);
1830
- e((n ? Gn(n) : null) ?? Un());
1838
+ e((n ? qn(n) : null) ?? Gn());
1831
1839
  },
1832
1840
  setWidth: (t, n, r) => {
1833
1841
  e((e) => {
1834
1842
  let i = {
1835
1843
  ...e.widths[t] ?? {},
1836
- [n]: Jn(r)
1844
+ [n]: Xn(r)
1837
1845
  }, a = {
1838
1846
  ...e,
1839
1847
  widths: {
@@ -1841,13 +1849,13 @@ var Yn = We((e) => ({
1841
1849
  [t]: i
1842
1850
  }
1843
1851
  };
1844
- return Kn(a), a;
1852
+ return Jn(a), a;
1845
1853
  });
1846
1854
  },
1847
1855
  setWidths: (t, n) => {
1848
1856
  e((e) => {
1849
1857
  let r = {};
1850
- for (let [e, t] of Object.entries(n)) r[e] = Jn(t);
1858
+ for (let [e, t] of Object.entries(n)) r[e] = Xn(t);
1851
1859
  let i = {
1852
1860
  ...e.widths[t] ?? {},
1853
1861
  ...r
@@ -1858,7 +1866,7 @@ var Yn = We((e) => ({
1858
1866
  [t]: i
1859
1867
  }
1860
1868
  };
1861
- return Kn(a), a;
1869
+ return Jn(a), a;
1862
1870
  });
1863
1871
  },
1864
1872
  resetWidths: (t) => {
@@ -1870,7 +1878,7 @@ var Yn = We((e) => ({
1870
1878
  [t]: {}
1871
1879
  }
1872
1880
  };
1873
- return Kn(n), n;
1881
+ return Jn(n), n;
1874
1882
  });
1875
1883
  },
1876
1884
  prune: (t, n) => {
@@ -1888,7 +1896,7 @@ var Yn = We((e) => ({
1888
1896
  [t]: i
1889
1897
  }
1890
1898
  };
1891
- return Kn(o), o;
1899
+ return Jn(o), o;
1892
1900
  });
1893
1901
  },
1894
1902
  markResizeEduShown: () => {
@@ -1898,49 +1906,49 @@ var Yn = We((e) => ({
1898
1906
  ...e,
1899
1907
  resizeEduShown: !0
1900
1908
  };
1901
- return Kn(t), t;
1909
+ return Jn(t), t;
1902
1910
  });
1903
1911
  }
1904
- })), Xn = !1;
1905
- function Zn() {
1906
- typeof window > "u" || Xn || (Xn = !0, window.addEventListener("storage", (e) => {
1907
- let t = Hn();
1912
+ })), Qn = !1;
1913
+ function $n() {
1914
+ typeof window > "u" || Qn || (Qn = !0, window.addEventListener("storage", (e) => {
1915
+ let t = Wn();
1908
1916
  if (!t || e.key !== t || e.newValue == null) return;
1909
- let n = Gn(e.newValue);
1910
- n && Yn.setState((e) => qn(e, n));
1917
+ let n = qn(e.newValue);
1918
+ n && Zn.setState((e) => Yn(e, n));
1911
1919
  }));
1912
1920
  }
1913
- var Qn = {}, $n = () => {};
1914
- function er(e) {
1915
- let t = !!e && Hn() !== null, n = Yn((t) => e ? t.widths[e] : void 0), r = Yn((e) => e.resizeEduShown === !0), i = W((n, r) => {
1916
- t && e && Yn.getState().setWidth(e, n, r);
1917
- }, [t, e]), a = W((n) => {
1918
- t && e && Yn.getState().setWidths(e, n);
1919
- }, [t, e]), o = W(() => {
1920
- t && e && Yn.getState().resetWidths(e);
1921
- }, [t, e]), s = W((n) => {
1922
- t && e && Yn.getState().prune(e, n);
1923
- }, [t, e]), c = W(() => {
1924
- t && Yn.getState().markResizeEduShown();
1921
+ var er = {}, tr = () => {};
1922
+ function nr(e) {
1923
+ let t = !!e && Wn() !== null, n = Zn((t) => e ? t.widths[e] : void 0), r = Zn((e) => e.resizeEduShown === !0), i = G((n, r) => {
1924
+ t && e && Zn.getState().setWidth(e, n, r);
1925
+ }, [t, e]), a = G((n) => {
1926
+ t && e && Zn.getState().setWidths(e, n);
1927
+ }, [t, e]), o = G(() => {
1928
+ t && e && Zn.getState().resetWidths(e);
1929
+ }, [t, e]), s = G((n) => {
1930
+ t && e && Zn.getState().prune(e, n);
1931
+ }, [t, e]), c = G(() => {
1932
+ t && Zn.getState().markResizeEduShown();
1925
1933
  }, [t]);
1926
1934
  return {
1927
- widths: t ? n ?? Qn : Qn,
1935
+ widths: t ? n ?? er : er,
1928
1936
  resizeEduShown: r,
1929
- setWidth: t ? i : $n,
1930
- setWidths: t ? a : $n,
1931
- resetWidths: t ? o : $n,
1932
- prune: t ? s : $n,
1933
- markResizeEduShown: t ? c : $n
1937
+ setWidth: t ? i : tr,
1938
+ setWidths: t ? a : tr,
1939
+ resetWidths: t ? o : tr,
1940
+ prune: t ? s : tr,
1941
+ markResizeEduShown: t ? c : tr
1934
1942
  };
1935
1943
  }
1936
1944
  //#endregion
1937
1945
  //#region src/hooks/useChildrenData.ts
1938
- var tr = "entity-children";
1939
- function nr(e, t, n, r, i, a) {
1946
+ var rr = "entity-children";
1947
+ function ir(e, t, n, r, i, a) {
1940
1948
  let s = Array.isArray(r) ? r : [r], l = Array.isArray(r) ? o(t, s.length) : [t];
1941
1949
  return He({
1942
1950
  queryKey: [
1943
- tr,
1951
+ rr,
1944
1952
  e,
1945
1953
  t,
1946
1954
  n,
@@ -1962,7 +1970,7 @@ function nr(e, t, n, r, i, a) {
1962
1970
  }
1963
1971
  //#endregion
1964
1972
  //#region src/stores/realtime.ts
1965
- var rr = We((e, t) => ({
1973
+ var ar = Ge((e, t) => ({
1966
1974
  degradedEntities: /* @__PURE__ */ new Set(),
1967
1975
  markDegraded: (n) => {
1968
1976
  if (!n || t().degradedEntities.has(n)) return;
@@ -1970,16 +1978,16 @@ var rr = We((e, t) => ({
1970
1978
  r.add(n), e({ degradedEntities: r });
1971
1979
  }
1972
1980
  }));
1973
- function ir(e, t, n) {
1981
+ function or(e, t, n) {
1974
1982
  return e === !0 && !t.has(n);
1975
1983
  }
1976
1984
  //#endregion
1977
1985
  //#region src/hooks/useAssociatedData.ts
1978
- function ar(e, t, n, r, i, a, o, s) {
1986
+ function sr(e, t, n, r, i, a, o, s) {
1979
1987
  let l = s ? JSON.stringify(Object.entries(s).sort()) : void 0;
1980
1988
  return Be({
1981
1989
  queryKey: [
1982
- tr,
1990
+ rr,
1983
1991
  e,
1984
1992
  t,
1985
1993
  n,
@@ -2008,19 +2016,19 @@ function ar(e, t, n, r, i, a, o, s) {
2008
2016
  }
2009
2017
  //#endregion
2010
2018
  //#region src/components/shared/ActionButton.tsx
2011
- function or({ actionCode: n, action: i, entityCode: o, objectIds: s = [], row: c, variant: l = "outline", size: u = "default", onSuccess: d }) {
2012
- let [f, p] = J(!1), [m, g] = J(!1), { data: _ } = r(), v = Bt(), { run: y } = te(), b = S(i), x = !c || N(i.conditions, c), w = W(async () => {
2019
+ function cr({ actionCode: n, action: i, entityCode: o, objectIds: s = [], row: c, variant: l = "outline", size: u = "default", onSuccess: d }) {
2020
+ let [f, p] = Y(!1), [m, g] = Y(!1), { data: _ } = r(), v = Vt(), { run: y } = ee(), b = S(i), x = !c || N(i.conditions, c), w = G(async () => {
2013
2021
  if (!(!i.association || s.length === 0)) {
2014
2022
  p(!0);
2015
2023
  try {
2016
- let e = o ? `${o}.${i.association}` : i.association, t = await pe(e, s), n = a(_, t.target_entity);
2024
+ let e = o ? `${o}.${i.association}` : i.association, t = await fe(e, s), n = a(_, t.target_entity);
2017
2025
  if (!n) {
2018
- H.error(`No list screen found for ${t.target_entity}`);
2026
+ U.error(`No list screen found for ${t.target_entity}`);
2019
2027
  return;
2020
2028
  }
2021
2029
  let r = _?.entities[t.target_entity], c = C(i.display?.name) || t.target_entity;
2022
2030
  if (t.ids.length === 0) {
2023
- H.info(`No related ${c} found`);
2031
+ U.info(`No related ${c} found`);
2024
2032
  return;
2025
2033
  }
2026
2034
  let l = r?.fields.names().find((e) => r.fields.get(e)?.primary) ?? "id", u = new URLSearchParams();
@@ -2030,7 +2038,7 @@ function or({ actionCode: n, action: i, entityCode: o, objectIds: s = [], row: c
2030
2038
  search: u.toString()
2031
2039
  }), d?.();
2032
2040
  } catch (e) {
2033
- H.error(e instanceof Error ? e.message : "Failed to resolve association");
2041
+ U.error(e instanceof Error ? e.message : "Failed to resolve association");
2034
2042
  } finally {
2035
2043
  p(!1);
2036
2044
  }
@@ -2042,13 +2050,13 @@ function or({ actionCode: n, action: i, entityCode: o, objectIds: s = [], row: c
2042
2050
  _,
2043
2051
  v,
2044
2052
  d
2045
- ]), T = i.entity ? `${i.entity}.${n}` : n, E = s.length > 0 ? s : void 0, D = W(() => {
2053
+ ]), T = i.entity ? `${i.entity}.${n}` : n, E = s.length > 0 ? s : void 0, D = G(() => {
2046
2054
  g(!0), y({
2047
2055
  action: i,
2048
2056
  title: C(i.display?.name) || n,
2049
2057
  row: c,
2050
2058
  entity: o,
2051
- execute: (e) => F(T, R(e, E)),
2059
+ execute: (e) => F(T, z(e, E)),
2052
2060
  onSuccess: () => d?.()
2053
2061
  }).finally(() => g(!1));
2054
2062
  }, [
@@ -2060,9 +2068,9 @@ function or({ actionCode: n, action: i, entityCode: o, objectIds: s = [], row: c
2060
2068
  T,
2061
2069
  E,
2062
2070
  d
2063
- ]), O = W(() => {
2071
+ ]), O = G(() => {
2064
2072
  if (L(i)) {
2065
- le(i.ui_steps, { row: c }).then(() => d?.());
2073
+ ce(i.ui_steps, { row: c }).then(() => d?.());
2066
2074
  return;
2067
2075
  }
2068
2076
  if (b) {
@@ -2093,11 +2101,11 @@ function or({ actionCode: n, action: i, entityCode: o, objectIds: s = [], row: c
2093
2101
  name: A,
2094
2102
  size: 13
2095
2103
  }) : null, P = !x || m || f;
2096
- return u === "icon" ? /* @__PURE__ */ X(B, {
2104
+ return u === "icon" ? /* @__PURE__ */ X(V, {
2097
2105
  icon: M ?? /* @__PURE__ */ X(e.bolt, { size: 13 }),
2098
2106
  onClick: O,
2099
2107
  title: k
2100
- }) : /* @__PURE__ */ X(U, {
2108
+ }) : /* @__PURE__ */ X(W, {
2101
2109
  kind: l === "default" ? "primary" : l === "ghost" ? "ghost" : "default",
2102
2110
  size: "sm",
2103
2111
  icon: M,
@@ -2111,14 +2119,14 @@ function or({ actionCode: n, action: i, entityCode: o, objectIds: s = [], row: c
2111
2119
  }
2112
2120
  //#endregion
2113
2121
  //#region src/components/shared/ResponsiveActionBar.tsx
2114
- function sr(e, t) {
2122
+ function lr(e, t) {
2115
2123
  return e.replace(/\$\{([^}]+)\}/g, (e, n) => Object.prototype.hasOwnProperty.call(t, n) ? t[n] : e);
2116
2124
  }
2117
- function cr(e) {
2125
+ function ur(e) {
2118
2126
  return e.widget ? "widget" : e.href ? "href" : e.handler ? "handler" : e.association ? "association" : e.ui_steps && e.ui_steps.length > 0 ? "ui_steps" : "unknown";
2119
2127
  }
2120
- function lr(e, t, n, r, i) {
2121
- let a = cr(t), o = h(n, r?.entity), s = r?.entityCode ?? "";
2128
+ function dr(e, t, n, r, i) {
2129
+ let a = ur(t), o = h(n, r?.entity), s = r?.entityCode ?? "";
2122
2130
  if (e === "__peek") return i?.({
2123
2131
  code: e,
2124
2132
  entity: s,
@@ -2132,7 +2140,7 @@ function lr(e, t, n, r, i) {
2132
2140
  rowId: o
2133
2141
  }), a === "widget") return console.warn(`[ResponsiveActionBar] widget "${t.widget}" requested for action "${e}" but the widget registry ships in Phase 2; falling back to onRun.`), !1;
2134
2142
  if (a === "href" && r) {
2135
- let e = sr(t.href ?? "", {
2143
+ let e = lr(t.href ?? "", {
2136
2144
  entity: s,
2137
2145
  id: encodeURIComponent(o)
2138
2146
  }), n = e.indexOf("?");
@@ -2140,27 +2148,27 @@ function lr(e, t, n, r, i) {
2140
2148
  }
2141
2149
  return a === "handler" || a === "association" || a === "ui_steps" || a === "unknown" && console.warn(`[ResponsiveActionBar] no dispatch mode set on action "${e}" (none of handler/association/widget/href/ui_steps).`), !1;
2142
2150
  }
2143
- function ur(e) {
2151
+ function fr(e) {
2144
2152
  let t = 0;
2145
- for (let n of e) n.kind === "action" ? t++ : t += ur(n.items);
2153
+ for (let n of e) n.kind === "action" ? t++ : t += fr(n.items);
2146
2154
  return t;
2147
2155
  }
2148
- function dr(e, t, n) {
2156
+ function pr(e, t, n) {
2149
2157
  let r = [], i = [];
2150
- for (let a of e) a.kind === "action" && pr(a.code, t, n)?.destructive ? i.push(a) : r.push(a);
2158
+ for (let a of e) a.kind === "action" && hr(a.code, t, n)?.destructive ? i.push(a) : r.push(a);
2151
2159
  return {
2152
2160
  normal: r,
2153
2161
  destructive: i
2154
2162
  };
2155
2163
  }
2156
- function fr(e, t, n) {
2164
+ function mr(e, t, n) {
2157
2165
  let r = [], i = [], a = [];
2158
2166
  for (let o of e) {
2159
2167
  if (o.kind !== "action") {
2160
2168
  i.push(o);
2161
2169
  continue;
2162
2170
  }
2163
- let e = pr(o.code, t, n), s = e?.destructive === !0, c = e?.display?.primary === !0;
2171
+ let e = hr(o.code, t, n), s = e?.destructive === !0, c = e?.display?.primary === !0;
2164
2172
  if (s && c) {
2165
2173
  console.warn(`[ResponsiveActionBar] action "${o.code}" declares both primary and destructive; treating as destructive.`), a.push(o);
2166
2174
  continue;
@@ -2181,33 +2189,33 @@ function fr(e, t, n) {
2181
2189
  destructive: a
2182
2190
  };
2183
2191
  }
2184
- function pr(e, t, n) {
2192
+ function hr(e, t, n) {
2185
2193
  if (t && e in t) return t[e];
2186
2194
  if (n && e in n) return n[e];
2187
2195
  }
2188
- function mr(e, t, n) {
2189
- let r = pr(e, t, n);
2196
+ function gr(e, t, n) {
2197
+ let r = hr(e, t, n);
2190
2198
  return C(r?.display?.name) || e;
2191
2199
  }
2192
- function hr(e, t, n) {
2193
- return pr(e, t, n)?.display?.icon || void 0;
2200
+ function _r(e, t, n) {
2201
+ return hr(e, t, n)?.display?.icon || void 0;
2194
2202
  }
2195
- function gr(e) {
2203
+ function vr(e) {
2196
2204
  return `action-tooltip-${e}`;
2197
2205
  }
2198
- function _r({ leaf: e, entityActions: n, globalActions: r, onRun: i, loading: a, onLoadingChange: o, measureRef: s, style: c, row: l, widgetContext: u, onActionClick: d }) {
2199
- let f = pr(e.code, n, r), p = mr(e.code, n, r), m = hr(e.code, n, r), h = f?.destructive ?? !1, g = !h && f?.display?.primary === !0, _ = !e.enabled, v = _ ? gr(e.code) : void 0, y = W(async () => {
2200
- if (!(!f || _ || a)) {
2206
+ function yr({ leaf: e, entityActions: n, globalActions: r, onRun: i, loading: a, onLoadingChange: o, measureRef: s, style: c, row: l, widgetContext: u, onActionClick: d, iconOnly: f = !1 }) {
2207
+ let p = hr(e.code, n, r), m = gr(e.code, n, r), h = _r(e.code, n, r), g = p?.destructive ?? !1, _ = !g && p?.display?.primary === !0, v = !e.enabled, y = v ? vr(e.code) : void 0, b = G(async () => {
2208
+ if (!(!p || v || a)) {
2201
2209
  o(!0);
2202
2210
  try {
2203
- lr(e.code, f, l, u, d) || await Promise.resolve(i(e.code, f));
2211
+ dr(e.code, p, l, u, d) || await Promise.resolve(i(e.code, p));
2204
2212
  } finally {
2205
2213
  o(!1);
2206
2214
  }
2207
2215
  }
2208
2216
  }, [
2209
- f,
2210
- _,
2217
+ p,
2218
+ v,
2211
2219
  a,
2212
2220
  i,
2213
2221
  e.code,
@@ -2215,12 +2223,12 @@ function _r({ leaf: e, entityActions: n, globalActions: r, onRun: i, loading: a,
2215
2223
  l,
2216
2224
  u,
2217
2225
  d
2218
- ]), b = a ? /* @__PURE__ */ X(A, { size: 12 }) : m ? /* @__PURE__ */ X(t, {
2219
- name: m,
2226
+ ]), x = a ? /* @__PURE__ */ X(A, { size: 12 }) : h ? /* @__PURE__ */ X(t, {
2227
+ name: h,
2220
2228
  size: 12
2221
2229
  }) : null;
2222
- return /* @__PURE__ */ Z(Y, { children: [v && e.reason && /* @__PURE__ */ X("span", {
2223
- id: v,
2230
+ return /* @__PURE__ */ Z(We, { children: [y && e.reason && /* @__PURE__ */ X("span", {
2231
+ id: y,
2224
2232
  role: "tooltip",
2225
2233
  style: {
2226
2234
  position: "absolute",
@@ -2230,25 +2238,26 @@ function _r({ leaf: e, entityActions: n, globalActions: r, onRun: i, loading: a,
2230
2238
  clip: "rect(0,0,0,0)"
2231
2239
  },
2232
2240
  children: e.reason
2233
- }), /* @__PURE__ */ X(U, {
2241
+ }), /* @__PURE__ */ X(W, {
2234
2242
  ref: s,
2235
- kind: g ? "primary" : "default",
2236
- danger: h,
2237
- icon: b,
2238
- disabled: _ || a,
2239
- "aria-disabled": _ ? "true" : void 0,
2240
- "aria-describedby": v,
2241
- title: ee(f, p, _, e.reason),
2242
- onClick: y,
2243
+ kind: _ ? "primary" : "default",
2244
+ danger: g,
2245
+ icon: x,
2246
+ disabled: v || a,
2247
+ "aria-disabled": v ? "true" : void 0,
2248
+ "aria-describedby": y,
2249
+ "aria-label": f ? m : void 0,
2250
+ title: R(p, m, v, e.reason, f),
2251
+ onClick: b,
2243
2252
  style: c,
2244
- children: p
2253
+ children: f ? null : m
2245
2254
  })] });
2246
2255
  }
2247
- function vr({ group: n, entityActions: r, globalActions: i, onRun: a, loading: o, onLoadingChange: s, measureRef: c, style: l, row: u, widgetContext: d, onActionClick: f }) {
2248
- let p = q(null), [m, h] = J(!1), g = n.name ? C(n.name) : "Actions", _ = W((e) => {
2256
+ function br({ group: n, entityActions: r, globalActions: i, onRun: a, loading: o, onLoadingChange: s, measureRef: c, style: l, row: u, widgetContext: d, onActionClick: f }) {
2257
+ let p = J(null), [m, h] = Y(!1), g = n.name ? C(n.name) : "Actions", _ = G((e) => {
2249
2258
  p.current = e, c?.(e);
2250
- }, [c]), v = W((e, t) => (h(!1), a(e, t)), [a]);
2251
- return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(U, {
2259
+ }, [c]), v = G((e, t) => (h(!1), a(e, t)), [a]);
2260
+ return /* @__PURE__ */ Z(We, { children: [/* @__PURE__ */ X(W, {
2252
2261
  ref: _,
2253
2262
  kind: "default",
2254
2263
  icon: o == null ? n.icon ? /* @__PURE__ */ X(t, {
@@ -2262,7 +2271,7 @@ function vr({ group: n, entityActions: r, globalActions: i, onRun: a, loading: o
2262
2271
  onClick: () => h((e) => !e),
2263
2272
  style: l,
2264
2273
  children: g
2265
- }), /* @__PURE__ */ X(V, {
2274
+ }), /* @__PURE__ */ X(H, {
2266
2275
  open: m,
2267
2276
  anchor: p.current,
2268
2277
  onClose: () => h(!1),
@@ -2271,7 +2280,7 @@ function vr({ group: n, entityActions: r, globalActions: i, onRun: a, loading: o
2271
2280
  children: /* @__PURE__ */ X("div", {
2272
2281
  role: "menu",
2273
2282
  "aria-label": g,
2274
- children: n.items.map((e) => e.kind === "action" ? /* @__PURE__ */ X(yr, {
2283
+ children: n.items.map((e) => e.kind === "action" ? /* @__PURE__ */ X(xr, {
2275
2284
  leaf: e,
2276
2285
  entityActions: r,
2277
2286
  globalActions: i,
@@ -2281,7 +2290,7 @@ function vr({ group: n, entityActions: r, globalActions: i, onRun: a, loading: o
2281
2290
  row: u,
2282
2291
  widgetContext: d,
2283
2292
  onActionClick: f
2284
- }, e.code) : /* @__PURE__ */ X(br, {
2293
+ }, e.code) : /* @__PURE__ */ X(Sr, {
2285
2294
  group: e,
2286
2295
  entityActions: r,
2287
2296
  globalActions: i,
@@ -2295,12 +2304,12 @@ function vr({ group: n, entityActions: r, globalActions: i, onRun: a, loading: o
2295
2304
  })
2296
2305
  })] });
2297
2306
  }
2298
- function yr({ leaf: e, entityActions: n, globalActions: r, onRun: i, loading: a, onLoadingChange: o, row: s, widgetContext: c, onActionClick: l }) {
2299
- let u = pr(e.code, n, r), d = mr(e.code, n, r), f = hr(e.code, n, r), p = u?.destructive ?? !1, m = !e.enabled, h = m ? gr(e.code) : void 0, g = a ? /* @__PURE__ */ X(A, { size: 12 }) : f ? /* @__PURE__ */ X(t, {
2307
+ function xr({ leaf: e, entityActions: n, globalActions: r, onRun: i, loading: a, onLoadingChange: o, row: s, widgetContext: c, onActionClick: l }) {
2308
+ let u = hr(e.code, n, r), d = gr(e.code, n, r), f = _r(e.code, n, r), p = u?.destructive ?? !1, m = !e.enabled, h = m ? vr(e.code) : void 0, g = a ? /* @__PURE__ */ X(A, { size: 12 }) : f ? /* @__PURE__ */ X(t, {
2300
2309
  name: f,
2301
2310
  size: 12
2302
2311
  }) : null;
2303
- return /* @__PURE__ */ Z(Y, { children: [h && e.reason && /* @__PURE__ */ X("span", {
2312
+ return /* @__PURE__ */ Z(We, { children: [h && e.reason && /* @__PURE__ */ X("span", {
2304
2313
  id: h,
2305
2314
  role: "tooltip",
2306
2315
  style: {
@@ -2315,12 +2324,12 @@ function yr({ leaf: e, entityActions: n, globalActions: r, onRun: i, loading: a,
2315
2324
  role: "menuitem",
2316
2325
  "aria-disabled": m ? "true" : void 0,
2317
2326
  "aria-describedby": h,
2318
- title: ee(u, d, m, e.reason),
2327
+ title: R(u, d, m, e.reason),
2319
2328
  onClick: async () => {
2320
2329
  if (!(!u || m || a)) {
2321
2330
  o(!0);
2322
2331
  try {
2323
- lr(e.code, u, s, c, l) || await Promise.resolve(i(e.code, u));
2332
+ dr(e.code, u, s, c, l) || await Promise.resolve(i(e.code, u));
2324
2333
  } finally {
2325
2334
  o(!1);
2326
2335
  }
@@ -2355,9 +2364,9 @@ function yr({ leaf: e, entityActions: n, globalActions: r, onRun: i, loading: a,
2355
2364
  })]
2356
2365
  })] });
2357
2366
  }
2358
- function br({ group: e, entityActions: t, globalActions: n, onRun: r, loading: i, onLoadingChange: a, row: o, widgetContext: s, onActionClick: c }) {
2367
+ function Sr({ group: e, entityActions: t, globalActions: n, onRun: r, loading: i, onLoadingChange: a, row: o, widgetContext: s, onActionClick: c }) {
2359
2368
  let l = e.name ? C(e.name) : void 0;
2360
- return /* @__PURE__ */ Z(Y, { children: [l && /* @__PURE__ */ X("div", {
2369
+ return /* @__PURE__ */ Z(We, { children: [l && /* @__PURE__ */ X("div", {
2361
2370
  style: {
2362
2371
  padding: "4px 10px 2px",
2363
2372
  fontSize: 10.5,
@@ -2367,7 +2376,7 @@ function br({ group: e, entityActions: t, globalActions: n, onRun: r, loading: i
2367
2376
  letterSpacing: "0.05em"
2368
2377
  },
2369
2378
  children: l
2370
- }), e.items.map((e) => e.kind === "action" ? /* @__PURE__ */ X(yr, {
2379
+ }), e.items.map((e) => e.kind === "action" ? /* @__PURE__ */ X(xr, {
2371
2380
  leaf: e,
2372
2381
  entityActions: t,
2373
2382
  globalActions: n,
@@ -2377,7 +2386,7 @@ function br({ group: e, entityActions: t, globalActions: n, onRun: r, loading: i
2377
2386
  row: o,
2378
2387
  widgetContext: s,
2379
2388
  onActionClick: c
2380
- }, e.code) : /* @__PURE__ */ X(br, {
2389
+ }, e.code) : /* @__PURE__ */ X(Sr, {
2381
2390
  group: e,
2382
2391
  entityActions: t,
2383
2392
  globalActions: n,
@@ -2389,26 +2398,27 @@ function br({ group: e, entityActions: t, globalActions: n, onRun: r, loading: i
2389
2398
  onActionClick: c
2390
2399
  }, e.icon ?? "nested"))] });
2391
2400
  }
2392
- function xr({ layout: t, entityActions: n, globalActions: r, onRun: i, row: a, widgetContext: o, onActionClick: s }) {
2393
- let c = q(null), [l, u] = J(!1), [d, f] = J(null), p = W((e, t) => (u(!1), i(e, t)), [i]);
2394
- return ur(t) === 0 ? null : /* @__PURE__ */ Z("div", {
2401
+ function Cr({ layout: t, entityActions: n, globalActions: r, onRun: i, row: a, widgetContext: o, onActionClick: s }) {
2402
+ let c = J(null), [l, u] = Y(!1), [d, f] = Y(null), p = G((e, t) => (u(!1), i(e, t)), [i]);
2403
+ return fr(t) === 0 ? null : /* @__PURE__ */ Z("div", {
2404
+ "data-open": l ? "true" : void 0,
2395
2405
  style: {
2396
2406
  display: "inline-flex",
2397
2407
  alignItems: "center"
2398
2408
  },
2399
- children: [/* @__PURE__ */ X(B, {
2409
+ children: [/* @__PURE__ */ X(V, {
2400
2410
  ref: c,
2401
2411
  icon: X(d == null ? e.more : A, { size: 14 }),
2402
2412
  title: "Actions",
2403
2413
  size: 28,
2404
2414
  onClick: () => u((e) => !e)
2405
- }), /* @__PURE__ */ X(V, {
2415
+ }), /* @__PURE__ */ X(H, {
2406
2416
  open: l,
2407
2417
  anchor: c.current,
2408
2418
  onClose: () => u(!1),
2409
2419
  align: "end",
2410
2420
  width: 220,
2411
- children: /* @__PURE__ */ X(Cr, {
2421
+ children: /* @__PURE__ */ X(Tr, {
2412
2422
  layout: t,
2413
2423
  entityActions: n,
2414
2424
  globalActions: r,
@@ -2422,14 +2432,14 @@ function xr({ layout: t, entityActions: n, globalActions: r, onRun: i, row: a, w
2422
2432
  })]
2423
2433
  });
2424
2434
  }
2425
- function Sr(e) {
2435
+ function wr(e) {
2426
2436
  let t = 0;
2427
2437
  for (let n of e) if (n.kind === "action" && s(n.code)) t++;
2428
2438
  else break;
2429
2439
  return t;
2430
2440
  }
2431
- function Cr({ layout: e, entityActions: t, globalActions: n, onRun: r, loading: i, onLoadingChange: a, row: o, widgetContext: s, onActionClick: c, ariaLabel: l = "Row actions" }) {
2432
- let { normal: u, destructive: d } = dr(e, t, n), f = Sr(u), p = u.slice(0, f), m = u.slice(f), h = d.length > 0, g = m.length > 0, v = (e) => /* @__PURE__ */ X(yr, {
2441
+ function Tr({ layout: e, entityActions: t, globalActions: n, onRun: r, loading: i, onLoadingChange: a, row: o, widgetContext: s, onActionClick: c, ariaLabel: l = "Row actions" }) {
2442
+ let { normal: u, destructive: d } = pr(e, t, n), f = wr(u), p = u.slice(0, f), m = u.slice(f), h = d.length > 0, g = m.length > 0, v = (e) => /* @__PURE__ */ X(xr, {
2433
2443
  leaf: e,
2434
2444
  entityActions: t,
2435
2445
  globalActions: n,
@@ -2446,7 +2456,7 @@ function Cr({ layout: e, entityActions: t, globalActions: n, onRun: r, loading:
2446
2456
  children: [
2447
2457
  p.map((e) => e.kind === "action" ? v(e) : null),
2448
2458
  p.length > 0 && g && /* @__PURE__ */ X(_, { divider: !0 }),
2449
- m.map((e) => e.kind === "action" ? v(e) : /* @__PURE__ */ X(br, {
2459
+ m.map((e) => e.kind === "action" ? v(e) : /* @__PURE__ */ X(Sr, {
2450
2460
  group: e,
2451
2461
  entityActions: t,
2452
2462
  globalActions: n,
@@ -2462,136 +2472,173 @@ function Cr({ layout: e, entityActions: t, globalActions: n, onRun: r, loading:
2462
2472
  ]
2463
2473
  });
2464
2474
  }
2465
- var wr = "__overflow_trigger__", Tr = 90, Er = 80;
2466
- function Dr(e) {
2467
- return e + 8;
2475
+ var Er = "__overflow_trigger__", Dr = 90, Or = 4, kr = 8;
2476
+ function Ar(e) {
2477
+ return `icon:${Q(e)}`;
2468
2478
  }
2469
- function Or(e, t, n, r, i, a, o, s) {
2470
- let { primary: c, regular: l, destructive: u } = fr(e, i, a), d = c.length > 0 ? c.reduce((e, t) => e + (r.get(Q(t)) ?? 0), 0) : 0, f = u.length > 0 ? u.reduce((e, t) => e + (r.get(Q(t)) ?? Er), 0) : 0, p = t - n - d - f, m = r.get(wr) ?? Tr, h = 0, g = [], _ = [], v = !1;
2471
- for (let e of l) {
2472
- let t = r.get(Q(e)) ?? 0;
2473
- if (o) {
2474
- o(e) ? (g.push(e), h += t) : (_.push(e), v = !0);
2475
- continue;
2476
- }
2477
- let n = l.length - g.length - _.length - 1 > 0 || _.length > 0 ? m : 0, i = s && !s.has(Q(e)) ? Dr(m) : 0;
2478
- h + t + n + i <= p ? (g.push(e), h += t) : (_.push(e), v = !0);
2479
+ function jr() {
2480
+ return kr;
2481
+ }
2482
+ function Mr(e, t, n) {
2483
+ return [
2484
+ ...e,
2485
+ ...t,
2486
+ ...n
2487
+ ];
2488
+ }
2489
+ function Nr(e, t) {
2490
+ return t.get(Q(e)) ?? 0;
2491
+ }
2492
+ function Pr(e, t) {
2493
+ return t.get(Ar(e));
2494
+ }
2495
+ function Fr(e, t, n, r, i, a, o, s, c) {
2496
+ let { primary: l, regular: u, destructive: d } = mr(e, i, a), f = Or, p = r.get(Er) ?? Dr, m = t - n, h = Mr(l, u, d), g = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Set();
2497
+ if (o) for (let e of h) o(e) && g.add(Q(e));
2498
+ else {
2499
+ let e = c ?? h.length, t = (e, t) => t ? Pr(e, r) ?? Nr(e, r) : Nr(e, r), n = (e) => s ? e.filter((e) => !s.has(Q(e))).length * jr() : 0, i = (e, r) => {
2500
+ let i = e.length < h.length ? p + f : 0, a = e.length > 1 ? (e.length - 1) * f : 0;
2501
+ return e.reduce((e, n, i) => e + t(n, i >= r), 0) + a + i + n(e) <= m;
2502
+ }, a = 0, o = !1;
2503
+ for (let t = Math.min(e, h.length); t >= 1 && a === 0; t--) i(h.slice(0, t), 1) ? a = t : i(h.slice(0, t), 0) && (a = t, o = !0);
2504
+ let l = o ? 0 : Math.min(1, a), u = h.slice(0, a);
2505
+ for (; l < a && i(u, l + 1);) l++;
2506
+ u.forEach((e, t) => {
2507
+ let n = Q(e);
2508
+ g.add(n), t >= l && _.add(n);
2509
+ });
2479
2510
  }
2511
+ let v = (e) => g.has(Q(e)), y = [
2512
+ ...l,
2513
+ ...u,
2514
+ ...d
2515
+ ].filter((e) => !v(e));
2480
2516
  return {
2481
- primaryInline: c,
2482
- inline: g,
2483
- overflow: v ? _ : [],
2484
- destructiveInline: u
2517
+ primaryInline: l.filter(v),
2518
+ inline: u.filter(v),
2519
+ overflow: y,
2520
+ destructiveInline: d.filter(v),
2521
+ iconOnly: _
2485
2522
  };
2486
2523
  }
2487
2524
  function Q(e) {
2488
2525
  return e.kind === "action" ? `action:${e.code}` : `group:${e.name ? C(e.name) : ""}`;
2489
2526
  }
2490
- function kr({ layout: n, entityActions: r, globalActions: i, onRun: a, reservedRightWidth: o = 0, measurementOverride: s, ariaLabel: c = "Actions", align: l = "trailing", constrain: u = !0, row: d, widgetContext: f, onActionClick: p }) {
2491
- let m = q(null), h = q(null), [g, _] = J(0), [v, y] = J(/* @__PURE__ */ new Map()), [b, x] = J(!1), [S, w] = J(null), [T, E] = J(() => typeof document < "u" && document.documentElement.dir === "rtl");
2492
- G(() => {
2527
+ function Ir({ layout: n, entityActions: r, globalActions: i, onRun: a, reservedRightWidth: o = 0, measurementOverride: s, ariaLabel: c = "Actions", align: l = "trailing", constrain: u = !0, row: d, widgetContext: f, onActionClick: p }) {
2528
+ let m = J(null), h = J(null), [g, v] = Y(0), [y, b] = Y(/* @__PURE__ */ new Map()), [x, S] = Y(!1), [w, T] = Y(null), [E, D] = Y(() => typeof document < "u" && document.documentElement.dir === "rtl");
2529
+ K(() => {
2493
2530
  if (typeof MutationObserver > "u") return;
2494
2531
  let e = new MutationObserver((e) => {
2495
- for (let t of e) t.attributeName === "dir" && E(document.documentElement.dir === "rtl"), t.attributeName === "lang" && x(!1);
2532
+ for (let t of e) t.attributeName === "dir" && D(document.documentElement.dir === "rtl"), t.attributeName === "lang" && S(!1);
2496
2533
  });
2497
2534
  return e.observe(document.documentElement, {
2498
2535
  attributes: !0,
2499
2536
  attributeFilter: ["dir", "lang"]
2500
2537
  }), () => e.disconnect();
2501
2538
  }, []);
2502
- let D = q(null), [O, k] = J(!1), A = W((e, t) => (k(!1), a(e, t)), [a]), j = ur(n), M = !!s, N = W(() => {
2503
- if (M || !h.current) return;
2539
+ let O = J(null), [k, A] = Y(!1), j = G((e, t) => (A(!1), a(e, t)), [a]), M = fr(n), N = !!s, P = G(() => {
2540
+ if (N || !h.current) return;
2504
2541
  let e = Array.from(h.current.children), t = /* @__PURE__ */ new Map();
2505
2542
  e.forEach((e) => {
2506
2543
  let n = e.dataset.nodeKey;
2507
2544
  n && t.set(n, e.getBoundingClientRect().width || e.offsetWidth);
2508
- }), y(t), x(!0);
2509
- }, [M]), P = K(() => JSON.stringify(n.map((e) => Q(e))), [n]);
2545
+ }), b(t), S(!0);
2546
+ }, [N]), F = q(() => JSON.stringify(n.map((e) => Q(e))), [n]);
2510
2547
  Le(() => {
2511
- if (M) {
2512
- x(!0);
2548
+ if (N) {
2549
+ S(!0);
2513
2550
  return;
2514
2551
  }
2515
- x(!1);
2552
+ S(!1);
2516
2553
  let e = requestAnimationFrame(() => {
2517
- N();
2554
+ P();
2518
2555
  });
2519
2556
  return () => cancelAnimationFrame(e);
2520
2557
  }, [
2558
+ F,
2521
2559
  P,
2522
- N,
2523
- M
2524
- ]), G(() => {
2525
- if (M || b) return;
2560
+ N
2561
+ ]), K(() => {
2562
+ if (N || x) return;
2526
2563
  let e = setTimeout(() => {
2527
- N(), x(!0);
2564
+ P(), S(!0);
2528
2565
  }, 16);
2529
2566
  return () => clearTimeout(e);
2530
2567
  }, [
2531
- b,
2532
- N,
2533
- M
2534
- ]), G(() => {
2535
- if (M || !u || !b || g === 0) return;
2568
+ x,
2569
+ P,
2570
+ N
2571
+ ]), K(() => {
2572
+ if (N || !u || !x || g === 0) return;
2536
2573
  let e = m.current;
2537
2574
  if (!e) return;
2538
2575
  let t = [...e.children].filter((e) => e.getAttribute("aria-hidden") !== "true"), n = t.length > 1 ? (t.length - 1) * 4 : 0, r = t.reduce((e, t) => e + t.getBoundingClientRect().width, 0) + n;
2539
2576
  r > 0 && Math.abs(g - r) < 1 && console.error(`[declarion] ResponsiveActionBar is measuring itself: its container is ${Math.round(g)}px, exactly the width of what it just rendered. The slot holding this bar is sized by its own content, so it cannot tell the bar how much room there is. Give that slot \`flex: 1 1 auto; min-width: 0\` (and justify its content to the edge the buttons sit on), or pass \`constrain={false}\` if it genuinely has no row to take space from.`);
2540
2577
  }, [
2541
- M,
2578
+ N,
2542
2579
  u,
2543
- b,
2580
+ x,
2544
2581
  g,
2545
- v
2546
- ]), G(() => {
2547
- if (M) return;
2582
+ y
2583
+ ]), K(() => {
2584
+ if (N) return;
2548
2585
  let e = m.current;
2549
2586
  if (!e) return;
2550
2587
  if (typeof ResizeObserver > "u") {
2551
- _(e.getBoundingClientRect().width);
2588
+ v(e.getBoundingClientRect().width);
2552
2589
  return;
2553
2590
  }
2554
2591
  let t = new ResizeObserver((e) => {
2555
2592
  let t = e[0];
2556
- t && _(t.contentRect.width);
2593
+ t && v(t.contentRect.width);
2557
2594
  });
2558
- return t.observe(e), _(e.getBoundingClientRect().width), () => t.disconnect();
2559
- }, [M]);
2560
- let F = q(void 0);
2561
- G(() => {
2562
- F.current = void 0;
2563
- }, [P]);
2564
- let I = K(() => M || !u ? Or(n, 2 ** 53 - 1, o, v, r, i, s) : b ? g === 0 ? Or(n, 2 ** 53 - 1, o, v, r, i, s) : Or(n, g, o, v, r, i, s, F.current) : {
2595
+ return t.observe(e), v(e.getBoundingClientRect().width), () => t.disconnect();
2596
+ }, [N]);
2597
+ let I = J(void 0);
2598
+ K(() => {
2599
+ I.current = void 0;
2600
+ }, [F]);
2601
+ let L = q(() => N || !u ? Fr(n, 2 ** 53 - 1, o, y, r, i, s) : x ? g === 0 ? Fr(n, 2 ** 53 - 1, o, y, r, i, s) : Fr(n, g, o, y, r, i, s, I.current) : {
2565
2602
  primaryInline: [],
2566
2603
  inline: [],
2567
2604
  overflow: [],
2568
- destructiveInline: []
2605
+ destructiveInline: [],
2606
+ iconOnly: /* @__PURE__ */ new Set()
2569
2607
  }, [
2570
- M,
2608
+ N,
2571
2609
  u,
2572
- b,
2610
+ x,
2573
2611
  g,
2574
2612
  n,
2575
2613
  o,
2576
- v,
2614
+ y,
2577
2615
  r,
2578
2616
  i,
2579
2617
  s
2580
2618
  ]);
2581
- if (G(() => {
2582
- F.current = new Set([...I.inline, ...I.primaryInline].map(Q));
2583
- }, [I]), j === 0) return null;
2584
- let L = I.overflow.length > 0;
2619
+ if (K(() => {
2620
+ !x && !N || (I.current = new Set([
2621
+ ...L.primaryInline,
2622
+ ...L.inline,
2623
+ ...L.destructiveInline
2624
+ ].map(Q)));
2625
+ }, [
2626
+ L,
2627
+ x,
2628
+ N
2629
+ ]), M === 0) return null;
2630
+ let R = L.overflow.length > 0, { normal: z, destructive: ee } = pr(L.overflow, r, i);
2585
2631
  return /* @__PURE__ */ Z("div", {
2586
2632
  ref: m,
2587
2633
  role: "toolbar",
2588
2634
  "aria-label": c,
2589
2635
  style: {
2590
2636
  display: "flex",
2591
- flexDirection: T ? "row-reverse" : "row",
2637
+ flexDirection: E ? "row-reverse" : "row",
2592
2638
  alignItems: "center",
2593
- gap: 4,
2594
- visibility: b || M ? "visible" : "hidden",
2639
+ gap: Or,
2640
+ flexWrap: "wrap",
2641
+ visibility: x || N ? "visible" : "hidden",
2595
2642
  position: "relative",
2596
2643
  flex: u ? "1 1 auto" : "0 1 auto",
2597
2644
  justifyContent: l === "trailing" ? "flex-end" : "flex-start",
@@ -2611,29 +2658,34 @@ function kr({ layout: n, entityActions: r, globalActions: i, onRun: a, reservedR
2611
2658
  top: 0,
2612
2659
  left: 0
2613
2660
  },
2614
- children: [/* @__PURE__ */ X(U, {
2615
- "data-node-key": wr,
2661
+ children: [/* @__PURE__ */ X(W, {
2662
+ "data-node-key": Er,
2616
2663
  iconRight: /* @__PURE__ */ X(e.down, { size: 10 }),
2617
2664
  tabIndex: -1,
2618
2665
  children: "Actions"
2619
- }, wr), n.map((n) => {
2666
+ }, Er), n.map((n) => {
2620
2667
  let a = Q(n);
2621
2668
  if (n.kind === "action") {
2622
- let e = pr(n.code, r, i), o = mr(n.code, r, i), s = hr(n.code, r, i);
2623
- return /* @__PURE__ */ X(U, {
2669
+ let e = hr(n.code, r, i), o = gr(n.code, r, i), s = _r(n.code, r, i), c = s ? /* @__PURE__ */ X(t, {
2670
+ name: s,
2671
+ size: 12
2672
+ }) : null;
2673
+ return /* @__PURE__ */ Z(Ne, { children: [/* @__PURE__ */ X(W, {
2624
2674
  "data-node-key": a,
2625
- icon: s ? /* @__PURE__ */ X(t, {
2626
- name: s,
2627
- size: 12
2628
- }) : null,
2675
+ icon: c,
2629
2676
  danger: e?.destructive,
2630
2677
  tabIndex: -1,
2631
2678
  children: o
2632
- }, a);
2679
+ }), c && /* @__PURE__ */ X(W, {
2680
+ "data-node-key": Ar(n),
2681
+ icon: c,
2682
+ danger: e?.destructive,
2683
+ tabIndex: -1
2684
+ })] }, a);
2633
2685
  }
2634
2686
  {
2635
2687
  let t = n.name ? C(n.name) : "Actions";
2636
- return /* @__PURE__ */ X(U, {
2688
+ return /* @__PURE__ */ X(W, {
2637
2689
  "data-node-key": a,
2638
2690
  iconRight: /* @__PURE__ */ X(e.down, { size: 10 }),
2639
2691
  tabIndex: -1,
@@ -2642,96 +2694,103 @@ function kr({ layout: n, entityActions: r, globalActions: i, onRun: a, reservedR
2642
2694
  }
2643
2695
  })]
2644
2696
  }),
2645
- I.primaryInline.map((e) => /* @__PURE__ */ X(_r, {
2697
+ L.primaryInline.map((e) => /* @__PURE__ */ X(yr, {
2646
2698
  leaf: e,
2647
2699
  entityActions: r,
2648
2700
  globalActions: i,
2649
2701
  onRun: a,
2650
- loading: S === e.code,
2651
- onLoadingChange: (t) => w(t ? e.code : null),
2702
+ loading: w === e.code,
2703
+ onLoadingChange: (t) => T(t ? e.code : null),
2652
2704
  row: d,
2653
2705
  widgetContext: f,
2654
- onActionClick: p
2706
+ onActionClick: p,
2707
+ iconOnly: L.iconOnly.has(Q(e))
2655
2708
  }, Q(e))),
2656
- I.inline.map((e) => {
2709
+ L.inline.map((e) => {
2657
2710
  let t = Q(e);
2658
- return e.kind === "action" ? /* @__PURE__ */ X(_r, {
2711
+ return e.kind === "action" ? /* @__PURE__ */ X(yr, {
2659
2712
  leaf: e,
2660
2713
  entityActions: r,
2661
2714
  globalActions: i,
2662
2715
  onRun: a,
2663
- loading: S === e.code,
2664
- onLoadingChange: (t) => w(t ? e.code : null),
2716
+ loading: w === e.code,
2717
+ onLoadingChange: (t) => T(t ? e.code : null),
2665
2718
  row: d,
2666
2719
  widgetContext: f,
2667
- onActionClick: p
2668
- }, t) : /* @__PURE__ */ X(vr, {
2720
+ onActionClick: p,
2721
+ iconOnly: L.iconOnly.has(t)
2722
+ }, t) : /* @__PURE__ */ X(br, {
2669
2723
  group: e,
2670
2724
  entityActions: r,
2671
2725
  globalActions: i,
2672
2726
  onRun: a,
2673
- loading: S,
2674
- onLoadingChange: w,
2727
+ loading: w,
2728
+ onLoadingChange: T,
2675
2729
  row: d,
2676
2730
  widgetContext: f,
2677
2731
  onActionClick: p
2678
2732
  }, t);
2679
2733
  }),
2680
- L && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(U, {
2681
- ref: D,
2734
+ R && /* @__PURE__ */ Z(We, { children: [/* @__PURE__ */ X(W, {
2735
+ ref: O,
2682
2736
  kind: "default",
2683
2737
  iconRight: /* @__PURE__ */ X(e.down, { size: 10 }),
2684
2738
  "aria-haspopup": "menu",
2685
- "aria-expanded": O ? "true" : "false",
2686
- onClick: () => k((e) => !e),
2739
+ "aria-expanded": k ? "true" : "false",
2740
+ onClick: () => A((e) => !e),
2687
2741
  children: "Actions"
2688
- }), /* @__PURE__ */ X(V, {
2689
- open: O,
2690
- anchor: D.current,
2691
- onClose: () => k(!1),
2692
- align: T ? "start" : "end",
2742
+ }), /* @__PURE__ */ X(H, {
2743
+ open: k,
2744
+ anchor: O.current,
2745
+ onClose: () => A(!1),
2746
+ align: E ? "start" : "end",
2693
2747
  width: 220,
2694
2748
  children: /* @__PURE__ */ X("div", {
2695
2749
  role: "menu",
2696
2750
  "aria-label": "More actions",
2697
- children: I.overflow.map((e) => e.kind === "action" ? /* @__PURE__ */ X(yr, {
2751
+ children: [
2752
+ ...z,
2753
+ ...ee.length > 0 ? [null] : [],
2754
+ ...ee
2755
+ ].map((e, t) => e === null ? /* @__PURE__ */ X(_, { divider: !0 }, "destructive-divider") : e.kind === "action" ? /* @__PURE__ */ X(xr, {
2698
2756
  leaf: e,
2699
2757
  entityActions: r,
2700
2758
  globalActions: i,
2701
- onRun: A,
2702
- loading: S === e.code,
2703
- onLoadingChange: (t) => w(t ? e.code : null),
2759
+ onRun: j,
2760
+ loading: w === e.code,
2761
+ onLoadingChange: (t) => T(t ? e.code : null),
2704
2762
  row: d,
2705
2763
  widgetContext: f,
2706
2764
  onActionClick: p
2707
- }, e.code) : /* @__PURE__ */ X(br, {
2765
+ }, e.code) : /* @__PURE__ */ X(Sr, {
2708
2766
  group: e,
2709
2767
  entityActions: r,
2710
2768
  globalActions: i,
2711
- onRun: A,
2712
- loading: S,
2713
- onLoadingChange: w,
2769
+ onRun: j,
2770
+ loading: w,
2771
+ onLoadingChange: T,
2714
2772
  row: d,
2715
2773
  widgetContext: f,
2716
2774
  onActionClick: p
2717
- }, Q(e)))
2775
+ }, `${Q(e)}-${t}`))
2718
2776
  })
2719
2777
  })] }),
2720
- I.destructiveInline.map((e) => /* @__PURE__ */ X(_r, {
2778
+ L.destructiveInline.map((e) => /* @__PURE__ */ X(yr, {
2721
2779
  leaf: e,
2722
2780
  entityActions: r,
2723
2781
  globalActions: i,
2724
2782
  onRun: a,
2725
- loading: S === e.code,
2726
- onLoadingChange: (t) => w(t ? e.code : null),
2783
+ loading: w === e.code,
2784
+ onLoadingChange: (t) => T(t ? e.code : null),
2727
2785
  row: d,
2728
2786
  widgetContext: f,
2729
- onActionClick: p
2787
+ onActionClick: p,
2788
+ iconOnly: L.iconOnly.has(Q(e))
2730
2789
  }, Q(e)))
2731
2790
  ]
2732
2791
  });
2733
2792
  }
2734
- function Ar({ layout: e, rowSelection: t = [], ...n }) {
2793
+ function Lr({ layout: e, rowSelection: t = [], ...n }) {
2735
2794
  let r = t.length > 0;
2736
2795
  return /* @__PURE__ */ Z("div", {
2737
2796
  style: {
@@ -2747,7 +2806,7 @@ function Ar({ layout: e, rowSelection: t = [], ...n }) {
2747
2806
  flex: "1 1 auto",
2748
2807
  minWidth: 0
2749
2808
  },
2750
- children: /* @__PURE__ */ X(kr, {
2809
+ children: /* @__PURE__ */ X(Ir, {
2751
2810
  layout: e,
2752
2811
  rowSelection: [],
2753
2812
  ...n
@@ -2759,7 +2818,7 @@ function Ar({ layout: e, rowSelection: t = [], ...n }) {
2759
2818
  flex: "1 1 auto",
2760
2819
  minWidth: 0
2761
2820
  },
2762
- children: /* @__PURE__ */ X(kr, {
2821
+ children: /* @__PURE__ */ X(Ir, {
2763
2822
  layout: e,
2764
2823
  rowSelection: t,
2765
2824
  ...n
@@ -2767,9 +2826,9 @@ function Ar({ layout: e, rowSelection: t = [], ...n }) {
2767
2826
  })]
2768
2827
  });
2769
2828
  }
2770
- function jr({ layout: e, row: t, rowSelection: n, onRun: r, reservedRightWidth: i = 0, kind: a = "toolbar", align: o = "trailing", constrain: s = !0, measurementOverride: c, entityActions: l, globalActions: u, ariaLabel: d = "Actions", widgetContext: f, onActionClick: p }) {
2771
- let m = ur(e);
2772
- return a === "row" ? /* @__PURE__ */ X(xr, {
2829
+ function Rr({ layout: e, row: t, rowSelection: n, onRun: r, reservedRightWidth: i = 0, kind: a = "toolbar", align: o = "trailing", constrain: s = !0, measurementOverride: c, entityActions: l, globalActions: u, ariaLabel: d = "Actions", widgetContext: f, onActionClick: p }) {
2830
+ let m = fr(e);
2831
+ return a === "row" ? /* @__PURE__ */ X(Cr, {
2773
2832
  layout: e,
2774
2833
  entityActions: l,
2775
2834
  globalActions: u,
@@ -2777,7 +2836,7 @@ function jr({ layout: e, row: t, rowSelection: n, onRun: r, reservedRightWidth:
2777
2836
  row: t,
2778
2837
  widgetContext: f,
2779
2838
  onActionClick: p
2780
- }) : m === 0 ? null : X(a === "toolbar" ? Ar : kr, {
2839
+ }) : m === 0 ? null : X(a === "toolbar" ? Lr : Ir, {
2781
2840
  layout: e,
2782
2841
  row: t,
2783
2842
  rowSelection: n,
@@ -2795,94 +2854,94 @@ function jr({ layout: e, row: t, rowSelection: n, onRun: r, reservedRightWidth:
2795
2854
  }
2796
2855
  //#endregion
2797
2856
  //#region src/lib/filter-evaluator.ts
2798
- var Mr = /* @__PURE__ */ new Set([
2857
+ var zr = /* @__PURE__ */ new Set([
2799
2858
  "string",
2800
2859
  "text",
2801
2860
  "rich_text",
2802
2861
  "email",
2803
2862
  "url",
2804
2863
  "phone"
2805
- ]), Nr = /* @__PURE__ */ new Set([
2864
+ ]), Br = /* @__PURE__ */ new Set([
2806
2865
  "int",
2807
2866
  "float",
2808
2867
  "decimal"
2809
- ]), Pr = /* @__PURE__ */ new Set([
2868
+ ]), Vr = /* @__PURE__ */ new Set([
2810
2869
  "date",
2811
2870
  "timestamp",
2812
2871
  "time"
2813
- ]), Fr = /^(?:eq|not_eq|contains|starts_with|is_empty|is_not_empty)$/, Ir = /^(?:eq|not_eq|in|not_in|is_empty|is_not_empty)$/, Lr = /^(?:eq|not_eq|gt|gte|lt|lte|between|is_empty|is_not_empty)$/, Rr = {
2814
- string: Fr,
2815
- text: Fr,
2816
- rich_text: Fr,
2817
- email: Fr,
2818
- url: Fr,
2819
- phone: Fr,
2820
- enum: Ir,
2821
- int: Lr,
2822
- float: Lr,
2823
- decimal: Lr,
2824
- date: Lr,
2825
- timestamp: Lr,
2826
- time: Lr,
2872
+ ]), Hr = /^(?:eq|not_eq|contains|starts_with|is_empty|is_not_empty)$/, Ur = /^(?:eq|not_eq|in|not_in|is_empty|is_not_empty)$/, Wr = /^(?:eq|not_eq|gt|gte|lt|lte|between|is_empty|is_not_empty)$/, Gr = {
2873
+ string: Hr,
2874
+ text: Hr,
2875
+ rich_text: Hr,
2876
+ email: Hr,
2877
+ url: Hr,
2878
+ phone: Hr,
2879
+ enum: Ur,
2880
+ int: Wr,
2881
+ float: Wr,
2882
+ decimal: Wr,
2883
+ date: Wr,
2884
+ timestamp: Wr,
2885
+ time: Wr,
2827
2886
  bool: /^(?:eq|is_empty)$/,
2828
2887
  ref: /^(?:eq|not_eq|is_empty|is_not_empty)$/,
2829
2888
  uuid: /^(?:eq|not_eq|is_empty|is_not_empty)$/
2830
2889
  };
2831
- function zr(e, t, n) {
2832
- return e.every((e) => Br(e, t, n));
2890
+ function Kr(e, t, n) {
2891
+ return e.every((e) => qr(e, t, n));
2833
2892
  }
2834
- function Br(e, t, n) {
2835
- if (e.and) return e.and.every((e) => Br(e, t, n));
2836
- if (e.or) return e.or.some((e) => Br(e, t, n));
2893
+ function qr(e, t, n) {
2894
+ if (e.and) return e.and.every((e) => qr(e, t, n));
2895
+ if (e.or) return e.or.some((e) => qr(e, t, n));
2837
2896
  if (!e.field || !e.op) return !1;
2838
2897
  let r = t[e.field];
2839
- return !r || !Rr[r.type]?.test(e.op) ? !1 : Vr(e, r.type, n[e.field]);
2898
+ return !r || !Gr[r.type]?.test(e.op) ? !1 : Jr(e, r.type, n[e.field]);
2840
2899
  }
2841
- function Vr(e, t, n) {
2842
- let r = Hr(n);
2900
+ function Jr(e, t, n) {
2901
+ let r = Yr(n);
2843
2902
  if (e.op === "is_empty") return r;
2844
2903
  if (e.op === "is_not_empty") return !r;
2845
2904
  if (r) return !1;
2846
2905
  let i = e.value;
2847
2906
  switch (e.op) {
2848
- case "eq": return Ur(t, n, i);
2849
- case "not_eq": return !Ur(t, n, i) && Wr(t, n, i);
2850
- case "in": return Array.isArray(i) && i.some((e) => Ur(t, n, e));
2851
- case "not_in": return Array.isArray(i) && i.every((e) => Wr(t, n, e) && !Ur(t, n, e));
2907
+ case "eq": return Xr(t, n, i);
2908
+ case "not_eq": return !Xr(t, n, i) && Zr(t, n, i);
2909
+ case "in": return Array.isArray(i) && i.some((e) => Xr(t, n, e));
2910
+ case "not_in": return Array.isArray(i) && i.every((e) => Zr(t, n, e) && !Xr(t, n, e));
2852
2911
  case "contains": return typeof n == "string" && typeof i == "string" && n.toLowerCase().includes(i.toLowerCase());
2853
2912
  case "starts_with": return typeof n == "string" && typeof i == "string" && n.toLowerCase().startsWith(i.toLowerCase());
2854
- case "gt": return Gr(t, n, i, (e, t) => e > t);
2855
- case "gte": return Gr(t, n, i, (e, t) => e >= t);
2856
- case "lt": return Gr(t, n, i, (e, t) => e < t);
2857
- case "lte": return Gr(t, n, i, (e, t) => e <= t);
2913
+ case "gt": return Qr(t, n, i, (e, t) => e > t);
2914
+ case "gte": return Qr(t, n, i, (e, t) => e >= t);
2915
+ case "lt": return Qr(t, n, i, (e, t) => e < t);
2916
+ case "lte": return Qr(t, n, i, (e, t) => e <= t);
2858
2917
  case "between": {
2859
2918
  if (!Array.isArray(i) || i.length !== 2) return !1;
2860
- let e = Kr(t, n, i[0]), r = Kr(t, n, i[1]);
2919
+ let e = $r(t, n, i[0]), r = $r(t, n, i[1]);
2861
2920
  return e === void 0 || r === void 0 ? !1 : e >= 0 && r <= 0;
2862
2921
  }
2863
2922
  default: return !1;
2864
2923
  }
2865
2924
  }
2866
- function Hr(e) {
2925
+ function Yr(e) {
2867
2926
  return e == null || e === "" || Array.isArray(e) && e.length === 0;
2868
2927
  }
2869
- function Ur(e, t, n) {
2870
- return Wr(e, t, n) ? Pr.has(e) ? Kr(e, t, n) === 0 : t === n : !1;
2928
+ function Xr(e, t, n) {
2929
+ return Zr(e, t, n) ? Vr.has(e) ? $r(e, t, n) === 0 : t === n : !1;
2871
2930
  }
2872
- function Wr(e, t, n) {
2873
- return Kr(e, t, n) !== void 0;
2931
+ function Zr(e, t, n) {
2932
+ return $r(e, t, n) !== void 0;
2874
2933
  }
2875
- function Gr(e, t, n, r) {
2876
- let i = Kr(e, t, n);
2934
+ function Qr(e, t, n, r) {
2935
+ let i = $r(e, t, n);
2877
2936
  return i !== void 0 && r(i, 0);
2878
2937
  }
2879
- function Kr(e, t, n) {
2880
- if (Nr.has(e)) return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) ? void 0 : t === n ? 0 : t < n ? -1 : 1;
2881
- if (Pr.has(e)) return typeof t != "string" || typeof n != "string" || !qr(e, t) || !qr(e, n) ? void 0 : t === n ? 0 : t < n ? -1 : 1;
2882
- if (Mr.has(e) || e === "enum" || e === "ref" || e === "uuid") return typeof t != "string" || typeof n != "string" ? void 0 : t === n ? 0 : t < n ? -1 : 1;
2938
+ function $r(e, t, n) {
2939
+ if (Br.has(e)) return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) ? void 0 : t === n ? 0 : t < n ? -1 : 1;
2940
+ if (Vr.has(e)) return typeof t != "string" || typeof n != "string" || !ei(e, t) || !ei(e, n) ? void 0 : t === n ? 0 : t < n ? -1 : 1;
2941
+ if (zr.has(e) || e === "enum" || e === "ref" || e === "uuid") return typeof t != "string" || typeof n != "string" ? void 0 : t === n ? 0 : t < n ? -1 : 1;
2883
2942
  if (e === "bool") return typeof t != "boolean" || typeof n != "boolean" ? void 0 : t === n ? 0 : t ? 1 : -1;
2884
2943
  }
2885
- function qr(e, t) {
2944
+ function ei(e, t) {
2886
2945
  switch (e) {
2887
2946
  case "date": return /^\d{4}-\d{2}-\d{2}$/.test(t);
2888
2947
  case "time": return /^\d{2}:\d{2}:\d{2}(?:\.\d+)?$/.test(t);
@@ -2892,23 +2951,23 @@ function qr(e, t) {
2892
2951
  }
2893
2952
  //#endregion
2894
2953
  //#region src/lib/variants.ts
2895
- function Jr(e, t) {
2954
+ function ti(e, t) {
2896
2955
  let n = e.variants;
2897
2956
  if (!n || n.length === 0) return;
2898
2957
  let r = {};
2899
2958
  for (let [t, n] of e.fields) r[t] = n;
2900
- for (let [e, i] of n) if (e !== "default" && i.when && zr(i.when, r, t)) return e;
2959
+ for (let [e, i] of n) if (e !== "default" && i.when && Kr(i.when, r, t)) return e;
2901
2960
  return n.has("default") ? "default" : void 0;
2902
2961
  }
2903
- function Yr(e, t) {
2962
+ function ni(e, t) {
2904
2963
  let n = e?.variants;
2905
2964
  if (!n || !n.items().some((e) => e.actions !== void 0)) return;
2906
- let r = Jr(e, t), i = n.get("default"), a = (r ? n.get(r)?.actions : void 0) ?? i?.actions ?? [];
2965
+ let r = ti(e, t), i = n.get("default"), a = (r ? n.get(r)?.actions : void 0) ?? i?.actions ?? [];
2907
2966
  return new Set(a);
2908
2967
  }
2909
- function Xr(e, t) {
2968
+ function ri(e, t) {
2910
2969
  if (t.length === 0) return;
2911
- let n = t.map((t) => Yr(e, t));
2970
+ let n = t.map((t) => ni(e, t));
2912
2971
  if (n.every((e) => e === void 0)) return;
2913
2972
  let r = n[0] ?? /* @__PURE__ */ new Set(), i = new Set(r);
2914
2973
  for (let e of n.slice(1)) {
@@ -2920,18 +2979,18 @@ function Xr(e, t) {
2920
2979
  }
2921
2980
  return i;
2922
2981
  }
2923
- function Zr(e, t, n) {
2982
+ function ii(e, t, n) {
2924
2983
  if (!t.variants || t.variants.length === 0) return;
2925
2984
  if (e.variants) {
2926
- let r = Jr(e, n) ?? "default";
2985
+ let r = ti(e, n) ?? "default";
2927
2986
  return t.variants.has(r) ? r : "default";
2928
2987
  }
2929
2988
  let r = {};
2930
2989
  for (let [t, n] of e.fields) r[t] = n;
2931
- for (let [e, i] of t.variants) if (e !== "default" && i.when && zr(i.when, r, n)) return e;
2990
+ for (let [e, i] of t.variants) if (e !== "default" && i.when && Kr(i.when, r, n)) return e;
2932
2991
  return "default";
2933
2992
  }
2934
- var Qr = [
2993
+ var ai = [
2935
2994
  "items",
2936
2995
  "sidebar",
2937
2996
  "sidebar_width",
@@ -2943,35 +3002,35 @@ var Qr = [
2943
3002
  "card",
2944
3003
  "quick_peek"
2945
3004
  ];
2946
- function $r(e, t, n) {
3005
+ function oi(e, t, n) {
2947
3006
  if (!e || !t?.variants) return t;
2948
- let r = Zr(e, t, n), i = r ? t.variants.get(r) : void 0;
3007
+ let r = ii(e, t, n), i = r ? t.variants.get(r) : void 0;
2949
3008
  if (!i) return t;
2950
3009
  let a = { ...t };
2951
- for (let e of Qr) i[e] !== void 0 && (a[e] = i[e]);
3010
+ for (let e of ai) i[e] !== void 0 && (a[e] = i[e]);
2952
3011
  return a;
2953
3012
  }
2954
3013
  //#endregion
2955
3014
  //#region src/components/shared/RowActionsKebab.tsx
2956
- function ei({ actions: t, objectIds: n, row: r, entity: i, onSuccess: a, preMenu: o, divider: s, size: c = 22, align: l = "end" }) {
2957
- let u = q(null), [d, f] = J(!1), [p, m] = J(null), { run: h } = te(), g = K(() => {
3015
+ function si({ actions: t, objectIds: n, row: r, entity: i, onSuccess: a, preMenu: o, divider: s, size: c = 22, align: l = "end" }) {
3016
+ let u = J(null), [d, f] = Y(!1), [p, m] = Y(null), { run: h } = ee(), g = q(() => {
2958
3017
  let e = {};
2959
3018
  for (let { code: n, action: r } of t) e[n] = r;
2960
3019
  return e;
2961
- }, [t]), v = K(() => {
3020
+ }, [t]), v = q(() => {
2962
3021
  let e = t.map(({ code: e }) => ({
2963
3022
  kind: "action",
2964
3023
  code: e,
2965
3024
  enabled: !0,
2966
3025
  reason: null
2967
3026
  }));
2968
- return r ? j(e, g, void 0, r, [], Yr(i, r)) : e;
3027
+ return r ? j(e, g, void 0, r, [], ni(i, r)) : e;
2969
3028
  }, [
2970
3029
  t,
2971
3030
  g,
2972
3031
  r,
2973
3032
  i
2974
- ]), y = W((e, t) => {
3033
+ ]), y = G((e, t) => {
2975
3034
  f(!1);
2976
3035
  let i = t.entity ? `${t.entity}.${e}` : e;
2977
3036
  return h({
@@ -2979,7 +3038,7 @@ function ei({ actions: t, objectIds: n, row: r, entity: i, onSuccess: a, preMenu
2979
3038
  title: C(t.display?.name) || e,
2980
3039
  row: r,
2981
3040
  execute: async (e) => {
2982
- let t = await F(i, R(e, n));
3041
+ let t = await F(i, z(e, n));
2983
3042
  return a?.(), t;
2984
3043
  }
2985
3044
  });
@@ -2997,13 +3056,13 @@ function ei({ actions: t, objectIds: n, row: r, entity: i, onSuccess: a, preMenu
2997
3056
  alignItems: "center",
2998
3057
  justifyContent: "flex-end"
2999
3058
  },
3000
- children: [/* @__PURE__ */ X(B, {
3059
+ children: [/* @__PURE__ */ X(V, {
3001
3060
  ref: u,
3002
3061
  size: c,
3003
3062
  icon: /* @__PURE__ */ X(e.more, { size: Math.round(c * .55) }),
3004
3063
  onClick: () => f((e) => !e),
3005
3064
  title: "Actions"
3006
- }), /* @__PURE__ */ Z(V, {
3065
+ }), /* @__PURE__ */ Z(H, {
3007
3066
  open: d,
3008
3067
  anchor: u.current,
3009
3068
  onClose: () => f(!1),
@@ -3012,7 +3071,7 @@ function ei({ actions: t, objectIds: n, row: r, entity: i, onSuccess: a, preMenu
3012
3071
  children: [
3013
3072
  o,
3014
3073
  o && s && v.length > 0 && /* @__PURE__ */ X(_, { divider: !0 }),
3015
- /* @__PURE__ */ X(Cr, {
3074
+ /* @__PURE__ */ X(Tr, {
3016
3075
  layout: v,
3017
3076
  entityActions: g,
3018
3077
  onRun: y,
@@ -3026,7 +3085,7 @@ function ei({ actions: t, objectIds: n, row: r, entity: i, onSuccess: a, preMenu
3026
3085
  }
3027
3086
  //#endregion
3028
3087
  //#region src/components/detail-layout/AssociatedToolbar.tsx
3029
- function ti({ entity: t, searchable: n, filterFields: r, searchValue: i, onSearchChange: a, filters: o, onFilterChange: s, allEntities: c }) {
3088
+ function ci({ entity: t, searchable: n, filterFields: r, searchValue: i, onSearchChange: a, filters: o, onFilterChange: s, allEntities: c }) {
3030
3089
  let l = n === !0, u = r && r.length > 0;
3031
3090
  return !l && !u ? null : /* @__PURE__ */ Z("div", {
3032
3091
  style: {
@@ -3050,7 +3109,7 @@ function ti({ entity: t, searchable: n, filterFields: r, searchValue: i, onSearc
3050
3109
  let n = t.fields.get(e);
3051
3110
  if (!n) return null;
3052
3111
  let r = o[e] ?? "__all__", i = b(n, e, c);
3053
- if (n.type === "ref" && n.ref?.entity) return /* @__PURE__ */ X(ni, {
3112
+ if (n.type === "ref" && n.ref?.entity) return /* @__PURE__ */ X(li, {
3054
3113
  field: n,
3055
3114
  label: i,
3056
3115
  value: r,
@@ -3076,8 +3135,8 @@ function ti({ entity: t, searchable: n, filterFields: r, searchValue: i, onSearc
3076
3135
  })]
3077
3136
  });
3078
3137
  }
3079
- function ni({ field: e, label: t, value: n, onChange: r }) {
3080
- let i = u(e.ref?.entity), a = e.display?.ref_display_field ?? i?.display?.display_field, o = K(() => i ? [...i.fields].find(([, e]) => e.primary)?.[0] ?? "id" : "id", [i]), { data: s } = O(e.ref?.entity, {
3138
+ function li({ field: e, label: t, value: n, onChange: r }) {
3139
+ let i = u(e.ref?.entity), a = e.display?.ref_display_field ?? i?.display?.display_field, o = q(() => i ? [...i.fields].find(([, e]) => e.primary)?.[0] ?? "id" : "id", [i]), { data: s } = O(e.ref?.entity, {
3081
3140
  per_page: 200,
3082
3141
  sort: a ? `${a}:asc` : void 0
3083
3142
  }), c = s?.data ?? [], l = (e) => {
@@ -3091,7 +3150,7 @@ function ni({ field: e, label: t, value: n, onChange: r }) {
3091
3150
  value: "__all__",
3092
3151
  label: `All ${t}`
3093
3152
  }, ...c.map((e) => {
3094
- let t = String(e[o]), n = e[ie];
3153
+ let t = String(e[o]), n = e[re];
3095
3154
  return {
3096
3155
  value: t,
3097
3156
  label: typeof n == "string" && n !== "" ? n : a ? l(e[a] ?? t) : t
@@ -3109,12 +3168,12 @@ function ni({ field: e, label: t, value: n, onChange: r }) {
3109
3168
  }
3110
3169
  //#endregion
3111
3170
  //#region src/lib/action-dispatch.ts
3112
- function ri(e, t, n, r) {
3113
- return L(t) ? (le(t.ui_steps, n), null) : t.entity ? `${t.entity}.${e}` : r ? `${r}.${e}` : e;
3171
+ function ui(e, t, n, r) {
3172
+ return L(t) ? (ce(t.ui_steps, n), null) : t.entity ? `${t.entity}.${e}` : r ? `${r}.${e}` : e;
3114
3173
  }
3115
3174
  //#endregion
3116
3175
  //#region src/components/detail-layout/AssociatedBlock.tsx
3117
- function ii(e) {
3176
+ function di(e) {
3118
3177
  if (!e) return [];
3119
3178
  let t = [];
3120
3179
  for (let [n, r] of Object.entries(e)) (r.visibility ?? []).includes("list_row") && (r.association || s(n) || t.push({
@@ -3123,7 +3182,7 @@ function ii(e) {
3123
3182
  }));
3124
3183
  return t;
3125
3184
  }
3126
- function ai(e, t, n) {
3185
+ function fi(e, t, n) {
3127
3186
  if (!e) return [];
3128
3187
  let r = [];
3129
3188
  for (let [i, a] of Object.entries(e)) {
@@ -3149,7 +3208,7 @@ function ai(e, t, n) {
3149
3208
  }
3150
3209
  return r;
3151
3210
  }
3152
- function oi(e, t, n) {
3211
+ function pi(e, t, n) {
3153
3212
  let r = e[n];
3154
3213
  if (!r) return null;
3155
3214
  let i = e[t], a = i?.children?.find((e) => e.entity === n);
@@ -3171,22 +3230,22 @@ function oi(e, t, n) {
3171
3230
  }
3172
3231
  return null;
3173
3232
  }
3174
- function si(e, t, n) {
3175
- let r = new Set(fe(e));
3233
+ function mi(e, t, n) {
3234
+ let r = new Set(de(e));
3176
3235
  return new Set(t.filter((t) => {
3177
3236
  if (t === n || r.has(t)) return !1;
3178
3237
  let i = e.fields.get(t);
3179
3238
  return !(!i || i.auto || i.primary || i.source);
3180
3239
  }));
3181
3240
  }
3182
- function ci(e, t, n) {
3241
+ function hi(e, t, n) {
3183
3242
  return new Set(t.filter((t) => {
3184
3243
  if (t === n) return !1;
3185
3244
  let r = e.fields.get(t);
3186
3245
  return !(!r || r.auto);
3187
3246
  }));
3188
3247
  }
3189
- function li(e, t, n, r) {
3248
+ function gi(e, t, n, r) {
3190
3249
  let i = [];
3191
3250
  for (let a of t) {
3192
3251
  let t = n.fields.get(a);
@@ -3196,7 +3255,7 @@ function li(e, t, n, r) {
3196
3255
  }
3197
3256
  return i;
3198
3257
  }
3199
- function ui({ node: e, ctx: t }) {
3258
+ function _i({ node: e, ctx: t }) {
3200
3259
  let n = e.associated;
3201
3260
  if (!n || t.isNew) return null;
3202
3261
  let r = t.schema.entities[n];
@@ -3208,8 +3267,8 @@ function ui({ node: e, ctx: t }) {
3208
3267
  },
3209
3268
  children: ["Entity not found: ", n]
3210
3269
  });
3211
- let i = oi(t.schema.entities, t.entityCode, n);
3212
- return i ? /* @__PURE__ */ X(di, {
3270
+ let i = pi(t.schema.entities, t.entityCode, n);
3271
+ return i ? /* @__PURE__ */ X(vi, {
3213
3272
  node: e,
3214
3273
  ctx: t,
3215
3274
  assocCode: n,
@@ -3229,23 +3288,23 @@ function ui({ node: e, ctx: t }) {
3229
3288
  ]
3230
3289
  });
3231
3290
  }
3232
- function di({ node: r, ctx: i, assocCode: a, assocEntity: o, fkField: s }) {
3291
+ function vi({ node: r, ctx: i, assocCode: a, assocEntity: o, fkField: s }) {
3233
3292
  let c = r.columns && r.columns.length > 0 ? r.columns.filter((e) => e !== s && !!o.fields.get(e)) : o.fields.names().filter((e) => {
3234
3293
  if (e === s) return !1;
3235
3294
  let t = o.fields.get(e);
3236
3295
  return !(!t || t.primary || t.display?.is_listable === !1);
3237
- }), l = P(o, "update"), u = r.interaction ?? (l ? "navigate" : "readonly"), d = (u === "inline_edit" || u === "row_edit") && l && r.editable !== !1, f = C(o.display?.name_plural) || C(o.display?.name) || a, p = r.searchable === !0 || r.filters && r.filters.length > 0, m = K(() => ai(o.actions, s, i.recordId), [
3296
+ }), l = P(o, "update"), u = r.interaction ?? (l ? "navigate" : "readonly"), d = (u === "inline_edit" || u === "row_edit") && l && r.editable !== !1, f = C(o.display?.name_plural) || C(o.display?.name) || a, p = r.searchable === !0 || r.filters && r.filters.length > 0, m = q(() => fi(o.actions, s, i.recordId), [
3238
3297
  o.actions,
3239
3298
  s,
3240
3299
  i.recordId
3241
- ]), h = K(() => {
3300
+ ]), h = q(() => {
3242
3301
  let e = {};
3243
3302
  for (let { code: t, action: n } of m) e[t] = n;
3244
3303
  return e;
3245
- }, [m]), g = K(() => {
3304
+ }, [m]), g = q(() => {
3246
3305
  let e = o.action_layout ?? null;
3247
- return j(e ?? ue(h, "list_toolbar"), h, void 0, {}, []);
3248
- }, [o.action_layout, h]), { run: _ } = te(), v = Bt(), y = n(), b = K(() => ({
3306
+ return j(e ?? le(h, "list_toolbar"), h, void 0, {}, []);
3307
+ }, [o.action_layout, h]), { run: _ } = ee(), v = Vt(), y = n(), b = q(() => ({
3249
3308
  entity: o,
3250
3309
  entityCode: a,
3251
3310
  screenRoute: typeof window < "u" ? window.location.pathname : "",
@@ -3263,18 +3322,18 @@ function di({ node: r, ctx: i, assocCode: a, assocEntity: o, fkField: s }) {
3263
3322
  a,
3264
3323
  y,
3265
3324
  v
3266
- ]), x = Ue(), S = W(() => {
3325
+ ]), x = Ue(), S = G(() => {
3267
3326
  x.invalidateQueries({ predicate: (e) => {
3268
3327
  let t = e.queryKey;
3269
3328
  return t[0] === "entity-children" && t[3] === a;
3270
3329
  } });
3271
- }, [x, a]), w = W((e, t) => {
3272
- let n = ri(e, t, {}, a);
3330
+ }, [x, a]), w = G((e, t) => {
3331
+ let n = ui(e, t, {}, a);
3273
3332
  if (n !== null) return _({
3274
3333
  action: t,
3275
3334
  title: C(t.display?.name) || e,
3276
3335
  execute: async (e) => {
3277
- let t = await F(n, R(e, void 0));
3336
+ let t = await F(n, z(e, void 0));
3278
3337
  return S(), t;
3279
3338
  }
3280
3339
  });
@@ -3282,7 +3341,7 @@ function di({ node: r, ctx: i, assocCode: a, assocEntity: o, fkField: s }) {
3282
3341
  _,
3283
3342
  a,
3284
3343
  S
3285
- ]), [T, E] = J(0), D = /* @__PURE__ */ Z("div", {
3344
+ ]), [T, E] = Y(0), D = /* @__PURE__ */ Z("div", {
3286
3345
  style: {
3287
3346
  display: "flex",
3288
3347
  alignItems: "center",
@@ -3291,28 +3350,28 @@ function di({ node: r, ctx: i, assocCode: a, assocEntity: o, fkField: s }) {
3291
3350
  minWidth: 0,
3292
3351
  justifyContent: "flex-end"
3293
3352
  },
3294
- children: [o.action_layout ? g.length > 0 && /* @__PURE__ */ X(jr, {
3353
+ children: [o.action_layout ? g.length > 0 && /* @__PURE__ */ X(Rr, {
3295
3354
  kind: "toolbar",
3296
3355
  layout: g,
3297
3356
  entityActions: h,
3298
3357
  onRun: w,
3299
3358
  widgetContext: b,
3300
3359
  ariaLabel: `${f} toolbar actions`
3301
- }) : m.map(({ code: e, action: t }) => /* @__PURE__ */ X(or, {
3360
+ }) : m.map(({ code: e, action: t }) => /* @__PURE__ */ X(cr, {
3302
3361
  actionCode: e,
3303
3362
  action: t,
3304
3363
  entityCode: a,
3305
3364
  variant: "ghost",
3306
3365
  size: "sm",
3307
3366
  onSuccess: S
3308
- }, e)), d && /* @__PURE__ */ X(U, {
3367
+ }, e)), d && /* @__PURE__ */ X(W, {
3309
3368
  kind: "ghost",
3310
3369
  size: "xs",
3311
3370
  icon: /* @__PURE__ */ X(e.plus, { size: 12 }),
3312
3371
  onClick: () => E((e) => e + 1),
3313
3372
  children: "Add row"
3314
3373
  })]
3315
- }), O = p ? /* @__PURE__ */ X(pi, {
3374
+ }), O = p ? /* @__PURE__ */ X(bi, {
3316
3375
  entityCode: a,
3317
3376
  entity: o,
3318
3377
  parentEntity: i.entityCode,
@@ -3326,7 +3385,7 @@ function di({ node: r, ctx: i, assocCode: a, assocEntity: o, fkField: s }) {
3326
3385
  filterFields: r.filters,
3327
3386
  sort: r.sort,
3328
3387
  startDraftSignal: T
3329
- }) : /* @__PURE__ */ X(fi, {
3388
+ }) : /* @__PURE__ */ X(yi, {
3330
3389
  entityCode: a,
3331
3390
  entity: o,
3332
3391
  parentEntity: i.entityCode,
@@ -3346,7 +3405,7 @@ function di({ node: r, ctx: i, assocCode: a, assocEntity: o, fkField: s }) {
3346
3405
  marginBottom: 8
3347
3406
  },
3348
3407
  children: D
3349
- }), O] }) : /* @__PURE__ */ X(Je, {
3408
+ }), O] }) : /* @__PURE__ */ X(Ye, {
3350
3409
  title: f,
3351
3410
  icon: o.display?.icon ? /* @__PURE__ */ X(t, {
3352
3411
  name: o.display.icon,
@@ -3356,10 +3415,10 @@ function di({ node: r, ctx: i, assocCode: a, assocEntity: o, fkField: s }) {
3356
3415
  children: O
3357
3416
  });
3358
3417
  }
3359
- function fi({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey: i, columns: a, editable: o, interaction: s, ctx: c, sort: l, startDraftSignal: u }) {
3360
- let d = Ue(), { data: f, isLoading: p, isError: m } = nr(n, r, e, i, l), h = f?.data ?? [], g = f?.$refs, _ = W(() => {
3418
+ function yi({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey: i, columns: a, editable: o, interaction: s, ctx: c, sort: l, startDraftSignal: u }) {
3419
+ let d = Ue(), { data: f, isLoading: p, isError: m } = ir(n, r, e, i, l), h = f?.data ?? [], g = f?.$refs, _ = G(() => {
3361
3420
  d.invalidateQueries({ queryKey: [
3362
- tr,
3421
+ rr,
3363
3422
  n,
3364
3423
  r,
3365
3424
  e
@@ -3370,7 +3429,7 @@ function fi({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey
3370
3429
  r,
3371
3430
  e
3372
3431
  ]);
3373
- return /* @__PURE__ */ X(mi, {
3432
+ return /* @__PURE__ */ X(xi, {
3374
3433
  entityCode: e,
3375
3434
  entity: t,
3376
3435
  parentId: r,
@@ -3387,14 +3446,14 @@ function fi({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey
3387
3446
  startDraftSignal: u
3388
3447
  });
3389
3448
  }
3390
- function pi({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey: i, columns: a, editable: o, interaction: s, ctx: c, searchable: l, filterFields: u, sort: d, startDraftSignal: f }) {
3391
- let p = Ue(), [m, h] = J(""), [g, _] = J(""), [v, y] = J({}), b = q(void 0);
3392
- G(() => (b.current && clearTimeout(b.current), b.current = setTimeout(() => {
3449
+ function bi({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey: i, columns: a, editable: o, interaction: s, ctx: c, searchable: l, filterFields: u, sort: d, startDraftSignal: f }) {
3450
+ let p = Ue(), [m, h] = Y(""), [g, _] = Y(""), [v, y] = Y({}), b = J(void 0);
3451
+ K(() => (b.current && clearTimeout(b.current), b.current = setTimeout(() => {
3393
3452
  _(m);
3394
3453
  }, 300), () => {
3395
3454
  b.current && clearTimeout(b.current);
3396
3455
  }), [m]);
3397
- let x = W((e, t) => {
3456
+ let x = G((e, t) => {
3398
3457
  y((n) => {
3399
3458
  if (t === "__all__") {
3400
3459
  let { [e]: t, ...r } = n;
@@ -3405,7 +3464,7 @@ function pi({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey
3405
3464
  [e]: t
3406
3465
  };
3407
3466
  });
3408
- }, []), S = K(() => Object.keys(v).length > 0 ? v : void 0, [v]), { data: C, isLoading: w, isError: T, hasNextPage: E, fetchNextPage: D, isFetchingNextPage: O } = ar(n, r, e, i, d, void 0, g || void 0, S), { rows: k, refs: j } = K(() => {
3467
+ }, []), S = q(() => Object.keys(v).length > 0 ? v : void 0, [v]), { data: C, isLoading: w, isError: T, hasNextPage: E, fetchNextPage: D, isFetchingNextPage: O } = sr(n, r, e, i, d, void 0, g || void 0, S), { rows: k, refs: j } = q(() => {
3409
3468
  if (!C?.pages) return {
3410
3469
  rows: [],
3411
3470
  refs: void 0
@@ -3422,14 +3481,14 @@ function pi({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey
3422
3481
  rows: e,
3423
3482
  refs: t
3424
3483
  };
3425
- }, [C]), M = W(() => {
3484
+ }, [C]), M = G(() => {
3426
3485
  p.invalidateQueries({ predicate: (t) => {
3427
3486
  let n = t.queryKey;
3428
3487
  return n[0] === "entity-children" && n[3] === e;
3429
3488
  } });
3430
3489
  }, [p, e]);
3431
3490
  return /* @__PURE__ */ Z("div", { children: [
3432
- /* @__PURE__ */ X(ti, {
3491
+ /* @__PURE__ */ X(ci, {
3433
3492
  entity: t,
3434
3493
  searchable: l,
3435
3494
  filterFields: u,
@@ -3439,7 +3498,7 @@ function pi({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey
3439
3498
  onFilterChange: x,
3440
3499
  allEntities: c.schema.entities
3441
3500
  }),
3442
- /* @__PURE__ */ X(mi, {
3501
+ /* @__PURE__ */ X(xi, {
3443
3502
  entityCode: e,
3444
3503
  entity: t,
3445
3504
  parentId: r,
@@ -3457,7 +3516,7 @@ function pi({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey
3457
3516
  }),
3458
3517
  E && /* @__PURE__ */ X("div", {
3459
3518
  style: { marginTop: 4 },
3460
- children: /* @__PURE__ */ X(U, {
3519
+ children: /* @__PURE__ */ X(W, {
3461
3520
  kind: "ghost",
3462
3521
  size: "xs",
3463
3522
  icon: O ? /* @__PURE__ */ X(A, { size: 12 }) : void 0,
@@ -3468,44 +3527,44 @@ function pi({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey
3468
3527
  })
3469
3528
  ] });
3470
3529
  }
3471
- function mi({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i, editable: a, interaction: o, ctx: s, rows: c, refs: l, isLoading: u, isError: d, invalidateQuery: f, startDraftSignal: p }) {
3472
- let m = se(), h = m.isPhone && s.relatedRecordsPresentation === "table", g = i.find((e) => e !== r), _ = K(() => o === "navigate" ? ne(void 0, t, s.schema.screens) : null, [
3530
+ function xi({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i, editable: a, interaction: o, ctx: s, rows: c, refs: l, isLoading: u, isError: d, invalidateQuery: f, startDraftSignal: p }) {
3531
+ let m = se(), h = m.isPhone && s.relatedRecordsPresentation === "table", g = i.find((e) => e !== r), _ = q(() => o === "navigate" ? te(void 0, t, s.schema.screens) : null, [
3473
3532
  o,
3474
3533
  t,
3475
3534
  s.schema.screens
3476
- ]), v = K(() => a ? si(t, i, r) : /* @__PURE__ */ new Set(), [
3535
+ ]), v = q(() => a ? mi(t, i, r) : /* @__PURE__ */ new Set(), [
3477
3536
  i,
3478
3537
  r,
3479
3538
  t,
3480
3539
  a
3481
- ]), y = K(() => ci(t, i, r), [
3540
+ ]), y = q(() => hi(t, i, r), [
3482
3541
  i,
3483
3542
  r,
3484
3543
  t
3485
- ]), x = K(() => {
3544
+ ]), x = q(() => {
3486
3545
  let e = /* @__PURE__ */ new Map();
3487
3546
  for (let n of c) {
3488
- let r = me(t, n);
3489
- e.set(he(r), r);
3547
+ let r = pe(t, n);
3548
+ e.set(me(r), r);
3490
3549
  }
3491
3550
  return e;
3492
- }, [c, t]), S = K(() => {
3551
+ }, [c, t]), S = q(() => {
3493
3552
  let e = /* @__PURE__ */ new Map();
3494
3553
  for (let n of c) {
3495
3554
  let r = n.$row_version;
3496
- typeof r == "string" && r !== "" && e.set(he(me(t, n)), r);
3555
+ typeof r == "string" && r !== "" && e.set(me(pe(t, n)), r);
3497
3556
  }
3498
3557
  return e;
3499
- }, [c, t]), w = K(() => ii(t.actions), [t.actions]), [T, E] = J(null), [D, O] = J(null), [k, A] = J([]), [j, N] = J({}), P = q(j);
3558
+ }, [c, t]), w = q(() => di(t.actions), [t.actions]), [T, E] = Y(null), [D, O] = Y(null), [k, A] = Y([]), [j, N] = Y({}), P = J(j);
3500
3559
  P.current = j;
3501
- let F = q({});
3502
- G(() => {
3560
+ let F = J({});
3561
+ K(() => {
3503
3562
  let e = F.current;
3504
3563
  return () => {
3505
3564
  for (let t of Object.values(e)) clearTimeout(t);
3506
3565
  };
3507
3566
  }, []);
3508
- let [I, L] = J(null), [ee, R] = J([]), [z, B] = J(!1), { run: ie } = te(), [V, ae] = J(/* @__PURE__ */ new Set()), oe = W(async (t, n, r) => {
3567
+ let [I, L] = Y(null), [R, z] = Y([]), [B, V] = Y(!1), { run: re } = ee(), [H, ie] = Y(/* @__PURE__ */ new Set()), ae = G(async (t, n, r) => {
3509
3568
  N((e) => ({
3510
3569
  ...e,
3511
3570
  [t]: {
@@ -3519,7 +3578,7 @@ function mi({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
3519
3578
  ...n,
3520
3579
  $row_version: i
3521
3580
  } : n;
3522
- return await re(e, x.get(t) ?? t, a), N((e) => {
3581
+ return await ne(e, x.get(t) ?? t, a), N((e) => {
3523
3582
  let n = e[t];
3524
3583
  if (!n) return e;
3525
3584
  if (n.ver > r) return {
@@ -3548,7 +3607,7 @@ function mi({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
3548
3607
  f,
3549
3608
  x,
3550
3609
  S
3551
- ]), H = W((e, t, n) => {
3610
+ ]), U = G((e, t, n) => {
3552
3611
  N((r) => {
3553
3612
  let i = r[e] ?? {
3554
3613
  buffer: {},
@@ -3568,44 +3627,44 @@ function mi({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
3568
3627
  };
3569
3628
  }), o === "inline_edit" && (F.current[e] && clearTimeout(F.current[e]), F.current[e] = setTimeout(() => {
3570
3629
  let t = P.current[e];
3571
- t && Object.keys(t.buffer).length > 0 && oe(e, { ...t.buffer }, t.ver);
3630
+ t && Object.keys(t.buffer).length > 0 && ae(e, { ...t.buffer }, t.ver);
3572
3631
  }, 500));
3573
- }, [oe, o]), ce = W(() => {
3632
+ }, [ae, o]), oe = G(() => {
3574
3633
  let e = {};
3575
3634
  e[r] = n;
3576
3635
  for (let n of i) {
3577
3636
  let r = t.fields.get(n);
3578
3637
  r && (r.default === void 0 ? r.type === "bool" && (e[n] = !1) : e[n] = r.default);
3579
3638
  }
3580
- L(e), R([]);
3639
+ L(e), z([]);
3581
3640
  }, [
3582
3641
  r,
3583
3642
  n,
3584
3643
  i,
3585
3644
  t.fields
3586
- ]), le = q(p);
3587
- G(() => {
3588
- p !== void 0 && p !== le.current && (le.current = p, !I && ce());
3645
+ ]), ce = J(p);
3646
+ K(() => {
3647
+ p !== void 0 && p !== ce.current && (ce.current = p, !I && oe());
3589
3648
  }, [
3590
3649
  p,
3591
3650
  I,
3592
- ce
3651
+ oe
3593
3652
  ]);
3594
- let U = W(async () => {
3653
+ let W = G(async () => {
3595
3654
  if (!I) return;
3596
- let n = li(I, i, t, r);
3655
+ let n = gi(I, i, t, r);
3597
3656
  if (n.length > 0) {
3598
- R(n);
3657
+ z(n);
3599
3658
  return;
3600
3659
  }
3601
- B(!0);
3660
+ V(!0);
3602
3661
  try {
3603
- await M(e, I), L(null), R([]), f();
3662
+ await M(e, I), L(null), z([]), f();
3604
3663
  } catch (e) {
3605
3664
  let t = e instanceof Error ? e.message : "Create failed";
3606
- R([`_error:${t}`]);
3665
+ z([`_error:${t}`]);
3607
3666
  } finally {
3608
- B(!1);
3667
+ V(!1);
3609
3668
  }
3610
3669
  }, [
3611
3670
  I,
@@ -3614,49 +3673,49 @@ function mi({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
3614
3673
  r,
3615
3674
  e,
3616
3675
  f
3617
- ]), ue = W((e) => {
3676
+ ]), le = G((e) => {
3618
3677
  N({}), A([]), O(e);
3619
- }, []), fe = W(async (e) => {
3678
+ }, []), de = G(async (e) => {
3620
3679
  let n = P.current[e], a = n?.buffer ?? {};
3621
3680
  if (Object.keys(a).length === 0) {
3622
3681
  O(null), A([]);
3623
3682
  return;
3624
3683
  }
3625
- let o = li({
3626
- ...c.find((n) => he(me(t, n)) === e) ?? {},
3684
+ let o = gi({
3685
+ ...c.find((n) => me(pe(t, n)) === e) ?? {},
3627
3686
  ...a
3628
3687
  }, i, t, r);
3629
3688
  if (o.length > 0) {
3630
3689
  A(o);
3631
3690
  return;
3632
3691
  }
3633
- await oe(e, { ...a }, n?.ver ?? 0) && (O(null), A([]));
3692
+ await ae(e, { ...a }, n?.ver ?? 0) && (O(null), A([]));
3634
3693
  }, [
3635
3694
  c,
3636
3695
  t,
3637
3696
  i,
3638
3697
  r,
3639
- oe
3640
- ]), pe = W((e) => {
3698
+ ae
3699
+ ]), fe = G((e) => {
3641
3700
  N((t) => {
3642
3701
  if (!t[e]) return t;
3643
3702
  let { [e]: n, ...r } = t;
3644
3703
  return r;
3645
3704
  }), A([]), O(null);
3646
- }, []), ge = W((n, r) => {
3705
+ }, []), he = G((n, r) => {
3647
3706
  let i = x.get(n) ?? n;
3648
- return ie({
3707
+ return re({
3649
3708
  action: t.actions?.__delete,
3650
3709
  destructive: !0,
3651
3710
  title: C(t.display?.name) || "Delete",
3652
3711
  row: r,
3653
3712
  entity: e,
3654
3713
  execute: async () => {
3655
- ae((e) => new Set(e).add(n));
3714
+ ie((e) => new Set(e).add(n));
3656
3715
  try {
3657
- return await de(e, i);
3716
+ return await ue(e, i);
3658
3717
  } finally {
3659
- ae((e) => {
3718
+ ie((e) => {
3660
3719
  let t = new Set(e);
3661
3720
  return t.delete(n), t;
3662
3721
  });
@@ -3665,7 +3724,7 @@ function mi({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
3665
3724
  onSuccess: () => f()
3666
3725
  });
3667
3726
  }, [
3668
- ie,
3727
+ re,
3669
3728
  t,
3670
3729
  e,
3671
3730
  f,
@@ -3696,23 +3755,23 @@ function mi({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
3696
3755
  borderRadius: 6
3697
3756
  } })]
3698
3757
  });
3699
- let _e = c.length === 0 && !I;
3700
- return m.isPhone && !h ? /* @__PURE__ */ Z("div", { children: [_e && !a && /* @__PURE__ */ X("div", {
3758
+ let ge = c.length === 0 && !I;
3759
+ return m.isPhone && !h ? /* @__PURE__ */ Z("div", { children: [ge && !a && /* @__PURE__ */ X("div", {
3701
3760
  style: {
3702
3761
  fontSize: 12.5,
3703
3762
  color: "var(--text-3)",
3704
3763
  padding: "12px 0"
3705
3764
  },
3706
3765
  children: "No records yet."
3707
- }), (!_e || a) && /* @__PURE__ */ Z("div", {
3766
+ }), (!ge || a) && /* @__PURE__ */ Z("div", {
3708
3767
  style: {
3709
3768
  display: "flex",
3710
3769
  flexDirection: "column",
3711
3770
  gap: 10
3712
3771
  },
3713
3772
  children: [c.map((n) => {
3714
- let r = he(me(t, n)), c = V.has(r), u = j[r], d = _ && r ? _.replace(/:\w+/, r) : void 0;
3715
- return /* @__PURE__ */ X(hi, {
3773
+ let r = me(pe(t, n)), c = H.has(r), u = j[r], d = _ && r ? _.replace(/:\w+/, r) : void 0;
3774
+ return /* @__PURE__ */ X(Si, {
3716
3775
  rowId: r,
3717
3776
  row: n,
3718
3777
  entity: t,
@@ -3728,11 +3787,11 @@ function mi({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
3728
3787
  activeCell: T,
3729
3788
  setActiveCell: E,
3730
3789
  rowState: u,
3731
- onCellChange: H,
3732
- onDeleteClick: (e) => void ge(e, n),
3733
- onStartEdit: ue,
3734
- onConfirmEdit: fe,
3735
- onCancelEdit: pe,
3790
+ onCellChange: U,
3791
+ onDeleteClick: (e) => void he(e, n),
3792
+ onStartEdit: le,
3793
+ onConfirmEdit: de,
3794
+ onCancelEdit: fe,
3736
3795
  refs: l,
3737
3796
  identityCol: g,
3738
3797
  href: d,
@@ -3740,40 +3799,40 @@ function mi({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
3740
3799
  entityCode: e,
3741
3800
  onRowActionSuccess: f
3742
3801
  }, r);
3743
- }), I && /* @__PURE__ */ X(bi, {
3802
+ }), I && /* @__PURE__ */ X(Di, {
3744
3803
  draftRow: I,
3745
3804
  entity: t,
3746
3805
  columns: i,
3747
3806
  editableColumns: y,
3748
3807
  foreignKey: r,
3749
- draftErrors: ee,
3750
- draftSaving: z,
3808
+ draftErrors: R,
3809
+ draftSaving: B,
3751
3810
  onChange: (e, t) => L((n) => n && {
3752
3811
  ...n,
3753
3812
  [e]: t
3754
3813
  }),
3755
- onConfirm: U,
3814
+ onConfirm: W,
3756
3815
  onCancel: () => {
3757
- L(null), R([]);
3816
+ L(null), z([]);
3758
3817
  },
3759
3818
  refs: l
3760
3819
  })]
3761
- })] }) : /* @__PURE__ */ Z("div", { children: [_e && !a && /* @__PURE__ */ X("div", {
3820
+ })] }) : /* @__PURE__ */ Z("div", { children: [ge && !a && /* @__PURE__ */ X("div", {
3762
3821
  style: {
3763
3822
  fontSize: 12.5,
3764
3823
  color: "var(--text-3)",
3765
3824
  padding: "12px 0"
3766
3825
  },
3767
3826
  children: "No records yet."
3768
- }), (!_e || a) && /* @__PURE__ */ X("div", {
3827
+ }), (!ge || a) && /* @__PURE__ */ X("div", {
3769
3828
  style: { overflowX: "auto" },
3770
3829
  children: /* @__PURE__ */ Z("table", {
3771
- style: je,
3830
+ style: Ae,
3772
3831
  children: [/* @__PURE__ */ X("thead", { children: /* @__PURE__ */ Z("tr", { children: [
3773
3832
  i.map((e) => {
3774
3833
  let n = t.fields.get(e);
3775
3834
  return /* @__PURE__ */ X("th", {
3776
- style: Ae,
3835
+ style: ke,
3777
3836
  children: n ? b(n, e, s.schema.entities) : e
3778
3837
  }, e);
3779
3838
  }),
@@ -3786,8 +3845,8 @@ function mi({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
3786
3845
  width: 40
3787
3846
  } })
3788
3847
  ] }) }), /* @__PURE__ */ Z("tbody", { children: [c.map((n) => {
3789
- let r = he(me(t, n)), c = V.has(r), u = j[r], d = _ && r ? _.replace(/:\w+/, r) : void 0;
3790
- return /* @__PURE__ */ X(gi, {
3848
+ let r = me(pe(t, n)), c = H.has(r), u = j[r], d = _ && r ? _.replace(/:\w+/, r) : void 0;
3849
+ return /* @__PURE__ */ X(Ci, {
3791
3850
  rowId: r,
3792
3851
  row: n,
3793
3852
  entity: t,
@@ -3803,11 +3862,11 @@ function mi({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
3803
3862
  activeCell: T,
3804
3863
  setActiveCell: E,
3805
3864
  rowState: u,
3806
- onCellChange: H,
3807
- onDeleteClick: (e) => void ge(e, n),
3808
- onStartEdit: ue,
3809
- onConfirmEdit: fe,
3810
- onCancelEdit: pe,
3865
+ onCellChange: U,
3866
+ onDeleteClick: (e) => void he(e, n),
3867
+ onStartEdit: le,
3868
+ onConfirmEdit: de,
3869
+ onCancelEdit: fe,
3811
3870
  refs: l,
3812
3871
  identityCol: g,
3813
3872
  href: d,
@@ -3815,35 +3874,35 @@ function mi({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
3815
3874
  entityCode: e,
3816
3875
  onRowActionSuccess: f
3817
3876
  }, r);
3818
- }), I && /* @__PURE__ */ X(yi, {
3877
+ }), I && /* @__PURE__ */ X(Ei, {
3819
3878
  draftRow: I,
3820
3879
  entity: t,
3821
3880
  columns: i,
3822
3881
  editableColumns: y,
3823
3882
  foreignKey: r,
3824
- draftErrors: ee,
3825
- draftSaving: z,
3883
+ draftErrors: R,
3884
+ draftSaving: B,
3826
3885
  onChange: (e, t) => L((n) => n && {
3827
3886
  ...n,
3828
3887
  [e]: t
3829
3888
  }),
3830
- onConfirm: U,
3889
+ onConfirm: W,
3831
3890
  onCancel: () => {
3832
- L(null), R([]);
3891
+ L(null), z([]);
3833
3892
  },
3834
3893
  refs: l
3835
3894
  })] })]
3836
3895
  })
3837
3896
  })] });
3838
3897
  }
3839
- function hi({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s, editableColumns: c, editable: l, interaction: u, isEditing: d, editErrors: f, isDeleting: m, rowState: h, onCellChange: g, onDeleteClick: _, onStartEdit: v, onConfirmEdit: y, onCancelEdit: x, refs: S, identityCol: C, href: w, rowActions: T, onRowActionSuccess: E }) {
3840
- let D = n(), O = Ie(), k = K(() => !h || Object.keys(h.buffer).length === 0 ? r : {
3898
+ function Si({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s, editableColumns: c, editable: l, interaction: u, isEditing: d, editErrors: f, isDeleting: m, rowState: h, onCellChange: g, onDeleteClick: _, onStartEdit: v, onConfirmEdit: y, onCancelEdit: x, refs: S, identityCol: C, href: w, rowActions: T, onRowActionSuccess: E }) {
3899
+ let D = n(), O = Ie(), k = q(() => !h || Object.keys(h.buffer).length === 0 ? r : {
3841
3900
  ...r,
3842
3901
  ...h.buffer
3843
3902
  }, [r, h]);
3844
3903
  if (u === "row_edit" && d) {
3845
3904
  let e = h?.error ? [...f, `_error:${h.error}`] : f;
3846
- return /* @__PURE__ */ X(vi, {
3905
+ return /* @__PURE__ */ X(Ti, {
3847
3906
  values: k,
3848
3907
  entity: i,
3849
3908
  columns: s,
@@ -3876,7 +3935,7 @@ function hi({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s,
3876
3935
  fontSize: 11.5,
3877
3936
  fontWeight: 600,
3878
3937
  color: "var(--text-3)"
3879
- }, _ = n ? z({
3938
+ }, _ = n ? B({
3880
3939
  field: n,
3881
3940
  fieldName: e,
3882
3941
  value: k[e],
@@ -3932,7 +3991,7 @@ function hi({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s,
3932
3991
  justifyContent: "flex-end",
3933
3992
  gap: 6
3934
3993
  },
3935
- children: [l && /* @__PURE__ */ Z(Y, { children: [
3994
+ children: [l && /* @__PURE__ */ Z(We, { children: [
3936
3995
  h?.saving && /* @__PURE__ */ X(A, { size: 12 }),
3937
3996
  h?.error && /* @__PURE__ */ X("span", {
3938
3997
  style: {
@@ -3942,19 +4001,19 @@ function hi({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s,
3942
4001
  title: h.error,
3943
4002
  children: "!"
3944
4003
  }),
3945
- u === "row_edit" && /* @__PURE__ */ X(B, {
4004
+ u === "row_edit" && /* @__PURE__ */ X(V, {
3946
4005
  size: 32,
3947
4006
  icon: /* @__PURE__ */ X(e.edit, { size: 14 }),
3948
4007
  onClick: () => v(t),
3949
4008
  title: "Edit row"
3950
4009
  }),
3951
- /* @__PURE__ */ X(B, {
4010
+ /* @__PURE__ */ X(V, {
3952
4011
  size: 32,
3953
4012
  icon: /* @__PURE__ */ X(e.trash, { size: 14 }),
3954
4013
  onClick: () => _(t),
3955
4014
  title: "Delete row"
3956
4015
  })
3957
- ] }), !l && T && T.length > 0 && /* @__PURE__ */ X(ei, {
4016
+ ] }), !l && T && T.length > 0 && /* @__PURE__ */ X(si, {
3958
4017
  entity: i,
3959
4018
  actions: T,
3960
4019
  objectIds: [t],
@@ -3964,14 +4023,14 @@ function hi({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s,
3964
4023
  })]
3965
4024
  });
3966
4025
  }
3967
- function gi({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s, editableColumns: c, editable: l, interaction: u, isEditing: d, editErrors: f, isDeleting: m, activeCell: h, setActiveCell: g, rowState: _, onCellChange: v, onDeleteClick: y, onStartEdit: b, onConfirmEdit: x, onCancelEdit: S, refs: C, identityCol: w, href: T, rowActions: E, onRowActionSuccess: D }) {
3968
- let O = n(), k = K(() => !_ || Object.keys(_.buffer).length === 0 ? r : {
4026
+ function Ci({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s, editableColumns: c, editable: l, interaction: u, isEditing: d, editErrors: f, isDeleting: m, activeCell: h, setActiveCell: g, rowState: _, onCellChange: v, onDeleteClick: y, onStartEdit: b, onConfirmEdit: x, onCancelEdit: S, refs: C, identityCol: w, href: T, rowActions: E, onRowActionSuccess: D }) {
4027
+ let O = n(), k = q(() => !_ || Object.keys(_.buffer).length === 0 ? r : {
3969
4028
  ...r,
3970
4029
  ..._.buffer
3971
4030
  }, [r, _]);
3972
4031
  if (u === "row_edit" && d) {
3973
4032
  let e = _?.error ? [...f, `_error:${_.error}`] : f;
3974
- return /* @__PURE__ */ X(_i, {
4033
+ return /* @__PURE__ */ X(wi, {
3975
4034
  values: k,
3976
4035
  entity: i,
3977
4036
  columns: s,
@@ -3984,7 +4043,7 @@ function gi({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s,
3984
4043
  refs: C
3985
4044
  });
3986
4045
  }
3987
- let j = Me, M = {
4046
+ let j = je, M = {
3988
4047
  padding: "4px 4px",
3989
4048
  borderBottom: "1px solid var(--divider)",
3990
4049
  verticalAlign: "middle"
@@ -3996,7 +4055,7 @@ function gi({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s,
3996
4055
  let n = i.fields.get(e), r = c.has(e);
3997
4056
  if (N && h?.rowId === t && h?.col === e && r) return /* @__PURE__ */ X("td", {
3998
4057
  style: M,
3999
- children: n ? z({
4058
+ children: n ? B({
4000
4059
  field: n,
4001
4060
  fieldName: e,
4002
4061
  value: k[e],
@@ -4008,7 +4067,7 @@ function gi({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s,
4008
4067
  locale: O
4009
4068
  }) : p(k[e])
4010
4069
  }, e);
4011
- let s = T && e === w, l = n ? z({
4070
+ let s = T && e === w, l = n ? B({
4012
4071
  field: n,
4013
4072
  fieldName: e,
4014
4073
  value: k[e],
@@ -4064,13 +4123,13 @@ function gi({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s,
4064
4123
  title: _.error,
4065
4124
  children: "!"
4066
4125
  }),
4067
- u === "row_edit" && /* @__PURE__ */ X(B, {
4126
+ u === "row_edit" && /* @__PURE__ */ X(V, {
4068
4127
  size: 24,
4069
4128
  icon: /* @__PURE__ */ X(e.edit, { size: 12 }),
4070
4129
  onClick: () => b(t),
4071
4130
  title: "Edit row"
4072
4131
  }),
4073
- /* @__PURE__ */ X(B, {
4132
+ /* @__PURE__ */ X(V, {
4074
4133
  size: 24,
4075
4134
  icon: /* @__PURE__ */ X(e.trash, { size: 12 }),
4076
4135
  onClick: () => y(t),
@@ -4085,7 +4144,7 @@ function gi({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s,
4085
4144
  borderBottom: "1px solid var(--divider)",
4086
4145
  verticalAlign: "middle"
4087
4146
  },
4088
- children: /* @__PURE__ */ X(ei, {
4147
+ children: /* @__PURE__ */ X(si, {
4089
4148
  entity: i,
4090
4149
  actions: E,
4091
4150
  objectIds: [t],
@@ -4096,7 +4155,7 @@ function gi({ rowId: t, row: r, entity: i, entities: a, screens: o, columns: s,
4096
4155
  ]
4097
4156
  });
4098
4157
  }
4099
- function _i({ values: t, entity: r, columns: i, editableColumns: a, errors: o, saving: s, onChange: c, onConfirm: l, onCancel: u, refs: d, accent: f }) {
4158
+ function wi({ values: t, entity: r, columns: i, editableColumns: a, errors: o, saving: s, onChange: c, onConfirm: l, onCancel: u, refs: d, accent: f }) {
4100
4159
  let m = n(), h = o.find((e) => e.startsWith("_error:")), g = new Set(o.filter((e) => !e.startsWith("_error:"))), _ = {
4101
4160
  padding: "6px 12px",
4102
4161
  borderBottom: "1px solid var(--divider)",
@@ -4125,7 +4184,7 @@ function _i({ values: t, entity: r, columns: i, editableColumns: a, errors: o, s
4125
4184
  title: o ? `${e} is required` : void 0,
4126
4185
  children: /* @__PURE__ */ X("div", {
4127
4186
  style: v,
4128
- children: n ? z({
4187
+ children: n ? B({
4129
4188
  field: n,
4130
4189
  fieldName: e,
4131
4190
  value: t[e],
@@ -4162,13 +4221,13 @@ function _i({ values: t, entity: r, columns: i, editableColumns: a, errors: o, s
4162
4221
  title: h.slice(7),
4163
4222
  children: "!"
4164
4223
  }),
4165
- /* @__PURE__ */ X(B, {
4224
+ /* @__PURE__ */ X(V, {
4166
4225
  size: 24,
4167
4226
  icon: X(s ? A : e.check, { size: 12 }),
4168
4227
  onClick: l,
4169
4228
  title: "Confirm (Enter)"
4170
4229
  }),
4171
- /* @__PURE__ */ X(B, {
4230
+ /* @__PURE__ */ X(V, {
4172
4231
  size: 24,
4173
4232
  icon: /* @__PURE__ */ X(e.x, { size: 12 }),
4174
4233
  onClick: u,
@@ -4179,7 +4238,7 @@ function _i({ values: t, entity: r, columns: i, editableColumns: a, errors: o, s
4179
4238
  })]
4180
4239
  });
4181
4240
  }
4182
- function vi({ values: t, entity: r, columns: i, editableColumns: a, errors: o, saving: s, onChange: c, onConfirm: l, onCancel: u, refs: d, accent: f }) {
4241
+ function Ti({ values: t, entity: r, columns: i, editableColumns: a, errors: o, saving: s, onChange: c, onConfirm: l, onCancel: u, refs: d, accent: f }) {
4183
4242
  let m = n(), h = Ie(), g = o.find((e) => e.startsWith("_error:")), _ = new Set(o.filter((e) => !e.startsWith("_error:")));
4184
4243
  return /* @__PURE__ */ Z("div", {
4185
4244
  style: {
@@ -4229,7 +4288,7 @@ function vi({ values: t, entity: r, columns: i, editableColumns: a, errors: o, s
4229
4288
  borderRadius: o ? 5 : 0
4230
4289
  },
4231
4290
  title: o ? `${e} is required` : void 0,
4232
- children: i ? n ? z({
4291
+ children: i ? n ? B({
4233
4292
  field: n,
4234
4293
  fieldName: e,
4235
4294
  value: t[e],
@@ -4264,13 +4323,13 @@ function vi({ values: t, entity: r, columns: i, editableColumns: a, errors: o, s
4264
4323
  title: g.slice(7),
4265
4324
  children: "!"
4266
4325
  }),
4267
- /* @__PURE__ */ X(B, {
4326
+ /* @__PURE__ */ X(V, {
4268
4327
  size: 32,
4269
4328
  icon: X(s ? A : e.check, { size: 14 }),
4270
4329
  onClick: l,
4271
4330
  title: "Confirm (Enter)"
4272
4331
  }),
4273
- /* @__PURE__ */ X(B, {
4332
+ /* @__PURE__ */ X(V, {
4274
4333
  size: 32,
4275
4334
  icon: /* @__PURE__ */ X(e.x, { size: 14 }),
4276
4335
  onClick: u,
@@ -4280,12 +4339,12 @@ function vi({ values: t, entity: r, columns: i, editableColumns: a, errors: o, s
4280
4339
  })]
4281
4340
  });
4282
4341
  }
4283
- function yi({ draftRow: e, entity: t, columns: n, editableColumns: r, foreignKey: i, draftErrors: a, draftSaving: o, onChange: s, onConfirm: c, onCancel: l, refs: u }) {
4284
- let d = K(() => {
4342
+ function Ei({ draftRow: e, entity: t, columns: n, editableColumns: r, foreignKey: i, draftErrors: a, draftSaving: o, onChange: s, onConfirm: c, onCancel: l, refs: u }) {
4343
+ let d = q(() => {
4285
4344
  let e = new Set(r);
4286
4345
  return e.delete(i), e;
4287
4346
  }, [r, i]);
4288
- return /* @__PURE__ */ X(_i, {
4347
+ return /* @__PURE__ */ X(wi, {
4289
4348
  values: e,
4290
4349
  entity: t,
4291
4350
  columns: n,
@@ -4299,12 +4358,12 @@ function yi({ draftRow: e, entity: t, columns: n, editableColumns: r, foreignKey
4299
4358
  accent: !0
4300
4359
  });
4301
4360
  }
4302
- function bi({ draftRow: e, entity: t, columns: n, editableColumns: r, foreignKey: i, draftErrors: a, draftSaving: o, onChange: s, onConfirm: c, onCancel: l, refs: u }) {
4303
- let d = K(() => {
4361
+ function Di({ draftRow: e, entity: t, columns: n, editableColumns: r, foreignKey: i, draftErrors: a, draftSaving: o, onChange: s, onConfirm: c, onCancel: l, refs: u }) {
4362
+ let d = q(() => {
4304
4363
  let e = new Set(r);
4305
4364
  return e.delete(i), e;
4306
4365
  }, [r, i]);
4307
- return /* @__PURE__ */ X(vi, {
4366
+ return /* @__PURE__ */ X(Ti, {
4308
4367
  values: e,
4309
4368
  entity: t,
4310
4369
  columns: n,
@@ -4320,76 +4379,76 @@ function bi({ draftRow: e, entity: t, columns: n, editableColumns: r, foreignKey
4320
4379
  }
4321
4380
  //#endregion
4322
4381
  //#region src/hooks/useMutations.ts
4323
- function xi(e) {
4324
- H.error(e.message);
4382
+ function Oi(e) {
4383
+ U.error(e.message);
4325
4384
  }
4326
- function Si(e, t, n = {}) {
4327
- e.invalidateQueries({ queryKey: ["entity-data", t] }), e.invalidateQueries({ queryKey: ["entity-count", t] }), n.item && e.invalidateQueries({ queryKey: ["entity-item", t] }), n.children && e.invalidateQueries({ queryKey: [tr, t] }), n.objectMeta && (e.invalidateQueries({ queryKey: ["object-status", t] }), e.invalidateQueries({ queryKey: ["object-properties", t] }));
4385
+ function ki(e, t, n = {}) {
4386
+ e.invalidateQueries({ queryKey: ["entity-data", t] }), e.invalidateQueries({ queryKey: ["entity-count", t] }), n.item && e.invalidateQueries({ queryKey: ["entity-item", t] }), n.children && e.invalidateQueries({ queryKey: [rr, t] }), n.objectMeta && (e.invalidateQueries({ queryKey: ["object-status", t] }), e.invalidateQueries({ queryKey: ["object-properties", t] }));
4328
4387
  }
4329
- function Ci(e) {
4388
+ function Ai(e) {
4330
4389
  let t = Ue();
4331
4390
  return Ve({
4332
4391
  mutationFn: (t) => M(e, t),
4333
4392
  onSuccess: () => {
4334
- Si(t, e), H.success("Record created");
4393
+ ki(t, e), U.success("Record created");
4335
4394
  },
4336
- onError: xi
4395
+ onError: Oi
4337
4396
  });
4338
4397
  }
4339
- function wi(e) {
4398
+ function ji(e) {
4340
4399
  let t = Ue();
4341
4400
  return Ve({
4342
- mutationFn: ({ pkValues: t, data: n }) => re(e, t, n),
4401
+ mutationFn: ({ pkValues: t, data: n }) => ne(e, t, n),
4343
4402
  onSuccess: () => {
4344
- Si(t, e, {
4403
+ ki(t, e, {
4345
4404
  item: !0,
4346
4405
  children: !0,
4347
4406
  objectMeta: !0
4348
- }), H.success("Record updated");
4407
+ }), U.success("Record updated");
4349
4408
  },
4350
- onError: xi
4409
+ onError: Oi
4351
4410
  });
4352
4411
  }
4353
- function Ti(e) {
4412
+ function Mi(e) {
4354
4413
  let t = Ue();
4355
4414
  return Ve({
4356
- mutationFn: (t) => de(e, t),
4415
+ mutationFn: (t) => ue(e, t),
4357
4416
  onSuccess: () => {
4358
- Si(t, e, { item: !0 }), H.success("Record deleted");
4417
+ ki(t, e, { item: !0 }), U.success("Record deleted");
4359
4418
  },
4360
- onError: xi
4419
+ onError: Oi
4361
4420
  });
4362
4421
  }
4363
- function Ei(e) {
4422
+ function Ni(e) {
4364
4423
  let t = Ue();
4365
4424
  return Ve({
4366
4425
  mutationFn: (t) => w(e, t),
4367
4426
  onSuccess: () => {
4368
- Si(t, e, {
4427
+ ki(t, e, {
4369
4428
  item: !0,
4370
4429
  objectMeta: !0
4371
- }), H.success("Record restored");
4430
+ }), U.success("Record restored");
4372
4431
  },
4373
- onError: xi
4432
+ onError: Oi
4374
4433
  });
4375
4434
  }
4376
4435
  //#endregion
4377
4436
  //#region src/components/shared/LoadingSkeleton.tsx
4378
- var Di = {
4437
+ var Pi = {
4379
4438
  display: "block",
4380
4439
  background: "linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 40%, var(--surface-3) 80%)",
4381
4440
  backgroundSize: "200% 100%",
4382
4441
  borderRadius: 6,
4383
4442
  animation: "declarion-shimmer 1.2s ease-in-out infinite"
4384
4443
  };
4385
- function Oi({ height: e, width: t }) {
4386
- return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("style", { children: "@keyframes declarion-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}" }), /* @__PURE__ */ X("span", { style: {
4387
- ...Di,
4444
+ function Fi({ height: e, width: t }) {
4445
+ return /* @__PURE__ */ Z(We, { children: [/* @__PURE__ */ X("style", { children: "@keyframes declarion-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}" }), /* @__PURE__ */ X("span", { style: {
4446
+ ...Pi,
4388
4447
  height: e,
4389
4448
  width: t ?? "100%"
4390
4449
  } })] });
4391
4450
  }
4392
- function ki({ rows: e = 8, cols: t = 4 }) {
4451
+ function Ii({ rows: e = 8, cols: t = 4 }) {
4393
4452
  return /* @__PURE__ */ Z("div", {
4394
4453
  style: {
4395
4454
  padding: 16,
@@ -4404,7 +4463,7 @@ function ki({ rows: e = 8, cols: t = 4 }) {
4404
4463
  },
4405
4464
  children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ X("div", {
4406
4465
  style: { flex: 1 },
4407
- children: /* @__PURE__ */ X(Oi, { height: 14 })
4466
+ children: /* @__PURE__ */ X(Fi, { height: 14 })
4408
4467
  }, t))
4409
4468
  }), Array.from({ length: e }).map((e, n) => /* @__PURE__ */ X("div", {
4410
4469
  style: {
@@ -4413,12 +4472,12 @@ function ki({ rows: e = 8, cols: t = 4 }) {
4413
4472
  },
4414
4473
  children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ X("div", {
4415
4474
  style: { flex: 1 },
4416
- children: /* @__PURE__ */ X(Oi, { height: 28 })
4475
+ children: /* @__PURE__ */ X(Fi, { height: 28 })
4417
4476
  }, t))
4418
4477
  }, n))]
4419
4478
  });
4420
4479
  }
4421
- function Ai() {
4480
+ function Li() {
4422
4481
  return /* @__PURE__ */ Z("div", {
4423
4482
  style: {
4424
4483
  padding: 20,
@@ -4427,7 +4486,7 @@ function Ai() {
4427
4486
  gap: 16
4428
4487
  },
4429
4488
  children: [
4430
- /* @__PURE__ */ X(Oi, {
4489
+ /* @__PURE__ */ X(Fi, {
4431
4490
  height: 12,
4432
4491
  width: 160
4433
4492
  }),
@@ -4438,11 +4497,11 @@ function Ai() {
4438
4497
  gap: 12
4439
4498
  },
4440
4499
  children: [/* @__PURE__ */ X("span", { style: {
4441
- ...Di,
4500
+ ...Pi,
4442
4501
  width: 32,
4443
4502
  height: 32,
4444
4503
  borderRadius: 8
4445
- } }), /* @__PURE__ */ X(Oi, {
4504
+ } }), /* @__PURE__ */ X(Fi, {
4446
4505
  height: 22,
4447
4506
  width: 240
4448
4507
  })]
@@ -4459,7 +4518,7 @@ function Ai() {
4459
4518
  padding: "11px 14px",
4460
4519
  borderBottom: "1px solid var(--divider)"
4461
4520
  },
4462
- children: /* @__PURE__ */ X(Oi, {
4521
+ children: /* @__PURE__ */ X(Fi, {
4463
4522
  height: 13,
4464
4523
  width: 150
4465
4524
  })
@@ -4475,12 +4534,12 @@ function Ai() {
4475
4534
  display: "flex",
4476
4535
  gap: 16
4477
4536
  },
4478
- children: [/* @__PURE__ */ X(Oi, {
4537
+ children: [/* @__PURE__ */ X(Fi, {
4479
4538
  height: 13,
4480
4539
  width: 110
4481
4540
  }), /* @__PURE__ */ X("div", {
4482
4541
  style: { flex: 1 },
4483
- children: /* @__PURE__ */ X(Oi, { height: 13 })
4542
+ children: /* @__PURE__ */ X(Fi, { height: 13 })
4484
4543
  })]
4485
4544
  }, t))
4486
4545
  })]
@@ -4490,11 +4549,11 @@ function Ai() {
4490
4549
  }
4491
4550
  //#endregion
4492
4551
  //#region src/lib/sort.ts
4493
- var ji = {
4552
+ var Ri = {
4494
4553
  nulls_first: "first",
4495
4554
  nulls_last: "last"
4496
4555
  };
4497
- function Mi(e) {
4556
+ function zi(e) {
4498
4557
  if (!e) return [];
4499
4558
  let t = [];
4500
4559
  for (let n of e.split(",")) {
@@ -4507,14 +4566,14 @@ function Mi(e) {
4507
4566
  dir: r[1]?.trim().toLowerCase() === "desc" ? "desc" : "asc"
4508
4567
  }, o = r[2]?.trim().toLowerCase();
4509
4568
  if (o) {
4510
- let e = ji[o];
4569
+ let e = Ri[o];
4511
4570
  e && (a.nulls = e);
4512
4571
  }
4513
4572
  t.push(a);
4514
4573
  }
4515
4574
  return t;
4516
4575
  }
4517
- function Ni(e) {
4576
+ function Bi(e) {
4518
4577
  if (!e) return;
4519
4578
  let t = [];
4520
4579
  for (let n of e.split(",")) {
@@ -4525,39 +4584,39 @@ function Ni(e) {
4525
4584
  }
4526
4585
  return t.length > 0 ? t.join(",") : void 0;
4527
4586
  }
4528
- function Pi(e) {
4587
+ function Vi(e) {
4529
4588
  return e.map((e) => {
4530
4589
  let t = `${e.field}:${e.dir}`;
4531
4590
  return e.nulls === "first" ? `${t}:nulls_first` : e.nulls === "last" ? `${t}:nulls_last` : t;
4532
4591
  }).join(",");
4533
4592
  }
4534
- function Fi(e, t) {
4593
+ function Hi(e, t) {
4535
4594
  let n = e.findIndex((e) => e.field === t);
4536
4595
  return n >= 0 ? [...e.slice(0, n), ...e.slice(n + 1)] : e.length >= 5 ? e : [...e, {
4537
4596
  field: t,
4538
4597
  dir: "asc"
4539
4598
  }];
4540
4599
  }
4541
- function Ii(e, t) {
4600
+ function Ui(e, t) {
4542
4601
  let n = e.filter((e) => e.field !== t.field);
4543
4602
  return n.length >= 5 ? e : [...n, t];
4544
4603
  }
4545
- function Li(e, t) {
4604
+ function Wi(e, t) {
4546
4605
  let n = e.findIndex((e) => e.field === t);
4547
4606
  return n < 0 ? e : [...e.slice(0, n), ...e.slice(n + 1)];
4548
4607
  }
4549
4608
  //#endregion
4550
4609
  //#region src/hooks/useScreenBack.ts
4551
- function Ri(e) {
4552
- let t = ze(), n = oe(), i = ae(), a = At((e) => e.depth), { data: o } = r(), s = e?.fallback, c = kt((e) => {
4610
+ function Gi(e) {
4611
+ let t = ze(), n = ae(), i = ie(), a = jt((e) => e.depth), { data: o } = r(), s = e?.fallback, c = At((e) => {
4553
4612
  let t = e.tabs.find((t) => t.id === e.activeTabId);
4554
4613
  return t ? t.returnTo : void 0;
4555
- }), { hasOriginBack: l, allowFallbackBack: u } = K(() => It(c, n.enabled), [c, n.enabled]), d = W(() => {
4614
+ }), { hasOriginBack: l, allowFallbackBack: u } = q(() => Lt(c, n.enabled), [c, n.enabled]), d = G(() => {
4556
4615
  if (n.enabled) {
4557
- At.getState().depth > 0 ? i() : s?.();
4616
+ jt.getState().depth > 0 ? i() : s?.();
4558
4617
  return;
4559
4618
  }
4560
- let e = kt.getState(), r = Lt(e.tabs.find((t) => t.id === e.activeTabId)?.returnTo, e.tabs, !1);
4619
+ let e = At.getState(), r = Rt(e.tabs.find((t) => t.id === e.activeTabId)?.returnTo, e.tabs, !1);
4561
4620
  if (!r) {
4562
4621
  s?.();
4563
4622
  return;
@@ -4576,7 +4635,7 @@ function Ri(e) {
4576
4635
  }
4577
4636
  t({
4578
4637
  pathname: r.pathname,
4579
- search: Pt(r.search),
4638
+ search: Ft(r.search),
4580
4639
  hash: r.hash || void 0
4581
4640
  });
4582
4641
  }, [
@@ -4596,40 +4655,40 @@ function Ri(e) {
4596
4655
  }
4597
4656
  //#endregion
4598
4657
  //#region src/lib/field-classification.ts
4599
- function zi(e, t) {
4658
+ function Ki(e, t) {
4600
4659
  let n = e?.field_access?.[t];
4601
4660
  return !n || n.read === "granted";
4602
4661
  }
4603
- function Bi(e, t) {
4662
+ function qi(e, t) {
4604
4663
  let n = e?.field_access?.[t];
4605
4664
  return !n || n.write === "granted";
4606
4665
  }
4607
- function Vi(e, t) {
4666
+ function Ji(e, t) {
4608
4667
  return e?.field_access?.[t]?.classification;
4609
4668
  }
4610
- function Hi(e, t) {
4669
+ function Yi(e, t) {
4611
4670
  return e?.field_access?.[t]?.required_permission;
4612
4671
  }
4613
- function Ui(e, t, n) {
4614
- let r = Vi(t, n);
4672
+ function Xi(e, t, n) {
4673
+ let r = Ji(t, n);
4615
4674
  if (r) return e?.classifications?.[r];
4616
4675
  }
4617
- function Wi(e, t, n) {
4618
- return !!Ui(e, t, n)?.sod_protected;
4676
+ function Zi(e, t, n) {
4677
+ return !!Xi(e, t, n)?.sod_protected;
4619
4678
  }
4620
- function Gi(e, t) {
4679
+ function Qi(e, t) {
4621
4680
  return e?.field_access?.[t];
4622
4681
  }
4623
4682
  //#endregion
4624
4683
  //#region src/components/pages/list/cardProjection.ts
4625
- var Ki = 4, qi = 2, Ji = 2, Yi = [
4684
+ var $i = 4, ea = 2, ta = 2, na = [
4626
4685
  "screen_card",
4627
4686
  "entity_card",
4628
4687
  "saved_view_columns",
4629
4688
  "screen_default_columns",
4630
4689
  "screen_columns",
4631
4690
  "entity_inference"
4632
- ], Xi = /* @__PURE__ */ new Set(["_select", "_actions"]), Zi = /* @__PURE__ */ new Set([
4691
+ ], ra = /* @__PURE__ */ new Set(["_select", "_actions"]), ia = /* @__PURE__ */ new Set([
4633
4692
  "text",
4634
4693
  "rich_text",
4635
4694
  "multilang_text",
@@ -4638,11 +4697,11 @@ var Ki = 4, qi = 2, Ji = 2, Yi = [
4638
4697
  "secret",
4639
4698
  "password",
4640
4699
  "bytes"
4641
- ]), Qi = /* @__PURE__ */ new Set(["enum", "bool"]), $i = /* @__PURE__ */ new Set([
4700
+ ]), aa = /* @__PURE__ */ new Set(["enum", "bool"]), oa = /* @__PURE__ */ new Set([
4642
4701
  "date",
4643
4702
  "time",
4644
4703
  "timestamp"
4645
- ]), ea = /* @__PURE__ */ new Set([
4704
+ ]), sa = /* @__PURE__ */ new Set([
4646
4705
  "string",
4647
4706
  "text",
4648
4707
  "email",
@@ -4668,22 +4727,22 @@ var Ki = 4, qi = 2, Ji = 2, Yi = [
4668
4727
  "enum",
4669
4728
  "status"
4670
4729
  ]);
4671
- function ta(e) {
4730
+ function ca(e) {
4672
4731
  let { entity: t, screen: n, savedViewColumns: r } = e, i = n?.card;
4673
- if (i) return oa(t, i, "screen_card");
4674
- if (t?.card) return oa(t, t.card, "entity_card");
4675
- let a = la(t, n, r);
4676
- return sa(t, a.columns, a.source);
4677
- }
4678
- function na(e) {
4679
- let { entity: t, screen: n, presentation: r, visibleColumns: i, card: a, rowActions: o, toolbarActions: s, bulkActions: c, sort: l, includeDetailHandoff: u = !0, screens: d } = e, f = new Ra(), p = r === "cards" ? a.renderFields : da(t, i, { explicit: !0 }), m = r === "cards" ? ia(t, n) : [];
4680
- for (let e of p) f.addField(e, "render"), Fa(t, e, f, "render");
4681
- for (let e of m) p.includes(e) || (f.addField(e, "variant"), Fa(t, e, f, "variant"));
4682
- let h = Sa(t, f), g = Da(t, [
4732
+ if (i) return pa(t, i, "screen_card");
4733
+ if (t?.card) return pa(t, t.card, "entity_card");
4734
+ let a = ga(t, n, r);
4735
+ return ma(t, a.columns, a.source);
4736
+ }
4737
+ function la(e) {
4738
+ let { entity: t, screen: n, presentation: r, visibleColumns: i, card: a, rowActions: o, toolbarActions: s, bulkActions: c, sort: l, includeDetailHandoff: u = !0, screens: d } = e, f = new Ga(), p = r === "cards" ? a.renderFields : va(t, i, { explicit: !0 }), m = r === "cards" ? da(t, n) : [];
4739
+ for (let e of p) f.addField(e, "render"), Ha(t, e, f, "render");
4740
+ for (let e of m) p.includes(e) || (f.addField(e, "variant"), Ha(t, e, f, "variant"));
4741
+ let h = ka(t, f), g = Pa(t, [
4683
4742
  o,
4684
4743
  s,
4685
4744
  c
4686
- ], f), _ = ra(t, n, f), v = Oa(t, l, f), y = ka(t, n, d, f);
4745
+ ], f), _ = ua(t, n, f), v = Fa(t, l, f), y = Ia(t, n, d, f);
4687
4746
  if (u) for (let e of h) f.addField(e, "detail_handoff");
4688
4747
  let b = new $();
4689
4748
  for (let e of h) b.add(e);
@@ -4693,9 +4752,9 @@ function na(e) {
4693
4752
  for (let e of v) b.add(e);
4694
4753
  for (let e of y) b.add(e);
4695
4754
  let x = new $();
4696
- for (let e of p) Pa(t, e, x, f);
4697
- for (let e of b.values()) Pa(t, e, x, f);
4698
- let S = x.values(), C = Ia(f);
4755
+ for (let e of p) Va(t, e, x, f);
4756
+ for (let e of b.values()) Va(t, e, x, f);
4757
+ let S = x.values(), C = Ua(f);
4699
4758
  return {
4700
4759
  renderFields: p,
4701
4760
  dependencyFields: b.values().filter((e) => !p.includes(e)),
@@ -4707,7 +4766,7 @@ function na(e) {
4707
4766
  reasons: f.snapshot()
4708
4767
  };
4709
4768
  }
4710
- function ra(e, t, n) {
4769
+ function ua(e, t, n) {
4711
4770
  let r = new $(), i = (t) => {
4712
4771
  for (let n of t) n.and ? i(n.and) : n.or ? i(n.or) : n.field && e?.fields.has(n.field) && r.add(n.field);
4713
4772
  };
@@ -4716,9 +4775,9 @@ function ra(e, t, n) {
4716
4775
  for (let e of r.values()) n.addField(e, "variant");
4717
4776
  return r.values();
4718
4777
  }
4719
- function ia(e, t, n) {
4778
+ function da(e, t, n) {
4720
4779
  let r = new $();
4721
- for (let i of ta({
4780
+ for (let i of ca({
4722
4781
  entity: e,
4723
4782
  screen: t,
4724
4783
  savedViewColumns: n
@@ -4726,7 +4785,7 @@ function ia(e, t, n) {
4726
4785
  for (let i of t?.variants?.items() ?? []) {
4727
4786
  let a = { ...t };
4728
4787
  i.card !== void 0 && (a.card = i.card);
4729
- for (let t of ta({
4788
+ for (let t of ca({
4730
4789
  entity: e,
4731
4790
  screen: a,
4732
4791
  savedViewColumns: n
@@ -4734,22 +4793,22 @@ function ia(e, t, n) {
4734
4793
  }
4735
4794
  return r.values();
4736
4795
  }
4737
- function aa(e, t, n) {
4796
+ function fa(e, t, n) {
4738
4797
  if (!e || t?.on_row_click !== "peek" || t.quick_peek?.enabled === !1) return [];
4739
4798
  let r = t.quick_peek?.fields;
4740
- if (r && r.length > 0) return da(e, r, { explicit: !0 });
4799
+ if (r && r.length > 0) return va(e, r, { explicit: !0 });
4741
4800
  let i = t.quick_peek?.sections;
4742
4801
  if (i && i.length > 0) {
4743
4802
  let r = Object.values(n ?? {}).find((e) => e.type === "detail" && e.entity === t.entity), a = new $();
4744
- Aa(r?.items, new Set(i.map(String)), a);
4745
- let o = da(e, a.values(), { explicit: !0 });
4803
+ La(r?.items, new Set(i.map(String)), a);
4804
+ let o = va(e, a.values(), { explicit: !0 });
4746
4805
  if (o.length > 0) return o;
4747
4806
  }
4748
- return Na(e);
4807
+ return Ba(e);
4749
4808
  }
4750
- function oa(e, t, n) {
4751
- let r = t.max_body_fields ?? Ki, i = fa(e, t.title_field, { explicit: !0 }), a = fa(e, t.subtitle_field, { explicit: !0 }), o = da(e, t.badge_fields ?? [], { explicit: !0 }), s = da(e, t.fields ?? [], { explicit: !0 }), c = da(e, t.meta_fields ?? [], { explicit: !0 });
4752
- return ca({
4809
+ function pa(e, t, n) {
4810
+ let r = t.max_body_fields ?? $i, i = ya(e, t.title_field, { explicit: !0 }), a = ya(e, t.subtitle_field, { explicit: !0 }), o = va(e, t.badge_fields ?? [], { explicit: !0 }), s = va(e, t.fields ?? [], { explicit: !0 }), c = va(e, t.meta_fields ?? [], { explicit: !0 });
4811
+ return ha({
4753
4812
  source: n,
4754
4813
  explicit: !0,
4755
4814
  titleField: i,
@@ -4762,28 +4821,28 @@ function oa(e, t, n) {
4762
4821
  maxBodyFields: r
4763
4822
  });
4764
4823
  }
4765
- function sa(e, t, n) {
4766
- let r = da(e, t, { explicit: !1 }), i = Ki, a = fa(e, e?.display?.display_field, { explicit: !1 }), o = a ?? pa(e, r, {
4824
+ function ma(e, t, n) {
4825
+ let r = va(e, t, { explicit: !1 }), i = $i, a = ya(e, e?.display?.display_field, { explicit: !1 }), o = a ?? ba(e, r, {
4767
4826
  allowLong: !1,
4768
4827
  allowAuto: !1
4769
- }), s = a !== void 0, c = o ? /* @__PURE__ */ new Set([o]) : void 0, l = r.find((t) => !c?.has(t) && ha(e, t)), u = new Set([o, l].filter((e) => !!e)), d = _a(e, r).filter((e) => !u.has(e)).slice(0, qi);
4828
+ }), s = a !== void 0, c = o ? /* @__PURE__ */ new Set([o]) : void 0, l = r.find((t) => !c?.has(t) && Sa(e, t)), u = new Set([o, l].filter((e) => !!e)), d = wa(e, r).filter((e) => !u.has(e)).slice(0, ea);
4770
4829
  for (let e of d) u.add(e);
4771
- let f = r.filter((t) => !u.has(t) && va(e, t)).slice(0, Ji);
4830
+ let f = r.filter((t) => !u.has(t) && Ta(e, t)).slice(0, ta);
4772
4831
  for (let e of f) u.add(e);
4773
- return ca({
4832
+ return ha({
4774
4833
  source: n,
4775
4834
  explicit: !1,
4776
4835
  titleField: o,
4777
4836
  titleUsesDisplay: s,
4778
4837
  subtitleField: l,
4779
4838
  badgeFields: d,
4780
- bodyFields: r.filter((t) => !u.has(t) && ma(e, t)).slice(0, i),
4839
+ bodyFields: r.filter((t) => !u.has(t) && xa(e, t)).slice(0, i),
4781
4840
  metaFields: f,
4782
4841
  hideEmptyFields: !0,
4783
4842
  maxBodyFields: i
4784
4843
  });
4785
4844
  }
4786
- function ca(e) {
4845
+ function ha(e) {
4787
4846
  let t = new $(), n = [], r = (r, i) => {
4788
4847
  !r || t.has(r) || (t.add(r), n.push({
4789
4848
  field: r,
@@ -4808,10 +4867,10 @@ function ca(e) {
4808
4867
  maxBodyFields: e.maxBodyFields,
4809
4868
  renderFields: t.values(),
4810
4869
  fields: n,
4811
- sourcePrecedence: Yi
4870
+ sourcePrecedence: na
4812
4871
  };
4813
4872
  }
4814
- function la(e, t, n) {
4873
+ function ga(e, t, n) {
4815
4874
  return n && n.length > 0 ? {
4816
4875
  source: "saved_view_columns",
4817
4876
  columns: n
@@ -4823,10 +4882,10 @@ function la(e, t, n) {
4823
4882
  columns: t.columns
4824
4883
  } : {
4825
4884
  source: "entity_inference",
4826
- columns: ua(e)
4885
+ columns: _a(e)
4827
4886
  };
4828
4887
  }
4829
- function ua(e) {
4888
+ function _a(e) {
4830
4889
  if (!e) return [];
4831
4890
  let t = [];
4832
4891
  e.display.display_field && t.push(e.display.display_field);
@@ -4836,16 +4895,16 @@ function ua(e) {
4836
4895
  if (e.evidence_covered && t.push("$evidence"), e.files) for (let [n] of e.files) t.push(n);
4837
4896
  return t;
4838
4897
  }
4839
- function da(e, t, n) {
4898
+ function va(e, t, n) {
4840
4899
  let r = new $();
4841
4900
  for (let i of t) {
4842
- let t = fa(e, i, n);
4901
+ let t = ya(e, i, n);
4843
4902
  t && r.add(t);
4844
4903
  }
4845
4904
  return r.values();
4846
4905
  }
4847
- function fa(e, t, n) {
4848
- if (!t || Xi.has(t)) return;
4906
+ function ya(e, t, n) {
4907
+ if (!t || ra.has(t)) return;
4849
4908
  if (!e) return t.startsWith("$") ? void 0 : t;
4850
4909
  if (t.startsWith("$status.")) {
4851
4910
  let n = t.slice(8);
@@ -4860,55 +4919,55 @@ function fa(e, t, n) {
4860
4919
  let r = e.fields.get(t), i = e.files?.get(t);
4861
4920
  if (!(!r && !i) && (n.explicit || !(r && r.display?.is_listable === !1) && !(i && i.display?.is_listable === !1))) return t;
4862
4921
  }
4863
- function pa(e, t, n) {
4864
- return t.find((t) => n.exclude?.has(t) || !n.allowAuto && ba(e, t) || !n.allowLong && xa(e, t) ? !1 : ya(e, t));
4922
+ function ba(e, t, n) {
4923
+ return t.find((t) => n.exclude?.has(t) || !n.allowAuto && Da(e, t) || !n.allowLong && Oa(e, t) ? !1 : Ea(e, t));
4865
4924
  }
4866
- function ma(e, t) {
4867
- return !(!ya(e, t) || ba(e, t) || xa(e, t));
4925
+ function xa(e, t) {
4926
+ return !(!Ea(e, t) || Da(e, t) || Oa(e, t));
4868
4927
  }
4869
- function ha(e, t) {
4870
- return !(!ya(e, t) || ba(e, t) || xa(e, t) || va(e, t) || ga(e, t));
4928
+ function Sa(e, t) {
4929
+ return !(!Ea(e, t) || Da(e, t) || Oa(e, t) || Ta(e, t) || Ca(e, t));
4871
4930
  }
4872
- function ga(e, t) {
4931
+ function Ca(e, t) {
4873
4932
  if (t.startsWith("$status.") || t.startsWith("$property.") || t === "$evidence") return !0;
4874
- let n = La(e, t);
4875
- return n.kind === "field" && Qi.has(n.field.type);
4933
+ let n = Wa(e, t);
4934
+ return n.kind === "field" && aa.has(n.field.type);
4876
4935
  }
4877
- function _a(e, t) {
4936
+ function wa(e, t) {
4878
4937
  let n = new $();
4879
4938
  for (let e of t) (e.startsWith("$status.") || e.startsWith("$property.") || e === "$evidence") && n.add(e);
4880
- for (let r of t) ga(e, r) && n.add(r);
4939
+ for (let r of t) Ca(e, r) && n.add(r);
4881
4940
  return n.values();
4882
4941
  }
4883
- function va(e, t) {
4884
- if (ba(e, t)) return !1;
4885
- let n = La(e, t);
4886
- return n.kind === "field" && $i.has(n.field.type);
4942
+ function Ta(e, t) {
4943
+ if (Da(e, t)) return !1;
4944
+ let n = Wa(e, t);
4945
+ return n.kind === "field" && oa.has(n.field.type);
4887
4946
  }
4888
- function ya(e, t) {
4889
- return La(e, t).kind !== "missing";
4947
+ function Ea(e, t) {
4948
+ return Wa(e, t).kind !== "missing";
4890
4949
  }
4891
- function ba(e, t) {
4892
- let n = La(e, t);
4950
+ function Da(e, t) {
4951
+ let n = Wa(e, t);
4893
4952
  return n.kind === "field" && (n.field.primary === !0 || n.field.auto === !0);
4894
4953
  }
4895
- function xa(e, t) {
4896
- let n = La(e, t);
4897
- return n.kind === "file" ? n.file.mode !== "single" : n.kind === "field" && Zi.has(n.field.type);
4954
+ function Oa(e, t) {
4955
+ let n = Wa(e, t);
4956
+ return n.kind === "file" ? n.file.mode !== "single" : n.kind === "field" && ia.has(n.field.type);
4898
4957
  }
4899
- function Sa(e, t) {
4958
+ function ka(e, t) {
4900
4959
  if (!e) return [];
4901
4960
  let n = new $();
4902
- for (let r of fe(e)) n.add(r), t.addField(r, "identity");
4903
- let r = fa(e, e.display.display_field, { explicit: !0 });
4904
- r && (n.add(r), t.addField(r, "display"), Fa(e, r, t, "display"));
4905
- for (let r of Ca(e.display.display_template)) {
4906
- let i = fa(e, r, { explicit: !0 });
4907
- i && (n.add(i), t.addField(i, "display_template"), Fa(e, i, t, "display_template"));
4961
+ for (let r of de(e)) n.add(r), t.addField(r, "identity");
4962
+ let r = ya(e, e.display.display_field, { explicit: !0 });
4963
+ r && (n.add(r), t.addField(r, "display"), Ha(e, r, t, "display"));
4964
+ for (let r of Aa(e.display.display_template)) {
4965
+ let i = ya(e, r, { explicit: !0 });
4966
+ i && (n.add(i), t.addField(i, "display_template"), Ha(e, i, t, "display_template"));
4908
4967
  }
4909
4968
  return n.values();
4910
4969
  }
4911
- function Ca(e) {
4970
+ function Aa(e) {
4912
4971
  if (!e) return [];
4913
4972
  let t = new $(), n = 0;
4914
4973
  for (; n < e.length;) {
@@ -4918,14 +4977,14 @@ function Ca(e) {
4918
4977
  n = r + 2;
4919
4978
  continue;
4920
4979
  }
4921
- let i = wa(e, r + 2);
4980
+ let i = ja(e, r + 2);
4922
4981
  if (i < 0) break;
4923
- for (let n of Ta(e.slice(r + 2, i))) t.add(n);
4982
+ for (let n of Ma(e.slice(r + 2, i))) t.add(n);
4924
4983
  n = i + 1;
4925
4984
  }
4926
4985
  return t.values();
4927
4986
  }
4928
- function wa(e, t) {
4987
+ function ja(e, t) {
4929
4988
  let n = 0;
4930
4989
  for (let r = t; r < e.length; r += 1) {
4931
4990
  let t = e[r];
@@ -4940,71 +4999,71 @@ function wa(e, t) {
4940
4999
  }
4941
5000
  return -1;
4942
5001
  }
4943
- function Ta(e) {
5002
+ function Ma(e) {
4944
5003
  let t = new $(), n = 0;
4945
5004
  for (; n < e.length;) {
4946
5005
  let r = e.indexOf("row.", n);
4947
5006
  if (r < 0) break;
4948
- if (r > 0 && Ea(e.charCodeAt(r - 1))) {
5007
+ if (r > 0 && Na(e.charCodeAt(r - 1))) {
4949
5008
  n = r + 4;
4950
5009
  continue;
4951
5010
  }
4952
5011
  let i = r + 4, a = i;
4953
- for (; a < e.length && Ea(e.charCodeAt(a));) a += 1;
5012
+ for (; a < e.length && Na(e.charCodeAt(a));) a += 1;
4954
5013
  a > i && t.add(e.slice(i, a)), n = a;
4955
5014
  }
4956
5015
  return t.values();
4957
5016
  }
4958
- function Ea(e) {
5017
+ function Na(e) {
4959
5018
  return e >= 48 && e <= 57 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e === 95;
4960
5019
  }
4961
- function Da(e, t, n) {
5020
+ function Pa(e, t, n) {
4962
5021
  let r = new $();
4963
5022
  for (let i of t) for (let t of i ?? []) for (let i of [
4964
5023
  ...t.action.visible_if ?? [],
4965
5024
  ...t.action.enabled_if ?? [],
4966
5025
  ...t.action.conditions ?? []
4967
5026
  ]) {
4968
- let t = fa(e, i.field, { explicit: !0 });
4969
- t && (r.add(t), n.addField(t, "condition"), Fa(e, t, n, "condition"));
5027
+ let t = ya(e, i.field, { explicit: !0 });
5028
+ t && (r.add(t), n.addField(t, "condition"), Ha(e, t, n, "condition"));
4970
5029
  }
4971
5030
  return r.values();
4972
5031
  }
4973
- function Oa(e, t, n) {
4974
- let r = typeof t == "string" ? Mi(t) : t ?? [], i = new $();
5032
+ function Fa(e, t, n) {
5033
+ let r = typeof t == "string" ? zi(t) : t ?? [], i = new $();
4975
5034
  for (let t of r) {
4976
- let r = fa(e, t.field, { explicit: !0 });
4977
- r && (i.add(r), n.addField(r, "sort"), Fa(e, r, n, "sort"));
5035
+ let r = ya(e, t.field, { explicit: !0 });
5036
+ r && (i.add(r), n.addField(r, "sort"), Ha(e, r, n, "sort"));
4978
5037
  }
4979
5038
  return i.values();
4980
5039
  }
4981
- function ka(e, t, n, r) {
5040
+ function Ia(e, t, n, r) {
4982
5041
  let i = new $(), a = t?.variants?.items() ?? [];
4983
- if (a.length === 0 || a.some((e) => e.quick_peek === void 0)) for (let r of aa(e, t, n)) i.add(r);
5042
+ if (a.length === 0 || a.some((e) => e.quick_peek === void 0)) for (let r of fa(e, t, n)) i.add(r);
4984
5043
  for (let r of a) {
4985
5044
  if (r.quick_peek === void 0) continue;
4986
5045
  let a = {
4987
5046
  ...t,
4988
5047
  quick_peek: r.quick_peek
4989
5048
  };
4990
- for (let t of aa(e, a, n)) i.add(t);
5049
+ for (let t of fa(e, a, n)) i.add(t);
4991
5050
  }
4992
- for (let t of i.values()) r.addField(t, "quick_peek"), Fa(e, t, r, "quick_peek");
5051
+ for (let t of i.values()) r.addField(t, "quick_peek"), Ha(e, t, r, "quick_peek");
4993
5052
  return i.values();
4994
5053
  }
4995
- function Aa(e, t, n) {
5054
+ function La(e, t, n) {
4996
5055
  if (Array.isArray(e)) {
4997
5056
  for (let r of e) if (!(!r || typeof r != "object")) {
4998
5057
  if ("section" in r) {
4999
- let e = r.section, i = Ma(e?.name);
5000
- i && t.has(i) && ja(e?.items, n);
5058
+ let e = r.section, i = za(e?.name);
5059
+ i && t.has(i) && Ra(e?.items, n);
5001
5060
  continue;
5002
5061
  }
5003
- "fields" in r && ja([r], n);
5062
+ "fields" in r && Ra([r], n);
5004
5063
  }
5005
5064
  }
5006
5065
  }
5007
- function ja(e, t) {
5066
+ function Ra(e, t) {
5008
5067
  if (Array.isArray(e)) {
5009
5068
  for (let n of e) if (!(!n || typeof n != "object")) {
5010
5069
  if ("fields" in n) {
@@ -5017,11 +5076,11 @@ function ja(e, t) {
5017
5076
  }
5018
5077
  }
5019
5078
  }
5020
- "section" in n && ja(n.section?.items, t);
5079
+ "section" in n && Ra(n.section?.items, t);
5021
5080
  }
5022
5081
  }
5023
5082
  }
5024
- function Ma(e) {
5083
+ function za(e) {
5025
5084
  if (typeof e == "string") return e;
5026
5085
  if (e && typeof e == "object") {
5027
5086
  let t = Object.values(e).find((e) => typeof e == "string");
@@ -5029,21 +5088,21 @@ function Ma(e) {
5029
5088
  }
5030
5089
  return "";
5031
5090
  }
5032
- function Na(e) {
5091
+ function Ba(e) {
5033
5092
  let t = [];
5034
5093
  for (let [n, r] of e.fields) {
5035
5094
  if (r.primary || r.auto || r.ref || r.array || r.structure || r.display?.is_listable === !1) continue;
5036
5095
  let e = (r.type || "").toLowerCase(), i = !!(r.enum || r.values);
5037
- if (!(!ea.has(e) && !i) && (t.push(n), t.length >= 8)) break;
5096
+ if (!(!sa.has(e) && !i) && (t.push(n), t.length >= 8)) break;
5038
5097
  }
5039
5098
  return t;
5040
5099
  }
5041
- function Pa(e, t, n, r) {
5100
+ function Va(e, t, n, r) {
5042
5101
  if (!t || t.startsWith("$")) return;
5043
- let i = La(e, t);
5102
+ let i = Wa(e, t);
5044
5103
  i.kind !== "missing" && (n.add(t), i.kind === "file" && r.addField(t, "file_metadata"));
5045
5104
  }
5046
- function Fa(e, t, n, r) {
5105
+ function Ha(e, t, n, r) {
5047
5106
  if (t.startsWith("$status.")) {
5048
5107
  n.addExpand("statuses", "status_expand"), r !== "status_expand" && n.addExpand("statuses", r), r !== "status_expand" && n.addField(t, r);
5049
5108
  return;
@@ -5058,14 +5117,14 @@ function Fa(e, t, n, r) {
5058
5117
  n.addExpand("evidence", "evidence_expand"), r !== "evidence_expand" && n.addExpand("evidence", r), r !== "evidence_expand" && n.addField(t, r);
5059
5118
  return;
5060
5119
  }
5061
- let i = La(e, t);
5120
+ let i = Wa(e, t);
5062
5121
  i.kind === "field" && i.field.type === "ref" && (n.addExpand("refs", "ref_expand"), r !== "ref_expand" && n.addExpand("refs", r));
5063
5122
  }
5064
- function Ia(e) {
5123
+ function Ua(e) {
5065
5124
  let t = e.snapshot().expand, n = [];
5066
5125
  return t.refs && n.push("refs"), t.statuses && n.push("statuses"), t.properties && n.push("properties"), t.evidence && n.push("evidence"), n;
5067
5126
  }
5068
- function La(e, t) {
5127
+ function Wa(e, t) {
5069
5128
  if (!e) return { kind: t.startsWith("$") ? "synthetic" : "missing" };
5070
5129
  if (t.startsWith("$status.")) return e.status_groups?.[t.slice(8)] ? { kind: "synthetic" } : { kind: "missing" };
5071
5130
  if (t.startsWith("$property.")) return e.properties?.[t.slice(10)] ? { kind: "synthetic" } : { kind: "missing" };
@@ -5093,7 +5152,7 @@ var $ = class {
5093
5152
  values() {
5094
5153
  return [...this.#e];
5095
5154
  }
5096
- }, Ra = class {
5155
+ }, Ga = class {
5097
5156
  #e = /* @__PURE__ */ new Map();
5098
5157
  #t = /* @__PURE__ */ new Map();
5099
5158
  addField(e, t) {
@@ -5116,7 +5175,7 @@ var $ = class {
5116
5175
  }
5117
5176
  r.includes(n) || r.push(n);
5118
5177
  }
5119
- }, za = class extends Ne {
5178
+ }, Ka = class extends Me {
5120
5179
  constructor(e) {
5121
5180
  super(e), this.state = {
5122
5181
  hasError: !1,
@@ -5173,7 +5232,7 @@ var $ = class {
5173
5232
  },
5174
5233
  children: this.state.error?.message || "An unexpected error occurred."
5175
5234
  }),
5176
- /* @__PURE__ */ X("div", { children: /* @__PURE__ */ X(U, {
5235
+ /* @__PURE__ */ X("div", { children: /* @__PURE__ */ X(W, {
5177
5236
  onClick: this.handleRetry,
5178
5237
  children: "Try again"
5179
5238
  }) })
@@ -5184,15 +5243,15 @@ var $ = class {
5184
5243
  };
5185
5244
  //#endregion
5186
5245
  //#region src/hooks/useObject.ts
5187
- function Ba(e, t) {
5246
+ function qa(e, t) {
5188
5247
  return [
5189
5248
  "entity-item",
5190
5249
  e,
5191
5250
  t === void 0 || t === "new" ? void 0 : typeof t == "string" ? t : Object.keys(t).sort().map((e) => [e, t[e]])
5192
5251
  ];
5193
5252
  }
5194
- function Va(e, t) {
5195
- let n = Ba(e, t), r = n[2];
5253
+ function Ja(e, t) {
5254
+ let n = qa(e, t), r = n[2];
5196
5255
  return He({
5197
5256
  queryKey: n,
5198
5257
  queryFn: () => x(e, t),
@@ -5201,15 +5260,15 @@ function Va(e, t) {
5201
5260
  }
5202
5261
  //#endregion
5203
5262
  //#region src/components/detail-layout/widgets/registry.ts
5204
- var Ha = /* @__PURE__ */ new Map();
5205
- function Ua(e, t) {
5206
- Ha.set(e, t);
5263
+ var Ya = /* @__PURE__ */ new Map();
5264
+ function Xa(e, t) {
5265
+ Ya.set(e, t);
5207
5266
  }
5208
- function Wa(e) {
5209
- return Ha.get(e);
5267
+ function Za(e) {
5268
+ return Ya.get(e);
5210
5269
  }
5211
- function Ga(e) {
5212
- return Ha.has(e);
5270
+ function Qa(e) {
5271
+ return Ya.has(e);
5213
5272
  }
5214
5273
  //#endregion
5215
- export { Tn as $, wi as A, Cr as B, Pi as C, Ci as D, ki as E, Jr as F, nr as G, ir as H, Zr as I, er as J, zn as K, Yr as L, ri as M, Xr as N, Ti as O, $r as P, Cn as Q, zr as R, Li as S, Ai as T, rr as U, or as V, tr as W, In as X, Yn as Y, Ln as Z, Bi as _, kt as _t, Va as a, an as at, Fi as b, Ye as bt, na as c, Ut as ct, Ui as d, Bt as dt, On as et, Gi as f, jt as ft, Wi as g, bt as gt, zi as h, Et as ht, Ba as i, on as it, ui as j, Ei as k, aa as l, Wt as lt, Hi as m, At as mt, Ga as n, En as nt, za as o, Jt as ot, Vi as p, Mt as pt, Zn as q, Ua as r, sn as rt, ta as s, qt as st, Wa as t, Dn as tt, ia as u, Ht as ut, Ri as v, ct as vt, Ni as w, Mi as x, Je as xt, Ii as y, ft as yt, jr as z };
5274
+ export { Dn as $, ji as A, Tr as B, Vi as C, Ai as D, Ii as E, ti as F, ir as G, or as H, ii as I, nr as J, Vn as K, ni as L, ui as M, ri as N, Mi as O, oi as P, Tn as Q, Kr as R, Wi as S, Ye as St, Li as T, ar as U, cr as V, rr as W, Rn as X, Zn as Y, zn as Z, qi as _, xt as _t, Ja as a, sn as at, Hi as b, pt as bt, la as c, Gt as ct, Xi as d, Ht as dt, An as et, Qi as f, Vt as ft, Zi as g, Dt as gt, Ki as h, jt as ht, qa as i, cn as it, _i as j, Ni as k, fa as l, Kt as lt, Yi as m, Nt as mt, Qa as n, On as nt, Ka as o, Xt as ot, Ji as p, Mt as pt, $n as q, Xa as r, ln as rt, ca as s, Yt as st, Za as t, kn as tt, da as u, Wt as ut, Gi as v, At as vt, Bi as w, zi as x, Xe as xt, Ui as y, lt as yt, Rr as z };