@brucesantos/design-space 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,237 +1,271 @@
1
- import { jsxs as d, jsx as o, Fragment as P } from "react/jsx-runtime";
2
- import { useState as F, useEffect as B, useMemo as T, useCallback as I, useContext as se, createContext as ie, useRef as q, forwardRef as ce } from "react";
3
- import { S as de, v as le, P as v, N as oe, s as ue, c as he, g as pe } from "./contrast-B8I8gWGa.js";
4
- import { C as _t, a as Ct, b as Tt, d as Pt, e as At, f as Lt, h as Et, i as Ft, j as $t, k as Dt, p as Rt, r as Ot, l as It, m as Bt, n as Wt } from "./contrast-B8I8gWGa.js";
5
- function me(e) {
6
- const t = new Map(e.scenarios.map((l) => [l.id, l])), n = new Map(
7
- (e.components ?? []).map((l) => [l.id, l])
8
- ), r = new Map(e.personas.map((l) => [l.id, l])), i = new Map(e.fixtures.map((l) => [l.id, l])), a = new Map((e.rules ?? []).map((l) => [l.id, l])), s = new Map(e.modules.map((l) => [l.id, l])), c = new Map(
9
- e.modules.flatMap((l) => (l.flows ?? []).map((g) => [g.id, g]))
10
- ), p = e.modules.map((l) => ({
11
- module: l,
12
- scenarios: e.scenarios.filter((g) => g.id.split(".")[0] === l.id)
13
- })), h = new Set(p.flatMap((l) => l.scenarios.map((g) => g.id))), m = e.scenarios.filter((l) => !h.has(l.id)), b = (l) => l ? t.get(l) : void 0, u = (l) => l ? r.get(l) : void 0, S = (l, g) => {
14
- if (!(!l || !g))
15
- return n.get(l)?.fixtures?.find((k) => k.id === g);
16
- }, w = (l = {}) => e.scenarios.filter(
17
- (g) => l.includePorted || g.status !== "ported" || g.id === l.activeScenario
18
- ), C = (l) => l ? l.permissions ? l.permissions : u(l.persona)?.permissions ?? [] : [];
1
+ import { jsxs as u, jsx as o, Fragment as A } from "react/jsx-runtime";
2
+ import { useState as $, useEffect as I, useMemo as C, useCallback as E, useContext as ue, createContext as he, useRef as Q, forwardRef as pe } from "react";
3
+ import { S as se, v as me, P as g, N as ie, s as fe, c as be, g as ve } from "./contrast-BseNi5QD.js";
4
+ import { C as At, a as Pt, b as Lt, d as $t, e as Et, f as Ft, h as Rt, i as Dt, j as Ot, k as It, p as Bt, r as Wt, l as jt, m as Ht, n as Kt } from "./contrast-BseNi5QD.js";
5
+ function ge(e) {
6
+ const t = new Map(e.scenarios.map((d) => [d.id, d])), n = new Map(
7
+ (e.components ?? []).map((d) => [d.id, d])
8
+ ), s = new Map(e.personas.map((d) => [d.id, d])), l = new Map(e.fixtures.map((d) => [d.id, d])), a = new Map((e.rules ?? []).map((d) => [d.id, d])), r = new Map(e.modules.map((d) => [d.id, d])), c = new Map(
9
+ e.modules.flatMap((d) => (d.flows ?? []).map((f) => [f.id, f]))
10
+ ), h = e.modules.map((d) => ({
11
+ module: d,
12
+ scenarios: e.scenarios.filter((f) => f.id.split(".")[0] === d.id)
13
+ })), p = new Set(h.flatMap((d) => d.scenarios.map((f) => f.id))), m = e.scenarios.filter((d) => !p.has(d.id)), v = (d) => d ? t.get(d) : void 0, i = (d) => d ? s.get(d) : void 0, N = (d, f) => {
14
+ if (!(!d || !f))
15
+ return n.get(d)?.fixtures?.find((k) => k.id === f);
16
+ }, x = (d = {}) => e.scenarios.filter(
17
+ (f) => d.includePorted || (d.view === "ported" ? f.status === "ported" : f.status !== "ported") || d.view === void 0 && f.id === d.activeScenario
18
+ ), S = (d) => d ? d.permissions ? d.permissions : i(d.persona)?.permissions ?? [] : [];
19
19
  return {
20
20
  product: e,
21
- tree: p,
21
+ tree: h,
22
22
  orphans: m,
23
- issues: le(e),
24
- scenario: b,
25
- component: (l) => l ? n.get(l) : void 0,
26
- componentFixture: S,
27
- resolveComponentFixture: (l, g) => {
28
- const k = l ? n.get(l) : void 0, M = S(l, g), _ = S(l, k?.defaultFixture) ?? k?.fixtures?.[0];
23
+ issues: me(e),
24
+ scenario: v,
25
+ component: (d) => d ? n.get(d) : void 0,
26
+ componentFixture: N,
27
+ resolveComponentFixture: (d, f) => {
28
+ const k = d ? n.get(d) : void 0, M = N(d, f), _ = N(d, k?.defaultFixture) ?? k?.fixtures?.[0];
29
29
  return {
30
30
  fixture: M ?? _,
31
- requestedId: g,
32
- didFallback: !!(g && !M)
31
+ requestedId: f,
32
+ didFallback: !!(f && !M)
33
33
  };
34
34
  },
35
- persona: u,
36
- fixture: (l) => l ? i.get(l) : void 0,
37
- rule: (l) => l ? a.get(l) : void 0,
38
- module: (l) => l ? s.get(l) : void 0,
39
- flow: (l) => l ? c.get(l) : void 0,
40
- rulesOf: (l) => (l?.rules ?? []).map((g) => a.get(g)).filter((g) => !!g),
41
- permissionsOf: C,
42
- scenariosForRoute: (l, g) => {
43
- const k = l.split("?")[0];
44
- return w(g).filter((M) => M.route.split("?")[0] === k);
35
+ persona: i,
36
+ fixture: (d) => d ? l.get(d) : void 0,
37
+ rule: (d) => d ? a.get(d) : void 0,
38
+ module: (d) => d ? r.get(d) : void 0,
39
+ flow: (d) => d ? c.get(d) : void 0,
40
+ rulesOf: (d) => (d?.rules ?? []).map((f) => a.get(f)).filter((f) => !!f),
41
+ permissionsOf: S,
42
+ scenariosForRoute: (d, f) => {
43
+ const k = d.split("?")[0];
44
+ return x(f).filter((M) => M.route.split("?")[0] === k);
45
45
  },
46
- activeScenarios: w,
47
- treeFor: (l) => {
48
- const g = new Set(w(l).map((k) => k.id));
49
- return p.map((k) => ({
46
+ activeScenarios: x,
47
+ treeFor: (d) => {
48
+ const f = new Set(x(d).map((k) => k.id));
49
+ return h.map((k) => ({
50
50
  ...k,
51
- scenarios: k.scenarios.filter((M) => g.has(M.id))
51
+ scenarios: k.scenarios.filter((M) => f.has(M.id))
52
52
  }));
53
53
  },
54
- orphansFor: (l) => {
55
- const g = new Set(w(l).map((k) => k.id));
56
- return m.filter((k) => g.has(k.id));
54
+ orphansFor: (d) => {
55
+ const f = new Set(x(d).map((k) => k.id));
56
+ return m.filter((k) => f.has(k.id));
57
57
  },
58
- search: (l, g) => {
59
- const k = Q(l), M = w(g);
58
+ search: (d, f) => {
59
+ const k = te(d), M = x(f);
60
60
  return k ? M.filter((_) => {
61
- const $ = s.get(_.id.split(".")[0] ?? "")?.name ?? "";
62
- return Q(
61
+ const T = r.get(_.id.split(".")[0] ?? "")?.name ?? "";
62
+ return te(
63
63
  [
64
64
  _.title,
65
65
  _.id,
66
66
  _.intent ?? "",
67
67
  _.route,
68
- $,
69
- r.get(_.persona)?.name ?? "",
68
+ T,
69
+ s.get(_.persona)?.name ?? "",
70
70
  (_.tags ?? []).join(" "),
71
71
  (_.expected ?? []).join(" ")
72
72
  ].join(" ")
73
73
  ).includes(k);
74
74
  }) : M;
75
75
  },
76
- byStatus: (l) => e.scenarios.filter((g) => g.status === l),
77
- coverage: (l) => {
78
- const g = Object.fromEntries(
79
- de.map((k) => [k, 0])
76
+ byStatus: (d) => e.scenarios.filter((f) => f.status === d),
77
+ coverage: (d) => {
78
+ const f = Object.fromEntries(
79
+ se.map((k) => [k, 0])
80
80
  );
81
- for (const k of w(l)) g[k.status] += 1;
82
- return g;
81
+ for (const k of x(d)) f[k.status] += 1;
82
+ return f;
83
83
  }
84
84
  };
85
85
  }
86
- function Q(e) {
86
+ function te(e) {
87
87
  return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim();
88
88
  }
89
- const ne = [
89
+ const ce = [
90
90
  { id: "fit", label: "Ajustar" },
91
91
  { id: "mobile", label: "Celular", width: 390, height: 844 },
92
92
  { id: "tablet", label: "Tablet", width: 834, height: 1112 },
93
93
  { id: "desktop", label: "Desktop", width: 1440, height: 900 },
94
94
  { id: "custom", label: "Personalizado" }
95
- ], fe = [1, 1.25, 1.5, 2];
96
- function be(e, t) {
97
- const n = new URLSearchParams(e), r = n.get(v.component) ?? void 0, i = t.component(r), a = n.get(v.scenario) ?? void 0, s = i ? void 0 : t.scenario(a), c = n.get(v.fixture) ?? void 0, p = i ? c ?? t.componentFixture(i.id, i.defaultFixture)?.id ?? i.fixtures?.[0]?.id : void 0, h = n.get(v.network), m = Number(n.get(v.textScale));
95
+ ], we = [1, 1.25, 1.5, 2];
96
+ function ke(e, t) {
97
+ const n = new URLSearchParams(e), s = n.get(g.component) ?? void 0, l = t.component(s), a = n.get(g.scenario) ?? void 0, r = l ? void 0 : t.scenario(a), c = n.get(g.fixture) ?? void 0, h = l ? c ?? t.componentFixture(l.id, l.defaultFixture)?.id ?? l.fixtures?.[0]?.id : void 0, p = n.get(g.network), m = Number(n.get(g.textScale)), v = n.get(g.view), i = r?.status === "ported" || v === "ported" || n.get(g.showPorted) === "1" ? "ported" : "active";
98
98
  return {
99
- scenario: s?.id,
100
- showPorted: n.get(v.showPorted) === "1",
101
- component: i?.id,
102
- persona: n.get(v.persona) ?? s?.persona,
103
- fixture: i ? p : c ?? s?.fixture,
104
- network: we(h) ? h : s?.network ?? "success",
105
- viewport: n.get(v.viewport) ?? "fit",
106
- customWidth: Ne(n.get(v.customWidth)),
107
- themeMode: n.get(v.themeMode) ?? t.product.theme?.modes?.[0],
108
- locale: n.get(v.locale) ?? t.product.theme?.locales?.[0],
109
- dataSource: n.get(v.dataSource) ?? t.product.dataSources?.default ?? "fixtures",
110
- chromeTheme: ke(n.get(v.chromeTheme)) ? n.get(v.chromeTheme) : "dark",
99
+ scenario: r?.id,
100
+ view: i,
101
+ showPorted: i === "ported",
102
+ component: l?.id,
103
+ persona: n.get(g.persona) ?? r?.persona,
104
+ fixture: l ? h : c ?? r?.fixture,
105
+ network: ye(p) ? p : r?.network ?? "success",
106
+ viewport: n.get(g.viewport) ?? "fit",
107
+ customWidth: _e(n.get(g.customWidth)),
108
+ themeMode: n.get(g.themeMode) ?? t.product.theme?.modes?.[0],
109
+ locale: n.get(g.locale) ?? t.product.theme?.locales?.[0],
110
+ dataSource: n.get(g.dataSource) ?? t.product.dataSources?.default ?? "fixtures",
111
+ chromeTheme: Se(n.get(g.chromeTheme)) ? n.get(g.chromeTheme) : "dark",
111
112
  // Chrome visível por padrão. `?chrome=0` é o modo de revisão limpa e captura
112
113
  // de tela, então precisa ser explícito para não sumir sem pedido.
113
- chrome: n.get(v.chrome) !== "0",
114
- keyboardMode: n.get(v.keyboardMode) === "1",
115
- reducedMotion: n.get(v.reducedMotion) === "1",
116
- textScale: fe.includes(m) ? m : 1,
117
- inspector: n.get(v.inspector) !== "0"
114
+ chrome: n.get(g.chrome) !== "0",
115
+ keyboardMode: n.get(g.keyboardMode) === "1",
116
+ reducedMotion: n.get(g.reducedMotion) === "1",
117
+ textScale: we.includes(m) ? m : 1,
118
+ inspector: n.get(g.inspector) !== "0"
118
119
  };
119
120
  }
120
- function G(e, t) {
121
- const n = new URLSearchParams(), r = t.scenario(e.scenario);
122
- e.component ? n.set(v.component, e.component) : e.scenario && n.set(v.scenario, e.scenario), e.showPorted && n.set(v.showPorted, "1"), e.persona && e.persona !== r?.persona && n.set(v.persona, e.persona), e.component && e.fixture ? n.set(v.fixture, e.fixture) : e.fixture && e.fixture !== r?.fixture && n.set(v.fixture, e.fixture), e.network !== (r?.network ?? "success") && n.set(v.network, e.network), e.viewport !== "fit" && n.set(v.viewport, e.viewport), e.viewport === "custom" && e.customWidth && n.set(v.customWidth, String(e.customWidth));
123
- const i = t.product.theme?.modes?.[0];
124
- e.themeMode && e.themeMode !== i && n.set(v.themeMode, e.themeMode);
121
+ function q(e, t) {
122
+ const n = new URLSearchParams(), s = t.scenario(e.scenario);
123
+ e.component ? n.set(g.component, e.component) : e.scenario && n.set(g.scenario, e.scenario), ee(e) === "ported" && n.set(g.view, "ported"), e.persona && e.persona !== s?.persona && n.set(g.persona, e.persona), e.component && e.fixture ? n.set(g.fixture, e.fixture) : e.fixture && e.fixture !== s?.fixture && n.set(g.fixture, e.fixture), e.network !== (s?.network ?? "success") && n.set(g.network, e.network), e.viewport !== "fit" && n.set(g.viewport, e.viewport), e.viewport === "custom" && e.customWidth && n.set(g.customWidth, String(e.customWidth));
124
+ const l = t.product.theme?.modes?.[0];
125
+ e.themeMode && e.themeMode !== l && n.set(g.themeMode, e.themeMode);
125
126
  const a = t.product.theme?.locales?.[0];
126
- e.locale && e.locale !== a && n.set(v.locale, e.locale);
127
- const s = t.product.dataSources?.default ?? "fixtures";
128
- e.dataSource && e.dataSource !== s && n.set(v.dataSource, e.dataSource), e.chromeTheme === "light" && n.set(v.chromeTheme, "light"), e.chrome || n.set(v.chrome, "0"), e.keyboardMode && n.set(v.keyboardMode, "1"), e.reducedMotion && n.set(v.reducedMotion, "1"), e.textScale !== 1 && n.set(v.textScale, String(e.textScale)), e.inspector || n.set(v.inspector, "0");
127
+ e.locale && e.locale !== a && n.set(g.locale, e.locale);
128
+ const r = t.product.dataSources?.default ?? "fixtures";
129
+ e.dataSource && e.dataSource !== r && n.set(g.dataSource, e.dataSource), e.chromeTheme === "light" && n.set(g.chromeTheme, "light"), e.chrome || n.set(g.chrome, "0"), e.keyboardMode && n.set(g.keyboardMode, "1"), e.reducedMotion && n.set(g.reducedMotion, "1"), e.textScale !== 1 && n.set(g.textScale, String(e.textScale)), e.inspector || n.set(g.inspector, "0");
129
130
  const c = n.toString();
130
131
  return c ? `?${c}` : "";
131
132
  }
132
- function ge(e) {
133
- const [t, n] = F(() => X());
134
- B(() => {
135
- const m = () => n(X());
136
- return window.addEventListener("popstate", m), () => window.removeEventListener("popstate", m);
133
+ function Ne(e) {
134
+ const [t, n] = $(() => oe());
135
+ I(() => {
136
+ const v = () => n(oe());
137
+ return window.addEventListener("popstate", v), () => window.removeEventListener("popstate", v);
137
138
  }, []);
138
- const r = T(() => be(t.search, e), [t.search, e]), i = I((m, b, u = !1) => {
139
- const S = `${m}${b}`;
140
- u ? window.history.replaceState(null, "", S) : window.history.pushState(null, "", S), n({ path: m, search: b });
141
- }, []), a = I(
142
- (m) => {
143
- const b = { ...r, ...m };
144
- i(t.path, G(b, e), !0);
139
+ const s = C(() => ke(t.search, e), [t.search, e]), l = E((v, i, N = !1) => {
140
+ const x = `${v}${i}`;
141
+ N ? window.history.replaceState(null, "", x) : window.history.pushState(null, "", x), n({ path: v, search: i });
142
+ }, []), a = E(
143
+ (v) => {
144
+ const i = v.view ?? (v.showPorted === void 0 ? void 0 : v.showPorted ? "ported" : "active"), N = {
145
+ ...s,
146
+ ...v,
147
+ ...i ? { view: i, showPorted: i === "ported" } : {}
148
+ };
149
+ l(t.path, q(N, e), !0);
150
+ },
151
+ [s, t.path, l, e]
152
+ ), r = E(
153
+ (v) => {
154
+ const i = e.scenario(s.scenario), N = !i || (v === "ported" ? i.status === "ported" : i.status !== "ported"), x = {
155
+ ...s,
156
+ view: v,
157
+ showPorted: v === "ported",
158
+ ...N ? {} : {
159
+ scenario: void 0,
160
+ persona: void 0,
161
+ fixture: void 0,
162
+ network: "success"
163
+ }
164
+ };
165
+ l(N ? t.path : "/", q(x, e), !1);
145
166
  },
146
- [r, t.path, i, e]
147
- ), s = I(
148
- (m, b) => {
149
- const [u, S] = m.split("?"), w = u || "/", C = S ? `?${S}` : t.search;
150
- i(w, C, b?.replace ?? !1);
167
+ [s, t.path, l, e]
168
+ ), c = E(
169
+ (v, i) => {
170
+ const [N, x] = v.split("?"), S = N || "/", d = x ? `?${x}` : t.search;
171
+ l(S, d, i?.replace ?? !1);
151
172
  },
152
- [t.search, i]
153
- ), c = I(
154
- (m) => {
155
- const b = e.scenario(m);
156
- if (!b) return;
157
- const u = {
158
- ...r,
159
- scenario: b.id,
160
- showPorted: r.showPorted,
173
+ [t.search, l]
174
+ ), h = E(
175
+ (v) => {
176
+ const i = e.scenario(v);
177
+ if (!i) return;
178
+ const N = {
179
+ ...s,
180
+ scenario: i.id,
181
+ view: i.status === "ported" ? "ported" : "active",
182
+ showPorted: i.status === "ported",
161
183
  component: void 0,
162
- persona: b.persona,
163
- fixture: b.fixture,
164
- network: b.network ?? "success"
184
+ persona: i.persona,
185
+ fixture: i.fixture,
186
+ network: i.network ?? "success"
165
187
  };
166
- i(b.route, G(u, e), !1);
188
+ l(i.route, q(N, e), !1);
167
189
  },
168
- [r, i, e]
169
- ), p = I(
170
- (m) => {
171
- const b = e.component(m);
172
- if (!b) return;
173
- const u = {
174
- ...r,
190
+ [s, l, e]
191
+ ), p = E(
192
+ (v) => {
193
+ const i = e.component(v);
194
+ if (!i) return;
195
+ const N = {
196
+ ...s,
175
197
  scenario: void 0,
176
- component: b.id,
198
+ component: i.id,
177
199
  persona: void 0,
178
200
  fixture: void 0,
179
201
  network: "success"
180
202
  };
181
- u.fixture = e.componentFixture(b.id, b.defaultFixture)?.id ?? b.fixtures?.[0]?.id, i("/", G(u, e), !1);
203
+ N.fixture = e.componentFixture(i.id, i.defaultFixture)?.id ?? i.fixtures?.[0]?.id, l("/", q(N, e), !1);
182
204
  },
183
- [r, i, e]
184
- ), h = T(() => ve(r), [r]);
185
- return { location: t, controls: r, viewport: h, setControls: a, navigate: s, openScenario: c, openComponent: p };
205
+ [s, l, e]
206
+ ), m = C(() => xe(s), [s]);
207
+ return {
208
+ location: t,
209
+ controls: s,
210
+ viewport: m,
211
+ setControls: a,
212
+ setScenarioView: r,
213
+ navigate: c,
214
+ openScenario: h,
215
+ openComponent: p
216
+ };
217
+ }
218
+ function ee(e) {
219
+ return e.view ?? (e.showPorted ? "ported" : "active");
186
220
  }
187
- function ve(e) {
188
- const t = ne.find((n) => n.id === e.viewport);
221
+ function xe(e) {
222
+ const t = ce.find((n) => n.id === e.viewport);
189
223
  return e.viewport === "custom" ? { id: "custom", label: "Personalizado", width: e.customWidth ?? 1024 } : t ?? { id: "fit", label: "Ajustar" };
190
224
  }
191
- function X() {
225
+ function oe() {
192
226
  return typeof window > "u" ? { path: "/", search: "" } : { path: window.location.pathname, search: window.location.search };
193
227
  }
194
- function we(e) {
195
- return e !== null && oe.includes(e);
228
+ function ye(e) {
229
+ return e !== null && ie.includes(e);
196
230
  }
197
- function ke(e) {
231
+ function Se(e) {
198
232
  return e === "dark" || e === "light";
199
233
  }
200
- function Ne(e) {
234
+ function _e(e) {
201
235
  if (!e) return;
202
236
  const t = Number.parseInt(e, 10);
203
237
  return Number.isFinite(t) && t > 0 ? t : void 0;
204
238
  }
205
- function ye(e, t) {
206
- const n = e.split("/").filter(Boolean), r = Se(t).split("/").filter(Boolean), i = {};
207
- for (const [a, s] of n.entries()) {
208
- if (s === "*")
209
- return i["*"] = r.slice(a).join("/"), i;
210
- const c = r[a];
239
+ function Me(e, t) {
240
+ const n = e.split("/").filter(Boolean), s = Te(t).split("/").filter(Boolean), l = {};
241
+ for (const [a, r] of n.entries()) {
242
+ if (r === "*")
243
+ return l["*"] = s.slice(a).join("/"), l;
244
+ const c = s[a];
211
245
  if (c === void 0) return null;
212
- if (s.startsWith(":")) {
213
- i[s.slice(1)] = c;
246
+ if (r.startsWith(":")) {
247
+ l[r.slice(1)] = c;
214
248
  continue;
215
249
  }
216
- if (s !== c) return null;
250
+ if (r !== c) return null;
217
251
  }
218
- return n.length !== r.length ? null : i;
252
+ return n.length !== s.length ? null : l;
219
253
  }
220
- function xe(e, t) {
221
- const n = [...e].sort((r, i) => Z(i.path) - Z(r.path));
222
- for (const r of n) {
223
- const i = ye(r.path, t);
224
- if (i) return { definition: r, params: i };
254
+ function Ce(e, t) {
255
+ const n = [...e].sort((s, l) => ne(l.path) - ne(s.path));
256
+ for (const s of n) {
257
+ const l = Me(s.path, t);
258
+ if (l) return { definition: s, params: l };
225
259
  }
226
260
  }
227
- function Z(e) {
261
+ function ne(e) {
228
262
  const t = e.split("/").filter(Boolean);
229
263
  let n = t.length;
230
- for (const r of t)
231
- r === "*" ? n -= 2 : r.startsWith(":") ? n += 1 : n += 4;
264
+ for (const s of t)
265
+ s === "*" ? n -= 2 : s.startsWith(":") ? n += 1 : n += 4;
232
266
  return n;
233
267
  }
234
- function Se(e) {
268
+ function Te(e) {
235
269
  const t = e.split("?")[0] ?? e;
236
270
  try {
237
271
  return decodeURI(t);
@@ -239,17 +273,17 @@ function Se(e) {
239
273
  return t;
240
274
  }
241
275
  }
242
- const Me = 2500;
243
- class _e extends Error {
276
+ const Ae = 2500;
277
+ class Pe extends Error {
244
278
  constructor(t) {
245
279
  super(`Falha de rede simulada no cenário "${t}".`), this.name = "SimulatedNetworkError";
246
280
  }
247
281
  }
248
- function Y(e) {
282
+ function X(e) {
249
283
  if (e)
250
284
  return typeof e.data == "function" ? e.data() : e.data;
251
285
  }
252
- const J = {
286
+ const Z = {
253
287
  id: "fixtures",
254
288
  label: "Fixtures",
255
289
  load: async ({ scenario: e, fixture: t, network: n }) => {
@@ -257,66 +291,66 @@ const J = {
257
291
  case "empty":
258
292
  return null;
259
293
  case "error":
260
- throw new _e(e.id);
294
+ throw new Pe(e.id);
261
295
  case "loading":
262
296
  return new Promise(() => {
263
297
  });
264
298
  case "slow":
265
- return await Ce(Me), Y(t);
299
+ return await Le(Ae), X(t);
266
300
  default:
267
- return Y(t);
301
+ return X(t);
268
302
  }
269
303
  }
270
304
  };
271
- function ft(e) {
272
- const { id: t, label: n, baseUrl: r, path: i, init: a, fallbackToFixture: s = !0 } = e;
305
+ function gt(e) {
306
+ const { id: t, label: n, baseUrl: s, path: l, init: a, fallbackToFixture: r = !0 } = e;
273
307
  return {
274
308
  id: t,
275
309
  label: n,
276
310
  load: async (c) => {
277
- const p = new URL(i ? i(c) : c.scenario.route, r);
311
+ const h = new URL(l ? l(c) : c.scenario.route, s);
278
312
  try {
279
- const h = await fetch(p, a);
280
- if (!h.ok) throw new Error(`${h.status} ${h.statusText}`);
281
- return await h.json();
282
- } catch (h) {
283
- if (s) return Y(c.fixture);
284
- throw new Error(`Adapter "${t}" falhou em ${p.toString()}`, { cause: h });
313
+ const p = await fetch(h, a);
314
+ if (!p.ok) throw new Error(`${p.status} ${p.statusText}`);
315
+ return await p.json();
316
+ } catch (p) {
317
+ if (r) return X(c.fixture);
318
+ throw new Error(`Adapter "${t}" falhou em ${h.toString()}`, { cause: p });
285
319
  }
286
320
  }
287
321
  };
288
322
  }
289
- function Ce(e) {
323
+ function Le(e) {
290
324
  return new Promise((t) => setTimeout(t, e));
291
325
  }
292
- function Te(e) {
293
- const { scenario: t, fixture: n, network: r, adapter: i } = e, [a, s] = F({
326
+ function $e(e) {
327
+ const { scenario: t, fixture: n, network: s, adapter: l } = e, [a, r] = $({
294
328
  data: void 0,
295
329
  isLoading: !!t,
296
330
  error: void 0
297
331
  });
298
- return B(() => {
332
+ return I(() => {
299
333
  if (!t) {
300
- s({ data: void 0, isLoading: !1, error: void 0 });
334
+ r({ data: void 0, isLoading: !1, error: void 0 });
301
335
  return;
302
336
  }
303
337
  let c = !0;
304
- s({ data: void 0, isLoading: !0, error: void 0 });
305
- const p = i ?? J;
306
- return Promise.resolve(p.load({ scenario: t, fixture: n, network: r })).then((h) => {
307
- c && s({ data: h, isLoading: !1, error: void 0 });
308
- }).catch((h) => {
309
- c && s({
338
+ r({ data: void 0, isLoading: !0, error: void 0 });
339
+ const h = l ?? Z;
340
+ return Promise.resolve(h.load({ scenario: t, fixture: n, network: s })).then((p) => {
341
+ c && r({ data: p, isLoading: !1, error: void 0 });
342
+ }).catch((p) => {
343
+ c && r({
310
344
  data: void 0,
311
345
  isLoading: !1,
312
- error: h instanceof Error ? h : new Error(String(h))
346
+ error: p instanceof Error ? p : new Error(String(p))
313
347
  });
314
348
  }), () => {
315
349
  c = !1;
316
350
  };
317
- }, [t, n, r, i]), a;
351
+ }, [t, n, s, l]), a;
318
352
  }
319
- const Pe = {
353
+ const Ee = {
320
354
  a: "link",
321
355
  article: "article",
322
356
  aside: "complementary",
@@ -350,7 +384,7 @@ const Pe = {
350
384
  th: "columnheader",
351
385
  tr: "row",
352
386
  ul: "list"
353
- }, Ae = {
387
+ }, Fe = {
354
388
  button: "button",
355
389
  checkbox: "checkbox",
356
390
  email: "textbox",
@@ -365,65 +399,65 @@ const Pe = {
365
399
  text: "textbox",
366
400
  url: "textbox"
367
401
  };
368
- function Le(e) {
402
+ function Re(e) {
369
403
  if (!e || !(e instanceof HTMLElement)) return;
370
- const { name: t, nameFrom: n } = Fe(e);
404
+ const { name: t, nameFrom: n } = Oe(e);
371
405
  return {
372
- role: Ee(e),
406
+ role: De(e),
373
407
  name: t,
374
408
  nameFrom: n,
375
- description: $e(e),
376
- states: De(e),
377
- selector: Ie(e),
409
+ description: Ie(e),
410
+ states: Be(e),
411
+ selector: He(e),
378
412
  hiddenFromTabOrder: e.tabIndex < 0,
379
- hiddenFromAssistiveTech: Re(e)
413
+ hiddenFromAssistiveTech: We(e)
380
414
  };
381
415
  }
382
- function Ee(e) {
416
+ function De(e) {
383
417
  const t = e.getAttribute("role");
384
418
  if (t) return t.split(/\s+/)[0] ?? t;
385
419
  const n = e.tagName.toLowerCase();
386
420
  if (n === "input") {
387
- const r = e.type.toLowerCase();
388
- return Ae[r] ?? "textbox";
421
+ const s = e.type.toLowerCase();
422
+ return Fe[s] ?? "textbox";
389
423
  }
390
- return n === "a" && !e.hasAttribute("href") ? "generic" : Pe[n] ?? "generic";
424
+ return n === "a" && !e.hasAttribute("href") ? "generic" : Ee[n] ?? "generic";
391
425
  }
392
- function Fe(e) {
426
+ function Oe(e) {
393
427
  const t = e.getAttribute("aria-labelledby");
394
428
  if (t) {
395
- const s = t.split(/\s+/).map((c) => e.ownerDocument.getElementById(c)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
396
- if (s) return { name: s, nameFrom: "aria-labelledby" };
429
+ const r = t.split(/\s+/).map((c) => e.ownerDocument.getElementById(c)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
430
+ if (r) return { name: r, nameFrom: "aria-labelledby" };
397
431
  }
398
432
  const n = e.getAttribute("aria-label")?.trim();
399
433
  if (n) return { name: n, nameFrom: "aria-label" };
400
434
  if (e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement) {
401
- const s = Array.from(e.labels ?? []).map((c) => c.textContent?.trim() ?? "").filter(Boolean);
402
- if (s.length) return { name: s.join(" "), nameFrom: "label" };
435
+ const r = Array.from(e.labels ?? []).map((c) => c.textContent?.trim() ?? "").filter(Boolean);
436
+ if (r.length) return { name: r.join(" "), nameFrom: "label" };
403
437
  }
404
438
  if (e instanceof HTMLImageElement) {
405
- const s = e.getAttribute("alt");
406
- if (s !== null) return { name: s, nameFrom: "alt" };
439
+ const r = e.getAttribute("alt");
440
+ if (r !== null) return { name: r, nameFrom: "alt" };
407
441
  }
408
- const r = e.getAttribute("title")?.trim(), i = Oe(e);
409
- return i ? { name: i, nameFrom: "content" } : r ? { name: r, nameFrom: "title" } : e instanceof HTMLInputElement && e.value ? { name: e.value, nameFrom: "value" } : e.getAttribute("placeholder")?.trim() ? { name: "", nameFrom: "none" } : { name: "", nameFrom: "none" };
442
+ const s = e.getAttribute("title")?.trim(), l = je(e);
443
+ return l ? { name: l, nameFrom: "content" } : s ? { name: s, nameFrom: "title" } : e instanceof HTMLInputElement && e.value ? { name: e.value, nameFrom: "value" } : e.getAttribute("placeholder")?.trim() ? { name: "", nameFrom: "none" } : { name: "", nameFrom: "none" };
410
444
  }
411
- function $e(e) {
445
+ function Ie(e) {
412
446
  const t = e.getAttribute("aria-describedby");
413
447
  if (t) {
414
- const n = t.split(/\s+/).map((r) => e.ownerDocument.getElementById(r)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
448
+ const n = t.split(/\s+/).map((s) => e.ownerDocument.getElementById(s)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
415
449
  if (n) return n;
416
450
  }
417
451
  return e.getAttribute("aria-description")?.trim() || void 0;
418
452
  }
419
- function De(e) {
420
- const t = [], n = (r, i = r.replace("aria-", "")) => {
421
- const a = e.getAttribute(r);
422
- a !== null && a !== "false" && t.push(a === "true" || a === "" ? i : `${i}=${a}`);
453
+ function Be(e) {
454
+ const t = [], n = (s, l = s.replace("aria-", "")) => {
455
+ const a = e.getAttribute(s);
456
+ a !== null && a !== "false" && t.push(a === "true" || a === "" ? l : `${l}=${a}`);
423
457
  };
424
458
  return e.disabled && t.push("disabled"), e.getAttribute("aria-disabled") === "true" && t.push("disabled"), e.required && t.push("required"), e.readOnly && t.push("readonly"), e.checked && t.push("checked"), n("aria-expanded"), n("aria-selected"), n("aria-checked"), n("aria-pressed"), n("aria-current"), n("aria-invalid"), n("aria-busy"), n("aria-live"), n("aria-haspopup"), n("aria-level", "level"), e.ownerDocument.activeElement === e && t.push("focused"), [...new Set(t)];
425
459
  }
426
- function Re(e) {
460
+ function We(e) {
427
461
  let t = e;
428
462
  for (; t; ) {
429
463
  if (t.getAttribute("aria-hidden") === "true" || t.hasAttribute("hidden")) return !0;
@@ -431,21 +465,21 @@ function Re(e) {
431
465
  }
432
466
  return !1;
433
467
  }
434
- function Oe(e) {
468
+ function je(e) {
435
469
  const t = e.cloneNode(!0);
436
470
  for (const n of t.querySelectorAll("[aria-hidden='true'],[hidden]"))
437
471
  n.remove();
438
472
  return (t.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 160);
439
473
  }
440
- function Ie(e) {
474
+ function He(e) {
441
475
  const t = e.tagName.toLowerCase();
442
476
  if (e.id) return `${t}#${e.id}`;
443
477
  const n = e.getAttribute("data-testid");
444
478
  if (n) return `${t}[data-testid="${n}"]`;
445
- const r = Array.from(e.classList).slice(0, 2);
446
- return r.length ? `${t}.${r.join(".")}` : t;
479
+ const s = Array.from(e.classList).slice(0, 2);
480
+ return s.length ? `${t}.${s.join(".")}` : t;
447
481
  }
448
- function Be(e = document) {
482
+ function Ke(e = document) {
449
483
  const t = [
450
484
  "a[href]",
451
485
  "button",
@@ -458,40 +492,40 @@ function Be(e = document) {
458
492
  ].join(",");
459
493
  return Array.from(e.querySelectorAll(t)).filter((n) => {
460
494
  if (n.tabIndex < 0 || n.disabled || n.getAttribute("aria-hidden") === "true") return !1;
461
- const r = window.getComputedStyle(n);
462
- return r.display === "none" || r.visibility === "hidden" ? !1 : n.offsetWidth > 0 || n.offsetHeight > 0 || n === document.activeElement;
495
+ const s = window.getComputedStyle(n);
496
+ return s.display === "none" || s.visibility === "hidden" ? !1 : n.offsetWidth > 0 || n.offsetHeight > 0 || n === document.activeElement;
463
497
  });
464
498
  }
465
- function We(e, t) {
466
- const [n, r] = F(), [i, a] = F([]), s = I(() => {
499
+ function ze(e, t) {
500
+ const [n, s] = $(), [l, a] = $([]), r = E(() => {
467
501
  const c = t.current;
468
502
  if (!c) {
469
503
  a([]);
470
504
  return;
471
505
  }
472
506
  a(
473
- Be(c).map((p, h) => ({
474
- index: h + 1,
475
- element: p,
476
- rect: p.getBoundingClientRect(),
477
- forcedOrder: p.tabIndex > 0
507
+ Ke(c).map((h, p) => ({
508
+ index: p + 1,
509
+ element: h,
510
+ rect: h.getBoundingClientRect(),
511
+ forcedOrder: h.tabIndex > 0
478
512
  }))
479
513
  );
480
514
  }, [t]);
481
- return B(() => {
515
+ return I(() => {
482
516
  if (!e) {
483
- r(void 0), a([]);
517
+ s(void 0), a([]);
484
518
  return;
485
519
  }
486
- const c = () => r(Le(document.activeElement));
487
- document.addEventListener("focusin", c), window.addEventListener("resize", s), window.addEventListener("scroll", s, !0), c(), s();
488
- const p = t.current, h = p ? new MutationObserver(() => s()) : void 0;
489
- return h?.observe(p, { childList: !0, subtree: !0, attributes: !0 }), () => {
490
- document.removeEventListener("focusin", c), window.removeEventListener("resize", s), window.removeEventListener("scroll", s, !0), h?.disconnect();
520
+ const c = () => s(Re(document.activeElement));
521
+ document.addEventListener("focusin", c), window.addEventListener("resize", r), window.addEventListener("scroll", r, !0), c(), r();
522
+ const h = t.current, p = h ? new MutationObserver(() => r()) : void 0;
523
+ return p?.observe(h, { childList: !0, subtree: !0, attributes: !0 }), () => {
524
+ document.removeEventListener("focusin", c), window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0), p?.disconnect();
491
525
  };
492
- }, [e, s, t]), { focused: n, tabStops: i, refresh: s };
526
+ }, [e, r, t]), { focused: n, tabStops: l, refresh: r };
493
527
  }
494
- const E = {
528
+ const L = {
495
529
  status: {
496
530
  ported: "Portado — não validado",
497
531
  proposed: "Proposta",
@@ -557,6 +591,13 @@ const E = {
557
591
  matchCount: (e) => `${e} ${e === 1 ? "situação" : "situações"}.`,
558
592
  noComponentMatch: (e) => `Nenhum componente para "${e}".`,
559
593
  componentMatchCount: (e) => `${e} ${e === 1 ? "componente" : "componentes"}.`,
594
+ activeWork: "Trabalho ativo",
595
+ portedReferences: (e) => `Referências portadas · ${e}`,
596
+ viewPorted: (e) => `Ver ${e} ${e === 1 ? "referência portada" : "referências portadas"}`,
597
+ backToActive: "Voltar ao trabalho ativo",
598
+ currentView: (e) => `Visão atual: ${e}`,
599
+ noActiveWork: "Não há cenários no trabalho ativo.",
600
+ noPortedReferences: "Não há referências portadas.",
560
601
  showPorted: "Mostrar portados",
561
602
  activePorted: "Aberto por link direto; oculto do trabalho ativo",
562
603
  emptyModule: "Nenhum cenário ainda.",
@@ -645,18 +686,20 @@ const E = {
645
686
  },
646
687
  home: {
647
688
  lead: (e) => `Especificação executável: cada situação abaixo abre por link, com persona, dados e regras próprios. ${e} ${e === 1 ? "situação registrada" : "situações registradas"}.`,
689
+ statusLegend: "Legenda dos status",
648
690
  withoutModule: "Sem módulo",
649
691
  withoutModuleHint: "O prefixo do id não corresponde a nenhum módulo registrado, então estas situações não aparecem na navegação por módulo.",
650
692
  emptyModule: "Nenhuma situação registrada neste módulo ainda.",
651
693
  keyboardBadge: "teclado",
652
- noActiveWork: "Não há trabalho ativo. As referências portadas continuam registradas e podem ser exibidas com “Mostrar portados”."
694
+ noActiveWork: "Não há cenários no trabalho ativo.",
695
+ noPortedReferences: "Não há referências portadas nesta coleção."
653
696
  },
654
697
  shell: {
655
698
  restoreChrome: "Mostrar controles",
656
699
  noRoute: "Nenhuma rota para este endereço",
657
700
  noRouteHint: "não casa com nenhuma rota declarada. Escolha uma situação na navegação."
658
701
  }
659
- }, bt = {
702
+ }, wt = {
660
703
  status: {
661
704
  ported: "Ported — not validated",
662
705
  proposed: "Proposed",
@@ -722,6 +765,13 @@ const E = {
722
765
  matchCount: (e) => `${e} ${e === 1 ? "scenario" : "scenarios"}.`,
723
766
  noComponentMatch: (e) => `No components found for "${e}".`,
724
767
  componentMatchCount: (e) => `${e} ${e === 1 ? "component" : "components"}.`,
768
+ activeWork: "Active work",
769
+ portedReferences: (e) => `Ported references · ${e}`,
770
+ viewPorted: (e) => `View ${e} ported ${e === 1 ? "reference" : "references"}`,
771
+ backToActive: "Back to active work",
772
+ currentView: (e) => `Current view: ${e}`,
773
+ noActiveWork: "There are no scenarios in active work.",
774
+ noPortedReferences: "There are no ported references.",
725
775
  showPorted: "Show ported",
726
776
  activePorted: "Opened by direct link; hidden from active work",
727
777
  emptyModule: "No scenarios yet.",
@@ -810,11 +860,13 @@ const E = {
810
860
  },
811
861
  home: {
812
862
  lead: (e) => `Executable specification: each state below opens from a link with its own persona, data, and rules. ${e} ${e === 1 ? "state registered" : "states registered"}.`,
863
+ statusLegend: "Status legend",
813
864
  withoutModule: "No module",
814
865
  withoutModuleHint: "The ID prefix does not match a registered module, so these states do not appear in module navigation.",
815
866
  emptyModule: "No states have been registered in this module yet.",
816
867
  keyboardBadge: "keyboard",
817
- noActiveWork: "There is no active work. Ported references remain registered and can be included with “Show ported”."
868
+ noActiveWork: "There are no scenarios in active work.",
869
+ noPortedReferences: "There are no ported references in this collection."
818
870
  },
819
871
  shell: {
820
872
  restoreChrome: "Show controls",
@@ -822,77 +874,76 @@ const E = {
822
874
  noRouteHint: "does not match any declared route. Choose a state from the navigation."
823
875
  }
824
876
  };
825
- function je(e) {
826
- if (!e) return E;
827
- const t = { ...E };
828
- for (const n of Object.keys(E)) {
829
- const r = e[n];
830
- r && (t[n] = { ...E[n], ...r });
877
+ function Ue(e) {
878
+ if (!e) return L;
879
+ const t = { ...L };
880
+ for (const n of Object.keys(L)) {
881
+ const s = e[n];
882
+ s && (t[n] = { ...L[n], ...s });
831
883
  }
832
884
  return t;
833
885
  }
834
- const ae = ie(E);
835
- function A() {
836
- return se(ae);
886
+ const de = he(L);
887
+ function P() {
888
+ return ue(de);
837
889
  }
838
- const gt = E.status, vt = E.statusMeaning, wt = E.network, kt = E.keyboard;
839
- function He({
890
+ const kt = L.status, Nt = L.statusMeaning, xt = L.network, yt = L.keyboard;
891
+ function Ve({
840
892
  registry: e,
841
893
  activeScenario: t,
842
894
  activeComponent: n,
843
- controls: r,
844
- onOpenScenario: i,
895
+ controls: s,
896
+ onOpenScenario: l,
845
897
  onOpenComponent: a,
846
- onShowPortedChange: s
898
+ onViewChange: r
847
899
  }) {
848
- const c = A(), [p, h] = F(n ? "components" : "flows"), [m, b] = F(""), [u, S] = F(/* @__PURE__ */ new Set()), w = q(null), C = q(/* @__PURE__ */ new Map());
849
- B(() => {
850
- n ? h("components") : t && h("flows");
851
- }, [n, t]), B(() => {
852
- const f = (N) => {
853
- Ue(N) && (N.preventDefault(), w.current?.focus(), w.current?.select());
900
+ const c = P(), [h, p] = $(n ? "components" : "flows"), [m, v] = $(""), [i, N] = $(/* @__PURE__ */ new Set()), x = Q(null), S = Q(/* @__PURE__ */ new Map()), d = ee(s), f = e.byStatus("ported").length, k = e.activeScenarios({ view: d }).length, M = d === "ported" ? c.sidebar.portedReferences(f) : c.sidebar.activeWork;
901
+ I(() => {
902
+ n ? p("components") : t && p("flows");
903
+ }, [n, t]), I(() => {
904
+ const b = (w) => {
905
+ Ye(w) && (w.preventDefault(), x.current?.focus(), x.current?.select());
854
906
  };
855
- return window.addEventListener("keydown", f), () => window.removeEventListener("keydown", f);
907
+ return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
856
908
  }, []);
857
- const l = T(() => {
909
+ const _ = C(() => {
858
910
  if (m.trim())
859
911
  return new Set(
860
- e.search(m, { includePorted: r.showPorted }).map((f) => f.id)
912
+ e.search(m, { view: d }).map((b) => b.id)
861
913
  );
862
- }, [r.showPorted, m, e]), g = T(() => {
863
- const f = te(m);
914
+ }, [m, e, d]), T = C(() => {
915
+ const b = re(m);
864
916
  return (e.product.components ?? []).filter(
865
- (N) => te([N.name, N.id, N.group, N.description].join(" ")).includes(
866
- f
917
+ (w) => re([w.name, w.id, w.group, w.description].join(" ")).includes(
918
+ b
867
919
  )
868
920
  );
869
- }, [m, e.product.components]), k = (f) => l ? f.filter((N) => l.has(N.id)) : f, M = {
870
- includePorted: r.showPorted,
871
- activeScenario: m.trim() ? void 0 : t?.id
872
- }, _ = e.treeFor(M).map((f) => ({ ...f, scenarios: k(f.scenarios) })).filter((f) => l ? f.scenarios.length > 0 : !0), $ = k(e.orphansFor(M)), D = _.reduce((f, N) => f + N.scenarios.length, 0) + $.length, W = ze(g), R = p === "flows" ? [..._.flatMap((f) => f.scenarios), ...$].map((f) => f.id) : g.map((f) => f.id), j = (f, N) => {
873
- if (R.length === 0) return;
874
- const y = Ge(R, f, N);
875
- y && C.current.get(y)?.focus();
876
- }, U = (f) => {
877
- f.key === "ArrowDown" ? (f.preventDefault(), j(void 0, 1)) : f.key === "Escape" && b("");
878
- }, O = (f, N) => {
879
- N.key !== "ArrowDown" && N.key !== "ArrowUp" || (N.preventDefault(), j(f, N.key === "ArrowDown" ? 1 : -1));
880
- }, H = (f, N) => {
881
- N ? C.current.set(f, N) : C.current.delete(f);
882
- }, K = (f) => S((N) => {
883
- const y = new Set(N);
884
- return y.has(f) ? y.delete(f) : y.add(f), y;
921
+ }, [m, e.product.components]), B = (b) => _ ? b.filter((w) => _.has(w.id)) : b, W = {
922
+ view: d
923
+ }, F = e.treeFor(W).map((b) => ({ ...b, scenarios: B(b.scenarios) })).filter((b) => b.scenarios.length > 0), R = B(e.orphansFor(W)), D = F.reduce((b, w) => b + w.scenarios.length, 0) + R.length, j = qe(T), z = h === "flows" ? [...F.flatMap((b) => b.scenarios), ...R].map((b) => b.id) : T.map((b) => b.id), O = (b, w) => {
924
+ if (z.length === 0) return;
925
+ const y = Je(z, b, w);
926
+ y && S.current.get(y)?.focus();
927
+ }, U = (b) => {
928
+ b.key === "ArrowDown" ? (b.preventDefault(), O(void 0, 1)) : b.key === "Escape" && v("");
929
+ }, H = (b, w) => {
930
+ w.key !== "ArrowDown" && w.key !== "ArrowUp" || (w.preventDefault(), O(b, w.key === "ArrowDown" ? 1 : -1));
931
+ }, K = (b, w) => {
932
+ w ? S.current.set(b, w) : S.current.delete(b);
933
+ }, V = (b) => N((w) => {
934
+ const y = new Set(w);
935
+ return y.has(b) ? y.delete(b) : y.add(b), y;
885
936
  });
886
- return /* @__PURE__ */ d("nav", { className: "ds-chrome ds-sidebar", "aria-label": c.sidebar.region, children: [
887
- /* @__PURE__ */ d("div", { className: "ds-sidebar__tabs", role: "tablist", children: [
937
+ return /* @__PURE__ */ u("nav", { className: "ds-chrome ds-sidebar", "aria-label": c.sidebar.region, children: [
938
+ /* @__PURE__ */ u("div", { className: "ds-sidebar__tabs", role: "tablist", children: [
888
939
  /* @__PURE__ */ o(
889
940
  "button",
890
941
  {
891
942
  type: "button",
892
943
  role: "tab",
893
- "aria-selected": p === "flows",
944
+ "aria-selected": h === "flows",
894
945
  onClick: () => {
895
- h("flows"), b("");
946
+ p("flows"), v("");
896
947
  },
897
948
  children: c.sidebar.flowsTab
898
949
  }
@@ -902,98 +953,124 @@ function He({
902
953
  {
903
954
  type: "button",
904
955
  role: "tab",
905
- "aria-selected": p === "components",
956
+ "aria-selected": h === "components",
906
957
  onClick: () => {
907
- h("components"), b("");
958
+ p("components"), v("");
908
959
  },
909
960
  children: c.sidebar.componentsTab
910
961
  }
911
962
  )
912
963
  ] }),
913
- /* @__PURE__ */ d("div", { className: "ds-sidebar__search", children: [
964
+ /* @__PURE__ */ u("div", { className: "ds-sidebar__search", children: [
914
965
  /* @__PURE__ */ o(
915
966
  "input",
916
967
  {
917
- ref: w,
968
+ ref: x,
918
969
  className: "ds-input ds-input--search",
919
970
  type: "search",
920
971
  value: m,
921
- placeholder: p === "flows" ? c.sidebar.searchPlaceholder : c.sidebar.componentSearchPlaceholder,
922
- "aria-label": p === "flows" ? c.sidebar.searchLabel : c.sidebar.componentSearchLabel,
923
- onChange: (f) => b(f.target.value),
972
+ placeholder: h === "flows" ? c.sidebar.searchPlaceholder : c.sidebar.componentSearchPlaceholder,
973
+ "aria-label": h === "flows" ? c.sidebar.searchLabel : c.sidebar.componentSearchLabel,
974
+ onChange: (b) => v(b.target.value),
924
975
  onKeyDown: U
925
976
  }
926
977
  ),
927
978
  /* @__PURE__ */ o("kbd", { children: c.sidebar.searchShortcut })
928
979
  ] }),
929
- p === "flows" && /* @__PURE__ */ d("label", { className: "ds-sidebar__option", children: [
930
- /* @__PURE__ */ o(
931
- "input",
932
- {
933
- type: "checkbox",
934
- checked: r.showPorted ?? !1,
935
- onChange: (f) => s(f.target.checked)
936
- }
937
- ),
938
- /* @__PURE__ */ o("span", { children: c.sidebar.showPorted })
939
- ] }),
940
- /* @__PURE__ */ d("div", { className: "ds-sidebar__tree", role: "tabpanel", children: [
941
- m.trim() !== "" && /* @__PURE__ */ o("p", { className: "ds-sidebar__empty", role: "status", children: p === "flows" ? D === 0 ? c.sidebar.noMatch(m) : c.sidebar.matchCount(D) : g.length === 0 ? c.sidebar.noComponentMatch(m) : c.sidebar.componentMatchCount(g.length) }),
942
- p === "flows" ? /* @__PURE__ */ o(
943
- Ke,
944
- {
945
- nodes: _,
946
- orphans: $,
947
- matches: l,
948
- collapsed: u,
949
- activeScenario: t?.id,
950
- showPorted: r.showPorted ?? !1,
951
- activePortedLabel: c.sidebar.activePorted,
952
- emptyModuleLabel: c.sidebar.emptyModule,
953
- withoutModuleLabel: c.sidebar.withoutModule,
954
- onToggle: K,
955
- onOpen: i,
956
- onKeyDown: O,
957
- setItemRef: H
958
- }
959
- ) : W.length === 0 && !m ? /* @__PURE__ */ o("p", { className: "ds-sidebar__empty", children: c.sidebar.emptyComponents }) : W.map(([f, N]) => /* @__PURE__ */ d("section", { className: "ds-component-group", children: [
960
- /* @__PURE__ */ o("h2", { children: f }),
961
- /* @__PURE__ */ o("ul", { children: N.map((y) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ d(
962
- "button",
963
- {
964
- ref: (x) => H(y.id, x),
965
- type: "button",
966
- className: "ds-component-item",
967
- "aria-current": y.id === n,
968
- onClick: () => a(y.id),
969
- onKeyDown: (x) => O(y.id, x),
970
- children: [
971
- /* @__PURE__ */ o("span", { children: y.name }),
972
- y.description && /* @__PURE__ */ o("small", { children: y.description })
973
- ]
974
- }
975
- ) }, y.id)) })
976
- ] }, f))
977
- ] }),
978
- p === "flows" && t && /* @__PURE__ */ d("aside", { className: "ds-sidebar__scope", "aria-label": c.sidebar.scope, children: [
980
+ /* @__PURE__ */ u(
981
+ "div",
982
+ {
983
+ className: "ds-sidebar__tree",
984
+ role: "tabpanel",
985
+ "aria-label": h === "flows" ? c.sidebar.currentView(M) : void 0,
986
+ children: [
987
+ h === "flows" && /* @__PURE__ */ u("header", { className: "ds-sidebar__view-header", children: [
988
+ /* @__PURE__ */ o("h2", { children: M }),
989
+ d === "ported" && /* @__PURE__ */ o(
990
+ "button",
991
+ {
992
+ type: "button",
993
+ className: "ds-text-action",
994
+ onClick: () => r("active"),
995
+ children: c.sidebar.backToActive
996
+ }
997
+ )
998
+ ] }),
999
+ m.trim() !== "" && /* @__PURE__ */ o("p", { className: "ds-sidebar__empty", role: "status", children: h === "flows" ? D === 0 ? c.sidebar.noMatch(m) : c.sidebar.matchCount(D) : T.length === 0 ? c.sidebar.noComponentMatch(m) : c.sidebar.componentMatchCount(T.length) }),
1000
+ h === "flows" && m.trim() === "" && k === 0 ? /* @__PURE__ */ u("div", { className: "ds-sidebar__view-empty", children: [
1001
+ /* @__PURE__ */ o("p", { children: d === "ported" ? c.sidebar.noPortedReferences : c.sidebar.noActiveWork }),
1002
+ d === "active" && f > 0 && /* @__PURE__ */ o(
1003
+ "button",
1004
+ {
1005
+ type: "button",
1006
+ className: "ds-text-action",
1007
+ onClick: () => r("ported"),
1008
+ children: c.sidebar.viewPorted(f)
1009
+ }
1010
+ )
1011
+ ] }) : h === "flows" ? /* @__PURE__ */ o(
1012
+ Ge,
1013
+ {
1014
+ nodes: F,
1015
+ orphans: R,
1016
+ matches: _,
1017
+ collapsed: i,
1018
+ activeScenario: t?.id,
1019
+ withoutModuleLabel: c.sidebar.withoutModule,
1020
+ onToggle: V,
1021
+ onOpen: l,
1022
+ onKeyDown: H,
1023
+ setItemRef: K
1024
+ }
1025
+ ) : j.length === 0 && !m ? /* @__PURE__ */ o("p", { className: "ds-sidebar__empty", children: c.sidebar.emptyComponents }) : j.map(([b, w]) => /* @__PURE__ */ u("section", { className: "ds-component-group", children: [
1026
+ /* @__PURE__ */ o("h2", { children: b }),
1027
+ /* @__PURE__ */ o("ul", { children: w.map((y) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ u(
1028
+ "button",
1029
+ {
1030
+ ref: (G) => K(y.id, G),
1031
+ type: "button",
1032
+ className: "ds-component-item",
1033
+ "aria-current": y.id === n,
1034
+ onClick: () => a(y.id),
1035
+ onKeyDown: (G) => H(y.id, G),
1036
+ children: [
1037
+ /* @__PURE__ */ o("span", { children: y.name }),
1038
+ y.description && /* @__PURE__ */ o("small", { children: y.description })
1039
+ ]
1040
+ }
1041
+ ) }, y.id)) })
1042
+ ] }, b))
1043
+ ]
1044
+ }
1045
+ ),
1046
+ h === "flows" && d === "active" && k > 0 && f > 0 && /* @__PURE__ */ o("div", { className: "ds-sidebar__view-footer", children: /* @__PURE__ */ o(
1047
+ "button",
1048
+ {
1049
+ type: "button",
1050
+ className: "ds-text-action",
1051
+ onClick: () => r("ported"),
1052
+ children: c.sidebar.viewPorted(f)
1053
+ }
1054
+ ) }),
1055
+ h === "flows" && t && /* @__PURE__ */ u("aside", { className: "ds-sidebar__scope", "aria-label": c.sidebar.scope, children: [
979
1056
  /* @__PURE__ */ o("h2", { children: c.sidebar.scope }),
980
- /* @__PURE__ */ d("dl", { children: [
1057
+ /* @__PURE__ */ u("dl", { children: [
981
1058
  /* @__PURE__ */ o("dt", { children: c.sidebar.scopeData }),
982
- /* @__PURE__ */ o("dd", { children: e.fixture(r.fixture ?? t.fixture)?.label ?? c.controls.none }),
1059
+ /* @__PURE__ */ o("dd", { children: e.fixture(s.fixture ?? t.fixture)?.label ?? c.controls.none }),
983
1060
  /* @__PURE__ */ o("dt", { children: c.sidebar.scopePersona }),
984
- /* @__PURE__ */ o("dd", { children: e.persona(r.persona ?? t.persona)?.name ?? c.controls.none }),
1061
+ /* @__PURE__ */ o("dd", { children: e.persona(s.persona ?? t.persona)?.name ?? c.controls.none }),
985
1062
  /* @__PURE__ */ o("dt", { children: c.sidebar.scopeNetwork }),
986
- /* @__PURE__ */ o("dd", { children: c.network[r.network] })
1063
+ /* @__PURE__ */ o("dd", { children: c.network[s.network] })
987
1064
  ] })
988
1065
  ] })
989
1066
  ] });
990
1067
  }
991
- function Ke(e) {
992
- return /* @__PURE__ */ d(P, { children: [
1068
+ function Ge(e) {
1069
+ return /* @__PURE__ */ u(A, { children: [
993
1070
  e.nodes.map((t) => {
994
1071
  const n = !e.collapsed.has(t.module.id) || !!e.matches;
995
- return /* @__PURE__ */ d("section", { className: "ds-module", children: [
996
- /* @__PURE__ */ d(
1072
+ return /* @__PURE__ */ u("section", { className: "ds-module", children: [
1073
+ /* @__PURE__ */ u(
997
1074
  "button",
998
1075
  {
999
1076
  type: "button",
@@ -1007,139 +1084,133 @@ function Ke(e) {
1007
1084
  ]
1008
1085
  }
1009
1086
  ),
1010
- n && /* @__PURE__ */ d("ul", { className: "ds-module__scenarios", children: [
1011
- t.scenarios.map((r) => /* @__PURE__ */ o(ee, { scenario: r, ...e }, r.id)),
1012
- t.scenarios.length === 0 && /* @__PURE__ */ o("li", { className: "ds-sidebar__empty", children: e.emptyModuleLabel })
1013
- ] })
1087
+ n && /* @__PURE__ */ o("ul", { className: "ds-module__scenarios", children: t.scenarios.map((s) => /* @__PURE__ */ o(ae, { scenario: s, ...e }, s.id)) })
1014
1088
  ] }, t.module.id);
1015
1089
  }),
1016
- e.orphans.length > 0 && /* @__PURE__ */ d("section", { className: "ds-module", children: [
1017
- /* @__PURE__ */ d("div", { className: "ds-module__header", "aria-hidden": "true", children: [
1090
+ e.orphans.length > 0 && /* @__PURE__ */ u("section", { className: "ds-module", children: [
1091
+ /* @__PURE__ */ u("div", { className: "ds-module__header", "aria-hidden": "true", children: [
1018
1092
  /* @__PURE__ */ o("span", { className: "ds-module__chevron", children: "▶" }),
1019
1093
  /* @__PURE__ */ o("span", { children: e.withoutModuleLabel }),
1020
1094
  /* @__PURE__ */ o("span", { className: "ds-module__count", children: e.orphans.length })
1021
1095
  ] }),
1022
- /* @__PURE__ */ o("ul", { className: "ds-module__scenarios", children: e.orphans.map((t) => /* @__PURE__ */ o(ee, { scenario: t, ...e }, t.id)) })
1096
+ /* @__PURE__ */ o("ul", { className: "ds-module__scenarios", children: e.orphans.map((t) => /* @__PURE__ */ o(ae, { scenario: t, ...e }, t.id)) })
1023
1097
  ] })
1024
1098
  ] });
1025
1099
  }
1026
- function ee({
1100
+ function ae({
1027
1101
  scenario: e,
1028
1102
  activeScenario: t,
1029
- showPorted: n,
1030
- activePortedLabel: r,
1031
- onOpen: i,
1032
- onKeyDown: a,
1033
- setItemRef: s
1103
+ onOpen: n,
1104
+ onKeyDown: s,
1105
+ setItemRef: l
1034
1106
  }) {
1035
- const c = A().status[e.status], p = e.status === "ported" && e.id === t && !n;
1036
- return /* @__PURE__ */ o("li", { children: /* @__PURE__ */ d(
1107
+ const a = P().status[e.status];
1108
+ return /* @__PURE__ */ o("li", { children: /* @__PURE__ */ u(
1037
1109
  "button",
1038
1110
  {
1039
- ref: (h) => s(e.id, h),
1111
+ ref: (r) => l(e.id, r),
1040
1112
  type: "button",
1041
1113
  className: "ds-scenario",
1042
1114
  "aria-current": e.id === t,
1043
- onClick: () => i(e.id),
1044
- onKeyDown: (h) => a(e.id, h),
1115
+ onClick: () => n(e.id),
1116
+ onKeyDown: (r) => s(e.id, r),
1045
1117
  children: [
1046
- /* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": e.status, title: c }),
1118
+ /* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": e.status, title: a }),
1047
1119
  /* @__PURE__ */ o("span", { className: "ds-scenario__title", children: e.title }),
1048
- /* @__PURE__ */ o("span", { className: "ds-visually-hidden", children: c }),
1049
- p && /* @__PURE__ */ o("span", { className: "ds-scenario__flag", title: r, children: c })
1120
+ /* @__PURE__ */ o("span", { className: "ds-visually-hidden", children: a })
1050
1121
  ]
1051
1122
  }
1052
1123
  ) });
1053
1124
  }
1054
- function ze(e) {
1125
+ function qe(e) {
1055
1126
  const t = /* @__PURE__ */ new Map();
1056
1127
  for (const n of e) {
1057
- const r = n.group ?? "Componentes";
1058
- t.set(r, [...t.get(r) ?? [], n]);
1128
+ const s = n.group ?? "Componentes";
1129
+ t.set(s, [...t.get(s) ?? [], n]);
1059
1130
  }
1060
1131
  return [...t.entries()];
1061
1132
  }
1062
- function te(e) {
1133
+ function re(e) {
1063
1134
  return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim();
1064
1135
  }
1065
- function Ue(e) {
1136
+ function Ye(e) {
1066
1137
  const t = e.key.toLowerCase();
1067
1138
  return (e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && (t === "k" || t === "f");
1068
1139
  }
1069
- function Ge(e, t, n) {
1140
+ function Je(e, t, n) {
1070
1141
  if (e.length === 0) return;
1071
- const r = t ? e.indexOf(t) : -1, i = Math.max(0, Math.min(e.length - 1, r + n));
1072
- return e[i];
1142
+ const s = t ? e.indexOf(t) : -1, l = Math.max(0, Math.min(e.length - 1, s + n));
1143
+ return e[l];
1073
1144
  }
1074
- function Ve({
1145
+ function Qe({
1075
1146
  product: e,
1076
1147
  scenario: t,
1077
1148
  deploy: n,
1078
- inspectorOpen: r,
1079
- chromeTheme: i,
1080
- showPorted: a,
1081
- onToggleInspector: s,
1149
+ inspectorOpen: s,
1150
+ chromeTheme: l,
1151
+ view: a,
1152
+ onToggleInspector: r,
1082
1153
  onToggleChromeTheme: c
1083
1154
  }) {
1084
- const p = A().topbar, [h, m] = F(!1), b = async () => {
1085
- const w = t ? ue(t, {
1155
+ const h = P().topbar, [p, m] = $(!1), v = async () => {
1156
+ const x = t ? fe(t, {
1086
1157
  origin: n.origin,
1087
1158
  overrides: {
1088
- ...i === "light" ? { chromeTheme: i } : {},
1089
- ...a ? { showPorted: !0 } : {}
1159
+ ...l === "light" ? { chromeTheme: l } : {},
1160
+ ...a === "ported" ? { view: a } : {}
1090
1161
  }
1091
1162
  }) : `${n.origin}${window.location.pathname}${window.location.search}`;
1092
1163
  try {
1093
- await navigator.clipboard.writeText(w);
1164
+ await navigator.clipboard.writeText(x);
1094
1165
  } catch {
1095
- window.prompt(p.copyPrompt, w);
1166
+ window.prompt(h.copyPrompt, x);
1096
1167
  }
1097
1168
  m(!0), window.setTimeout(() => m(!1), 1600);
1098
- }, u = qe(
1169
+ }, i = Xe(
1099
1170
  typeof window > "u" ? `${n.origin}/` : window.location.href
1100
- ), S = Ye(n.origin, i, a);
1101
- return /* @__PURE__ */ d("header", { className: "ds-chrome ds-topbar", children: [
1102
- /* @__PURE__ */ d("div", { className: "ds-topbar__product", children: [
1171
+ ), N = Ze(n.origin, l, a);
1172
+ return /* @__PURE__ */ u("header", { className: "ds-chrome ds-topbar", children: [
1173
+ /* @__PURE__ */ u("div", { className: "ds-topbar__product", children: [
1103
1174
  /* @__PURE__ */ o(
1104
1175
  "a",
1105
1176
  {
1106
1177
  className: "ds-topbar__home",
1107
- href: S,
1108
- "aria-label": p.homeTitle(e.name),
1109
- title: p.homeTitle(e.name),
1178
+ href: N,
1179
+ "aria-label": h.homeTitle(e.name),
1180
+ title: h.homeTitle(e.name),
1110
1181
  children: e.name
1111
1182
  }
1112
1183
  ),
1113
1184
  e.tagline && /* @__PURE__ */ o("span", { className: "ds-topbar__tagline", children: e.tagline })
1114
1185
  ] }),
1115
1186
  /* @__PURE__ */ o("div", { className: "ds-topbar__spacer" }),
1116
- /* @__PURE__ */ d("div", { className: "ds-topbar__meta", children: [
1117
- n.branch && /* @__PURE__ */ o("code", { title: p.branchTitle(n.branch), children: n.branch.length > 28 ? `${n.branch.slice(0, 27)}…` : n.branch }),
1118
- n.commit && /* @__PURE__ */ o("code", { title: p.commitTitle(n.commit), children: n.shortCommit }),
1119
- /* @__PURE__ */ o("code", { title: p.envTitle(n.env), children: n.env })
1187
+ /* @__PURE__ */ u("div", { className: "ds-topbar__meta", children: [
1188
+ n.branch && /* @__PURE__ */ o("code", { title: h.branchTitle(n.branch), children: n.branch.length > 28 ? `${n.branch.slice(0, 27)}…` : n.branch }),
1189
+ n.commit && /* @__PURE__ */ o("code", { title: h.commitTitle(n.commit), children: n.shortCommit }),
1190
+ /* @__PURE__ */ o("code", { title: h.envTitle(n.env), children: n.env })
1120
1191
  ] }),
1121
1192
  /* @__PURE__ */ o(
1122
1193
  "button",
1123
1194
  {
1124
1195
  type: "button",
1125
1196
  className: "ds-btn ds-btn--icon",
1126
- "aria-pressed": i === "light",
1127
- "aria-label": i === "dark" ? p.lightMode : p.darkMode,
1128
- title: i === "dark" ? p.lightMode : p.darkMode,
1197
+ "aria-pressed": l === "light",
1198
+ "aria-label": l === "dark" ? h.lightMode : h.darkMode,
1199
+ title: l === "dark" ? h.lightMode : h.darkMode,
1129
1200
  onClick: c,
1130
- children: /* @__PURE__ */ o(Je, { theme: i })
1201
+ children: /* @__PURE__ */ o(et, { theme: l })
1131
1202
  }
1132
1203
  ),
1133
- /* @__PURE__ */ o("button", { type: "button", className: "ds-btn", onClick: b, children: h ? p.copied : p.copyLink }),
1204
+ /* @__PURE__ */ o("button", { type: "button", className: "ds-btn", onClick: v, children: p ? h.copied : h.copyLink }),
1134
1205
  /* @__PURE__ */ o(
1135
1206
  "a",
1136
1207
  {
1137
1208
  className: "ds-btn",
1138
- href: u,
1209
+ href: i,
1139
1210
  target: "_blank",
1140
1211
  rel: "noreferrer",
1141
- title: p.cleanReviewTitle,
1142
- children: p.cleanReview
1212
+ title: h.cleanReviewTitle,
1213
+ children: h.cleanReview
1143
1214
  }
1144
1215
  ),
1145
1216
  /* @__PURE__ */ o(
@@ -1147,22 +1218,22 @@ function Ve({
1147
1218
  {
1148
1219
  type: "button",
1149
1220
  className: "ds-btn",
1150
- "aria-pressed": r,
1151
- onClick: s,
1152
- children: p.panel
1221
+ "aria-pressed": s,
1222
+ onClick: r,
1223
+ children: h.panel
1153
1224
  }
1154
1225
  )
1155
1226
  ] });
1156
1227
  }
1157
- function qe(e) {
1228
+ function Xe(e) {
1158
1229
  const t = new URL(e);
1159
- return t.searchParams.set(v.chrome, "0"), t.toString();
1230
+ return t.searchParams.set(g.chrome, "0"), t.toString();
1160
1231
  }
1161
- function Ye(e, t, n = !1) {
1162
- const r = new URL("/", e);
1163
- return t === "light" && r.searchParams.set(v.chromeTheme, t), n && r.searchParams.set(v.showPorted, "1"), r.toString();
1232
+ function Ze(e, t, n = "active") {
1233
+ const s = new URL("/", e);
1234
+ return t === "light" && s.searchParams.set(g.chromeTheme, t), n === "ported" && s.searchParams.set(g.view, "ported"), s.toString();
1164
1235
  }
1165
- function Je({ theme: e }) {
1236
+ function et({ theme: e }) {
1166
1237
  const t = {
1167
1238
  width: 15,
1168
1239
  height: 15,
@@ -1174,77 +1245,77 @@ function Je({ theme: e }) {
1174
1245
  strokeLinejoin: "round",
1175
1246
  "aria-hidden": !0
1176
1247
  };
1177
- return e === "dark" ? /* @__PURE__ */ d("svg", { ...t, children: [
1248
+ return e === "dark" ? /* @__PURE__ */ u("svg", { ...t, children: [
1178
1249
  /* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "4" }),
1179
1250
  /* @__PURE__ */ o("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.42 1.42M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.42" })
1180
1251
  ] }) : /* @__PURE__ */ o("svg", { ...t, children: /* @__PURE__ */ o("path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" }) });
1181
1252
  }
1182
- function Qe({
1253
+ function tt({
1183
1254
  registry: e,
1184
1255
  controls: t,
1185
1256
  scenarioActive: n,
1186
- component: r,
1187
- componentFixture: i,
1257
+ component: s,
1258
+ componentFixture: l,
1188
1259
  onChange: a
1189
1260
  }) {
1190
- const s = A(), c = s.controls, { product: p } = e, h = p.dataSources?.adapters ?? [], m = p.theme?.modes ?? [], b = p.theme?.locales ?? [];
1191
- return /* @__PURE__ */ d("div", { className: "ds-chrome ds-controls", role: "group", "aria-label": c.region, children: [
1192
- r?.fixtures?.length ? /* @__PURE__ */ d("div", { className: "ds-field", children: [
1261
+ const r = P(), c = r.controls, { product: h } = e, p = h.dataSources?.adapters ?? [], m = h.theme?.modes ?? [], v = h.theme?.locales ?? [];
1262
+ return /* @__PURE__ */ u("div", { className: "ds-chrome ds-controls", role: "group", "aria-label": c.region, children: [
1263
+ s?.fixtures?.length ? /* @__PURE__ */ u("div", { className: "ds-field", children: [
1193
1264
  /* @__PURE__ */ o("label", { htmlFor: "ds-component-fixture", children: c.componentFixture }),
1194
1265
  /* @__PURE__ */ o(
1195
1266
  "select",
1196
1267
  {
1197
1268
  id: "ds-component-fixture",
1198
1269
  className: "ds-select",
1199
- value: i?.fixture?.id ?? "",
1200
- onChange: (u) => a({ fixture: u.target.value || void 0 }),
1201
- children: r.fixtures.map((u) => /* @__PURE__ */ o("option", { value: u.id, children: u.label }, u.id))
1270
+ value: l?.fixture?.id ?? "",
1271
+ onChange: (i) => a({ fixture: i.target.value || void 0 }),
1272
+ children: s.fixtures.map((i) => /* @__PURE__ */ o("option", { value: i.id, children: i.label }, i.id))
1202
1273
  }
1203
1274
  )
1204
1275
  ] }) : null,
1205
- n && /* @__PURE__ */ d("div", { className: "ds-field", children: [
1276
+ n && /* @__PURE__ */ u("div", { className: "ds-field", children: [
1206
1277
  /* @__PURE__ */ o("label", { htmlFor: "ds-persona", children: c.persona }),
1207
- /* @__PURE__ */ d(
1278
+ /* @__PURE__ */ u(
1208
1279
  "select",
1209
1280
  {
1210
1281
  id: "ds-persona",
1211
1282
  className: "ds-select",
1212
1283
  value: t.persona ?? "",
1213
- onChange: (u) => a({ persona: u.target.value || void 0 }),
1284
+ onChange: (i) => a({ persona: i.target.value || void 0 }),
1214
1285
  children: [
1215
1286
  /* @__PURE__ */ o("option", { value: "", children: c.none }),
1216
- p.personas.map((u) => /* @__PURE__ */ o("option", { value: u.id, children: u.name }, u.id))
1287
+ h.personas.map((i) => /* @__PURE__ */ o("option", { value: i.id, children: i.name }, i.id))
1217
1288
  ]
1218
1289
  }
1219
1290
  )
1220
1291
  ] }),
1221
- n && /* @__PURE__ */ d("div", { className: "ds-field", children: [
1292
+ n && /* @__PURE__ */ u("div", { className: "ds-field", children: [
1222
1293
  /* @__PURE__ */ o("span", { className: "ds-field__label", id: "ds-network-label", children: c.network }),
1223
- /* @__PURE__ */ o("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-network-label", children: oe.map((u) => /* @__PURE__ */ o(
1294
+ /* @__PURE__ */ o("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-network-label", children: ie.map((i) => /* @__PURE__ */ o(
1224
1295
  "button",
1225
1296
  {
1226
1297
  type: "button",
1227
- "aria-pressed": t.network === u,
1228
- onClick: () => a({ network: u }),
1229
- children: s.network[u]
1298
+ "aria-pressed": t.network === i,
1299
+ onClick: () => a({ network: i }),
1300
+ children: r.network[i]
1230
1301
  },
1231
- u
1302
+ i
1232
1303
  )) })
1233
1304
  ] }),
1234
- /* @__PURE__ */ d("div", { className: "ds-field", children: [
1305
+ /* @__PURE__ */ u("div", { className: "ds-field", children: [
1235
1306
  /* @__PURE__ */ o("span", { className: "ds-field__label", id: "ds-viewport-label", children: c.viewport }),
1236
- /* @__PURE__ */ o("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-viewport-label", children: ne.map((u) => /* @__PURE__ */ o(
1307
+ /* @__PURE__ */ o("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-viewport-label", children: ce.map((i) => /* @__PURE__ */ o(
1237
1308
  "button",
1238
1309
  {
1239
1310
  type: "button",
1240
1311
  className: "ds-icon-button",
1241
- "aria-pressed": t.viewport === u.id,
1242
- "aria-label": s.viewport[u.id] ?? u.label,
1243
- title: s.viewport[u.id] ?? u.label,
1244
- onClick: () => a({ viewport: u.id }),
1245
- children: /* @__PURE__ */ o(Xe, { id: u.id })
1312
+ "aria-pressed": t.viewport === i.id,
1313
+ "aria-label": r.viewport[i.id] ?? i.label,
1314
+ title: r.viewport[i.id] ?? i.label,
1315
+ onClick: () => a({ viewport: i.id }),
1316
+ children: /* @__PURE__ */ o(ot, { id: i.id })
1246
1317
  },
1247
- u.id
1318
+ i.id
1248
1319
  )) }),
1249
1320
  t.viewport === "custom" && /* @__PURE__ */ o(
1250
1321
  "input",
@@ -1257,11 +1328,11 @@ function Qe({
1257
1328
  style: { width: 88 },
1258
1329
  "aria-label": c.customWidth,
1259
1330
  value: t.customWidth ?? 1024,
1260
- onChange: (u) => a({ customWidth: Number(u.target.value) || void 0 })
1331
+ onChange: (i) => a({ customWidth: Number(i.target.value) || void 0 })
1261
1332
  }
1262
1333
  )
1263
1334
  ] }),
1264
- m.length > 1 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
1335
+ m.length > 1 && /* @__PURE__ */ u("div", { className: "ds-field", children: [
1265
1336
  /* @__PURE__ */ o("label", { htmlFor: "ds-theme", children: c.theme }),
1266
1337
  /* @__PURE__ */ o(
1267
1338
  "select",
@@ -1269,43 +1340,43 @@ function Qe({
1269
1340
  id: "ds-theme",
1270
1341
  className: "ds-select",
1271
1342
  value: t.themeMode ?? m[0],
1272
- onChange: (u) => a({ themeMode: u.target.value }),
1273
- children: m.map((u) => /* @__PURE__ */ o("option", { value: u, children: u }, u))
1343
+ onChange: (i) => a({ themeMode: i.target.value }),
1344
+ children: m.map((i) => /* @__PURE__ */ o("option", { value: i, children: i }, i))
1274
1345
  }
1275
1346
  )
1276
1347
  ] }),
1277
- b.length > 1 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
1348
+ v.length > 1 && /* @__PURE__ */ u("div", { className: "ds-field", children: [
1278
1349
  /* @__PURE__ */ o("label", { htmlFor: "ds-locale", children: c.locale }),
1279
1350
  /* @__PURE__ */ o(
1280
1351
  "select",
1281
1352
  {
1282
1353
  id: "ds-locale",
1283
1354
  className: "ds-select",
1284
- value: t.locale ?? b[0],
1285
- onChange: (u) => a({ locale: u.target.value }),
1286
- children: b.map((u) => /* @__PURE__ */ o("option", { value: u, children: u }, u))
1355
+ value: t.locale ?? v[0],
1356
+ onChange: (i) => a({ locale: i.target.value }),
1357
+ children: v.map((i) => /* @__PURE__ */ o("option", { value: i, children: i }, i))
1287
1358
  }
1288
1359
  )
1289
1360
  ] }),
1290
- n && h.length > 0 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
1361
+ n && p.length > 0 && /* @__PURE__ */ u("div", { className: "ds-field", children: [
1291
1362
  /* @__PURE__ */ o("label", { htmlFor: "ds-source", children: c.dataSource }),
1292
- /* @__PURE__ */ d(
1363
+ /* @__PURE__ */ u(
1293
1364
  "select",
1294
1365
  {
1295
1366
  id: "ds-source",
1296
1367
  className: "ds-select",
1297
1368
  value: t.dataSource ?? "fixtures",
1298
- onChange: (u) => a({ dataSource: u.target.value }),
1369
+ onChange: (i) => a({ dataSource: i.target.value }),
1299
1370
  children: [
1300
1371
  /* @__PURE__ */ o("option", { value: "fixtures", children: c.fixturesOption }),
1301
- h.filter((u) => u.id !== "fixtures").map((u) => /* @__PURE__ */ o("option", { value: u.id, children: u.label }, u.id))
1372
+ p.filter((i) => i.id !== "fixtures").map((i) => /* @__PURE__ */ o("option", { value: i.id, children: i.label }, i.id))
1302
1373
  ]
1303
1374
  }
1304
1375
  )
1305
1376
  ] })
1306
1377
  ] });
1307
1378
  }
1308
- function Xe({ id: e }) {
1379
+ function ot({ id: e }) {
1309
1380
  const t = {
1310
1381
  width: 16,
1311
1382
  height: 16,
@@ -1317,63 +1388,63 @@ function Xe({ id: e }) {
1317
1388
  strokeLinejoin: "round",
1318
1389
  "aria-hidden": !0
1319
1390
  };
1320
- return e === "fit" ? /* @__PURE__ */ o("svg", { ...t, children: /* @__PURE__ */ o("path", { d: "M8 3H5a2 2 0 0 0-2 2v3M16 3h3a2 2 0 0 1 2 2v3M8 21H5a2 2 0 0 1-2-2v-3M16 21h3a2 2 0 0 0 2-2v-3" }) }) : e === "mobile" ? /* @__PURE__ */ d("svg", { ...t, children: [
1391
+ return e === "fit" ? /* @__PURE__ */ o("svg", { ...t, children: /* @__PURE__ */ o("path", { d: "M8 3H5a2 2 0 0 0-2 2v3M16 3h3a2 2 0 0 1 2 2v3M8 21H5a2 2 0 0 1-2-2v-3M16 21h3a2 2 0 0 0 2-2v-3" }) }) : e === "mobile" ? /* @__PURE__ */ u("svg", { ...t, children: [
1321
1392
  /* @__PURE__ */ o("rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2" }),
1322
1393
  /* @__PURE__ */ o("path", { d: "M12 18h.01" })
1323
- ] }) : e === "tablet" ? /* @__PURE__ */ d("svg", { ...t, children: [
1394
+ ] }) : e === "tablet" ? /* @__PURE__ */ u("svg", { ...t, children: [
1324
1395
  /* @__PURE__ */ o("rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2" }),
1325
1396
  /* @__PURE__ */ o("path", { d: "M12 18h.01" })
1326
- ] }) : e === "desktop" ? /* @__PURE__ */ d("svg", { ...t, children: [
1397
+ ] }) : e === "desktop" ? /* @__PURE__ */ u("svg", { ...t, children: [
1327
1398
  /* @__PURE__ */ o("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
1328
1399
  /* @__PURE__ */ o("path", { d: "M8 21h8M12 17v4" })
1329
1400
  ] }) : /* @__PURE__ */ o("svg", { ...t, children: /* @__PURE__ */ o("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) });
1330
1401
  }
1331
- function Ze({
1402
+ function nt({
1332
1403
  registry: e,
1333
1404
  scenario: t,
1334
1405
  component: n,
1335
- componentFixture: r,
1336
- controls: i,
1406
+ componentFixture: s,
1407
+ controls: l,
1337
1408
  focusedNode: a,
1338
- tabStopCount: s
1409
+ tabStopCount: r
1339
1410
  }) {
1340
- const c = A().inspector, [p, h] = F("scenario"), m = e.issues.filter((b) => b.level === "error").length;
1341
- return /* @__PURE__ */ d("aside", { className: "ds-chrome ds-inspector", "aria-label": c.region, children: [
1342
- /* @__PURE__ */ d("div", { className: "ds-inspector__tabs", role: "tablist", children: [
1343
- /* @__PURE__ */ o(V, { id: "scenario", current: p, onSelect: h, children: n ? c.componentReference : c.tabScenario }),
1344
- /* @__PURE__ */ o(V, { id: "a11y", current: p, onSelect: h, children: c.tabA11y }),
1345
- /* @__PURE__ */ o(V, { id: "diagnostics", current: p, onSelect: h, children: m > 0 ? c.diagnosticsWithErrors(m) : c.tabDiagnostics })
1411
+ const c = P().inspector, [h, p] = $("scenario"), m = e.issues.filter((v) => v.level === "error").length;
1412
+ return /* @__PURE__ */ u("aside", { className: "ds-chrome ds-inspector", "aria-label": c.region, children: [
1413
+ /* @__PURE__ */ u("div", { className: "ds-inspector__tabs", role: "tablist", children: [
1414
+ /* @__PURE__ */ o(J, { id: "scenario", current: h, onSelect: p, children: n ? c.componentReference : c.tabScenario }),
1415
+ /* @__PURE__ */ o(J, { id: "a11y", current: h, onSelect: p, children: c.tabA11y }),
1416
+ /* @__PURE__ */ o(J, { id: "diagnostics", current: h, onSelect: p, children: m > 0 ? c.diagnosticsWithErrors(m) : c.tabDiagnostics })
1346
1417
  ] }),
1347
- /* @__PURE__ */ d("div", { className: "ds-inspector__body", role: "tabpanel", children: [
1348
- p === "scenario" && /* @__PURE__ */ o(
1349
- et,
1418
+ /* @__PURE__ */ u("div", { className: "ds-inspector__body", role: "tabpanel", children: [
1419
+ h === "scenario" && /* @__PURE__ */ o(
1420
+ at,
1350
1421
  {
1351
1422
  registry: e,
1352
1423
  scenario: t,
1353
1424
  component: n,
1354
- componentFixture: r,
1355
- controls: i
1425
+ componentFixture: s,
1426
+ controls: l
1356
1427
  }
1357
1428
  ),
1358
- p === "a11y" && /* @__PURE__ */ o(
1359
- tt,
1429
+ h === "a11y" && /* @__PURE__ */ o(
1430
+ rt,
1360
1431
  {
1361
1432
  registry: e,
1362
1433
  scenario: t,
1363
1434
  focusedNode: a,
1364
- keyboardMode: i.keyboardMode,
1365
- tabStopCount: s
1435
+ keyboardMode: l.keyboardMode,
1436
+ tabStopCount: r
1366
1437
  }
1367
1438
  ),
1368
- p === "diagnostics" && /* @__PURE__ */ o(ot, { registry: e })
1439
+ h === "diagnostics" && /* @__PURE__ */ o(st, { registry: e })
1369
1440
  ] })
1370
1441
  ] });
1371
1442
  }
1372
- function V({
1443
+ function J({
1373
1444
  id: e,
1374
1445
  current: t,
1375
1446
  onSelect: n,
1376
- children: r
1447
+ children: s
1377
1448
  }) {
1378
1449
  return /* @__PURE__ */ o(
1379
1450
  "button",
@@ -1382,177 +1453,177 @@ function V({
1382
1453
  role: "tab",
1383
1454
  "aria-selected": t === e,
1384
1455
  onClick: () => n(e),
1385
- children: r
1456
+ children: s
1386
1457
  }
1387
1458
  );
1388
1459
  }
1389
- function et({
1460
+ function at({
1390
1461
  registry: e,
1391
1462
  scenario: t,
1392
1463
  component: n,
1393
- componentFixture: r,
1394
- controls: i
1464
+ componentFixture: s,
1465
+ controls: l
1395
1466
  }) {
1396
- const a = A(), s = a.inspector;
1467
+ const a = P(), r = a.inspector;
1397
1468
  if (!t)
1398
- return n ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
1399
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.componentReference }),
1469
+ return n ? /* @__PURE__ */ u("div", { className: "ds-block", children: [
1470
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.componentReference }),
1400
1471
  /* @__PURE__ */ o("p", { style: { color: "var(--ds-fg)", fontSize: 15, fontWeight: 600 }, children: n.name }),
1401
1472
  n.description && /* @__PURE__ */ o("p", { children: n.description }),
1402
- /* @__PURE__ */ d("dl", { className: "ds-kv", style: { marginTop: 14 }, children: [
1403
- /* @__PURE__ */ o("dt", { children: s.id }),
1473
+ /* @__PURE__ */ u("dl", { className: "ds-kv", style: { marginTop: 14 }, children: [
1474
+ /* @__PURE__ */ o("dt", { children: r.id }),
1404
1475
  /* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: n.id }),
1405
- n.group && /* @__PURE__ */ d(P, { children: [
1406
- /* @__PURE__ */ o("dt", { children: s.componentGroup }),
1476
+ n.group && /* @__PURE__ */ u(A, { children: [
1477
+ /* @__PURE__ */ o("dt", { children: r.componentGroup }),
1407
1478
  /* @__PURE__ */ o("dd", { children: n.group })
1408
1479
  ] }),
1409
- r?.fixture && /* @__PURE__ */ d(P, { children: [
1410
- /* @__PURE__ */ o("dt", { children: s.componentFixture }),
1411
- /* @__PURE__ */ d("dd", { children: [
1412
- r.fixture.label,
1480
+ s?.fixture && /* @__PURE__ */ u(A, { children: [
1481
+ /* @__PURE__ */ o("dt", { children: r.componentFixture }),
1482
+ /* @__PURE__ */ u("dd", { children: [
1483
+ s.fixture.label,
1413
1484
  " ",
1414
- /* @__PURE__ */ o("code", { children: r.fixture.id })
1485
+ /* @__PURE__ */ o("code", { children: s.fixture.id })
1415
1486
  ] }),
1416
- r.fixture.description && /* @__PURE__ */ d(P, { children: [
1417
- /* @__PURE__ */ o("dt", { children: s.componentFixtureDescription }),
1418
- /* @__PURE__ */ o("dd", { children: r.fixture.description })
1487
+ s.fixture.description && /* @__PURE__ */ u(A, { children: [
1488
+ /* @__PURE__ */ o("dt", { children: r.componentFixtureDescription }),
1489
+ /* @__PURE__ */ o("dd", { children: s.fixture.description })
1419
1490
  ] })
1420
1491
  ] })
1421
1492
  ] }),
1422
- r?.didFallback && r.fixture && /* @__PURE__ */ o("p", { className: "ds-note", "data-tone": "warn", children: s.componentFixtureFallback(
1423
- r.requestedId ?? "",
1424
- r.fixture.id
1493
+ s?.didFallback && s.fixture && /* @__PURE__ */ o("p", { className: "ds-note", "data-tone": "warn", children: r.componentFixtureFallback(
1494
+ s.requestedId ?? "",
1495
+ s.fixture.id
1425
1496
  ) })
1426
- ] }) : /* @__PURE__ */ o("p", { className: "ds-block", children: s.noScenario });
1427
- const c = e.persona(i.persona ?? t.persona), p = i.persona ? e.persona(i.persona)?.permissions ?? [] : e.permissionsOf(t), h = e.rulesOf(t), m = e.fixture(i.fixture ?? t.fixture), b = !!(i.persona && i.persona !== t.persona);
1428
- return /* @__PURE__ */ d(P, { children: [
1429
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
1430
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.situation }),
1497
+ ] }) : /* @__PURE__ */ o("p", { className: "ds-block", children: r.noScenario });
1498
+ const c = e.persona(l.persona ?? t.persona), h = l.persona ? e.persona(l.persona)?.permissions ?? [] : e.permissionsOf(t), p = e.rulesOf(t), m = e.fixture(l.fixture ?? t.fixture), v = !!(l.persona && l.persona !== t.persona);
1499
+ return /* @__PURE__ */ u(A, { children: [
1500
+ /* @__PURE__ */ u("div", { className: "ds-block", children: [
1501
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.situation }),
1431
1502
  /* @__PURE__ */ o("p", { style: { color: "var(--ds-fg)", fontSize: 14, fontWeight: 600 }, children: t.title }),
1432
1503
  t.intent && /* @__PURE__ */ o("p", { children: t.intent }),
1433
- /* @__PURE__ */ d("div", { className: "ds-chips", children: [
1434
- /* @__PURE__ */ o("span", { className: "ds-chip", "data-tone": at(t.status), children: a.status[t.status] }),
1435
- (t.tags ?? []).map((u) => /* @__PURE__ */ o("span", { className: "ds-chip", children: u }, u))
1504
+ /* @__PURE__ */ u("div", { className: "ds-chips", children: [
1505
+ /* @__PURE__ */ o("span", { className: "ds-chip", "data-tone": ct(t.status), children: a.status[t.status] }),
1506
+ (t.tags ?? []).map((i) => /* @__PURE__ */ o("span", { className: "ds-chip", children: i }, i))
1436
1507
  ] }),
1437
1508
  /* @__PURE__ */ o("p", { style: { marginTop: 6 }, children: a.statusMeaning[t.status] })
1438
1509
  ] }),
1439
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
1440
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.reproduction }),
1441
- /* @__PURE__ */ d("dl", { className: "ds-kv", children: [
1442
- /* @__PURE__ */ o("dt", { children: s.id }),
1510
+ /* @__PURE__ */ u("div", { className: "ds-block", children: [
1511
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.reproduction }),
1512
+ /* @__PURE__ */ u("dl", { className: "ds-kv", children: [
1513
+ /* @__PURE__ */ o("dt", { children: r.id }),
1443
1514
  /* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.id }),
1444
- /* @__PURE__ */ o("dt", { children: s.route }),
1515
+ /* @__PURE__ */ o("dt", { children: r.route }),
1445
1516
  /* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.route }),
1446
- /* @__PURE__ */ o("dt", { children: s.persona }),
1447
- /* @__PURE__ */ d("dd", { children: [
1517
+ /* @__PURE__ */ o("dt", { children: r.persona }),
1518
+ /* @__PURE__ */ u("dd", { children: [
1448
1519
  c?.name ?? "—",
1449
- b && /* @__PURE__ */ o("span", { className: "ds-chip", "data-tone": "warn", style: { marginLeft: 6 }, children: s.personaSwapped })
1520
+ v && /* @__PURE__ */ o("span", { className: "ds-chip", "data-tone": "warn", style: { marginLeft: 6 }, children: r.personaSwapped })
1450
1521
  ] }),
1451
- /* @__PURE__ */ o("dt", { children: s.data }),
1522
+ /* @__PURE__ */ o("dt", { children: r.data }),
1452
1523
  /* @__PURE__ */ o("dd", { children: m?.label ?? "—" }),
1453
- /* @__PURE__ */ o("dt", { children: s.network }),
1454
- /* @__PURE__ */ o("dd", { children: a.network[i.network] })
1524
+ /* @__PURE__ */ o("dt", { children: r.network }),
1525
+ /* @__PURE__ */ o("dd", { children: a.network[l.network] })
1455
1526
  ] }),
1456
- c?.goal && /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: s.goal(c.goal) })
1527
+ c?.goal && /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: r.goal(c.goal) })
1457
1528
  ] }),
1458
- p.length > 0 && /* @__PURE__ */ d("div", { className: "ds-block", children: [
1459
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.permissions }),
1460
- /* @__PURE__ */ o("div", { className: "ds-chips", children: p.map((u) => /* @__PURE__ */ o("span", { className: "ds-chip", children: u }, u)) })
1529
+ h.length > 0 && /* @__PURE__ */ u("div", { className: "ds-block", children: [
1530
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.permissions }),
1531
+ /* @__PURE__ */ o("div", { className: "ds-chips", children: h.map((i) => /* @__PURE__ */ o("span", { className: "ds-chip", children: i }, i)) })
1461
1532
  ] }),
1462
- t.preconditions?.length ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
1463
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.preconditions }),
1464
- /* @__PURE__ */ o("ul", { className: "ds-list", children: t.preconditions.map((u) => /* @__PURE__ */ o("li", { children: u }, u)) })
1533
+ t.preconditions?.length ? /* @__PURE__ */ u("div", { className: "ds-block", children: [
1534
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.preconditions }),
1535
+ /* @__PURE__ */ o("ul", { className: "ds-list", children: t.preconditions.map((i) => /* @__PURE__ */ o("li", { children: i }, i)) })
1465
1536
  ] }) : null,
1466
- h.length > 0 && /* @__PURE__ */ d("div", { className: "ds-block", children: [
1467
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.rules }),
1468
- h.map((u) => /* @__PURE__ */ d("div", { className: "ds-rule", children: [
1469
- /* @__PURE__ */ o("span", { className: "ds-rule__id", children: u.id }),
1470
- /* @__PURE__ */ o("span", { className: "ds-rule__statement", children: u.statement }),
1471
- u.rationale && /* @__PURE__ */ o("p", { className: "ds-rule__rationale", children: u.rationale })
1472
- ] }, u.id))
1537
+ p.length > 0 && /* @__PURE__ */ u("div", { className: "ds-block", children: [
1538
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.rules }),
1539
+ p.map((i) => /* @__PURE__ */ u("div", { className: "ds-rule", children: [
1540
+ /* @__PURE__ */ o("span", { className: "ds-rule__id", children: i.id }),
1541
+ /* @__PURE__ */ o("span", { className: "ds-rule__statement", children: i.statement }),
1542
+ i.rationale && /* @__PURE__ */ o("p", { className: "ds-rule__rationale", children: i.rationale })
1543
+ ] }, i.id))
1473
1544
  ] }),
1474
- t.actions?.length ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
1475
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.actions }),
1476
- /* @__PURE__ */ o("ul", { className: "ds-list", children: t.actions.map((u) => /* @__PURE__ */ o("li", { children: u }, u)) })
1545
+ t.actions?.length ? /* @__PURE__ */ u("div", { className: "ds-block", children: [
1546
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.actions }),
1547
+ /* @__PURE__ */ o("ul", { className: "ds-list", children: t.actions.map((i) => /* @__PURE__ */ o("li", { children: i }, i)) })
1477
1548
  ] }) : null,
1478
- t.expected?.length ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
1479
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.expected }),
1480
- /* @__PURE__ */ o("ul", { className: "ds-list", children: t.expected.map((u) => /* @__PURE__ */ o("li", { children: u }, u)) })
1549
+ t.expected?.length ? /* @__PURE__ */ u("div", { className: "ds-block", children: [
1550
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.expected }),
1551
+ /* @__PURE__ */ o("ul", { className: "ds-list", children: t.expected.map((i) => /* @__PURE__ */ o("li", { children: i }, i)) })
1481
1552
  ] }) : null,
1482
- t.approvedAt && /* @__PURE__ */ d("div", { className: "ds-block", children: [
1483
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.approval }),
1484
- /* @__PURE__ */ d("p", { children: [
1553
+ t.approvedAt && /* @__PURE__ */ u("div", { className: "ds-block", children: [
1554
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.approval }),
1555
+ /* @__PURE__ */ u("p", { children: [
1485
1556
  t.approvedAt.date,
1486
1557
  " · ",
1487
1558
  /* @__PURE__ */ o("code", { children: t.approvedAt.commit.slice(0, 7) })
1488
1559
  ] }),
1489
- /* @__PURE__ */ o("a", { href: t.approvedAt.url, target: "_blank", rel: "noreferrer", children: s.openApproved })
1560
+ /* @__PURE__ */ o("a", { href: t.approvedAt.url, target: "_blank", rel: "noreferrer", children: r.openApproved })
1490
1561
  ] }),
1491
- t.ticket && /* @__PURE__ */ d("div", { className: "ds-block", children: [
1492
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.engineering }),
1562
+ t.ticket && /* @__PURE__ */ u("div", { className: "ds-block", children: [
1563
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.engineering }),
1493
1564
  /* @__PURE__ */ o("p", { children: t.ticket })
1494
1565
  ] })
1495
1566
  ] });
1496
1567
  }
1497
- function tt({
1568
+ function rt({
1498
1569
  registry: e,
1499
1570
  scenario: t,
1500
1571
  focusedNode: n,
1501
- keyboardMode: r,
1502
- tabStopCount: i
1572
+ keyboardMode: s,
1573
+ tabStopCount: l
1503
1574
  }) {
1504
- const a = A(), s = a.inspector, c = he(e.product.theme?.contrastPairs), p = c.filter((h) => h.passes !== !0);
1505
- return /* @__PURE__ */ d(P, { children: [
1506
- t && /* @__PURE__ */ d("div", { className: "ds-block", children: [
1507
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.a11yContract }),
1508
- /* @__PURE__ */ d("dl", { className: "ds-kv", children: [
1509
- /* @__PURE__ */ o("dt", { children: s.keyboard }),
1575
+ const a = P(), r = a.inspector, c = be(e.product.theme?.contrastPairs), h = c.filter((p) => p.passes !== !0);
1576
+ return /* @__PURE__ */ u(A, { children: [
1577
+ t && /* @__PURE__ */ u("div", { className: "ds-block", children: [
1578
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.a11yContract }),
1579
+ /* @__PURE__ */ u("dl", { className: "ds-kv", children: [
1580
+ /* @__PURE__ */ o("dt", { children: r.keyboard }),
1510
1581
  /* @__PURE__ */ o("dd", { children: a.keyboard[t.a11y.keyboard] }),
1511
- /* @__PURE__ */ o("dt", { children: s.contrast }),
1512
- /* @__PURE__ */ o("dd", { children: s.contrastTarget(t.a11y.contrast) })
1582
+ /* @__PURE__ */ o("dt", { children: r.contrast }),
1583
+ /* @__PURE__ */ o("dd", { children: r.contrastTarget(t.a11y.contrast) })
1513
1584
  ] }),
1514
- t.a11y.announces?.length ? /* @__PURE__ */ d(P, { children: [
1515
- /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: s.announces }),
1516
- /* @__PURE__ */ o("div", { className: "ds-chips", children: t.a11y.announces.map((h) => /* @__PURE__ */ o("span", { className: "ds-chip", children: h }, h)) })
1585
+ t.a11y.announces?.length ? /* @__PURE__ */ u(A, { children: [
1586
+ /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: r.announces }),
1587
+ /* @__PURE__ */ o("div", { className: "ds-chips", children: t.a11y.announces.map((p) => /* @__PURE__ */ o("span", { className: "ds-chip", children: p }, p)) })
1517
1588
  ] }) : null,
1518
1589
  t.a11y.notes && /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: t.a11y.notes })
1519
1590
  ] }),
1520
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
1521
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.focusedElement }),
1522
- r ? n ? /* @__PURE__ */ d(P, { children: [
1523
- /* @__PURE__ */ d("dl", { className: "ds-kv", children: [
1524
- /* @__PURE__ */ o("dt", { children: s.role }),
1591
+ /* @__PURE__ */ u("div", { className: "ds-block", children: [
1592
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.focusedElement }),
1593
+ s ? n ? /* @__PURE__ */ u(A, { children: [
1594
+ /* @__PURE__ */ u("dl", { className: "ds-kv", children: [
1595
+ /* @__PURE__ */ o("dt", { children: r.role }),
1525
1596
  /* @__PURE__ */ o("dd", { children: n.role }),
1526
- /* @__PURE__ */ o("dt", { children: s.name }),
1527
- /* @__PURE__ */ o("dd", { children: n.name ? n.name : /* @__PURE__ */ o("span", { style: { color: "var(--ds-err)" }, children: s.noAccessibleName }) }),
1528
- /* @__PURE__ */ o("dt", { children: s.nameFrom }),
1597
+ /* @__PURE__ */ o("dt", { children: r.name }),
1598
+ /* @__PURE__ */ o("dd", { children: n.name ? n.name : /* @__PURE__ */ o("span", { style: { color: "var(--ds-err)" }, children: r.noAccessibleName }) }),
1599
+ /* @__PURE__ */ o("dt", { children: r.nameFrom }),
1529
1600
  /* @__PURE__ */ o("dd", { children: n.nameFrom }),
1530
- n.description ? /* @__PURE__ */ d(P, { children: [
1531
- /* @__PURE__ */ o("dt", { children: s.description }),
1601
+ n.description ? /* @__PURE__ */ u(A, { children: [
1602
+ /* @__PURE__ */ o("dt", { children: r.description }),
1532
1603
  /* @__PURE__ */ o("dd", { children: n.description })
1533
1604
  ] }) : null,
1534
- /* @__PURE__ */ o("dt", { children: s.selector }),
1605
+ /* @__PURE__ */ o("dt", { children: r.selector }),
1535
1606
  /* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: n.selector })
1536
1607
  ] }),
1537
- n.states.length > 0 && /* @__PURE__ */ o("div", { className: "ds-chips", style: { marginTop: 8 }, children: n.states.map((h) => /* @__PURE__ */ o("span", { className: "ds-chip", children: h }, h)) }),
1538
- n.hiddenFromAssistiveTech && /* @__PURE__ */ o("p", { className: "ds-note", style: { marginTop: 8 }, children: s.focusableButHidden }),
1539
- /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: s.tabStopsInStage(i) })
1540
- ] }) : /* @__PURE__ */ o("p", { children: s.pressTab(i) }) : /* @__PURE__ */ o("p", { children: s.keyboardModeOff })
1608
+ n.states.length > 0 && /* @__PURE__ */ o("div", { className: "ds-chips", style: { marginTop: 8 }, children: n.states.map((p) => /* @__PURE__ */ o("span", { className: "ds-chip", children: p }, p)) }),
1609
+ n.hiddenFromAssistiveTech && /* @__PURE__ */ o("p", { className: "ds-note", style: { marginTop: 8 }, children: r.focusableButHidden }),
1610
+ /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: r.tabStopsInStage(l) })
1611
+ ] }) : /* @__PURE__ */ o("p", { children: r.pressTab(l) }) : /* @__PURE__ */ o("p", { children: r.keyboardModeOff })
1541
1612
  ] }),
1542
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
1543
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: s.tokenContrast }),
1544
- c.length === 0 ? /* @__PURE__ */ o("p", { children: s.noContrastPairs }) : /* @__PURE__ */ d("table", { className: "ds-contrast", children: [
1545
- /* @__PURE__ */ o("thead", { children: /* @__PURE__ */ d("tr", { children: [
1546
- /* @__PURE__ */ o("th", { scope: "col", children: s.pair }),
1547
- /* @__PURE__ */ o("th", { scope: "col", children: s.ratio })
1613
+ /* @__PURE__ */ u("div", { className: "ds-block", children: [
1614
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.tokenContrast }),
1615
+ c.length === 0 ? /* @__PURE__ */ o("p", { children: r.noContrastPairs }) : /* @__PURE__ */ u("table", { className: "ds-contrast", children: [
1616
+ /* @__PURE__ */ o("thead", { children: /* @__PURE__ */ u("tr", { children: [
1617
+ /* @__PURE__ */ o("th", { scope: "col", children: r.pair }),
1618
+ /* @__PURE__ */ o("th", { scope: "col", children: r.ratio })
1548
1619
  ] }) }),
1549
- /* @__PURE__ */ o("tbody", { children: c.map((h) => /* @__PURE__ */ d("tr", { children: [
1550
- /* @__PURE__ */ d("td", { children: [
1620
+ /* @__PURE__ */ o("tbody", { children: c.map((p) => /* @__PURE__ */ u("tr", { children: [
1621
+ /* @__PURE__ */ u("td", { children: [
1551
1622
  /* @__PURE__ */ o(
1552
1623
  "span",
1553
1624
  {
1554
1625
  className: "ds-swatch",
1555
- style: { background: h.pair.background },
1626
+ style: { background: p.pair.background },
1556
1627
  "aria-hidden": "true"
1557
1628
  }
1558
1629
  ),
@@ -1560,49 +1631,49 @@ function tt({
1560
1631
  "span",
1561
1632
  {
1562
1633
  className: "ds-swatch",
1563
- style: { background: h.pair.foreground },
1634
+ style: { background: p.pair.foreground },
1564
1635
  "aria-hidden": "true"
1565
1636
  }
1566
1637
  ),
1567
- h.pair.name
1638
+ p.pair.name
1568
1639
  ] }),
1569
1640
  /* @__PURE__ */ o(
1570
1641
  "td",
1571
1642
  {
1572
1643
  style: {
1573
- color: h.passes === !0 ? "var(--ds-ok)" : h.passes === !1 ? "var(--ds-err)" : "var(--ds-warn)"
1644
+ color: p.passes === !0 ? "var(--ds-ok)" : p.passes === !1 ? "var(--ds-err)" : "var(--ds-warn)"
1574
1645
  },
1575
- children: h.label
1646
+ children: p.label
1576
1647
  }
1577
1648
  )
1578
- ] }, h.pair.name)) })
1649
+ ] }, p.pair.name)) })
1579
1650
  ] }),
1580
- p.length > 0 && /* @__PURE__ */ o("p", { className: "ds-note", style: { marginTop: 8 }, children: s.pairsFailing(p.length) })
1651
+ h.length > 0 && /* @__PURE__ */ o("p", { className: "ds-note", style: { marginTop: 8 }, children: r.pairsFailing(h.length) })
1581
1652
  ] }),
1582
- /* @__PURE__ */ o("p", { className: "ds-note", children: s.automatedIsFloor })
1653
+ /* @__PURE__ */ o("p", { className: "ds-note", children: r.automatedIsFloor })
1583
1654
  ] });
1584
1655
  }
1585
- function ot({ registry: e }) {
1586
- const t = A(), n = t.inspector, r = e.coverage({ includePorted: !0 }), { issues: i } = e;
1587
- return /* @__PURE__ */ d(P, { children: [
1588
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
1656
+ function st({ registry: e }) {
1657
+ const t = P(), n = t.inspector, s = e.coverage({ includePorted: !0 }), { issues: l } = e;
1658
+ return /* @__PURE__ */ u(A, { children: [
1659
+ /* @__PURE__ */ u("div", { className: "ds-block", children: [
1589
1660
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: n.coverage }),
1590
- /* @__PURE__ */ o("dl", { className: "ds-kv", children: Object.entries(r).filter(([, a]) => a > 0).map(([a, s]) => /* @__PURE__ */ d("div", { style: { display: "contents" }, children: [
1661
+ /* @__PURE__ */ o("dl", { className: "ds-kv", children: Object.entries(s).filter(([, a]) => a > 0).map(([a, r]) => /* @__PURE__ */ u("div", { style: { display: "contents" }, children: [
1591
1662
  /* @__PURE__ */ o("dt", { children: t.status[a] }),
1592
- /* @__PURE__ */ o("dd", { style: { fontVariantNumeric: "tabular-nums" }, children: s })
1663
+ /* @__PURE__ */ o("dd", { style: { fontVariantNumeric: "tabular-nums" }, children: r })
1593
1664
  ] }, a)) }),
1594
1665
  /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: n.scenariosRegistered(e.product.scenarios.length) })
1595
1666
  ] }),
1596
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
1667
+ /* @__PURE__ */ u("div", { className: "ds-block", children: [
1597
1668
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: n.scenarioContract }),
1598
- i.length === 0 ? /* @__PURE__ */ o("p", { children: n.noIssues }) : i.map((a, s) => /* @__PURE__ */ d("div", { className: "ds-issue", "data-level": a.level, children: [
1669
+ l.length === 0 ? /* @__PURE__ */ o("p", { children: n.noIssues }) : l.map((a, r) => /* @__PURE__ */ u("div", { className: "ds-issue", "data-level": a.level, children: [
1599
1670
  /* @__PURE__ */ o("span", { className: "ds-issue__where", children: a.where }),
1600
1671
  a.message
1601
- ] }, `${a.where}-${s}`))
1672
+ ] }, `${a.where}-${r}`))
1602
1673
  ] })
1603
1674
  ] });
1604
1675
  }
1605
- const nt = {
1676
+ const it = {
1606
1677
  ported: void 0,
1607
1678
  proposed: "warn",
1608
1679
  "in-review": "warn",
@@ -1611,18 +1682,18 @@ const nt = {
1611
1682
  implemented: "ok",
1612
1683
  superseded: void 0
1613
1684
  };
1614
- function at(e) {
1615
- return nt[e];
1685
+ function ct(e) {
1686
+ return it[e];
1616
1687
  }
1617
- const rt = ce(function({ viewport: t, textScale: n, reducedMotion: r, keyboardMode: i, children: a }, s) {
1688
+ const dt = pe(function({ viewport: t, textScale: n, reducedMotion: s, keyboardMode: l, children: a }, r) {
1618
1689
  return /* @__PURE__ */ o("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ o(
1619
1690
  "div",
1620
1691
  {
1621
- ref: s,
1692
+ ref: r,
1622
1693
  className: "ds-stage",
1623
1694
  "data-viewport": t.id,
1624
- "data-keyboard-mode": i,
1625
- "data-reduced-motion": r,
1695
+ "data-keyboard-mode": l,
1696
+ "data-reduced-motion": s,
1626
1697
  style: {
1627
1698
  width: t.width ? `${t.width}px` : "100%",
1628
1699
  minHeight: t.height ? `${t.height}px` : void 0,
@@ -1635,7 +1706,7 @@ const rt = ce(function({ viewport: t, textScale: n, reducedMotion: r, keyboardMo
1635
1706
  }
1636
1707
  ) });
1637
1708
  });
1638
- function st({ stops: e }) {
1709
+ function lt({ stops: e }) {
1639
1710
  return e.length === 0 ? null : /* @__PURE__ */ o("div", { className: "ds-chrome ds-taborder", "aria-hidden": "true", children: e.map((t) => /* @__PURE__ */ o(
1640
1711
  "span",
1641
1712
  {
@@ -1647,44 +1718,90 @@ function st({ stops: e }) {
1647
1718
  `${t.index}-${t.rect.top}-${t.rect.left}`
1648
1719
  )) });
1649
1720
  }
1650
- function it({ title: e, children: t }) {
1651
- return /* @__PURE__ */ d("div", { className: "ds-chrome ds-stage-empty", children: [
1721
+ function ut({ title: e, children: t }) {
1722
+ return /* @__PURE__ */ u("div", { className: "ds-chrome ds-stage-empty", children: [
1652
1723
  /* @__PURE__ */ o("h2", { children: e }),
1653
1724
  t
1654
1725
  ] });
1655
1726
  }
1656
- function ct({ registry: e, onOpenScenario: t, showPorted: n = !1 }) {
1657
- const r = A(), { product: i } = e, a = { includePorted: n }, s = e.coverage(a), c = e.activeScenarios(a).length, p = e.treeFor(a).filter((m) => m.scenarios.length > 0), h = e.orphansFor(a);
1658
- return /* @__PURE__ */ d("div", { className: "ds-chrome ds-home", children: [
1659
- /* @__PURE__ */ d("header", { className: "ds-home__header", children: [
1660
- /* @__PURE__ */ o("h1", { children: i.name }),
1661
- i.tagline && /* @__PURE__ */ o("p", { className: "ds-home__tagline", children: i.tagline }),
1662
- /* @__PURE__ */ o("p", { className: "ds-home__lead", children: r.home.lead(c) }),
1663
- /* @__PURE__ */ o("div", { className: "ds-chips", children: Object.entries(s).filter(([, m]) => m > 0).map(([m, b]) => /* @__PURE__ */ d("span", { className: "ds-chip", children: [
1664
- r.status[m],
1727
+ function ht({
1728
+ registry: e,
1729
+ onOpenScenario: t,
1730
+ view: n,
1731
+ onViewChange: s,
1732
+ showPorted: l = !1
1733
+ }) {
1734
+ const a = P(), { product: r } = e, c = n ?? (l ? "ported" : "active"), h = { view: c }, p = e.coverage(h), m = e.activeScenarios(h).length, v = e.treeFor(h).filter((S) => S.scenarios.length > 0), i = e.orphansFor(h), N = e.byStatus("ported").length, x = c === "ported" ? a.sidebar.portedReferences(N) : a.sidebar.activeWork;
1735
+ return /* @__PURE__ */ u("div", { className: "ds-chrome ds-home", children: [
1736
+ /* @__PURE__ */ u("header", { className: "ds-home__header", children: [
1737
+ /* @__PURE__ */ o("p", { className: "ds-home__view", "aria-live": "polite", children: x }),
1738
+ /* @__PURE__ */ o("h1", { children: r.name }),
1739
+ r.tagline && /* @__PURE__ */ o("p", { className: "ds-home__tagline", children: r.tagline }),
1740
+ /* @__PURE__ */ o("p", { className: "ds-home__lead", children: a.home.lead(m) }),
1741
+ /* @__PURE__ */ o("div", { className: "ds-chips", children: Object.entries(p).filter(([, S]) => S > 0).map(([S, d]) => /* @__PURE__ */ u("span", { className: "ds-chip", children: [
1742
+ a.status[S],
1665
1743
  ": ",
1666
- b
1667
- ] }, m)) })
1744
+ d
1745
+ ] }, S)) }),
1746
+ m > 0 && c === "active" && N > 0 && /* @__PURE__ */ o(
1747
+ "button",
1748
+ {
1749
+ type: "button",
1750
+ className: "ds-text-action ds-home__view-action",
1751
+ onClick: () => s?.("ported"),
1752
+ children: a.sidebar.viewPorted(N)
1753
+ }
1754
+ ),
1755
+ c === "ported" && /* @__PURE__ */ o(
1756
+ "button",
1757
+ {
1758
+ type: "button",
1759
+ className: "ds-text-action ds-home__view-action",
1760
+ onClick: () => s?.("active"),
1761
+ children: a.sidebar.backToActive
1762
+ }
1763
+ )
1764
+ ] }),
1765
+ /* @__PURE__ */ u("section", { className: "ds-home__legend", "aria-labelledby": "ds-status-legend-title", children: [
1766
+ /* @__PURE__ */ o("h2", { id: "ds-status-legend-title", children: a.home.statusLegend }),
1767
+ /* @__PURE__ */ o("ul", { children: se.map((S) => /* @__PURE__ */ u("li", { children: [
1768
+ /* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": S, "aria-hidden": "true" }),
1769
+ /* @__PURE__ */ u("span", { children: [
1770
+ /* @__PURE__ */ o("strong", { children: a.status[S] }),
1771
+ /* @__PURE__ */ o("small", { children: a.statusMeaning[S] })
1772
+ ] })
1773
+ ] }, S)) })
1774
+ ] }),
1775
+ m === 0 && /* @__PURE__ */ u("section", { className: "ds-home__empty", "aria-label": a.sidebar.currentView(x), children: [
1776
+ /* @__PURE__ */ o("p", { children: c === "ported" ? a.home.noPortedReferences : a.home.noActiveWork }),
1777
+ c === "active" && N > 0 && /* @__PURE__ */ o(
1778
+ "button",
1779
+ {
1780
+ type: "button",
1781
+ className: "ds-text-action",
1782
+ onClick: () => s?.("ported"),
1783
+ children: a.sidebar.viewPorted(N)
1784
+ }
1785
+ )
1668
1786
  ] }),
1669
- c === 0 && /* @__PURE__ */ o("p", { className: "ds-home__empty", children: r.home.noActiveWork }),
1670
- p.map(({ module: m, scenarios: b }) => /* @__PURE__ */ o(
1671
- dt,
1787
+ v.map(({ module: S, scenarios: d }) => /* @__PURE__ */ o(
1788
+ pt,
1672
1789
  {
1673
- module: m,
1674
- scenarios: b,
1790
+ module: S,
1791
+ scenarios: d,
1675
1792
  registry: e,
1676
- showPorted: n,
1793
+ view: c,
1677
1794
  onOpenScenario: t
1678
1795
  },
1679
- m.id
1796
+ S.id
1680
1797
  )),
1681
- h.length > 0 && /* @__PURE__ */ d("section", { className: "ds-home__module", children: [
1682
- /* @__PURE__ */ o("h2", { children: r.home.withoutModule }),
1683
- /* @__PURE__ */ o("p", { className: "ds-home__hint", children: r.home.withoutModuleHint }),
1798
+ i.length > 0 && /* @__PURE__ */ u("section", { className: "ds-home__module", children: [
1799
+ /* @__PURE__ */ o("h2", { children: a.home.withoutModule }),
1800
+ /* @__PURE__ */ o("p", { className: "ds-home__hint", children: a.home.withoutModuleHint }),
1684
1801
  /* @__PURE__ */ o(
1685
- re,
1802
+ le,
1686
1803
  {
1687
- scenarios: h,
1804
+ scenarios: i,
1688
1805
  registry: e,
1689
1806
  onOpenScenario: t
1690
1807
  }
@@ -1692,101 +1809,110 @@ function ct({ registry: e, onOpenScenario: t, showPorted: n = !1 }) {
1692
1809
  ] })
1693
1810
  ] });
1694
1811
  }
1695
- function dt({
1812
+ function pt({
1696
1813
  module: e,
1697
1814
  scenarios: t,
1698
1815
  registry: n,
1699
- showPorted: r,
1700
- onOpenScenario: i
1816
+ view: s,
1817
+ onOpenScenario: l
1701
1818
  }) {
1702
- return /* @__PURE__ */ d("section", { className: "ds-home__module", children: [
1819
+ return /* @__PURE__ */ u("section", { className: "ds-home__module", children: [
1703
1820
  /* @__PURE__ */ o("h2", { children: e.name }),
1704
1821
  e.description && /* @__PURE__ */ o("p", { className: "ds-home__hint", children: e.description }),
1705
1822
  (e.flows ?? []).map((a) => /* @__PURE__ */ o(
1706
- lt,
1823
+ mt,
1707
1824
  {
1708
1825
  flow: a,
1709
1826
  registry: n,
1710
- showPorted: r,
1711
- onOpenScenario: i
1827
+ view: s,
1828
+ onOpenScenario: l
1712
1829
  },
1713
1830
  a.id
1714
1831
  )),
1715
- /* @__PURE__ */ o(re, { scenarios: t, registry: n, onOpenScenario: i })
1832
+ /* @__PURE__ */ o(le, { scenarios: t, registry: n, onOpenScenario: l })
1716
1833
  ] });
1717
1834
  }
1718
- function lt({
1835
+ function mt({
1719
1836
  flow: e,
1720
1837
  registry: t,
1721
- showPorted: n,
1722
- onOpenScenario: r
1838
+ view: n,
1839
+ onOpenScenario: s
1723
1840
  }) {
1724
- const i = e.steps.filter((a) => {
1725
- const s = t.scenario(a.scenario);
1726
- return s && (n || s.status !== "ported");
1841
+ const l = e.steps.filter((a) => {
1842
+ const r = t.scenario(a.scenario);
1843
+ return r && (n === "ported" ? r.status === "ported" : r.status !== "ported");
1727
1844
  });
1728
- return i.length === 0 ? null : /* @__PURE__ */ d("div", { className: "ds-flow", children: [
1845
+ return l.length === 0 ? null : /* @__PURE__ */ u("div", { className: "ds-flow", children: [
1729
1846
  /* @__PURE__ */ o("h3", { children: e.title }),
1730
1847
  e.description && /* @__PURE__ */ o("p", { className: "ds-home__hint", children: e.description }),
1731
- /* @__PURE__ */ o("ol", { className: "ds-flow__steps", children: i.map((a, s) => {
1732
- const c = t.scenario(a.scenario), p = Object.entries(a.branches ?? {}).filter(([, h]) => {
1733
- const m = t.scenario(h);
1734
- return m && (n || m.status !== "ported");
1848
+ /* @__PURE__ */ o("ol", { className: "ds-flow__steps", children: l.map((a, r) => {
1849
+ const c = t.scenario(a.scenario), h = Object.entries(a.branches ?? {}).filter(([, p]) => {
1850
+ const m = t.scenario(p);
1851
+ return m && (n === "ported" ? m.status === "ported" : m.status !== "ported");
1735
1852
  });
1736
- return /* @__PURE__ */ d("li", { children: [
1737
- /* @__PURE__ */ o("button", { type: "button", className: "ds-flow__step", onClick: () => r(a.scenario), children: a.label ?? c?.title ?? a.scenario }),
1853
+ return /* @__PURE__ */ u("li", { children: [
1854
+ /* @__PURE__ */ o("button", { type: "button", className: "ds-flow__step", onClick: () => s(a.scenario), children: a.label ?? c?.title ?? a.scenario }),
1738
1855
  a.decision && /* @__PURE__ */ o("p", { className: "ds-flow__decision", children: a.decision }),
1739
- p.length > 0 && /* @__PURE__ */ o("ul", { className: "ds-flow__branches", children: p.map(([h, m]) => /* @__PURE__ */ d("li", { children: [
1740
- /* @__PURE__ */ o("span", { className: "ds-flow__branch-label", children: h }),
1856
+ h.length > 0 && /* @__PURE__ */ o("ul", { className: "ds-flow__branches", children: h.map(([p, m]) => /* @__PURE__ */ u("li", { children: [
1857
+ /* @__PURE__ */ o("span", { className: "ds-flow__branch-label", children: p }),
1741
1858
  /* @__PURE__ */ o(
1742
1859
  "button",
1743
1860
  {
1744
1861
  type: "button",
1745
1862
  className: "ds-flow__step",
1746
- onClick: () => r(m),
1863
+ onClick: () => s(m),
1747
1864
  children: t.scenario(m)?.title ?? m
1748
1865
  }
1749
1866
  )
1750
- ] }, h)) })
1751
- ] }, `${a.scenario}-${s}`);
1867
+ ] }, p)) })
1868
+ ] }, `${a.scenario}-${r}`);
1752
1869
  }) })
1753
1870
  ] });
1754
1871
  }
1755
- function re({
1872
+ function le({
1756
1873
  scenarios: e,
1757
1874
  registry: t,
1758
1875
  onOpenScenario: n
1759
1876
  }) {
1760
- const r = A();
1761
- return e.length === 0 ? /* @__PURE__ */ o("p", { className: "ds-home__hint", children: r.home.emptyModule }) : /* @__PURE__ */ o("ul", { className: "ds-home__grid", children: e.map((i) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ d("button", { type: "button", className: "ds-home__card", onClick: () => n(i.id), children: [
1762
- /* @__PURE__ */ d("span", { className: "ds-home__card-head", children: [
1763
- /* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": i.status }),
1764
- /* @__PURE__ */ o("span", { className: "ds-home__card-title", children: i.title })
1877
+ const s = P();
1878
+ return /* @__PURE__ */ o("ul", { className: "ds-home__grid", children: e.map((l) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ u("button", { type: "button", className: "ds-home__card", onClick: () => n(l.id), children: [
1879
+ /* @__PURE__ */ u("span", { className: "ds-home__card-head", children: [
1880
+ /* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": l.status }),
1881
+ /* @__PURE__ */ o("span", { className: "ds-home__card-title", children: l.title })
1765
1882
  ] }),
1766
- i.intent && /* @__PURE__ */ o("span", { className: "ds-home__card-intent", children: i.intent }),
1767
- /* @__PURE__ */ d("span", { className: "ds-home__card-meta", children: [
1768
- t.persona(i.persona)?.name ?? i.persona,
1883
+ l.intent && /* @__PURE__ */ o("span", { className: "ds-home__card-intent", children: l.intent }),
1884
+ /* @__PURE__ */ u("span", { className: "ds-home__card-meta", children: [
1885
+ t.persona(l.persona)?.name ?? l.persona,
1769
1886
  " · ",
1770
- r.status[i.status],
1771
- i.a11y.keyboard === "full" ? ` · ${r.home.keyboardBadge}` : ""
1887
+ s.status[l.status],
1888
+ l.a11y.keyboard === "full" ? ` · ${s.home.keyboardBadge}` : ""
1772
1889
  ] })
1773
- ] }) }, i.id)) });
1890
+ ] }) }, l.id)) });
1774
1891
  }
1775
- function Nt({ product: e }) {
1776
- const t = T(() => me(e), [e]), n = T(() => je(e.theme?.labels), [e.theme?.labels]), r = T(() => pe(e.deploy), [e.deploy]), { location: i, controls: a, viewport: s, setControls: c, navigate: p, openScenario: h, openComponent: m } = ge(t), b = q(null), { focused: u, tabStops: S } = We(a.keyboardMode, b), w = t.scenario(a.scenario), C = t.component(a.component), l = T(
1777
- () => t.resolveComponentFixture(C?.id, C ? a.fixture : void 0),
1778
- [C, a.fixture, t]
1779
- ), g = T(() => {
1780
- const x = l.fixture?.data;
1781
- return typeof x == "function" ? x() : x;
1782
- }, [l.fixture]), k = t.persona(a.persona ?? w?.persona), M = t.fixture(a.fixture ?? w?.fixture), _ = T(() => {
1783
- const x = a.dataSource ?? "fixtures";
1784
- return x === "fixtures" ? J : e.dataSources?.adapters?.find((L) => L.id === x) ?? J;
1785
- }, [a.dataSource, e.dataSources?.adapters]), { data: $, isLoading: D, error: W } = Te({ scenario: w, fixture: M, network: a.network, adapter: _ });
1786
- B(() => {
1787
- const x = (L) => {
1788
- if (!(!L.shiftKey || L.metaKey || L.ctrlKey || L.altKey || L.target?.matches("input, textarea, select, [contenteditable='true']"))) {
1789
- switch (L.key) {
1892
+ function St({ product: e }) {
1893
+ const t = C(() => ge(e), [e]), n = C(() => Ue(e.theme?.labels), [e.theme?.labels]), s = C(() => ve(e.deploy), [e.deploy]), {
1894
+ location: l,
1895
+ controls: a,
1896
+ viewport: r,
1897
+ setControls: c,
1898
+ setScenarioView: h,
1899
+ navigate: p,
1900
+ openScenario: m,
1901
+ openComponent: v
1902
+ } = Ne(t), i = ee(a), N = Q(null), { focused: x, tabStops: S } = ze(a.keyboardMode, N), d = t.scenario(a.scenario), f = t.component(a.component), k = C(
1903
+ () => t.resolveComponentFixture(f?.id, f ? a.fixture : void 0),
1904
+ [f, a.fixture, t]
1905
+ ), M = C(() => {
1906
+ const w = k.fixture?.data;
1907
+ return typeof w == "function" ? w() : w;
1908
+ }, [k.fixture]), _ = t.persona(a.persona ?? d?.persona), T = t.fixture(a.fixture ?? d?.fixture), B = C(() => {
1909
+ const w = a.dataSource ?? "fixtures";
1910
+ return w === "fixtures" ? Z : e.dataSources?.adapters?.find((y) => y.id === w) ?? Z;
1911
+ }, [a.dataSource, e.dataSources?.adapters]), { data: W, isLoading: F, error: R } = $e({ scenario: d, fixture: T, network: a.network, adapter: B });
1912
+ I(() => {
1913
+ const w = (y) => {
1914
+ if (!(!y.shiftKey || y.metaKey || y.ctrlKey || y.altKey || y.target?.matches("input, textarea, select, [contenteditable='true']"))) {
1915
+ switch (y.key) {
1790
1916
  case "K":
1791
1917
  c({ keyboardMode: !a.keyboardMode });
1792
1918
  break;
@@ -1796,24 +1922,24 @@ function Nt({ product: e }) {
1796
1922
  default:
1797
1923
  return;
1798
1924
  }
1799
- L.preventDefault();
1925
+ y.preventDefault();
1800
1926
  }
1801
1927
  };
1802
- return window.addEventListener("keydown", x), () => window.removeEventListener("keydown", x);
1928
+ return window.addEventListener("keydown", w), () => window.removeEventListener("keydown", w);
1803
1929
  }, [a.keyboardMode, a.inspector, c]);
1804
- const R = T(() => a.persona && a.persona !== w?.persona ? t.persona(a.persona)?.permissions ?? [] : t.permissionsOf(w), [a.persona, t, w]), j = T(
1930
+ const D = C(() => a.persona && a.persona !== d?.persona ? t.persona(a.persona)?.permissions ?? [] : t.permissionsOf(d), [a.persona, t, d]), j = C(
1805
1931
  () => ({
1806
- scenario: w,
1807
- persona: k,
1808
- permissions: R,
1809
- can: (x) => R.includes(x),
1810
- data: $,
1811
- fixture: M,
1932
+ scenario: d,
1933
+ persona: _,
1934
+ permissions: D,
1935
+ can: (w) => D.includes(w),
1936
+ data: W,
1937
+ fixture: T,
1812
1938
  network: a.network,
1813
- isLoading: D,
1814
- error: W,
1815
- rules: t.rulesOf(w),
1816
- viewport: s,
1939
+ isLoading: F,
1940
+ error: R,
1941
+ rules: t.rulesOf(d),
1942
+ viewport: r,
1817
1943
  themeMode: a.themeMode,
1818
1944
  locale: a.locale,
1819
1945
  a11y: {
@@ -1822,33 +1948,33 @@ function Nt({ product: e }) {
1822
1948
  textScale: a.textScale
1823
1949
  },
1824
1950
  navigate: p,
1825
- openScenario: h
1951
+ openScenario: m
1826
1952
  }),
1827
1953
  [
1828
- w,
1829
- k,
1830
- R,
1831
- $,
1832
- M,
1954
+ d,
1955
+ _,
1956
+ D,
1957
+ W,
1958
+ T,
1833
1959
  a.network,
1834
1960
  a.themeMode,
1835
1961
  a.locale,
1836
1962
  a.keyboardMode,
1837
1963
  a.reducedMotion,
1838
1964
  a.textScale,
1839
- D,
1840
- W,
1965
+ F,
1966
+ R,
1841
1967
  t,
1842
- s,
1968
+ r,
1843
1969
  p,
1844
- h
1970
+ m
1845
1971
  ]
1846
- ), U = !w && !C && i.path === "/", O = xe(e.routes, i.path), H = e.wrapper, K = e.notFound, f = C?.preview, N = f ? /* @__PURE__ */ o(
1847
- f,
1972
+ ), z = !d && !f && l.path === "/", O = Ce(e.routes, l.path), U = e.wrapper, H = e.notFound, K = f?.preview, V = K ? /* @__PURE__ */ o(
1973
+ K,
1848
1974
  {
1849
- fixture: l.fixture,
1850
- data: g,
1851
- viewport: s,
1975
+ fixture: k.fixture,
1976
+ data: M,
1977
+ viewport: r,
1852
1978
  themeMode: a.themeMode ?? "default",
1853
1979
  locale: a.locale ?? "default",
1854
1980
  a11y: {
@@ -1857,89 +1983,90 @@ function Nt({ product: e }) {
1857
1983
  textScale: a.textScale
1858
1984
  }
1859
1985
  }
1860
- ) : O ? /* @__PURE__ */ o(O.definition.screen, { params: O.params, context: j }) : K ? /* @__PURE__ */ o(K, { path: i.path }) : /* @__PURE__ */ o(it, { title: n.shell.noRoute, children: /* @__PURE__ */ d("p", { children: [
1861
- /* @__PURE__ */ o("code", { children: i.path }),
1986
+ ) : O ? /* @__PURE__ */ o(O.definition.screen, { params: O.params, context: j }) : H ? /* @__PURE__ */ o(H, { path: l.path }) : /* @__PURE__ */ o(ut, { title: n.shell.noRoute, children: /* @__PURE__ */ u("p", { children: [
1987
+ /* @__PURE__ */ o("code", { children: l.path }),
1862
1988
  " ",
1863
1989
  n.shell.noRouteHint
1864
- ] }) }), y = H ? /* @__PURE__ */ o(H, { context: j, children: N }) : N;
1865
- return /* @__PURE__ */ o(ae.Provider, { value: n, children: /* @__PURE__ */ d(
1990
+ ] }) }), b = U ? /* @__PURE__ */ o(U, { context: j, children: V }) : V;
1991
+ return /* @__PURE__ */ o(de.Provider, { value: n, children: /* @__PURE__ */ u(
1866
1992
  "div",
1867
1993
  {
1868
1994
  className: "ds-root",
1869
1995
  "data-chrome": a.chrome ? "visible" : "hidden",
1870
1996
  "data-appearance": a.chromeTheme ?? "dark",
1871
1997
  "data-inspector": a.inspector ? "open" : "closed",
1872
- "data-viewport": s.id,
1998
+ "data-viewport": r.id,
1873
1999
  children: [
1874
2000
  a.chrome && /* @__PURE__ */ o(
1875
- Ve,
2001
+ Qe,
1876
2002
  {
1877
2003
  product: e,
1878
- scenario: w,
1879
- deploy: r,
2004
+ scenario: d,
2005
+ deploy: s,
1880
2006
  inspectorOpen: a.inspector,
1881
2007
  chromeTheme: a.chromeTheme ?? "dark",
1882
- showPorted: a.showPorted ?? !1,
2008
+ view: i,
1883
2009
  onToggleInspector: () => c({ inspector: !a.inspector }),
1884
2010
  onToggleChromeTheme: () => c({ chromeTheme: a.chromeTheme === "light" ? "dark" : "light" })
1885
2011
  }
1886
2012
  ),
1887
2013
  a.chrome && /* @__PURE__ */ o(
1888
- He,
2014
+ Ve,
1889
2015
  {
1890
2016
  registry: t,
1891
- activeScenario: w,
2017
+ activeScenario: d,
1892
2018
  activeComponent: a.component,
1893
2019
  controls: a,
1894
- onOpenScenario: h,
1895
- onOpenComponent: m,
1896
- onShowPortedChange: (x) => c({ showPorted: x })
2020
+ onOpenScenario: m,
2021
+ onOpenComponent: v,
2022
+ onViewChange: h
1897
2023
  }
1898
2024
  ),
1899
- /* @__PURE__ */ d("div", { className: "ds-stage-area", children: [
1900
- U ? /* @__PURE__ */ o("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ o(
1901
- ct,
2025
+ /* @__PURE__ */ u("div", { className: "ds-stage-area", children: [
2026
+ z ? /* @__PURE__ */ o("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ o(
2027
+ ht,
1902
2028
  {
1903
2029
  registry: t,
1904
- showPorted: a.showPorted ?? !1,
1905
- onOpenScenario: h
2030
+ view: i,
2031
+ onViewChange: h,
2032
+ onOpenScenario: m
1906
2033
  }
1907
2034
  ) }) : /* @__PURE__ */ o(
1908
- rt,
2035
+ dt,
1909
2036
  {
1910
- ref: b,
1911
- viewport: s,
2037
+ ref: N,
2038
+ viewport: r,
1912
2039
  textScale: a.textScale,
1913
2040
  reducedMotion: a.reducedMotion,
1914
2041
  keyboardMode: a.keyboardMode,
1915
- children: y
2042
+ children: b
1916
2043
  }
1917
2044
  ),
1918
2045
  a.chrome && /* @__PURE__ */ o(
1919
- Qe,
2046
+ tt,
1920
2047
  {
1921
2048
  registry: t,
1922
2049
  controls: a,
1923
- scenarioActive: !!w,
1924
- component: C,
1925
- componentFixture: l,
2050
+ scenarioActive: !!d,
2051
+ component: f,
2052
+ componentFixture: k,
1926
2053
  onChange: c
1927
2054
  }
1928
2055
  )
1929
2056
  ] }),
1930
2057
  a.chrome && /* @__PURE__ */ o(
1931
- Ze,
2058
+ nt,
1932
2059
  {
1933
2060
  registry: t,
1934
- scenario: w,
1935
- component: C,
1936
- componentFixture: l,
2061
+ scenario: d,
2062
+ component: f,
2063
+ componentFixture: k,
1937
2064
  controls: a,
1938
- focusedNode: u,
2065
+ focusedNode: x,
1939
2066
  tabStopCount: S.length
1940
2067
  }
1941
2068
  ),
1942
- a.keyboardMode && /* @__PURE__ */ o(st, { stops: S }),
2069
+ a.keyboardMode && /* @__PURE__ */ o(lt, { stops: S }),
1943
2070
  !a.chrome && /* @__PURE__ */ o(
1944
2071
  "button",
1945
2072
  {
@@ -1953,77 +2080,77 @@ function Nt({ product: e }) {
1953
2080
  }
1954
2081
  ) });
1955
2082
  }
1956
- function z(e) {
2083
+ function Y(e) {
1957
2084
  return new Date(e.length === 10 ? `${e}T00:00:00` : e);
1958
2085
  }
1959
- function yt(e, t) {
1960
- const n = z(e), r = z(t);
1961
- let i = r.getFullYear() - n.getFullYear();
1962
- const a = r.getMonth() - n.getMonth();
1963
- return (a < 0 || a === 0 && r.getDate() < n.getDate()) && (i -= 1), i;
2086
+ function _t(e, t) {
2087
+ const n = Y(e), s = Y(t);
2088
+ let l = s.getFullYear() - n.getFullYear();
2089
+ const a = s.getMonth() - n.getMonth();
2090
+ return (a < 0 || a === 0 && s.getDate() < n.getDate()) && (l -= 1), l;
1964
2091
  }
1965
- function xt(e, t) {
1966
- const n = z(e), r = z(t);
1967
- return Math.floor((r.getTime() - n.getTime()) / 864e5);
2092
+ function Mt(e, t) {
2093
+ const n = Y(e), s = Y(t);
2094
+ return Math.floor((s.getTime() - n.getTime()) / 864e5);
1968
2095
  }
1969
2096
  export {
1970
- _t as CONTRAST_THRESHOLDS,
1971
- E as DEFAULT_LABELS,
1972
- Nt as DesignSpace,
1973
- bt as EN_US_LABELS,
1974
- ct as Home,
1975
- kt as KEYBOARD_LABELS,
1976
- wt as NETWORK_LABELS,
1977
- oe as NETWORK_STATES,
1978
- v as PARAM,
1979
- de as SCENARIO_STATUSES,
1980
- Me as SLOW_NETWORK_DELAY_MS,
1981
- gt as STATUS_LABELS,
1982
- vt as STATUS_MEANING,
1983
- _e as SimulatedNetworkError,
1984
- rt as Stage,
1985
- it as StageEmpty,
1986
- fe as TEXT_SCALES,
1987
- st as TabOrderOverlay,
1988
- ne as VIEWPORTS,
1989
- yt as ageInYears,
1990
- Ct as applyOverrides,
1991
- Tt as assertContrastPairs,
1992
- Pt as checkContrastPair,
1993
- he as checkContrastPairs,
1994
- At as commitUrl,
1995
- Lt as componentUrl,
1996
- Ee as computeRole,
1997
- Et as contrastRatio,
1998
- ft as createHttpAdapter,
1999
- me as createRegistry,
2000
- xt as daysBetween,
2001
- Le as describeElement,
2002
- J as fixtureAdapter,
2003
- Ft as flatten,
2004
- $t as formatIssues,
2005
- pe as getDeployContext,
2006
- Dt as hasErrors,
2007
- ye as matchPath,
2008
- Rt as parseColor,
2009
- be as parseControls,
2010
- z as parseIsoDate,
2011
- Ot as readCssVariable,
2012
- It as relativeLuminance,
2013
- Y as resolveFixture,
2014
- je as resolveLabels,
2015
- xe as resolveRoute,
2016
- ve as resolveViewport,
2017
- ue as scenarioUrl,
2018
- G as serializeControls,
2019
- Bt as serializeValue,
2020
- Ie as shortSelector,
2021
- Be as tabbableElements,
2022
- ge as useDesignSpaceState,
2023
- We as useKeyboardMode,
2024
- A as useLabels,
2025
- Te as useScenarioData,
2026
- le as validateProduct,
2027
- Wt as validateScenario
2097
+ At as CONTRAST_THRESHOLDS,
2098
+ L as DEFAULT_LABELS,
2099
+ St as DesignSpace,
2100
+ wt as EN_US_LABELS,
2101
+ ht as Home,
2102
+ yt as KEYBOARD_LABELS,
2103
+ xt as NETWORK_LABELS,
2104
+ ie as NETWORK_STATES,
2105
+ g as PARAM,
2106
+ se as SCENARIO_STATUSES,
2107
+ Ae as SLOW_NETWORK_DELAY_MS,
2108
+ kt as STATUS_LABELS,
2109
+ Nt as STATUS_MEANING,
2110
+ Pe as SimulatedNetworkError,
2111
+ dt as Stage,
2112
+ ut as StageEmpty,
2113
+ we as TEXT_SCALES,
2114
+ lt as TabOrderOverlay,
2115
+ ce as VIEWPORTS,
2116
+ _t as ageInYears,
2117
+ Pt as applyOverrides,
2118
+ Lt as assertContrastPairs,
2119
+ $t as checkContrastPair,
2120
+ be as checkContrastPairs,
2121
+ Et as commitUrl,
2122
+ Ft as componentUrl,
2123
+ De as computeRole,
2124
+ Rt as contrastRatio,
2125
+ gt as createHttpAdapter,
2126
+ ge as createRegistry,
2127
+ Mt as daysBetween,
2128
+ Re as describeElement,
2129
+ Z as fixtureAdapter,
2130
+ Dt as flatten,
2131
+ Ot as formatIssues,
2132
+ ve as getDeployContext,
2133
+ It as hasErrors,
2134
+ Me as matchPath,
2135
+ Bt as parseColor,
2136
+ ke as parseControls,
2137
+ Y as parseIsoDate,
2138
+ Wt as readCssVariable,
2139
+ jt as relativeLuminance,
2140
+ X as resolveFixture,
2141
+ Ue as resolveLabels,
2142
+ Ce as resolveRoute,
2143
+ xe as resolveViewport,
2144
+ fe as scenarioUrl,
2145
+ q as serializeControls,
2146
+ Ht as serializeValue,
2147
+ He as shortSelector,
2148
+ Ke as tabbableElements,
2149
+ Ne as useDesignSpaceState,
2150
+ ze as useKeyboardMode,
2151
+ P as useLabels,
2152
+ $e as useScenarioData,
2153
+ me as validateProduct,
2154
+ Kt as validateScenario
2028
2155
  };
2029
2156
  //# sourceMappingURL=index.js.map