@lumencast/runtime 0.12.0 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/{broadcast-ydSpPUje.js → broadcast-DrifeSRm.js} +3 -3
- package/dist/{broadcast-ydSpPUje.js.map → broadcast-DrifeSRm.js.map} +1 -1
- package/dist/{control-zTsF-bHP.js → control-CdGT0wrz.js} +4 -4
- package/dist/{control-zTsF-bHP.js.map → control-CdGT0wrz.js.map} +1 -1
- package/dist/{index-ClWi5UzJ.js → index-BH-3p9mt.js} +47 -38
- package/dist/index-BH-3p9mt.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/lumencast.js +1 -1
- package/dist/render/bundle.d.ts.map +1 -1
- package/dist/render/bundle.js +14 -0
- package/dist/render/bundle.js.map +1 -1
- package/dist/render/primitives/capture-stream-cache.d.ts +26 -0
- package/dist/render/primitives/capture-stream-cache.d.ts.map +1 -0
- package/dist/render/primitives/capture-stream-cache.js +141 -0
- package/dist/render/primitives/capture-stream-cache.js.map +1 -0
- package/dist/render/primitives/capture.d.ts +1 -1
- package/dist/render/primitives/capture.d.ts.map +1 -1
- package/dist/render/primitives/capture.js +20 -87
- package/dist/render/primitives/capture.js.map +1 -1
- package/dist/{status-pill-DkHIOL5V.js → status-pill-0rJyg4p3.js} +2 -2
- package/dist/{status-pill-DkHIOL5V.js.map → status-pill-0rJyg4p3.js.map} +1 -1
- package/dist/{test-COpMkyms.js → test-CYmNprVS.js} +4 -4
- package/dist/{test-COpMkyms.js.map → test-CYmNprVS.js.map} +1 -1
- package/dist/{tree-Cubmxeqo.js → tree-CyxbJbsP.js} +589 -567
- package/dist/tree-CyxbJbsP.js.map +1 -0
- package/package.json +4 -4
- package/src/render/bundle.ts +14 -0
- package/src/render/primitives/capture-stream-cache.ts +164 -0
- package/src/render/primitives/capture.tsx +19 -93
- package/dist/index-ClWi5UzJ.js.map +0 -1
- package/dist/tree-Cubmxeqo.js.map +0 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as f, jsxs as
|
|
2
|
-
import { useSignals as
|
|
3
|
-
import { motion as U, useMotionValue as L, useTransform as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { e as S, r as
|
|
6
|
-
import { checkHostAllowed as
|
|
7
|
-
import { effect as
|
|
8
|
-
function
|
|
9
|
-
const i = t.direction ?? "vertical", r =
|
|
1
|
+
import { jsx as f, jsxs as G, Fragment as tt } from "react/jsx-runtime";
|
|
2
|
+
import { useSignals as vt } from "@preact/signals-react/runtime";
|
|
3
|
+
import { motion as U, useMotionValue as L, useTransform as ke, animate as Tt } from "framer-motion";
|
|
4
|
+
import { createContext as at, useContext as K, useRef as et, useState as $t, useEffect as Y, useMemo as Vt } from "react";
|
|
5
|
+
import { e as S, r as lt, m as ct, t as nt, a as Zt, s as we, w as Jt, F as xe, c as Ct, b as Qt } from "./index-BH-3p9mt.js";
|
|
6
|
+
import { checkHostAllowed as te } from "@lumencast/protocol";
|
|
7
|
+
import { effect as ve } from "@preact/signals-react";
|
|
8
|
+
function $e({ resolved: t, children: e, establishesContainingBlock: n }) {
|
|
9
|
+
const i = t.direction ?? "vertical", r = Ot(t.gap, 0), s = t.wrap === !0, o = Ot(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
|
-
alignItems:
|
|
12
|
+
alignItems: a,
|
|
13
13
|
justifyContent: l,
|
|
14
14
|
// ADR 002 §3.1 (D1) — establish a containing block when a child is
|
|
15
15
|
// absolutely placed, so its `left/top` resolve against this stack.
|
|
16
16
|
// Untouched for pure auto-layout stacks (RC#2).
|
|
17
17
|
...n ? { position: "relative" } : {}
|
|
18
18
|
};
|
|
19
|
-
return
|
|
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
|
|
21
|
+
function Ot(t, e) {
|
|
22
22
|
return typeof t == "number" && Number.isFinite(t) ? t : e;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const i = t.cols ?? "1fr", r = t.rows ?? "auto",
|
|
24
|
+
function Se({ resolved: t, children: e, establishesContainingBlock: n }) {
|
|
25
|
+
const i = t.cols ?? "1fr", r = t.rows ?? "auto", s = t.gap ?? 0;
|
|
26
26
|
return /* @__PURE__ */ f(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
@@ -30,7 +30,7 @@ function $e({ resolved: t, children: e, establishesContainingBlock: n }) {
|
|
|
30
30
|
display: "grid",
|
|
31
31
|
gridTemplateColumns: i,
|
|
32
32
|
gridTemplateRows: r,
|
|
33
|
-
gap:
|
|
33
|
+
gap: s,
|
|
34
34
|
// ADR 002 §3.1 (D1) — establish a containing block for absolutely
|
|
35
35
|
// placed children ; untouched for pure auto-layout grids (RC#2).
|
|
36
36
|
...n ? { position: "relative" } : {}
|
|
@@ -39,35 +39,35 @@ function $e({ resolved: t, children: e, establishesContainingBlock: n }) {
|
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
|
-
const
|
|
43
|
-
`^rgba?\\(${j}(${q})(%?)${j},${j}(${q})(%?)${j},${j}(${q})(%?)${j}(?:,${j}${
|
|
44
|
-
),
|
|
45
|
-
`^hsla?\\(${j}(${q})(?:deg)?${j},${j}(${q})%${j},${j}(${q})%${j}(?:,${j}${
|
|
46
|
-
),
|
|
42
|
+
const Me = 64, Ae = /^[#a-zA-Z0-9(),.% ]{1,64}$/, Fe = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, q = String.raw`\d{1,3}(?:\.\d{1,4})?`, ee = String.raw`(?:0|1|0?\.\d{1,4}|${q}%)`, j = String.raw`[ ]{0,4}`, Re = new RegExp(
|
|
43
|
+
`^rgba?\\(${j}(${q})(%?)${j},${j}(${q})(%?)${j},${j}(${q})(%?)${j}(?:,${j}${ee}${j})?\\)$`
|
|
44
|
+
), je = new RegExp(
|
|
45
|
+
`^hsla?\\(${j}(${q})(?:deg)?${j},${j}(${q})%${j},${j}(${q})%${j}(?:,${j}${ee}${j})?\\)$`
|
|
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 D(t) {
|
|
50
50
|
if (typeof t != "string") return null;
|
|
51
51
|
const e = t.trim();
|
|
52
|
-
if (e.length === 0 || e.length >
|
|
52
|
+
if (e.length === 0 || e.length > Me) return null;
|
|
53
53
|
const n = e.toLowerCase();
|
|
54
|
-
if (n.includes("url(") || e.includes(";") || e.includes("}") || !
|
|
55
|
-
if (e.startsWith("#")) return
|
|
54
|
+
if (n.includes("url(") || e.includes(";") || e.includes("}") || !Ae.test(e)) return null;
|
|
55
|
+
if (e.startsWith("#")) return Fe.test(e) ? e : null;
|
|
56
56
|
if (n.startsWith("rgb")) {
|
|
57
|
-
const i =
|
|
57
|
+
const i = Re.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;
|
|
61
|
-
const
|
|
61
|
+
const s = r[0] === "%" ? 100 : 255;
|
|
62
62
|
for (const o of [i[1], i[3], i[5]])
|
|
63
|
-
if (Number(o) >
|
|
63
|
+
if (Number(o) > s) return null;
|
|
64
64
|
return n;
|
|
65
65
|
}
|
|
66
66
|
if (n.startsWith("hsl")) {
|
|
67
|
-
const i =
|
|
67
|
+
const i = je.exec(n);
|
|
68
68
|
return !i || Number(i[1]) > 360 || Number(i[2]) > 100 || Number(i[3]) > 100 ? null : n;
|
|
69
69
|
}
|
|
70
|
-
return
|
|
70
|
+
return _e.has(n) ? n : null;
|
|
71
71
|
}
|
|
72
72
|
function B(t, e) {
|
|
73
73
|
S(
|
|
@@ -76,29 +76,29 @@ function B(t, e) {
|
|
|
76
76
|
"rejected unsafe colour : not a strict hex/rgb()/hsl()/named colour"
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
|
-
const
|
|
80
|
-
function
|
|
79
|
+
const ne = at(void 0);
|
|
80
|
+
function gr({
|
|
81
81
|
hosts: t,
|
|
82
82
|
children: e
|
|
83
83
|
}) {
|
|
84
|
-
return /* @__PURE__ */ f(
|
|
84
|
+
return /* @__PURE__ */ f(ne.Provider, { value: t, children: e });
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
return K(
|
|
86
|
+
function rt() {
|
|
87
|
+
return K(ne);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function yr(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
|
|
95
|
+
function St(t, e, n, i) {
|
|
96
96
|
if (typeof t != "string" || t.length === 0) return;
|
|
97
|
-
const r =
|
|
97
|
+
const r = te(t, e);
|
|
98
98
|
if (r.allowed) return t;
|
|
99
99
|
S(i, n, r.reason ?? "asset host/scheme rejected");
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const Te = /* @__PURE__ */ new Set([
|
|
102
102
|
"normal",
|
|
103
103
|
"multiply",
|
|
104
104
|
"screen",
|
|
@@ -119,76 +119,76 @@ const _e = /* @__PURE__ */ new Set([
|
|
|
119
119
|
"plus-lighter"
|
|
120
120
|
]);
|
|
121
121
|
function X(t) {
|
|
122
|
-
return typeof t == "string" && _e.has(t) ? t : void 0;
|
|
123
|
-
}
|
|
124
|
-
const Te = /* @__PURE__ */ new Set(["cover", "contain", "fill", "none", "scale-down"]);
|
|
125
|
-
function Ce(t) {
|
|
126
122
|
return typeof t == "string" && Te.has(t) ? t : void 0;
|
|
127
123
|
}
|
|
128
|
-
|
|
129
|
-
function Ot() {
|
|
130
|
-
return ft = (ft + 1) % 1e6, `lumen-grad-${ft.toString(36)}`;
|
|
131
|
-
}
|
|
124
|
+
const Ce = /* @__PURE__ */ new Set(["cover", "contain", "fill", "none", "scale-down"]);
|
|
132
125
|
function Oe(t) {
|
|
126
|
+
return typeof t == "string" && Ce.has(t) ? t : void 0;
|
|
127
|
+
}
|
|
128
|
+
let dt = 0;
|
|
129
|
+
function Pt() {
|
|
130
|
+
return dt = (dt + 1) % 1e6, `lumen-grad-${dt.toString(36)}`;
|
|
131
|
+
}
|
|
132
|
+
function Pe(t) {
|
|
133
133
|
const e = X(t.blendMode);
|
|
134
134
|
if (t.kind === "solid") {
|
|
135
|
-
const
|
|
136
|
-
return { defs: [], ref:
|
|
135
|
+
const a = t.opacity !== void 0 ? kt(t.color, t.opacity) : t.color;
|
|
136
|
+
return { defs: [], ref: a, mixBlendMode: e };
|
|
137
137
|
}
|
|
138
138
|
if (t.kind === "image") {
|
|
139
|
-
const
|
|
139
|
+
const a = Pt(), l = Ee(t.objectFit);
|
|
140
140
|
return { defs: [
|
|
141
|
-
/* @__PURE__ */ f("pattern", { id:
|
|
142
|
-
], ref: `url(#${
|
|
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
|
+
], ref: `url(#${a})`, mixBlendMode: e };
|
|
143
143
|
}
|
|
144
|
-
const n =
|
|
144
|
+
const n = Pt();
|
|
145
145
|
if (t.kind === "linear-gradient") {
|
|
146
|
-
let
|
|
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
|
|
150
|
-
|
|
149
|
+
const m = Math.hypot(d[0], d[1]) || 1, g = d[0] / m, A = d[1] / m;
|
|
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;
|
|
151
151
|
} else {
|
|
152
|
-
const
|
|
153
|
-
|
|
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);
|
|
154
154
|
}
|
|
155
155
|
return { defs: [
|
|
156
156
|
/* @__PURE__ */ f(
|
|
157
157
|
"linearGradient",
|
|
158
158
|
{
|
|
159
159
|
id: n,
|
|
160
|
-
x1: `${
|
|
160
|
+
x1: `${a * 100}%`,
|
|
161
161
|
y1: `${l * 100}%`,
|
|
162
162
|
x2: `${c * 100}%`,
|
|
163
163
|
y2: `${u * 100}%`,
|
|
164
|
-
children: t.stops.map((
|
|
164
|
+
children: t.stops.map((m, g) => /* @__PURE__ */ f(
|
|
165
165
|
"stop",
|
|
166
166
|
{
|
|
167
|
-
offset:
|
|
168
|
-
stopColor:
|
|
169
|
-
...
|
|
167
|
+
offset: m.offset,
|
|
168
|
+
stopColor: m.color,
|
|
169
|
+
...m.opacity !== void 0 ? { stopOpacity: m.opacity } : {}
|
|
170
170
|
},
|
|
171
|
-
|
|
171
|
+
g
|
|
172
172
|
))
|
|
173
173
|
},
|
|
174
174
|
n
|
|
175
175
|
)
|
|
176
176
|
], ref: `url(#${n})`, mixBlendMode: e };
|
|
177
177
|
}
|
|
178
|
-
const i = t.center?.x ?? 0.5, r = t.center?.y ?? 0.5,
|
|
178
|
+
const i = t.center?.x ?? 0.5, r = t.center?.y ?? 0.5, s = t.radius ?? 0.5;
|
|
179
179
|
return { defs: [
|
|
180
|
-
/* @__PURE__ */ f("radialGradient", { id: n, cx: `${i * 100}%`, cy: `${r * 100}%`, r: `${
|
|
180
|
+
/* @__PURE__ */ f("radialGradient", { id: n, cx: `${i * 100}%`, cy: `${r * 100}%`, r: `${s * 100}%`, children: t.stops.map((a, l) => /* @__PURE__ */ f(
|
|
181
181
|
"stop",
|
|
182
182
|
{
|
|
183
|
-
offset:
|
|
184
|
-
stopColor:
|
|
185
|
-
...
|
|
183
|
+
offset: a.offset,
|
|
184
|
+
stopColor: a.color,
|
|
185
|
+
...a.opacity !== void 0 ? { stopOpacity: a.opacity } : {}
|
|
186
186
|
},
|
|
187
187
|
l
|
|
188
188
|
)) }, n)
|
|
189
189
|
], ref: `url(#${n})`, mixBlendMode: e };
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function Ne(t) {
|
|
192
192
|
switch (t) {
|
|
193
193
|
case "contain":
|
|
194
194
|
case "scale-down":
|
|
@@ -202,7 +202,7 @@ function Pe(t) {
|
|
|
202
202
|
return "cover";
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Ee(t) {
|
|
206
206
|
switch (t) {
|
|
207
207
|
case "contain":
|
|
208
208
|
case "scale-down":
|
|
@@ -216,49 +216,49 @@ function Ne(t) {
|
|
|
216
216
|
return "xMidYMid slice";
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function De(t, e) {
|
|
220
220
|
const n = [], i = [];
|
|
221
|
-
for (const
|
|
222
|
-
const l =
|
|
223
|
-
l && (i.push(l), n.push(
|
|
221
|
+
for (const a of t) {
|
|
222
|
+
const l = Le(a, e);
|
|
223
|
+
l && (i.push(l), n.push(a));
|
|
224
224
|
}
|
|
225
225
|
if (i.length === 0) return {};
|
|
226
|
-
const r = { backgroundImage: i.join(", ") },
|
|
227
|
-
|
|
228
|
-
const o = t.find((
|
|
229
|
-
return o && (r.backgroundSize =
|
|
226
|
+
const r = { backgroundImage: i.join(", ") }, s = n.map((a) => X(a.blendMode) ?? "normal");
|
|
227
|
+
s.some((a) => a !== "normal") && (r.backgroundBlendMode = s.join(", "));
|
|
228
|
+
const o = t.find((a) => a.kind === "image");
|
|
229
|
+
return o && (r.backgroundSize = Ne(o.objectFit), r.backgroundPosition = "center", r.backgroundRepeat = "no-repeat"), r;
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Be(t) {
|
|
232
232
|
return `url("${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}")`;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function Le(t, e) {
|
|
235
235
|
if (t.kind === "image")
|
|
236
|
-
return
|
|
236
|
+
return Be(t.src);
|
|
237
237
|
if (t.kind === "solid") {
|
|
238
238
|
const o = D(t.color);
|
|
239
239
|
if (o === null)
|
|
240
240
|
return B("fill.color", e), null;
|
|
241
|
-
const
|
|
242
|
-
return `linear-gradient(${
|
|
241
|
+
const a = t.opacity !== void 0 ? kt(o, t.opacity) : o;
|
|
242
|
+
return `linear-gradient(${a}, ${a})`;
|
|
243
243
|
}
|
|
244
244
|
const n = [];
|
|
245
245
|
for (const o of t.stops) {
|
|
246
|
-
const
|
|
247
|
-
if (
|
|
246
|
+
const a = D(o.color);
|
|
247
|
+
if (a === null)
|
|
248
248
|
return B("fill.stops.color", e), null;
|
|
249
|
-
const l = o.opacity !== void 0 ?
|
|
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(", ");
|
|
253
253
|
if (t.kind === "linear-gradient") {
|
|
254
254
|
let o = t.angle_deg ?? 0;
|
|
255
|
-
const
|
|
256
|
-
return Array.isArray(
|
|
255
|
+
const a = t.transform;
|
|
256
|
+
return Array.isArray(a) && a.length === 6 && Number.isFinite(a[0]) && Number.isFinite(a[1]) && (o = (Math.atan2(a[0], -a[1]) * 180 / Math.PI + 360) % 360), `linear-gradient(${o}deg, ${i})`;
|
|
257
257
|
}
|
|
258
|
-
const r = (t.center?.x ?? 0.5) * 100,
|
|
259
|
-
return `radial-gradient(circle at ${r}% ${
|
|
258
|
+
const r = (t.center?.x ?? 0.5) * 100, s = (t.center?.y ?? 0.5) * 100;
|
|
259
|
+
return `radial-gradient(circle at ${r}% ${s}%, ${i})`;
|
|
260
260
|
}
|
|
261
|
-
function
|
|
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 bt(t, e) {
|
|
|
266
266
|
}
|
|
267
267
|
return `color-mix(in srgb, ${t} ${e * 100}%, transparent)`;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function ze(t, e, n) {
|
|
270
270
|
const i = [];
|
|
271
271
|
for (const r of t) {
|
|
272
272
|
if (r.kind === "image") {
|
|
@@ -274,38 +274,38 @@ function Le(t, e, n) {
|
|
|
274
274
|
continue;
|
|
275
275
|
}
|
|
276
276
|
if (r.kind === "solid") {
|
|
277
|
-
const
|
|
278
|
-
if (
|
|
277
|
+
const a = D(r.color);
|
|
278
|
+
if (a === null) {
|
|
279
279
|
B(`${e}.color`, n);
|
|
280
280
|
continue;
|
|
281
281
|
}
|
|
282
|
-
i.push({ ...r, color:
|
|
282
|
+
i.push({ ...r, color: a });
|
|
283
283
|
continue;
|
|
284
284
|
}
|
|
285
|
-
const
|
|
285
|
+
const s = [];
|
|
286
286
|
let o = !1;
|
|
287
|
-
for (const
|
|
288
|
-
const l = D(
|
|
287
|
+
for (const a of r.stops ?? []) {
|
|
288
|
+
const l = D(a.color);
|
|
289
289
|
if (l === null) {
|
|
290
290
|
B(`${e}.stops.color`, n), o = !0;
|
|
291
291
|
break;
|
|
292
292
|
}
|
|
293
|
-
|
|
293
|
+
s.push({ ...a, color: l });
|
|
294
294
|
}
|
|
295
|
-
o || i.push({ ...r, stops:
|
|
295
|
+
o || i.push({ ...r, stops: s });
|
|
296
296
|
}
|
|
297
297
|
return i;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function re(t, e, n) {
|
|
300
300
|
if (!Array.isArray(t)) return [];
|
|
301
301
|
if (e !== void 0)
|
|
302
302
|
for (const i of t)
|
|
303
|
-
|
|
303
|
+
Nt(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(
|
|
308
|
+
return t.filter(Nt).map((i) => {
|
|
309
309
|
let r = i;
|
|
310
310
|
if (r.blendMode !== void 0 && X(r.blendMode) === void 0) {
|
|
311
311
|
S(
|
|
@@ -313,46 +313,46 @@ function ne(t, e, n) {
|
|
|
313
313
|
e !== void 0 ? `${e}.blendMode` : "fill.blendMode",
|
|
314
314
|
"is not a recognised mix-blend-mode ; falling back to normal (ADR 002 §3.2)"
|
|
315
315
|
);
|
|
316
|
-
const { blendMode: o, ...
|
|
317
|
-
r =
|
|
316
|
+
const { blendMode: o, ...a } = r;
|
|
317
|
+
r = a;
|
|
318
318
|
}
|
|
319
319
|
if (r.kind !== "image" || r.objectFit === void 0) return r;
|
|
320
|
-
const
|
|
321
|
-
if (
|
|
320
|
+
const s = Oe(r.objectFit);
|
|
321
|
+
if (s === void 0) {
|
|
322
322
|
S(
|
|
323
323
|
n,
|
|
324
324
|
e !== void 0 ? `${e}.objectFit` : "fill.objectFit",
|
|
325
325
|
"is not a recognised object-fit ; falling back to default (ADR 002 §3.2)"
|
|
326
326
|
);
|
|
327
|
-
const { objectFit: o, ...
|
|
328
|
-
return
|
|
327
|
+
const { objectFit: o, ...a } = r;
|
|
328
|
+
return a;
|
|
329
329
|
}
|
|
330
|
-
return { ...r, objectFit:
|
|
330
|
+
return { ...r, objectFit: s };
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function Nt(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
|
|
339
|
-
return t.filter((r) => r.kind !== "image" ? !0 :
|
|
338
|
+
function ie(t, e, n, i) {
|
|
339
|
+
return t.filter((r) => r.kind !== "image" ? !0 : St(r.src, e, `${n}.src`, i) !== void 0);
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function He({
|
|
342
342
|
resolved: t,
|
|
343
343
|
nodeId: e,
|
|
344
344
|
transitionFor: n,
|
|
345
345
|
animateInitial: i,
|
|
346
346
|
children: r
|
|
347
347
|
}) {
|
|
348
|
-
const
|
|
349
|
-
|
|
350
|
-
const x =
|
|
351
|
-
|
|
348
|
+
const s = O(t.x, 0), o = O(t.y, 0), a = Et(t.width), l = Et(t.height), c = O(t.opacity, 1), u = O(t.scale, 1), d = O(t.rotate, O(t.rotation, 0)), h = t.flipY === !0, m = O(t.radius, 0), g = t.background, A = g === void 0 ? void 0 : D(g);
|
|
349
|
+
g !== void 0 && A === null && B("frame.background", e);
|
|
350
|
+
const x = rt(), F = ie(
|
|
351
|
+
re(t.backgrounds, "frame.backgrounds", e),
|
|
352
352
|
x,
|
|
353
353
|
"frame.backgrounds",
|
|
354
354
|
e
|
|
355
|
-
), k =
|
|
355
|
+
), k = We(t.clipsContent, e), y = lt(
|
|
356
356
|
n,
|
|
357
357
|
["opacity", "scale", "rotate", "x", "y"],
|
|
358
358
|
i
|
|
@@ -360,7 +360,7 @@ function ze({
|
|
|
360
360
|
position: "absolute",
|
|
361
361
|
left: 0,
|
|
362
362
|
top: 0,
|
|
363
|
-
width:
|
|
363
|
+
width: a,
|
|
364
364
|
height: l,
|
|
365
365
|
// NB: NO permanent `will-change`. `will-change: opacity` makes the frame an
|
|
366
366
|
// isolated group (the browser pre-promotes it as if opacity < 1), which
|
|
@@ -373,13 +373,13 @@ function ze({
|
|
|
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
|
-
...
|
|
376
|
+
...m > 0 ? { borderRadius: m } : {}
|
|
377
377
|
};
|
|
378
|
-
F.length > 0 ? Object.assign(p,
|
|
379
|
-
const { filter: w, boxShadow: v } =
|
|
378
|
+
F.length > 0 ? Object.assign(p, De(F, e)) : A != null && (p.background = A);
|
|
379
|
+
const { filter: w, boxShadow: v } = qe(t.shadow, e);
|
|
380
380
|
v !== void 0 && (p.boxShadow = v), w !== void 0 && (p.filter = w);
|
|
381
|
-
const $ =
|
|
382
|
-
{ opacity: c, x:
|
|
381
|
+
const $ = ct(
|
|
382
|
+
{ opacity: c, x: s, y: o, scale: u, rotate: d, ...h ? { scaleY: -1 } : {} },
|
|
383
383
|
i,
|
|
384
384
|
e
|
|
385
385
|
);
|
|
@@ -389,160 +389,160 @@ function ze({
|
|
|
389
389
|
style: p,
|
|
390
390
|
initial: $.initial,
|
|
391
391
|
animate: $.animate,
|
|
392
|
-
transition:
|
|
392
|
+
transition: nt(y),
|
|
393
393
|
children: r
|
|
394
394
|
}
|
|
395
395
|
);
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function We(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
400
|
function O(t, e) {
|
|
401
401
|
return typeof t == "number" && Number.isFinite(t) ? t : e;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function qe(t, e) {
|
|
404
404
|
if (!Array.isArray(t) || t.length === 0) return {};
|
|
405
405
|
const n = [], i = [];
|
|
406
|
-
for (const
|
|
407
|
-
if (typeof
|
|
408
|
-
const o =
|
|
409
|
-
if (
|
|
406
|
+
for (const s of t) {
|
|
407
|
+
if (typeof s != "object" || s === null) continue;
|
|
408
|
+
const o = s, a = typeof o.color == "string" ? D(o.color) : null;
|
|
409
|
+
if (a === null) {
|
|
410
410
|
B("frame.shadow.color", e);
|
|
411
411
|
continue;
|
|
412
412
|
}
|
|
413
413
|
const l = O(o.x, 0), c = O(o.y, 0), u = O(o.blur, 0), d = O(o.spread, 0), h = o.inset === !0;
|
|
414
414
|
if (!h && d === 0)
|
|
415
|
-
n.push(`drop-shadow(${l}px ${c}px ${u / 2}px ${
|
|
415
|
+
n.push(`drop-shadow(${l}px ${c}px ${u / 2}px ${a})`);
|
|
416
416
|
else {
|
|
417
|
-
const
|
|
418
|
-
i.push(`${
|
|
417
|
+
const m = h ? "inset " : "";
|
|
418
|
+
i.push(`${m}${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
|
|
424
|
+
function Et(t) {
|
|
425
425
|
if (typeof t == "number" && Number.isFinite(t) || typeof t == "string" && t.length > 0) return t;
|
|
426
426
|
}
|
|
427
|
-
const
|
|
428
|
-
function
|
|
427
|
+
const Ie = /* @__PURE__ */ new Set(["none", "uppercase", "lowercase", "capitalize"]), Ge = /* @__PURE__ */ new Set(["none", "underline", "line-through"]), Ye = /* @__PURE__ */ new Set(["normal", "italic", "oblique"]), Xe = 1e3, Ue = 100, Dt = 1e3, Ke = /^[a-zA-Z0-9 ,.'"_-]{1,256}$/;
|
|
428
|
+
function Ve(t) {
|
|
429
429
|
if (typeof t != "string") return null;
|
|
430
430
|
const e = t.trim();
|
|
431
|
-
return e.length === 0 ? null :
|
|
431
|
+
return e.length === 0 ? null : Ke.test(e) ? e : null;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
434
|
-
const r = t.value === void 0 ? "" : String(t.value),
|
|
435
|
-
let
|
|
433
|
+
function Ze({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
|
|
434
|
+
const r = t.value === void 0 ? "" : String(t.value), s = t.size ?? "1rem", o = t.weight ?? 400;
|
|
435
|
+
let a;
|
|
436
436
|
if (t.font !== void 0) {
|
|
437
|
-
const
|
|
438
|
-
|
|
437
|
+
const g = Ve(t.font);
|
|
438
|
+
g === null ? S(e, "text.font", "rejected fontFamily : outside the family-list grammar") : a = g;
|
|
439
439
|
}
|
|
440
440
|
let l = "currentColor";
|
|
441
441
|
if (t.colour !== void 0) {
|
|
442
|
-
const
|
|
443
|
-
|
|
442
|
+
const g = D(t.colour);
|
|
443
|
+
g === null ? B("text.colour", e) : l = g;
|
|
444
444
|
}
|
|
445
|
-
const c = t.align ?? "start", u =
|
|
445
|
+
const c = t.align ?? "start", u = Je(t.opacity, 1), d = Qe(t, e), h = lt(n, ["opacity", "value"], i), m = ct({ opacity: u }, i, e);
|
|
446
446
|
return /* @__PURE__ */ f(
|
|
447
447
|
U.span,
|
|
448
448
|
{
|
|
449
449
|
style: {
|
|
450
450
|
display: "inline-block",
|
|
451
|
-
fontSize:
|
|
451
|
+
fontSize: s,
|
|
452
452
|
// `font` carries LSML text.style.fontFamily (spec'd in schema.json).
|
|
453
453
|
// Omitted => inherit the host/container font.
|
|
454
|
-
...
|
|
454
|
+
...a !== void 0 ? { fontFamily: a } : {},
|
|
455
455
|
fontWeight: o,
|
|
456
456
|
color: l,
|
|
457
457
|
textAlign: c,
|
|
458
458
|
...d
|
|
459
459
|
},
|
|
460
|
-
initial:
|
|
461
|
-
animate:
|
|
462
|
-
transition:
|
|
460
|
+
initial: m.initial,
|
|
461
|
+
animate: m.animate,
|
|
462
|
+
transition: nt(h),
|
|
463
463
|
children: r
|
|
464
464
|
}
|
|
465
465
|
);
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function Je(t, e) {
|
|
468
468
|
return typeof t == "number" && Number.isFinite(t) ? t : e;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
const n =
|
|
470
|
+
function Qe(t, e) {
|
|
471
|
+
const n = Bt(
|
|
472
472
|
t.lineHeight,
|
|
473
473
|
0,
|
|
474
|
-
|
|
474
|
+
Ue,
|
|
475
475
|
"text.lineHeight",
|
|
476
476
|
e
|
|
477
|
-
), i =
|
|
477
|
+
), i = Bt(
|
|
478
478
|
t.letterSpacing,
|
|
479
|
-
-
|
|
480
|
-
|
|
479
|
+
-Dt,
|
|
480
|
+
Dt,
|
|
481
481
|
"text.letterSpacing",
|
|
482
482
|
e
|
|
483
|
-
), r =
|
|
483
|
+
), r = pt(
|
|
484
484
|
t.textTransform,
|
|
485
|
-
|
|
485
|
+
Ie,
|
|
486
486
|
"text.textTransform",
|
|
487
487
|
e
|
|
488
|
-
),
|
|
488
|
+
), s = pt(
|
|
489
489
|
t.textDecoration,
|
|
490
490
|
Ge,
|
|
491
491
|
"text.textDecoration",
|
|
492
492
|
e
|
|
493
|
-
), o =
|
|
493
|
+
), o = pt(t.fontStyle, Ye, "text.fontStyle", e), a = tn(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.
|
|
497
497
|
...i !== void 0 ? { letterSpacing: `${i}px` } : {},
|
|
498
498
|
...r !== void 0 ? { textTransform: r } : {},
|
|
499
|
-
...
|
|
499
|
+
...s !== void 0 ? { textDecoration: s } : {},
|
|
500
500
|
...o !== void 0 ? { fontStyle: o } : {},
|
|
501
|
-
...
|
|
501
|
+
...a !== void 0 ? {
|
|
502
502
|
display: "-webkit-box",
|
|
503
503
|
WebkitBoxOrient: "vertical",
|
|
504
|
-
WebkitLineClamp:
|
|
504
|
+
WebkitLineClamp: a,
|
|
505
505
|
overflow: "hidden",
|
|
506
506
|
textOverflow: "ellipsis"
|
|
507
507
|
} : {}
|
|
508
508
|
};
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function pt(t, e, n, i) {
|
|
511
511
|
if (t !== void 0) {
|
|
512
512
|
if (typeof t == "string" && e.has(t)) return t;
|
|
513
|
-
|
|
513
|
+
Mt(n, i);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function Bt(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
|
-
|
|
519
|
+
Mt(i, r);
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function tn(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
|
-
|
|
525
|
+
Mt(n, i);
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function Mt(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
|
|
536
|
-
const r =
|
|
537
|
-
if (!
|
|
538
|
-
const o = typeof t.alt == "string" ? t.alt : "",
|
|
535
|
+
function en({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
|
|
536
|
+
const r = rt(), s = St(t.src, r, "image.src", e);
|
|
537
|
+
if (!s) return null;
|
|
538
|
+
const o = typeof t.alt == "string" ? t.alt : "", a = t.fit ?? "contain", l = t.position ?? "center", c = nn(t.opacity, 1), u = Lt(t.width, "100%"), d = Lt(t.height, "100%"), h = lt(n, ["opacity", "src"], i), m = ct({ opacity: c }, i, e);
|
|
539
539
|
return /* @__PURE__ */ f(
|
|
540
540
|
U.img,
|
|
541
541
|
{
|
|
542
|
-
src:
|
|
542
|
+
src: s,
|
|
543
543
|
alt: o,
|
|
544
544
|
style: {
|
|
545
|
-
objectFit:
|
|
545
|
+
objectFit: a,
|
|
546
546
|
objectPosition: l,
|
|
547
547
|
width: u,
|
|
548
548
|
height: d
|
|
@@ -553,55 +553,55 @@ function tn({ 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:
|
|
557
|
-
animate:
|
|
558
|
-
transition:
|
|
556
|
+
initial: m.initial,
|
|
557
|
+
animate: m.animate,
|
|
558
|
+
transition: nt(h),
|
|
559
559
|
draggable: !1
|
|
560
560
|
}
|
|
561
561
|
);
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function nn(t, e) {
|
|
564
564
|
return typeof t == "number" && Number.isFinite(t) ? t : e;
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function Lt(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
|
|
570
|
-
function
|
|
569
|
+
const rn = 8192, on = 4e3, sn = 64, an = new Set("MmLlHhVvCcSsQqTtAaZz");
|
|
570
|
+
function ht(t) {
|
|
571
571
|
return t >= 48 && t <= 57;
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function ln(t) {
|
|
574
574
|
return t === 32 || t === 9 || t === 13 || t === 10 || t === 44;
|
|
575
575
|
}
|
|
576
|
-
function
|
|
577
|
-
if (typeof t != "string" || t.length === 0 || t.length >
|
|
576
|
+
function zt(t) {
|
|
577
|
+
if (typeof t != "string" || t.length === 0 || t.length > rn) return null;
|
|
578
578
|
const e = t.trim();
|
|
579
579
|
if (e.length === 0) return null;
|
|
580
580
|
const n = e.toLowerCase();
|
|
581
581
|
if (n.includes("url(") || n.includes("data:") || e.includes("<") || e.includes("&")) return null;
|
|
582
582
|
const i = e.length;
|
|
583
|
-
let r = 0,
|
|
583
|
+
let r = 0, s = 0, o = !1;
|
|
584
584
|
for (; r < i; ) {
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
585
|
+
const a = e.charCodeAt(r);
|
|
586
|
+
if (ln(a)) {
|
|
587
587
|
r++;
|
|
588
588
|
continue;
|
|
589
589
|
}
|
|
590
590
|
const l = e[r];
|
|
591
|
-
if (
|
|
592
|
-
if (!o && l !== "M" && l !== "m" || (o = !0,
|
|
591
|
+
if (an.has(l)) {
|
|
592
|
+
if (!o && l !== "M" && l !== "m" || (o = !0, s++, s > on)) 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 &&
|
|
599
|
+
for (; r < i && ht(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 &&
|
|
604
|
+
for (; r < i && ht(e.charCodeAt(r)); )
|
|
605
605
|
r++, u++;
|
|
606
606
|
if (u === 0 && r < i && e[r] === ".") return null;
|
|
607
607
|
c += u;
|
|
@@ -610,57 +610,57 @@ function Lt(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 &&
|
|
613
|
+
for (; r < i && ht(e.charCodeAt(r)); )
|
|
614
614
|
r++, u++;
|
|
615
615
|
if (u === 0) return null;
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
return
|
|
618
|
+
return s === 0 ? null : e;
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function cn(t, e) {
|
|
621
621
|
const n = t.paths, i = t.pathData;
|
|
622
622
|
if (Array.isArray(n)) {
|
|
623
623
|
i !== void 0 && W(e, "shape.pathData", "mutually exclusive with paths[] ; paths[] wins");
|
|
624
624
|
const r = [];
|
|
625
|
-
for (let
|
|
626
|
-
if (r.length >=
|
|
625
|
+
for (let s = 0; s < n.length; s++) {
|
|
626
|
+
if (r.length >= sn) {
|
|
627
627
|
W(e, "shape.paths", "subpath cap exceeded ; remaining entries dropped");
|
|
628
628
|
break;
|
|
629
629
|
}
|
|
630
|
-
const o = n[
|
|
630
|
+
const o = n[s], a = zt(
|
|
631
631
|
typeof o == "object" && o !== null ? o.data : void 0
|
|
632
632
|
);
|
|
633
|
-
if (
|
|
633
|
+
if (a === null) {
|
|
634
634
|
W(e, "shape.paths.data", "not a strict SVG path grammar (allowlist/caps)");
|
|
635
635
|
continue;
|
|
636
636
|
}
|
|
637
|
-
r.push({ d:
|
|
637
|
+
r.push({ d: a, fillRule: un(o?.windingRule, e) });
|
|
638
638
|
}
|
|
639
639
|
return r.length === 0 && n.length > 0 && W(e, "shape.paths", "no renderable subpath ; shape geometry omitted"), r;
|
|
640
640
|
}
|
|
641
641
|
if (i !== void 0) {
|
|
642
|
-
const r =
|
|
642
|
+
const r = zt(i);
|
|
643
643
|
return r === null ? (W(e, "shape.pathData", "not a strict SVG path grammar (allowlist/caps)"), []) : [{ d: r, fillRule: "nonzero" }];
|
|
644
644
|
}
|
|
645
645
|
return W(e, "shape.paths", "geometry is path but neither pathData nor paths[] is present"), [];
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function un(t, e) {
|
|
648
648
|
return t === void 0 || t === "NONZERO" ? "nonzero" : t === "EVENODD" ? "evenodd" : (W(e, "shape.paths.windingRule", "unknown winding rule ; defaulting to nonzero"), "nonzero");
|
|
649
649
|
}
|
|
650
650
|
function W(t, e, n) {
|
|
651
651
|
S(t, e, n);
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function fn(t) {
|
|
654
654
|
return t.geometry ?? t.kind ?? "rect";
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function mt(t, e) {
|
|
657
657
|
return typeof t == "number" && Number.isFinite(t) ? t : e;
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
const r =
|
|
659
|
+
function At(t, e, n, i = "geom") {
|
|
660
|
+
const r = fn(t), s = mt(t.width, 100), o = mt(t.height, 100), a = mt(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 =
|
|
663
|
-
return /* @__PURE__ */ f("g", { style: u, children: d.map((h,
|
|
662
|
+
const d = cn(t, n);
|
|
663
|
+
return /* @__PURE__ */ f("g", { style: u, children: d.map((h, m) => /* @__PURE__ */ f(
|
|
664
664
|
"path",
|
|
665
665
|
{
|
|
666
666
|
d: h.d,
|
|
@@ -669,16 +669,16 @@ function Mt(t, e, n, i = "geom") {
|
|
|
669
669
|
stroke: l,
|
|
670
670
|
strokeWidth: c
|
|
671
671
|
},
|
|
672
|
-
|
|
672
|
+
m
|
|
673
673
|
)) }, i);
|
|
674
674
|
}
|
|
675
675
|
return r === "circle" ? /* @__PURE__ */ f(
|
|
676
676
|
"ellipse",
|
|
677
677
|
{
|
|
678
678
|
style: u,
|
|
679
|
-
cx:
|
|
679
|
+
cx: s / 2,
|
|
680
680
|
cy: o / 2,
|
|
681
|
-
rx: Math.max(0,
|
|
681
|
+
rx: Math.max(0, s / 2 - c / 2),
|
|
682
682
|
ry: Math.max(0, o / 2 - c / 2),
|
|
683
683
|
fill: e.fill,
|
|
684
684
|
stroke: l,
|
|
@@ -691,7 +691,7 @@ function Mt(t, e, n, i = "geom") {
|
|
|
691
691
|
style: u,
|
|
692
692
|
x1: "0",
|
|
693
693
|
y1: o / 2,
|
|
694
|
-
x2:
|
|
694
|
+
x2: s,
|
|
695
695
|
y2: o / 2,
|
|
696
696
|
stroke: l !== "none" ? l : e.fill,
|
|
697
697
|
strokeWidth: c || 1
|
|
@@ -703,10 +703,10 @@ function Mt(t, e, n, i = "geom") {
|
|
|
703
703
|
style: u,
|
|
704
704
|
x: c / 2,
|
|
705
705
|
y: c / 2,
|
|
706
|
-
width: Math.max(0,
|
|
706
|
+
width: Math.max(0, s - c),
|
|
707
707
|
height: Math.max(0, o - c),
|
|
708
|
-
rx:
|
|
709
|
-
ry:
|
|
708
|
+
rx: a,
|
|
709
|
+
ry: a,
|
|
710
710
|
fill: e.fill,
|
|
711
711
|
stroke: l,
|
|
712
712
|
strokeWidth: c
|
|
@@ -714,38 +714,38 @@ function Mt(t, e, n, i = "geom") {
|
|
|
714
714
|
i
|
|
715
715
|
);
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function dn(t, e) {
|
|
718
718
|
if (t.kind !== "shape") return null;
|
|
719
719
|
const n = t.props ?? {};
|
|
720
|
-
return
|
|
720
|
+
return At(n, { fill: "white" }, e, "mask-cover");
|
|
721
721
|
}
|
|
722
|
-
const
|
|
723
|
-
function
|
|
722
|
+
const pn = 64, oe = 1;
|
|
723
|
+
function se(t) {
|
|
724
724
|
return t.props?.visible === !1;
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function st(t, e) {
|
|
727
727
|
const n = t?.[e];
|
|
728
728
|
return typeof n == "number" && Number.isFinite(n) ? n : 0;
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function hn(t, e, n = oe, i = pn) {
|
|
731
731
|
if (t.kind !== "frame") return null;
|
|
732
|
-
const r =
|
|
732
|
+
const r = le(t, e, n, i, "grp");
|
|
733
733
|
return r.length === 0 ? null : /* @__PURE__ */ f("g", { children: r }, "mask-group-cover");
|
|
734
734
|
}
|
|
735
|
-
function
|
|
735
|
+
function ae(t, e = oe) {
|
|
736
736
|
if (t.kind !== "frame") return !1;
|
|
737
737
|
for (const n of t.children ?? [])
|
|
738
|
-
if (!
|
|
738
|
+
if (!se(n) && (st(n.props, "blur") > 0 || n.kind === "frame" && e > 0 && ae(n, e - 1)))
|
|
739
739
|
return !0;
|
|
740
740
|
return !1;
|
|
741
741
|
}
|
|
742
|
-
function
|
|
743
|
-
const
|
|
744
|
-
let
|
|
745
|
-
for (let l = 0; l <
|
|
746
|
-
const c =
|
|
747
|
-
if (
|
|
748
|
-
if (
|
|
742
|
+
function le(t, e, n, i, r) {
|
|
743
|
+
const s = t.children ?? [], o = [];
|
|
744
|
+
let a = 0;
|
|
745
|
+
for (let l = 0; l < s.length; l++) {
|
|
746
|
+
const c = s[l];
|
|
747
|
+
if (se(c)) continue;
|
|
748
|
+
if (a >= i) {
|
|
749
749
|
S(
|
|
750
750
|
e,
|
|
751
751
|
"mask.source.ref",
|
|
@@ -755,52 +755,52 @@ function ae(t, e, n, i, r) {
|
|
|
755
755
|
}
|
|
756
756
|
let u = null;
|
|
757
757
|
if (c.kind === "shape")
|
|
758
|
-
u =
|
|
758
|
+
u = At(c.props ?? {}, { fill: "white" }, c.id, `${r}-${l}`);
|
|
759
759
|
else if (c.kind === "frame" && n > 0) {
|
|
760
|
-
const
|
|
761
|
-
|
|
760
|
+
const g = le(c, e, n - 1, i, `${r}-${l}`);
|
|
761
|
+
g.length > 0 && (u = /* @__PURE__ */ f("g", { children: g }, `${r}-${l}`));
|
|
762
762
|
}
|
|
763
763
|
if (u === null) continue;
|
|
764
|
-
const d =
|
|
764
|
+
const d = st(c.props, "blur");
|
|
765
765
|
if (d > 0) {
|
|
766
|
-
const
|
|
767
|
-
u = /* @__PURE__ */
|
|
768
|
-
/* @__PURE__ */ f("filter", { id:
|
|
769
|
-
/* @__PURE__ */ f("g", { filter: `url(#${
|
|
766
|
+
const g = `lumen-mcov-blur-${e ?? "x"}-${r}-${l}`;
|
|
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 })
|
|
770
770
|
] }, `${r}-b-${l}`);
|
|
771
771
|
}
|
|
772
|
-
const h =
|
|
772
|
+
const h = st(c.props, "x"), m = st(c.props, "y");
|
|
773
773
|
o.push(
|
|
774
|
-
h !== 0 ||
|
|
775
|
-
),
|
|
774
|
+
h !== 0 || m !== 0 ? /* @__PURE__ */ f("g", { transform: `translate(${h} ${m})`, children: u }, `${r}-t-${l}`) : u
|
|
775
|
+
), a++;
|
|
776
776
|
}
|
|
777
777
|
return o;
|
|
778
778
|
}
|
|
779
|
-
function
|
|
780
|
-
const r = t.geometry ?? t.kind ?? "rect",
|
|
781
|
-
|
|
779
|
+
function mn({ 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 = it(t.stroke_width, 0), l = it(t.width, 100), c = it(t.height, 100), u = it(t.opacity, 1), d = typeof t.ariaLabel == "string" ? t.ariaLabel : void 0, h = lt(n, ["opacity"], i), m = nt(h), g = ct({ opacity: u }, i, e), A = rt(), x = ie(
|
|
781
|
+
ze(re(t.fills, "shape.fills", e), "shape.fills", e),
|
|
782
782
|
A,
|
|
783
783
|
"shape.fills",
|
|
784
784
|
e
|
|
785
|
-
), F = gn(t.strokes), k = x.map(
|
|
785
|
+
), F = gn(t.strokes), k = x.map(Pe), 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
786
|
color: gt(R.color, "shape.strokes.color", e) ?? "transparent",
|
|
787
787
|
width: R.width ?? 0
|
|
788
|
-
})) : [{ color: o, width:
|
|
788
|
+
})) : [{ color: o, width: a }], v = [...p].reverse(), $ = [...w].reverse(), _ = r === "path" ? $.filter((R) => R.width > 0 && R.color !== "transparent") : $, V = (R, b, P, N) => At(
|
|
789
789
|
t,
|
|
790
790
|
{ fill: R, stroke: b.color, strokeWidth: b.width, mixBlendMode: N },
|
|
791
791
|
e,
|
|
792
792
|
P
|
|
793
793
|
);
|
|
794
|
-
return /* @__PURE__ */
|
|
794
|
+
return /* @__PURE__ */ G(
|
|
795
795
|
U.svg,
|
|
796
796
|
{
|
|
797
797
|
width: l,
|
|
798
798
|
height: c,
|
|
799
799
|
viewBox: `0 0 ${l} ${c}`,
|
|
800
800
|
...d !== void 0 ? { "aria-label": d, role: "img" } : {},
|
|
801
|
-
initial:
|
|
802
|
-
animate:
|
|
803
|
-
transition:
|
|
801
|
+
initial: g.initial,
|
|
802
|
+
animate: g.animate,
|
|
803
|
+
transition: m,
|
|
804
804
|
children: [
|
|
805
805
|
y.length > 0 && /* @__PURE__ */ f("defs", { children: y }),
|
|
806
806
|
v.map(
|
|
@@ -821,30 +821,30 @@ function gn(t) {
|
|
|
821
821
|
(e) => typeof e == "object" && e !== null && ("color" in e || "width" in e)
|
|
822
822
|
) : [];
|
|
823
823
|
}
|
|
824
|
-
function
|
|
824
|
+
function it(t, e) {
|
|
825
825
|
return typeof t == "number" && Number.isFinite(t) ? t : e;
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function Ft({
|
|
828
828
|
peerLabel: t,
|
|
829
829
|
objectFit: e,
|
|
830
830
|
muted: n = !0
|
|
831
831
|
}) {
|
|
832
|
-
const i =
|
|
832
|
+
const i = Zt(), r = i?.resolvePeerStream, s = i?.subscribePeerStream, o = et(null), [a, l] = $t(null);
|
|
833
833
|
return Y(() => {
|
|
834
|
-
if (
|
|
835
|
-
return
|
|
834
|
+
if (s !== void 0)
|
|
835
|
+
return s(t, l);
|
|
836
836
|
if (r !== void 0) {
|
|
837
837
|
l(r(t));
|
|
838
838
|
return;
|
|
839
839
|
}
|
|
840
840
|
l(null);
|
|
841
|
-
}, [t, r,
|
|
841
|
+
}, [t, r, s]), Y(() => {
|
|
842
842
|
const c = o.current;
|
|
843
843
|
if (c !== null)
|
|
844
|
-
return c.srcObject =
|
|
844
|
+
return c.srcObject = a, () => {
|
|
845
845
|
c !== null && (c.srcObject = null);
|
|
846
846
|
};
|
|
847
|
-
}, [
|
|
847
|
+
}, [a]), a === null ? /* @__PURE__ */ f(
|
|
848
848
|
"div",
|
|
849
849
|
{
|
|
850
850
|
"aria-hidden": !0,
|
|
@@ -868,33 +868,33 @@ function At({
|
|
|
868
868
|
}
|
|
869
869
|
);
|
|
870
870
|
}
|
|
871
|
-
function
|
|
872
|
-
const n =
|
|
871
|
+
function yn({ resolved: t, nodeId: e }) {
|
|
872
|
+
const n = rt(), i = t.fit ?? "cover", r = typeof t.peerLabel == "string" && t.peerLabel.length > 0 ? t.peerLabel : "";
|
|
873
873
|
if (r !== "")
|
|
874
|
-
return /* @__PURE__ */ f(
|
|
875
|
-
const
|
|
876
|
-
if (!
|
|
877
|
-
const o = t.loop ?? !0,
|
|
874
|
+
return /* @__PURE__ */ f(Ft, { peerLabel: r, objectFit: i });
|
|
875
|
+
const s = St(t.src, n, "media.src", e);
|
|
876
|
+
if (!s) return null;
|
|
877
|
+
const o = t.loop ?? !0, a = t.mute ?? !0, l = t.autoplay ?? !0;
|
|
878
878
|
return /* @__PURE__ */ f(
|
|
879
879
|
"video",
|
|
880
880
|
{
|
|
881
|
-
src:
|
|
881
|
+
src: s,
|
|
882
882
|
autoPlay: l,
|
|
883
883
|
loop: o,
|
|
884
|
-
muted:
|
|
884
|
+
muted: a,
|
|
885
885
|
playsInline: !0,
|
|
886
|
-
style:
|
|
886
|
+
style: bn(i)
|
|
887
887
|
}
|
|
888
888
|
);
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function bn(t) {
|
|
891
891
|
return {
|
|
892
892
|
width: "100%",
|
|
893
893
|
height: "100%",
|
|
894
894
|
objectFit: t
|
|
895
895
|
};
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function kn({ resolved: t }) {
|
|
898
898
|
const e = typeof t.peer_label == "string" && t.peer_label.length > 0 ? t.peer_label : "";
|
|
899
899
|
if (e === "")
|
|
900
900
|
return /* @__PURE__ */ f(
|
|
@@ -906,9 +906,9 @@ function bn({ resolved: t }) {
|
|
|
906
906
|
}
|
|
907
907
|
);
|
|
908
908
|
const n = typeof t.object_fit == "string" && t.object_fit.length > 0 ? t.object_fit : "cover", i = t.muted === void 0 ? !0 : t.muted !== !1;
|
|
909
|
-
return /* @__PURE__ */ f(
|
|
909
|
+
return /* @__PURE__ */ f(Ft, { peerLabel: e, objectFit: n, muted: i });
|
|
910
910
|
}
|
|
911
|
-
function
|
|
911
|
+
function wn({ resolved: t }) {
|
|
912
912
|
const e = typeof t["x-zab.slotRef"] == "string" && t["x-zab.slotRef"].length > 0 ? t["x-zab.slotRef"] : "";
|
|
913
913
|
return e === "" ? /* @__PURE__ */ f(
|
|
914
914
|
"div",
|
|
@@ -917,20 +917,20 @@ function kn({ resolved: t }) {
|
|
|
917
917
|
"data-lumencast-meet-peer-slot": !0,
|
|
918
918
|
style: { width: "100%", height: "100%", opacity: 0, pointerEvents: "none" }
|
|
919
919
|
}
|
|
920
|
-
) : /* @__PURE__ */ f(
|
|
920
|
+
) : /* @__PURE__ */ f(Ft, { peerLabel: e, objectFit: "cover", muted: !0 });
|
|
921
921
|
}
|
|
922
|
-
const
|
|
923
|
-
function
|
|
922
|
+
const Ht = /* @__PURE__ */ new Set();
|
|
923
|
+
function xn({ resolved: t, nodeId: e }) {
|
|
924
924
|
const n = t.scene_id, i = t.scene_version;
|
|
925
925
|
if (!n || !i)
|
|
926
926
|
return S(e, "instance.scene_id", "missing scene_id or scene_version ; not rendered"), null;
|
|
927
927
|
const r = `${n}:${i}`;
|
|
928
|
-
|
|
928
|
+
Ht.has(r) || (Ht.add(r), S(
|
|
929
929
|
e,
|
|
930
930
|
"instance",
|
|
931
931
|
"scaffold render — async bundle fetch + __params.* injection are not yet wired (LSML 1.1 §4.9)"
|
|
932
932
|
));
|
|
933
|
-
const
|
|
933
|
+
const s = t.size, o = t.position;
|
|
934
934
|
return /* @__PURE__ */ f(
|
|
935
935
|
"div",
|
|
936
936
|
{
|
|
@@ -940,43 +940,98 @@ function wn({ resolved: t, nodeId: e }) {
|
|
|
940
940
|
position: o ? "absolute" : "relative",
|
|
941
941
|
left: o?.x,
|
|
942
942
|
top: o?.y,
|
|
943
|
-
width:
|
|
944
|
-
height:
|
|
943
|
+
width: s?.w,
|
|
944
|
+
height: s?.h,
|
|
945
945
|
outline: "none",
|
|
946
946
|
boxSizing: "border-box"
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
);
|
|
950
950
|
}
|
|
951
|
-
|
|
952
|
-
|
|
951
|
+
const Q = /* @__PURE__ */ new Map();
|
|
952
|
+
async function vn(t, e, n) {
|
|
953
|
+
const i = navigator.mediaDevices, r = await n?.(e, t) ?? null, s = r?.deviceId, o = r?.captureSourceId, a = e.length > 0;
|
|
954
|
+
let l, c;
|
|
955
|
+
switch (t) {
|
|
956
|
+
case "media.webcam":
|
|
957
|
+
case "media.mic":
|
|
958
|
+
case "media.app_audio": {
|
|
959
|
+
if (a && (typeof s != "string" || s.length === 0))
|
|
960
|
+
return { kind: "placeholder" };
|
|
961
|
+
const g = t === "media.webcam" ? "video" : "audio";
|
|
962
|
+
l = typeof s == "string" && s.length > 0 ? s : "default", c = () => i.getUserMedia({ [g]: $n(s) });
|
|
963
|
+
break;
|
|
964
|
+
}
|
|
965
|
+
case "media.screen":
|
|
966
|
+
case "media.window": {
|
|
967
|
+
if (typeof o == "string" && o.length > 0) {
|
|
968
|
+
l = o, c = () => i.getUserMedia({
|
|
969
|
+
video: {
|
|
970
|
+
mandatory: {
|
|
971
|
+
chromeMediaSource: "desktop",
|
|
972
|
+
chromeMediaSourceId: o
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
});
|
|
976
|
+
break;
|
|
977
|
+
}
|
|
978
|
+
if (a) return { kind: "placeholder" };
|
|
979
|
+
l = "display", c = () => i.getDisplayMedia({ video: !0 });
|
|
980
|
+
break;
|
|
981
|
+
}
|
|
982
|
+
default:
|
|
983
|
+
return { kind: "placeholder" };
|
|
984
|
+
}
|
|
985
|
+
const u = `${t}:${l}`, d = Q.get(u);
|
|
986
|
+
if (d)
|
|
987
|
+
return d.refs += 1, { kind: "stream", key: u, promise: d.promise };
|
|
988
|
+
const h = c(), m = { promise: h, stream: null, refs: 1 };
|
|
989
|
+
return Q.set(u, m), h.then((g) => {
|
|
990
|
+
m.stream = g;
|
|
991
|
+
}).catch(() => {
|
|
992
|
+
Q.delete(u);
|
|
993
|
+
}), { kind: "stream", key: u, promise: h };
|
|
994
|
+
}
|
|
995
|
+
function Wt(t) {
|
|
996
|
+
const e = Q.get(t);
|
|
997
|
+
e !== void 0 && (e.refs -= 1, !(e.refs > 0) && (Q.delete(t), e.stream !== null && Sn(e.stream)));
|
|
998
|
+
}
|
|
999
|
+
function $n(t) {
|
|
1000
|
+
return typeof t == "string" && t.length > 0 ? { deviceId: { exact: t } } : !0;
|
|
1001
|
+
}
|
|
1002
|
+
function Sn(t) {
|
|
1003
|
+
for (const e of t.getTracks()) e.stop();
|
|
1004
|
+
}
|
|
1005
|
+
function Mn({ resolved: t }) {
|
|
1006
|
+
const e = qt(t.width, "100%"), n = qt(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 = Zt()?.resolveCaptureDevice, a = et(null), [l, c] = $t(null);
|
|
953
1007
|
return Y(() => {
|
|
954
|
-
if (!
|
|
1008
|
+
if (!An()) return;
|
|
955
1009
|
let u = !1, d = null;
|
|
956
1010
|
return (async () => {
|
|
957
1011
|
try {
|
|
958
|
-
const h = await
|
|
959
|
-
if (h ===
|
|
1012
|
+
const h = await vn(i, r, o);
|
|
1013
|
+
if (h.kind === "placeholder") return;
|
|
1014
|
+
const m = await h.promise;
|
|
960
1015
|
if (u) {
|
|
961
|
-
|
|
1016
|
+
Wt(h.key);
|
|
962
1017
|
return;
|
|
963
1018
|
}
|
|
964
|
-
d = h, c(
|
|
1019
|
+
d = h.key, c(m);
|
|
965
1020
|
} catch {
|
|
966
1021
|
}
|
|
967
1022
|
})(), () => {
|
|
968
|
-
u = !0, d !== null &&
|
|
1023
|
+
u = !0, d !== null && Wt(d);
|
|
969
1024
|
};
|
|
970
1025
|
}, [i, r, o]), Y(() => {
|
|
971
|
-
const u =
|
|
1026
|
+
const u = a.current;
|
|
972
1027
|
if (u !== null)
|
|
973
1028
|
return u.srcObject = l, () => {
|
|
974
1029
|
u !== null && (u.srcObject = null);
|
|
975
1030
|
};
|
|
976
|
-
}, [l]), l !== null &&
|
|
1031
|
+
}, [l]), l !== null && Fn(i) ? /* @__PURE__ */ f(
|
|
977
1032
|
"video",
|
|
978
1033
|
{
|
|
979
|
-
ref:
|
|
1034
|
+
ref: a,
|
|
980
1035
|
"data-lumencast-capture": !0,
|
|
981
1036
|
autoPlay: !0,
|
|
982
1037
|
muted: !0,
|
|
@@ -992,79 +1047,46 @@ function xn({ resolved: t }) {
|
|
|
992
1047
|
}
|
|
993
1048
|
);
|
|
994
1049
|
}
|
|
995
|
-
function
|
|
1050
|
+
function An() {
|
|
996
1051
|
return typeof navigator < "u" && typeof navigator.mediaDevices?.getUserMedia == "function";
|
|
997
1052
|
}
|
|
998
|
-
function
|
|
1053
|
+
function Fn(t) {
|
|
999
1054
|
return t === "media.webcam" || t === "media.screen" || t === "media.window";
|
|
1000
1055
|
}
|
|
1001
|
-
|
|
1002
|
-
const i = navigator.mediaDevices, r = await n?.(e, t) ?? null, a = r?.deviceId, o = e.length > 0;
|
|
1003
|
-
switch (t) {
|
|
1004
|
-
case "media.webcam":
|
|
1005
|
-
case "media.mic":
|
|
1006
|
-
case "media.app_audio": {
|
|
1007
|
-
if (o && (typeof a != "string" || a.length === 0))
|
|
1008
|
-
return null;
|
|
1009
|
-
const s = t === "media.webcam" ? "video" : "audio";
|
|
1010
|
-
return i.getUserMedia({ [s]: Mn(a) });
|
|
1011
|
-
}
|
|
1012
|
-
case "media.screen":
|
|
1013
|
-
case "media.window": {
|
|
1014
|
-
const s = r?.captureSourceId;
|
|
1015
|
-
return typeof s == "string" && s.length > 0 ? i.getUserMedia({
|
|
1016
|
-
video: {
|
|
1017
|
-
mandatory: {
|
|
1018
|
-
chromeMediaSource: "desktop",
|
|
1019
|
-
chromeMediaSourceId: s
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
}) : o ? null : i.getDisplayMedia({ video: !0 });
|
|
1023
|
-
}
|
|
1024
|
-
default:
|
|
1025
|
-
return null;
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
function Mn(t) {
|
|
1029
|
-
return typeof t == "string" && t.length > 0 ? { deviceId: { exact: t } } : !0;
|
|
1030
|
-
}
|
|
1031
|
-
function Ht(t) {
|
|
1032
|
-
for (const e of t.getTracks()) e.stop();
|
|
1033
|
-
}
|
|
1034
|
-
function Wt(t, e) {
|
|
1056
|
+
function qt(t, e) {
|
|
1035
1057
|
return typeof t == "number" && Number.isFinite(t) ? `${t}px` : typeof t == "string" && t.length > 0 ? t : e;
|
|
1036
1058
|
}
|
|
1037
|
-
const
|
|
1038
|
-
stack:
|
|
1039
|
-
grid:
|
|
1040
|
-
frame:
|
|
1041
|
-
text:
|
|
1042
|
-
image:
|
|
1043
|
-
shape:
|
|
1044
|
-
media:
|
|
1059
|
+
const Rn = {
|
|
1060
|
+
stack: $e,
|
|
1061
|
+
grid: Se,
|
|
1062
|
+
frame: He,
|
|
1063
|
+
text: Ze,
|
|
1064
|
+
image: en,
|
|
1065
|
+
shape: mn,
|
|
1066
|
+
media: yn,
|
|
1045
1067
|
// ADR 006 §3.3/§3.5 — the unified source kind : every exported source is a
|
|
1046
1068
|
// `meet.peer` node rendered in `<video srcObject>` from the WebRTC viewer.
|
|
1047
|
-
"meet.peer":
|
|
1048
|
-
instance:
|
|
1069
|
+
"meet.peer": kn,
|
|
1070
|
+
instance: xn,
|
|
1049
1071
|
// RFC-0001 / ADR 004 — Zab vendor capture placeholder (transparent, inert).
|
|
1050
|
-
"x-zab.capture":
|
|
1072
|
+
"x-zab.capture": Mn,
|
|
1051
1073
|
// ADR Blue 009 §3.1 (Amendment 2) — Zab vendor meet-peer SLOT placeholder.
|
|
1052
1074
|
// Carries only a logical `x-zab.slotRef` ; the host's slot-aware peer-stream
|
|
1053
1075
|
// registry resolves `slotRef → peer_label → MediaStream` (transparent when
|
|
1054
1076
|
// unbound). Closes the kind→primitive gap that left it an unknown-kind drop.
|
|
1055
|
-
"x-zab.meet-peer":
|
|
1056
|
-
},
|
|
1057
|
-
function
|
|
1058
|
-
const n = K(
|
|
1059
|
-
return /* @__PURE__ */ f(
|
|
1077
|
+
"x-zab.meet-peer": wn
|
|
1078
|
+
}, wt = at("");
|
|
1079
|
+
function jn({ prefix: t, children: e }) {
|
|
1080
|
+
const n = K(wt), i = n ? `${n}.${t}` : t;
|
|
1081
|
+
return /* @__PURE__ */ f(wt.Provider, { value: i, children: e });
|
|
1060
1082
|
}
|
|
1061
|
-
function
|
|
1062
|
-
return K(
|
|
1083
|
+
function Rt() {
|
|
1084
|
+
return K(wt);
|
|
1063
1085
|
}
|
|
1064
|
-
function
|
|
1086
|
+
function I(t, e) {
|
|
1065
1087
|
return !t || e.startsWith("__") ? e : `${t}.${e}`;
|
|
1066
1088
|
}
|
|
1067
|
-
function
|
|
1089
|
+
function It(t) {
|
|
1068
1090
|
switch (t) {
|
|
1069
1091
|
case "fixed":
|
|
1070
1092
|
return "0 0 auto";
|
|
@@ -1076,84 +1098,84 @@ function qt(t) {
|
|
|
1076
1098
|
return;
|
|
1077
1099
|
}
|
|
1078
1100
|
}
|
|
1079
|
-
function
|
|
1080
|
-
const e =
|
|
1101
|
+
function _n(t) {
|
|
1102
|
+
const e = It(t?.x), n = It(t?.y);
|
|
1081
1103
|
return e === n && e !== void 0 ? e : e ?? n;
|
|
1082
1104
|
}
|
|
1083
|
-
function
|
|
1105
|
+
function Tn({
|
|
1084
1106
|
visible: t,
|
|
1085
1107
|
opacity: e,
|
|
1086
1108
|
rotation: n,
|
|
1087
1109
|
flipY: i,
|
|
1088
1110
|
blur: r,
|
|
1089
|
-
sizing:
|
|
1111
|
+
sizing: s,
|
|
1090
1112
|
position: o,
|
|
1091
|
-
size:
|
|
1113
|
+
size: a,
|
|
1092
1114
|
blendMode: l,
|
|
1093
1115
|
children: c
|
|
1094
1116
|
}) {
|
|
1095
1117
|
if (t === !1)
|
|
1096
1118
|
return null;
|
|
1097
|
-
const u = X(l), d = typeof e == "number" && e !== 1, h = typeof n == "number" && n !== 0,
|
|
1098
|
-
if (!d && !h && !
|
|
1099
|
-
return /* @__PURE__ */ f(
|
|
1119
|
+
const u = X(l), d = typeof e == "number" && e !== 1, h = typeof n == "number" && n !== 0, m = 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;
|
|
1120
|
+
if (!d && !h && !m && !g && !A && !x && !F)
|
|
1121
|
+
return /* @__PURE__ */ f(tt, { children: c });
|
|
1100
1122
|
let k;
|
|
1101
|
-
if (h ||
|
|
1123
|
+
if (h || m) {
|
|
1102
1124
|
const v = [];
|
|
1103
|
-
h && v.push(`rotate(${n}deg)`),
|
|
1125
|
+
h && v.push(`rotate(${n}deg)`), m && v.push("scaleY(-1)"), k = v.join(" ");
|
|
1104
1126
|
}
|
|
1105
|
-
const y =
|
|
1127
|
+
const y = g ? `blur(${r / 2}px)` : void 0, p = A ? _n(s) : void 0;
|
|
1106
1128
|
if (F && (d || k !== void 0 || y !== void 0)) {
|
|
1107
1129
|
const v = { mixBlendMode: u };
|
|
1108
1130
|
x && (v.position = "absolute", v.left = o.x, v.top = o.y), p !== void 0 && (v.flex = p);
|
|
1109
1131
|
const $ = {};
|
|
1110
|
-
return typeof
|
|
1132
|
+
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 }) });
|
|
1111
1133
|
}
|
|
1112
1134
|
const w = {};
|
|
1113
|
-
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
|
|
1135
|
+
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 });
|
|
1114
1136
|
}
|
|
1115
|
-
const
|
|
1137
|
+
const Cn = {
|
|
1116
1138
|
linear: "linear",
|
|
1117
1139
|
"ease-in": "easeIn",
|
|
1118
1140
|
"ease-out": "easeOut",
|
|
1119
1141
|
"ease-in-out": "easeInOut"
|
|
1120
1142
|
};
|
|
1121
|
-
function
|
|
1143
|
+
function On(t, e) {
|
|
1122
1144
|
const n = t.steps;
|
|
1123
1145
|
if (!Array.isArray(n) || n.length < 2) return;
|
|
1124
1146
|
const i = n[0], r = n[n.length - 1];
|
|
1125
1147
|
if (i.at !== 0 || r.at !== 1) return;
|
|
1126
|
-
const
|
|
1127
|
-
return Gt(n, "opacity", o, e), Gt(n, "filter", o, e),
|
|
1148
|
+
const s = n.map((a) => a.at), o = {};
|
|
1149
|
+
return Gt(n, "opacity", o, e), Gt(n, "filter", o, e), ot(n, "scale", o), ot(n, "translateX", o), ot(n, "translateY", o), ot(n, "rotate", o), {
|
|
1128
1150
|
animate: o,
|
|
1129
1151
|
transition: {
|
|
1130
1152
|
duration: t.duration_ms / 1e3,
|
|
1131
|
-
ease:
|
|
1132
|
-
times:
|
|
1153
|
+
ease: Cn[t.easing ?? "linear"],
|
|
1154
|
+
times: s
|
|
1133
1155
|
}
|
|
1134
1156
|
};
|
|
1135
1157
|
}
|
|
1136
1158
|
function Gt(t, e, n, i) {
|
|
1137
1159
|
let r = !1;
|
|
1138
|
-
const
|
|
1160
|
+
const s = [];
|
|
1139
1161
|
let o;
|
|
1140
|
-
for (const
|
|
1141
|
-
let l =
|
|
1162
|
+
for (const a of t) {
|
|
1163
|
+
let l = a[e];
|
|
1142
1164
|
if (e === "filter" && l !== void 0) {
|
|
1143
|
-
const c =
|
|
1144
|
-
c === null ? (
|
|
1165
|
+
const c = we(l);
|
|
1166
|
+
c === null ? (Jt("keyframes.steps[].filter", i), l = void 0) : l = c;
|
|
1145
1167
|
}
|
|
1146
|
-
l !== void 0 ? (r = !0, o = l,
|
|
1168
|
+
l !== void 0 ? (r = !0, o = l, s.push(l)) : s.push(o ?? (e === "opacity" ? 1 : xe));
|
|
1147
1169
|
}
|
|
1148
|
-
r && (n[e] =
|
|
1170
|
+
r && (n[e] = s);
|
|
1149
1171
|
}
|
|
1150
|
-
function
|
|
1172
|
+
function ot(t, e, n) {
|
|
1151
1173
|
let i = !1;
|
|
1152
1174
|
const r = [];
|
|
1153
|
-
let
|
|
1175
|
+
let s;
|
|
1154
1176
|
for (const o of t) {
|
|
1155
|
-
const
|
|
1156
|
-
typeof
|
|
1177
|
+
const a = o.transform?.[e];
|
|
1178
|
+
typeof a == "number" ? (i = !0, s = a, r.push(a)) : r.push(s ?? Pn(e));
|
|
1157
1179
|
}
|
|
1158
1180
|
if (i)
|
|
1159
1181
|
if (e === "rotate")
|
|
@@ -1163,76 +1185,76 @@ function it(t, e, n) {
|
|
|
1163
1185
|
n[o] = r;
|
|
1164
1186
|
}
|
|
1165
1187
|
}
|
|
1166
|
-
function
|
|
1188
|
+
function Pn(t) {
|
|
1167
1189
|
return t === "scale" ? 1 : 0;
|
|
1168
1190
|
}
|
|
1169
|
-
const
|
|
1170
|
-
function
|
|
1191
|
+
const jt = at(0), Yt = 2e3;
|
|
1192
|
+
function Nn(t, e) {
|
|
1171
1193
|
if (e <= 0) return 0;
|
|
1172
1194
|
const n = t * e;
|
|
1173
|
-
return n >
|
|
1195
|
+
return n > Yt ? Yt : n;
|
|
1174
1196
|
}
|
|
1175
|
-
function
|
|
1197
|
+
function En({
|
|
1176
1198
|
keyframes: t,
|
|
1177
1199
|
store: e,
|
|
1178
1200
|
nodeId: n,
|
|
1179
1201
|
children: i
|
|
1180
1202
|
}) {
|
|
1181
|
-
|
|
1182
|
-
const r =
|
|
1203
|
+
vt();
|
|
1204
|
+
const r = Rt(), s = K(jt), o = et(void 0), a = et(0);
|
|
1183
1205
|
if (t.key !== void 0) {
|
|
1184
|
-
const u = e.signal(
|
|
1185
|
-
o.current !== u && (o.current = u,
|
|
1206
|
+
const u = e.signal(I(r, t.key)).value;
|
|
1207
|
+
o.current !== u && (o.current = u, a.current += 1);
|
|
1186
1208
|
}
|
|
1187
|
-
const l =
|
|
1209
|
+
const l = On(t, n);
|
|
1188
1210
|
if (!l)
|
|
1189
|
-
return /* @__PURE__ */ f(
|
|
1190
|
-
const c =
|
|
1191
|
-
return /* @__PURE__ */
|
|
1211
|
+
return /* @__PURE__ */ f(tt, { children: i });
|
|
1212
|
+
const c = s > 0 ? { ...l.transition, delay: s / 1e3 } : l.transition;
|
|
1213
|
+
return /* @__PURE__ */ G(
|
|
1192
1214
|
U.div,
|
|
1193
1215
|
{
|
|
1194
1216
|
style: { position: "absolute", inset: 0 },
|
|
1195
|
-
initial:
|
|
1217
|
+
initial: Bn(l.animate),
|
|
1196
1218
|
animate: l.animate,
|
|
1197
1219
|
transition: c,
|
|
1198
1220
|
children: [
|
|
1199
|
-
/* @__PURE__ */ f(
|
|
1221
|
+
/* @__PURE__ */ f(Dn, {}),
|
|
1200
1222
|
i
|
|
1201
1223
|
]
|
|
1202
1224
|
},
|
|
1203
|
-
|
|
1225
|
+
a.current
|
|
1204
1226
|
);
|
|
1205
1227
|
}
|
|
1206
|
-
function
|
|
1228
|
+
function Dn() {
|
|
1207
1229
|
return Y(() => {
|
|
1208
1230
|
}, []), null;
|
|
1209
1231
|
}
|
|
1210
|
-
function
|
|
1232
|
+
function Bn(t) {
|
|
1211
1233
|
const e = {};
|
|
1212
1234
|
for (const [n, i] of Object.entries(t))
|
|
1213
1235
|
i.length > 0 && (e[n] = i[0]);
|
|
1214
1236
|
return e;
|
|
1215
1237
|
}
|
|
1216
|
-
function
|
|
1238
|
+
function Ln(t, e = (i) => requestAnimationFrame(i), n = (i) => cancelAnimationFrame(i)) {
|
|
1217
1239
|
const i = /* @__PURE__ */ new Map();
|
|
1218
|
-
let r = null,
|
|
1240
|
+
let r = null, s = !1;
|
|
1219
1241
|
const o = () => {
|
|
1220
1242
|
r = null;
|
|
1221
|
-
const
|
|
1243
|
+
const a = [...i.entries()];
|
|
1222
1244
|
i.clear();
|
|
1223
|
-
for (const [l, c] of
|
|
1245
|
+
for (const [l, c] of a)
|
|
1224
1246
|
t(l, c);
|
|
1225
1247
|
};
|
|
1226
1248
|
return {
|
|
1227
|
-
push(
|
|
1228
|
-
|
|
1249
|
+
push(a, l) {
|
|
1250
|
+
s || (i.set(a, l), r === null && (r = e(o)));
|
|
1229
1251
|
},
|
|
1230
1252
|
dispose() {
|
|
1231
|
-
|
|
1253
|
+
s = !0, i.clear(), r !== null && (n(r), r = null);
|
|
1232
1254
|
}
|
|
1233
1255
|
};
|
|
1234
1256
|
}
|
|
1235
|
-
const
|
|
1257
|
+
const zn = {
|
|
1236
1258
|
aliceblue: 15792383,
|
|
1237
1259
|
antiquewhite: 16444375,
|
|
1238
1260
|
aqua: 65535,
|
|
@@ -1382,57 +1404,57 @@ const Bn = {
|
|
|
1382
1404
|
yellow: 16776960,
|
|
1383
1405
|
yellowgreen: 10145074
|
|
1384
1406
|
};
|
|
1385
|
-
function
|
|
1407
|
+
function Hn(t) {
|
|
1386
1408
|
const e = D(t);
|
|
1387
1409
|
if (e === null) return null;
|
|
1388
|
-
if (e.startsWith("#")) return
|
|
1410
|
+
if (e.startsWith("#")) return Wn(e);
|
|
1389
1411
|
if (e.startsWith("rgb")) {
|
|
1390
1412
|
const r = e.slice(e.indexOf("(") + 1, -1).split(",").map((d) => d.trim());
|
|
1391
1413
|
if (r.length < 3) return null;
|
|
1392
|
-
const o = r[0].endsWith("%") ? 100 : 255,
|
|
1393
|
-
return
|
|
1414
|
+
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 ? Xt(r[3]) : 1;
|
|
1415
|
+
return a === null || l === null || c === null || u === null ? null : [a, l, c, u];
|
|
1394
1416
|
}
|
|
1395
1417
|
if (e.startsWith("hsl")) {
|
|
1396
1418
|
const r = e.slice(e.indexOf("(") + 1, -1).split(",").map((h) => h.trim());
|
|
1397
1419
|
if (r.length < 3) return null;
|
|
1398
|
-
const
|
|
1399
|
-
if (![
|
|
1400
|
-
const [c, u, d] =
|
|
1420
|
+
const s = Number(r[0].replace("deg", "")), o = Number(r[1].replace("%", "")) / 100, a = Number(r[2].replace("%", "")) / 100, l = r.length > 3 ? Xt(r[3]) : 1;
|
|
1421
|
+
if (![s, o, a].every(Number.isFinite) || l === null) return null;
|
|
1422
|
+
const [c, u, d] = qn(s, o, a);
|
|
1401
1423
|
return [c, u, d, l];
|
|
1402
1424
|
}
|
|
1403
1425
|
if (e === "transparent") return [0, 0, 0, 0];
|
|
1404
1426
|
if (e === "currentcolor") return null;
|
|
1405
|
-
const n =
|
|
1427
|
+
const n = zn[e];
|
|
1406
1428
|
return n === void 0 ? null : [(n >> 16 & 255) / 255, (n >> 8 & 255) / 255, (n & 255) / 255, 1];
|
|
1407
1429
|
}
|
|
1408
|
-
function
|
|
1430
|
+
function Wn(t) {
|
|
1409
1431
|
const e = t.slice(1);
|
|
1410
1432
|
if (e.length === 3 || e.length === 4) {
|
|
1411
|
-
const n = parseInt(e[0] + e[0], 16), i = parseInt(e[1] + e[1], 16), r = parseInt(e[2] + e[2], 16),
|
|
1412
|
-
return [n / 255, i / 255, r / 255,
|
|
1433
|
+
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;
|
|
1434
|
+
return [n / 255, i / 255, r / 255, s / 255];
|
|
1413
1435
|
}
|
|
1414
1436
|
if (e.length === 6 || e.length === 8) {
|
|
1415
|
-
const n = parseInt(e.slice(0, 2), 16), i = parseInt(e.slice(2, 4), 16), r = parseInt(e.slice(4, 6), 16),
|
|
1416
|
-
return [n / 255, i / 255, r / 255,
|
|
1437
|
+
const n = parseInt(e.slice(0, 2), 16), i = parseInt(e.slice(2, 4), 16), r = parseInt(e.slice(4, 6), 16), s = e.length === 8 ? parseInt(e.slice(6, 8), 16) : 255;
|
|
1438
|
+
return [n / 255, i / 255, r / 255, s / 255];
|
|
1417
1439
|
}
|
|
1418
1440
|
return null;
|
|
1419
1441
|
}
|
|
1420
|
-
function
|
|
1442
|
+
function yt(t, e) {
|
|
1421
1443
|
const n = Number(t.replace("%", ""));
|
|
1422
1444
|
return Number.isFinite(n) ? T(n / e) : null;
|
|
1423
1445
|
}
|
|
1424
|
-
function
|
|
1446
|
+
function Xt(t) {
|
|
1425
1447
|
const e = t.endsWith("%"), n = Number(t.replace("%", ""));
|
|
1426
1448
|
return Number.isFinite(n) ? T(e ? n / 100 : n) : null;
|
|
1427
1449
|
}
|
|
1428
|
-
function
|
|
1429
|
-
const i = (t % 360 + 360) % 360, r = (1 - Math.abs(2 * n - 1)) * e,
|
|
1430
|
-
let
|
|
1431
|
-
|
|
1450
|
+
function qn(t, e, n) {
|
|
1451
|
+
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));
|
|
1452
|
+
let a = 0, l = 0, c = 0;
|
|
1453
|
+
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];
|
|
1432
1454
|
const u = n - r / 2;
|
|
1433
|
-
return [T(
|
|
1455
|
+
return [T(a + u), T(l + u), T(c + u)];
|
|
1434
1456
|
}
|
|
1435
|
-
function
|
|
1457
|
+
function In(t, e, n) {
|
|
1436
1458
|
return [
|
|
1437
1459
|
T(t[0] + n * (e[0] - t[0])),
|
|
1438
1460
|
T(t[1] + n * (e[1] - t[1])),
|
|
@@ -1440,19 +1462,19 @@ function Wn(t, e, n) {
|
|
|
1440
1462
|
T(t[3] + n * (e[3] - t[3]))
|
|
1441
1463
|
];
|
|
1442
1464
|
}
|
|
1443
|
-
function
|
|
1465
|
+
function Ut(t) {
|
|
1444
1466
|
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;
|
|
1445
1467
|
return `rgba(${e}, ${n}, ${i}, ${r})`;
|
|
1446
1468
|
}
|
|
1447
1469
|
function T(t) {
|
|
1448
1470
|
return t < 0 ? 0 : t > 1 ? 1 : t;
|
|
1449
1471
|
}
|
|
1450
|
-
const
|
|
1472
|
+
const ce = {
|
|
1451
1473
|
"style.color": "colour",
|
|
1452
1474
|
fill: "fill",
|
|
1453
1475
|
background: "background"
|
|
1454
1476
|
};
|
|
1455
|
-
function
|
|
1477
|
+
function Gn(t, e) {
|
|
1456
1478
|
switch (t) {
|
|
1457
1479
|
case "opacity": {
|
|
1458
1480
|
const n = H(e);
|
|
@@ -1477,11 +1499,11 @@ function qn(t, e) {
|
|
|
1477
1499
|
return n === null ? null : { rotate: n };
|
|
1478
1500
|
}
|
|
1479
1501
|
case "filter.blur": {
|
|
1480
|
-
const n =
|
|
1502
|
+
const n = Ct("blur", e);
|
|
1481
1503
|
return n === null ? null : { blur: n };
|
|
1482
1504
|
}
|
|
1483
1505
|
case "filter.brightness": {
|
|
1484
|
-
const n =
|
|
1506
|
+
const n = Ct("brightness", e);
|
|
1485
1507
|
return n === null ? null : { brightness: n };
|
|
1486
1508
|
}
|
|
1487
1509
|
default:
|
|
@@ -1491,13 +1513,13 @@ function qn(t, e) {
|
|
|
1491
1513
|
function H(t) {
|
|
1492
1514
|
return typeof t != "number" || !Number.isFinite(t) ? null : Object.is(t, -0) ? 0 : t;
|
|
1493
1515
|
}
|
|
1494
|
-
const
|
|
1516
|
+
const Yn = {
|
|
1495
1517
|
kind: "spring",
|
|
1496
1518
|
stiffness: 170,
|
|
1497
1519
|
damping: 26,
|
|
1498
1520
|
mass: 1
|
|
1499
1521
|
};
|
|
1500
|
-
function
|
|
1522
|
+
function Xn(t) {
|
|
1501
1523
|
switch (t) {
|
|
1502
1524
|
case "opacity":
|
|
1503
1525
|
return "opacity";
|
|
@@ -1511,18 +1533,18 @@ function In(t) {
|
|
|
1511
1533
|
case "filter.brightness":
|
|
1512
1534
|
return "filter";
|
|
1513
1535
|
default:
|
|
1514
|
-
return
|
|
1536
|
+
return ce[t] ?? t;
|
|
1515
1537
|
}
|
|
1516
1538
|
}
|
|
1517
|
-
const
|
|
1518
|
-
function
|
|
1519
|
-
const i = t.animateBindings, r = K(
|
|
1539
|
+
const Un = {};
|
|
1540
|
+
function Kn(t, e, n) {
|
|
1541
|
+
const i = t.animateBindings, r = K(jt), s = L(1), o = L(0), a = L(0), l = L(1), c = L(1), u = L(0), d = L(0), h = L(1), m = ke(
|
|
1520
1542
|
[d, h],
|
|
1521
1543
|
([k, y]) => `blur(${k}px) brightness(${y})`
|
|
1522
|
-
), [
|
|
1523
|
-
opacity:
|
|
1544
|
+
), [g, A] = $t(Un), x = et({
|
|
1545
|
+
opacity: s,
|
|
1524
1546
|
x: o,
|
|
1525
|
-
y:
|
|
1547
|
+
y: a,
|
|
1526
1548
|
scaleX: l,
|
|
1527
1549
|
scaleY: c,
|
|
1528
1550
|
rotate: u,
|
|
@@ -1534,51 +1556,51 @@ function Xn(t, e, n) {
|
|
|
1534
1556
|
const k = x.current, y = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Set();
|
|
1535
1557
|
let v = !1;
|
|
1536
1558
|
const $ = (b, P) => {
|
|
1537
|
-
const Z = e.transitionSignal(P).peek() ?? t.transitions?.[
|
|
1559
|
+
const Z = e.transitionSignal(P).peek() ?? t.transitions?.[Xn(b)], J = nt(Z ?? Yn);
|
|
1538
1560
|
return r > 0 && !w.has(b) ? { ...J, delay: r / 1e3 } : J;
|
|
1539
1561
|
}, _ = (b, P, N) => {
|
|
1540
|
-
const Z =
|
|
1562
|
+
const Z = ce[b], J = I(n, i[b]);
|
|
1541
1563
|
if (Z !== void 0) {
|
|
1542
|
-
const E =
|
|
1564
|
+
const E = Hn(P);
|
|
1543
1565
|
if (E === null) {
|
|
1544
1566
|
B(`bindAnimate.${b}`, t.id);
|
|
1545
1567
|
return;
|
|
1546
1568
|
}
|
|
1547
1569
|
const z = p.get(b);
|
|
1548
1570
|
if (N || z === void 0) {
|
|
1549
|
-
p.set(b, { current: E }), A((
|
|
1571
|
+
p.set(b, { current: E }), A((ft) => ({ ...ft, [Z]: Ut(E) }));
|
|
1550
1572
|
return;
|
|
1551
1573
|
}
|
|
1552
|
-
const ge = z.current,
|
|
1574
|
+
const ge = z.current, ye = $(b, J);
|
|
1553
1575
|
w.add(b), y.get(`color:${b}`)?.stop(), y.set(
|
|
1554
1576
|
`color:${b}`,
|
|
1555
|
-
|
|
1556
|
-
...
|
|
1557
|
-
onUpdate: (
|
|
1558
|
-
const
|
|
1559
|
-
z.current =
|
|
1577
|
+
Tt(0, 1, {
|
|
1578
|
+
...ye,
|
|
1579
|
+
onUpdate: (ft) => {
|
|
1580
|
+
const _t = In(ge, E, ft);
|
|
1581
|
+
z.current = _t, A((be) => ({ ...be, [Z]: Ut(_t) }));
|
|
1560
1582
|
}
|
|
1561
1583
|
})
|
|
1562
1584
|
);
|
|
1563
1585
|
return;
|
|
1564
1586
|
}
|
|
1565
|
-
const
|
|
1566
|
-
if (
|
|
1567
|
-
b.startsWith("filter.") ?
|
|
1587
|
+
const ut = Gn(b, P);
|
|
1588
|
+
if (ut === null) {
|
|
1589
|
+
b.startsWith("filter.") ? Jt(`bindAnimate.${b}`, t.id) : Vn(b, t.id);
|
|
1568
1590
|
return;
|
|
1569
1591
|
}
|
|
1570
1592
|
if (N) {
|
|
1571
|
-
for (const [E, z] of Object.entries(
|
|
1593
|
+
for (const [E, z] of Object.entries(ut))
|
|
1572
1594
|
k[E].jump(z);
|
|
1573
1595
|
return;
|
|
1574
1596
|
}
|
|
1575
|
-
const
|
|
1597
|
+
const me = $(b, J);
|
|
1576
1598
|
w.add(b);
|
|
1577
|
-
for (const [E, z] of Object.entries(
|
|
1578
|
-
y.set(E,
|
|
1579
|
-
}, V =
|
|
1580
|
-
([b, P]) =>
|
|
1581
|
-
const N = e.signal(
|
|
1599
|
+
for (const [E, z] of Object.entries(ut))
|
|
1600
|
+
y.set(E, Tt(k[E], z, me));
|
|
1601
|
+
}, V = Ln((b, P) => _(b, P, !1)), R = Object.entries(i).map(
|
|
1602
|
+
([b, P]) => ve(() => {
|
|
1603
|
+
const N = e.signal(I(n, P)).value;
|
|
1582
1604
|
N !== void 0 && (v ? V.push(b, N) : _(b, N, !0));
|
|
1583
1605
|
})
|
|
1584
1606
|
);
|
|
@@ -1587,17 +1609,17 @@ function Xn(t, e, n) {
|
|
|
1587
1609
|
V.dispose();
|
|
1588
1610
|
for (const b of y.values()) b.stop();
|
|
1589
1611
|
};
|
|
1590
|
-
}, [t, i, e, n, r]), { motionStyle:
|
|
1612
|
+
}, [t, i, e, n, r]), { motionStyle: Vt(() => {
|
|
1591
1613
|
if (!i) return null;
|
|
1592
1614
|
const k = {};
|
|
1593
1615
|
let y = !1;
|
|
1594
1616
|
for (const p of Object.keys(i))
|
|
1595
1617
|
switch (p) {
|
|
1596
1618
|
case "opacity":
|
|
1597
|
-
k.opacity =
|
|
1619
|
+
k.opacity = s, y = !0;
|
|
1598
1620
|
break;
|
|
1599
1621
|
case "transform.translate":
|
|
1600
|
-
k.x = o, k.y =
|
|
1622
|
+
k.x = o, k.y = a, y = !0;
|
|
1601
1623
|
break;
|
|
1602
1624
|
case "transform.scale":
|
|
1603
1625
|
k.scaleX = l, k.scaleY = c, y = !0;
|
|
@@ -1607,36 +1629,36 @@ function Xn(t, e, n) {
|
|
|
1607
1629
|
break;
|
|
1608
1630
|
case "filter.blur":
|
|
1609
1631
|
case "filter.brightness":
|
|
1610
|
-
k.filter =
|
|
1632
|
+
k.filter = m, y = !0;
|
|
1611
1633
|
break;
|
|
1612
1634
|
}
|
|
1613
1635
|
return y ? (k.willChange = "transform, opacity, filter", k) : null;
|
|
1614
|
-
}, [i,
|
|
1636
|
+
}, [i, s, o, a, l, c, u, m]), colorProps: g };
|
|
1615
1637
|
}
|
|
1616
|
-
function
|
|
1638
|
+
function Vn(t, e) {
|
|
1617
1639
|
S(
|
|
1618
1640
|
e,
|
|
1619
1641
|
`bindAnimate.${t}`,
|
|
1620
1642
|
"rejected bound value : JSON shape does not match the property type (LSML §6.3)"
|
|
1621
1643
|
);
|
|
1622
1644
|
}
|
|
1623
|
-
const
|
|
1624
|
-
let
|
|
1625
|
-
function
|
|
1626
|
-
return
|
|
1645
|
+
const ue = /* @__PURE__ */ new Set(["alpha", "luminance"]), xt = 180, fe = /* @__PURE__ */ new Set(["intersect", "subtract", "union"]);
|
|
1646
|
+
let bt = 0;
|
|
1647
|
+
function Zn() {
|
|
1648
|
+
return bt = (bt + 1) % 1e6, `lumen-mask-${bt.toString(36)}`;
|
|
1627
1649
|
}
|
|
1628
|
-
function
|
|
1650
|
+
function Jn(t) {
|
|
1629
1651
|
return /^[A-Za-z0-9_:-]+$/.test(t) ? t : null;
|
|
1630
1652
|
}
|
|
1631
1653
|
function M(t) {
|
|
1632
1654
|
return typeof t == "number" && Number.isFinite(t);
|
|
1633
1655
|
}
|
|
1634
|
-
function
|
|
1656
|
+
function Qn(t, e) {
|
|
1635
1657
|
if (typeof t != "object" || t === null) return null;
|
|
1636
1658
|
const n = t;
|
|
1637
|
-
if (typeof n.type != "string" || !
|
|
1659
|
+
if (typeof n.type != "string" || !ue.has(n.type))
|
|
1638
1660
|
return S(e, "mask.type", "is not alpha|luminance ; mask omitted (ADR 002 §3.2, T4)"), null;
|
|
1639
|
-
if (typeof n.op != "string" || !
|
|
1661
|
+
if (typeof n.op != "string" || !fe.has(n.op))
|
|
1640
1662
|
return S(
|
|
1641
1663
|
e,
|
|
1642
1664
|
"mask.op",
|
|
@@ -1646,37 +1668,37 @@ function Zn(t, e) {
|
|
|
1646
1668
|
if (typeof i != "object" || i === null)
|
|
1647
1669
|
return S(e, "mask.source", "is not a typed shape|image source ; mask omitted (T3)"), null;
|
|
1648
1670
|
const r = i;
|
|
1649
|
-
let
|
|
1671
|
+
let s;
|
|
1650
1672
|
if (r.kind === "shape" && typeof r.ref == "string")
|
|
1651
|
-
|
|
1673
|
+
s = { kind: "shape", ref: r.ref };
|
|
1652
1674
|
else if (r.kind === "image" && typeof r.src == "string") {
|
|
1653
1675
|
const c = r.srcRect;
|
|
1654
|
-
|
|
1676
|
+
s = c && M(c.x) && M(c.y) && M(c.w) && M(c.h) ? { kind: "image", src: r.src, srcRect: { x: c.x, y: c.y, w: c.w, h: c.h } } : { kind: "image", src: r.src };
|
|
1655
1677
|
} else if (r.kind === "group" && typeof r.ref == "string")
|
|
1656
|
-
|
|
1678
|
+
s = { kind: "group", ref: r.ref };
|
|
1657
1679
|
else
|
|
1658
1680
|
return S(
|
|
1659
1681
|
e,
|
|
1660
1682
|
"mask.source",
|
|
1661
1683
|
"is not a typed shape|image|group source ; mask omitted (T3)"
|
|
1662
1684
|
), null;
|
|
1663
|
-
const o = { source:
|
|
1664
|
-
|
|
1685
|
+
const o = { source: s, type: n.type, op: n.op }, a = n.position;
|
|
1686
|
+
a && M(a.x) && M(a.y) && (o.position = { x: a.x, y: a.y });
|
|
1665
1687
|
const l = n.size;
|
|
1666
1688
|
return l && M(l.w) && M(l.h) && (o.size = { w: l.w, h: l.h }), o;
|
|
1667
1689
|
}
|
|
1668
|
-
function
|
|
1669
|
-
if (!
|
|
1690
|
+
function tr(t, e, n, i, r, s = !1) {
|
|
1691
|
+
if (!ue.has(t.type) || !fe.has(t.op))
|
|
1670
1692
|
return S(n, "mask", "type/op outside the closed enum ; mask omitted (T4)"), null;
|
|
1671
|
-
const o =
|
|
1672
|
-
...M(
|
|
1693
|
+
const o = Zn(), a = t.position?.x, l = t.position?.y, c = t.size?.w, u = t.size?.h, d = {
|
|
1694
|
+
...M(a) ? { x: a } : {},
|
|
1673
1695
|
...M(l) ? { y: l } : {},
|
|
1674
1696
|
...M(c) ? { width: c } : {},
|
|
1675
1697
|
...M(u) ? { height: u } : {}
|
|
1676
1698
|
};
|
|
1677
1699
|
let h;
|
|
1678
1700
|
if (t.source.kind === "image") {
|
|
1679
|
-
const x =
|
|
1701
|
+
const x = te(t.source.src, e);
|
|
1680
1702
|
if (!x.allowed)
|
|
1681
1703
|
return S(
|
|
1682
1704
|
n,
|
|
@@ -1705,7 +1727,7 @@ function Jn(t, e, n, i, r, a = !1) {
|
|
|
1705
1727
|
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%" };
|
|
1706
1728
|
h = /* @__PURE__ */ f("image", { href: t.source.src, preserveAspectRatio: "none", ...F });
|
|
1707
1729
|
} else {
|
|
1708
|
-
const x =
|
|
1730
|
+
const x = Jn(t.source.ref);
|
|
1709
1731
|
if (x === null)
|
|
1710
1732
|
return S(
|
|
1711
1733
|
n,
|
|
@@ -1727,16 +1749,16 @@ function Jn(t, e, n, i, r, a = !1) {
|
|
|
1727
1749
|
}
|
|
1728
1750
|
) : F;
|
|
1729
1751
|
}
|
|
1730
|
-
|
|
1731
|
-
let
|
|
1732
|
-
t.op === "intersect" ?
|
|
1752
|
+
s && (h = /* @__PURE__ */ f("g", { transform: `translate(${xt} ${xt})`, children: h }, "feather-pad"));
|
|
1753
|
+
let m;
|
|
1754
|
+
t.op === "intersect" ? m = h : t.op === "union" ? m = /* @__PURE__ */ G(tt, { children: [
|
|
1733
1755
|
/* @__PURE__ */ f("rect", { x: 0, y: 0, width: "100%", height: "100%", fill: "white" }),
|
|
1734
1756
|
h
|
|
1735
|
-
] }) :
|
|
1757
|
+
] }) : m = /* @__PURE__ */ G(tt, { children: [
|
|
1736
1758
|
/* @__PURE__ */ f("rect", { x: 0, y: 0, width: "100%", height: "100%", fill: "white" }),
|
|
1737
1759
|
/* @__PURE__ */ f("g", { style: { filter: "invert(1)" }, children: h })
|
|
1738
1760
|
] });
|
|
1739
|
-
const
|
|
1761
|
+
const g = /* @__PURE__ */ f(
|
|
1740
1762
|
"mask",
|
|
1741
1763
|
{
|
|
1742
1764
|
id: o,
|
|
@@ -1746,15 +1768,15 @@ function Jn(t, e, n, i, r, a = !1) {
|
|
|
1746
1768
|
width: "200%",
|
|
1747
1769
|
height: "200%",
|
|
1748
1770
|
...t.type === "alpha" && t.source.kind !== "image" ? { "mask-type": "alpha" } : {},
|
|
1749
|
-
children:
|
|
1771
|
+
children: m
|
|
1750
1772
|
},
|
|
1751
1773
|
o
|
|
1752
1774
|
), A = `url(#${o})`;
|
|
1753
|
-
return { def:
|
|
1775
|
+
return { def: g, style: { mask: A, WebkitMask: A }, id: o, feather: s };
|
|
1754
1776
|
}
|
|
1755
|
-
const
|
|
1756
|
-
function
|
|
1757
|
-
if (!t) return
|
|
1777
|
+
const de = /* @__PURE__ */ new Map(), pe = at(de);
|
|
1778
|
+
function br(t) {
|
|
1779
|
+
if (!t) return de;
|
|
1758
1780
|
const e = /* @__PURE__ */ new Map(), n = [t];
|
|
1759
1781
|
for (; n.length > 0; ) {
|
|
1760
1782
|
const i = n.pop();
|
|
@@ -1763,59 +1785,59 @@ function mr(t) {
|
|
|
1763
1785
|
"id",
|
|
1764
1786
|
"duplicate shape id ; first occurrence kept, later ones ignored (ADR 002 A2.1 #K)"
|
|
1765
1787
|
) : e.set(i.id, i));
|
|
1766
|
-
const
|
|
1767
|
-
if (
|
|
1768
|
-
for (let o =
|
|
1788
|
+
const s = i.children;
|
|
1789
|
+
if (s)
|
|
1790
|
+
for (let o = s.length - 1; o >= 0; o--) n.push(s[o]);
|
|
1769
1791
|
}
|
|
1770
1792
|
return e;
|
|
1771
1793
|
}
|
|
1772
|
-
function
|
|
1794
|
+
function kr({
|
|
1773
1795
|
index: t,
|
|
1774
1796
|
children: e
|
|
1775
1797
|
}) {
|
|
1776
|
-
return /* @__PURE__ */ f(
|
|
1798
|
+
return /* @__PURE__ */ f(pe.Provider, { value: t, children: e });
|
|
1777
1799
|
}
|
|
1778
|
-
function
|
|
1779
|
-
return K(
|
|
1800
|
+
function er() {
|
|
1801
|
+
return K(pe);
|
|
1780
1802
|
}
|
|
1781
|
-
function
|
|
1782
|
-
return t.kind === "repeat" ? /* @__PURE__ */ f(
|
|
1803
|
+
function he({ node: t, store: e }) {
|
|
1804
|
+
return t.kind === "repeat" ? /* @__PURE__ */ f(sr, { node: t, store: e }) : /* @__PURE__ */ f(nr, { node: t, store: e });
|
|
1783
1805
|
}
|
|
1784
|
-
function
|
|
1785
|
-
|
|
1786
|
-
const n =
|
|
1787
|
-
() =>
|
|
1806
|
+
function nr({ node: t, store: e }) {
|
|
1807
|
+
vt();
|
|
1808
|
+
const n = Rt(), i = rt(), r = er(), s = Vt(
|
|
1809
|
+
() => ar(t, e, n),
|
|
1788
1810
|
// We re-build per render — signals re-render cheaply, and the
|
|
1789
1811
|
// resolution itself is O(bindings) which is small. The memo is a
|
|
1790
1812
|
// micro-optimisation to keep object identity stable across renders
|
|
1791
1813
|
// when the inputs haven't changed.
|
|
1792
|
-
[t, e, n, ...
|
|
1793
|
-
), o =
|
|
1794
|
-
|
|
1795
|
-
const
|
|
1796
|
-
if (!
|
|
1814
|
+
[t, e, n, ...lr(t, e, n)]
|
|
1815
|
+
), o = Kn(t, e, n);
|
|
1816
|
+
Qt(t);
|
|
1817
|
+
const a = Rn[t.kind];
|
|
1818
|
+
if (!a)
|
|
1797
1819
|
return S(t.id, "kind", "unknown render kind ; node not rendered"), null;
|
|
1798
1820
|
const l = {};
|
|
1799
1821
|
if (t.bindings)
|
|
1800
1822
|
for (const [p, w] of Object.entries(t.bindings)) {
|
|
1801
|
-
const v = e.transitionSignal(
|
|
1823
|
+
const v = e.transitionSignal(I(n, w)).value;
|
|
1802
1824
|
v !== void 0 && (l[p] = v);
|
|
1803
1825
|
}
|
|
1804
|
-
const c = (p) => p in l ? l[p] : t.transitions?.[p], u = t.children?.map((p, w) => /* @__PURE__ */ f(
|
|
1805
|
-
visible: typeof
|
|
1806
|
-
opacity: typeof
|
|
1826
|
+
const c = (p) => p in l ? l[p] : t.transitions?.[p], u = t.children?.map((p, w) => /* @__PURE__ */ f(he, { node: p, store: e }, p.id ?? w)), d = s.mask !== void 0 && typeof s.blendMode == "string" && X(s.blendMode) !== void 0, h = {
|
|
1827
|
+
visible: typeof s.visible == "boolean" ? s.visible : void 0,
|
|
1828
|
+
opacity: typeof s.universal_opacity == "number" ? s.universal_opacity : void 0,
|
|
1807
1829
|
// A frame applies its own static rotation (frame.tsx) so it pivots around
|
|
1808
1830
|
// its centre ; the wrapper has no box for a self-positioning frame and would
|
|
1809
1831
|
// pivot around a collapsed (0-height) box. Non-frames keep it on the wrapper
|
|
1810
1832
|
// (they DO carry position/size there).
|
|
1811
|
-
rotation: t.kind === "frame" ? void 0 : typeof
|
|
1833
|
+
rotation: t.kind === "frame" ? void 0 : typeof s.rotation == "number" ? s.rotation : void 0,
|
|
1812
1834
|
// Mirror (Figma scaleY(-1)) — like rotation, a frame mirrors itself
|
|
1813
1835
|
// (frame.tsx) ; non-frames carry it on the wrapper, composed with rotation.
|
|
1814
|
-
flipY: t.kind === "frame" ? void 0 :
|
|
1815
|
-
blur: typeof
|
|
1816
|
-
sizing:
|
|
1817
|
-
position: t.kind === "frame" ? void 0 :
|
|
1818
|
-
size: t.kind === "frame" ? void 0 :
|
|
1836
|
+
flipY: t.kind === "frame" ? void 0 : s.flipY === !0,
|
|
1837
|
+
blur: typeof s.blur == "number" ? s.blur : void 0,
|
|
1838
|
+
sizing: rr(s.sizing),
|
|
1839
|
+
position: t.kind === "frame" ? void 0 : ir(s),
|
|
1840
|
+
size: t.kind === "frame" ? void 0 : Kt(s),
|
|
1819
1841
|
// ADR 002 §3.2 (D2 / #D) — `blendMode` is a universal prop on every
|
|
1820
1842
|
// primitive ; the wrapper re-validates it against the closed enum
|
|
1821
1843
|
// before applying `mix-blend-mode` (T4 runtime gate). Pass the raw
|
|
@@ -1825,41 +1847,41 @@ function tr({ node: t, store: e }) {
|
|
|
1825
1847
|
// (inner) wrapper would fold over a transparent backdrop (the caramel
|
|
1826
1848
|
// hard-light showed the raw blue wave instead of compositing over the warm
|
|
1827
1849
|
// gradient). Drop it here when it will be hoisted.
|
|
1828
|
-
blendMode: typeof
|
|
1829
|
-
},
|
|
1830
|
-
|
|
1850
|
+
blendMode: typeof s.blendMode == "string" && !d ? s.blendMode : void 0
|
|
1851
|
+
}, m = t.children?.some(or) ?? !1, g = Object.keys(o.colorProps).length > 0 ? { ...s, ...o.colorProps } : s, A = /* @__PURE__ */ f(
|
|
1852
|
+
a,
|
|
1831
1853
|
{
|
|
1832
|
-
resolved:
|
|
1854
|
+
resolved: g,
|
|
1833
1855
|
nodeId: t.id,
|
|
1834
1856
|
transitionFor: c,
|
|
1835
1857
|
animateInitial: t.animate_initial,
|
|
1836
|
-
establishesContainingBlock:
|
|
1858
|
+
establishesContainingBlock: m,
|
|
1837
1859
|
children: u
|
|
1838
1860
|
}
|
|
1839
1861
|
);
|
|
1840
1862
|
let x = null;
|
|
1841
|
-
if (
|
|
1842
|
-
const p =
|
|
1863
|
+
if (s.mask !== void 0) {
|
|
1864
|
+
const p = Qn(s.mask, t.id), w = ($) => {
|
|
1843
1865
|
const _ = r.get($);
|
|
1844
|
-
return _ ? _.kind === "frame" ?
|
|
1866
|
+
return _ ? _.kind === "frame" ? hn(_, _.id) : dn(_, _.id) : null;
|
|
1845
1867
|
};
|
|
1846
1868
|
let v = !1;
|
|
1847
1869
|
if (p) {
|
|
1848
1870
|
const $ = p.source;
|
|
1849
1871
|
if (($.kind === "group" || $.kind === "shape") && typeof $.ref == "string") {
|
|
1850
1872
|
const _ = r.get($.ref);
|
|
1851
|
-
v = _ ?
|
|
1873
|
+
v = _ ? ae(_) : !1;
|
|
1852
1874
|
}
|
|
1853
1875
|
}
|
|
1854
|
-
x = p ?
|
|
1876
|
+
x = p ? tr(p, i, t.id, w, Kt(s), v) : null;
|
|
1855
1877
|
}
|
|
1856
1878
|
const F = x !== null && x.style != null && "maskImage" in x.style;
|
|
1857
1879
|
let k = A;
|
|
1858
1880
|
x && F && (k = /* @__PURE__ */ f("div", { style: { width: "100%", height: "100%", ...x.style }, children: k }));
|
|
1859
|
-
let y = /* @__PURE__ */ f(
|
|
1881
|
+
let y = /* @__PURE__ */ f(Tn, { ...h, children: k });
|
|
1860
1882
|
if (x && !F) {
|
|
1861
|
-
const p = x.feather ?
|
|
1862
|
-
y = /* @__PURE__ */
|
|
1883
|
+
const p = x.feather ? xt : 0;
|
|
1884
|
+
y = /* @__PURE__ */ G(
|
|
1863
1885
|
"div",
|
|
1864
1886
|
{
|
|
1865
1887
|
style: {
|
|
@@ -1876,7 +1898,7 @@ function tr({ node: t, store: e }) {
|
|
|
1876
1898
|
);
|
|
1877
1899
|
}
|
|
1878
1900
|
if (x && d) {
|
|
1879
|
-
const p = X(
|
|
1901
|
+
const p = X(s.blendMode);
|
|
1880
1902
|
y = /* @__PURE__ */ f(
|
|
1881
1903
|
"div",
|
|
1882
1904
|
{
|
|
@@ -1889,9 +1911,9 @@ function tr({ node: t, store: e }) {
|
|
|
1889
1911
|
}
|
|
1890
1912
|
);
|
|
1891
1913
|
}
|
|
1892
|
-
return o.motionStyle && (y = /* @__PURE__ */ f(U.div, { "data-lumencast-bind-animate": t.id ?? "", style: o.motionStyle, children: y })), t.keyframes ? /* @__PURE__ */ f(
|
|
1914
|
+
return o.motionStyle && (y = /* @__PURE__ */ f(U.div, { "data-lumencast-bind-animate": t.id ?? "", style: o.motionStyle, children: y })), t.keyframes ? /* @__PURE__ */ f(En, { keyframes: t.keyframes, store: e, nodeId: t.id, children: y }) : y;
|
|
1893
1915
|
}
|
|
1894
|
-
function
|
|
1916
|
+
function rr(t) {
|
|
1895
1917
|
if (typeof t != "object" || t === null) return;
|
|
1896
1918
|
const e = t, n = {};
|
|
1897
1919
|
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;
|
|
@@ -1899,7 +1921,7 @@ function er(t) {
|
|
|
1899
1921
|
function C(t) {
|
|
1900
1922
|
return typeof t == "number" && Number.isFinite(t) ? t : void 0;
|
|
1901
1923
|
}
|
|
1902
|
-
function
|
|
1924
|
+
function ir(t) {
|
|
1903
1925
|
let e = C(t.x), n = C(t.y);
|
|
1904
1926
|
if (e === void 0 && n === void 0) {
|
|
1905
1927
|
const i = t.position;
|
|
@@ -1908,7 +1930,7 @@ function nr(t) {
|
|
|
1908
1930
|
if (!(e === void 0 || n === void 0))
|
|
1909
1931
|
return { x: e, y: n };
|
|
1910
1932
|
}
|
|
1911
|
-
function
|
|
1933
|
+
function Kt(t) {
|
|
1912
1934
|
let e = C(t.width), n = C(t.height);
|
|
1913
1935
|
if (e === void 0 && n === void 0) {
|
|
1914
1936
|
const i = t.size;
|
|
@@ -1917,46 +1939,46 @@ function Ut(t) {
|
|
|
1917
1939
|
if (!(e === void 0 && n === void 0))
|
|
1918
1940
|
return { w: e, h: n };
|
|
1919
1941
|
}
|
|
1920
|
-
function
|
|
1942
|
+
function or(t) {
|
|
1921
1943
|
if (t.kind === "frame") return !1;
|
|
1922
|
-
const e = t.props ?? {}, n = t.bindings ?? {}, i = e.position, r = C(e.x) !== void 0 || "x" in n || (i ? C(i.x) !== void 0 : !1),
|
|
1923
|
-
return r &&
|
|
1924
|
-
}
|
|
1925
|
-
function
|
|
1926
|
-
|
|
1927
|
-
const n =
|
|
1928
|
-
|
|
1929
|
-
const i = t.bindings?.items, r = i === void 0 ? [] : e.signal(
|
|
1944
|
+
const e = t.props ?? {}, n = t.bindings ?? {}, i = e.position, r = C(e.x) !== void 0 || "x" in n || (i ? C(i.x) !== void 0 : !1), s = C(e.y) !== void 0 || "y" in n || (i ? C(i.y) !== void 0 : !1);
|
|
1945
|
+
return r && s;
|
|
1946
|
+
}
|
|
1947
|
+
function sr({ node: t, store: e }) {
|
|
1948
|
+
vt();
|
|
1949
|
+
const n = Rt();
|
|
1950
|
+
Qt(t);
|
|
1951
|
+
const i = t.bindings?.items, r = i === void 0 ? [] : e.signal(I(n, i)).value ?? [];
|
|
1930
1952
|
if (!Array.isArray(r)) return null;
|
|
1931
|
-
const
|
|
1932
|
-
if (!
|
|
1953
|
+
const s = t.children?.[0];
|
|
1954
|
+
if (!s) return null;
|
|
1933
1955
|
const o = typeof t.stagger_ms == "number" ? t.stagger_ms : 0;
|
|
1934
|
-
return /* @__PURE__ */ f(
|
|
1935
|
-
const c =
|
|
1936
|
-
return c <= 0 ? u : /* @__PURE__ */ f(
|
|
1956
|
+
return /* @__PURE__ */ f(tt, { children: r.map((a, l) => {
|
|
1957
|
+
const c = Nn(l, o), u = /* @__PURE__ */ f(jn, { prefix: `${i ?? ""}.${l}`, children: /* @__PURE__ */ f(he, { node: s, store: e }) }, l);
|
|
1958
|
+
return c <= 0 ? u : /* @__PURE__ */ f(jt.Provider, { value: c, children: u }, l);
|
|
1937
1959
|
}) });
|
|
1938
1960
|
}
|
|
1939
|
-
function
|
|
1961
|
+
function ar(t, e, n) {
|
|
1940
1962
|
const i = { ...t.props ?? {} };
|
|
1941
1963
|
if (t.bindings)
|
|
1942
|
-
for (const [r,
|
|
1943
|
-
const o =
|
|
1964
|
+
for (const [r, s] of Object.entries(t.bindings)) {
|
|
1965
|
+
const o = I(n, s);
|
|
1944
1966
|
i[r] = e.signal(o).value;
|
|
1945
1967
|
}
|
|
1946
1968
|
return i;
|
|
1947
1969
|
}
|
|
1948
|
-
function
|
|
1970
|
+
function lr(t, e, n) {
|
|
1949
1971
|
if (!t.bindings) return [];
|
|
1950
1972
|
const i = [];
|
|
1951
1973
|
for (const r of Object.values(t.bindings))
|
|
1952
|
-
i.push(e.signal(
|
|
1974
|
+
i.push(e.signal(I(n, r)).value);
|
|
1953
1975
|
return i;
|
|
1954
1976
|
}
|
|
1955
1977
|
export {
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1978
|
+
gr as A,
|
|
1979
|
+
kr as S,
|
|
1980
|
+
he as T,
|
|
1981
|
+
br as b,
|
|
1982
|
+
yr as r
|
|
1961
1983
|
};
|
|
1962
|
-
//# sourceMappingURL=tree-
|
|
1984
|
+
//# sourceMappingURL=tree-CyxbJbsP.js.map
|