@cratis/event-models 0.281.1 → 0.281.3

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.
@@ -135,7 +135,7 @@ var ju = (e) => e ? {
135
135
  ], ua = ({ sourceRect: e, initialSize: t, centerOffsetX: n = 0, children: o, renderInspector: i, canClose: r, onClosed: s }) => {
136
136
  const [l, c] = L("entering"), [u, d] = L(() => ju(t)), p = V(u);
137
137
  p.current = u;
138
- const [m, g] = L(!1), [f, v] = L(() => ({
138
+ const [m, f] = L(!1), [g, v] = L(() => ({
139
139
  width: window.innerWidth,
140
140
  height: window.innerHeight
141
141
  }));
@@ -146,7 +146,7 @@ var ju = (e) => e ? {
146
146
  });
147
147
  return window.addEventListener("resize", I), () => window.removeEventListener("resize", I);
148
148
  }, []);
149
- const h = z(() => g((I) => !I), []), k = V(null);
149
+ const h = z(() => f((I) => !I), []), k = V(null);
150
150
  ie(() => {
151
151
  const I = requestAnimationFrame(() => c("visible"));
152
152
  return () => cancelAnimationFrame(I);
@@ -161,7 +161,7 @@ var ju = (e) => e ? {
161
161
  startWidth: u.width,
162
162
  startHeight: u.height
163
163
  }, H.target.setPointerCapture(H.pointerId);
164
- }, y = z((I) => {
164
+ }, w = z((I) => {
165
165
  const H = k.current;
166
166
  if (!H) return;
167
167
  const { direction: te } = H;
@@ -180,7 +180,7 @@ var ju = (e) => e ? {
180
180
  });
181
181
  }, []), S = z(() => {
182
182
  k.current = null;
183
- }, []), w = Fu(u, f, n - (m ? 360 / 2 : 0)), T = w.offsetX, A = {
183
+ }, []), y = Fu(u, g, n - (m ? 360 / 2 : 0)), T = y.offsetX, A = {
184
184
  size: u,
185
185
  setSize: d,
186
186
  isInspectorOpen: m,
@@ -191,7 +191,7 @@ var ju = (e) => e ? {
191
191
  closeWithoutSaving: () => {
192
192
  x(!0);
193
193
  }
194
- }, N = e.left + e.width / 2, C = e.top + e.height / 2, $ = f.width / 2 + T - w.width / 2, _ = f.height / 2 - w.height / 2, R = `${N - $}px ${C - _}px`, F = [
194
+ }, N = e.left + e.width / 2, C = e.top + e.height / 2, $ = g.width / 2 + T - y.width / 2, _ = g.height / 2 - y.height / 2, R = `${N - $}px ${C - _}px`, F = [
195
195
  "prototype-editor-overlay-content",
196
196
  l === "visible" ? "prototype-editor-overlay-content--visible" : "",
197
197
  l === "closing" ? "prototype-editor-overlay-content--closing" : ""
@@ -207,17 +207,17 @@ var ju = (e) => e ? {
207
207
  "data-testid": "studio-screen-editor-frame",
208
208
  style: {
209
209
  transformOrigin: R,
210
- width: w.width,
211
- height: w.height,
212
- marginLeft: -(w.width / 2) + T,
213
- marginTop: -(w.height / 2)
210
+ width: y.width,
211
+ height: y.height,
212
+ marginLeft: -(y.width / 2) + T,
213
+ marginTop: -(y.height / 2)
214
214
  },
215
215
  onClick: (I) => I.stopPropagation(),
216
216
  onPointerDown: (I) => I.stopPropagation(),
217
217
  children: [l === "visible" && Uu.map((I) => /* @__PURE__ */ a("div", {
218
218
  className: `prototype-editor-overlay-resize prototype-editor-overlay-resize--${I}`,
219
219
  onPointerDown: (H) => O(I, H),
220
- onPointerMove: y,
220
+ onPointerMove: w,
221
221
  onPointerUp: S,
222
222
  onPointerCancel: S
223
223
  }, I)), o(A)]
@@ -373,11 +373,11 @@ function Xn(e, t = () => {
373
373
  }
374
374
  var ge = (e, t) => typeof e == "number" ? e : t;
375
375
  function fa(e, t) {
376
- const n = e, o = { ...n.properties ?? {} }, i = sn(e).map((y) => fa(y, t)), r = o[Xu];
376
+ const n = e, o = { ...n.properties ?? {} }, i = sn(e).map((w) => fa(w, t)), r = o[Xu];
377
377
  if (r != null && typeof r == "object") return op(r, n, o, i);
378
- const s = o[Mi], l = typeof o.legacyType == "string" && o.legacyType !== "" ? o[Ai] : void 0, c = l ?? (Jt(e) ? Zu(ha(e)) : t(Ye(e) ? e.componentName : "")), u = Ye(e) ? e.componentName : "", { [Ai]: d, [Mi]: p, [et]: m, [tt]: g, ...f } = o, v = {};
379
- for (const y of s?.topKeys ?? []) y in f && (v[y] = f[y], delete f[y]);
380
- const h = ge(m, s?.position.x ?? 0), k = ge(g, s?.position.y ?? 0), x = n.name ?? "", O = s?.emptyName === !0 && x === (l ?? "");
378
+ const s = o[Mi], l = typeof o.legacyType == "string" && o.legacyType !== "" ? o[Ai] : void 0, c = l ?? (Jt(e) ? Zu(ha(e)) : t(Ye(e) ? e.componentName : "")), u = Ye(e) ? e.componentName : "", { [Ai]: d, [Mi]: p, [et]: m, [tt]: f, ...g } = o, v = {};
379
+ for (const w of s?.topKeys ?? []) w in g && (v[w] = g[w], delete g[w]);
380
+ const h = ge(m, s?.position.x ?? 0), k = ge(f, s?.position.y ?? 0), x = n.name ?? "", O = s?.emptyName === !0 && x === (l ?? "");
381
381
  return {
382
382
  ...np(n, s),
383
383
  ...v,
@@ -386,7 +386,7 @@ function fa(e, t) {
386
386
  ...O ? {} : { name: x },
387
387
  componentName: c ? c.slice(c.lastIndexOf(".") + 1) : ma(u),
388
388
  properties: {
389
- ...f,
389
+ ...g,
390
390
  canvas: {
391
391
  ...s?.canvas ?? {},
392
392
  x: h,
@@ -569,7 +569,7 @@ var ya = ({ ownership: e, label: t }) => e === oe.Local ? null : /* @__PURE__ */
569
569
  children: t
570
570
  });
571
571
  function lp({ row: e, adapter: t, strings: n, isSelected: o, isFocusable: i, dropZone: r, onSelect: s, onToggle: l, onKeyDown: c, onDragStart: u, onDragOver: d, onDrop: p, onDragEnd: m }) {
572
- const g = t.ownershipOf(e.node), f = _t(g, Le.Move) && (t.isMovable?.(e.node) ?? !0), v = t.detailOf?.(e.node), h = t.problemsOf?.(e.node) ?? 0;
572
+ const f = t.ownershipOf(e.node), g = _t(f, Le.Move) && (t.isMovable?.(e.node) ?? !0), v = t.detailOf?.(e.node), h = t.problemsOf?.(e.node) ?? 0;
573
573
  return /* @__PURE__ */ b("li", {
574
574
  role: "treeitem",
575
575
  "aria-level": e.depth + 1,
@@ -577,11 +577,11 @@ function lp({ row: e, adapter: t, strings: n, isSelected: o, isFocusable: i, dro
577
577
  "aria-expanded": e.hasChildren ? e.isExpanded : void 0,
578
578
  tabIndex: i ? 0 : -1,
579
579
  "data-row-id": e.id,
580
- "data-ownership": g,
580
+ "data-ownership": f,
581
581
  "data-drop-zone": r,
582
582
  className: "studio-editor-structure-row",
583
583
  style: { paddingInlineStart: `${e.depth * 16 + 8}px` },
584
- draggable: f,
584
+ draggable: g,
585
585
  onClick: () => s(e.id),
586
586
  onKeyDown: (k) => c(k, e.id),
587
587
  onDragStart: () => u(e.id),
@@ -616,8 +616,8 @@ function lp({ row: e, adapter: t, strings: n, isSelected: o, isFocusable: i, dro
616
616
  children: ["⚠ ", h]
617
617
  }),
618
618
  /* @__PURE__ */ a(ya, {
619
- ownership: g,
620
- label: n.ownership[g]
619
+ ownership: f,
620
+ label: n.ownership[f]
621
621
  })
622
622
  ]
623
623
  });
@@ -629,23 +629,23 @@ var Fi = {
629
629
  ArrowRight: $e.Indent
630
630
  };
631
631
  function wa({ roots: e, adapter: t, strings: n, selectedId: o, onSelect: i, onEdit: r, onRemove: s }) {
632
- const [l, c] = L(() => new Set(e.flatMap((N) => [t.idOf(N), ...t.childrenOf(N).map((C) => t.idOf(C))]))), [u, d] = L(o), [p, m] = L(), [g, f] = L(), [v, h] = L(""), k = j(() => ba(e, l, t), [
632
+ const [l, c] = L(() => new Set(e.flatMap((N) => [t.idOf(N), ...t.childrenOf(N).map((C) => t.idOf(C))]))), [u, d] = L(o), [p, m] = L(), [f, g] = L(), [v, h] = L(""), k = j(() => ba(e, l, t), [
633
633
  e,
634
634
  l,
635
635
  t
636
636
  ]), x = k.some((N) => N.id === u) ? u : k[0]?.id, O = z((N) => c((C) => {
637
637
  const $ = new Set(C);
638
638
  return $.delete(N) || $.add(N), $;
639
- }), []), y = z((N) => {
639
+ }), []), w = z((N) => {
640
640
  if (!N) return;
641
641
  const C = r(N);
642
642
  h(C ? n.rejection[C] : n.moved), !C && N.targetParentId && c(($) => new Set($).add(N.targetParentId));
643
643
  }, [r, n]), S = (N) => {
644
644
  N && (d(N), requestAnimationFrame(() => document.querySelector(`[data-row-id="${CSS.escape(N)}"]`)?.focus()));
645
- }, w = (N, C) => {
645
+ }, y = (N, C) => {
646
646
  const $ = k.findIndex((R) => R.id === C), _ = k[$];
647
647
  if (N.altKey && Fi[N.key]) {
648
- N.preventDefault(), y(rp(e, C, Fi[N.key], t)), S(C);
648
+ N.preventDefault(), w(rp(e, C, Fi[N.key], t)), S(C);
649
649
  return;
650
650
  }
651
651
  if (Bo(N) && s && eo(e, C, t)) {
@@ -681,12 +681,12 @@ function wa({ roots: e, adapter: t, strings: n, selectedId: o, onSelect: i, onEd
681
681
  if (!p) return;
682
682
  N.preventDefault();
683
683
  const $ = N.currentTarget.getBoundingClientRect(), _ = k.find((R) => R.id === C);
684
- f({
684
+ g({
685
685
  id: C,
686
686
  zone: sp(N.clientY - $.top, $.height, !!_ && t.acceptsChildren(_.node))
687
687
  });
688
688
  }, A = (N, C) => {
689
- N.preventDefault(), p && g?.id === C && y(ap(e, p, C, g.zone, t)), m(void 0), f(void 0);
689
+ N.preventDefault(), p && f?.id === C && w(ap(e, p, C, f.zone, t)), m(void 0), g(void 0);
690
690
  };
691
691
  return k.length === 0 ? /* @__PURE__ */ a("p", {
692
692
  className: "studio-editor-structure-empty",
@@ -701,17 +701,17 @@ function wa({ roots: e, adapter: t, strings: n, selectedId: o, onSelect: i, onEd
701
701
  strings: n,
702
702
  isSelected: N.id === o,
703
703
  isFocusable: N.id === x,
704
- dropZone: g?.id === N.id ? g.zone : void 0,
704
+ dropZone: f?.id === N.id ? f.zone : void 0,
705
705
  onSelect: (C) => {
706
706
  d(C), i(C);
707
707
  },
708
708
  onToggle: O,
709
- onKeyDown: w,
709
+ onKeyDown: y,
710
710
  onDragStart: m,
711
711
  onDragOver: T,
712
712
  onDrop: A,
713
713
  onDragEnd: () => {
714
- m(void 0), f(void 0);
714
+ m(void 0), g(void 0);
715
715
  }
716
716
  }, N.id))
717
717
  }), /* @__PURE__ */ a("p", {
@@ -958,7 +958,7 @@ function Uo(e, t, n = []) {
958
958
  var Cp = ({ component: e, descriptor: t, controller: n, environment: o, strings: i, disabled: r }) => {
959
959
  const [s, l] = L([]), { designTime: c, packageDescriptorOf: u } = o.runtime, d = u(t);
960
960
  if ((d.actions ?? []).length === 0) return null;
961
- const p = (h) => un(e, d, n, o, h), m = c.actions(d, p(i.properties.designTimeActions)), g = Uo(d, o, m.map((h) => h.diagnostic)) !== void 0, f = g ? [] : m.flatMap((h) => h.diagnostic ? [h.diagnostic] : []), v = (h, k) => {
961
+ const p = (h) => un(e, d, n, o, h), m = c.actions(d, p(i.properties.designTimeActions)), f = Uo(d, o, m.map((h) => h.diagnostic)) !== void 0, g = f ? [] : m.flatMap((h) => h.diagnostic ? [h.diagnostic] : []), v = (h, k) => {
962
962
  const x = c.runAction(d, h, p(k));
963
963
  l(x.diagnostics);
964
964
  };
@@ -969,13 +969,13 @@ var Cp = ({ component: e, descriptor: t, controller: n, environment: o, strings:
969
969
  m.filter((h) => h.visible).map((h) => /* @__PURE__ */ a("button", {
970
970
  type: "button",
971
971
  disabled: r || !h.enabled,
972
- title: g ? h.descriptor.description : h.diagnostic ?? h.descriptor.description,
972
+ title: f ? h.descriptor.description : h.diagnostic ?? h.descriptor.description,
973
973
  onClick: () => v(h.descriptor.id, h.descriptor.label),
974
974
  children: h.descriptor.label
975
975
  }, h.descriptor.id)),
976
- [...f, ...s].length > 0 && /* @__PURE__ */ a("ul", {
976
+ [...g, ...s].length > 0 && /* @__PURE__ */ a("ul", {
977
977
  className: "studio-editor-properties__action-messages",
978
- children: [.../* @__PURE__ */ new Set([...f, ...s])].map((h) => /* @__PURE__ */ a("li", { children: h }, h))
978
+ children: [.../* @__PURE__ */ new Set([...g, ...s])].map((h) => /* @__PURE__ */ a("li", { children: h }, h))
979
979
  })
980
980
  ]
981
981
  });
@@ -1501,7 +1501,7 @@ var Qp = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
1501
1501
  /* @__PURE__ */ a("legend", { children: u.label }),
1502
1502
  /* @__PURE__ */ b("label", { children: [/* @__PURE__ */ a("span", { children: u.command }), /* @__PURE__ */ b("select", {
1503
1503
  value: d?.id ?? t ?? "",
1504
- onChange: (g) => s(n.find((f) => f.id === g.target.value)),
1504
+ onChange: (f) => s(n.find((g) => g.id === f.target.value)),
1505
1505
  children: [
1506
1506
  /* @__PURE__ */ a("option", {
1507
1507
  value: "",
@@ -1511,10 +1511,10 @@ var Qp = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
1511
1511
  value: t,
1512
1512
  children: t
1513
1513
  }),
1514
- n.map((g) => /* @__PURE__ */ b("option", {
1515
- value: g.id,
1516
- children: [g.name, g.origin.length > 0 ? ` - ${g.origin.join(" / ")}` : ""]
1517
- }, g.id))
1514
+ n.map((f) => /* @__PURE__ */ b("option", {
1515
+ value: f.id,
1516
+ children: [f.name, f.origin.length > 0 ? ` - ${f.origin.join(" / ")}` : ""]
1517
+ }, f.id))
1518
1518
  ]
1519
1519
  })] }),
1520
1520
  m && /* @__PURE__ */ a("p", {
@@ -1651,12 +1651,12 @@ function rm(e, t) {
1651
1651
  var Nt = /* @__PURE__ */ (function(e) {
1652
1652
  return e.Desktop = "desktop", e.Tablet = "tablet", e.Phone = "phone", e;
1653
1653
  })({}), am = ({ templateName: e, environment: t, strings: n, disabled: o, onApply: i, onDiscard: r }) => {
1654
- const [s, l] = L(pt.Populated), [c, u] = L(Nt.Desktop), { bundles: d, profile: p, registry: m, designTime: g } = t.runtime, f = j(() => im(e, s, d, p), [
1654
+ const [s, l] = L(pt.Populated), [c, u] = L(Nt.Desktop), { bundles: d, profile: p, registry: m, designTime: f } = t.runtime, g = j(() => im(e, s, d, p), [
1655
1655
  e,
1656
1656
  s,
1657
1657
  d,
1658
1658
  p
1659
- ]), v = rm(e, g.host.templates);
1659
+ ]), v = rm(e, f.host.templates);
1660
1660
  return /* @__PURE__ */ b("section", {
1661
1661
  className: "studio-editor-template-preview",
1662
1662
  "aria-label": n.preview(e),
@@ -1683,13 +1683,13 @@ var Nt = /* @__PURE__ */ (function(e) {
1683
1683
  className: "studio-editor-template-preview__frame",
1684
1684
  "data-size": c,
1685
1685
  "data-state": s,
1686
- children: f ? /* @__PURE__ */ a(wt, {
1686
+ children: g ? /* @__PURE__ */ a(wt, {
1687
1687
  fallback: /* @__PURE__ */ a("p", {
1688
1688
  role: "alert",
1689
1689
  children: n.previewFailed
1690
1690
  }),
1691
1691
  children: /* @__PURE__ */ a(Ao, {
1692
- element: f,
1692
+ element: g,
1693
1693
  registry: m,
1694
1694
  resolveBinding: () => {
1695
1695
  }
@@ -1819,8 +1819,8 @@ var Nt = /* @__PURE__ */ (function(e) {
1819
1819
  ...c,
1820
1820
  ...t.runtime.bundles.flatMap((h) => h.screenTemplates ?? []),
1821
1821
  ...e.document.screenTemplates
1822
- ].find((h) => h.name === p), g = p !== void 0 && c.some((h) => h.name === p), f = p ? {
1823
- kind: g ? ui.Application : ui.Blueprint,
1822
+ ].find((h) => h.name === p), f = p !== void 0 && c.some((h) => h.name === p), g = p ? {
1823
+ kind: f ? ui.Application : ui.Blueprint,
1824
1824
  id: p
1825
1825
  } : void 0, v = {
1826
1826
  onChoose: (h) => u(h.name),
@@ -1844,7 +1844,7 @@ var Nt = /* @__PURE__ */ (function(e) {
1844
1844
  /* @__PURE__ */ a(Ms, {
1845
1845
  ariaLabel: i.choose,
1846
1846
  applicable: d,
1847
- current: f,
1847
+ current: g,
1848
1848
  currentLabel: p ? m?.displayName ?? p : void 0,
1849
1849
  labels: i.picker,
1850
1850
  handlers: v,
@@ -2066,7 +2066,7 @@ var bm = ({ inspection: e, controller: t, strings: n, disabled: o }) => {
2066
2066
  var ym = ({ location: e, strings: t }) => {
2067
2067
  const n = t.properties.location, [o, i] = L(), [r, s] = L(""), [l, c] = L(), [u, d] = L(!1);
2068
2068
  if (!e) return null;
2069
- const p = o?.featureId ?? e.currentFeatureId, m = o?.path ?? e.path, g = e.features.filter((v) => v.id !== p), f = async () => {
2069
+ const p = o?.featureId ?? e.currentFeatureId, m = o?.path ?? e.path, f = e.features.filter((v) => v.id !== p), g = async () => {
2070
2070
  const v = e.features.find((k) => k.id === r);
2071
2071
  if (!v || !e.move) return;
2072
2072
  d(!0);
@@ -2098,7 +2098,7 @@ var ym = ({ location: e, strings: t }) => {
2098
2098
  children: m.map((v, h) => /* @__PURE__ */ a("li", { children: v }, `${h}:${v}`))
2099
2099
  })]
2100
2100
  }),
2101
- e.move && g.length > 0 && /* @__PURE__ */ b("div", {
2101
+ e.move && f.length > 0 && /* @__PURE__ */ b("div", {
2102
2102
  className: "studio-editor-properties__location-move",
2103
2103
  children: [
2104
2104
  /* @__PURE__ */ b("label", { children: [/* @__PURE__ */ a("span", { children: n.moveTo }), /* @__PURE__ */ b("select", {
@@ -2108,7 +2108,7 @@ var ym = ({ location: e, strings: t }) => {
2108
2108
  children: [/* @__PURE__ */ a("option", {
2109
2109
  value: "",
2110
2110
  children: m.join(" / ")
2111
- }), g.map((v) => /* @__PURE__ */ a("option", {
2111
+ }), f.map((v) => /* @__PURE__ */ a("option", {
2112
2112
  value: v.id,
2113
2113
  children: v.path.join(" / ")
2114
2114
  }, v.id))]
@@ -2117,7 +2117,7 @@ var ym = ({ location: e, strings: t }) => {
2117
2117
  type: "button",
2118
2118
  disabled: u || r === "",
2119
2119
  onClick: () => {
2120
- f();
2120
+ g();
2121
2121
  },
2122
2122
  children: n.move
2123
2123
  }),
@@ -2235,7 +2235,7 @@ function zi(e, t) {
2235
2235
  };
2236
2236
  }
2237
2237
  var zo = ({ registry: e, property: t, context: n, componentId: o, onChange: i, diagnostics: r, presentation: s = "field" }) => {
2238
- const l = s === "popover", { descriptor: c } = t, u = `pe-${o}-${c.path}`.replace(/[^A-Za-z0-9_-]/g, "-"), d = e.resolve(c), p = Ds(t), { editor: m, failed: g } = zi(e, d?.id), { editor: f } = zi(e, p ? "bindingExpression" : void 0), v = n.strings.editors, h = !t.editable || c.readOnly === !0, k = t.editable ? c.readOnly === !0 ? v.readOnly : void 0 : t.reason ?? v.inherited, x = t.effectiveValue, O = Nm(t, r), y = x == null || !pi(c) ? void 0 : Sn(c, x) ?? io(c, x), S = y !== void 0 && Sn(c, x) !== void 0 ? Ls(c, x) : void 0, w = S !== void 0 && Sn(c, S) === void 0, T = ($) => i(t, $), A = p && $s(x), N = c.valueType === "boolean", C = pi(c);
2238
+ const l = s === "popover", { descriptor: c } = t, u = `pe-${o}-${c.path}`.replace(/[^A-Za-z0-9_-]/g, "-"), d = e.resolve(c), p = Ds(t), { editor: m, failed: f } = zi(e, d?.id), { editor: g } = zi(e, p ? "bindingExpression" : void 0), v = n.strings.editors, h = !t.editable || c.readOnly === !0, k = t.editable ? c.readOnly === !0 ? v.readOnly : void 0 : t.reason ?? v.inherited, x = t.effectiveValue, O = Nm(t, r), w = x == null || !pi(c) ? void 0 : Sn(c, x) ?? io(c, x), S = w !== void 0 && Sn(c, x) !== void 0 ? Ls(c, x) : void 0, y = S !== void 0 && Sn(c, S) === void 0, T = ($) => i(t, $), A = p && $s(x), N = c.valueType === "boolean", C = pi(c);
2239
2239
  return /* @__PURE__ */ b("div", {
2240
2240
  className: `studio-editor-field${N ? " studio-editor-field--inline" : ""}`,
2241
2241
  "data-property": c.path,
@@ -2253,14 +2253,14 @@ var zo = ({ registry: e, property: t, context: n, componentId: o, onChange: i, d
2253
2253
  }),
2254
2254
  /* @__PURE__ */ b("div", {
2255
2255
  className: "studio-editor-field__control",
2256
- children: [y !== void 0 ? /* @__PURE__ */ b("div", {
2256
+ children: [w !== void 0 ? /* @__PURE__ */ b("div", {
2257
2257
  className: "studio-editor-structured__mismatch",
2258
2258
  role: "alert",
2259
2259
  children: [
2260
- /* @__PURE__ */ a("p", { children: n.strings.structured.mismatch(c.label, y) }),
2260
+ /* @__PURE__ */ a("p", { children: n.strings.structured.mismatch(c.label, w) }),
2261
2261
  /* @__PURE__ */ a("button", {
2262
2262
  type: "button",
2263
- disabled: h || !w,
2263
+ disabled: h || !y,
2264
2264
  onClick: () => T(S),
2265
2265
  children: n.strings.structured.convert
2266
2266
  }),
@@ -2288,7 +2288,7 @@ var zo = ({ registry: e, property: t, context: n, componentId: o, onChange: i, d
2288
2288
  ...k ? { readOnlyReason: k } : {},
2289
2289
  ...O ? { problem: O } : {}
2290
2290
  })
2291
- }, o) : g ? /* @__PURE__ */ a("p", {
2291
+ }, o) : f ? /* @__PURE__ */ a("p", {
2292
2292
  className: "studio-editor-binding__missing",
2293
2293
  role: "alert",
2294
2294
  children: v.cannotLoad(c.label)
@@ -2300,7 +2300,7 @@ var zo = ({ registry: e, property: t, context: n, componentId: o, onChange: i, d
2300
2300
  className: "studio-editor-structured__undescribed",
2301
2301
  role: "alert",
2302
2302
  children: v.undescribed(c.label)
2303
- }), f && /* @__PURE__ */ a(f, {
2303
+ }), g && /* @__PURE__ */ a(g, {
2304
2304
  id: `${u}-binding`,
2305
2305
  value: t.currentValue,
2306
2306
  onChange: T,
@@ -2895,7 +2895,7 @@ function Ko(e) {
2895
2895
  diagnostics: s
2896
2896
  },
2897
2897
  references: (v) => d?.references?.(v) ?? []
2898
- }, g = o.properties, f = g.editors ?? Oa;
2898
+ }, f = o.properties, g = f.editors ?? Oa;
2899
2899
  return {
2900
2900
  model: t.document,
2901
2901
  ...c && t.selectedId ? { selection: {
@@ -2911,15 +2911,15 @@ function Ko(e) {
2911
2911
  lookups: m,
2912
2912
  strings: {
2913
2913
  editors: e.slotNames ? {
2914
- ...f,
2914
+ ...g,
2915
2915
  renderingSlot: {
2916
- ...f.renderingSlot,
2916
+ ...g.renderingSlot,
2917
2917
  names: e.slotNames
2918
2918
  }
2919
- } : f,
2920
- structured: g.structured ?? xr,
2921
- icon: g.icon,
2922
- iconPicker: g.iconPickerLabels ?? Om.properties.iconPickerLabels ?? {}
2919
+ } : g,
2920
+ structured: f.structured ?? xr,
2921
+ icon: f.icon,
2922
+ iconPicker: f.iconPickerLabels ?? Om.properties.iconPickerLabels ?? {}
2923
2923
  }
2924
2924
  };
2925
2925
  }
@@ -3134,12 +3134,12 @@ var jm = ({ behaviors: e, targets: t, destinations: n, slices: o, strings: i, di
3134
3134
  const l = Mm(e), [c, u] = L(X.None), d = l.kind === X.None ? {
3135
3135
  kind: c,
3136
3136
  target: ""
3137
- } : l, p = Um(d.kind, t, n, o), m = d.target !== "" && !p.some((v) => v.value === d.target), g = (v) => {
3137
+ } : l, p = Um(d.kind, t, n, o), m = d.target !== "" && !p.some((v) => v.value === d.target), f = (v) => {
3138
3138
  u(v), l.kind !== X.None && s(Hi(e, {
3139
3139
  kind: X.None,
3140
3140
  target: ""
3141
3141
  }));
3142
- }, f = (v) => {
3142
+ }, g = (v) => {
3143
3143
  v === "" && l.kind === X.None || (v === "" && u(d.kind), s(Hi(e, {
3144
3144
  kind: d.kind,
3145
3145
  target: v
@@ -3152,7 +3152,7 @@ var jm = ({ behaviors: e, targets: t, destinations: n, slices: o, strings: i, di
3152
3152
  /* @__PURE__ */ a("legend", { children: i.label }),
3153
3153
  /* @__PURE__ */ b("label", { children: [/* @__PURE__ */ a("span", { children: i.onClick }), /* @__PURE__ */ b("select", {
3154
3154
  value: d.kind,
3155
- onChange: (v) => g(v.target.value),
3155
+ onChange: (v) => f(v.target.value),
3156
3156
  children: [
3157
3157
  /* @__PURE__ */ a("option", {
3158
3158
  value: X.None,
@@ -3174,7 +3174,7 @@ var jm = ({ behaviors: e, targets: t, destinations: n, slices: o, strings: i, di
3174
3174
  })] }),
3175
3175
  d.kind !== X.None && /* @__PURE__ */ b("label", { children: [/* @__PURE__ */ a("span", { children: i.target }), /* @__PURE__ */ b("select", {
3176
3176
  value: d.target,
3177
- onChange: (v) => f(v.target.value),
3177
+ onChange: (v) => g(v.target.value),
3178
3178
  children: [
3179
3179
  /* @__PURE__ */ a("option", {
3180
3180
  value: "",
@@ -3463,67 +3463,67 @@ function Ym(e, t) {
3463
3463
  return [n.name, ...o].join(" › ");
3464
3464
  }
3465
3465
  function Yo(e) {
3466
- const { region: t, module: n, navigation: o, structure: i, newId: r, slots: s, startingLabel: l, strings: c } = e, u = Lr(i, o, n, t), d = Jm(o, n, t), p = ml(i, o, { slots: [...s] }), m = (O) => `${n ?? "application"}:${t}:${O}`, g = [], f = (O, y) => {
3467
- const S = O.filter((w) => !w.readOnly);
3468
- O.forEach((w) => {
3469
- const T = rn(d, w.id)?.target ?? (w.target ? {
3470
- module: w.target.module,
3471
- ...w.target.feature ? { feature: w.target.feature } : {}
3472
- } : void 0), A = w.readOnly ? -1 : S.indexOf(w), N = Ym(i, T), C = p.filter(($) => $.entry === m(w.id)).map(($) => ({
3466
+ const { region: t, module: n, navigation: o, structure: i, newId: r, slots: s, startingLabel: l, strings: c } = e, u = Lr(i, o, n, t), d = Jm(o, n, t), p = ml(i, o, { slots: [...s] }), m = (O) => `${n ?? "application"}:${t}:${O}`, f = [], g = (O, w) => {
3467
+ const S = O.filter((y) => !y.readOnly);
3468
+ O.forEach((y) => {
3469
+ const T = rn(d, y.id)?.target ?? (y.target ? {
3470
+ module: y.target.module,
3471
+ ...y.target.feature ? { feature: y.target.feature } : {}
3472
+ } : void 0), A = y.readOnly ? -1 : S.indexOf(y), N = Ym(i, T), C = p.filter(($) => $.entry === m(y.id)).map(($) => ({
3473
3473
  code: $.code,
3474
3474
  message: $.message
3475
3475
  }));
3476
- g.push({
3477
- id: w.id,
3478
- label: w.title,
3476
+ f.push({
3477
+ id: y.id,
3478
+ label: y.title,
3479
3479
  index: A,
3480
3480
  count: S.length,
3481
- ...y ? { parentId: y } : {},
3482
- readOnly: w.readOnly,
3483
- ...w.readOnly ? {
3481
+ ...w ? { parentId: w } : {},
3482
+ readOnly: y.readOnly,
3483
+ ...y.readOnly ? {
3484
3484
  readOnlyReason: Vo,
3485
3485
  origin: c.application
3486
3486
  } : {},
3487
3487
  values: {
3488
3488
  target: T,
3489
- slot: w.slot,
3490
- icon: w.icon,
3491
- children: w.children?.length
3489
+ slot: y.slot,
3490
+ icon: y.icon,
3491
+ children: y.children?.length
3492
3492
  },
3493
3493
  chips: {
3494
3494
  target: N ?? "",
3495
- slot: w.slot === "content" || w.slot === "" ? c.mainArea : w.slot
3495
+ slot: y.slot === "content" || y.slot === "" ? c.mainArea : y.slot
3496
3496
  },
3497
3497
  ...C.length > 0 ? { problems: C } : {},
3498
- unlinked: T === void 0 && !(w.children && w.children.length > 0)
3499
- }), w.children && f(w.children, w.id);
3498
+ unlinked: T === void 0 && !(y.children && y.children.length > 0)
3499
+ }), y.children && g(y.children, y.id);
3500
3500
  });
3501
3501
  };
3502
- f(u.items);
3503
- const v = t, h = (O, y, S, w = {}) => y.rejected ? { rejected: y.rejected } : {
3502
+ g(u.items);
3503
+ const v = t, h = (O, w, S, y = {}) => w.rejected ? { rejected: w.rejected } : {
3504
3504
  label: O,
3505
3505
  edits: [],
3506
- navigationEdits: y.edits,
3506
+ navigationEdits: w.edits,
3507
3507
  ...S ? { select: S } : {},
3508
- ...w
3508
+ ...y
3509
3509
  }, k = (O) => ({ edits: [{
3510
3510
  kind: hi.SetRegionItems,
3511
3511
  ...n !== void 0 ? { module: n } : {},
3512
3512
  region: t,
3513
3513
  items: O
3514
3514
  }] }), x = (O) => {
3515
- const y = r(), S = al(o, n, t, {
3516
- id: y,
3515
+ const w = r(), S = al(o, n, t, {
3516
+ id: w,
3517
3517
  title: l
3518
- }, O), w = S.edits.some((T) => T.kind === hi.SetRegionMode);
3519
- return h("Add", S, { itemId: y }, {
3518
+ }, O), y = S.edits.some((T) => T.kind === hi.SetRegionMode);
3519
+ return h("Add", S, { itemId: w }, {
3520
3520
  renameNext: !0,
3521
- ...w ? { notice: c.extendsNotice } : {}
3521
+ ...y ? { notice: c.extendsNotice } : {}
3522
3522
  });
3523
3523
  };
3524
3524
  return {
3525
3525
  kind: hn.Region,
3526
- items: g,
3526
+ items: f,
3527
3527
  regionTag: {
3528
3528
  text: u.sources.label,
3529
3529
  long: c.tagLong(t, u.sources.label),
@@ -3535,42 +3535,42 @@ function Yo(e) {
3535
3535
  ...u.mode ? { mode: Qm(u.mode) } : {}
3536
3536
  },
3537
3537
  add: (O) => O === M.addItem ? x() : { rejected: O },
3538
- act: (O, y) => {
3538
+ act: (O, w) => {
3539
3539
  switch (O) {
3540
3540
  case M.addSubItem:
3541
- return y.parentId !== void 0 ? { rejected: "subItemOfSubItem" } : x(y.id);
3541
+ return w.parentId !== void 0 ? { rejected: "subItemOfSubItem" } : x(w.id);
3542
3542
  case M.moveEarlier:
3543
3543
  case M.moveLater: {
3544
- const S = y.index + (O === M.moveEarlier ? -1 : 1), w = $t(d, y.id);
3545
- return !w || S < 0 || S >= w.length ? { rejected: "noWhere" } : h("Move", k(Hm(d, y.id, S)), { itemId: y.id });
3544
+ const S = w.index + (O === M.moveEarlier ? -1 : 1), y = $t(d, w.id);
3545
+ return !y || S < 0 || S >= y.length ? { rejected: "noWhere" } : h("Move", k(Hm(d, w.id, S)), { itemId: w.id });
3546
3546
  }
3547
3547
  case M.duplicate: {
3548
- const S = qm(d, y.id, r);
3548
+ const S = qm(d, w.id, r);
3549
3549
  return S.copy ? h("Duplicate", k(S.items), { itemId: S.copy.id }) : { rejected: O };
3550
3550
  }
3551
3551
  case M.delete: {
3552
- const S = $t(d, y.id) ?? [], w = S.findIndex((A) => A.id === y.id), T = S[w + 1] ?? S[w - 1];
3553
- return h("Remove", k(Km(d, y.id)), { itemId: T?.id ?? null });
3552
+ const S = $t(d, w.id) ?? [], y = S.findIndex((A) => A.id === w.id), T = S[y + 1] ?? S[y - 1];
3553
+ return h("Remove", k(Km(d, w.id)), { itemId: T?.id ?? null });
3554
3554
  }
3555
3555
  default:
3556
3556
  return { rejected: O };
3557
3557
  }
3558
3558
  },
3559
- rename: (O, y) => h("Rename", k(Wt(d, O.id, { title: y })), { itemId: O.id }),
3560
- choice: (O, y) => {
3561
- const S = rn(d, y.id);
3559
+ rename: (O, w) => h("Rename", k(Wt(d, O.id, { title: w })), { itemId: O.id }),
3560
+ choice: (O, w) => {
3561
+ const S = rn(d, w.id);
3562
3562
  if (S) {
3563
3563
  if (O === M.target) return {
3564
3564
  property: Mn("target", "Navigate to", "navigationItemTarget", S.target),
3565
- plan: (w) => h("Link", k(Wt(d, y.id, { target: Zm(w) ? w : void 0 })), { itemId: y.id })
3565
+ plan: (y) => h("Link", k(Wt(d, w.id, { target: Zm(y) ? y : void 0 })), { itemId: w.id })
3566
3566
  };
3567
3567
  if (O === M.slot) return {
3568
3568
  property: Mn("slot", "Render into slot", "renderingSlot", S.slot ?? "content"),
3569
- plan: (w) => h("Change", k(Wt(d, y.id, { slot: typeof w == "string" && w !== "content" ? w : void 0 })), { itemId: y.id })
3569
+ plan: (y) => h("Change", k(Wt(d, w.id, { slot: typeof y == "string" && y !== "content" ? y : void 0 })), { itemId: w.id })
3570
3570
  };
3571
3571
  if (O === "icon") return {
3572
3572
  property: Mn("icon", "Icon", "icon", S.icon),
3573
- plan: (w) => h("Change", k(Wt(d, y.id, { icon: typeof w == "string" && w !== "" ? w : void 0 })), { itemId: y.id })
3573
+ plan: (y) => h("Change", k(Wt(d, w.id, { icon: typeof y == "string" && y !== "" ? y : void 0 })), { itemId: w.id })
3574
3574
  };
3575
3575
  }
3576
3576
  },
@@ -3607,29 +3607,29 @@ function Mn(e, t, n, o) {
3607
3607
  }
3608
3608
  var yt = () => globalThis.crypto.randomUUID(), Gi = (e) => typeof e == "string" ? e : "";
3609
3609
  function Xm({ componentId: e, property: t, newId: n, startingLabel: o, startingDestination: i }) {
3610
- const r = t.descriptor.path, s = t.items ?? [], l = s.filter((g) => g.editable), c = new Set(t.operations ?? []), u = {
3610
+ const r = t.descriptor.path, s = t.items ?? [], l = s.filter((f) => f.editable), c = new Set(t.operations ?? []), u = {
3611
3611
  component: e,
3612
3612
  path: r
3613
- }, d = s.map((g) => {
3614
- const f = l.indexOf(g);
3613
+ }, d = s.map((f) => {
3614
+ const g = l.indexOf(f);
3615
3615
  return {
3616
- id: g.id,
3617
- label: Gi(g.values.label) || Gi(g.values.title),
3618
- index: f,
3616
+ id: f.id,
3617
+ label: Gi(f.values.label) || Gi(f.values.title),
3618
+ index: g,
3619
3619
  count: l.length,
3620
- readOnly: !g.editable,
3621
- ...g.editable ? {} : { readOnlyReason: Vo },
3622
- values: g.values,
3623
- unlinked: g.values.destination === void 0 && g.values.target === void 0
3620
+ readOnly: !f.editable,
3621
+ ...f.editable ? {} : { readOnlyReason: Vo },
3622
+ values: f.values,
3623
+ unlinked: f.values.destination === void 0 && f.values.target === void 0
3624
3624
  };
3625
- }), p = (g) => c.has(g), m = (g) => p(g) ? void 0 : { rejected: t.reason ?? g };
3625
+ }), p = (f) => c.has(f), m = (f) => p(f) ? void 0 : { rejected: t.reason ?? f };
3626
3626
  return {
3627
3627
  kind: hn.Collection,
3628
3628
  items: d,
3629
- add: (g) => {
3630
- if (g !== M.addItem) return { rejected: g };
3631
- const f = m(we.Add);
3632
- if (f) return f;
3629
+ add: (f) => {
3630
+ if (f !== M.addItem) return { rejected: f };
3631
+ const g = m(we.Add);
3632
+ if (g) return g;
3633
3633
  const v = t.descriptor.item?.properties.some((k) => k.path === "destination" && k.constraints?.required === !0) === !0;
3634
3634
  if (v && i === void 0) return { rejected: "noDestination" };
3635
3635
  const h = n();
@@ -3651,28 +3651,28 @@ function Xm({ componentId: e, property: t, newId: n, startingLabel: o, startingD
3651
3651
  renameNext: !0
3652
3652
  };
3653
3653
  },
3654
- act: (g, f) => {
3655
- switch (g) {
3654
+ act: (f, g) => {
3655
+ switch (f) {
3656
3656
  case M.moveEarlier:
3657
3657
  case M.moveLater: {
3658
3658
  const v = m(we.Reorder);
3659
3659
  if (v) return v;
3660
- const h = f.index + (g === M.moveEarlier ? -1 : 1);
3660
+ const h = g.index + (f === M.moveEarlier ? -1 : 1);
3661
3661
  return h < 0 || h >= l.length ? { rejected: "noWhere" } : {
3662
3662
  label: "Move",
3663
3663
  edits: [{
3664
3664
  kind: Y.ReorderCollectionItem,
3665
3665
  ...u,
3666
- itemId: f.id,
3666
+ itemId: g.id,
3667
3667
  index: h
3668
3668
  }],
3669
- select: { itemId: f.id }
3669
+ select: { itemId: g.id }
3670
3670
  };
3671
3671
  }
3672
3672
  case M.duplicate: {
3673
3673
  const v = m(we.Add);
3674
3674
  if (v) return v;
3675
- const h = n(), k = s.find((x) => x.id === f.id);
3675
+ const h = n(), k = s.find((x) => x.id === g.id);
3676
3676
  return {
3677
3677
  label: "Duplicate",
3678
3678
  edits: [{
@@ -3682,7 +3682,7 @@ function Xm({ componentId: e, property: t, newId: n, startingLabel: o, startingD
3682
3682
  id: h,
3683
3683
  values: structuredClone(k?.values ?? {})
3684
3684
  },
3685
- index: f.index + 1
3685
+ index: g.index + 1
3686
3686
  }],
3687
3687
  select: { itemId: h }
3688
3688
  };
@@ -3690,31 +3690,31 @@ function Xm({ componentId: e, property: t, newId: n, startingLabel: o, startingD
3690
3690
  case M.delete: {
3691
3691
  const v = m(we.Remove);
3692
3692
  if (v) return v;
3693
- const h = l[f.index + 1] ?? l[f.index - 1];
3693
+ const h = l[g.index + 1] ?? l[g.index - 1];
3694
3694
  return {
3695
3695
  label: "Remove",
3696
3696
  edits: [{
3697
3697
  kind: Y.RemoveCollectionItem,
3698
3698
  ...u,
3699
- itemId: f.id
3699
+ itemId: g.id
3700
3700
  }],
3701
3701
  select: { itemId: h?.id ?? null }
3702
3702
  };
3703
3703
  }
3704
3704
  default:
3705
- return { rejected: g };
3705
+ return { rejected: f };
3706
3706
  }
3707
3707
  },
3708
- rename: (g, f) => m(we.EditFields) ?? {
3708
+ rename: (f, g) => m(we.EditFields) ?? {
3709
3709
  label: "Rename",
3710
3710
  edits: [{
3711
3711
  kind: Y.EditCollectionItem,
3712
3712
  ...u,
3713
- itemId: g.id,
3713
+ itemId: f.id,
3714
3714
  field: "label",
3715
- value: f
3715
+ value: g
3716
3716
  }],
3717
- select: { itemId: g.id }
3717
+ select: { itemId: f.id }
3718
3718
  },
3719
3719
  choice: () => {
3720
3720
  },
@@ -3817,12 +3817,12 @@ var lo = (e) => typeof e == "string" ? e : "", fn = { [M.addButton]: {
3817
3817
  function oh({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i, startingLabel: r, structure: s }) {
3818
3818
  const l = fn[t];
3819
3819
  if (!l) return;
3820
- const c = e.slots?.[l.slot] ?? [], u = c.map((m, g) => {
3821
- const f = m.id, v = m.properties ?? {}, h = n(f) !== oe.Local, k = s ? $a(s, f, v) : void 0;
3820
+ const c = e.slots?.[l.slot] ?? [], u = c.map((m, f) => {
3821
+ const g = m.id, v = m.properties ?? {}, h = n(g) !== oe.Local, k = s ? $a(s, g, v) : void 0;
3822
3822
  return {
3823
- id: f,
3823
+ id: g,
3824
3824
  label: lo(v[l.labelProperty]),
3825
- index: g,
3825
+ index: f,
3826
3826
  count: c.length,
3827
3827
  readOnly: h,
3828
3828
  ...h ? { readOnlyReason: Vo } : {},
@@ -3830,15 +3830,15 @@ function oh({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
3830
3830
  ...v,
3831
3831
  slice: k.slice
3832
3832
  } : v,
3833
- unlinked: k ? !1 : l.isUnlinked(f, v)
3833
+ unlinked: k ? !1 : l.isUnlinked(g, v)
3834
3834
  };
3835
- }), d = ae(e.id), p = (m, g, f) => ({
3836
- label: f,
3835
+ }), d = ae(e.id), p = (m, f, g) => ({
3836
+ label: g,
3837
3837
  edits: [{
3838
3838
  kind: Y.InsertNode,
3839
3839
  target: d,
3840
3840
  slot: l.slot,
3841
- index: g,
3841
+ index: f,
3842
3842
  element: m
3843
3843
  }],
3844
3844
  select: { elementId: m.id }
@@ -3849,42 +3849,42 @@ function oh({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
3849
3849
  add: (m) => {
3850
3850
  if (m !== t) return { rejected: m };
3851
3851
  if (n(e.id) !== oe.Local) return { rejected: "inherited" };
3852
- const g = ue(i(), l.componentName, l.componentName, {
3852
+ const f = ue(i(), l.componentName, l.componentName, {
3853
3853
  ...l.startingProperties,
3854
3854
  [l.labelProperty]: r
3855
3855
  });
3856
3856
  return {
3857
- ...p(g, c.length, "Add"),
3857
+ ...p(f, c.length, "Add"),
3858
3858
  renameNext: !0
3859
3859
  };
3860
3860
  },
3861
- act: (m, g) => {
3862
- const f = c[g.index];
3861
+ act: (m, f) => {
3862
+ const g = c[f.index];
3863
3863
  switch (m) {
3864
3864
  case M.moveEarlier:
3865
3865
  case M.moveLater: {
3866
- const v = g.index + (m === M.moveEarlier ? -1 : 1);
3866
+ const v = f.index + (m === M.moveEarlier ? -1 : 1);
3867
3867
  return v < 0 || v >= c.length ? { rejected: "noWhere" } : {
3868
3868
  label: "Move",
3869
3869
  edits: [{
3870
3870
  kind: Y.MoveNode,
3871
- nodeId: ae(g.id),
3871
+ nodeId: ae(f.id),
3872
3872
  target: d,
3873
3873
  slot: l.slot,
3874
3874
  index: v
3875
3875
  }],
3876
- select: { elementId: g.id }
3876
+ select: { elementId: f.id }
3877
3877
  };
3878
3878
  }
3879
3879
  case M.duplicate:
3880
- return p(nh(f, i), g.index + 1, "Duplicate");
3880
+ return p(nh(g, i), f.index + 1, "Duplicate");
3881
3881
  case M.delete: {
3882
- const v = c[g.index + 1] ?? c[g.index - 1];
3882
+ const v = c[f.index + 1] ?? c[f.index - 1];
3883
3883
  return {
3884
3884
  label: "Remove",
3885
3885
  edits: [{
3886
3886
  kind: Y.RemoveNode,
3887
- nodeId: ae(g.id)
3887
+ nodeId: ae(f.id)
3888
3888
  }],
3889
3889
  select: { elementId: v ? v.id : e.id }
3890
3890
  };
@@ -3893,23 +3893,23 @@ function oh({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
3893
3893
  return { rejected: m };
3894
3894
  }
3895
3895
  },
3896
- rename: (m, g) => {
3897
- const f = o(m.id)?.properties.find((v) => v.descriptor.path === l.labelProperty);
3898
- return f ? {
3896
+ rename: (m, f) => {
3897
+ const g = o(m.id)?.properties.find((v) => v.descriptor.path === l.labelProperty);
3898
+ return g ? {
3899
3899
  label: "Rename",
3900
- edits: [ao(m.id, f, g)],
3900
+ edits: [ao(m.id, g, f)],
3901
3901
  select: { elementId: m.id }
3902
3902
  } : { rejected: "rename" };
3903
3903
  },
3904
- choice: (m, g) => {
3905
- const f = m === M.slice ? "slice" : m === M.emphasis ? "emphasis" : void 0, v = f ? o(g.id)?.properties.find((h) => h.descriptor.path === f) : void 0;
3904
+ choice: (m, f) => {
3905
+ const g = m === M.slice ? "slice" : m === M.emphasis ? "emphasis" : void 0, v = g ? o(f.id)?.properties.find((h) => h.descriptor.path === g) : void 0;
3906
3906
  if (v)
3907
3907
  return {
3908
3908
  property: v,
3909
3909
  plan: (h) => ({
3910
3910
  label: "Change",
3911
- edits: [ao(g.id, v, h)],
3912
- select: { elementId: g.id }
3911
+ edits: [ao(f.id, v, h)],
3912
+ select: { elementId: f.id }
3913
3913
  })
3914
3914
  };
3915
3915
  },
@@ -3940,10 +3940,10 @@ function Ji(e, t, n, o, i) {
3940
3940
  if (!d) return;
3941
3941
  let p;
3942
3942
  if (d.itemsPath !== void 0) {
3943
- const g = s(t.id)?.properties.find((f) => f.descriptor.path === d.itemsPath);
3944
- p = g && Xm({
3943
+ const f = s(t.id)?.properties.find((g) => g.descriptor.path === d.itemsPath);
3944
+ p = f && Xm({
3945
3945
  componentId: t.id,
3946
- property: g,
3946
+ property: f,
3947
3947
  newId: c,
3948
3948
  startingLabel: u.item,
3949
3949
  ...e.startingDestination ? { startingDestination: e.startingDestination } : {}
@@ -3958,7 +3958,7 @@ function Ji(e, t, n, o, i) {
3958
3958
  ...e.structure ? { structure: e.structure } : {}
3959
3959
  }) : p = e.otherSource?.(t, i ? void 0 : o);
3960
3960
  if (!p) return;
3961
- const m = o === void 0 ? void 0 : p.items.find((g) => g.id === o);
3961
+ const m = o === void 0 ? void 0 : p.items.find((f) => f.id === o);
3962
3962
  return {
3963
3963
  componentId: t.id,
3964
3964
  componentName: t.componentName,
@@ -3974,13 +3974,13 @@ function rh({ controller: e, environment: t, strings: n, startingLabels: o, star
3974
3974
  const C = setTimeout(() => p(""), 4e3);
3975
3975
  return () => clearTimeout(C);
3976
3976
  }, [d]);
3977
- const { document: m, composition: g, context: f, selectedId: v, ownershipOf: h, selectedItemId: k, navigation: x, navigationModule: O, structure: y } = e, S = t.navigation?.slots ?? t.propertyEditors?.slots ?? ah, w = z((C) => {
3977
+ const { document: m, composition: f, context: g, selectedId: v, ownershipOf: h, selectedItemId: k, navigation: x, navigationModule: O, structure: w } = e, S = t.navigation?.slots ?? t.propertyEditors?.slots ?? ah, y = z((C) => {
3978
3978
  const $ = gn(C.componentName);
3979
3979
  return $ ? Yo({
3980
3980
  region: $,
3981
3981
  module: O,
3982
3982
  navigation: x,
3983
- structure: y,
3983
+ structure: w,
3984
3984
  newId: yt,
3985
3985
  slots: S,
3986
3986
  startingLabel: o.item,
@@ -3996,35 +3996,35 @@ function rh({ controller: e, environment: t, strings: n, startingLabels: o, star
3996
3996
  }, [
3997
3997
  O,
3998
3998
  x,
3999
- y,
3999
+ w,
4000
4000
  S,
4001
4001
  o,
4002
4002
  n,
4003
4003
  r,
4004
4004
  k
4005
4005
  ]), T = j(() => ih({
4006
- roots: g.roots,
4007
- catalog: f.catalog,
4006
+ roots: f.roots,
4007
+ catalog: g.catalog,
4008
4008
  selectedId: v,
4009
4009
  selectedItemId: k,
4010
4010
  ownershipOf: h,
4011
4011
  newId: yt,
4012
- inspect: (C) => Po(m, ae(C), f),
4012
+ inspect: (C) => Po(m, ae(C), g),
4013
4013
  startingLabels: o,
4014
- structure: y,
4014
+ structure: w,
4015
4015
  ...i ? { startingDestination: i } : {},
4016
- otherSource: w
4016
+ otherSource: y
4017
4017
  }), [
4018
- g,
4019
4018
  f,
4019
+ g,
4020
4020
  v,
4021
4021
  k,
4022
4022
  h,
4023
4023
  m,
4024
4024
  o,
4025
4025
  i,
4026
- y,
4027
- w
4026
+ w,
4027
+ y
4028
4028
  ]), A = e.selectItem, N = z((C, $) => {
4029
4029
  if (Go(C))
4030
4030
  return u(n.announce.refused(C.rejected)), !1;
@@ -4112,7 +4112,7 @@ var Aa = (e) => ({
4112
4112
  editable: r,
4113
4113
  ...s ? { reason: s } : {}
4114
4114
  }), co = ({ controller: e, environment: t, strings: n, region: o, itemId: i }) => {
4115
- const r = (n.designMode ?? mn).navigation, { selection: s, navigation: l, structure: c, navigationModule: u } = e, d = o ? i : e.selectedItemId, p = o ?? (s && "componentName" in s ? gn(String(s.componentName)) : void 0), [m, g] = L(!1), f = j(() => jo(t.availableSources), [t.availableSources]);
4115
+ const r = (n.designMode ?? mn).navigation, { selection: s, navigation: l, structure: c, navigationModule: u } = e, d = o ? i : e.selectedItemId, p = o ?? (s && "componentName" in s ? gn(String(s.componentName)) : void 0), [m, f] = L(!1), g = j(() => jo(t.availableSources), [t.availableSources]);
4116
4116
  if (!p) return null;
4117
4117
  const v = t.navigation?.slots ?? t.propertyEditors?.slots ?? ["content"], h = Yo({
4118
4118
  region: p,
@@ -4130,14 +4130,14 @@ var Aa = (e) => ({
4130
4130
  application: r.application,
4131
4131
  mainArea: "Main area"
4132
4132
  }
4133
- }), k = c.modules.find((I) => I.id === u)?.name ?? u, x = k ?? r.application, O = r.regionName[p], y = d ? h.items.find((I) => I.id === d) : void 0, S = t.propertyEditors?.registry ?? pn, w = Ko({
4133
+ }), k = c.modules.find((I) => I.id === u)?.name ?? u, x = k ?? r.application, O = r.regionName[p], w = d ? h.items.find((I) => I.id === d) : void 0, S = t.propertyEditors?.registry ?? pn, y = Ko({
4134
4134
  controller: e,
4135
4135
  environment: t,
4136
4136
  strings: n,
4137
4137
  ownership: void 0,
4138
4138
  diagnostics: [],
4139
4139
  inCanvas: !1,
4140
- bindingScope: f,
4140
+ bindingScope: g,
4141
4141
  slotNames: Aa(r)
4142
4142
  }), T = h.region?.mode, A = (I, H = !1) => {
4143
4143
  const te = Ur(l, u, p, I, { copy: H });
@@ -4145,38 +4145,38 @@ var Aa = (e) => ({
4145
4145
  }, N = (I) => {
4146
4146
  if (I !== T) {
4147
4147
  if (T === Ee.Inherit && I === Ee.Override) {
4148
- g(!0);
4148
+ f(!0);
4149
4149
  return;
4150
4150
  }
4151
- g(!1), A(I);
4151
+ f(!1), A(I);
4152
4152
  }
4153
- }, C = y ? !y.readOnly : !1, $ = (I) => {
4153
+ }, C = w ? !w.readOnly : !1, $ = (I) => {
4154
4154
  !I || "rejected" in I || I.navigationEdits && e.applyNavigationEdits(I.navigationEdits, I.label);
4155
4155
  }, _ = (I, H) => {
4156
- if (y)
4156
+ if (w)
4157
4157
  switch (I.descriptor.path) {
4158
4158
  case "label":
4159
- typeof H == "string" && H !== "" && $(h.rename(y, H));
4159
+ typeof H == "string" && H !== "" && $(h.rename(w, H));
4160
4160
  break;
4161
4161
  case "target":
4162
- $(h.choice("target", y)?.plan(H));
4162
+ $(h.choice("target", w)?.plan(H));
4163
4163
  break;
4164
4164
  case "slot":
4165
- $(h.choice("slot", y)?.plan(H));
4165
+ $(h.choice("slot", w)?.plan(H));
4166
4166
  break;
4167
4167
  case "icon":
4168
- $(h.choice("icon", y)?.plan(H));
4168
+ $(h.choice("icon", w)?.plan(H));
4169
4169
  }
4170
4170
  }, R = (() => {
4171
- if (!y) return [];
4171
+ if (!w) return [];
4172
4172
  const I = [];
4173
- for (let H = y; ; ) {
4173
+ for (let H = w; ; ) {
4174
4174
  I.unshift(H.label);
4175
4175
  const te = H.parentId ? h.items.find((pe) => pe.id === H.parentId) : void 0;
4176
4176
  if (!te) break;
4177
4177
  H = te;
4178
4178
  }
4179
- return [y.readOnly ? r.application : x, ...I];
4179
+ return [w.readOnly ? r.application : x, ...I];
4180
4180
  })(), F = l.application.logo, G = (I) => {
4181
4181
  const H = Ol(l, u, {
4182
4182
  image: F?.image ?? "",
@@ -4189,14 +4189,14 @@ var Aa = (e) => ({
4189
4189
  className: "studio-editor-properties__navigation",
4190
4190
  "data-region": p,
4191
4191
  "data-scope": u ?? "application",
4192
- children: y ? /* @__PURE__ */ b(re, { children: [
4192
+ children: w ? /* @__PURE__ */ b(re, { children: [
4193
4193
  /* @__PURE__ */ b("header", {
4194
4194
  className: "studio-editor-properties__header",
4195
4195
  children: [
4196
4196
  /* @__PURE__ */ a("strong", { children: r.navigationItem }),
4197
4197
  /* @__PURE__ */ a("span", {
4198
- className: `studio-editor-chip${y.readOnly ? " studio-editor-chip--inherited" : ""}`,
4199
- children: y.readOnly ? r.inheritedReadOnly : r.definedIn(x)
4198
+ className: `studio-editor-chip${w.readOnly ? " studio-editor-chip--inherited" : ""}`,
4199
+ children: w.readOnly ? r.inheritedReadOnly : r.definedIn(x)
4200
4200
  }),
4201
4201
  /* @__PURE__ */ a("span", {
4202
4202
  className: "studio-editor-chip",
@@ -4204,7 +4204,7 @@ var Aa = (e) => ({
4204
4204
  })
4205
4205
  ]
4206
4206
  }),
4207
- y.readOnly && /* @__PURE__ */ a("p", {
4207
+ w.readOnly && /* @__PURE__ */ a("p", {
4208
4208
  className: "studio-editor-callout",
4209
4209
  role: "note",
4210
4210
  children: k ? r.inheritedNote(k) : r.inheritedFromApplication
@@ -4218,24 +4218,24 @@ var Aa = (e) => ({
4218
4218
  R.join(" › ")
4219
4219
  ]
4220
4220
  }),
4221
- y.problems?.map((I) => /* @__PURE__ */ a("p", {
4221
+ w.problems?.map((I) => /* @__PURE__ */ a("p", {
4222
4222
  className: "studio-editor-chip studio-editor-chip--error",
4223
4223
  role: "alert",
4224
4224
  children: r.problems[I.code] ?? I.message
4225
4225
  }, I.code)),
4226
4226
  [
4227
- zt("label", r.label, q.String, "text", y.label, C, r.inheritedFromApplication),
4228
- zt("target", r.navigateTo, q.String, "navigationItemTarget", y.values.target, C, r.inheritedFromApplication),
4229
- zt("slot", r.renderIntoSlot, q.String, "renderingSlot", y.values.slot, C, r.inheritedFromApplication),
4230
- zt("icon", r.icon, q.String, "icon", y.values.icon, C, r.inheritedFromApplication)
4227
+ zt("label", r.label, q.String, "text", w.label, C, r.inheritedFromApplication),
4228
+ zt("target", r.navigateTo, q.String, "navigationItemTarget", w.values.target, C, r.inheritedFromApplication),
4229
+ zt("slot", r.renderIntoSlot, q.String, "renderingSlot", w.values.slot, C, r.inheritedFromApplication),
4230
+ zt("icon", r.icon, q.String, "icon", w.values.icon, C, r.inheritedFromApplication)
4231
4231
  ].map((I) => /* @__PURE__ */ a(zo, {
4232
4232
  registry: S,
4233
4233
  property: I,
4234
- context: w,
4235
- componentId: y.id,
4234
+ context: y,
4235
+ componentId: w.id,
4236
4236
  onChange: _,
4237
4237
  diagnostics: []
4238
- }, `${y.id}-${I.descriptor.path}`))
4238
+ }, `${w.id}-${I.descriptor.path}`))
4239
4239
  ] }) : /* @__PURE__ */ b(re, { children: [
4240
4240
  /* @__PURE__ */ a("header", {
4241
4241
  className: "studio-editor-properties__header",
@@ -4275,7 +4275,7 @@ var Aa = (e) => ({
4275
4275
  autoFocus: !0,
4276
4276
  "data-answer": "copy",
4277
4277
  onClick: () => {
4278
- g(!1), A(Ee.Override, !0);
4278
+ f(!1), A(Ee.Override, !0);
4279
4279
  },
4280
4280
  children: r.copyYes
4281
4281
  }),
@@ -4283,7 +4283,7 @@ var Aa = (e) => ({
4283
4283
  type: "button",
4284
4284
  "data-answer": "empty",
4285
4285
  onClick: () => {
4286
- g(!1), A(Ee.Override);
4286
+ f(!1), A(Ee.Override);
4287
4287
  },
4288
4288
  children: r.copyNo
4289
4289
  })
@@ -4333,7 +4333,7 @@ var Aa = (e) => ({
4333
4333
  }, ch = [gt.Topbar, gt.Sidebar], dh = ({ controller: e, environment: t, strings: n }) => {
4334
4334
  const o = lh, i = (n.designMode ?? mn).navigation, [r, s] = L(gt.Topbar), [l, c] = L(), { navigation: u, structure: d, navigationModule: p } = e;
4335
4335
  if (!t.navigation) return null;
4336
- const m = t.navigation.slots ?? t.propertyEditors?.slots ?? ["content"], g = Yo({
4336
+ const m = t.navigation.slots ?? t.propertyEditors?.slots ?? ["content"], f = Yo({
4337
4337
  region: r,
4338
4338
  module: p,
4339
4339
  navigation: u,
@@ -4349,12 +4349,12 @@ var Aa = (e) => ({
4349
4349
  application: i.application,
4350
4350
  mainArea: "Main area"
4351
4351
  }
4352
- }), f = g.items.find((y) => y.id === l), v = f !== void 0 && !f.readOnly, h = (y) => {
4353
- Go(y) || !y.navigationEdits || e.applyNavigationEdits(y.navigationEdits, y.label).applied && y.select?.itemId !== void 0 && c(y.select.itemId === null ? void 0 : y.select.itemId);
4354
- }, k = (y, S) => h(g.act(y, S)), x = (y) => {
4355
- c(void 0), e.setNavigationModule(y === "" ? void 0 : y);
4356
- }, O = (y) => {
4357
- c(void 0), s(y);
4352
+ }), g = f.items.find((w) => w.id === l), v = g !== void 0 && !g.readOnly, h = (w) => {
4353
+ Go(w) || !w.navigationEdits || e.applyNavigationEdits(w.navigationEdits, w.label).applied && w.select?.itemId !== void 0 && c(w.select.itemId === null ? void 0 : w.select.itemId);
4354
+ }, k = (w, S) => h(f.act(w, S)), x = (w) => {
4355
+ c(void 0), e.setNavigationModule(w === "" ? void 0 : w);
4356
+ }, O = (w) => {
4357
+ c(void 0), s(w);
4358
4358
  };
4359
4359
  return /* @__PURE__ */ b("section", {
4360
4360
  className: "studio-editor-properties__shell-navigation",
@@ -4375,60 +4375,60 @@ var Aa = (e) => ({
4375
4375
  children: [o.level, /* @__PURE__ */ b("select", {
4376
4376
  "data-shell-level": !0,
4377
4377
  value: p ?? "",
4378
- onChange: (y) => x(y.target.value),
4378
+ onChange: (w) => x(w.target.value),
4379
4379
  children: [/* @__PURE__ */ a("option", {
4380
4380
  value: "",
4381
4381
  children: i.application
4382
- }), d.modules.map((y) => /* @__PURE__ */ a("option", {
4383
- value: y.id,
4384
- children: y.name
4385
- }, y.id))]
4382
+ }), d.modules.map((w) => /* @__PURE__ */ a("option", {
4383
+ value: w.id,
4384
+ children: w.name
4385
+ }, w.id))]
4386
4386
  })]
4387
4387
  }),
4388
4388
  /* @__PURE__ */ a("div", {
4389
4389
  role: "tablist",
4390
4390
  "aria-label": o.region,
4391
4391
  className: "studio-editor-properties__tabs",
4392
- children: ch.map((y) => /* @__PURE__ */ a("button", {
4392
+ children: ch.map((w) => /* @__PURE__ */ a("button", {
4393
4393
  type: "button",
4394
4394
  role: "tab",
4395
- "aria-selected": y === r,
4396
- "data-shell-region": y,
4397
- onClick: () => O(y),
4398
- children: i.regionName[y]
4399
- }, y))
4395
+ "aria-selected": w === r,
4396
+ "data-shell-region": w,
4397
+ onClick: () => O(w),
4398
+ children: i.regionName[w]
4399
+ }, w))
4400
4400
  }),
4401
4401
  /* @__PURE__ */ b("p", {
4402
4402
  className: "studio-editor-properties__hint",
4403
4403
  children: [
4404
4404
  /* @__PURE__ */ a("strong", { children: o.items }),
4405
4405
  " ",
4406
- g.regionTag?.long
4406
+ f.regionTag?.long
4407
4407
  ]
4408
4408
  }),
4409
- g.items.length === 0 && /* @__PURE__ */ a("p", {
4409
+ f.items.length === 0 && /* @__PURE__ */ a("p", {
4410
4410
  className: "studio-editor-properties__hint",
4411
4411
  children: o.empty
4412
4412
  }),
4413
4413
  /* @__PURE__ */ a("ul", {
4414
4414
  className: "studio-editor-properties__items",
4415
4415
  "aria-label": o.items,
4416
- children: g.items.map((y) => /* @__PURE__ */ a("li", {
4417
- "data-shell-item": y.id,
4418
- "data-parent": y.parentId,
4419
- "data-read-only": y.readOnly || void 0,
4420
- style: { paddingInlineStart: y.parentId ? "1.5rem" : 0 },
4416
+ children: f.items.map((w) => /* @__PURE__ */ a("li", {
4417
+ "data-shell-item": w.id,
4418
+ "data-parent": w.parentId,
4419
+ "data-read-only": w.readOnly || void 0,
4420
+ style: { paddingInlineStart: w.parentId ? "1.5rem" : 0 },
4421
4421
  children: /* @__PURE__ */ b("button", {
4422
4422
  type: "button",
4423
- "aria-pressed": y.id === l,
4424
- onClick: () => c(y.id === l ? void 0 : y.id),
4423
+ "aria-pressed": w.id === l,
4424
+ onClick: () => c(w.id === l ? void 0 : w.id),
4425
4425
  children: [
4426
- y.label,
4427
- y.readOnly && /* @__PURE__ */ b("em", { children: [" · ", o.inherited] }),
4428
- y.unlinked && /* @__PURE__ */ b("em", { children: [" · ", o.notLinked] })
4426
+ w.label,
4427
+ w.readOnly && /* @__PURE__ */ b("em", { children: [" · ", o.inherited] }),
4428
+ w.unlinked && /* @__PURE__ */ b("em", { children: [" · ", o.notLinked] })
4429
4429
  ]
4430
4430
  })
4431
- }, y.id))
4431
+ }, w.id))
4432
4432
  }),
4433
4433
  /* @__PURE__ */ b("div", {
4434
4434
  role: "toolbar",
@@ -4438,39 +4438,39 @@ var Aa = (e) => ({
4438
4438
  /* @__PURE__ */ a("button", {
4439
4439
  type: "button",
4440
4440
  "data-shell-action": "addItem",
4441
- onClick: () => h(g.add(M.addItem)),
4441
+ onClick: () => h(f.add(M.addItem)),
4442
4442
  children: o.add
4443
4443
  }),
4444
- f && v && f.parentId === void 0 && r === gt.Sidebar && /* @__PURE__ */ a("button", {
4444
+ g && v && g.parentId === void 0 && r === gt.Sidebar && /* @__PURE__ */ a("button", {
4445
4445
  type: "button",
4446
4446
  "data-shell-action": "addSubItem",
4447
- onClick: () => k(M.addSubItem, f),
4447
+ onClick: () => k(M.addSubItem, g),
4448
4448
  children: o.addSub
4449
4449
  }),
4450
- f && v && /* @__PURE__ */ a("button", {
4450
+ g && v && /* @__PURE__ */ a("button", {
4451
4451
  type: "button",
4452
4452
  "data-shell-action": "moveEarlier",
4453
- disabled: f.index <= 0,
4454
- onClick: () => k(M.moveEarlier, f),
4453
+ disabled: g.index <= 0,
4454
+ onClick: () => k(M.moveEarlier, g),
4455
4455
  children: o.earlier
4456
4456
  }),
4457
- f && v && /* @__PURE__ */ a("button", {
4457
+ g && v && /* @__PURE__ */ a("button", {
4458
4458
  type: "button",
4459
4459
  "data-shell-action": "moveLater",
4460
- disabled: f.index >= f.count - 1,
4461
- onClick: () => k(M.moveLater, f),
4460
+ disabled: g.index >= g.count - 1,
4461
+ onClick: () => k(M.moveLater, g),
4462
4462
  children: o.later
4463
4463
  }),
4464
- f && v && /* @__PURE__ */ a("button", {
4464
+ g && v && /* @__PURE__ */ a("button", {
4465
4465
  type: "button",
4466
4466
  "data-shell-action": "duplicate",
4467
- onClick: () => k(M.duplicate, f),
4467
+ onClick: () => k(M.duplicate, g),
4468
4468
  children: o.duplicate
4469
4469
  }),
4470
- f && v && /* @__PURE__ */ a("button", {
4470
+ g && v && /* @__PURE__ */ a("button", {
4471
4471
  type: "button",
4472
4472
  "data-shell-action": "delete",
4473
- onClick: () => k(M.delete, f),
4473
+ onClick: () => k(M.delete, g),
4474
4474
  children: o.remove
4475
4475
  })
4476
4476
  ]
@@ -4480,7 +4480,7 @@ var Aa = (e) => ({
4480
4480
  environment: t,
4481
4481
  strings: n,
4482
4482
  region: r,
4483
- ...f ? { itemId: f.id } : {}
4483
+ ...g ? { itemId: g.id } : {}
4484
4484
  })
4485
4485
  ]
4486
4486
  });
@@ -4502,9 +4502,9 @@ function Qi(e, t) {
4502
4502
  var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e) => /(^|:)toolbar$/.test(String(e.componentName ?? "")), hh = ({ controller: e, strings: t, element: n }) => {
4503
4503
  const o = (t.designMode ?? mn).toolbar, { structure: i } = e, r = ph(n), s = mh(n), l = n.properties ?? {}, c = j(() => {
4504
4504
  if (!r || i.modules.length === 0) return;
4505
- const f = Do(n.id, l);
4506
- if (!f) return;
4507
- const v = Il(new ln(i), f), h = v.slice ? Ia(i).find((k) => k.id === v.slice) : void 0;
4505
+ const g = Do(n.id, l);
4506
+ if (!g) return;
4507
+ const v = Il(new ln(i), g), h = v.slice ? Ia(i).find((k) => k.id === v.slice) : void 0;
4508
4508
  return {
4509
4509
  resolved: v,
4510
4510
  feature: h ? h.path[h.path.length - 1] : void 0
@@ -4530,7 +4530,7 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
4530
4530
  l
4531
4531
  ]);
4532
4532
  if (!r && !s) return null;
4533
- const m = r ? d : u, g = c?.resolved.dialog;
4533
+ const m = r ? d : u, f = c?.resolved.dialog;
4534
4534
  return /* @__PURE__ */ b("section", {
4535
4535
  className: "studio-editor-properties__toolbar-button",
4536
4536
  "data-section": "toolbarButton",
@@ -4545,7 +4545,7 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
4545
4545
  className: "studio-editor-chip",
4546
4546
  "data-chip": "feature",
4547
4547
  children: c.feature
4548
- }), g && /* @__PURE__ */ a("span", {
4548
+ }), f && /* @__PURE__ */ a("span", {
4549
4549
  className: "studio-editor-chip",
4550
4550
  "data-chip": "dialog",
4551
4551
  children: o.opensAsDialog
@@ -4562,11 +4562,11 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
4562
4562
  children: o.upgrade
4563
4563
  })]
4564
4564
  }),
4565
- g && /* @__PURE__ */ a("p", {
4565
+ f && /* @__PURE__ */ a("p", {
4566
4566
  className: "studio-editor-properties__hint",
4567
- "data-dialog": g.template,
4568
- "data-source": g.source,
4569
- children: g.source === "slice" ? o.dialogFromSlice(g.template) : o.dialogDefault(g.template)
4567
+ "data-dialog": f.template,
4568
+ "data-source": f.source,
4569
+ children: f.source === "slice" ? o.dialogFromSlice(f.template) : o.dialogDefault(f.template)
4570
4570
  })
4571
4571
  ] }), /* @__PURE__ */ a(Rr, {
4572
4572
  diagnostics: m,
@@ -4634,7 +4634,7 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
4634
4634
  strings: n
4635
4635
  })
4636
4636
  });
4637
- const p = Es(e.composition.roots, s), m = dp(r.properties, p, l.properties), { runtime: g } = t, f = fh(e.context.catalog.components, r.typeId), v = f ? g.packageDescriptorOf(f) : void 0, h = (R) => !!v && g.designTime.propertyEditor(v, R.descriptor).contribution !== void 0, k = t.propertyEditors?.registry ?? pn, x = [...r.diagnostics, ...e.diagnostics], O = hp(m, r.typeId, (R) => gh.has(R.descriptor.path) || h(R)), y = fp(O), S = {
4637
+ const p = Es(e.composition.roots, s), m = dp(r.properties, p, l.properties), { runtime: f } = t, g = fh(e.context.catalog.components, r.typeId), v = g ? f.packageDescriptorOf(g) : void 0, h = (R) => !!v && f.designTime.propertyEditor(v, R.descriptor).contribution !== void 0, k = t.propertyEditors?.registry ?? pn, x = [...r.diagnostics, ...e.diagnostics], O = hp(m, r.typeId, (R) => gh.has(R.descriptor.path) || h(R)), w = fp(O), S = {
4638
4638
  controller: e,
4639
4639
  environment: t,
4640
4640
  strings: n,
@@ -4643,7 +4643,7 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
4643
4643
  diagnostics: x,
4644
4644
  inCanvas: p,
4645
4645
  bindingScope: u
4646
- }, w = Ko(S), T = r.typeId.endsWith("action"), A = r.typeId.endsWith("toolbarButton"), N = Ca(r.typeId), C = e.document.screens.find((R) => R.name === "Screen")?.forms ?? [], $ = o !== void 0 && o !== "local", _ = l.properties;
4646
+ }, y = Ko(S), T = r.typeId.endsWith("action"), A = r.typeId.endsWith("toolbarButton"), N = Ca(r.typeId), C = e.document.screens.find((R) => R.name === "Screen")?.forms ?? [], $ = o !== void 0 && o !== "local", _ = l.properties;
4647
4647
  return /* @__PURE__ */ b("div", {
4648
4648
  className: "studio-editor-properties",
4649
4649
  children: [
@@ -4689,9 +4689,9 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
4689
4689
  disabled: o !== void 0 && o !== "local",
4690
4690
  authoringTemplate: i
4691
4691
  }),
4692
- f && Ye(l) && /* @__PURE__ */ b(re, { children: [
4692
+ g && Ye(l) && /* @__PURE__ */ b(re, { children: [
4693
4693
  /* @__PURE__ */ a(Ip, {
4694
- descriptor: f,
4694
+ descriptor: g,
4695
4695
  component: l,
4696
4696
  controller: e,
4697
4697
  environment: t,
@@ -4699,14 +4699,14 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
4699
4699
  }),
4700
4700
  /* @__PURE__ */ a(Np, {
4701
4701
  component: l,
4702
- descriptor: f,
4702
+ descriptor: g,
4703
4703
  controller: e,
4704
4704
  environment: t,
4705
4705
  strings: n
4706
4706
  }),
4707
4707
  /* @__PURE__ */ a(Cp, {
4708
4708
  component: l,
4709
- descriptor: f,
4709
+ descriptor: g,
4710
4710
  controller: e,
4711
4711
  environment: t,
4712
4712
  strings: n,
@@ -4714,7 +4714,7 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
4714
4714
  }),
4715
4715
  /* @__PURE__ */ a(Tp, {
4716
4716
  component: l,
4717
- descriptor: f,
4717
+ descriptor: g,
4718
4718
  properties: r.properties.filter((R) => !ka(r.typeId, R.descriptor.path)),
4719
4719
  controller: e,
4720
4720
  environment: t,
@@ -4722,11 +4722,11 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
4722
4722
  disabled: o !== void 0 && o !== "local"
4723
4723
  })
4724
4724
  ] }),
4725
- y.length === 0 && r.properties.length === 0 && /* @__PURE__ */ a("p", {
4725
+ w.length === 0 && r.properties.length === 0 && /* @__PURE__ */ a("p", {
4726
4726
  className: "studio-editor-properties-empty",
4727
4727
  children: c.noProperties
4728
4728
  }),
4729
- y.map((R) => /* @__PURE__ */ b("section", {
4729
+ w.map((R) => /* @__PURE__ */ b("section", {
4730
4730
  className: "studio-editor-properties__group",
4731
4731
  "aria-label": R.name,
4732
4732
  children: [/* @__PURE__ */ a("h4", {
@@ -4735,7 +4735,7 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
4735
4735
  }), R.properties.map((F) => /* @__PURE__ */ a(zo, {
4736
4736
  registry: k,
4737
4737
  property: F,
4738
- context: Rm(w, S, F),
4738
+ context: Rm(y, S, F),
4739
4739
  componentId: s,
4740
4740
  onChange: e.setProperty,
4741
4741
  diagnostics: x
@@ -4921,7 +4921,7 @@ function Th({ entries: e, usage: t, query: n, groups: o, frequentTitle: i }) {
4921
4921
  category: m.category,
4922
4922
  keywords: [...m.keywords]
4923
4923
  }, n)
4924
- }), l = (m) => m.map(s).filter((g) => g.match.matched), c = new Map(e.map((m) => [m.key, m])), u = Sl(t).flatMap((m) => c.get(m) ?? []), d = [], p = l(u);
4924
+ }), l = (m) => m.map(s).filter((f) => f.match.matched), c = new Map(e.map((m) => [m.key, m])), u = Sl(t).flatMap((m) => c.get(m) ?? []), d = [], p = l(u);
4925
4925
  return p.length > 0 && d.push({
4926
4926
  id: La,
4927
4927
  title: i,
@@ -4929,20 +4929,20 @@ function Th({ entries: e, usage: t, query: n, groups: o, frequentTitle: i }) {
4929
4929
  count: p.length,
4930
4930
  expanded: r || (o.frequent ?? !0),
4931
4931
  rows: p
4932
- }), [...new Set(e.map((m) => m.category))].sort((m, g) => {
4933
- const f = (v) => ol.indexOf(v);
4934
- return (f(m) < 0 ? 1e3 : f(m)) - (f(g) < 0 ? 1e3 : f(g)) || m.localeCompare(g);
4935
- }).forEach((m, g) => {
4936
- const f = l(e.filter((h) => h.category === m));
4937
- if (f.length === 0) return;
4938
- const v = o[m] ?? (g === 0 && p.length === 0);
4932
+ }), [...new Set(e.map((m) => m.category))].sort((m, f) => {
4933
+ const g = (v) => ol.indexOf(v);
4934
+ return (g(m) < 0 ? 1e3 : g(m)) - (g(f) < 0 ? 1e3 : g(f)) || m.localeCompare(f);
4935
+ }).forEach((m, f) => {
4936
+ const g = l(e.filter((h) => h.category === m));
4937
+ if (g.length === 0) return;
4938
+ const v = o[m] ?? (f === 0 && p.length === 0);
4939
4939
  d.push({
4940
4940
  id: m,
4941
4941
  title: m,
4942
4942
  frequent: !1,
4943
- count: f.length,
4943
+ count: g.length,
4944
4944
  expanded: r || v,
4945
- rows: f
4945
+ rows: g
4946
4946
  });
4947
4947
  }), d;
4948
4948
  }
@@ -5041,7 +5041,7 @@ var $h = (e) => e.dataTransfer.types.includes(Xo), Ah = {
5041
5041
  viaKeyword: (e, t, n) => `...${e} matches "${t}" via keyword "${n}"`,
5042
5042
  addLabel: (e) => `Add ${e}`
5043
5043
  }, Mh = "★", Fh = ({ entries: e, memory: t, strings: n = Ah, onAdd: o, usageVersion: i = 0 }) => {
5044
- const [r, s] = L(""), [l, c] = L(() => t.readGroups()), u = V(null), d = V(null), p = Js(), m = j(() => ({ ...t.readUsage() }), [t, i]), g = j(() => Th({
5044
+ const [r, s] = L(""), [l, c] = L(() => t.readGroups()), u = V(null), d = V(null), p = Js(), m = j(() => ({ ...t.readUsage() }), [t, i]), f = j(() => Th({
5045
5045
  entries: e,
5046
5046
  usage: m,
5047
5047
  query: r,
@@ -5053,34 +5053,34 @@ var $h = (e) => e.dataTransfer.types.includes(Xo), Ah = {
5053
5053
  r,
5054
5054
  l,
5055
5055
  n.frequentlyUsed
5056
- ]), f = r.trim().length > 0, v = z((w) => {
5057
- f || c((T) => {
5056
+ ]), g = r.trim().length > 0, v = z((y) => {
5057
+ g || c((T) => {
5058
5058
  const A = {
5059
5059
  ...T,
5060
- [w.id]: !w.expanded
5060
+ [y.id]: !y.expanded
5061
5061
  };
5062
5062
  return t.writeGroups(A), A;
5063
5063
  });
5064
- }, [f, t]), h = () => [...d.current?.querySelectorAll("[data-picker-focus]") ?? []], k = (w, T) => {
5065
- const A = h(), N = w ? A.indexOf(w) : -1;
5064
+ }, [g, t]), h = () => [...d.current?.querySelectorAll("[data-picker-focus]") ?? []], k = (y, T) => {
5065
+ const A = h(), N = y ? A.indexOf(y) : -1;
5066
5066
  A[Math.min(Math.max(N + T, 0), A.length - 1)]?.focus();
5067
- }, x = (w) => {
5068
- const T = w.target, A = T === u.current;
5069
- if (w.key === "/" && !A)
5070
- w.preventDefault(), u.current?.focus();
5071
- else if (w.key === "ArrowDown")
5072
- w.preventDefault(), k(A ? null : T, 1);
5073
- else if (w.key === "ArrowUp") {
5074
- w.preventDefault();
5067
+ }, x = (y) => {
5068
+ const T = y.target, A = T === u.current;
5069
+ if (y.key === "/" && !A)
5070
+ y.preventDefault(), u.current?.focus();
5071
+ else if (y.key === "ArrowDown")
5072
+ y.preventDefault(), k(A ? null : T, 1);
5073
+ else if (y.key === "ArrowUp") {
5074
+ y.preventDefault();
5075
5075
  const N = h();
5076
5076
  if (A) return;
5077
5077
  N.indexOf(T) <= 0 ? u.current?.focus() : k(T, -1);
5078
- } else w.key === "Escape" && A && r !== "" && (w.stopPropagation(), s(""));
5079
- }, O = (w, T) => {
5080
- Rh(T, w.payload, w.label), T.currentTarget.closest('[data-cratis-part="toolbar-folder-panel"]')?.setAttribute("data-dragging", "");
5081
- }, y = (w) => {
5082
- w.currentTarget.closest('[data-cratis-part="toolbar-folder-panel"]')?.removeAttribute("data-dragging");
5083
- }, S = Nh(g);
5078
+ } else y.key === "Escape" && A && r !== "" && (y.stopPropagation(), s(""));
5079
+ }, O = (y, T) => {
5080
+ Rh(T, y.payload, y.label), T.currentTarget.closest('[data-cratis-part="toolbar-folder-panel"]')?.setAttribute("data-dragging", "");
5081
+ }, w = (y) => {
5082
+ y.currentTarget.closest('[data-cratis-part="toolbar-folder-panel"]')?.removeAttribute("data-dragging");
5083
+ }, S = Nh(f);
5084
5084
  return /* @__PURE__ */ b("div", {
5085
5085
  ref: d,
5086
5086
  className: "studio-component-picker",
@@ -5098,49 +5098,49 @@ var $h = (e) => e.dataTransfer.types.includes(Xo), Ah = {
5098
5098
  "aria-label": n.filterLabel,
5099
5099
  autoComplete: "off",
5100
5100
  spellCheck: !1,
5101
- onChange: (w) => s(w.target.value)
5101
+ onChange: (y) => s(y.target.value)
5102
5102
  }),
5103
- g.length === 0 && /* @__PURE__ */ a("p", {
5103
+ f.length === 0 && /* @__PURE__ */ a("p", {
5104
5104
  className: "studio-component-picker__empty",
5105
5105
  role: "status",
5106
5106
  children: n.nothingMatches
5107
5107
  }),
5108
5108
  /* @__PURE__ */ a("div", {
5109
5109
  className: "studio-component-picker__groups",
5110
- children: g.map((w) => /* @__PURE__ */ b("section", {
5110
+ children: f.map((y) => /* @__PURE__ */ b("section", {
5111
5111
  className: "studio-component-picker__group",
5112
- "data-group": w.id,
5113
- "data-expanded": w.expanded,
5112
+ "data-group": y.id,
5113
+ "data-expanded": y.expanded,
5114
5114
  children: [/* @__PURE__ */ b("button", {
5115
5115
  type: "button",
5116
5116
  "data-picker-focus": !0,
5117
5117
  className: "studio-component-picker__group-header",
5118
- "aria-expanded": w.expanded,
5119
- "aria-controls": `${p}-${w.id}`,
5120
- onClick: () => v(w),
5118
+ "aria-expanded": y.expanded,
5119
+ "aria-controls": `${p}-${y.id}`,
5120
+ onClick: () => v(y),
5121
5121
  children: [
5122
5122
  /* @__PURE__ */ a("span", {
5123
5123
  className: "studio-component-picker__chevron",
5124
5124
  "aria-hidden": "true",
5125
- children: w.frequent ? /* @__PURE__ */ a("span", {
5125
+ children: y.frequent ? /* @__PURE__ */ a("span", {
5126
5126
  className: "studio-component-picker__star",
5127
5127
  children: Mh
5128
- }) : w.expanded ? "▼" : "▶"
5128
+ }) : y.expanded ? "▼" : "▶"
5129
5129
  }),
5130
5130
  /* @__PURE__ */ a("span", {
5131
5131
  className: "studio-component-picker__group-title",
5132
- children: w.title
5132
+ children: y.title
5133
5133
  }),
5134
5134
  /* @__PURE__ */ a("span", {
5135
5135
  className: "studio-component-picker__count",
5136
- "aria-label": `${w.count}`,
5137
- children: w.count
5136
+ "aria-label": `${y.count}`,
5137
+ children: y.count
5138
5138
  })
5139
5139
  ]
5140
- }), w.expanded && /* @__PURE__ */ a("ul", {
5141
- id: `${p}-${w.id}`,
5140
+ }), y.expanded && /* @__PURE__ */ a("ul", {
5141
+ id: `${p}-${y.id}`,
5142
5142
  className: "studio-component-picker__rows",
5143
- children: w.rows.map(({ entry: T, match: A }) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ b("button", {
5143
+ children: y.rows.map(({ entry: T, match: A }) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ b("button", {
5144
5144
  type: "button",
5145
5145
  "data-picker-focus": !0,
5146
5146
  "data-component": T.key,
@@ -5149,7 +5149,7 @@ var $h = (e) => e.dataTransfer.types.includes(Xo), Ah = {
5149
5149
  title: n.addLabel(T.label),
5150
5150
  onClick: () => o(T),
5151
5151
  onDragStart: (N) => O(T, N),
5152
- onDragEnd: y,
5152
+ onDragEnd: w,
5153
5153
  children: [
5154
5154
  /* @__PURE__ */ a("span", {
5155
5155
  className: "studio-component-picker__badge",
@@ -5173,9 +5173,9 @@ var $h = (e) => e.dataTransfer.types.includes(Xo), Ah = {
5173
5173
  ]
5174
5174
  }) }, T.key))
5175
5175
  })]
5176
- }, w.id))
5176
+ }, y.id))
5177
5177
  }),
5178
- f && g.length > 0 && /* @__PURE__ */ a("p", {
5178
+ g && f.length > 0 && /* @__PURE__ */ a("p", {
5179
5179
  className: "studio-component-picker__note",
5180
5180
  children: n.groupsHint
5181
5181
  }),
@@ -5502,14 +5502,14 @@ var Xh = async (e) => {
5502
5502
  ];
5503
5503
  ie(() => {
5504
5504
  if (!i) return;
5505
- const f = (v) => {
5505
+ const g = (v) => {
5506
5506
  v.key === "Escape" && !v.defaultPrevented && i();
5507
5507
  };
5508
- return globalThis.addEventListener("keydown", f), () => globalThis.removeEventListener("keydown", f);
5508
+ return globalThis.addEventListener("keydown", g), () => globalThis.removeEventListener("keydown", g);
5509
5509
  }, [i]);
5510
- const g = async () => {
5511
- const f = await Xh(p);
5512
- c(f ? "copied" : "failed"), globalThis.open?.(Zh(e, t, n), "_blank", "noopener,noreferrer");
5510
+ const f = async () => {
5511
+ const g = await Xh(p);
5512
+ c(g ? "copied" : "failed"), globalThis.open?.(Zh(e, t, n), "_blank", "noopener,noreferrer");
5513
5513
  };
5514
5514
  return /* @__PURE__ */ a("div", {
5515
5515
  className: `studio-crash studio-crash--${r}`,
@@ -5528,13 +5528,13 @@ var Xh = async (e) => {
5528
5528
  }),
5529
5529
  /* @__PURE__ */ a("dl", {
5530
5530
  className: "studio-crash__facts",
5531
- children: m.filter(([, f]) => f).map(([f, v]) => /* @__PURE__ */ b("div", {
5531
+ children: m.filter(([, g]) => g).map(([g, v]) => /* @__PURE__ */ b("div", {
5532
5532
  className: "studio-crash__fact",
5533
- children: [/* @__PURE__ */ a("dt", { children: f }), /* @__PURE__ */ a("dd", {
5534
- "data-crash-fact": f,
5533
+ children: [/* @__PURE__ */ a("dt", { children: g }), /* @__PURE__ */ a("dd", {
5534
+ "data-crash-fact": g,
5535
5535
  children: v
5536
5536
  })]
5537
- }, f))
5537
+ }, g))
5538
5538
  }),
5539
5539
  /* @__PURE__ */ b("div", {
5540
5540
  className: "studio-crash__actions",
@@ -5562,7 +5562,7 @@ var Xh = async (e) => {
5562
5562
  type: "button",
5563
5563
  "data-crash-action": "report",
5564
5564
  onClick: () => {
5565
- g();
5565
+ f();
5566
5566
  },
5567
5567
  children: s.report
5568
5568
  })
@@ -5745,13 +5745,16 @@ var Qa = ({ environment: e, children: t }) => {
5745
5745
  loader: e.richText,
5746
5746
  children: n
5747
5747
  }) : n;
5748
- }, df = ({ controls: e }) => /* @__PURE__ */ a("div", {
5748
+ }, df = ({ controls: e, title: t }) => /* @__PURE__ */ b("div", {
5749
5749
  className: "studio-window-title-bar",
5750
5750
  role: "toolbar",
5751
- children: /* @__PURE__ */ a("div", {
5751
+ children: [t && /* @__PURE__ */ a("div", {
5752
+ className: "studio-window-title-bar__title",
5753
+ children: t
5754
+ }), /* @__PURE__ */ a("div", {
5752
5755
  className: "studio-window-title-bar__controls",
5753
5756
  children: e
5754
- })
5757
+ })]
5755
5758
  }), uf = ({ strings: e, message: t, onKeepEditing: n, onDiscard: o }) => /* @__PURE__ */ b("div", {
5756
5759
  className: "studio-screen-editor-window__notice",
5757
5760
  role: "alert",
@@ -5939,26 +5942,26 @@ function xf(e, t, n, o = Rf, i = !1) {
5939
5942
  r,
5940
5943
  s,
5941
5944
  l
5942
- ]), u = j(() => gf(t, c).name, [t, c]), d = wf(e, n, u), [p, m] = L(() => o.read(d)), [g, f] = L(() => o.readTemplate(d)), [v, h] = L();
5945
+ ]), u = j(() => gf(t, c).name, [t, c]), d = wf(e, n, u), [p, m] = L(() => o.read(d)), [f, g] = L(() => o.readTemplate(d)), [v, h] = L();
5943
5946
  ie(() => {
5944
- m(o.read(d)), f(o.readTemplate(d)), h(void 0);
5947
+ m(o.read(d)), g(o.readTemplate(d)), h(void 0);
5945
5948
  }, [o, d]);
5946
5949
  const k = Cf(d), x = k && (p ?? kf(d)), O = j(() => x ? vf(t, c) : void 0, [
5947
5950
  x,
5948
5951
  t,
5949
5952
  c
5950
- ]), y = z(() => {
5953
+ ]), w = z(() => {
5951
5954
  const C = !x;
5952
5955
  m(C), h(void 0), o.write(d, C);
5953
5956
  }, [
5954
5957
  x,
5955
5958
  d,
5956
5959
  o
5957
- ]), S = rr(d) && i, w = !rr(d) || (g ?? Sf(d)), T = z(() => {
5958
- const C = !w;
5959
- f(C), o.writeTemplate(d, C);
5960
+ ]), S = rr(d) && i, y = !rr(d) || (f ?? Sf(d)), T = z(() => {
5961
+ const C = !y;
5962
+ g(C), o.writeTemplate(d, C);
5960
5963
  }, [
5961
- w,
5964
+ y,
5962
5965
  d,
5963
5966
  o
5964
5967
  ]), A = z((C) => {
@@ -5967,10 +5970,10 @@ function xf(e, t, n, o = Rf, i = !1) {
5967
5970
  return {
5968
5971
  available: k,
5969
5972
  shown: x,
5970
- toggle: y,
5973
+ toggle: w,
5971
5974
  template: {
5972
5975
  available: S,
5973
- shown: w,
5976
+ shown: y,
5974
5977
  toggle: T
5975
5978
  },
5976
5979
  frame: O,
@@ -6648,7 +6651,7 @@ function jf(e, t, n, o) {
6648
6651
  const s = V(null), l = j(() => ({
6649
6652
  ...r.element,
6650
6653
  properties: ns(e, r.element.componentName, r.element.properties)
6651
- }), [r.element]), c = j(() => $f(e, r.element.componentName, r.element.properties), [r.element]), u = ts.has(Pt(r.element.componentName)), d = e.startsWith(`${Hr}:`), p = d ? void 0 : Xa[Pt(r.element.componentName)], m = d && Pt(r.element.componentName) === "topbar", [g, f] = L(), v = Ff(s, r.element), h = Lf(r), k = Bf(r.element, g !== void 0);
6654
+ }), [r.element]), c = j(() => $f(e, r.element.componentName, r.element.properties), [r.element]), u = ts.has(Pt(r.element.componentName)), d = e.startsWith(`${Hr}:`), p = d ? void 0 : Xa[Pt(r.element.componentName)], m = d && Pt(r.element.componentName) === "topbar", [f, g] = L(), v = Ff(s, r.element), h = Lf(r), k = Bf(r.element, f !== void 0);
6652
6655
  return /* @__PURE__ */ b("span", {
6653
6656
  ref: s,
6654
6657
  "data-studio-element": r.element.id,
@@ -6656,11 +6659,11 @@ function jf(e, t, n, o) {
6656
6659
  "data-studio-sample": c.length > 0 ? c.join(" ") : void 0,
6657
6660
  title: c.length > 0 ? n.sampleContent(c) : void 0,
6658
6661
  children: [/* @__PURE__ */ a(wt, {
6659
- onError: (x) => f(x instanceof Error ? x.message : String(x)),
6662
+ onError: (x) => g(x instanceof Error ? x.message : String(x)),
6660
6663
  fallback: /* @__PURE__ */ a(fo, {
6661
6664
  elementId: r.element.id,
6662
6665
  tone: en.Failed,
6663
- text: n.failedToDraw(h, g ?? "")
6666
+ text: n.failedToDraw(h, f ?? "")
6664
6667
  }),
6665
6668
  children: p ? /* @__PURE__ */ a(Df, {
6666
6669
  kind: p,
@@ -6943,8 +6946,8 @@ function ug(e, t, n) {
6943
6946
  c.current = 0, u.current = void 0, l(void 0), i(void 0);
6944
6947
  }, []), p = V(!1);
6945
6948
  ie(() => {
6946
- const S = (w) => {
6947
- w.key !== "Escape" || !u.current && !c.current && !r.current || (p.current = !0, d());
6949
+ const S = (y) => {
6950
+ y.key !== "Escape" || !u.current && !c.current && !r.current || (p.current = !0, d());
6948
6951
  };
6949
6952
  return window.addEventListener("keydown", S, !0), () => window.removeEventListener("keydown", S, !0);
6950
6953
  }, [d]), ie(() => (window.addEventListener("dragend", d), window.addEventListener("drop", d), () => {
@@ -6952,35 +6955,35 @@ function ug(e, t, n) {
6952
6955
  }), [d]);
6953
6956
  const m = z((S) => {
6954
6957
  u.current = S, l(S);
6955
- }, []), g = (S) => {
6956
- const w = u.current, { region: T } = S.target;
6957
- if (!w || !T.containerId) return;
6958
- const A = T.kind === Pe.Container ? f(T.containerId) : T.index;
6959
- return rg(n.composition.roots, n.adapter, w, T.containerId, A);
6960
- }, f = (S) => {
6961
- const w = [...n.composition.roots];
6962
- for (; w.length > 0; ) {
6963
- const T = w.pop();
6958
+ }, []), f = (S) => {
6959
+ const y = u.current, { region: T } = S.target;
6960
+ if (!y || !T.containerId) return;
6961
+ const A = T.kind === Pe.Container ? g(T.containerId) : T.index;
6962
+ return rg(n.composition.roots, n.adapter, y, T.containerId, A);
6963
+ }, g = (S) => {
6964
+ const y = [...n.composition.roots];
6965
+ for (; y.length > 0; ) {
6966
+ const T = y.pop();
6964
6967
  if (n.adapter.idOf(T) === S) return n.adapter.childrenOf(T).length;
6965
- w.push(...n.adapter.childrenOf(T));
6968
+ y.push(...n.adapter.childrenOf(T));
6966
6969
  }
6967
6970
  return 0;
6968
6971
  }, v = (S) => {
6969
- const w = e.current.getBoundingClientRect(), T = lg(t(), S.clientX - w.left, S.clientY - w.top), A = S.target.closest("[data-scene-id], [data-studio-element]"), N = A?.dataset.sceneId ?? A?.dataset.studioElement, C = !!N && n.ownershipOf(N) !== oe.Local;
6972
+ const y = e.current.getBoundingClientRect(), T = lg(t(), S.clientX - y.left, S.clientY - y.top), A = S.target.closest("[data-scene-id], [data-studio-element]"), N = A?.dataset.sceneId ?? A?.dataset.studioElement, C = !!N && n.ownershipOf(N) !== oe.Local;
6970
6973
  if (!T || C) return { denied: !0 };
6971
6974
  if (uo(S)) {
6972
- const $ = g(T), _ = $ ? n.validateMove($) : ee.NodeNotFound;
6975
+ const $ = f(T), _ = $ ? n.validateMove($) : ee.NodeNotFound;
6973
6976
  if (_ && _ !== ee.NoChange) return { denied: !0 };
6974
6977
  }
6975
6978
  return {
6976
6979
  drop: T,
6977
6980
  denied: !1
6978
6981
  };
6979
- }, h = (S, w) => {
6982
+ }, h = (S, y) => {
6980
6983
  const T = e.current.getBoundingClientRect();
6981
6984
  return {
6982
- left: S.clientX - T.left - w.container.left,
6983
- top: S.clientY - T.top - w.container.top
6985
+ left: S.clientX - T.left - y.container.left,
6986
+ top: S.clientY - T.top - y.container.top
6984
6987
  };
6985
6988
  };
6986
6989
  return {
@@ -6994,17 +6997,17 @@ function ug(e, t, n) {
6994
6997
  },
6995
6998
  onDragOver: (S) => {
6996
6999
  if (!Kt(S) || (S.preventDefault(), p.current)) return;
6997
- const w = v(S);
6998
- S.dataTransfer.dropEffect = w.denied ? "none" : uo(S) ? "move" : "copy", i((T) => dg(T, w) ? T : w);
7000
+ const y = v(S);
7001
+ S.dataTransfer.dropEffect = y.denied ? "none" : uo(S) ? "move" : "copy", i((T) => dg(T, y) ? T : y);
6999
7002
  },
7000
7003
  onDragLeave: (S) => {
7001
7004
  Kt(S) && (c.current = Math.max(0, c.current - 1), c.current === 0 && i(void 0));
7002
7005
  },
7003
7006
  onDrop: (S) => {
7004
7007
  if (!Kt(S)) return;
7005
- const w = _h(S), T = Eh(S), { drop: A, denied: N } = v(S), C = A && w ? g(A) : void 0, $ = p.current;
7008
+ const y = _h(S), T = Eh(S), { drop: A, denied: N } = v(S), C = A && y ? f(A) : void 0, $ = p.current;
7006
7009
  if (S.preventDefault(), d(), p.current = !1, $ || N || !A) return;
7007
- if (w) {
7010
+ if (y) {
7008
7011
  C && n.move(C, h(S, A));
7009
7012
  return;
7010
7013
  }
@@ -7041,16 +7044,16 @@ function mg(e, t, n) {
7041
7044
  const [o, i] = L([]), [r, s] = L(), l = V([]), c = z(() => {
7042
7045
  const d = e.current;
7043
7046
  if (!d) return [];
7044
- const p = d.getBoundingClientRect(), m = (f) => Be(d, f, p), g = {
7047
+ const p = d.getBoundingClientRect(), m = (g) => Be(d, g, p), f = {
7045
7048
  left: 0,
7046
7049
  top: 0,
7047
7050
  width: p.width,
7048
7051
  height: p.height
7049
7052
  };
7050
- return t.flatMap((f) => {
7051
- const v = pg(f, g, m);
7053
+ return t.flatMap((g) => {
7054
+ const v = pg(g, f, m);
7052
7055
  return v ? [{
7053
- region: f,
7056
+ region: g,
7054
7057
  rect: v
7055
7058
  }] : [];
7056
7059
  });
@@ -7058,9 +7061,9 @@ function mg(e, t, n) {
7058
7061
  const d = e.current;
7059
7062
  if (!d) return;
7060
7063
  const p = c();
7061
- l.current = p, i((g) => eg(g, p) ? g : p);
7064
+ l.current = p, i((f) => eg(f, p) ? f : p);
7062
7065
  const m = n ? Be(d, n, d.getBoundingClientRect()) : void 0;
7063
- s((g) => ls(g, m) ? g : m);
7066
+ s((f) => ls(f, m) ? f : m);
7064
7067
  }, [
7065
7068
  e,
7066
7069
  c,
@@ -7157,26 +7160,26 @@ var pr = 'button:not(:disabled), [href], input:not(:disabled), select:not(:disab
7157
7160
  ie(() => ((p.current?.querySelector(pr) ?? p.current)?.focus({ preventScroll: !0 }), () => {
7158
7161
  r.isConnected && r.focus({ preventScroll: !0 });
7159
7162
  }), [r]), ie(() => {
7160
- const f = (v) => {
7163
+ const g = (v) => {
7161
7164
  const h = v.target;
7162
7165
  p.current?.contains(h) || r.contains(h) || d();
7163
7166
  };
7164
- return document.addEventListener("pointerdown", f, !0), () => document.removeEventListener("pointerdown", f, !0);
7167
+ return document.addEventListener("pointerdown", g, !0), () => document.removeEventListener("pointerdown", g, !0);
7165
7168
  }, [r, d]);
7166
- const m = (f) => {
7167
- if (f.key === "Escape") {
7168
- f.preventDefault(), f.stopPropagation(), d();
7169
+ const m = (g) => {
7170
+ if (g.key === "Escape") {
7171
+ g.preventDefault(), g.stopPropagation(), d();
7169
7172
  return;
7170
7173
  }
7171
- if (f.key !== "Tab") return;
7174
+ if (g.key !== "Tab") return;
7172
7175
  const v = Array.from(p.current?.querySelectorAll(pr) ?? []);
7173
7176
  if (v.length === 0) {
7174
- f.preventDefault();
7177
+ g.preventDefault();
7175
7178
  return;
7176
7179
  }
7177
7180
  const h = v[0], k = v[v.length - 1];
7178
- f.shiftKey && document.activeElement === h ? (f.preventDefault(), k.focus()) : !f.shiftKey && document.activeElement === k && (f.preventDefault(), h.focus());
7179
- }, g = Math.max(s.left, Math.min(i.left, s.left + s.width - mr));
7181
+ g.shiftKey && document.activeElement === h ? (g.preventDefault(), k.focus()) : !g.shiftKey && document.activeElement === k && (g.preventDefault(), h.focus());
7182
+ }, f = Math.max(s.left, Math.min(i.left, s.left + s.width - mr));
7180
7183
  return /* @__PURE__ */ a("div", {
7181
7184
  ref: p,
7182
7185
  role: "dialog",
@@ -7185,7 +7188,7 @@ var pr = 'button:not(:disabled), [href], input:not(:disabled), select:not(:disab
7185
7188
  className: "studio-design-popover",
7186
7189
  "data-property": t.descriptor.path,
7187
7190
  style: {
7188
- left: g,
7191
+ left: f,
7189
7192
  top: i.top + i.height + 6,
7190
7193
  width: mr
7191
7194
  },
@@ -7231,16 +7234,16 @@ var hr = [
7231
7234
  [M.duplicate]: /* @__PURE__ */ a(Jc, { "aria-hidden": "true" }),
7232
7235
  [M.delete]: /* @__PURE__ */ a(ed, { "aria-hidden": "true" })
7233
7236
  }, Ig = ({ subject: e, item: t, anchor: n, bounds: o, strings: i, renameToken: r, chipLabel: s, onRename: l, onAction: c, onChoice: u, readOnlyActions: d, onReadOnlyAction: p, onLeave: m }) => {
7234
- const g = V(null), f = V(null), [v, h] = L({
7237
+ const f = V(null), g = V(null), [v, h] = L({
7235
7238
  width: 380,
7236
7239
  height: 100
7237
- }), [k, x] = L(t.label), [O, y] = L(0), S = e.mode.itemToolbar, w = S.some((E) => E.compact === !0), T = S.some((E) => hr.includes(E.id)), A = S.find((E) => E.id === M.rename), N = A && Ut(A, t);
7240
+ }), [k, x] = L(t.label), [O, w] = L(0), S = e.mode.itemToolbar, y = S.some((E) => E.compact === !0), T = S.some((E) => hr.includes(E.id)), A = S.find((E) => E.id === M.rename), N = A && Ut(A, t);
7238
7241
  ie(() => {
7239
7242
  x(t.label);
7240
7243
  }, [t.id, t.label]), ie(() => {
7241
- r === 0 || !f.current || (f.current.focus({ preventScroll: !0 }), f.current.select());
7244
+ r === 0 || !g.current || (g.current.focus({ preventScroll: !0 }), g.current.select());
7242
7245
  }, [r, t.id]), Ce(() => {
7243
- const E = g.current?.getBoundingClientRect();
7246
+ const E = f.current?.getBoundingClientRect();
7244
7247
  E && (Math.round(E.width) !== Math.round(v.width) || Math.round(E.height) !== Math.round(v.height)) && h({
7245
7248
  width: E.width,
7246
7249
  height: E.height
@@ -7262,7 +7265,7 @@ var hr = [
7262
7265
  return;
7263
7266
  }
7264
7267
  R();
7265
- }, I = () => Array.from(g.current?.querySelectorAll("[data-roving]:not(:disabled)") ?? []), H = (E) => {
7268
+ }, I = () => Array.from(f.current?.querySelectorAll("[data-roving]:not(:disabled)") ?? []), H = (E) => {
7266
7269
  if (E.target instanceof HTMLInputElement) return;
7267
7270
  const ne = I(), fe = ne.indexOf(E.target);
7268
7271
  if (fe < 0) return;
@@ -7270,14 +7273,14 @@ var hr = [
7270
7273
  if (je === void 0 || E.altKey) return;
7271
7274
  E.preventDefault();
7272
7275
  const nt = ne[(je + ne.length) % ne.length];
7273
- y(Number(nt.dataset.roving)), nt.focus();
7276
+ w(Number(nt.dataset.roving)), nt.focus();
7274
7277
  }, te = {
7275
- ref: g,
7278
+ ref: f,
7276
7279
  role: "toolbar",
7277
7280
  "aria-label": i.toolbarLabel(t.label),
7278
7281
  className: "studio-design-toolbar",
7279
7282
  "data-side": $.side,
7280
- "data-compact": w ? "true" : void 0,
7283
+ "data-compact": y ? "true" : void 0,
7281
7284
  "data-kind": e.source.kind,
7282
7285
  style: {
7283
7286
  left: $.left,
@@ -7316,7 +7319,7 @@ var hr = [
7316
7319
  ...te,
7317
7320
  children: [
7318
7321
  N?.visible && /* @__PURE__ */ a("input", {
7319
- ref: f,
7322
+ ref: g,
7320
7323
  type: "text",
7321
7324
  className: "studio-design-toolbar__title",
7322
7325
  value: k,
@@ -7470,7 +7473,7 @@ var jn = 34, Eg = ({ surface: e, state: t, controller: n, environment: o, editor
7470
7473
  if (typeof F != "string" || F === "") return;
7471
7474
  const G = o.propertyEditors?.slices?.find((H) => H.id === F) ?? o.stateChangeSlices.find((H) => H.id === F), I = F.split(".");
7472
7475
  return G?.name ?? I[I.length - 1];
7473
- }, [o]), g = z((F, G) => {
7476
+ }, [o]), f = z((F, G) => {
7474
7477
  const I = G.chips?.[F];
7475
7478
  if (I !== void 0 && I !== "") return I;
7476
7479
  switch (F) {
@@ -7483,9 +7486,9 @@ var jn = 34, Eg = ({ surface: e, state: t, controller: n, environment: o, editor
7483
7486
  default:
7484
7487
  return r.notLinked;
7485
7488
  }
7486
- }, [m, r]), f = s?.selected?.parentId !== void 0 && l !== void 0 && l.items[s.selected.id] === void 0, v = s?.selected?.parentId;
7489
+ }, [m, r]), g = s?.selected?.parentId !== void 0 && l !== void 0 && l.items[s.selected.id] === void 0, v = s?.selected?.parentId;
7487
7490
  if (ie(() => {
7488
- if (!f || !v) return;
7491
+ if (!g || !v) return;
7489
7492
  const F = e.current?.querySelector(`[data-scene-nav-item="${CSS.escape(v)}"] > [data-scene-nav-link]`);
7490
7493
  F && (F.focus({ preventScroll: !0 }), F.dispatchEvent(new KeyboardEvent("keydown", {
7491
7494
  key: "ArrowRight",
@@ -7493,16 +7496,16 @@ var jn = 34, Eg = ({ surface: e, state: t, controller: n, environment: o, editor
7493
7496
  cancelable: !0
7494
7497
  })));
7495
7498
  }, [
7496
- f,
7499
+ g,
7497
7500
  v,
7498
7501
  e
7499
7502
  ]), !s || !l) return null;
7500
- const { selected: h, source: k } = s, x = s.mode.addActions[0], O = k.items.flatMap((F) => l.items[F.id] ? [l.items[F.id]] : []), y = O[O.length - 1], S = s.mode.itemToolbar.some((F) => F.compact === !0), w = y ?? l.component, T = w && x ? S || !y ? {
7501
- left: (y ?? w).left,
7502
- top: (y ? y.top + y.height : w.top) + 8
7503
+ const { selected: h, source: k } = s, x = s.mode.addActions[0], O = k.items.flatMap((F) => l.items[F.id] ? [l.items[F.id]] : []), w = O[O.length - 1], S = s.mode.itemToolbar.some((F) => F.compact === !0), y = w ?? l.component, T = y && x ? S || !w ? {
7504
+ left: (w ?? y).left,
7505
+ top: (w ? w.top + w.height : y.top) + 8
7503
7506
  } : {
7504
- left: y.left + y.width + 8,
7505
- top: y.top + (y.height - jn) / 2
7507
+ left: w.left + w.width + 8,
7508
+ top: w.top + (w.height - jn) / 2
7506
7509
  } : void 0, A = h ? l.items[h.id] : void 0, N = c && h && c.itemId === h.id ? k.choice(c.actionId, h) : void 0, C = () => u(void 0), $ = () => Ko({
7507
7510
  controller: n,
7508
7511
  environment: o,
@@ -7540,7 +7543,7 @@ var jn = 34, Eg = ({ surface: e, state: t, controller: n, environment: o, editor
7540
7543
  bounds: l.surface,
7541
7544
  strings: r,
7542
7545
  renameToken: t.renameToken,
7543
- chipLabel: g,
7546
+ chipLabel: f,
7544
7547
  onRename: (F) => t.rename(h, F),
7545
7548
  onAction: (F) => t.act(F, h),
7546
7549
  onChoice: (F, G) => u((I) => I && I.actionId === F && I.itemId === h.id ? void 0 : {
@@ -7609,8 +7612,8 @@ function cs(e, t) {
7609
7612
  });
7610
7613
  }
7611
7614
  var Ag = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height, vr = "content", Mg = (e, t) => e.length === t.length && e.every((n, o) => n.id === t[o].id && n.rect.left === t[o].rect.left && n.rect.top === t[o].rect.top && n.rect.width === t[o].rect.width && n.rect.height === t[o].rect.height), Fg = ({ surface: e, controller: t, strings: n }) => {
7612
- const o = vo(e, z((g, f) => Be(g, "composition", f), []), Ag), { composition: i, context: r, selectedId: s, navigation: l, navigationModule: c, structure: u } = t, d = j(() => cs(i.roots, r.catalog), [i.roots, r.catalog]), p = z((g, f) => d.flatMap((v) => {
7613
- const h = Be(g, v.id, f);
7615
+ const o = vo(e, z((f, g) => Be(f, "composition", g), []), Ag), { composition: i, context: r, selectedId: s, navigation: l, navigationModule: c, structure: u } = t, d = j(() => cs(i.roots, r.catalog), [i.roots, r.catalog]), p = z((f, g) => d.flatMap((v) => {
7616
+ const h = Be(f, v.id, g);
7614
7617
  return h ? [{
7615
7618
  ...v,
7616
7619
  rect: h
@@ -7630,14 +7633,14 @@ var Ag = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
7630
7633
  className: "studio-design-slot__name",
7631
7634
  children: n.slotName(vr)
7632
7635
  })
7633
- }), m?.map(({ id: g, name: f, region: v, rect: h }) => {
7636
+ }), m?.map(({ id: f, name: g, region: v, rect: h }) => {
7634
7637
  if (v) {
7635
7638
  const k = Lr(u, l, c, v).sources;
7636
7639
  return /* @__PURE__ */ a("div", {
7637
7640
  className: "studio-design-region",
7638
7641
  "data-region": v,
7639
- "data-selected": g === s ? "true" : void 0,
7640
- "data-frame-for": g,
7642
+ "data-selected": f === s ? "true" : void 0,
7643
+ "data-frame-for": f,
7641
7644
  "aria-hidden": "true",
7642
7645
  style: {
7643
7646
  left: h.left,
@@ -7651,11 +7654,11 @@ var Ag = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
7651
7654
  title: n.navigation.tagLong(v, k.label),
7652
7655
  children: k.label
7653
7656
  })
7654
- }, g);
7657
+ }, f);
7655
7658
  }
7656
7659
  return /* @__PURE__ */ a("div", {
7657
7660
  className: "studio-design-frame",
7658
- "data-frame-for": g,
7661
+ "data-frame-for": f,
7659
7662
  "aria-hidden": "true",
7660
7663
  style: {
7661
7664
  left: h.left - gr,
@@ -7665,9 +7668,9 @@ var Ag = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
7665
7668
  },
7666
7669
  children: /* @__PURE__ */ a("span", {
7667
7670
  className: "studio-design-frame__name",
7668
- children: f
7671
+ children: g
7669
7672
  })
7670
- }, g);
7673
+ }, f);
7671
7674
  })] });
7672
7675
  }, Lg = Kl(), Gt = () => {
7673
7676
  throw new Error("The screen is being designed; it does not navigate.");
@@ -7690,7 +7693,7 @@ var Ag = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
7690
7693
  closeDialog: Gt,
7691
7694
  closeOutlet: Gt,
7692
7695
  back: Gt
7693
- }, [d, i]), m = t.application.logo, g = j(() => m ? {
7696
+ }, [d, i]), m = t.application.logo, f = j(() => m ? {
7694
7697
  title: m.title,
7695
7698
  locked: n !== void 0,
7696
7699
  lockedReason: o
@@ -7700,8 +7703,8 @@ var Ag = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
7700
7703
  o
7701
7704
  ]);
7702
7705
  if (e.modules.length === 0 && !i) return /* @__PURE__ */ a(re, { children: s });
7703
- const f = /* @__PURE__ */ a(es.Provider, {
7704
- value: g,
7706
+ const g = /* @__PURE__ */ a(es.Provider, {
7707
+ value: f,
7705
7708
  children: /* @__PURE__ */ a(Ul, {
7706
7709
  model: c,
7707
7710
  children: /* @__PURE__ */ a(zl, {
@@ -7713,8 +7716,8 @@ var Ag = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
7713
7716
  });
7714
7717
  return p ? /* @__PURE__ */ a(Wl, {
7715
7718
  value: p,
7716
- children: f
7717
- }) : f;
7719
+ children: g
7720
+ }) : g;
7718
7721
  }, jg = 'button, a[href], [role="button"], [role="radio"], [role="option"], [role="menuitem"]', Ug = (e) => {
7719
7722
  const t = e;
7720
7723
  return !!t && typeof t.closest == "function" && t.closest(jg) !== null;
@@ -7923,9 +7926,9 @@ var ov = () => {
7923
7926
  button: "Button",
7924
7927
  item: "New item"
7925
7928
  }, rv = ({ controller: e, environment: t, resolveBinding: n = ov, configuration: o, strings: i, editorStrings: r, viewportHeight: s, shell: l }) => {
7926
- const c = V(null), { composition: u, dropRegions: d, selectedId: p } = e, { selectionRect: m, measureNow: g } = mg(c, d, p), { feedback: f, draggedId: v, startMoving: h, endMoving: k, handlers: x } = ug(c, g, e), [O, y] = L(), S = ig(e, t), { document: w, context: T } = e, A = j(() => o ?? (w.instanceContributions.length > 0 ? jr(Ro(w, T.scope), w.instanceContributions, T.catalog) : void 0), [
7929
+ const c = V(null), { composition: u, dropRegions: d, selectedId: p } = e, { selectionRect: m, measureNow: f } = mg(c, d, p), { feedback: g, draggedId: v, startMoving: h, endMoving: k, handlers: x } = ug(c, f, e), [O, w] = L(), S = ig(e, t), { document: y, context: T } = e, A = j(() => o ?? (y.instanceContributions.length > 0 ? jr(Ro(y, T.scope), y.instanceContributions, T.catalog) : void 0), [
7927
7930
  o,
7928
- w,
7931
+ y,
7929
7932
  T
7930
7933
  ]), N = r?.designMode ?? mn, C = t.destinations[0], $ = j(() => C ? { screen: C.id } : void 0, [C]), _ = rh({
7931
7934
  controller: e,
@@ -7937,8 +7940,8 @@ var ov = () => {
7937
7940
  Ce(() => {
7938
7941
  const P = c.current?.closest("[data-studio-viewport]") ?? c.current?.parentElement;
7939
7942
  if (s !== void 0 || !P || typeof ResizeObserver > "u") return;
7940
- const B = new ResizeObserver(() => y(P.clientHeight));
7941
- return y(P.clientHeight), B.observe(P), () => B.disconnect();
7943
+ const B = new ResizeObserver(() => w(P.clientHeight));
7944
+ return w(P.clientHeight), B.observe(P), () => B.disconnect();
7942
7945
  }, [s]);
7943
7946
  const R = (P) => {
7944
7947
  if (P.key === "Escape" && l?.peeking) {
@@ -8027,7 +8030,7 @@ var ov = () => {
8027
8030
  ref: c,
8028
8031
  className: "studio-screen-surface",
8029
8032
  style: nt,
8030
- "data-studio-dragging": f ? "true" : void 0,
8033
+ "data-studio-dragging": g ? "true" : void 0,
8031
8034
  onKeyDown: R,
8032
8035
  tabIndex: -1,
8033
8036
  ...x,
@@ -8054,8 +8057,8 @@ var ov = () => {
8054
8057
  onDragEnd: k,
8055
8058
  children: /* @__PURE__ */ a(bc, { "aria-hidden": "true" })
8056
8059
  }),
8057
- f && /* @__PURE__ */ a(Zf, {
8058
- feedback: f,
8060
+ g && /* @__PURE__ */ a(Zf, {
8061
+ feedback: g,
8059
8062
  deniedText: i.dropDenied
8060
8063
  }),
8061
8064
  /* @__PURE__ */ a(tg, {
@@ -8079,14 +8082,14 @@ var ov = () => {
8079
8082
  className: "studio-screen-surface__announcement",
8080
8083
  role: "status",
8081
8084
  "aria-live": "polite",
8082
- children: f ? f.denied || !f.drop ? i.dropDenied : i.dropTarget(f.drop.target.region.kind === Pe.Container ? "into" : "between") : ""
8085
+ children: g ? g.denied || !g.drop ? i.dropDenied : i.dropTarget(g.drop.target.region.kind === Pe.Container ? "into" : "between") : ""
8083
8086
  })
8084
8087
  ]
8085
8088
  })]
8086
8089
  })
8087
8090
  });
8088
- }, wr = 40, bs = ({ controller: e, environment: t, strings: n, window: o, authoringTemplate: i, deviceFrame: r = !1, saveFailure: s, onKeepEditing: l, onDiscard: c, onPreview: u }) => {
8089
- const d = xf(e.document, t.runtime, i, void 0, e.composition.templates.length > 0), p = !!e.selectedId && e.canRemove(e.selectedId), m = /* @__PURE__ */ b(re, { children: [
8091
+ }, wr = 40, bs = ({ controller: e, environment: t, strings: n, window: o, authoringTemplate: i, title: r, deviceFrame: s = !1, saveFailure: l, onKeepEditing: c, onDiscard: u, onPreview: d }) => {
8092
+ const p = xf(e.document, t.runtime, i, void 0, e.composition.templates.length > 0), m = !!e.selectedId && e.canRemove(e.selectedId), f = /* @__PURE__ */ b(re, { children: [
8090
8093
  /* @__PURE__ */ a("span", {
8091
8094
  className: "studio-screen-editor-window__state",
8092
8095
  role: "status",
@@ -8098,20 +8101,20 @@ var ov = () => {
8098
8101
  available: o.available,
8099
8102
  strings: n,
8100
8103
  onResize: o.setSize,
8101
- shell: d.available ? {
8102
- shown: d.shown,
8103
- toggle: d.toggle
8104
+ shell: p.available ? {
8105
+ shown: p.shown,
8106
+ toggle: p.toggle
8104
8107
  } : void 0,
8105
- template: d.template.available ? d.template : void 0
8108
+ template: p.template.available ? p.template : void 0
8106
8109
  }),
8107
- u && /* @__PURE__ */ a(De, {
8110
+ d && /* @__PURE__ */ a(De, {
8108
8111
  icon: /* @__PURE__ */ a(Dc, { "aria-hidden": "true" }),
8109
8112
  "aria-label": n.previewScreen,
8110
8113
  title: n.previewScreen,
8111
8114
  variant: "ghost",
8112
8115
  size: "small",
8113
8116
  "data-studio-preview-screen": "",
8114
- onClick: () => u(e.document)
8117
+ onClick: () => d(e.document)
8115
8118
  }),
8116
8119
  /* @__PURE__ */ a(De, {
8117
8120
  icon: /* @__PURE__ */ a(Wc, { "aria-hidden": "true" }),
@@ -8137,7 +8140,7 @@ var ov = () => {
8137
8140
  title: n.deleteElement,
8138
8141
  variant: "ghost",
8139
8142
  size: "small",
8140
- disabled: !p,
8143
+ disabled: !m,
8141
8144
  onClick: () => e.selectedId && e.remove(e.selectedId)
8142
8145
  }),
8143
8146
  /* @__PURE__ */ a(De, {
@@ -8155,28 +8158,31 @@ var ov = () => {
8155
8158
  role: "group",
8156
8159
  "aria-label": n.windowLabel,
8157
8160
  children: [
8158
- /* @__PURE__ */ a(df, { controls: m }),
8159
- s && /* @__PURE__ */ a(uf, {
8161
+ /* @__PURE__ */ a(df, {
8162
+ controls: f,
8163
+ title: r
8164
+ }),
8165
+ l && /* @__PURE__ */ a(uf, {
8160
8166
  strings: n,
8161
- message: s,
8162
- onKeepEditing: l,
8163
- onDiscard: c
8167
+ message: l,
8168
+ onKeepEditing: c,
8169
+ onDiscard: u
8164
8170
  }),
8165
8171
  /* @__PURE__ */ a("div", {
8166
8172
  className: "studio-screen-editor-window__canvas",
8167
8173
  "data-studio-viewport": "",
8168
8174
  children: /* @__PURE__ */ b("div", {
8169
- className: r ? "studio-screen-editor-window__viewport studio-screen-editor-window__device" : "studio-screen-editor-window__viewport",
8170
- style: r ? {
8175
+ className: s ? "studio-screen-editor-window__viewport studio-screen-editor-window__device" : "studio-screen-editor-window__viewport",
8176
+ style: s ? {
8171
8177
  width: o.size.width,
8172
8178
  minHeight: o.size.height - wr
8173
8179
  } : void 0,
8174
- children: [d.peeking && /* @__PURE__ */ b("div", {
8180
+ children: [p.peeking && /* @__PURE__ */ b("div", {
8175
8181
  className: "studio-screen-editor-window__peek",
8176
8182
  role: "status",
8177
- children: [/* @__PURE__ */ a("span", { children: n.shellPeeking(d.peekingName) }), /* @__PURE__ */ a("button", {
8183
+ children: [/* @__PURE__ */ a("span", { children: n.shellPeeking(p.peekingName) }), /* @__PURE__ */ a("button", {
8178
8184
  type: "button",
8179
- onClick: d.back,
8185
+ onClick: p.back,
8180
8186
  children: n.shellPeekBack
8181
8187
  })]
8182
8188
  }), /* @__PURE__ */ a(rv, {
@@ -8186,8 +8192,8 @@ var ov = () => {
8186
8192
  },
8187
8193
  strings: n.surface,
8188
8194
  editorStrings: n,
8189
- viewportHeight: r ? o.size.height - wr : void 0,
8190
- shell: d
8195
+ viewportHeight: s ? o.size.height - wr : void 0,
8196
+ shell: p
8191
8197
  })]
8192
8198
  })
8193
8199
  })
@@ -8571,14 +8577,14 @@ var _v = { modules: [] }, Ev = (e, t) => wo(e, t)?.id;
8571
8577
  function Ts(e, t, n, o) {
8572
8578
  const [i, r] = L(() => fv(e.document)), s = V(void 0);
8573
8579
  s.current ??= new hv(i, r);
8574
- const l = z((P) => s.current.commit(P), []), [c, u] = L(), [d, p] = L(), [m, g] = L(n.navigation?.module), f = V(void 0), v = z((P, B) => {
8575
- const U = f.current?.(P), W = f.current?.(B);
8580
+ const l = z((P) => s.current.commit(P), []), [c, u] = L(), [d, p] = L(), [m, f] = L(n.navigation?.module), g = V(void 0), v = z((P, B) => {
8581
+ const U = g.current?.(P), W = g.current?.(B);
8576
8582
  return U && W ? {
8577
8583
  height: U.height,
8578
8584
  bottom: U.top + U.height - W.top
8579
8585
  } : void 0;
8580
8586
  }, []), h = z((P) => {
8581
- f.current = P;
8587
+ g.current = P;
8582
8588
  }, []), k = Rv(n.runtime.icons);
8583
8589
  Dv(n.stateChangeSlices, n.registerDesignTimeCommands);
8584
8590
  const x = j(() => ({
@@ -8590,13 +8596,13 @@ function Ts(e, t, n, o) {
8590
8596
  n,
8591
8597
  t,
8592
8598
  k
8593
- ]), O = j(() => bo(i.document, t), [i.document, t]), y = j(() => xv(i.document, O.roots, x), [
8599
+ ]), O = j(() => bo(i.document, t), [i.document, t]), w = j(() => xv(i.document, O.roots, x), [
8594
8600
  i.document,
8595
8601
  O,
8596
8602
  x
8597
- ]), S = j(() => Nv(y), [y]), w = nn(i.document, t), T = j(() => mv(O.roots, Iv(w), S).filter((P) => P.containerId !== null), [
8603
+ ]), S = j(() => Nv(w), [w]), y = nn(i.document, t), T = j(() => mv(O.roots, Iv(y), S).filter((P) => P.containerId !== null), [
8598
8604
  O,
8599
- w,
8605
+ y,
8600
8606
  S
8601
8607
  ]), A = c ? qe(O.roots, c) : void 0, N = j(() => c ? Po(i.document, ae(c), x) : void 0, [
8602
8608
  i.document,
@@ -8617,12 +8623,12 @@ function Ts(e, t, n, o) {
8617
8623
  diagnostics: W.diagnostics
8618
8624
  };
8619
8625
  }, [l, x]), R = z((P, B) => {
8620
- const U = P ?? w?.id ?? O.entry, W = U ? qe(O.roots, U)?.children ?? [] : [];
8626
+ const U = P ?? y?.id ?? O.entry, W = U ? qe(O.roots, U)?.children ?? [] : [];
8621
8627
  return {
8622
8628
  parent: U,
8623
8629
  index: B ?? W.length
8624
8630
  };
8625
- }, [w, O]), F = V(o);
8631
+ }, [y, O]), F = V(o);
8626
8632
  F.current = o;
8627
8633
  const G = z((P, B, U, W, J, de) => {
8628
8634
  const Ue = R(B, U);
@@ -8719,7 +8725,7 @@ function Ts(e, t, n, o) {
8719
8725
  structure: fe,
8720
8726
  navigationModule: m,
8721
8727
  applyNavigationEdits: je,
8722
- setNavigationModule: g,
8728
+ setNavigationModule: f,
8723
8729
  selectedItemId: d && d.componentId === c ? d.itemId : void 0,
8724
8730
  selectItem: nt,
8725
8731
  document: i.document,
@@ -8730,7 +8736,7 @@ function Ts(e, t, n, o) {
8730
8736
  inspection: N,
8731
8737
  diagnostics: i.diagnostics,
8732
8738
  adapter: S,
8733
- ownershipOf: y,
8739
+ ownershipOf: w,
8734
8740
  dropRegions: T,
8735
8741
  select: u,
8736
8742
  setMeasurer: h,
@@ -8815,15 +8821,15 @@ var Tr = () => ({
8815
8821
  onClose: () => n.close()
8816
8822
  })
8817
8823
  });
8818
- }, Fv = ({ subject: e, environment: t, strings: n, layoutLabels: o, icons: i, paletteSources: r, sourceRect: s, initialSize: l, rememberWindowAs: c, windowMemory: u, centerOffsetX: d, renderPaletteHost: p, onClose: m, onBeforeClose: g, onPreview: f, opened: v }) => {
8824
+ }, Fv = ({ subject: e, environment: t, strings: n, layoutLabels: o, icons: i, paletteSources: r, sourceRect: s, initialSize: l, rememberWindowAs: c, windowMemory: u, centerOffsetX: d, renderPaletteHost: p, onClose: m, onBeforeClose: f, onPreview: g, opened: v }) => {
8819
8825
  const h = V(void 0), k = Ts(v, e.authoringTemplate, t, (_) => h.current?.(_)), x = j(() => u ?? rf(), [u]), O = j(() => lf({
8820
8826
  remembered: c ? x.read(c) : void 0,
8821
8827
  saved: l,
8822
8828
  lastUsed: x.readLastUsed()
8823
- }, Tr()), []), y = z((_) => {
8829
+ }, Tr()), []), w = z((_) => {
8824
8830
  c && x.write(c, _);
8825
8831
  }, [x, c]), S = z((_) => {
8826
- y(_);
8832
+ w(_);
8827
8833
  const R = nn(k.document, e.authoringTemplate);
8828
8834
  m({
8829
8835
  document: on(k.document, e.screen),
@@ -8836,24 +8842,24 @@ var Tr = () => ({
8836
8842
  k,
8837
8843
  t.runtime.legacyTypeOf,
8838
8844
  m,
8839
- y,
8845
+ w,
8840
8846
  e.authoringTemplate,
8841
8847
  e.screen
8842
- ]), [w, T] = L(), A = z(async (_) => {
8843
- y(_);
8848
+ ]), [y, T] = L(), A = z(async (_) => {
8849
+ w(_);
8844
8850
  const R = nn(k.document, e.authoringTemplate), F = {
8845
8851
  document: on(k.document, e.screen),
8846
8852
  legacyElements: Xn(R, t.runtime.legacyTypeOf),
8847
8853
  windowSize: _,
8848
8854
  layout: po(R),
8849
8855
  changed: k.isDirty
8850
- }, G = await g?.(F);
8856
+ }, G = await f?.(F);
8851
8857
  return T(G), !G;
8852
8858
  }, [
8853
8859
  k,
8854
8860
  t.runtime.legacyTypeOf,
8855
- g,
8856
- y,
8861
+ f,
8862
+ w,
8857
8863
  e.authoringTemplate,
8858
8864
  e.screen
8859
8865
  ]), { palette: N, recordInserted: C } = Ua({
@@ -8905,10 +8911,10 @@ var Tr = () => ({
8905
8911
  available: Tr()
8906
8912
  },
8907
8913
  authoringTemplate: e.authoringTemplate,
8908
- saveFailure: w,
8914
+ saveFailure: y,
8909
8915
  onKeepEditing: () => T(void 0),
8910
8916
  onDiscard: _.closeWithoutSaving,
8911
- onPreview: f
8917
+ onPreview: g
8912
8918
  })
8913
8919
  })]
8914
8920
  });
@@ -9049,82 +9055,83 @@ var dt = "p-anchored-overlay", Vt = "p-collapsible", Kn = "p-overlay-mask", D =
9049
9055
  problem: t.problem,
9050
9056
  strings: e.strings
9051
9057
  });
9052
- }, zv = ({ subject: e, environment: t, strings: n, layoutLabels: o, icons: i, paletteSources: r, initialSize: s, onChange: l, renderPaletteHost: c, opened: u }) => {
9053
- const d = V(void 0), p = Ts(u, e.authoringTemplate, t, (y) => d.current?.(y)), [m, g] = L(s ?? vn[Xe.Desktop]), [f, v] = L(!0), h = V(l);
9054
- h.current = l, ie(() => {
9055
- const y = nn(p.document, e.authoringTemplate);
9056
- h.current?.({
9057
- document: on(p.document, e.screen),
9058
- legacyElements: Xn(y, t.runtime.legacyTypeOf),
9059
- windowSize: m,
9060
- layout: po(y),
9061
- changed: p.isDirty
9058
+ }, zv = ({ subject: e, environment: t, strings: n, layoutLabels: o, icons: i, paletteSources: r, initialSize: s, onChange: l, renderPaletteHost: c, title: u, opened: d }) => {
9059
+ const p = V(void 0), m = Ts(d, e.authoringTemplate, t, (S) => p.current?.(S)), [f, g] = L(s ?? vn[Xe.Desktop]), [v, h] = L(!0), k = V(l);
9060
+ k.current = l, ie(() => {
9061
+ const S = nn(m.document, e.authoringTemplate);
9062
+ k.current?.({
9063
+ document: on(m.document, e.screen),
9064
+ legacyElements: Xn(S, t.runtime.legacyTypeOf),
9065
+ windowSize: f,
9066
+ layout: po(S),
9067
+ changed: m.isDirty
9062
9068
  });
9063
9069
  }, [
9064
- p.document,
9065
- p.isDirty,
9066
- m,
9070
+ m.document,
9071
+ m.isDirty,
9072
+ f,
9067
9073
  e.authoringTemplate,
9068
9074
  e.screen,
9069
9075
  t.runtime.legacyTypeOf
9070
9076
  ]);
9071
- const k = z((y) => {
9072
- if (!Zo(y)) return;
9073
- const S = p.selection, w = S && "children" in S ? p.selectedId : void 0;
9074
- y.kind === "layout" ? p.insertLayout(y.item, w, void 0) : p.insertComponent(ei(y.componentName, y.package), w, void 0);
9075
- }, [p]), { palette: x, recordInserted: O } = Ua({
9077
+ const x = z((S) => {
9078
+ if (!Zo(S)) return;
9079
+ const y = m.selection, T = y && "children" in y ? m.selectedId : void 0;
9080
+ S.kind === "layout" ? m.insertLayout(S.item, T, void 0) : m.insertComponent(ei(S.componentName, S.package), T, void 0);
9081
+ }, [m]), { palette: O, recordInserted: w } = Ua({
9076
9082
  strings: n,
9077
9083
  layoutLabels: o,
9078
9084
  icons: i,
9079
9085
  paletteSources: r,
9080
- onAdd: (y) => k(y.payload)
9086
+ onAdd: (S) => x(S.payload)
9081
9087
  });
9082
- return d.current = O, /* @__PURE__ */ a(Qa, {
9088
+ return p.current = w, /* @__PURE__ */ a(Qa, {
9083
9089
  environment: t,
9084
9090
  children: /* @__PURE__ */ b("div", {
9085
9091
  className: "studio-screen-editor-workspace",
9086
9092
  children: [
9087
- c ? c(x) : /* @__PURE__ */ a(za, {
9093
+ c ? c(O) : /* @__PURE__ */ a(za, {
9088
9094
  placement: "inline",
9089
- children: x
9095
+ children: O
9090
9096
  }),
9091
9097
  /* @__PURE__ */ a("div", {
9092
9098
  className: "studio-screen-editor-workspace__stage",
9093
9099
  children: /* @__PURE__ */ a(bs, {
9094
- controller: p,
9100
+ controller: m,
9095
9101
  environment: t,
9096
9102
  strings: n,
9097
9103
  window: {
9098
- size: m,
9104
+ size: f,
9099
9105
  setSize: g,
9100
- isInspectorOpen: f,
9101
- toggleInspector: () => v((y) => !y),
9106
+ isInspectorOpen: v,
9107
+ toggleInspector: () => h((S) => !S),
9102
9108
  available: {
9103
9109
  width: 1600,
9104
9110
  height: 1e3
9105
9111
  }
9106
9112
  },
9107
9113
  authoringTemplate: e.authoringTemplate,
9114
+ title: u,
9108
9115
  deviceFrame: !0
9109
9116
  })
9110
9117
  }),
9111
- f && /* @__PURE__ */ a("aside", {
9118
+ v && /* @__PURE__ */ a("aside", {
9112
9119
  className: "studio-screen-editor-workspace__inspector",
9113
9120
  style: { flexBasis: 360 },
9114
9121
  children: /* @__PURE__ */ a(Ma, {
9115
9122
  strings: n,
9116
- controller: p,
9123
+ controller: m,
9117
9124
  environment: t,
9118
9125
  authoringTemplate: e.authoringTemplate,
9119
- onClose: () => v(!1),
9126
+ onClose: () => h(!1),
9120
9127
  structure: /* @__PURE__ */ a(wa, {
9121
- roots: p.composition.roots,
9122
- adapter: p.adapter,
9128
+ roots: m.composition.roots,
9129
+ adapter: m.adapter,
9123
9130
  strings: n,
9124
- selectedId: p.selectedId,
9125
- onSelect: p.select,
9126
- onEdit: p.move,
9127
- onRemove: p.remove
9131
+ selectedId: m.selectedId,
9132
+ onSelect: m.select,
9133
+ onEdit: m.move,
9134
+ onRemove: m.remove
9128
9135
  })
9129
9136
  })
9130
9137
  })
@@ -9444,8 +9451,8 @@ function fb(e, t, n) {
9444
9451
  },
9445
9452
  isKnownComponent: (p) => u.has(p),
9446
9453
  legacyTypeOf: (p) => {
9447
- const m = Uh(p, t, o), g = m?.package === Ir ? `${Ir}.${ma(m.name)}` : void 0;
9448
- return g !== void 0 && nb.has(g) ? g : void 0;
9454
+ const m = Uh(p, t, o), f = m?.package === Ir ? `${Ir}.${ma(m.name)}` : void 0;
9455
+ return f !== void 0 && nb.has(f) ? f : void 0;
9449
9456
  }
9450
9457
  };
9451
9458
  }
@@ -9836,10 +9843,10 @@ var Jb = [
9836
9843
  n?.width,
9837
9844
  n?.height,
9838
9845
  o
9839
- ]), p = j(() => ai(t), [t]), m = j(() => qb(t.registry), [t.registry]), g = {
9846
+ ]), p = j(() => ai(t), [t]), m = j(() => qb(t.registry), [t.registry]), f = {
9840
9847
  width: d.width,
9841
9848
  height: Pr + d.bodyHeight
9842
- }, f = /* @__PURE__ */ b(re, { children: [/* @__PURE__ */ b("div", {
9849
+ }, g = /* @__PURE__ */ b(re, { children: [/* @__PURE__ */ b("div", {
9843
9850
  className: "screen-thumbnail__title-bar",
9844
9851
  style: { height: Pr },
9845
9852
  children: [Jb.map((h) => /* @__PURE__ */ a("span", {
@@ -9875,21 +9882,21 @@ var Jb = [
9875
9882
  role: "button",
9876
9883
  tabIndex: 0,
9877
9884
  className: "screen-thumbnail screen-thumbnail--clickable",
9878
- style: g,
9885
+ style: f,
9879
9886
  title: r,
9880
9887
  "aria-label": r,
9881
9888
  onClick: s,
9882
9889
  onKeyDown: (h) => {
9883
9890
  h.key !== "Enter" && h.key !== " " || (h.preventDefault(), h.currentTarget.click());
9884
9891
  },
9885
- children: f
9892
+ children: g
9886
9893
  }) : /* @__PURE__ */ a("div", {
9887
9894
  ref: c,
9888
9895
  className: "screen-thumbnail",
9889
- style: g,
9896
+ style: f,
9890
9897
  role: "img",
9891
9898
  "aria-label": i,
9892
- children: f
9899
+ children: g
9893
9900
  });
9894
9901
  }, ut = /* @__PURE__ */ new Map(), Yb = 200;
9895
9902
  function $0(e) {