@cratis/stage.runtime 5.2.0 → 5.3.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 (2) hide show
  1. package/dist/src/index.js +562 -544
  2. package/package.json +1 -1
package/dist/src/index.js CHANGED
@@ -1339,8 +1339,8 @@ function hi() {
1339
1339
  return f(() => {
1340
1340
  let r = e ? Object.fromEntries(Object.entries(t).filter(([t]) => e.has(t))) : t, i = e ? Object.fromEntries(Object.entries(n).filter(([t]) => e.has(t))) : n;
1341
1341
  return {
1342
- selectableRows: Yi(r),
1343
- selectedRows: Xi(i, r)
1342
+ selectableRows: Zi(r),
1343
+ selectedRows: Qi(i, r)
1344
1344
  };
1345
1345
  }, [
1346
1346
  t,
@@ -1487,17 +1487,17 @@ function Di(e, t) {
1487
1487
  };
1488
1488
  }
1489
1489
  function Oi({ element: e, cancellable: n }) {
1490
- let r = W(), i = c(t), a = c(wi), o = c(Ti), s = p(null), l = f(() => Ni(e), [e]), u = Ci(e, l, Be()), { schemaText: d, schema: h, hasSchemaMetadata: g } = Di(e, r.routes), _ = f(() => l ? Pi(l, h) : [], [l, h]), v = l ? on(l.command, X(e, "typeName"), X(e, "route")) : void 0, y = ki(e, l), b = ta(e, _, r.resolveArgument), x = $i(e, h, r), S = JSON.stringify(x ?? null), C = f(() => x, [S]), { selectableRows: w, selectedRows: T, rowAction: E, subjectValues: D } = Ei(e, hi(), d), O = f(() => Vi(h, r.parameters, T, D), [
1490
+ let r = W(), i = c(t), a = c(wi), o = c(Ti), s = p(null), l = f(() => Fi(e), [e]), u = Ci(e, l, Be()), { schemaText: d, schema: h, hasSchemaMetadata: g } = Di(e, r.routes), _ = f(() => l ? Ii(l, h) : [], [l, h]), v = l ? on(l.command, X(e, "typeName"), X(e, "route")) : void 0, y = ji(e, l), b = ra(e, _, r.resolveArgument), x = ta(e, h, r), S = JSON.stringify(x ?? null), C = f(() => x, [S]), { selectableRows: w, selectedRows: T, rowAction: E, subjectValues: D } = Ei(e, hi(), d), O = f(() => Ui(h, r.parameters, T, D), [
1491
1491
  h,
1492
1492
  T,
1493
1493
  r.parameters,
1494
1494
  D
1495
- ]), k = f(() => Hi(_, O), [_, O]), A = f(() => ({
1495
+ ]), k = f(() => Wi(_, O), [_, O]), A = f(() => ({
1496
1496
  ...C,
1497
- ...Bi(_, h, r.parameters, T, w, E),
1497
+ ...Hi(_, h, r.parameters, T, w, E),
1498
1498
  ...O,
1499
1499
  ...D,
1500
- ...zi(_, r.parameters)
1500
+ ...Vi(_, r.parameters)
1501
1501
  }), [
1502
1502
  C,
1503
1503
  _,
@@ -1515,15 +1515,15 @@ function Oi({ element: e, cancellable: n }) {
1515
1515
  O,
1516
1516
  A,
1517
1517
  b
1518
- ]), te = f(() => l ? Fi(l, k, h) : void 0, [
1518
+ ]), te = f(() => l ? Li(l, k, h) : void 0, [
1519
1519
  l,
1520
1520
  k,
1521
1521
  h
1522
- ]), ne = f(() => l ? fa(_, h) : [], [
1522
+ ]), ne = f(() => l ? ma(_, h) : [], [
1523
1523
  l,
1524
1524
  _,
1525
1525
  h
1526
- ]), j = f(() => l ? pa(l.layout, _) : [], [l, _]), [M, N] = m([]);
1526
+ ]), j = f(() => l ? ha(l.layout, _) : [], [l, _]), [M, N] = m([]);
1527
1527
  return l ? !v && !r.routesReady ? /* @__PURE__ */ V("p", {
1528
1528
  className: "stage-note",
1529
1529
  children: [
@@ -1531,10 +1531,10 @@ function Oi({ element: e, cancellable: n }) {
1531
1531
  l.command,
1532
1532
  "” is waiting for Stage routes."
1533
1533
  ]
1534
- }) : v ? _.length === 0 && !g && e.properties.parameterless !== !0 ? /* @__PURE__ */ B(Mi, {
1534
+ }) : v ? _.length === 0 && !g && e.properties.parameterless !== !0 ? /* @__PURE__ */ B(Pi, {
1535
1535
  form: l,
1536
1536
  messages: [`The modeled command “${l.command}” has no form fields or schema metadata, so Stage will not submit an empty command body.`]
1537
- }) : ne.length + u.messages.length > 0 ? /* @__PURE__ */ B(Mi, {
1537
+ }) : ne.length + u.messages.length > 0 ? /* @__PURE__ */ B(Pi, {
1538
1538
  form: l,
1539
1539
  messages: [...ne, ...u.messages]
1540
1540
  }) : /* @__PURE__ */ B("section", {
@@ -1542,51 +1542,57 @@ function Oi({ element: e, cancellable: n }) {
1542
1542
  className: "stage-command-form",
1543
1543
  "data-command": l.command,
1544
1544
  "data-generation-mode": l.generationMode,
1545
- children: /* @__PURE__ */ V(Et, {
1546
- command: v,
1547
- initialValues: A,
1548
- currentValues: ee,
1549
- validateOn: "both",
1550
- validateAllFieldsOnChange: !0,
1551
- onBeforeExecute: (e) => cn(e, i.apiBasePath),
1552
- onFieldValidate: (e, t, n, r) => da(_, h, t, r),
1553
- onValidationFailure: (e) => N(ua(_, e)),
1554
- onException: (e) => N(e),
1555
- onFailed: (e) => N(un(l.command, e).messages),
1556
- onSuccess: async (t) => {
1557
- r.refreshAfterCommand();
1558
- let n = (t, n) => {
1559
- N(t), t.length || ji(e, n, a);
1560
- };
1561
- try {
1562
- await u.complete(t, n);
1563
- } catch (e) {
1564
- n([e instanceof Error ? e.message : String(e)], !1);
1565
- }
1566
- },
1567
- children: [
1568
- j.map((e) => /* @__PURE__ */ B("p", {
1569
- role: "alert",
1570
- className: "stage-form-error",
1571
- children: e
1572
- }, e)),
1573
- te,
1574
- M.map((e) => /* @__PURE__ */ B("p", {
1575
- role: "alert",
1576
- className: "stage-form-error",
1577
- children: e
1578
- }, e)),
1579
- o ? Tt(/* @__PURE__ */ B(H, {
1580
- type: "button",
1581
- className: "scene-slice-dialog-submit",
1582
- onClick: () => s.current?.querySelector("form")?.requestSubmit(),
1583
- children: y
1584
- }), o) : /* @__PURE__ */ B(Ai, {
1585
- submitLabel: y,
1586
- cancellable: n
1587
- })
1588
- ]
1589
- }, S)
1545
+ children: /* @__PURE__ */ B(ki.Provider, {
1546
+ value: M.length > 0,
1547
+ children: /* @__PURE__ */ V(Et, {
1548
+ command: v,
1549
+ initialValues: A,
1550
+ currentValues: ee,
1551
+ validateOn: "both",
1552
+ validateAllFieldsOnChange: !0,
1553
+ exceptionDisplayComponent: Ai,
1554
+ onBeforeExecute: (e) => cn(e, i.apiBasePath),
1555
+ onFieldValidate: (e, t, n, r) => pa(_, h, t, r),
1556
+ onValidationFailure: (e) => N(fa(_, e)),
1557
+ onException: (e) => {
1558
+ e.length > 0 && N(e);
1559
+ },
1560
+ onFailed: (e) => N(un(l.command, e).messages),
1561
+ onSuccess: async (t) => {
1562
+ r.refreshAfterCommand();
1563
+ let n = (t, n) => {
1564
+ N(t), t.length || Ni(e, n, a);
1565
+ };
1566
+ try {
1567
+ await u.complete(t, n);
1568
+ } catch (e) {
1569
+ n([e instanceof Error ? e.message : String(e)], !1);
1570
+ }
1571
+ },
1572
+ children: [
1573
+ j.map((e) => /* @__PURE__ */ B("p", {
1574
+ role: "alert",
1575
+ className: "stage-form-error",
1576
+ children: e
1577
+ }, e)),
1578
+ te,
1579
+ M.map((e) => /* @__PURE__ */ B("p", {
1580
+ role: "alert",
1581
+ className: "stage-form-error",
1582
+ children: e
1583
+ }, e)),
1584
+ o ? Tt(/* @__PURE__ */ B(H, {
1585
+ type: "button",
1586
+ className: "scene-slice-dialog-submit",
1587
+ onClick: () => s.current?.querySelector("form")?.requestSubmit(),
1588
+ children: y
1589
+ }), o) : /* @__PURE__ */ B(Mi, {
1590
+ submitLabel: y,
1591
+ cancellable: n
1592
+ })
1593
+ ]
1594
+ }, S)
1595
+ })
1590
1596
  }) : /* @__PURE__ */ V("p", {
1591
1597
  className: "stage-note",
1592
1598
  children: [
@@ -1599,10 +1605,22 @@ function Oi({ element: e, cancellable: n }) {
1599
1605
  children: "This form is missing its command metadata."
1600
1606
  });
1601
1607
  }
1602
- function ki(e, t) {
1608
+ var ki = a(!1);
1609
+ function Ai({ message: e }) {
1610
+ return c(ki) ? /* @__PURE__ */ B("span", {
1611
+ role: "status",
1612
+ className: "cratis-field-sr-only",
1613
+ children: e
1614
+ }) : /* @__PURE__ */ B("p", {
1615
+ role: "alert",
1616
+ className: "stage-form-error",
1617
+ children: e
1618
+ });
1619
+ }
1620
+ function ji(e, t) {
1603
1621
  return X(e, "submitLabel") || t?.label || "Submit";
1604
1622
  }
1605
- function Ai({ submitLabel: e, cancellable: t }) {
1623
+ function Mi({ submitLabel: e, cancellable: t }) {
1606
1624
  let n = c(wi);
1607
1625
  return /* @__PURE__ */ V("div", {
1608
1626
  className: "stage-command-form__actions",
@@ -1617,11 +1635,11 @@ function Ai({ submitLabel: e, cancellable: t }) {
1617
1635
  })]
1618
1636
  });
1619
1637
  }
1620
- function ji(e, t, n) {
1638
+ function Ni(e, t, n) {
1621
1639
  let r = X(e, "navigateToScreen");
1622
1640
  r && !t && pn(r, {}), n?.();
1623
1641
  }
1624
- function Mi({ form: e, messages: t }) {
1642
+ function Pi({ form: e, messages: t }) {
1625
1643
  return /* @__PURE__ */ B("section", {
1626
1644
  className: "stage-command-form",
1627
1645
  "data-command": e.command,
@@ -1633,7 +1651,7 @@ function Mi({ form: e, messages: t }) {
1633
1651
  }, e))
1634
1652
  });
1635
1653
  }
1636
- function Ni(e) {
1654
+ function Fi(e) {
1637
1655
  let t = X(e, "command");
1638
1656
  if (!t) return;
1639
1657
  let n = Array.isArray(e.properties.fields) ? e.properties.fields.filter(Z) : [];
@@ -1641,34 +1659,34 @@ function Ni(e) {
1641
1659
  command: t,
1642
1660
  label: X(e, "label") || J(t),
1643
1661
  fields: n,
1644
- generationMode: ra(e.properties.generationMode),
1645
- layout: ia(e.properties.layout)
1662
+ generationMode: aa(e.properties.generationMode),
1663
+ layout: oa(e.properties.layout)
1646
1664
  };
1647
1665
  }
1648
- function Pi(e, t) {
1666
+ function Ii(e, t) {
1649
1667
  return e.generationMode === y.Manual || e.fields.length > 0 ? e.fields : t.filter((e) => !e.unsupportedReason).map((e) => ({
1650
1668
  name: e.name,
1651
1669
  label: J(e.name)
1652
1670
  }));
1653
1671
  }
1654
- function Fi(e, t, n) {
1655
- let r = e.layout, i = r ? aa(r, t) : [];
1656
- if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => Ii(e, n));
1657
- let a = new Map(t.map((e) => [e.name, e])), o = oa(r, i), s = {
1658
- gridTemplateColumns: Array.from({ length: o }, (e, t) => sa(t + 1, r.columns)).join(" "),
1659
- columnGap: la(r.columnGap),
1660
- rowGap: la(r.rowGap)
1672
+ function Li(e, t, n) {
1673
+ let r = e.layout, i = r ? sa(r, t) : [];
1674
+ if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => Ri(e, n));
1675
+ let a = new Map(t.map((e) => [e.name, e])), o = ca(r, i), s = {
1676
+ gridTemplateColumns: Array.from({ length: o }, (e, t) => la(t + 1, r.columns)).join(" "),
1677
+ columnGap: da(r.columnGap),
1678
+ rowGap: da(r.rowGap)
1661
1679
  }, c = /* @__PURE__ */ new Set();
1662
1680
  return /* @__PURE__ */ V("div", {
1663
1681
  className: "stage-command-form__layout",
1664
1682
  style: s,
1665
1683
  children: [i.map((e) => {
1666
1684
  let t = a.get(e.field);
1667
- return t ? (c.add(t.name), Ii(t, n, e)) : null;
1668
- }), t.filter((e) => !c.has(e.name)).map((e) => Ii(e, n))]
1685
+ return t ? (c.add(t.name), Ri(t, n, e)) : null;
1686
+ }), t.filter((e) => !c.has(e.name)).map((e) => Ri(e, n))]
1669
1687
  });
1670
1688
  }
1671
- function Ii(e, t, n) {
1689
+ function Ri(e, t, n) {
1672
1690
  let r = e.sourceProperty ?? e.name, i = t.find((e) => e.name === r), a = e.label ?? e.name, o = (e) => e[r], s = i?.required ?? !0, c = bi(i, {
1673
1691
  value: o,
1674
1692
  fieldName: r,
@@ -1710,7 +1728,7 @@ function Ii(e, t, n) {
1710
1728
  label: a,
1711
1729
  required: s
1712
1730
  });
1713
- case "date": return /* @__PURE__ */ B(Li, {
1731
+ case "date": return /* @__PURE__ */ B(zi, {
1714
1732
  value: o,
1715
1733
  fieldName: r,
1716
1734
  title: a,
@@ -1726,7 +1744,7 @@ function Ii(e, t, n) {
1726
1744
  required: s
1727
1745
  });
1728
1746
  }
1729
- })()), l = ca(n);
1747
+ })()), l = ua(n);
1730
1748
  return /* @__PURE__ */ B("span", {
1731
1749
  className: "stage-command-form__field",
1732
1750
  "data-field": e.name,
@@ -1737,12 +1755,12 @@ function Ii(e, t, n) {
1737
1755
  children: c
1738
1756
  }, e.name);
1739
1757
  }
1740
- var Li = Ot((e) => /* @__PURE__ */ B(kt, {
1758
+ var zi = Ot((e) => /* @__PURE__ */ B(kt, {
1741
1759
  ...e,
1742
- currentValue: e.showTime ? e.currentValue : Ri(e.currentValue),
1760
+ currentValue: e.showTime ? e.currentValue : Bi(e.currentValue),
1743
1761
  onValueChange: (t) => e.onValueChange?.(!e.showTime && t instanceof Date && !Number.isNaN(t.getTime()) ? bt.fromDate(t) : t)
1744
1762
  }));
1745
- function Ri(e) {
1763
+ function Bi(e) {
1746
1764
  if (e instanceof bt) return e.toDate();
1747
1765
  if (typeof e != "string") return e;
1748
1766
  try {
@@ -1751,7 +1769,7 @@ function Ri(e) {
1751
1769
  return null;
1752
1770
  }
1753
1771
  }
1754
- function zi(e, t) {
1772
+ function Vi(e, t) {
1755
1773
  let n = {};
1756
1774
  for (let r of e) {
1757
1775
  let e = r.sourceProperty ?? r.name, i = t[e];
@@ -1759,47 +1777,47 @@ function zi(e, t) {
1759
1777
  }
1760
1778
  return n;
1761
1779
  }
1762
- function Bi(e, t, n, r = [], i = [], a = !1) {
1780
+ function Hi(e, t, n, r = [], i = [], a = !1) {
1763
1781
  let o = new Set(e.map((e) => e.sourceProperty ?? e.name)), s = t.some((e) => e.identity), c = {};
1764
1782
  for (let e of t) {
1765
1783
  if (!e.identifier || !e.required || o.has(e.name)) continue;
1766
- if (a && Ki(e, i)) {
1767
- let t = n[e.name] || Gi(e, r);
1784
+ if (a && Ji(e, i)) {
1785
+ let t = n[e.name] || qi(e, r);
1768
1786
  t && (c[e.name] = t);
1769
1787
  continue;
1770
1788
  }
1771
- let t = n[e.name] || Gi(e, r) || nn(e.identifier) || (e.identity || !s && !Ki(e, i) ? rn(e.identifier) : void 0);
1789
+ let t = n[e.name] || qi(e, r) || nn(e.identifier) || (e.identity || !s && !Ji(e, i) ? rn(e.identifier) : void 0);
1772
1790
  t !== void 0 && (c[e.name] = t);
1773
1791
  }
1774
1792
  return c;
1775
1793
  }
1776
- function Vi(e, t, n, r) {
1794
+ function Ui(e, t, n, r) {
1777
1795
  return Object.fromEntries(e.filter((e) => e.reference).flatMap((e) => {
1778
- let i = t[e.name] || r[e.name] || Gi(e, n) || (Ui({
1796
+ let i = t[e.name] || r[e.name] || qi(e, n) || (Gi({
1779
1797
  ...e,
1780
1798
  required: !0
1781
- }, t) ? Wi(e, t) : void 0);
1799
+ }, t) ? Ki(e, t) : void 0);
1782
1800
  return i === void 0 ? [] : [[e.name, i]];
1783
1801
  }));
1784
1802
  }
1785
- function Hi(e, t) {
1803
+ function Wi(e, t) {
1786
1804
  return e.filter((e) => !Object.hasOwn(t, e.sourceProperty ?? e.name));
1787
1805
  }
1788
- function Ui(e, t) {
1789
- return !e.identifier || !e.required ? !1 : e.identity === !0 || Wi(e, t) !== void 0;
1806
+ function Gi(e, t) {
1807
+ return !e.identifier || !e.required ? !1 : e.identity === !0 || Ki(e, t) !== void 0;
1790
1808
  }
1791
- function Wi(e, t) {
1809
+ function Ki(e, t) {
1792
1810
  if (e.identifier) return t[e.name] || nn(e.identifier);
1793
1811
  }
1794
- function Gi(e, t) {
1812
+ function qi(e, t) {
1795
1813
  if (!e.identifier) return;
1796
1814
  let n = new Set(t.map((t) => t[e.name]).filter((e) => typeof e == "string" && e !== ""));
1797
1815
  return n.size === 1 ? [...n][0] : void 0;
1798
1816
  }
1799
- function Ki(e, t) {
1817
+ function Ji(e, t) {
1800
1818
  return !e.otherEntity && t.some((t) => Object.hasOwn(t, e.name));
1801
1819
  }
1802
- function qi(e, t) {
1820
+ function Yi(e, t) {
1803
1821
  let n = e.id;
1804
1822
  if (typeof n != "string" || n === "") return e;
1805
1823
  let r = `${t.alias ?? ""} ${t.name ?? ""}`.match(/[A-Z][a-z0-9]+/g) ?? [], i = Object.fromEntries(r.map((e) => `${e.charAt(0).toLowerCase()}${e.slice(1)}Id`).filter((t) => !Object.hasOwn(e, t)).map((e) => [e, n]));
@@ -1808,25 +1826,25 @@ function qi(e, t) {
1808
1826
  ...e
1809
1827
  };
1810
1828
  }
1811
- function Ji(e) {
1812
- return Object.values(e).flatMap((e) => e.rows.map((t) => [t, qi(t, e)]));
1829
+ function Xi(e) {
1830
+ return Object.values(e).flatMap((e) => e.rows.map((t) => [t, Yi(t, e)]));
1813
1831
  }
1814
- function Yi(e) {
1815
- return Ji(e).map(([, e]) => e);
1832
+ function Zi(e) {
1833
+ return Xi(e).map(([, e]) => e);
1816
1834
  }
1817
- function Xi(e, t) {
1818
- let n = new Map(Ji(t));
1835
+ function Qi(e, t) {
1836
+ let n = new Map(Xi(t));
1819
1837
  return Object.values(e).filter((e) => e !== void 0).map((e) => n.get(e) ?? e);
1820
1838
  }
1821
- function Zi(e, t, n, r) {
1822
- return e.filter((e) => e.identifier && e.required && Ki(e, r)).filter((e) => !t[e.name] && Gi(e, n) === void 0).map((e) => e.name);
1839
+ function $i(e, t, n, r) {
1840
+ return e.filter((e) => e.identifier && e.required && Ji(e, r)).filter((e) => !t[e.name] && qi(e, n) === void 0).map((e) => e.name);
1823
1841
  }
1824
- function Qi(e) {
1842
+ function ea(e) {
1825
1843
  let t = e.properties.populateSource;
1826
1844
  return Z(t) ? t : void 0;
1827
1845
  }
1828
- function $i(e, t, n) {
1829
- let r = Qi(e), i = r?.queryName, a = Object.entries(r?.parameterBindings ?? {}).map(([e, r]) => [e, ea(e, r?.path ?? e, t, n)]), o = Object.fromEntries(a.filter(([, e]) => e !== void 0 && e !== "")), s = !!i && n.routesReady && a.every(([, e]) => e !== void 0 && e !== ""), c = G({
1846
+ function ta(e, t, n) {
1847
+ let r = ea(e), i = r?.queryName, a = Object.entries(r?.parameterBindings ?? {}).map(([e, r]) => [e, na(e, r?.path ?? e, t, n)]), o = Object.fromEntries(a.filter(([, e]) => e !== void 0 && e !== "")), s = !!i && n.routesReady && a.every(([, e]) => e !== void 0 && e !== ""), c = G({
1830
1848
  scope: `populate:${X(e, "command")}`,
1831
1849
  name: i,
1832
1850
  route: i ? n.routes?.queries?.[i] : void 0,
@@ -1844,7 +1862,7 @@ function $i(e, t, n) {
1844
1862
  return Object.keys(e).length > 0 ? e : void 0;
1845
1863
  }, [u, t]);
1846
1864
  }
1847
- function ea(e, t, n, r) {
1865
+ function na(e, t, n, r) {
1848
1866
  let i = r.parameters[t] ?? r.parameters[e];
1849
1867
  if (i) return i;
1850
1868
  let a = n.find((n) => n.name === t || n.name === e)?.identifier;
@@ -1852,52 +1870,52 @@ function ea(e, t, n, r) {
1852
1870
  let o = r.resolveBinding({ path: t });
1853
1871
  return typeof o == "string" || typeof o == "number" ? o : void 0;
1854
1872
  }
1855
- function ta(e, t, n) {
1856
- let r = f(() => na(e, t), [e, t]), i = r.map((e) => n(e.source)), a = JSON.stringify(i);
1873
+ function ra(e, t, n) {
1874
+ let r = f(() => ia(e, t), [e, t]), i = r.map((e) => n(e.source)), a = JSON.stringify(i);
1857
1875
  return f(() => {
1858
1876
  let e = Object.fromEntries(r.map((e, t) => [e.name, i[t]]).filter(([, e]) => e != null && e !== ""));
1859
1877
  return Object.keys(e).length > 0 ? e : void 0;
1860
1878
  }, [r, a]);
1861
1879
  }
1862
- function na(e, t) {
1880
+ function ia(e, t) {
1863
1881
  let n = e.properties.arguments;
1864
1882
  if (!Array.isArray(n)) return [];
1865
1883
  let r = new Set(t.map((e) => e.sourceProperty ?? e.name));
1866
1884
  return n.filter((e) => typeof e == "object" && !!e && typeof e.name == "string" && typeof e.source == "string" && r.has(e.name));
1867
1885
  }
1868
- function ra(e) {
1886
+ function aa(e) {
1869
1887
  return e === y.Manual ? y.Manual : y.Auto;
1870
1888
  }
1871
- function ia(e) {
1889
+ function oa(e) {
1872
1890
  if (!Z(e)) return;
1873
1891
  let t = e;
1874
1892
  return {
1875
- columns: Array.isArray(t.columns) ? t.columns.filter(ma) : [],
1876
- placements: Array.isArray(t.placements) ? t.placements.filter(ha) : [],
1877
- columnGap: ga(t.columnGap) ? t.columnGap : void 0,
1878
- rowGap: ga(t.rowGap) ? t.rowGap : void 0
1893
+ columns: Array.isArray(t.columns) ? t.columns.filter(ga) : [],
1894
+ placements: Array.isArray(t.placements) ? t.placements.filter(_a) : [],
1895
+ columnGap: va(t.columnGap) ? t.columnGap : void 0,
1896
+ rowGap: va(t.rowGap) ? t.rowGap : void 0
1879
1897
  };
1880
1898
  }
1881
- function aa(e, t) {
1899
+ function sa(e, t) {
1882
1900
  let n = new Map(e.placements.map((e) => [e.field, e]));
1883
- for (let e of t) !n.has(e.name) && ha(e.placement) && n.set(e.name, e.placement);
1901
+ for (let e of t) !n.has(e.name) && _a(e.placement) && n.set(e.name, e.placement);
1884
1902
  return [...n.values()].sort((e, t) => e.row - t.row || e.column - t.column || e.field.localeCompare(t.field));
1885
1903
  }
1886
- function oa(e, t) {
1904
+ function ca(e, t) {
1887
1905
  return Math.max(1, ...e.columns.map((e) => e.index), ...t.map((e) => e.column + (e.columnSpan ?? 1) - 1));
1888
1906
  }
1889
- function sa(e, t) {
1890
- let n = t.find((t) => t.index === e), r = la(n?.width), i = la(n?.minWidth), a = la(n?.maxWidth);
1907
+ function la(e, t) {
1908
+ let n = t.find((t) => t.index === e), r = da(n?.width), i = da(n?.minWidth), a = da(n?.maxWidth);
1891
1909
  return n?.width?.unit === b.Fraction && a ? `minmax(${i ?? "0"}, ${r ?? "1fr"})` : i || a ? `minmax(${i ?? "0"}, ${a && r ? `min(${r}, ${a})` : a ?? r ?? "1fr"})` : r ?? "1fr";
1892
1910
  }
1893
- function ca(e) {
1911
+ function ua(e) {
1894
1912
  if (e) return {
1895
1913
  gridColumn: `${e.column} / span ${e.columnSpan ?? 1}`,
1896
1914
  gridRow: `${e.row} / span ${e.rowSpan ?? 1}`,
1897
- width: e.width?.unit === b.Fraction ? void 0 : la(e.width)
1915
+ width: e.width?.unit === b.Fraction ? void 0 : da(e.width)
1898
1916
  };
1899
1917
  }
1900
- function la(e) {
1918
+ function da(e) {
1901
1919
  if (e) switch (e.unit) {
1902
1920
  case b.Fraction: return `${e.value ?? 1}fr`;
1903
1921
  case b.Pixels: return `${e.value ?? 0}px`;
@@ -1905,72 +1923,72 @@ function la(e) {
1905
1923
  case b.Auto: return "auto";
1906
1924
  }
1907
1925
  }
1908
- function ua(e, t) {
1926
+ function fa(e, t) {
1909
1927
  let n = (e, t) => !!e.members?.some((e) => e === t || e.startsWith(`${t}.`)), r = new Set(e.map((e) => t.find((t) => n(t, e.sourceProperty ?? e.name))).filter((e) => e !== void 0));
1910
1928
  return [...new Set(t.filter((e) => !r.has(e)).map((e) => e.message))];
1911
1929
  }
1912
- function da(e, t, n, r) {
1930
+ function pa(e, t, n, r) {
1913
1931
  let i = e.find((e) => (e.sourceProperty ?? e.name) === n), a = t.find((e) => e.name === n);
1914
1932
  if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ? Ir(a, r, i?.label ?? n) : void 0;
1915
1933
  }
1916
- function fa(e, t) {
1934
+ function ma(e, t) {
1917
1935
  let n = new Map(t.map((e) => [e.name, e]));
1918
1936
  return e.flatMap((e) => {
1919
1937
  let t = n.get(e.sourceProperty ?? e.name);
1920
1938
  return t?.unsupportedReason ? [`The field “${e.label ?? e.name}” uses unsupported schema metadata: ${t.unsupportedReason}.`] : [];
1921
1939
  });
1922
1940
  }
1923
- function pa(e, t) {
1941
+ function ha(e, t) {
1924
1942
  if (!e) return [];
1925
- let n = aa(e, t).filter((e) => e.width?.unit === b.Fraction).map((e) => `The field “${e.field}” uses a fractional field width, which cannot be applied to an individual form control.`), r = e.columns.filter((e) => e.width?.unit === b.Fraction && !!e.maxWidth).map((e) => `Column ${e.index} combines a fractional width with maxWidth; Stage keeps the fractional track and ignores maxWidth for that column.`);
1943
+ let n = sa(e, t).filter((e) => e.width?.unit === b.Fraction).map((e) => `The field “${e.field}” uses a fractional field width, which cannot be applied to an individual form control.`), r = e.columns.filter((e) => e.width?.unit === b.Fraction && !!e.maxWidth).map((e) => `Column ${e.index} combines a fractional width with maxWidth; Stage keeps the fractional track and ignores maxWidth for that column.`);
1926
1944
  return [...n, ...r];
1927
1945
  }
1928
1946
  function X(e, t, n = "") {
1929
1947
  let r = e.properties[t];
1930
1948
  return typeof r == "string" ? r : n;
1931
1949
  }
1932
- function ma(e) {
1950
+ function ga(e) {
1933
1951
  return Z(e) && typeof e.index == "number" && Number.isInteger(e.index) && e.index > 0;
1934
1952
  }
1935
- function ha(e) {
1953
+ function _a(e) {
1936
1954
  return Z(e) && typeof e.field == "string" && typeof e.row == "number" && typeof e.column == "number" && e.row > 0 && e.column > 0;
1937
1955
  }
1938
- function ga(e) {
1956
+ function va(e) {
1939
1957
  return Z(e) && Object.values(b).includes(e.unit);
1940
1958
  }
1941
1959
  function Z(e) {
1942
1960
  return typeof e == "object" && !!e && !Array.isArray(e);
1943
1961
  }
1944
1962
  // src/readableValue.ts
1945
- var _a = /^(\d{4})-(\d{2})-(\d{2})$/, va = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?$/;
1946
- function ya(e) {
1963
+ var ya = /^(\d{4})-(\d{2})-(\d{2})$/, ba = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?$/;
1964
+ function xa(e) {
1947
1965
  if (typeof e == "boolean") return e ? "Yes" : "No";
1948
- if (Array.isArray(e)) return ba(e);
1949
- if (typeof e == "string") return Sa(e) ?? Ca(e);
1966
+ if (Array.isArray(e)) return Sa(e);
1967
+ if (typeof e == "string") return wa(e) ?? Ta(e);
1950
1968
  }
1951
- function ba(e) {
1969
+ function Sa(e) {
1952
1970
  if (e.length === 0) return "";
1953
- let t = e.map(xa);
1954
- return t.every((e) => e !== void 0) ? t.map((e) => ya(e) ?? String(e)).join(", ") : e.length === 1 ? "1 item" : `${e.length} items`;
1971
+ let t = e.map(Ca);
1972
+ return t.every((e) => e !== void 0) ? t.map((e) => xa(e) ?? String(e)).join(", ") : e.length === 1 ? "1 item" : `${e.length} items`;
1955
1973
  }
1956
- function xa(e) {
1974
+ function Ca(e) {
1957
1975
  if (typeof e != "object" || !e) return e ?? "";
1958
1976
  if (Array.isArray(e)) return;
1959
1977
  let t = Object.values(e);
1960
1978
  return t.length === 1 && (t[0] === null || typeof t[0] != "object") ? t[0] ?? "" : void 0;
1961
1979
  }
1962
- function Sa(e) {
1963
- let t = _a.exec(e);
1980
+ function wa(e) {
1981
+ let t = ya.exec(e);
1964
1982
  if (!t) return;
1965
1983
  let n = new Date(2e3, Number(t[2]) - 1, Number(t[3]));
1966
1984
  return n.setFullYear(Number(t[1])), Number.isNaN(n.getTime()) || n.getMonth() !== Number(t[2]) - 1 ? void 0 : n.toLocaleDateString();
1967
1985
  }
1968
- function Ca(e) {
1969
- if (!va.test(e)) return;
1986
+ function Ta(e) {
1987
+ if (!ba.test(e)) return;
1970
1988
  let t = new Date(e);
1971
1989
  return Number.isNaN(t.getTime()) ? void 0 : t.toLocaleString();
1972
1990
  }
1973
- function wa(e) {
1991
+ function Ea(e) {
1974
1992
  let t = Be(), n = p(void 0), r = f(() => se(ke(e.id, e.behaviors), C.DoubleClick), [e.behaviors, e.id]);
1975
1993
  l(() => () => clearTimeout(n.current), []);
1976
1994
  let i = s((e) => {
@@ -1994,7 +2012,7 @@ function wa(e) {
1994
2012
  };
1995
2013
  }
1996
2014
  // src/stageSceneRouting.ts
1997
- var Ta = {
2015
+ var Da = {
1998
2016
  routedSlots: {},
1999
2017
  tabSlots: {},
2000
2018
  filters: {},
@@ -2002,7 +2020,7 @@ var Ta = {
2002
2020
  segmentScreens: {},
2003
2021
  slotDefaults: {}
2004
2022
  };
2005
- function Ea(e) {
2023
+ function Oa(e) {
2006
2024
  let t = [...(e.layouts ?? []).flatMap((e) => e.slots ?? []), ...(e.screenTemplates ?? []).flatMap((e) => e.slots ?? [])], n = {};
2007
2025
  for (let e of t) e.role !== A.Panel && (e.routed || (e.routedBy?.length ?? 0) > 0) && (n[e.name] = e.routedBy ?? []);
2008
2026
  let r = [
@@ -2016,11 +2034,11 @@ function Ea(e) {
2016
2034
  ...(e.outletLevels ?? []).flatMap((e) => [...(e.refinements ?? []).flatMap((e) => e.items ?? []), ...(e.contributions ?? []).flatMap((e) => e.items ?? [])]),
2017
2035
  ...(e.screens ?? []).flatMap((e) => (e.outletContributions ?? []).flatMap((e) => e.items ?? []))
2018
2036
  ], o = {};
2019
- for (let e of Da(a)) e.kind === E.Filter && (o[e.sets?.parameter ?? e.id] = e.sets?.query);
2037
+ for (let e of ka(a)) e.kind === E.Filter && (o[e.sets?.parameter ?? e.id] = e.sets?.query);
2020
2038
  let s = {}, c = {};
2021
2039
  for (let t of e.screens ?? []) {
2022
2040
  s[pe(t.name)] = t.name;
2023
- for (let e of Object.values(t.slotContent ?? {}).flat().flatMap(Oa)) {
2041
+ for (let e of Object.values(t.slotContent ?? {}).flat().flatMap(Aa)) {
2024
2042
  let t = e.properties ?? {};
2025
2043
  e.componentName === "core:slot" && typeof t.shows == "string" && typeof t.name == "string" && (c[t.name] = t.shows);
2026
2044
  }
@@ -2034,19 +2052,19 @@ function Ea(e) {
2034
2052
  slotDefaults: c
2035
2053
  };
2036
2054
  }
2037
- function Da(e) {
2038
- return e.flatMap((e) => e.kind === E.Group ? [e, ...Da(e.items ?? [])] : [e]);
2055
+ function ka(e) {
2056
+ return e.flatMap((e) => e.kind === E.Group ? [e, ...ka(e.items ?? [])] : [e]);
2039
2057
  }
2040
- function Oa(e) {
2058
+ function Aa(e) {
2041
2059
  let t = e.slots ?? {};
2042
- return [e, ...Object.values(t).flat().flatMap(Oa)];
2060
+ return [e, ...Object.values(t).flat().flatMap(Aa)];
2043
2061
  }
2044
- var ka = "@";
2045
- function Aa(e, t) {
2046
- let n = e.indexOf("?"), r = n < 0 ? e : e.slice(0, n), i = n < 0 ? "" : e.slice(n + 1), a = r.split("/").filter((e) => e.length > 0), o = a.findIndex((e) => e.startsWith(ka)), s = (o < 0 ? a : a.slice(0, o)).join("/"), c = {}, l = {};
2062
+ var ja = "@";
2063
+ function Ma(e, t) {
2064
+ let n = e.indexOf("?"), r = n < 0 ? e : e.slice(0, n), i = n < 0 ? "" : e.slice(n + 1), a = r.split("/").filter((e) => e.length > 0), o = a.findIndex((e) => e.startsWith(ja)), s = (o < 0 ? a : a.slice(0, o)).join("/"), c = {}, l = {};
2047
2065
  for (let e = o; e >= 0 && e < a.length;) {
2048
2066
  let n = e + 1;
2049
- for (; n < a.length && !a[n].startsWith(ka);) n++;
2067
+ for (; n < a.length && !a[n].startsWith(ja);) n++;
2050
2068
  let r = decodeURIComponent(a[e].slice(1)), i = a.slice(e + 1, n).join("/"), o = r.indexOf(".");
2051
2069
  if (o > 0) i && (l[r.slice(o + 1)] = decodeURIComponent(i));
2052
2070
  else if (t.routedSlots[r]) {
@@ -2070,14 +2088,14 @@ function Aa(e, t) {
2070
2088
  }
2071
2089
  };
2072
2090
  }
2073
- function ja(e, t, n) {
2074
- let r = e ?? "", i = r.indexOf("?"), a = i < 0 ? r : r.slice(0, i), o = i < 0 ? "" : r.slice(i + 1), s = a.split("/").filter((e) => e.length > 0).map(Ma);
2091
+ function Na(e, t, n) {
2092
+ let r = e ?? "", i = r.indexOf("?"), a = i < 0 ? r : r.slice(0, i), o = i < 0 ? "" : r.slice(i + 1), s = a.split("/").filter((e) => e.length > 0).map(Pa);
2075
2093
  for (let [e, r] of Object.entries(n.routedSlots)) {
2076
2094
  let i = t.slots[e];
2077
- i && s.push(`${ka}${encodeURIComponent(e)}`, ...Re(i, r).split("/").filter((e) => e.length > 0).map(Ma));
2095
+ i && s.push(`${ja}${encodeURIComponent(e)}`, ...Re(i, r).split("/").filter((e) => e.length > 0).map(Pa));
2078
2096
  for (let [r, i] of Object.entries(n.tabSlots)) {
2079
2097
  let n = t.tabs[r];
2080
- i === e && n && s.push(`${ka}${encodeURIComponent(e)}.${encodeURIComponent(r)}`, Ma(encodeURIComponent(n)));
2098
+ i === e && n && s.push(`${ja}${encodeURIComponent(e)}.${encodeURIComponent(r)}`, Pa(encodeURIComponent(n)));
2081
2099
  }
2082
2100
  }
2083
2101
  let c = new URLSearchParams(o);
@@ -2085,20 +2103,20 @@ function ja(e, t, n) {
2085
2103
  let l = c.toString();
2086
2104
  return l ? `${s.join("/")}?${l}` : s.join("/");
2087
2105
  }
2088
- function Ma(e) {
2089
- return e.startsWith(ka) ? `%40${e.slice(1)}` : e;
2106
+ function Pa(e) {
2107
+ return e.startsWith(ja) ? `%40${e.slice(1)}` : e;
2090
2108
  }
2091
- var Na = "sceneNavigation";
2092
- function Pa(e, t, n) {
2093
- let r = () => t === "hash" ? e.location.hash.replace(/^#\/?/, "") : `${e.location.pathname}${e.location.search}`.replace(/^\//, ""), i = (n) => t === "hash" ? `${e.location.pathname}${e.location.search}#/${n}` : `/${n}`, a = () => e.history.state?.[Na], o = (e) => e === void 0 ? void 0 : Aa(e, n).scene, s = Aa(r(), n).route, c, l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = () => l.forEach((e) => e()), f = (t, r, a) => {
2094
- let o = a ? { [Na]: a } : e.history.state, c = i(ja(r, s, n));
2109
+ var Fa = "sceneNavigation";
2110
+ function Ia(e, t, n) {
2111
+ let r = () => t === "hash" ? e.location.hash.replace(/^#\/?/, "") : `${e.location.pathname}${e.location.search}`.replace(/^\//, ""), i = (n) => t === "hash" ? `${e.location.pathname}${e.location.search}#/${n}` : `/${n}`, a = () => e.history.state?.[Fa], o = (e) => e === void 0 ? void 0 : Ma(e, n).scene, s = Ma(r(), n).route, c, l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = () => l.forEach((e) => e()), f = (t, r, a) => {
2112
+ let o = a ? { [Fa]: a } : e.history.state, c = i(Na(r, s, n));
2095
2113
  t === "push" ? e.history.pushState(o, "", c) : e.history.replaceState(o, "", c);
2096
2114
  }, p = (e, t) => {
2097
2115
  e !== s && (s = e, d(), t && f(t, o(r())));
2098
2116
  }, m = () => {
2099
2117
  c = void 0;
2100
- let e = Aa(r(), n), t = Fa(s, e.route, n);
2101
- Ia(t, s) || (s = t, d()), u.forEach((t) => t(e.scene, a()));
2118
+ let e = Ma(r(), n), t = La(s, e.route, n);
2119
+ Ra(t, s) || (s = t, d()), u.forEach((t) => t(e.scene, a()));
2102
2120
  }, h = !1, g = () => {
2103
2121
  h || (h = !0, e.addEventListener("popstate", m), t === "hash" && e.addEventListener("hashchange", m));
2104
2122
  }, _ = () => {
@@ -2133,7 +2151,7 @@ function Pa(e, t, n) {
2133
2151
  }
2134
2152
  };
2135
2153
  }
2136
- function Fa(e, t, n) {
2154
+ function La(e, t, n) {
2137
2155
  let r = Object.fromEntries(Object.entries(e.slots).filter(([e]) => !n.routedSlots[e])), i = Object.fromEntries(Object.entries(e.tabs).filter(([e]) => !n.tabSlots[e]));
2138
2156
  return {
2139
2157
  slots: {
@@ -2147,10 +2165,10 @@ function Fa(e, t, n) {
2147
2165
  query: n.pageRouted ? t.query : e.query
2148
2166
  };
2149
2167
  }
2150
- function Ia(e, t) {
2168
+ function Ra(e, t) {
2151
2169
  return JSON.stringify(e) === JSON.stringify(t);
2152
2170
  }
2153
- function La(e) {
2171
+ function za(e) {
2154
2172
  let t = h(e.subscribe, e.getState, e.getState);
2155
2173
  return f(() => ({
2156
2174
  state: t,
@@ -2160,21 +2178,21 @@ function La(e) {
2160
2178
  setQueryParameter: e.setQueryParameter
2161
2179
  }), [e, t]);
2162
2180
  }
2163
- var Ra = a(Ta);
2164
- function za(e, t, n) {
2181
+ var Ba = a(Da);
2182
+ function Va(e, t, n) {
2165
2183
  return Object.fromEntries(Object.entries(t).filter(([t, r]) => r !== "" && t in e.filters && (e.filters[t] === void 0 || e.filters[t] === n)));
2166
2184
  }
2167
- function Ba(e) {
2168
- let t = c(Ra), n = Ge(), r = JSON.stringify(za(t, n, e));
2185
+ function Ha(e) {
2186
+ let t = c(Ba), n = Ge(), r = JSON.stringify(Va(t, n, e));
2169
2187
  return f(() => JSON.parse(r), [r]);
2170
2188
  }
2171
2189
  // src/stageDialogScreens.ts
2172
- var Va = "Stage:confirmDialog", Ha = "ConfirmDialog";
2173
- function Ua(e, t) {
2190
+ var Ua = "Stage:confirmDialog", Wa = "ConfirmDialog";
2191
+ function Ga(e, t) {
2174
2192
  let n = new Set(t.map((e) => e.name));
2175
2193
  return e.map((t) => {
2176
- if (t.screenTemplate !== Ha || n.has(Ha)) return t;
2177
- let r = Wa(t), i = e.find((e) => e.name !== t.name)?.name, a = R(`confirm-dialog-${t.name}`, Va, {
2194
+ if (t.screenTemplate !== Wa || n.has(Wa)) return t;
2195
+ let r = Ka(t), i = e.find((e) => e.name !== t.name)?.name, a = R(`confirm-dialog-${t.name}`, Ua, {
2178
2196
  title: t.name,
2179
2197
  decisions: r,
2180
2198
  home: i
@@ -2187,38 +2205,38 @@ function Ua(e, t) {
2187
2205
  };
2188
2206
  });
2189
2207
  }
2190
- function Wa(e) {
2208
+ function Ka(e) {
2191
2209
  let t = [];
2192
- for (let n of Ga(Object.values(e.slotContent).flat())) {
2193
- let r = Ka(n.properties.command);
2210
+ for (let n of qa(Object.values(e.slotContent).flat())) {
2211
+ let r = Ja(n.properties.command);
2194
2212
  r && !t.some((e) => e.command === r) && t.push({
2195
2213
  command: r,
2196
- label: Ka(n.properties.label),
2197
- navigateToScreen: Ka(n.properties.navigateToScreen),
2198
- typeName: Ka(n.properties.typeName),
2199
- route: Ka(n.properties.route),
2214
+ label: Ja(n.properties.label),
2215
+ navigateToScreen: Ja(n.properties.navigateToScreen),
2216
+ typeName: Ja(n.properties.typeName),
2217
+ route: Ja(n.properties.route),
2200
2218
  form: e.forms.find((e) => e.forCommand === r)
2201
2219
  });
2202
2220
  }
2203
2221
  return t;
2204
2222
  }
2205
- function Ga(e) {
2223
+ function qa(e) {
2206
2224
  return e.flatMap((e) => {
2207
2225
  let t = e;
2208
- return t.componentName === "core:action" ? [t] : Ga(Object.values(t.slots ?? {}).flat());
2226
+ return t.componentName === "core:action" ? [t] : qa(Object.values(t.slots ?? {}).flat());
2209
2227
  });
2210
2228
  }
2211
- function Ka(e) {
2229
+ function Ja(e) {
2212
2230
  return typeof e == "string" && e !== "" ? e : void 0;
2213
2231
  }
2214
2232
  // src/StageConfirmDialog.tsx
2215
- function qa({ element: e }) {
2216
- let { routes: t, parameters: n, queries: r, selections: i } = W(), [a, o] = m(), s = p(null), c = typeof e.properties.title == "string" ? e.properties.title : "", u = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], d = typeof e.properties.home == "string" ? e.properties.home : void 0, f = u.find((e) => e.command === a), h = Xi(i, r);
2233
+ function Ya({ element: e }) {
2234
+ let { routes: t, parameters: n, queries: r, selections: i } = W(), [a, o] = m(), s = p(null), c = typeof e.properties.title == "string" ? e.properties.title : "", u = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], d = typeof e.properties.home == "string" ? e.properties.home : void 0, f = u.find((e) => e.command === a), h = Qi(i, r);
2217
2235
  return l(() => s.current?.focus(), []), /* @__PURE__ */ V("section", {
2218
2236
  className: "scene-slice-dialog stage-confirm-dialog",
2219
2237
  role: "dialog",
2220
2238
  "aria-label": J(c),
2221
- "data-stage-component": Va,
2239
+ "data-stage-component": Ua,
2222
2240
  children: [
2223
2241
  /* @__PURE__ */ B("header", {
2224
2242
  className: "scene-slice-dialog-header",
@@ -2236,50 +2254,50 @@ function qa({ element: e }) {
2236
2254
  "data-emphasis": t === 0 ? "primary" : "secondary",
2237
2255
  "aria-pressed": e.command === a,
2238
2256
  onClick: () => o(e.command),
2239
- children: Ya(e)
2257
+ children: Za(e)
2240
2258
  }, e.command))
2241
2259
  }),
2242
- f && /* @__PURE__ */ B(mi, { children: /* @__PURE__ */ B(Oi, { element: Qa(f, t?.commandSchemas?.[f.command] ?? "", n, h) }, f.command) }),
2260
+ f && /* @__PURE__ */ B(mi, { children: /* @__PURE__ */ B(Oi, { element: eo(f, t?.commandSchemas?.[f.command] ?? "", n, h) }, f.command) }),
2243
2261
  /* @__PURE__ */ B("footer", {
2244
2262
  className: "scene-slice-dialog-footer",
2245
2263
  children: /* @__PURE__ */ B("button", {
2246
2264
  type: "button",
2247
2265
  className: "scene-slice-dialog-cancel stage-confirm-dialog__cancel",
2248
- onClick: () => Ja(u, d),
2266
+ onClick: () => Xa(u, d),
2249
2267
  children: "Cancel"
2250
2268
  })
2251
2269
  })
2252
2270
  ]
2253
2271
  });
2254
2272
  }
2255
- function Ja(e, t) {
2273
+ function Xa(e, t) {
2256
2274
  let n = new Set(e.map((e) => e.navigateToScreen).filter((e) => !!e)), r = n.size === 1 ? [...n][0] : t;
2257
2275
  r && pn(r, {});
2258
2276
  }
2259
- function Ya(e) {
2277
+ function Za(e) {
2260
2278
  return e.label ?? J(e.command);
2261
2279
  }
2262
- function Xa(e, t, n) {
2263
- return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] || Gi(e, n) !== void 0;
2280
+ function Qa(e, t, n) {
2281
+ return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] || qi(e, n) !== void 0;
2264
2282
  }
2265
- function Za(e, t, n, r) {
2283
+ function $a(e, t, n, r) {
2266
2284
  let i = e.form?.fields ?? [], a = i.length > 0 ? i : t.filter((e) => !e.unsupportedReason).map((e) => ({
2267
2285
  name: e.name,
2268
2286
  label: e.name
2269
- })), o = new Set(t.filter((e) => Xa(e, n, r)).map((e) => e.name)), s = a.filter((e) => !o.has(e.sourceProperty ?? e.name)), c = new Set(s.map((e) => e.sourceProperty ?? e.name)), l = t.filter((e) => e.identifier && e.required && !o.has(e.name) && !c.has(e.name));
2287
+ })), o = new Set(t.filter((e) => Qa(e, n, r)).map((e) => e.name)), s = a.filter((e) => !o.has(e.sourceProperty ?? e.name)), c = new Set(s.map((e) => e.sourceProperty ?? e.name)), l = t.filter((e) => e.identifier && e.required && !o.has(e.name) && !c.has(e.name));
2270
2288
  return [...s, ...l.map((e) => ({
2271
2289
  name: e.name,
2272
2290
  label: J(e.name)
2273
2291
  }))];
2274
2292
  }
2275
- function Qa(e, t, n, r) {
2276
- let i = Za(e, Y(t), n, r);
2293
+ function eo(e, t, n, r) {
2294
+ let i = $a(e, Y(t), n, r);
2277
2295
  return {
2278
2296
  id: `confirm-${e.command}`,
2279
- componentName: Va,
2297
+ componentName: Ua,
2280
2298
  properties: {
2281
2299
  command: e.command,
2282
- label: Ya(e),
2300
+ label: Za(e),
2283
2301
  submitLabel: "Confirm",
2284
2302
  typeName: e.typeName,
2285
2303
  route: e.route,
@@ -2293,13 +2311,13 @@ function Qa(e, t, n, r) {
2293
2311
  slots: {}
2294
2312
  };
2295
2313
  }
2296
- function $a(e) {
2314
+ function to(e) {
2297
2315
  return typeof e == "object" && !!e && !Array.isArray(e);
2298
2316
  }
2299
- function eo(e, t) {
2317
+ function no(e, t) {
2300
2318
  if (!Array.isArray(e) || !Array.isArray(t)) return;
2301
- let n = new Map(e.filter($a).map((e) => [JSON.stringify(e.id), e.column]));
2302
- for (let e of t.filter($a)) {
2319
+ let n = new Map(e.filter(to).map((e) => [JSON.stringify(e.id), e.column]));
2320
+ for (let e of t.filter(to)) {
2303
2321
  let t = JSON.stringify(e.id);
2304
2322
  if (n.has(t) && n.get(t) !== e.column) return {
2305
2323
  item: {
@@ -2310,9 +2328,9 @@ function eo(e, t) {
2310
2328
  };
2311
2329
  }
2312
2330
  }
2313
- function to(e, t, n, r) {
2331
+ function ro(e, t, n, r) {
2314
2332
  if (!Array.isArray(e)) return;
2315
- let i = e.filter($a).find((e) => JSON.stringify(e[n]) === JSON.stringify(t.item.id));
2333
+ let i = e.filter(to).find((e) => JSON.stringify(e[n]) === JSON.stringify(t.item.id));
2316
2334
  if (i !== void 0) return {
2317
2335
  item: {
2318
2336
  ...i,
@@ -2322,11 +2340,11 @@ function to(e, t, n, r) {
2322
2340
  previous: t.previous
2323
2341
  };
2324
2342
  }
2325
- function no(e, t) {
2343
+ function io(e, t) {
2326
2344
  let n = re({ dataContext: { item: e.item } });
2327
2345
  return (r) => r.path === "value" ? e.value : r.path === "previous" ? e.previous : r.path === "item" || r.path?.startsWith("item.") ? n(r) : t(r);
2328
2346
  }
2329
- function ro(e, t) {
2347
+ function ao(e, t) {
2330
2348
  let n = Be(), r = W(), { element: i, rowsProperty: a, idField: o, valueField: c } = e, l = f(() => se(ke(i.id, i.behaviors), C.Change), [i.behaviors, i.id]), u = p(void 0), d = p(!1), [h, g] = m(0), _ = p({
2331
2349
  scope: n,
2332
2350
  data: r,
@@ -2340,14 +2358,14 @@ function ro(e, t) {
2340
2358
  bindings: l
2341
2359
  };
2342
2360
  let v = s((e, t) => {
2343
- let { scope: n, data: r, element: i, bindings: s } = _.current, l = eo(e, t);
2361
+ let { scope: n, data: r, element: i, bindings: s } = _.current, l = no(e, t);
2344
2362
  if (!n || s.length === 0 || l === void 0) return;
2345
- let u = to(i.properties[a], l, o, c);
2363
+ let u = ro(i.properties[a], l, o, c);
2346
2364
  if (u === void 0) return;
2347
2365
  let d = {
2348
2366
  ...n.context,
2349
2367
  subject: () => u.item,
2350
- resolve: no(u, n.context.resolve)
2368
+ resolve: io(u, n.context.resolve)
2351
2369
  }, f = !1, p = !1;
2352
2370
  vn(s, {
2353
2371
  ...n.dispatcher,
@@ -2379,8 +2397,8 @@ function ro(e, t) {
2379
2397
  revision: h
2380
2398
  };
2381
2399
  }
2382
- function io(e) {
2383
- let t = e.element, n = typeof t.properties.cardColumn == "string" ? t.properties.cardColumn : "column", r = ro({
2400
+ function oo(e) {
2401
+ let t = e.element, n = typeof t.properties.cardColumn == "string" ? t.properties.cardColumn : "column", r = ao({
2384
2402
  element: t,
2385
2403
  rowsProperty: "cards",
2386
2404
  idField: typeof t.properties.cardId == "string" ? t.properties.cardId : "id",
@@ -2395,8 +2413,8 @@ function io(e) {
2395
2413
  bindingOutputs: r.outputs
2396
2414
  }, r.revision) : /* @__PURE__ */ B(i, { ...e });
2397
2415
  }
2398
- var ao = Ae(it, I.KanbanBoard), oo = "Stage:commandForm";
2399
- function so(e, t, n = {}) {
2416
+ var so = Ae(it, I.KanbanBoard), co = "Stage:commandForm";
2417
+ function lo(e, t, n = {}) {
2400
2418
  return {
2401
2419
  id: e,
2402
2420
  componentName: "",
@@ -2408,19 +2426,19 @@ function Q(e, t, n = "") {
2408
2426
  let r = e.properties[t];
2409
2427
  return typeof r == "string" ? r : n;
2410
2428
  }
2411
- function co(e, t, n) {
2429
+ function uo(e, t, n) {
2412
2430
  let r = typeof e == "number" && Number.isInteger(e) ? n && n.length === t?.length ? t?.[n.indexOf(e)] : t?.[e] : e;
2413
- return typeof r == "string" && t?.includes(r) ? J(r) : ya(e) ?? String(e ?? "");
2431
+ return typeof r == "string" && t?.includes(r) ? J(r) : xa(e) ?? String(e ?? "");
2414
2432
  }
2415
- function lo(e, t) {
2433
+ function fo(e, t) {
2416
2434
  let n = e.properties.queryArguments;
2417
- if (!go(n)) return {
2435
+ if (!vo(n)) return {
2418
2436
  values: {},
2419
2437
  ready: !0
2420
2438
  };
2421
2439
  let r = {}, i = !0;
2422
2440
  for (let [e, a] of Object.entries(n)) {
2423
- let n = ho(a) ? t.resolveBinding(a) : a;
2441
+ let n = _o(a) ? t.resolveBinding(a) : a;
2424
2442
  r[e] = n, (n == null || n === "") && (i = !1);
2425
2443
  }
2426
2444
  return {
@@ -2428,7 +2446,7 @@ function lo(e, t) {
2428
2446
  ready: i
2429
2447
  };
2430
2448
  }
2431
- function uo(e, t) {
2449
+ function po(e, t) {
2432
2450
  let n = (e.slots.columns ?? []).map((e) => {
2433
2451
  let t = e.properties;
2434
2452
  return {
@@ -2443,12 +2461,12 @@ function uo(e, t) {
2443
2461
  }));
2444
2462
  return n.length > 0 ? n : r;
2445
2463
  }
2446
- function fo(e, t) {
2464
+ function mo(e, t) {
2447
2465
  return e[t] ?? e.id ?? e.key;
2448
2466
  }
2449
- function po({ element: e, slots: t }) {
2450
- let n = W(), r = Q(e, "query", Q(e, "typeName", e.id)), i = (Q(e, "query") ? n.routes?.queries?.[Q(e, "query")] : void 0) ?? Q(e, "route"), a = Ba(Q(e, "query") || void 0), o = f(() => {
2451
- let t = lo(e, n);
2467
+ function ho({ element: e, slots: t }) {
2468
+ let n = W(), r = Q(e, "query", Q(e, "typeName", e.id)), i = (Q(e, "query") ? n.routes?.queries?.[Q(e, "query")] : void 0) ?? Q(e, "route"), a = Ha(Q(e, "query") || void 0), o = f(() => {
2469
+ let t = fo(e, n);
2452
2470
  return {
2453
2471
  ...t,
2454
2472
  values: {
@@ -2466,10 +2484,10 @@ function po({ element: e, slots: t }) {
2466
2484
  route: i || void 0,
2467
2485
  arguments: o.values,
2468
2486
  ready: o.ready
2469
- }), p = uo(e, s), m = Q(e, "navigateOnRowClickToScreen"), h = Q(e, "navigateOnRowClickByParameter"), g = Q(e, "dataKey") || h || "id", _ = n.selections[e.id], v = h ? n.parameters[h] : void 0, y = wa(e);
2487
+ }), p = po(e, s), m = Q(e, "navigateOnRowClickToScreen"), h = Q(e, "navigateOnRowClickByParameter"), g = Q(e, "dataKey") || h || "id", _ = n.selections[e.id], v = h ? n.parameters[h] : void 0, y = Ea(e), b = (u || d) && s.length === 0 && !c;
2470
2488
  l(() => {
2471
2489
  if (!_) return;
2472
- let t = fo(_, g), r = t === void 0 ? void 0 : s.find((e) => fo(e, g) === t);
2490
+ let t = mo(_, g), r = t === void 0 ? void 0 : s.find((e) => mo(e, g) === t);
2473
2491
  r && r !== _ ? n.selectRow(e.id, r) : !r && t !== void 0 && !u && n.clearSelection(e.id);
2474
2492
  }, [
2475
2493
  n,
@@ -2484,8 +2502,8 @@ function po({ element: e, slots: t }) {
2484
2502
  _ && n.clearSelection(e.id);
2485
2503
  return;
2486
2504
  }
2487
- if (_ && String(fo(_, g)) === v) return;
2488
- let t = s.find((e) => String(fo(e, g)) === v);
2505
+ if (_ && String(mo(_, g)) === v) return;
2506
+ let t = s.find((e) => String(mo(e, g)) === v);
2489
2507
  t && n.selectRow(e.id, t);
2490
2508
  }, [
2491
2509
  n,
@@ -2496,8 +2514,8 @@ function po({ element: e, slots: t }) {
2496
2514
  s,
2497
2515
  _
2498
2516
  ]);
2499
- let b = (t) => {
2500
- let r = fo(t, g);
2517
+ let x = (t) => {
2518
+ let r = mo(t, g);
2501
2519
  if (h && r != null) {
2502
2520
  let i = {
2503
2521
  ...m && m !== n.screen ? {} : n.parameters,
@@ -2521,7 +2539,7 @@ function po({ element: e, slots: t }) {
2521
2539
  className: "stage-table",
2522
2540
  "data-scene-id": e.id,
2523
2541
  children: [
2524
- (u || d) && /* @__PURE__ */ B(Ct, {
2542
+ b && /* @__PURE__ */ B(Ct, {
2525
2543
  severity: "info",
2526
2544
  text: "Loading…"
2527
2545
  }),
@@ -2547,13 +2565,13 @@ function po({ element: e, slots: t }) {
2547
2565
  }, e.property)) }) }), /* @__PURE__ */ V("tbody", { children: [s.map((e, t) => /* @__PURE__ */ B("tr", {
2548
2566
  "aria-selected": _ === e,
2549
2567
  tabIndex: 0,
2550
- onClick: () => y.click(e, () => b(e)),
2568
+ onClick: () => y.click(e, () => x(e)),
2551
2569
  onDoubleClick: y.doubleClick ? () => y.doubleClick?.(e) : void 0,
2552
2570
  onKeyDown: (t) => {
2553
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), b(e));
2571
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), x(e));
2554
2572
  },
2555
- children: p.map((t) => /* @__PURE__ */ B("td", { children: co(e[t.property], t.options, t.optionValues) }, t.property))
2556
- }, String(fo(e, g) ?? t))), /* @__PURE__ */ B(mo, {
2573
+ children: p.map((t) => /* @__PURE__ */ B("td", { children: uo(e[t.property], t.options, t.optionValues) }, t.property))
2574
+ }, String(mo(e, g) ?? t))), /* @__PURE__ */ B(go, {
2557
2575
  rowCount: s.length,
2558
2576
  columnCount: p.length,
2559
2577
  loading: u,
@@ -2563,30 +2581,30 @@ function po({ element: e, slots: t }) {
2563
2581
  ]
2564
2582
  });
2565
2583
  }
2566
- function mo({ rowCount: e, columnCount: t, loading: n, awaitingCommand: r }) {
2584
+ function go({ rowCount: e, columnCount: t, loading: n, awaitingCommand: r }) {
2567
2585
  return e !== 0 || n || r ? null : /* @__PURE__ */ B("tr", { children: /* @__PURE__ */ B("td", {
2568
2586
  colSpan: Math.max(t, 1),
2569
2587
  children: "No records found"
2570
2588
  }) });
2571
2589
  }
2572
- function ho(e) {
2573
- return go(e) && (typeof e.path == "string" || typeof e.kind == "string");
2590
+ function _o(e) {
2591
+ return vo(e) && (typeof e.path == "string" || typeof e.kind == "string");
2574
2592
  }
2575
- function go(e) {
2593
+ function vo(e) {
2576
2594
  return typeof e == "object" && !!e && !Array.isArray(e);
2577
2595
  }
2578
- function _o({ element: e, interactions: t, slots: n }) {
2596
+ function yo({ element: e, interactions: t, slots: n }) {
2579
2597
  return Dn(e) ? /* @__PURE__ */ B(On, {
2580
2598
  element: e,
2581
2599
  interactions: t
2582
- }) : /* @__PURE__ */ B(xo, {
2600
+ }) : /* @__PURE__ */ B(Co, {
2583
2601
  element: e,
2584
2602
  interactions: t,
2585
2603
  slots: n
2586
2604
  });
2587
2605
  }
2588
- function vo(e) {
2589
- let { routes: t, parameters: n } = W(), r = Q(e, "schema") || t?.commandSchemas?.[Q(e, "command")], i = t?.commandSchemas?.[Q(e, "command")], a = f(() => Y(r ?? "", i), [r, i]), o = Hr(e), s = Ur(e, r), { selectableRows: c, selectedRows: l } = hi(), u = Q(e, "generationMode").toLowerCase() !== "manual", d = yo(e, o, s, u), p = u ? bo(e, r, a, n, o, s ? [] : c) : {};
2606
+ function bo(e) {
2607
+ let { routes: t, parameters: n } = W(), r = Q(e, "schema") || t?.commandSchemas?.[Q(e, "command")], i = t?.commandSchemas?.[Q(e, "command")], a = f(() => Y(r ?? "", i), [r, i]), o = Hr(e), s = Ur(e, r), { selectableRows: c, selectedRows: l } = hi(), u = Q(e, "generationMode").toLowerCase() !== "manual", d = xo(e, o, s, u), p = u ? So(e, r, a, n, o, s ? [] : c) : {};
2590
2608
  return {
2591
2609
  element: {
2592
2610
  ...e,
@@ -2603,21 +2621,21 @@ function vo(e) {
2603
2621
  selectedRows: l
2604
2622
  };
2605
2623
  }
2606
- function yo(e, t, n, r) {
2624
+ function xo(e, t, n, r) {
2607
2625
  return n || t !== void 0 ? !1 : r || e.properties.rowAction === !0;
2608
2626
  }
2609
- function bo(e, t, n, r, i, a) {
2627
+ function So(e, t, n, r, i, a) {
2610
2628
  let o = e.properties.fields;
2611
- if (!Array.isArray(o) || o.length === 0) return Ro(t, n, r, i, a);
2629
+ if (!Array.isArray(o) || o.length === 0) return Bo(t, n, r, i, a);
2612
2630
  if (a.length === 0 || i === "screen" || i === void 0 && e.properties.rowAction !== !0 && n.filter((e) => e.identifier).length > 1) return {};
2613
- let s = new Set(n.filter((e) => Io(e, i, a)).map((e) => e.name));
2631
+ let s = new Set(n.filter((e) => Ro(e, i, a)).map((e) => e.name));
2614
2632
  return {
2615
- fields: o.filter((e) => !s.has(wo(e))),
2633
+ fields: o.filter((e) => !s.has(Eo(e))),
2616
2634
  generationMode: "manual"
2617
2635
  };
2618
2636
  }
2619
- function xo({ element: e, interactions: t }) {
2620
- let { element: n, subject: r, properties: i, selectedRows: a } = vo(e), o = Q(n, "label") || J(Q(n, "command")), s = on(Q(n, "command"), Q(n, "typeName"), Q(n, "route")), c = So(n, r), l = Wr(r, a);
2637
+ function Co({ element: e, interactions: t }) {
2638
+ let { element: n, subject: r, properties: i, selectedRows: a } = bo(e), o = Q(n, "label") || J(Q(n, "command")), s = on(Q(n, "command"), Q(n, "typeName"), Q(n, "route")), c = wo(n, r), l = Wr(r, a);
2621
2639
  return s ? c.length > 0 || Gr(r, l) ? /* @__PURE__ */ B(H, {
2622
2640
  type: "button",
2623
2641
  "data-scene-id": n.id,
@@ -2625,7 +2643,7 @@ function xo({ element: e, interactions: t }) {
2625
2643
  title: "Select a row first",
2626
2644
  ...t,
2627
2645
  children: o
2628
- }) : /* @__PURE__ */ B(Eo, {
2646
+ }) : /* @__PURE__ */ B(Oo, {
2629
2647
  element: l ? Yr(n, i, l) : n,
2630
2648
  label: o
2631
2649
  }) : /* @__PURE__ */ B(H, {
@@ -2637,23 +2655,23 @@ function xo({ element: e, interactions: t }) {
2637
2655
  children: o
2638
2656
  });
2639
2657
  }
2640
- function So(e, t) {
2641
- let { parameters: n, routes: r } = W(), i = Q(e, "schema"), a = e.properties.fields, o = r?.commandSchemas?.[Q(e, "command")], s = f(() => Y(i, o), [i, o]), { selectableRows: c, selectedRows: l } = hi(), u = Array.isArray(a) ? a : [], d = Co(e, u) ? new Set(u.map(wo).filter((e) => e !== "")) : void 0;
2642
- return !d || t !== void 0 || Ur(e, i) ? [] : Zi(s.filter((e) => !d.has(e.name)), n, l, c);
2658
+ function wo(e, t) {
2659
+ let { parameters: n, routes: r } = W(), i = Q(e, "schema"), a = e.properties.fields, o = r?.commandSchemas?.[Q(e, "command")], s = f(() => Y(i, o), [i, o]), { selectableRows: c, selectedRows: l } = hi(), u = Array.isArray(a) ? a : [], d = To(e, u) ? new Set(u.map(Eo).filter((e) => e !== "")) : void 0;
2660
+ return !d || t !== void 0 || Ur(e, i) ? [] : $i(s.filter((e) => !d.has(e.name)), n, l, c);
2643
2661
  }
2644
- function Co(e, t) {
2662
+ function To(e, t) {
2645
2663
  return t.length > 0 || e.properties.rowAction === !0 || Q(e, "generationMode").toLowerCase() === "manual";
2646
2664
  }
2647
- function wo(e) {
2648
- return go(e) ? typeof e.sourceProperty == "string" && e.sourceProperty !== "" ? e.sourceProperty : typeof e.name == "string" ? e.name : "" : "";
2665
+ function Eo(e) {
2666
+ return vo(e) ? typeof e.sourceProperty == "string" && e.sourceProperty !== "" ? e.sourceProperty : typeof e.name == "string" ? e.name : "" : "";
2649
2667
  }
2650
- function To(e) {
2668
+ function Do(e) {
2651
2669
  let t = (e?.parentElement?.classList.contains("stage-toolbar-action") ? e.parentElement : e)?.previousElementSibling;
2652
2670
  return t?.classList.contains("stage-action") === !0 || t?.classList.contains("stage-toolbar-action") === !0;
2653
2671
  }
2654
- function Eo({ element: e, label: t }) {
2672
+ function Oo({ element: e, label: t }) {
2655
2673
  let [n, r] = m(0), [i, a] = m(!1), [o, c] = m(!1), l = p(null);
2656
- d(() => c(To(l.current)));
2674
+ d(() => c(Do(l.current)));
2657
2675
  let u = s(() => {
2658
2676
  a(!1), r((e) => e + 1);
2659
2677
  }, []), f = /* @__PURE__ */ B(wi.Provider, {
@@ -2683,20 +2701,20 @@ function Eo({ element: e, label: t }) {
2683
2701
  })]
2684
2702
  });
2685
2703
  }
2686
- function Do(e) {
2687
- let t = e.element ?? so("slice-dialog", {}), n = Ve(), r = ze(n?.currentDialogParameters);
2704
+ function ko(e) {
2705
+ let t = e.element ?? lo("slice-dialog", {}), n = Ve(), r = ze(n?.currentDialogParameters);
2688
2706
  return /* @__PURE__ */ B(Sr, {
2689
2707
  slice: Q(t, "slice") || r?.slice || Q(t, "command") || r?.command,
2690
- children: /* @__PURE__ */ B(Oo, { ...e })
2708
+ children: /* @__PURE__ */ B(Ao, { ...e })
2691
2709
  });
2692
2710
  }
2693
- function Oo(e) {
2694
- let t = e.element ?? so("slice-dialog", {}), n = Ve(), { routes: r, parameters: i } = W(), a = ze(n?.currentDialogParameters), o = Q(t, "command") || a?.command || Q(t, "slice") || "", c = Q(t, "title") || a?.title || J(o), l = r?.commandSchemas?.[o], u = f(() => Y(l ?? ""), [l]), { selectableRows: d, selectedRows: p } = hi(), h = s(() => n?.closeDialog(), [n]), [g, _] = m(null), v = (e) => e.identifier && e.required && Ki(e, d) && Gi(e, p) !== void 0;
2711
+ function Ao(e) {
2712
+ let t = e.element ?? lo("slice-dialog", {}), n = Ve(), { routes: r, parameters: i } = W(), a = ze(n?.currentDialogParameters), o = Q(t, "command") || a?.command || Q(t, "slice") || "", c = Q(t, "title") || a?.title || J(o), l = r?.commandSchemas?.[o], u = f(() => Y(l ?? ""), [l]), { selectableRows: d, selectedRows: p } = hi(), h = s(() => n?.closeDialog(), [n]), [g, _] = m(null), v = (e) => e.identifier && e.required && Ji(e, d) && qi(e, p) !== void 0;
2695
2713
  if (!l || !(u.some((e) => e.options || e.members || e.item) || u.some(v))) return e.element ? /* @__PURE__ */ B(_e, {
2696
2714
  element: e.element,
2697
2715
  slots: e.slots ?? {}
2698
2716
  }) : /* @__PURE__ */ B(De, {});
2699
- let y = u.filter((e) => !Ui(e, i) && !v(e)), b = so(`slice-dialog-${o}`, {
2717
+ let y = u.filter((e) => !Gi(e, i) && !v(e)), b = lo(`slice-dialog-${o}`, {
2700
2718
  command: o,
2701
2719
  label: c,
2702
2720
  schema: l,
@@ -2738,8 +2756,8 @@ function Oo(e) {
2738
2756
  ]
2739
2757
  });
2740
2758
  }
2741
- var ko = "core:toolbarItem";
2742
- function Ao({ element: e }) {
2759
+ var jo = "core:toolbarItem";
2760
+ function Mo({ element: e }) {
2743
2761
  let t = {
2744
2762
  kind: "button",
2745
2763
  id: Q(e, "name", e.id),
@@ -2756,19 +2774,19 @@ function Ao({ element: e }) {
2756
2774
  elementId: e.id
2757
2775
  }) : null;
2758
2776
  }
2759
- function jo(e) {
2777
+ function No(e) {
2760
2778
  let { element: t } = e, n = We(), r = f(() => Ie(t.id, t.properties, n), [
2761
2779
  n,
2762
2780
  t.id,
2763
2781
  t.properties
2764
2782
  ]);
2765
- return !r || r.kind !== D.Actions || !r.items.some((e) => No(t.id, e.item)) ? /* @__PURE__ */ B(ge, { ...e }) : /* @__PURE__ */ B("div", {
2783
+ return !r || r.kind !== D.Actions || !r.items.some((e) => Fo(t.id, e.item)) ? /* @__PURE__ */ B(ge, { ...e }) : /* @__PURE__ */ B("div", {
2766
2784
  className: "stage-toolbar",
2767
2785
  role: "toolbar",
2768
2786
  "aria-label": r.name,
2769
2787
  "data-scene-id": t.id,
2770
2788
  "data-scene-outlet": r.name,
2771
- children: Mo(r.items, (e) => No(t.id, e.item)).map((n) => {
2789
+ children: Po(r.items, (e) => Fo(t.id, e.item)).map((n) => {
2772
2790
  let i = (e) => /* @__PURE__ */ B(be, {
2773
2791
  outlet: {
2774
2792
  ...r,
@@ -2778,7 +2796,7 @@ function jo(e) {
2778
2796
  item: t.properties.item,
2779
2797
  elementId: `${t.id}.${e[0].item.id}`
2780
2798
  }, e[0].item.id);
2781
- return n.stage ? /* @__PURE__ */ B(Po, {
2799
+ return n.stage ? /* @__PURE__ */ B(Io, {
2782
2800
  element: n.stage,
2783
2801
  slots: {},
2784
2802
  interactions: e.interactions,
@@ -2787,7 +2805,7 @@ function jo(e) {
2787
2805
  })
2788
2806
  });
2789
2807
  }
2790
- function Mo(e, t) {
2808
+ function Po(e, t) {
2791
2809
  let n = [];
2792
2810
  for (let r of e) {
2793
2811
  let e = t(r), i = n.at(-1);
@@ -2798,12 +2816,12 @@ function Mo(e, t) {
2798
2816
  }
2799
2817
  return n;
2800
2818
  }
2801
- function No(e, t) {
2819
+ function Fo(e, t) {
2802
2820
  if (t.kind !== "button") return;
2803
2821
  let n = t;
2804
2822
  if (!(n.navigateTo || n.builtIn !== void 0 || !n.slice && !n.command) && n.opens !== T.None && n.opens !== T.Drawer && n.opens !== T.Slot) return {
2805
2823
  id: `${e}.${n.id}`,
2806
- componentName: ko,
2824
+ componentName: jo,
2807
2825
  properties: {
2808
2826
  name: n.id,
2809
2827
  kind: "Action",
@@ -2821,13 +2839,13 @@ function No(e, t) {
2821
2839
  slots: {}
2822
2840
  };
2823
2841
  }
2824
- function Po(e) {
2842
+ function Io(e) {
2825
2843
  let { element: t } = e;
2826
- return Q(t, "slice") === "" ? /* @__PURE__ */ B(Lo, { ...e }) : /* @__PURE__ */ B(Fo, { ...e });
2844
+ return Q(t, "slice") === "" ? /* @__PURE__ */ B(zo, { ...e }) : /* @__PURE__ */ B(Lo, { ...e });
2827
2845
  }
2828
- function Fo(e) {
2846
+ function Lo(e) {
2829
2847
  let { element: t } = e, { routes: n, parameters: r } = W(), i = Q(t, "slice"), a = Q(t, "command") || i.split(".").at(-1) || "", o = n?.commandSchemas?.[a], s = f(() => Y(o ?? ""), [o]), { selectableRows: c, selectedRows: l } = hi();
2830
- if ((kr(o ?? "") ? [] : Zi(s, r, l, c)).length === 0) return /* @__PURE__ */ B(z, { children: e.fallback ?? /* @__PURE__ */ B(Ao, { element: t }) });
2848
+ if ((kr(o ?? "") ? [] : $i(s, r, l, c)).length === 0) return /* @__PURE__ */ B(z, { children: e.fallback ?? /* @__PURE__ */ B(Mo, { element: t }) });
2831
2849
  let u = Q(t, "label", Q(t, "name", t.id));
2832
2850
  return /* @__PURE__ */ B("span", {
2833
2851
  className: "stage-toolbar-action",
@@ -2842,11 +2860,11 @@ function Fo(e) {
2842
2860
  })
2843
2861
  });
2844
2862
  }
2845
- function Io(e, t, n) {
2846
- return t !== "screen" && !!e.identifier && e.required && Ki(e, n);
2863
+ function Ro(e, t, n) {
2864
+ return t !== "screen" && !!e.identifier && e.required && Ji(e, n);
2847
2865
  }
2848
- function Lo(e) {
2849
- let { element: t } = e, { routes: n, parameters: r } = W(), i = Q(t, "name", t.id), a = Q(t, "target"), o = Q(t, "label", i), s = n?.commandSchemas?.[a], c = f(() => Y(s ?? ""), [s]), l = Hr(t), u = f(() => l === void 0 && kr(s ?? ""), [s, l]), { selectableRows: d, selectedRows: p } = hi(), m = u ? [] : d, h = l === void 0 && !u ? Zi(c, r, p, m) : [], g = Ro(s, c, r, l, m), _ = u ? { createsEntity: !0 } : qr(t, l), v = {
2866
+ function zo(e) {
2867
+ let { element: t } = e, { routes: n, parameters: r } = W(), i = Q(t, "name", t.id), a = Q(t, "target"), o = Q(t, "label", i), s = n?.commandSchemas?.[a], c = f(() => Y(s ?? ""), [s]), l = Hr(t), u = f(() => l === void 0 && kr(s ?? ""), [s, l]), { selectableRows: d, selectedRows: p } = hi(), m = u ? [] : d, h = l === void 0 && !u ? $i(c, r, p, m) : [], g = Bo(s, c, r, l, m), _ = u ? { createsEntity: !0 } : qr(t, l), v = {
2850
2868
  ...t,
2851
2869
  componentName: "core:action",
2852
2870
  properties: {
@@ -2867,37 +2885,37 @@ function Lo(e) {
2867
2885
  title: "Select a row first",
2868
2886
  ...e.interactions,
2869
2887
  children: o
2870
- }) : /* @__PURE__ */ B(_o, {
2888
+ }) : /* @__PURE__ */ B(yo, {
2871
2889
  element: v,
2872
2890
  interactions: e.interactions,
2873
2891
  slots: e.slots
2874
2892
  })
2875
2893
  });
2876
2894
  }
2877
- function Ro(e, t, n, r, i) {
2895
+ function Bo(e, t, n, r, i) {
2878
2896
  return e ? {
2879
2897
  schema: e,
2880
- fields: t.filter((e) => !Ui(e, n) && !Io(e, r, i)).map((e) => ({
2898
+ fields: t.filter((e) => !Gi(e, n) && !Ro(e, r, i)).map((e) => ({
2881
2899
  name: e.name,
2882
2900
  label: J(e.name)
2883
2901
  })),
2884
2902
  generationMode: "manual"
2885
2903
  } : {};
2886
2904
  }
2887
- var zo = {
2905
+ var Vo = {
2888
2906
  ...je,
2889
- "core:table": po,
2890
- "core:action": _o,
2907
+ "core:table": ho,
2908
+ "core:action": yo,
2891
2909
  "core:guarded-action": On,
2892
- "core:outletItems": jo,
2893
- [ko]: Po,
2894
- "core:sliceDialog": Do,
2895
- [oo]: Oi,
2896
- [Va]: qa,
2897
- [ao]: io
2910
+ "core:outletItems": No,
2911
+ [jo]: Io,
2912
+ "core:sliceDialog": ko,
2913
+ [co]: Oi,
2914
+ [Ua]: Ya,
2915
+ [so]: oo
2898
2916
  };
2899
2917
  // src/useStrings.ts
2900
- function Bo() {
2918
+ function Ho() {
2901
2919
  let e = U(), [t, n] = m([]), [r, i] = m(""), [a, o] = m({});
2902
2920
  return l(() => {
2903
2921
  let t = new AbortController();
@@ -2919,11 +2937,11 @@ function Bo() {
2919
2937
  dictionary: a
2920
2938
  };
2921
2939
  }
2922
- var Vo = /* @__PURE__ */ new Set(["core:table"]);
2923
- function Ho(e) {
2924
- return Uo(e, /* @__PURE__ */ new Map(), void 0);
2940
+ var Uo = /* @__PURE__ */ new Set(["core:table"]);
2941
+ function Wo(e) {
2942
+ return Go(e, /* @__PURE__ */ new Map(), void 0);
2925
2943
  }
2926
- function Uo(e, t, n) {
2944
+ function Go(e, t, n) {
2927
2945
  let r = e;
2928
2946
  if (!r.slots) return e;
2929
2947
  let i = !1, a = {};
@@ -2932,7 +2950,7 @@ function Uo(e, t, n) {
2932
2950
  a[e] = o.map((e) => {
2933
2951
  let t = e, n = $(t, "typeName");
2934
2952
  t.componentName === "core:data" && n && (r.set(n, t), s = t);
2935
- let a = Uo(Go(Wo(t, r), s), r, s);
2953
+ let a = Go(qo(Ko(t, r), s), r, s);
2936
2954
  return a !== e && (i = !0), a;
2937
2955
  });
2938
2956
  }
@@ -2941,8 +2959,8 @@ function Uo(e, t, n) {
2941
2959
  slots: a
2942
2960
  } : e;
2943
2961
  }
2944
- function Wo(e, t) {
2945
- if (!Vo.has(e.componentName)) return e;
2962
+ function Ko(e, t) {
2963
+ if (!Uo.has(e.componentName)) return e;
2946
2964
  let n = $(e, "typeName"), r = n ? t.get(n) : void 0;
2947
2965
  if (!r || e.properties.queryArguments !== void 0) return e;
2948
2966
  let i = $(r, "by"), a = { ...e.properties }, o = $(r, "query");
@@ -2951,7 +2969,7 @@ function Wo(e, t) {
2951
2969
  properties: a
2952
2970
  };
2953
2971
  }
2954
- function Go(e, t) {
2972
+ function qo(e, t) {
2955
2973
  if (!["core:guarded-action", "core:action"].includes(e.componentName) || !Array.isArray(e.properties?.alternatives) || !t || e.properties.itemQuery !== void 0) return e;
2956
2974
  let n = { ...e.properties };
2957
2975
  if (t.properties?.isCollection === !0) return n.itemSelection = !0, {
@@ -2969,7 +2987,7 @@ function $(e, t) {
2969
2987
  return typeof n == "string" && n.length > 0 ? n : void 0;
2970
2988
  }
2971
2989
  // src/stageQueryBindings.tsx
2972
- function Ko(e) {
2990
+ function Jo(e) {
2973
2991
  let t = /* @__PURE__ */ new Set(), n = (e) => {
2974
2992
  if (Array.isArray(e)) {
2975
2993
  e.forEach(n);
@@ -2985,7 +3003,7 @@ function Ko(e) {
2985
3003
  };
2986
3004
  return r(e), [...t];
2987
3005
  }
2988
- function qo(e) {
3006
+ function Yo(e) {
2989
3007
  let t = /* @__PURE__ */ new Map(), n = (e, t) => {
2990
3008
  let n = e.properties?.[t];
2991
3009
  return typeof n == "string" && n.length > 0 ? n : void 0;
@@ -3004,8 +3022,8 @@ function qo(e) {
3004
3022
  };
3005
3023
  return r(e), [...t.values()];
3006
3024
  }
3007
- function Jo({ source: e }) {
3008
- let { routes: t, routesReady: n, parameters: r, session: i } = W(), a = e.by ? r[e.by] || i[e.by] : void 0, o = Ba(e.query), s = f(() => ({
3025
+ function Xo({ source: e }) {
3026
+ let { routes: t, routesReady: n, parameters: r, session: i } = W(), a = e.by ? r[e.by] || i[e.by] : void 0, o = Ha(e.query), s = f(() => ({
3009
3027
  ...o,
3010
3028
  ...e.by ? a ? { [e.by]: a } : {} : {
3011
3029
  ...i,
@@ -3028,8 +3046,8 @@ function Jo({ source: e }) {
3028
3046
  list: !0
3029
3047
  }), null;
3030
3048
  }
3031
- function Yo({ name: e }) {
3032
- let { routes: t, routesReady: n, parameters: r, session: i } = W(), a = Ba(e), o = f(() => ({
3049
+ function Zo({ name: e }) {
3050
+ let { routes: t, routesReady: n, parameters: r, session: i } = W(), a = Ha(e), o = f(() => ({
3033
3051
  ...a,
3034
3052
  ...i,
3035
3053
  ...r
@@ -3047,59 +3065,59 @@ function Yo({ name: e }) {
3047
3065
  list: !0
3048
3066
  }), null;
3049
3067
  }
3050
- function Xo({ element: e }) {
3051
- let t = f(() => Ko(e), [e]), n = f(() => qo(e), [e]);
3052
- return /* @__PURE__ */ V(z, { children: [t.map((e) => /* @__PURE__ */ B(Yo, { name: e }, e)), n.map((e) => /* @__PURE__ */ B(Jo, { source: e }, e.typeName))] });
3068
+ function Qo({ element: e }) {
3069
+ let t = f(() => Jo(e), [e]), n = f(() => Yo(e), [e]);
3070
+ return /* @__PURE__ */ V(z, { children: [t.map((e) => /* @__PURE__ */ B(Zo, { name: e }, e)), n.map((e) => /* @__PURE__ */ B(Xo, { source: e }, e.typeName))] });
3053
3071
  }
3054
3072
  // src/stageThemeChoice.ts
3055
- var Zo = "cratis.stage.theme";
3056
- function Qo() {
3073
+ var $o = "cratis.stage.theme";
3074
+ function es() {
3057
3075
  try {
3058
3076
  return globalThis.localStorage ?? null;
3059
3077
  } catch {
3060
3078
  return null;
3061
3079
  }
3062
3080
  }
3063
- function $o() {
3081
+ function ts() {
3064
3082
  try {
3065
- return Qo()?.getItem("cratis.stage.theme") || void 0;
3083
+ return es()?.getItem("cratis.stage.theme") || void 0;
3066
3084
  } catch {
3067
3085
  return;
3068
3086
  }
3069
3087
  }
3070
- function es(e) {
3088
+ function ns(e) {
3071
3089
  try {
3072
- Qo()?.setItem(Zo, e);
3090
+ es()?.setItem($o, e);
3073
3091
  } catch {}
3074
3092
  }
3075
3093
  // src/screenTitle.ts
3076
- var ts = "core:title", ns = ["content", "main"];
3077
- function rs(e) {
3094
+ var rs = "core:title", is = ["content", "main"];
3095
+ function as(e) {
3078
3096
  let t = e;
3079
- if (t.componentName !== ts) return;
3097
+ if (t.componentName !== rs) return;
3080
3098
  let n = t.properties?.text;
3081
3099
  return typeof n == "string" && n.trim().length > 0 ? n : void 0;
3082
3100
  }
3083
- function is(e) {
3101
+ function os(e) {
3084
3102
  for (let t of e ?? []) {
3085
- let e = rs(t);
3103
+ let e = as(t);
3086
3104
  if (e !== void 0) return e;
3087
3105
  }
3088
3106
  }
3089
- function as(e) {
3090
- let t = e.slotContent ?? {}, n = [...ns, ...Object.keys(t).filter((e) => !ns.includes(e))];
3107
+ function ss(e) {
3108
+ let t = e.slotContent ?? {}, n = [...is, ...Object.keys(t).filter((e) => !is.includes(e))];
3091
3109
  for (let e of n) {
3092
- let n = is(t[e]);
3110
+ let n = os(t[e]);
3093
3111
  if (n !== void 0) return n;
3094
3112
  }
3095
3113
  return Er(e.name);
3096
3114
  }
3097
- function os(e) {
3115
+ function cs(e) {
3098
3116
  let t = /* @__PURE__ */ new Set(), n = [];
3099
3117
  for (let r of e.flatMap((e) => e.contributions ?? [])) {
3100
- let e = cs(r);
3118
+ let e = us(r);
3101
3119
  if (!e) continue;
3102
- let i = us(e);
3120
+ let i = fs(e);
3103
3121
  t.has(i) || (t.add(i), n.push(e));
3104
3122
  }
3105
3123
  return n.map((e, t) => ({
@@ -3107,47 +3125,47 @@ function os(e) {
3107
3125
  index: t
3108
3126
  })).sort((e, t) => (e.entry.order ?? 2 ** 53 - 1) - (t.entry.order ?? 2 ** 53 - 1) || e.index - t.index).map(({ entry: e }) => e);
3109
3127
  }
3110
- function ss(e) {
3128
+ function ls(e) {
3111
3129
  let t = {
3112
3130
  label: "",
3113
3131
  children: []
3114
3132
  };
3115
3133
  for (let n of e) {
3116
- let e = n.hierarchy.reduce((e, t) => ds(e, t, !1), t);
3117
- (n.group ? ds(e, n.group, !0) : e).children.push(fs(n));
3134
+ let e = n.hierarchy.reduce((e, t) => ps(e, t, !1), t);
3135
+ (n.group ? ps(e, n.group, !0) : e).children.push(ms(n));
3118
3136
  }
3119
3137
  return t.children;
3120
3138
  }
3121
- function cs(e) {
3139
+ function us(e) {
3122
3140
  if (e.contributionPointName !== "Navigation") return;
3123
3141
  let t = e.content?.properties ?? {}, n = t.label, r = t.targetScreen;
3124
3142
  if (typeof n != "string" || typeof r != "string") return;
3125
- let i = ls(t), a = e.order ?? (typeof t.order == "number" ? t.order : void 0), o = t.destination;
3143
+ let i = ds(t), a = e.order ?? (typeof t.order == "number" ? t.order : void 0), o = t.destination;
3126
3144
  return {
3127
3145
  label: n,
3128
3146
  targetScreen: r,
3129
3147
  hierarchy: i,
3130
3148
  order: a,
3131
- ...ms({
3132
- id: ps(t.id),
3133
- group: ps(t.group),
3134
- icon: ps(t.icon),
3135
- presentation: ps(t.presentation),
3136
- destination: gs(o) && _s(o) ? o : void 0
3149
+ ...gs({
3150
+ id: hs(t.id),
3151
+ group: hs(t.group),
3152
+ icon: hs(t.icon),
3153
+ presentation: hs(t.presentation),
3154
+ destination: vs(o) && ys(o) ? o : void 0
3137
3155
  })
3138
3156
  };
3139
3157
  }
3140
- function ls(e) {
3158
+ function ds(e) {
3141
3159
  return Array.isArray(e.hierarchy) ? e.hierarchy.filter((e) => typeof e == "string") : [];
3142
3160
  }
3143
- function us(e) {
3161
+ function fs(e) {
3144
3162
  return e.id === void 0 ? JSON.stringify([
3145
3163
  e.hierarchy,
3146
3164
  e.targetScreen,
3147
3165
  e.label
3148
3166
  ]) : JSON.stringify(["id", e.id]);
3149
3167
  }
3150
- function ds(e, t, n) {
3168
+ function ps(e, t, n) {
3151
3169
  let r = e.children.find((e) => e.screen === void 0 && e.section === !0 === n && e.label === t);
3152
3170
  if (r) return r;
3153
3171
  let i = n ? {
@@ -3160,12 +3178,12 @@ function ds(e, t, n) {
3160
3178
  };
3161
3179
  return e.children.push(i), i;
3162
3180
  }
3163
- function fs(e) {
3181
+ function ms(e) {
3164
3182
  return {
3165
3183
  label: e.label,
3166
- ...ms({ id: e.id || void 0 }),
3184
+ ...gs({ id: e.id || void 0 }),
3167
3185
  screen: e.targetScreen,
3168
- ...ms({
3186
+ ...gs({
3169
3187
  icon: e.icon || void 0,
3170
3188
  presentation: e.presentation || void 0,
3171
3189
  destination: e.destination
@@ -3173,58 +3191,58 @@ function fs(e) {
3173
3191
  children: []
3174
3192
  };
3175
3193
  }
3176
- function ps(e) {
3194
+ function hs(e) {
3177
3195
  return typeof e == "string" ? e : void 0;
3178
3196
  }
3179
- function ms(e) {
3197
+ function gs(e) {
3180
3198
  return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
3181
3199
  }
3182
- function hs(e, t) {
3200
+ function _s(e, t) {
3183
3201
  for (let n of e) {
3184
3202
  if (n.screen === t) return [n.label];
3185
- let e = hs(n.children, t);
3203
+ let e = _s(n.children, t);
3186
3204
  if (e.length > 0) return n.section ? e : [n.label, ...e];
3187
3205
  }
3188
3206
  return [];
3189
3207
  }
3190
- function gs(e) {
3208
+ function vs(e) {
3191
3209
  return typeof e == "object" && !!e && !Array.isArray(e);
3192
3210
  }
3193
- function _s(e) {
3211
+ function ys(e) {
3194
3212
  return e.slot !== void 0 || e.dialog !== void 0 || e.kind === "external" || e.kind === "dialog";
3195
3213
  }
3196
- function vs(e, t, n) {
3214
+ function bs(e, t, n) {
3197
3215
  return e.filter((e) => !t.has(e.name)).map((e) => ({
3198
- label: as(e),
3216
+ label: ss(e),
3199
3217
  targetScreen: e.name,
3200
3218
  hierarchy: e.path && e.path.length > 0 ? [...e.path] : [n]
3201
3219
  }));
3202
3220
  }
3203
3221
  // src/blueprint.ts
3204
- var ys = "Stage:locale", bs = "Stage:themeToggle", xs = "Stage:notes", Ss = "Stage:acting-user", Cs = "Cratis.Components", ws = "PrimeReact", Ts = /* @__PURE__ */ new Map();
3205
- function Es(e) {
3206
- return ft(e).packages.includes(ws);
3222
+ var xs = "Stage:locale", Ss = "Stage:themeToggle", Cs = "Stage:notes", ws = "Stage:acting-user", Ts = "Cratis.Components", Es = "PrimeReact", Ds = /* @__PURE__ */ new Map();
3223
+ function Os(e) {
3224
+ return ft(e).packages.includes(Es);
3207
3225
  }
3208
- function Ds(e, t) {
3209
- Ts.set(e, t);
3226
+ function ks(e, t) {
3227
+ Ds.set(e, t);
3210
3228
  }
3211
- function Os(e) {
3229
+ function As(e) {
3212
3230
  let t = ft(e);
3213
3231
  return {
3214
3232
  ...t,
3215
3233
  name: e?.length ? t.name : "Stage",
3216
3234
  packages: ie(t.packages, {
3217
- baseline: Cs,
3235
+ baseline: Ts,
3218
3236
  catalog: { [it]: O.Blueprint }
3219
3237
  })
3220
3238
  };
3221
3239
  }
3222
- var ks = {
3240
+ var js = {
3223
3241
  ...tt,
3224
- [Cs]: Ft.components
3242
+ [Ts]: Ft.components
3225
3243
  };
3226
- function As(e) {
3227
- let t = [...Ts.values()].reduce((e, t) => ({
3244
+ function Ms(e) {
3245
+ let t = [...Ds.values()].reduce((e, t) => ({
3228
3246
  ...e,
3229
3247
  ...t.components
3230
3248
  }), {});
@@ -3237,16 +3255,16 @@ function As(e) {
3237
3255
  ...e
3238
3256
  };
3239
3257
  }
3240
- function js(e) {
3241
- let t = Object.fromEntries([...Ts].map(([e, t]) => [e, t.declared]));
3258
+ function Ns(e) {
3259
+ let t = Object.fromEntries([...Ds].map(([e, t]) => [e, t.declared]));
3242
3260
  return {
3243
3261
  ...e,
3244
- ...ks,
3262
+ ...js,
3245
3263
  ...t
3246
3264
  };
3247
3265
  }
3248
- var Ms = "Stage:navigationTree";
3249
- function Ns(e, t, n) {
3266
+ var Ps = "Stage:navigationTree";
3267
+ function Fs(e, t, n) {
3250
3268
  let r = t?.title ?? "Cratis Stage";
3251
3269
  return R(e, I.Logo, {
3252
3270
  label: r,
@@ -3257,33 +3275,33 @@ function Ns(e, t, n) {
3257
3275
  ...t?.showName === void 0 ? {} : { showName: t.showName }
3258
3276
  });
3259
3277
  }
3260
- function Ps(e, t, n, r) {
3278
+ function Is(e, t, n, r) {
3261
3279
  let i = [];
3262
- return r && i.push(R("topbar-acting-user", Ss, {})), e.length > 1 && i.push(R("topbar-locale", ys, {
3280
+ return r && i.push(R("topbar-acting-user", ws, {})), e.length > 1 && i.push(R("topbar-locale", xs, {
3263
3281
  locales: e,
3264
3282
  locale: t
3265
- })), n && i.push(R("topbar-theme", bs, {})), i;
3283
+ })), n && i.push(R("topbar-theme", Ss, {})), i;
3266
3284
  }
3267
- function Fs(e, t, n, r, i, a = {}) {
3268
- let { regions: o = !1, showFooter: s = !0, showThemeSwitcher: c = !0, showActingUser: l = !1 } = a, u = e[0]?.name ?? "", d = i?.title ?? "Cratis Stage", f = os(e), p = vs(e, new Set(f.map((e) => e.targetScreen)), "Other screens"), m = ss([...f, ...f.length > 0 ? p : []]), h = e.map((e, n) => ut({
3269
- label: as(e),
3285
+ function Ls(e, t, n, r, i, a = {}) {
3286
+ let { regions: o = !1, showFooter: s = !0, showThemeSwitcher: c = !0, showActingUser: l = !1 } = a, u = e[0]?.name ?? "", d = i?.title ?? "Cratis Stage", f = cs(e), p = bs(e, new Set(f.map((e) => e.targetScreen)), "Other screens"), m = ls([...f, ...f.length > 0 ? p : []]), h = e.map((e, n) => ut({
3287
+ label: ss(e),
3270
3288
  targetScreen: e.name,
3271
3289
  icon: "pi pi-table",
3272
3290
  group: "Screens",
3273
3291
  order: n
3274
- }, t)), g = e.find((e) => e.name === t), _ = g ? as(g) : Er(t), v = hs(ss(f), t), y = e.find((e) => e.name === t)?.path?.length ? hs(m, t) : [], b = v.length > 0 ? v : y, x = f.length > 0 ? R("menu-hierarchy", Ms, {
3292
+ }, t)), g = e.find((e) => e.name === t), _ = g ? ss(g) : Er(t), v = _s(ls(f), t), y = e.find((e) => e.name === t)?.path?.length ? _s(m, t) : [], b = v.length > 0 ? v : y, x = f.length > 0 ? R("menu-hierarchy", Ps, {
3275
3293
  nodes: m,
3276
3294
  activeScreen: t
3277
3295
  }) : R("menu-screens", I.Menu, {
3278
3296
  title: "Screens",
3279
3297
  label: "Screens"
3280
- }, { items: h }), S = [R("topbar-notes", xs, {}), ...Ps(n, r, c, l)], C = { regionNavigation: o };
3298
+ }, { items: h }), S = [R("topbar-notes", Cs, {}), ...Is(n, r, c, l)], C = { regionNavigation: o };
3281
3299
  return {
3282
3300
  [L.Topbar]: [R("topbar", I.Topbar, C, {
3283
- logo: [Ns("topbar-logo", i, u)],
3301
+ logo: [Fs("topbar-logo", i, u)],
3284
3302
  end: S
3285
3303
  })],
3286
- [L.Sidebar]: [R("sidebar", I.Sidebar, C, { logo: [Ns("sidebar-logo", i, u)] })],
3304
+ [L.Sidebar]: [R("sidebar", I.Sidebar, C, { logo: [Fs("sidebar-logo", i, u)] })],
3287
3305
  ...o ? {} : { [L.Menu]: [x] },
3288
3306
  [L.Breadcrumb]: [R("breadcrumb", I.Breadcrumb, {
3289
3307
  homeTargetScreen: u,
@@ -3300,11 +3318,11 @@ function Fs(e, t, n, r, i, a = {}) {
3300
3318
  })]
3301
3319
  };
3302
3320
  }
3303
- function Is(e) {
3321
+ function Rs(e) {
3304
3322
  return `#/${encodeURIComponent(e)}`;
3305
3323
  }
3306
3324
  // src/externalRouteHref.ts
3307
- function Ls(e) {
3325
+ function zs(e) {
3308
3326
  try {
3309
3327
  let t = new URL(e ?? "");
3310
3328
  return t.protocol === "http:" || t.protocol === "https:" ? e : void 0;
@@ -3313,11 +3331,11 @@ function Ls(e) {
3313
3331
  }
3314
3332
  }
3315
3333
  // src/stageSlot.tsx
3316
- function Rs(e) {
3334
+ function Bs(e) {
3317
3335
  return typeof e == "string" && e.length > 0 ? e : void 0;
3318
3336
  }
3319
- function zs({ element: e }) {
3320
- let t = Me(e.properties), n = c(Se), r = He(), i = Ke(), a = W(), o = Rs(e.properties.shows), s = Rs(e.properties.showsBy), u = Rs(e.properties.showsFromElement) ?? Rs(e.properties.showsFrom), d = t.routed || o ? r?.state.slots[t.name] : void 0, f = u ? a.selections[u] : void 0, p = f && s ? f[s] : void 0, m = p == null || p === "" ? void 0 : String(p);
3337
+ function Vs({ element: e }) {
3338
+ let t = Me(e.properties), n = c(Se), r = He(), i = Ke(), a = W(), o = Bs(e.properties.shows), s = Bs(e.properties.showsBy), u = Bs(e.properties.showsFromElement) ?? Bs(e.properties.showsFrom), d = t.routed || o ? r?.state.slots[t.name] : void 0, f = u ? a.selections[u] : void 0, p = f && s ? f[s] : void 0, m = p == null || p === "" ? void 0 : String(p);
3321
3339
  l(() => {
3322
3340
  if (!r || !o || !s || m === void 0) return;
3323
3341
  let e = r.state.slots[t.name];
@@ -3348,7 +3366,7 @@ function zs({ element: e }) {
3348
3366
  onClick: v,
3349
3367
  children: "Close"
3350
3368
  })
3351
- }), g && i && h && (d ? /* @__PURE__ */ B(Bs, {
3369
+ }), g && i && h && (d ? /* @__PURE__ */ B(Hs, {
3352
3370
  name: h,
3353
3371
  screen: g,
3354
3372
  registry: i.registry,
@@ -3373,7 +3391,7 @@ function zs({ element: e }) {
3373
3391
  children: b
3374
3392
  });
3375
3393
  }
3376
- function Bs({ name: e, screen: t, registry: n, values: r }) {
3394
+ function Hs({ name: e, screen: t, registry: n, values: r }) {
3377
3395
  let i = W(), a = JSON.stringify({
3378
3396
  ...i.parameters,
3379
3397
  ...r
@@ -3387,7 +3405,7 @@ function Bs({ name: e, screen: t, registry: n, values: r }) {
3387
3405
  locale: i.locale,
3388
3406
  locales: i.locales,
3389
3407
  screen: e,
3390
- children: /* @__PURE__ */ B(Vs, {
3408
+ children: /* @__PURE__ */ B(Us, {
3391
3409
  name: e,
3392
3410
  screen: t,
3393
3411
  registry: n
@@ -3395,13 +3413,13 @@ function Bs({ name: e, screen: t, registry: n, values: r }) {
3395
3413
  })
3396
3414
  });
3397
3415
  }
3398
- function Vs({ name: e, screen: t, registry: n }) {
3416
+ function Us({ name: e, screen: t, registry: n }) {
3399
3417
  let r = W();
3400
3418
  return /* @__PURE__ */ B(xr, {
3401
3419
  screen: e,
3402
3420
  children: /* @__PURE__ */ V(pi, {
3403
3421
  element: t,
3404
- children: [/* @__PURE__ */ B(Xo, { element: t }), /* @__PURE__ */ B(xe, {
3422
+ children: [/* @__PURE__ */ B(Qo, { element: t }), /* @__PURE__ */ B(xe, {
3405
3423
  element: t,
3406
3424
  registry: n,
3407
3425
  resolveBinding: r.resolveBinding,
@@ -3411,7 +3429,7 @@ function Vs({ name: e, screen: t, registry: n }) {
3411
3429
  });
3412
3430
  }
3413
3431
  // src/sandboxActingUser.ts
3414
- async function Hs(e, t = fetch) {
3432
+ async function Ws(e, t = fetch) {
3415
3433
  let n = await t(Rt.actingUser, {
3416
3434
  signal: e,
3417
3435
  credentials: "same-origin"
@@ -3420,7 +3438,7 @@ async function Hs(e, t = fetch) {
3420
3438
  let r = await n.json();
3421
3439
  return r.enabled === !0 && Array.isArray(r.users) && r.users.length > 0 ? r : void 0;
3422
3440
  }
3423
- async function Us(e, t = fetch) {
3441
+ async function Gs(e, t = fetch) {
3424
3442
  let n = await t(Rt.actingUser, {
3425
3443
  method: "PUT",
3426
3444
  credentials: "same-origin",
@@ -3429,11 +3447,11 @@ async function Us(e, t = fetch) {
3429
3447
  });
3430
3448
  if (!n.ok) throw Error(`The sandbox could not change the acting user (${n.status}).`);
3431
3449
  }
3432
- async function Ws(e, t, n) {
3450
+ async function Ks(e, t, n) {
3433
3451
  e.selectActingUser && (await e.selectActingUser(t), n());
3434
3452
  }
3435
3453
  // src/SandboxActingUser.tsx
3436
- function Gs() {
3454
+ function qs() {
3437
3455
  let e = U(), [t, n] = m(), [r, i] = m(!1), [a, o] = m("");
3438
3456
  if (l(() => {
3439
3457
  let t = new AbortController();
@@ -3444,7 +3462,7 @@ function Gs() {
3444
3462
  let s = async (t) => {
3445
3463
  i(!0), o("");
3446
3464
  try {
3447
- await Ws(e, t || null, () => window.location.reload());
3465
+ await Ks(e, t || null, () => window.location.reload());
3448
3466
  } catch {
3449
3467
  o("The acting user could not be changed. Try again."), i(!1);
3450
3468
  }
@@ -3476,25 +3494,25 @@ function Gs() {
3476
3494
  });
3477
3495
  }
3478
3496
  // src/StageChrome.tsx
3479
- var Ks = a({
3497
+ var Js = a({
3480
3498
  locales: [],
3481
3499
  locale: "",
3482
3500
  setLocale: () => void 0,
3483
3501
  activity: ""
3484
3502
  });
3485
- function qs({ state: e, children: t }) {
3486
- return /* @__PURE__ */ B(Ks.Provider, {
3503
+ function Ys({ state: e, children: t }) {
3504
+ return /* @__PURE__ */ B(Js.Provider, {
3487
3505
  value: e,
3488
3506
  children: t
3489
3507
  });
3490
3508
  }
3491
- var Js = "Stage:activity";
3492
- function Ys() {
3493
- let { notesEnabled: e } = c(Ks);
3509
+ var Xs = "Stage:activity";
3510
+ function Zs() {
3511
+ let { notesEnabled: e } = c(Js);
3494
3512
  return e ? /* @__PURE__ */ B(r, { size: "small" }) : null;
3495
3513
  }
3496
- function Xs() {
3497
- let { locales: e, locale: t, setLocale: n } = c(Ks);
3514
+ function Qs() {
3515
+ let { locales: e, locale: t, setLocale: n } = c(Js);
3498
3516
  return e.length < 2 ? null : /* @__PURE__ */ B("select", {
3499
3517
  className: "stage-locale",
3500
3518
  "aria-label": "Locale",
@@ -3506,7 +3524,7 @@ function Xs() {
3506
3524
  }, e))
3507
3525
  });
3508
3526
  }
3509
- function Zs({ element: e }) {
3527
+ function $s({ element: e }) {
3510
3528
  let { config: t, setThemeName: n, setColorScheme: r } = pt(), i = at.find((e) => e.name === t.themeName)?.isDark ?? t.colorScheme === F.Dark, a = at.find((e) => (e.isDark ?? !1) !== i);
3511
3529
  if (!a) return null;
3512
3530
  let o = i ? "Switch to a light theme" : "Switch to a dark theme";
@@ -3519,7 +3537,7 @@ function Zs({ element: e }) {
3519
3537
  "aria-label": o,
3520
3538
  title: o,
3521
3539
  onClick: () => {
3522
- es(a.name), n(a.name), r(a.isDark ? F.Dark : F.Light);
3540
+ ns(a.name), n(a.name), r(a.isDark ? F.Dark : F.Light);
3523
3541
  },
3524
3542
  children: /* @__PURE__ */ B("svg", {
3525
3543
  width: "18",
@@ -3540,19 +3558,19 @@ function Zs({ element: e }) {
3540
3558
  })
3541
3559
  });
3542
3560
  }
3543
- function Qs({ element: e }) {
3561
+ function ec({ element: e }) {
3544
3562
  let t = e.properties ?? {};
3545
3563
  return /* @__PURE__ */ B("nav", {
3546
3564
  className: "stage-navigation-tree",
3547
3565
  "aria-label": "Navigation",
3548
3566
  "data-scene-id": e.id,
3549
- children: /* @__PURE__ */ B($s, {
3567
+ children: /* @__PURE__ */ B(tc, {
3550
3568
  nodes: t.nodes ?? [],
3551
3569
  activeScreen: t.activeScreen
3552
3570
  })
3553
3571
  });
3554
3572
  }
3555
- function $s({ nodes: e, activeScreen: t }) {
3573
+ function tc({ nodes: e, activeScreen: t }) {
3556
3574
  return /* @__PURE__ */ B("ul", {
3557
3575
  role: "tree",
3558
3576
  children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ V("li", {
@@ -3561,13 +3579,13 @@ function $s({ nodes: e, activeScreen: t }) {
3561
3579
  children: [/* @__PURE__ */ B("span", {
3562
3580
  className: "stage-navigation-group",
3563
3581
  children: e.label
3564
- }), /* @__PURE__ */ B($s, {
3582
+ }), /* @__PURE__ */ B(tc, {
3565
3583
  nodes: e.children,
3566
3584
  activeScreen: t
3567
3585
  })]
3568
3586
  }, e.label) : /* @__PURE__ */ B("li", {
3569
3587
  role: "treeitem",
3570
- children: /* @__PURE__ */ B(ec, {
3588
+ children: /* @__PURE__ */ B(nc, {
3571
3589
  node: e,
3572
3590
  screen: e.screen,
3573
3591
  activeScreen: t
@@ -3575,10 +3593,10 @@ function $s({ nodes: e, activeScreen: t }) {
3575
3593
  }, `${e.screen}:${e.label}`))
3576
3594
  });
3577
3595
  }
3578
- function ec({ node: e, screen: t, activeScreen: n }) {
3579
- let r = c(Se), i = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", a = e.destination, o = a?.kind === "external", s = a && r && !o && _s(a) ? (e) => {
3596
+ function nc({ node: e, screen: t, activeScreen: n }) {
3597
+ let r = c(Se), i = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", a = e.destination, o = a?.kind === "external", s = a && r && !o && ys(a) ? (e) => {
3580
3598
  e.preventDefault(), r.navigate(a);
3581
- } : void 0, l = o ? Ls(a.route) : Is(t), u = o && l === void 0;
3599
+ } : void 0, l = o ? zs(a.route) : Rs(t), u = o && l === void 0;
3582
3600
  return /* @__PURE__ */ V("a", {
3583
3601
  href: l,
3584
3602
  rel: o && !u ? "noreferrer" : void 0,
@@ -3595,15 +3613,15 @@ function ec({ node: e, screen: t, activeScreen: n }) {
3595
3613
  }), i !== "icon" && e.label]
3596
3614
  });
3597
3615
  }
3598
- function tc() {
3599
- let { activity: e } = c(Ks);
3616
+ function rc() {
3617
+ let { activity: e } = c(Js);
3600
3618
  return e ? /* @__PURE__ */ B("p", {
3601
3619
  className: "stage-activity",
3602
3620
  role: "status",
3603
3621
  children: e
3604
3622
  }) : null;
3605
3623
  }
3606
- function nc() {
3624
+ function ic() {
3607
3625
  let e = qe(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
3608
3626
  return l(() => {
3609
3627
  let r = e?.isDark ? "dark" : "light";
@@ -3614,27 +3632,27 @@ function nc() {
3614
3632
  n
3615
3633
  ]), null;
3616
3634
  }
3617
- var rc = {
3618
- [xs]: Ys,
3619
- [Ss]: Gs,
3620
- [ys]: Xs,
3621
- [bs]: Zs,
3622
- [Ms]: Qs,
3623
- [Js]: tc,
3624
- "core:slot": zs
3635
+ var ac = {
3636
+ [Cs]: Zs,
3637
+ [ws]: qs,
3638
+ [xs]: Qs,
3639
+ [Ss]: $s,
3640
+ [Ps]: ec,
3641
+ [Xs]: rc,
3642
+ "core:slot": Vs
3625
3643
  };
3626
3644
  // src/stageResponseContracts.ts
3627
- function ic(e) {
3645
+ function oc(e) {
3628
3646
  return {
3629
3647
  commandResponse: (t) => e?.commands[t] ?? void 0,
3630
- targetType: (t, n) => ac(e, t, n)
3648
+ targetType: (t, n) => sc(e, t, n)
3631
3649
  };
3632
3650
  }
3633
- function ac(e, t, n) {
3651
+ function sc(e, t, n) {
3634
3652
  if (n.kind === "message") return { kind: "string" };
3635
- if (n.kind === "argument") return oc(e, t, n.name);
3653
+ if (n.kind === "argument") return cc(e, t, n.name);
3636
3654
  }
3637
- function oc(e, t, n) {
3655
+ function cc(e, t, n) {
3638
3656
  switch (t.kind) {
3639
3657
  case S.ExecuteCommand: return e?.commandInputs[t.command]?.[n] ?? void 0;
3640
3658
  case S.Navigate: return e?.screenInputs[t.screen]?.[n] ?? void 0;
@@ -3642,13 +3660,13 @@ function oc(e, t, n) {
3642
3660
  }
3643
3661
  }
3644
3662
  // src/stageShell.ts
3645
- var sc = [
3663
+ var lc = [
3646
3664
  "navigationMode",
3647
3665
  "menuTheme",
3648
3666
  "showFooter",
3649
3667
  "showThemeSwitcher"
3650
- ], cc = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
3651
- function lc(e, t, n = !1) {
3668
+ ], uc = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
3669
+ function dc(e, t, n = !1) {
3652
3670
  let r = [], i = {
3653
3671
  showFooter: !0,
3654
3672
  showThemeSwitcher: !0,
@@ -3656,42 +3674,42 @@ function lc(e, t, n = !1) {
3656
3674
  problems: r
3657
3675
  };
3658
3676
  for (let [e, n] of Object.entries(t.options ?? {})) {
3659
- let a = uc(i, t.name, e, n);
3677
+ let a = fc(i, t.name, e, n);
3660
3678
  a && r.push(a);
3661
3679
  }
3662
- return fc(i, e?.appearance, n), i;
3680
+ return mc(i, e?.appearance, n), i;
3663
3681
  }
3664
- function uc(e, t, n, r) {
3665
- if (!sc.includes(n)) return `The shell '${t}' has no option '${n}'; the options it understands are ${sc.join(", ")}.`;
3666
- if (n === "navigationMode") return dc(n, r, ct, (t) => {
3682
+ function fc(e, t, n, r) {
3683
+ if (!lc.includes(n)) return `The shell '${t}' has no option '${n}'; the options it understands are ${lc.join(", ")}.`;
3684
+ if (n === "navigationMode") return pc(n, r, ct, (t) => {
3667
3685
  e.mode = t;
3668
3686
  });
3669
- if (n === "menuTheme") return dc(n, r, lt, (t) => {
3687
+ if (n === "menuTheme") return pc(n, r, lt, (t) => {
3670
3688
  e.menuTheme = t;
3671
3689
  });
3672
3690
  if (typeof r != "boolean") return `Option '${n}' is '${String(r)}'; expected true or false.`;
3673
3691
  n === "showFooter" ? e.showFooter = r : e.showThemeSwitcher = r;
3674
3692
  }
3675
- function dc(e, t, n, r) {
3693
+ function pc(e, t, n, r) {
3676
3694
  let i = n.find((e) => e === t);
3677
3695
  if (!i) return `Option '${e}' is '${String(t)}'; expected one of ${n.join(", ")}.`;
3678
3696
  r(i);
3679
3697
  }
3680
- function fc(e, t, n) {
3698
+ function mc(e, t, n) {
3681
3699
  if (t?.colorScheme !== void 0) {
3682
3700
  e.followsSystem = t.colorScheme === _.System;
3683
3701
  let r = e.followsSystem ? n : t.colorScheme === _.Dark;
3684
3702
  e.colorScheme = r ? F.Dark : F.Light, e.themeName = at.find((e) => (e.isDark ?? !1) === r)?.name, e.followsSystem || (e.showThemeSwitcher = !1);
3685
3703
  }
3686
- t?.accent !== void 0 && (cc.test(t.accent) ? e.accent = t.accent : e.problems.push(`The accent '${t.accent}' is not a colour written as #rgb or #rrggbb.`));
3704
+ t?.accent !== void 0 && (uc.test(t.accent) ? e.accent = t.accent : e.problems.push(`The accent '${t.accent}' is not a colour written as #rgb or #rrggbb.`));
3687
3705
  }
3688
- function pc(e) {
3706
+ function hc(e) {
3689
3707
  return {
3690
3708
  showFooter: e?.showFooter ?? !0,
3691
3709
  showThemeSwitcher: e?.showThemeSwitcher ?? !0
3692
3710
  };
3693
3711
  }
3694
- function mc(e, t) {
3712
+ function gc(e, t) {
3695
3713
  if (e?.root === void 0) return [];
3696
3714
  let n = /* @__PURE__ */ new Set([
3697
3715
  j.RootTemplateUnknown,
@@ -3703,7 +3721,7 @@ function mc(e, t) {
3703
3721
  ]), r = t.diagnostics.filter((e) => n.has(e.code)).map((e) => e.message);
3704
3722
  return r.length === 0 && t.origin !== M.Root && r.push(`The root template '${e.root.template.id}' did not resolve, so the application would not start in the shell it names.`), r;
3705
3723
  }
3706
- function hc(e) {
3724
+ function _c(e) {
3707
3725
  let t = e.length === 4 ? [...e.slice(1)].map((e) => e + e).join("") : e.slice(1), [n, r, i] = [
3708
3726
  0,
3709
3727
  2,
@@ -3711,7 +3729,7 @@ function hc(e) {
3711
3729
  ].map((e) => parseInt(t.slice(e, e + 2), 16));
3712
3730
  return (n * 299 + r * 587 + i * 114) / 1e3 >= 150 ? "#111827" : "#ffffff";
3713
3731
  }
3714
- function gc(e, t) {
3732
+ function vc(e, t) {
3715
3733
  if (t === void 0) return e;
3716
3734
  let n = t.length === 4 ? [...t.slice(1)].map((e) => e + e).join("") : t.slice(1), [r, i, a] = [
3717
3735
  0,
@@ -3723,24 +3741,24 @@ function gc(e, t) {
3723
3741
  tokens: {
3724
3742
  ...e.tokens,
3725
3743
  "primary.color": t,
3726
- "primary.contrastColor": hc(t),
3744
+ "primary.contrastColor": _c(t),
3727
3745
  "focus.ring": `0 0 0 2px rgb(${r} ${i} ${a} / 0.4)`
3728
3746
  }
3729
3747
  }));
3730
3748
  }
3731
3749
  // src/StageShellSettings.tsx
3732
- var _c = "(prefers-color-scheme: dark)";
3733
- function vc() {
3750
+ var yc = "(prefers-color-scheme: dark)";
3751
+ function bc() {
3734
3752
  return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ?? !1;
3735
3753
  }
3736
- function yc({ settings: e, onSystemSchemeChange: t }) {
3754
+ function xc({ settings: e, onSystemSchemeChange: t }) {
3737
3755
  let n = p(pt());
3738
3756
  n.current = pt();
3739
3757
  let { mode: r, menuTheme: i, colorScheme: a, themeName: o } = e;
3740
3758
  return l(() => {
3741
3759
  let { setMode: e, setMenuTheme: t, setColorScheme: s, setThemeName: c } = n.current;
3742
3760
  r !== void 0 && e(r), i !== void 0 && t(i);
3743
- let l = at.find((e) => e.name === $o());
3761
+ let l = at.find((e) => e.name === ts());
3744
3762
  l ? (c(l.name), s(l.isDark ? F.Dark : F.Light)) : (a !== void 0 && s(a), o !== void 0 && c(o));
3745
3763
  }, [
3746
3764
  r,
@@ -3749,16 +3767,16 @@ function yc({ settings: e, onSystemSchemeChange: t }) {
3749
3767
  o
3750
3768
  ]), l(() => {
3751
3769
  if (!e.followsSystem || !globalThis.matchMedia || !t) return;
3752
- let n = globalThis.matchMedia(_c), r = (e) => t(e.matches);
3770
+ let n = globalThis.matchMedia(yc), r = (e) => t(e.matches);
3753
3771
  return n.addEventListener("change", r), () => n.removeEventListener("change", r);
3754
3772
  }, [e.followsSystem, t]), null;
3755
3773
  }
3756
3774
  // src/stageNavigationModel.ts
3757
- function bc(e) {
3775
+ function Sc(e) {
3758
3776
  return (e?.application.outlets.some((e) => e.defaults.length > 0) ?? !1) || (e?.modules.length ?? 0) > 0;
3759
3777
  }
3760
- function xc(e) {
3761
- let t = e.filter(Sc), n = /* @__PURE__ */ new Map();
3778
+ function Cc(e) {
3779
+ let t = e.filter(wc), n = /* @__PURE__ */ new Map();
3762
3780
  for (let e of t) {
3763
3781
  let t = (e.path ?? []).join(".");
3764
3782
  t.length > 0 && !n.has(t) && n.set(t, e.name);
@@ -3770,41 +3788,41 @@ function xc(e) {
3770
3788
  return n.get(r) ?? i ?? (t.some((e) => e.name === r) ? r : void 0);
3771
3789
  };
3772
3790
  }
3773
- function Sc(e) {
3791
+ function wc(e) {
3774
3792
  return e.fits === void 0 || e.fits.length === 0 || e.fits.includes(k.Page);
3775
3793
  }
3776
- function Cc(e) {
3794
+ function Tc(e) {
3777
3795
  return (t) => e.find((e) => e.name === t)?.path?.[0];
3778
3796
  }
3779
- function wc(e, t, n) {
3797
+ function Ec(e, t, n) {
3780
3798
  let r = e.navigation ?? {
3781
3799
  application: { outlets: [] },
3782
3800
  modules: []
3783
3801
  };
3784
3802
  return {
3785
3803
  structure: e.structure ?? { modules: [] },
3786
- navigation: n ? Tc(r, n) : r,
3787
- screenFor: xc(e.screens),
3788
- moduleOf: Cc(e.screens),
3804
+ navigation: n ? Dc(r, n) : r,
3805
+ screenFor: Cc(e.screens),
3806
+ moduleOf: Tc(e.screens),
3789
3807
  ...t ? { isVisible: t } : {}
3790
3808
  };
3791
3809
  }
3792
- function Tc(e, t) {
3793
- return typeof e == "string" ? le(e, t) : Array.isArray(e) ? e.map((e) => Tc(e, t)) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).map(([e, n]) => [e, Tc(n, t)])) : e;
3810
+ function Dc(e, t) {
3811
+ return typeof e == "string" ? le(e, t) : Array.isArray(e) ? e.map((e) => Dc(e, t)) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).map(([e, n]) => [e, Dc(n, t)])) : e;
3794
3812
  }
3795
3813
  // src/stageSlices.ts
3796
- function Ec(e) {
3814
+ function Oc(e) {
3797
3815
  return (t) => Y(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
3798
3816
  name: e.name,
3799
3817
  type: e.type === "text" || e.type === void 0 ? "string" : e.type,
3800
- label: Dc(e.name),
3818
+ label: kc(e.name),
3801
3819
  required: e.required
3802
3820
  }));
3803
3821
  }
3804
- function Dc(e) {
3822
+ function kc(e) {
3805
3823
  return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase());
3806
3824
  }
3807
- function Oc(e, t, n) {
3825
+ function Ac(e, t, n) {
3808
3826
  return { invoke: async (r, i, a) => {
3809
3827
  let o = a ?? r.slice(r.lastIndexOf(".") + 1);
3810
3828
  if (!on(o)) return {
@@ -3824,7 +3842,7 @@ function Oc(e, t, n) {
3824
3842
  } };
3825
3843
  }
3826
3844
  // src/withoutSeededSlots.ts
3827
- function kc(e, t) {
3845
+ function jc(e, t) {
3828
3846
  let n = /* @__PURE__ */ new Map();
3829
3847
  for (let e of t) n.has(e.name) || n.set(e.name, e.slots.map((e) => e.name));
3830
3848
  return e.map((e) => {
@@ -3841,9 +3859,9 @@ function kc(e, t) {
3841
3859
  });
3842
3860
  }
3843
3861
  // src/stageOutlets.tsx
3844
- function Ac(e) {
3862
+ function Mc(e) {
3845
3863
  let t = new Map(e.screens.map((e) => [e.name, e]));
3846
- return jc(e.structure).map((n) => {
3864
+ return Nc(e.structure).map((n) => {
3847
3865
  let r = t.get(n.name), i = n.command ? Y(e.commandSchemas?.[n.command] ?? "").map((e) => e.identity ? {
3848
3866
  name: e.name,
3849
3867
  source: te.DataContext
@@ -3857,11 +3875,11 @@ function Ac(e) {
3857
3875
  };
3858
3876
  });
3859
3877
  }
3860
- function jc(e) {
3878
+ function Nc(e) {
3861
3879
  let t = (e) => e.flatMap((e) => [...e.slices, ...t(e.features ?? [])]);
3862
3880
  return (e?.modules ?? []).flatMap((e) => [...e.slices ?? [], ...t(e.features ?? [])]);
3863
3881
  }
3864
- function Mc(e, t) {
3882
+ function Pc(e, t) {
3865
3883
  let n = e.screens.find((e) => e.name === t);
3866
3884
  if (!n) return { chain: [] };
3867
3885
  let { chain: r, contributors: i } = ae({
@@ -3874,19 +3892,19 @@ function Mc(e, t) {
3874
3892
  return {
3875
3893
  chain: r,
3876
3894
  contributors: i,
3877
- slices: Ac(e),
3895
+ slices: Mc(e),
3878
3896
  slots: c
3879
3897
  };
3880
3898
  }
3881
- function Nc({ source: e, screen: t, children: n }) {
3882
- let r = f(() => Mc(e, t), [e, t]);
3899
+ function Fc({ source: e, screen: t, children: n }) {
3900
+ let r = f(() => Pc(e, t), [e, t]);
3883
3901
  return /* @__PURE__ */ B(Ce, {
3884
3902
  value: r,
3885
3903
  children: n
3886
3904
  });
3887
3905
  }
3888
3906
  // src/stageIcons.ts
3889
- var Pc = /* @__PURE__ */ new Map([
3907
+ var Ic = /* @__PURE__ */ new Map([
3890
3908
  ["chart", "chart-column"],
3891
3909
  ["add", "plus"],
3892
3910
  ["dollar", "dollar-sign"],
@@ -3894,23 +3912,23 @@ var Pc = /* @__PURE__ */ new Map([
3894
3912
  ["refresh", "refresh-cw"],
3895
3913
  ["invoice", "receipt-text"],
3896
3914
  ["batch", "layers"]
3897
- ]), Fc = (e) => e.trim().replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([a-zA-Z])([0-9]+)/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), Ic = Pe([{
3915
+ ]), Lc = (e) => e.trim().replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([a-zA-Z])([0-9]+)/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), Rc = Pe([{
3898
3916
  library: ee,
3899
3917
  loadGlyph: async ({ key: e }) => {
3900
- let t = Fc(e), n = Pc.get(t) ?? t;
3918
+ let t = Lc(e), n = Ic.get(t) ?? t;
3901
3919
  if (Object.hasOwn(It, n)) return (await It[n]())?.default;
3902
3920
  }
3903
3921
  }]);
3904
3922
  // src/App.tsx
3905
- function Lc(e = {}) {
3906
- return As({
3923
+ function zc(e = {}) {
3924
+ return Ms({
3907
3925
  ...e,
3908
- ...zo,
3909
- ...rc
3926
+ ...Vo,
3927
+ ...ac
3910
3928
  });
3911
3929
  }
3912
- function Rc(e, t) {
3913
- return R(`form-${e}-${t.name}`, oo, {
3930
+ function Bc(e, t) {
3931
+ return R(`form-${e}-${t.name}`, co, {
3914
3932
  command: t.forCommand,
3915
3933
  label: t.name,
3916
3934
  generationMode: t.generationMode,
@@ -3919,47 +3937,47 @@ function Rc(e, t) {
3919
3937
  onSubmit: t.onSubmit
3920
3938
  });
3921
3939
  }
3922
- function zc(e, t) {
3940
+ function Vc(e, t) {
3923
3941
  let n = e.screens[0];
3924
3942
  return ot(e, n, {
3925
- profile: Os(e.uiProfiles),
3943
+ profile: As(e.uiProfiles),
3926
3944
  blueprintTemplates: t?.length ? [...st, ...t] : st
3927
3945
  });
3928
3946
  }
3929
- function Bc(e, t) {
3947
+ function Hc(e, t) {
3930
3948
  return t ? e.map((e) => ({
3931
3949
  ...e,
3932
3950
  slotContent: Object.fromEntries(Object.entries(e.slotContent ?? {}).map(([e, n]) => [e, n.map((e) => ce(e, t))]))
3933
3951
  })) : e;
3934
3952
  }
3935
- function Vc(e, t, n, r, i, a, o = !0, s = !0, c = !1) {
3953
+ function Uc(e, t, n, r, i, a, o = !0, s = !0, c = !1) {
3936
3954
  let l = {
3937
- regions: bc(e.navigation),
3955
+ regions: Sc(e.navigation),
3938
3956
  showFooter: o,
3939
3957
  showThemeSwitcher: s,
3940
3958
  showActingUser: c
3941
- }, u = Bc(e.screens, i), d = Hc(e);
3959
+ }, u = Hc(e.screens, i), d = Wc(e);
3942
3960
  return {
3943
- profile: Os(e.uiProfiles),
3944
- catalog: js(r),
3961
+ profile: As(e.uiProfiles),
3962
+ catalog: Ns(r),
3945
3963
  blueprintTemplates: a?.length ? [...st, ...a] : st,
3946
3964
  namedTemplateOnly: !0,
3947
- chrome: (e, r) => r === I.FullPageShell ? { [L.ConfigPanel]: Fs(u, e.name, t, n, d, l)[L.ConfigPanel] } : Fs(u, e.name, t, n, d, l),
3948
- form: Rc,
3949
- trailing: [R("activity", Js)],
3965
+ chrome: (e, r) => r === I.FullPageShell ? { [L.ConfigPanel]: Ls(u, e.name, t, n, d, l)[L.ConfigPanel] } : Ls(u, e.name, t, n, d, l),
3966
+ form: Bc,
3967
+ trailing: [R("activity", Xs)],
3950
3968
  decorate: (e) => {
3951
- let t = Ho(or(e));
3969
+ let t = Wo(or(e));
3952
3970
  return i ? ce(t, i) : t;
3953
3971
  }
3954
3972
  };
3955
3973
  }
3956
- function Hc(e) {
3974
+ function Wc(e) {
3957
3975
  let t = e.navigation?.application.logo;
3958
3976
  if (t) return {
3959
3977
  title: t.title,
3960
3978
  image: t.image || void 0
3961
3979
  };
3962
- let n = Os(e.uiProfiles).identity;
3980
+ let n = As(e.uiProfiles).identity;
3963
3981
  if (!n?.name) return;
3964
3982
  let r = n.logo;
3965
3983
  return {
@@ -3969,22 +3987,22 @@ function Hc(e) {
3969
3987
  showName: n.showName
3970
3988
  };
3971
3989
  }
3972
- function Uc(e, t, n, r, i, a) {
3973
- let [o] = Ua([t], Wc(e));
3974
- return nt(e, o, Vc(e, n, r, i, void 0, a)).element;
3990
+ function Gc(e, t, n, r, i, a) {
3991
+ let [o] = Ga([t], Kc(e));
3992
+ return nt(e, o, Uc(e, n, r, i, void 0, a)).element;
3975
3993
  }
3976
- function Wc(e) {
3994
+ function Kc(e) {
3977
3995
  return [...e.screenTemplates ?? [], ...e.dialogTemplates ?? []];
3978
3996
  }
3979
- function Gc() {
3997
+ function qc() {
3980
3998
  try {
3981
3999
  return globalThis.localStorage ?? null;
3982
4000
  } catch {
3983
4001
  return null;
3984
4002
  }
3985
4003
  }
3986
- function Kc({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: i, routing: a = "hash" } = {}) {
3987
- let o = U(), [s, c] = m(), [u, d] = m(""), p = f(() => Lc(e), [e, s]), h = Vt(), g = Bo();
4004
+ function Jc({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: i, routing: a = "hash" } = {}) {
4005
+ let o = U(), [s, c] = m(), [u, d] = m(""), p = f(() => zc(e), [e, s]), h = Vt(), g = Ho();
3988
4006
  return l(() => {
3989
4007
  let e = new AbortController();
3990
4008
  return o.scene(e.signal).then((e) => c(r?.length ? {
@@ -3996,7 +4014,7 @@ function Kc({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
3996
4014
  }, [o, r]), u ? /* @__PURE__ */ V("main", {
3997
4015
  className: "stage-message",
3998
4016
  children: [/* @__PURE__ */ B("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ B("p", { children: u })]
3999
- }) : s ? /* @__PURE__ */ B(qc, {
4017
+ }) : s ? /* @__PURE__ */ B(Yc, {
4000
4018
  scene: s,
4001
4019
  registry: p,
4002
4020
  routing: a,
@@ -4010,24 +4028,24 @@ function Kc({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
4010
4028
  children: /* @__PURE__ */ B("h1", { children: "Preparing the Stage" })
4011
4029
  });
4012
4030
  }
4013
- function qc({ scene: e, registry: t, routing: n, routeState: r, strings: a, packageCatalog: o, screenTemplates: c, isVisible: u }) {
4014
- let d = f(() => Ea(e), [e]), p = f(() => {
4031
+ function Yc({ scene: e, registry: t, routing: n, routeState: r, strings: a, packageCatalog: o, screenTemplates: c, isVisible: u }) {
4032
+ let d = f(() => Oa(e), [e]), p = f(() => {
4015
4033
  if (hn(n), n === "path") {
4016
4034
  let e = /^#\/(.+)$/.exec(globalThis.location.hash);
4017
4035
  e && globalThis.history.replaceState(null, "", `/${e[1]}`);
4018
4036
  }
4019
- return Pa(window, n, d);
4037
+ return Ia(window, n, d);
4020
4038
  }, [n, d]);
4021
4039
  l(() => () => p.dispose(), [p]);
4022
- let h = La(p), g = p.history, [_, v] = m(vc), y = fr(), b = e.screens[0]?.name ?? "", x = f(() => Os(e.uiProfiles), [e]), S = f(() => b ? zc(e, c) : void 0, [
4040
+ let h = za(p), g = p.history, [_, v] = m(bc), y = fr(), b = e.screens[0]?.name ?? "", x = f(() => As(e.uiProfiles), [e]), S = f(() => b ? Vc(e, c) : void 0, [
4023
4041
  e,
4024
4042
  c,
4025
4043
  b
4026
- ]), C = f(() => S ? mc(x, S) : [], [x, S]), w = f(() => S ? lc(x, S, _) : void 0, [
4044
+ ]), C = f(() => S ? gc(x, S) : [], [x, S]), w = f(() => S ? dc(x, S, _) : void 0, [
4027
4045
  x,
4028
4046
  S,
4029
4047
  _
4030
- ]), T = f(() => gc(at, w?.accent), [w?.accent]), { showFooter: E, showThemeSwitcher: D } = pc(w), O = U(), k = !!O.actingUser && !!O.selectActingUser, A = f(() => Vc(e, a.locales, a.locale, o, a.dictionary, c, E, D, k), [
4048
+ ]), T = f(() => vc(at, w?.accent), [w?.accent]), { showFooter: E, showThemeSwitcher: D } = hc(w), O = U(), k = !!O.actingUser && !!O.selectActingUser, A = f(() => Uc(e, a.locales, a.locale, o, a.dictionary, c, E, D, k), [
4031
4049
  e,
4032
4050
  a.locales,
4033
4051
  a.locale,
@@ -4037,18 +4055,18 @@ function qc({ scene: e, registry: t, routing: n, routeState: r, strings: a, pack
4037
4055
  E,
4038
4056
  D,
4039
4057
  k
4040
- ]), ee = s((e) => v(e), []), te = f(() => wc(e, u, a.dictionary), [
4058
+ ]), ee = s((e) => v(e), []), te = f(() => Ec(e, u, a.dictionary), [
4041
4059
  e,
4042
4060
  u,
4043
4061
  a.dictionary
4044
4062
  ]), ne = f(() => ({
4045
4063
  ...e,
4046
- screens: Ua(kc(e.screens, [
4064
+ screens: Ga(jc(e.screens, [
4047
4065
  ...e.screenTemplates,
4048
4066
  ...e.dialogTemplates ?? [],
4049
4067
  ...st,
4050
4068
  ...c ?? []
4051
- ]), Wc(e))
4069
+ ]), Kc(e))
4052
4070
  }), [e, c]);
4053
4071
  if (!b) return /* @__PURE__ */ V("main", {
4054
4072
  className: "stage-message",
@@ -4071,8 +4089,8 @@ function qc({ scene: e, registry: t, routing: n, routeState: r, strings: a, pack
4071
4089
  registry: t,
4072
4090
  initialScreen: b,
4073
4091
  history: g,
4074
- layoutConfigStorage: Gc(),
4075
- scope: (t, n) => /* @__PURE__ */ B(Jc, {
4092
+ layoutConfigStorage: qc(),
4093
+ scope: (t, n) => /* @__PURE__ */ B(Xc, {
4076
4094
  scene: e,
4077
4095
  notes: y,
4078
4096
  routeState: r,
@@ -4083,20 +4101,20 @@ function qc({ scene: e, registry: t, routing: n, routeState: r, strings: a, pack
4083
4101
  onSystemSchemeChange: ee,
4084
4102
  children: n
4085
4103
  }),
4086
- renderScreen: (e, n) => /* @__PURE__ */ B(Zc, {
4104
+ renderScreen: (e, n) => /* @__PURE__ */ B($c, {
4087
4105
  element: e,
4088
4106
  configuration: n,
4089
4107
  registry: t
4090
4108
  }),
4091
- renderDialog: () => /* @__PURE__ */ B(Do, {}),
4092
- renderDialogTemplate: (e, n, r) => /* @__PURE__ */ B(Qc, {
4109
+ renderDialog: () => /* @__PURE__ */ B(ko, {}),
4110
+ renderDialogTemplate: (e, n, r) => /* @__PURE__ */ B(el, {
4093
4111
  template: e,
4094
4112
  content: n,
4095
4113
  registry: t,
4096
4114
  strings: a,
4097
4115
  close: () => r.closeDialog()
4098
4116
  })
4099
- }), M = /* @__PURE__ */ B(Ra.Provider, {
4117
+ }), M = /* @__PURE__ */ B(Ba.Provider, {
4100
4118
  value: d,
4101
4119
  children: /* @__PURE__ */ B(we, {
4102
4120
  router: h,
@@ -4109,7 +4127,7 @@ function qc({ scene: e, registry: t, routing: n, routeState: r, strings: a, pack
4109
4127
  children: M
4110
4128
  }) : M;
4111
4129
  }
4112
- function Jc({ scene: e, notes: t, routeState: n, strings: r, navigation: i, themes: a, shellSettings: o, onSystemSchemeChange: s, children: c }) {
4130
+ function Xc({ scene: e, notes: t, routeState: n, strings: r, navigation: i, themes: a, shellSettings: o, onSystemSchemeChange: s, children: c }) {
4113
4131
  let [u, d] = m(""), { navigate: f } = i;
4114
4132
  return l(() => d(""), [i.currentScreen, i.currentDialog]), l(() => {
4115
4133
  let e = (e) => {
@@ -4127,16 +4145,16 @@ function Jc({ scene: e, notes: t, routeState: n, strings: r, navigation: i, them
4127
4145
  };
4128
4146
  return globalThis.addEventListener("cratis.scene.navigate", t), () => globalThis.removeEventListener("cratis.scene.navigate", t);
4129
4147
  }, [f, e]), /* @__PURE__ */ B(ve, {
4130
- registry: Ic,
4148
+ registry: Rc,
4131
4149
  children: /* @__PURE__ */ V(et, {
4132
4150
  themes: a,
4133
4151
  children: [
4134
- o && /* @__PURE__ */ B(yc, {
4152
+ o && /* @__PURE__ */ B(xc, {
4135
4153
  settings: o,
4136
4154
  onSystemSchemeChange: s
4137
4155
  }),
4138
- /* @__PURE__ */ B(nc, {}),
4139
- /* @__PURE__ */ B(Xc, {
4156
+ /* @__PURE__ */ B(ic, {}),
4157
+ /* @__PURE__ */ B(Qc, {
4140
4158
  scene: e,
4141
4159
  screen: i.primaryScreen,
4142
4160
  notes: t
@@ -4148,7 +4166,7 @@ function Jc({ scene: e, notes: t, routeState: n, strings: r, navigation: i, them
4148
4166
  locale: r.locale,
4149
4167
  locales: r.locales,
4150
4168
  screen: i.primaryScreen ?? e.screens[0]?.name ?? "",
4151
- children: /* @__PURE__ */ B(Yc, {
4169
+ children: /* @__PURE__ */ B(Zc, {
4152
4170
  activity: u,
4153
4171
  notesEnabled: t.enabled,
4154
4172
  routesReady: n.ready,
@@ -4158,7 +4176,7 @@ function Jc({ scene: e, notes: t, routeState: n, strings: r, navigation: i, them
4158
4176
  children: /* @__PURE__ */ B(br, {
4159
4177
  structure: e.structure,
4160
4178
  screens: e.screens,
4161
- children: /* @__PURE__ */ B(Nc, {
4179
+ children: /* @__PURE__ */ B(Fc, {
4162
4180
  source: e,
4163
4181
  screen: i.primaryScreen,
4164
4182
  children: c
@@ -4170,12 +4188,12 @@ function Jc({ scene: e, notes: t, routeState: n, strings: r, navigation: i, them
4170
4188
  })
4171
4189
  });
4172
4190
  }
4173
- function Yc({ activity: e, notesEnabled: t, routesReady: n, scene: r, setActivity: i, strings: a, children: o }) {
4174
- let s = W(), c = Ue(), l = dn(), u = f(() => Oc(l, n, s.refreshAfterCommand), [
4191
+ function Zc({ activity: e, notesEnabled: t, routesReady: n, scene: r, setActivity: i, strings: a, children: o }) {
4192
+ let s = W(), c = Ue(), l = dn(), u = f(() => Ac(l, n, s.refreshAfterCommand), [
4175
4193
  l,
4176
4194
  n,
4177
4195
  s.refreshAfterCommand
4178
- ]), d = f(() => Ec(r.commandSchemas), [r.commandSchemas]), p = Ne({
4196
+ ]), d = f(() => Oc(r.commandSchemas), [r.commandSchemas]), p = Ne({
4179
4197
  executeCommand: async (e, t) => {
4180
4198
  let r = on(e);
4181
4199
  if (!r && !n) return i(`The modeled command “${e}” is waiting for Stage routes.`), {
@@ -4211,7 +4229,7 @@ function Yc({ activity: e, notesEnabled: t, routesReady: n, scene: r, setActivit
4211
4229
  refreshQuery: async (e) => s.refreshQuery(e),
4212
4230
  raise: async (e) => i(`The modeled trigger “${e}” is not available in this Stage runtime.`)
4213
4231
  });
4214
- return /* @__PURE__ */ B(qs, {
4232
+ return /* @__PURE__ */ B(Ys, {
4215
4233
  state: {
4216
4234
  locales: a.locales,
4217
4235
  locale: a.locale,
@@ -4228,7 +4246,7 @@ function Yc({ activity: e, notesEnabled: t, routesReady: n, scene: r, setActivit
4228
4246
  context: {
4229
4247
  resolve: s.resolveBinding,
4230
4248
  localize: (e) => a.dictionary[e] ?? e,
4231
- responseContracts: ic(r.responseContracts)
4249
+ responseContracts: oc(r.responseContracts)
4232
4250
  },
4233
4251
  attachments: [],
4234
4252
  onFindings: (e) => i(e.map((e) => e.detail).join(" ")),
@@ -4238,20 +4256,20 @@ function Yc({ activity: e, notesEnabled: t, routesReady: n, scene: r, setActivit
4238
4256
  })
4239
4257
  });
4240
4258
  }
4241
- function Xc({ scene: e, screen: t, notes: r }) {
4259
+ function Qc({ scene: e, screen: t, notes: r }) {
4242
4260
  return n({
4243
4261
  screen: vr(e.screens.find((e) => e.name === t)),
4244
4262
  values: { modelReferences: r.modelReferences }
4245
4263
  }), null;
4246
4264
  }
4247
- function Zc({ element: e, configuration: t, registry: n }) {
4265
+ function $c({ element: e, configuration: t, registry: n }) {
4248
4266
  let r = W(), i = tr(), a = Ve();
4249
4267
  return /* @__PURE__ */ B(xr, {
4250
4268
  screen: a?.primaryScreen,
4251
4269
  children: /* @__PURE__ */ V(pi, {
4252
4270
  element: e,
4253
4271
  outputScope: i.scope,
4254
- children: [/* @__PURE__ */ B(Xo, { element: e }), /* @__PURE__ */ B(xe, {
4272
+ children: [/* @__PURE__ */ B(Qo, { element: e }), /* @__PURE__ */ B(xe, {
4255
4273
  element: e,
4256
4274
  registry: n,
4257
4275
  resolveBinding: r.resolveBinding,
@@ -4262,7 +4280,7 @@ function Zc({ element: e, configuration: t, registry: n }) {
4262
4280
  })
4263
4281
  });
4264
4282
  }
4265
- function Qc({ template: e, content: t, registry: n, strings: r, close: i }) {
4283
+ function el({ template: e, content: t, registry: n, strings: r, close: i }) {
4266
4284
  let a = W(), o = tr(), s = ce(t, r.dictionary);
4267
4285
  return l(() => {
4268
4286
  let e = (e) => {
@@ -4293,4 +4311,4 @@ function Qc({ template: e, content: t, registry: n, strings: r, close: i }) {
4293
4311
  })
4294
4312
  });
4295
4313
  }
4296
- export { Kc as App, Kc as StageApplication, Oi as StageCommandForm, zn as StageDataProvider, On as StageGuardedAction, Bt as StageSourceProvider, Uc as composeStageScreen, Oc as createStageSliceInvoker, Wn as dataChanged, ln as executeRegisteredCommand, sr as fetchModelReferences, Kt as hostedBasePath, Es as listsPrimeReact, cr as modelReferenceFor, lr as modelReferenceMap, $t as performQuery, Hs as readSandboxActingUser, dr as readStageNotes, Yt as registerQueryRouteResolver, Ds as registerStageLibrary, on as registeredCommand, Xt as registeredQuery, Ec as sliceFieldsFrom, Lc as stageApplicationRegistry, Vc as stageComposition, e as stageDarkSelector, Rt as stageEndpoints, zc as stageShellOf, Lt as staticStageSource, en as subscribeQuery, dn as useStageCommandExecutor, W as useStageData, G as useStageQuery, U as useStageSource, Us as writeSandboxActingUser };
4314
+ export { Jc as App, Jc as StageApplication, Oi as StageCommandForm, zn as StageDataProvider, On as StageGuardedAction, Bt as StageSourceProvider, Gc as composeStageScreen, Ac as createStageSliceInvoker, Wn as dataChanged, ln as executeRegisteredCommand, sr as fetchModelReferences, Kt as hostedBasePath, Os as listsPrimeReact, cr as modelReferenceFor, lr as modelReferenceMap, $t as performQuery, Ws as readSandboxActingUser, dr as readStageNotes, Yt as registerQueryRouteResolver, ks as registerStageLibrary, on as registeredCommand, Xt as registeredQuery, Oc as sliceFieldsFrom, zc as stageApplicationRegistry, Uc as stageComposition, e as stageDarkSelector, Rt as stageEndpoints, Vc as stageShellOf, Lt as staticStageSource, en as subscribeQuery, dn as useStageCommandExecutor, W as useStageData, G as useStageQuery, U as useStageSource, Gs as writeSandboxActingUser };