@cratis/stage.runtime 4.171.0 → 4.173.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/src/index.js +589 -532
  2. package/package.json +1 -1
package/dist/src/index.js CHANGED
@@ -2,20 +2,22 @@ import "./app.css";
2
2
  import { createContext as e, createElement as t, useCallback as n, useContext as r, useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
3
3
  import { ColorScheme as c, DestinationKind as l, FormGenerationMode as u, FormWidthUnit as d, InteractionTriggerKind as f } from "@cratis/scene.model";
4
4
  import { ShellDiagnosticCode as p, ShellOrigin as m, createBindingResolver as h, resolveArgumentSource as g, resolveBehaviors as _, resolveStringsInElement as v, runBindings as y, validateBindingExpression as b } from "@cratis/scene.engine";
5
- import { CoreToolbarItem as x, InteractionScope as ee, SceneElementView as S, SceneNavigationContextInternal as te, SliceCommandFieldsProvider as C, SliceInvokerProvider as ne, attachmentFor as re, coreComponents as w, createBrowserDispatcher as T, createHashSceneHistory as E, useInteractionScope as D, useSceneNavigation as ie, useSceneOutlets as ae, useSceneTheme as O } from "@cratis/scene.react";
6
- import { ApplicationHost as oe, ColorScheme as k, ComponentName as A, LayoutThemeProvider as se, SlotName as j, blueprintPackageCatalog as ce, composeApplicationScreen as le, defaultBlueprintComponents as ue, defaultBlueprintName as de, defaultBlueprintThemes as fe, effectiveShellOf as pe, externalComponent as M, galleryScreenTemplates as me, layoutModes as he, menuThemes as ge, navigationElement as _e, previewComponents as ve, previewProfile as ye, useLayoutConfig as be } from "@cratis/scene.blueprint.default";
5
+ import { CoreToolbarItem as x, InteractionScope as S, SceneElementView as C, SceneNavigationContextInternal as w, SliceCommandFieldsProvider as T, SliceInvokerProvider as ee, attachmentFor as te, coreComponents as E, createBrowserDispatcher as D, createHashSceneHistory as ne, useInteractionScope as O, useSceneNavigation as re, useSceneOutlets as ie, useSceneTheme as k } from "@cratis/scene.react";
6
+ import { ApplicationHost as ae, ColorScheme as A, ComponentName as j, LayoutThemeProvider as oe, SlotName as M, blueprintPackageCatalog as se, composeApplicationScreen as ce, defaultBlueprintComponents as le, defaultBlueprintName as ue, defaultBlueprintThemes as de, effectiveShellOf as fe, externalComponent as N, galleryScreenTemplates as pe, layoutModes as me, menuThemes as he, navigationElement as ge, previewComponents as _e, previewProfile as ve, useLayoutConfig as ye } from "@cratis/scene.blueprint.default";
7
7
  import "@cratis/scene.blueprint.default/styles.css";
8
- import { jsx as N, jsxs as P } from "react/jsx-runtime";
9
- import { Button as F } from "primereact/button";
10
- import { PrimeDialog as xe, PrimeMessage as Se, primeReactComponents as Ce, primeReactPackageManifest as we } from "@cratis/scene.primereact";
11
- import { ArcContext as Te } from "@cratis/arc.react";
12
- import { Command as Ee } from "@cratis/arc/commands";
13
- import { resolveCommand as De } from "@cratis/scene.components";
14
- import { CommandForm as Oe } from "@cratis/arc.react/commands";
15
- import { CalendarField as ke, CheckboxField as Ae, InputTextField as je, NumberField as Me } from "@cratis/components/CommandForm";
16
- import Ne from "@primeuix/themes/lara";
8
+ import { Globals as be } from "@cratis/arc";
9
+ import { ServerSentEventQueryConnection as xe } from "@cratis/arc/queries";
10
+ import { jsx as P, jsxs as F } from "react/jsx-runtime";
11
+ import { Button as I } from "primereact/button";
12
+ import { PrimeDialog as Se, PrimeMessage as Ce, primeReactComponents as we, primeReactPackageManifest as Te } from "@cratis/scene.primereact";
13
+ import { ArcContext as Ee } from "@cratis/arc.react";
14
+ import { Command as De } from "@cratis/arc/commands";
15
+ import { resolveCommand as Oe } from "@cratis/scene.components";
16
+ import { CommandForm as ke } from "@cratis/arc.react/commands";
17
+ import { CalendarField as Ae, CheckboxField as je, InputTextField as Me, NumberField as Ne } from "@cratis/components/CommandForm";
18
+ import Pe from "@primeuix/themes/lara";
17
19
  //#region src/stageSource.ts
18
- function Pe(e) {
20
+ function Fe(e) {
19
21
  return {
20
22
  scene: async () => e.scene,
21
23
  routes: async () => e.routes,
@@ -23,23 +25,23 @@ function Pe(e) {
23
25
  strings: async (t) => e.strings[t] ?? {}
24
26
  };
25
27
  }
26
- var Fe = {
28
+ var Ie = {
27
29
  scene: "stage/scene",
28
30
  routes: "stage/routes",
29
31
  locales: "stage/locales",
30
32
  strings: (e) => `stage/strings/${encodeURIComponent(e)}`
31
- }, Ie = e(void 0);
32
- function Le({ source: e, children: n }) {
33
- return t(Ie.Provider, { value: e }, n);
33
+ }, Le = e(void 0);
34
+ function Re({ source: e, children: n }) {
35
+ return t(Le.Provider, { value: e }, n);
34
36
  }
35
- function I() {
36
- let e = r(Ie);
37
+ function L() {
38
+ let e = r(Le);
37
39
  if (!e) throw Error("A StageSourceProvider is required to render a Stage application.");
38
40
  return e;
39
41
  }
40
- Fe.routes;
41
- function Re() {
42
- let e = I(), [t, n] = s({
42
+ Ie.routes;
43
+ function ze() {
44
+ let e = L(), [t, n] = s({
43
45
  routes: void 0,
44
46
  ready: !1
45
47
  });
@@ -58,35 +60,35 @@ function Re() {
58
60
  }), () => t.abort();
59
61
  }, [e]), t;
60
62
  }
61
- function ze(e) {
62
- if (L(e)) return typeof e.subject == "string" ? e.subject : typeof e.path == "string" ? e.path : void 0;
63
+ function Be(e) {
64
+ if (R(e)) return typeof e.subject == "string" ? e.subject : typeof e.path == "string" ? e.path : void 0;
63
65
  }
64
- var Be = "STAGE-SCENE-ACTION-001", Ve = "item.";
65
- function L(e) {
66
+ var Ve = "STAGE-SCENE-ACTION-001", He = "item.";
67
+ function R(e) {
66
68
  return typeof e == "object" && !!e && !Array.isArray(e);
67
69
  }
68
- function He(e, t) {
70
+ function Ue(e, t) {
69
71
  let n = e;
70
72
  for (let e of t.split(".").filter(Boolean)) {
71
- if (!L(n)) return;
73
+ if (!R(n)) return;
72
74
  n = n[e];
73
75
  }
74
76
  return n;
75
77
  }
76
- function Ue(e) {
78
+ function We(e) {
77
79
  return e === null || [
78
80
  "string",
79
81
  "number",
80
82
  "boolean"
81
83
  ].includes(typeof e);
82
84
  }
83
- function We(e, t) {
85
+ function Ge(e, t) {
84
86
  if (typeof e == "number") return t[e];
85
87
  if (typeof e == "string") return t.find((t) => t.toLowerCase() === e.toLowerCase());
86
88
  }
87
- function Ge(e, t, n, r) {
89
+ function Ke(e, t, n, r) {
88
90
  if (r !== void 0 && (t === "Equal" || t === "NotEqual")) {
89
- let i = We(e, r), a = typeof n == "string" ? r.find((e) => e.toLowerCase() === n.toLowerCase()) : void 0;
91
+ let i = Ge(e, r), a = typeof n == "string" ? r.find((e) => e.toLowerCase() === n.toLowerCase()) : void 0;
90
92
  return i === void 0 || a === void 0 ? !1 : t === "Equal" ? i === a : i !== a;
91
93
  }
92
94
  switch (t) {
@@ -101,40 +103,40 @@ function Ge(e, t, n, r) {
101
103
  default: return;
102
104
  }
103
105
  }
104
- function R(e, t) {
105
- if (L(e)) {
106
+ function z(e, t) {
107
+ if (R(e)) {
106
108
  if (e.kind === "comparison") {
107
- let n = ze(e.left);
108
- if (typeof n != "string" || !n.startsWith(Ve) || typeof e.operator != "string" || !Ue(e.right)) return;
109
+ let n = Be(e.left);
110
+ if (typeof n != "string" || !n.startsWith(He) || typeof e.operator != "string" || !We(e.right)) return;
109
111
  let r = Array.isArray(e.enumeration) && e.enumeration.every((e) => typeof e == "string") ? e.enumeration : void 0;
110
- return Ge(He(t, n.slice(5)), e.operator, e.right, r);
112
+ return Ke(Ue(t, n.slice(5)), e.operator, e.right, r);
111
113
  }
112
114
  if (e.kind === "logical") {
113
- let n = R(e.left, t), r = R(e.right, t);
115
+ let n = z(e.left, t), r = z(e.right, t);
114
116
  return n === void 0 || r === void 0 ? void 0 : e.operator === "And" ? n && r : e.operator === "Or" ? n || r : void 0;
115
117
  }
116
118
  }
117
119
  }
118
- function Ke(e) {
119
- return e.every((e) => R(e, {}) !== void 0);
120
- }
121
- function qe(e, t) {
122
- if (Ke(e)) return e.findIndex((e) => R(e, t) === !0);
120
+ function qe(e) {
121
+ return e.every((e) => z(e, {}) !== void 0);
123
122
  }
124
123
  function Je(e, t) {
125
- if (!L(e) || !Array.isArray(e.alternatives) || !L(t)) return;
126
- let n = qe(e.alternatives, t);
124
+ if (qe(e)) return e.findIndex((e) => z(e, t) === !0);
125
+ }
126
+ function Ye(e, t) {
127
+ if (!R(e) || !Array.isArray(e.alternatives) || !R(t)) return;
128
+ let n = Je(e.alternatives, t);
127
129
  if (n !== void 0) {
128
130
  if (e.kind === "firstMatch" && typeof e.index == "number") return n === e.index;
129
131
  if (e.kind === "otherwise") return n === -1;
130
132
  }
131
133
  }
132
- function z(e, t) {
133
- if (e.startsWith(Ve) && L(t)) return He(t, e.slice(5));
134
+ function B(e, t) {
135
+ if (e.startsWith(He) && R(t)) return Ue(t, e.slice(5));
134
136
  }
135
137
  //#endregion
136
138
  //#region src/stageData.tsx
137
- var B = "cratis.stage.data-changed", Ye = e({
139
+ var Xe = "cratis.stage.data-changed", Ze = e({
138
140
  locale: "",
139
141
  locales: [],
140
142
  screen: "",
@@ -154,13 +156,13 @@ var B = "cratis.stage.data-changed", Ye = e({
154
156
  resolveArgument: () => void 0,
155
157
  registerQueryResult: () => void 0,
156
158
  refreshVersion: 0
157
- }), Xe = [
159
+ }), Qe = [
158
160
  500,
159
161
  1500,
160
162
  3e3
161
- ], Ze = {};
162
- function Qe({ routes: e, routesReady: t = !0, parameters: r = Ze, locale: c, locales: l, screen: u, children: d }) {
163
- let [f, p] = s({}), [m, _] = s({}), [v, y] = s(), [x, ee] = s({}), [S, te] = s({}), [C, ne] = s({ version: 0 }), re = n((e, t) => {
163
+ ], $e = {};
164
+ function et({ routes: e, routesReady: t = !0, parameters: r = $e, locale: c, locales: l, screen: u, children: d }) {
165
+ let [f, p] = s({}), [m, _] = s({}), [v, y] = s(), [x, S] = s({}), [C, w] = s({}), [T, ee] = s({ version: 0 }), te = n((e, t) => {
164
166
  p((n) => {
165
167
  if (!t) {
166
168
  let { [e]: t, ...r } = n;
@@ -171,60 +173,60 @@ function Qe({ routes: e, routesReady: t = !0, parameters: r = Ze, locale: c, loc
171
173
  [e]: t
172
174
  };
173
175
  });
174
- }, []), w = n((e, t) => {
176
+ }, []), E = n((e, t) => {
175
177
  _((n) => ({
176
178
  ...n,
177
179
  [e]: t
178
180
  })), y(t ? e : (t) => t === e ? void 0 : t);
179
- }, []), T = n((e) => {
181
+ }, []), D = n((e) => {
180
182
  _((t) => ({
181
183
  ...t,
182
184
  [e]: void 0
183
185
  })), y((t) => t === e ? void 0 : t);
184
- }, []), E = n((e, t, n) => {
185
- te((r) => {
186
- let i = W(r[e]) ? r[e] : {};
186
+ }, []), ne = n((e, t, n) => {
187
+ w((r) => {
188
+ let i = U(r[e]) ? r[e] : {};
187
189
  return {
188
190
  ...r,
189
- [e]: rt(i, t.split(".").filter(Boolean), n)
191
+ [e]: ot(i, t.split(".").filter(Boolean), n)
190
192
  };
191
193
  });
192
- }, []), D = n((e) => ne((t) => ({
194
+ }, []), O = n((e) => ee((t) => ({
193
195
  query: e,
194
196
  version: t.version + 1
195
- })), []), ie = o([]), ae = n(() => {
196
- D();
197
- for (let e of Xe) ie.current.push(setTimeout(() => D(), e));
198
- }, [D]);
199
- i(() => () => ie.current.forEach(clearTimeout), []), i(() => {
200
- let e = () => D(), t = (e) => D(e.detail?.query);
201
- return globalThis.addEventListener(B, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
202
- globalThis.removeEventListener(B, e), globalThis.removeEventListener("cratis.scene.refresh", t);
197
+ })), []), re = o([]), ie = n(() => {
198
+ O();
199
+ for (let e of Qe) re.current.push(setTimeout(() => O(), e));
200
+ }, [O]);
201
+ i(() => () => re.current.forEach(clearTimeout), []), i(() => {
202
+ let e = () => O(), t = (e) => O(e.detail?.query);
203
+ return globalThis.addEventListener(Xe, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
204
+ globalThis.removeEventListener(Xe, e), globalThis.removeEventListener("cratis.scene.refresh", t);
203
205
  };
204
- }, [D]);
205
- let O = v ? m[v] : void 0, oe = n((e) => {
206
+ }, [O]);
207
+ let k = v ? m[v] : void 0, ae = n((e) => {
206
208
  if (e === void 0 || typeof e != "string" && e.path === "$guard") return;
207
- if (typeof e == "string") return it(e, O, m, f, x, r, u, c, l);
208
- if (!e.kind) return it(e.path, O, m, f, x, r, u, c, l);
209
- let t = et(O, f, x, S, m), n = b(e, t);
209
+ if (typeof e == "string") return st(e, k, m, f, x, r, u, c, l);
210
+ if (!e.kind) return st(e.path, k, m, f, x, r, u, c, l);
211
+ let t = rt(k, f, x, C, m), n = b(e, t);
210
212
  return n.length > 0 && console.warn(`Scene binding could not be resolved: ${n.map((e) => `${e.code}:${e.message}`).join("; ")}`), h(t)(e);
211
213
  }, [
212
- S,
214
+ C,
213
215
  c,
214
216
  l,
215
217
  x,
216
218
  r,
217
219
  f,
218
220
  u,
219
- O,
221
+ k,
220
222
  m
221
- ]), k = n((e) => e ? g(e, et(O, f, x, S, m)) : void 0, [
222
- S,
223
+ ]), A = n((e) => e ? g(e, rt(k, f, x, C, m)) : void 0, [
224
+ C,
223
225
  x,
224
226
  f,
225
- O,
227
+ k,
226
228
  m
227
- ]), A = a(() => ({
229
+ ]), j = a(() => ({
228
230
  locale: c,
229
231
  locales: l,
230
232
  screen: u,
@@ -232,88 +234,122 @@ function Qe({ routes: e, routesReady: t = !0, parameters: r = Ze, locale: c, loc
232
234
  routesReady: t,
233
235
  parameters: r,
234
236
  queries: f,
235
- selected: O,
237
+ selected: k,
236
238
  selections: m,
237
- selectRow: w,
238
- clearSelection: T,
239
- setState: (e, t) => ee((n) => rt(n, e.split(".").filter(Boolean), t)),
240
- setComponentOutput: E,
241
- refreshQuery: D,
242
- refreshAfterCommand: ae,
243
- resolveBinding: oe,
244
- resolveArgument: k,
245
- registerQueryResult: re,
246
- refreshVersion: C.version,
247
- refreshQueryName: C.query
239
+ selectRow: E,
240
+ clearSelection: D,
241
+ setState: (e, t) => S((n) => ot(n, e.split(".").filter(Boolean), t)),
242
+ setComponentOutput: ne,
243
+ refreshQuery: O,
244
+ refreshAfterCommand: ie,
245
+ resolveBinding: ae,
246
+ resolveArgument: A,
247
+ registerQueryResult: te,
248
+ refreshVersion: T.version,
249
+ refreshQueryName: T.query
248
250
  }), [
249
- T,
251
+ D,
250
252
  c,
251
253
  l,
252
254
  f,
255
+ ie,
256
+ O,
257
+ T.query,
258
+ T.version,
259
+ te,
260
+ A,
253
261
  ae,
254
- D,
255
- C.query,
256
- C.version,
257
- re,
258
- k,
259
- oe,
260
262
  e,
261
263
  t,
262
264
  r,
263
265
  u,
264
- w,
265
- O,
266
+ E,
267
+ k,
266
268
  m,
267
- E
269
+ ne
268
270
  ]);
269
- return /* @__PURE__ */ N(Ye.Provider, {
270
- value: A,
271
+ return /* @__PURE__ */ P(Ze.Provider, {
272
+ value: j,
271
273
  children: d
272
274
  });
273
275
  }
274
- var V = () => r(Ye);
275
- function H(e) {
276
+ var V = () => r(Ze);
277
+ function tt(e) {
276
278
  let { refreshQueryName: t, refreshVersion: r, registerQueryResult: a } = V(), c = e.publish !== !1, l = n((e, t) => {
277
279
  c && a(e, t);
278
- }, [c, a]), [u, d] = s([]), [f, p] = s(""), [m, h] = s(!1), [g, _] = s(0), v = o(0), y = e.ready ?? !0, b = !!e.route && y, x = JSON.stringify(e.arguments ?? {});
280
+ }, [c, a]), [u, d] = s([]), [f, p] = s(""), [m, h] = s(!1), [g, _] = s(0), v = o(0), y = o(!1), b = e.ready ?? !0, x = !!e.route && b, S = JSON.stringify(e.arguments ?? {});
279
281
  return i(() => {
280
- if (!b || !e.route) {
282
+ if (!x || !e.route) {
281
283
  v.current += 1, d([]), p(""), h(!1), l(e.scope, void 0);
282
284
  return;
283
285
  }
284
286
  let t = v.current + 1;
285
287
  v.current = t;
286
- let n = new AbortController(), r = JSON.parse(x), i = st(e.route, r);
287
- return h(!0), p(""), fetch(i, {
288
- headers: { Accept: "application/json" },
289
- signal: n.signal
290
- }).then(async (e) => {
291
- if (!e.ok) throw Error(`The query answered ${e.status}.`);
292
- return e.json();
293
- }).then((e) => {
294
- v.current !== t || n.signal.aborted || (d(ct(e)), p(""));
295
- }).catch((e) => {
296
- v.current !== t || n.signal.aborted || (d([]), p(e instanceof Error ? e.message : String(e)));
297
- }).finally(() => {
298
- v.current === t && !n.signal.aborted && h(!1);
299
- }), () => n.abort();
288
+ let n = new AbortController(), r = JSON.parse(S), i = ut(e.route, r);
289
+ h(!0), p("");
290
+ let a = () => {
291
+ fetch(i, {
292
+ headers: { Accept: "application/json" },
293
+ signal: n.signal
294
+ }).then(async (e) => {
295
+ if (!e.ok) throw Error(`The query answered ${e.status}.`);
296
+ return e.json();
297
+ }).then((e) => {
298
+ v.current !== t || n.signal.aborted || (d(gt(e)), p(""));
299
+ }).catch((e) => {
300
+ v.current !== t || n.signal.aborted || (d([]), p(e instanceof Error ? e.message : String(e)));
301
+ }).finally(() => {
302
+ v.current === t && !n.signal.aborted && h(!1);
303
+ });
304
+ };
305
+ if (pt(e.route)) {
306
+ y.current = !0;
307
+ let e = new xe(new URL(mt(i), globalThis.location.href)), r = !1, o = () => {
308
+ r || v.current !== t || n.signal.aborted || (r = !0, y.current = !1, e.disconnect(), a());
309
+ }, s = be.eventSourceFactory;
310
+ if (!s && typeof EventSource > "u") o();
311
+ else {
312
+ let r;
313
+ be.eventSourceFactory = (e) => r = s ? s(e) : new EventSource(e);
314
+ try {
315
+ e.connect((e) => {
316
+ if (v.current !== t || n.signal.aborted) return;
317
+ let r = ht(e);
318
+ r ? (d([]), p(r)) : (d(gt(e)), p("")), h(!1);
319
+ });
320
+ } finally {
321
+ be.eventSourceFactory = s;
322
+ }
323
+ let i = r;
324
+ if (i) {
325
+ let e = i.onerror;
326
+ i.onerror = function(t) {
327
+ e?.call(this, t), i.readyState === ft && o();
328
+ };
329
+ } else o();
330
+ }
331
+ return () => {
332
+ n.abort(), y.current = !1, e.disconnect();
333
+ };
334
+ }
335
+ return a(), () => n.abort();
300
336
  }, [
301
- b,
302
337
  x,
338
+ S,
303
339
  g,
304
340
  l,
305
341
  e.name,
306
342
  e.route,
307
343
  e.scope
308
344
  ]), i(() => {
309
- r !== 0 && (t && t !== e.name && t !== e.scope || _((e) => e + 1));
345
+ r !== 0 && (t && t !== e.name && t !== e.scope || y.current || _((e) => e + 1));
310
346
  }, [
311
347
  t,
312
348
  r,
313
349
  e.name,
314
350
  e.scope
315
351
  ]), i(() => {
316
- if (!b || !e.route) {
352
+ if (!x || !e.route) {
317
353
  l(e.scope, void 0);
318
354
  return;
319
355
  }
@@ -323,11 +359,11 @@ function H(e) {
323
359
  rows: u,
324
360
  loading: m,
325
361
  error: f,
326
- arguments: JSON.parse(x)
362
+ arguments: JSON.parse(S)
327
363
  });
328
364
  }, [
329
- b,
330
365
  x,
366
+ S,
331
367
  f,
332
368
  m,
333
369
  l,
@@ -339,24 +375,26 @@ function H(e) {
339
375
  rows: u,
340
376
  loading: m,
341
377
  error: f,
342
- refresh: () => _((e) => e + 1)
378
+ refresh: () => {
379
+ y.current || _((e) => e + 1);
380
+ }
343
381
  };
344
382
  }
345
- function $e() {
346
- globalThis.dispatchEvent(new CustomEvent(B));
383
+ function nt() {
384
+ globalThis.dispatchEvent(new CustomEvent(Xe));
347
385
  }
348
- function et(e, t, n, r, i) {
386
+ function rt(e, t, n, r, i) {
349
387
  return {
350
388
  dataContext: e,
351
- queryResults: Object.fromEntries(Object.entries(t).flatMap(([e, t]) => [[e, tt(t.rows)], ...t.name ? [[t.name, tt(t.rows)]] : []])),
352
- componentOutputs: nt(r, i),
389
+ queryResults: Object.fromEntries(Object.entries(t).flatMap(([e, t]) => [[e, it(t.rows)], ...t.name ? [[t.name, it(t.rows)]] : []])),
390
+ componentOutputs: at(r, i),
353
391
  state: n
354
392
  };
355
393
  }
356
- function tt(e) {
394
+ function it(e) {
357
395
  return e.length === 1 ? e[0] : e;
358
396
  }
359
- function nt(e, t) {
397
+ function at(e, t) {
360
398
  let n = { ...e };
361
399
  for (let [e, r] of Object.entries(t)) r && (n[e] = {
362
400
  ...r,
@@ -364,70 +402,89 @@ function nt(e, t) {
364
402
  });
365
403
  return n;
366
404
  }
367
- function rt(e, t, n) {
405
+ function ot(e, t, n) {
368
406
  let [r, ...i] = t;
369
407
  return r ? i.length === 0 ? {
370
408
  ...e,
371
409
  [r]: n
372
410
  } : {
373
411
  ...e,
374
- [r]: rt(W(e[r]) ? e[r] : {}, i, n)
412
+ [r]: ot(U(e[r]) ? e[r] : {}, i, n)
375
413
  } : e;
376
414
  }
377
- function it(e, t, n, r, i, a, o, s, c) {
415
+ function st(e, t, n, r, i, a, o, s, c) {
378
416
  if (!e) return;
379
417
  let l = e.replace(/^\$\.?/, "").split(".").filter(Boolean);
380
- if (l.length !== 0) return l[0] === "screen" ? l.length === 1 ? { name: o } : U({ name: o }, l.slice(1)) : l[0] === "locale" ? s : l[0] === "locales" ? c : l[0] === "query" ? ot(r, l[1], l.slice(2).join(".")) : l[0] === "data" || l[0] === "selected" || l[0] === "current" ? at(l.slice(1).join("."), t, n) : l[0] === "state" ? U(i, l.slice(1)) : l[0] === "parameters" ? l.length === 1 ? a : a[l[1]] : U(t, l) ?? ot(r, void 0, l.join(".")) ?? U(i, l);
418
+ if (l.length !== 0) return l[0] === "screen" ? l.length === 1 ? { name: o } : H({ name: o }, l.slice(1)) : l[0] === "locale" ? s : l[0] === "locales" ? c : l[0] === "query" ? lt(r, l[1], l.slice(2).join(".")) : l[0] === "data" || l[0] === "selected" || l[0] === "current" ? ct(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) ?? lt(r, void 0, l.join(".")) ?? H(i, l);
381
419
  }
382
- function at(e, t, n) {
420
+ function ct(e, t, n) {
383
421
  let r = e?.split(".").filter(Boolean) ?? [];
384
- return r.length > 0 && Object.hasOwn(n, r[0]) ? U(n[r[0]], r.slice(1)) : r.length === 0 ? t : U(t, r);
422
+ return r.length > 0 && Object.hasOwn(n, r[0]) ? H(n[r[0]], r.slice(1)) : r.length === 0 ? t : H(t, r);
385
423
  }
386
- function ot(e, t, n) {
424
+ function lt(e, t, n) {
387
425
  let r = Object.entries(e).filter(([e, n]) => !t || n.name === t || e === t).map(([, e]) => e.rows);
388
426
  if (r.length === 0) return;
389
427
  let i = r.flat(), a = n?.split(".").filter(Boolean) ?? [];
390
- return a.length === 0 ? i : i.length === 1 ? U(i[0], a) : i.map((e) => U(e, a));
428
+ return a.length === 0 ? i : i.length === 1 ? H(i[0], a) : i.map((e) => H(e, a));
391
429
  }
392
- function st(e, t) {
430
+ function ut(e, t) {
393
431
  let [n, r = ""] = e.replace(/^\//, "").split("?"), i = new URLSearchParams(r);
394
432
  for (let [e, n] of Object.entries(t)) n != null && n !== "" && i.set(e, String(n));
395
433
  let a = i.toString();
396
434
  return a ? `${n}?${a}` : n;
397
435
  }
398
- function ct(e) {
399
- let t = W(e) && "data" in e ? e.data : e;
400
- return Array.isArray(t) ? t.filter(W) : W(t) ? [t] : [];
436
+ var dt = "waitForFirstResult", ft = 2;
437
+ function pt(e) {
438
+ return new URLSearchParams(e.split("?")[1] ?? "").get(dt) === "true";
439
+ }
440
+ function mt(e) {
441
+ let [t, n = ""] = e.split("?"), r = new URLSearchParams(n);
442
+ r.delete(dt);
443
+ let i = r.toString();
444
+ return i ? `${t}?${i}` : t;
401
445
  }
402
- function U(e, t) {
446
+ function ht(e) {
447
+ if (!U(e)) return "";
448
+ if (e.isAuthorized === !1) return "The query answered 403.";
449
+ if (e.isValid === !1 || e.hasExceptions === !0) {
450
+ let t = Array.isArray(e.exceptionMessages) ? e.exceptionMessages.filter((e) => typeof e == "string") : [];
451
+ return t.length > 0 ? t.join(" ") : "The query could not be answered.";
452
+ }
453
+ return "";
454
+ }
455
+ function gt(e) {
456
+ let t = U(e) && "data" in e ? e.data : e;
457
+ return Array.isArray(t) ? t.filter(U) : U(t) ? [t] : [];
458
+ }
459
+ function H(e, t) {
403
460
  let n = e;
404
461
  for (let e of t) {
405
- if (!W(n)) return;
462
+ if (!U(n)) return;
406
463
  n = n[e];
407
464
  }
408
465
  return n;
409
466
  }
410
- function W(e) {
467
+ function U(e) {
411
468
  return typeof e == "object" && !!e && !Array.isArray(e);
412
469
  }
413
470
  //#endregion
414
471
  //#region src/commandExecutor.ts
415
- function G(e, t, n) {
472
+ function W(e, t, n) {
416
473
  for (let r of [
417
474
  t,
418
475
  n?.replace(/^\//, ""),
419
476
  e
420
477
  ]) {
421
478
  if (!r) continue;
422
- let t = De(r);
423
- if (lt(t) && !(r === e && n && new t().route.replace(/^\//, "") !== n.replace(/^\//, ""))) return t;
479
+ let t = Oe(r);
480
+ if (_t(t) && !(r === e && n && new t().route.replace(/^\//, "") !== n.replace(/^\//, ""))) return t;
424
481
  }
425
482
  }
426
- function lt(e) {
427
- return typeof e == "function" && e.prototype instanceof Ee;
483
+ function _t(e) {
484
+ return typeof e == "function" && e.prototype instanceof De;
428
485
  }
429
- async function ut(e, t, n) {
430
- let r = G(e);
486
+ async function vt(e, t, n) {
487
+ let r = W(e);
431
488
  if (!r) return {
432
489
  isSuccess: !1,
433
490
  validationErrors: [],
@@ -436,9 +493,9 @@ async function ut(e, t, n) {
436
493
  let i = new r();
437
494
  i.setMicroservice(n.microservice), i.setApiBasePath(n.apiBasePath ?? ""), i.setOrigin(n.origin ?? ""), i.setHttpHeadersCallback(n.httpHeadersCallback ?? (() => ({})));
438
495
  for (let e of i.propertyDescriptors) Object.prototype.hasOwnProperty.call(t, e.name) && Reflect.set(i, e.name, t[e.name]);
439
- return dt(e, await i.execute());
496
+ return yt(e, await i.execute());
440
497
  }
441
- function dt(e, t) {
498
+ function yt(e, t) {
442
499
  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) => ({
443
500
  member: t,
444
501
  message: e.message
@@ -454,160 +511,160 @@ function dt(e, t) {
454
511
  messages: n || i.length > 0 ? i : [`“${e}” was not accepted.`]
455
512
  };
456
513
  }
457
- function ft() {
458
- let e = r(Te);
459
- return n((t, n) => ut(t, n, e), [e]);
514
+ function bt() {
515
+ let e = r(Ee);
516
+ return n((t, n) => vt(t, n, e), [e]);
460
517
  }
461
518
  //#endregion
462
519
  //#region src/StageCommandForm.tsx
463
- function pt({ element: e }) {
464
- let t = V(), n = a(() => ht(e), [e]), r = a(() => jt(e), [e]), i = typeof e.properties.schema == "string", o = a(() => n ? gt(n, r) : [], [n, r]), c = n ? G(n.command, q(e, "typeName"), q(e, "route")) : void 0, l = bt(e, o, t.resolveArgument), u = a(() => yt(o, t.parameters), [o, t.parameters]), d = a(() => n ? _t(n, o, r) : void 0, [
520
+ function xt({ element: e }) {
521
+ let t = V(), n = a(() => Ct(e), [e]), r = a(() => zt(e), [e]), i = typeof e.properties.schema == "string", o = a(() => n ? wt(n, r) : [], [n, r]), c = n ? W(n.command, K(e, "typeName"), K(e, "route")) : void 0, l = Ot(e, o, t.resolveArgument), u = a(() => Dt(o, t.parameters), [o, t.parameters]), d = a(() => n ? Tt(n, o, r) : void 0, [
465
522
  n,
466
523
  o,
467
524
  r
468
- ]), f = a(() => n ? kt(o, r) : [], [
525
+ ]), f = a(() => n ? Lt(o, r) : [], [
469
526
  n,
470
527
  o,
471
528
  r
472
- ]), p = a(() => n ? At(n.layout, o) : [], [n, o]), [m, h] = s([]);
473
- return n ? !c && !t.routesReady ? /* @__PURE__ */ P("p", {
529
+ ]), p = a(() => n ? Rt(n.layout, o) : [], [n, o]), [m, h] = s([]);
530
+ return n ? !c && !t.routesReady ? /* @__PURE__ */ F("p", {
474
531
  className: "stage-note",
475
532
  children: [
476
533
  "The modeled command “",
477
534
  n.command,
478
535
  "” is waiting for Stage routes."
479
536
  ]
480
- }) : c ? o.length === 0 && !i && e.properties.parameterless !== !0 ? /* @__PURE__ */ N(mt, {
537
+ }) : c ? o.length === 0 && !i && e.properties.parameterless !== !0 ? /* @__PURE__ */ P(St, {
481
538
  form: n,
482
539
  messages: [`The modeled command “${n.command}” has no form fields or schema metadata, so Stage will not submit an empty command body.`]
483
- }) : f.length > 0 ? /* @__PURE__ */ N(mt, {
540
+ }) : f.length > 0 ? /* @__PURE__ */ P(St, {
484
541
  form: n,
485
542
  messages: f
486
- }) : /* @__PURE__ */ N("section", {
543
+ }) : /* @__PURE__ */ P("section", {
487
544
  className: "stage-command-form",
488
545
  "data-command": n.command,
489
546
  "data-generation-mode": n.generationMode,
490
- children: /* @__PURE__ */ P(Oe, {
547
+ children: /* @__PURE__ */ F(ke, {
491
548
  command: c,
492
549
  initialValues: u,
493
550
  currentValues: l,
494
551
  validateOn: "both",
495
552
  validateAllFieldsOnChange: !0,
496
- onFieldValidate: (e, t, n, i) => Ot(o, r, t, i),
553
+ onFieldValidate: (e, t, n, i) => It(o, r, t, i),
497
554
  onValidationFailure: (e) => h(e.map((e) => e.message)),
498
555
  onException: (e) => h(e),
499
- onFailed: (e) => h(dt(n.command, e).messages),
556
+ onFailed: (e) => h(yt(n.command, e).messages),
500
557
  onSuccess: () => {
501
558
  h([]), t.refreshAfterCommand();
502
559
  },
503
560
  children: [
504
- p.map((e) => /* @__PURE__ */ N("p", {
561
+ p.map((e) => /* @__PURE__ */ P("p", {
505
562
  role: "alert",
506
563
  className: "stage-form-error",
507
564
  children: e
508
565
  }, e)),
509
566
  d,
510
- m.map((e) => /* @__PURE__ */ N("p", {
567
+ m.map((e) => /* @__PURE__ */ P("p", {
511
568
  role: "alert",
512
569
  className: "stage-form-error",
513
570
  children: e
514
571
  }, e)),
515
- /* @__PURE__ */ P("button", {
572
+ /* @__PURE__ */ F("button", {
516
573
  type: "submit",
517
574
  children: ["Execute ", n.label]
518
575
  })
519
576
  ]
520
577
  })
521
- }) : /* @__PURE__ */ P("p", {
578
+ }) : /* @__PURE__ */ F("p", {
522
579
  className: "stage-note",
523
580
  children: [
524
581
  "The modeled command “",
525
582
  n.command,
526
583
  "” is not registered by this Stage."
527
584
  ]
528
- }) : /* @__PURE__ */ N("p", {
585
+ }) : /* @__PURE__ */ P("p", {
529
586
  className: "stage-note",
530
587
  children: "This form is missing its command metadata."
531
588
  });
532
589
  }
533
- function mt({ form: e, messages: t }) {
534
- return /* @__PURE__ */ N("section", {
590
+ function St({ form: e, messages: t }) {
591
+ return /* @__PURE__ */ P("section", {
535
592
  className: "stage-command-form",
536
593
  "data-command": e.command,
537
594
  "data-generation-mode": e.generationMode,
538
- children: t.map((e) => /* @__PURE__ */ N("p", {
595
+ children: t.map((e) => /* @__PURE__ */ P("p", {
539
596
  role: "alert",
540
597
  className: "stage-form-error",
541
598
  children: e
542
599
  }, e))
543
600
  });
544
601
  }
545
- function ht(e) {
546
- let t = q(e, "command");
602
+ function Ct(e) {
603
+ let t = K(e, "command");
547
604
  if (!t) return;
548
- let n = Array.isArray(e.properties.fields) ? e.properties.fields.filter(J) : [];
605
+ let n = Array.isArray(e.properties.fields) ? e.properties.fields.filter(q) : [];
549
606
  return {
550
607
  command: t,
551
- label: q(e, "label", t),
608
+ label: K(e, "label", t),
552
609
  fields: n,
553
- generationMode: St(e.properties.generationMode),
554
- layout: Ct(e.properties.layout)
610
+ generationMode: At(e.properties.generationMode),
611
+ layout: jt(e.properties.layout)
555
612
  };
556
613
  }
557
- function gt(e, t) {
614
+ function wt(e, t) {
558
615
  return e.generationMode === u.Manual || e.fields.length > 0 ? e.fields : t.filter((e) => !e.unsupportedReason).map((e) => ({
559
616
  name: e.name,
560
617
  label: e.name
561
618
  }));
562
619
  }
563
- function _t(e, t, n) {
564
- let r = e.layout, i = r ? wt(r, t) : [];
565
- if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => vt(e, n));
566
- let a = new Map(t.map((e) => [e.name, e])), o = Tt(r, i), s = {
567
- gridTemplateColumns: Array.from({ length: o }, (e, t) => Et(t + 1, r.columns)).join(" "),
568
- columnGap: K(r.columnGap),
569
- rowGap: K(r.rowGap)
620
+ function Tt(e, t, n) {
621
+ let r = e.layout, i = r ? Mt(r, t) : [];
622
+ if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => Et(e, n));
623
+ let a = new Map(t.map((e) => [e.name, e])), o = Nt(r, i), s = {
624
+ gridTemplateColumns: Array.from({ length: o }, (e, t) => Pt(t + 1, r.columns)).join(" "),
625
+ columnGap: G(r.columnGap),
626
+ rowGap: G(r.rowGap)
570
627
  }, c = /* @__PURE__ */ new Set();
571
- return /* @__PURE__ */ P("div", {
628
+ return /* @__PURE__ */ F("div", {
572
629
  className: "stage-command-form__layout",
573
630
  style: s,
574
631
  children: [i.map((e) => {
575
632
  let t = a.get(e.field);
576
- return t ? (c.add(t.name), vt(t, n, e)) : null;
577
- }), t.filter((e) => !c.has(e.name)).map((e) => vt(e, n))]
633
+ return t ? (c.add(t.name), Et(t, n, e)) : null;
634
+ }), t.filter((e) => !c.has(e.name)).map((e) => Et(e, n))]
578
635
  });
579
636
  }
580
- function vt(e, t, n) {
637
+ function Et(e, t, n) {
581
638
  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 = (() => {
582
639
  switch (i?.type ?? "text") {
583
- case "number": return /* @__PURE__ */ N(Me, {
640
+ case "number": return /* @__PURE__ */ P(Ne, {
584
641
  value: o,
585
642
  fieldName: r,
586
643
  title: a,
587
644
  required: s
588
645
  });
589
- case "boolean": return /* @__PURE__ */ N(Ae, {
646
+ case "boolean": return /* @__PURE__ */ P(je, {
590
647
  value: o,
591
648
  fieldName: r,
592
649
  label: a,
593
650
  required: s
594
651
  });
595
- case "date": return /* @__PURE__ */ N(ke, {
652
+ case "date": return /* @__PURE__ */ P(Ae, {
596
653
  value: o,
597
654
  fieldName: r,
598
655
  title: a,
599
656
  required: s,
600
657
  showIcon: !0
601
658
  });
602
- default: return /* @__PURE__ */ N(je, {
659
+ default: return /* @__PURE__ */ P(Me, {
603
660
  value: o,
604
661
  fieldName: r,
605
662
  title: a,
606
663
  required: s
607
664
  });
608
665
  }
609
- })(), l = Dt(n);
610
- return /* @__PURE__ */ N("span", {
666
+ })(), l = Ft(n);
667
+ return /* @__PURE__ */ P("span", {
611
668
  className: "stage-command-form__field",
612
669
  "data-field": e.name,
613
670
  "data-row": n?.row,
@@ -617,7 +674,7 @@ function vt(e, t, n) {
617
674
  children: c
618
675
  }, e.name);
619
676
  }
620
- function yt(e, t) {
677
+ function Dt(e, t) {
621
678
  let n = {};
622
679
  for (let r of e) {
623
680
  let e = r.sourceProperty ?? r.name, i = t[e];
@@ -625,52 +682,52 @@ function yt(e, t) {
625
682
  }
626
683
  return n;
627
684
  }
628
- function bt(e, t, n) {
629
- let r = a(() => xt(e, t), [e, t]), i = r.map((e) => n(e.source)), o = JSON.stringify(i);
685
+ function Ot(e, t, n) {
686
+ let r = a(() => kt(e, t), [e, t]), i = r.map((e) => n(e.source)), o = JSON.stringify(i);
630
687
  return a(() => {
631
688
  let e = Object.fromEntries(r.map((e, t) => [e.name, i[t]]).filter(([, e]) => e != null && e !== ""));
632
689
  return Object.keys(e).length > 0 ? e : void 0;
633
690
  }, [r, o]);
634
691
  }
635
- function xt(e, t) {
692
+ function kt(e, t) {
636
693
  let n = e.properties.arguments;
637
694
  if (!Array.isArray(n)) return [];
638
695
  let r = new Set(t.map((e) => e.sourceProperty ?? e.name));
639
696
  return n.filter((e) => typeof e == "object" && !!e && typeof e.name == "string" && typeof e.source == "string" && r.has(e.name));
640
697
  }
641
- function St(e) {
698
+ function At(e) {
642
699
  return e === u.Manual ? u.Manual : u.Auto;
643
700
  }
644
- function Ct(e) {
645
- if (!J(e)) return;
701
+ function jt(e) {
702
+ if (!q(e)) return;
646
703
  let t = e;
647
704
  return {
648
- columns: Array.isArray(t.columns) ? t.columns.filter(Pt) : [],
649
- placements: Array.isArray(t.placements) ? t.placements.filter(Ft) : [],
650
- columnGap: It(t.columnGap) ? t.columnGap : void 0,
651
- rowGap: It(t.rowGap) ? t.rowGap : void 0
705
+ columns: Array.isArray(t.columns) ? t.columns.filter(Ht) : [],
706
+ placements: Array.isArray(t.placements) ? t.placements.filter(Ut) : [],
707
+ columnGap: Wt(t.columnGap) ? t.columnGap : void 0,
708
+ rowGap: Wt(t.rowGap) ? t.rowGap : void 0
652
709
  };
653
710
  }
654
- function wt(e, t) {
711
+ function Mt(e, t) {
655
712
  let n = new Map(e.placements.map((e) => [e.field, e]));
656
- for (let e of t) !n.has(e.name) && Ft(e.placement) && n.set(e.name, e.placement);
713
+ for (let e of t) !n.has(e.name) && Ut(e.placement) && n.set(e.name, e.placement);
657
714
  return [...n.values()].sort((e, t) => e.row - t.row || e.column - t.column || e.field.localeCompare(t.field));
658
715
  }
659
- function Tt(e, t) {
716
+ function Nt(e, t) {
660
717
  return Math.max(1, ...e.columns.map((e) => e.index), ...t.map((e) => e.column + (e.columnSpan ?? 1) - 1));
661
718
  }
662
- function Et(e, t) {
663
- let n = t.find((t) => t.index === e), r = K(n?.width), i = K(n?.minWidth), a = K(n?.maxWidth);
719
+ function Pt(e, t) {
720
+ let n = t.find((t) => t.index === e), r = G(n?.width), i = G(n?.minWidth), a = G(n?.maxWidth);
664
721
  return n?.width?.unit === d.Fraction && a ? `minmax(${i ?? "0"}, ${r ?? "1fr"})` : i || a ? `minmax(${i ?? "0"}, ${a && r ? `min(${r}, ${a})` : a ?? r ?? "1fr"})` : r ?? "1fr";
665
722
  }
666
- function Dt(e) {
723
+ function Ft(e) {
667
724
  if (e) return {
668
725
  gridColumn: `${e.column} / span ${e.columnSpan ?? 1}`,
669
726
  gridRow: `${e.row} / span ${e.rowSpan ?? 1}`,
670
- width: e.width?.unit === d.Fraction ? void 0 : K(e.width)
727
+ width: e.width?.unit === d.Fraction ? void 0 : G(e.width)
671
728
  };
672
729
  }
673
- function K(e) {
730
+ function G(e) {
674
731
  if (e) switch (e.unit) {
675
732
  case d.Fraction: return `${e.value ?? 1}fr`;
676
733
  case d.Pixels: return `${e.value ?? 0}px`;
@@ -678,31 +735,31 @@ function K(e) {
678
735
  case d.Auto: return "auto";
679
736
  }
680
737
  }
681
- function Ot(e, t, n, r) {
738
+ function It(e, t, n, r) {
682
739
  let i = e.find((e) => (e.sourceProperty ?? e.name) === n);
683
740
  if ((t.find((e) => e.name === n)?.required ?? !0) && (r == null || r === "")) return `${i?.label ?? n} is required`;
684
741
  }
685
- function kt(e, t) {
742
+ function Lt(e, t) {
686
743
  let n = new Map(t.map((e) => [e.name, e]));
687
744
  return e.flatMap((e) => {
688
745
  let t = n.get(e.sourceProperty ?? e.name);
689
746
  return t?.unsupportedReason ? [`The field “${e.label ?? e.name}” uses unsupported schema metadata: ${t.unsupportedReason}.`] : [];
690
747
  });
691
748
  }
692
- function At(e, t) {
749
+ function Rt(e, t) {
693
750
  if (!e) return [];
694
- let n = wt(e, t).filter((e) => e.width?.unit === d.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 === d.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.`);
751
+ let n = Mt(e, t).filter((e) => e.width?.unit === d.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 === d.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.`);
695
752
  return [...n, ...r];
696
753
  }
697
- function jt(e) {
698
- return Mt(q(e, "schema"));
754
+ function zt(e) {
755
+ return Bt(K(e, "schema"));
699
756
  }
700
- function Mt(e) {
757
+ function Bt(e) {
701
758
  if (!e) return [];
702
759
  try {
703
760
  let t = JSON.parse(e), n = Object.prototype.hasOwnProperty.call(t, "required"), r = Array.isArray(t.required) ? new Set(t.required.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set();
704
761
  return Object.entries(t.properties ?? {}).map(([e, t]) => {
705
- let i = Nt(t);
762
+ let i = Vt(t);
706
763
  return {
707
764
  name: e,
708
765
  type: i.type,
@@ -714,66 +771,66 @@ function Mt(e) {
714
771
  return [];
715
772
  }
716
773
  }
717
- function Nt(e) {
774
+ function Vt(e) {
718
775
  let t = e?.type;
719
776
  if (Array.isArray(t)) {
720
777
  let n = t.filter((e) => e !== "null");
721
- return n.length === 1 ? Nt({
778
+ return n.length === 1 ? Vt({
722
779
  ...e,
723
780
  type: n[0]
724
781
  }) : { unsupportedReason: `union type ${JSON.stringify(t)}` };
725
782
  }
726
783
  return t === "integer" || t === "number" ? { type: "number" } : t === "boolean" ? { type: "boolean" } : e?.format === "date" || e?.format === "date-time" ? { type: "date" } : t === "array" || t === "object" ? { unsupportedReason: `${t} fields are not supported by the native Stage command form` } : t === void 0 || t === "string" ? { type: "text" } : { unsupportedReason: `type ${String(t)}` };
727
784
  }
728
- function q(e, t, n = "") {
785
+ function K(e, t, n = "") {
729
786
  let r = e.properties[t];
730
787
  return typeof r == "string" ? r : n;
731
788
  }
732
- function Pt(e) {
733
- return J(e) && typeof e.index == "number" && Number.isInteger(e.index) && e.index > 0;
789
+ function Ht(e) {
790
+ return q(e) && typeof e.index == "number" && Number.isInteger(e.index) && e.index > 0;
734
791
  }
735
- function Ft(e) {
736
- return J(e) && typeof e.field == "string" && typeof e.row == "number" && typeof e.column == "number" && e.row > 0 && e.column > 0;
792
+ function Ut(e) {
793
+ return q(e) && typeof e.field == "string" && typeof e.row == "number" && typeof e.column == "number" && e.row > 0 && e.column > 0;
737
794
  }
738
- function It(e) {
739
- return J(e) && Object.values(d).includes(e.unit);
795
+ function Wt(e) {
796
+ return q(e) && Object.values(d).includes(e.unit);
740
797
  }
741
- function J(e) {
798
+ function q(e) {
742
799
  return typeof e == "object" && !!e && !Array.isArray(e);
743
800
  }
744
801
  //#endregion
745
802
  //#region src/stageNavigation.ts
746
- function Lt(e, t = {}) {
803
+ function Gt(e, t = {}) {
747
804
  let n = new URLSearchParams(Object.entries(t).filter(([, e]) => e !== "")).toString();
748
805
  return n ? `#/${encodeURIComponent(e)}?${n}` : `#/${encodeURIComponent(e)}`;
749
806
  }
750
- function Y(e, t = {}) {
807
+ function J(e, t = {}) {
751
808
  if (!globalThis.location) return;
752
- let n = Lt(e, t);
809
+ let n = Gt(e, t);
753
810
  globalThis.location.hash !== n && (globalThis.location.hash = n);
754
811
  }
755
- function Rt(e) {
812
+ function Kt(e) {
756
813
  return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null && e !== "" && typeof e != "object").map(([e, t]) => [e, String(t)]));
757
814
  }
758
815
  //#endregion
759
816
  //#region src/StageGuardedAction.tsx
760
- function zt(e) {
817
+ function qt(e) {
761
818
  return typeof e == "object" && !!e && !Array.isArray(e);
762
819
  }
763
- function X(e, t) {
820
+ function Y(e, t) {
764
821
  let n = e.properties[t];
765
822
  return typeof n == "string" ? n : "";
766
823
  }
767
- function Bt(e) {
824
+ function Jt(e) {
768
825
  return e.componentName === "core:action" && (Array.isArray(e.properties.alternatives) || e.properties.otherwise !== void 0);
769
826
  }
770
- function Vt(e) {
771
- let t = V(), n = X(e, "itemQuery"), r = (n ? t.routes?.queries[n] : void 0) ?? X(e, "itemRoute"), i = zt(e.properties.itemArguments) ? e.properties.itemArguments : {}, a = {}, o = !0;
827
+ function Yt(e) {
828
+ let t = V(), n = Y(e, "itemQuery"), r = (n ? t.routes?.queries[n] : void 0) ?? Y(e, "itemRoute"), i = qt(e.properties.itemArguments) ? e.properties.itemArguments : {}, a = {}, o = !0;
772
829
  for (let [e, n] of Object.entries(i)) {
773
- let r = zt(n) ? t.resolveBinding(n) : n;
830
+ let r = qt(n) ? t.resolveBinding(n) : n;
774
831
  a[e] = r, (r == null || r === "") && (o = !1);
775
832
  }
776
- let s = H({
833
+ let s = tt({
777
834
  scope: `${e.id}:item`,
778
835
  name: n || void 0,
779
836
  route: r || void 0,
@@ -786,23 +843,23 @@ function Vt(e) {
786
843
  item: s.rows.length === 1 ? s.rows[0] : void 0
787
844
  };
788
845
  }
789
- function Ht(e, t) {
790
- return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e, z(ze(n) ?? "", t)]));
846
+ function Xt(e, t) {
847
+ return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e, B(Be(n) ?? "", t)]));
791
848
  }
792
- function Ut({ element: e, interactions: t }) {
793
- let n = V(), r = Vt(e), i = ft(), [o, c] = s([]), [l, u] = s(!1), d = X(e, "label"), f = a(() => Array.isArray(e.properties.alternatives) ? e.properties.alternatives : [], [e]), p = zt(e.properties.otherwise) ? e.properties.otherwise : void 0, m = f.map((e) => e.condition), h = !p || p.outcome === "Hidden" || p.outcome === "Execute" && !!p.command;
794
- if (!Ke(m) || !h || !r.hasSource) {
795
- let n = r.hasSource ? `${Be}: “${d}” has a guard this Stage cannot evaluate, so it stays unavailable.` : `${Be}: “${d}” has no data subject to evaluate its guard against.`;
796
- return /* @__PURE__ */ P("div", {
849
+ function Zt({ element: e, interactions: t }) {
850
+ let n = V(), r = Yt(e), i = bt(), [o, c] = s([]), [l, u] = s(!1), d = Y(e, "label"), f = a(() => Array.isArray(e.properties.alternatives) ? e.properties.alternatives : [], [e]), p = qt(e.properties.otherwise) ? e.properties.otherwise : void 0, m = f.map((e) => e.condition), h = !p || p.outcome === "Hidden" || p.outcome === "Execute" && !!p.command;
851
+ if (!qe(m) || !h || !r.hasSource) {
852
+ let n = r.hasSource ? `${Ve}: “${d}” has a guard this Stage cannot evaluate, so it stays unavailable.` : `${Ve}: “${d}” has no data subject to evaluate its guard against.`;
853
+ return /* @__PURE__ */ F("div", {
797
854
  className: "stage-guarded-action",
798
855
  "data-scene-id": e.id,
799
- children: [/* @__PURE__ */ N(F, {
856
+ children: [/* @__PURE__ */ P(I, {
800
857
  type: "button",
801
858
  disabled: !0,
802
859
  title: n,
803
860
  ...t,
804
861
  children: d
805
- }), /* @__PURE__ */ N("p", {
862
+ }), /* @__PURE__ */ P("p", {
806
863
  role: "alert",
807
864
  className: "stage-form-error",
808
865
  children: n
@@ -810,41 +867,41 @@ function Ut({ element: e, interactions: t }) {
810
867
  });
811
868
  }
812
869
  if (!r.item) return null;
813
- let g = qe(m, r.item), _ = g !== void 0 && g >= 0 ? f[g] : p?.outcome === "Execute" ? p : void 0;
870
+ let g = Je(m, r.item), _ = g !== void 0 && g >= 0 ? f[g] : p?.outcome === "Execute" ? p : void 0;
814
871
  if (!_?.command) return null;
815
- let v = _.command, y = G(v), b = r.item, x = async () => {
872
+ let v = _.command, y = W(v), b = r.item, x = async () => {
816
873
  if (!y) return;
817
874
  u(!0);
818
- let t = await i(v, Ht(_, b));
875
+ let t = await i(v, Xt(_, b));
819
876
  if (u(!1), c(t.messages), !t.isSuccess) return;
820
877
  n.refreshAfterCommand();
821
- let r = X(e, "navigateToScreen"), a = X(e, "navigateByParameter"), o = a ? z(`item.${a}`, b) : void 0;
822
- r && Y(r, a && o != null ? { [a]: String(o) } : {});
878
+ let r = Y(e, "navigateToScreen"), a = Y(e, "navigateByParameter"), o = a ? B(`item.${a}`, b) : void 0;
879
+ r && J(r, a && o != null ? { [a]: String(o) } : {});
823
880
  };
824
- return /* @__PURE__ */ P("div", {
881
+ return /* @__PURE__ */ F("div", {
825
882
  className: "stage-guarded-action",
826
883
  "data-scene-id": e.id,
827
884
  "data-command": v,
828
- children: [/* @__PURE__ */ N(F, {
885
+ children: [/* @__PURE__ */ P(I, {
829
886
  ...t,
830
887
  type: "button",
831
888
  disabled: !y || l,
832
889
  title: y ? void 0 : "This command is not exposed as an API yet",
833
890
  onClick: () => void x(),
834
891
  children: d
835
- }), o.map((e) => /* @__PURE__ */ N("p", {
892
+ }), o.map((e) => /* @__PURE__ */ P("p", {
836
893
  role: "alert",
837
894
  className: "stage-form-error",
838
895
  children: e
839
896
  }, e))]
840
897
  });
841
898
  }
842
- function Wt(e) {
843
- let t = D(), r = o(void 0), s = a(() => _(re(e.id, e.behaviors), f.DoubleClick), [e.behaviors, e.id]);
899
+ function Qt(e) {
900
+ let t = O(), r = o(void 0), s = a(() => _(te(e.id, e.behaviors), f.DoubleClick), [e.behaviors, e.id]);
844
901
  i(() => () => clearTimeout(r.current), []);
845
902
  let c = n((e) => {
846
903
  if (clearTimeout(r.current), r.current = void 0, !t) return;
847
- let n = (n) => n.path === "$guard" ? Je(n.value, e) : n.path?.startsWith("item.") ? z(n.path, e) : t.context.resolve(n);
904
+ let n = (n) => n.path === "$guard" ? Ye(n.value, e) : n.path?.startsWith("item.") ? B(n.path, e) : t.context.resolve(n);
848
905
  y(s, t.dispatcher, {
849
906
  ...t.context,
850
907
  resolve: n
@@ -867,8 +924,8 @@ function Wt(e) {
867
924
  }
868
925
  //#endregion
869
926
  //#region src/stageComponents.tsx
870
- var Gt = "Stage:commandForm";
871
- function Kt(e, t, n = {}) {
927
+ var $t = "Stage:commandForm";
928
+ function en(e, t, n = {}) {
872
929
  return {
873
930
  id: e,
874
931
  componentName: "",
@@ -876,19 +933,19 @@ function Kt(e, t, n = {}) {
876
933
  slots: n
877
934
  };
878
935
  }
879
- function Z(e, t, n = "") {
936
+ function X(e, t, n = "") {
880
937
  let r = e.properties[t];
881
938
  return typeof r == "string" ? r : n;
882
939
  }
883
- function qt(e, t) {
940
+ function tn(e, t) {
884
941
  let n = e.properties.queryArguments;
885
- if (!Zt(n)) return {
942
+ if (!on(n)) return {
886
943
  values: {},
887
944
  ready: !0
888
945
  };
889
946
  let r = {}, i = !0;
890
947
  for (let [e, a] of Object.entries(n)) {
891
- let n = Xt(a) ? t.resolveBinding(a) : a;
948
+ let n = an(a) ? t.resolveBinding(a) : a;
892
949
  r[e] = n, (n == null || n === "") && (i = !1);
893
950
  }
894
951
  return {
@@ -896,7 +953,7 @@ function qt(e, t) {
896
953
  ready: i
897
954
  };
898
955
  }
899
- function Jt(e, t) {
956
+ function nn(e, t) {
900
957
  let n = (e.slots.columns ?? []).map((e) => {
901
958
  let t = e.properties;
902
959
  return {
@@ -909,20 +966,20 @@ function Jt(e, t) {
909
966
  }));
910
967
  return n.length > 0 ? n : r;
911
968
  }
912
- function Q(e, t) {
969
+ function Z(e, t) {
913
970
  return e[t] ?? e.id ?? e.key;
914
971
  }
915
- function Yt({ element: e, slots: t }) {
916
- let n = V(), r = Z(e, "query", Z(e, "typeName", e.id)), o = (Z(e, "query") ? n.routes?.queries[Z(e, "query")] : void 0) ?? Z(e, "route"), s = a(() => qt(e, n), [n, e]), { rows: c, error: l, loading: u } = H({
972
+ function rn({ element: e, slots: t }) {
973
+ let n = V(), r = X(e, "query", X(e, "typeName", e.id)), o = (X(e, "query") ? n.routes?.queries[X(e, "query")] : void 0) ?? X(e, "route"), s = a(() => tn(e, n), [n, e]), { rows: c, error: l, loading: u } = tt({
917
974
  scope: e.id,
918
975
  name: r,
919
976
  route: o || void 0,
920
977
  arguments: s.values,
921
978
  ready: s.ready
922
- }), d = Jt(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, _ = Wt(e);
979
+ }), d = nn(e, c), f = X(e, "navigateOnRowClickToScreen"), p = X(e, "navigateOnRowClickByParameter"), m = X(e, "dataKey") || p || "id", h = n.selections[e.id], g = p ? n.parameters[p] : void 0, _ = Qt(e);
923
980
  i(() => {
924
981
  if (!h) return;
925
- let t = Q(h, m), r = t === void 0 ? void 0 : c.find((e) => Q(e, m) === t);
982
+ let t = Z(h, m), r = t === void 0 ? void 0 : c.find((e) => Z(e, m) === t);
926
983
  if (r && r !== h) {
927
984
  n.selectRow(e.id, r);
928
985
  return;
@@ -941,8 +998,8 @@ function Yt({ element: e, slots: t }) {
941
998
  h && n.clearSelection(e.id);
942
999
  return;
943
1000
  }
944
- if (h && String(Q(h, m)) === g) return;
945
- let t = c.find((e) => String(Q(e, m)) === g);
1001
+ if (h && String(Z(h, m)) === g) return;
1002
+ let t = c.find((e) => String(Z(e, m)) === g);
946
1003
  t && n.selectRow(e.id, t);
947
1004
  }, [
948
1005
  n,
@@ -954,51 +1011,51 @@ function Yt({ element: e, slots: t }) {
954
1011
  h
955
1012
  ]);
956
1013
  let v = (t) => {
957
- let r = Q(t, m);
1014
+ let r = Z(t, m);
958
1015
  if (p && r != null) {
959
1016
  let i = {
960
1017
  ...f && f !== n.screen ? {} : n.parameters,
961
1018
  [p]: String(r)
962
1019
  };
963
- (!f || f === n.screen) && n.selectRow(e.id, t), Y(f || n.screen, i);
1020
+ (!f || f === n.screen) && n.selectRow(e.id, t), J(f || n.screen, i);
964
1021
  return;
965
1022
  }
966
1023
  n.selectRow(e.id, t);
967
1024
  };
968
- return o ? /* @__PURE__ */ P("section", {
1025
+ return o ? /* @__PURE__ */ F("section", {
969
1026
  className: "stage-table",
970
1027
  "data-scene-id": e.id,
971
1028
  children: [
972
- u && /* @__PURE__ */ N(Se, {
973
- element: Kt(`${e.id}-loading`, {
1029
+ u && /* @__PURE__ */ P(Ce, {
1030
+ element: en(`${e.id}-loading`, {
974
1031
  severity: "info",
975
1032
  text: "Loading…"
976
1033
  }),
977
1034
  slots: {}
978
1035
  }),
979
- l && /* @__PURE__ */ N(Se, {
980
- element: Kt(`${e.id}-error`, {
1036
+ l && /* @__PURE__ */ P(Ce, {
1037
+ element: en(`${e.id}-error`, {
981
1038
  severity: "error",
982
1039
  text: l
983
1040
  }),
984
1041
  slots: {}
985
1042
  }),
986
- h && /* @__PURE__ */ N(F, {
1043
+ h && /* @__PURE__ */ P(I, {
987
1044
  type: "button",
988
1045
  size: "small",
989
1046
  onClick: () => {
990
1047
  if (n.clearSelection(e.id), !p || n.parameters[p] === void 0) return;
991
1048
  let { [p]: t, ...r } = n.parameters;
992
- Y(n.screen, r);
1049
+ J(n.screen, r);
993
1050
  },
994
1051
  children: "Clear selection"
995
1052
  }),
996
- /* @__PURE__ */ P("table", {
997
- "aria-label": Z(e, "label", Z(e, "typeName", "Results")),
998
- children: [/* @__PURE__ */ N("thead", { children: /* @__PURE__ */ N("tr", { children: d.map((e) => /* @__PURE__ */ N("th", {
1053
+ /* @__PURE__ */ F("table", {
1054
+ "aria-label": X(e, "label", X(e, "typeName", "Results")),
1055
+ children: [/* @__PURE__ */ P("thead", { children: /* @__PURE__ */ P("tr", { children: d.map((e) => /* @__PURE__ */ P("th", {
999
1056
  scope: "col",
1000
1057
  children: e.label
1001
- }, e.property)) }) }), /* @__PURE__ */ P("tbody", { children: [c.map((e, t) => /* @__PURE__ */ N("tr", {
1058
+ }, e.property)) }) }), /* @__PURE__ */ F("tbody", { children: [c.map((e, t) => /* @__PURE__ */ P("tr", {
1002
1059
  "aria-selected": h === e,
1003
1060
  tabIndex: 0,
1004
1061
  onClick: () => _.click(e, () => v(e)),
@@ -1006,45 +1063,45 @@ function Yt({ element: e, slots: t }) {
1006
1063
  onKeyDown: (t) => {
1007
1064
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), v(e));
1008
1065
  },
1009
- children: d.map((t) => /* @__PURE__ */ N("td", { children: String(e[t.property] ?? "") }, t.property))
1010
- }, String(Q(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */ N("tr", { children: /* @__PURE__ */ N("td", {
1066
+ children: d.map((t) => /* @__PURE__ */ P("td", { children: String(e[t.property] ?? "") }, t.property))
1067
+ }, String(Z(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */ P("tr", { children: /* @__PURE__ */ P("td", {
1011
1068
  colSpan: Math.max(d.length, 1),
1012
1069
  children: "No records found"
1013
1070
  }) })] })]
1014
1071
  })
1015
1072
  ]
1016
- }) : /* @__PURE__ */ P("section", {
1073
+ }) : /* @__PURE__ */ F("section", {
1017
1074
  className: "stage-table",
1018
1075
  "data-scene-id": e.id,
1019
- children: [/* @__PURE__ */ P("p", {
1076
+ children: [/* @__PURE__ */ F("p", {
1020
1077
  className: "stage-note",
1021
1078
  children: [
1022
1079
  "No query is exposed for ",
1023
- Z(e, "typeName", "this read model"),
1080
+ X(e, "typeName", "this read model"),
1024
1081
  " yet."
1025
1082
  ]
1026
1083
  }), t.columns]
1027
1084
  });
1028
1085
  }
1029
- function Xt(e) {
1030
- return Zt(e) && (typeof e.path == "string" || typeof e.kind == "string");
1086
+ function an(e) {
1087
+ return on(e) && (typeof e.path == "string" || typeof e.kind == "string");
1031
1088
  }
1032
- function Zt(e) {
1089
+ function on(e) {
1033
1090
  return typeof e == "object" && !!e && !Array.isArray(e);
1034
1091
  }
1035
- function Qt({ element: e, interactions: t, slots: n }) {
1036
- return Bt(e) ? /* @__PURE__ */ N(Ut, {
1092
+ function sn({ element: e, interactions: t, slots: n }) {
1093
+ return Jt(e) ? /* @__PURE__ */ P(Zt, {
1037
1094
  element: e,
1038
1095
  interactions: t
1039
- }) : /* @__PURE__ */ N($t, {
1096
+ }) : /* @__PURE__ */ P(cn, {
1040
1097
  element: e,
1041
1098
  interactions: t,
1042
1099
  slots: n
1043
1100
  });
1044
1101
  }
1045
- function $t({ element: e, interactions: t }) {
1046
- let n = Z(e, "label", Z(e, "command"));
1047
- if (!G(Z(e, "command"), Z(e, "typeName"), Z(e, "route"))) return /* @__PURE__ */ N(F, {
1102
+ function cn({ element: e, interactions: t }) {
1103
+ let n = X(e, "label", X(e, "command"));
1104
+ if (!W(X(e, "command"), X(e, "typeName"), X(e, "route"))) return /* @__PURE__ */ P(I, {
1048
1105
  type: "button",
1049
1106
  "data-scene-id": e.id,
1050
1107
  disabled: !0,
@@ -1052,12 +1109,12 @@ function $t({ element: e, interactions: t }) {
1052
1109
  ...t,
1053
1110
  children: n
1054
1111
  });
1055
- let r = /* @__PURE__ */ N(pt, { element: e });
1056
- return /* @__PURE__ */ N("div", {
1112
+ let r = /* @__PURE__ */ P(xt, { element: e });
1113
+ return /* @__PURE__ */ P("div", {
1057
1114
  className: "stage-action",
1058
1115
  "data-scene-id": e.id,
1059
- children: /* @__PURE__ */ N(xe, {
1060
- element: Kt(e.id, {
1116
+ children: /* @__PURE__ */ P(Se, {
1117
+ element: en(e.id, {
1061
1118
  visible: !1,
1062
1119
  header: n,
1063
1120
  triggerLabel: n
@@ -1066,38 +1123,38 @@ function $t({ element: e, interactions: t }) {
1066
1123
  })
1067
1124
  });
1068
1125
  }
1069
- function en(e) {
1126
+ function ln(e) {
1070
1127
  let { element: t } = e;
1071
- if (Z(t, "kind").toLowerCase() !== "action" || Z(t, "slice") !== "") return /* @__PURE__ */ N(x, { ...e });
1072
- let n = Z(t, "name", t.id), r = {
1128
+ if (X(t, "kind").toLowerCase() !== "action" || X(t, "slice") !== "") return /* @__PURE__ */ P(x, { ...e });
1129
+ let n = X(t, "name", t.id), r = {
1073
1130
  ...t,
1074
1131
  componentName: "core:action",
1075
1132
  properties: {
1076
- command: Z(t, "target"),
1077
- label: Z(t, "label", n)
1133
+ command: X(t, "target"),
1134
+ label: X(t, "label", n)
1078
1135
  }
1079
1136
  };
1080
- return /* @__PURE__ */ N("span", {
1137
+ return /* @__PURE__ */ P("span", {
1081
1138
  className: "stage-toolbar-action",
1082
1139
  "data-scene-toolbar-item": n,
1083
- children: /* @__PURE__ */ N(Qt, {
1140
+ children: /* @__PURE__ */ P(sn, {
1084
1141
  element: r,
1085
1142
  interactions: e.interactions,
1086
1143
  slots: e.slots
1087
1144
  })
1088
1145
  });
1089
1146
  }
1090
- var tn = {
1091
- ...w,
1092
- "core:table": Yt,
1093
- "core:action": Qt,
1094
- "core:toolbarItem": en,
1095
- [Gt]: pt
1147
+ var un = {
1148
+ ...E,
1149
+ "core:table": rn,
1150
+ "core:action": sn,
1151
+ "core:toolbarItem": ln,
1152
+ [$t]: xt
1096
1153
  };
1097
1154
  //#endregion
1098
1155
  //#region src/useStrings.ts
1099
- function nn() {
1100
- let e = I(), [t, n] = s([]), [r, a] = s(""), [o, c] = s({});
1156
+ function dn() {
1157
+ let e = L(), [t, n] = s([]), [r, a] = s(""), [o, c] = s({});
1101
1158
  return i(() => {
1102
1159
  let t = new AbortController();
1103
1160
  return e.locales(t.signal).then((e) => {
@@ -1114,7 +1171,7 @@ function nn() {
1114
1171
  dictionary: o
1115
1172
  };
1116
1173
  }
1117
- function rn(e) {
1174
+ function fn(e) {
1118
1175
  let t = /* @__PURE__ */ new Set(), n = [];
1119
1176
  for (let r of e) for (let e of r.contributions ?? []) {
1120
1177
  if (e.contributionPointName !== "Navigation") continue;
@@ -1127,7 +1184,7 @@ function rn(e) {
1127
1184
  ]);
1128
1185
  if (t.has(s)) continue;
1129
1186
  t.add(s);
1130
- let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = sn(r.destination) ? r.destination : void 0;
1187
+ let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = hn(r.destination) ? r.destination : void 0;
1131
1188
  n.push({
1132
1189
  label: i,
1133
1190
  targetScreen: a,
@@ -1135,7 +1192,7 @@ function rn(e) {
1135
1192
  order: c,
1136
1193
  ...typeof r.icon == "string" ? { icon: r.icon } : {},
1137
1194
  ...typeof r.presentation == "string" ? { presentation: r.presentation } : {},
1138
- ...l && cn(l) ? { destination: l } : {}
1195
+ ...l && gn(l) ? { destination: l } : {}
1139
1196
  });
1140
1197
  }
1141
1198
  return n.map((e, t) => ({
@@ -1143,7 +1200,7 @@ function rn(e) {
1143
1200
  index: t
1144
1201
  })).sort((e, t) => (e.entry.order ?? 2 ** 53 - 1) - (t.entry.order ?? 2 ** 53 - 1) || e.index - t.index).map(({ entry: e }) => e);
1145
1202
  }
1146
- function an(e) {
1203
+ function pn(e) {
1147
1204
  let t = {
1148
1205
  label: "",
1149
1206
  children: []
@@ -1168,21 +1225,21 @@ function an(e) {
1168
1225
  }
1169
1226
  return t.children;
1170
1227
  }
1171
- function on(e, t) {
1228
+ function mn(e, t) {
1172
1229
  for (let n of e) {
1173
1230
  if (n.screen === t) return [n.label];
1174
- let e = on(n.children, t);
1231
+ let e = mn(n.children, t);
1175
1232
  if (e.length > 0) return [n.label, ...e];
1176
1233
  }
1177
1234
  return [];
1178
1235
  }
1179
- function sn(e) {
1236
+ function hn(e) {
1180
1237
  return typeof e == "object" && !!e && !Array.isArray(e);
1181
1238
  }
1182
- function cn(e) {
1239
+ function gn(e) {
1183
1240
  return e.outlet !== void 0 || e.dialog !== void 0 || e.kind === "external" || e.kind === "dialog";
1184
1241
  }
1185
- function ln(e, t, n) {
1242
+ function _n(e, t, n) {
1186
1243
  return e.filter((e) => !t.has(e.name)).map((e) => ({
1187
1244
  label: e.name,
1188
1245
  targetScreen: e.name,
@@ -1191,77 +1248,77 @@ function ln(e, t, n) {
1191
1248
  }
1192
1249
  //#endregion
1193
1250
  //#region src/blueprint.ts
1194
- var un = "Stage:locale";
1195
- function dn(e) {
1196
- let t = ye(e), n = t.packages.filter((e) => e !== "PrimeReact");
1197
- return n.splice(Math.max(n.indexOf(de), 0), 0, "PrimeReact"), {
1251
+ var vn = "Stage:locale";
1252
+ function yn(e) {
1253
+ let t = ve(e), n = t.packages.filter((e) => e !== "PrimeReact");
1254
+ return n.splice(Math.max(n.indexOf(ue), 0), 0, "PrimeReact"), {
1198
1255
  ...t,
1199
1256
  name: e?.length ? t.name : "Stage",
1200
1257
  packages: n
1201
1258
  };
1202
1259
  }
1203
- var fn = {
1204
- ...ce,
1205
- PrimeReact: we.components
1260
+ var bn = {
1261
+ ...se,
1262
+ PrimeReact: Te.components
1206
1263
  };
1207
- function pn(e) {
1264
+ function xn(e) {
1208
1265
  return {
1209
- ...w,
1210
- ...Ce,
1211
- ...ue,
1212
- ...ve,
1266
+ ...E,
1267
+ ...we,
1268
+ ...le,
1269
+ ..._e,
1213
1270
  ...e
1214
1271
  };
1215
1272
  }
1216
- function mn(e) {
1273
+ function Sn(e) {
1217
1274
  return e ? {
1218
1275
  ...e,
1219
- ...fn
1220
- } : fn;
1276
+ ...bn
1277
+ } : bn;
1221
1278
  }
1222
- var hn = "Stage:navigationTree";
1223
- function gn(e, t, n) {
1224
- return M(e, A.Logo, {
1279
+ var Cn = "Stage:navigationTree";
1280
+ function wn(e, t, n) {
1281
+ return N(e, j.Logo, {
1225
1282
  label: t,
1226
1283
  initials: t.slice(0, 1).toUpperCase() || "S",
1227
1284
  targetScreen: "",
1228
1285
  ...n ? { lightImageUrl: n } : {}
1229
1286
  });
1230
1287
  }
1231
- function _n(e, t, n, r, i, a = !1, o = !0) {
1232
- let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = rn(e), u = ln(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = an([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => _e({
1288
+ function Tn(e, t, n, r, i, a = !1, o = !0) {
1289
+ let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = fn(e), u = _n(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = pn([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => ge({
1233
1290
  label: e.name,
1234
1291
  targetScreen: e.name,
1235
1292
  icon: "pi pi-table",
1236
1293
  group: "Screens",
1237
1294
  order: n
1238
- }, t)), p = on(an(l), t), m = e.find((e) => e.name === t)?.path?.length ? on(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? M("menu-hierarchy", hn, {
1295
+ }, t)), p = mn(pn(l), t), m = e.find((e) => e.name === t)?.path?.length ? mn(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? N("menu-hierarchy", Cn, {
1239
1296
  nodes: d,
1240
1297
  activeScreen: t
1241
- }) : M("menu-screens", A.Menu, {
1298
+ }) : N("menu-screens", j.Menu, {
1242
1299
  title: "Screens",
1243
1300
  label: "Screens"
1244
1301
  }, { items: f }), _ = [];
1245
- n.length > 1 && _.push(M("topbar-locale", un, {
1302
+ n.length > 1 && _.push(N("topbar-locale", vn, {
1246
1303
  locales: n,
1247
1304
  locale: r
1248
- })), _.push(M("topbar-theme", A.ThemeSwitcher, { label: "Theme" }));
1305
+ })), _.push(N("topbar-theme", j.ThemeSwitcher, { label: "Theme" }));
1249
1306
  let v = { regionNavigation: a };
1250
1307
  return {
1251
- [j.Topbar]: [M("topbar", A.Topbar, v, {
1252
- logo: [gn("topbar-logo", c, i?.image)],
1308
+ [M.Topbar]: [N("topbar", j.Topbar, v, {
1309
+ logo: [wn("topbar-logo", c, i?.image)],
1253
1310
  end: _
1254
1311
  })],
1255
- [j.Sidebar]: [M("sidebar", A.Sidebar, v, { logo: [gn("sidebar-logo", c, i?.image)] })],
1256
- ...a ? {} : { [j.Menu]: [g] },
1257
- [j.Breadcrumb]: [M("breadcrumb", A.Breadcrumb, {
1312
+ [M.Sidebar]: [N("sidebar", j.Sidebar, v, { logo: [wn("sidebar-logo", c, i?.image)] })],
1313
+ ...a ? {} : { [M.Menu]: [g] },
1314
+ [M.Breadcrumb]: [N("breadcrumb", j.Breadcrumb, {
1258
1315
  homeTargetScreen: s,
1259
1316
  items: (h.length > 0 ? h : [t]).map((e) => ({ label: e }))
1260
1317
  })],
1261
- ...o ? { [j.Footer]: [M("footer", A.Footer, { text: `${c} · rendered from your model` })] } : {},
1262
- [j.ConfigPanel]: [M(A.ConfigPanel, A.ConfigPanel, {
1318
+ ...o ? { [M.Footer]: [N("footer", j.Footer, { text: `${c} · rendered from your model` })] } : {},
1319
+ [M.ConfigPanel]: [N(j.ConfigPanel, j.ConfigPanel, {
1263
1320
  title: "Settings",
1264
- themes: fe.map((e) => ({
1321
+ themes: de.map((e) => ({
1265
1322
  name: e.name,
1266
1323
  label: e.name,
1267
1324
  isDark: e.isDark ?? !1
@@ -1269,65 +1326,65 @@ function _n(e, t, n, r, i, a = !1, o = !0) {
1269
1326
  })]
1270
1327
  };
1271
1328
  }
1272
- function vn(e) {
1329
+ function En(e) {
1273
1330
  return `#/${encodeURIComponent(e)}`;
1274
1331
  }
1275
1332
  //#endregion
1276
1333
  //#region src/StageChrome.tsx
1277
- var yn = e({
1334
+ var Dn = e({
1278
1335
  locales: [],
1279
1336
  locale: "",
1280
1337
  setLocale: () => void 0,
1281
1338
  activity: ""
1282
1339
  });
1283
- function bn({ state: e, children: t }) {
1284
- return /* @__PURE__ */ N(yn.Provider, {
1340
+ function On({ state: e, children: t }) {
1341
+ return /* @__PURE__ */ P(Dn.Provider, {
1285
1342
  value: e,
1286
1343
  children: t
1287
1344
  });
1288
1345
  }
1289
- var xn = "Stage:activity";
1290
- function Sn() {
1291
- let { locales: e, locale: t, setLocale: n } = r(yn);
1292
- return e.length < 2 ? null : /* @__PURE__ */ N("select", {
1346
+ var kn = "Stage:activity";
1347
+ function An() {
1348
+ let { locales: e, locale: t, setLocale: n } = r(Dn);
1349
+ return e.length < 2 ? null : /* @__PURE__ */ P("select", {
1293
1350
  className: "stage-locale",
1294
1351
  "aria-label": "Locale",
1295
1352
  value: t,
1296
1353
  onChange: (e) => n(e.target.value),
1297
- children: e.map((e) => /* @__PURE__ */ N("option", {
1354
+ children: e.map((e) => /* @__PURE__ */ P("option", {
1298
1355
  value: e,
1299
1356
  children: e
1300
1357
  }, e))
1301
1358
  });
1302
1359
  }
1303
- function Cn({ element: e }) {
1360
+ function jn({ element: e }) {
1304
1361
  let t = e.properties ?? {};
1305
- return /* @__PURE__ */ N("nav", {
1362
+ return /* @__PURE__ */ P("nav", {
1306
1363
  className: "stage-navigation-tree",
1307
1364
  "aria-label": "Navigation",
1308
1365
  "data-scene-id": e.id,
1309
- children: /* @__PURE__ */ N(wn, {
1366
+ children: /* @__PURE__ */ P(Mn, {
1310
1367
  nodes: t.nodes ?? [],
1311
1368
  activeScreen: t.activeScreen
1312
1369
  })
1313
1370
  });
1314
1371
  }
1315
- function wn({ nodes: e, activeScreen: t }) {
1316
- return /* @__PURE__ */ N("ul", {
1372
+ function Mn({ nodes: e, activeScreen: t }) {
1373
+ return /* @__PURE__ */ P("ul", {
1317
1374
  role: "tree",
1318
- children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ P("li", {
1375
+ children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ F("li", {
1319
1376
  role: "treeitem",
1320
1377
  "aria-expanded": "true",
1321
- children: [/* @__PURE__ */ N("span", {
1378
+ children: [/* @__PURE__ */ P("span", {
1322
1379
  className: "stage-navigation-group",
1323
1380
  children: e.label
1324
- }), /* @__PURE__ */ N(wn, {
1381
+ }), /* @__PURE__ */ P(Mn, {
1325
1382
  nodes: e.children,
1326
1383
  activeScreen: t
1327
1384
  })]
1328
- }, e.label) : /* @__PURE__ */ N("li", {
1385
+ }, e.label) : /* @__PURE__ */ P("li", {
1329
1386
  role: "treeitem",
1330
- children: /* @__PURE__ */ N(Tn, {
1387
+ children: /* @__PURE__ */ P(Nn, {
1331
1388
  node: e,
1332
1389
  screen: e.screen,
1333
1390
  activeScreen: t
@@ -1335,56 +1392,56 @@ function wn({ nodes: e, activeScreen: t }) {
1335
1392
  }, `${e.screen}:${e.label}`))
1336
1393
  });
1337
1394
  }
1338
- function Tn({ node: e, screen: t, activeScreen: n }) {
1339
- let i = r(te), 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 && cn(o) ? (e) => {
1395
+ function Nn({ node: e, screen: t, activeScreen: n }) {
1396
+ let i = r(w), 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 && gn(o) ? (e) => {
1340
1397
  e.preventDefault(), i.navigate(o);
1341
1398
  } : void 0;
1342
- return /* @__PURE__ */ P("a", {
1343
- href: s ? o.route : vn(t),
1399
+ return /* @__PURE__ */ F("a", {
1400
+ href: s ? o.route : En(t),
1344
1401
  rel: s ? "noreferrer" : void 0,
1345
1402
  "aria-current": t === n ? "page" : void 0,
1346
1403
  "aria-label": a === "icon" ? e.label : void 0,
1347
1404
  "data-presentation": e.presentation,
1348
1405
  "data-icon": e.icon,
1349
1406
  onClick: c,
1350
- children: [a !== "text" && e.icon && /* @__PURE__ */ N("span", {
1407
+ children: [a !== "text" && e.icon && /* @__PURE__ */ P("span", {
1351
1408
  className: "stage-navigation-icon",
1352
1409
  "aria-hidden": "true",
1353
1410
  "data-icon-name": e.icon
1354
1411
  }), a !== "icon" && e.label]
1355
1412
  });
1356
1413
  }
1357
- function En({ element: e }) {
1358
- let t = typeof e.properties.name == "string" ? e.properties.name : "", n = r(te), i = ae(), a = V(), o = n?.outlets[t], s = o && i ? i.screens[o] : void 0, c = e.properties.closable === !0;
1359
- return /* @__PURE__ */ P("div", {
1414
+ function Pn({ element: e }) {
1415
+ let t = typeof e.properties.name == "string" ? e.properties.name : "", n = r(w), i = ie(), a = V(), o = n?.outlets[t], s = o && i ? i.screens[o] : void 0, c = e.properties.closable === !0;
1416
+ return /* @__PURE__ */ F("div", {
1360
1417
  "data-scene-outlet": t,
1361
1418
  "data-scene-outlet-screen": o,
1362
- children: [c && o && /* @__PURE__ */ N("div", {
1419
+ children: [c && o && /* @__PURE__ */ P("div", {
1363
1420
  className: "scene-outlet-bar",
1364
- children: /* @__PURE__ */ N("button", {
1421
+ children: /* @__PURE__ */ P("button", {
1365
1422
  type: "button",
1366
1423
  className: "scene-outlet-close",
1367
1424
  "aria-label": "Close",
1368
1425
  onClick: () => n?.closeOutlet(t),
1369
1426
  children: "Close"
1370
1427
  })
1371
- }), s && i && /* @__PURE__ */ N(S, {
1428
+ }), s && i && /* @__PURE__ */ P(C, {
1372
1429
  element: s,
1373
1430
  registry: i.registry,
1374
1431
  resolveBinding: a.resolveBinding
1375
1432
  })]
1376
1433
  });
1377
1434
  }
1378
- function Dn() {
1379
- let { activity: e } = r(yn);
1380
- return e ? /* @__PURE__ */ N("p", {
1435
+ function Fn() {
1436
+ let { activity: e } = r(Dn);
1437
+ return e ? /* @__PURE__ */ P("p", {
1381
1438
  className: "stage-activity",
1382
1439
  role: "status",
1383
1440
  children: e
1384
1441
  }) : null;
1385
1442
  }
1386
- function On() {
1387
- let e = O(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
1443
+ function In() {
1444
+ let e = k(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
1388
1445
  return i(() => {
1389
1446
  let r = e?.isDark ? "dark" : "light";
1390
1447
  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 ?? "";
@@ -1394,44 +1451,44 @@ function On() {
1394
1451
  n
1395
1452
  ]), null;
1396
1453
  }
1397
- var kn = {
1398
- [un]: Sn,
1399
- [hn]: Cn,
1400
- [xn]: Dn,
1401
- "core:outlet": En
1402
- }, An = [
1454
+ var Ln = {
1455
+ [vn]: An,
1456
+ [Cn]: jn,
1457
+ [kn]: Fn,
1458
+ "core:outlet": Pn
1459
+ }, Rn = [
1403
1460
  "navigationMode",
1404
1461
  "menuTheme",
1405
1462
  "showFooter"
1406
- ], jn = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
1407
- function Mn(e, t, n = !1) {
1463
+ ], zn = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
1464
+ function Bn(e, t, n = !1) {
1408
1465
  let r = [], i = t.options ?? {}, a = {
1409
1466
  showFooter: !0,
1410
1467
  followsSystem: !1,
1411
1468
  problems: r
1412
1469
  };
1413
1470
  for (let [e, n] of Object.entries(i)) {
1414
- if (!An.includes(e)) {
1415
- r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${An.join(", ")}.`);
1471
+ if (!Rn.includes(e)) {
1472
+ r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${Rn.join(", ")}.`);
1416
1473
  continue;
1417
1474
  }
1418
1475
  if (e === "navigationMode") {
1419
- let e = he.find((e) => e === n);
1420
- e ? a.mode = e : r.push(`Option 'navigationMode' is '${String(n)}'; expected one of ${he.join(", ")}.`);
1476
+ let e = me.find((e) => e === n);
1477
+ e ? a.mode = e : r.push(`Option 'navigationMode' is '${String(n)}'; expected one of ${me.join(", ")}.`);
1421
1478
  } else if (e === "menuTheme") {
1422
- let e = ge.find((e) => e === n);
1423
- e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${ge.join(", ")}.`);
1479
+ let e = he.find((e) => e === n);
1480
+ e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${he.join(", ")}.`);
1424
1481
  } else typeof n == "boolean" ? a.showFooter = n : r.push(`Option 'showFooter' is '${String(n)}'; expected true or false.`);
1425
1482
  }
1426
1483
  let o = e?.appearance;
1427
1484
  if (o?.colorScheme !== void 0) {
1428
1485
  a.followsSystem = o.colorScheme === c.System;
1429
1486
  let e = a.followsSystem ? n : o.colorScheme === c.Dark;
1430
- a.colorScheme = e ? k.Dark : k.Light, a.themeName = fe.find((t) => (t.isDark ?? !1) === e)?.name;
1487
+ a.colorScheme = e ? A.Dark : A.Light, a.themeName = de.find((t) => (t.isDark ?? !1) === e)?.name;
1431
1488
  }
1432
- return o?.accent !== void 0 && (jn.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
1489
+ return o?.accent !== void 0 && (zn.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
1433
1490
  }
1434
- function Nn(e, t) {
1491
+ function Vn(e, t) {
1435
1492
  if (e?.root === void 0) return [];
1436
1493
  let n = /* @__PURE__ */ new Set([
1437
1494
  p.RootTemplateUnknown,
@@ -1443,7 +1500,7 @@ function Nn(e, t) {
1443
1500
  ]), r = t.diagnostics.filter((e) => n.has(e.code)).map((e) => e.message);
1444
1501
  return r.length === 0 && t.origin !== m.Root && r.push(`The root template '${e.root.template.id}' did not resolve, so the application would not start in the shell it names.`), r;
1445
1502
  }
1446
- function Pn(e) {
1503
+ function Hn(e) {
1447
1504
  let t = e.length === 4 ? [...e.slice(1)].map((e) => e + e).join("") : e.slice(1), [n, r, i] = [
1448
1505
  0,
1449
1506
  2,
@@ -1451,7 +1508,7 @@ function Pn(e) {
1451
1508
  ].map((e) => parseInt(t.slice(e, e + 2), 16));
1452
1509
  return (n * 299 + r * 587 + i * 114) / 1e3 >= 150 ? "#111827" : "#ffffff";
1453
1510
  }
1454
- function Fn(e, t) {
1511
+ function Un(e, t) {
1455
1512
  if (t === void 0) return e;
1456
1513
  let n = t.length === 4 ? [...t.slice(1)].map((e) => e + e).join("") : t.slice(1), [r, i, a] = [
1457
1514
  0,
@@ -1463,20 +1520,20 @@ function Fn(e, t) {
1463
1520
  tokens: {
1464
1521
  ...e.tokens,
1465
1522
  "primary.color": t,
1466
- "primary.contrastColor": Pn(t),
1523
+ "primary.contrastColor": Hn(t),
1467
1524
  "focus.ring": `0 0 0 2px rgb(${r} ${i} ${a} / 0.4)`
1468
1525
  }
1469
1526
  }));
1470
1527
  }
1471
1528
  //#endregion
1472
1529
  //#region src/StageShellSettings.tsx
1473
- var In = "(prefers-color-scheme: dark)";
1474
- function Ln() {
1530
+ var Wn = "(prefers-color-scheme: dark)";
1531
+ function Gn() {
1475
1532
  return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ?? !1;
1476
1533
  }
1477
- function Rn({ settings: e, onSystemSchemeChange: t }) {
1478
- let n = o(be());
1479
- n.current = be();
1534
+ function Kn({ settings: e, onSystemSchemeChange: t }) {
1535
+ let n = o(ye());
1536
+ n.current = ye();
1480
1537
  let { mode: r, menuTheme: a, colorScheme: s, themeName: c } = e;
1481
1538
  return i(() => {
1482
1539
  let { setMode: e, setMenuTheme: t, setColorScheme: i, setThemeName: o } = n.current;
@@ -1488,16 +1545,16 @@ function Rn({ settings: e, onSystemSchemeChange: t }) {
1488
1545
  c
1489
1546
  ]), i(() => {
1490
1547
  if (!e.followsSystem || !globalThis.matchMedia || !t) return;
1491
- let n = globalThis.matchMedia(In), r = (e) => t(e.matches);
1548
+ let n = globalThis.matchMedia(Wn), r = (e) => t(e.matches);
1492
1549
  return n.addEventListener("change", r), () => n.removeEventListener("change", r);
1493
1550
  }, [e.followsSystem, t]), null;
1494
1551
  }
1495
1552
  //#endregion
1496
1553
  //#region src/stageNavigationModel.ts
1497
- function zn(e) {
1554
+ function qn(e) {
1498
1555
  return (e?.application.regions.length ?? 0) > 0 || (e?.modules.length ?? 0) > 0;
1499
1556
  }
1500
- function Bn(e) {
1557
+ function Jn(e) {
1501
1558
  let t = /* @__PURE__ */ new Map();
1502
1559
  for (let n of e) {
1503
1560
  let e = (n.path ?? []).join(".");
@@ -1510,35 +1567,35 @@ function Bn(e) {
1510
1567
  return t.get(r) ?? i ?? (e.some((e) => e.name === r) ? r : void 0);
1511
1568
  };
1512
1569
  }
1513
- function Vn(e) {
1570
+ function Yn(e) {
1514
1571
  return (t) => e.find((e) => e.name === t)?.path?.[0];
1515
1572
  }
1516
- function Hn(e, t) {
1573
+ function Xn(e, t) {
1517
1574
  return {
1518
1575
  structure: e.structure ?? { modules: [] },
1519
1576
  navigation: e.navigation ?? {
1520
1577
  application: { regions: [] },
1521
1578
  modules: []
1522
1579
  },
1523
- screenFor: Bn(e.screens),
1524
- moduleOf: Vn(e.screens),
1580
+ screenFor: Jn(e.screens),
1581
+ moduleOf: Yn(e.screens),
1525
1582
  ...t ? { isVisible: t } : {}
1526
1583
  };
1527
1584
  }
1528
- var Un = /* @__PURE__ */ new Set(["core:table"]);
1529
- function Wn(e) {
1530
- return Gn(e, /* @__PURE__ */ new Map(), void 0);
1585
+ var Zn = /* @__PURE__ */ new Set(["core:table"]);
1586
+ function Qn(e) {
1587
+ return $n(e, /* @__PURE__ */ new Map(), void 0);
1531
1588
  }
1532
- function Gn(e, t, n) {
1589
+ function $n(e, t, n) {
1533
1590
  let r = e;
1534
1591
  if (!r.slots) return e;
1535
1592
  let i = !1, a = {};
1536
1593
  for (let [e, o] of Object.entries(r.slots)) {
1537
1594
  let r = new Map(t), s = n;
1538
1595
  a[e] = o.map((e) => {
1539
- let t = e, n = $(t, "typeName");
1596
+ let t = e, n = Q(t, "typeName");
1540
1597
  t.componentName === "core:data" && n && (r.set(n, t), s = t);
1541
- let a = Gn(qn(Kn(t, r), s), r, s);
1598
+ let a = $n(tr(er(t, r), s), r, s);
1542
1599
  return a !== e && (i = !0), a;
1543
1600
  });
1544
1601
  }
@@ -1547,45 +1604,45 @@ function Gn(e, t, n) {
1547
1604
  slots: a
1548
1605
  } : e;
1549
1606
  }
1550
- function Kn(e, t) {
1551
- if (!Un.has(e.componentName)) return e;
1552
- let n = $(e, "typeName"), r = n ? t.get(n) : void 0;
1607
+ function er(e, t) {
1608
+ if (!Zn.has(e.componentName)) return e;
1609
+ let n = Q(e, "typeName"), r = n ? t.get(n) : void 0;
1553
1610
  if (!r || e.properties.queryArguments !== void 0) return e;
1554
- let i = $(r, "by"), a = { ...e.properties }, o = $(r, "query");
1555
- return o && (a.query = o), !$(e, "route") && $(r, "route") && (a.route = r.properties.route), i && (a.by = i, a.queryArguments = { [i]: { path: `parameters.${i}` } }), {
1611
+ let i = Q(r, "by"), a = { ...e.properties }, o = Q(r, "query");
1612
+ return o && (a.query = o), !Q(e, "route") && Q(r, "route") && (a.route = r.properties.route), i && (a.by = i, a.queryArguments = { [i]: { path: `parameters.${i}` } }), {
1556
1613
  ...e,
1557
1614
  properties: a
1558
1615
  };
1559
1616
  }
1560
- function qn(e, t) {
1617
+ function tr(e, t) {
1561
1618
  if (e.componentName !== "core:action" || !Array.isArray(e.properties?.alternatives) || !t || t.properties?.isCollection === !0 || e.properties.itemQuery !== void 0) return e;
1562
- let n = { ...e.properties }, r = $(t, "query"), i = $(t, "by");
1563
- return r && (n.itemQuery = r), $(t, "route") && (n.itemRoute = t.properties.route), n.itemArguments = i ? { [i]: { path: `parameters.${i}` } } : {}, {
1619
+ let n = { ...e.properties }, r = Q(t, "query"), i = Q(t, "by");
1620
+ return r && (n.itemQuery = r), Q(t, "route") && (n.itemRoute = t.properties.route), n.itemArguments = i ? { [i]: { path: `parameters.${i}` } } : {}, {
1564
1621
  ...e,
1565
1622
  properties: n
1566
1623
  };
1567
1624
  }
1568
- function $(e, t) {
1625
+ function Q(e, t) {
1569
1626
  let n = e.properties?.[t];
1570
1627
  return typeof n == "string" && n.length > 0 ? n : void 0;
1571
1628
  }
1572
1629
  //#endregion
1573
1630
  //#region src/stageSlices.ts
1574
- function Jn(e) {
1575
- return (t) => Mt(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0).map((e) => ({
1631
+ function nr(e) {
1632
+ return (t) => Bt(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0).map((e) => ({
1576
1633
  name: e.name,
1577
1634
  type: e.type === "text" || e.type === void 0 ? "string" : e.type,
1578
- label: Yn(e.name),
1635
+ label: rr(e.name),
1579
1636
  required: e.required
1580
1637
  }));
1581
1638
  }
1582
- function Yn(e) {
1639
+ function rr(e) {
1583
1640
  return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase());
1584
1641
  }
1585
- function Xn(e, t, n) {
1642
+ function ir(e, t, n) {
1586
1643
  return { invoke: async (r, i, a) => {
1587
1644
  let o = a ?? r.slice(r.lastIndexOf(".") + 1);
1588
- if (!G(o)) return {
1645
+ if (!W(o)) return {
1589
1646
  succeeded: !1,
1590
1647
  message: t ? `The modeled command “${o}” is not registered by this Stage.` : `The modeled command “${o}” is waiting for Stage routes.`
1591
1648
  };
@@ -1603,15 +1660,15 @@ function Xn(e, t, n) {
1603
1660
  }
1604
1661
  //#endregion
1605
1662
  //#region src/App.tsx
1606
- function Zn(e = {}) {
1607
- return pn({
1663
+ function ar(e = {}) {
1664
+ return xn({
1608
1665
  ...e,
1609
- ...tn,
1610
- ...kn
1666
+ ...un,
1667
+ ...Ln
1611
1668
  });
1612
1669
  }
1613
- function Qn(e, t) {
1614
- return M(`form-${e}-${t.name}`, Gt, {
1670
+ function or(e, t) {
1671
+ return N(`form-${e}-${t.name}`, $t, {
1615
1672
  command: t.forCommand,
1616
1673
  label: t.name,
1617
1674
  generationMode: t.generationMode,
@@ -1619,43 +1676,43 @@ function Qn(e, t) {
1619
1676
  fields: t.fields
1620
1677
  });
1621
1678
  }
1622
- function $n(e, t) {
1679
+ function sr(e, t) {
1623
1680
  let n = e.screens[0];
1624
- return pe(e, n, {
1625
- profile: dn(e.uiProfiles),
1626
- blueprintTemplates: t?.length ? [...me, ...t] : void 0
1681
+ return fe(e, n, {
1682
+ profile: yn(e.uiProfiles),
1683
+ blueprintTemplates: t?.length ? [...pe, ...t] : void 0
1627
1684
  });
1628
1685
  }
1629
- function er(e, t, n, r, i, a, o = !0) {
1630
- let s = zn(e.navigation), c = e.navigation?.application.logo ? {
1686
+ function $(e, t, n, r, i, a, o = !0) {
1687
+ let s = qn(e.navigation), c = e.navigation?.application.logo ? {
1631
1688
  title: e.navigation.application.logo.title,
1632
1689
  image: e.navigation.application.logo.image || void 0
1633
1690
  } : void 0;
1634
1691
  return {
1635
- profile: dn(e.uiProfiles),
1636
- catalog: mn(r),
1637
- blueprintTemplates: a?.length ? [...me, ...a] : void 0,
1638
- chrome: (r, i) => i === A.FullPageShell ? { [j.ConfigPanel]: _n(e.screens, r.name, t, n, c, s, o)[j.ConfigPanel] } : _n(e.screens, r.name, t, n, c, s, o),
1639
- form: Qn,
1640
- trailing: [M("activity", xn)],
1692
+ profile: yn(e.uiProfiles),
1693
+ catalog: Sn(r),
1694
+ blueprintTemplates: a?.length ? [...pe, ...a] : void 0,
1695
+ chrome: (r, i) => i === j.FullPageShell ? { [M.ConfigPanel]: Tn(e.screens, r.name, t, n, c, s, o)[M.ConfigPanel] } : Tn(e.screens, r.name, t, n, c, s, o),
1696
+ form: or,
1697
+ trailing: [N("activity", kn)],
1641
1698
  decorate: (e) => {
1642
- let t = Wn(e);
1699
+ let t = Qn(e);
1643
1700
  return i ? v(t, i) : t;
1644
1701
  }
1645
1702
  };
1646
1703
  }
1647
- function tr(e, t, n, r, i, a) {
1648
- return le(e, t, er(e, n, r, i, void 0, a)).element;
1704
+ function cr(e, t, n, r, i, a) {
1705
+ return ce(e, t, $(e, n, r, i, void 0, a)).element;
1649
1706
  }
1650
- function nr() {
1707
+ function lr() {
1651
1708
  try {
1652
1709
  return globalThis.localStorage ?? null;
1653
1710
  } catch {
1654
1711
  return null;
1655
1712
  }
1656
1713
  }
1657
- function rr({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: o } = {}) {
1658
- let c = I(), l = a(() => Zn(e), [e]), [u, d] = s(), [f, p] = s(""), m = Re(), h = nn();
1714
+ function ur({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: o } = {}) {
1715
+ let c = L(), l = a(() => ar(e), [e]), [u, d] = s(), [f, p] = s(""), m = ze(), h = dn();
1659
1716
  return i(() => {
1660
1717
  let e = new AbortController();
1661
1718
  return c.scene(e.signal).then((e) => d(r?.length ? {
@@ -1664,10 +1721,10 @@ function rr({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
1664
1721
  } : e)).catch((t) => {
1665
1722
  e.signal.aborted || p(t instanceof Error ? t.message : String(t));
1666
1723
  }), () => e.abort();
1667
- }, [c, r]), f ? /* @__PURE__ */ P("main", {
1724
+ }, [c, r]), f ? /* @__PURE__ */ F("main", {
1668
1725
  className: "stage-message",
1669
- children: [/* @__PURE__ */ N("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ N("p", { children: f })]
1670
- }) : u ? /* @__PURE__ */ N(ir, {
1726
+ children: [/* @__PURE__ */ P("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ P("p", { children: f })]
1727
+ }) : u ? /* @__PURE__ */ P(dr, {
1671
1728
  scene: u,
1672
1729
  registry: l,
1673
1730
  routeState: m,
@@ -1675,21 +1732,21 @@ function rr({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
1675
1732
  packageCatalog: t,
1676
1733
  screenTemplates: n,
1677
1734
  isVisible: o
1678
- }) : /* @__PURE__ */ N("main", {
1735
+ }) : /* @__PURE__ */ P("main", {
1679
1736
  className: "stage-message",
1680
- children: /* @__PURE__ */ N("h1", { children: "Preparing the Stage" })
1737
+ children: /* @__PURE__ */ P("h1", { children: "Preparing the Stage" })
1681
1738
  });
1682
1739
  }
1683
- function ir({ scene: e, registry: t, routeState: r, strings: i, packageCatalog: o, screenTemplates: c, isVisible: l }) {
1684
- let u = a(() => E(), []), [d, f] = s(Ln), p = e.screens[0]?.name ?? "", m = a(() => dn(e.uiProfiles), [e]), h = a(() => p ? $n(e, c) : void 0, [
1740
+ function dr({ scene: e, registry: t, routeState: r, strings: i, packageCatalog: o, screenTemplates: c, isVisible: l }) {
1741
+ let u = a(() => ne(), []), [d, f] = s(Gn), p = e.screens[0]?.name ?? "", m = a(() => yn(e.uiProfiles), [e]), h = a(() => p ? sr(e, c) : void 0, [
1685
1742
  e,
1686
1743
  c,
1687
1744
  p
1688
- ]), g = a(() => h ? Nn(m, h) : [], [m, h]), _ = a(() => h ? Mn(m, h, d) : void 0, [
1745
+ ]), g = a(() => h ? Vn(m, h) : [], [m, h]), _ = a(() => h ? Bn(m, h, d) : void 0, [
1689
1746
  m,
1690
1747
  h,
1691
1748
  d
1692
- ]), v = a(() => Fn(fe, _?.accent), [_?.accent]), y = _?.showFooter ?? !0, b = a(() => er(e, i.locales, i.locale, o, i.dictionary, c, y), [
1749
+ ]), v = a(() => Un(de, _?.accent), [_?.accent]), y = _?.showFooter ?? !0, b = a(() => $(e, i.locales, i.locale, o, i.dictionary, c, y), [
1693
1750
  e,
1694
1751
  i.locales,
1695
1752
  i.locale,
@@ -1697,25 +1754,25 @@ function ir({ scene: e, registry: t, routeState: r, strings: i, packageCatalog:
1697
1754
  o,
1698
1755
  c,
1699
1756
  y
1700
- ]), x = n((e) => f(e), []), ee = a(() => Hn(e, l), [e, l]), S = e;
1701
- return p ? g.length > 0 ? /* @__PURE__ */ P("main", {
1757
+ ]), x = n((e) => f(e), []), S = a(() => Xn(e, l), [e, l]), C = e;
1758
+ return p ? g.length > 0 ? /* @__PURE__ */ F("main", {
1702
1759
  className: "stage-message",
1703
1760
  role: "alert",
1704
1761
  "data-stage-startup-problem": "root-template",
1705
1762
  children: [
1706
- /* @__PURE__ */ N("h1", { children: "Unable to start this Stage" }),
1707
- /* @__PURE__ */ N("p", { children: "The ui profile's root template cannot be the application's shell." }),
1708
- /* @__PURE__ */ N("ul", { children: g.map((e) => /* @__PURE__ */ N("li", { children: e }, e)) })
1763
+ /* @__PURE__ */ P("h1", { children: "Unable to start this Stage" }),
1764
+ /* @__PURE__ */ P("p", { children: "The ui profile's root template cannot be the application's shell." }),
1765
+ /* @__PURE__ */ P("ul", { children: g.map((e) => /* @__PURE__ */ P("li", { children: e }, e)) })
1709
1766
  ]
1710
- }) : /* @__PURE__ */ N(oe, {
1711
- application: S,
1767
+ }) : /* @__PURE__ */ P(ae, {
1768
+ application: C,
1712
1769
  composition: b,
1713
- navigationModel: ee,
1770
+ navigationModel: S,
1714
1771
  registry: t,
1715
1772
  initialScreen: p,
1716
1773
  history: u,
1717
- layoutConfigStorage: nr(),
1718
- scope: (t, n) => /* @__PURE__ */ N(ar, {
1774
+ layoutConfigStorage: lr(),
1775
+ scope: (t, n) => /* @__PURE__ */ P(fr, {
1719
1776
  scene: e,
1720
1777
  routeState: r,
1721
1778
  strings: i,
@@ -1725,24 +1782,24 @@ function ir({ scene: e, registry: t, routeState: r, strings: i, packageCatalog:
1725
1782
  onSystemSchemeChange: x,
1726
1783
  children: n
1727
1784
  }),
1728
- renderScreen: (e, n) => /* @__PURE__ */ N(sr, {
1785
+ renderScreen: (e, n) => /* @__PURE__ */ P(mr, {
1729
1786
  element: e,
1730
1787
  configuration: n,
1731
1788
  registry: t
1732
1789
  }),
1733
- renderDialogTemplate: (e, n, r) => /* @__PURE__ */ N(cr, {
1790
+ renderDialogTemplate: (e, n, r) => /* @__PURE__ */ P(hr, {
1734
1791
  template: e,
1735
1792
  content: n,
1736
1793
  registry: t,
1737
1794
  strings: i,
1738
1795
  close: () => r.closeDialog()
1739
1796
  })
1740
- }) : /* @__PURE__ */ P("main", {
1797
+ }) : /* @__PURE__ */ F("main", {
1741
1798
  className: "stage-message",
1742
- children: [/* @__PURE__ */ N("h1", { children: "Nothing to show yet" }), /* @__PURE__ */ N("p", { children: "This model has no slice carrying a command or a read model, so there is no screen to render." })]
1799
+ 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." })]
1743
1800
  });
1744
1801
  }
1745
- function ar({ scene: e, routeState: t, strings: n, navigation: r, themes: a, shellSettings: o, onSystemSchemeChange: c, children: u }) {
1802
+ function fr({ scene: e, routeState: t, strings: n, navigation: r, themes: a, shellSettings: o, onSystemSchemeChange: c, children: u }) {
1746
1803
  let [d, f] = s(""), { navigate: p } = r;
1747
1804
  return i(() => f(""), [r.currentScreen, r.currentDialog]), i(() => {
1748
1805
  let e = (e) => {
@@ -1759,22 +1816,22 @@ function ar({ scene: e, routeState: t, strings: n, navigation: r, themes: a, she
1759
1816
  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.`));
1760
1817
  };
1761
1818
  return globalThis.addEventListener("cratis.scene.navigate", t), () => globalThis.removeEventListener("cratis.scene.navigate", t);
1762
- }, [p, e]), /* @__PURE__ */ P(se, {
1819
+ }, [p, e]), /* @__PURE__ */ F(oe, {
1763
1820
  themes: a,
1764
1821
  children: [
1765
- o && /* @__PURE__ */ N(Rn, {
1822
+ o && /* @__PURE__ */ P(Kn, {
1766
1823
  settings: o,
1767
1824
  onSystemSchemeChange: c
1768
1825
  }),
1769
- /* @__PURE__ */ N(On, {}),
1770
- /* @__PURE__ */ N(Qe, {
1826
+ /* @__PURE__ */ P(In, {}),
1827
+ /* @__PURE__ */ P(et, {
1771
1828
  routes: t.routes,
1772
1829
  routesReady: t.ready,
1773
1830
  parameters: r.currentParameters,
1774
1831
  locale: n.locale,
1775
1832
  locales: n.locales,
1776
1833
  screen: r.primaryScreen ?? e.screens[0]?.name ?? "",
1777
- children: /* @__PURE__ */ N(or, {
1834
+ children: /* @__PURE__ */ P(pr, {
1778
1835
  activity: d,
1779
1836
  routesReady: t.ready,
1780
1837
  scene: e,
@@ -1786,14 +1843,14 @@ function ar({ scene: e, routeState: t, strings: n, navigation: r, themes: a, she
1786
1843
  ]
1787
1844
  });
1788
1845
  }
1789
- function or({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: o }) {
1790
- let s = V(), c = ie(), u = ft(), d = a(() => Xn(u, t, s.refreshAfterCommand), [
1846
+ function pr({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: o }) {
1847
+ let s = V(), c = re(), u = bt(), d = a(() => ir(u, t, s.refreshAfterCommand), [
1791
1848
  u,
1792
1849
  t,
1793
1850
  s.refreshAfterCommand
1794
- ]), f = a(() => Jn(n.commandSchemas), [n.commandSchemas]), p = T({
1851
+ ]), f = a(() => nr(n.commandSchemas), [n.commandSchemas]), p = D({
1795
1852
  executeCommand: async (e, n) => {
1796
- let i = G(e);
1853
+ let i = W(e);
1797
1854
  if (!i && !t) return r(`The modeled command “${e}” is waiting for Stage routes.`), {
1798
1855
  isSuccess: !1,
1799
1856
  validationErrors: []
@@ -1810,7 +1867,7 @@ function or({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
1810
1867
  };
1811
1868
  },
1812
1869
  navigate: (e, t) => {
1813
- n.screens.some((t) => t.name === e) ? Y(e, Rt(t)) : r(`The modeled screen “${e}” is not available.`);
1870
+ n.screens.some((t) => t.name === e) ? J(e, Kt(t)) : r(`The modeled screen “${e}” is not available.`);
1814
1871
  },
1815
1872
  navigateBack: () => globalThis.history?.back(),
1816
1873
  openDialog: async (e) => {
@@ -1827,18 +1884,18 @@ function or({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
1827
1884
  refreshQuery: async (e) => s.refreshQuery(e),
1828
1885
  raise: async (e) => r(`The modeled trigger “${e}” is not available in this Stage runtime.`)
1829
1886
  });
1830
- return /* @__PURE__ */ N(bn, {
1887
+ return /* @__PURE__ */ P(On, {
1831
1888
  state: {
1832
1889
  locales: i.locales,
1833
1890
  locale: i.locale,
1834
1891
  setLocale: i.setLocale,
1835
1892
  activity: e
1836
1893
  },
1837
- children: /* @__PURE__ */ N(ne, {
1894
+ children: /* @__PURE__ */ P(ee, {
1838
1895
  invoker: d,
1839
- children: /* @__PURE__ */ N(C, {
1896
+ children: /* @__PURE__ */ P(T, {
1840
1897
  fieldsFor: f,
1841
- children: /* @__PURE__ */ N(ee, {
1898
+ children: /* @__PURE__ */ P(S, {
1842
1899
  dispatcher: p,
1843
1900
  context: {
1844
1901
  resolve: s.resolveBinding,
@@ -1852,34 +1909,34 @@ function or({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
1852
1909
  })
1853
1910
  });
1854
1911
  }
1855
- function sr({ element: e, configuration: t, registry: n }) {
1912
+ function mr({ element: e, configuration: t, registry: n }) {
1856
1913
  let r = V();
1857
- return /* @__PURE__ */ N(S, {
1914
+ return /* @__PURE__ */ P(C, {
1858
1915
  element: e,
1859
1916
  registry: n,
1860
1917
  resolveBinding: r.resolveBinding,
1861
1918
  configuration: t
1862
1919
  });
1863
1920
  }
1864
- function cr({ template: e, content: t, registry: n, strings: r, close: a }) {
1921
+ function hr({ template: e, content: t, registry: n, strings: r, close: a }) {
1865
1922
  let o = V(), s = v(t, r.dictionary);
1866
1923
  return i(() => {
1867
1924
  let e = (e) => {
1868
1925
  e.key === "Escape" && a();
1869
1926
  };
1870
1927
  return globalThis.addEventListener("keydown", e), () => globalThis.removeEventListener("keydown", e);
1871
- }, [a]), /* @__PURE__ */ N("div", {
1928
+ }, [a]), /* @__PURE__ */ P("div", {
1872
1929
  className: "stage-dialog-backdrop",
1873
- children: /* @__PURE__ */ P("section", {
1930
+ children: /* @__PURE__ */ F("section", {
1874
1931
  role: "dialog",
1875
1932
  "aria-modal": "true",
1876
1933
  "aria-label": e.displayName ?? e.name,
1877
1934
  className: "stage-dialog",
1878
- children: [/* @__PURE__ */ N("button", {
1935
+ children: [/* @__PURE__ */ P("button", {
1879
1936
  type: "button",
1880
1937
  onClick: a,
1881
1938
  children: "Close"
1882
- }), /* @__PURE__ */ N(S, {
1939
+ }), /* @__PURE__ */ P(C, {
1883
1940
  element: s,
1884
1941
  registry: n,
1885
1942
  resolveBinding: o.resolveBinding
@@ -1889,9 +1946,9 @@ function cr({ template: e, content: t, registry: n, strings: r, close: a }) {
1889
1946
  }
1890
1947
  //#endregion
1891
1948
  //#region src/stageTheme.ts
1892
- var lr = "[data-scene-color-scheme='dark']", ur = {
1893
- preset: Ne,
1894
- options: { darkModeSelector: lr }
1949
+ var gr = "[data-scene-color-scheme='dark']", _r = {
1950
+ preset: Pe,
1951
+ options: { darkModeSelector: gr }
1895
1952
  };
1896
1953
  //#endregion
1897
- export { rr as App, rr as StageApplication, pt as StageCommandForm, Qe as StageDataProvider, Ut as StageGuardedAction, Le as StageSourceProvider, tr as composeStageScreen, Xn as createStageSliceInvoker, $e as dataChanged, ut as executeRegisteredCommand, G as registeredCommand, Jn as sliceFieldsFrom, Zn as stageApplicationRegistry, er as stageComposition, lr as stageDarkSelector, Fe as stageEndpoints, $n as stageShellOf, ur as stageTheme, Pe as staticStageSource, ft as useStageCommandExecutor, V as useStageData, H as useStageQuery, I as useStageSource };
1954
+ export { ur as App, ur as StageApplication, xt as StageCommandForm, et as StageDataProvider, Zt as StageGuardedAction, Re as StageSourceProvider, cr as composeStageScreen, ir as createStageSliceInvoker, nt as dataChanged, vt as executeRegisteredCommand, W as registeredCommand, nr as sliceFieldsFrom, ar as stageApplicationRegistry, $ as stageComposition, gr as stageDarkSelector, Ie as stageEndpoints, sr as stageShellOf, _r as stageTheme, Fe as staticStageSource, bt as useStageCommandExecutor, V as useStageData, tt as useStageQuery, L as useStageSource };