@pygmalionjs/pygmalion 0.2.36 → 0.2.37

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.
@@ -1,7 +1,7 @@
1
- import { jsxs as A, jsx as b } from "react/jsx-runtime";
2
- import { b as ne, m as Ze, i as et, g as tt, e as W, c as nt, a as rt, d as ot, f as st, h as it, j as at, k as ct, l as Se, n as lt, o as dt, p as ut, q as ft, r as mt, t as pt, u as Me, v as gt, w as ht, x as yt, y as Oe, z as be, A as de, B as ue, C as $e, S as wt, D as St, E as De, G as bt, H as ke, I as vt, J as It, K as xt, L as Pt, M as Et, O as Ct, P as Fe } from "./App-BE2sN74X.js";
3
- import { Q as Rn, R as An, T as Mn, U as On, V as $n, W as Dn, X as kn, Y as Fn, Z as Tn, _ as zn, $ as _n, a0 as jn, a1 as Bn, a2 as Un, a3 as Hn, a4 as qn, a5 as Gn, a6 as Kn, a7 as Vn, a8 as Jn, a9 as Wn, aa as Ln, ab as Qn, ac as Xn, ad as Yn, ae as Zn, af as er, ag as tr, ah as nr, ai as rr, aj as or, ak as sr, al as ir, am as ar, an as cr, ao as lr, ap as dr, aq as ur, ar as fr, as as mr, at as pr, au as gr, av as hr } from "./App-BE2sN74X.js";
4
- import { createElement as Te, useMemo as ae, useState as se, useRef as xe, useCallback as te, useEffect as ie, useLayoutEffect as ze } from "react";
1
+ import { jsxs as $, jsx as v } from "react/jsx-runtime";
2
+ import { b as ne, m as Ze, i as et, g as tt, e as V, c as nt, a as rt, d as ot, f as st, h as it, j as at, k as ct, l as be, n as lt, o as dt, p as ut, q as ft, r as pt, t as mt, u as Me, v as gt, w as ht, x as yt, y as $e, z as ve, A as de, B as ue, C as Oe, S as wt, D as bt, E as De, G as vt, H as ke, I as St, J as It, K as xt, L as Pt, M as Et, O as Ct, P as Fe } from "./App-BE2sN74X.js";
3
+ import { Q as Rn, R as An, T as Mn, U as $n, V as On, W as Dn, X as kn, Y as Fn, Z as Tn, _ as zn, $ as _n, a0 as jn, a1 as Bn, a2 as Un, a3 as Hn, a4 as qn, a5 as Gn, a6 as Kn, a7 as Ln, a8 as Wn, a9 as Vn, aa as Jn, ab as Qn, ac as Xn, ad as Yn, ae as Zn, af as er, ag as tr, ah as nr, ai as rr, aj as or, ak as sr, al as ir, am as ar, an as cr, ao as lr, ap as dr, aq as ur, ar as fr, as as pr, at as mr, au as gr, av as hr } from "./App-BE2sN74X.js";
4
+ import { createElement as Te, useMemo as re, useState as ie, useRef as xe, useCallback as te, useEffect as ae, useLayoutEffect as ze } from "react";
5
5
  function Pe(e, t = /* @__PURE__ */ new Set()) {
6
6
  if (e == null || typeof e == "string" || typeof e == "boolean" || typeof e == "number" && Number.isFinite(e))
7
7
  return e;
@@ -76,220 +76,220 @@ function _e(e) {
76
76
  ].join(":");
77
77
  }
78
78
  function Mt(e) {
79
- var _, J;
79
+ var j, W;
80
80
  const t = [], o = [], r = /* @__PURE__ */ new Map();
81
81
  for (const i of e.screens) {
82
- const a = i.id.trim();
83
- if (!a || r.has(a)) {
82
+ const c = i.id.trim();
83
+ if (!c || r.has(c)) {
84
84
  t.push({
85
85
  code: "duplicate-screen-id",
86
86
  severity: "error",
87
- message: a ? `Multiple storyboard screens use the id "${a}".` : "A storyboard screen has an empty id.",
88
- screenId: a || void 0
87
+ message: c ? `Multiple storyboard screens use the id "${c}".` : "A storyboard screen has an empty id.",
88
+ screenId: c || void 0
89
89
  });
90
90
  continue;
91
91
  }
92
- const l = a === i.id ? i : { ...i, id: a };
93
- r.set(a, l), o.push(l);
92
+ const l = c === i.id ? i : { ...i, id: c };
93
+ r.set(c, l), o.push(l);
94
94
  }
95
95
  const n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
96
96
  for (const i of o) {
97
- let a;
97
+ let c;
98
98
  try {
99
- if (a = (e.recipeKey ?? Nt)(i), !a.trim()) throw new Error("Recipe keys cannot be empty.");
100
- } catch (p) {
99
+ if (c = (e.recipeKey ?? Nt)(i), !c.trim()) throw new Error("Recipe keys cannot be empty.");
100
+ } catch (g) {
101
101
  s.add(i.id), t.push({
102
102
  code: "invalid-recipe",
103
103
  severity: "error",
104
- message: p instanceof Error ? p.message : "Storyboard recipe identity could not be created.",
104
+ message: g instanceof Error ? g.message : "Storyboard recipe identity could not be created.",
105
105
  screenId: i.id
106
- }), a = `invalid:${i.id}`;
106
+ }), c = `invalid:${i.id}`;
107
107
  }
108
- const l = n.get(a);
109
- l ? l.screens.push(i) : n.set(a, { recipeKey: a, screens: [i] });
108
+ const l = n.get(c);
109
+ l ? l.screens.push(i) : n.set(c, { recipeKey: c, screens: [i] });
110
110
  }
111
- const c = [...n.values()].map(At).sort((i, a) => i.id.localeCompare(a.id)), d = {};
112
- for (const i of c)
113
- for (const a of i.screenIds) d[a] = i.id;
114
- const u = new Map(c.map((i) => [i.id, i])), g = (i, a) => T([
115
- a,
111
+ const a = [...n.values()].map(At).sort((i, c) => i.id.localeCompare(c.id)), d = {};
112
+ for (const i of a)
113
+ for (const c of i.screenIds) d[c] = i.id;
114
+ const u = new Map(a.map((i) => [i.id, i])), h = (i, c) => T([
115
+ c,
116
116
  ...(i ?? []).flatMap((l) => {
117
- const p = l.trim(), I = d[p] ?? (u.has(p) ? p : null);
118
- return I ? [I] : [];
117
+ const g = l.trim(), x = d[g] ?? (u.has(g) ? g : null);
118
+ return x ? [x] : [];
119
119
  })
120
- ]), m = /* @__PURE__ */ new Map();
120
+ ]), p = /* @__PURE__ */ new Map();
121
121
  for (const i of e.assets ?? []) {
122
- const a = m.get(i.pageId);
123
- a ? a.push(i) : m.set(i.pageId, [i]);
122
+ const c = p.get(i.pageId);
123
+ c ? c.push(i) : p.set(i.pageId, [i]);
124
124
  }
125
- const y = c.map((i) => {
126
- const a = i.screenIds.flatMap(
127
- (l) => m.get(l) ?? []
125
+ const w = a.map((i) => {
126
+ const c = i.screenIds.flatMap(
127
+ (l) => p.get(l) ?? []
128
128
  );
129
129
  return {
130
130
  ...i,
131
131
  scenarioIds: T([
132
132
  ...i.scenarioIds,
133
- ...a.map((l) => l.scenarioId)
133
+ ...c.map((l) => l.scenarioId)
134
134
  ]),
135
135
  sourceKeys: T([
136
136
  ...i.sourceKeys,
137
- ...a.map((l) => l.sourcePath)
137
+ ...c.map((l) => l.sourcePath)
138
138
  ])
139
139
  };
140
- }), h = /* @__PURE__ */ new Map();
141
- for (const i of y)
142
- for (const a of i.routes) {
143
- const l = h.get(a);
144
- l ? l.push(i.id) : h.set(a, [i.id]);
140
+ }), P = /* @__PURE__ */ new Map();
141
+ for (const i of w)
142
+ for (const c of i.routes) {
143
+ const l = P.get(c);
144
+ l ? l.push(i.id) : P.set(c, [i.id]);
145
145
  }
146
- const x = (i, a, l) => {
147
- const p = i.trim(), I = d[p] ?? (u.has(p) ? p : null);
148
- if (I) return I;
149
- const N = T(h.get(p) ?? []);
150
- return N.length === 1 ? N[0] : N.length > 1 ? (t.push({
146
+ const I = (i, c, l) => {
147
+ const g = i.trim(), x = d[g] ?? (u.has(g) ? g : null);
148
+ if (x) return x;
149
+ const R = T(P.get(g) ?? []);
150
+ return R.length === 1 ? R[0] : R.length > 1 ? (t.push({
151
151
  code: l === "source" ? "ambiguous-edge-source" : "ambiguous-edge-target",
152
152
  severity: "error",
153
- message: `Storyboard edge "${a}" references an ambiguous ${l} route.`,
154
- edgeId: a,
155
- screenId: p || void 0
153
+ message: `Storyboard edge "${c}" references an ambiguous ${l} route.`,
154
+ edgeId: c,
155
+ screenId: g || void 0
156
156
  }), null) : (t.push({
157
157
  code: l === "source" ? "unknown-edge-source" : "unknown-edge-target",
158
158
  severity: "error",
159
- message: `Storyboard edge "${a}" references an unknown ${l}.`,
160
- edgeId: a,
161
- screenId: p || void 0
159
+ message: `Storyboard edge "${c}" references an unknown ${l}.`,
160
+ edgeId: c,
161
+ screenId: g || void 0
162
162
  }), null);
163
- }, S = [], E = /* @__PURE__ */ new Map(), f = [
163
+ }, m = [], E = /* @__PURE__ */ new Map(), f = [
164
164
  ["explicit", e.explicitEdges ?? []],
165
165
  ["inferred", e.inferredEdges ?? []]
166
166
  ];
167
- let O = 0;
168
- for (const [i, a] of f)
169
- for (const l of a) {
170
- const p = Rt(l, O);
171
- O += 1;
172
- const I = x(l.from, p, "source"), N = x(l.to, p, "target");
173
- if (!I || !N || I === N) continue;
174
- const M = g(l.fromScope, I), q = g(l.toScope, N), C = `${I}\0${N}`, w = E.get(C);
175
- if (w) {
176
- const z = {
177
- ...w,
167
+ let M = 0;
168
+ for (const [i, c] of f)
169
+ for (const l of c) {
170
+ const g = Rt(l, M);
171
+ M += 1;
172
+ const x = I(l.from, g, "source"), R = I(l.to, g, "target");
173
+ if (!x || !R || x === R) continue;
174
+ const k = h(l.fromScope, x), q = h(l.toScope, R), N = `${x}\0${R}`, y = E.get(N);
175
+ if (y) {
176
+ const _ = {
177
+ ...y,
178
178
  fromNodeIds: T([
179
- ...w.fromNodeIds ?? [w.from],
180
- ...M
179
+ ...y.fromNodeIds ?? [y.from],
180
+ ...k
181
181
  ]),
182
182
  toNodeIds: T([
183
- ...w.toNodeIds ?? [w.to],
183
+ ...y.toNodeIds ?? [y.to],
184
184
  ...q
185
185
  ]),
186
186
  sourceEdgeIds: T([
187
- ...w.sourceEdgeIds,
188
- p
187
+ ...y.sourceEdgeIds,
188
+ g
189
189
  ])
190
190
  };
191
- E.set(C, z);
192
- const G = S.indexOf(w);
193
- G >= 0 && (S[G] = z);
191
+ E.set(N, _);
192
+ const G = m.indexOf(y);
193
+ G >= 0 && (m[G] = _);
194
194
  continue;
195
195
  }
196
- const R = {
197
- id: p,
198
- from: I,
199
- to: N,
200
- fromNodeIds: M,
196
+ const A = {
197
+ id: g,
198
+ from: x,
199
+ to: R,
200
+ fromNodeIds: k,
201
201
  toNodeIds: q,
202
- kind: ((_ = l.kind) == null ? void 0 : _.trim()) || void 0,
203
- label: ((J = l.label) == null ? void 0 : J.trim()) || void 0,
202
+ kind: ((j = l.kind) == null ? void 0 : j.trim()) || void 0,
203
+ label: ((W = l.label) == null ? void 0 : W.trim()) || void 0,
204
204
  origin: i,
205
- sourceEdgeIds: [p]
205
+ sourceEdgeIds: [g]
206
206
  };
207
- E.set(C, R), S.push(R);
207
+ E.set(N, A), m.push(A);
208
208
  }
209
- S.sort(
210
- (i, a) => `${i.from}:${i.to}:${i.id}`.localeCompare(`${a.from}:${a.to}:${a.id}`)
209
+ m.sort(
210
+ (i, c) => `${i.from}:${i.to}:${i.id}`.localeCompare(`${c.from}:${c.to}:${c.id}`)
211
211
  );
212
- const D = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map();
213
- for (const i of S) {
214
- for (const a of i.fromNodeIds ?? [i.from]) {
215
- const l = k.get(a);
216
- l ? l.push(i) : k.set(a, [i]);
212
+ const D = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
213
+ for (const i of m) {
214
+ for (const c of i.fromNodeIds ?? [i.from]) {
215
+ const l = b.get(c);
216
+ l ? l.push(i) : b.set(c, [i]);
217
217
  }
218
- for (const a of i.toNodeIds ?? [i.to]) {
219
- const l = D.get(a);
220
- l ? l.push(i) : D.set(a, [i]);
218
+ for (const c of i.toNodeIds ?? [i.to]) {
219
+ const l = D.get(c);
220
+ l ? l.push(i) : D.set(c, [i]);
221
221
  }
222
222
  }
223
- const F = [];
223
+ const O = [];
224
224
  for (const i of e.startScreenIds ?? []) {
225
- const a = i.trim(), l = d[a] ?? (u.has(a) ? a : null);
225
+ const c = i.trim(), l = d[c] ?? (u.has(c) ? c : null);
226
226
  if (!l) {
227
227
  t.push({
228
228
  code: "unknown-start-screen",
229
229
  severity: "error",
230
- message: `Storyboard start references an unknown screen "${a}".`,
231
- screenId: a || void 0
230
+ message: `Storyboard start references an unknown screen "${c}".`,
231
+ screenId: c || void 0
232
232
  });
233
233
  continue;
234
234
  }
235
- F.push(l);
235
+ O.push(l);
236
236
  }
237
- const Y = new Set(F);
238
- let v = T(F);
239
- v.length || (v = y.filter((i) => {
240
- var a;
241
- return (((a = D.get(i.id)) == null ? void 0 : a.length) ?? 0) === 0;
242
- }).map((i) => i.id).sort((i, a) => i.localeCompare(a))), !v.length && y.length && (v = [y[0].id]);
243
- const P = /* @__PURE__ */ new Set(), $ = [...v];
244
- for (; $.length; ) {
245
- const i = $.shift();
246
- if (!P.has(i)) {
247
- P.add(i);
248
- for (const a of k.get(i) ?? [])
249
- $.push(a.to), i === a.from && $.push(...a.toNodeIds ?? [a.to]);
237
+ const Y = new Set(O);
238
+ let S = T(O);
239
+ S.length || (S = w.filter((i) => {
240
+ var c;
241
+ return (((c = D.get(i.id)) == null ? void 0 : c.length) ?? 0) === 0;
242
+ }).map((i) => i.id).sort((i, c) => i.localeCompare(c))), !S.length && w.length && (S = [w[0].id]);
243
+ const C = /* @__PURE__ */ new Set(), F = [...S];
244
+ for (; F.length; ) {
245
+ const i = F.shift();
246
+ if (!C.has(i)) {
247
+ C.add(i);
248
+ for (const c of b.get(i) ?? [])
249
+ F.push(c.to), i === c.from && F.push(...c.toNodeIds ?? [c.to]);
250
250
  }
251
251
  }
252
- const j = y.filter((i) => {
253
- var l, p;
254
- const a = (((l = D.get(i.id)) == null ? void 0 : l.length) ?? 0) === 0 && (((p = k.get(i.id)) == null ? void 0 : p.length) ?? 0) === 0 && !Y.has(i.id);
255
- return !P.has(i.id) || a && y.length > 1;
252
+ const z = w.filter((i) => {
253
+ var l, g;
254
+ const c = (((l = D.get(i.id)) == null ? void 0 : l.length) ?? 0) === 0 && (((g = b.get(i.id)) == null ? void 0 : g.length) ?? 0) === 0 && !Y.has(i.id);
255
+ return !C.has(i.id) || c && w.length > 1;
256
256
  });
257
- for (const i of j)
258
- for (const a of i.screenIds)
257
+ for (const i of z)
258
+ for (const c of i.screenIds)
259
259
  t.push({
260
260
  code: "disconnected-screen",
261
261
  severity: "warning",
262
- message: `Storyboard screen "${a}" is not connected to a graph branch.`,
263
- screenId: a,
262
+ message: `Storyboard screen "${c}" is not connected to a graph branch.`,
263
+ screenId: c,
264
264
  nodeId: i.id
265
265
  });
266
- const L = /* @__PURE__ */ new Map();
267
- for (const i of y)
268
- for (const a of i.sourceKeys) {
269
- const l = L.get(a) ?? {
266
+ const J = /* @__PURE__ */ new Map();
267
+ for (const i of w)
268
+ for (const c of i.sourceKeys) {
269
+ const l = J.get(c) ?? {
270
270
  nodeIds: /* @__PURE__ */ new Set(),
271
271
  screenIds: /* @__PURE__ */ new Set()
272
272
  };
273
273
  l.nodeIds.add(i.id);
274
- for (const p of i.screenIds) l.screenIds.add(p);
275
- L.set(a, l);
274
+ for (const g of i.screenIds) l.screenIds.add(g);
275
+ J.set(c, l);
276
276
  }
277
- const re = [...L.entries()].map(([i, a]) => ({
277
+ const oe = [...J.entries()].map(([i, c]) => ({
278
278
  sourceKey: i,
279
- nodeIds: [...a.nodeIds].sort((l, p) => l.localeCompare(p)),
280
- screenIds: [...a.screenIds].sort((l, p) => l.localeCompare(p)),
281
- shared: a.nodeIds.size > 1
282
- })).sort((i, a) => i.sourceKey.localeCompare(a.sourceKey)), oe = y.map((i) => {
283
- const a = [...k.get(i.id) ?? []].sort(
284
- (l, p) => l.id.localeCompare(p.id)
279
+ nodeIds: [...c.nodeIds].sort((l, g) => l.localeCompare(g)),
280
+ screenIds: [...c.screenIds].sort((l, g) => l.localeCompare(g)),
281
+ shared: c.nodeIds.size > 1
282
+ })).sort((i, c) => i.sourceKey.localeCompare(c.sourceKey)), se = w.map((i) => {
283
+ const c = [...b.get(i.id) ?? []].sort(
284
+ (l, g) => l.id.localeCompare(g.id)
285
285
  );
286
286
  return {
287
287
  nodeId: i.id,
288
- edgeIds: a.map((l) => l.id),
289
- targetNodeIds: T(a.map((l) => l.to))
288
+ edgeIds: c.map((l) => l.id),
289
+ targetNodeIds: T(c.map((l) => l.to))
290
290
  };
291
- }).filter((i) => i.targetNodeIds.length > 1).sort((i, a) => i.nodeId.localeCompare(a.nodeId)), Z = new Set(
292
- y.flatMap((i) => i.scenarioIds)
291
+ }).filter((i) => i.targetNodeIds.length > 1).sort((i, c) => i.nodeId.localeCompare(c.nodeId)), Z = new Set(
292
+ w.flatMap((i) => i.scenarioIds)
293
293
  ), K = new Set(
294
294
  (e.nonVisualScenarioIds ?? []).map((i) => i.trim())
295
295
  ), Q = T(
@@ -305,53 +305,53 @@ function Mt(e) {
305
305
  scenarioId: i
306
306
  });
307
307
  t.sort(
308
- (i, a) => _e(i).localeCompare(_e(a))
308
+ (i, c) => _e(i).localeCompare(_e(c))
309
309
  );
310
- const V = T(
311
- j.flatMap((i) => i.screenIds)
310
+ const L = T(
311
+ z.flatMap((i) => i.screenIds)
312
312
  ), ee = {
313
313
  screens: o.length,
314
- canonicalNodes: y.length,
315
- mergedScreens: Math.max(0, o.length - y.length),
316
- edges: S.length,
317
- connectedNodes: y.length - j.length,
318
- disconnectedScreens: V,
314
+ canonicalNodes: w.length,
315
+ mergedScreens: Math.max(0, o.length - w.length),
316
+ edges: m.length,
317
+ connectedNodes: w.length - z.length,
318
+ disconnectedScreens: L,
319
319
  codeScenarios: Q.length,
320
320
  representedScenarios: Q.filter(
321
321
  (i) => Z.has(i)
322
322
  ).length,
323
323
  missingScenarios: U,
324
- complete: V.length === 0 && U.length === 0 && !t.some((i) => i.severity === "error") && s.size === 0
324
+ complete: L.length === 0 && U.length === 0 && !t.some((i) => i.severity === "error") && s.size === 0
325
325
  };
326
326
  return {
327
327
  version: 1,
328
- nodes: y,
329
- edges: S,
328
+ nodes: w,
329
+ edges: m,
330
330
  aliases: Object.fromEntries(
331
- Object.entries(d).sort(([i], [a]) => i.localeCompare(a))
331
+ Object.entries(d).sort(([i], [c]) => i.localeCompare(c))
332
332
  ),
333
- sourceGroups: re,
334
- startNodeIds: v,
335
- branches: oe,
333
+ sourceGroups: oe,
334
+ startNodeIds: S,
335
+ branches: se,
336
336
  warnings: t,
337
337
  coverage: ee
338
338
  };
339
339
  }
340
- function Ot(e) {
340
+ function $t(e) {
341
341
  return e ? JSON.parse(JSON.stringify(e)) : void 0;
342
342
  }
343
- function pe(e) {
344
- if (Array.isArray(e)) return e.map(pe);
343
+ function me(e) {
344
+ if (Array.isArray(e)) return e.map(me);
345
345
  if (e && typeof e == "object") {
346
- const t = Object.entries(e).filter(([, o]) => o !== void 0).sort(([o], [r]) => o.localeCompare(r)).map(([o, r]) => [o, pe(r)]).filter(([, o]) => o !== void 0);
346
+ const t = Object.entries(e).filter(([, o]) => o !== void 0).sort(([o], [r]) => o.localeCompare(r)).map(([o, r]) => [o, me(r)]).filter(([, o]) => o !== void 0);
347
347
  return t.length ? Object.fromEntries(t) : void 0;
348
348
  }
349
349
  return e;
350
350
  }
351
351
  function je(e) {
352
- return JSON.stringify(pe(e ?? null));
352
+ return JSON.stringify(me(e ?? null));
353
353
  }
354
- function $t(e) {
354
+ function Ot(e) {
355
355
  return !!(e && typeof e == "object" && !Array.isArray(e));
356
356
  }
357
357
  function H(e) {
@@ -365,18 +365,18 @@ function H(e) {
365
365
  }
366
366
  return o = o.split(/[?#]/, 1)[0].replace(/\/{2,}/g, "/"), o.startsWith("/") || (o = `/${o}`), o.length > 1 && (o = o.replace(/\/+$/, "")), o || "/";
367
367
  }
368
- function Ve(e) {
368
+ function Le(e) {
369
369
  return `source-route:${encodeURIComponent(e)}`;
370
370
  }
371
371
  function Ne(e, t) {
372
372
  const o = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
373
373
  let n = 0;
374
374
  for (let s = 0; s < o.length; s += 1) {
375
- const c = o[s];
376
- if (c === "*" || c.startsWith("*")) return !0;
375
+ const a = o[s];
376
+ if (a === "*" || a.startsWith("*")) return !0;
377
377
  const d = r[n];
378
- if (!(c.endsWith("?") && d == null)) {
379
- if (d == null || !c.startsWith(":") && c !== d) return !1;
378
+ if (!(a.endsWith("?") && d == null)) {
379
+ if (d == null || !a.startsWith(":") && a !== d) return !1;
380
380
  n += 1;
381
381
  }
382
382
  }
@@ -391,10 +391,10 @@ function Be(e, t, o) {
391
391
  representativeId: n,
392
392
  screenIds: o.get(r) ?? [n]
393
393
  }
394
- ] : [...t.entries()].filter(([s]) => Ne(r, s)).map(([s, c]) => ({
395
- representativeId: c,
396
- screenIds: o.get(s) ?? [c]
397
- })).sort((s, c) => s.representativeId.localeCompare(c.representativeId));
394
+ ] : [...t.entries()].filter(([s]) => Ne(r, s)).map(([s, a]) => ({
395
+ representativeId: a,
396
+ screenIds: o.get(s) ?? [a]
397
+ })).sort((s, a) => s.representativeId.localeCompare(a.representativeId));
398
398
  }
399
399
  function Dt(e) {
400
400
  var o;
@@ -402,7 +402,7 @@ function Dt(e) {
402
402
  for (const r of e ?? []) {
403
403
  const n = H(r.path);
404
404
  !n || t.has(n) || t.set(n, {
405
- id: Ve(n),
405
+ id: Le(n),
406
406
  name: n,
407
407
  section: "Source routes",
408
408
  codeName: ((o = r.id) == null ? void 0 : o.trim()) || void 0
@@ -412,23 +412,23 @@ function Dt(e) {
412
412
  }
413
413
  function kt(e, t, o, r) {
414
414
  return (e ?? []).flatMap((n, s) => {
415
- var y, h, x;
416
- const c = (y = n.from) == null ? void 0 : y.trim(), d = (h = n.to) == null ? void 0 : h.trim();
417
- if (!c || !d || n.unresolvedTarget) return [];
418
- const u = r.has(c) ? [{ representativeId: c, screenIds: [c] }] : Be(c, t, o), g = r.has(d) ? [{ representativeId: d, screenIds: [d] }] : Be(d, t, o);
419
- if (!u.length || !g.length) return [];
420
- const m = ((x = n.id) == null ? void 0 : x.trim()) || `discovery-edge:${s + 1}`;
415
+ var w, P, I;
416
+ const a = (w = n.from) == null ? void 0 : w.trim(), d = (P = n.to) == null ? void 0 : P.trim();
417
+ if (!a || !d || n.unresolvedTarget) return [];
418
+ const u = r.has(a) ? [{ representativeId: a, screenIds: [a] }] : Be(a, t, o), h = r.has(d) ? [{ representativeId: d, screenIds: [d] }] : Be(d, t, o);
419
+ if (!u.length || !h.length) return [];
420
+ const p = ((I = n.id) == null ? void 0 : I.trim()) || `discovery-edge:${s + 1}`;
421
421
  return u.flatMap(
422
- (S, E) => g.map((f, O) => {
423
- var D, k;
422
+ (m, E) => h.map((f, M) => {
423
+ var D, b;
424
424
  return {
425
- id: u.length === 1 && g.length === 1 ? m : `${m}:${E + 1}:${O + 1}`,
426
- from: S.representativeId,
425
+ id: u.length === 1 && h.length === 1 ? p : `${p}:${E + 1}:${M + 1}`,
426
+ from: m.representativeId,
427
427
  to: f.representativeId,
428
- fromScope: S.screenIds,
428
+ fromScope: m.screenIds,
429
429
  toScope: f.screenIds,
430
430
  kind: ((D = n.kind) == null ? void 0 : D.trim()) || void 0,
431
- label: ((k = n.label) == null ? void 0 : k.trim()) || void 0
431
+ label: ((b = n.label) == null ? void 0 : b.trim()) || void 0
432
432
  };
433
433
  })
434
434
  );
@@ -446,12 +446,12 @@ function Ft(e, t, o) {
446
446
  if (!n.length) return [];
447
447
  const s = je(
448
448
  Ze(o, e.environment)
449
- ), c = n.filter(
449
+ ), a = n.filter(
450
450
  (d) => je(d.environment) === s
451
451
  );
452
452
  return [
453
453
  ...new Set(
454
- c.map((d) => {
454
+ a.map((d) => {
455
455
  var u;
456
456
  return (u = d.scenarioId) == null ? void 0 : u.trim();
457
457
  }).filter((d) => !!d)
@@ -459,7 +459,7 @@ function Ft(e, t, o) {
459
459
  ].sort((d, u) => d.localeCompare(u));
460
460
  }
461
461
  function Tt(e, t) {
462
- const o = e.some((s) => s.importKind != null), r = t.candidates ?? [], n = We(t);
462
+ const o = e.some((s) => s.importKind != null), r = t.candidates ?? [], n = Ve(t);
463
463
  return e.filter(
464
464
  (s) => o ? s.importKind === "screens" : !!s.route
465
465
  ).map((s) => ({
@@ -485,17 +485,17 @@ function Tt(e, t) {
485
485
  environment: s.environment,
486
486
  preset: s.preset,
487
487
  assertions: s.assertions,
488
- sourcePath: [...s.sourcePaths ?? []].filter(Boolean).sort((c, d) => c.localeCompare(d))[0]
488
+ sourcePath: [...s.sourcePaths ?? []].filter(Boolean).sort((a, d) => a.localeCompare(d))[0]
489
489
  }));
490
490
  }
491
491
  function we(e, t) {
492
- var d, u, g, m;
492
+ var d, u, h, p;
493
493
  const o = (((d = e.interactions) == null ? void 0 : d.length) ?? 0) - (((u = t.interactions) == null ? void 0 : u.length) ?? 0);
494
494
  if (o !== 0) return o;
495
- const r = (g = e.scenarioIds) != null && g.includes("environment:baseline") ? 0 : 1, n = (m = t.scenarioIds) != null && m.includes("environment:baseline") ? 0 : 1;
495
+ const r = (h = e.scenarioIds) != null && h.includes("environment:baseline") ? 0 : 1, n = (p = t.scenarioIds) != null && p.includes("environment:baseline") ? 0 : 1;
496
496
  if (r !== n) return r - n;
497
- const s = !e.environment && !e.preset ? 0 : 1, c = !t.environment && !t.preset ? 0 : 1;
498
- return s !== c ? s - c : e.id.localeCompare(t.id);
497
+ const s = !e.environment && !e.preset ? 0 : 1, a = !t.environment && !t.preset ? 0 : 1;
498
+ return s !== a ? s - a : e.id.localeCompare(t.id);
499
499
  }
500
500
  function zt(e) {
501
501
  const t = /* @__PURE__ */ new Map();
@@ -529,7 +529,7 @@ function _t(e) {
529
529
  }
530
530
  function jt(e) {
531
531
  return e.action === "wait" ? null : JSON.stringify(
532
- pe({
532
+ me({
533
533
  action: e.action,
534
534
  selector: e.selector,
535
535
  text: e.text,
@@ -543,7 +543,7 @@ function jt(e) {
543
543
  })
544
544
  );
545
545
  }
546
- function Je(e) {
546
+ function We(e) {
547
547
  return (e.interactions ?? []).map(jt).filter((t) => t != null);
548
548
  }
549
549
  function Bt(e, t) {
@@ -554,15 +554,15 @@ function Ut(e, t) {
554
554
  for (const r of e) {
555
555
  const n = H(r.route);
556
556
  if (!n) continue;
557
- const s = `${n}\0${Je(r).join("")}`, c = o.get(s);
558
- c ? c.push(r) : o.set(s, [r]);
557
+ const s = `${n}\0${We(r).join("")}`, a = o.get(s);
558
+ a ? a.push(r) : o.set(s, [r]);
559
559
  }
560
560
  return [...o.values()].flatMap((r) => {
561
561
  if (r.length < 2) return [];
562
- const n = H(r[0].route), s = t.get(n), c = r.find((d) => d.id === s) ?? [...r].sort(we)[0];
563
- return r.filter((d) => d.id !== c.id).sort((d, u) => d.id.localeCompare(u.id)).map((d) => ({
564
- id: `discovery-variant:${encodeURIComponent(c.id)}:${encodeURIComponent(d.id)}`,
565
- from: c.id,
562
+ const n = H(r[0].route), s = t.get(n), a = r.find((d) => d.id === s) ?? [...r].sort(we)[0];
563
+ return r.filter((d) => d.id !== a.id).sort((d, u) => d.id.localeCompare(u.id)).map((d) => ({
564
+ id: `discovery-variant:${encodeURIComponent(a.id)}:${encodeURIComponent(d.id)}`,
565
+ from: a.id,
566
566
  to: d.id,
567
567
  kind: "variant"
568
568
  }));
@@ -578,36 +578,36 @@ function Ht(e, t) {
578
578
  }
579
579
  return [...o.entries()].flatMap(([r, n]) => {
580
580
  const s = new Map(
581
- n.map((u) => [u.id, Je(u)])
582
- ), c = t.get(r), d = n.find(
583
- (u) => u.id === c
581
+ n.map((u) => [u.id, We(u)])
582
+ ), a = t.get(r), d = n.find(
583
+ (u) => u.id === a
584
584
  );
585
585
  return n.flatMap((u) => {
586
- const g = s.get(u.id);
587
- if (!g.length) return [];
588
- const y = n.filter(
589
- (h) => Bt(
590
- s.get(h.id),
591
- g
586
+ const h = s.get(u.id);
587
+ if (!h.length) return [];
588
+ const w = n.filter(
589
+ (P) => Bt(
590
+ s.get(P.id),
591
+ h
592
592
  )
593
- ).sort((h, x) => {
594
- const S = s.get(x.id).length - s.get(h.id).length;
595
- if (S !== 0) return S;
596
- const E = h.flow && h.flow === u.flow ? 0 : 1, f = x.flow && x.flow === u.flow ? 0 : 1;
593
+ ).sort((P, I) => {
594
+ const m = s.get(I.id).length - s.get(P.id).length;
595
+ if (m !== 0) return m;
596
+ const E = P.flow && P.flow === u.flow ? 0 : 1, f = I.flow && I.flow === u.flow ? 0 : 1;
597
597
  if (E !== f) return E - f;
598
- const O = h.section && h.section === u.section ? 0 : 1, D = x.section && x.section === u.section ? 0 : 1;
599
- if (O !== D) return O - D;
600
- const k = h.id === c ? 0 : 1, F = x.id === c ? 0 : 1;
601
- return k !== F ? k - F : we(h, x);
598
+ const M = P.section && P.section === u.section ? 0 : 1, D = I.section && I.section === u.section ? 0 : 1;
599
+ if (M !== D) return M - D;
600
+ const b = P.id === a ? 0 : 1, O = I.id === a ? 0 : 1;
601
+ return b !== O ? b - O : we(P, I);
602
602
  })[0];
603
- return y ? [
603
+ return w ? [
604
604
  {
605
- id: `discovery-recipe:${encodeURIComponent(y.id)}:${encodeURIComponent(u.id)}`,
606
- from: y.id,
605
+ id: `discovery-recipe:${encodeURIComponent(w.id)}:${encodeURIComponent(u.id)}`,
606
+ from: w.id,
607
607
  to: u.id,
608
608
  kind: "recipe-step"
609
609
  }
610
- ] : d && d.id !== u.id && s.get(d.id).join("") !== g.join("") ? [
610
+ ] : d && d.id !== u.id && s.get(d.id).join("") !== h.join("") ? [
611
611
  {
612
612
  id: `discovery-route-case:${encodeURIComponent(d.id)}:${encodeURIComponent(u.id)}`,
613
613
  from: d.id,
@@ -629,14 +629,14 @@ function qt(e) {
629
629
  }
630
630
  return [...t.values()].flatMap((r) => {
631
631
  const n = r[0], s = /* @__PURE__ */ new Map();
632
- for (const c of r) {
633
- const d = H(c.route);
632
+ for (const a of r) {
633
+ const d = H(a.route);
634
634
  if (!d) continue;
635
635
  const u = s.get(d);
636
- u ? u.push(c) : s.set(d, [c]);
636
+ u ? u.push(a) : s.set(d, [a]);
637
637
  }
638
- return s.size < 2 ? [] : [...s.values()].flatMap((c) => {
639
- const d = [...c].sort(
638
+ return s.size < 2 ? [] : [...s.values()].flatMap((a) => {
639
+ const d = [...a].sort(
640
640
  we
641
641
  )[0];
642
642
  return d.id === n.id ? [] : [
@@ -658,92 +658,92 @@ function Gt(e, t, o) {
658
658
  const s = H(n.route);
659
659
  if (!s || o.get(s) !== n.id)
660
660
  return n;
661
- const c = [...r].filter(
661
+ const a = [...r].filter(
662
662
  (d) => Ne(d, s)
663
663
  );
664
- return c.length ? {
664
+ return a.length ? {
665
665
  ...n,
666
666
  scenarioIds: [
667
667
  .../* @__PURE__ */ new Set([
668
668
  ...n.scenarioIds ?? [],
669
- ...c.map(Ve)
669
+ ...a.map(Le)
670
670
  ])
671
671
  ].sort((d, u) => d.localeCompare(u))
672
672
  } : n;
673
673
  });
674
674
  }
675
675
  function Kt(e, t) {
676
- var g, m, y, h, x;
677
- const o = new Set(e.map((S) => S.id)), r = new Map(
678
- e.map((S, E) => [S.id, E])
679
- ), n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
680
- for (const S of o)
681
- n.set(S, /* @__PURE__ */ new Set()), s.set(S, /* @__PURE__ */ new Set()), c.set(S, /* @__PURE__ */ new Set());
682
- for (const S of t) {
676
+ var h, p, w, P, I;
677
+ const o = new Set(e.map((m) => m.id)), r = new Map(
678
+ e.map((m, E) => [m.id, E])
679
+ ), n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
680
+ for (const m of o)
681
+ n.set(m, /* @__PURE__ */ new Set()), s.set(m, /* @__PURE__ */ new Set()), a.set(m, /* @__PURE__ */ new Set());
682
+ for (const m of t) {
683
683
  const E = [
684
- ...(S.fromScope ?? [S.from]).map(
685
- (f) => [f, S.to]
684
+ ...(m.fromScope ?? [m.from]).map(
685
+ (f) => [f, m.to]
686
686
  ),
687
- ...(S.toScope ?? [S.to]).map(
688
- (f) => [S.from, f]
687
+ ...(m.toScope ?? [m.to]).map(
688
+ (f) => [m.from, f]
689
689
  )
690
690
  ];
691
- for (const [f, O] of E)
692
- !o.has(f) || !o.has(O) || ((g = n.get(O)) == null || g.add(f), (m = s.get(f)) == null || m.add(O), (y = c.get(f)) == null || y.add(O), (h = c.get(O)) == null || h.add(f));
691
+ for (const [f, M] of E)
692
+ !o.has(f) || !o.has(M) || ((h = n.get(M)) == null || h.add(f), (p = s.get(f)) == null || p.add(M), (w = a.get(f)) == null || w.add(M), (P = a.get(M)) == null || P.add(f));
693
693
  }
694
694
  const d = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
695
- for (const S of o) {
696
- if (u.has(S)) continue;
697
- const E = [], f = [S];
695
+ for (const m of o) {
696
+ if (u.has(m)) continue;
697
+ const E = [], f = [m];
698
698
  for (; f.length; ) {
699
- const v = f.shift();
700
- if (!u.has(v)) {
701
- u.add(v), E.push(v);
702
- for (const P of c.get(v) ?? [])
703
- u.has(P) || f.push(P);
699
+ const S = f.shift();
700
+ if (!u.has(S)) {
701
+ u.add(S), E.push(S);
702
+ for (const C of a.get(S) ?? [])
703
+ u.has(C) || f.push(C);
704
704
  }
705
705
  }
706
- if (E.length === 1 && (((x = c.get(E[0])) == null ? void 0 : x.size) ?? 0) === 0)
706
+ if (E.length === 1 && (((I = a.get(E[0])) == null ? void 0 : I.size) ?? 0) === 0)
707
707
  continue;
708
- const O = E.filter((v) => {
709
- var P;
710
- return (((P = n.get(v)) == null ? void 0 : P.size) ?? 0) === 0;
708
+ const M = E.filter((S) => {
709
+ var C;
710
+ return (((C = n.get(S)) == null ? void 0 : C.size) ?? 0) === 0;
711
711
  }).sort(
712
- (v, P) => (r.get(v) ?? Number.MAX_SAFE_INTEGER) - (r.get(P) ?? Number.MAX_SAFE_INTEGER) || v.localeCompare(P)
712
+ (S, C) => (r.get(S) ?? Number.MAX_SAFE_INTEGER) - (r.get(C) ?? Number.MAX_SAFE_INTEGER) || S.localeCompare(C)
713
713
  ), D = [...E].sort(
714
- (v, P) => (r.get(v) ?? Number.MAX_SAFE_INTEGER) - (r.get(P) ?? Number.MAX_SAFE_INTEGER) || v.localeCompare(P)
714
+ (S, C) => (r.get(S) ?? Number.MAX_SAFE_INTEGER) - (r.get(C) ?? Number.MAX_SAFE_INTEGER) || S.localeCompare(C)
715
715
  )[0];
716
716
  if (!D) continue;
717
- const k = [D], F = /* @__PURE__ */ new Set(), Y = (v) => {
718
- const P = [v];
719
- for (; P.length; ) {
720
- const $ = P.shift();
721
- if (!F.has($)) {
722
- F.add($);
723
- for (const j of s.get($) ?? [])
724
- F.has(j) || P.push(j);
717
+ const b = [D], O = /* @__PURE__ */ new Set(), Y = (S) => {
718
+ const C = [S];
719
+ for (; C.length; ) {
720
+ const F = C.shift();
721
+ if (!O.has(F)) {
722
+ O.add(F);
723
+ for (const z of s.get(F) ?? [])
724
+ O.has(z) || C.push(z);
725
725
  }
726
726
  }
727
727
  };
728
728
  Y(D);
729
- for (const v of O)
730
- F.has(v) || (k.push(v), Y(v));
731
- for (const v of k)
732
- d.add(v);
729
+ for (const S of M)
730
+ O.has(S) || (b.push(S), Y(S));
731
+ for (const S of b)
732
+ d.add(S);
733
733
  }
734
734
  return [...d].sort(
735
- (S, E) => (r.get(S) ?? Number.MAX_SAFE_INTEGER) - (r.get(E) ?? Number.MAX_SAFE_INTEGER) || S.localeCompare(E)
735
+ (m, E) => (r.get(m) ?? Number.MAX_SAFE_INTEGER) - (r.get(E) ?? Number.MAX_SAFE_INTEGER) || m.localeCompare(E)
736
736
  );
737
737
  }
738
- function We(e) {
738
+ function Ve(e) {
739
739
  var t, o;
740
- return Ot(
740
+ return $t(
741
741
  (o = (t = e.scenarios) == null ? void 0 : t.find(
742
742
  (r) => r.id === "environment:baseline"
743
743
  )) == null ? void 0 : o.environment
744
744
  );
745
745
  }
746
- function Vt(e) {
746
+ function Lt(e) {
747
747
  const t = Tt(
748
748
  e.pages,
749
749
  e.manifest
@@ -751,7 +751,7 @@ function Vt(e) {
751
751
  t,
752
752
  e.manifest,
753
753
  o
754
- ), c = [
754
+ ), a = [
755
755
  ...kt(
756
756
  e.manifest.edges,
757
757
  o,
@@ -766,11 +766,11 @@ function Vt(e) {
766
766
  screens: n,
767
767
  assets: e.assets,
768
768
  scenarios: Dt(e.manifest.routes),
769
- inferredEdges: c,
770
- startScreenIds: Kt(n, c)
769
+ inferredEdges: a,
770
+ startScreenIds: Kt(n, a)
771
771
  });
772
772
  }
773
- async function Le(e) {
773
+ async function Je(e) {
774
774
  const o = await (e.fetcher ?? ((n, s) => fetch(n, s)))(e.endpoint, {
775
775
  headers: { accept: "application/json" },
776
776
  cache: "no-store",
@@ -779,41 +779,41 @@ async function Le(e) {
779
779
  if (!o.ok)
780
780
  throw new Error(`Storyboard discovery failed (${o.status})`);
781
781
  const r = await o.json();
782
- if (!$t(r))
782
+ if (!Ot(r))
783
783
  throw new Error("Storyboard discovery returned an invalid manifest.");
784
784
  return {
785
785
  manifest: r,
786
- baselineEnvironment: We(r),
787
- graph: Vt({
786
+ baselineEnvironment: Ve(r),
787
+ graph: Lt({
788
788
  manifest: r,
789
789
  pages: e.pages,
790
790
  assets: e.assets
791
791
  })
792
792
  };
793
793
  }
794
- async function mn(e) {
794
+ async function pn(e) {
795
795
  ne(null);
796
796
  try {
797
- const t = await Le(e);
797
+ const t = await Je(e);
798
798
  return ne(t.graph), t;
799
799
  } catch (t) {
800
800
  throw ne(null), t;
801
801
  }
802
802
  }
803
- const ge = "var(--pygmalion-catalog-surface, #ffffff)", he = "var(--pygmalion-catalog-canvas, #f5f5f5)", Ee = "var(--pygmalion-catalog-border, #e5e7eb)", ye = "var(--pygmalion-catalog-text, #202124)", B = "var(--pygmalion-catalog-muted, #6b7280)", Jt = "var(--pygmalion-catalog-header, #11182f)", Wt = "var(--pygmalion-catalog-accent, #7c6cf2)";
804
- function pn({
803
+ const ge = "var(--pygmalion-catalog-surface, #ffffff)", he = "var(--pygmalion-catalog-canvas, #f5f5f5)", Ee = "var(--pygmalion-catalog-border, #e5e7eb)", ye = "var(--pygmalion-catalog-text, #202124)", B = "var(--pygmalion-catalog-muted, #6b7280)", Wt = "var(--pygmalion-catalog-header, #11182f)", Vt = "var(--pygmalion-catalog-accent, #7c6cf2)";
804
+ function mn({
805
805
  title: e,
806
806
  eyebrow: t,
807
807
  description: o,
808
808
  version: r,
809
809
  meta: n,
810
810
  children: s,
811
- headerBackground: c = Jt,
811
+ headerBackground: a = Wt,
812
812
  headerColor: d = "#ffffff",
813
813
  bodyBackground: u = ge,
814
- bodyGap: g = 40
814
+ bodyGap: h = 40
815
815
  }) {
816
- return /* @__PURE__ */ A(
816
+ return /* @__PURE__ */ $(
817
817
  "section",
818
818
  {
819
819
  "data-pygmalion-catalog-document": "",
@@ -830,7 +830,7 @@ function pn({
830
830
  fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
831
831
  },
832
832
  children: [
833
- /* @__PURE__ */ A(
833
+ /* @__PURE__ */ $(
834
834
  "header",
835
835
  {
836
836
  style: {
@@ -841,11 +841,11 @@ function pn({
841
841
  gap: 48,
842
842
  padding: "44px 48px 48px",
843
843
  color: d,
844
- background: c
844
+ background: a
845
845
  },
846
846
  children: [
847
- /* @__PURE__ */ A("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
848
- t ? /* @__PURE__ */ b(
847
+ /* @__PURE__ */ $("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
848
+ t ? /* @__PURE__ */ v(
849
849
  "div",
850
850
  {
851
851
  style: {
@@ -858,7 +858,7 @@ function pn({
858
858
  children: t
859
859
  }
860
860
  ) : null,
861
- /* @__PURE__ */ b(
861
+ /* @__PURE__ */ v(
862
862
  "h1",
863
863
  {
864
864
  style: {
@@ -872,7 +872,7 @@ function pn({
872
872
  children: e
873
873
  }
874
874
  ),
875
- o ? /* @__PURE__ */ b(
875
+ o ? /* @__PURE__ */ v(
876
876
  "div",
877
877
  {
878
878
  style: {
@@ -885,7 +885,7 @@ function pn({
885
885
  }
886
886
  ) : null
887
887
  ] }),
888
- r || n ? /* @__PURE__ */ A(
888
+ r || n ? /* @__PURE__ */ $(
889
889
  "div",
890
890
  {
891
891
  style: {
@@ -897,15 +897,15 @@ function pn({
897
897
  whiteSpace: "nowrap"
898
898
  },
899
899
  children: [
900
- r ? /* @__PURE__ */ b("span", { children: r }) : null,
901
- n ? /* @__PURE__ */ b("span", { children: n }) : null
900
+ r ? /* @__PURE__ */ v("span", { children: r }) : null,
901
+ n ? /* @__PURE__ */ v("span", { children: n }) : null
902
902
  ]
903
903
  }
904
904
  ) : null
905
905
  ]
906
906
  }
907
907
  ),
908
- /* @__PURE__ */ b(
908
+ /* @__PURE__ */ v(
909
909
  "div",
910
910
  {
911
911
  "data-pygmalion-catalog-document-body": "",
@@ -914,7 +914,7 @@ function pn({
914
914
  display: "inline-flex",
915
915
  flexDirection: "column",
916
916
  alignItems: "flex-start",
917
- gap: g,
917
+ gap: h,
918
918
  padding: 48,
919
919
  background: u
920
920
  },
@@ -933,7 +933,7 @@ function gn({
933
933
  children: n,
934
934
  tone: s = "tinted"
935
935
  }) {
936
- return /* @__PURE__ */ A(
936
+ return /* @__PURE__ */ $(
937
937
  "section",
938
938
  {
939
939
  "data-pygmalion-catalog-section": "",
@@ -949,8 +949,8 @@ function gn({
949
949
  background: s === "tinted" ? he : "transparent"
950
950
  },
951
951
  children: [
952
- /* @__PURE__ */ A("header", { style: { display: "flex", alignItems: "baseline", gap: 8 }, children: [
953
- /* @__PURE__ */ b(
952
+ /* @__PURE__ */ $("header", { style: { display: "flex", alignItems: "baseline", gap: 8 }, children: [
953
+ /* @__PURE__ */ v(
954
954
  "h2",
955
955
  {
956
956
  style: {
@@ -962,9 +962,9 @@ function gn({
962
962
  children: e
963
963
  }
964
964
  ),
965
- typeof o == "number" ? /* @__PURE__ */ b("span", { style: { color: B, fontSize: 11 }, children: o }) : null
965
+ typeof o == "number" ? /* @__PURE__ */ v("span", { style: { color: B, fontSize: 11 }, children: o }) : null
966
966
  ] }),
967
- r ? /* @__PURE__ */ b("div", { style: { marginTop: -10, color: B, fontSize: 11 }, children: r }) : null,
967
+ r ? /* @__PURE__ */ v("div", { style: { marginTop: -10, color: B, fontSize: 11 }, children: r }) : null,
968
968
  n
969
969
  ]
970
970
  }
@@ -977,10 +977,10 @@ function hn({
977
977
  renderCell: r,
978
978
  renderRowLabel: n = (u) => u,
979
979
  renderColumnLabel: s = (u) => u,
980
- boundary: c = !0,
980
+ boundary: a = !0,
981
981
  cellStyle: d
982
982
  }) {
983
- return /* @__PURE__ */ b(
983
+ return /* @__PURE__ */ v(
984
984
  "div",
985
985
  {
986
986
  "data-pygmalion-catalog-matrix": "",
@@ -988,11 +988,11 @@ function hn({
988
988
  boxSizing: "border-box",
989
989
  display: "inline-block",
990
990
  width: "max-content",
991
- padding: c ? 16 : 0,
992
- border: c ? `1px dashed ${Wt}` : void 0,
993
- borderRadius: c ? 4 : void 0
991
+ padding: a ? 16 : 0,
992
+ border: a ? `1px dashed ${Vt}` : void 0,
993
+ borderRadius: a ? 4 : void 0
994
994
  },
995
- children: /* @__PURE__ */ A(
995
+ children: /* @__PURE__ */ $(
996
996
  "table",
997
997
  {
998
998
  style: {
@@ -1001,8 +1001,8 @@ function hn({
1001
1001
  borderSpacing: 0
1002
1002
  },
1003
1003
  children: [
1004
- /* @__PURE__ */ b("thead", { children: /* @__PURE__ */ A("tr", { children: [
1005
- /* @__PURE__ */ b(
1004
+ /* @__PURE__ */ v("thead", { children: /* @__PURE__ */ $("tr", { children: [
1005
+ /* @__PURE__ */ v(
1006
1006
  "th",
1007
1007
  {
1008
1008
  style: {
@@ -1016,7 +1016,7 @@ function hn({
1016
1016
  children: o
1017
1017
  }
1018
1018
  ),
1019
- t.map((u) => /* @__PURE__ */ b(
1019
+ t.map((u) => /* @__PURE__ */ v(
1020
1020
  "th",
1021
1021
  {
1022
1022
  style: {
@@ -1032,8 +1032,8 @@ function hn({
1032
1032
  u
1033
1033
  ))
1034
1034
  ] }) }),
1035
- /* @__PURE__ */ b("tbody", { children: e.map((u) => /* @__PURE__ */ A("tr", { children: [
1036
- /* @__PURE__ */ b(
1035
+ /* @__PURE__ */ v("tbody", { children: e.map((u) => /* @__PURE__ */ $("tr", { children: [
1036
+ /* @__PURE__ */ v(
1037
1037
  "th",
1038
1038
  {
1039
1039
  style: {
@@ -1047,7 +1047,7 @@ function hn({
1047
1047
  children: n(u)
1048
1048
  }
1049
1049
  ),
1050
- t.map((g) => /* @__PURE__ */ b(
1050
+ t.map((h) => /* @__PURE__ */ v(
1051
1051
  "td",
1052
1052
  {
1053
1053
  style: {
@@ -1056,9 +1056,9 @@ function hn({
1056
1056
  verticalAlign: "middle",
1057
1057
  ...d
1058
1058
  },
1059
- children: r(u, g)
1059
+ children: r(u, h)
1060
1060
  },
1061
- g
1061
+ h
1062
1062
  ))
1063
1063
  ] }, u)) })
1064
1064
  ]
@@ -1067,11 +1067,11 @@ function hn({
1067
1067
  }
1068
1068
  );
1069
1069
  }
1070
- function Lt(e) {
1070
+ function Jt(e) {
1071
1071
  return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/[^\p{L}\p{N}]+/gu, "-").replace(/^-+|-+$/g, "").toLowerCase() || "page";
1072
1072
  }
1073
1073
  function Qe(e, t, o = "PygmalionCatalog") {
1074
- const r = (n) => Lt(n).replace(/-/g, "_");
1074
+ const r = (n) => Jt(n).replace(/-/g, "_");
1075
1075
  return `${o}_${r(e)}_${r(t)}`;
1076
1076
  }
1077
1077
  function Xe(e, t) {
@@ -1103,7 +1103,7 @@ function Xt({
1103
1103
  secondaryLabel: r,
1104
1104
  minimumColumnWidth: n
1105
1105
  }) {
1106
- return /* @__PURE__ */ A(
1106
+ return /* @__PURE__ */ $(
1107
1107
  "section",
1108
1108
  {
1109
1109
  "data-pygmalion-catalog-page": e.id,
@@ -1118,14 +1118,14 @@ function Xt({
1118
1118
  fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
1119
1119
  },
1120
1120
  children: [
1121
- /* @__PURE__ */ A("header", { style: { marginBottom: 24 }, children: [
1122
- /* @__PURE__ */ b("h1", { style: { margin: 0, fontSize: 24, lineHeight: 1.35 }, children: e.name }),
1123
- /* @__PURE__ */ A("p", { style: { margin: "6px 0 0", color: B, fontSize: 13 }, children: [
1121
+ /* @__PURE__ */ $("header", { style: { marginBottom: 24 }, children: [
1122
+ /* @__PURE__ */ v("h1", { style: { margin: 0, fontSize: 24, lineHeight: 1.35 }, children: e.name }),
1123
+ /* @__PURE__ */ $("p", { style: { margin: "6px 0 0", color: B, fontSize: 13 }, children: [
1124
1124
  t.length,
1125
1125
  " assets"
1126
1126
  ] })
1127
1127
  ] }),
1128
- /* @__PURE__ */ b(
1128
+ /* @__PURE__ */ v(
1129
1129
  "div",
1130
1130
  {
1131
1131
  style: {
@@ -1133,7 +1133,7 @@ function Xt({
1133
1133
  gridTemplateColumns: "repeat(6, max-content)",
1134
1134
  gap: 16
1135
1135
  },
1136
- children: t.map((s) => /* @__PURE__ */ A(
1136
+ children: t.map((s) => /* @__PURE__ */ $(
1137
1137
  "article",
1138
1138
  {
1139
1139
  "data-pygmalion-catalog-item": s.id,
@@ -1146,7 +1146,7 @@ function Xt({
1146
1146
  background: ge
1147
1147
  },
1148
1148
  children: [
1149
- /* @__PURE__ */ b(
1149
+ /* @__PURE__ */ v(
1150
1150
  "div",
1151
1151
  {
1152
1152
  style: {
@@ -1159,7 +1159,7 @@ function Xt({
1159
1159
  children: o(s)
1160
1160
  }
1161
1161
  ),
1162
- /* @__PURE__ */ b(
1162
+ /* @__PURE__ */ v(
1163
1163
  "div",
1164
1164
  {
1165
1165
  style: {
@@ -1174,7 +1174,7 @@ function Xt({
1174
1174
  children: s.name
1175
1175
  }
1176
1176
  ),
1177
- r ? /* @__PURE__ */ b("div", { style: { marginTop: 4, color: B, fontSize: 11, lineHeight: 1.45 }, children: r(s) }) : s.codeName ? /* @__PURE__ */ b(
1177
+ r ? /* @__PURE__ */ v("div", { style: { marginTop: 4, color: B, fontSize: 11, lineHeight: 1.45 }, children: r(s) }) : s.codeName ? /* @__PURE__ */ v(
1178
1178
  "div",
1179
1179
  {
1180
1180
  style: {
@@ -1204,11 +1204,11 @@ function yn(e) {
1204
1204
  Ye(e.items);
1205
1205
  const t = /* @__PURE__ */ new Map();
1206
1206
  for (const n of e.items) {
1207
- const s = e.pageFor(n), c = t.get(s.id);
1208
- if (c) {
1209
- if (c.page.name !== s.name || c.page.section !== s.section)
1207
+ const s = e.pageFor(n), a = t.get(s.id);
1208
+ if (a) {
1209
+ if (a.page.name !== s.name || a.page.section !== s.section)
1210
1210
  throw new Error(`Conflicting design catalog page descriptor: ${s.id}`);
1211
- c.items.push(n);
1211
+ a.items.push(n);
1212
1212
  continue;
1213
1213
  }
1214
1214
  t.set(s.id, {
@@ -1223,7 +1223,7 @@ function yn(e) {
1223
1223
  }
1224
1224
  const o = {}, r = [];
1225
1225
  for (const n of t.values()) {
1226
- const s = () => /* @__PURE__ */ b(
1226
+ const s = () => /* @__PURE__ */ v(
1227
1227
  Xt,
1228
1228
  {
1229
1229
  page: n.page,
@@ -1237,13 +1237,13 @@ function yn(e) {
1237
1237
  component: s,
1238
1238
  children: "none"
1239
1239
  };
1240
- const c = Qt(e.frame, n.page, n.items);
1240
+ const a = Qt(e.frame, n.page, n.items);
1241
1241
  r.push({
1242
1242
  ...n.page,
1243
1243
  componentName: n.registryName,
1244
- width: (c == null ? void 0 : c.width) ?? 1,
1245
- height: (c == null ? void 0 : c.height) ?? 1,
1246
- frameSizeMode: c ? "fixed" : "content"
1244
+ width: (a == null ? void 0 : a.width) ?? 1,
1245
+ height: (a == null ? void 0 : a.height) ?? 1,
1246
+ frameSizeMode: a ? "fixed" : "content"
1247
1247
  });
1248
1248
  }
1249
1249
  return {
@@ -1256,10 +1256,10 @@ function yn(e) {
1256
1256
  };
1257
1257
  }
1258
1258
  function Yt(e, t = 60) {
1259
- const o = Object.entries((e == null ? void 0 : e.props) ?? {}).filter(([, d]) => d.length > 0).sort(([d, u], [g, m]) => m.length - u.length || d.localeCompare(g)), r = o[0], n = o[1], s = Math.max(1, (r == null ? void 0 : r[1].length) ?? 1), c = n == null ? void 0 : n[1].slice(0, Math.max(1, Math.floor(t / s)));
1259
+ const o = Object.entries((e == null ? void 0 : e.props) ?? {}).filter(([, d]) => d.length > 0).sort(([d, u], [h, p]) => p.length - u.length || d.localeCompare(h)), r = o[0], n = o[1], s = Math.max(1, (r == null ? void 0 : r[1].length) ?? 1), a = n == null ? void 0 : n[1].slice(0, Math.max(1, Math.floor(t / s)));
1260
1260
  return {
1261
1261
  row: r,
1262
- column: n ? [n[0], c ?? []] : void 0,
1262
+ column: n ? [n[0], a ?? []] : void 0,
1263
1263
  fixed: o.slice(2).map(([d, u]) => [d, u[0]]),
1264
1264
  additional: o.slice(2)
1265
1265
  };
@@ -1279,7 +1279,7 @@ function en({
1279
1279
  }) {
1280
1280
  var d, u;
1281
1281
  if (!t)
1282
- return /* @__PURE__ */ A(
1282
+ return /* @__PURE__ */ $(
1283
1283
  "section",
1284
1284
  {
1285
1285
  "data-pygmalion-catalog-component": e.id,
@@ -1293,13 +1293,13 @@ function en({
1293
1293
  background: he
1294
1294
  },
1295
1295
  children: [
1296
- /* @__PURE__ */ b("strong", { children: e.name }),
1297
- /* @__PURE__ */ b("p", { style: { color: B }, children: "The component is not registered." })
1296
+ /* @__PURE__ */ v("strong", { children: e.name }),
1297
+ /* @__PURE__ */ v("p", { style: { color: B }, children: "The component is not registered." })
1298
1298
  ]
1299
1299
  }
1300
1300
  );
1301
- const r = Yt(t, o), n = ((d = r.row) == null ? void 0 : d[1]) ?? [void 0], s = ((u = r.column) == null ? void 0 : u[1]) ?? [void 0], c = t.component;
1302
- return /* @__PURE__ */ A(
1301
+ const r = Yt(t, o), n = ((d = r.row) == null ? void 0 : d[1]) ?? [void 0], s = ((u = r.column) == null ? void 0 : u[1]) ?? [void 0], a = t.component;
1302
+ return /* @__PURE__ */ $(
1303
1303
  "section",
1304
1304
  {
1305
1305
  "data-pygmalion-catalog-component": e.id,
@@ -1314,11 +1314,11 @@ function en({
1314
1314
  fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
1315
1315
  },
1316
1316
  children: [
1317
- /* @__PURE__ */ A("header", { style: { marginBottom: 24 }, children: [
1318
- /* @__PURE__ */ b("h1", { style: { margin: 0, fontSize: 24 }, children: e.name }),
1319
- e.sourcePath ? /* @__PURE__ */ b("p", { style: { margin: "6px 0 0", color: B, fontSize: 12 }, children: e.sourcePath }) : null
1317
+ /* @__PURE__ */ $("header", { style: { marginBottom: 24 }, children: [
1318
+ /* @__PURE__ */ v("h1", { style: { margin: 0, fontSize: 24 }, children: e.name }),
1319
+ e.sourcePath ? /* @__PURE__ */ v("p", { style: { margin: "6px 0 0", color: B, fontSize: 12 }, children: e.sourcePath }) : null
1320
1320
  ] }),
1321
- /* @__PURE__ */ b(
1321
+ /* @__PURE__ */ v(
1322
1322
  "div",
1323
1323
  {
1324
1324
  style: {
@@ -1327,12 +1327,12 @@ function en({
1327
1327
  gap: 12
1328
1328
  },
1329
1329
  children: n.flatMap(
1330
- (g) => s.map((m) => {
1331
- const y = Zt(t, r, g, m), h = [
1332
- r.row && g ? `${r.row[0]}=${g}` : "",
1333
- r.column && m ? `${r.column[0]}=${m}` : ""
1330
+ (h) => s.map((p) => {
1331
+ const w = Zt(t, r, h, p), P = [
1332
+ r.row && h ? `${r.row[0]}=${h}` : "",
1333
+ r.column && p ? `${r.column[0]}=${p}` : ""
1334
1334
  ].filter(Boolean).join(" · ");
1335
- return /* @__PURE__ */ A(
1335
+ return /* @__PURE__ */ $(
1336
1336
  "article",
1337
1337
  {
1338
1338
  style: {
@@ -1343,23 +1343,23 @@ function en({
1343
1343
  background: ge
1344
1344
  },
1345
1345
  children: [
1346
- h ? /* @__PURE__ */ b("div", { style: { marginBottom: 12, color: B, fontSize: 11 }, children: h }) : null,
1347
- /* @__PURE__ */ b("div", { style: { display: "flex", minHeight: 44, alignItems: "center" }, children: Te(
1348
- c,
1349
- y,
1346
+ P ? /* @__PURE__ */ v("div", { style: { marginBottom: 12, color: B, fontSize: 11 }, children: P }) : null,
1347
+ /* @__PURE__ */ v("div", { style: { display: "flex", minHeight: 44, alignItems: "center" }, children: Te(
1348
+ a,
1349
+ w,
1350
1350
  t.children === "text" ? t.defaultChildren ?? e.name : void 0
1351
1351
  ) })
1352
1352
  ]
1353
1353
  },
1354
- `${g ?? "default"}:${m ?? "default"}`
1354
+ `${h ?? "default"}:${p ?? "default"}`
1355
1355
  );
1356
1356
  })
1357
1357
  )
1358
1358
  }
1359
1359
  ),
1360
- r.additional.map(([g, m]) => /* @__PURE__ */ A("section", { style: { marginTop: 20 }, children: [
1361
- /* @__PURE__ */ b("h2", { style: { margin: "0 0 10px", color: B, fontSize: 12 }, children: g }),
1362
- /* @__PURE__ */ b("div", { style: { display: "flex", flexWrap: "wrap", gap: 12 }, children: m.map((y) => /* @__PURE__ */ A(
1360
+ r.additional.map(([h, p]) => /* @__PURE__ */ $("section", { style: { marginTop: 20 }, children: [
1361
+ /* @__PURE__ */ v("h2", { style: { margin: "0 0 10px", color: B, fontSize: 12 }, children: h }),
1362
+ /* @__PURE__ */ v("div", { style: { display: "flex", flexWrap: "wrap", gap: 12 }, children: p.map((w) => /* @__PURE__ */ $(
1363
1363
  "article",
1364
1364
  {
1365
1365
  style: {
@@ -1369,17 +1369,17 @@ function en({
1369
1369
  background: ge
1370
1370
  },
1371
1371
  children: [
1372
- /* @__PURE__ */ b("div", { style: { marginBottom: 12, color: B, fontSize: 11 }, children: y }),
1372
+ /* @__PURE__ */ v("div", { style: { marginBottom: 12, color: B, fontSize: 11 }, children: w }),
1373
1373
  Te(
1374
- c,
1375
- { ...t.defaultProps, [g]: y },
1374
+ a,
1375
+ { ...t.defaultProps, [h]: w },
1376
1376
  t.children === "text" ? t.defaultChildren ?? e.name : void 0
1377
1377
  )
1378
1378
  ]
1379
1379
  },
1380
- y
1380
+ w
1381
1381
  )) })
1382
- ] }, g))
1382
+ ] }, h))
1383
1383
  ]
1384
1384
  }
1385
1385
  );
@@ -1388,11 +1388,11 @@ function wn(e) {
1388
1388
  Ye(e.items);
1389
1389
  const t = {}, o = [], r = [], n = e.maxVariantCells ?? 60;
1390
1390
  for (const s of e.items) {
1391
- const c = Qe(
1391
+ const a = Qe(
1392
1392
  e.kind,
1393
1393
  s.id,
1394
1394
  e.registryPrefix
1395
- ), d = e.registry[s.name], u = () => /* @__PURE__ */ b(
1395
+ ), d = e.registry[s.name], u = () => /* @__PURE__ */ v(
1396
1396
  en,
1397
1397
  {
1398
1398
  item: s,
@@ -1400,11 +1400,11 @@ function wn(e) {
1400
1400
  maxVariantCells: n
1401
1401
  }
1402
1402
  );
1403
- t[c] = { component: u, children: "none" }, o.push({
1403
+ t[a] = { component: u, children: "none" }, o.push({
1404
1404
  id: s.id,
1405
1405
  name: s.name,
1406
1406
  section: s.section,
1407
- componentName: c,
1407
+ componentName: a,
1408
1408
  // The seed exists only long enough to mount the intrinsic max-content
1409
1409
  // catalog root. The editor replaces it with actual rendered DOM bounds.
1410
1410
  width: 1,
@@ -1429,7 +1429,7 @@ function He(e, t) {
1429
1429
  const o = new URL(e, t);
1430
1430
  return o.search = "", o.hash = "", o.pathname.endsWith("/") || (o.pathname = `${o.pathname}/`), o.href;
1431
1431
  }
1432
- function ve(e) {
1432
+ function Se(e) {
1433
1433
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1434
1434
  const t = e;
1435
1435
  return typeof t.domStructureHash != "string" || !Ue.test(t.domStructureHash) || typeof t.screenshotHash != "string" || !Ue.test(t.screenshotHash) ? null : {
@@ -1464,11 +1464,11 @@ function on(e, t) {
1464
1464
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1465
1465
  const o = e;
1466
1466
  if (typeof o.id != "string" || !o.id) return null;
1467
- const r = ve(o), n = ve(o.before) ?? r;
1467
+ const r = Se(o), n = Se(o.before) ?? r;
1468
1468
  if (!n) return null;
1469
- const s = ve(o.after);
1469
+ const s = Se(o.after);
1470
1470
  if (t === "changed" && !s) return null;
1471
- const c = s ? rn(o.pixelDiff) : null;
1471
+ const a = s ? rn(o.pixelDiff) : null;
1472
1472
  return {
1473
1473
  id: o.id,
1474
1474
  before: n,
@@ -1477,17 +1477,17 @@ function on(e, t) {
1477
1477
  domChanged: n.domStructureHash !== s.domStructureHash,
1478
1478
  screenshotChanged: n.screenshotHash !== s.screenshotHash
1479
1479
  } : {},
1480
- ...c ? { pixelDiff: c } : {}
1480
+ ...a ? { pixelDiff: a } : {}
1481
1481
  };
1482
1482
  }
1483
1483
  function sn(e, t = []) {
1484
1484
  const o = new Set(t), r = o.size > 0, n = /* @__PURE__ */ new Set(), s = [
1485
- ...e.styles.map((c) => c.affectedFrames ?? []),
1486
- ...e.texts.map((c) => c.affectedFrames ?? []),
1487
- ...e.operations.map((c) => c.affectedFrames ?? [])
1485
+ ...e.styles.map((a) => a.affectedFrames ?? []),
1486
+ ...e.texts.map((a) => a.affectedFrames ?? []),
1487
+ ...e.operations.map((a) => a.affectedFrames ?? [])
1488
1488
  ];
1489
- for (const c of s)
1490
- for (const d of c) {
1489
+ for (const a of s)
1490
+ for (const d of a) {
1491
1491
  if (r && nn.test(d.id) && !o.has(d.id))
1492
1492
  throw new Error(
1493
1493
  `"Impact Screen"${d.name}"This internal editor ID (${d.id}) is used. A canonical screen ID is required.`
@@ -1508,41 +1508,41 @@ async function Ge(e, t, o) {
1508
1508
  );
1509
1509
  if (typeof n.baselineId != "string" || !n.baselineId)
1510
1510
  throw new Error("Pygmalion visual QA response has no baselineId");
1511
- const s = Array.isArray(n.frames) ? n.frames.map((m) => on(m, o.phase)).filter((m) => m != null) : [], c = Array.isArray(n.failures) ? n.failures.map((m) => {
1512
- if (!m || typeof m != "object" || Array.isArray(m)) return null;
1513
- const y = m;
1514
- return typeof y.id == "string" && typeof y.error == "string" ? { id: y.id, error: y.error } : null;
1515
- }).filter((m) => m != null) : [], d = new Set(o.frameIds), g = new Set(s.map((m) => m.id)).size === s.length && s.every((m) => d.has(m.id)) && c.every((m) => d.has(m.id));
1511
+ const s = Array.isArray(n.frames) ? n.frames.map((p) => on(p, o.phase)).filter((p) => p != null) : [], a = Array.isArray(n.failures) ? n.failures.map((p) => {
1512
+ if (!p || typeof p != "object" || Array.isArray(p)) return null;
1513
+ const w = p;
1514
+ return typeof w.id == "string" && typeof w.error == "string" ? { id: w.id, error: w.error } : null;
1515
+ }).filter((p) => p != null) : [], d = new Set(o.frameIds), h = new Set(s.map((p) => p.id)).size === s.length && s.every((p) => d.has(p.id)) && a.every((p) => d.has(p.id));
1516
1516
  return {
1517
1517
  phase: o.phase,
1518
1518
  baselineId: n.baselineId,
1519
- complete: n.complete !== !1 && g && c.length === 0 && s.length === o.frameIds.length,
1519
+ complete: n.complete !== !1 && h && a.length === 0 && s.length === o.frameIds.length,
1520
1520
  frames: s,
1521
- failures: c
1521
+ failures: a
1522
1522
  };
1523
1523
  }
1524
1524
  const Ie = {
1525
1525
  mirror: "/__pygmalion-dev-control",
1526
1526
  sessions: "/__pygmalion-design-session",
1527
1527
  inspect: "/__pygmalion-inspect"
1528
- }, an = "pygmalion.designSessionId", cn = "/__pygmalion-qa", me = /* @__PURE__ */ new Map();
1528
+ }, an = "pygmalion.designSessionId", cn = "/__pygmalion-qa", pe = /* @__PURE__ */ new Map();
1529
1529
  function Ke() {
1530
1530
  var e;
1531
1531
  return typeof window < "u" && ((e = window.crypto) != null && e.randomUUID) ? window.crypto.randomUUID() : `pygmalion-${Date.now()}-${Math.random().toString(36).slice(2)}`;
1532
1532
  }
1533
1533
  function ln(e, t) {
1534
1534
  if (e) return e;
1535
- const o = me.get(t);
1535
+ const o = pe.get(t);
1536
1536
  if (o) return o;
1537
1537
  try {
1538
1538
  const r = window.localStorage.getItem(t);
1539
1539
  if (r)
1540
- return me.set(t, r), r;
1540
+ return pe.set(t, r), r;
1541
1541
  const n = Ke();
1542
- return window.localStorage.setItem(t, n), me.set(t, n), n;
1542
+ return window.localStorage.setItem(t, n), pe.set(t, n), n;
1543
1543
  } catch {
1544
1544
  const r = Ke();
1545
- return me.set(t, r), r;
1545
+ return pe.set(t, r), r;
1546
1546
  }
1547
1547
  }
1548
1548
  async function X(e) {
@@ -1550,21 +1550,21 @@ async function X(e) {
1550
1550
  if (!e.ok) throw new Error(t.error ?? `Pygmalion request failed (${e.status})`);
1551
1551
  return t;
1552
1552
  }
1553
- function Sn(e = {}) {
1554
- var V, ee, _, J, i;
1553
+ function bn(e = {}) {
1554
+ var L, ee, j, W, i;
1555
1555
  const {
1556
1556
  sessionId: t,
1557
1557
  sessionStorageKey: o = an,
1558
1558
  autoStart: r = !0,
1559
1559
  fetcher: n = fetch,
1560
1560
  formatApplyMessage: s
1561
- } = e, c = ((V = e.endpoints) == null ? void 0 : V.mirror) ?? Ie.mirror, d = ((ee = e.endpoints) == null ? void 0 : ee.sessions) ?? Ie.sessions, u = ((_ = e.endpoints) == null ? void 0 : _.inspect) ?? Ie.inspect, g = e.visualQa != null, m = ((J = e.visualQa) == null ? void 0 : J.endpoint) ?? cn, y = JSON.stringify(((i = e.visualQa) == null ? void 0 : i.eligibleFrameIds) ?? []), h = ae(
1562
- () => JSON.parse(y),
1563
- [y]
1564
- ), x = ae(
1561
+ } = e, a = ((L = e.endpoints) == null ? void 0 : L.mirror) ?? Ie.mirror, d = ((ee = e.endpoints) == null ? void 0 : ee.sessions) ?? Ie.sessions, u = ((j = e.endpoints) == null ? void 0 : j.inspect) ?? Ie.inspect, h = e.visualQa != null, p = ((W = e.visualQa) == null ? void 0 : W.endpoint) ?? cn, w = JSON.stringify(((i = e.visualQa) == null ? void 0 : i.eligibleFrameIds) ?? []), P = re(
1562
+ () => JSON.parse(w),
1563
+ [w]
1564
+ ), I = re(
1565
1565
  () => ln(t, o),
1566
1566
  [t, o]
1567
- ), [S, E] = se({
1567
+ ), [m, E] = ie({
1568
1568
  state: "idle",
1569
1569
  commit: null,
1570
1570
  shortCommit: null,
@@ -1574,99 +1574,99 @@ function Sn(e = {}) {
1574
1574
  warning: null,
1575
1575
  error: null,
1576
1576
  appOrigin: null
1577
- }), [f, O] = se(null), [D, k] = se(null), [F, Y] = se({
1577
+ }), [f, M] = ie(null), [D, b] = ie(null), [O, Y] = ie({
1578
1578
  refs: [],
1579
1579
  defaultRef: null,
1580
1580
  worktreeRef: null
1581
- }), v = xe(null), P = xe(null), $ = te(
1582
- async (a = !0, l) => {
1583
- if (l != null && v.current && await v.current.catch(() => {
1584
- }), v.current) return v.current;
1585
- const p = (async () => {
1586
- E((I) => ({ ...I, state: "syncing", error: null }));
1581
+ }), S = xe(null), C = xe(null), F = te(
1582
+ async (c = !0, l) => {
1583
+ if (l != null && S.current && await S.current.catch(() => {
1584
+ }), S.current) return S.current;
1585
+ const g = (async () => {
1586
+ E((x) => ({ ...x, state: "syncing", error: null }));
1587
1587
  try {
1588
- const I = l != null;
1589
- let N = await n(`${c}/${a || I ? "refresh" : "status"}`, {
1590
- method: a || I ? "POST" : "GET",
1591
- ...I ? {
1588
+ const x = l != null;
1589
+ let R = await n(`${a}/${c || x ? "refresh" : "status"}`, {
1590
+ method: c || x ? "POST" : "GET",
1591
+ ...x ? {
1592
1592
  headers: { "content-type": "application/json" },
1593
1593
  body: JSON.stringify({ ref: l })
1594
1594
  } : {}
1595
- }), M = await X(N);
1595
+ }), k = await X(R);
1596
1596
  const q = Date.now();
1597
- for (; !a && M.state === "syncing" && Date.now() - q < 12e4; )
1598
- await new Promise((R) => window.setTimeout(R, 500)), N = await n(`${c}/status`), M = await X(N);
1599
- if (M.state !== "ready" || !M.appOrigin || !M.commit)
1600
- throw new Error(M.error ?? "Pygmalion could not prepare the source preview");
1601
- const C = await X(
1597
+ for (; !c && k.state === "syncing" && Date.now() - q < 12e4; )
1598
+ await new Promise((A) => window.setTimeout(A, 500)), R = await n(`${a}/status`), k = await X(R);
1599
+ if (k.state !== "ready" || !k.appOrigin || !k.commit)
1600
+ throw new Error(k.error ?? "Pygmalion could not prepare the source preview");
1601
+ const N = await X(
1602
1602
  await n(`${d}/open`, {
1603
1603
  method: "POST",
1604
1604
  headers: { "content-type": "application/json" },
1605
- body: JSON.stringify({ sessionId: x, baseDevSha: M.commit })
1605
+ body: JSON.stringify({ sessionId: I, baseDevSha: k.commit })
1606
1606
  })
1607
1607
  );
1608
- if (!C.ok || !C.session)
1609
- throw new Error(C.error ?? "Pygmalion could not open the design session");
1610
- let w = C.session;
1611
- if (w.branchName) {
1612
- const R = await X(
1608
+ if (!N.ok || !N.session)
1609
+ throw new Error(N.error ?? "Pygmalion could not open the design session");
1610
+ let y = N.session;
1611
+ if (y.branchName) {
1612
+ const A = await X(
1613
1613
  await n(`${d}/check`, {
1614
1614
  method: "POST",
1615
1615
  headers: { "content-type": "application/json" },
1616
- body: JSON.stringify({ sessionId: w.id })
1616
+ body: JSON.stringify({ sessionId: y.id })
1617
1617
  })
1618
1618
  );
1619
- if (!R.ok || !R.session)
1620
- throw new Error(R.error ?? "Pygmalion could not check the design session");
1621
- w = R.session;
1619
+ if (!A.ok || !A.session)
1620
+ throw new Error(A.error ?? "Pygmalion could not check the design session");
1621
+ y = A.session;
1622
1622
  }
1623
- E(M), O(w), k(w.appOrigin ?? M.appOrigin);
1624
- } catch (I) {
1625
- E((N) => ({
1626
- ...N,
1623
+ E(k), M(y), b(y.appOrigin ?? k.appOrigin);
1624
+ } catch (x) {
1625
+ E((R) => ({
1626
+ ...R,
1627
1627
  state: "error",
1628
- error: I instanceof Error ? I.message : String(I)
1628
+ error: x instanceof Error ? x.message : String(x)
1629
1629
  }));
1630
1630
  }
1631
1631
  })();
1632
- v.current = p;
1632
+ S.current = g;
1633
1633
  try {
1634
- await p;
1634
+ await g;
1635
1635
  } finally {
1636
- v.current === p && (v.current = null);
1636
+ S.current === g && (S.current = null);
1637
1637
  }
1638
1638
  },
1639
- [n, c, d, x]
1640
- ), j = te(async () => {
1639
+ [n, a, d, I]
1640
+ ), z = te(async () => {
1641
1641
  try {
1642
- const a = await X(
1643
- await n(`${c}/refs`)
1642
+ const c = await X(
1643
+ await n(`${a}/refs`)
1644
1644
  ), l = {
1645
- refs: a.refs ?? [],
1646
- defaultRef: a.defaultRef ?? null,
1647
- worktreeRef: a.worktreeRef ?? null
1645
+ refs: c.refs ?? [],
1646
+ defaultRef: c.defaultRef ?? null,
1647
+ worktreeRef: c.worktreeRef ?? null
1648
1648
  };
1649
1649
  return Y(l), l;
1650
1650
  } catch {
1651
- return F;
1651
+ return O;
1652
1652
  }
1653
- }, [n, c, F]), L = te(
1654
- async (a, l) => {
1653
+ }, [n, a, O]), J = te(
1654
+ async (c, l) => {
1655
1655
  if (f != null && f.branchName && !(l != null && l.discardEdits))
1656
1656
  throw new Error(
1657
1657
  "This design session has unapplied edits against the current source. Apply or revert them, or pass discardEdits to switch anyway."
1658
1658
  );
1659
- await $(!0, a);
1659
+ await F(!0, c), await z();
1660
1660
  },
1661
- [$, f == null ? void 0 : f.branchName]
1662
- ), re = te(
1663
- async (a) => {
1664
- var M;
1661
+ [z, F, f == null ? void 0 : f.branchName]
1662
+ ), oe = te(
1663
+ async (c) => {
1664
+ var k;
1665
1665
  if (!f) throw new Error("Pygmalion design session is not ready");
1666
- const l = P.current;
1667
- if (l && (l.sessionId !== f.id || l.baseDevSha !== f.baseDevSha || l.revision !== f.revision || l.fingerprint !== JSON.stringify(a)))
1666
+ const l = C.current;
1667
+ if (l && (l.sessionId !== f.id || l.baseDevSha !== f.baseDevSha || l.revision !== f.revision || l.fingerprint !== JSON.stringify(c)))
1668
1668
  throw new Error("The code diff you checked is out of date. Please check the diff for the current changes again.");
1669
- const p = await X(
1669
+ const g = await X(
1670
1670
  await n(`${d}/apply-visual`, {
1671
1671
  method: "POST",
1672
1672
  headers: { "content-type": "application/json" },
@@ -1675,47 +1675,47 @@ function Sn(e = {}) {
1675
1675
  baseDevSha: f.baseDevSha,
1676
1676
  expectedRevision: f.revision,
1677
1677
  ...l ? { previewRevision: l.revision } : {},
1678
- changes: a
1678
+ changes: c
1679
1679
  })
1680
1680
  })
1681
1681
  );
1682
- if (!p.ok || !p.session)
1683
- throw new Error(p.error ?? "Pygmalion could not apply the visual changes");
1684
- O(p.session), p.session.appOrigin && k(p.session.appOrigin);
1685
- const I = p.applied ?? a.styles.length + a.texts.length + a.operations.length;
1686
- let N;
1687
- if (l != null && l.qaBaselineId && ((M = l.qaFrameIds) != null && M.length) && p.session.appOrigin)
1682
+ if (!g.ok || !g.session)
1683
+ throw new Error(g.error ?? "Pygmalion could not apply the visual changes");
1684
+ M(g.session), g.session.appOrigin && b(g.session.appOrigin);
1685
+ const x = g.applied ?? c.styles.length + c.texts.length + c.operations.length;
1686
+ let R;
1687
+ if (l != null && l.qaBaselineId && ((k = l.qaFrameIds) != null && k.length) && g.session.appOrigin)
1688
1688
  try {
1689
- N = await Ge(n, m, {
1689
+ R = await Ge(n, p, {
1690
1690
  phase: "changed",
1691
1691
  baselineId: l.qaBaselineId,
1692
- basePath: He(p.session.appOrigin, window.location.origin),
1692
+ basePath: He(g.session.appOrigin, window.location.origin),
1693
1693
  frameIds: l.qaFrameIds
1694
1694
  });
1695
1695
  } catch (q) {
1696
- const C = q instanceof Error ? q.message : String(q);
1697
- N = {
1696
+ const N = q instanceof Error ? q.message : String(q);
1697
+ R = {
1698
1698
  phase: "changed",
1699
1699
  baselineId: l.qaBaselineId,
1700
1700
  complete: !1,
1701
1701
  frames: [],
1702
- failures: l.qaFrameIds.map((w) => ({ id: w, error: C }))
1702
+ failures: l.qaFrameIds.map((y) => ({ id: y, error: N }))
1703
1703
  };
1704
1704
  }
1705
- return P.current = null, {
1706
- applied: I,
1707
- branch: p.session.branchName ?? void 0,
1708
- integration: p.session.integration.state,
1709
- message: s == null ? void 0 : s(p.session, I),
1710
- ...N ? { qa: N } : {}
1705
+ return C.current = null, {
1706
+ applied: x,
1707
+ branch: g.session.branchName ?? void 0,
1708
+ integration: g.session.integration.state,
1709
+ message: s == null ? void 0 : s(g.session, x),
1710
+ ...R ? { qa: R } : {}
1711
1711
  };
1712
1712
  },
1713
- [n, s, m, f, d]
1714
- ), oe = te(
1715
- async (a) => {
1716
- var M;
1713
+ [n, s, p, f, d]
1714
+ ), se = te(
1715
+ async (c) => {
1716
+ var k;
1717
1717
  if (!f) throw new Error("Pygmalion design session is not ready");
1718
- P.current = null;
1718
+ C.current = null;
1719
1719
  const l = await X(
1720
1720
  await n(`${d}/preview-visual`, {
1721
1721
  method: "POST",
@@ -1724,57 +1724,57 @@ function Sn(e = {}) {
1724
1724
  sessionId: f.id,
1725
1725
  baseDevSha: f.baseDevSha,
1726
1726
  expectedRevision: f.revision,
1727
- changes: a
1727
+ changes: c
1728
1728
  })
1729
1729
  })
1730
1730
  );
1731
1731
  if (!l.ok || !Number.isSafeInteger(l.revision))
1732
1732
  throw new Error(l.error ?? "Pygmalion could not preview the visual changes");
1733
- const p = g ? sn(a, h) : [];
1734
- let I;
1735
- const N = f.appOrigin ?? S.appOrigin;
1736
- if (p.length > 0) {
1737
- if (!N)
1733
+ const g = h ? sn(c, P) : [];
1734
+ let x;
1735
+ const R = f.appOrigin ?? m.appOrigin;
1736
+ if (g.length > 0) {
1737
+ if (!R)
1738
1738
  throw new Error("Impact screen QA baseline preview not ready");
1739
- if (I = await Ge(n, m, {
1739
+ if (x = await Ge(n, p, {
1740
1740
  phase: "baseline",
1741
- basePath: He(N, window.location.origin),
1742
- frameIds: p
1743
- }), !I.complete)
1741
+ basePath: He(R, window.location.origin),
1742
+ frameIds: g
1743
+ }), !x.complete)
1744
1744
  throw new Error(
1745
- ((M = I.failures[0]) == null ? void 0 : M.error) ?? `Failed to capture ${p.length - I.frames.length} affected frames`
1745
+ ((k = x.failures[0]) == null ? void 0 : k.error) ?? `Failed to capture ${g.length - x.frames.length} affected frames`
1746
1746
  );
1747
1747
  }
1748
- return P.current = {
1748
+ return C.current = {
1749
1749
  sessionId: f.id,
1750
1750
  baseDevSha: f.baseDevSha,
1751
1751
  revision: l.revision,
1752
- fingerprint: JSON.stringify(a),
1753
- ...I ? { qaBaselineId: I.baselineId, qaFrameIds: p } : {}
1752
+ fingerprint: JSON.stringify(c),
1753
+ ...x ? { qaBaselineId: x.baselineId, qaFrameIds: g } : {}
1754
1754
  }, {
1755
1755
  revision: l.revision,
1756
1756
  files: Array.isArray(l.files) ? l.files : [],
1757
1757
  affectedFiles: Array.isArray(l.affectedFiles) ? l.affectedFiles : [],
1758
- ...I ? { qa: I } : {}
1758
+ ...x ? { qa: x } : {}
1759
1759
  };
1760
1760
  },
1761
1761
  [
1762
1762
  n,
1763
- S.appOrigin,
1764
- h,
1765
- m,
1763
+ m.appOrigin,
1764
+ P,
1765
+ p,
1766
1766
  f,
1767
1767
  d,
1768
- g
1768
+ h
1769
1769
  ]
1770
1770
  ), Z = te(
1771
- async (a) => {
1772
- if (a.length === 0) return { files: [] };
1771
+ async (c) => {
1772
+ if (c.length === 0) return { files: [] };
1773
1773
  const l = await X(
1774
1774
  await n(`${u}/impact`, {
1775
1775
  method: "POST",
1776
1776
  headers: { "content-type": "application/json" },
1777
- body: JSON.stringify({ componentFiles: a })
1777
+ body: JSON.stringify({ componentFiles: c })
1778
1778
  })
1779
1779
  );
1780
1780
  if (l.error || l.ok === !1)
@@ -1785,7 +1785,7 @@ function Sn(e = {}) {
1785
1785
  ), K = te(async () => {
1786
1786
  if (!(f != null && f.canRevert) || !f.headSha)
1787
1787
  throw new Error("There are no reversible changes applied");
1788
- const a = await X(
1788
+ const c = await X(
1789
1789
  await n(`${d}/revert-visual`, {
1790
1790
  method: "POST",
1791
1791
  headers: { "content-type": "application/json" },
@@ -1797,77 +1797,88 @@ function Sn(e = {}) {
1797
1797
  })
1798
1798
  })
1799
1799
  );
1800
- if (!a.ok || a.reverted !== !0 || !a.operation || a.operation.kind !== "visual-revert" || !a.session)
1801
- throw new Error(a.error ?? "Pygmalion could not revert the last visual change");
1802
- return P.current = null, O(a.session), a.session.appOrigin && k(a.session.appOrigin), {
1800
+ if (!c.ok || c.reverted !== !0 || !c.operation || c.operation.kind !== "visual-revert" || !c.session)
1801
+ throw new Error(c.error ?? "Pygmalion could not revert the last visual change");
1802
+ return C.current = null, M(c.session), c.session.appOrigin && b(c.session.appOrigin), {
1803
1803
  reverted: !0,
1804
- operation: a.operation,
1805
- session: a.session
1804
+ operation: c.operation,
1805
+ session: c.session
1806
1806
  };
1807
1807
  }, [n, f, d]);
1808
- ie(() => {
1809
- r && $(!1);
1810
- }, [r, $]), ie(() => {
1811
- r && j();
1808
+ ae(() => {
1809
+ r && F(!1);
1810
+ }, [r, F]), ae(() => {
1811
+ r && z();
1812
1812
  }, [r]);
1813
- const Q = (f == null ? void 0 : f.appOrigin) ?? S.appOrigin ?? D, U = (f == null ? void 0 : f.headSha) ?? (f == null ? void 0 : f.baseDevSha) ?? S.commit ?? "pending";
1813
+ const Q = (f == null ? void 0 : f.appOrigin) ?? m.appOrigin ?? D, U = (f == null ? void 0 : f.headSha) ?? (f == null ? void 0 : f.baseDevSha) ?? m.commit ?? "pending";
1814
1814
  return {
1815
- mirror: S,
1815
+ mirror: m,
1816
1816
  session: f,
1817
1817
  ready: D != null,
1818
1818
  appOrigin: Q,
1819
1819
  previewRevision: `${U}:${(f == null ? void 0 : f.revision) ?? 0}`,
1820
1820
  previewSourceRevision: U,
1821
- refresh: $,
1822
- switchSource: L,
1823
- sourceRefs: F,
1824
- loadSourceRefs: j,
1825
- previewVisual: oe,
1821
+ refresh: F,
1822
+ switchSource: J,
1823
+ sourceRefs: O,
1824
+ loadSourceRefs: z,
1825
+ previewVisual: se,
1826
1826
  inspectImpact: Z,
1827
- applyVisual: re,
1827
+ applyVisual: oe,
1828
1828
  revertLastVisual: K
1829
1829
  };
1830
1830
  }
1831
- function bn({
1831
+ function vn({
1832
1832
  value: e,
1833
- refs: t,
1834
- onChange: o,
1835
- busy: r = !1,
1836
- defaultRef: n = null,
1837
- worktreeRef: s = null,
1838
- label: c = "Source revision",
1839
- children: d,
1840
- className: u
1833
+ currentCommit: t = null,
1834
+ refs: o,
1835
+ onChange: r,
1836
+ busy: n = !1,
1837
+ defaultRef: s = null,
1838
+ worktreeRef: a = null,
1839
+ label: d = "Source revision",
1840
+ refreshLabel: u = "Refresh current revision",
1841
+ children: h,
1842
+ className: p
1841
1843
  }) {
1842
- const g = ae(
1844
+ const w = re(
1843
1845
  () => ({
1844
- local: t.filter((h) => h.kind === "local"),
1845
- remote: t.filter((h) => h.kind === "remote")
1846
+ local: o.filter((b) => b.kind === "local"),
1847
+ remote: o.filter((b) => b.kind === "remote")
1846
1848
  }),
1847
- [t]
1848
- ), m = ae(() => {
1849
- const h = new Set(t.map((x) => x.name));
1850
- return n && h.add(n), s && h.add(s), h;
1851
- }, [n, t, s]), y = e ?? n ?? "";
1852
- return /* @__PURE__ */ A(
1849
+ [o]
1850
+ ), P = re(() => {
1851
+ const b = new Set(o.map((O) => O.name));
1852
+ return s && b.add(s), a && b.add(a), b;
1853
+ }, [s, o, a]), I = e ?? s ?? "", m = re(
1854
+ () => o.find((b) => b.name === I) ?? null,
1855
+ [o, I]
1856
+ ), E = (t == null ? void 0 : t.toLowerCase()) ?? null, f = (m == null ? void 0 : m.commit.toLowerCase()) ?? null, M = !!(E && f && E !== f && !E.startsWith(f) && !f.startsWith(E)), D = (t == null ? void 0 : t.slice(0, 8)) ?? null;
1857
+ return /* @__PURE__ */ $(
1853
1858
  "span",
1854
1859
  {
1855
- className: u,
1860
+ className: p,
1856
1861
  "data-pygmalion-source-ref": "",
1857
- "data-busy": r ? "" : void 0,
1862
+ "data-busy": n ? "" : void 0,
1863
+ "data-update-available": M ? "" : void 0,
1864
+ "data-latest-commit": M ? m == null ? void 0 : m.commit : void 0,
1858
1865
  style: { position: "relative", display: "inline-flex", alignItems: "center" },
1859
1866
  children: [
1860
- d ?? /* @__PURE__ */ b("span", { "data-pygmalion-source-ref-value": "", children: y || c }),
1861
- /* @__PURE__ */ A(
1867
+ h ?? /* @__PURE__ */ v("span", { "data-pygmalion-source-ref-value": "", children: I || d }),
1868
+ /* @__PURE__ */ $(
1862
1869
  "select",
1863
1870
  {
1864
- value: y,
1865
- disabled: r,
1866
- "aria-label": c,
1871
+ value: I,
1872
+ disabled: n,
1873
+ "aria-label": d,
1867
1874
  "data-pygmalion-source-ref-select": "",
1868
- onChange: (h) => {
1869
- const x = h.target.value;
1870
- x && x !== y && o(x);
1875
+ onChange: (b) => {
1876
+ const O = b.target.value;
1877
+ if (!O) {
1878
+ I && r(I);
1879
+ return;
1880
+ }
1881
+ O && O !== I && r(O);
1871
1882
  },
1872
1883
  style: {
1873
1884
  position: "absolute",
@@ -1875,7 +1886,7 @@ function bn({
1875
1886
  width: "100%",
1876
1887
  height: "100%",
1877
1888
  opacity: 0,
1878
- cursor: r ? "default" : "pointer",
1889
+ cursor: n ? "default" : "pointer",
1879
1890
  // The native menu stays reachable; only the painted trigger is the host's.
1880
1891
  appearance: "none",
1881
1892
  border: 0,
@@ -1883,21 +1894,27 @@ function bn({
1883
1894
  margin: 0
1884
1895
  },
1885
1896
  children: [
1886
- y && !m.has(y) ? /* @__PURE__ */ b("option", { value: y, children: y }) : null,
1887
- s ? /* @__PURE__ */ A("option", { value: s, children: [
1888
- s,
1897
+ I ? /* @__PURE__ */ $("option", { value: "", children: [
1898
+ u,
1899
+ " · ",
1900
+ I,
1901
+ M ? ` · ${D ?? "unknown"} → ${(m == null ? void 0 : m.commit) ?? "latest"}` : ""
1902
+ ] }) : null,
1903
+ I && !P.has(I) ? /* @__PURE__ */ v("option", { value: I, children: I }) : null,
1904
+ a ? /* @__PURE__ */ $("option", { value: a, children: [
1905
+ a,
1889
1906
  " · uncommitted work"
1890
1907
  ] }) : null,
1891
- g.local.length > 0 ? /* @__PURE__ */ b("optgroup", { label: "local", children: g.local.map((h) => /* @__PURE__ */ A("option", { value: h.name, children: [
1892
- h.name,
1908
+ w.local.length > 0 ? /* @__PURE__ */ v("optgroup", { label: "local", children: w.local.map((b) => /* @__PURE__ */ $("option", { value: b.name, children: [
1909
+ b.name,
1893
1910
  " · ",
1894
- h.commit
1895
- ] }, h.fullName)) }) : null,
1896
- g.remote.length > 0 ? /* @__PURE__ */ b("optgroup", { label: "remote", children: g.remote.map((h) => /* @__PURE__ */ A("option", { value: h.name, children: [
1897
- h.name,
1911
+ b.commit
1912
+ ] }, b.fullName)) }) : null,
1913
+ w.remote.length > 0 ? /* @__PURE__ */ v("optgroup", { label: "remote", children: w.remote.map((b) => /* @__PURE__ */ $("option", { value: b.name, children: [
1914
+ b.name,
1898
1915
  " · ",
1899
- h.commit
1900
- ] }, h.fullName)) }) : null
1916
+ b.commit
1917
+ ] }, b.fullName)) }) : null
1901
1918
  ]
1902
1919
  }
1903
1920
  )
@@ -1905,20 +1922,20 @@ function bn({
1905
1922
  }
1906
1923
  );
1907
1924
  }
1908
- const vn = {
1909
- editor: W,
1925
+ const Sn = {
1926
+ editor: V,
1910
1927
  getObserverTree: tt,
1911
1928
  isObservableProp: et
1912
1929
  };
1913
1930
  function In(e) {
1914
- W.navigateToPageByName(e);
1931
+ V.navigateToPageByName(e);
1915
1932
  }
1916
1933
  function xn() {
1917
- W.openPreview();
1934
+ V.openPreview();
1918
1935
  }
1919
1936
  function Pn() {
1920
1937
  const e = De.entries.length > 0;
1921
- return e && De.discardPending(), W.resetCurrentEdits() || e;
1938
+ return e && De.discardPending(), V.resetCurrentEdits() || e;
1922
1939
  }
1923
1940
  function En({
1924
1941
  registry: e,
@@ -1927,30 +1944,30 @@ function En({
1927
1944
  componentConnections: r,
1928
1945
  viewportPresets: n,
1929
1946
  previewEnvironmentControls: s,
1930
- designImport: c,
1947
+ designImport: a,
1931
1948
  onTokensChange: d,
1932
1949
  appOrigin: u,
1933
- previewRevision: g,
1934
- previewCacheNamespace: m,
1935
- previewArtifacts: y,
1936
- previewArtifactEndpoint: h,
1937
- previewConcurrency: x,
1938
- previewOpen: S,
1950
+ previewRevision: h,
1951
+ previewCacheNamespace: p,
1952
+ previewArtifacts: w,
1953
+ previewArtifactEndpoint: P,
1954
+ previewConcurrency: I,
1955
+ previewOpen: m,
1939
1956
  onPreviewOpenChange: E,
1940
1957
  flowCanvas: f,
1941
- onApply: O,
1958
+ onApply: M,
1942
1959
  onDesignChange: D,
1943
- onInspectApply: k,
1944
- onInspectPreview: F,
1960
+ onInspectApply: b,
1961
+ onInspectPreview: O,
1945
1962
  onInspectImpact: Y,
1946
- storyboardDiscovery: v = !0,
1947
- storyboardDiscoveryEndpoint: P = wt
1963
+ storyboardDiscovery: S = !0,
1964
+ storyboardDiscoveryEndpoint: C = wt
1948
1965
  }) {
1949
- const [$, j] = se(!v), [L, re] = se();
1950
- c && (c.assertComplete(), nt(c));
1951
- const oe = e ?? (c == null ? void 0 : c.getRegistry()), Z = t ?? (c == null ? void 0 : c.getTokens()), K = o ?? (c == null ? void 0 : c.getInitialPages());
1952
- oe && rt(oe), ot(r ?? []), Z && st(Z), n && it(n), It(d ?? null), at(m);
1953
- const Q = L ?? y, U = ae(
1966
+ const [F, z] = ie(!S), [J, oe] = ie();
1967
+ a && (a.assertComplete(), nt(a));
1968
+ const se = e ?? (a == null ? void 0 : a.getRegistry()), Z = t ?? (a == null ? void 0 : a.getTokens()), K = o ?? (a == null ? void 0 : a.getInitialPages());
1969
+ se && rt(se), ot(r ?? []), Z && st(Z), n && it(n), It(d ?? null), at(p);
1970
+ const Q = J ?? w, U = re(
1954
1971
  () => (K ?? []).flatMap(
1955
1972
  (i) => i.route && i.importPageId ? [
1956
1973
  {
@@ -1966,225 +1983,225 @@ function En({
1966
1983
  ] : []
1967
1984
  ),
1968
1985
  [K]
1969
- ), V = g ?? bt(), ee = u ?? ke(), _ = xe([]), J = ae(
1986
+ ), L = h ?? vt(), ee = u ?? ke(), j = xe([]), W = re(
1970
1987
  () => U.map((i) => ({
1971
1988
  id: i.canonicalId,
1972
1989
  fingerprint: ct(
1973
1990
  i,
1974
- V,
1975
- Se()
1991
+ L,
1992
+ be()
1976
1993
  )
1977
1994
  })),
1978
- [U, V, $]
1995
+ [U, L, F]
1979
1996
  );
1980
- return _.current = J, x != null && lt(x), xt(E ?? null), f != null && dt(f), Pt(O ?? null), Et(k ?? null), ut(F ?? null), Ct(Y ?? null), K && W.initPagesFromComponents(K), ze(() => {
1981
- u != null && ft(u), g != null && mt(g), pt(s ?? []);
1982
- }, [u, s, g]), ze(() => {
1983
- !Q || !K || !$ || Me(Q, {
1984
- namespace: m ?? "",
1985
- previewRevision: V,
1997
+ return j.current = W, I != null && lt(I), xt(E ?? null), f != null && dt(f), Pt(M ?? null), Et(b ?? null), ut(O ?? null), Ct(Y ?? null), K && V.initPagesFromComponents(K), ze(() => {
1998
+ u != null && ft(u), h != null && pt(h), mt(s ?? []);
1999
+ }, [u, s, h]), ze(() => {
2000
+ !Q || !K || !F || Me(Q, {
2001
+ namespace: p ?? "",
2002
+ previewRevision: L,
1986
2003
  appOrigin: ee,
1987
- baselineEnvironment: Se(),
1988
- allowStaleIdentity: !!h,
1989
- allowMatchingFrameIdentity: L != null,
1990
- pages: U.map((i, a) => {
2004
+ baselineEnvironment: be(),
2005
+ allowStaleIdentity: !!P,
2006
+ allowMatchingFrameIdentity: J != null,
2007
+ pages: U.map((i, c) => {
1991
2008
  var l;
1992
2009
  return {
1993
2010
  ...i,
1994
- fingerprint: (l = J[a]) == null ? void 0 : l.fingerprint
2011
+ fingerprint: (l = W[c]) == null ? void 0 : l.fingerprint
1995
2012
  };
1996
2013
  })
1997
2014
  });
1998
2015
  }, [
1999
2016
  Q,
2000
- J,
2017
+ W,
2001
2018
  U,
2002
- h,
2003
- m,
2004
- L,
2019
+ P,
2020
+ p,
2021
+ J,
2005
2022
  ee,
2006
2023
  K,
2007
- V,
2008
- $
2009
- ]), ie(() => {
2024
+ L,
2025
+ F
2026
+ ]), ae(() => {
2010
2027
  Fe(D ?? null);
2011
- const i = gt(W);
2028
+ const i = gt(V);
2012
2029
  return () => {
2013
2030
  i(), Fe(null);
2014
2031
  };
2015
- }, [D]), ie(() => {
2016
- if (re(void 0), !$ || !h || !(m != null && m.trim()) || !(g != null && g.trim()))
2032
+ }, [D]), ae(() => {
2033
+ if (oe(void 0), !F || !P || !(p != null && p.trim()) || !(h != null && h.trim()))
2017
2034
  return;
2018
- const i = new AbortController(), a = ht({
2019
- endpoint: h,
2035
+ const i = new AbortController(), c = ht({
2036
+ endpoint: P,
2020
2037
  captureBaseUrl: u
2021
- }), l = yt(g), p = (C) => {
2022
- Me(C, {
2023
- namespace: m,
2024
- previewRevision: g,
2038
+ }), l = yt(h), g = (N) => {
2039
+ Me(N, {
2040
+ namespace: p,
2041
+ previewRevision: h,
2025
2042
  appOrigin: ke(),
2026
- baselineEnvironment: Se(),
2043
+ baselineEnvironment: be(),
2027
2044
  allowStaleIdentity: !0,
2028
2045
  allowMatchingFrameIdentity: !0,
2029
- pages: U.map((w, R) => {
2030
- var z;
2046
+ pages: U.map((y, A) => {
2047
+ var _;
2031
2048
  return {
2032
- ...w,
2033
- fingerprint: (z = J[R]) == null ? void 0 : z.fingerprint
2049
+ ...y,
2050
+ fingerprint: (_ = W[A]) == null ? void 0 : _.fingerprint
2034
2051
  };
2035
2052
  })
2036
- }), re(C);
2037
- }, I = (C, w, R) => vt({
2038
- namespace: m,
2053
+ }), oe(N);
2054
+ }, x = (N, y, A) => St({
2055
+ namespace: p,
2039
2056
  sourceRevision: l,
2040
- transport: a,
2041
- signal: R,
2042
- ...C.length ? { frames: C } : {},
2043
- ...w ? {} : { generate: !1 }
2044
- }), N = (C, w) => {
2045
- const R = new Set(w);
2046
- return C.filter((z) => R.has(z.id));
2047
- }, M = (C, w) => C instanceof Error && C.message ? C.message : w, q = new AbortController();
2048
- if (Oe(async (C) => {
2049
- var R, z, G;
2050
- const w = await I(C, !0, q.signal);
2051
- if (w.status === "accepted") {
2052
- p(w.artifact);
2053
- const fe = new Set(((R = w.frameResolution) == null ? void 0 : R.exact) ?? []);
2054
- if (C.every((le) => fe.has(le.id)))
2057
+ transport: c,
2058
+ signal: A,
2059
+ ...N.length ? { frames: N } : {},
2060
+ ...y ? {} : { generate: !1 }
2061
+ }), R = (N, y) => {
2062
+ const A = new Set(y);
2063
+ return N.filter((_) => A.has(_.id));
2064
+ }, k = (N, y) => N instanceof Error && N.message ? N.message : y, q = new AbortController();
2065
+ if ($e(async (N) => {
2066
+ var A, _, G;
2067
+ const y = await x(N, !0, q.signal);
2068
+ if (y.status === "accepted") {
2069
+ g(y.artifact);
2070
+ const fe = new Set(((A = y.frameResolution) == null ? void 0 : A.exact) ?? []);
2071
+ if (N.every((le) => fe.has(le.id)))
2055
2072
  return { status: "accepted" };
2056
2073
  const ce = [
2057
- ...((z = w.frameResolution) == null ? void 0 : z.missing) ?? [],
2058
- ...((G = w.frameResolution) == null ? void 0 : G.stale) ?? []
2074
+ ...((_ = y.frameResolution) == null ? void 0 : _.missing) ?? [],
2075
+ ...((G = y.frameResolution) == null ? void 0 : G.stale) ?? []
2059
2076
  ];
2060
2077
  return {
2061
2078
  status: "unavailable",
2062
2079
  message: ce.length ? `The exact preview endpoint did not return a current capture for ${ce.join(", ")}.` : "The exact preview endpoint returned no current capture."
2063
2080
  };
2064
2081
  }
2065
- return w.status === "rejected" ? {
2082
+ return y.status === "rejected" ? {
2066
2083
  status: "rejected",
2067
- message: w.errors.join(" ") || "The preview artifact was rejected."
2084
+ message: y.errors.join(" ") || "The preview artifact was rejected."
2068
2085
  } : {
2069
2086
  status: "unavailable",
2070
- message: M(
2071
- w.error,
2087
+ message: k(
2088
+ y.error,
2072
2089
  "The exact preview endpoint is unavailable."
2073
2090
  )
2074
2091
  };
2075
- }), _.current.length) {
2076
- const C = _.current.filter((w) => {
2077
- const R = be(
2078
- w.id,
2079
- w.fingerprint
2092
+ }), j.current.length) {
2093
+ const N = j.current.filter((y) => {
2094
+ const A = ve(
2095
+ y.id,
2096
+ y.fingerprint
2080
2097
  ).status;
2081
- return R !== "exact" && R !== "generating";
2098
+ return A !== "exact" && A !== "generating";
2082
2099
  });
2083
- de(C, { status: "checking" }), I(
2084
- _.current,
2100
+ de(N, { status: "checking" }), x(
2101
+ j.current,
2085
2102
  !1,
2086
2103
  i.signal
2087
- ).then((w) => {
2104
+ ).then((y) => {
2088
2105
  var G, fe, ce;
2089
2106
  if (i.signal.aborted) return;
2090
- const R = (le) => le.filter((Re) => {
2091
- const Ae = be(
2107
+ const A = (le) => le.filter((Re) => {
2108
+ const Ae = ve(
2092
2109
  Re.id,
2093
2110
  Re.fingerprint
2094
2111
  ).status;
2095
2112
  return Ae !== "generating" && Ae !== "exact";
2096
2113
  });
2097
- if (w.status === "accepted") {
2098
- p(w.artifact), de(
2099
- N(
2100
- _.current,
2101
- ((G = w.frameResolution) == null ? void 0 : G.exact) ?? []
2114
+ if (y.status === "accepted") {
2115
+ g(y.artifact), de(
2116
+ R(
2117
+ j.current,
2118
+ ((G = y.frameResolution) == null ? void 0 : G.exact) ?? []
2102
2119
  ),
2103
2120
  { status: "exact" }
2104
2121
  );
2105
- const le = N(_.current, [
2106
- ...((fe = w.frameResolution) == null ? void 0 : fe.missing) ?? [],
2107
- ...((ce = w.frameResolution) == null ? void 0 : ce.stale) ?? []
2122
+ const le = R(j.current, [
2123
+ ...((fe = y.frameResolution) == null ? void 0 : fe.missing) ?? [],
2124
+ ...((ce = y.frameResolution) == null ? void 0 : ce.stale) ?? []
2108
2125
  ]);
2109
- de(R(le), {
2126
+ de(A(le), {
2110
2127
  status: "outdated",
2111
2128
  message: "Select this frame to generate the exact preview."
2112
2129
  });
2113
2130
  return;
2114
2131
  }
2115
- const z = w.status === "rejected" ? w.errors.join(" ") || "The preview artifact was rejected." : M(
2116
- w.error,
2132
+ const _ = y.status === "rejected" ? y.errors.join(" ") || "The preview artifact was rejected." : k(
2133
+ y.error,
2117
2134
  "The exact preview endpoint is unavailable."
2118
2135
  );
2119
2136
  de(
2120
- R(_.current),
2137
+ A(j.current),
2121
2138
  {
2122
2139
  status: "error",
2123
- reason: w.status === "rejected" ? "rejected" : "unavailable",
2124
- message: z
2140
+ reason: y.status === "rejected" ? "rejected" : "unavailable",
2141
+ message: _
2125
2142
  }
2126
2143
  );
2127
- }).catch((w) => {
2144
+ }).catch((y) => {
2128
2145
  if (i.signal.aborted) return;
2129
- const R = _.current.filter((z) => {
2130
- const G = be(
2131
- z.id,
2132
- z.fingerprint
2146
+ const A = j.current.filter((_) => {
2147
+ const G = ve(
2148
+ _.id,
2149
+ _.fingerprint
2133
2150
  ).status;
2134
2151
  return G !== "generating" && G !== "exact";
2135
2152
  });
2136
- de(R, {
2153
+ de(A, {
2137
2154
  status: "error",
2138
2155
  reason: "unavailable",
2139
- message: M(
2140
- w,
2156
+ message: k(
2157
+ y,
2141
2158
  "The exact preview endpoint is unavailable."
2142
2159
  )
2143
2160
  });
2144
2161
  });
2145
2162
  }
2146
2163
  return () => {
2147
- Oe(null), q.abort(), i.abort();
2164
+ $e(null), q.abort(), i.abort();
2148
2165
  };
2149
2166
  }, [
2167
+ P,
2168
+ p,
2150
2169
  h,
2151
- m,
2152
- g,
2153
2170
  u,
2154
- $
2155
- ]), ie(() => {
2171
+ F
2172
+ ]), ae(() => {
2156
2173
  let i = !0;
2157
- if (!v)
2158
- return ue(void 0), j(!0), () => {
2174
+ if (!S)
2175
+ return ue(void 0), z(!0), () => {
2159
2176
  i = !1;
2160
2177
  };
2161
- const a = new AbortController();
2162
- return j(!1), ue(void 0), ne(null), Le({
2163
- endpoint: P,
2164
- signal: a.signal,
2165
- pages: W.pages.map((l) => ({
2178
+ const c = new AbortController();
2179
+ return z(!1), ue(void 0), ne(null), Je({
2180
+ endpoint: C,
2181
+ signal: c.signal,
2182
+ pages: V.pages.map((l) => ({
2166
2183
  ...l,
2167
2184
  id: l.importPageId ?? l.id,
2168
2185
  importKind: l.importKind
2169
2186
  })),
2170
- assets: (c == null ? void 0 : c.getAssets("screens")) ?? []
2187
+ assets: (a == null ? void 0 : a.getAssets("screens")) ?? []
2171
2188
  }).then((l) => {
2172
- i && (ue(l.baselineEnvironment), $e(l.manifest.routes ?? null), ne(l.graph));
2189
+ i && (ue(l.baselineEnvironment), Oe(l.manifest.routes ?? null), ne(l.graph));
2173
2190
  }).catch(() => {
2174
- i && (ue(void 0), $e(null), ne(null));
2191
+ i && (ue(void 0), Oe(null), ne(null));
2175
2192
  }).finally(() => {
2176
- i && j(!0);
2193
+ i && z(!0);
2177
2194
  }), () => {
2178
- i = !1, a.abort(), ue(void 0), ne(null);
2195
+ i = !1, c.abort(), ue(void 0), ne(null);
2179
2196
  };
2180
2197
  }, [
2181
- c,
2198
+ a,
2182
2199
  o,
2183
- v,
2184
- P
2185
- ]), ie(() => {
2186
- S == null || S === W.previewOpen || (S ? W.openPreview({ notifyHost: !1 }) : W.closePreview({ notifyHost: !1 }));
2187
- }, [S]), $ ? /* @__PURE__ */ b(St, {}) : /* @__PURE__ */ b(
2200
+ S,
2201
+ C
2202
+ ]), ae(() => {
2203
+ m == null || m === V.previewOpen || (m ? V.openPreview({ notifyHost: !1 }) : V.closePreview({ notifyHost: !1 }));
2204
+ }, [m]), F ? /* @__PURE__ */ v(bt, {}) : /* @__PURE__ */ v(
2188
2205
  "div",
2189
2206
  {
2190
2207
  "data-pygmalion-storyboard-loading": "",
@@ -2206,17 +2223,17 @@ export {
2206
2223
  Rn as DEFAULT_DESIGN_COMPILE_LIMITS,
2207
2224
  An as DESIGN_IMPORT_KINDS,
2208
2225
  Mn as DESIGN_IR_SCHEMA,
2209
- On as DESIGN_IR_VERSION,
2210
- pn as PygmalionCatalogDocument,
2226
+ $n as DESIGN_IR_VERSION,
2227
+ mn as PygmalionCatalogDocument,
2211
2228
  hn as PygmalionCatalogMatrix,
2212
2229
  gn as PygmalionCatalogSection,
2213
2230
  En as PygmalionEditor,
2214
2231
  wt as STORYBOARD_ENVIRONMENT_CONTROL,
2215
- $n as STORYBOARD_ENVIRONMENT_QUERY,
2216
- bn as SourceRefControl,
2217
- vn as __debug,
2232
+ On as STORYBOARD_ENVIRONMENT_QUERY,
2233
+ vn as SourceRefControl,
2234
+ Sn as __debug,
2218
2235
  Dn as applyTokenOverride,
2219
- vt as bootstrapPreviewArtifact,
2236
+ St as bootstrapPreviewArtifact,
2220
2237
  kn as clearPreviewEnvironmentControlValues,
2221
2238
  Fn as clearPygmalionPreviewCache,
2222
2239
  Tn as compileDesignDocument,
@@ -2232,15 +2249,15 @@ export {
2232
2249
  Hn as createPreviewRecipeFingerprint,
2233
2250
  qn as createStoryboardCaptureRecipeIdentity,
2234
2251
  Mt as createStoryboardGraph,
2235
- Vt as createStoryboardGraphFromDiscovery,
2252
+ Lt as createStoryboardGraphFromDiscovery,
2236
2253
  Gn as createStoryboardGraphViewModel,
2237
2254
  Kn as createStoryboardRouteUrl,
2238
- Lt as designCatalogKey,
2255
+ Jt as designCatalogKey,
2239
2256
  Qe as designCatalogRegistryName,
2240
- Vn as enumerateDesignComponentConnectionCases,
2241
- Jn as expandDesignScreenCasesViewports,
2242
- Wn as expandDesignScreenCollectionViewports,
2243
- Ln as getDesignCodegenAdapters,
2257
+ Ln as enumerateDesignComponentConnectionCases,
2258
+ Wn as expandDesignScreenCasesViewports,
2259
+ Vn as expandDesignScreenCollectionViewports,
2260
+ Jn as getDesignCodegenAdapters,
2244
2261
  Qn as getDesignComponentConnection,
2245
2262
  Xn as getDesignComponentConnectionForComponent,
2246
2263
  Yn as getDesignComponentConnections,
@@ -2248,14 +2265,14 @@ export {
2248
2265
  er as getPreviewEnvironmentControls,
2249
2266
  tr as getPreviewEnvironmentOverride,
2250
2267
  nr as getRecommendedPygmalionPreviewConcurrency,
2251
- Se as getStoryboardBaselineEnvironment,
2252
- We as getStoryboardDiscoveryBaselineEnvironment,
2268
+ be as getStoryboardBaselineEnvironment,
2269
+ Ve as getStoryboardDiscoveryBaselineEnvironment,
2253
2270
  rr as getStoryboardGraph,
2254
2271
  or as getViewportPresets,
2255
- Le as loadStoryboardDiscovery,
2272
+ Je as loadStoryboardDiscovery,
2256
2273
  sr as mergeScreenPresets,
2257
2274
  Ze as mergeStoryboardEnvironment,
2258
- mn as publishStoryboardDiscovery,
2275
+ pn as publishStoryboardDiscovery,
2259
2276
  In as pygmalionNavigate,
2260
2277
  xn as pygmalionOpenPreview,
2261
2278
  Pn as pygmalionResetCurrentEdits,
@@ -2268,19 +2285,19 @@ export {
2268
2285
  rt as setComponentRegistry,
2269
2286
  ot as setDesignComponentConnections,
2270
2287
  ur as setPreviewEnvironmentControlValue,
2271
- pt as setPreviewEnvironmentControls,
2288
+ mt as setPreviewEnvironmentControls,
2272
2289
  ft as setPygmalionAppOrigin,
2273
2290
  lt as setPygmalionPreviewConcurrency,
2274
- mt as setPygmalionPreviewRevision,
2291
+ pt as setPygmalionPreviewRevision,
2275
2292
  ue as setStoryboardBaselineEnvironment,
2276
2293
  ne as setStoryboardGraph,
2277
2294
  st as setTokens,
2278
2295
  it as setViewportPresets,
2279
2296
  Nt as storyboardScreenRecipeKey,
2280
2297
  fr as subscribePreviewEnvironmentControls,
2281
- mr as subscribeStoryboardGraph,
2282
- Sn as usePygmalionProject,
2283
- pr as validateDesignComponentConnections,
2298
+ pr as subscribeStoryboardGraph,
2299
+ bn as usePygmalionProject,
2300
+ mr as validateDesignComponentConnections,
2284
2301
  gr as validatePreviewArtifactBundle,
2285
2302
  hr as validateRoutePreviewArtifactV3Browser
2286
2303
  };