@pygmalionjs/pygmalion 0.2.37 → 0.2.39

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,12 +1,12 @@
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
- function Pe(e, t = /* @__PURE__ */ new Set()) {
1
+ import { jsxs as $, jsx as b } from "react/jsx-runtime";
2
+ import { b as re, m as Ye, i as Ze, g as et, e as V, c as tt, a as nt, d as rt, f as ot, h as st, j as it, k as at, l as ct, n as be, o as lt, p as dt, q as ut, r as ft, t as mt, u as pt, v as Ne, w as gt, x as ht, y as yt, z as Re, A as Ae, B as de, C as wt, D as ue, E as Me, S as bt, G as St, H as $e, I as vt, J as Oe, K as It, L as xt, M as Pt, O as Ct, P as Et, Q as Nt, R as De } from "./App-CJz8NrxS.js";
3
+ import { T as An, U as Mn, V as $n, W as On, X as Dn, Y as kn, Z as Fn, _ as Tn, $ as zn, a0 as _n, a1 as jn, a2 as Bn, a3 as Un, a4 as Hn, a5 as qn, a6 as Gn, a7 as Kn, a8 as Ln, a9 as Wn, aa as Vn, ab as Jn, ac as Qn, ad as Xn, ae as Yn, af as Zn, ag as er, ah as tr, ai as nr, aj as rr, ak as or, al as sr, am as ir, an as ar, ao as cr, ap as lr, aq as dr, ar as ur, as as fr, at as mr, au as pr, av as gr, aw as hr, ax as yr } from "./App-CJz8NrxS.js";
4
+ import { createElement as ke, useMemo as oe, useState as ce, useRef as Ie, useCallback as ne, useEffect as le, useLayoutEffect as Fe } from "react";
5
+ function xe(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;
8
8
  if (Array.isArray(e))
9
- return e.map((r) => Pe(r, t));
9
+ return e.map((r) => xe(r, t));
10
10
  if (typeof e != "object") return null;
11
11
  if (t.has(e))
12
12
  throw new Error("A storyboard recipe cannot contain circular references.");
@@ -14,13 +14,13 @@ function Pe(e, t = /* @__PURE__ */ new Set()) {
14
14
  const o = {};
15
15
  for (const r of Object.keys(e).sort()) {
16
16
  const n = e[r];
17
- n !== void 0 && (o[r] = Pe(n, t));
17
+ n !== void 0 && (o[r] = xe(n, t));
18
18
  }
19
19
  return t.delete(e), o;
20
20
  }
21
- function Nt(e) {
21
+ function Rt(e) {
22
22
  return JSON.stringify(
23
- Pe({
23
+ xe({
24
24
  version: 1,
25
25
  route: e.route ?? null,
26
26
  componentName: e.componentName ?? null,
@@ -39,34 +39,34 @@ function Nt(e) {
39
39
  })
40
40
  );
41
41
  }
42
- function T(e) {
42
+ function z(e) {
43
43
  return [...new Set([...e].map((t) => t == null ? void 0 : t.trim()).filter(Boolean))].sort((t, o) => t.localeCompare(o));
44
44
  }
45
- function Rt(e, t) {
45
+ function At(e, t) {
46
46
  var r;
47
47
  return ((r = e.id) == null ? void 0 : r.trim()) || `edge:${t + 1}`;
48
48
  }
49
- function At(e) {
49
+ function Mt(e) {
50
50
  const t = [...e.screens].sort((r, n) => r.id.localeCompare(n.id)), o = t[0].id;
51
51
  return {
52
52
  id: `story:${o}`,
53
53
  canonicalScreenId: o,
54
54
  screenIds: t.map((r) => r.id),
55
- names: T(t.map((r) => r.name)),
55
+ names: z(t.map((r) => r.name)),
56
56
  recipeKey: e.recipeKey,
57
- routes: T(t.map((r) => r.route)),
58
- scenarioIds: T(
57
+ routes: z(t.map((r) => r.route)),
58
+ scenarioIds: z(
59
59
  t.flatMap((r) => [
60
60
  r.scenarioId,
61
61
  ...r.scenarioIds ?? []
62
62
  ])
63
63
  ),
64
- sourceKeys: T(t.map((r) => r.sourcePath)),
65
- flows: T(t.map((r) => r.flow)),
66
- states: T(t.map((r) => r.state))
64
+ sourceKeys: z(t.map((r) => r.sourcePath)),
65
+ flows: z(t.map((r) => r.flow)),
66
+ states: z(t.map((r) => r.state))
67
67
  };
68
68
  }
69
- function _e(e) {
69
+ function Te(e) {
70
70
  return [
71
71
  e.code,
72
72
  e.edgeId,
@@ -75,8 +75,8 @@ function _e(e) {
75
75
  e.scenarioId
76
76
  ].join(":");
77
77
  }
78
- function Mt(e) {
79
- var j, W;
78
+ function $t(e) {
79
+ var X, W;
80
80
  const t = [], o = [], r = /* @__PURE__ */ new Map();
81
81
  for (const i of e.screens) {
82
82
  const c = i.id.trim();
@@ -96,7 +96,7 @@ function Mt(e) {
96
96
  for (const i of o) {
97
97
  let c;
98
98
  try {
99
- if (c = (e.recipeKey ?? Nt)(i), !c.trim()) throw new Error("Recipe keys cannot be empty.");
99
+ if (c = (e.recipeKey ?? Rt)(i), !c.trim()) throw new Error("Recipe keys cannot be empty.");
100
100
  } catch (g) {
101
101
  s.add(i.id), t.push({
102
102
  code: "invalid-recipe",
@@ -108,46 +108,46 @@ function Mt(e) {
108
108
  const l = n.get(c);
109
109
  l ? l.screens.push(i) : n.set(c, { recipeKey: c, screens: [i] });
110
110
  }
111
- const a = [...n.values()].map(At).sort((i, c) => i.id.localeCompare(c.id)), d = {};
111
+ const a = [...n.values()].map(Mt).sort((i, c) => i.id.localeCompare(c.id)), d = {};
112
112
  for (const i of a)
113
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([
114
+ const u = new Map(a.map((i) => [i.id, i])), h = (i, c) => z([
115
115
  c,
116
116
  ...(i ?? []).flatMap((l) => {
117
- const g = l.trim(), x = d[g] ?? (u.has(g) ? g : null);
118
- return x ? [x] : [];
117
+ const g = l.trim(), P = d[g] ?? (u.has(g) ? g : null);
118
+ return P ? [P] : [];
119
119
  })
120
- ]), p = /* @__PURE__ */ new Map();
120
+ ]), m = /* @__PURE__ */ new Map();
121
121
  for (const i of e.assets ?? []) {
122
- const c = p.get(i.pageId);
123
- c ? c.push(i) : p.set(i.pageId, [i]);
122
+ const c = m.get(i.pageId);
123
+ c ? c.push(i) : m.set(i.pageId, [i]);
124
124
  }
125
- const w = a.map((i) => {
125
+ const y = a.map((i) => {
126
126
  const c = i.screenIds.flatMap(
127
- (l) => p.get(l) ?? []
127
+ (l) => m.get(l) ?? []
128
128
  );
129
129
  return {
130
130
  ...i,
131
- scenarioIds: T([
131
+ scenarioIds: z([
132
132
  ...i.scenarioIds,
133
133
  ...c.map((l) => l.scenarioId)
134
134
  ]),
135
- sourceKeys: T([
135
+ sourceKeys: z([
136
136
  ...i.sourceKeys,
137
137
  ...c.map((l) => l.sourcePath)
138
138
  ])
139
139
  };
140
- }), P = /* @__PURE__ */ new Map();
141
- for (const i of w)
140
+ }), I = /* @__PURE__ */ new Map();
141
+ for (const i of y)
142
142
  for (const c of i.routes) {
143
- const l = P.get(c);
144
- l ? l.push(i.id) : P.set(c, [i.id]);
143
+ const l = I.get(c);
144
+ l ? l.push(i.id) : I.set(c, [i.id]);
145
145
  }
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({
146
+ const x = (i, c, l) => {
147
+ const g = i.trim(), P = d[g] ?? (u.has(g) ? g : null);
148
+ if (P) return P;
149
+ const A = z(I.get(g) ?? []);
150
+ return A.length === 1 ? A[0] : A.length > 1 ? (t.push({
151
151
  code: l === "source" ? "ambiguous-edge-source" : "ambiguous-edge-target",
152
152
  severity: "error",
153
153
  message: `Storyboard edge "${c}" references an ambiguous ${l} route.`,
@@ -160,60 +160,60 @@ function Mt(e) {
160
160
  edgeId: c,
161
161
  screenId: g || void 0
162
162
  }), null);
163
- }, m = [], E = /* @__PURE__ */ new Map(), f = [
163
+ }, p = [], C = /* @__PURE__ */ new Map(), f = [
164
164
  ["explicit", e.explicitEdges ?? []],
165
165
  ["inferred", e.inferredEdges ?? []]
166
166
  ];
167
167
  let M = 0;
168
168
  for (const [i, c] of f)
169
169
  for (const l of c) {
170
- const g = Rt(l, M);
170
+ const g = At(l, M);
171
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
- fromNodeIds: T([
179
- ...y.fromNodeIds ?? [y.from],
172
+ const P = x(l.from, g, "source"), A = x(l.to, g, "target");
173
+ if (!P || !A || P === A) continue;
174
+ const k = h(l.fromScope, P), q = h(l.toScope, A), E = `${P}\0${A}`, v = C.get(E);
175
+ if (v) {
176
+ const T = {
177
+ ...v,
178
+ fromNodeIds: z([
179
+ ...v.fromNodeIds ?? [v.from],
180
180
  ...k
181
181
  ]),
182
- toNodeIds: T([
183
- ...y.toNodeIds ?? [y.to],
182
+ toNodeIds: z([
183
+ ...v.toNodeIds ?? [v.to],
184
184
  ...q
185
185
  ]),
186
- sourceEdgeIds: T([
187
- ...y.sourceEdgeIds,
186
+ sourceEdgeIds: z([
187
+ ...v.sourceEdgeIds,
188
188
  g
189
189
  ])
190
190
  };
191
- E.set(N, _);
192
- const G = m.indexOf(y);
193
- G >= 0 && (m[G] = _);
191
+ C.set(E, T);
192
+ const G = p.indexOf(v);
193
+ G >= 0 && (p[G] = T);
194
194
  continue;
195
195
  }
196
- const A = {
196
+ const R = {
197
197
  id: g,
198
- from: x,
199
- to: R,
198
+ from: P,
199
+ to: A,
200
200
  fromNodeIds: k,
201
201
  toNodeIds: q,
202
- kind: ((j = l.kind) == null ? void 0 : j.trim()) || void 0,
202
+ kind: ((X = l.kind) == null ? void 0 : X.trim()) || void 0,
203
203
  label: ((W = l.label) == null ? void 0 : W.trim()) || void 0,
204
204
  origin: i,
205
205
  sourceEdgeIds: [g]
206
206
  };
207
- E.set(N, A), m.push(A);
207
+ C.set(E, R), p.push(R);
208
208
  }
209
- m.sort(
209
+ p.sort(
210
210
  (i, c) => `${i.from}:${i.to}:${i.id}`.localeCompare(`${c.from}:${c.to}:${c.id}`)
211
211
  );
212
- const D = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
213
- for (const i of m) {
212
+ const D = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
213
+ for (const i of p) {
214
214
  for (const c of i.fromNodeIds ?? [i.from]) {
215
- const l = b.get(c);
216
- l ? l.push(i) : b.set(c, [i]);
215
+ const l = w.get(c);
216
+ l ? l.push(i) : w.set(c, [i]);
217
217
  }
218
218
  for (const c of i.toNodeIds ?? [i.to]) {
219
219
  const l = D.get(c);
@@ -234,27 +234,27 @@ function Mt(e) {
234
234
  }
235
235
  O.push(l);
236
236
  }
237
- const Y = new Set(O);
238
- let S = T(O);
239
- S.length || (S = w.filter((i) => {
237
+ const Z = new Set(O);
238
+ let S = z(O);
239
+ S.length || (S = y.filter((i) => {
240
240
  var c;
241
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];
242
+ }).map((i) => i.id).sort((i, c) => i.localeCompare(c))), !S.length && y.length && (S = [y[0].id]);
243
+ const N = /* @__PURE__ */ new Set(), F = [...S];
244
244
  for (; F.length; ) {
245
245
  const i = F.shift();
246
- if (!C.has(i)) {
247
- C.add(i);
248
- for (const c of b.get(i) ?? [])
246
+ if (!N.has(i)) {
247
+ N.add(i);
248
+ for (const c of w.get(i) ?? [])
249
249
  F.push(c.to), i === c.from && F.push(...c.toNodeIds ?? [c.to]);
250
250
  }
251
251
  }
252
- const z = w.filter((i) => {
252
+ const _ = y.filter((i) => {
253
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;
254
+ const c = (((l = D.get(i.id)) == null ? void 0 : l.length) ?? 0) === 0 && (((g = w.get(i.id)) == null ? void 0 : g.length) ?? 0) === 0 && !Z.has(i.id);
255
+ return !N.has(i.id) || c && y.length > 1;
256
256
  });
257
- for (const i of z)
257
+ for (const i of _)
258
258
  for (const c of i.screenIds)
259
259
  t.push({
260
260
  code: "disconnected-screen",
@@ -264,7 +264,7 @@ function Mt(e) {
264
264
  nodeId: i.id
265
265
  });
266
266
  const J = /* @__PURE__ */ new Map();
267
- for (const i of w)
267
+ for (const i of y)
268
268
  for (const c of i.sourceKeys) {
269
269
  const l = J.get(c) ?? {
270
270
  nodeIds: /* @__PURE__ */ new Set(),
@@ -274,30 +274,30 @@ function Mt(e) {
274
274
  for (const g of i.screenIds) l.screenIds.add(g);
275
275
  J.set(c, l);
276
276
  }
277
- const oe = [...J.entries()].map(([i, c]) => ({
277
+ const se = [...J.entries()].map(([i, c]) => ({
278
278
  sourceKey: i,
279
279
  nodeIds: [...c.nodeIds].sort((l, g) => l.localeCompare(g)),
280
280
  screenIds: [...c.screenIds].sort((l, g) => l.localeCompare(g)),
281
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(
282
+ })).sort((i, c) => i.sourceKey.localeCompare(c.sourceKey)), ie = y.map((i) => {
283
+ const c = [...w.get(i.id) ?? []].sort(
284
284
  (l, g) => l.id.localeCompare(g.id)
285
285
  );
286
286
  return {
287
287
  nodeId: i.id,
288
288
  edgeIds: c.map((l) => l.id),
289
- targetNodeIds: T(c.map((l) => l.to))
289
+ targetNodeIds: z(c.map((l) => l.to))
290
290
  };
291
- }).filter((i) => i.targetNodeIds.length > 1).sort((i, c) => i.nodeId.localeCompare(c.nodeId)), Z = new Set(
292
- w.flatMap((i) => i.scenarioIds)
291
+ }).filter((i) => i.targetNodeIds.length > 1).sort((i, c) => i.nodeId.localeCompare(c.nodeId)), ee = new Set(
292
+ y.flatMap((i) => i.scenarioIds)
293
293
  ), K = new Set(
294
294
  (e.nonVisualScenarioIds ?? []).map((i) => i.trim())
295
- ), Q = T(
295
+ ), Q = z(
296
296
  (e.scenarios ?? []).map((i) => i.id)
297
- ), U = Q.filter(
298
- (i) => !Z.has(i) && !K.has(i)
297
+ ), B = Q.filter(
298
+ (i) => !ee.has(i) && !K.has(i)
299
299
  );
300
- for (const i of U)
300
+ for (const i of B)
301
301
  t.push({
302
302
  code: "missing-code-scenario",
303
303
  severity: "warning",
@@ -305,39 +305,39 @@ function Mt(e) {
305
305
  scenarioId: i
306
306
  });
307
307
  t.sort(
308
- (i, c) => _e(i).localeCompare(_e(c))
308
+ (i, c) => Te(i).localeCompare(Te(c))
309
309
  );
310
- const L = T(
311
- z.flatMap((i) => i.screenIds)
312
- ), ee = {
310
+ const L = z(
311
+ _.flatMap((i) => i.screenIds)
312
+ ), te = {
313
313
  screens: o.length,
314
- canonicalNodes: w.length,
315
- mergedScreens: Math.max(0, o.length - w.length),
316
- edges: m.length,
317
- connectedNodes: w.length - z.length,
314
+ canonicalNodes: y.length,
315
+ mergedScreens: Math.max(0, o.length - y.length),
316
+ edges: p.length,
317
+ connectedNodes: y.length - _.length,
318
318
  disconnectedScreens: L,
319
319
  codeScenarios: Q.length,
320
320
  representedScenarios: Q.filter(
321
- (i) => Z.has(i)
321
+ (i) => ee.has(i)
322
322
  ).length,
323
- missingScenarios: U,
324
- complete: L.length === 0 && U.length === 0 && !t.some((i) => i.severity === "error") && s.size === 0
323
+ missingScenarios: B,
324
+ complete: L.length === 0 && B.length === 0 && !t.some((i) => i.severity === "error") && s.size === 0
325
325
  };
326
326
  return {
327
327
  version: 1,
328
- nodes: w,
329
- edges: m,
328
+ nodes: y,
329
+ edges: p,
330
330
  aliases: Object.fromEntries(
331
331
  Object.entries(d).sort(([i], [c]) => i.localeCompare(c))
332
332
  ),
333
- sourceGroups: oe,
333
+ sourceGroups: se,
334
334
  startNodeIds: S,
335
- branches: se,
335
+ branches: ie,
336
336
  warnings: t,
337
- coverage: ee
337
+ coverage: te
338
338
  };
339
339
  }
340
- function $t(e) {
340
+ function Ot(e) {
341
341
  return e ? JSON.parse(JSON.stringify(e)) : void 0;
342
342
  }
343
343
  function me(e) {
@@ -348,10 +348,10 @@ function me(e) {
348
348
  }
349
349
  return e;
350
350
  }
351
- function je(e) {
351
+ function ze(e) {
352
352
  return JSON.stringify(me(e ?? null));
353
353
  }
354
- function Ot(e) {
354
+ function Dt(e) {
355
355
  return !!(e && typeof e == "object" && !Array.isArray(e));
356
356
  }
357
357
  function H(e) {
@@ -365,10 +365,10 @@ 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 Le(e) {
368
+ function Ge(e) {
369
369
  return `source-route:${encodeURIComponent(e)}`;
370
370
  }
371
- function Ne(e, t) {
371
+ function Ee(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) {
@@ -382,7 +382,7 @@ function Ne(e, t) {
382
382
  }
383
383
  return n === r.length;
384
384
  }
385
- function Be(e, t, o) {
385
+ function _e(e, t, o) {
386
386
  const r = H(e);
387
387
  if (!r) return [];
388
388
  const n = t.get(r);
@@ -391,18 +391,18 @@ 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, a]) => ({
394
+ ] : [...t.entries()].filter(([s]) => Ee(r, s)).map(([s, a]) => ({
395
395
  representativeId: a,
396
396
  screenIds: o.get(s) ?? [a]
397
397
  })).sort((s, a) => s.representativeId.localeCompare(a.representativeId));
398
398
  }
399
- function Dt(e) {
399
+ function kt(e) {
400
400
  var o;
401
401
  const t = /* @__PURE__ */ new Map();
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: Le(n),
405
+ id: Ge(n),
406
406
  name: n,
407
407
  section: "Source routes",
408
408
  codeName: ((o = r.id) == null ? void 0 : o.trim()) || void 0
@@ -410,44 +410,44 @@ function Dt(e) {
410
410
  }
411
411
  return [...t.values()].sort((r, n) => r.id.localeCompare(n.id));
412
412
  }
413
- function kt(e, t, o, r) {
413
+ function Ft(e, t, o, r) {
414
414
  return (e ?? []).flatMap((n, s) => {
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();
415
+ var y, I, x;
416
+ const a = (y = n.from) == null ? void 0 : y.trim(), d = (I = n.to) == null ? void 0 : I.trim();
417
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);
418
+ const u = r.has(a) ? [{ representativeId: a, screenIds: [a] }] : _e(a, t, o), h = r.has(d) ? [{ representativeId: d, screenIds: [d] }] : _e(d, t, o);
419
419
  if (!u.length || !h.length) return [];
420
- const p = ((I = n.id) == null ? void 0 : I.trim()) || `discovery-edge:${s + 1}`;
420
+ const m = ((x = n.id) == null ? void 0 : x.trim()) || `discovery-edge:${s + 1}`;
421
421
  return u.flatMap(
422
- (m, E) => h.map((f, M) => {
423
- var D, b;
422
+ (p, C) => h.map((f, M) => {
423
+ var D, w;
424
424
  return {
425
- id: u.length === 1 && h.length === 1 ? p : `${p}:${E + 1}:${M + 1}`,
426
- from: m.representativeId,
425
+ id: u.length === 1 && h.length === 1 ? m : `${m}:${C + 1}:${M + 1}`,
426
+ from: p.representativeId,
427
427
  to: f.representativeId,
428
- fromScope: m.screenIds,
428
+ fromScope: p.screenIds,
429
429
  toScope: f.screenIds,
430
430
  kind: ((D = n.kind) == null ? void 0 : D.trim()) || void 0,
431
- label: ((b = n.label) == null ? void 0 : b.trim()) || void 0
431
+ label: ((w = n.label) == null ? void 0 : w.trim()) || void 0
432
432
  };
433
433
  })
434
434
  );
435
435
  });
436
436
  }
437
- function Ft(e, t, o) {
437
+ function Tt(e, t, o) {
438
438
  const r = H(e.route);
439
439
  if (!r) return [];
440
440
  const n = t.filter(
441
441
  (d) => {
442
442
  const u = H(d.route);
443
- return u ? Ne(u, r) : !1;
443
+ return u ? Ee(u, r) : !1;
444
444
  }
445
445
  );
446
446
  if (!n.length) return [];
447
- const s = je(
448
- Ze(o, e.environment)
447
+ const s = ze(
448
+ Ye(o, e.environment)
449
449
  ), a = n.filter(
450
- (d) => je(d.environment) === s
450
+ (d) => ze(d.environment) === s
451
451
  );
452
452
  return [
453
453
  ...new Set(
@@ -458,8 +458,8 @@ function Ft(e, t, o) {
458
458
  )
459
459
  ].sort((d, u) => d.localeCompare(u));
460
460
  }
461
- function Tt(e, t) {
462
- const o = e.some((s) => s.importKind != null), r = t.candidates ?? [], n = Ve(t);
461
+ function zt(e, t) {
462
+ const o = e.some((s) => s.importKind != null), r = t.candidates ?? [], n = Le(t);
463
463
  return e.filter(
464
464
  (s) => o ? s.importKind === "screens" : !!s.route
465
465
  ).map((s) => ({
@@ -480,7 +480,7 @@ function Tt(e, t) {
480
480
  scenario: s.scenario,
481
481
  state: s.state,
482
482
  scenarioId: s.scenarioId,
483
- scenarioIds: Ft(s, r, n),
483
+ scenarioIds: Tt(s, r, n),
484
484
  interactions: s.interactions,
485
485
  environment: s.environment,
486
486
  preset: s.preset,
@@ -488,16 +488,16 @@ function Tt(e, t) {
488
488
  sourcePath: [...s.sourcePaths ?? []].filter(Boolean).sort((a, d) => a.localeCompare(d))[0]
489
489
  }));
490
490
  }
491
- function we(e, t) {
492
- var d, u, h, p;
491
+ function ye(e, t) {
492
+ var d, u, h, m;
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 = (h = e.scenarioIds) != null && h.includes("environment:baseline") ? 0 : 1, n = (p = t.scenarioIds) != null && p.includes("environment:baseline") ? 0 : 1;
495
+ const r = (h = e.scenarioIds) != null && h.includes("environment:baseline") ? 0 : 1, n = (m = t.scenarioIds) != null && m.includes("environment:baseline") ? 0 : 1;
496
496
  if (r !== n) return r - n;
497
497
  const s = !e.environment && !e.preset ? 0 : 1, a = !t.environment && !t.preset ? 0 : 1;
498
498
  return s !== a ? s - a : e.id.localeCompare(t.id);
499
499
  }
500
- function zt(e) {
500
+ function _t(e) {
501
501
  const t = /* @__PURE__ */ new Map();
502
502
  for (const o of e) {
503
503
  const r = H(o.route);
@@ -507,12 +507,12 @@ function zt(e) {
507
507
  }
508
508
  return new Map(
509
509
  [...t.entries()].map(([o, r]) => {
510
- const n = [...r].sort(we);
510
+ const n = [...r].sort(ye);
511
511
  return [o, n[0].id];
512
512
  })
513
513
  );
514
514
  }
515
- function _t(e) {
515
+ function jt(e) {
516
516
  const t = /* @__PURE__ */ new Map();
517
517
  for (const o of e) {
518
518
  const r = H(o.route);
@@ -527,7 +527,7 @@ function _t(e) {
527
527
  ])
528
528
  );
529
529
  }
530
- function jt(e) {
530
+ function Bt(e) {
531
531
  return e.action === "wait" ? null : JSON.stringify(
532
532
  me({
533
533
  action: e.action,
@@ -543,23 +543,23 @@ function jt(e) {
543
543
  })
544
544
  );
545
545
  }
546
- function We(e) {
547
- return (e.interactions ?? []).map(jt).filter((t) => t != null);
546
+ function Ke(e) {
547
+ return (e.interactions ?? []).map(Bt).filter((t) => t != null);
548
548
  }
549
- function Bt(e, t) {
549
+ function Ut(e, t) {
550
550
  return e.length < t.length && e.every((o, r) => o === t[r]);
551
551
  }
552
- function Ut(e, t) {
552
+ function Ht(e, t) {
553
553
  const o = /* @__PURE__ */ new Map();
554
554
  for (const r of e) {
555
555
  const n = H(r.route);
556
556
  if (!n) continue;
557
- const s = `${n}\0${We(r).join("")}`, a = o.get(s);
557
+ const s = `${n}\0${Ke(r).join("")}`, a = o.get(s);
558
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), a = r.find((d) => d.id === s) ?? [...r].sort(we)[0];
562
+ const n = H(r[0].route), s = t.get(n), a = r.find((d) => d.id === s) ?? [...r].sort(ye)[0];
563
563
  return r.filter((d) => d.id !== a.id).sort((d, u) => d.id.localeCompare(u.id)).map((d) => ({
564
564
  id: `discovery-variant:${encodeURIComponent(a.id)}:${encodeURIComponent(d.id)}`,
565
565
  from: a.id,
@@ -568,7 +568,7 @@ function Ut(e, t) {
568
568
  }));
569
569
  });
570
570
  }
571
- function Ht(e, t) {
571
+ function qt(e, t) {
572
572
  const o = /* @__PURE__ */ new Map();
573
573
  for (const r of e) {
574
574
  const n = H(r.route);
@@ -578,32 +578,32 @@ 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, We(u)])
581
+ n.map((u) => [u.id, Ke(u)])
582
582
  ), a = t.get(r), d = n.find(
583
583
  (u) => u.id === a
584
584
  );
585
585
  return n.flatMap((u) => {
586
586
  const h = s.get(u.id);
587
587
  if (!h.length) return [];
588
- const w = n.filter(
589
- (P) => Bt(
590
- s.get(P.id),
588
+ const y = n.filter(
589
+ (I) => Ut(
590
+ s.get(I.id),
591
591
  h
592
592
  )
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
- if (E !== f) return E - f;
598
- const M = P.section && P.section === u.section ? 0 : 1, D = I.section && I.section === u.section ? 0 : 1;
593
+ ).sort((I, x) => {
594
+ const p = s.get(x.id).length - s.get(I.id).length;
595
+ if (p !== 0) return p;
596
+ const C = I.flow && I.flow === u.flow ? 0 : 1, f = x.flow && x.flow === u.flow ? 0 : 1;
597
+ if (C !== f) return C - f;
598
+ const M = I.section && I.section === u.section ? 0 : 1, D = x.section && x.section === u.section ? 0 : 1;
599
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);
600
+ const w = I.id === a ? 0 : 1, O = x.id === a ? 0 : 1;
601
+ return w !== O ? w - O : ye(I, x);
602
602
  })[0];
603
- return w ? [
603
+ return y ? [
604
604
  {
605
- id: `discovery-recipe:${encodeURIComponent(w.id)}:${encodeURIComponent(u.id)}`,
606
- from: w.id,
605
+ id: `discovery-recipe:${encodeURIComponent(y.id)}:${encodeURIComponent(u.id)}`,
606
+ from: y.id,
607
607
  to: u.id,
608
608
  kind: "recipe-step"
609
609
  }
@@ -618,7 +618,7 @@ function Ht(e, t) {
618
618
  });
619
619
  });
620
620
  }
621
- function qt(e) {
621
+ function Gt(e) {
622
622
  var o;
623
623
  const t = /* @__PURE__ */ new Map();
624
624
  for (const r of e) {
@@ -637,7 +637,7 @@ function qt(e) {
637
637
  }
638
638
  return s.size < 2 ? [] : [...s.values()].flatMap((a) => {
639
639
  const d = [...a].sort(
640
- we
640
+ ye
641
641
  )[0];
642
642
  return d.id === n.id ? [] : [
643
643
  {
@@ -650,7 +650,7 @@ function qt(e) {
650
650
  });
651
651
  });
652
652
  }
653
- function Gt(e, t, o) {
653
+ function Kt(e, t, o) {
654
654
  const r = new Set(
655
655
  (t.routes ?? []).map((n) => H(n.path)).filter((n) => !!n)
656
656
  );
@@ -659,118 +659,118 @@ function Gt(e, t, o) {
659
659
  if (!s || o.get(s) !== n.id)
660
660
  return n;
661
661
  const a = [...r].filter(
662
- (d) => Ne(d, s)
662
+ (d) => Ee(d, s)
663
663
  );
664
664
  return a.length ? {
665
665
  ...n,
666
666
  scenarioIds: [
667
667
  .../* @__PURE__ */ new Set([
668
668
  ...n.scenarioIds ?? [],
669
- ...a.map(Le)
669
+ ...a.map(Ge)
670
670
  ])
671
671
  ].sort((d, u) => d.localeCompare(u))
672
672
  } : n;
673
673
  });
674
674
  }
675
- function Kt(e, 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])
675
+ function Lt(e, t) {
676
+ var h, m, y, I, x;
677
+ const o = new Set(e.map((p) => p.id)), r = new Map(
678
+ e.map((p, C) => [p.id, C])
679
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
- const E = [
684
- ...(m.fromScope ?? [m.from]).map(
685
- (f) => [f, m.to]
680
+ for (const p of o)
681
+ n.set(p, /* @__PURE__ */ new Set()), s.set(p, /* @__PURE__ */ new Set()), a.set(p, /* @__PURE__ */ new Set());
682
+ for (const p of t) {
683
+ const C = [
684
+ ...(p.fromScope ?? [p.from]).map(
685
+ (f) => [f, p.to]
686
686
  ),
687
- ...(m.toScope ?? [m.to]).map(
688
- (f) => [m.from, f]
687
+ ...(p.toScope ?? [p.to]).map(
688
+ (f) => [p.from, f]
689
689
  )
690
690
  ];
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));
691
+ for (const [f, M] of C)
692
+ !o.has(f) || !o.has(M) || ((h = n.get(M)) == null || h.add(f), (m = s.get(f)) == null || m.add(M), (y = a.get(f)) == null || y.add(M), (I = a.get(M)) == null || I.add(f));
693
693
  }
694
694
  const d = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
695
- for (const m of o) {
696
- if (u.has(m)) continue;
697
- const E = [], f = [m];
695
+ for (const p of o) {
696
+ if (u.has(p)) continue;
697
+ const C = [], f = [p];
698
698
  for (; f.length; ) {
699
699
  const S = f.shift();
700
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);
701
+ u.add(S), C.push(S);
702
+ for (const N of a.get(S) ?? [])
703
+ u.has(N) || f.push(N);
704
704
  }
705
705
  }
706
- if (E.length === 1 && (((I = a.get(E[0])) == null ? void 0 : I.size) ?? 0) === 0)
706
+ if (C.length === 1 && (((x = a.get(C[0])) == null ? void 0 : x.size) ?? 0) === 0)
707
707
  continue;
708
- const M = E.filter((S) => {
709
- var C;
710
- return (((C = n.get(S)) == null ? void 0 : C.size) ?? 0) === 0;
708
+ const M = C.filter((S) => {
709
+ var N;
710
+ return (((N = n.get(S)) == null ? void 0 : N.size) ?? 0) === 0;
711
711
  }).sort(
712
- (S, C) => (r.get(S) ?? Number.MAX_SAFE_INTEGER) - (r.get(C) ?? Number.MAX_SAFE_INTEGER) || S.localeCompare(C)
713
- ), D = [...E].sort(
714
- (S, C) => (r.get(S) ?? Number.MAX_SAFE_INTEGER) - (r.get(C) ?? Number.MAX_SAFE_INTEGER) || S.localeCompare(C)
712
+ (S, N) => (r.get(S) ?? Number.MAX_SAFE_INTEGER) - (r.get(N) ?? Number.MAX_SAFE_INTEGER) || S.localeCompare(N)
713
+ ), D = [...C].sort(
714
+ (S, N) => (r.get(S) ?? Number.MAX_SAFE_INTEGER) - (r.get(N) ?? Number.MAX_SAFE_INTEGER) || S.localeCompare(N)
715
715
  )[0];
716
716
  if (!D) continue;
717
- const b = [D], O = /* @__PURE__ */ new Set(), Y = (S) => {
718
- const C = [S];
719
- for (; C.length; ) {
720
- const F = C.shift();
717
+ const w = [D], O = /* @__PURE__ */ new Set(), Z = (S) => {
718
+ const N = [S];
719
+ for (; N.length; ) {
720
+ const F = N.shift();
721
721
  if (!O.has(F)) {
722
722
  O.add(F);
723
- for (const z of s.get(F) ?? [])
724
- O.has(z) || C.push(z);
723
+ for (const _ of s.get(F) ?? [])
724
+ O.has(_) || N.push(_);
725
725
  }
726
726
  }
727
727
  };
728
- Y(D);
728
+ Z(D);
729
729
  for (const S of M)
730
- O.has(S) || (b.push(S), Y(S));
731
- for (const S of b)
730
+ O.has(S) || (w.push(S), Z(S));
731
+ for (const S of w)
732
732
  d.add(S);
733
733
  }
734
734
  return [...d].sort(
735
- (m, E) => (r.get(m) ?? Number.MAX_SAFE_INTEGER) - (r.get(E) ?? Number.MAX_SAFE_INTEGER) || m.localeCompare(E)
735
+ (p, C) => (r.get(p) ?? Number.MAX_SAFE_INTEGER) - (r.get(C) ?? Number.MAX_SAFE_INTEGER) || p.localeCompare(C)
736
736
  );
737
737
  }
738
- function Ve(e) {
738
+ function Le(e) {
739
739
  var t, o;
740
- return $t(
740
+ return Ot(
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 Lt(e) {
747
- const t = Tt(
746
+ function Wt(e) {
747
+ const t = zt(
748
748
  e.pages,
749
749
  e.manifest
750
- ), o = zt(t), r = _t(t), n = Gt(
750
+ ), o = _t(t), r = jt(t), n = Kt(
751
751
  t,
752
752
  e.manifest,
753
753
  o
754
754
  ), a = [
755
- ...kt(
755
+ ...Ft(
756
756
  e.manifest.edges,
757
757
  o,
758
758
  r,
759
759
  new Set(n.map((d) => d.id))
760
760
  ),
761
- ...Ut(n, o),
762
761
  ...Ht(n, o),
763
- ...qt(n)
762
+ ...qt(n, o),
763
+ ...Gt(n)
764
764
  ];
765
- return Mt({
765
+ return $t({
766
766
  screens: n,
767
767
  assets: e.assets,
768
- scenarios: Dt(e.manifest.routes),
768
+ scenarios: kt(e.manifest.routes),
769
769
  inferredEdges: a,
770
- startScreenIds: Kt(n, a)
770
+ startScreenIds: Lt(n, a)
771
771
  });
772
772
  }
773
- async function Je(e) {
773
+ async function We(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,12 +779,12 @@ async function Je(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 (!Ot(r))
782
+ if (!Dt(r))
783
783
  throw new Error("Storyboard discovery returned an invalid manifest.");
784
784
  return {
785
785
  manifest: r,
786
- baselineEnvironment: Ve(r),
787
- graph: Lt({
786
+ baselineEnvironment: Le(r),
787
+ graph: Wt({
788
788
  manifest: r,
789
789
  pages: e.pages,
790
790
  assets: e.assets
@@ -792,25 +792,25 @@ async function Je(e) {
792
792
  };
793
793
  }
794
794
  async function pn(e) {
795
- ne(null);
795
+ re(null);
796
796
  try {
797
- const t = await Je(e);
798
- return ne(t.graph), t;
797
+ const t = await We(e);
798
+ return re(t.graph), t;
799
799
  } catch (t) {
800
- throw ne(null), t;
800
+ throw re(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)", Wt = "var(--pygmalion-catalog-header, #11182f)", Vt = "var(--pygmalion-catalog-accent, #7c6cf2)";
804
- function mn({
803
+ const pe = "var(--pygmalion-catalog-surface, #ffffff)", ge = "var(--pygmalion-catalog-canvas, #f5f5f5)", Pe = "var(--pygmalion-catalog-border, #e5e7eb)", he = "var(--pygmalion-catalog-text, #202124)", j = "var(--pygmalion-catalog-muted, #6b7280)", Vt = "var(--pygmalion-catalog-header, #11182f)", Jt = "var(--pygmalion-catalog-accent, #7c6cf2)";
804
+ function gn({
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: a = Wt,
811
+ headerBackground: a = Vt,
812
812
  headerColor: d = "#ffffff",
813
- bodyBackground: u = ge,
813
+ bodyBackground: u = pe,
814
814
  bodyGap: h = 40
815
815
  }) {
816
816
  return /* @__PURE__ */ $(
@@ -825,7 +825,7 @@ function mn({
825
825
  maxWidth: "none",
826
826
  flexDirection: "column",
827
827
  overflow: "visible",
828
- color: ye,
828
+ color: he,
829
829
  background: u,
830
830
  fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
831
831
  },
@@ -845,7 +845,7 @@ function mn({
845
845
  },
846
846
  children: [
847
847
  /* @__PURE__ */ $("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
848
- t ? /* @__PURE__ */ v(
848
+ t ? /* @__PURE__ */ b(
849
849
  "div",
850
850
  {
851
851
  style: {
@@ -858,7 +858,7 @@ function mn({
858
858
  children: t
859
859
  }
860
860
  ) : null,
861
- /* @__PURE__ */ v(
861
+ /* @__PURE__ */ b(
862
862
  "h1",
863
863
  {
864
864
  style: {
@@ -872,7 +872,7 @@ function mn({
872
872
  children: e
873
873
  }
874
874
  ),
875
- o ? /* @__PURE__ */ v(
875
+ o ? /* @__PURE__ */ b(
876
876
  "div",
877
877
  {
878
878
  style: {
@@ -897,15 +897,15 @@ function mn({
897
897
  whiteSpace: "nowrap"
898
898
  },
899
899
  children: [
900
- r ? /* @__PURE__ */ v("span", { children: r }) : null,
901
- n ? /* @__PURE__ */ v("span", { children: n }) : null
900
+ r ? /* @__PURE__ */ b("span", { children: r }) : null,
901
+ n ? /* @__PURE__ */ b("span", { children: n }) : null
902
902
  ]
903
903
  }
904
904
  ) : null
905
905
  ]
906
906
  }
907
907
  ),
908
- /* @__PURE__ */ v(
908
+ /* @__PURE__ */ b(
909
909
  "div",
910
910
  {
911
911
  "data-pygmalion-catalog-document-body": "",
@@ -925,7 +925,7 @@ function mn({
925
925
  }
926
926
  );
927
927
  }
928
- function gn({
928
+ function hn({
929
929
  title: e,
930
930
  itemId: t,
931
931
  count: o,
@@ -946,11 +946,11 @@ function gn({
946
946
  alignItems: "flex-start",
947
947
  gap: 18,
948
948
  padding: s === "tinted" ? 24 : 0,
949
- background: s === "tinted" ? he : "transparent"
949
+ background: s === "tinted" ? ge : "transparent"
950
950
  },
951
951
  children: [
952
952
  /* @__PURE__ */ $("header", { style: { display: "flex", alignItems: "baseline", gap: 8 }, children: [
953
- /* @__PURE__ */ v(
953
+ /* @__PURE__ */ b(
954
954
  "h2",
955
955
  {
956
956
  style: {
@@ -962,15 +962,15 @@ function gn({
962
962
  children: e
963
963
  }
964
964
  ),
965
- typeof o == "number" ? /* @__PURE__ */ v("span", { style: { color: B, fontSize: 11 }, children: o }) : null
965
+ typeof o == "number" ? /* @__PURE__ */ b("span", { style: { color: j, fontSize: 11 }, children: o }) : null
966
966
  ] }),
967
- r ? /* @__PURE__ */ v("div", { style: { marginTop: -10, color: B, fontSize: 11 }, children: r }) : null,
967
+ r ? /* @__PURE__ */ b("div", { style: { marginTop: -10, color: j, fontSize: 11 }, children: r }) : null,
968
968
  n
969
969
  ]
970
970
  }
971
971
  );
972
972
  }
973
- function hn({
973
+ function yn({
974
974
  rows: e,
975
975
  columns: t,
976
976
  cornerLabel: o,
@@ -980,7 +980,7 @@ function hn({
980
980
  boundary: a = !0,
981
981
  cellStyle: d
982
982
  }) {
983
- return /* @__PURE__ */ v(
983
+ return /* @__PURE__ */ b(
984
984
  "div",
985
985
  {
986
986
  "data-pygmalion-catalog-matrix": "",
@@ -989,7 +989,7 @@ function hn({
989
989
  display: "inline-block",
990
990
  width: "max-content",
991
991
  padding: a ? 16 : 0,
992
- border: a ? `1px dashed ${Vt}` : void 0,
992
+ border: a ? `1px dashed ${Jt}` : void 0,
993
993
  borderRadius: a ? 4 : void 0
994
994
  },
995
995
  children: /* @__PURE__ */ $(
@@ -1001,13 +1001,13 @@ function hn({
1001
1001
  borderSpacing: 0
1002
1002
  },
1003
1003
  children: [
1004
- /* @__PURE__ */ v("thead", { children: /* @__PURE__ */ $("tr", { children: [
1005
- /* @__PURE__ */ v(
1004
+ /* @__PURE__ */ b("thead", { children: /* @__PURE__ */ $("tr", { children: [
1005
+ /* @__PURE__ */ b(
1006
1006
  "th",
1007
1007
  {
1008
1008
  style: {
1009
1009
  padding: "0 16px 12px 0",
1010
- color: B,
1010
+ color: j,
1011
1011
  fontSize: 10,
1012
1012
  fontWeight: 600,
1013
1013
  textAlign: "left",
@@ -1016,12 +1016,12 @@ function hn({
1016
1016
  children: o
1017
1017
  }
1018
1018
  ),
1019
- t.map((u) => /* @__PURE__ */ v(
1019
+ t.map((u) => /* @__PURE__ */ b(
1020
1020
  "th",
1021
1021
  {
1022
1022
  style: {
1023
1023
  padding: "0 16px 12px",
1024
- color: B,
1024
+ color: j,
1025
1025
  fontSize: 10,
1026
1026
  fontWeight: 600,
1027
1027
  textAlign: "center",
@@ -1032,13 +1032,13 @@ function hn({
1032
1032
  u
1033
1033
  ))
1034
1034
  ] }) }),
1035
- /* @__PURE__ */ v("tbody", { children: e.map((u) => /* @__PURE__ */ $("tr", { children: [
1036
- /* @__PURE__ */ v(
1035
+ /* @__PURE__ */ b("tbody", { children: e.map((u) => /* @__PURE__ */ $("tr", { children: [
1036
+ /* @__PURE__ */ b(
1037
1037
  "th",
1038
1038
  {
1039
1039
  style: {
1040
1040
  padding: "12px 16px 12px 0",
1041
- color: B,
1041
+ color: j,
1042
1042
  fontSize: 10,
1043
1043
  fontWeight: 600,
1044
1044
  textAlign: "left",
@@ -1047,7 +1047,7 @@ function hn({
1047
1047
  children: n(u)
1048
1048
  }
1049
1049
  ),
1050
- t.map((h) => /* @__PURE__ */ v(
1050
+ t.map((h) => /* @__PURE__ */ b(
1051
1051
  "td",
1052
1052
  {
1053
1053
  style: {
@@ -1067,14 +1067,14 @@ function hn({
1067
1067
  }
1068
1068
  );
1069
1069
  }
1070
- function Jt(e) {
1070
+ function Qt(e) {
1071
1071
  return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/[^\p{L}\p{N}]+/gu, "-").replace(/^-+|-+$/g, "").toLowerCase() || "page";
1072
1072
  }
1073
- function Qe(e, t, o = "PygmalionCatalog") {
1074
- const r = (n) => Jt(n).replace(/-/g, "_");
1073
+ function Ve(e, t, o = "PygmalionCatalog") {
1074
+ const r = (n) => Qt(n).replace(/-/g, "_");
1075
1075
  return `${o}_${r(e)}_${r(t)}`;
1076
1076
  }
1077
- function Xe(e, t) {
1077
+ function Je(e, t) {
1078
1078
  return {
1079
1079
  id: e.id,
1080
1080
  name: e.name,
@@ -1085,7 +1085,7 @@ function Xe(e, t) {
1085
1085
  description: e.description
1086
1086
  };
1087
1087
  }
1088
- function Ye(e) {
1088
+ function Qe(e) {
1089
1089
  const t = /* @__PURE__ */ new Set();
1090
1090
  for (const o of e) {
1091
1091
  if (t.has(o.id))
@@ -1093,10 +1093,10 @@ function Ye(e) {
1093
1093
  t.add(o.id);
1094
1094
  }
1095
1095
  }
1096
- function Qt(e, t, o) {
1096
+ function Xt(e, t, o) {
1097
1097
  return typeof e == "function" ? e(t, o) : e;
1098
1098
  }
1099
- function Xt({
1099
+ function Yt({
1100
1100
  page: e,
1101
1101
  items: t,
1102
1102
  renderPreview: o,
@@ -1113,19 +1113,19 @@ function Xt({
1113
1113
  display: "inline-block",
1114
1114
  width: "max-content",
1115
1115
  padding: 32,
1116
- color: ye,
1117
- background: he,
1116
+ color: he,
1117
+ background: ge,
1118
1118
  fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
1119
1119
  },
1120
1120
  children: [
1121
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: [
1122
+ /* @__PURE__ */ b("h1", { style: { margin: 0, fontSize: 24, lineHeight: 1.35 }, children: e.name }),
1123
+ /* @__PURE__ */ $("p", { style: { margin: "6px 0 0", color: j, fontSize: 13 }, children: [
1124
1124
  t.length,
1125
1125
  " assets"
1126
1126
  ] })
1127
1127
  ] }),
1128
- /* @__PURE__ */ v(
1128
+ /* @__PURE__ */ b(
1129
1129
  "div",
1130
1130
  {
1131
1131
  style: {
@@ -1141,12 +1141,12 @@ function Xt({
1141
1141
  minWidth: n,
1142
1142
  width: n,
1143
1143
  padding: 16,
1144
- border: `1px solid ${Ee}`,
1144
+ border: `1px solid ${Pe}`,
1145
1145
  borderRadius: 12,
1146
- background: ge
1146
+ background: pe
1147
1147
  },
1148
1148
  children: [
1149
- /* @__PURE__ */ v(
1149
+ /* @__PURE__ */ b(
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__ */ v(
1162
+ /* @__PURE__ */ b(
1163
1163
  "div",
1164
1164
  {
1165
1165
  style: {
@@ -1174,13 +1174,13 @@ function Xt({
1174
1174
  children: s.name
1175
1175
  }
1176
1176
  ),
1177
- r ? /* @__PURE__ */ v("div", { style: { marginTop: 4, color: B, fontSize: 11, lineHeight: 1.45 }, children: r(s) }) : s.codeName ? /* @__PURE__ */ v(
1177
+ r ? /* @__PURE__ */ b("div", { style: { marginTop: 4, color: j, fontSize: 11, lineHeight: 1.45 }, children: r(s) }) : s.codeName ? /* @__PURE__ */ b(
1178
1178
  "div",
1179
1179
  {
1180
1180
  style: {
1181
1181
  marginTop: 4,
1182
1182
  overflow: "hidden",
1183
- color: B,
1183
+ color: j,
1184
1184
  fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
1185
1185
  fontSize: 11,
1186
1186
  textOverflow: "ellipsis",
@@ -1200,8 +1200,8 @@ function Xt({
1200
1200
  }
1201
1201
  );
1202
1202
  }
1203
- function yn(e) {
1204
- Ye(e.items);
1203
+ function wn(e) {
1204
+ Qe(e.items);
1205
1205
  const t = /* @__PURE__ */ new Map();
1206
1206
  for (const n of e.items) {
1207
1207
  const s = e.pageFor(n), a = t.get(s.id);
@@ -1214,7 +1214,7 @@ function yn(e) {
1214
1214
  t.set(s.id, {
1215
1215
  page: s,
1216
1216
  items: [n],
1217
- registryName: Qe(
1217
+ registryName: Ve(
1218
1218
  e.kind,
1219
1219
  s.id,
1220
1220
  e.registryPrefix
@@ -1223,8 +1223,8 @@ function yn(e) {
1223
1223
  }
1224
1224
  const o = {}, r = [];
1225
1225
  for (const n of t.values()) {
1226
- const s = () => /* @__PURE__ */ v(
1227
- Xt,
1226
+ const s = () => /* @__PURE__ */ b(
1227
+ Yt,
1228
1228
  {
1229
1229
  page: n.page,
1230
1230
  items: n.items,
@@ -1237,7 +1237,7 @@ function yn(e) {
1237
1237
  component: s,
1238
1238
  children: "none"
1239
1239
  };
1240
- const a = Qt(e.frame, n.page, n.items);
1240
+ const a = Xt(e.frame, n.page, n.items);
1241
1241
  r.push({
1242
1242
  ...n.page,
1243
1243
  componentName: n.registryName,
@@ -1250,13 +1250,13 @@ function yn(e) {
1250
1250
  registry: o,
1251
1251
  collection: {
1252
1252
  expectedCount: e.expectedCount ?? e.items.length,
1253
- assets: e.items.map((n) => Xe(n, e.pageFor(n).id)),
1253
+ assets: e.items.map((n) => Je(n, e.pageFor(n).id)),
1254
1254
  pages: r
1255
1255
  }
1256
1256
  };
1257
1257
  }
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], [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)));
1258
+ function Zt(e, t = 60) {
1259
+ const o = Object.entries((e == null ? void 0 : e.props) ?? {}).filter(([, d]) => d.length > 0).sort(([d, u], [h, m]) => m.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
1262
  column: n ? [n[0], a ?? []] : void 0,
@@ -1264,7 +1264,7 @@ function Yt(e, t = 60) {
1264
1264
  additional: o.slice(2)
1265
1265
  };
1266
1266
  }
1267
- function Zt(e, t, o, r) {
1267
+ function en(e, t, o, r) {
1268
1268
  return {
1269
1269
  ...e.defaultProps,
1270
1270
  ...Object.fromEntries(t.fixed),
@@ -1272,7 +1272,7 @@ function Zt(e, t, o, r) {
1272
1272
  ...t.column && r ? { [t.column[0]]: r } : {}
1273
1273
  };
1274
1274
  }
1275
- function en({
1275
+ function tn({
1276
1276
  item: e,
1277
1277
  entry: t,
1278
1278
  maxVariantCells: o
@@ -1289,16 +1289,16 @@ function en({
1289
1289
  display: "inline-block",
1290
1290
  width: "max-content",
1291
1291
  padding: 32,
1292
- color: ye,
1293
- background: he
1292
+ color: he,
1293
+ background: ge
1294
1294
  },
1295
1295
  children: [
1296
- /* @__PURE__ */ v("strong", { children: e.name }),
1297
- /* @__PURE__ */ v("p", { style: { color: B }, children: "The component is not registered." })
1296
+ /* @__PURE__ */ b("strong", { children: e.name }),
1297
+ /* @__PURE__ */ b("p", { style: { color: j }, 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], a = t.component;
1301
+ const r = Zt(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
1302
  return /* @__PURE__ */ $(
1303
1303
  "section",
1304
1304
  {
@@ -1309,16 +1309,16 @@ function en({
1309
1309
  display: "inline-block",
1310
1310
  width: "max-content",
1311
1311
  padding: 32,
1312
- color: ye,
1313
- background: he,
1312
+ color: he,
1313
+ background: ge,
1314
1314
  fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
1315
1315
  },
1316
1316
  children: [
1317
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
1318
+ /* @__PURE__ */ b("h1", { style: { margin: 0, fontSize: 24 }, children: e.name }),
1319
+ e.sourcePath ? /* @__PURE__ */ b("p", { style: { margin: "6px 0 0", color: j, fontSize: 12 }, children: e.sourcePath }) : null
1320
1320
  ] }),
1321
- /* @__PURE__ */ v(
1321
+ /* @__PURE__ */ b(
1322
1322
  "div",
1323
1323
  {
1324
1324
  style: {
@@ -1327,10 +1327,10 @@ function en({
1327
1327
  gap: 12
1328
1328
  },
1329
1329
  children: n.flatMap(
1330
- (h) => s.map((p) => {
1331
- const w = Zt(t, r, h, p), P = [
1330
+ (h) => s.map((m) => {
1331
+ const y = en(t, r, h, m), I = [
1332
1332
  r.row && h ? `${r.row[0]}=${h}` : "",
1333
- r.column && p ? `${r.column[0]}=${p}` : ""
1333
+ r.column && m ? `${r.column[0]}=${m}` : ""
1334
1334
  ].filter(Boolean).join(" · ");
1335
1335
  return /* @__PURE__ */ $(
1336
1336
  "article",
@@ -1338,62 +1338,62 @@ function en({
1338
1338
  style: {
1339
1339
  width: "max-content",
1340
1340
  padding: 16,
1341
- border: `1px solid ${Ee}`,
1341
+ border: `1px solid ${Pe}`,
1342
1342
  borderRadius: 10,
1343
- background: ge
1343
+ background: pe
1344
1344
  },
1345
1345
  children: [
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(
1346
+ I ? /* @__PURE__ */ b("div", { style: { marginBottom: 12, color: j, fontSize: 11 }, children: I }) : null,
1347
+ /* @__PURE__ */ b("div", { style: { display: "flex", minHeight: 44, alignItems: "center" }, children: ke(
1348
1348
  a,
1349
- w,
1349
+ y,
1350
1350
  t.children === "text" ? t.defaultChildren ?? e.name : void 0
1351
1351
  ) })
1352
1352
  ]
1353
1353
  },
1354
- `${h ?? "default"}:${p ?? "default"}`
1354
+ `${h ?? "default"}:${m ?? "default"}`
1355
1355
  );
1356
1356
  })
1357
1357
  )
1358
1358
  }
1359
1359
  ),
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__ */ $(
1360
+ r.additional.map(([h, m]) => /* @__PURE__ */ $("section", { style: { marginTop: 20 }, children: [
1361
+ /* @__PURE__ */ b("h2", { style: { margin: "0 0 10px", color: j, fontSize: 12 }, children: h }),
1362
+ /* @__PURE__ */ b("div", { style: { display: "flex", flexWrap: "wrap", gap: 12 }, children: m.map((y) => /* @__PURE__ */ $(
1363
1363
  "article",
1364
1364
  {
1365
1365
  style: {
1366
1366
  padding: 16,
1367
- border: `1px solid ${Ee}`,
1367
+ border: `1px solid ${Pe}`,
1368
1368
  borderRadius: 10,
1369
- background: ge
1369
+ background: pe
1370
1370
  },
1371
1371
  children: [
1372
- /* @__PURE__ */ v("div", { style: { marginBottom: 12, color: B, fontSize: 11 }, children: w }),
1373
- Te(
1372
+ /* @__PURE__ */ b("div", { style: { marginBottom: 12, color: j, fontSize: 11 }, children: y }),
1373
+ ke(
1374
1374
  a,
1375
- { ...t.defaultProps, [h]: w },
1375
+ { ...t.defaultProps, [h]: y },
1376
1376
  t.children === "text" ? t.defaultChildren ?? e.name : void 0
1377
1377
  )
1378
1378
  ]
1379
1379
  },
1380
- w
1380
+ y
1381
1381
  )) })
1382
1382
  ] }, h))
1383
1383
  ]
1384
1384
  }
1385
1385
  );
1386
1386
  }
1387
- function wn(e) {
1388
- Ye(e.items);
1387
+ function bn(e) {
1388
+ Qe(e.items);
1389
1389
  const t = {}, o = [], r = [], n = e.maxVariantCells ?? 60;
1390
1390
  for (const s of e.items) {
1391
- const a = Qe(
1391
+ const a = Ve(
1392
1392
  e.kind,
1393
1393
  s.id,
1394
1394
  e.registryPrefix
1395
- ), d = e.registry[s.name], u = () => /* @__PURE__ */ v(
1396
- en,
1395
+ ), d = e.registry[s.name], u = () => /* @__PURE__ */ b(
1396
+ tn,
1397
1397
  {
1398
1398
  item: s,
1399
1399
  entry: d,
@@ -1410,7 +1410,7 @@ function wn(e) {
1410
1410
  width: 1,
1411
1411
  height: 1,
1412
1412
  frameSizeMode: "content"
1413
- }), r.push(Xe(s, s.id));
1413
+ }), r.push(Je(s, s.id));
1414
1414
  }
1415
1415
  return {
1416
1416
  registry: t,
@@ -1421,31 +1421,31 @@ function wn(e) {
1421
1421
  }
1422
1422
  };
1423
1423
  }
1424
- const Ue = /^[a-f0-9]{64}$/, tn = /^\/__pygmalion-qa\/artifacts\/[A-Za-z0-9_-]{8,120}\.png$/, nn = /^p\d+$/;
1424
+ const je = /^[a-f0-9]{64}$/, nn = /^\/__pygmalion-qa\/artifacts\/[A-Za-z0-9_-]{8,120}\.png$/, rn = /^p\d+$/;
1425
1425
  function Ce(e) {
1426
- return typeof e == "string" && tn.test(e) ? e : void 0;
1426
+ return typeof e == "string" && nn.test(e) ? e : void 0;
1427
1427
  }
1428
- function He(e, t) {
1428
+ function Be(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
1432
  function Se(e) {
1433
1433
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1434
1434
  const t = e;
1435
- return typeof t.domStructureHash != "string" || !Ue.test(t.domStructureHash) || typeof t.screenshotHash != "string" || !Ue.test(t.screenshotHash) ? null : {
1435
+ return typeof t.domStructureHash != "string" || !je.test(t.domStructureHash) || typeof t.screenshotHash != "string" || !je.test(t.screenshotHash) ? null : {
1436
1436
  domStructureHash: t.domStructureHash,
1437
1437
  screenshotHash: t.screenshotHash,
1438
1438
  ...Ce(t.screenshotUrl) ? { screenshotUrl: Ce(t.screenshotUrl) } : {}
1439
1439
  };
1440
1440
  }
1441
- function qe(e) {
1441
+ function Ue(e) {
1442
1442
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1443
1443
  const t = e;
1444
1444
  return !Number.isSafeInteger(t.width) || !Number.isSafeInteger(t.height) || Number(t.width) < 1 || Number(t.height) < 1 || Number(t.width) > 65536 || Number(t.height) > 65536 ? null : { width: Number(t.width), height: Number(t.height) };
1445
1445
  }
1446
- function rn(e) {
1446
+ function on(e) {
1447
1447
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1448
- const t = e, o = qe(t.before), r = qe(t.after);
1448
+ const t = e, o = Ue(t.before), r = Ue(t.after);
1449
1449
  if (!o || !r || !Number.isSafeInteger(t.changedPixels) || !Number.isSafeInteger(t.totalPixels) || Number(t.changedPixels) < 0 || Number(t.totalPixels) < 1 || Number(t.changedPixels) > Number(t.totalPixels) || typeof t.threshold != "number" || !Number.isFinite(t.threshold) || t.threshold < 0 || t.threshold > 1)
1450
1450
  return null;
1451
1451
  const n = t.heatmapUrl == null ? null : Ce(t.heatmapUrl) ?? null;
@@ -1460,7 +1460,7 @@ function rn(e) {
1460
1460
  heatmapUrl: n
1461
1461
  };
1462
1462
  }
1463
- function on(e, t) {
1463
+ function sn(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;
@@ -1468,7 +1468,7 @@ function on(e, t) {
1468
1468
  if (!n) return null;
1469
1469
  const s = Se(o.after);
1470
1470
  if (t === "changed" && !s) return null;
1471
- const a = s ? rn(o.pixelDiff) : null;
1471
+ const a = s ? on(o.pixelDiff) : null;
1472
1472
  return {
1473
1473
  id: o.id,
1474
1474
  before: n,
@@ -1480,7 +1480,7 @@ function on(e, t) {
1480
1480
  ...a ? { pixelDiff: a } : {}
1481
1481
  };
1482
1482
  }
1483
- function sn(e, t = []) {
1483
+ function an(e, t = []) {
1484
1484
  const o = new Set(t), r = o.size > 0, n = /* @__PURE__ */ new Set(), s = [
1485
1485
  ...e.styles.map((a) => a.affectedFrames ?? []),
1486
1486
  ...e.texts.map((a) => a.affectedFrames ?? []),
@@ -1488,7 +1488,7 @@ function sn(e, t = []) {
1488
1488
  ];
1489
1489
  for (const a of s)
1490
1490
  for (const d of a) {
1491
- if (r && nn.test(d.id) && !o.has(d.id))
1491
+ if (r && rn.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.`
1494
1494
  );
@@ -1496,7 +1496,7 @@ function sn(e, t = []) {
1496
1496
  }
1497
1497
  return [...n].sort();
1498
1498
  }
1499
- async function Ge(e, t, o) {
1499
+ async function He(e, t, o) {
1500
1500
  const r = await e(`${t.replace(/\/$/, "")}/capture`, {
1501
1501
  method: "POST",
1502
1502
  headers: { "content-type": "application/json" },
@@ -1508,11 +1508,11 @@ 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((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));
1511
+ const s = Array.isArray(n.frames) ? n.frames.map((m) => sn(m, o.phase)).filter((m) => m != null) : [], a = 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), h = new Set(s.map((m) => m.id)).size === s.length && s.every((m) => d.has(m.id)) && a.every((m) => d.has(m.id));
1516
1516
  return {
1517
1517
  phase: o.phase,
1518
1518
  baselineId: n.baselineId,
@@ -1521,50 +1521,50 @@ async function Ge(e, t, o) {
1521
1521
  failures: a
1522
1522
  };
1523
1523
  }
1524
- const Ie = {
1524
+ const ve = {
1525
1525
  mirror: "/__pygmalion-dev-control",
1526
1526
  sessions: "/__pygmalion-design-session",
1527
1527
  inspect: "/__pygmalion-inspect"
1528
- }, an = "pygmalion.designSessionId", cn = "/__pygmalion-qa", pe = /* @__PURE__ */ new Map();
1529
- function Ke() {
1528
+ }, cn = "pygmalion.designSessionId", ln = "/__pygmalion-qa", fe = /* @__PURE__ */ new Map();
1529
+ function qe() {
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
- function ln(e, t) {
1533
+ function dn(e, t) {
1534
1534
  if (e) return e;
1535
- const o = pe.get(t);
1535
+ const o = fe.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 pe.set(t, r), r;
1541
- const n = Ke();
1542
- return window.localStorage.setItem(t, n), pe.set(t, n), n;
1540
+ return fe.set(t, r), r;
1541
+ const n = qe();
1542
+ return window.localStorage.setItem(t, n), fe.set(t, n), n;
1543
1543
  } catch {
1544
- const r = Ke();
1545
- return pe.set(t, r), r;
1544
+ const r = qe();
1545
+ return fe.set(t, r), r;
1546
1546
  }
1547
1547
  }
1548
- async function X(e) {
1548
+ async function Y(e) {
1549
1549
  const t = await e.json();
1550
1550
  if (!e.ok) throw new Error(t.error ?? `Pygmalion request failed (${e.status})`);
1551
1551
  return t;
1552
1552
  }
1553
- function bn(e = {}) {
1554
- var L, ee, j, W, i;
1553
+ function Sn(e = {}) {
1554
+ var L, te, X, W, i;
1555
1555
  const {
1556
1556
  sessionId: t,
1557
- sessionStorageKey: o = an,
1557
+ sessionStorageKey: o = cn,
1558
1558
  autoStart: r = !0,
1559
1559
  fetcher: n = fetch,
1560
1560
  formatApplyMessage: s
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
- () => ln(t, o),
1561
+ } = e, a = ((L = e.endpoints) == null ? void 0 : L.mirror) ?? ve.mirror, d = ((te = e.endpoints) == null ? void 0 : te.sessions) ?? ve.sessions, u = ((X = e.endpoints) == null ? void 0 : X.inspect) ?? ve.inspect, h = e.visualQa != null, m = ((W = e.visualQa) == null ? void 0 : W.endpoint) ?? ln, y = JSON.stringify(((i = e.visualQa) == null ? void 0 : i.eligibleFrameIds) ?? []), I = oe(
1562
+ () => JSON.parse(y),
1563
+ [y]
1564
+ ), x = oe(
1565
+ () => dn(t, o),
1566
1566
  [t, o]
1567
- ), [m, E] = ie({
1567
+ ), [p, C] = ce({
1568
1568
  state: "idle",
1569
1569
  commit: null,
1570
1570
  shortCommit: null,
@@ -1574,58 +1574,58 @@ function bn(e = {}) {
1574
1574
  warning: null,
1575
1575
  error: null,
1576
1576
  appOrigin: null
1577
- }), [f, M] = ie(null), [D, b] = ie(null), [O, Y] = ie({
1577
+ }), [f, M] = ce(null), [D, w] = ce(null), [O, Z] = ce({
1578
1578
  refs: [],
1579
1579
  defaultRef: null,
1580
1580
  worktreeRef: null
1581
- }), S = xe(null), C = xe(null), F = te(
1581
+ }), S = Ie(null), N = Ie(null), F = ne(
1582
1582
  async (c = !0, l) => {
1583
1583
  if (l != null && S.current && await S.current.catch(() => {
1584
1584
  }), S.current) return S.current;
1585
1585
  const g = (async () => {
1586
- E((x) => ({ ...x, state: "syncing", error: null }));
1586
+ C((P) => ({ ...P, state: "syncing", error: null }));
1587
1587
  try {
1588
- const x = l != null;
1589
- let R = await n(`${a}/${c || x ? "refresh" : "status"}`, {
1590
- method: c || x ? "POST" : "GET",
1591
- ...x ? {
1588
+ const P = l != null;
1589
+ let A = await n(`${a}/${c || P ? "refresh" : "status"}`, {
1590
+ method: c || P ? "POST" : "GET",
1591
+ ...P ? {
1592
1592
  headers: { "content-type": "application/json" },
1593
1593
  body: JSON.stringify({ ref: l })
1594
1594
  } : {}
1595
- }), k = await X(R);
1595
+ }), k = await Y(A);
1596
1596
  const q = Date.now();
1597
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);
1598
+ await new Promise((R) => window.setTimeout(R, 500)), A = await n(`${a}/status`), k = await Y(A);
1599
1599
  if (k.state !== "ready" || !k.appOrigin || !k.commit)
1600
1600
  throw new Error(k.error ?? "Pygmalion could not prepare the source preview");
1601
- const N = await X(
1601
+ const E = await Y(
1602
1602
  await n(`${d}/open`, {
1603
1603
  method: "POST",
1604
1604
  headers: { "content-type": "application/json" },
1605
- body: JSON.stringify({ sessionId: I, baseDevSha: k.commit })
1605
+ body: JSON.stringify({ sessionId: x, baseDevSha: k.commit })
1606
1606
  })
1607
1607
  );
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(
1608
+ if (!E.ok || !E.session)
1609
+ throw new Error(E.error ?? "Pygmalion could not open the design session");
1610
+ let v = E.session;
1611
+ if (v.branchName) {
1612
+ const R = await Y(
1613
1613
  await n(`${d}/check`, {
1614
1614
  method: "POST",
1615
1615
  headers: { "content-type": "application/json" },
1616
- body: JSON.stringify({ sessionId: y.id })
1616
+ body: JSON.stringify({ sessionId: v.id })
1617
1617
  })
1618
1618
  );
1619
- if (!A.ok || !A.session)
1620
- throw new Error(A.error ?? "Pygmalion could not check the design session");
1621
- y = A.session;
1619
+ if (!R.ok || !R.session)
1620
+ throw new Error(R.error ?? "Pygmalion could not check the design session");
1621
+ v = R.session;
1622
1622
  }
1623
- E(k), M(y), b(y.appOrigin ?? k.appOrigin);
1624
- } catch (x) {
1625
- E((R) => ({
1626
- ...R,
1623
+ C(k), M(v), w(v.appOrigin ?? k.appOrigin);
1624
+ } catch (P) {
1625
+ C((A) => ({
1626
+ ...A,
1627
1627
  state: "error",
1628
- error: x instanceof Error ? x.message : String(x)
1628
+ error: P instanceof Error ? P.message : String(P)
1629
1629
  }));
1630
1630
  }
1631
1631
  })();
@@ -1636,37 +1636,37 @@ function bn(e = {}) {
1636
1636
  S.current === g && (S.current = null);
1637
1637
  }
1638
1638
  },
1639
- [n, a, d, I]
1640
- ), z = te(async () => {
1639
+ [n, a, d, x]
1640
+ ), _ = ne(async () => {
1641
1641
  try {
1642
- const c = await X(
1642
+ const c = await Y(
1643
1643
  await n(`${a}/refs`)
1644
1644
  ), l = {
1645
1645
  refs: c.refs ?? [],
1646
1646
  defaultRef: c.defaultRef ?? null,
1647
1647
  worktreeRef: c.worktreeRef ?? null
1648
1648
  };
1649
- return Y(l), l;
1649
+ return Z(l), l;
1650
1650
  } catch {
1651
1651
  return O;
1652
1652
  }
1653
- }, [n, a, O]), J = te(
1653
+ }, [n, a, O]), J = ne(
1654
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 F(!0, c), await z();
1659
+ await F(!0, c), await _();
1660
1660
  },
1661
- [z, F, f == null ? void 0 : f.branchName]
1662
- ), oe = te(
1661
+ [_, F, f == null ? void 0 : f.branchName]
1662
+ ), se = ne(
1663
1663
  async (c) => {
1664
1664
  var k;
1665
1665
  if (!f) throw new Error("Pygmalion design session is not ready");
1666
- const l = C.current;
1666
+ const l = N.current;
1667
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 g = await X(
1669
+ const g = await Y(
1670
1670
  await n(`${d}/apply-visual`, {
1671
1671
  method: "POST",
1672
1672
  headers: { "content-type": "application/json" },
@@ -1681,42 +1681,42 @@ function bn(e = {}) {
1681
1681
  );
1682
1682
  if (!g.ok || !g.session)
1683
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;
1684
+ M(g.session), g.session.appOrigin && w(g.session.appOrigin);
1685
+ const P = g.applied ?? c.styles.length + c.texts.length + c.operations.length;
1686
+ let A;
1687
1687
  if (l != null && l.qaBaselineId && ((k = l.qaFrameIds) != null && k.length) && g.session.appOrigin)
1688
1688
  try {
1689
- R = await Ge(n, p, {
1689
+ A = await He(n, m, {
1690
1690
  phase: "changed",
1691
1691
  baselineId: l.qaBaselineId,
1692
- basePath: He(g.session.appOrigin, window.location.origin),
1692
+ basePath: Be(g.session.appOrigin, window.location.origin),
1693
1693
  frameIds: l.qaFrameIds
1694
1694
  });
1695
1695
  } catch (q) {
1696
- const N = q instanceof Error ? q.message : String(q);
1697
- R = {
1696
+ const E = q instanceof Error ? q.message : String(q);
1697
+ A = {
1698
1698
  phase: "changed",
1699
1699
  baselineId: l.qaBaselineId,
1700
1700
  complete: !1,
1701
1701
  frames: [],
1702
- failures: l.qaFrameIds.map((y) => ({ id: y, error: N }))
1702
+ failures: l.qaFrameIds.map((v) => ({ id: v, error: E }))
1703
1703
  };
1704
1704
  }
1705
- return C.current = null, {
1706
- applied: x,
1705
+ return N.current = null, {
1706
+ applied: P,
1707
1707
  branch: g.session.branchName ?? void 0,
1708
1708
  integration: g.session.integration.state,
1709
- message: s == null ? void 0 : s(g.session, x),
1710
- ...R ? { qa: R } : {}
1709
+ message: s == null ? void 0 : s(g.session, P),
1710
+ ...A ? { qa: A } : {}
1711
1711
  };
1712
1712
  },
1713
- [n, s, p, f, d]
1714
- ), se = te(
1713
+ [n, s, m, f, d]
1714
+ ), ie = ne(
1715
1715
  async (c) => {
1716
1716
  var k;
1717
1717
  if (!f) throw new Error("Pygmalion design session is not ready");
1718
- C.current = null;
1719
- const l = await X(
1718
+ N.current = null;
1719
+ const l = await Y(
1720
1720
  await n(`${d}/preview-visual`, {
1721
1721
  method: "POST",
1722
1722
  headers: { "content-type": "application/json" },
@@ -1730,47 +1730,47 @@ function bn(e = {}) {
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 g = h ? sn(c, P) : [];
1734
- let x;
1735
- const R = f.appOrigin ?? m.appOrigin;
1733
+ const g = h ? an(c, I) : [];
1734
+ let P;
1735
+ const A = f.appOrigin ?? p.appOrigin;
1736
1736
  if (g.length > 0) {
1737
- if (!R)
1737
+ if (!A)
1738
1738
  throw new Error("Impact screen QA baseline preview not ready");
1739
- if (x = await Ge(n, p, {
1739
+ if (P = await He(n, m, {
1740
1740
  phase: "baseline",
1741
- basePath: He(R, window.location.origin),
1741
+ basePath: Be(A, window.location.origin),
1742
1742
  frameIds: g
1743
- }), !x.complete)
1743
+ }), !P.complete)
1744
1744
  throw new Error(
1745
- ((k = x.failures[0]) == null ? void 0 : k.error) ?? `Failed to capture ${g.length - x.frames.length} affected frames`
1745
+ ((k = P.failures[0]) == null ? void 0 : k.error) ?? `Failed to capture ${g.length - P.frames.length} affected frames`
1746
1746
  );
1747
1747
  }
1748
- return C.current = {
1748
+ return N.current = {
1749
1749
  sessionId: f.id,
1750
1750
  baseDevSha: f.baseDevSha,
1751
1751
  revision: l.revision,
1752
1752
  fingerprint: JSON.stringify(c),
1753
- ...x ? { qaBaselineId: x.baselineId, qaFrameIds: g } : {}
1753
+ ...P ? { qaBaselineId: P.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
- ...x ? { qa: x } : {}
1758
+ ...P ? { qa: P } : {}
1759
1759
  };
1760
1760
  },
1761
1761
  [
1762
1762
  n,
1763
- m.appOrigin,
1764
- P,
1765
- p,
1763
+ p.appOrigin,
1764
+ I,
1765
+ m,
1766
1766
  f,
1767
1767
  d,
1768
1768
  h
1769
1769
  ]
1770
- ), Z = te(
1770
+ ), ee = ne(
1771
1771
  async (c) => {
1772
1772
  if (c.length === 0) return { files: [] };
1773
- const l = await X(
1773
+ const l = await Y(
1774
1774
  await n(`${u}/impact`, {
1775
1775
  method: "POST",
1776
1776
  headers: { "content-type": "application/json" },
@@ -1782,10 +1782,10 @@ function bn(e = {}) {
1782
1782
  return { files: Array.isArray(l.files) ? l.files : [] };
1783
1783
  },
1784
1784
  [n, u]
1785
- ), K = te(async () => {
1785
+ ), K = ne(async () => {
1786
1786
  if (!(f != null && f.canRevert) || !f.headSha)
1787
1787
  throw new Error("There are no reversible changes applied");
1788
- const c = await X(
1788
+ const c = await Y(
1789
1789
  await n(`${d}/revert-visual`, {
1790
1790
  method: "POST",
1791
1791
  headers: { "content-type": "application/json" },
@@ -1799,32 +1799,32 @@ function bn(e = {}) {
1799
1799
  );
1800
1800
  if (!c.ok || c.reverted !== !0 || !c.operation || c.operation.kind !== "visual-revert" || !c.session)
1801
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), {
1802
+ return N.current = null, M(c.session), c.session.appOrigin && w(c.session.appOrigin), {
1803
1803
  reverted: !0,
1804
1804
  operation: c.operation,
1805
1805
  session: c.session
1806
1806
  };
1807
1807
  }, [n, f, d]);
1808
- ae(() => {
1808
+ le(() => {
1809
1809
  r && F(!1);
1810
- }, [r, F]), ae(() => {
1811
- r && z();
1810
+ }, [r, F]), le(() => {
1811
+ r && _();
1812
1812
  }, [r]);
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";
1813
+ const Q = (f == null ? void 0 : f.appOrigin) ?? p.appOrigin ?? D, B = (f == null ? void 0 : f.headSha) ?? (f == null ? void 0 : f.baseDevSha) ?? p.commit ?? "pending";
1814
1814
  return {
1815
- mirror: m,
1815
+ mirror: p,
1816
1816
  session: f,
1817
1817
  ready: D != null,
1818
1818
  appOrigin: Q,
1819
- previewRevision: `${U}:${(f == null ? void 0 : f.revision) ?? 0}`,
1820
- previewSourceRevision: U,
1819
+ previewRevision: `${B}:${(f == null ? void 0 : f.revision) ?? 0}`,
1820
+ previewSourceRevision: B,
1821
1821
  refresh: F,
1822
1822
  switchSource: J,
1823
1823
  sourceRefs: O,
1824
- loadSourceRefs: z,
1825
- previewVisual: se,
1826
- inspectImpact: Z,
1827
- applyVisual: oe,
1824
+ loadSourceRefs: _,
1825
+ previewVisual: ie,
1826
+ inspectImpact: ee,
1827
+ applyVisual: se,
1828
1828
  revertLastVisual: K
1829
1829
  };
1830
1830
  }
@@ -1839,46 +1839,46 @@ function vn({
1839
1839
  label: d = "Source revision",
1840
1840
  refreshLabel: u = "Refresh current revision",
1841
1841
  children: h,
1842
- className: p
1842
+ className: m
1843
1843
  }) {
1844
- const w = re(
1844
+ const y = oe(
1845
1845
  () => ({
1846
- local: o.filter((b) => b.kind === "local"),
1847
- remote: o.filter((b) => b.kind === "remote")
1846
+ local: o.filter((w) => w.kind === "local"),
1847
+ remote: o.filter((w) => w.kind === "remote")
1848
1848
  }),
1849
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;
1850
+ ), I = oe(() => {
1851
+ const w = new Set(o.map((O) => O.name));
1852
+ return s && w.add(s), a && w.add(a), w;
1853
+ }, [s, o, a]), x = e ?? s ?? "", p = oe(
1854
+ () => o.find((w) => w.name === x) ?? null,
1855
+ [o, x]
1856
+ ), C = (t == null ? void 0 : t.toLowerCase()) ?? null, f = (p == null ? void 0 : p.commit.toLowerCase()) ?? null, M = !!(C && f && C !== f && !C.startsWith(f) && !f.startsWith(C)), D = (t == null ? void 0 : t.slice(0, 8)) ?? null;
1857
1857
  return /* @__PURE__ */ $(
1858
1858
  "span",
1859
1859
  {
1860
- className: p,
1860
+ className: m,
1861
1861
  "data-pygmalion-source-ref": "",
1862
1862
  "data-busy": n ? "" : void 0,
1863
1863
  "data-update-available": M ? "" : void 0,
1864
- "data-latest-commit": M ? m == null ? void 0 : m.commit : void 0,
1864
+ "data-latest-commit": M ? p == null ? void 0 : p.commit : void 0,
1865
1865
  style: { position: "relative", display: "inline-flex", alignItems: "center" },
1866
1866
  children: [
1867
- h ?? /* @__PURE__ */ v("span", { "data-pygmalion-source-ref-value": "", children: I || d }),
1867
+ h ?? /* @__PURE__ */ b("span", { "data-pygmalion-source-ref-value": "", children: x || d }),
1868
1868
  /* @__PURE__ */ $(
1869
1869
  "select",
1870
1870
  {
1871
- value: I,
1871
+ value: x,
1872
1872
  disabled: n,
1873
1873
  "aria-label": d,
1874
1874
  "data-pygmalion-source-ref-select": "",
1875
- onChange: (b) => {
1876
- const O = b.target.value;
1875
+ onChange: (w) => {
1876
+ const O = w.target.value;
1877
1877
  if (!O) {
1878
- I && r(I);
1878
+ x && r(x);
1879
1879
  return;
1880
1880
  }
1881
- O && O !== I && r(O);
1881
+ O && O !== x && r(O);
1882
1882
  },
1883
1883
  style: {
1884
1884
  position: "absolute",
@@ -1894,27 +1894,27 @@ function vn({
1894
1894
  margin: 0
1895
1895
  },
1896
1896
  children: [
1897
- I ? /* @__PURE__ */ $("option", { value: "", children: [
1897
+ x ? /* @__PURE__ */ $("option", { value: "", children: [
1898
1898
  u,
1899
1899
  " · ",
1900
- I,
1901
- M ? ` · ${D ?? "unknown"} → ${(m == null ? void 0 : m.commit) ?? "latest"}` : ""
1900
+ x,
1901
+ M ? ` · ${D ?? "unknown"} → ${(p == null ? void 0 : p.commit) ?? "latest"}` : ""
1902
1902
  ] }) : null,
1903
- I && !P.has(I) ? /* @__PURE__ */ v("option", { value: I, children: I }) : null,
1903
+ x && !I.has(x) ? /* @__PURE__ */ b("option", { value: x, children: x }) : null,
1904
1904
  a ? /* @__PURE__ */ $("option", { value: a, children: [
1905
1905
  a,
1906
1906
  " · uncommitted work"
1907
1907
  ] }) : null,
1908
- w.local.length > 0 ? /* @__PURE__ */ v("optgroup", { label: "local", children: w.local.map((b) => /* @__PURE__ */ $("option", { value: b.name, children: [
1909
- b.name,
1908
+ y.local.length > 0 ? /* @__PURE__ */ b("optgroup", { label: "local", children: y.local.map((w) => /* @__PURE__ */ $("option", { value: w.name, children: [
1909
+ w.name,
1910
1910
  " · ",
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,
1911
+ w.commit
1912
+ ] }, w.fullName)) }) : null,
1913
+ y.remote.length > 0 ? /* @__PURE__ */ b("optgroup", { label: "remote", children: y.remote.map((w) => /* @__PURE__ */ $("option", { value: w.name, children: [
1914
+ w.name,
1915
1915
  " · ",
1916
- b.commit
1917
- ] }, b.fullName)) }) : null
1916
+ w.commit
1917
+ ] }, w.fullName)) }) : null
1918
1918
  ]
1919
1919
  }
1920
1920
  )
@@ -1922,20 +1922,20 @@ function vn({
1922
1922
  }
1923
1923
  );
1924
1924
  }
1925
- const Sn = {
1925
+ const In = {
1926
1926
  editor: V,
1927
- getObserverTree: tt,
1928
- isObservableProp: et
1927
+ getObserverTree: et,
1928
+ isObservableProp: Ze
1929
1929
  };
1930
- function In(e) {
1930
+ function xn(e) {
1931
1931
  V.navigateToPageByName(e);
1932
1932
  }
1933
- function xn() {
1933
+ function Pn() {
1934
1934
  V.openPreview();
1935
1935
  }
1936
- function Pn() {
1937
- const e = De.entries.length > 0;
1938
- return e && De.discardPending(), V.resetCurrentEdits() || e;
1936
+ function Cn() {
1937
+ const e = $e.entries.length > 0;
1938
+ return e && $e.discardPending(), V.resetCurrentEdits() || e;
1939
1939
  }
1940
1940
  function En({
1941
1941
  registry: e,
@@ -1948,26 +1948,28 @@ function En({
1948
1948
  onTokensChange: d,
1949
1949
  appOrigin: u,
1950
1950
  previewRevision: h,
1951
- previewCacheNamespace: p,
1952
- previewArtifacts: w,
1953
- previewArtifactEndpoint: P,
1954
- previewConcurrency: I,
1955
- previewOpen: m,
1956
- onPreviewOpenChange: E,
1951
+ previewCacheNamespace: m,
1952
+ previewArtifacts: y,
1953
+ previewArtifactEndpoint: I,
1954
+ previewConcurrency: x,
1955
+ previewOpen: p,
1956
+ onPreviewOpenChange: C,
1957
1957
  flowCanvas: f,
1958
1958
  onApply: M,
1959
1959
  onDesignChange: D,
1960
- onInspectApply: b,
1960
+ onInspectApply: w,
1961
1961
  onInspectPreview: O,
1962
- onInspectImpact: Y,
1962
+ onInspectImpact: Z,
1963
1963
  storyboardDiscovery: S = !0,
1964
- storyboardDiscoveryEndpoint: C = wt
1964
+ storyboardDiscoveryEndpoint: N = bt
1965
1965
  }) {
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(
1966
+ const [F, _] = ce(!S), [J, se] = ce();
1967
+ a && (a.assertComplete(), tt(a));
1968
+ const ie = e ?? (a == null ? void 0 : a.getRegistry()), ee = t ?? (a == null ? void 0 : a.getTokens()), K = o ?? (a == null ? void 0 : a.getInitialPages());
1969
+ ie && nt(ie), rt(r ?? []), ee && ot(ee), n && st(n), xt(d ?? null), it(m), at(
1970
+ !!(I != null && I.trim())
1971
+ );
1972
+ const Q = J ?? y, B = oe(
1971
1973
  () => (K ?? []).flatMap(
1972
1974
  (i) => i.route && i.importPageId ? [
1973
1975
  {
@@ -1983,8 +1985,8 @@ function En({
1983
1985
  ] : []
1984
1986
  ),
1985
1987
  [K]
1986
- ), L = h ?? vt(), ee = u ?? ke(), j = xe([]), W = re(
1987
- () => U.map((i) => ({
1988
+ ), L = h ?? vt(), te = u ?? Oe(), X = Ie([]), W = oe(
1989
+ () => B.map((i) => ({
1988
1990
  id: i.canonicalId,
1989
1991
  fingerprint: ct(
1990
1992
  i,
@@ -1992,19 +1994,19 @@ function En({
1992
1994
  be()
1993
1995
  )
1994
1996
  })),
1995
- [U, L, F]
1997
+ [B, L, F]
1996
1998
  );
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 ?? "",
1999
+ return X.current = W, x != null && lt(x), Pt(C ?? null), f != null && dt(f), Ct(M ?? null), Et(w ?? null), ut(O ?? null), Nt(Z ?? null), K && V.initPagesFromComponents(K), Fe(() => {
2000
+ u != null && ft(u), h != null && mt(h), pt(s ?? []);
2001
+ }, [u, s, h]), Fe(() => {
2002
+ !Q || !K || !F || Ne(Q, {
2003
+ namespace: m ?? "",
2002
2004
  previewRevision: L,
2003
- appOrigin: ee,
2005
+ appOrigin: te,
2004
2006
  baselineEnvironment: be(),
2005
- allowStaleIdentity: !!P,
2007
+ allowStaleIdentity: !!I,
2006
2008
  allowMatchingFrameIdentity: J != null,
2007
- pages: U.map((i, c) => {
2009
+ pages: B.map((i, c) => {
2008
2010
  var l;
2009
2011
  return {
2010
2012
  ...i,
@@ -2015,169 +2017,161 @@ function En({
2015
2017
  }, [
2016
2018
  Q,
2017
2019
  W,
2018
- U,
2019
- P,
2020
- p,
2020
+ B,
2021
+ I,
2022
+ m,
2021
2023
  J,
2022
- ee,
2024
+ te,
2023
2025
  K,
2024
2026
  L,
2025
2027
  F
2026
- ]), ae(() => {
2027
- Fe(D ?? null);
2028
+ ]), le(() => {
2029
+ De(D ?? null);
2028
2030
  const i = gt(V);
2029
2031
  return () => {
2030
- i(), Fe(null);
2032
+ i(), De(null);
2031
2033
  };
2032
- }, [D]), ae(() => {
2033
- if (oe(void 0), !F || !P || !(p != null && p.trim()) || !(h != null && h.trim()))
2034
+ }, [D]), le(() => {
2035
+ if (se(void 0), !F || !I || !(m != null && m.trim()) || !(h != null && h.trim()))
2034
2036
  return;
2035
2037
  const i = new AbortController(), c = ht({
2036
- endpoint: P,
2038
+ endpoint: I,
2037
2039
  captureBaseUrl: u
2038
- }), l = yt(h), g = (N) => {
2039
- Me(N, {
2040
- namespace: p,
2040
+ }), l = yt(h), g = (E) => {
2041
+ Ne(E, {
2042
+ namespace: m,
2041
2043
  previewRevision: h,
2042
- appOrigin: ke(),
2044
+ appOrigin: Oe(),
2043
2045
  baselineEnvironment: be(),
2044
2046
  allowStaleIdentity: !0,
2045
2047
  allowMatchingFrameIdentity: !0,
2046
- pages: U.map((y, A) => {
2047
- var _;
2048
+ pages: B.map((v, R) => {
2049
+ var T;
2048
2050
  return {
2049
- ...y,
2050
- fingerprint: (_ = W[A]) == null ? void 0 : _.fingerprint
2051
+ ...v,
2052
+ fingerprint: (T = W[R]) == null ? void 0 : T.fingerprint
2051
2053
  };
2052
2054
  })
2053
- }), oe(N);
2054
- }, x = (N, y, A) => St({
2055
- namespace: p,
2055
+ }), se(E);
2056
+ }, P = (E, v, R) => It({
2057
+ namespace: m,
2056
2058
  sourceRevision: l,
2057
2059
  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)))
2060
+ signal: R,
2061
+ ...E.length ? { frames: E } : {},
2062
+ ...v ? {} : { generate: !1 }
2063
+ }), A = (E, v) => {
2064
+ const R = new Set(v);
2065
+ return E.filter((T) => R.has(T.id));
2066
+ }, k = (E, v) => E instanceof Error && E.message ? E.message : v, q = new AbortController();
2067
+ if (Re(async (E) => {
2068
+ var R, T, G;
2069
+ const v = await P(E, !0, q.signal);
2070
+ if (v.status === "accepted") {
2071
+ g(v.artifact);
2072
+ const ae = new Set(((R = v.frameResolution) == null ? void 0 : R.exact) ?? []);
2073
+ if (E.every((we) => ae.has(we.id)))
2072
2074
  return { status: "accepted" };
2073
- const ce = [
2074
- ...((_ = y.frameResolution) == null ? void 0 : _.missing) ?? [],
2075
- ...((G = y.frameResolution) == null ? void 0 : G.stale) ?? []
2075
+ const U = [
2076
+ ...((T = v.frameResolution) == null ? void 0 : T.missing) ?? [],
2077
+ ...((G = v.frameResolution) == null ? void 0 : G.stale) ?? []
2076
2078
  ];
2077
2079
  return {
2078
2080
  status: "unavailable",
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."
2081
+ message: U.length ? `The exact preview endpoint did not return a current capture for ${U.join(", ")}.` : "The exact preview endpoint returned no current capture."
2080
2082
  };
2081
2083
  }
2082
- return y.status === "rejected" ? {
2084
+ return v.status === "rejected" ? {
2083
2085
  status: "rejected",
2084
- message: y.errors.join(" ") || "The preview artifact was rejected."
2086
+ message: v.errors.join(" ") || "The preview artifact was rejected."
2085
2087
  } : {
2086
2088
  status: "unavailable",
2087
2089
  message: k(
2088
- y.error,
2090
+ v.error,
2089
2091
  "The exact preview endpoint is unavailable."
2090
2092
  )
2091
2093
  };
2092
- }), j.current.length) {
2093
- const N = j.current.filter((y) => {
2094
- const A = ve(
2095
- y.id,
2096
- y.fingerprint
2094
+ }), X.current.length) {
2095
+ const E = X.current.filter((R) => {
2096
+ const T = Ae(
2097
+ R.id,
2098
+ R.fingerprint
2097
2099
  ).status;
2098
- return A !== "exact" && A !== "generating";
2100
+ return T !== "exact" && T !== "generating";
2099
2101
  });
2100
- de(N, { status: "checking" }), x(
2101
- j.current,
2102
- !1,
2103
- i.signal
2104
- ).then((y) => {
2105
- var G, fe, ce;
2106
- if (i.signal.aborted) return;
2107
- const A = (le) => le.filter((Re) => {
2108
- const Ae = ve(
2109
- Re.id,
2110
- Re.fingerprint
2111
- ).status;
2112
- return Ae !== "generating" && Ae !== "exact";
2113
- });
2114
- if (y.status === "accepted") {
2115
- g(y.artifact), de(
2116
- R(
2117
- j.current,
2118
- ((G = y.frameResolution) == null ? void 0 : G.exact) ?? []
2119
- ),
2120
- { status: "exact" }
2102
+ de(E, { status: "checking" });
2103
+ const v = (R) => R.filter((T) => {
2104
+ const G = Ae(
2105
+ T.id,
2106
+ T.fingerprint
2107
+ ).status;
2108
+ return G !== "generating" && G !== "exact";
2109
+ });
2110
+ (async () => {
2111
+ var R, T, G;
2112
+ for (const ae of wt(E)) {
2113
+ const U = await P(
2114
+ ae,
2115
+ !1,
2116
+ i.signal
2121
2117
  );
2122
- const le = R(j.current, [
2123
- ...((fe = y.frameResolution) == null ? void 0 : fe.missing) ?? [],
2124
- ...((ce = y.frameResolution) == null ? void 0 : ce.stale) ?? []
2125
- ]);
2126
- de(A(le), {
2127
- status: "outdated",
2128
- message: "Select this frame to generate the exact preview."
2118
+ if (i.signal.aborted) return;
2119
+ if (U.status === "accepted") {
2120
+ g(U.artifact), de(
2121
+ A(ae, ((R = U.frameResolution) == null ? void 0 : R.exact) ?? []),
2122
+ { status: "exact" }
2123
+ );
2124
+ const Xe = A(ae, [
2125
+ ...((T = U.frameResolution) == null ? void 0 : T.missing) ?? [],
2126
+ ...((G = U.frameResolution) == null ? void 0 : G.stale) ?? []
2127
+ ]);
2128
+ de(v(Xe), {
2129
+ status: "outdated",
2130
+ message: "Select this frame to generate the exact preview."
2131
+ });
2132
+ continue;
2133
+ }
2134
+ const we = U.status === "rejected" ? U.errors.join(" ") || "The preview artifact was rejected." : k(
2135
+ U.error,
2136
+ "The exact preview endpoint is unavailable."
2137
+ );
2138
+ de(v(ae), {
2139
+ status: "error",
2140
+ reason: U.status === "rejected" ? "rejected" : "unavailable",
2141
+ message: we
2129
2142
  });
2130
- return;
2131
2143
  }
2132
- const _ = y.status === "rejected" ? y.errors.join(" ") || "The preview artifact was rejected." : k(
2133
- y.error,
2134
- "The exact preview endpoint is unavailable."
2135
- );
2136
- de(
2137
- A(j.current),
2138
- {
2139
- status: "error",
2140
- reason: y.status === "rejected" ? "rejected" : "unavailable",
2141
- message: _
2142
- }
2143
- );
2144
- }).catch((y) => {
2144
+ })().catch((R) => {
2145
2145
  if (i.signal.aborted) return;
2146
- const A = j.current.filter((_) => {
2147
- const G = ve(
2148
- _.id,
2149
- _.fingerprint
2150
- ).status;
2151
- return G !== "generating" && G !== "exact";
2152
- });
2153
- de(A, {
2146
+ const T = v(E);
2147
+ de(T, {
2154
2148
  status: "error",
2155
2149
  reason: "unavailable",
2156
2150
  message: k(
2157
- y,
2151
+ R,
2158
2152
  "The exact preview endpoint is unavailable."
2159
2153
  )
2160
2154
  });
2161
2155
  });
2162
2156
  }
2163
2157
  return () => {
2164
- $e(null), q.abort(), i.abort();
2158
+ Re(null), q.abort(), i.abort();
2165
2159
  };
2166
2160
  }, [
2167
- P,
2168
- p,
2161
+ I,
2162
+ m,
2169
2163
  h,
2170
2164
  u,
2171
2165
  F
2172
- ]), ae(() => {
2166
+ ]), le(() => {
2173
2167
  let i = !0;
2174
2168
  if (!S)
2175
- return ue(void 0), z(!0), () => {
2169
+ return ue(void 0), _(!0), () => {
2176
2170
  i = !1;
2177
2171
  };
2178
2172
  const c = new AbortController();
2179
- return z(!1), ue(void 0), ne(null), Je({
2180
- endpoint: C,
2173
+ return _(!1), ue(void 0), re(null), We({
2174
+ endpoint: N,
2181
2175
  signal: c.signal,
2182
2176
  pages: V.pages.map((l) => ({
2183
2177
  ...l,
@@ -2186,22 +2180,22 @@ function En({
2186
2180
  })),
2187
2181
  assets: (a == null ? void 0 : a.getAssets("screens")) ?? []
2188
2182
  }).then((l) => {
2189
- i && (ue(l.baselineEnvironment), Oe(l.manifest.routes ?? null), ne(l.graph));
2183
+ i && (ue(l.baselineEnvironment), Me(l.manifest.routes ?? null), re(l.graph));
2190
2184
  }).catch(() => {
2191
- i && (ue(void 0), Oe(null), ne(null));
2185
+ i && (ue(void 0), Me(null), re(null));
2192
2186
  }).finally(() => {
2193
- i && z(!0);
2187
+ i && _(!0);
2194
2188
  }), () => {
2195
- i = !1, c.abort(), ue(void 0), ne(null);
2189
+ i = !1, c.abort(), ue(void 0), re(null);
2196
2190
  };
2197
2191
  }, [
2198
2192
  a,
2199
2193
  o,
2200
2194
  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(
2195
+ N
2196
+ ]), le(() => {
2197
+ p == null || p === V.previewOpen || (p ? V.openPreview({ notifyHost: !1 }) : V.closePreview({ notifyHost: !1 }));
2198
+ }, [p]), F ? /* @__PURE__ */ b(St, {}) : /* @__PURE__ */ b(
2205
2199
  "div",
2206
2200
  {
2207
2201
  "data-pygmalion-storyboard-loading": "",
@@ -2220,84 +2214,84 @@ function En({
2220
2214
  );
2221
2215
  }
2222
2216
  export {
2223
- Rn as DEFAULT_DESIGN_COMPILE_LIMITS,
2224
- An as DESIGN_IMPORT_KINDS,
2225
- Mn as DESIGN_IR_SCHEMA,
2226
- $n as DESIGN_IR_VERSION,
2227
- mn as PygmalionCatalogDocument,
2228
- hn as PygmalionCatalogMatrix,
2229
- gn as PygmalionCatalogSection,
2217
+ An as DEFAULT_DESIGN_COMPILE_LIMITS,
2218
+ Mn as DESIGN_IMPORT_KINDS,
2219
+ $n as DESIGN_IR_SCHEMA,
2220
+ On as DESIGN_IR_VERSION,
2221
+ gn as PygmalionCatalogDocument,
2222
+ yn as PygmalionCatalogMatrix,
2223
+ hn as PygmalionCatalogSection,
2230
2224
  En as PygmalionEditor,
2231
- wt as STORYBOARD_ENVIRONMENT_CONTROL,
2232
- On as STORYBOARD_ENVIRONMENT_QUERY,
2225
+ bt as STORYBOARD_ENVIRONMENT_CONTROL,
2226
+ Dn as STORYBOARD_ENVIRONMENT_QUERY,
2233
2227
  vn as SourceRefControl,
2234
- Sn as __debug,
2235
- Dn as applyTokenOverride,
2236
- St as bootstrapPreviewArtifact,
2237
- kn as clearPreviewEnvironmentControlValues,
2238
- Fn as clearPygmalionPreviewCache,
2239
- Tn as compileDesignDocument,
2240
- wn as createDesignComponentCatalog,
2241
- Yt as createDesignComponentVariantMatrix,
2242
- yn as createDesignGalleryCatalog,
2243
- zn as createDesignImportController,
2244
- _n as createDesignIntermediateDocument,
2245
- jn as createDesignScreenCollection,
2228
+ In as __debug,
2229
+ kn as applyTokenOverride,
2230
+ It as bootstrapPreviewArtifact,
2231
+ Fn as clearPreviewEnvironmentControlValues,
2232
+ Tn as clearPygmalionPreviewCache,
2233
+ zn as compileDesignDocument,
2234
+ bn as createDesignComponentCatalog,
2235
+ Zt as createDesignComponentVariantMatrix,
2236
+ wn as createDesignGalleryCatalog,
2237
+ _n as createDesignImportController,
2238
+ jn as createDesignIntermediateDocument,
2239
+ Bn as createDesignScreenCollection,
2246
2240
  ht as createPreviewArtifactHttpTransport,
2247
- Bn as createPreviewCacheNamespace,
2248
- Un as createPreviewFrameFingerprint,
2249
- Hn as createPreviewRecipeFingerprint,
2250
- qn as createStoryboardCaptureRecipeIdentity,
2251
- Mt as createStoryboardGraph,
2252
- Lt as createStoryboardGraphFromDiscovery,
2253
- Gn as createStoryboardGraphViewModel,
2254
- Kn as createStoryboardRouteUrl,
2255
- Jt as designCatalogKey,
2256
- Qe as designCatalogRegistryName,
2257
- Ln as enumerateDesignComponentConnectionCases,
2258
- Wn as expandDesignScreenCasesViewports,
2259
- Vn as expandDesignScreenCollectionViewports,
2260
- Jn as getDesignCodegenAdapters,
2261
- Qn as getDesignComponentConnection,
2262
- Xn as getDesignComponentConnectionForComponent,
2263
- Yn as getDesignComponentConnections,
2264
- Zn as getPreviewEnvironmentControlValue,
2265
- er as getPreviewEnvironmentControls,
2266
- tr as getPreviewEnvironmentOverride,
2267
- nr as getRecommendedPygmalionPreviewConcurrency,
2241
+ Un as createPreviewCacheNamespace,
2242
+ Hn as createPreviewFrameFingerprint,
2243
+ qn as createPreviewRecipeFingerprint,
2244
+ Gn as createStoryboardCaptureRecipeIdentity,
2245
+ $t as createStoryboardGraph,
2246
+ Wt as createStoryboardGraphFromDiscovery,
2247
+ Kn as createStoryboardGraphViewModel,
2248
+ Ln as createStoryboardRouteUrl,
2249
+ Qt as designCatalogKey,
2250
+ Ve as designCatalogRegistryName,
2251
+ Wn as enumerateDesignComponentConnectionCases,
2252
+ Vn as expandDesignScreenCasesViewports,
2253
+ Jn as expandDesignScreenCollectionViewports,
2254
+ Qn as getDesignCodegenAdapters,
2255
+ Xn as getDesignComponentConnection,
2256
+ Yn as getDesignComponentConnectionForComponent,
2257
+ Zn as getDesignComponentConnections,
2258
+ er as getPreviewEnvironmentControlValue,
2259
+ tr as getPreviewEnvironmentControls,
2260
+ nr as getPreviewEnvironmentOverride,
2261
+ rr as getRecommendedPygmalionPreviewConcurrency,
2268
2262
  be as getStoryboardBaselineEnvironment,
2269
- Ve as getStoryboardDiscoveryBaselineEnvironment,
2270
- rr as getStoryboardGraph,
2271
- or as getViewportPresets,
2272
- Je as loadStoryboardDiscovery,
2273
- sr as mergeScreenPresets,
2274
- Ze as mergeStoryboardEnvironment,
2263
+ Le as getStoryboardDiscoveryBaselineEnvironment,
2264
+ or as getStoryboardGraph,
2265
+ sr as getViewportPresets,
2266
+ We as loadStoryboardDiscovery,
2267
+ ir as mergeScreenPresets,
2268
+ Ye as mergeStoryboardEnvironment,
2275
2269
  pn as publishStoryboardDiscovery,
2276
- In as pygmalionNavigate,
2277
- xn as pygmalionOpenPreview,
2278
- Pn as pygmalionResetCurrentEdits,
2279
- ir as reconstructRoutePreviewArtifactScreenshotV3,
2280
- ar as reconstructRoutePreviewArtifactSnapshotV3,
2281
- cr as registerDesignCodegenAdapter,
2282
- lr as resetTokenOverrides,
2283
- dr as resolvePreviewArtifactFrames,
2284
- Tt as resolveStoryboardScreenCases,
2285
- rt as setComponentRegistry,
2286
- ot as setDesignComponentConnections,
2287
- ur as setPreviewEnvironmentControlValue,
2288
- mt as setPreviewEnvironmentControls,
2270
+ xn as pygmalionNavigate,
2271
+ Pn as pygmalionOpenPreview,
2272
+ Cn as pygmalionResetCurrentEdits,
2273
+ ar as reconstructRoutePreviewArtifactScreenshotV3,
2274
+ cr as reconstructRoutePreviewArtifactSnapshotV3,
2275
+ lr as registerDesignCodegenAdapter,
2276
+ dr as resetTokenOverrides,
2277
+ ur as resolvePreviewArtifactFrames,
2278
+ zt as resolveStoryboardScreenCases,
2279
+ nt as setComponentRegistry,
2280
+ rt as setDesignComponentConnections,
2281
+ fr as setPreviewEnvironmentControlValue,
2282
+ pt as setPreviewEnvironmentControls,
2289
2283
  ft as setPygmalionAppOrigin,
2290
2284
  lt as setPygmalionPreviewConcurrency,
2291
- pt as setPygmalionPreviewRevision,
2285
+ mt as setPygmalionPreviewRevision,
2292
2286
  ue as setStoryboardBaselineEnvironment,
2293
- ne as setStoryboardGraph,
2294
- st as setTokens,
2295
- it as setViewportPresets,
2296
- Nt as storyboardScreenRecipeKey,
2297
- fr as subscribePreviewEnvironmentControls,
2287
+ re as setStoryboardGraph,
2288
+ ot as setTokens,
2289
+ st as setViewportPresets,
2290
+ Rt as storyboardScreenRecipeKey,
2291
+ mr as subscribePreviewEnvironmentControls,
2298
2292
  pr as subscribeStoryboardGraph,
2299
- bn as usePygmalionProject,
2300
- mr as validateDesignComponentConnections,
2301
- gr as validatePreviewArtifactBundle,
2302
- hr as validateRoutePreviewArtifactV3Browser
2293
+ Sn as usePygmalionProject,
2294
+ gr as validateDesignComponentConnections,
2295
+ hr as validatePreviewArtifactBundle,
2296
+ yr as validateRoutePreviewArtifactV3Browser
2303
2297
  };