@cratis/stage.runtime 4.190.9 → 4.190.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/index.js CHANGED
@@ -2,23 +2,23 @@ import "./app.css";
2
2
  import { createContext as e, createElement as t, useCallback as n, useContext as r, useEffect as i, useId as a, useMemo as o, useRef as s, useState as c } from "react";
3
3
  import { ColorScheme as l, DestinationKind as u, FormGenerationMode as d, FormWidthUnit as f, InteractionTriggerKind as p, componentIconLibrary as m } from "@cratis/scene.model";
4
4
  import { ShellDiagnosticCode as h, ShellOrigin as g, createBindingResolver as _, resolveArgumentSource as v, resolveBehaviors as y, resolveStringsInElement as b, runBindings as x, validateBindingExpression as ee } from "@cratis/scene.engine";
5
- import { CoreSliceDialog as S, CoreToolbarItem as C, IconAdapterProvider as w, InteractionScope as te, SceneElementView as T, SceneNavigationContextInternal as ne, SliceCommandFieldsProvider as re, SliceDialogView as ie, SliceInvokerProvider as ae, attachmentFor as oe, coreComponents as E, createBrowserDispatcher as D, createHashSceneHistory as se, createIconAdapterRegistry as ce, sliceDialogParameters as le, useInteractionScope as ue, useOptionalSceneNavigation as O, useSceneNavigation as de, useSceneOutlets as fe, useSceneTheme as k } from "@cratis/scene.react";
6
- import { ApplicationHost as pe, ColorScheme as me, ComponentName as A, LayoutThemeProvider as he, SlotName as j, blueprintPackageCatalog as ge, composeApplicationScreen as _e, defaultBlueprintComponents as ve, defaultBlueprintName as ye, defaultBlueprintThemes as be, effectiveShellOf as xe, externalComponent as M, galleryScreenTemplates as N, layoutModes as Se, menuThemes as Ce, navigationElement as we, previewComponents as Te, previewProfile as Ee, useLayoutConfig as De } from "@cratis/scene.blueprint.default";
5
+ import { CoreSliceDialog as S, CoreToolbarItem as C, IconAdapterProvider as te, InteractionScope as ne, SceneElementView as w, SceneNavigationContextInternal as re, SliceCommandFieldsProvider as T, SliceDialogView as ie, SliceInvokerProvider as E, attachmentFor as ae, coreComponents as D, createBrowserDispatcher as O, createHashSceneHistory as oe, createIconAdapterRegistry as se, sliceDialogParameters as ce, useInteractionScope as le, useOptionalSceneNavigation as k, useSceneNavigation as ue, useSceneOutlets as de, useSceneTheme as A } from "@cratis/scene.react";
6
+ import { ApplicationHost as fe, ColorScheme as pe, ComponentName as j, LayoutThemeProvider as me, SlotName as M, blueprintPackageCatalog as he, composeApplicationScreen as ge, defaultBlueprintComponents as _e, defaultBlueprintName as ve, defaultBlueprintThemes as ye, effectiveShellOf as be, externalComponent as N, galleryScreenTemplates as P, layoutModes as xe, menuThemes as Se, navigationElement as Ce, previewComponents as we, previewProfile as Te, useLayoutConfig as Ee } from "@cratis/scene.blueprint.default";
7
7
  import "@cratis/scene.blueprint.default/styles.css";
8
- import { ArcContext as Oe } from "@cratis/arc.react";
9
- import { ObservableQueryFor as ke, Paging as Ae, QueryFor as je } from "@cratis/arc/queries";
10
- import { resolveCommand as Me, resolveExactQuery as Ne } from "@cratis/scene.components";
11
- import { Fragment as Pe, jsx as P, jsxs as F } from "react/jsx-runtime";
12
- import { Button as I } from "primereact/button";
13
- import { PrimeDialog as Fe, PrimeMessage as Ie, primeReactComponents as Le, primeReactPackageManifest as Re } from "@cratis/scene.primereact";
14
- import { DateOnly as ze, Guid as Be } from "@cratis/fundamentals";
15
- import { Command as Ve } from "@cratis/arc/commands";
16
- import { CommandForm as He, asCommandFormField as Ue, withCommandFormFieldBinding as We } from "@cratis/arc.react/commands";
17
- import { CalendarField as Ge, CheckboxField as Ke, DropdownField as qe, InputTextField as Je, NumberField as Ye } from "@cratis/components/CommandForm";
18
- import { dynamicIconImports as Xe } from "lucide-react/dynamic";
19
- import Ze from "@primeuix/themes/lara";
8
+ import { ArcContext as De } from "@cratis/arc.react";
9
+ import { ObservableQueryFor as Oe, Paging as ke, QueryFor as Ae } from "@cratis/arc/queries";
10
+ import { resolveCommand as je, resolveExactQuery as Me } from "@cratis/scene.components";
11
+ import { Fragment as Ne, jsx as F, jsxs as I } from "react/jsx-runtime";
12
+ import { Button as L } from "primereact/button";
13
+ import { PrimeDialog as Pe, PrimeMessage as Fe, primeReactComponents as Ie, primeReactPackageManifest as Le } from "@cratis/scene.primereact";
14
+ import { DateOnly as Re, Guid as ze } from "@cratis/fundamentals";
15
+ import { Command as Be } from "@cratis/arc/commands";
16
+ import { CommandForm as Ve, asCommandFormField as He, withCommandFormFieldBinding as Ue } from "@cratis/arc.react/commands";
17
+ import { CalendarField as We, CheckboxField as Ge, DropdownField as Ke, InputTextField as qe, NumberField as Je } from "@cratis/components/CommandForm";
18
+ import { dynamicIconImports as Ye } from "lucide-react/dynamic";
19
+ import Xe from "@primeuix/themes/lara";
20
20
  //#region src/stageSource.ts
21
- function Qe(e) {
21
+ function Ze(e) {
22
22
  return {
23
23
  scene: async () => e.scene,
24
24
  routes: async () => e.routes,
@@ -26,23 +26,23 @@ function Qe(e) {
26
26
  strings: async (t) => e.strings[t] ?? {}
27
27
  };
28
28
  }
29
- var $e = {
29
+ var Qe = {
30
30
  scene: "stage/scene",
31
31
  routes: "stage/routes",
32
32
  locales: "stage/locales",
33
33
  strings: (e) => `stage/strings/${encodeURIComponent(e)}`
34
- }, et = e(void 0);
35
- function tt({ source: e, children: n }) {
36
- return t(et.Provider, { value: e }, n);
34
+ }, $e = e(void 0);
35
+ function et({ source: e, children: n }) {
36
+ return t($e.Provider, { value: e }, n);
37
37
  }
38
- function nt() {
39
- let e = r(et);
38
+ function tt() {
39
+ let e = r($e);
40
40
  if (!e) throw Error("A StageSourceProvider is required to render a Stage application.");
41
41
  return e;
42
42
  }
43
- $e.routes;
44
- function rt() {
45
- let e = nt(), [t, n] = c({
43
+ Qe.routes;
44
+ function nt() {
45
+ let e = tt(), [t, n] = c({
46
46
  routes: void 0,
47
47
  ready: !1
48
48
  });
@@ -63,25 +63,25 @@ function rt() {
63
63
  }
64
64
  //#endregion
65
65
  //#region src/applyQueryChangeSet.ts
66
- function L(e) {
66
+ function R(e) {
67
67
  return typeof e == "object" && e && "id" in e ? e.id : void 0;
68
68
  }
69
- function it(e) {
69
+ function rt(e) {
70
70
  if (typeof e != "object" || !e) return e;
71
71
  let t = e.toString();
72
72
  return t === "[object Object]" ? JSON.stringify(e) : t;
73
73
  }
74
- function at(e, t) {
75
- return e === t ? !0 : e == null || t == null ? !1 : typeof e == "object" && "equals" in e && typeof e.equals == "function" ? e.equals(t) : typeof t == "object" && "equals" in t && typeof t.equals == "function" ? t.equals(e) : it(e) === it(t);
74
+ function it(e, t) {
75
+ return e === t ? !0 : e == null || t == null ? !1 : typeof e == "object" && "equals" in e && typeof e.equals == "function" ? e.equals(t) : typeof t == "object" && "equals" in t && typeof t.equals == "function" ? t.equals(e) : rt(e) === rt(t);
76
76
  }
77
- function ot(e, t) {
78
- if (t.removed.length > 0 ? L(t.removed[0]) !== void 0 : t.replaced.length > 0) return [...e.filter((e) => !t.removed.some((t) => at(L(e), L(t)))).map((e) => t.replaced.find((t) => at(L(t), L(e))) ?? e), ...t.added];
77
+ function at(e, t) {
78
+ if (t.removed.length > 0 ? R(t.removed[0]) !== void 0 : t.replaced.length > 0) return [...e.filter((e) => !t.removed.some((t) => it(R(e), R(t)))).map((e) => t.replaced.find((t) => it(R(t), R(e))) ?? e), ...t.added];
79
79
  let n = new Set(t.removed.map((e) => JSON.stringify(e)));
80
80
  return [...e.filter((e) => !n.has(JSON.stringify(e))), ...t.added];
81
81
  }
82
82
  //#endregion
83
83
  //#region src/hostedBasePath.ts
84
- function st() {
84
+ function ot() {
85
85
  let e = globalThis.document?.baseURI ?? globalThis.location?.href;
86
86
  if (!e) return "";
87
87
  try {
@@ -90,62 +90,62 @@ function st() {
90
90
  return "";
91
91
  }
92
92
  }
93
- function ct(e) {
94
- return e || st();
93
+ function st(e) {
94
+ return e || ot();
95
95
  }
96
96
  //#endregion
97
97
  //#region src/queryExecutor.ts
98
- var lt;
99
- function ut(e) {
100
- lt = e;
98
+ var ct;
99
+ function lt(e) {
100
+ ct = e;
101
101
  }
102
- function dt(e, t) {
103
- let n = Ne(e);
104
- return n === "ambiguous" && t && (n = Ne(`${e}:${t.replace(/^\//, "").split("?")[0]}`)), ft(n) ? n : t ? lt?.(t) : void 0;
102
+ function ut(e, t) {
103
+ let n = Me(e);
104
+ return n === "ambiguous" && t && (n = Me(`${e}:${t.replace(/^\//, "").split("?")[0]}`)), dt(n) ? n : t ? ct?.(t) : void 0;
105
105
  }
106
- function ft(e) {
107
- return typeof e == "function" && (e.prototype instanceof je || e.prototype instanceof ke);
106
+ function dt(e) {
107
+ return typeof e == "function" && (e.prototype instanceof Ae || e.prototype instanceof Oe);
108
108
  }
109
- function pt(e, t) {
110
- e.setMicroservice(t.microservice), e.setApiBasePath(ct(t.apiBasePath)), e.setOrigin(t.origin ?? ""), e.setHttpHeadersCallback(t.httpHeadersCallback ?? (() => ({}))), e.paging = Ae.noPaging;
109
+ function ft(e, t) {
110
+ e.setMicroservice(t.microservice), e.setApiBasePath(st(t.apiBasePath)), e.setOrigin(t.origin ?? ""), e.setHttpHeadersCallback(t.httpHeadersCallback ?? (() => ({}))), e.paging = ke.noPaging;
111
111
  }
112
- function mt(e, t, n) {
112
+ function pt(e, t, n) {
113
113
  let r = new e();
114
- return pt(r, n), r.perform(t);
114
+ return ft(r, n), r.perform(t);
115
115
  }
116
- function ht(e, t, n, r) {
116
+ function mt(e, t, n, r) {
117
117
  let i = new e();
118
- if (i instanceof ke) return pt(i, n), i.subscribe(r, t);
118
+ if (i instanceof Oe) return ft(i, n), i.subscribe(r, t);
119
119
  }
120
- function gt(e) {
121
- if (R(e)) return typeof e.subject == "string" ? e.subject : typeof e.path == "string" ? e.path : void 0;
120
+ function ht(e) {
121
+ if (z(e)) return typeof e.subject == "string" ? e.subject : typeof e.path == "string" ? e.path : void 0;
122
122
  }
123
- var _t = "STAGE-SCENE-ACTION-001", vt = "item.";
124
- function R(e) {
123
+ var gt = "STAGE-SCENE-ACTION-001", _t = "item.";
124
+ function z(e) {
125
125
  return typeof e == "object" && !!e && !Array.isArray(e);
126
126
  }
127
- function yt(e, t) {
127
+ function vt(e, t) {
128
128
  let n = e;
129
129
  for (let e of t.split(".").filter(Boolean)) {
130
- if (!R(n)) return;
130
+ if (!z(n)) return;
131
131
  n = n[e];
132
132
  }
133
133
  return n;
134
134
  }
135
- function bt(e) {
135
+ function yt(e) {
136
136
  return e === null || [
137
137
  "string",
138
138
  "number",
139
139
  "boolean"
140
140
  ].includes(typeof e);
141
141
  }
142
- function xt(e, t) {
142
+ function bt(e, t) {
143
143
  if (typeof e == "number") return t[e];
144
144
  if (typeof e == "string") return t.find((t) => t.toLowerCase() === e.toLowerCase());
145
145
  }
146
- function St(e, t, n, r) {
146
+ function xt(e, t, n, r) {
147
147
  if (r !== void 0 && (t === "Equal" || t === "NotEqual")) {
148
- let i = xt(e, r), a = typeof n == "string" ? r.find((e) => e.toLowerCase() === n.toLowerCase()) : void 0;
148
+ let i = bt(e, r), a = typeof n == "string" ? r.find((e) => e.toLowerCase() === n.toLowerCase()) : void 0;
149
149
  return i === void 0 || a === void 0 ? !1 : t === "Equal" ? i === a : i !== a;
150
150
  }
151
151
  switch (t) {
@@ -160,57 +160,57 @@ function St(e, t, n, r) {
160
160
  default: return;
161
161
  }
162
162
  }
163
- function Ct(e, t) {
164
- if (R(e)) {
163
+ function St(e, t) {
164
+ if (z(e)) {
165
165
  if (e.kind === "comparison") {
166
- let n = gt(e.left);
167
- if (typeof n != "string" || !n.startsWith(vt) || typeof e.operator != "string" || !bt(e.right)) return;
166
+ let n = ht(e.left);
167
+ if (typeof n != "string" || !n.startsWith(_t) || typeof e.operator != "string" || !yt(e.right)) return;
168
168
  let r = Array.isArray(e.enumeration) && e.enumeration.every((e) => typeof e == "string") ? e.enumeration : void 0;
169
- return St(yt(t, n.slice(5)), e.operator, e.right, r);
169
+ return xt(vt(t, n.slice(5)), e.operator, e.right, r);
170
170
  }
171
171
  if (e.kind === "logical") {
172
- let n = Ct(e.left, t), r = Ct(e.right, t);
172
+ let n = St(e.left, t), r = St(e.right, t);
173
173
  return n === void 0 || r === void 0 ? void 0 : e.operator === "And" ? n && r : e.operator === "Or" ? n || r : void 0;
174
174
  }
175
175
  }
176
176
  }
177
- function wt(e) {
178
- return e.every((e) => Ct(e, {}) !== void 0);
177
+ function Ct(e) {
178
+ return e.every((e) => St(e, {}) !== void 0);
179
179
  }
180
- function Tt(e, t) {
181
- if (wt(e)) return e.findIndex((e) => Ct(e, t) === !0);
180
+ function wt(e, t) {
181
+ if (Ct(e)) return e.findIndex((e) => St(e, t) === !0);
182
182
  }
183
- function Et(e, t) {
184
- if (!R(e) || !Array.isArray(e.alternatives) || !R(t)) return;
185
- let n = Tt(e.alternatives, t);
183
+ function Tt(e, t) {
184
+ if (!z(e) || !Array.isArray(e.alternatives) || !z(t)) return;
185
+ let n = wt(e.alternatives, t);
186
186
  if (n !== void 0) {
187
187
  if (e.kind === "firstMatch" && typeof e.index == "number") return n === e.index;
188
188
  if (e.kind === "otherwise") return n === -1;
189
189
  }
190
190
  }
191
- function Dt(e, t) {
192
- if (e.startsWith(vt) && R(t)) return yt(t, e.slice(5));
191
+ function Et(e, t) {
192
+ if (e.startsWith(_t) && z(t)) return vt(t, e.slice(5));
193
193
  }
194
194
  //#endregion
195
195
  //#region src/stageSession.ts
196
- var Ot = "stage.session.";
197
- function kt(e) {
196
+ var Dt = "stage.session.";
197
+ function Ot(e) {
198
198
  try {
199
199
  return globalThis.localStorage?.getItem(`stage.session.${e}`) || void 0;
200
200
  } catch {
201
201
  return;
202
202
  }
203
203
  }
204
- function At(e) {
205
- let t = kt(e);
204
+ function kt(e) {
205
+ let t = Ot(e);
206
206
  if (t) return t;
207
207
  let n = globalThis.crypto.randomUUID();
208
208
  try {
209
- globalThis.localStorage?.setItem(`${Ot}${e}`, n);
209
+ globalThis.localStorage?.setItem(`${Dt}${e}`, n);
210
210
  } catch {}
211
211
  return n;
212
212
  }
213
- function jt() {
213
+ function At() {
214
214
  let e = {};
215
215
  try {
216
216
  let t = globalThis.localStorage;
@@ -225,7 +225,7 @@ function jt() {
225
225
  }
226
226
  //#endregion
227
227
  //#region src/stageData.tsx
228
- var Mt = "cratis.stage.data-changed", Nt = e({
228
+ var jt = "cratis.stage.data-changed", Mt = e({
229
229
  locale: "",
230
230
  locales: [],
231
231
  screen: "",
@@ -249,13 +249,13 @@ var Mt = "cratis.stage.data-changed", Nt = e({
249
249
  resolveArgument: () => void 0,
250
250
  registerQueryResult: () => void 0,
251
251
  refreshVersion: 0
252
- }), Pt = [
252
+ }), Nt = [
253
253
  500,
254
254
  1500,
255
255
  3e3
256
- ], Ft = {};
257
- function It({ routes: e, routesReady: t = !0, parameters: r = Ft, locale: a, locales: l, screen: u, children: d }) {
258
- let [f, p] = c({}), [m, h] = c(0), [g, y] = c({}), [b, x] = c(), [S, C] = c({}), [w, te] = c({}), [T, ne] = c({}), [re, ie] = c({ version: 0 }), ae = o(() => Ht(T), [T]), oe = n((e, t) => {
256
+ ], Pt = {};
257
+ function Ft({ routes: e, routesReady: t = !0, parameters: r = Pt, locale: a, locales: l, screen: u, children: d }) {
258
+ let [f, p] = c({}), [m, h] = c(0), [g, y] = c({}), [b, x] = c(), [S, C] = c({}), [te, ne] = c({}), [w, re] = c({}), [T, ie] = c({ version: 0 }), E = o(() => Vt(w), [w]), ae = n((e, t) => {
259
259
  p((n) => {
260
260
  if (!t) {
261
261
  let { [e]: t, ...r } = n;
@@ -266,144 +266,144 @@ function It({ routes: e, routesReady: t = !0, parameters: r = Ft, locale: a, loc
266
266
  [e]: t
267
267
  };
268
268
  });
269
- }, []), E = r, D = o(() => jt(), [m]), se = o(() => ({
269
+ }, []), D = r, O = o(() => At(), [m]), oe = o(() => ({
270
270
  name: u,
271
271
  keys: {
272
- ...D,
272
+ ...O,
273
273
  ...r
274
274
  }
275
275
  }), [
276
276
  r,
277
277
  u,
278
- D
279
- ]), ce = n((e, t) => {
278
+ O
279
+ ]), se = n((e, t) => {
280
280
  y((n) => ({
281
281
  ...n,
282
282
  [e]: t
283
283
  })), x(t ? e : (t) => t === e ? void 0 : t);
284
- }, []), le = n((e) => {
284
+ }, []), ce = n((e) => {
285
285
  y((t) => ({
286
286
  ...t,
287
287
  [e]: void 0
288
288
  })), x((t) => t === e ? void 0 : t);
289
- }, []), ue = n((e, t, n) => {
290
- te((r) => {
291
- let i = H(r[e]) ? r[e] : {};
289
+ }, []), le = n((e, t, n) => {
290
+ ne((r) => {
291
+ let i = U(r[e]) ? r[e] : {};
292
292
  return {
293
293
  ...r,
294
- [e]: Vt(i, t.split(".").filter(Boolean), n)
294
+ [e]: Bt(i, t.split(".").filter(Boolean), n)
295
295
  };
296
296
  });
297
- }, []), O = n((e) => ie((t) => ({
297
+ }, []), k = n((e) => ie((t) => ({
298
298
  query: e,
299
299
  version: t.version + 1
300
- })), []), de = s([]), fe = n(() => {
301
- h((e) => e + 1), O();
302
- for (let e of Pt) de.current.push(setTimeout(() => O(), e));
303
- }, [O]);
304
- i(() => () => de.current.forEach(clearTimeout), []), i(() => {
305
- let e = () => O(), t = (e) => O(e.detail?.query);
306
- return globalThis.addEventListener(Mt, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
307
- globalThis.removeEventListener(Mt, e), globalThis.removeEventListener("cratis.scene.refresh", t);
300
+ })), []), ue = s([]), de = n(() => {
301
+ h((e) => e + 1), k();
302
+ for (let e of Nt) ue.current.push(setTimeout(() => k(), e));
303
+ }, [k]);
304
+ i(() => () => ue.current.forEach(clearTimeout), []), i(() => {
305
+ let e = () => k(), t = (e) => k(e.detail?.query);
306
+ return globalThis.addEventListener(jt, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
307
+ globalThis.removeEventListener(jt, e), globalThis.removeEventListener("cratis.scene.refresh", t);
308
308
  };
309
- }, [O]);
310
- let k = b ? g[b] : void 0, pe = n((e) => {
309
+ }, [k]);
310
+ let A = b ? g[b] : void 0, fe = n((e) => {
311
311
  if (e === void 0 || typeof e != "string" && e.path === "$guard") return;
312
- if (typeof e == "string") return Ut(e, k, g, f, S, E, se, a, l);
313
- let t = Rt(k, f, S, {
314
- ...ae,
315
- ...w
312
+ if (typeof e == "string") return Ht(e, A, g, f, S, D, oe, a, l);
313
+ let t = Lt(A, f, S, {
314
+ ...E,
315
+ ...te
316
316
  }, g);
317
317
  if (!e.kind && e.path.startsWith("component.")) return v(e.path, t);
318
- if (!e.kind) return Ut(e.path, k, g, f, S, E, se, a, l);
318
+ if (!e.kind) return Ht(e.path, A, g, f, S, D, oe, a, l);
319
319
  let n = ee(e, t);
320
320
  return n.length > 0 && console.warn(`Scene binding could not be resolved: ${n.map((e) => `${e.code}:${e.message}`).join("; ")}`), _(t)(e);
321
321
  }, [
322
- w,
322
+ te,
323
323
  a,
324
324
  l,
325
325
  S,
326
+ D,
326
327
  E,
327
- ae,
328
328
  f,
329
- se,
330
- k,
329
+ oe,
330
+ A,
331
331
  g
332
- ]), me = n((e) => e ? v(e, Rt(k, f, S, {
333
- ...ae,
334
- ...w
332
+ ]), pe = n((e) => e ? v(e, Lt(A, f, S, {
333
+ ...E,
334
+ ...te
335
335
  }, g)) : void 0, [
336
- w,
336
+ te,
337
337
  S,
338
- ae,
338
+ E,
339
339
  f,
340
- k,
340
+ A,
341
341
  g
342
- ]), A = n((e, t) => ne((n) => ({
342
+ ]), j = n((e, t) => re((n) => ({
343
343
  ...n,
344
344
  [e]: t
345
- })), []), he = n((e) => ne((t) => {
345
+ })), []), me = n((e) => re((t) => {
346
346
  if (!Object.prototype.hasOwnProperty.call(t, e)) return t;
347
347
  let n = { ...t };
348
348
  return delete n[e], n;
349
- }), []), j = o(() => Rt(void 0, f, {}, {}, {}).queryResults, [f]), ge = o(() => ({
349
+ }), []), M = o(() => Lt(void 0, f, {}, {}, {}).queryResults, [f]), he = o(() => ({
350
350
  locale: a,
351
351
  locales: l,
352
352
  screen: u,
353
353
  routes: e,
354
354
  routesReady: t,
355
- parameters: E,
356
- session: D,
355
+ parameters: D,
356
+ session: O,
357
357
  queries: f,
358
- selected: k,
358
+ selected: A,
359
359
  selections: g,
360
- selectRow: ce,
361
- clearSelection: le,
362
- setState: (e, t) => C((n) => Vt(n, e.split(".").filter(Boolean), t)),
363
- setComponentOutput: ue,
364
- publishComponentOutputs: A,
365
- withdrawComponentOutputs: he,
366
- queryResults: j,
367
- refreshQuery: O,
368
- refreshAfterCommand: fe,
369
- resolveBinding: pe,
370
- resolveArgument: me,
371
- registerQueryResult: oe,
372
- refreshVersion: re.version,
373
- refreshQueryName: re.query
360
+ selectRow: se,
361
+ clearSelection: ce,
362
+ setState: (e, t) => C((n) => Bt(n, e.split(".").filter(Boolean), t)),
363
+ setComponentOutput: le,
364
+ publishComponentOutputs: j,
365
+ withdrawComponentOutputs: me,
366
+ queryResults: M,
367
+ refreshQuery: k,
368
+ refreshAfterCommand: de,
369
+ resolveBinding: fe,
370
+ resolveArgument: pe,
371
+ registerQueryResult: ae,
372
+ refreshVersion: T.version,
373
+ refreshQueryName: T.query
374
374
  }), [
375
- le,
375
+ ce,
376
376
  a,
377
377
  l,
378
378
  f,
379
- fe,
380
- O,
381
- re.query,
382
- re.version,
383
- oe,
384
- A,
385
- he,
379
+ de,
380
+ k,
381
+ T.query,
382
+ T.version,
383
+ ae,
386
384
  j,
387
385
  me,
386
+ M,
388
387
  pe,
388
+ fe,
389
389
  e,
390
390
  t,
391
- E,
392
391
  D,
392
+ O,
393
393
  u,
394
- ce,
395
- k,
394
+ se,
395
+ A,
396
396
  g,
397
- ue
397
+ le
398
398
  ]);
399
- return /* @__PURE__ */ P(Nt.Provider, {
400
- value: ge,
399
+ return /* @__PURE__ */ F(Mt.Provider, {
400
+ value: he,
401
401
  children: d
402
402
  });
403
403
  }
404
- var z = () => r(Nt);
405
- function B(e) {
406
- let { refreshQueryName: t, refreshVersion: a, registerQueryResult: o } = z(), l = r(Oe), u = e.publish !== !1, d = n((e, t) => {
404
+ var B = () => r(Mt);
405
+ function V(e) {
406
+ let { refreshQueryName: t, refreshVersion: a, registerQueryResult: o } = B(), l = r(De), u = e.publish !== !1, d = n((e, t) => {
407
407
  u && o(e, t);
408
408
  }, [u, o]), [f, p] = c([]), [m, h] = c(""), [g, _] = c(!1), [v, y] = c(0), b = s(0), x = s(!1), ee = e.ready ?? !0, S = !!e.name && ee, C = JSON.stringify(e.arguments ?? {});
409
409
  return i(() => {
@@ -413,21 +413,21 @@ function B(e) {
413
413
  }
414
414
  let t = b.current + 1;
415
415
  b.current = t;
416
- let n = new AbortController(), r = JSON.parse(C), i = dt(e.name ?? "", e.route);
416
+ let n = new AbortController(), r = JSON.parse(C), i = ut(e.name ?? "", e.route);
417
417
  _(!0), h("");
418
418
  let a = (e) => {
419
419
  b.current !== t || n.signal.aborted || (x.current = !1, p([]), h(e instanceof Error ? e.message : String(e)), _(!1));
420
420
  }, o = [], s = (e) => {
421
421
  if (b.current !== t || n.signal.aborted) return;
422
- let r = Kt(e);
422
+ let r = Gt(e);
423
423
  if (r) {
424
424
  a(Error(r));
425
425
  return;
426
426
  }
427
- e.isReady !== !1 && (o = e.changeSet && Array.isArray(e.data) && e.data.length === 0 && Array.isArray(o) ? ot(o, e.changeSet) : e.data, p(qt(o)), h(""), _(!1));
427
+ e.isReady !== !1 && (o = e.changeSet && Array.isArray(e.data) && e.data.length === 0 && Array.isArray(o) ? at(o, e.changeSet) : e.data, p(Kt(o)), h(""), _(!1));
428
428
  };
429
429
  if (!i) return a(/* @__PURE__ */ Error(`The modeled query “${e.name}” is not registered by this Stage.`)), () => n.abort();
430
- let c = i.prototype instanceof ke, u = () => Promise.resolve().then(() => mt(i, c ? {
430
+ let c = i.prototype instanceof Oe, u = () => Promise.resolve().then(() => pt(i, c ? {
431
431
  ...r,
432
432
  waitForFirstResult: !0
433
433
  } : r, l)).then(s).catch(a);
@@ -437,7 +437,7 @@ function B(e) {
437
437
  b.current !== t || n.signal.aborted || (x.current = !1, f?.unsubscribe(), f = void 0, u());
438
438
  }, 15e3);
439
439
  try {
440
- f = ht(i, r, l, (e) => {
440
+ f = mt(i, r, l, (e) => {
441
441
  e.isReady !== !1 && globalThis.clearTimeout(m), s(e);
442
442
  });
443
443
  } catch {
@@ -498,29 +498,29 @@ function B(e) {
498
498
  }
499
499
  };
500
500
  }
501
- function Lt() {
502
- globalThis.dispatchEvent(new CustomEvent(Mt));
501
+ function It() {
502
+ globalThis.dispatchEvent(new CustomEvent(jt));
503
503
  }
504
- function Rt(e, t, n, r, i) {
504
+ function Lt(e, t, n, r, i) {
505
505
  let a = Object.entries(t).sort(([, e], [, t]) => Number(e.list === !0) - Number(t.list === !0));
506
506
  return {
507
507
  dataContext: e,
508
508
  queryResults: Object.fromEntries(a.flatMap(([e, t]) => {
509
- let n = t.list ? t.rows : zt(t.rows);
509
+ let n = t.list ? t.rows : Rt(t.rows);
510
510
  return [
511
511
  [e, n],
512
512
  ...t.name ? [[t.name, n]] : [],
513
513
  ...t.alias ? [[t.alias, n]] : []
514
514
  ];
515
515
  })),
516
- componentOutputs: Bt(r, i),
516
+ componentOutputs: zt(r, i),
517
517
  state: n
518
518
  };
519
519
  }
520
- function zt(e) {
520
+ function Rt(e) {
521
521
  return e.length === 1 ? e[0] : e;
522
522
  }
523
- function Bt(e, t) {
523
+ function zt(e, t) {
524
524
  let n = { ...e };
525
525
  for (let [e, r] of Object.entries(t)) r && (n[e] = {
526
526
  ...r,
@@ -528,17 +528,17 @@ function Bt(e, t) {
528
528
  });
529
529
  return n;
530
530
  }
531
- function Vt(e, t, n) {
531
+ function Bt(e, t, n) {
532
532
  let [r, ...i] = t;
533
533
  return r ? i.length === 0 ? {
534
534
  ...e,
535
535
  [r]: n
536
536
  } : {
537
537
  ...e,
538
- [r]: Vt(H(e[r]) ? e[r] : {}, i, n)
538
+ [r]: Bt(U(e[r]) ? e[r] : {}, i, n)
539
539
  } : e;
540
540
  }
541
- function Ht(e) {
541
+ function Vt(e) {
542
542
  let t = {};
543
543
  for (let n of Object.values(e)) for (let [e, r] of Object.entries(n)) t[e] = {
544
544
  ...t[e],
@@ -546,30 +546,30 @@ function Ht(e) {
546
546
  };
547
547
  return t;
548
548
  }
549
- function Ut(e, t, n, r, i, a, o, s, c) {
549
+ function Ht(e, t, n, r, i, a, o, s, c) {
550
550
  if (!e) return;
551
551
  let l = e.replace(/^\$\.?/, "").split(".").filter(Boolean);
552
552
  if (l.length !== 0) {
553
553
  if (l[0] === "screen") {
554
554
  if (l.length === 1) return { name: o.name };
555
- let e = V(o, l.slice(1));
556
- return e === void 0 && l[1] === "keys" && l.length === 3 ? V(t, [l[2]]) : e;
555
+ let e = H(o, l.slice(1));
556
+ return e === void 0 && l[1] === "keys" && l.length === 3 ? H(t, [l[2]]) : e;
557
557
  }
558
- return l[0] === "locale" ? s : l[0] === "locales" ? c : l[0] === "query" ? Gt(r, l[1], l.slice(2).join(".")) : l[0] === "data" || l[0] === "selected" || l[0] === "current" ? Wt(l.slice(1).join("."), t, n) : l[0] === "state" ? V(i, l.slice(1)) : l[0] === "parameters" ? l.length === 1 ? a : a[l[1]] : V(t, l) ?? Gt(r, void 0, l.join(".")) ?? V(i, l);
558
+ return l[0] === "locale" ? s : l[0] === "locales" ? c : l[0] === "query" ? Wt(r, l[1], l.slice(2).join(".")) : l[0] === "data" || l[0] === "selected" || l[0] === "current" ? Ut(l.slice(1).join("."), t, n) : l[0] === "state" ? H(i, l.slice(1)) : l[0] === "parameters" ? l.length === 1 ? a : a[l[1]] : H(t, l) ?? Wt(r, void 0, l.join(".")) ?? H(i, l);
559
559
  }
560
560
  }
561
- function Wt(e, t, n) {
561
+ function Ut(e, t, n) {
562
562
  let r = e?.split(".").filter(Boolean) ?? [];
563
- return r.length > 0 && Object.hasOwn(n, r[0]) ? V(n[r[0]], r.slice(1)) : r.length === 0 ? t : V(t, r);
563
+ return r.length > 0 && Object.hasOwn(n, r[0]) ? H(n[r[0]], r.slice(1)) : r.length === 0 ? t : H(t, r);
564
564
  }
565
- function Gt(e, t, n) {
565
+ function Wt(e, t, n) {
566
566
  let r = Object.entries(e).filter(([e, n]) => t ? n.name === t || e === t : !n.list).map(([, e]) => e.rows);
567
567
  if (r.length === 0) return;
568
568
  let i = r.flat(), a = n?.split(".").filter(Boolean) ?? [];
569
- return a.length === 0 ? i : i.length === 1 ? V(i[0], a) : i.map((e) => V(e, a));
569
+ return a.length === 0 ? i : i.length === 1 ? H(i[0], a) : i.map((e) => H(e, a));
570
570
  }
571
- function Kt(e) {
572
- if (!H(e)) return "";
571
+ function Gt(e) {
572
+ if (!U(e)) return "";
573
573
  if (e.isAuthorized === !1) return "The query answered 403.";
574
574
  if (e.isValid === !1 || e.hasExceptions === !0 || e.isSuccess === !1) {
575
575
  let t = Array.isArray(e.exceptionMessages) ? e.exceptionMessages.filter((e) => typeof e == "string") : [];
@@ -577,58 +577,58 @@ function Kt(e) {
577
577
  }
578
578
  return "";
579
579
  }
580
- function qt(e) {
581
- return Array.isArray(e) ? e.filter(H) : H(e) ? [e] : [];
580
+ function Kt(e) {
581
+ return Array.isArray(e) ? e.filter(U) : U(e) ? [e] : [];
582
582
  }
583
- function V(e, t) {
583
+ function H(e, t) {
584
584
  let n = e;
585
585
  for (let e of t) {
586
- if (!H(n)) return;
586
+ if (!U(n)) return;
587
587
  n = n[e];
588
588
  }
589
589
  return n;
590
590
  }
591
- function H(e) {
591
+ function U(e) {
592
592
  return typeof e == "object" && !!e && !Array.isArray(e);
593
593
  }
594
594
  //#endregion
595
595
  //#region src/stageComponentOutputs.ts
596
- function Jt() {
597
- let e = a(), { publishComponentOutputs: t, withdrawComponentOutputs: r } = z();
596
+ function qt() {
597
+ let e = a(), { publishComponentOutputs: t, withdrawComponentOutputs: r } = B();
598
598
  return i(() => () => r(e), [e, r]), n((n) => t(e, n), [t, e]);
599
599
  }
600
600
  //#endregion
601
601
  //#region src/commandExecutor.ts
602
- function U(e, t, n) {
602
+ function W(e, t, n) {
603
603
  for (let r of [
604
604
  t,
605
605
  n?.replace(/^\//, ""),
606
606
  e
607
607
  ]) {
608
608
  if (!r) continue;
609
- let t = Me(r);
610
- if (Yt(t) && !(r === e && n && new t().route.replace(/^\//, "") !== n.replace(/^\//, ""))) return t;
609
+ let t = je(r);
610
+ if (Jt(t) && !(r === e && n && new t().route.replace(/^\//, "") !== n.replace(/^\//, ""))) return t;
611
611
  }
612
612
  }
613
- function Yt(e) {
614
- return typeof e == "function" && e.prototype instanceof Ve;
613
+ function Jt(e) {
614
+ return typeof e == "function" && e.prototype instanceof Be;
615
615
  }
616
- function Xt(e, t) {
617
- return e.setApiBasePath(ct(t)), e;
616
+ function Yt(e, t) {
617
+ return e.setApiBasePath(st(t)), e;
618
618
  }
619
- async function Zt(e, t, n) {
620
- let r = U(e);
619
+ async function Xt(e, t, n) {
620
+ let r = W(e);
621
621
  if (!r) return {
622
622
  isSuccess: !1,
623
623
  validationErrors: [],
624
624
  messages: [`The modeled command “${e}” is not registered by this Stage.`]
625
625
  };
626
626
  let i = new r();
627
- i.setMicroservice(n.microservice), i.setApiBasePath(ct(n.apiBasePath)), i.setOrigin(n.origin ?? ""), i.setHttpHeadersCallback(n.httpHeadersCallback ?? (() => ({})));
627
+ i.setMicroservice(n.microservice), i.setApiBasePath(st(n.apiBasePath)), i.setOrigin(n.origin ?? ""), i.setHttpHeadersCallback(n.httpHeadersCallback ?? (() => ({})));
628
628
  for (let e of i.propertyDescriptors) Object.prototype.hasOwnProperty.call(t, e.name) && Reflect.set(i, e.name, t[e.name]);
629
- return Qt(e, await i.execute());
629
+ return Zt(e, await i.execute());
630
630
  }
631
- function Qt(e, t) {
631
+ function Zt(e, t) {
632
632
  let n = t.isSuccess && t.isAuthorized && t.isValid && !t.hasExceptions, r = t.isValid ? [] : t.validationResults.flatMap((e) => (e.members.length > 0 ? e.members : [""]).map((t) => ({
633
633
  member: t,
634
634
  message: e.message
@@ -644,53 +644,53 @@ function Qt(e, t) {
644
644
  messages: n || i.length > 0 ? i : [`“${e}” was not accepted.`]
645
645
  };
646
646
  }
647
- function $t() {
648
- let e = r(Oe);
649
- return n((t, n) => Zt(t, n, e), [e]);
647
+ function Qt() {
648
+ let e = r(De);
649
+ return n((t, n) => Xt(t, n, e), [e]);
650
650
  }
651
651
  //#endregion
652
652
  //#region src/stageNavigation.ts
653
- function en(e, t = {}) {
653
+ function $t(e, t = {}) {
654
654
  let n = new URLSearchParams(Object.entries(t).filter(([, e]) => e !== "")).toString();
655
655
  return n ? `#/${encodeURIComponent(e)}?${n}` : `#/${encodeURIComponent(e)}`;
656
656
  }
657
- function W(e, t = {}) {
657
+ function G(e, t = {}) {
658
658
  if (!globalThis.location) return;
659
- let n = en(e, t);
659
+ let n = $t(e, t);
660
660
  globalThis.location.hash !== n && (globalThis.location.hash = n);
661
661
  }
662
- function tn(e) {
663
- return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null && e !== "" && (typeof e != "object" || e instanceof Be)).map(([e, t]) => [e, String(t)]));
662
+ function en(e) {
663
+ return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null && e !== "" && (typeof e != "object" || e instanceof ze)).map(([e, t]) => [e, String(t)]));
664
664
  }
665
665
  //#endregion
666
666
  //#region src/stageFormSchema.ts
667
- var nn = 8;
668
- function G(e) {
667
+ var tn = 8;
668
+ function K(e) {
669
669
  if (!e) return [];
670
670
  try {
671
- return rn(JSON.parse(e), 0);
671
+ return nn(JSON.parse(e), 0);
672
672
  } catch {
673
673
  return [];
674
674
  }
675
675
  }
676
- function rn(e, t) {
677
- let n = Object.prototype.hasOwnProperty.call(e, "required"), r = Array.isArray(e.required) ? new Set(e.required.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set(), i = fn(e.properties) ? e.properties : {};
678
- return Object.entries(i).map(([e, i]) => an(e, i, !n || r.has(e), t));
676
+ function nn(e, t) {
677
+ let n = Object.prototype.hasOwnProperty.call(e, "required"), r = Array.isArray(e.required) ? new Set(e.required.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set(), i = dn(e.properties) ? e.properties : {};
678
+ return Object.entries(i).map(([e, i]) => rn(e, i, !n || r.has(e), t));
679
679
  }
680
- function an(e, t, n, r) {
680
+ function rn(e, t, n, r) {
681
681
  return {
682
682
  name: e,
683
683
  identifier: t?.format === "uuid" && typeof t["x-concept"] == "string" ? t["x-concept"] : void 0,
684
684
  ...t?.["x-identity"] === !0 ? { identity: !0 } : {},
685
685
  required: n,
686
- ...on(t, r)
686
+ ...an(t, r)
687
687
  };
688
688
  }
689
- function on(e, t) {
689
+ function an(e, t) {
690
690
  let n = e?.type;
691
691
  if (Array.isArray(n)) {
692
692
  let r = n.filter((e) => e !== "null");
693
- return r.length === 1 ? on({
693
+ return r.length === 1 ? an({
694
694
  ...e,
695
695
  type: r[0]
696
696
  }, t) : { unsupportedReason: `union type ${JSON.stringify(n)}` };
@@ -701,8 +701,8 @@ function on(e, t) {
701
701
  type: "date",
702
702
  withTime: e.format === "date-time"
703
703
  };
704
- if (n === "array") return sn(e, t);
705
- if (n === "object") return cn(e, t);
704
+ if (n === "array") return on(e, t);
705
+ if (n === "object") return sn(e, t);
706
706
  if (n === void 0 || n === "string") {
707
707
  let t = Array.isArray(e?.enum) ? e.enum.filter((e) => typeof e == "string") : [];
708
708
  return t.length > 0 ? {
@@ -712,77 +712,77 @@ function on(e, t) {
712
712
  }
713
713
  return { unsupportedReason: `type ${String(n)}` };
714
714
  }
715
- function sn(e, t) {
715
+ function on(e, t) {
716
716
  let n = { unsupportedReason: "array fields are not supported by the native Stage command form" };
717
- if (t >= nn || e?.items === void 0) return n;
718
- let r = an("", e.items, !0, t + 1);
717
+ if (t >= tn || e?.items === void 0) return n;
718
+ let r = rn("", e.items, !0, t + 1);
719
719
  return r.unsupportedReason || r.item ? n : { item: r };
720
720
  }
721
- function cn(e, t) {
721
+ function sn(e, t) {
722
722
  let n = { unsupportedReason: "object fields are not supported by the native Stage command form" };
723
- if (t >= nn || !fn(e?.properties) || Object.keys(e.properties).length === 0) return n;
724
- let r = rn(e, t + 1), i = r.find((e) => e.unsupportedReason);
723
+ if (t >= tn || !dn(e?.properties) || Object.keys(e.properties).length === 0) return n;
724
+ let r = nn(e, t + 1), i = r.find((e) => e.unsupportedReason);
725
725
  return i ? { unsupportedReason: `its member “${i.name}” is not supported: ${i.unsupportedReason}` } : { members: r };
726
726
  }
727
- function K(e) {
727
+ function q(e) {
728
728
  let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").toLowerCase();
729
729
  return t.charAt(0).toUpperCase() + t.slice(1);
730
730
  }
731
- function ln(e, t, n) {
731
+ function cn(e, t, n) {
732
732
  if (t != null) {
733
- if (e.members && fn(t)) for (let r of e.members) {
734
- let e = t[r.name], i = K(r.name);
735
- if (un(e)) {
733
+ if (e.members && dn(t)) for (let r of e.members) {
734
+ let e = t[r.name], i = q(r.name);
735
+ if (ln(e)) {
736
736
  if (r.required) return `${n}: ${i} is required`;
737
737
  continue;
738
738
  }
739
- let a = ln(r, e, `${n} ${i.toLowerCase()}`);
739
+ let a = cn(r, e, `${n} ${i.toLowerCase()}`);
740
740
  if (a) return a;
741
741
  }
742
742
  if (e.item && Array.isArray(t)) for (let [r, i] of t.entries()) {
743
- let t = un(i) ? `${n} ${r + 1} is required` : ln(e.item, i, `${n} ${r + 1}`);
743
+ let t = ln(i) ? `${n} ${r + 1} is required` : cn(e.item, i, `${n} ${r + 1}`);
744
744
  if (t) return t;
745
745
  }
746
746
  }
747
747
  }
748
- function un(e) {
748
+ function ln(e) {
749
749
  return e == null || e === "";
750
750
  }
751
- function dn(e, t) {
752
- return t == null ? t : e.options ? typeof t == "number" ? e.options[t] ?? t : typeof t == "string" ? e.options.find((e) => e.toLowerCase() === t.toLowerCase()) ?? t : t : e.members && fn(t) ? Object.fromEntries(Object.entries(t).map(([t, n]) => {
751
+ function un(e, t) {
752
+ return t == null ? t : e.options ? typeof t == "number" ? e.options[t] ?? t : typeof t == "string" ? e.options.find((e) => e.toLowerCase() === t.toLowerCase()) ?? t : t : e.members && dn(t) ? Object.fromEntries(Object.entries(t).map(([t, n]) => {
753
753
  let r = e.members?.find((e) => e.name === t);
754
- return [t, r ? dn(r, n) : n];
755
- })) : e.item && Array.isArray(t) ? t.map((t) => dn(e.item, t)) : t;
754
+ return [t, r ? un(r, n) : n];
755
+ })) : e.item && Array.isArray(t) ? t.map((t) => un(e.item, t)) : t;
756
756
  }
757
- function fn(e) {
757
+ function dn(e) {
758
758
  return typeof e == "object" && !!e && !Array.isArray(e);
759
759
  }
760
760
  //#endregion
761
761
  //#region src/StageValueFields.tsx
762
- var pn = Ue((e) => /* @__PURE__ */ P(mn, {
762
+ var fn = He((e) => /* @__PURE__ */ F(pn, {
763
763
  descriptor: e.descriptor,
764
- label: e.title ?? K(e.descriptor.name),
764
+ label: e.title ?? q(e.descriptor.name),
765
765
  value: e.value,
766
766
  onChange: e.onChange,
767
767
  onBlur: e.onBlur,
768
768
  invalid: e.invalid
769
769
  }), { defaultValue: void 0 });
770
- function mn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
771
- return e.members ? /* @__PURE__ */ P(hn, {
770
+ function pn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
771
+ return e.members ? /* @__PURE__ */ F(mn, {
772
772
  descriptor: e,
773
773
  label: t,
774
774
  value: n,
775
775
  onChange: r,
776
776
  onBlur: i,
777
777
  invalid: a
778
- }) : e.item ? /* @__PURE__ */ P(gn, {
778
+ }) : e.item ? /* @__PURE__ */ F(hn, {
779
779
  descriptor: e,
780
780
  label: t,
781
781
  value: n,
782
782
  onChange: r,
783
783
  onBlur: i,
784
784
  invalid: a
785
- }) : /* @__PURE__ */ P(_n, {
785
+ }) : /* @__PURE__ */ F(gn, {
786
786
  descriptor: e,
787
787
  label: t,
788
788
  value: n,
@@ -791,14 +791,14 @@ function mn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
791
791
  invalid: a
792
792
  });
793
793
  }
794
- function hn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
795
- let o = bn(n) ? n : {};
796
- return /* @__PURE__ */ F("fieldset", {
794
+ function mn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
795
+ let o = yn(n) ? n : {};
796
+ return /* @__PURE__ */ I("fieldset", {
797
797
  className: "stage-record-field",
798
798
  "data-invalid": a ? "true" : void 0,
799
- children: [/* @__PURE__ */ P("legend", { children: t }), (e.members ?? []).map((e) => /* @__PURE__ */ P(mn, {
799
+ children: [/* @__PURE__ */ F("legend", { children: t }), (e.members ?? []).map((e) => /* @__PURE__ */ F(pn, {
800
800
  descriptor: e,
801
- label: K(e.name),
801
+ label: q(e.name),
802
802
  value: o[e.name],
803
803
  onBlur: i,
804
804
  onChange: (t) => r({
@@ -808,74 +808,74 @@ function hn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
808
808
  }, e.name))]
809
809
  });
810
810
  }
811
- function gn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
811
+ function hn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
812
812
  let o = e.item, s = Array.isArray(n) ? n : [], c = (e) => r(e);
813
- return /* @__PURE__ */ F("fieldset", {
813
+ return /* @__PURE__ */ I("fieldset", {
814
814
  className: "stage-list-field",
815
815
  "data-invalid": a ? "true" : void 0,
816
816
  children: [
817
- /* @__PURE__ */ P("legend", { children: t }),
818
- s.length === 0 && /* @__PURE__ */ P("p", {
817
+ /* @__PURE__ */ F("legend", { children: t }),
818
+ s.length === 0 && /* @__PURE__ */ F("p", {
819
819
  className: "stage-note",
820
820
  children: "Nothing added yet."
821
821
  }),
822
- s.map((e, n) => /* @__PURE__ */ F("div", {
822
+ s.map((e, n) => /* @__PURE__ */ I("div", {
823
823
  className: "stage-list-field__row",
824
- children: [/* @__PURE__ */ P(mn, {
824
+ children: [/* @__PURE__ */ F(pn, {
825
825
  descriptor: o,
826
826
  label: `${t} ${n + 1}`,
827
827
  value: e,
828
828
  onBlur: i,
829
829
  onChange: (e) => c(s.map((t, r) => r === n ? e : t))
830
- }), /* @__PURE__ */ P("button", {
830
+ }), /* @__PURE__ */ F("button", {
831
831
  type: "button",
832
832
  "aria-label": `Remove ${t} ${n + 1}`,
833
833
  onClick: () => c(s.filter((e, t) => t !== n)),
834
834
  children: "Remove"
835
835
  })]
836
836
  }, n)),
837
- /* @__PURE__ */ P("button", {
837
+ /* @__PURE__ */ F("button", {
838
838
  type: "button",
839
839
  "aria-label": `Add ${t}`,
840
- onClick: () => c([...s, vn(o)]),
840
+ onClick: () => c([...s, _n(o)]),
841
841
  children: "Add"
842
842
  })
843
843
  ]
844
844
  });
845
845
  }
846
- function _n({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
846
+ function gn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
847
847
  let o = {
848
848
  "aria-invalid": a ? !0 : void 0,
849
849
  onBlur: i
850
850
  };
851
- if (e.options) return /* @__PURE__ */ F("label", {
851
+ if (e.options) return /* @__PURE__ */ I("label", {
852
852
  className: "stage-value-field",
853
- children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ F("select", {
853
+ children: [/* @__PURE__ */ F("span", { children: t }), /* @__PURE__ */ I("select", {
854
854
  ...o,
855
855
  value: typeof n == "string" ? n : "",
856
856
  onChange: (e) => r(e.target.value === "" ? void 0 : e.target.value),
857
- children: [/* @__PURE__ */ P("option", {
857
+ children: [/* @__PURE__ */ F("option", {
858
858
  value: "",
859
859
  children: ""
860
- }), e.options.map((e) => /* @__PURE__ */ P("option", {
860
+ }), e.options.map((e) => /* @__PURE__ */ F("option", {
861
861
  value: e,
862
- children: K(e)
862
+ children: q(e)
863
863
  }, e))]
864
864
  })]
865
865
  });
866
866
  switch (e.type) {
867
- case "boolean": return /* @__PURE__ */ F("label", {
867
+ case "boolean": return /* @__PURE__ */ I("label", {
868
868
  className: "stage-value-field stage-value-field--check",
869
- children: [/* @__PURE__ */ P("input", {
869
+ children: [/* @__PURE__ */ F("input", {
870
870
  ...o,
871
871
  type: "checkbox",
872
872
  checked: n === !0,
873
873
  onChange: (e) => r(e.target.checked)
874
- }), /* @__PURE__ */ P("span", { children: t })]
874
+ }), /* @__PURE__ */ F("span", { children: t })]
875
875
  });
876
- case "number": return /* @__PURE__ */ F("label", {
876
+ case "number": return /* @__PURE__ */ I("label", {
877
877
  className: "stage-value-field",
878
- children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ P("input", {
878
+ children: [/* @__PURE__ */ F("span", { children: t }), /* @__PURE__ */ F("input", {
879
879
  ...o,
880
880
  type: "number",
881
881
  step: "any",
@@ -883,18 +883,18 @@ function _n({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
883
883
  onChange: (e) => r(e.target.value === "" ? void 0 : Number(e.target.value))
884
884
  })]
885
885
  });
886
- case "date": return /* @__PURE__ */ F("label", {
886
+ case "date": return /* @__PURE__ */ I("label", {
887
887
  className: "stage-value-field",
888
- children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ P("input", {
888
+ children: [/* @__PURE__ */ F("span", { children: t }), /* @__PURE__ */ F("input", {
889
889
  ...o,
890
890
  type: e.withTime ? "datetime-local" : "date",
891
891
  value: typeof n == "string" ? n.slice(0, e.withTime ? 16 : 10) : "",
892
- onChange: (t) => r(t.target.value === "" ? void 0 : yn(t.target.value, e.withTime === !0))
892
+ onChange: (t) => r(t.target.value === "" ? void 0 : vn(t.target.value, e.withTime === !0))
893
893
  })]
894
894
  });
895
- default: return /* @__PURE__ */ F("label", {
895
+ default: return /* @__PURE__ */ I("label", {
896
896
  className: "stage-value-field",
897
- children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ P("input", {
897
+ children: [/* @__PURE__ */ F("span", { children: t }), /* @__PURE__ */ F("input", {
898
898
  ...o,
899
899
  type: "text",
900
900
  value: typeof n == "string" ? n : "",
@@ -903,25 +903,25 @@ function _n({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
903
903
  });
904
904
  }
905
905
  }
906
- function vn(e) {
906
+ function _n(e) {
907
907
  return e.members ? {} : void 0;
908
908
  }
909
- function yn(e, t) {
909
+ function vn(e, t) {
910
910
  if (!t) return e;
911
911
  let n = new Date(e);
912
912
  return Number.isNaN(n.getTime()) ? e : n.toISOString();
913
913
  }
914
- function bn(e) {
914
+ function yn(e) {
915
915
  return typeof e == "object" && !!e && !Array.isArray(e);
916
916
  }
917
917
  //#endregion
918
918
  //#region src/StageCommandForm.tsx
919
- var xn = e(void 0);
920
- function Sn({ element: e }) {
921
- let t = z(), n = r(Oe), i = r(xn), a = o(() => wn(e), [e]), s = o(() => Qn(e), [e]), l = typeof e.properties.schema == "string", u = o(() => a ? Tn(a, s) : [], [a, s]), d = a ? U(a.command, J(e, "typeName"), J(e, "route")) : void 0, f = Vn(e, u, t.resolveArgument), p = zn(e, s, t), m = JSON.stringify(p ?? null), h = o(() => p, [m]), g = o(() => Object.values(t.selections).filter((e) => e !== void 0), [t.selections]), _ = o(() => In(t.queries), [t.queries]), v = e.properties.rowAction === !0, y = o(() => ({
919
+ var bn = e(void 0);
920
+ function xn({ element: e }) {
921
+ let t = B(), n = r(De), i = r(bn), a = o(() => Cn(e), [e]), s = o(() => er(e), [e]), l = typeof e.properties.schema == "string", u = o(() => a ? wn(a, s) : [], [a, s]), d = a ? W(a.command, Y(e, "typeName"), Y(e, "route")) : void 0, f = Un(e, u, t.resolveArgument), p = Vn(e, s, t), m = JSON.stringify(p ?? null), h = o(() => p, [m]), g = o(() => Rn(t.selections, t.queries), [t.selections, t.queries]), _ = o(() => Ln(t.queries), [t.queries]), v = e.properties.rowAction === !0, y = o(() => ({
922
922
  ...h,
923
- ...jn(u, s, t.parameters, g, _, v),
924
- ...An(u, t.parameters)
923
+ ...An(u, s, t.parameters, g, _, v),
924
+ ...kn(u, t.parameters)
925
925
  }), [
926
926
  h,
927
927
  u,
@@ -930,133 +930,133 @@ function Sn({ element: e }) {
930
930
  g,
931
931
  _,
932
932
  v
933
- ]), b = o(() => a ? En(a, u, s) : void 0, [
933
+ ]), b = o(() => a ? Tn(a, u, s) : void 0, [
934
934
  a,
935
935
  u,
936
936
  s
937
- ]), x = o(() => a ? Xn(u, s) : [], [
937
+ ]), x = o(() => a ? Qn(u, s) : [], [
938
938
  a,
939
939
  u,
940
940
  s
941
- ]), ee = o(() => a ? Zn(a.layout, u) : [], [a, u]), [S, C] = c([]);
942
- return a ? !d && !t.routesReady ? /* @__PURE__ */ F("p", {
941
+ ]), ee = o(() => a ? $n(a.layout, u) : [], [a, u]), [S, C] = c([]);
942
+ return a ? !d && !t.routesReady ? /* @__PURE__ */ I("p", {
943
943
  className: "stage-note",
944
944
  children: [
945
945
  "The modeled command “",
946
946
  a.command,
947
947
  "” is waiting for Stage routes."
948
948
  ]
949
- }) : d ? u.length === 0 && !l && e.properties.parameterless !== !0 ? /* @__PURE__ */ P(Cn, {
949
+ }) : d ? u.length === 0 && !l && e.properties.parameterless !== !0 ? /* @__PURE__ */ F(Sn, {
950
950
  form: a,
951
951
  messages: [`The modeled command “${a.command}” has no form fields or schema metadata, so Stage will not submit an empty command body.`]
952
- }) : x.length > 0 ? /* @__PURE__ */ P(Cn, {
952
+ }) : x.length > 0 ? /* @__PURE__ */ F(Sn, {
953
953
  form: a,
954
954
  messages: x
955
- }) : /* @__PURE__ */ P("section", {
955
+ }) : /* @__PURE__ */ F("section", {
956
956
  className: "stage-command-form",
957
957
  "data-command": a.command,
958
958
  "data-generation-mode": a.generationMode,
959
- children: /* @__PURE__ */ F(He, {
959
+ children: /* @__PURE__ */ I(Ve, {
960
960
  command: d,
961
961
  initialValues: y,
962
962
  currentValues: f,
963
963
  validateOn: "both",
964
964
  validateAllFieldsOnChange: !0,
965
- onBeforeExecute: (e) => Xt(e, n.apiBasePath),
966
- onFieldValidate: (e, t, n, r) => Yn(u, s, t, r),
965
+ onBeforeExecute: (e) => Yt(e, n.apiBasePath),
966
+ onFieldValidate: (e, t, n, r) => Zn(u, s, t, r),
967
967
  onValidationFailure: (e) => C(e.map((e) => e.message)),
968
968
  onException: (e) => C(e),
969
- onFailed: (e) => C(Qt(a.command, e).messages),
969
+ onFailed: (e) => C(Zt(a.command, e).messages),
970
970
  onSuccess: () => {
971
971
  C([]), t.refreshAfterCommand();
972
- let n = J(e, "navigateToScreen");
973
- n && W(n, {}), i?.();
972
+ let n = Y(e, "navigateToScreen");
973
+ n && G(n, {}), i?.();
974
974
  },
975
975
  children: [
976
- ee.map((e) => /* @__PURE__ */ P("p", {
976
+ ee.map((e) => /* @__PURE__ */ F("p", {
977
977
  role: "alert",
978
978
  className: "stage-form-error",
979
979
  children: e
980
980
  }, e)),
981
981
  b,
982
- S.map((e) => /* @__PURE__ */ P("p", {
982
+ S.map((e) => /* @__PURE__ */ F("p", {
983
983
  role: "alert",
984
984
  className: "stage-form-error",
985
985
  children: e
986
986
  }, e)),
987
- /* @__PURE__ */ P("button", {
987
+ /* @__PURE__ */ F("button", {
988
988
  type: "submit",
989
- children: J(e, "submitLabel") || `Execute ${a.label}`
989
+ children: Y(e, "submitLabel") || `Execute ${a.label}`
990
990
  })
991
991
  ]
992
992
  }, m)
993
- }) : /* @__PURE__ */ F("p", {
993
+ }) : /* @__PURE__ */ I("p", {
994
994
  className: "stage-note",
995
995
  children: [
996
996
  "The modeled command “",
997
997
  a.command,
998
998
  "” is not registered by this Stage."
999
999
  ]
1000
- }) : /* @__PURE__ */ P("p", {
1000
+ }) : /* @__PURE__ */ F("p", {
1001
1001
  className: "stage-note",
1002
1002
  children: "This form is missing its command metadata."
1003
1003
  });
1004
1004
  }
1005
- function Cn({ form: e, messages: t }) {
1006
- return /* @__PURE__ */ P("section", {
1005
+ function Sn({ form: e, messages: t }) {
1006
+ return /* @__PURE__ */ F("section", {
1007
1007
  className: "stage-command-form",
1008
1008
  "data-command": e.command,
1009
1009
  "data-generation-mode": e.generationMode,
1010
- children: t.map((e) => /* @__PURE__ */ P("p", {
1010
+ children: t.map((e) => /* @__PURE__ */ F("p", {
1011
1011
  role: "alert",
1012
1012
  className: "stage-form-error",
1013
1013
  children: e
1014
1014
  }, e))
1015
1015
  });
1016
1016
  }
1017
- function wn(e) {
1018
- let t = J(e, "command");
1017
+ function Cn(e) {
1018
+ let t = Y(e, "command");
1019
1019
  if (!t) return;
1020
- let n = Array.isArray(e.properties.fields) ? e.properties.fields.filter(Y) : [];
1020
+ let n = Array.isArray(e.properties.fields) ? e.properties.fields.filter(X) : [];
1021
1021
  return {
1022
1022
  command: t,
1023
- label: J(e, "label", t),
1023
+ label: Y(e, "label", t),
1024
1024
  fields: n,
1025
- generationMode: Un(e.properties.generationMode),
1026
- layout: Wn(e.properties.layout)
1025
+ generationMode: Gn(e.properties.generationMode),
1026
+ layout: Kn(e.properties.layout)
1027
1027
  };
1028
1028
  }
1029
- function Tn(e, t) {
1029
+ function wn(e, t) {
1030
1030
  return e.generationMode === d.Manual || e.fields.length > 0 ? e.fields : t.filter((e) => !e.unsupportedReason).map((e) => ({
1031
1031
  name: e.name,
1032
1032
  label: e.name
1033
1033
  }));
1034
1034
  }
1035
- function En(e, t, n) {
1036
- let r = e.layout, i = r ? Gn(r, t) : [];
1037
- if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => Dn(e, n));
1038
- let a = new Map(t.map((e) => [e.name, e])), o = Kn(r, i), s = {
1039
- gridTemplateColumns: Array.from({ length: o }, (e, t) => qn(t + 1, r.columns)).join(" "),
1040
- columnGap: q(r.columnGap),
1041
- rowGap: q(r.rowGap)
1035
+ function Tn(e, t, n) {
1036
+ let r = e.layout, i = r ? qn(r, t) : [];
1037
+ if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => En(e, n));
1038
+ let a = new Map(t.map((e) => [e.name, e])), o = Jn(r, i), s = {
1039
+ gridTemplateColumns: Array.from({ length: o }, (e, t) => Yn(t + 1, r.columns)).join(" "),
1040
+ columnGap: J(r.columnGap),
1041
+ rowGap: J(r.rowGap)
1042
1042
  }, c = /* @__PURE__ */ new Set();
1043
- return /* @__PURE__ */ F("div", {
1043
+ return /* @__PURE__ */ I("div", {
1044
1044
  className: "stage-command-form__layout",
1045
1045
  style: s,
1046
1046
  children: [i.map((e) => {
1047
1047
  let t = a.get(e.field);
1048
- return t ? (c.add(t.name), Dn(t, n, e)) : null;
1049
- }), t.filter((e) => !c.has(e.name)).map((e) => Dn(e, n))]
1048
+ return t ? (c.add(t.name), En(t, n, e)) : null;
1049
+ }), t.filter((e) => !c.has(e.name)).map((e) => En(e, n))]
1050
1050
  });
1051
1051
  }
1052
- function Dn(e, t, n) {
1052
+ function En(e, t, n) {
1053
1053
  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 = (() => {
1054
1054
  if (i?.options) {
1055
1055
  let e = i.options.map((e) => ({
1056
1056
  value: e,
1057
- label: K(e)
1057
+ label: q(e)
1058
1058
  }));
1059
- return /* @__PURE__ */ P(qe, {
1059
+ return /* @__PURE__ */ F(Ke, {
1060
1060
  value: o,
1061
1061
  fieldName: r,
1062
1062
  title: a,
@@ -1066,7 +1066,7 @@ function Dn(e, t, n) {
1066
1066
  optionLabel: "label"
1067
1067
  });
1068
1068
  }
1069
- if (i?.members || i?.item) return /* @__PURE__ */ P(pn, {
1069
+ if (i?.members || i?.item) return /* @__PURE__ */ F(fn, {
1070
1070
  value: o,
1071
1071
  fieldName: r,
1072
1072
  title: a,
@@ -1074,19 +1074,19 @@ function Dn(e, t, n) {
1074
1074
  descriptor: i
1075
1075
  });
1076
1076
  switch (i?.type ?? "text") {
1077
- case "number": return /* @__PURE__ */ P(Ye, {
1077
+ case "number": return /* @__PURE__ */ F(Je, {
1078
1078
  value: o,
1079
1079
  fieldName: r,
1080
1080
  title: a,
1081
1081
  required: s
1082
1082
  });
1083
- case "boolean": return /* @__PURE__ */ P(Ke, {
1083
+ case "boolean": return /* @__PURE__ */ F(Ge, {
1084
1084
  value: o,
1085
1085
  fieldName: r,
1086
1086
  label: a,
1087
1087
  required: s
1088
1088
  });
1089
- case "date": return /* @__PURE__ */ P(On, {
1089
+ case "date": return /* @__PURE__ */ F(Dn, {
1090
1090
  value: o,
1091
1091
  fieldName: r,
1092
1092
  title: a,
@@ -1094,15 +1094,15 @@ function Dn(e, t, n) {
1094
1094
  showIcon: !0,
1095
1095
  showTime: i?.withTime
1096
1096
  });
1097
- default: return /* @__PURE__ */ P(Je, {
1097
+ default: return /* @__PURE__ */ F(qe, {
1098
1098
  value: o,
1099
1099
  fieldName: r,
1100
1100
  title: a,
1101
1101
  required: s
1102
1102
  });
1103
1103
  }
1104
- })(), l = Jn(n);
1105
- return /* @__PURE__ */ P("span", {
1104
+ })(), l = Xn(n);
1105
+ return /* @__PURE__ */ F("span", {
1106
1106
  className: "stage-command-form__field",
1107
1107
  "data-field": e.name,
1108
1108
  "data-row": n?.row,
@@ -1112,21 +1112,21 @@ function Dn(e, t, n) {
1112
1112
  children: c
1113
1113
  }, e.name);
1114
1114
  }
1115
- var On = We((e) => /* @__PURE__ */ P(Ge, {
1115
+ var Dn = Ue((e) => /* @__PURE__ */ F(We, {
1116
1116
  ...e,
1117
- currentValue: e.showTime ? e.currentValue : kn(e.currentValue),
1118
- onValueChange: (t) => e.onValueChange?.(!e.showTime && t instanceof Date && !Number.isNaN(t.getTime()) ? ze.fromDate(t) : t)
1117
+ currentValue: e.showTime ? e.currentValue : On(e.currentValue),
1118
+ onValueChange: (t) => e.onValueChange?.(!e.showTime && t instanceof Date && !Number.isNaN(t.getTime()) ? Re.fromDate(t) : t)
1119
1119
  }));
1120
- function kn(e) {
1121
- if (e instanceof ze) return e.toDate();
1120
+ function On(e) {
1121
+ if (e instanceof Re) return e.toDate();
1122
1122
  if (typeof e != "string") return e;
1123
1123
  try {
1124
- return ze.parse(e).toDate();
1124
+ return Re.parse(e).toDate();
1125
1125
  } catch {
1126
1126
  return null;
1127
1127
  }
1128
1128
  }
1129
- function An(e, t) {
1129
+ function kn(e, t) {
1130
1130
  let n = {};
1131
1131
  for (let r of e) {
1132
1132
  let e = r.sourceProperty ?? r.name, i = t[e];
@@ -1134,117 +1134,133 @@ function An(e, t) {
1134
1134
  }
1135
1135
  return n;
1136
1136
  }
1137
- function jn(e, t, n, r = [], i = [], a = !1) {
1137
+ function An(e, t, n, r = [], i = [], a = !1) {
1138
1138
  let o = new Set(e.map((e) => e.sourceProperty ?? e.name)), s = t.some((e) => e.identity), c = {};
1139
1139
  for (let e of t) {
1140
1140
  if (!e.identifier || !e.required || o.has(e.name)) continue;
1141
- if (a && Fn(e, i)) {
1142
- let t = n[e.name] || Pn(e, r);
1141
+ if (a && Pn(e, i)) {
1142
+ let t = n[e.name] || Nn(e, r);
1143
1143
  t && (c[e.name] = t);
1144
1144
  continue;
1145
1145
  }
1146
- let t = n[e.name] || Pn(e, r) || kt(e.identifier) || (e.identity || !s && !Fn(e, i) ? At(e.identifier) : void 0);
1146
+ let t = n[e.name] || Nn(e, r) || Ot(e.identifier) || (e.identity || !s && !Pn(e, i) ? kt(e.identifier) : void 0);
1147
1147
  t !== void 0 && (c[e.name] = t);
1148
1148
  }
1149
1149
  return c;
1150
1150
  }
1151
+ function jn(e, t) {
1152
+ return !e.identifier || !e.required ? !1 : e.identity === !0 || Mn(e, t) !== void 0;
1153
+ }
1151
1154
  function Mn(e, t) {
1152
- return !e.identifier || !e.required ? !1 : e.identity === !0 || Nn(e, t) !== void 0;
1155
+ if (e.identifier) return t[e.name] || Ot(e.identifier);
1153
1156
  }
1154
1157
  function Nn(e, t) {
1155
- if (e.identifier) return t[e.name] || kt(e.identifier);
1156
- }
1157
- function Pn(e, t) {
1158
1158
  if (!e.identifier) return;
1159
1159
  let n = new Set(t.map((t) => t[e.name]).filter((e) => typeof e == "string" && e !== ""));
1160
1160
  return n.size === 1 ? [...n][0] : void 0;
1161
1161
  }
1162
- function Fn(e, t) {
1162
+ function Pn(e, t) {
1163
1163
  return t.some((t) => Object.hasOwn(t, e.name));
1164
1164
  }
1165
+ function Fn(e, t) {
1166
+ let n = e.id;
1167
+ if (typeof n != "string" || n === "") return e;
1168
+ 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]));
1169
+ return Object.keys(i).length === 0 ? e : {
1170
+ ...i,
1171
+ ...e
1172
+ };
1173
+ }
1165
1174
  function In(e) {
1166
- return Object.values(e).flatMap((e) => e.rows);
1175
+ return Object.values(e).flatMap((e) => e.rows.map((t) => [t, Fn(t, e)]));
1176
+ }
1177
+ function Ln(e) {
1178
+ return In(e).map(([, e]) => e);
1179
+ }
1180
+ function Rn(e, t) {
1181
+ let n = new Map(In(t));
1182
+ return Object.values(e).filter((e) => e !== void 0).map((e) => n.get(e) ?? e);
1167
1183
  }
1168
- function Ln(e, t, n, r) {
1169
- return e.filter((e) => e.identifier && e.required && Fn(e, r)).filter((e) => !t[e.name] && Pn(e, n) === void 0).map((e) => e.name);
1184
+ function zn(e, t, n, r) {
1185
+ return e.filter((e) => e.identifier && e.required && Pn(e, r)).filter((e) => !t[e.name] && Nn(e, n) === void 0).map((e) => e.name);
1170
1186
  }
1171
- function Rn(e) {
1187
+ function Bn(e) {
1172
1188
  let t = e.properties.populateSource;
1173
- return Y(t) ? t : void 0;
1189
+ return X(t) ? t : void 0;
1174
1190
  }
1175
- function zn(e, t, n) {
1176
- let r = Rn(e), i = r?.queryName, a = Object.entries(r?.parameterBindings ?? {}).map(([e, r]) => [e, Bn(e, r?.path ?? e, t, n)]), s = Object.fromEntries(a.filter(([, e]) => e !== void 0 && e !== "")), c = !!i && n.routesReady && a.every(([, e]) => e !== void 0 && e !== ""), l = B({
1177
- scope: `populate:${J(e, "command")}`,
1191
+ function Vn(e, t, n) {
1192
+ let r = Bn(e), i = r?.queryName, a = Object.entries(r?.parameterBindings ?? {}).map(([e, r]) => [e, Hn(e, r?.path ?? e, t, n)]), s = Object.fromEntries(a.filter(([, e]) => e !== void 0 && e !== "")), c = !!i && n.routesReady && a.every(([, e]) => e !== void 0 && e !== ""), l = V({
1193
+ scope: `populate:${Y(e, "command")}`,
1178
1194
  name: i,
1179
1195
  route: i ? n.routes?.queries?.[i] : void 0,
1180
1196
  arguments: s,
1181
1197
  ready: c,
1182
1198
  publish: !1
1183
- }), u = r?.itemBinding ? n.resolveBinding(r.itemBinding) ?? n.selected : void 0, d = i ? l.rows[0] : Y(u) ? u : void 0;
1199
+ }), u = r?.itemBinding ? n.resolveBinding(r.itemBinding) ?? n.selected : void 0, d = i ? l.rows[0] : X(u) ? u : void 0;
1184
1200
  return o(() => {
1185
1201
  if (!d) return;
1186
1202
  let e = {};
1187
1203
  for (let n of t) {
1188
1204
  let t = d[n.name] ?? d[n.name.charAt(0).toLowerCase() + n.name.slice(1)];
1189
- t != null && (e[n.name] = dn(n, t));
1205
+ t != null && (e[n.name] = un(n, t));
1190
1206
  }
1191
1207
  return Object.keys(e).length > 0 ? e : void 0;
1192
1208
  }, [d, t]);
1193
1209
  }
1194
- function Bn(e, t, n, r) {
1210
+ function Hn(e, t, n, r) {
1195
1211
  let i = r.parameters[t] ?? r.parameters[e];
1196
1212
  if (i) return i;
1197
1213
  let a = n.find((n) => n.name === t || n.name === e)?.identifier;
1198
- if (a) return At(a);
1214
+ if (a) return kt(a);
1199
1215
  let o = r.resolveBinding({ path: t });
1200
1216
  return typeof o == "string" || typeof o == "number" ? o : void 0;
1201
1217
  }
1202
- function Vn(e, t, n) {
1203
- let r = o(() => Hn(e, t), [e, t]), i = r.map((e) => n(e.source)), a = JSON.stringify(i);
1218
+ function Un(e, t, n) {
1219
+ let r = o(() => Wn(e, t), [e, t]), i = r.map((e) => n(e.source)), a = JSON.stringify(i);
1204
1220
  return o(() => {
1205
1221
  let e = Object.fromEntries(r.map((e, t) => [e.name, i[t]]).filter(([, e]) => e != null && e !== ""));
1206
1222
  return Object.keys(e).length > 0 ? e : void 0;
1207
1223
  }, [r, a]);
1208
1224
  }
1209
- function Hn(e, t) {
1225
+ function Wn(e, t) {
1210
1226
  let n = e.properties.arguments;
1211
1227
  if (!Array.isArray(n)) return [];
1212
1228
  let r = new Set(t.map((e) => e.sourceProperty ?? e.name));
1213
1229
  return n.filter((e) => typeof e == "object" && !!e && typeof e.name == "string" && typeof e.source == "string" && r.has(e.name));
1214
1230
  }
1215
- function Un(e) {
1231
+ function Gn(e) {
1216
1232
  return e === d.Manual ? d.Manual : d.Auto;
1217
1233
  }
1218
- function Wn(e) {
1219
- if (!Y(e)) return;
1234
+ function Kn(e) {
1235
+ if (!X(e)) return;
1220
1236
  let t = e;
1221
1237
  return {
1222
- columns: Array.isArray(t.columns) ? t.columns.filter($n) : [],
1223
- placements: Array.isArray(t.placements) ? t.placements.filter(er) : [],
1224
- columnGap: tr(t.columnGap) ? t.columnGap : void 0,
1225
- rowGap: tr(t.rowGap) ? t.rowGap : void 0
1238
+ columns: Array.isArray(t.columns) ? t.columns.filter(tr) : [],
1239
+ placements: Array.isArray(t.placements) ? t.placements.filter(nr) : [],
1240
+ columnGap: rr(t.columnGap) ? t.columnGap : void 0,
1241
+ rowGap: rr(t.rowGap) ? t.rowGap : void 0
1226
1242
  };
1227
1243
  }
1228
- function Gn(e, t) {
1244
+ function qn(e, t) {
1229
1245
  let n = new Map(e.placements.map((e) => [e.field, e]));
1230
- for (let e of t) !n.has(e.name) && er(e.placement) && n.set(e.name, e.placement);
1246
+ for (let e of t) !n.has(e.name) && nr(e.placement) && n.set(e.name, e.placement);
1231
1247
  return [...n.values()].sort((e, t) => e.row - t.row || e.column - t.column || e.field.localeCompare(t.field));
1232
1248
  }
1233
- function Kn(e, t) {
1249
+ function Jn(e, t) {
1234
1250
  return Math.max(1, ...e.columns.map((e) => e.index), ...t.map((e) => e.column + (e.columnSpan ?? 1) - 1));
1235
1251
  }
1236
- function qn(e, t) {
1237
- let n = t.find((t) => t.index === e), r = q(n?.width), i = q(n?.minWidth), a = q(n?.maxWidth);
1252
+ function Yn(e, t) {
1253
+ let n = t.find((t) => t.index === e), r = J(n?.width), i = J(n?.minWidth), a = J(n?.maxWidth);
1238
1254
  return n?.width?.unit === f.Fraction && a ? `minmax(${i ?? "0"}, ${r ?? "1fr"})` : i || a ? `minmax(${i ?? "0"}, ${a && r ? `min(${r}, ${a})` : a ?? r ?? "1fr"})` : r ?? "1fr";
1239
1255
  }
1240
- function Jn(e) {
1256
+ function Xn(e) {
1241
1257
  if (e) return {
1242
1258
  gridColumn: `${e.column} / span ${e.columnSpan ?? 1}`,
1243
1259
  gridRow: `${e.row} / span ${e.rowSpan ?? 1}`,
1244
- width: e.width?.unit === f.Fraction ? void 0 : q(e.width)
1260
+ width: e.width?.unit === f.Fraction ? void 0 : J(e.width)
1245
1261
  };
1246
1262
  }
1247
- function q(e) {
1263
+ function J(e) {
1248
1264
  if (e) switch (e.unit) {
1249
1265
  case f.Fraction: return `${e.value ?? 1}fr`;
1250
1266
  case f.Pixels: return `${e.value ?? 0}px`;
@@ -1252,60 +1268,60 @@ function q(e) {
1252
1268
  case f.Auto: return "auto";
1253
1269
  }
1254
1270
  }
1255
- function Yn(e, t, n, r) {
1271
+ function Zn(e, t, n, r) {
1256
1272
  let i = e.find((e) => (e.sourceProperty ?? e.name) === n), a = t.find((e) => e.name === n);
1257
- if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ? ln(a, r, i?.label ?? n) : void 0;
1273
+ if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ? cn(a, r, i?.label ?? n) : void 0;
1258
1274
  }
1259
- function Xn(e, t) {
1275
+ function Qn(e, t) {
1260
1276
  let n = new Map(t.map((e) => [e.name, e]));
1261
1277
  return e.flatMap((e) => {
1262
1278
  let t = n.get(e.sourceProperty ?? e.name);
1263
1279
  return t?.unsupportedReason ? [`The field “${e.label ?? e.name}” uses unsupported schema metadata: ${t.unsupportedReason}.`] : [];
1264
1280
  });
1265
1281
  }
1266
- function Zn(e, t) {
1282
+ function $n(e, t) {
1267
1283
  if (!e) return [];
1268
- let n = Gn(e, t).filter((e) => e.width?.unit === f.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 === f.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.`);
1284
+ let n = qn(e, t).filter((e) => e.width?.unit === f.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 === f.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.`);
1269
1285
  return [...n, ...r];
1270
1286
  }
1271
- function Qn(e) {
1272
- return G(J(e, "schema"));
1287
+ function er(e) {
1288
+ return K(Y(e, "schema"));
1273
1289
  }
1274
- function J(e, t, n = "") {
1290
+ function Y(e, t, n = "") {
1275
1291
  let r = e.properties[t];
1276
1292
  return typeof r == "string" ? r : n;
1277
1293
  }
1278
- function $n(e) {
1279
- return Y(e) && typeof e.index == "number" && Number.isInteger(e.index) && e.index > 0;
1294
+ function tr(e) {
1295
+ return X(e) && typeof e.index == "number" && Number.isInteger(e.index) && e.index > 0;
1280
1296
  }
1281
- function er(e) {
1282
- return Y(e) && typeof e.field == "string" && typeof e.row == "number" && typeof e.column == "number" && e.row > 0 && e.column > 0;
1297
+ function nr(e) {
1298
+ return X(e) && typeof e.field == "string" && typeof e.row == "number" && typeof e.column == "number" && e.row > 0 && e.column > 0;
1283
1299
  }
1284
- function tr(e) {
1285
- return Y(e) && Object.values(f).includes(e.unit);
1300
+ function rr(e) {
1301
+ return X(e) && Object.values(f).includes(e.unit);
1286
1302
  }
1287
- function Y(e) {
1303
+ function X(e) {
1288
1304
  return typeof e == "object" && !!e && !Array.isArray(e);
1289
1305
  }
1290
1306
  //#endregion
1291
1307
  //#region src/StageGuardedAction.tsx
1292
- function nr(e) {
1308
+ function ir(e) {
1293
1309
  return typeof e == "object" && !!e && !Array.isArray(e);
1294
1310
  }
1295
- function rr(e, t) {
1311
+ function ar(e, t) {
1296
1312
  let n = e.properties[t];
1297
1313
  return typeof n == "string" ? n : "";
1298
1314
  }
1299
- function ir(e) {
1315
+ function or(e) {
1300
1316
  return e.componentName === "core:action" && (Array.isArray(e.properties.alternatives) || e.properties.otherwise !== void 0);
1301
1317
  }
1302
- function ar(e) {
1303
- let t = z(), n = rr(e, "itemQuery"), r = (n ? t.routes?.queries?.[n] : void 0) ?? rr(e, "itemRoute"), i = nr(e.properties.itemArguments) ? e.properties.itemArguments : {}, a = {}, o = !0;
1318
+ function sr(e) {
1319
+ let t = B(), n = ar(e, "itemQuery"), r = (n ? t.routes?.queries?.[n] : void 0) ?? ar(e, "itemRoute"), i = ir(e.properties.itemArguments) ? e.properties.itemArguments : {}, a = {}, o = !0;
1304
1320
  for (let [e, n] of Object.entries(i)) {
1305
- let r = nr(n) && (typeof n.path == "string" || typeof n.kind == "string") ? t.resolveBinding(n) : n;
1321
+ let r = ir(n) && (typeof n.path == "string" || typeof n.kind == "string") ? t.resolveBinding(n) : n;
1306
1322
  a[e] = r, (r == null || r === "") && (o = !1);
1307
1323
  }
1308
- let s = e.properties.itemSelection === !0, c = Object.values(t.selections).filter((e) => e !== void 0), l = B({
1324
+ let s = e.properties.itemSelection === !0, c = Object.values(t.selections).filter((e) => e !== void 0), l = V({
1309
1325
  scope: `${e.id}:item`,
1310
1326
  name: n || void 0,
1311
1327
  route: r || void 0,
@@ -1321,23 +1337,23 @@ function ar(e) {
1321
1337
  item: l.rows.length === 1 ? l.rows[0] : void 0
1322
1338
  };
1323
1339
  }
1324
- function or(e, t) {
1325
- return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e, Dt(gt(n) ?? "", t)]));
1340
+ function cr(e, t) {
1341
+ return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e, Et(ht(n) ?? "", t)]));
1326
1342
  }
1327
- function sr({ element: e, interactions: t }) {
1328
- let n = z(), r = ar(e), i = $t(), [a, s] = c([]), [l, u] = c(!1), d = rr(e, "label"), f = o(() => Array.isArray(e.properties.alternatives) ? e.properties.alternatives : [], [e]), p = nr(e.properties.otherwise) ? e.properties.otherwise : void 0, m = f.map((e) => e.condition), h = !p || p.outcome === "Hidden" || p.outcome === "Execute" && !!p.command;
1329
- if (!wt(m) || !h || !r.hasSource) {
1330
- let n = r.hasSource ? `${_t}: “${d}” has a guard this Stage cannot evaluate, so it stays unavailable.` : `${_t}: “${d}” has no data subject to evaluate its guard against.`;
1331
- return /* @__PURE__ */ F("div", {
1343
+ function lr({ element: e, interactions: t }) {
1344
+ let n = B(), r = sr(e), i = Qt(), [a, s] = c([]), [l, u] = c(!1), d = ar(e, "label"), f = o(() => Array.isArray(e.properties.alternatives) ? e.properties.alternatives : [], [e]), p = ir(e.properties.otherwise) ? e.properties.otherwise : void 0, m = f.map((e) => e.condition), h = !p || p.outcome === "Hidden" || p.outcome === "Execute" && !!p.command;
1345
+ if (!Ct(m) || !h || !r.hasSource) {
1346
+ let n = r.hasSource ? `${gt}: “${d}” has a guard this Stage cannot evaluate, so it stays unavailable.` : `${gt}: “${d}” has no data subject to evaluate its guard against.`;
1347
+ return /* @__PURE__ */ I("div", {
1332
1348
  className: "stage-guarded-action",
1333
1349
  "data-scene-id": e.id,
1334
- children: [/* @__PURE__ */ P(I, {
1350
+ children: [/* @__PURE__ */ F(L, {
1335
1351
  type: "button",
1336
1352
  disabled: !0,
1337
1353
  title: n,
1338
1354
  ...t,
1339
1355
  children: d
1340
- }), /* @__PURE__ */ P("p", {
1356
+ }), /* @__PURE__ */ F("p", {
1341
1357
  role: "alert",
1342
1358
  className: "stage-form-error",
1343
1359
  children: n
@@ -1345,41 +1361,41 @@ function sr({ element: e, interactions: t }) {
1345
1361
  });
1346
1362
  }
1347
1363
  if (!r.item) return null;
1348
- let g = Tt(m, r.item), _ = g !== void 0 && g >= 0 ? f[g] : p?.outcome === "Execute" ? p : void 0;
1364
+ let g = wt(m, r.item), _ = g !== void 0 && g >= 0 ? f[g] : p?.outcome === "Execute" ? p : void 0;
1349
1365
  if (!_?.command) return null;
1350
- let v = _.command, y = U(v), b = r.item, x = async () => {
1366
+ let v = _.command, y = W(v), b = r.item, x = async () => {
1351
1367
  if (!y) return;
1352
1368
  u(!0);
1353
- let t = await i(v, or(_, b));
1369
+ let t = await i(v, cr(_, b));
1354
1370
  if (u(!1), s(t.messages), !t.isSuccess) return;
1355
1371
  n.refreshAfterCommand();
1356
- let r = rr(e, "navigateToScreen"), a = rr(e, "navigateByParameter"), o = a ? Dt(`item.${a}`, b) : void 0;
1357
- r && W(r, a && o != null ? { [a]: String(o) } : {});
1372
+ let r = ar(e, "navigateToScreen"), a = ar(e, "navigateByParameter"), o = a ? Et(`item.${a}`, b) : void 0;
1373
+ r && G(r, a && o != null ? { [a]: String(o) } : {});
1358
1374
  };
1359
- return /* @__PURE__ */ F("div", {
1375
+ return /* @__PURE__ */ I("div", {
1360
1376
  className: "stage-guarded-action",
1361
1377
  "data-scene-id": e.id,
1362
1378
  "data-command": v,
1363
- children: [/* @__PURE__ */ P(I, {
1379
+ children: [/* @__PURE__ */ F(L, {
1364
1380
  ...t,
1365
1381
  type: "button",
1366
1382
  disabled: !y || l,
1367
1383
  title: y ? void 0 : "This command is not exposed as an API yet",
1368
1384
  onClick: () => void x(),
1369
1385
  children: d
1370
- }), a.map((e) => /* @__PURE__ */ P("p", {
1386
+ }), a.map((e) => /* @__PURE__ */ F("p", {
1371
1387
  role: "alert",
1372
1388
  className: "stage-form-error",
1373
1389
  children: e
1374
1390
  }, e))]
1375
1391
  });
1376
1392
  }
1377
- function cr(e) {
1378
- let t = ue(), r = s(void 0), a = o(() => y(oe(e.id, e.behaviors), p.DoubleClick), [e.behaviors, e.id]);
1393
+ function ur(e) {
1394
+ let t = le(), r = s(void 0), a = o(() => y(ae(e.id, e.behaviors), p.DoubleClick), [e.behaviors, e.id]);
1379
1395
  i(() => () => clearTimeout(r.current), []);
1380
1396
  let c = n((e) => {
1381
1397
  if (clearTimeout(r.current), r.current = void 0, !t) return;
1382
- let n = (n) => n.path === "$guard" ? Et(n.value, e) : n.path?.startsWith("item.") ? Dt(n.path, e) : t.context.resolve(n);
1398
+ let n = (n) => n.path === "$guard" ? Tt(n.value, e) : n.path?.startsWith("item.") ? Et(n.path, e) : t.context.resolve(n);
1383
1399
  x(a, t.dispatcher, {
1384
1400
  ...t.context,
1385
1401
  resolve: n
@@ -1402,12 +1418,12 @@ function cr(e) {
1402
1418
  }
1403
1419
  //#endregion
1404
1420
  //#region src/stageDialogScreens.ts
1405
- var lr = "Stage:confirmDialog", ur = "ConfirmDialog";
1406
- function dr(e, t) {
1421
+ var dr = "Stage:confirmDialog", fr = "ConfirmDialog";
1422
+ function pr(e, t) {
1407
1423
  let n = new Set(t.map((e) => e.name));
1408
1424
  return e.map((t) => {
1409
- if (t.screenTemplate !== ur || n.has(ur)) return t;
1410
- let r = fr(t), i = e.find((e) => e.name !== t.name)?.name, a = M(`confirm-dialog-${t.name}`, lr, {
1425
+ if (t.screenTemplate !== fr || n.has(fr)) return t;
1426
+ let r = mr(t), i = e.find((e) => e.name !== t.name)?.name, a = N(`confirm-dialog-${t.name}`, dr, {
1411
1427
  title: t.name,
1412
1428
  decisions: r,
1413
1429
  home: i
@@ -1420,100 +1436,100 @@ function dr(e, t) {
1420
1436
  };
1421
1437
  });
1422
1438
  }
1423
- function fr(e) {
1439
+ function mr(e) {
1424
1440
  let t = [];
1425
- for (let n of pr(Object.values(e.slotContent).flat())) {
1426
- let r = mr(n.properties.command);
1441
+ for (let n of hr(Object.values(e.slotContent).flat())) {
1442
+ let r = gr(n.properties.command);
1427
1443
  r && !t.some((e) => e.command === r) && t.push({
1428
1444
  command: r,
1429
- label: mr(n.properties.label),
1430
- navigateToScreen: mr(n.properties.navigateToScreen),
1431
- typeName: mr(n.properties.typeName),
1432
- route: mr(n.properties.route),
1445
+ label: gr(n.properties.label),
1446
+ navigateToScreen: gr(n.properties.navigateToScreen),
1447
+ typeName: gr(n.properties.typeName),
1448
+ route: gr(n.properties.route),
1433
1449
  form: e.forms.find((e) => e.forCommand === r)
1434
1450
  });
1435
1451
  }
1436
1452
  return t;
1437
1453
  }
1438
- function pr(e) {
1454
+ function hr(e) {
1439
1455
  return e.flatMap((e) => {
1440
1456
  let t = e;
1441
- return t.componentName === "core:action" ? [t] : pr(Object.values(t.slots ?? {}).flat());
1457
+ return t.componentName === "core:action" ? [t] : hr(Object.values(t.slots ?? {}).flat());
1442
1458
  });
1443
1459
  }
1444
- function mr(e) {
1460
+ function gr(e) {
1445
1461
  return typeof e == "string" && e !== "" ? e : void 0;
1446
1462
  }
1447
1463
  //#endregion
1448
1464
  //#region src/StageConfirmDialog.tsx
1449
- function hr({ element: e }) {
1450
- let { routes: t, parameters: n, selections: r } = z(), [a, o] = c(), l = s(null), u = typeof e.properties.title == "string" ? e.properties.title : "", d = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], f = typeof e.properties.home == "string" ? e.properties.home : void 0, p = d.find((e) => e.command === a), m = Object.values(r).filter((e) => e !== void 0);
1451
- return i(() => l.current?.focus(), []), /* @__PURE__ */ F("section", {
1465
+ function _r({ element: e }) {
1466
+ let { routes: t, parameters: n, queries: r, selections: a } = B(), [o, l] = c(), u = s(null), d = typeof e.properties.title == "string" ? e.properties.title : "", f = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], p = typeof e.properties.home == "string" ? e.properties.home : void 0, m = f.find((e) => e.command === o), h = Rn(a, r);
1467
+ return i(() => u.current?.focus(), []), /* @__PURE__ */ I("section", {
1452
1468
  className: "scene-slice-dialog stage-confirm-dialog",
1453
1469
  role: "dialog",
1454
- "aria-label": K(u),
1455
- "data-stage-component": lr,
1470
+ "aria-label": q(d),
1471
+ "data-stage-component": dr,
1456
1472
  children: [
1457
- /* @__PURE__ */ P("header", {
1473
+ /* @__PURE__ */ F("header", {
1458
1474
  className: "scene-slice-dialog-header",
1459
- children: /* @__PURE__ */ P("h2", {
1475
+ children: /* @__PURE__ */ F("h2", {
1460
1476
  className: "scene-slice-dialog-title",
1461
- children: K(u)
1477
+ children: q(d)
1462
1478
  })
1463
1479
  }),
1464
- /* @__PURE__ */ P("div", {
1480
+ /* @__PURE__ */ F("div", {
1465
1481
  className: "stage-confirm-dialog__decisions",
1466
- children: d.map((e, t) => /* @__PURE__ */ P("button", {
1467
- ref: t === 0 ? l : void 0,
1482
+ children: f.map((e, t) => /* @__PURE__ */ F("button", {
1483
+ ref: t === 0 ? u : void 0,
1468
1484
  type: "button",
1469
1485
  className: t === 0 ? "scene-slice-dialog-submit stage-confirm-dialog__decision" : "scene-slice-dialog-cancel stage-confirm-dialog__decision",
1470
1486
  "data-emphasis": t === 0 ? "primary" : "secondary",
1471
- "aria-pressed": e.command === a,
1472
- onClick: () => o(e.command),
1473
- children: _r(e)
1487
+ "aria-pressed": e.command === o,
1488
+ onClick: () => l(e.command),
1489
+ children: yr(e)
1474
1490
  }, e.command))
1475
1491
  }),
1476
- p && /* @__PURE__ */ P(Sn, { element: br(p, t?.commandSchemas?.[p.command] ?? "", n, m) }, p.command),
1477
- /* @__PURE__ */ P("footer", {
1492
+ m && /* @__PURE__ */ F(xn, { element: Sr(m, t?.commandSchemas?.[m.command] ?? "", n, h) }, m.command),
1493
+ /* @__PURE__ */ F("footer", {
1478
1494
  className: "scene-slice-dialog-footer",
1479
- children: /* @__PURE__ */ P("button", {
1495
+ children: /* @__PURE__ */ F("button", {
1480
1496
  type: "button",
1481
1497
  className: "scene-slice-dialog-cancel stage-confirm-dialog__cancel",
1482
- onClick: () => gr(d, f),
1498
+ onClick: () => vr(f, p),
1483
1499
  children: "Cancel"
1484
1500
  })
1485
1501
  })
1486
1502
  ]
1487
1503
  });
1488
1504
  }
1489
- function gr(e, t) {
1505
+ function vr(e, t) {
1490
1506
  let n = new Set(e.map((e) => e.navigateToScreen).filter((e) => !!e)), r = n.size === 1 ? [...n][0] : t;
1491
- r && W(r, {});
1507
+ r && G(r, {});
1492
1508
  }
1493
- function _r(e) {
1494
- return e.label ?? K(e.command);
1509
+ function yr(e) {
1510
+ return e.label ?? q(e.command);
1495
1511
  }
1496
- function vr(e, t, n) {
1497
- return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] || Pn(e, n) !== void 0;
1512
+ function br(e, t, n) {
1513
+ return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] || Nn(e, n) !== void 0;
1498
1514
  }
1499
- function yr(e, t, n, r) {
1515
+ function xr(e, t, n, r) {
1500
1516
  let i = e.form?.fields ?? [], a = i.length > 0 ? i : t.filter((e) => !e.unsupportedReason).map((e) => ({
1501
1517
  name: e.name,
1502
1518
  label: e.name
1503
- })), o = new Set(t.filter((e) => vr(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));
1519
+ })), o = new Set(t.filter((e) => br(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));
1504
1520
  return [...s, ...l.map((e) => ({
1505
1521
  name: e.name,
1506
- label: K(e.name)
1522
+ label: q(e.name)
1507
1523
  }))];
1508
1524
  }
1509
- function br(e, t, n, r) {
1510
- let i = yr(e, G(t), n, r);
1525
+ function Sr(e, t, n, r) {
1526
+ let i = xr(e, K(t), n, r);
1511
1527
  return {
1512
1528
  id: `confirm-${e.command}`,
1513
- componentName: lr,
1529
+ componentName: dr,
1514
1530
  properties: {
1515
1531
  command: e.command,
1516
- label: _r(e),
1532
+ label: yr(e),
1517
1533
  submitLabel: "Confirm",
1518
1534
  typeName: e.typeName,
1519
1535
  route: e.route,
@@ -1529,8 +1545,8 @@ function br(e, t, n, r) {
1529
1545
  }
1530
1546
  //#endregion
1531
1547
  //#region src/stageComponents.tsx
1532
- var xr = "Stage:commandForm";
1533
- function X(e, t, n = {}) {
1548
+ var Cr = "Stage:commandForm";
1549
+ function wr(e, t, n = {}) {
1534
1550
  return {
1535
1551
  id: e,
1536
1552
  componentName: "",
@@ -1542,15 +1558,15 @@ function Z(e, t, n = "") {
1542
1558
  let r = e.properties[t];
1543
1559
  return typeof r == "string" ? r : n;
1544
1560
  }
1545
- function Sr(e, t) {
1561
+ function Tr(e, t) {
1546
1562
  let n = e.properties.queryArguments;
1547
- if (!Er(n)) return {
1563
+ if (!kr(n)) return {
1548
1564
  values: {},
1549
1565
  ready: !0
1550
1566
  };
1551
1567
  let r = {}, i = !0;
1552
1568
  for (let [e, a] of Object.entries(n)) {
1553
- let n = Tr(a) ? t.resolveBinding(a) : a;
1569
+ let n = Or(a) ? t.resolveBinding(a) : a;
1554
1570
  r[e] = n, (n == null || n === "") && (i = !1);
1555
1571
  }
1556
1572
  return {
@@ -1558,7 +1574,7 @@ function Sr(e, t) {
1558
1574
  ready: i
1559
1575
  };
1560
1576
  }
1561
- function Cr(e, t) {
1577
+ function Er(e, t) {
1562
1578
  let n = (e.slots.columns ?? []).map((e) => {
1563
1579
  let t = e.properties;
1564
1580
  return {
@@ -1574,14 +1590,14 @@ function Cr(e, t) {
1574
1590
  function Q(e, t) {
1575
1591
  return e[t] ?? e.id ?? e.key;
1576
1592
  }
1577
- function wr({ element: e, slots: t }) {
1578
- let n = z(), r = Z(e, "query", Z(e, "typeName", e.id)), a = (Z(e, "query") ? n.routes?.queries?.[Z(e, "query")] : void 0) ?? Z(e, "route"), s = o(() => Sr(e, n), [n, e]), { rows: c, error: l, loading: u } = B({
1593
+ function Dr({ element: e, slots: t }) {
1594
+ let n = B(), r = Z(e, "query", Z(e, "typeName", e.id)), a = (Z(e, "query") ? n.routes?.queries?.[Z(e, "query")] : void 0) ?? Z(e, "route"), s = o(() => Tr(e, n), [n, e]), { rows: c, error: l, loading: u } = V({
1579
1595
  scope: e.id,
1580
1596
  name: r,
1581
1597
  route: a || void 0,
1582
1598
  arguments: s.values,
1583
1599
  ready: s.ready
1584
- }), d = Cr(e, c), f = Z(e, "navigateOnRowClickToScreen"), p = Z(e, "navigateOnRowClickByParameter"), m = Z(e, "dataKey") || p || "id", h = n.selections[e.id], g = p ? n.parameters[p] : void 0, _ = cr(e);
1600
+ }), d = Er(e, c), f = Z(e, "navigateOnRowClickToScreen"), p = Z(e, "navigateOnRowClickByParameter"), m = Z(e, "dataKey") || p || "id", h = n.selections[e.id], g = p ? n.parameters[p] : void 0, _ = ur(e);
1585
1601
  i(() => {
1586
1602
  if (!h) return;
1587
1603
  let t = Q(h, m), r = t === void 0 ? void 0 : c.find((e) => Q(e, m) === t);
@@ -1622,15 +1638,15 @@ function wr({ element: e, slots: t }) {
1622
1638
  ...f && f !== n.screen ? {} : n.parameters,
1623
1639
  [p]: String(r)
1624
1640
  };
1625
- (!f || f === n.screen) && n.selectRow(e.id, t), W(f || n.screen, i);
1641
+ (!f || f === n.screen) && n.selectRow(e.id, t), G(f || n.screen, i);
1626
1642
  return;
1627
1643
  }
1628
1644
  n.selectRow(e.id, t);
1629
1645
  };
1630
- return !Z(e, "query") && !a && !dt(r) ? /* @__PURE__ */ F("section", {
1646
+ return !Z(e, "query") && !a && !ut(r) ? /* @__PURE__ */ I("section", {
1631
1647
  className: "stage-table",
1632
1648
  "data-scene-id": e.id,
1633
- children: [/* @__PURE__ */ F("p", {
1649
+ children: [/* @__PURE__ */ I("p", {
1634
1650
  className: "stage-note",
1635
1651
  children: [
1636
1652
  "No query is exposed for ",
@@ -1638,40 +1654,40 @@ function wr({ element: e, slots: t }) {
1638
1654
  " yet."
1639
1655
  ]
1640
1656
  }), t.columns]
1641
- }) : /* @__PURE__ */ F("section", {
1657
+ }) : /* @__PURE__ */ I("section", {
1642
1658
  className: "stage-table",
1643
1659
  "data-scene-id": e.id,
1644
1660
  children: [
1645
- u && /* @__PURE__ */ P(Ie, {
1646
- element: X(`${e.id}-loading`, {
1661
+ u && /* @__PURE__ */ F(Fe, {
1662
+ element: wr(`${e.id}-loading`, {
1647
1663
  severity: "info",
1648
1664
  text: "Loading…"
1649
1665
  }),
1650
1666
  slots: {}
1651
1667
  }),
1652
- l && /* @__PURE__ */ P(Ie, {
1653
- element: X(`${e.id}-error`, {
1668
+ l && /* @__PURE__ */ F(Fe, {
1669
+ element: wr(`${e.id}-error`, {
1654
1670
  severity: "error",
1655
1671
  text: l
1656
1672
  }),
1657
1673
  slots: {}
1658
1674
  }),
1659
- h && /* @__PURE__ */ P(I, {
1675
+ h && /* @__PURE__ */ F(L, {
1660
1676
  type: "button",
1661
1677
  size: "small",
1662
1678
  onClick: () => {
1663
1679
  if (n.clearSelection(e.id), !p || n.parameters[p] === void 0) return;
1664
1680
  let { [p]: t, ...r } = n.parameters;
1665
- W(n.screen, r);
1681
+ G(n.screen, r);
1666
1682
  },
1667
1683
  children: "Clear selection"
1668
1684
  }),
1669
- /* @__PURE__ */ F("table", {
1685
+ /* @__PURE__ */ I("table", {
1670
1686
  "aria-label": Z(e, "label", Z(e, "typeName", "Results")),
1671
- children: [/* @__PURE__ */ P("thead", { children: /* @__PURE__ */ P("tr", { children: d.map((e) => /* @__PURE__ */ P("th", {
1687
+ children: [/* @__PURE__ */ F("thead", { children: /* @__PURE__ */ F("tr", { children: d.map((e) => /* @__PURE__ */ F("th", {
1672
1688
  scope: "col",
1673
1689
  children: e.label
1674
- }, e.property)) }) }), /* @__PURE__ */ F("tbody", { children: [c.map((e, t) => /* @__PURE__ */ P("tr", {
1690
+ }, e.property)) }) }), /* @__PURE__ */ I("tbody", { children: [c.map((e, t) => /* @__PURE__ */ F("tr", {
1675
1691
  "aria-selected": h === e,
1676
1692
  tabIndex: 0,
1677
1693
  onClick: () => _.click(e, () => v(e)),
@@ -1679,8 +1695,8 @@ function wr({ element: e, slots: t }) {
1679
1695
  onKeyDown: (t) => {
1680
1696
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), v(e));
1681
1697
  },
1682
- children: d.map((t) => /* @__PURE__ */ P("td", { children: String(e[t.property] ?? "") }, t.property))
1683
- }, String(Q(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */ P("tr", { children: /* @__PURE__ */ P("td", {
1698
+ children: d.map((t) => /* @__PURE__ */ F("td", { children: String(e[t.property] ?? "") }, t.property))
1699
+ }, String(Q(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */ F("tr", { children: /* @__PURE__ */ F("td", {
1684
1700
  colSpan: Math.max(d.length, 1),
1685
1701
  children: "No records found"
1686
1702
  }) })] })]
@@ -1688,28 +1704,28 @@ function wr({ element: e, slots: t }) {
1688
1704
  ]
1689
1705
  });
1690
1706
  }
1691
- function Tr(e) {
1692
- return Er(e) && (typeof e.path == "string" || typeof e.kind == "string");
1707
+ function Or(e) {
1708
+ return kr(e) && (typeof e.path == "string" || typeof e.kind == "string");
1693
1709
  }
1694
- function Er(e) {
1710
+ function kr(e) {
1695
1711
  return typeof e == "object" && !!e && !Array.isArray(e);
1696
1712
  }
1697
- function Dr({ element: e, interactions: t, slots: n }) {
1698
- return ir(e) ? /* @__PURE__ */ P(sr, {
1713
+ function Ar({ element: e, interactions: t, slots: n }) {
1714
+ return or(e) ? /* @__PURE__ */ F(lr, {
1699
1715
  element: e,
1700
1716
  interactions: t
1701
- }) : /* @__PURE__ */ P(Or, {
1717
+ }) : /* @__PURE__ */ F(jr, {
1702
1718
  element: e,
1703
1719
  interactions: t,
1704
1720
  slots: n
1705
1721
  });
1706
1722
  }
1707
- function Or({ element: e, interactions: t }) {
1723
+ function jr({ element: e, interactions: t }) {
1708
1724
  let n = Z(e, "label", Z(e, "command"));
1709
- return U(Z(e, "command"), Z(e, "typeName"), Z(e, "route")) ? /* @__PURE__ */ P(kr, {
1725
+ return W(Z(e, "command"), Z(e, "typeName"), Z(e, "route")) ? /* @__PURE__ */ F(Mr, {
1710
1726
  element: e,
1711
1727
  label: n
1712
- }) : /* @__PURE__ */ P(I, {
1728
+ }) : /* @__PURE__ */ F(L, {
1713
1729
  type: "button",
1714
1730
  "data-scene-id": e.id,
1715
1731
  disabled: !0,
@@ -1718,16 +1734,16 @@ function Or({ element: e, interactions: t }) {
1718
1734
  children: n
1719
1735
  });
1720
1736
  }
1721
- function kr({ element: e, label: t }) {
1722
- let [r, i] = c(0), a = n(() => i((e) => e + 1), []), o = /* @__PURE__ */ P(xn.Provider, {
1737
+ function Mr({ element: e, label: t }) {
1738
+ let [r, i] = c(0), a = n(() => i((e) => e + 1), []), o = /* @__PURE__ */ F(bn.Provider, {
1723
1739
  value: a,
1724
- children: /* @__PURE__ */ P(Sn, { element: e })
1740
+ children: /* @__PURE__ */ F(xn, { element: e })
1725
1741
  });
1726
- return /* @__PURE__ */ P("div", {
1742
+ return /* @__PURE__ */ F("div", {
1727
1743
  className: "stage-action",
1728
1744
  "data-scene-id": e.id,
1729
- children: /* @__PURE__ */ P(Fe, {
1730
- element: X(e.id, {
1745
+ children: /* @__PURE__ */ F(Pe, {
1746
+ element: wr(e.id, {
1731
1747
  visible: !1,
1732
1748
  header: t,
1733
1749
  triggerLabel: t
@@ -1736,41 +1752,41 @@ function kr({ element: e, label: t }) {
1736
1752
  }, r)
1737
1753
  });
1738
1754
  }
1739
- function Ar(e) {
1740
- let t = e.element ?? X("slice-dialog", {}), r = O(), { routes: i, parameters: a, queries: s, selections: c } = z(), l = le(r?.currentDialogParameters), u = Z(t, "command") || l?.command || Z(t, "slice") || "", d = Z(t, "title") || l?.title || u, f = i?.commandSchemas?.[u], p = o(() => G(f ?? ""), [f]), m = o(() => In(s), [s]), h = o(() => Object.values(c).filter((e) => e !== void 0), [c]), g = n(() => r?.closeDialog(), [r]), _ = (e) => e.identifier && e.required && Fn(e, m) && Pn(e, h) !== void 0;
1741
- if (!f || !(p.some((e) => e.options || e.members || e.item) || p.some(_))) return e.element ? /* @__PURE__ */ P(S, {
1755
+ function Nr(e) {
1756
+ let t = e.element ?? wr("slice-dialog", {}), r = k(), { routes: i, parameters: a, queries: s, selections: c } = B(), l = ce(r?.currentDialogParameters), u = Z(t, "command") || l?.command || Z(t, "slice") || "", d = Z(t, "title") || l?.title || u, f = i?.commandSchemas?.[u], p = o(() => K(f ?? ""), [f]), m = o(() => Ln(s), [s]), h = o(() => Rn(c, s), [c, s]), g = n(() => r?.closeDialog(), [r]), _ = (e) => e.identifier && e.required && Pn(e, m) && Nn(e, h) !== void 0;
1757
+ if (!f || !(p.some((e) => e.options || e.members || e.item) || p.some(_))) return e.element ? /* @__PURE__ */ F(S, {
1742
1758
  element: e.element,
1743
1759
  slots: e.slots ?? {}
1744
- }) : /* @__PURE__ */ P(ie, {});
1745
- let v = p.filter((e) => !Mn(e, a) && !_(e)), y = X(`slice-dialog-${u}`, {
1760
+ }) : /* @__PURE__ */ F(ie, {});
1761
+ let v = p.filter((e) => !jn(e, a) && !_(e)), y = wr(`slice-dialog-${u}`, {
1746
1762
  command: u,
1747
1763
  label: d,
1748
1764
  schema: f,
1749
1765
  fields: v.map((e) => ({
1750
1766
  name: e.name,
1751
- label: K(e.name)
1767
+ label: q(e.name)
1752
1768
  })),
1753
1769
  generationMode: "manual"
1754
1770
  });
1755
- return /* @__PURE__ */ F("section", {
1771
+ return /* @__PURE__ */ I("section", {
1756
1772
  className: "scene-slice-dialog",
1757
1773
  "data-scene-slice-dialog": Z(t, "slice") || l?.slice,
1758
1774
  "data-scene-command": u,
1759
1775
  children: [
1760
- /* @__PURE__ */ P("header", {
1776
+ /* @__PURE__ */ F("header", {
1761
1777
  className: "scene-slice-dialog-header",
1762
- children: /* @__PURE__ */ P("h2", {
1778
+ children: /* @__PURE__ */ F("h2", {
1763
1779
  className: "scene-slice-dialog-title",
1764
1780
  children: d
1765
1781
  })
1766
1782
  }),
1767
- /* @__PURE__ */ P(xn.Provider, {
1783
+ /* @__PURE__ */ F(bn.Provider, {
1768
1784
  value: g,
1769
- children: /* @__PURE__ */ P(Sn, { element: y })
1785
+ children: /* @__PURE__ */ F(xn, { element: y })
1770
1786
  }),
1771
- /* @__PURE__ */ P("footer", {
1787
+ /* @__PURE__ */ F("footer", {
1772
1788
  className: "scene-slice-dialog-footer",
1773
- children: /* @__PURE__ */ P("button", {
1789
+ children: /* @__PURE__ */ F("button", {
1774
1790
  type: "button",
1775
1791
  className: "scene-slice-dialog-cancel",
1776
1792
  onClick: g,
@@ -1780,18 +1796,18 @@ function Ar(e) {
1780
1796
  ]
1781
1797
  });
1782
1798
  }
1783
- function jr(e) {
1799
+ function Pr(e) {
1784
1800
  let { element: t } = e;
1785
- return Z(t, "slice") === "" ? Z(t, "kind").toLowerCase() === "action" ? /* @__PURE__ */ P(Nr, { ...e }) : /* @__PURE__ */ P(C, { ...e }) : /* @__PURE__ */ P(Mr, { ...e });
1801
+ return Z(t, "slice") === "" ? Z(t, "kind").toLowerCase() === "action" ? /* @__PURE__ */ F(Ir, { ...e }) : /* @__PURE__ */ F(C, { ...e }) : /* @__PURE__ */ F(Fr, { ...e });
1786
1802
  }
1787
- function Mr(e) {
1788
- let { element: t } = e, { routes: n, parameters: r, queries: i, selections: a } = z(), s = Z(t, "slice"), c = Z(t, "command") || s.split(".").at(-1) || "", l = n?.commandSchemas?.[c], u = o(() => G(l ?? ""), [l]), d = o(() => In(i), [i]);
1789
- if (Ln(u, r, o(() => Object.values(a).filter((e) => e !== void 0), [a]), d).length === 0) return /* @__PURE__ */ P(C, { ...e });
1803
+ function Fr(e) {
1804
+ let { element: t } = e, { routes: n, parameters: r, queries: i, selections: a } = B(), s = Z(t, "slice"), c = Z(t, "command") || s.split(".").at(-1) || "", l = n?.commandSchemas?.[c], u = o(() => K(l ?? ""), [l]), d = o(() => Ln(i), [i]);
1805
+ if (zn(u, r, o(() => Rn(a, i), [a, i]), d).length === 0) return /* @__PURE__ */ F(C, { ...e });
1790
1806
  let f = Z(t, "label", Z(t, "name", t.id));
1791
- return /* @__PURE__ */ P("span", {
1807
+ return /* @__PURE__ */ F("span", {
1792
1808
  className: "stage-toolbar-action",
1793
1809
  "data-scene-toolbar-item": Z(t, "name", t.id),
1794
- children: /* @__PURE__ */ P(I, {
1810
+ children: /* @__PURE__ */ F(L, {
1795
1811
  type: "button",
1796
1812
  "data-scene-id": t.id,
1797
1813
  disabled: !0,
@@ -1801,12 +1817,12 @@ function Mr(e) {
1801
1817
  })
1802
1818
  });
1803
1819
  }
1804
- function Nr(e) {
1805
- let { element: t } = e, { routes: n, parameters: r, queries: i, selections: a } = z(), s = Z(t, "name", t.id), c = Z(t, "target"), l = Z(t, "label", s), u = n?.commandSchemas?.[c], d = o(() => G(u ?? ""), [u]), f = o(() => In(i), [i]), p = Ln(d, r, o(() => Object.values(a).filter((e) => e !== void 0), [a]), f), m = d.filter((e) => !Mn(e, r) && !(e.identifier && e.required && Fn(e, f))), h = u ? {
1820
+ function Ir(e) {
1821
+ let { element: t } = e, { routes: n, parameters: r, queries: i, selections: a } = B(), s = Z(t, "name", t.id), c = Z(t, "target"), l = Z(t, "label", s), u = n?.commandSchemas?.[c], d = o(() => K(u ?? ""), [u]), f = o(() => Ln(i), [i]), p = zn(d, r, o(() => Rn(a, i), [a, i]), f), m = d.filter((e) => !jn(e, r) && !(e.identifier && e.required && Pn(e, f))), h = u ? {
1806
1822
  schema: u,
1807
1823
  fields: m.map((e) => ({
1808
1824
  name: e.name,
1809
- label: K(e.name)
1825
+ label: q(e.name)
1810
1826
  })),
1811
1827
  generationMode: "manual"
1812
1828
  } : {}, g = {
@@ -1819,36 +1835,36 @@ function Nr(e) {
1819
1835
  ...h
1820
1836
  }
1821
1837
  };
1822
- return /* @__PURE__ */ P("span", {
1838
+ return /* @__PURE__ */ F("span", {
1823
1839
  className: "stage-toolbar-action",
1824
1840
  "data-scene-toolbar-item": s,
1825
- children: p.length > 0 ? /* @__PURE__ */ P(I, {
1841
+ children: p.length > 0 ? /* @__PURE__ */ F(L, {
1826
1842
  type: "button",
1827
1843
  "data-scene-id": t.id,
1828
1844
  disabled: !0,
1829
1845
  title: "Select a row first",
1830
1846
  ...e.interactions,
1831
1847
  children: l
1832
- }) : /* @__PURE__ */ P(Dr, {
1848
+ }) : /* @__PURE__ */ F(Ar, {
1833
1849
  element: g,
1834
1850
  interactions: e.interactions,
1835
1851
  slots: e.slots
1836
1852
  })
1837
1853
  });
1838
1854
  }
1839
- var Pr = {
1840
- ...E,
1841
- "core:table": wr,
1842
- "core:action": Dr,
1843
- "core:toolbarItem": jr,
1844
- "core:sliceDialog": Ar,
1845
- [xr]: Sn,
1846
- [lr]: hr
1855
+ var Lr = {
1856
+ ...D,
1857
+ "core:table": Dr,
1858
+ "core:action": Ar,
1859
+ "core:toolbarItem": Pr,
1860
+ "core:sliceDialog": Nr,
1861
+ [Cr]: xn,
1862
+ [dr]: _r
1847
1863
  };
1848
1864
  //#endregion
1849
1865
  //#region src/useStrings.ts
1850
- function Fr() {
1851
- let e = nt(), [t, n] = c([]), [r, a] = c(""), [o, s] = c({});
1866
+ function Rr() {
1867
+ let e = tt(), [t, n] = c([]), [r, a] = c(""), [o, s] = c({});
1852
1868
  return i(() => {
1853
1869
  let t = new AbortController();
1854
1870
  return e.locales(t.signal).then((e) => {
@@ -1865,11 +1881,11 @@ function Fr() {
1865
1881
  dictionary: o
1866
1882
  };
1867
1883
  }
1868
- var Ir = /* @__PURE__ */ new Set(["core:table"]);
1869
- function Lr(e) {
1870
- return Rr(e, /* @__PURE__ */ new Map(), void 0);
1884
+ var zr = /* @__PURE__ */ new Set(["core:table"]);
1885
+ function Br(e) {
1886
+ return Vr(e, /* @__PURE__ */ new Map(), void 0);
1871
1887
  }
1872
- function Rr(e, t, n) {
1888
+ function Vr(e, t, n) {
1873
1889
  let r = e;
1874
1890
  if (!r.slots) return e;
1875
1891
  let i = !1, a = {};
@@ -1878,7 +1894,7 @@ function Rr(e, t, n) {
1878
1894
  a[e] = o.map((e) => {
1879
1895
  let t = e, n = $(t, "typeName");
1880
1896
  t.componentName === "core:data" && n && (r.set(n, t), s = t);
1881
- let a = Rr(Br(zr(t, r), s), r, s);
1897
+ let a = Vr(Ur(Hr(t, r), s), r, s);
1882
1898
  return a !== e && (i = !0), a;
1883
1899
  });
1884
1900
  }
@@ -1887,8 +1903,8 @@ function Rr(e, t, n) {
1887
1903
  slots: a
1888
1904
  } : e;
1889
1905
  }
1890
- function zr(e, t) {
1891
- if (!Ir.has(e.componentName)) return e;
1906
+ function Hr(e, t) {
1907
+ if (!zr.has(e.componentName)) return e;
1892
1908
  let n = $(e, "typeName"), r = n ? t.get(n) : void 0;
1893
1909
  if (!r || e.properties.queryArguments !== void 0) return e;
1894
1910
  let i = $(r, "by"), a = { ...e.properties }, o = $(r, "query");
@@ -1897,7 +1913,7 @@ function zr(e, t) {
1897
1913
  properties: a
1898
1914
  };
1899
1915
  }
1900
- function Br(e, t) {
1916
+ function Ur(e, t) {
1901
1917
  if (e.componentName !== "core:action" || !Array.isArray(e.properties?.alternatives) || !t || e.properties.itemQuery !== void 0) return e;
1902
1918
  let n = { ...e.properties };
1903
1919
  if (t.properties?.isCollection === !0) return n.itemSelection = !0, {
@@ -1916,7 +1932,7 @@ function $(e, t) {
1916
1932
  }
1917
1933
  //#endregion
1918
1934
  //#region src/stageQueryBindings.tsx
1919
- function Vr(e) {
1935
+ function Wr(e) {
1920
1936
  let t = /* @__PURE__ */ new Set(), n = (e) => {
1921
1937
  if (Array.isArray(e)) {
1922
1938
  e.forEach(n);
@@ -1936,7 +1952,7 @@ function Vr(e) {
1936
1952
  };
1937
1953
  return r(e), [...t];
1938
1954
  }
1939
- function Hr(e) {
1955
+ function Gr(e) {
1940
1956
  let t = /* @__PURE__ */ new Map(), n = (e, t) => {
1941
1957
  let n = e.properties?.[t];
1942
1958
  return typeof n == "string" && n.length > 0 ? n : void 0;
@@ -1955,8 +1971,8 @@ function Hr(e) {
1955
1971
  };
1956
1972
  return r(e), [...t.values()];
1957
1973
  }
1958
- function Ur({ source: e }) {
1959
- let { routes: t, routesReady: n, parameters: r, session: i } = z(), a = e.by ? r[e.by] || i[e.by] : void 0, s = o(() => e.by ? a ? { [e.by]: a } : {} : {
1974
+ function Kr({ source: e }) {
1975
+ let { routes: t, routesReady: n, parameters: r, session: i } = B(), a = e.by ? r[e.by] || i[e.by] : void 0, s = o(() => e.by ? a ? { [e.by]: a } : {} : {
1960
1976
  ...i,
1961
1977
  ...r
1962
1978
  }, [
@@ -1965,7 +1981,7 @@ function Ur({ source: e }) {
1965
1981
  i,
1966
1982
  e.by
1967
1983
  ]);
1968
- return B({
1984
+ return V({
1969
1985
  scope: `data:${e.typeName}`,
1970
1986
  name: e.query,
1971
1987
  alias: e.typeName,
@@ -1975,12 +1991,12 @@ function Ur({ source: e }) {
1975
1991
  list: !0
1976
1992
  }), null;
1977
1993
  }
1978
- function Wr({ name: e }) {
1979
- let { routes: t, routesReady: n, parameters: r, session: i } = z(), a = o(() => ({
1994
+ function qr({ name: e }) {
1995
+ let { routes: t, routesReady: n, parameters: r, session: i } = B(), a = o(() => ({
1980
1996
  ...i,
1981
1997
  ...r
1982
1998
  }), [r, i]);
1983
- return B({
1999
+ return V({
1984
2000
  scope: `binding:${e}`,
1985
2001
  name: e,
1986
2002
  route: t?.queries?.[e],
@@ -1989,11 +2005,11 @@ function Wr({ name: e }) {
1989
2005
  list: !0
1990
2006
  }), null;
1991
2007
  }
1992
- function Gr({ element: e }) {
1993
- let t = o(() => Vr(e), [e]), n = o(() => Hr(e), [e]);
1994
- return /* @__PURE__ */ F(Pe, { children: [t.map((e) => /* @__PURE__ */ P(Wr, { name: e }, e)), n.map((e) => /* @__PURE__ */ P(Ur, { source: e }, e.typeName))] });
2008
+ function Jr({ element: e }) {
2009
+ let t = o(() => Wr(e), [e]), n = o(() => Gr(e), [e]);
2010
+ return /* @__PURE__ */ I(Ne, { children: [t.map((e) => /* @__PURE__ */ F(qr, { name: e }, e)), n.map((e) => /* @__PURE__ */ F(Kr, { source: e }, e.typeName))] });
1995
2011
  }
1996
- function Kr(e) {
2012
+ function Yr(e) {
1997
2013
  let t = /* @__PURE__ */ new Set(), n = [];
1998
2014
  for (let r of e) for (let e of r.contributions ?? []) {
1999
2015
  if (e.contributionPointName !== "Navigation") continue;
@@ -2006,7 +2022,7 @@ function Kr(e) {
2006
2022
  ]);
2007
2023
  if (t.has(s)) continue;
2008
2024
  t.add(s);
2009
- let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = Yr(r.destination) ? r.destination : void 0;
2025
+ let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = Qr(r.destination) ? r.destination : void 0;
2010
2026
  n.push({
2011
2027
  label: i,
2012
2028
  targetScreen: a,
@@ -2014,7 +2030,7 @@ function Kr(e) {
2014
2030
  order: c,
2015
2031
  ...typeof r.icon == "string" ? { icon: r.icon } : {},
2016
2032
  ...typeof r.presentation == "string" ? { presentation: r.presentation } : {},
2017
- ...l && Xr(l) ? { destination: l } : {}
2033
+ ...l && $r(l) ? { destination: l } : {}
2018
2034
  });
2019
2035
  }
2020
2036
  return n.map((e, t) => ({
@@ -2022,7 +2038,7 @@ function Kr(e) {
2022
2038
  index: t
2023
2039
  })).sort((e, t) => (e.entry.order ?? 2 ** 53 - 1) - (t.entry.order ?? 2 ** 53 - 1) || e.index - t.index).map(({ entry: e }) => e);
2024
2040
  }
2025
- function qr(e) {
2041
+ function Xr(e) {
2026
2042
  let t = {
2027
2043
  label: "",
2028
2044
  children: []
@@ -2047,21 +2063,21 @@ function qr(e) {
2047
2063
  }
2048
2064
  return t.children;
2049
2065
  }
2050
- function Jr(e, t) {
2066
+ function Zr(e, t) {
2051
2067
  for (let n of e) {
2052
2068
  if (n.screen === t) return [n.label];
2053
- let e = Jr(n.children, t);
2069
+ let e = Zr(n.children, t);
2054
2070
  if (e.length > 0) return [n.label, ...e];
2055
2071
  }
2056
2072
  return [];
2057
2073
  }
2058
- function Yr(e) {
2074
+ function Qr(e) {
2059
2075
  return typeof e == "object" && !!e && !Array.isArray(e);
2060
2076
  }
2061
- function Xr(e) {
2077
+ function $r(e) {
2062
2078
  return e.outlet !== void 0 || e.dialog !== void 0 || e.kind === "external" || e.kind === "dialog";
2063
2079
  }
2064
- function Zr(e, t, n) {
2080
+ function ei(e, t, n) {
2065
2081
  return e.filter((e) => !t.has(e.name)).map((e) => ({
2066
2082
  label: e.name,
2067
2083
  targetScreen: e.name,
@@ -2070,77 +2086,77 @@ function Zr(e, t, n) {
2070
2086
  }
2071
2087
  //#endregion
2072
2088
  //#region src/blueprint.ts
2073
- var Qr = "Stage:locale";
2074
- function $r(e) {
2075
- let t = Ee(e), n = t.packages.filter((e) => e !== "PrimeReact");
2076
- return n.splice(Math.max(n.indexOf(ye), 0), 0, "PrimeReact"), {
2089
+ var ti = "Stage:locale";
2090
+ function ni(e) {
2091
+ let t = Te(e), n = t.packages.filter((e) => e !== "PrimeReact");
2092
+ return n.splice(Math.max(n.indexOf(ve), 0), 0, "PrimeReact"), {
2077
2093
  ...t,
2078
2094
  name: e?.length ? t.name : "Stage",
2079
2095
  packages: n
2080
2096
  };
2081
2097
  }
2082
- var ei = {
2083
- ...ge,
2084
- PrimeReact: Re.components
2098
+ var ri = {
2099
+ ...he,
2100
+ PrimeReact: Le.components
2085
2101
  };
2086
- function ti(e) {
2102
+ function ii(e) {
2087
2103
  return {
2088
- ...E,
2089
- ...Le,
2090
- ...ve,
2091
- ...Te,
2104
+ ...D,
2105
+ ...Ie,
2106
+ ..._e,
2107
+ ...we,
2092
2108
  ...e
2093
2109
  };
2094
2110
  }
2095
- function ni(e) {
2111
+ function ai(e) {
2096
2112
  return e ? {
2097
2113
  ...e,
2098
- ...ei
2099
- } : ei;
2114
+ ...ri
2115
+ } : ri;
2100
2116
  }
2101
- var ri = "Stage:navigationTree";
2102
- function ii(e, t, n) {
2103
- return M(e, A.Logo, {
2117
+ var oi = "Stage:navigationTree";
2118
+ function si(e, t, n) {
2119
+ return N(e, j.Logo, {
2104
2120
  label: t,
2105
2121
  initials: t.slice(0, 1).toUpperCase() || "S",
2106
2122
  targetScreen: "",
2107
2123
  ...n ? { lightImageUrl: n } : {}
2108
2124
  });
2109
2125
  }
2110
- function ai(e, t, n, r, i, a = !1, o = !0) {
2111
- let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = Kr(e), u = Zr(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = qr([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => we({
2126
+ function ci(e, t, n, r, i, a = !1, o = !0) {
2127
+ let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = Yr(e), u = ei(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = Xr([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => Ce({
2112
2128
  label: e.name,
2113
2129
  targetScreen: e.name,
2114
2130
  icon: "pi pi-table",
2115
2131
  group: "Screens",
2116
2132
  order: n
2117
- }, t)), p = Jr(qr(l), t), m = e.find((e) => e.name === t)?.path?.length ? Jr(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? M("menu-hierarchy", ri, {
2133
+ }, t)), p = Zr(Xr(l), t), m = e.find((e) => e.name === t)?.path?.length ? Zr(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? N("menu-hierarchy", oi, {
2118
2134
  nodes: d,
2119
2135
  activeScreen: t
2120
- }) : M("menu-screens", A.Menu, {
2136
+ }) : N("menu-screens", j.Menu, {
2121
2137
  title: "Screens",
2122
2138
  label: "Screens"
2123
2139
  }, { items: f }), _ = [];
2124
- n.length > 1 && _.push(M("topbar-locale", Qr, {
2140
+ n.length > 1 && _.push(N("topbar-locale", ti, {
2125
2141
  locales: n,
2126
2142
  locale: r
2127
- })), _.push(M("topbar-theme", A.ThemeSwitcher, { label: "Theme" }));
2143
+ })), _.push(N("topbar-theme", j.ThemeSwitcher, { label: "Theme" }));
2128
2144
  let v = { regionNavigation: a };
2129
2145
  return {
2130
- [j.Topbar]: [M("topbar", A.Topbar, v, {
2131
- logo: [ii("topbar-logo", c, i?.image)],
2146
+ [M.Topbar]: [N("topbar", j.Topbar, v, {
2147
+ logo: [si("topbar-logo", c, i?.image)],
2132
2148
  end: _
2133
2149
  })],
2134
- [j.Sidebar]: [M("sidebar", A.Sidebar, v, { logo: [ii("sidebar-logo", c, i?.image)] })],
2135
- ...a ? {} : { [j.Menu]: [g] },
2136
- [j.Breadcrumb]: [M("breadcrumb", A.Breadcrumb, {
2150
+ [M.Sidebar]: [N("sidebar", j.Sidebar, v, { logo: [si("sidebar-logo", c, i?.image)] })],
2151
+ ...a ? {} : { [M.Menu]: [g] },
2152
+ [M.Breadcrumb]: [N("breadcrumb", j.Breadcrumb, {
2137
2153
  homeTargetScreen: s,
2138
2154
  items: (h.length > 0 ? h : [t]).map((e) => ({ label: e }))
2139
2155
  })],
2140
- ...o ? { [j.Footer]: [M("footer", A.Footer, { text: `${c} · rendered from your model` })] } : {},
2141
- [j.ConfigPanel]: [M(A.ConfigPanel, A.ConfigPanel, {
2156
+ ...o ? { [M.Footer]: [N("footer", j.Footer, { text: `${c} · rendered from your model` })] } : {},
2157
+ [M.ConfigPanel]: [N(j.ConfigPanel, j.ConfigPanel, {
2142
2158
  title: "Settings",
2143
- themes: be.map((e) => ({
2159
+ themes: ye.map((e) => ({
2144
2160
  name: e.name,
2145
2161
  label: e.name,
2146
2162
  isDark: e.isDark ?? !1
@@ -2148,65 +2164,65 @@ function ai(e, t, n, r, i, a = !1, o = !0) {
2148
2164
  })]
2149
2165
  };
2150
2166
  }
2151
- function oi(e) {
2167
+ function li(e) {
2152
2168
  return `#/${encodeURIComponent(e)}`;
2153
2169
  }
2154
2170
  //#endregion
2155
2171
  //#region src/StageChrome.tsx
2156
- var si = e({
2172
+ var ui = e({
2157
2173
  locales: [],
2158
2174
  locale: "",
2159
2175
  setLocale: () => void 0,
2160
2176
  activity: ""
2161
2177
  });
2162
- function ci({ state: e, children: t }) {
2163
- return /* @__PURE__ */ P(si.Provider, {
2178
+ function di({ state: e, children: t }) {
2179
+ return /* @__PURE__ */ F(ui.Provider, {
2164
2180
  value: e,
2165
2181
  children: t
2166
2182
  });
2167
2183
  }
2168
- var li = "Stage:activity";
2169
- function ui() {
2170
- let { locales: e, locale: t, setLocale: n } = r(si);
2171
- return e.length < 2 ? null : /* @__PURE__ */ P("select", {
2184
+ var fi = "Stage:activity";
2185
+ function pi() {
2186
+ let { locales: e, locale: t, setLocale: n } = r(ui);
2187
+ return e.length < 2 ? null : /* @__PURE__ */ F("select", {
2172
2188
  className: "stage-locale",
2173
2189
  "aria-label": "Locale",
2174
2190
  value: t,
2175
2191
  onChange: (e) => n(e.target.value),
2176
- children: e.map((e) => /* @__PURE__ */ P("option", {
2192
+ children: e.map((e) => /* @__PURE__ */ F("option", {
2177
2193
  value: e,
2178
2194
  children: e
2179
2195
  }, e))
2180
2196
  });
2181
2197
  }
2182
- function di({ element: e }) {
2198
+ function mi({ element: e }) {
2183
2199
  let t = e.properties ?? {};
2184
- return /* @__PURE__ */ P("nav", {
2200
+ return /* @__PURE__ */ F("nav", {
2185
2201
  className: "stage-navigation-tree",
2186
2202
  "aria-label": "Navigation",
2187
2203
  "data-scene-id": e.id,
2188
- children: /* @__PURE__ */ P(fi, {
2204
+ children: /* @__PURE__ */ F(hi, {
2189
2205
  nodes: t.nodes ?? [],
2190
2206
  activeScreen: t.activeScreen
2191
2207
  })
2192
2208
  });
2193
2209
  }
2194
- function fi({ nodes: e, activeScreen: t }) {
2195
- return /* @__PURE__ */ P("ul", {
2210
+ function hi({ nodes: e, activeScreen: t }) {
2211
+ return /* @__PURE__ */ F("ul", {
2196
2212
  role: "tree",
2197
- children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ F("li", {
2213
+ children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ I("li", {
2198
2214
  role: "treeitem",
2199
2215
  "aria-expanded": "true",
2200
- children: [/* @__PURE__ */ P("span", {
2216
+ children: [/* @__PURE__ */ F("span", {
2201
2217
  className: "stage-navigation-group",
2202
2218
  children: e.label
2203
- }), /* @__PURE__ */ P(fi, {
2219
+ }), /* @__PURE__ */ F(hi, {
2204
2220
  nodes: e.children,
2205
2221
  activeScreen: t
2206
2222
  })]
2207
- }, e.label) : /* @__PURE__ */ P("li", {
2223
+ }, e.label) : /* @__PURE__ */ F("li", {
2208
2224
  role: "treeitem",
2209
- children: /* @__PURE__ */ P(pi, {
2225
+ children: /* @__PURE__ */ F(gi, {
2210
2226
  node: e,
2211
2227
  screen: e.screen,
2212
2228
  activeScreen: t
@@ -2214,56 +2230,56 @@ function fi({ nodes: e, activeScreen: t }) {
2214
2230
  }, `${e.screen}:${e.label}`))
2215
2231
  });
2216
2232
  }
2217
- function pi({ node: e, screen: t, activeScreen: n }) {
2218
- let i = r(ne), a = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", o = e.destination, s = o?.kind === "external" && o.route !== void 0, c = o && i && !s && Xr(o) ? (e) => {
2233
+ function gi({ node: e, screen: t, activeScreen: n }) {
2234
+ let i = r(re), a = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", o = e.destination, s = o?.kind === "external" && o.route !== void 0, c = o && i && !s && $r(o) ? (e) => {
2219
2235
  e.preventDefault(), i.navigate(o);
2220
2236
  } : void 0;
2221
- return /* @__PURE__ */ F("a", {
2222
- href: s ? o.route : oi(t),
2237
+ return /* @__PURE__ */ I("a", {
2238
+ href: s ? o.route : li(t),
2223
2239
  rel: s ? "noreferrer" : void 0,
2224
2240
  "aria-current": t === n ? "page" : void 0,
2225
2241
  "aria-label": a === "icon" ? e.label : void 0,
2226
2242
  "data-presentation": e.presentation,
2227
2243
  "data-icon": e.icon,
2228
2244
  onClick: c,
2229
- children: [a !== "text" && e.icon && /* @__PURE__ */ P("span", {
2245
+ children: [a !== "text" && e.icon && /* @__PURE__ */ F("span", {
2230
2246
  className: "stage-navigation-icon",
2231
2247
  "aria-hidden": "true",
2232
2248
  "data-icon-name": e.icon
2233
2249
  }), a !== "icon" && e.label]
2234
2250
  });
2235
2251
  }
2236
- function mi({ element: e }) {
2237
- let t = typeof e.properties.name == "string" ? e.properties.name : "", n = r(ne), i = fe(), a = z(), o = n?.outlets[t], s = o && i ? i.screens[o] : void 0, c = e.properties.closable === !0;
2238
- return /* @__PURE__ */ F("div", {
2252
+ function _i({ element: e }) {
2253
+ let t = typeof e.properties.name == "string" ? e.properties.name : "", n = r(re), i = de(), a = B(), o = n?.outlets[t], s = o && i ? i.screens[o] : void 0, c = e.properties.closable === !0;
2254
+ return /* @__PURE__ */ I("div", {
2239
2255
  "data-scene-outlet": t,
2240
2256
  "data-scene-outlet-screen": o,
2241
- children: [c && o && /* @__PURE__ */ P("div", {
2257
+ children: [c && o && /* @__PURE__ */ F("div", {
2242
2258
  className: "scene-outlet-bar",
2243
- children: /* @__PURE__ */ P("button", {
2259
+ children: /* @__PURE__ */ F("button", {
2244
2260
  type: "button",
2245
2261
  className: "scene-outlet-close",
2246
2262
  "aria-label": "Close",
2247
2263
  onClick: () => n?.closeOutlet(t),
2248
2264
  children: "Close"
2249
2265
  })
2250
- }), s && i && /* @__PURE__ */ P(T, {
2266
+ }), s && i && /* @__PURE__ */ F(w, {
2251
2267
  element: s,
2252
2268
  registry: i.registry,
2253
2269
  resolveBinding: a.resolveBinding
2254
2270
  })]
2255
2271
  });
2256
2272
  }
2257
- function hi() {
2258
- let { activity: e } = r(si);
2259
- return e ? /* @__PURE__ */ P("p", {
2273
+ function vi() {
2274
+ let { activity: e } = r(ui);
2275
+ return e ? /* @__PURE__ */ F("p", {
2260
2276
  className: "stage-activity",
2261
2277
  role: "status",
2262
2278
  children: e
2263
2279
  }) : null;
2264
2280
  }
2265
- function gi() {
2266
- let e = k(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
2281
+ function yi() {
2282
+ let e = A(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
2267
2283
  return i(() => {
2268
2284
  let r = e?.isDark ? "dark" : "light";
2269
2285
  document.documentElement.setAttribute("data-scene-color-scheme", r), document.body.setAttribute("data-scene-color-scheme", r), document.body.style.backgroundColor = t ?? "", document.body.style.color = n ?? "";
@@ -2273,44 +2289,44 @@ function gi() {
2273
2289
  n
2274
2290
  ]), null;
2275
2291
  }
2276
- var _i = {
2277
- [Qr]: ui,
2278
- [ri]: di,
2279
- [li]: hi,
2280
- "core:outlet": mi
2281
- }, vi = [
2292
+ var bi = {
2293
+ [ti]: pi,
2294
+ [oi]: mi,
2295
+ [fi]: vi,
2296
+ "core:outlet": _i
2297
+ }, xi = [
2282
2298
  "navigationMode",
2283
2299
  "menuTheme",
2284
2300
  "showFooter"
2285
- ], yi = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2286
- function bi(e, t, n = !1) {
2301
+ ], Si = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2302
+ function Ci(e, t, n = !1) {
2287
2303
  let r = [], i = t.options ?? {}, a = {
2288
2304
  showFooter: !0,
2289
2305
  followsSystem: !1,
2290
2306
  problems: r
2291
2307
  };
2292
2308
  for (let [e, n] of Object.entries(i)) {
2293
- if (!vi.includes(e)) {
2294
- r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${vi.join(", ")}.`);
2309
+ if (!xi.includes(e)) {
2310
+ r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${xi.join(", ")}.`);
2295
2311
  continue;
2296
2312
  }
2297
2313
  if (e === "navigationMode") {
2298
- let e = Se.find((e) => e === n);
2299
- e ? a.mode = e : r.push(`Option 'navigationMode' is '${String(n)}'; expected one of ${Se.join(", ")}.`);
2314
+ let e = xe.find((e) => e === n);
2315
+ e ? a.mode = e : r.push(`Option 'navigationMode' is '${String(n)}'; expected one of ${xe.join(", ")}.`);
2300
2316
  } else if (e === "menuTheme") {
2301
- let e = Ce.find((e) => e === n);
2302
- e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${Ce.join(", ")}.`);
2317
+ let e = Se.find((e) => e === n);
2318
+ e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${Se.join(", ")}.`);
2303
2319
  } else typeof n == "boolean" ? a.showFooter = n : r.push(`Option 'showFooter' is '${String(n)}'; expected true or false.`);
2304
2320
  }
2305
2321
  let o = e?.appearance;
2306
2322
  if (o?.colorScheme !== void 0) {
2307
2323
  a.followsSystem = o.colorScheme === l.System;
2308
2324
  let e = a.followsSystem ? n : o.colorScheme === l.Dark;
2309
- a.colorScheme = e ? me.Dark : me.Light, a.themeName = be.find((t) => (t.isDark ?? !1) === e)?.name;
2325
+ a.colorScheme = e ? pe.Dark : pe.Light, a.themeName = ye.find((t) => (t.isDark ?? !1) === e)?.name;
2310
2326
  }
2311
- return o?.accent !== void 0 && (yi.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
2327
+ return o?.accent !== void 0 && (Si.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
2312
2328
  }
2313
- function xi(e, t) {
2329
+ function wi(e, t) {
2314
2330
  if (e?.root === void 0) return [];
2315
2331
  let n = /* @__PURE__ */ new Set([
2316
2332
  h.RootTemplateUnknown,
@@ -2322,7 +2338,7 @@ function xi(e, t) {
2322
2338
  ]), r = t.diagnostics.filter((e) => n.has(e.code)).map((e) => e.message);
2323
2339
  return r.length === 0 && t.origin !== g.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;
2324
2340
  }
2325
- function Si(e) {
2341
+ function Ti(e) {
2326
2342
  let t = e.length === 4 ? [...e.slice(1)].map((e) => e + e).join("") : e.slice(1), [n, r, i] = [
2327
2343
  0,
2328
2344
  2,
@@ -2330,7 +2346,7 @@ function Si(e) {
2330
2346
  ].map((e) => parseInt(t.slice(e, e + 2), 16));
2331
2347
  return (n * 299 + r * 587 + i * 114) / 1e3 >= 150 ? "#111827" : "#ffffff";
2332
2348
  }
2333
- function Ci(e, t) {
2349
+ function Ei(e, t) {
2334
2350
  if (t === void 0) return e;
2335
2351
  let n = t.length === 4 ? [...t.slice(1)].map((e) => e + e).join("") : t.slice(1), [r, i, a] = [
2336
2352
  0,
@@ -2342,20 +2358,20 @@ function Ci(e, t) {
2342
2358
  tokens: {
2343
2359
  ...e.tokens,
2344
2360
  "primary.color": t,
2345
- "primary.contrastColor": Si(t),
2361
+ "primary.contrastColor": Ti(t),
2346
2362
  "focus.ring": `0 0 0 2px rgb(${r} ${i} ${a} / 0.4)`
2347
2363
  }
2348
2364
  }));
2349
2365
  }
2350
2366
  //#endregion
2351
2367
  //#region src/StageShellSettings.tsx
2352
- var wi = "(prefers-color-scheme: dark)";
2353
- function Ti() {
2368
+ var Di = "(prefers-color-scheme: dark)";
2369
+ function Oi() {
2354
2370
  return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ?? !1;
2355
2371
  }
2356
- function Ei({ settings: e, onSystemSchemeChange: t }) {
2357
- let n = s(De());
2358
- n.current = De();
2372
+ function ki({ settings: e, onSystemSchemeChange: t }) {
2373
+ let n = s(Ee());
2374
+ n.current = Ee();
2359
2375
  let { mode: r, menuTheme: a, colorScheme: o, themeName: c } = e;
2360
2376
  return i(() => {
2361
2377
  let { setMode: e, setMenuTheme: t, setColorScheme: i, setThemeName: s } = n.current;
@@ -2367,16 +2383,16 @@ function Ei({ settings: e, onSystemSchemeChange: t }) {
2367
2383
  c
2368
2384
  ]), i(() => {
2369
2385
  if (!e.followsSystem || !globalThis.matchMedia || !t) return;
2370
- let n = globalThis.matchMedia(wi), r = (e) => t(e.matches);
2386
+ let n = globalThis.matchMedia(Di), r = (e) => t(e.matches);
2371
2387
  return n.addEventListener("change", r), () => n.removeEventListener("change", r);
2372
2388
  }, [e.followsSystem, t]), null;
2373
2389
  }
2374
2390
  //#endregion
2375
2391
  //#region src/stageNavigationModel.ts
2376
- function Di(e) {
2392
+ function Ai(e) {
2377
2393
  return (e?.application.regions.length ?? 0) > 0 || (e?.modules.length ?? 0) > 0;
2378
2394
  }
2379
- function Oi(e) {
2395
+ function ji(e) {
2380
2396
  let t = /* @__PURE__ */ new Map();
2381
2397
  for (let n of e) {
2382
2398
  let e = (n.path ?? []).join(".");
@@ -2389,38 +2405,38 @@ function Oi(e) {
2389
2405
  return t.get(r) ?? i ?? (e.some((e) => e.name === r) ? r : void 0);
2390
2406
  };
2391
2407
  }
2392
- function ki(e) {
2408
+ function Mi(e) {
2393
2409
  return (t) => e.find((e) => e.name === t)?.path?.[0];
2394
2410
  }
2395
- function Ai(e, t) {
2411
+ function Ni(e, t) {
2396
2412
  return {
2397
2413
  structure: e.structure ?? { modules: [] },
2398
2414
  navigation: e.navigation ?? {
2399
2415
  application: { regions: [] },
2400
2416
  modules: []
2401
2417
  },
2402
- screenFor: Oi(e.screens),
2403
- moduleOf: ki(e.screens),
2418
+ screenFor: ji(e.screens),
2419
+ moduleOf: Mi(e.screens),
2404
2420
  ...t ? { isVisible: t } : {}
2405
2421
  };
2406
2422
  }
2407
2423
  //#endregion
2408
2424
  //#region src/stageSlices.ts
2409
- function ji(e) {
2410
- return (t) => G(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
2425
+ function Pi(e) {
2426
+ return (t) => K(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
2411
2427
  name: e.name,
2412
2428
  type: e.type === "text" || e.type === void 0 ? "string" : e.type,
2413
- label: Mi(e.name),
2429
+ label: Fi(e.name),
2414
2430
  required: e.required
2415
2431
  }));
2416
2432
  }
2417
- function Mi(e) {
2433
+ function Fi(e) {
2418
2434
  return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase());
2419
2435
  }
2420
- function Ni(e, t, n) {
2436
+ function Ii(e, t, n) {
2421
2437
  return { invoke: async (r, i, a) => {
2422
2438
  let o = a ?? r.slice(r.lastIndexOf(".") + 1);
2423
- if (!U(o)) return {
2439
+ if (!W(o)) return {
2424
2440
  succeeded: !1,
2425
2441
  message: t ? `The modeled command “${o}” is not registered by this Stage.` : `The modeled command “${o}” is waiting for Stage routes.`
2426
2442
  };
@@ -2438,7 +2454,7 @@ function Ni(e, t, n) {
2438
2454
  }
2439
2455
  //#endregion
2440
2456
  //#region src/standaloneScreenTemplates.ts
2441
- function Pi(e) {
2457
+ function Li(e) {
2442
2458
  let t = new Set(e.map((e) => e.name));
2443
2459
  return e.map((e) => {
2444
2460
  let n = e.fitsSlot, r = n?.includes(".") ? n.slice(0, n.lastIndexOf(".")) : void 0;
@@ -2450,7 +2466,7 @@ function Pi(e) {
2450
2466
  }
2451
2467
  //#endregion
2452
2468
  //#region src/withoutSeededSlots.ts
2453
- function Fi(e, t) {
2469
+ function Ri(e, t) {
2454
2470
  let n = /* @__PURE__ */ new Map();
2455
2471
  for (let e of t) n.has(e.name) || n.set(e.name, e.slots.map((e) => e.name));
2456
2472
  return e.map((e) => {
@@ -2468,7 +2484,7 @@ function Fi(e, t) {
2468
2484
  }
2469
2485
  //#endregion
2470
2486
  //#region src/stageIcons.ts
2471
- var Ii = /* @__PURE__ */ new Map([
2487
+ var zi = /* @__PURE__ */ new Map([
2472
2488
  ["chart", "chart-column"],
2473
2489
  ["add", "plus"],
2474
2490
  ["dollar", "dollar-sign"],
@@ -2476,24 +2492,24 @@ var Ii = /* @__PURE__ */ new Map([
2476
2492
  ["refresh", "refresh-cw"],
2477
2493
  ["invoice", "receipt-text"],
2478
2494
  ["batch", "layers"]
2479
- ]), Li = (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(), Ri = ce([{
2495
+ ]), Bi = (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(), Vi = se([{
2480
2496
  library: m,
2481
2497
  loadGlyph: async ({ key: e }) => {
2482
- let t = Li(e), n = Ii.get(t) ?? t;
2483
- if (Object.hasOwn(Xe, n)) return (await Xe[n]())?.default;
2498
+ let t = Bi(e), n = zi.get(t) ?? t;
2499
+ if (Object.hasOwn(Ye, n)) return (await Ye[n]())?.default;
2484
2500
  }
2485
2501
  }]);
2486
2502
  //#endregion
2487
2503
  //#region src/App.tsx
2488
- function zi(e = {}) {
2489
- return ti({
2504
+ function Hi(e = {}) {
2505
+ return ii({
2490
2506
  ...e,
2491
- ...Pr,
2492
- ..._i
2507
+ ...Lr,
2508
+ ...bi
2493
2509
  });
2494
2510
  }
2495
- function Bi(e, t) {
2496
- return M(`form-${e}-${t.name}`, xr, {
2511
+ function Ui(e, t) {
2512
+ return N(`form-${e}-${t.name}`, Cr, {
2497
2513
  command: t.forCommand,
2498
2514
  label: t.name,
2499
2515
  generationMode: t.generationMode,
@@ -2501,47 +2517,47 @@ function Bi(e, t) {
2501
2517
  fields: t.fields
2502
2518
  });
2503
2519
  }
2504
- function Vi(e, t) {
2520
+ function Wi(e, t) {
2505
2521
  let n = e.screens[0];
2506
- return xe(e, n, {
2507
- profile: $r(e.uiProfiles),
2508
- blueprintTemplates: Pi(t?.length ? [...N, ...t] : N)
2522
+ return be(e, n, {
2523
+ profile: ni(e.uiProfiles),
2524
+ blueprintTemplates: Li(t?.length ? [...P, ...t] : P)
2509
2525
  });
2510
2526
  }
2511
- function Hi(e, t, n, r, i, a, o = !0) {
2512
- let s = Di(e.navigation), c = e.navigation?.application.logo ? {
2527
+ function Gi(e, t, n, r, i, a, o = !0) {
2528
+ let s = Ai(e.navigation), c = e.navigation?.application.logo ? {
2513
2529
  title: e.navigation.application.logo.title,
2514
2530
  image: e.navigation.application.logo.image || void 0
2515
2531
  } : void 0;
2516
2532
  return {
2517
- profile: $r(e.uiProfiles),
2518
- catalog: ni(r),
2519
- blueprintTemplates: Pi(a?.length ? [...N, ...a] : N),
2520
- chrome: (r, i) => i === A.FullPageShell ? { [j.ConfigPanel]: ai(e.screens, r.name, t, n, c, s, o)[j.ConfigPanel] } : ai(e.screens, r.name, t, n, c, s, o),
2521
- form: Bi,
2522
- trailing: [M("activity", li)],
2533
+ profile: ni(e.uiProfiles),
2534
+ catalog: ai(r),
2535
+ blueprintTemplates: Li(a?.length ? [...P, ...a] : P),
2536
+ chrome: (r, i) => i === j.FullPageShell ? { [M.ConfigPanel]: ci(e.screens, r.name, t, n, c, s, o)[M.ConfigPanel] } : ci(e.screens, r.name, t, n, c, s, o),
2537
+ form: Ui,
2538
+ trailing: [N("activity", fi)],
2523
2539
  decorate: (e) => {
2524
- let t = Lr(e);
2540
+ let t = Br(e);
2525
2541
  return i ? b(t, i) : t;
2526
2542
  }
2527
2543
  };
2528
2544
  }
2529
- function Ui(e, t, n, r, i, a) {
2530
- let [o] = dr([t], Wi(e));
2531
- return _e(e, o, Hi(e, n, r, i, void 0, a)).element;
2545
+ function Ki(e, t, n, r, i, a) {
2546
+ let [o] = pr([t], qi(e));
2547
+ return ge(e, o, Gi(e, n, r, i, void 0, a)).element;
2532
2548
  }
2533
- function Wi(e) {
2549
+ function qi(e) {
2534
2550
  return [...e.screenTemplates ?? [], ...e.dialogTemplates ?? []];
2535
2551
  }
2536
- function Gi() {
2552
+ function Ji() {
2537
2553
  try {
2538
2554
  return globalThis.localStorage ?? null;
2539
2555
  } catch {
2540
2556
  return null;
2541
2557
  }
2542
2558
  }
2543
- function Ki({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: a } = {}) {
2544
- let s = nt(), l = o(() => zi(e), [e]), [u, d] = c(), [f, p] = c(""), m = rt(), h = Fr();
2559
+ function Yi({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: a } = {}) {
2560
+ let s = tt(), l = o(() => Hi(e), [e]), [u, d] = c(), [f, p] = c(""), m = nt(), h = Rr();
2545
2561
  return i(() => {
2546
2562
  let e = new AbortController();
2547
2563
  return s.scene(e.signal).then((e) => d(r?.length ? {
@@ -2550,10 +2566,10 @@ function Ki({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
2550
2566
  } : e)).catch((t) => {
2551
2567
  e.signal.aborted || p(t instanceof Error ? t.message : String(t));
2552
2568
  }), () => e.abort();
2553
- }, [s, r]), f ? /* @__PURE__ */ F("main", {
2569
+ }, [s, r]), f ? /* @__PURE__ */ I("main", {
2554
2570
  className: "stage-message",
2555
- children: [/* @__PURE__ */ P("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ P("p", { children: f })]
2556
- }) : u ? /* @__PURE__ */ P(qi, {
2571
+ children: [/* @__PURE__ */ F("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ F("p", { children: f })]
2572
+ }) : u ? /* @__PURE__ */ F(Xi, {
2557
2573
  scene: u,
2558
2574
  registry: l,
2559
2575
  routeState: m,
@@ -2561,21 +2577,21 @@ function Ki({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
2561
2577
  packageCatalog: t,
2562
2578
  screenTemplates: n,
2563
2579
  isVisible: a
2564
- }) : /* @__PURE__ */ P("main", {
2580
+ }) : /* @__PURE__ */ F("main", {
2565
2581
  className: "stage-message",
2566
- children: /* @__PURE__ */ P("h1", { children: "Preparing the Stage" })
2582
+ children: /* @__PURE__ */ F("h1", { children: "Preparing the Stage" })
2567
2583
  });
2568
2584
  }
2569
- function qi({ scene: e, registry: t, routeState: r, strings: i, packageCatalog: a, screenTemplates: s, isVisible: l }) {
2570
- let u = o(() => se(), []), [d, f] = c(Ti), p = e.screens[0]?.name ?? "", m = o(() => $r(e.uiProfiles), [e]), h = o(() => p ? Vi(e, s) : void 0, [
2585
+ function Xi({ scene: e, registry: t, routeState: r, strings: i, packageCatalog: a, screenTemplates: s, isVisible: l }) {
2586
+ let u = o(() => oe(), []), [d, f] = c(Oi), p = e.screens[0]?.name ?? "", m = o(() => ni(e.uiProfiles), [e]), h = o(() => p ? Wi(e, s) : void 0, [
2571
2587
  e,
2572
2588
  s,
2573
2589
  p
2574
- ]), g = o(() => h ? xi(m, h) : [], [m, h]), _ = o(() => h ? bi(m, h, d) : void 0, [
2590
+ ]), g = o(() => h ? wi(m, h) : [], [m, h]), _ = o(() => h ? Ci(m, h, d) : void 0, [
2575
2591
  m,
2576
2592
  h,
2577
2593
  d
2578
- ]), v = o(() => Ci(be, _?.accent), [_?.accent]), y = _?.showFooter ?? !0, b = o(() => Hi(e, i.locales, i.locale, a, i.dictionary, s, y), [
2594
+ ]), v = o(() => Ei(ye, _?.accent), [_?.accent]), y = _?.showFooter ?? !0, b = o(() => Gi(e, i.locales, i.locale, a, i.dictionary, s, y), [
2579
2595
  e,
2580
2596
  i.locales,
2581
2597
  i.locale,
@@ -2583,33 +2599,33 @@ function qi({ scene: e, registry: t, routeState: r, strings: i, packageCatalog:
2583
2599
  a,
2584
2600
  s,
2585
2601
  y
2586
- ]), x = n((e) => f(e), []), ee = o(() => Ai(e, l), [e, l]), S = o(() => ({
2602
+ ]), x = n((e) => f(e), []), ee = o(() => Ni(e, l), [e, l]), S = o(() => ({
2587
2603
  ...e,
2588
- screens: dr(Fi(e.screens, [
2604
+ screens: pr(Ri(e.screens, [
2589
2605
  ...e.screenTemplates,
2590
2606
  ...e.dialogTemplates ?? [],
2591
- ...N,
2607
+ ...P,
2592
2608
  ...s ?? []
2593
- ]), Wi(e))
2609
+ ]), qi(e))
2594
2610
  }), [e, s]);
2595
- return p ? g.length > 0 ? /* @__PURE__ */ F("main", {
2611
+ return p ? g.length > 0 ? /* @__PURE__ */ I("main", {
2596
2612
  className: "stage-message",
2597
2613
  role: "alert",
2598
2614
  "data-stage-startup-problem": "root-template",
2599
2615
  children: [
2600
- /* @__PURE__ */ P("h1", { children: "Unable to start this Stage" }),
2601
- /* @__PURE__ */ P("p", { children: "The ui profile's root template cannot be the application's shell." }),
2602
- /* @__PURE__ */ P("ul", { children: g.map((e) => /* @__PURE__ */ P("li", { children: e }, e)) })
2616
+ /* @__PURE__ */ F("h1", { children: "Unable to start this Stage" }),
2617
+ /* @__PURE__ */ F("p", { children: "The ui profile's root template cannot be the application's shell." }),
2618
+ /* @__PURE__ */ F("ul", { children: g.map((e) => /* @__PURE__ */ F("li", { children: e }, e)) })
2603
2619
  ]
2604
- }) : /* @__PURE__ */ P(pe, {
2620
+ }) : /* @__PURE__ */ F(fe, {
2605
2621
  application: S,
2606
2622
  composition: b,
2607
2623
  navigationModel: ee,
2608
2624
  registry: t,
2609
2625
  initialScreen: p,
2610
2626
  history: u,
2611
- layoutConfigStorage: Gi(),
2612
- scope: (t, n) => /* @__PURE__ */ P(Ji, {
2627
+ layoutConfigStorage: Ji(),
2628
+ scope: (t, n) => /* @__PURE__ */ F(Zi, {
2613
2629
  scene: e,
2614
2630
  routeState: r,
2615
2631
  strings: i,
@@ -2619,25 +2635,25 @@ function qi({ scene: e, registry: t, routeState: r, strings: i, packageCatalog:
2619
2635
  onSystemSchemeChange: x,
2620
2636
  children: n
2621
2637
  }),
2622
- renderScreen: (e, n) => /* @__PURE__ */ P(Xi, {
2638
+ renderScreen: (e, n) => /* @__PURE__ */ F($i, {
2623
2639
  element: e,
2624
2640
  configuration: n,
2625
2641
  registry: t
2626
2642
  }),
2627
- renderDialog: () => /* @__PURE__ */ P(Ar, {}),
2628
- renderDialogTemplate: (e, n, r) => /* @__PURE__ */ P(Zi, {
2643
+ renderDialog: () => /* @__PURE__ */ F(Nr, {}),
2644
+ renderDialogTemplate: (e, n, r) => /* @__PURE__ */ F(ea, {
2629
2645
  template: e,
2630
2646
  content: n,
2631
2647
  registry: t,
2632
2648
  strings: i,
2633
2649
  close: () => r.closeDialog()
2634
2650
  })
2635
- }) : /* @__PURE__ */ F("main", {
2651
+ }) : /* @__PURE__ */ I("main", {
2636
2652
  className: "stage-message",
2637
- children: [/* @__PURE__ */ P("h1", { children: "Nothing to show yet" }), /* @__PURE__ */ P("p", { children: "This model has no slice carrying a command or a read model, so there is no screen to render." })]
2653
+ children: [/* @__PURE__ */ F("h1", { children: "Nothing to show yet" }), /* @__PURE__ */ F("p", { children: "This model has no slice carrying a command or a read model, so there is no screen to render." })]
2638
2654
  });
2639
2655
  }
2640
- function Ji({ scene: e, routeState: t, strings: n, navigation: r, themes: a, shellSettings: o, onSystemSchemeChange: s, children: l }) {
2656
+ function Zi({ scene: e, routeState: t, strings: n, navigation: r, themes: a, shellSettings: o, onSystemSchemeChange: s, children: l }) {
2641
2657
  let [d, f] = c(""), { navigate: p } = r;
2642
2658
  return i(() => f(""), [r.currentScreen, r.currentDialog]), i(() => {
2643
2659
  let e = (e) => {
@@ -2654,24 +2670,24 @@ function Ji({ scene: e, routeState: t, strings: n, navigation: r, themes: a, she
2654
2670
  r && (r.dialog === void 0 ? r.screen !== void 0 && !e.screens.some((e) => e.name === r.screen) ? f(`The modeled screen “${r.screen}” is not available.`) : p(r) : e.dialogTemplates?.some((e) => e.name === r.dialog) ? p(r) : f(`The modeled dialog “${r.dialog}” is not available in this Stage runtime.`));
2655
2671
  };
2656
2672
  return globalThis.addEventListener("cratis.scene.navigate", t), () => globalThis.removeEventListener("cratis.scene.navigate", t);
2657
- }, [p, e]), /* @__PURE__ */ P(w, {
2658
- registry: Ri,
2659
- children: /* @__PURE__ */ F(he, {
2673
+ }, [p, e]), /* @__PURE__ */ F(te, {
2674
+ registry: Vi,
2675
+ children: /* @__PURE__ */ I(me, {
2660
2676
  themes: a,
2661
2677
  children: [
2662
- o && /* @__PURE__ */ P(Ei, {
2678
+ o && /* @__PURE__ */ F(ki, {
2663
2679
  settings: o,
2664
2680
  onSystemSchemeChange: s
2665
2681
  }),
2666
- /* @__PURE__ */ P(gi, {}),
2667
- /* @__PURE__ */ P(It, {
2682
+ /* @__PURE__ */ F(yi, {}),
2683
+ /* @__PURE__ */ F(Ft, {
2668
2684
  routes: t.routes,
2669
2685
  routesReady: t.ready,
2670
2686
  parameters: r.currentParameters,
2671
2687
  locale: n.locale,
2672
2688
  locales: n.locales,
2673
2689
  screen: r.primaryScreen ?? e.screens[0]?.name ?? "",
2674
- children: /* @__PURE__ */ P(Yi, {
2690
+ children: /* @__PURE__ */ F(Qi, {
2675
2691
  activity: d,
2676
2692
  routesReady: t.ready,
2677
2693
  scene: e,
@@ -2684,14 +2700,14 @@ function Ji({ scene: e, routeState: t, strings: n, navigation: r, themes: a, she
2684
2700
  })
2685
2701
  });
2686
2702
  }
2687
- function Yi({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: a }) {
2688
- let s = z(), c = de(), l = $t(), d = o(() => Ni(l, t, s.refreshAfterCommand), [
2703
+ function Qi({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: a }) {
2704
+ let s = B(), c = ue(), l = Qt(), d = o(() => Ii(l, t, s.refreshAfterCommand), [
2689
2705
  l,
2690
2706
  t,
2691
2707
  s.refreshAfterCommand
2692
- ]), f = o(() => ji(n.commandSchemas), [n.commandSchemas]), p = D({
2708
+ ]), f = o(() => Pi(n.commandSchemas), [n.commandSchemas]), p = O({
2693
2709
  executeCommand: async (e, n) => {
2694
- let i = U(e);
2710
+ let i = W(e);
2695
2711
  if (!i && !t) return r(`The modeled command “${e}” is waiting for Stage routes.`), {
2696
2712
  isSuccess: !1,
2697
2713
  validationErrors: []
@@ -2708,7 +2724,7 @@ function Yi({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2708
2724
  };
2709
2725
  },
2710
2726
  navigate: (e, t) => {
2711
- n.screens.some((t) => t.name === e) ? W(e, tn(t)) : r(`The modeled screen “${e}” is not available.`);
2727
+ n.screens.some((t) => t.name === e) ? G(e, en(t)) : r(`The modeled screen “${e}” is not available.`);
2712
2728
  },
2713
2729
  navigateBack: () => globalThis.history?.back(),
2714
2730
  openDialog: async (e) => {
@@ -2725,18 +2741,18 @@ function Yi({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2725
2741
  refreshQuery: async (e) => s.refreshQuery(e),
2726
2742
  raise: async (e) => r(`The modeled trigger “${e}” is not available in this Stage runtime.`)
2727
2743
  });
2728
- return /* @__PURE__ */ P(ci, {
2744
+ return /* @__PURE__ */ F(di, {
2729
2745
  state: {
2730
2746
  locales: i.locales,
2731
2747
  locale: i.locale,
2732
2748
  setLocale: i.setLocale,
2733
2749
  activity: e
2734
2750
  },
2735
- children: /* @__PURE__ */ P(ae, {
2751
+ children: /* @__PURE__ */ F(E, {
2736
2752
  invoker: d,
2737
- children: /* @__PURE__ */ P(re, {
2753
+ children: /* @__PURE__ */ F(T, {
2738
2754
  fieldsFor: f,
2739
- children: /* @__PURE__ */ P(te, {
2755
+ children: /* @__PURE__ */ F(ne, {
2740
2756
  dispatcher: p,
2741
2757
  context: {
2742
2758
  resolve: s.resolveBinding,
@@ -2750,9 +2766,9 @@ function Yi({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2750
2766
  })
2751
2767
  });
2752
2768
  }
2753
- function Xi({ element: e, configuration: t, registry: n }) {
2754
- let r = z(), i = Jt();
2755
- return /* @__PURE__ */ F(Pe, { children: [/* @__PURE__ */ P(Gr, { element: e }), /* @__PURE__ */ P(T, {
2769
+ function $i({ element: e, configuration: t, registry: n }) {
2770
+ let r = B(), i = qt();
2771
+ return /* @__PURE__ */ I(Ne, { children: [/* @__PURE__ */ F(Jr, { element: e }), /* @__PURE__ */ F(w, {
2756
2772
  element: e,
2757
2773
  registry: n,
2758
2774
  resolveBinding: r.resolveBinding,
@@ -2761,25 +2777,25 @@ function Xi({ element: e, configuration: t, registry: n }) {
2761
2777
  configuration: t
2762
2778
  })] });
2763
2779
  }
2764
- function Zi({ template: e, content: t, registry: n, strings: r, close: a }) {
2765
- let o = z(), s = Jt(), c = b(t, r.dictionary);
2780
+ function ea({ template: e, content: t, registry: n, strings: r, close: a }) {
2781
+ let o = B(), s = qt(), c = b(t, r.dictionary);
2766
2782
  return i(() => {
2767
2783
  let e = (e) => {
2768
2784
  e.key === "Escape" && a();
2769
2785
  };
2770
2786
  return globalThis.addEventListener("keydown", e), () => globalThis.removeEventListener("keydown", e);
2771
- }, [a]), /* @__PURE__ */ P("div", {
2787
+ }, [a]), /* @__PURE__ */ F("div", {
2772
2788
  className: "stage-dialog-backdrop",
2773
- children: /* @__PURE__ */ F("section", {
2789
+ children: /* @__PURE__ */ I("section", {
2774
2790
  role: "dialog",
2775
2791
  "aria-modal": "true",
2776
2792
  "aria-label": e.displayName ?? e.name,
2777
2793
  className: "stage-dialog",
2778
- children: [/* @__PURE__ */ P("button", {
2794
+ children: [/* @__PURE__ */ F("button", {
2779
2795
  type: "button",
2780
2796
  onClick: a,
2781
2797
  children: "Close"
2782
- }), /* @__PURE__ */ P(T, {
2798
+ }), /* @__PURE__ */ F(w, {
2783
2799
  element: c,
2784
2800
  registry: n,
2785
2801
  resolveBinding: o.resolveBinding,
@@ -2791,9 +2807,9 @@ function Zi({ template: e, content: t, registry: n, strings: r, close: a }) {
2791
2807
  }
2792
2808
  //#endregion
2793
2809
  //#region src/stageTheme.ts
2794
- var Qi = "[data-scene-color-scheme='dark']", $i = {
2795
- preset: Ze,
2796
- options: { darkModeSelector: Qi }
2810
+ var ta = "[data-scene-color-scheme='dark']", na = {
2811
+ preset: Xe,
2812
+ options: { darkModeSelector: ta }
2797
2813
  };
2798
2814
  //#endregion
2799
- export { Ki as App, Ki as StageApplication, Sn as StageCommandForm, It as StageDataProvider, sr as StageGuardedAction, tt as StageSourceProvider, Ui as composeStageScreen, Ni as createStageSliceInvoker, Lt as dataChanged, Zt as executeRegisteredCommand, st as hostedBasePath, mt as performQuery, ut as registerQueryRouteResolver, U as registeredCommand, dt as registeredQuery, ji as sliceFieldsFrom, zi as stageApplicationRegistry, Hi as stageComposition, Qi as stageDarkSelector, $e as stageEndpoints, Vi as stageShellOf, $i as stageTheme, Qe as staticStageSource, ht as subscribeQuery, $t as useStageCommandExecutor, z as useStageData, B as useStageQuery, nt as useStageSource };
2815
+ export { Yi as App, Yi as StageApplication, xn as StageCommandForm, Ft as StageDataProvider, lr as StageGuardedAction, et as StageSourceProvider, Ki as composeStageScreen, Ii as createStageSliceInvoker, It as dataChanged, Xt as executeRegisteredCommand, ot as hostedBasePath, pt as performQuery, lt as registerQueryRouteResolver, W as registeredCommand, ut as registeredQuery, Pi as sliceFieldsFrom, Hi as stageApplicationRegistry, Gi as stageComposition, ta as stageDarkSelector, Qe as stageEndpoints, Wi as stageShellOf, na as stageTheme, Ze as staticStageSource, mt as subscribeQuery, Qt as useStageCommandExecutor, B as useStageData, V as useStageQuery, tt as useStageSource };