@brucesantos/design-space 0.5.0 → 0.6.0

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