@lumencast/runtime 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/animate/keyframes.js +8 -1
  3. package/dist/animate/keyframes.js.map +1 -1
  4. package/dist/app.d.ts +4 -1
  5. package/dist/app.d.ts.map +1 -1
  6. package/dist/app.js +2 -1
  7. package/dist/app.js.map +1 -1
  8. package/dist/{broadcast-DUYqvcgo.js → broadcast-ryjLRD5q.js} +3 -3
  9. package/dist/{broadcast-DUYqvcgo.js.map → broadcast-ryjLRD5q.js.map} +1 -1
  10. package/dist/{control-CL8TWXaE.js → control-AgxbXOVS.js} +4 -4
  11. package/dist/{control-CL8TWXaE.js.map → control-AgxbXOVS.js.map} +1 -1
  12. package/dist/{index-C6viWFcT.js → index-DrXsLYhe.js} +309 -212
  13. package/dist/index-DrXsLYhe.js.map +1 -0
  14. package/dist/index.d.ts +4 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.html +1 -1
  17. package/dist/index.js +13 -0
  18. package/dist/index.js.map +1 -1
  19. package/dist/lumencast.js +14 -9
  20. package/dist/mount.d.ts.map +1 -1
  21. package/dist/mount.js +5 -0
  22. package/dist/mount.js.map +1 -1
  23. package/dist/overlay/runtime-context.d.ts +11 -0
  24. package/dist/overlay/runtime-context.d.ts.map +1 -1
  25. package/dist/overlay/runtime-context.js +8 -0
  26. package/dist/overlay/runtime-context.js.map +1 -1
  27. package/dist/render/asset-resolve.d.ts +27 -0
  28. package/dist/render/asset-resolve.d.ts.map +1 -0
  29. package/dist/render/asset-resolve.js +86 -0
  30. package/dist/render/asset-resolve.js.map +1 -0
  31. package/dist/render/bundle.d.ts +1 -1
  32. package/dist/render/bundle.d.ts.map +1 -1
  33. package/dist/render/bundle.js +4 -0
  34. package/dist/render/bundle.js.map +1 -1
  35. package/dist/render/headless.d.ts +39 -0
  36. package/dist/render/headless.d.ts.map +1 -0
  37. package/dist/render/headless.js +83 -0
  38. package/dist/render/headless.js.map +1 -0
  39. package/dist/render/keyframe-player.d.ts.map +1 -1
  40. package/dist/render/keyframe-player.js +15 -1
  41. package/dist/render/keyframe-player.js.map +1 -1
  42. package/dist/render/primitives/capture.d.ts +40 -0
  43. package/dist/render/primitives/capture.d.ts.map +1 -0
  44. package/dist/render/primitives/capture.js +171 -0
  45. package/dist/render/primitives/capture.js.map +1 -0
  46. package/dist/render/primitives/index.d.ts.map +1 -1
  47. package/dist/render/primitives/index.js +3 -0
  48. package/dist/render/primitives/index.js.map +1 -1
  49. package/dist/render/primitives/media.d.ts +11 -2
  50. package/dist/render/primitives/media.d.ts.map +1 -1
  51. package/dist/render/primitives/media.js +14 -3
  52. package/dist/render/primitives/media.js.map +1 -1
  53. package/dist/render/prop-allowlist.d.ts.map +1 -1
  54. package/dist/render/prop-allowlist.js +5 -0
  55. package/dist/render/prop-allowlist.js.map +1 -1
  56. package/dist/{status-pill-jJT54n07.js → status-pill-BxCdj-KZ.js} +2 -2
  57. package/dist/{status-pill-jJT54n07.js.map → status-pill-BxCdj-KZ.js.map} +1 -1
  58. package/dist/{test-84XodL1c.js → test-CaRHj_J6.js} +4 -4
  59. package/dist/{test-84XodL1c.js.map → test-CaRHj_J6.js.map} +1 -1
  60. package/dist/{tree-BIimahCf.js → tree-BLIxJbD3.js} +515 -432
  61. package/dist/tree-BLIxJbD3.js.map +1 -0
  62. package/dist/types.d.ts +10 -0
  63. package/dist/types.d.ts.map +1 -1
  64. package/package.json +6 -5
  65. package/src/animate/keyframes.ts +8 -1
  66. package/src/app.tsx +5 -0
  67. package/src/index.ts +29 -0
  68. package/src/mount.ts +5 -0
  69. package/src/overlay/runtime-context.tsx +14 -0
  70. package/src/render/asset-resolve.ts +97 -0
  71. package/src/render/bundle.ts +9 -1
  72. package/src/render/headless.tsx +129 -0
  73. package/src/render/keyframe-player.tsx +14 -1
  74. package/src/render/primitives/capture.tsx +210 -0
  75. package/src/render/primitives/index.ts +3 -0
  76. package/src/render/primitives/media.tsx +14 -3
  77. package/src/render/prop-allowlist.ts +5 -0
  78. package/src/types.ts +10 -0
  79. package/dist/index-C6viWFcT.js.map +0 -1
  80. package/dist/tree-BIimahCf.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { jsx as f, jsxs as G, Fragment as J } from "react/jsx-runtime";
2
- import { useSignals as wt } from "@preact/signals-react/runtime";
3
- import { motion as I, useMotionValue as B, useTransform as pe, animate as At } from "framer-motion";
4
- import { createContext as rt, useContext as K, useRef as mt, useEffect as qt, useState as he, useMemo as Gt } from "react";
5
- import { e as S, r as it, m as ot, t as Q, s as ge, w as Yt, F as me, c as Ft, a as Xt } from "./index-C6viWFcT.js";
6
- import { checkHostAllowed as It } from "@lumencast/protocol";
7
- import { effect as ye } from "@preact/signals-react";
8
- function be({ resolved: t, children: e, establishesContainingBlock: n }) {
9
- const i = t.direction ?? "vertical", r = _t(t.gap, 0), s = t.wrap === !0, o = _t(t.crossGap, 0), a = t.align ?? "stretch", l = t.justify ?? "flex-start", c = i === "horizontal", u = {
2
+ import { useSignals as vt } from "@preact/signals-react/runtime";
3
+ import { motion as I, useMotionValue as B, useTransform as ye, animate as _t } from "framer-motion";
4
+ import { createContext as st, useContext as U, useRef as it, useState as Ut, useEffect as ot, useMemo as Kt } from "react";
5
+ import { e as S, r as at, m as lt, t as Q, a as be, s as ke, w as Vt, F as we, c as jt, b as Zt } from "./index-DrXsLYhe.js";
6
+ import { checkHostAllowed as Jt } from "@lumencast/protocol";
7
+ import { effect as xe } from "@preact/signals-react";
8
+ function ve({ resolved: t, children: e, establishesContainingBlock: n }) {
9
+ const i = t.direction ?? "vertical", r = Tt(t.gap, 0), s = t.wrap === !0, o = Tt(t.crossGap, 0), a = t.align ?? "stretch", l = t.justify ?? "flex-start", c = i === "horizontal", u = {
10
10
  display: "flex",
11
11
  flexDirection: c ? "row" : "column",
12
12
  alignItems: a,
@@ -18,10 +18,10 @@ function be({ resolved: t, children: e, establishesContainingBlock: n }) {
18
18
  };
19
19
  return s ? (u.flexWrap = "wrap", c ? (u.columnGap = r, u.rowGap = o) : (u.rowGap = r, u.columnGap = o)) : u.gap = r, /* @__PURE__ */ f("div", { style: u, children: e });
20
20
  }
21
- function _t(t, e) {
21
+ function Tt(t, e) {
22
22
  return typeof t == "number" && Number.isFinite(t) ? t : e;
23
23
  }
24
- function ke({ resolved: t, children: e, establishesContainingBlock: n }) {
24
+ function $e({ resolved: t, children: e, establishesContainingBlock: n }) {
25
25
  const i = t.cols ?? "1fr", r = t.rows ?? "auto", s = t.gap ?? 0;
26
26
  return /* @__PURE__ */ f(
27
27
  "div",
@@ -39,22 +39,22 @@ function ke({ resolved: t, children: e, establishesContainingBlock: n }) {
39
39
  }
40
40
  );
41
41
  }
42
- const we = 64, xe = /^[#a-zA-Z0-9(),.% ]{1,64}$/, $e = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, W = String.raw`\d{1,3}(?:\.\d{1,4})?`, Kt = String.raw`(?:0|1|0?\.\d{1,4}|${W}%)`, R = String.raw`[ ]{0,4}`, ve = new RegExp(
43
- `^rgba?\\(${R}(${W})(%?)${R},${R}(${W})(%?)${R},${R}(${W})(%?)${R}(?:,${R}${Kt}${R})?\\)$`
44
- ), Se = new RegExp(
45
- `^hsla?\\(${R}(${W})(?:deg)?${R},${R}(${W})%${R},${R}(${W})%${R}(?:,${R}${Kt}${R})?\\)$`
46
- ), Me = new Set(
42
+ const Se = 64, Me = /^[#a-zA-Z0-9(),.% ]{1,64}$/, Ae = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, W = String.raw`\d{1,3}(?:\.\d{1,4})?`, Qt = String.raw`(?:0|1|0?\.\d{1,4}|${W}%)`, _ = String.raw`[ ]{0,4}`, Fe = new RegExp(
43
+ `^rgba?\\(${_}(${W})(%?)${_},${_}(${W})(%?)${_},${_}(${W})(%?)${_}(?:,${_}${Qt}${_})?\\)$`
44
+ ), Re = new RegExp(
45
+ `^hsla?\\(${_}(${W})(?:deg)?${_},${_}(${W})%${_},${_}(${W})%${_}(?:,${_}${Qt}${_})?\\)$`
46
+ ), _e = new Set(
47
47
  "aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkgrey darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkslategrey darkturquoise darkviolet deeppink deepskyblue dimgray dimgrey dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow grey honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgray lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightslategrey lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple rebeccapurple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray slategrey snow springgreen steelblue tan teal thistle tomato turquoise violet wheat white whitesmoke yellow yellowgreen transparent currentcolor".split(" ")
48
48
  );
49
49
  function E(t) {
50
50
  if (typeof t != "string") return null;
51
51
  const e = t.trim();
52
- if (e.length === 0 || e.length > we) return null;
52
+ if (e.length === 0 || e.length > Se) return null;
53
53
  const n = e.toLowerCase();
54
- if (n.includes("url(") || e.includes(";") || e.includes("}") || !xe.test(e)) return null;
55
- if (e.startsWith("#")) return $e.test(e) ? e : null;
54
+ if (n.includes("url(") || e.includes(";") || e.includes("}") || !Me.test(e)) return null;
55
+ if (e.startsWith("#")) return Ae.test(e) ? e : null;
56
56
  if (n.startsWith("rgb")) {
57
- const i = ve.exec(n);
57
+ const i = Fe.exec(n);
58
58
  if (!i) return null;
59
59
  const r = [i[2], i[4], i[6]];
60
60
  if (!(r.every((o) => o === "%") || r.every((o) => o === ""))) return null;
@@ -64,10 +64,10 @@ function E(t) {
64
64
  return n;
65
65
  }
66
66
  if (n.startsWith("hsl")) {
67
- const i = Se.exec(n);
67
+ const i = Re.exec(n);
68
68
  return !i || Number(i[1]) > 360 || Number(i[2]) > 100 || Number(i[3]) > 100 ? null : n;
69
69
  }
70
- return Me.has(n) ? n : null;
70
+ return _e.has(n) ? n : null;
71
71
  }
72
72
  function D(t, e) {
73
73
  S(
@@ -76,29 +76,29 @@ function D(t, e) {
76
76
  "rejected unsafe colour : not a strict hex/rgb()/hsl()/named colour"
77
77
  );
78
78
  }
79
- const Ut = rt(void 0);
80
- function nr({
79
+ const te = st(void 0);
80
+ function ur({
81
81
  hosts: t,
82
82
  children: e
83
83
  }) {
84
- return /* @__PURE__ */ f(Ut.Provider, { value: t, children: e });
84
+ return /* @__PURE__ */ f(te.Provider, { value: t, children: e });
85
85
  }
86
- function st() {
87
- return K(Ut);
86
+ function tt() {
87
+ return U(te);
88
88
  }
89
- function rr(t) {
89
+ function fr(t) {
90
90
  const n = t.assets?.allowedHosts;
91
91
  if (!Array.isArray(n)) return;
92
92
  const i = n.filter((r) => typeof r == "string");
93
93
  return i.length > 0 ? i : void 0;
94
94
  }
95
- function Vt(t, e, n, i) {
95
+ function $t(t, e, n, i) {
96
96
  if (typeof t != "string" || t.length === 0) return;
97
- const r = It(t, e);
97
+ const r = Jt(t, e);
98
98
  if (r.allowed) return t;
99
99
  S(i, n, r.reason ?? "asset host/scheme rejected");
100
100
  }
101
- const Ae = /* @__PURE__ */ new Set([
101
+ const je = /* @__PURE__ */ new Set([
102
102
  "normal",
103
103
  "multiply",
104
104
  "screen",
@@ -119,38 +119,38 @@ const Ae = /* @__PURE__ */ new Set([
119
119
  "plus-lighter"
120
120
  ]);
121
121
  function Y(t) {
122
- return typeof t == "string" && Ae.has(t) ? t : void 0;
122
+ return typeof t == "string" && je.has(t) ? t : void 0;
123
123
  }
124
- const Fe = /* @__PURE__ */ new Set(["cover", "contain", "fill", "none", "scale-down"]);
125
- function _e(t) {
126
- return typeof t == "string" && Fe.has(t) ? t : void 0;
124
+ const Te = /* @__PURE__ */ new Set(["cover", "contain", "fill", "none", "scale-down"]);
125
+ function Ce(t) {
126
+ return typeof t == "string" && Te.has(t) ? t : void 0;
127
127
  }
128
- let ct = 0;
129
- function Rt() {
130
- return ct = (ct + 1) % 1e6, `lumen-grad-${ct.toString(36)}`;
128
+ let ft = 0;
129
+ function Ct() {
130
+ return ft = (ft + 1) % 1e6, `lumen-grad-${ft.toString(36)}`;
131
131
  }
132
- function Re(t) {
132
+ function Oe(t) {
133
133
  const e = Y(t.blendMode);
134
134
  if (t.kind === "solid") {
135
- const a = t.opacity !== void 0 ? yt(t.color, t.opacity) : t.color;
135
+ const a = t.opacity !== void 0 ? kt(t.color, t.opacity) : t.color;
136
136
  return { defs: [], ref: a, mixBlendMode: e };
137
137
  }
138
138
  if (t.kind === "image") {
139
- const a = Rt(), l = je(t.objectFit);
139
+ const a = Ct(), l = Pe(t.objectFit);
140
140
  return { defs: [
141
141
  /* @__PURE__ */ f("pattern", { id: a, patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ f("image", { href: t.src, width: "1", height: "1", preserveAspectRatio: l }) }, a)
142
142
  ], ref: `url(#${a})`, mixBlendMode: e };
143
143
  }
144
- const n = Rt();
144
+ const n = Ct();
145
145
  if (t.kind === "linear-gradient") {
146
146
  let a, l, c, u;
147
147
  const d = t.transform;
148
148
  if (Array.isArray(d) && d.length === 6 && Number.isFinite(d[0]) && Number.isFinite(d[1])) {
149
- const h = Math.hypot(d[0], d[1]) || 1, g = d[0] / h, A = d[1] / h;
150
- a = 0.5 - 0.5 * g, l = 0.5 - 0.5 * A, c = 0.5 + 0.5 * g, u = 0.5 + 0.5 * A;
149
+ const g = Math.hypot(d[0], d[1]) || 1, m = d[0] / g, A = d[1] / g;
150
+ a = 0.5 - 0.5 * m, l = 0.5 - 0.5 * A, c = 0.5 + 0.5 * m, u = 0.5 + 0.5 * A;
151
151
  } else {
152
- const g = ((t.angle_deg ?? 0) - 90) * Math.PI / 180;
153
- a = 0.5 - 0.5 * Math.cos(g), l = 0.5 - 0.5 * Math.sin(g), c = 0.5 + 0.5 * Math.cos(g), u = 0.5 + 0.5 * Math.sin(g);
152
+ const m = ((t.angle_deg ?? 0) - 90) * Math.PI / 180;
153
+ a = 0.5 - 0.5 * Math.cos(m), l = 0.5 - 0.5 * Math.sin(m), c = 0.5 + 0.5 * Math.cos(m), u = 0.5 + 0.5 * Math.sin(m);
154
154
  }
155
155
  return { defs: [
156
156
  /* @__PURE__ */ f(
@@ -161,14 +161,14 @@ function Re(t) {
161
161
  y1: `${l * 100}%`,
162
162
  x2: `${c * 100}%`,
163
163
  y2: `${u * 100}%`,
164
- children: t.stops.map((h, g) => /* @__PURE__ */ f(
164
+ children: t.stops.map((g, m) => /* @__PURE__ */ f(
165
165
  "stop",
166
166
  {
167
- offset: h.offset,
168
- stopColor: h.color,
169
- ...h.opacity !== void 0 ? { stopOpacity: h.opacity } : {}
167
+ offset: g.offset,
168
+ stopColor: g.color,
169
+ ...g.opacity !== void 0 ? { stopOpacity: g.opacity } : {}
170
170
  },
171
- g
171
+ m
172
172
  ))
173
173
  },
174
174
  n
@@ -188,7 +188,7 @@ function Re(t) {
188
188
  )) }, n)
189
189
  ], ref: `url(#${n})`, mixBlendMode: e };
190
190
  }
191
- function Te(t) {
191
+ function Ne(t) {
192
192
  switch (t) {
193
193
  case "contain":
194
194
  case "scale-down":
@@ -202,7 +202,7 @@ function Te(t) {
202
202
  return "cover";
203
203
  }
204
204
  }
205
- function je(t) {
205
+ function Pe(t) {
206
206
  switch (t) {
207
207
  case "contain":
208
208
  case "scale-down":
@@ -216,29 +216,29 @@ function je(t) {
216
216
  return "xMidYMid slice";
217
217
  }
218
218
  }
219
- function Ne(t, e) {
219
+ function Ee(t, e) {
220
220
  const n = [], i = [];
221
221
  for (const a of t) {
222
- const l = Oe(a, e);
222
+ const l = Be(a, e);
223
223
  l && (i.push(l), n.push(a));
224
224
  }
225
225
  if (i.length === 0) return {};
226
226
  const r = { backgroundImage: i.join(", ") }, s = n.map((a) => Y(a.blendMode) ?? "normal");
227
227
  s.some((a) => a !== "normal") && (r.backgroundBlendMode = s.join(", "));
228
228
  const o = t.find((a) => a.kind === "image");
229
- return o && (r.backgroundSize = Te(o.objectFit), r.backgroundPosition = "center", r.backgroundRepeat = "no-repeat"), r;
229
+ return o && (r.backgroundSize = Ne(o.objectFit), r.backgroundPosition = "center", r.backgroundRepeat = "no-repeat"), r;
230
230
  }
231
- function Ce(t) {
231
+ function De(t) {
232
232
  return `url("${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}")`;
233
233
  }
234
- function Oe(t, e) {
234
+ function Be(t, e) {
235
235
  if (t.kind === "image")
236
- return Ce(t.src);
236
+ return De(t.src);
237
237
  if (t.kind === "solid") {
238
238
  const o = E(t.color);
239
239
  if (o === null)
240
240
  return D("fill.color", e), null;
241
- const a = t.opacity !== void 0 ? yt(o, t.opacity) : o;
241
+ const a = t.opacity !== void 0 ? kt(o, t.opacity) : o;
242
242
  return `linear-gradient(${a}, ${a})`;
243
243
  }
244
244
  const n = [];
@@ -246,7 +246,7 @@ function Oe(t, e) {
246
246
  const a = E(o.color);
247
247
  if (a === null)
248
248
  return D("fill.stops.color", e), null;
249
- const l = o.opacity !== void 0 ? yt(a, o.opacity) : a;
249
+ const l = o.opacity !== void 0 ? kt(a, o.opacity) : a;
250
250
  n.push(`${l} ${(o.offset * 100).toFixed(2)}%`);
251
251
  }
252
252
  const i = n.join(", ");
@@ -258,7 +258,7 @@ function Oe(t, e) {
258
258
  const r = (t.center?.x ?? 0.5) * 100, s = (t.center?.y ?? 0.5) * 100;
259
259
  return `radial-gradient(circle at ${r}% ${s}%, ${i})`;
260
260
  }
261
- function yt(t, e) {
261
+ function kt(t, e) {
262
262
  const n = t.match(/^#([0-9a-f]{6})$/i);
263
263
  if (n) {
264
264
  const i = Math.round(e * 255).toString(16).padStart(2, "0");
@@ -266,7 +266,7 @@ function yt(t, e) {
266
266
  }
267
267
  return `color-mix(in srgb, ${t} ${e * 100}%, transparent)`;
268
268
  }
269
- function Pe(t, e, n) {
269
+ function Le(t, e, n) {
270
270
  const i = [];
271
271
  for (const r of t) {
272
272
  if (r.kind === "image") {
@@ -296,16 +296,16 @@ function Pe(t, e, n) {
296
296
  }
297
297
  return i;
298
298
  }
299
- function Zt(t, e, n) {
299
+ function ee(t, e, n) {
300
300
  if (!Array.isArray(t)) return [];
301
301
  if (e !== void 0)
302
302
  for (const i of t)
303
- Tt(i) || S(
303
+ Ot(i) || S(
304
304
  n,
305
305
  `${e}.kind`,
306
306
  "fill kind is not renderable by this runtime ; layer dropped (angular/diamond gradients land with LSML 1.2)"
307
307
  );
308
- return t.filter(Tt).map((i) => {
308
+ return t.filter(Ot).map((i) => {
309
309
  let r = i;
310
310
  if (r.blendMode !== void 0 && Y(r.blendMode) === void 0) {
311
311
  S(
@@ -317,7 +317,7 @@ function Zt(t, e, n) {
317
317
  r = a;
318
318
  }
319
319
  if (r.kind !== "image" || r.objectFit === void 0) return r;
320
- const s = _e(r.objectFit);
320
+ const s = Ce(r.objectFit);
321
321
  if (s === void 0) {
322
322
  S(
323
323
  n,
@@ -330,29 +330,29 @@ function Zt(t, e, n) {
330
330
  return { ...r, objectFit: s };
331
331
  });
332
332
  }
333
- function Tt(t) {
333
+ function Ot(t) {
334
334
  if (typeof t != "object" || t === null) return !1;
335
335
  const e = t.kind;
336
336
  return e === "solid" || e === "linear-gradient" || e === "radial-gradient" ? !0 : e === "image" && typeof t.src == "string";
337
337
  }
338
- function Jt(t, e, n, i) {
339
- return t.filter((r) => r.kind !== "image" ? !0 : Vt(r.src, e, `${n}.src`, i) !== void 0);
338
+ function ne(t, e, n, i) {
339
+ return t.filter((r) => r.kind !== "image" ? !0 : $t(r.src, e, `${n}.src`, i) !== void 0);
340
340
  }
341
- function Ee({
341
+ function ze({
342
342
  resolved: t,
343
343
  nodeId: e,
344
344
  transitionFor: n,
345
345
  animateInitial: i,
346
346
  children: r
347
347
  }) {
348
- const s = N(t.x, 0), o = N(t.y, 0), a = jt(t.width), l = jt(t.height), c = N(t.opacity, 1), u = N(t.scale, 1), d = N(t.rotate, N(t.rotation, 0)), m = t.flipY === !0, h = N(t.radius, 0), g = t.background, A = g === void 0 ? void 0 : E(g);
349
- g !== void 0 && A === null && D("frame.background", e);
350
- const x = st(), F = Jt(
351
- Zt(t.backgrounds, "frame.backgrounds", e),
348
+ const s = C(t.x, 0), o = C(t.y, 0), a = Nt(t.width), l = Nt(t.height), c = C(t.opacity, 1), u = C(t.scale, 1), d = C(t.rotate, C(t.rotation, 0)), h = t.flipY === !0, g = C(t.radius, 0), m = t.background, A = m === void 0 ? void 0 : E(m);
349
+ m !== void 0 && A === null && D("frame.background", e);
350
+ const x = tt(), F = ne(
351
+ ee(t.backgrounds, "frame.backgrounds", e),
352
352
  x,
353
353
  "frame.backgrounds",
354
354
  e
355
- ), k = De(t.clipsContent, e), y = it(
355
+ ), k = He(t.clipsContent, e), y = at(
356
356
  n,
357
357
  ["opacity", "scale", "rotate", "x", "y"],
358
358
  i
@@ -373,13 +373,13 @@ function Ee({
373
373
  // animates, so it stays off the 0-layout-event hot path (ADR 001
374
374
  // §3.2.5). `false` => omit the declaration (CSS initial = visible).
375
375
  ...k ? { overflow: "hidden" } : {},
376
- ...h > 0 ? { borderRadius: h } : {}
376
+ ...g > 0 ? { borderRadius: g } : {}
377
377
  };
378
- F.length > 0 ? Object.assign(p, Ne(F, e)) : A != null && (p.background = A);
379
- const { filter: w, boxShadow: $ } = Be(t.shadow, e);
380
- $ !== void 0 && (p.boxShadow = $), w !== void 0 && (p.filter = w);
381
- const v = ot(
382
- { opacity: c, x: s, y: o, scale: u, rotate: d, ...m ? { scaleY: -1 } : {} },
378
+ F.length > 0 ? Object.assign(p, Ee(F, e)) : A != null && (p.background = A);
379
+ const { filter: w, boxShadow: v } = We(t.shadow, e);
380
+ v !== void 0 && (p.boxShadow = v), w !== void 0 && (p.filter = w);
381
+ const $ = lt(
382
+ { opacity: c, x: s, y: o, scale: u, rotate: d, ...h ? { scaleY: -1 } : {} },
383
383
  i,
384
384
  e
385
385
  );
@@ -387,20 +387,20 @@ function Ee({
387
387
  I.div,
388
388
  {
389
389
  style: p,
390
- initial: v.initial,
391
- animate: v.animate,
390
+ initial: $.initial,
391
+ animate: $.animate,
392
392
  transition: Q(y),
393
393
  children: r
394
394
  }
395
395
  );
396
396
  }
397
- function De(t, e) {
397
+ function He(t, e) {
398
398
  return t === void 0 ? !0 : typeof t == "boolean" ? t : (S(e, "frame.clipsContent", "rejected value : not a boolean"), !0);
399
399
  }
400
- function N(t, e) {
400
+ function C(t, e) {
401
401
  return typeof t == "number" && Number.isFinite(t) ? t : e;
402
402
  }
403
- function Be(t, e) {
403
+ function We(t, e) {
404
404
  if (!Array.isArray(t) || t.length === 0) return {};
405
405
  const n = [], i = [];
406
406
  for (const s of t) {
@@ -410,39 +410,39 @@ function Be(t, e) {
410
410
  D("frame.shadow.color", e);
411
411
  continue;
412
412
  }
413
- const l = N(o.x, 0), c = N(o.y, 0), u = N(o.blur, 0), d = N(o.spread, 0), m = o.inset === !0;
414
- if (!m && d === 0)
413
+ const l = C(o.x, 0), c = C(o.y, 0), u = C(o.blur, 0), d = C(o.spread, 0), h = o.inset === !0;
414
+ if (!h && d === 0)
415
415
  n.push(`drop-shadow(${l}px ${c}px ${u / 2}px ${a})`);
416
416
  else {
417
- const h = m ? "inset " : "";
418
- i.push(`${h}${l}px ${c}px ${u}px ${d}px ${a}`);
417
+ const g = h ? "inset " : "";
418
+ i.push(`${g}${l}px ${c}px ${u}px ${d}px ${a}`);
419
419
  }
420
420
  }
421
421
  const r = {};
422
422
  return n.length > 0 && (r.filter = n.join(" ")), i.length > 0 && (r.boxShadow = i.join(", ")), r;
423
423
  }
424
- function jt(t) {
424
+ function Nt(t) {
425
425
  if (typeof t == "number" && Number.isFinite(t) || typeof t == "string" && t.length > 0) return t;
426
426
  }
427
- const Le = /* @__PURE__ */ new Set(["none", "uppercase", "lowercase", "capitalize"]), He = /* @__PURE__ */ new Set(["none", "underline", "line-through"]), ze = /* @__PURE__ */ new Set(["normal", "italic", "oblique"]), We = 1e3, qe = 100, Nt = 1e3, Ge = /^[a-zA-Z0-9 ,.'"_-]{1,256}$/;
428
- function Ye(t) {
427
+ const qe = /* @__PURE__ */ new Set(["none", "uppercase", "lowercase", "capitalize"]), Ge = /* @__PURE__ */ new Set(["none", "underline", "line-through"]), Ye = /* @__PURE__ */ new Set(["normal", "italic", "oblique"]), Xe = 1e3, Ie = 100, Pt = 1e3, Ue = /^[a-zA-Z0-9 ,.'"_-]{1,256}$/;
428
+ function Ke(t) {
429
429
  if (typeof t != "string") return null;
430
430
  const e = t.trim();
431
- return e.length === 0 ? null : Ge.test(e) ? e : null;
431
+ return e.length === 0 ? null : Ue.test(e) ? e : null;
432
432
  }
433
- function Xe({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
433
+ function Ve({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
434
434
  const r = t.value === void 0 ? "" : String(t.value), s = t.size ?? "1rem", o = t.weight ?? 400;
435
435
  let a;
436
436
  if (t.font !== void 0) {
437
- const g = Ye(t.font);
438
- g === null ? S(e, "text.font", "rejected fontFamily : outside the family-list grammar") : a = g;
437
+ const m = Ke(t.font);
438
+ m === null ? S(e, "text.font", "rejected fontFamily : outside the family-list grammar") : a = m;
439
439
  }
440
440
  let l = "currentColor";
441
441
  if (t.colour !== void 0) {
442
- const g = E(t.colour);
443
- g === null ? D("text.colour", e) : l = g;
442
+ const m = E(t.colour);
443
+ m === null ? D("text.colour", e) : l = m;
444
444
  }
445
- const c = t.align ?? "start", u = Ie(t.opacity, 1), d = Ke(t, e), m = it(n, ["opacity", "value"], i), h = ot({ opacity: u }, i, e);
445
+ const c = t.align ?? "start", u = Ze(t.opacity, 1), d = Je(t, e), h = at(n, ["opacity", "value"], i), g = lt({ opacity: u }, i, e);
446
446
  return /* @__PURE__ */ f(
447
447
  I.span,
448
448
  {
@@ -457,40 +457,40 @@ function Xe({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
457
457
  textAlign: c,
458
458
  ...d
459
459
  },
460
- initial: h.initial,
461
- animate: h.animate,
462
- transition: Q(m),
460
+ initial: g.initial,
461
+ animate: g.animate,
462
+ transition: Q(h),
463
463
  children: r
464
464
  }
465
465
  );
466
466
  }
467
- function Ie(t, e) {
467
+ function Ze(t, e) {
468
468
  return typeof t == "number" && Number.isFinite(t) ? t : e;
469
469
  }
470
- function Ke(t, e) {
471
- const n = Ct(
470
+ function Je(t, e) {
471
+ const n = Et(
472
472
  t.lineHeight,
473
473
  0,
474
- qe,
474
+ Ie,
475
475
  "text.lineHeight",
476
476
  e
477
- ), i = Ct(
477
+ ), i = Et(
478
478
  t.letterSpacing,
479
- -Nt,
480
- Nt,
479
+ -Pt,
480
+ Pt,
481
481
  "text.letterSpacing",
482
482
  e
483
- ), r = ut(
483
+ ), r = dt(
484
484
  t.textTransform,
485
- Le,
485
+ qe,
486
486
  "text.textTransform",
487
487
  e
488
- ), s = ut(
488
+ ), s = dt(
489
489
  t.textDecoration,
490
- He,
490
+ Ge,
491
491
  "text.textDecoration",
492
492
  e
493
- ), o = ut(t.fontStyle, ze, "text.fontStyle", e), a = Ue(t.maxLines, We, "text.maxLines", e);
493
+ ), o = dt(t.fontStyle, Ye, "text.fontStyle", e), a = Qe(t.maxLines, Xe, "text.maxLines", e);
494
494
  return {
495
495
  ...n !== void 0 ? { lineHeight: n } : {},
496
496
  // Built from a validated finite number — no string passthrough.
@@ -507,35 +507,35 @@ function Ke(t, e) {
507
507
  } : {}
508
508
  };
509
509
  }
510
- function ut(t, e, n, i) {
510
+ function dt(t, e, n, i) {
511
511
  if (t !== void 0) {
512
512
  if (typeof t == "string" && e.has(t)) return t;
513
- xt(n, i);
513
+ St(n, i);
514
514
  }
515
515
  }
516
- function Ct(t, e, n, i, r) {
516
+ function Et(t, e, n, i, r) {
517
517
  if (t !== void 0) {
518
518
  if (typeof t == "number" && Number.isFinite(t) && t >= e && t <= n) return t;
519
- xt(i, r);
519
+ St(i, r);
520
520
  }
521
521
  }
522
- function Ue(t, e, n, i) {
522
+ function Qe(t, e, n, i) {
523
523
  if (t !== void 0) {
524
524
  if (typeof t == "number" && Number.isInteger(t) && t >= 1 && t <= e) return t;
525
- xt(n, i);
525
+ St(n, i);
526
526
  }
527
527
  }
528
- function xt(t, e) {
528
+ function St(t, e) {
529
529
  S(
530
530
  e,
531
531
  t,
532
532
  "rejected typography value : outside the field's spec'd grammar or caps"
533
533
  );
534
534
  }
535
- function Ve({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
536
- const r = st(), s = Vt(t.src, r, "image.src", e);
535
+ function tn({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
536
+ const r = tt(), s = $t(t.src, r, "image.src", e);
537
537
  if (!s) return null;
538
- const o = typeof t.alt == "string" ? t.alt : "", a = t.fit ?? "contain", l = t.position ?? "center", c = Ze(t.opacity, 1), u = Ot(t.width, "100%"), d = Ot(t.height, "100%"), m = it(n, ["opacity", "src"], i), h = ot({ opacity: c }, i, e);
538
+ const o = typeof t.alt == "string" ? t.alt : "", a = t.fit ?? "contain", l = t.position ?? "center", c = en(t.opacity, 1), u = Dt(t.width, "100%"), d = Dt(t.height, "100%"), h = at(n, ["opacity", "src"], i), g = lt({ opacity: c }, i, e);
539
539
  return /* @__PURE__ */ f(
540
540
  I.img,
541
541
  {
@@ -553,28 +553,28 @@ function Ve({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
553
553
  // image's contribution (the diagonal light streaks, the warm Ruby) is
554
554
  // lost. Static images don't need the compositor hint anyway.
555
555
  },
556
- initial: h.initial,
557
- animate: h.animate,
558
- transition: Q(m),
556
+ initial: g.initial,
557
+ animate: g.animate,
558
+ transition: Q(h),
559
559
  draggable: !1
560
560
  }
561
561
  );
562
562
  }
563
- function Ze(t, e) {
563
+ function en(t, e) {
564
564
  return typeof t == "number" && Number.isFinite(t) ? t : e;
565
565
  }
566
- function Ot(t, e) {
566
+ function Dt(t, e) {
567
567
  return typeof t == "number" && Number.isFinite(t) ? `${t}px` : typeof t == "string" && t.length > 0 ? t : e;
568
568
  }
569
- const Je = 8192, Qe = 4e3, tn = 64, en = new Set("MmLlHhVvCcSsQqTtAaZz");
570
- function ft(t) {
569
+ const nn = 8192, rn = 4e3, on = 64, sn = new Set("MmLlHhVvCcSsQqTtAaZz");
570
+ function pt(t) {
571
571
  return t >= 48 && t <= 57;
572
572
  }
573
- function nn(t) {
573
+ function an(t) {
574
574
  return t === 32 || t === 9 || t === 13 || t === 10 || t === 44;
575
575
  }
576
- function Pt(t) {
577
- if (typeof t != "string" || t.length === 0 || t.length > Je) return null;
576
+ function Bt(t) {
577
+ if (typeof t != "string" || t.length === 0 || t.length > nn) return null;
578
578
  const e = t.trim();
579
579
  if (e.length === 0) return null;
580
580
  const n = e.toLowerCase();
@@ -583,25 +583,25 @@ function Pt(t) {
583
583
  let r = 0, s = 0, o = !1;
584
584
  for (; r < i; ) {
585
585
  const a = e.charCodeAt(r);
586
- if (nn(a)) {
586
+ if (an(a)) {
587
587
  r++;
588
588
  continue;
589
589
  }
590
590
  const l = e[r];
591
- if (en.has(l)) {
592
- if (!o && l !== "M" && l !== "m" || (o = !0, s++, s > Qe)) return null;
591
+ if (sn.has(l)) {
592
+ if (!o && l !== "M" && l !== "m" || (o = !0, s++, s > rn)) return null;
593
593
  r++;
594
594
  continue;
595
595
  }
596
596
  if (!o) return null;
597
597
  (l === "+" || l === "-") && r++;
598
598
  let c = 0;
599
- for (; r < i && ft(e.charCodeAt(r)); )
599
+ for (; r < i && pt(e.charCodeAt(r)); )
600
600
  r++, c++;
601
601
  if (r < i && e[r] === ".") {
602
602
  r++;
603
603
  let u = 0;
604
- for (; r < i && ft(e.charCodeAt(r)); )
604
+ for (; r < i && pt(e.charCodeAt(r)); )
605
605
  r++, u++;
606
606
  if (u === 0 && r < i && e[r] === ".") return null;
607
607
  c += u;
@@ -610,66 +610,66 @@ function Pt(t) {
610
610
  if (r < i && (e[r] === "e" || e[r] === "E")) {
611
611
  r++, r < i && (e[r] === "+" || e[r] === "-") && r++;
612
612
  let u = 0;
613
- for (; r < i && ft(e.charCodeAt(r)); )
613
+ for (; r < i && pt(e.charCodeAt(r)); )
614
614
  r++, u++;
615
615
  if (u === 0) return null;
616
616
  }
617
617
  }
618
618
  return s === 0 ? null : e;
619
619
  }
620
- function rn(t, e) {
620
+ function ln(t, e) {
621
621
  const n = t.paths, i = t.pathData;
622
622
  if (Array.isArray(n)) {
623
- i !== void 0 && z(e, "shape.pathData", "mutually exclusive with paths[] ; paths[] wins");
623
+ i !== void 0 && H(e, "shape.pathData", "mutually exclusive with paths[] ; paths[] wins");
624
624
  const r = [];
625
625
  for (let s = 0; s < n.length; s++) {
626
- if (r.length >= tn) {
627
- z(e, "shape.paths", "subpath cap exceeded ; remaining entries dropped");
626
+ if (r.length >= on) {
627
+ H(e, "shape.paths", "subpath cap exceeded ; remaining entries dropped");
628
628
  break;
629
629
  }
630
- const o = n[s], a = Pt(
630
+ const o = n[s], a = Bt(
631
631
  typeof o == "object" && o !== null ? o.data : void 0
632
632
  );
633
633
  if (a === null) {
634
- z(e, "shape.paths.data", "not a strict SVG path grammar (allowlist/caps)");
634
+ H(e, "shape.paths.data", "not a strict SVG path grammar (allowlist/caps)");
635
635
  continue;
636
636
  }
637
- r.push({ d: a, fillRule: on(o?.windingRule, e) });
637
+ r.push({ d: a, fillRule: cn(o?.windingRule, e) });
638
638
  }
639
- return r.length === 0 && n.length > 0 && z(e, "shape.paths", "no renderable subpath ; shape geometry omitted"), r;
639
+ return r.length === 0 && n.length > 0 && H(e, "shape.paths", "no renderable subpath ; shape geometry omitted"), r;
640
640
  }
641
641
  if (i !== void 0) {
642
- const r = Pt(i);
643
- return r === null ? (z(e, "shape.pathData", "not a strict SVG path grammar (allowlist/caps)"), []) : [{ d: r, fillRule: "nonzero" }];
642
+ const r = Bt(i);
643
+ return r === null ? (H(e, "shape.pathData", "not a strict SVG path grammar (allowlist/caps)"), []) : [{ d: r, fillRule: "nonzero" }];
644
644
  }
645
- return z(e, "shape.paths", "geometry is path but neither pathData nor paths[] is present"), [];
645
+ return H(e, "shape.paths", "geometry is path but neither pathData nor paths[] is present"), [];
646
646
  }
647
- function on(t, e) {
648
- return t === void 0 || t === "NONZERO" ? "nonzero" : t === "EVENODD" ? "evenodd" : (z(e, "shape.paths.windingRule", "unknown winding rule ; defaulting to nonzero"), "nonzero");
647
+ function cn(t, e) {
648
+ return t === void 0 || t === "NONZERO" ? "nonzero" : t === "EVENODD" ? "evenodd" : (H(e, "shape.paths.windingRule", "unknown winding rule ; defaulting to nonzero"), "nonzero");
649
649
  }
650
- function z(t, e, n) {
650
+ function H(t, e, n) {
651
651
  S(t, e, n);
652
652
  }
653
- function sn(t) {
653
+ function un(t) {
654
654
  return t.geometry ?? t.kind ?? "rect";
655
655
  }
656
- function dt(t, e) {
656
+ function ht(t, e) {
657
657
  return typeof t == "number" && Number.isFinite(t) ? t : e;
658
658
  }
659
- function $t(t, e, n, i = "geom") {
660
- const r = sn(t), s = dt(t.width, 100), o = dt(t.height, 100), a = dt(t.radius, 0), l = e.stroke ?? "none", c = e.strokeWidth ?? 0, u = e.mixBlendMode !== void 0 ? { mixBlendMode: e.mixBlendMode } : void 0;
659
+ function Mt(t, e, n, i = "geom") {
660
+ const r = un(t), s = ht(t.width, 100), o = ht(t.height, 100), a = ht(t.radius, 0), l = e.stroke ?? "none", c = e.strokeWidth ?? 0, u = e.mixBlendMode !== void 0 ? { mixBlendMode: e.mixBlendMode } : void 0;
661
661
  if (r === "path") {
662
- const d = rn(t, n);
663
- return /* @__PURE__ */ f("g", { style: u, children: d.map((m, h) => /* @__PURE__ */ f(
662
+ const d = ln(t, n);
663
+ return /* @__PURE__ */ f("g", { style: u, children: d.map((h, g) => /* @__PURE__ */ f(
664
664
  "path",
665
665
  {
666
- d: m.d,
667
- fillRule: m.fillRule,
666
+ d: h.d,
667
+ fillRule: h.fillRule,
668
668
  fill: e.fill,
669
669
  stroke: l,
670
670
  strokeWidth: c
671
671
  },
672
- h
672
+ g
673
673
  )) }, i);
674
674
  }
675
675
  return r === "circle" ? /* @__PURE__ */ f(
@@ -714,37 +714,37 @@ function $t(t, e, n, i = "geom") {
714
714
  i
715
715
  );
716
716
  }
717
- function an(t, e) {
717
+ function fn(t, e) {
718
718
  if (t.kind !== "shape") return null;
719
719
  const n = t.props ?? {};
720
- return $t(n, { fill: "white" }, e, "mask-cover");
720
+ return Mt(n, { fill: "white" }, e, "mask-cover");
721
721
  }
722
- const ln = 64, Qt = 1;
723
- function te(t) {
722
+ const dn = 64, re = 1;
723
+ function ie(t) {
724
724
  return t.props?.visible === !1;
725
725
  }
726
- function nt(t, e) {
726
+ function rt(t, e) {
727
727
  const n = t?.[e];
728
728
  return typeof n == "number" && Number.isFinite(n) ? n : 0;
729
729
  }
730
- function cn(t, e, n = Qt, i = ln) {
730
+ function pn(t, e, n = re, i = dn) {
731
731
  if (t.kind !== "frame") return null;
732
- const r = ne(t, e, n, i, "grp");
732
+ const r = se(t, e, n, i, "grp");
733
733
  return r.length === 0 ? null : /* @__PURE__ */ f("g", { children: r }, "mask-group-cover");
734
734
  }
735
- function ee(t, e = Qt) {
735
+ function oe(t, e = re) {
736
736
  if (t.kind !== "frame") return !1;
737
737
  for (const n of t.children ?? [])
738
- if (!te(n) && (nt(n.props, "blur") > 0 || n.kind === "frame" && e > 0 && ee(n, e - 1)))
738
+ if (!ie(n) && (rt(n.props, "blur") > 0 || n.kind === "frame" && e > 0 && oe(n, e - 1)))
739
739
  return !0;
740
740
  return !1;
741
741
  }
742
- function ne(t, e, n, i, r) {
742
+ function se(t, e, n, i, r) {
743
743
  const s = t.children ?? [], o = [];
744
744
  let a = 0;
745
745
  for (let l = 0; l < s.length; l++) {
746
746
  const c = s[l];
747
- if (te(c)) continue;
747
+ if (ie(c)) continue;
748
748
  if (a >= i) {
749
749
  S(
750
750
  e,
@@ -755,41 +755,41 @@ function ne(t, e, n, i, r) {
755
755
  }
756
756
  let u = null;
757
757
  if (c.kind === "shape")
758
- u = $t(c.props ?? {}, { fill: "white" }, c.id, `${r}-${l}`);
758
+ u = Mt(c.props ?? {}, { fill: "white" }, c.id, `${r}-${l}`);
759
759
  else if (c.kind === "frame" && n > 0) {
760
- const g = ne(c, e, n - 1, i, `${r}-${l}`);
761
- g.length > 0 && (u = /* @__PURE__ */ f("g", { children: g }, `${r}-${l}`));
760
+ const m = se(c, e, n - 1, i, `${r}-${l}`);
761
+ m.length > 0 && (u = /* @__PURE__ */ f("g", { children: m }, `${r}-${l}`));
762
762
  }
763
763
  if (u === null) continue;
764
- const d = nt(c.props, "blur");
764
+ const d = rt(c.props, "blur");
765
765
  if (d > 0) {
766
- const g = `lumen-mcov-blur-${e ?? "x"}-${r}-${l}`;
766
+ const m = `lumen-mcov-blur-${e ?? "x"}-${r}-${l}`;
767
767
  u = /* @__PURE__ */ G("g", { children: [
768
- /* @__PURE__ */ f("filter", { id: g, x: "-120%", y: "-120%", width: "340%", height: "340%", children: /* @__PURE__ */ f("feGaussianBlur", { stdDeviation: d / 2 }) }),
769
- /* @__PURE__ */ f("g", { filter: `url(#${g})`, children: u })
768
+ /* @__PURE__ */ f("filter", { id: m, x: "-120%", y: "-120%", width: "340%", height: "340%", children: /* @__PURE__ */ f("feGaussianBlur", { stdDeviation: d / 2 }) }),
769
+ /* @__PURE__ */ f("g", { filter: `url(#${m})`, children: u })
770
770
  ] }, `${r}-b-${l}`);
771
771
  }
772
- const m = nt(c.props, "x"), h = nt(c.props, "y");
772
+ const h = rt(c.props, "x"), g = rt(c.props, "y");
773
773
  o.push(
774
- m !== 0 || h !== 0 ? /* @__PURE__ */ f("g", { transform: `translate(${m} ${h})`, children: u }, `${r}-t-${l}`) : u
774
+ h !== 0 || g !== 0 ? /* @__PURE__ */ f("g", { transform: `translate(${h} ${g})`, children: u }, `${r}-t-${l}`) : u
775
775
  ), a++;
776
776
  }
777
777
  return o;
778
778
  }
779
- function un({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
780
- const r = t.geometry ?? t.kind ?? "rect", s = pt(t.fill, "shape.fill", e) ?? "transparent", o = pt(t.stroke, "shape.stroke", e) ?? "transparent", a = tt(t.stroke_width, 0), l = tt(t.width, 100), c = tt(t.height, 100), u = tt(t.opacity, 1), d = typeof t.ariaLabel == "string" ? t.ariaLabel : void 0, m = it(n, ["opacity"], i), h = Q(m), g = ot({ opacity: u }, i, e), A = st(), x = Jt(
781
- Pe(Zt(t.fills, "shape.fills", e), "shape.fills", e),
779
+ function hn({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
780
+ const r = t.geometry ?? t.kind ?? "rect", s = gt(t.fill, "shape.fill", e) ?? "transparent", o = gt(t.stroke, "shape.stroke", e) ?? "transparent", a = et(t.stroke_width, 0), l = et(t.width, 100), c = et(t.height, 100), u = et(t.opacity, 1), d = typeof t.ariaLabel == "string" ? t.ariaLabel : void 0, h = at(n, ["opacity"], i), g = Q(h), m = lt({ opacity: u }, i, e), A = tt(), x = ne(
781
+ Le(ee(t.fills, "shape.fills", e), "shape.fills", e),
782
782
  A,
783
783
  "shape.fills",
784
784
  e
785
- ), F = fn(t.strokes), k = x.map(Re), y = k.flatMap((_) => _.defs), p = k.length > 0 ? k.map((_) => ({ ref: _.ref, mixBlendMode: _.mixBlendMode })) : [{ ref: s }], w = F.length > 0 ? F.map((_) => ({
786
- color: pt(_.color, "shape.strokes.color", e) ?? "transparent",
787
- width: _.width ?? 0
788
- })) : [{ color: o, width: a }], $ = [...p].reverse(), v = [...w].reverse(), T = r === "path" ? v.filter((_) => _.width > 0 && _.color !== "transparent") : v, U = (_, b, C, O) => $t(
785
+ ), F = gn(t.strokes), k = x.map(Oe), y = k.flatMap((R) => R.defs), p = k.length > 0 ? k.map((R) => ({ ref: R.ref, mixBlendMode: R.mixBlendMode })) : [{ ref: s }], w = F.length > 0 ? F.map((R) => ({
786
+ color: gt(R.color, "shape.strokes.color", e) ?? "transparent",
787
+ width: R.width ?? 0
788
+ })) : [{ color: o, width: a }], v = [...p].reverse(), $ = [...w].reverse(), j = r === "path" ? $.filter((R) => R.width > 0 && R.color !== "transparent") : $, K = (R, b, O, N) => Mt(
789
789
  t,
790
- { fill: _, stroke: b.color, strokeWidth: b.width, mixBlendMode: O },
790
+ { fill: R, stroke: b.color, strokeWidth: b.width, mixBlendMode: N },
791
791
  e,
792
- C
792
+ O
793
793
  );
794
794
  return /* @__PURE__ */ G(
795
795
  I.svg,
@@ -798,59 +798,59 @@ function un({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
798
798
  height: c,
799
799
  viewBox: `0 0 ${l} ${c}`,
800
800
  ...d !== void 0 ? { "aria-label": d, role: "img" } : {},
801
- initial: g.initial,
802
- animate: g.animate,
803
- transition: h,
801
+ initial: m.initial,
802
+ animate: m.animate,
803
+ transition: g,
804
804
  children: [
805
805
  y.length > 0 && /* @__PURE__ */ f("defs", { children: y }),
806
- $.map(
807
- (_, b) => U(_.ref, { color: "transparent", width: 0 }, `fill-${b}`, _.mixBlendMode)
806
+ v.map(
807
+ (R, b) => K(R.ref, { color: "transparent", width: 0 }, `fill-${b}`, R.mixBlendMode)
808
808
  ),
809
- T.map((_, b) => U("none", _, `stroke-${b}`))
809
+ j.map((R, b) => K("none", R, `stroke-${b}`))
810
810
  ]
811
811
  }
812
812
  );
813
813
  }
814
- function pt(t, e, n) {
814
+ function gt(t, e, n) {
815
815
  if (typeof t != "string") return null;
816
816
  const i = E(t);
817
817
  return i === null && D(e, n), i;
818
818
  }
819
- function fn(t) {
819
+ function gn(t) {
820
820
  return Array.isArray(t) ? t.filter(
821
821
  (e) => typeof e == "object" && e !== null && ("color" in e || "width" in e)
822
822
  ) : [];
823
823
  }
824
- function tt(t, e) {
824
+ function et(t, e) {
825
825
  return typeof t == "number" && Number.isFinite(t) ? t : e;
826
826
  }
827
- function dn({ resolved: t }) {
828
- const e = t.src;
829
- if (!e) return null;
830
- const n = t.loop ?? !0, i = t.mute ?? !0, r = t.autoplay ?? !0, s = t.fit ?? "cover";
827
+ function mn({ resolved: t, nodeId: e }) {
828
+ const n = tt(), i = $t(t.src, n, "media.src", e);
829
+ if (!i) return null;
830
+ const r = t.loop ?? !0, s = t.mute ?? !0, o = t.autoplay ?? !0, a = t.fit ?? "cover";
831
831
  return /* @__PURE__ */ f(
832
832
  "video",
833
833
  {
834
- src: e,
835
- autoPlay: r,
836
- loop: n,
837
- muted: i,
834
+ src: i,
835
+ autoPlay: o,
836
+ loop: r,
837
+ muted: s,
838
838
  playsInline: !0,
839
839
  style: {
840
840
  width: "100%",
841
841
  height: "100%",
842
- objectFit: s
842
+ objectFit: a
843
843
  }
844
844
  }
845
845
  );
846
846
  }
847
- const Et = /* @__PURE__ */ new Set();
848
- function pn({ resolved: t, nodeId: e }) {
847
+ const Lt = /* @__PURE__ */ new Set();
848
+ function yn({ resolved: t, nodeId: e }) {
849
849
  const n = t.scene_id, i = t.scene_version;
850
850
  if (!n || !i)
851
851
  return S(e, "instance.scene_id", "missing scene_id or scene_version ; not rendered"), null;
852
852
  const r = `${n}:${i}`;
853
- Et.has(r) || (Et.add(r), S(
853
+ Lt.has(r) || (Lt.add(r), S(
854
854
  e,
855
855
  "instance",
856
856
  "scaffold render — async bundle fetch + __params.* injection are not yet wired (LSML 1.1 §4.9)"
@@ -873,27 +873,104 @@ function pn({ resolved: t, nodeId: e }) {
873
873
  }
874
874
  );
875
875
  }
876
- const hn = {
877
- stack: be,
878
- grid: ke,
879
- frame: Ee,
880
- text: Xe,
881
- image: Ve,
882
- shape: un,
883
- media: dn,
884
- instance: pn
885
- }, bt = rt("");
886
- function gn({ prefix: t, children: e }) {
887
- const n = K(bt), i = n ? `${n}.${t}` : t;
888
- return /* @__PURE__ */ f(bt.Provider, { value: i, children: e });
889
- }
890
- function vt() {
891
- return K(bt);
876
+ function bn({ resolved: t }) {
877
+ const e = Ht(t.width, "100%"), n = Ht(t.height, "100%"), i = typeof t["x-zab.sourceKind"] == "string" ? t["x-zab.sourceKind"] : "", r = typeof t["x-zab.deviceRef"] == "string" ? t["x-zab.deviceRef"] : "", o = be()?.resolveCaptureDevice, a = it(null), [l, c] = Ut(null);
878
+ return ot(() => {
879
+ if (!kn()) return;
880
+ let u = !1, d = null;
881
+ return (async () => {
882
+ try {
883
+ const h = await xn(i, r, o);
884
+ if (h === null) return;
885
+ if (u) {
886
+ zt(h);
887
+ return;
888
+ }
889
+ d = h, c(h);
890
+ } catch {
891
+ }
892
+ })(), () => {
893
+ u = !0, d !== null && zt(d);
894
+ };
895
+ }, [i, r, o]), ot(() => {
896
+ const u = a.current;
897
+ if (u !== null)
898
+ return u.srcObject = l, () => {
899
+ u !== null && (u.srcObject = null);
900
+ };
901
+ }, [l]), l !== null && wn(i) ? /* @__PURE__ */ f(
902
+ "video",
903
+ {
904
+ ref: a,
905
+ "data-lumencast-capture": !0,
906
+ autoPlay: !0,
907
+ muted: !0,
908
+ playsInline: !0,
909
+ style: { width: e, height: n, objectFit: "cover", pointerEvents: "none" }
910
+ }
911
+ ) : /* @__PURE__ */ f(
912
+ "div",
913
+ {
914
+ "aria-hidden": !0,
915
+ "data-lumencast-capture": !0,
916
+ style: { width: e, height: n, opacity: 0, pointerEvents: "none" }
917
+ }
918
+ );
919
+ }
920
+ function kn() {
921
+ return typeof navigator < "u" && typeof navigator.mediaDevices?.getUserMedia == "function";
922
+ }
923
+ function wn(t) {
924
+ return t === "media.webcam" || t === "media.screen" || t === "media.window";
925
+ }
926
+ async function xn(t, e, n) {
927
+ const i = navigator.mediaDevices, s = (n?.(e, t) ?? null)?.deviceId;
928
+ switch (t) {
929
+ case "media.webcam":
930
+ return i.getUserMedia({ video: mt(s) });
931
+ case "media.mic":
932
+ return i.getUserMedia({ audio: mt(s) });
933
+ case "media.app_audio":
934
+ return i.getUserMedia({ audio: mt(s) });
935
+ case "media.screen":
936
+ case "media.window":
937
+ return i.getDisplayMedia({ video: !0 });
938
+ default:
939
+ return null;
940
+ }
941
+ }
942
+ function mt(t) {
943
+ return typeof t == "string" && t.length > 0 ? { deviceId: t } : !0;
944
+ }
945
+ function zt(t) {
946
+ for (const e of t.getTracks()) e.stop();
947
+ }
948
+ function Ht(t, e) {
949
+ return typeof t == "number" && Number.isFinite(t) ? `${t}px` : typeof t == "string" && t.length > 0 ? t : e;
950
+ }
951
+ const vn = {
952
+ stack: ve,
953
+ grid: $e,
954
+ frame: ze,
955
+ text: Ve,
956
+ image: tn,
957
+ shape: hn,
958
+ media: mn,
959
+ instance: yn,
960
+ // RFC-0001 / ADR 004 — Zab vendor capture placeholder (transparent, inert).
961
+ "x-zab.capture": bn
962
+ }, wt = st("");
963
+ function $n({ prefix: t, children: e }) {
964
+ const n = U(wt), i = n ? `${n}.${t}` : t;
965
+ return /* @__PURE__ */ f(wt.Provider, { value: i, children: e });
966
+ }
967
+ function At() {
968
+ return U(wt);
892
969
  }
893
970
  function q(t, e) {
894
971
  return !t || e.startsWith("__") ? e : `${t}.${e}`;
895
972
  }
896
- function Dt(t) {
973
+ function Wt(t) {
897
974
  switch (t) {
898
975
  case "fixed":
899
976
  return "0 0 auto";
@@ -905,11 +982,11 @@ function Dt(t) {
905
982
  return;
906
983
  }
907
984
  }
908
- function mn(t) {
909
- const e = Dt(t?.x), n = Dt(t?.y);
985
+ function Sn(t) {
986
+ const e = Wt(t?.x), n = Wt(t?.y);
910
987
  return e === n && e !== void 0 ? e : e ?? n;
911
988
  }
912
- function yn({
989
+ function Mn({
913
990
  visible: t,
914
991
  opacity: e,
915
992
  rotation: n,
@@ -923,120 +1000,126 @@ function yn({
923
1000
  }) {
924
1001
  if (t === !1)
925
1002
  return null;
926
- const u = Y(l), d = typeof e == "number" && e !== 1, m = typeof n == "number" && n !== 0, h = i === !0, g = typeof r == "number" && r > 0, A = s?.x !== void 0 || s?.y !== void 0, x = o !== void 0, F = u !== void 0;
927
- if (!d && !m && !h && !g && !A && !x && !F)
1003
+ const u = Y(l), d = typeof e == "number" && e !== 1, h = typeof n == "number" && n !== 0, g = i === !0, m = typeof r == "number" && r > 0, A = s?.x !== void 0 || s?.y !== void 0, x = o !== void 0, F = u !== void 0;
1004
+ if (!d && !h && !g && !m && !A && !x && !F)
928
1005
  return /* @__PURE__ */ f(J, { children: c });
929
1006
  let k;
930
- if (m || h) {
931
- const $ = [];
932
- m && $.push(`rotate(${n}deg)`), h && $.push("scaleY(-1)"), k = $.join(" ");
1007
+ if (h || g) {
1008
+ const v = [];
1009
+ h && v.push(`rotate(${n}deg)`), g && v.push("scaleY(-1)"), k = v.join(" ");
933
1010
  }
934
- const y = g ? `blur(${r / 2}px)` : void 0, p = A ? mn(s) : void 0;
1011
+ const y = m ? `blur(${r / 2}px)` : void 0, p = A ? Sn(s) : void 0;
935
1012
  if (F && (d || k !== void 0 || y !== void 0)) {
936
- const $ = { mixBlendMode: u };
937
- x && ($.position = "absolute", $.left = o.x, $.top = o.y), p !== void 0 && ($.flex = p);
938
- const v = {};
939
- return typeof a?.w == "number" && (v.width = a.w), typeof a?.h == "number" && (v.height = a.h), d && (v.opacity = e), k !== void 0 && (v.transform = k), y !== void 0 && (v.filter = y), /* @__PURE__ */ f("div", { style: $, children: /* @__PURE__ */ f("div", { style: v, children: c }) });
1013
+ const v = { mixBlendMode: u };
1014
+ x && (v.position = "absolute", v.left = o.x, v.top = o.y), p !== void 0 && (v.flex = p);
1015
+ const $ = {};
1016
+ return typeof a?.w == "number" && ($.width = a.w), typeof a?.h == "number" && ($.height = a.h), d && ($.opacity = e), k !== void 0 && ($.transform = k), y !== void 0 && ($.filter = y), /* @__PURE__ */ f("div", { style: v, children: /* @__PURE__ */ f("div", { style: $, children: c }) });
940
1017
  }
941
1018
  const w = {};
942
1019
  return d && (w.opacity = e), k !== void 0 && (w.transform = k), y !== void 0 && (w.filter = y), F && (w.mixBlendMode = u), x && (w.position = "absolute", w.left = o.x, w.top = o.y, typeof a?.w == "number" && (w.width = a.w), typeof a?.h == "number" && (w.height = a.h)), p !== void 0 && (w.flex = p), /* @__PURE__ */ f("div", { style: w, children: c });
943
1020
  }
944
- const bn = {
1021
+ const An = {
945
1022
  linear: "linear",
946
1023
  "ease-in": "easeIn",
947
1024
  "ease-out": "easeOut",
948
1025
  "ease-in-out": "easeInOut"
949
1026
  };
950
- function kn(t, e) {
1027
+ function Fn(t, e) {
951
1028
  const n = t.steps;
952
1029
  if (!Array.isArray(n) || n.length < 2) return;
953
1030
  const i = n[0], r = n[n.length - 1];
954
1031
  if (i.at !== 0 || r.at !== 1) return;
955
1032
  const s = n.map((a) => a.at), o = {};
956
- return Bt(n, "opacity", o, e), Bt(n, "filter", o, e), et(n, "scale", o), et(n, "translateX", o), et(n, "translateY", o), et(n, "rotate", o), {
1033
+ return qt(n, "opacity", o, e), qt(n, "filter", o, e), nt(n, "scale", o), nt(n, "translateX", o), nt(n, "translateY", o), nt(n, "rotate", o), {
957
1034
  animate: o,
958
1035
  transition: {
959
1036
  duration: t.duration_ms / 1e3,
960
- ease: bn[t.easing ?? "linear"],
1037
+ ease: An[t.easing ?? "linear"],
961
1038
  times: s
962
1039
  }
963
1040
  };
964
1041
  }
965
- function Bt(t, e, n, i) {
1042
+ function qt(t, e, n, i) {
966
1043
  let r = !1;
967
1044
  const s = [];
968
1045
  let o;
969
1046
  for (const a of t) {
970
1047
  let l = a[e];
971
1048
  if (e === "filter" && l !== void 0) {
972
- const c = ge(l);
973
- c === null ? (Yt("keyframes.steps[].filter", i), l = void 0) : l = c;
1049
+ const c = ke(l);
1050
+ c === null ? (Vt("keyframes.steps[].filter", i), l = void 0) : l = c;
974
1051
  }
975
- l !== void 0 ? (r = !0, o = l, s.push(l)) : s.push(o ?? (e === "opacity" ? 1 : me));
1052
+ l !== void 0 ? (r = !0, o = l, s.push(l)) : s.push(o ?? (e === "opacity" ? 1 : we));
976
1053
  }
977
1054
  r && (n[e] = s);
978
1055
  }
979
- function et(t, e, n) {
1056
+ function nt(t, e, n) {
980
1057
  let i = !1;
981
1058
  const r = [];
982
1059
  let s;
983
1060
  for (const o of t) {
984
1061
  const a = o.transform?.[e];
985
- typeof a == "number" ? (i = !0, s = a, r.push(a)) : r.push(s ?? wn(e));
1062
+ typeof a == "number" ? (i = !0, s = a, r.push(a)) : r.push(s ?? Rn(e));
986
1063
  }
987
- i && (e === "rotate" ? n.rotate = r.map((o) => `${o}deg`) : n[e] = r);
1064
+ if (i)
1065
+ if (e === "rotate")
1066
+ n.rotate = r.map((o) => `${o}deg`);
1067
+ else {
1068
+ const o = e === "translateX" ? "x" : e === "translateY" ? "y" : e;
1069
+ n[o] = r;
1070
+ }
988
1071
  }
989
- function wn(t) {
1072
+ function Rn(t) {
990
1073
  return t === "scale" ? 1 : 0;
991
1074
  }
992
- const St = rt(0), Lt = 2e3;
993
- function xn(t, e) {
1075
+ const Ft = st(0), Gt = 2e3;
1076
+ function _n(t, e) {
994
1077
  if (e <= 0) return 0;
995
1078
  const n = t * e;
996
- return n > Lt ? Lt : n;
1079
+ return n > Gt ? Gt : n;
997
1080
  }
998
- function $n({
1081
+ function jn({
999
1082
  keyframes: t,
1000
1083
  store: e,
1001
1084
  nodeId: n,
1002
1085
  children: i
1003
1086
  }) {
1004
- wt();
1005
- const r = vt(), s = K(St), o = mt(void 0), a = mt(0);
1087
+ vt();
1088
+ const r = At(), s = U(Ft), o = it(void 0), a = it(0);
1006
1089
  if (t.key !== void 0) {
1007
1090
  const u = e.signal(q(r, t.key)).value;
1008
1091
  o.current !== u && (o.current = u, a.current += 1);
1009
1092
  }
1010
- const l = kn(t, n);
1093
+ const l = Fn(t, n);
1011
1094
  if (!l)
1012
1095
  return /* @__PURE__ */ f(J, { children: i });
1013
1096
  const c = s > 0 ? { ...l.transition, delay: s / 1e3 } : l.transition;
1014
1097
  return /* @__PURE__ */ G(
1015
1098
  I.div,
1016
1099
  {
1017
- style: { display: "contents" },
1018
- initial: Sn(l.animate),
1100
+ style: { position: "absolute", inset: 0 },
1101
+ initial: Cn(l.animate),
1019
1102
  animate: l.animate,
1020
1103
  transition: c,
1021
1104
  children: [
1022
- /* @__PURE__ */ f(vn, {}),
1105
+ /* @__PURE__ */ f(Tn, {}),
1023
1106
  i
1024
1107
  ]
1025
1108
  },
1026
1109
  a.current
1027
1110
  );
1028
1111
  }
1029
- function vn() {
1030
- return qt(() => {
1112
+ function Tn() {
1113
+ return ot(() => {
1031
1114
  }, []), null;
1032
1115
  }
1033
- function Sn(t) {
1116
+ function Cn(t) {
1034
1117
  const e = {};
1035
1118
  for (const [n, i] of Object.entries(t))
1036
1119
  i.length > 0 && (e[n] = i[0]);
1037
1120
  return e;
1038
1121
  }
1039
- function Mn(t, e = (i) => requestAnimationFrame(i), n = (i) => cancelAnimationFrame(i)) {
1122
+ function On(t, e = (i) => requestAnimationFrame(i), n = (i) => cancelAnimationFrame(i)) {
1040
1123
  const i = /* @__PURE__ */ new Map();
1041
1124
  let r = null, s = !1;
1042
1125
  const o = () => {
@@ -1055,7 +1138,7 @@ function Mn(t, e = (i) => requestAnimationFrame(i), n = (i) => cancelAnimationFr
1055
1138
  }
1056
1139
  };
1057
1140
  }
1058
- const An = {
1141
+ const Nn = {
1059
1142
  aliceblue: 15792383,
1060
1143
  antiquewhite: 16444375,
1061
1144
  aqua: 65535,
@@ -1205,30 +1288,30 @@ const An = {
1205
1288
  yellow: 16776960,
1206
1289
  yellowgreen: 10145074
1207
1290
  };
1208
- function Fn(t) {
1291
+ function Pn(t) {
1209
1292
  const e = E(t);
1210
1293
  if (e === null) return null;
1211
- if (e.startsWith("#")) return _n(e);
1294
+ if (e.startsWith("#")) return En(e);
1212
1295
  if (e.startsWith("rgb")) {
1213
1296
  const r = e.slice(e.indexOf("(") + 1, -1).split(",").map((d) => d.trim());
1214
1297
  if (r.length < 3) return null;
1215
- const o = r[0].endsWith("%") ? 100 : 255, a = ht(r[0], o), l = ht(r[1], o), c = ht(r[2], o), u = r.length > 3 ? Ht(r[3]) : 1;
1298
+ const o = r[0].endsWith("%") ? 100 : 255, a = yt(r[0], o), l = yt(r[1], o), c = yt(r[2], o), u = r.length > 3 ? Yt(r[3]) : 1;
1216
1299
  return a === null || l === null || c === null || u === null ? null : [a, l, c, u];
1217
1300
  }
1218
1301
  if (e.startsWith("hsl")) {
1219
- const r = e.slice(e.indexOf("(") + 1, -1).split(",").map((m) => m.trim());
1302
+ const r = e.slice(e.indexOf("(") + 1, -1).split(",").map((h) => h.trim());
1220
1303
  if (r.length < 3) return null;
1221
- const s = Number(r[0].replace("deg", "")), o = Number(r[1].replace("%", "")) / 100, a = Number(r[2].replace("%", "")) / 100, l = r.length > 3 ? Ht(r[3]) : 1;
1304
+ const s = Number(r[0].replace("deg", "")), o = Number(r[1].replace("%", "")) / 100, a = Number(r[2].replace("%", "")) / 100, l = r.length > 3 ? Yt(r[3]) : 1;
1222
1305
  if (![s, o, a].every(Number.isFinite) || l === null) return null;
1223
- const [c, u, d] = Rn(s, o, a);
1306
+ const [c, u, d] = Dn(s, o, a);
1224
1307
  return [c, u, d, l];
1225
1308
  }
1226
1309
  if (e === "transparent") return [0, 0, 0, 0];
1227
1310
  if (e === "currentcolor") return null;
1228
- const n = An[e];
1311
+ const n = Nn[e];
1229
1312
  return n === void 0 ? null : [(n >> 16 & 255) / 255, (n >> 8 & 255) / 255, (n & 255) / 255, 1];
1230
1313
  }
1231
- function _n(t) {
1314
+ function En(t) {
1232
1315
  const e = t.slice(1);
1233
1316
  if (e.length === 3 || e.length === 4) {
1234
1317
  const n = parseInt(e[0] + e[0], 16), i = parseInt(e[1] + e[1], 16), r = parseInt(e[2] + e[2], 16), s = e.length === 4 ? parseInt(e[3] + e[3], 16) : 255;
@@ -1240,87 +1323,87 @@ function _n(t) {
1240
1323
  }
1241
1324
  return null;
1242
1325
  }
1243
- function ht(t, e) {
1326
+ function yt(t, e) {
1244
1327
  const n = Number(t.replace("%", ""));
1245
- return Number.isFinite(n) ? j(n / e) : null;
1328
+ return Number.isFinite(n) ? T(n / e) : null;
1246
1329
  }
1247
- function Ht(t) {
1330
+ function Yt(t) {
1248
1331
  const e = t.endsWith("%"), n = Number(t.replace("%", ""));
1249
- return Number.isFinite(n) ? j(e ? n / 100 : n) : null;
1332
+ return Number.isFinite(n) ? T(e ? n / 100 : n) : null;
1250
1333
  }
1251
- function Rn(t, e, n) {
1334
+ function Dn(t, e, n) {
1252
1335
  const i = (t % 360 + 360) % 360, r = (1 - Math.abs(2 * n - 1)) * e, s = i / 60, o = r * (1 - Math.abs(s % 2 - 1));
1253
1336
  let a = 0, l = 0, c = 0;
1254
1337
  s < 1 ? [a, l, c] = [r, o, 0] : s < 2 ? [a, l, c] = [o, r, 0] : s < 3 ? [a, l, c] = [0, r, o] : s < 4 ? [a, l, c] = [0, o, r] : s < 5 ? [a, l, c] = [o, 0, r] : [a, l, c] = [r, 0, o];
1255
1338
  const u = n - r / 2;
1256
- return [j(a + u), j(l + u), j(c + u)];
1339
+ return [T(a + u), T(l + u), T(c + u)];
1257
1340
  }
1258
- function Tn(t, e, n) {
1341
+ function Bn(t, e, n) {
1259
1342
  return [
1260
- j(t[0] + n * (e[0] - t[0])),
1261
- j(t[1] + n * (e[1] - t[1])),
1262
- j(t[2] + n * (e[2] - t[2])),
1263
- j(t[3] + n * (e[3] - t[3]))
1343
+ T(t[0] + n * (e[0] - t[0])),
1344
+ T(t[1] + n * (e[1] - t[1])),
1345
+ T(t[2] + n * (e[2] - t[2])),
1346
+ T(t[3] + n * (e[3] - t[3]))
1264
1347
  ];
1265
1348
  }
1266
- function zt(t) {
1267
- const e = Math.round(j(t[0]) * 255), n = Math.round(j(t[1]) * 255), i = Math.round(j(t[2]) * 255), r = Math.round(j(t[3]) * 1e4) / 1e4;
1349
+ function Xt(t) {
1350
+ const e = Math.round(T(t[0]) * 255), n = Math.round(T(t[1]) * 255), i = Math.round(T(t[2]) * 255), r = Math.round(T(t[3]) * 1e4) / 1e4;
1268
1351
  return `rgba(${e}, ${n}, ${i}, ${r})`;
1269
1352
  }
1270
- function j(t) {
1353
+ function T(t) {
1271
1354
  return t < 0 ? 0 : t > 1 ? 1 : t;
1272
1355
  }
1273
- const re = {
1356
+ const ae = {
1274
1357
  "style.color": "colour",
1275
1358
  fill: "fill",
1276
1359
  background: "background"
1277
1360
  };
1278
- function jn(t, e) {
1361
+ function Ln(t, e) {
1279
1362
  switch (t) {
1280
1363
  case "opacity": {
1281
- const n = H(e);
1364
+ const n = z(e);
1282
1365
  return n === null ? null : { opacity: n < 0 ? 0 : n > 1 ? 1 : n };
1283
1366
  }
1284
1367
  case "transform.translate": {
1285
1368
  if (!Array.isArray(e) || e.length !== 2) return null;
1286
- const n = H(e[0]), i = H(e[1]);
1369
+ const n = z(e[0]), i = z(e[1]);
1287
1370
  return n === null || i === null ? null : { x: n, y: i };
1288
1371
  }
1289
1372
  case "transform.scale": {
1290
- const n = H(e);
1373
+ const n = z(e);
1291
1374
  if (n !== null) return { scaleX: n, scaleY: n };
1292
1375
  if (Array.isArray(e) && e.length === 2) {
1293
- const i = H(e[0]), r = H(e[1]);
1376
+ const i = z(e[0]), r = z(e[1]);
1294
1377
  return i === null || r === null ? null : { scaleX: i, scaleY: r };
1295
1378
  }
1296
1379
  return null;
1297
1380
  }
1298
1381
  case "transform.rotate": {
1299
- const n = H(e);
1382
+ const n = z(e);
1300
1383
  return n === null ? null : { rotate: n };
1301
1384
  }
1302
1385
  case "filter.blur": {
1303
- const n = Ft("blur", e);
1386
+ const n = jt("blur", e);
1304
1387
  return n === null ? null : { blur: n };
1305
1388
  }
1306
1389
  case "filter.brightness": {
1307
- const n = Ft("brightness", e);
1390
+ const n = jt("brightness", e);
1308
1391
  return n === null ? null : { brightness: n };
1309
1392
  }
1310
1393
  default:
1311
1394
  return null;
1312
1395
  }
1313
1396
  }
1314
- function H(t) {
1397
+ function z(t) {
1315
1398
  return typeof t != "number" || !Number.isFinite(t) ? null : Object.is(t, -0) ? 0 : t;
1316
1399
  }
1317
- const Nn = {
1400
+ const zn = {
1318
1401
  kind: "spring",
1319
1402
  stiffness: 170,
1320
1403
  damping: 26,
1321
1404
  mass: 1
1322
1405
  };
1323
- function Cn(t) {
1406
+ function Hn(t) {
1324
1407
  switch (t) {
1325
1408
  case "opacity":
1326
1409
  return "opacity";
@@ -1334,15 +1417,15 @@ function Cn(t) {
1334
1417
  case "filter.brightness":
1335
1418
  return "filter";
1336
1419
  default:
1337
- return re[t] ?? t;
1420
+ return ae[t] ?? t;
1338
1421
  }
1339
1422
  }
1340
- const On = {};
1341
- function Pn(t, e, n) {
1342
- const i = t.animateBindings, r = K(St), s = B(1), o = B(0), a = B(0), l = B(1), c = B(1), u = B(0), d = B(0), m = B(1), h = pe(
1343
- [d, m],
1423
+ const Wn = {};
1424
+ function qn(t, e, n) {
1425
+ const i = t.animateBindings, r = U(Ft), s = B(1), o = B(0), a = B(0), l = B(1), c = B(1), u = B(0), d = B(0), h = B(1), g = ye(
1426
+ [d, h],
1344
1427
  ([k, y]) => `blur(${k}px) brightness(${y})`
1345
- ), [g, A] = he(On), x = mt({
1428
+ ), [m, A] = Ut(Wn), x = it({
1346
1429
  opacity: s,
1347
1430
  x: o,
1348
1431
  y: a,
@@ -1350,67 +1433,67 @@ function Pn(t, e, n) {
1350
1433
  scaleY: c,
1351
1434
  rotate: u,
1352
1435
  blur: d,
1353
- brightness: m
1436
+ brightness: h
1354
1437
  });
1355
- return qt(() => {
1438
+ return ot(() => {
1356
1439
  if (!i || Object.keys(i).length === 0) return;
1357
1440
  const k = x.current, y = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Set();
1358
- let $ = !1;
1359
- const v = (b, C) => {
1360
- const V = e.transitionSignal(C).peek() ?? t.transitions?.[Cn(b)], Z = Q(V ?? Nn);
1441
+ let v = !1;
1442
+ const $ = (b, O) => {
1443
+ const V = e.transitionSignal(O).peek() ?? t.transitions?.[Hn(b)], Z = Q(V ?? zn);
1361
1444
  return r > 0 && !w.has(b) ? { ...Z, delay: r / 1e3 } : Z;
1362
- }, T = (b, C, O) => {
1363
- const V = re[b], Z = q(n, i[b]);
1445
+ }, j = (b, O, N) => {
1446
+ const V = ae[b], Z = q(n, i[b]);
1364
1447
  if (V !== void 0) {
1365
- const P = Fn(C);
1448
+ const P = Pn(O);
1366
1449
  if (P === null) {
1367
1450
  D(`bindAnimate.${b}`, t.id);
1368
1451
  return;
1369
1452
  }
1370
1453
  const L = p.get(b);
1371
- if (O || L === void 0) {
1372
- p.set(b, { current: P }), A((lt) => ({ ...lt, [V]: zt(P) }));
1454
+ if (N || L === void 0) {
1455
+ p.set(b, { current: P }), A((ut) => ({ ...ut, [V]: Xt(P) }));
1373
1456
  return;
1374
1457
  }
1375
- const ue = L.current, fe = v(b, Z);
1458
+ const he = L.current, ge = $(b, Z);
1376
1459
  w.add(b), y.get(`color:${b}`)?.stop(), y.set(
1377
1460
  `color:${b}`,
1378
- At(0, 1, {
1379
- ...fe,
1380
- onUpdate: (lt) => {
1381
- const Mt = Tn(ue, P, lt);
1382
- L.current = Mt, A((de) => ({ ...de, [V]: zt(Mt) }));
1461
+ _t(0, 1, {
1462
+ ...ge,
1463
+ onUpdate: (ut) => {
1464
+ const Rt = Bn(he, P, ut);
1465
+ L.current = Rt, A((me) => ({ ...me, [V]: Xt(Rt) }));
1383
1466
  }
1384
1467
  })
1385
1468
  );
1386
1469
  return;
1387
1470
  }
1388
- const at = jn(b, C);
1389
- if (at === null) {
1390
- b.startsWith("filter.") ? Yt(`bindAnimate.${b}`, t.id) : En(b, t.id);
1471
+ const ct = Ln(b, O);
1472
+ if (ct === null) {
1473
+ b.startsWith("filter.") ? Vt(`bindAnimate.${b}`, t.id) : Gn(b, t.id);
1391
1474
  return;
1392
1475
  }
1393
- if (O) {
1394
- for (const [P, L] of Object.entries(at))
1476
+ if (N) {
1477
+ for (const [P, L] of Object.entries(ct))
1395
1478
  k[P].jump(L);
1396
1479
  return;
1397
1480
  }
1398
- const ce = v(b, Z);
1481
+ const pe = $(b, Z);
1399
1482
  w.add(b);
1400
- for (const [P, L] of Object.entries(at))
1401
- y.set(P, At(k[P], L, ce));
1402
- }, U = Mn((b, C) => T(b, C, !1)), _ = Object.entries(i).map(
1403
- ([b, C]) => ye(() => {
1404
- const O = e.signal(q(n, C)).value;
1405
- O !== void 0 && ($ ? U.push(b, O) : T(b, O, !0));
1483
+ for (const [P, L] of Object.entries(ct))
1484
+ y.set(P, _t(k[P], L, pe));
1485
+ }, K = On((b, O) => j(b, O, !1)), R = Object.entries(i).map(
1486
+ ([b, O]) => xe(() => {
1487
+ const N = e.signal(q(n, O)).value;
1488
+ N !== void 0 && (v ? K.push(b, N) : j(b, N, !0));
1406
1489
  })
1407
1490
  );
1408
- return $ = !0, () => {
1409
- for (const b of _) b();
1410
- U.dispose();
1491
+ return v = !0, () => {
1492
+ for (const b of R) b();
1493
+ K.dispose();
1411
1494
  for (const b of y.values()) b.stop();
1412
1495
  };
1413
- }, [t, i, e, n, r]), { motionStyle: Gt(() => {
1496
+ }, [t, i, e, n, r]), { motionStyle: Kt(() => {
1414
1497
  if (!i) return null;
1415
1498
  const k = {};
1416
1499
  let y = !1;
@@ -1430,36 +1513,36 @@ function Pn(t, e, n) {
1430
1513
  break;
1431
1514
  case "filter.blur":
1432
1515
  case "filter.brightness":
1433
- k.filter = h, y = !0;
1516
+ k.filter = g, y = !0;
1434
1517
  break;
1435
1518
  }
1436
1519
  return y ? (k.willChange = "transform, opacity, filter", k) : null;
1437
- }, [i, s, o, a, l, c, u, h]), colorProps: g };
1520
+ }, [i, s, o, a, l, c, u, g]), colorProps: m };
1438
1521
  }
1439
- function En(t, e) {
1522
+ function Gn(t, e) {
1440
1523
  S(
1441
1524
  e,
1442
1525
  `bindAnimate.${t}`,
1443
1526
  "rejected bound value : JSON shape does not match the property type (LSML §6.3)"
1444
1527
  );
1445
1528
  }
1446
- const ie = /* @__PURE__ */ new Set(["alpha", "luminance"]), kt = 180, oe = /* @__PURE__ */ new Set(["intersect", "subtract", "union"]);
1447
- let gt = 0;
1448
- function Dn() {
1449
- return gt = (gt + 1) % 1e6, `lumen-mask-${gt.toString(36)}`;
1529
+ const le = /* @__PURE__ */ new Set(["alpha", "luminance"]), xt = 180, ce = /* @__PURE__ */ new Set(["intersect", "subtract", "union"]);
1530
+ let bt = 0;
1531
+ function Yn() {
1532
+ return bt = (bt + 1) % 1e6, `lumen-mask-${bt.toString(36)}`;
1450
1533
  }
1451
- function Bn(t) {
1534
+ function Xn(t) {
1452
1535
  return /^[A-Za-z0-9_:-]+$/.test(t) ? t : null;
1453
1536
  }
1454
1537
  function M(t) {
1455
1538
  return typeof t == "number" && Number.isFinite(t);
1456
1539
  }
1457
- function Ln(t, e) {
1540
+ function In(t, e) {
1458
1541
  if (typeof t != "object" || t === null) return null;
1459
1542
  const n = t;
1460
- if (typeof n.type != "string" || !ie.has(n.type))
1543
+ if (typeof n.type != "string" || !le.has(n.type))
1461
1544
  return S(e, "mask.type", "is not alpha|luminance ; mask omitted (ADR 002 §3.2, T4)"), null;
1462
- if (typeof n.op != "string" || !oe.has(n.op))
1545
+ if (typeof n.op != "string" || !ce.has(n.op))
1463
1546
  return S(
1464
1547
  e,
1465
1548
  "mask.op",
@@ -1488,18 +1571,18 @@ function Ln(t, e) {
1488
1571
  const l = n.size;
1489
1572
  return l && M(l.w) && M(l.h) && (o.size = { w: l.w, h: l.h }), o;
1490
1573
  }
1491
- function Hn(t, e, n, i, r, s = !1) {
1492
- if (!ie.has(t.type) || !oe.has(t.op))
1574
+ function Un(t, e, n, i, r, s = !1) {
1575
+ if (!le.has(t.type) || !ce.has(t.op))
1493
1576
  return S(n, "mask", "type/op outside the closed enum ; mask omitted (T4)"), null;
1494
- const o = Dn(), a = t.position?.x, l = t.position?.y, c = t.size?.w, u = t.size?.h, d = {
1577
+ const o = Yn(), a = t.position?.x, l = t.position?.y, c = t.size?.w, u = t.size?.h, d = {
1495
1578
  ...M(a) ? { x: a } : {},
1496
1579
  ...M(l) ? { y: l } : {},
1497
1580
  ...M(c) ? { width: c } : {},
1498
1581
  ...M(u) ? { height: u } : {}
1499
1582
  };
1500
- let m;
1583
+ let h;
1501
1584
  if (t.source.kind === "image") {
1502
- const x = It(t.source.src, e);
1585
+ const x = Jt(t.source.src, e);
1503
1586
  if (!x.allowed)
1504
1587
  return S(
1505
1588
  n,
@@ -1507,18 +1590,18 @@ function Hn(t, e, n, i, r, s = !1) {
1507
1590
  `image host/scheme rejected ; mask omitted (T1/T2 — ${x.reason ?? "denied"})`
1508
1591
  ), null;
1509
1592
  if (t.op === "intersect") {
1510
- const k = t.type === "alpha" ? "alpha" : "luminance", y = `url("${t.source.src}")`, p = t.source.srcRect, w = p && M(p.x) && M(p.y) && M(p.w) && M(p.h), $ = w ? `${p.w}px ${p.h}px` : "cover", v = w ? `${p.x}px ${p.y}px` : "center";
1593
+ const k = t.type === "alpha" ? "alpha" : "luminance", y = `url("${t.source.src}")`, p = t.source.srcRect, w = p && M(p.x) && M(p.y) && M(p.w) && M(p.h), v = w ? `${p.w}px ${p.h}px` : "cover", $ = w ? `${p.x}px ${p.y}px` : "center";
1511
1594
  return {
1512
1595
  def: /* @__PURE__ */ f("defs", {}, o),
1513
1596
  style: {
1514
1597
  maskImage: y,
1515
1598
  WebkitMaskImage: y,
1516
- maskSize: $,
1517
- WebkitMaskSize: $,
1599
+ maskSize: v,
1600
+ WebkitMaskSize: v,
1518
1601
  maskRepeat: "no-repeat",
1519
1602
  WebkitMaskRepeat: "no-repeat",
1520
- maskPosition: v,
1521
- WebkitMaskPosition: v,
1603
+ maskPosition: $,
1604
+ WebkitMaskPosition: $,
1522
1605
  maskMode: k
1523
1606
  },
1524
1607
  id: o,
@@ -1526,9 +1609,9 @@ function Hn(t, e, n, i, r, s = !1) {
1526
1609
  };
1527
1610
  }
1528
1611
  const F = Object.keys(d).length > 0 ? d : M(r?.w) && M(r?.h) ? { x: 0, y: 0, width: r.w, height: r.h } : { width: "100%", height: "100%" };
1529
- m = /* @__PURE__ */ f("image", { href: t.source.src, preserveAspectRatio: "none", ...F });
1612
+ h = /* @__PURE__ */ f("image", { href: t.source.src, preserveAspectRatio: "none", ...F });
1530
1613
  } else {
1531
- const x = Bn(t.source.ref);
1614
+ const x = Xn(t.source.ref);
1532
1615
  if (x === null)
1533
1616
  return S(
1534
1617
  n,
@@ -1542,7 +1625,7 @@ function Hn(t, e, n, i, r, s = !1) {
1542
1625
  "mask.source.ref",
1543
1626
  "shape ref does not resolve to an indexed shape ; mask omitted (ADR 002 A2.1 #K)"
1544
1627
  ), null;
1545
- m = Object.keys(d).length > 0 ? /* @__PURE__ */ f(
1628
+ h = Object.keys(d).length > 0 ? /* @__PURE__ */ f(
1546
1629
  "g",
1547
1630
  {
1548
1631
  transform: M(d.x) || M(d.y) ? `translate(${M(d.x) ? d.x : 0} ${M(d.y) ? d.y : 0})` : void 0,
@@ -1550,16 +1633,16 @@ function Hn(t, e, n, i, r, s = !1) {
1550
1633
  }
1551
1634
  ) : F;
1552
1635
  }
1553
- s && (m = /* @__PURE__ */ f("g", { transform: `translate(${kt} ${kt})`, children: m }, "feather-pad"));
1554
- let h;
1555
- t.op === "intersect" ? h = m : t.op === "union" ? h = /* @__PURE__ */ G(J, { children: [
1636
+ s && (h = /* @__PURE__ */ f("g", { transform: `translate(${xt} ${xt})`, children: h }, "feather-pad"));
1637
+ let g;
1638
+ t.op === "intersect" ? g = h : t.op === "union" ? g = /* @__PURE__ */ G(J, { children: [
1556
1639
  /* @__PURE__ */ f("rect", { x: 0, y: 0, width: "100%", height: "100%", fill: "white" }),
1557
- m
1558
- ] }) : h = /* @__PURE__ */ G(J, { children: [
1640
+ h
1641
+ ] }) : g = /* @__PURE__ */ G(J, { children: [
1559
1642
  /* @__PURE__ */ f("rect", { x: 0, y: 0, width: "100%", height: "100%", fill: "white" }),
1560
- /* @__PURE__ */ f("g", { style: { filter: "invert(1)" }, children: m })
1643
+ /* @__PURE__ */ f("g", { style: { filter: "invert(1)" }, children: h })
1561
1644
  ] });
1562
- const g = /* @__PURE__ */ f(
1645
+ const m = /* @__PURE__ */ f(
1563
1646
  "mask",
1564
1647
  {
1565
1648
  id: o,
@@ -1569,15 +1652,15 @@ function Hn(t, e, n, i, r, s = !1) {
1569
1652
  width: "200%",
1570
1653
  height: "200%",
1571
1654
  ...t.type === "alpha" && t.source.kind !== "image" ? { "mask-type": "alpha" } : {},
1572
- children: h
1655
+ children: g
1573
1656
  },
1574
1657
  o
1575
1658
  ), A = `url(#${o})`;
1576
- return { def: g, style: { mask: A, WebkitMask: A }, id: o, feather: s };
1659
+ return { def: m, style: { mask: A, WebkitMask: A }, id: o, feather: s };
1577
1660
  }
1578
- const se = /* @__PURE__ */ new Map(), ae = rt(se);
1579
- function ir(t) {
1580
- if (!t) return se;
1661
+ const ue = /* @__PURE__ */ new Map(), fe = st(ue);
1662
+ function dr(t) {
1663
+ if (!t) return ue;
1581
1664
  const e = /* @__PURE__ */ new Map(), n = [t];
1582
1665
  for (; n.length > 0; ) {
1583
1666
  const i = n.pop();
@@ -1592,39 +1675,39 @@ function ir(t) {
1592
1675
  }
1593
1676
  return e;
1594
1677
  }
1595
- function or({
1678
+ function pr({
1596
1679
  index: t,
1597
1680
  children: e
1598
1681
  }) {
1599
- return /* @__PURE__ */ f(ae.Provider, { value: t, children: e });
1682
+ return /* @__PURE__ */ f(fe.Provider, { value: t, children: e });
1600
1683
  }
1601
- function zn() {
1602
- return K(ae);
1684
+ function Kn() {
1685
+ return U(fe);
1603
1686
  }
1604
- function le({ node: t, store: e }) {
1605
- return t.kind === "repeat" ? /* @__PURE__ */ f(Xn, { node: t, store: e }) : /* @__PURE__ */ f(Wn, { node: t, store: e });
1687
+ function de({ node: t, store: e }) {
1688
+ return t.kind === "repeat" ? /* @__PURE__ */ f(tr, { node: t, store: e }) : /* @__PURE__ */ f(Vn, { node: t, store: e });
1606
1689
  }
1607
- function Wn({ node: t, store: e }) {
1608
- wt();
1609
- const n = vt(), i = st(), r = zn(), s = Gt(
1610
- () => In(t, e, n),
1690
+ function Vn({ node: t, store: e }) {
1691
+ vt();
1692
+ const n = At(), i = tt(), r = Kn(), s = Kt(
1693
+ () => er(t, e, n),
1611
1694
  // We re-build per render — signals re-render cheaply, and the
1612
1695
  // resolution itself is O(bindings) which is small. The memo is a
1613
1696
  // micro-optimisation to keep object identity stable across renders
1614
1697
  // when the inputs haven't changed.
1615
- [t, e, n, ...Kn(t, e, n)]
1616
- ), o = Pn(t, e, n);
1617
- Xt(t);
1618
- const a = hn[t.kind];
1698
+ [t, e, n, ...nr(t, e, n)]
1699
+ ), o = qn(t, e, n);
1700
+ Zt(t);
1701
+ const a = vn[t.kind];
1619
1702
  if (!a)
1620
1703
  return S(t.id, "kind", "unknown render kind ; node not rendered"), null;
1621
1704
  const l = {};
1622
1705
  if (t.bindings)
1623
1706
  for (const [p, w] of Object.entries(t.bindings)) {
1624
- const $ = e.transitionSignal(q(n, w)).value;
1625
- $ !== void 0 && (l[p] = $);
1707
+ const v = e.transitionSignal(q(n, w)).value;
1708
+ v !== void 0 && (l[p] = v);
1626
1709
  }
1627
- const c = (p) => p in l ? l[p] : t.transitions?.[p], u = t.children?.map((p, w) => /* @__PURE__ */ f(le, { node: p, store: e }, p.id ?? w)), d = s.mask !== void 0 && typeof s.blendMode == "string" && Y(s.blendMode) !== void 0, m = {
1710
+ const c = (p) => p in l ? l[p] : t.transitions?.[p], u = t.children?.map((p, w) => /* @__PURE__ */ f(de, { node: p, store: e }, p.id ?? w)), d = s.mask !== void 0 && typeof s.blendMode == "string" && Y(s.blendMode) !== void 0, h = {
1628
1711
  visible: typeof s.visible == "boolean" ? s.visible : void 0,
1629
1712
  opacity: typeof s.universal_opacity == "number" ? s.universal_opacity : void 0,
1630
1713
  // A frame applies its own static rotation (frame.tsx) so it pivots around
@@ -1636,9 +1719,9 @@ function Wn({ node: t, store: e }) {
1636
1719
  // (frame.tsx) ; non-frames carry it on the wrapper, composed with rotation.
1637
1720
  flipY: t.kind === "frame" ? void 0 : s.flipY === !0,
1638
1721
  blur: typeof s.blur == "number" ? s.blur : void 0,
1639
- sizing: qn(s.sizing),
1640
- position: t.kind === "frame" ? void 0 : Gn(s),
1641
- size: t.kind === "frame" ? void 0 : Wt(s),
1722
+ sizing: Zn(s.sizing),
1723
+ position: t.kind === "frame" ? void 0 : Jn(s),
1724
+ size: t.kind === "frame" ? void 0 : It(s),
1642
1725
  // ADR 002 §3.2 (D2 / #D) — `blendMode` is a universal prop on every
1643
1726
  // primitive ; the wrapper re-validates it against the closed enum
1644
1727
  // before applying `mix-blend-mode` (T4 runtime gate). Pass the raw
@@ -1649,39 +1732,39 @@ function Wn({ node: t, store: e }) {
1649
1732
  // hard-light showed the raw blue wave instead of compositing over the warm
1650
1733
  // gradient). Drop it here when it will be hoisted.
1651
1734
  blendMode: typeof s.blendMode == "string" && !d ? s.blendMode : void 0
1652
- }, h = t.children?.some(Yn) ?? !1, g = Object.keys(o.colorProps).length > 0 ? { ...s, ...o.colorProps } : s, A = /* @__PURE__ */ f(
1735
+ }, g = t.children?.some(Qn) ?? !1, m = Object.keys(o.colorProps).length > 0 ? { ...s, ...o.colorProps } : s, A = /* @__PURE__ */ f(
1653
1736
  a,
1654
1737
  {
1655
- resolved: g,
1738
+ resolved: m,
1656
1739
  nodeId: t.id,
1657
1740
  transitionFor: c,
1658
1741
  animateInitial: t.animate_initial,
1659
- establishesContainingBlock: h,
1742
+ establishesContainingBlock: g,
1660
1743
  children: u
1661
1744
  }
1662
1745
  );
1663
1746
  let x = null;
1664
1747
  if (s.mask !== void 0) {
1665
- const p = Ln(s.mask, t.id), w = (v) => {
1666
- const T = r.get(v);
1667
- return T ? T.kind === "frame" ? cn(T, T.id) : an(T, T.id) : null;
1748
+ const p = In(s.mask, t.id), w = ($) => {
1749
+ const j = r.get($);
1750
+ return j ? j.kind === "frame" ? pn(j, j.id) : fn(j, j.id) : null;
1668
1751
  };
1669
- let $ = !1;
1752
+ let v = !1;
1670
1753
  if (p) {
1671
- const v = p.source;
1672
- if ((v.kind === "group" || v.kind === "shape") && typeof v.ref == "string") {
1673
- const T = r.get(v.ref);
1674
- $ = T ? ee(T) : !1;
1754
+ const $ = p.source;
1755
+ if (($.kind === "group" || $.kind === "shape") && typeof $.ref == "string") {
1756
+ const j = r.get($.ref);
1757
+ v = j ? oe(j) : !1;
1675
1758
  }
1676
1759
  }
1677
- x = p ? Hn(p, i, t.id, w, Wt(s), $) : null;
1760
+ x = p ? Un(p, i, t.id, w, It(s), v) : null;
1678
1761
  }
1679
1762
  const F = x !== null && x.style != null && "maskImage" in x.style;
1680
1763
  let k = A;
1681
1764
  x && F && (k = /* @__PURE__ */ f("div", { style: { width: "100%", height: "100%", ...x.style }, children: k }));
1682
- let y = /* @__PURE__ */ f(yn, { ...m, children: k });
1765
+ let y = /* @__PURE__ */ f(Mn, { ...h, children: k });
1683
1766
  if (x && !F) {
1684
- const p = x.feather ? kt : 0;
1767
+ const p = x.feather ? xt : 0;
1685
1768
  y = /* @__PURE__ */ G(
1686
1769
  "div",
1687
1770
  {
@@ -1712,9 +1795,9 @@ function Wn({ node: t, store: e }) {
1712
1795
  }
1713
1796
  );
1714
1797
  }
1715
- return o.motionStyle && (y = /* @__PURE__ */ f(I.div, { "data-lumencast-bind-animate": t.id ?? "", style: o.motionStyle, children: y })), t.keyframes ? /* @__PURE__ */ f($n, { keyframes: t.keyframes, store: e, nodeId: t.id, children: y }) : y;
1798
+ return o.motionStyle && (y = /* @__PURE__ */ f(I.div, { "data-lumencast-bind-animate": t.id ?? "", style: o.motionStyle, children: y })), t.keyframes ? /* @__PURE__ */ f(jn, { keyframes: t.keyframes, store: e, nodeId: t.id, children: y }) : y;
1716
1799
  }
1717
- function qn(t) {
1800
+ function Zn(t) {
1718
1801
  if (typeof t != "object" || t === null) return;
1719
1802
  const e = t, n = {};
1720
1803
  return (e.x === "fixed" || e.x === "hug" || e.x === "fill") && (n.x = e.x), (e.y === "fixed" || e.y === "hug" || e.y === "fill") && (n.y = e.y), n.x !== void 0 || n.y !== void 0 ? n : void 0;
@@ -1722,36 +1805,36 @@ function qn(t) {
1722
1805
  function X(t) {
1723
1806
  return typeof t == "number" && Number.isFinite(t) ? t : void 0;
1724
1807
  }
1725
- function Gn(t) {
1808
+ function Jn(t) {
1726
1809
  const e = X(t.x), n = X(t.y);
1727
1810
  if (!(e === void 0 || n === void 0))
1728
1811
  return { x: e, y: n };
1729
1812
  }
1730
- function Wt(t) {
1813
+ function It(t) {
1731
1814
  const e = X(t.width), n = X(t.height);
1732
1815
  if (!(e === void 0 && n === void 0))
1733
1816
  return { w: e, h: n };
1734
1817
  }
1735
- function Yn(t) {
1818
+ function Qn(t) {
1736
1819
  if (t.kind === "frame") return !1;
1737
1820
  const e = t.props ?? {}, n = t.bindings ?? {}, i = X(e.x) !== void 0 || "x" in n, r = X(e.y) !== void 0 || "y" in n;
1738
1821
  return i && r;
1739
1822
  }
1740
- function Xn({ node: t, store: e }) {
1741
- wt();
1742
- const n = vt();
1743
- Xt(t);
1823
+ function tr({ node: t, store: e }) {
1824
+ vt();
1825
+ const n = At();
1826
+ Zt(t);
1744
1827
  const i = t.bindings?.items, r = i === void 0 ? [] : e.signal(q(n, i)).value ?? [];
1745
1828
  if (!Array.isArray(r)) return null;
1746
1829
  const s = t.children?.[0];
1747
1830
  if (!s) return null;
1748
1831
  const o = typeof t.stagger_ms == "number" ? t.stagger_ms : 0;
1749
1832
  return /* @__PURE__ */ f(J, { children: r.map((a, l) => {
1750
- const c = xn(l, o), u = /* @__PURE__ */ f(gn, { prefix: `${i ?? ""}.${l}`, children: /* @__PURE__ */ f(le, { node: s, store: e }) }, l);
1751
- return c <= 0 ? u : /* @__PURE__ */ f(St.Provider, { value: c, children: u }, l);
1833
+ const c = _n(l, o), u = /* @__PURE__ */ f($n, { prefix: `${i ?? ""}.${l}`, children: /* @__PURE__ */ f(de, { node: s, store: e }) }, l);
1834
+ return c <= 0 ? u : /* @__PURE__ */ f(Ft.Provider, { value: c, children: u }, l);
1752
1835
  }) });
1753
1836
  }
1754
- function In(t, e, n) {
1837
+ function er(t, e, n) {
1755
1838
  const i = { ...t.props ?? {} };
1756
1839
  if (t.bindings)
1757
1840
  for (const [r, s] of Object.entries(t.bindings)) {
@@ -1760,7 +1843,7 @@ function In(t, e, n) {
1760
1843
  }
1761
1844
  return i;
1762
1845
  }
1763
- function Kn(t, e, n) {
1846
+ function nr(t, e, n) {
1764
1847
  if (!t.bindings) return [];
1765
1848
  const i = [];
1766
1849
  for (const r of Object.values(t.bindings))
@@ -1768,10 +1851,10 @@ function Kn(t, e, n) {
1768
1851
  return i;
1769
1852
  }
1770
1853
  export {
1771
- nr as A,
1772
- or as S,
1773
- le as T,
1774
- ir as b,
1775
- rr as r
1854
+ ur as A,
1855
+ pr as S,
1856
+ de as T,
1857
+ dr as b,
1858
+ fr as r
1776
1859
  };
1777
- //# sourceMappingURL=tree-BIimahCf.js.map
1860
+ //# sourceMappingURL=tree-BLIxJbD3.js.map