@twick/live-player 0.15.16 → 0.15.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +234 -188
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +234 -188
- package/dist/index.mjs.map +1 -1
- package/dist/{internal-KYB5ZQ5E-BidNZfY8.js → internal-LKI2GAXH-B2uGn4sZ.js} +53 -16
- package/dist/{internal-KYB5ZQ5E-BidNZfY8.js.map → internal-LKI2GAXH-B2uGn4sZ.js.map} +1 -1
- package/dist/{internal-KYB5ZQ5E-Be1ZlZZg.mjs → internal-LKI2GAXH-C1j65akX.mjs} +53 -16
- package/dist/{internal-KYB5ZQ5E-Be1ZlZZg.mjs.map → internal-LKI2GAXH-C1j65akX.mjs.map} +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -279,6 +279,7 @@ function Player({
|
|
|
279
279
|
const playerRef = react.useRef(null);
|
|
280
280
|
const wrapperRef = react.useRef(null);
|
|
281
281
|
const lastRect = react.useRef(null);
|
|
282
|
+
const lastLoggedTimeRef = react.useRef(null);
|
|
282
283
|
const onClickHandler = controls ? () => setPlaying((prev) => !prev) : void 0;
|
|
283
284
|
react.useEffect(() => {
|
|
284
285
|
setPlaying(playing);
|
|
@@ -292,6 +293,12 @@ function Player({
|
|
|
292
293
|
react.useEffect(() => {
|
|
293
294
|
setForcedVolume(volume);
|
|
294
295
|
}, [volume]);
|
|
296
|
+
const variablesJson = JSON.stringify(variables);
|
|
297
|
+
react.useEffect(() => {
|
|
298
|
+
if (playerRef.current) {
|
|
299
|
+
playerRef.current.setAttribute("variables", variablesJson);
|
|
300
|
+
}
|
|
301
|
+
}, [variablesJson]);
|
|
295
302
|
const onTimeUpdateRef = react.useRef(onTimeUpdate);
|
|
296
303
|
const onDurationChangeRef = react.useRef(onDurationChange);
|
|
297
304
|
react.useEffect(() => {
|
|
@@ -302,8 +309,13 @@ function Player({
|
|
|
302
309
|
}, [onDurationChange]);
|
|
303
310
|
const handleTimeUpdate = react.useCallback((event) => {
|
|
304
311
|
const e = event;
|
|
305
|
-
|
|
306
|
-
|
|
312
|
+
const t = e.detail;
|
|
313
|
+
const last = lastLoggedTimeRef.current;
|
|
314
|
+
if (last === null || Math.abs(t - last) > 0.05) {
|
|
315
|
+
lastLoggedTimeRef.current = t;
|
|
316
|
+
}
|
|
317
|
+
setCurrentTime(t);
|
|
318
|
+
onTimeUpdateRef.current(t);
|
|
307
319
|
}, []);
|
|
308
320
|
const handleDurationUpdate = react.useCallback((event) => {
|
|
309
321
|
const e = event;
|
|
@@ -374,7 +386,7 @@ function Player({
|
|
|
374
386
|
document.removeEventListener("keydown", handleKeyDown);
|
|
375
387
|
};
|
|
376
388
|
};
|
|
377
|
-
Promise.resolve().then(() => require("./internal-
|
|
389
|
+
Promise.resolve().then(() => require("./internal-LKI2GAXH-B2uGn4sZ.js")).then(() => {
|
|
378
390
|
requestAnimationFrame(() => {
|
|
379
391
|
if (playerRef.current) {
|
|
380
392
|
playerRef.current.setProject(project);
|
|
@@ -421,15 +433,14 @@ function Player({
|
|
|
421
433
|
"twick-player",
|
|
422
434
|
{
|
|
423
435
|
ref: playerRef,
|
|
424
|
-
playing: String(playingState),
|
|
425
|
-
onClick: onClickHandler,
|
|
426
|
-
variables: JSON.stringify(variables),
|
|
427
|
-
looping: looping ? "true" : "false",
|
|
428
|
-
width,
|
|
429
|
-
height,
|
|
430
436
|
quality,
|
|
431
437
|
fps,
|
|
432
|
-
|
|
438
|
+
width,
|
|
439
|
+
height,
|
|
440
|
+
volume: volumeState,
|
|
441
|
+
playing: playingState,
|
|
442
|
+
looping,
|
|
443
|
+
onClick: onClickHandler
|
|
433
444
|
}
|
|
434
445
|
),
|
|
435
446
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2406,7 +2417,7 @@ function hi(r, t) {
|
|
|
2406
2417
|
const e = new A5(t);
|
|
2407
2418
|
return new Z(r.x * e.scaleX + r.y * e.skewY, r.x * e.skewX + r.y * e.scaleY);
|
|
2408
2419
|
}
|
|
2409
|
-
var uL = class
|
|
2420
|
+
var uL = class r2 {
|
|
2410
2421
|
constructor(t, e = 0, n = 0, s = 0) {
|
|
2411
2422
|
if (this.x = 0, this.y = 0, this.width = 0, this.height = 0, t != null) {
|
|
2412
2423
|
if (typeof t == "number") {
|
|
@@ -2424,23 +2435,23 @@ var uL = class i2 {
|
|
|
2424
2435
|
this.x = t.x, this.y = t.y, this.width = t.width, this.height = t.height;
|
|
2425
2436
|
}
|
|
2426
2437
|
}
|
|
2427
|
-
static createSignal(t, e =
|
|
2428
|
-
return new Zo(["x", "y", "width", "height"], (n) => new
|
|
2438
|
+
static createSignal(t, e = r2.lerp) {
|
|
2439
|
+
return new Zo(["x", "y", "width", "height"], (n) => new r2(n), t, e).toSignal();
|
|
2429
2440
|
}
|
|
2430
2441
|
static lerp(t, e, n) {
|
|
2431
2442
|
let s, a, o, l;
|
|
2432
|
-
return typeof n == "number" ? s = a = o = l = n : n instanceof Z ? (s = o = n.x, a = l = n.y) : (s = n.x, a = n.y, o = n.width, l = n.height), new
|
|
2443
|
+
return typeof n == "number" ? s = a = o = l = n : n instanceof Z ? (s = o = n.x, a = l = n.y) : (s = n.x, a = n.y, o = n.width, l = n.height), new r2(Ft(t.x, e.x, s), Ft(t.y, e.y, a), Ft(t.width, e.width, o), Ft(t.height, e.height, l));
|
|
2433
2444
|
}
|
|
2434
2445
|
static arcLerp(t, e, n, s = false, a) {
|
|
2435
|
-
return a ?? (a = (t.position.sub(e.position).ctg + t.size.sub(e.size).ctg) / 2),
|
|
2446
|
+
return a ?? (a = (t.position.sub(e.position).ctg + t.size.sub(e.size).ctg) / 2), r2.lerp(t, e, new Z(eL(n, s, a)));
|
|
2436
2447
|
}
|
|
2437
2448
|
static fromSizeCentered(t) {
|
|
2438
|
-
return new
|
|
2449
|
+
return new r2(-t.width / 2, -t.height / 2, t.width, t.height);
|
|
2439
2450
|
}
|
|
2440
2451
|
static fromPoints(...t) {
|
|
2441
2452
|
let e = 1 / 0, n = 1 / 0, s = -1 / 0, a = -1 / 0;
|
|
2442
2453
|
for (const o of t) o.x > s && (s = o.x), o.x < e && (e = o.x), o.y > a && (a = o.y), o.y < n && (n = o.y);
|
|
2443
|
-
return new
|
|
2454
|
+
return new r2(e, n, s - e, a - n);
|
|
2444
2455
|
}
|
|
2445
2456
|
static fromBBoxes(...t) {
|
|
2446
2457
|
let e = 1 / 0, n = 1 / 0, s = -1 / 0, a = -1 / 0;
|
|
@@ -2450,10 +2461,10 @@ var uL = class i2 {
|
|
|
2450
2461
|
const u = o.y + o.height;
|
|
2451
2462
|
u > a && (a = u), o.y < n && (n = o.y);
|
|
2452
2463
|
}
|
|
2453
|
-
return new
|
|
2464
|
+
return new r2(e, n, s - e, a - n);
|
|
2454
2465
|
}
|
|
2455
2466
|
lerp(t, e) {
|
|
2456
|
-
return
|
|
2467
|
+
return r2.lerp(this, t, e);
|
|
2457
2468
|
}
|
|
2458
2469
|
get position() {
|
|
2459
2470
|
return new Z(this.x, this.y);
|
|
@@ -2507,16 +2518,16 @@ var uL = class i2 {
|
|
|
2507
2518
|
return [this.topLeft, this.topRight, this.bottomRight, this.bottomLeft];
|
|
2508
2519
|
}
|
|
2509
2520
|
get pixelPerfect() {
|
|
2510
|
-
return new
|
|
2521
|
+
return new r2(Math.floor(this.x), Math.floor(this.y), Math.ceil(this.width + 1), Math.ceil(this.height + 1));
|
|
2511
2522
|
}
|
|
2512
2523
|
transform(t) {
|
|
2513
|
-
return new
|
|
2524
|
+
return new r2(Q1(this.position, t), hi(this.size, t));
|
|
2514
2525
|
}
|
|
2515
2526
|
transformCorners(t) {
|
|
2516
2527
|
return this.corners.map((e) => Q1(e, t));
|
|
2517
2528
|
}
|
|
2518
2529
|
expand(t) {
|
|
2519
|
-
const e = new oL(t), n = new
|
|
2530
|
+
const e = new oL(t), n = new r2(this);
|
|
2520
2531
|
return n.left -= e.left, n.top -= e.top, n.right += e.right, n.bottom += e.bottom, n;
|
|
2521
2532
|
}
|
|
2522
2533
|
addSpacing(t) {
|
|
@@ -2529,15 +2540,15 @@ var uL = class i2 {
|
|
|
2529
2540
|
return this.left < t.right && this.right > t.left && this.top < t.bottom && this.bottom > t.top;
|
|
2530
2541
|
}
|
|
2531
2542
|
intersection(t) {
|
|
2532
|
-
const e = new
|
|
2543
|
+
const e = new r2();
|
|
2533
2544
|
return this.intersects(t) && (e.left = Math.max(this.left, t.left), e.top = Math.max(this.top, t.top), e.right = Math.min(this.right, t.right), e.bottom = Math.min(this.bottom, t.bottom)), e;
|
|
2534
2545
|
}
|
|
2535
2546
|
union(t) {
|
|
2536
|
-
const e = new
|
|
2547
|
+
const e = new r2();
|
|
2537
2548
|
return e.left = Math.min(this.left, t.left), e.top = Math.min(this.top, t.top), e.right = Math.max(this.right, t.right), e.bottom = Math.max(this.bottom, t.bottom), e;
|
|
2538
2549
|
}
|
|
2539
2550
|
toSymbol() {
|
|
2540
|
-
return
|
|
2551
|
+
return r2.symbol;
|
|
2541
2552
|
}
|
|
2542
2553
|
toString() {
|
|
2543
2554
|
return `BBox(${this.x}, ${this.y}, ${this.width}, ${this.height})`;
|
|
@@ -2648,7 +2659,7 @@ function MM(r) {
|
|
|
2648
2659
|
const t = { ...rs, ...r.settings, shared: { ...rs.shared, ...(n = r.settings) == null ? void 0 : n.shared }, rendering: { ...rs.rendering, ...(s = r.settings) == null ? void 0 : s.rendering }, preview: { ...rs.preview, ...(a = r.settings) == null ? void 0 : a.preview } }, e = { ...t, shared: { ...t.shared, background: new T2(t.shared.background), size: new Z(t.shared.size) } };
|
|
2649
2660
|
return { ...r, name: r.name ?? "project", settings: e, plugins: [], logger: new EH(), versions: HM("0.10.4") };
|
|
2650
2661
|
}
|
|
2651
|
-
var
|
|
2662
|
+
var $1 = ((r) => (r[r.Playing = 0] = "Playing", r[r.Rendering = 1] = "Rendering", r[r.Paused = 2] = "Paused", r[r.Presenting = 3] = "Presenting", r))($1 || {});
|
|
2652
2663
|
function wM(r) {
|
|
2653
2664
|
return r && (typeof r == "object" || typeof r == "function") && "toPromise" in r;
|
|
2654
2665
|
}
|
|
@@ -4426,15 +4437,15 @@ class D1 extends pi {
|
|
|
4426
4437
|
for (; l < u || l == u && a.len == 0; ) {
|
|
4427
4438
|
if (a.done) break t;
|
|
4428
4439
|
let T = Math.min(a.len, u - l);
|
|
4429
|
-
|
|
4440
|
+
Y1(s, T, -1);
|
|
4430
4441
|
let f = a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0;
|
|
4431
|
-
|
|
4442
|
+
Y1(e, T, f), f > 0 && Ji(n, e, a.text), a.forward(T), l += T;
|
|
4432
4443
|
}
|
|
4433
4444
|
let h = t[o++];
|
|
4434
4445
|
for (; l < h; ) {
|
|
4435
4446
|
if (a.done) break t;
|
|
4436
4447
|
let T = Math.min(a.len, h - l);
|
|
4437
|
-
|
|
4448
|
+
Y1(e, T, -1), Y1(s, T, a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0), a.forward(T), l += T;
|
|
4438
4449
|
}
|
|
4439
4450
|
}
|
|
4440
4451
|
return { changes: new D1(e, n), filtered: pi.create(s) };
|
|
@@ -4451,7 +4462,7 @@ class D1 extends pi {
|
|
|
4451
4462
|
let s = [], a = [], o = 0, l = null;
|
|
4452
4463
|
function u(T = false) {
|
|
4453
4464
|
if (!T && !s.length) return;
|
|
4454
|
-
o < e &&
|
|
4465
|
+
o < e && Y1(s, e - o, -1);
|
|
4455
4466
|
let f = new D1(s, a);
|
|
4456
4467
|
l = l ? l.compose(f.map(l)) : f, s = [], a = [], o = 0;
|
|
4457
4468
|
}
|
|
@@ -4465,7 +4476,7 @@ class D1 extends pi {
|
|
|
4465
4476
|
if (f > d || f < 0 || d > e) throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${e})`);
|
|
4466
4477
|
let m = p ? typeof p == "string" ? Ie.of(p.split(n || Xu)) : p : Ie.empty, y = m.length;
|
|
4467
4478
|
if (f == d && y == 0) return;
|
|
4468
|
-
f < o && u(), f > o &&
|
|
4479
|
+
f < o && u(), f > o && Y1(s, f - o, -1), Y1(s, d - f, y), Ji(a, s, m), o = d;
|
|
4469
4480
|
}
|
|
4470
4481
|
}
|
|
4471
4482
|
return h(t), u(!l), l;
|
|
@@ -4494,7 +4505,7 @@ class D1 extends pi {
|
|
|
4494
4505
|
return new D1(t, e);
|
|
4495
4506
|
}
|
|
4496
4507
|
}
|
|
4497
|
-
function
|
|
4508
|
+
function Y1(r, t, e, n = false) {
|
|
4498
4509
|
if (t == 0 && e <= 0) return;
|
|
4499
4510
|
let s = r.length - 2;
|
|
4500
4511
|
s >= 0 && e <= 0 && e == r[s + 1] ? r[s] += t : s >= 0 && t == 0 && r[s] == 0 ? r[s + 1] += e : n ? (r[s] += t, r[s + 1] += e) : r.push(t, e);
|
|
@@ -4526,12 +4537,12 @@ function Yu(r, t, e, n = false) {
|
|
|
4526
4537
|
if (o.done && l.len || l.done && o.len) throw new Error("Mismatched change set lengths");
|
|
4527
4538
|
if (o.ins == -1 && l.ins == -1) {
|
|
4528
4539
|
let h = Math.min(o.len, l.len);
|
|
4529
|
-
|
|
4540
|
+
Y1(s, h, -1), o.forward(h), l.forward(h);
|
|
4530
4541
|
} else if (l.ins >= 0 && (o.ins < 0 || u == o.i || o.off == 0 && (l.len < o.len || l.len == o.len && !e))) {
|
|
4531
4542
|
let h = l.len;
|
|
4532
|
-
for (
|
|
4543
|
+
for (Y1(s, l.ins, -1); h; ) {
|
|
4533
4544
|
let T = Math.min(o.len, h);
|
|
4534
|
-
o.ins >= 0 && u < o.i && o.len <= T && (
|
|
4545
|
+
o.ins >= 0 && u < o.i && o.len <= T && (Y1(s, 0, o.ins), a && Ji(a, s, o.text), u = o.i), o.forward(T), h -= T;
|
|
4535
4546
|
}
|
|
4536
4547
|
l.next();
|
|
4537
4548
|
} else if (o.ins >= 0) {
|
|
@@ -4541,7 +4552,7 @@ function Yu(r, t, e, n = false) {
|
|
|
4541
4552
|
h += f, T -= f, l.forward(f);
|
|
4542
4553
|
} else if (l.ins == 0 && l.len < T) T -= l.len, l.next();
|
|
4543
4554
|
else break;
|
|
4544
|
-
|
|
4555
|
+
Y1(s, h, u < o.i ? o.ins : 0), a && u < o.i && Ji(a, s, o.text), u = o.i, o.forward(o.len - T);
|
|
4545
4556
|
} else {
|
|
4546
4557
|
if (o.done && l.done) return a ? D1.createSet(s, a) : pi.create(s);
|
|
4547
4558
|
throw new Error("Mismatched change set lengths");
|
|
@@ -4552,16 +4563,16 @@ function bL(r, t, e = false) {
|
|
|
4552
4563
|
let n = [], s = e ? [] : null, a = new M5(r), o = new M5(t);
|
|
4553
4564
|
for (let l = false; ; ) {
|
|
4554
4565
|
if (a.done && o.done) return s ? D1.createSet(n, s) : pi.create(n);
|
|
4555
|
-
if (a.ins == 0)
|
|
4556
|
-
else if (o.len == 0 && !o.done)
|
|
4566
|
+
if (a.ins == 0) Y1(n, a.len, 0, l), a.next();
|
|
4567
|
+
else if (o.len == 0 && !o.done) Y1(n, 0, o.ins, l), s && Ji(s, n, o.text), o.next();
|
|
4557
4568
|
else {
|
|
4558
4569
|
if (a.done || o.done) throw new Error("Mismatched change set lengths");
|
|
4559
4570
|
{
|
|
4560
4571
|
let u = Math.min(a.len2, o.len), h = n.length;
|
|
4561
4572
|
if (a.ins == -1) {
|
|
4562
4573
|
let T = o.ins == -1 ? -1 : o.off ? 0 : o.ins;
|
|
4563
|
-
|
|
4564
|
-
} else o.ins == -1 ? (
|
|
4574
|
+
Y1(n, u, T, l), s && T && Ji(s, n, o.text);
|
|
4575
|
+
} else o.ins == -1 ? (Y1(n, a.off ? 0 : a.len, u, l), s && Ji(s, n, a.textBit(u))) : (Y1(n, a.off ? 0 : a.len, o.off ? 0 : o.ins, l), s && !o.off && Ji(s, n, o.text));
|
|
4565
4576
|
l = (a.ins > u || o.ins >= 0 && o.len > u) && (l || n.length > h), a.forward2(u), o.forward(u);
|
|
4566
4577
|
}
|
|
4567
4578
|
}
|
|
@@ -4971,12 +4982,12 @@ class _1 {
|
|
|
4971
4982
|
}
|
|
4972
4983
|
_1.reconfigure = _1.define();
|
|
4973
4984
|
_1.appendConfig = _1.define();
|
|
4974
|
-
class
|
|
4985
|
+
class J1 {
|
|
4975
4986
|
constructor(t, e, n, s, a, o) {
|
|
4976
|
-
this.startState = t, this.changes = e, this.selection = n, this.effects = s, this.annotations = a, this.scrollIntoView = o, this._doc = null, this._state = null, n && SL(n, e.newLength), a.some((l) => l.type ==
|
|
4987
|
+
this.startState = t, this.changes = e, this.selection = n, this.effects = s, this.annotations = a, this.scrollIntoView = o, this._doc = null, this._state = null, n && SL(n, e.newLength), a.some((l) => l.type == J1.time) || (this.annotations = a.concat(J1.time.of(Date.now())));
|
|
4977
4988
|
}
|
|
4978
4989
|
static create(t, e, n, s, a, o) {
|
|
4979
|
-
return new
|
|
4990
|
+
return new J1(t, e, n, s, a, o);
|
|
4980
4991
|
}
|
|
4981
4992
|
get newDoc() {
|
|
4982
4993
|
return this._doc || (this._doc = this.changes.apply(this.startState.doc));
|
|
@@ -4997,14 +5008,14 @@ class Y1 {
|
|
|
4997
5008
|
return this.startState.config != this.state.config;
|
|
4998
5009
|
}
|
|
4999
5010
|
isUserEvent(t) {
|
|
5000
|
-
let e = this.annotation(
|
|
5011
|
+
let e = this.annotation(J1.userEvent);
|
|
5001
5012
|
return !!(e && (e == t || e.length > t.length && e.slice(0, t.length) == t && e[t.length] == "."));
|
|
5002
5013
|
}
|
|
5003
5014
|
}
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5015
|
+
J1.time = Gn.define();
|
|
5016
|
+
J1.userEvent = Gn.define();
|
|
5017
|
+
J1.addToHistory = Gn.define();
|
|
5018
|
+
J1.remote = Gn.define();
|
|
5008
5019
|
function dw(r, t) {
|
|
5009
5020
|
let e = [];
|
|
5010
5021
|
for (let n = 0, s = 0; ; ) {
|
|
@@ -5022,7 +5033,7 @@ function IL(r, t, e) {
|
|
|
5022
5033
|
}
|
|
5023
5034
|
function ic(r, t, e) {
|
|
5024
5035
|
let n = t.selection, s = rn(t.annotations);
|
|
5025
|
-
return t.userEvent && (s = s.concat(
|
|
5036
|
+
return t.userEvent && (s = s.concat(J1.userEvent.of(t.userEvent))), { changes: t.changes instanceof D1 ? t.changes : D1.of(t.changes || [], e, r.facet(ML)), selection: n && (n instanceof Rt ? n : Rt.single(n.anchor, n.head)), effects: rn(t.effects), annotations: s, scrollIntoView: !!t.scrollIntoView };
|
|
5026
5037
|
}
|
|
5027
5038
|
function VL(r, t, e) {
|
|
5028
5039
|
let n = ic(r, t.length ? t[0] : {}, r.doc.length);
|
|
@@ -5032,7 +5043,7 @@ function VL(r, t, e) {
|
|
|
5032
5043
|
let o = !!t[a].sequential;
|
|
5033
5044
|
n = IL(n, ic(r, t[a], o ? n.changes.newLength : r.doc.length), o);
|
|
5034
5045
|
}
|
|
5035
|
-
let s =
|
|
5046
|
+
let s = J1.create(r, n.changes, n.selection, n.effects, n.annotations, n.scrollIntoView);
|
|
5036
5047
|
return gw(e ? pw(s) : s);
|
|
5037
5048
|
}
|
|
5038
5049
|
function pw(r) {
|
|
@@ -5052,12 +5063,12 @@ function pw(r) {
|
|
|
5052
5063
|
let o = r.changes.filter(e);
|
|
5053
5064
|
s = o.changes, a = o.filtered.mapDesc(o.changes).invertedDesc;
|
|
5054
5065
|
}
|
|
5055
|
-
r =
|
|
5066
|
+
r = J1.create(t, s, r.selection && r.selection.map(a), _1.mapEffects(r.effects, a), r.annotations, r.scrollIntoView);
|
|
5056
5067
|
}
|
|
5057
5068
|
let n = t.facet(CL);
|
|
5058
5069
|
for (let s = n.length - 1; s >= 0; s--) {
|
|
5059
5070
|
let a = n[s](r);
|
|
5060
|
-
a instanceof
|
|
5071
|
+
a instanceof J1 ? r = a : Array.isArray(a) && a.length == 1 && a[0] instanceof J1 ? r = a[0] : r = VL(t, rn(a), false);
|
|
5061
5072
|
}
|
|
5062
5073
|
return r;
|
|
5063
5074
|
}
|
|
@@ -5067,7 +5078,7 @@ function gw(r) {
|
|
|
5067
5078
|
let a = e[s](r);
|
|
5068
5079
|
a && Object.keys(a).length && (n = IL(n, ic(t, a, r.changes.newLength), true));
|
|
5069
5080
|
}
|
|
5070
|
-
return n == r ? r :
|
|
5081
|
+
return n == r ? r : J1.create(t, r.changes, r.selection, n.effects, n.annotations, n.scrollIntoView);
|
|
5071
5082
|
}
|
|
5072
5083
|
const mw = [];
|
|
5073
5084
|
function rn(r) {
|
|
@@ -5780,7 +5791,7 @@ class $o {
|
|
|
5780
5791
|
var U2 = function(r) {
|
|
5781
5792
|
return r[r.Text = 0] = "Text", r[r.WidgetBefore = 1] = "WidgetBefore", r[r.WidgetAfter = 2] = "WidgetAfter", r[r.WidgetRange = 3] = "WidgetRange", r;
|
|
5782
5793
|
}(U2 || (U2 = {}));
|
|
5783
|
-
class
|
|
5794
|
+
class t2 extends Jr {
|
|
5784
5795
|
constructor(t, e, n, s) {
|
|
5785
5796
|
super(), this.startSide = t, this.endSide = e, this.widget = n, this.spec = s;
|
|
5786
5797
|
}
|
|
@@ -5813,8 +5824,8 @@ class J1 extends Jr {
|
|
|
5813
5824
|
return this.widget ? this.widget.estimatedHeight > -1 : false;
|
|
5814
5825
|
}
|
|
5815
5826
|
}
|
|
5816
|
-
|
|
5817
|
-
class J5 extends
|
|
5827
|
+
t2.none = Me.empty;
|
|
5828
|
+
class J5 extends t2 {
|
|
5818
5829
|
constructor(t) {
|
|
5819
5830
|
let { start: e, end: n } = RL(t);
|
|
5820
5831
|
super(e ? -1 : 5e8, n ? 1 : -6e8, null, t), this.tagName = t.tagName || "span", this.attrs = t.class && t.attributes ? Jh(t.attributes, { class: t.class }) : t.class ? { class: t.class } : t.attributes || Pa;
|
|
@@ -5828,7 +5839,7 @@ class J5 extends J1 {
|
|
|
5828
5839
|
}
|
|
5829
5840
|
}
|
|
5830
5841
|
J5.prototype.point = false;
|
|
5831
|
-
class t0 extends
|
|
5842
|
+
class t0 extends t2 {
|
|
5832
5843
|
constructor(t) {
|
|
5833
5844
|
super(-2e8, -2e8, null, t);
|
|
5834
5845
|
}
|
|
@@ -5842,7 +5853,7 @@ class t0 extends J1 {
|
|
|
5842
5853
|
}
|
|
5843
5854
|
t0.prototype.mapMode = S2.TrackBefore;
|
|
5844
5855
|
t0.prototype.point = true;
|
|
5845
|
-
class t4 extends
|
|
5856
|
+
class t4 extends t2 {
|
|
5846
5857
|
constructor(t, e, n, s, a, o) {
|
|
5847
5858
|
super(e, n, a, t), this.block = s, this.isReplace = o, this.mapMode = s ? e <= 0 ? S2.TrackBefore : S2.TrackAfter : S2.TrackDel;
|
|
5848
5859
|
}
|
|
@@ -6347,7 +6358,7 @@ class yn {
|
|
|
6347
6358
|
let u = [];
|
|
6348
6359
|
return o && u.push(Yo.of((h) => {
|
|
6349
6360
|
let T = h.plugin(l);
|
|
6350
|
-
return T ? o(T) :
|
|
6361
|
+
return T ? o(T) : t2.none;
|
|
6351
6362
|
})), a && u.push(a(l)), u;
|
|
6352
6363
|
});
|
|
6353
6364
|
}
|
|
@@ -7192,7 +7203,7 @@ const r9 = new class extends $o {
|
|
|
7192
7203
|
}();
|
|
7193
7204
|
class Td {
|
|
7194
7205
|
constructor(t) {
|
|
7195
|
-
this.view = t, this.decorations = [], this.blockWrappers = [], this.dynamicDecorationMap = [false], this.domChanged = null, this.hasComposition = null, this.editContextFormatting =
|
|
7206
|
+
this.view = t, this.decorations = [], this.blockWrappers = [], this.dynamicDecorationMap = [false], this.domChanged = null, this.hasComposition = null, this.editContextFormatting = t2.none, this.lastCompositionAfterCursor = false, this.minWidth = 0, this.minWidthFrom = 0, this.minWidthTo = 0, this.impreciseAnchor = null, this.impreciseHead = null, this.forceSelection = false, this.lastUpdate = Date.now(), this.updateDeco(), this.tile = new t7(t, t.contentDOM), this.updateInner([new B2(0, 0, 0, t.state.doc.length)], null);
|
|
7196
7207
|
}
|
|
7197
7208
|
update(t) {
|
|
7198
7209
|
var e;
|
|
@@ -7410,12 +7421,12 @@ class Td {
|
|
|
7410
7421
|
let a = s == e.viewports.length ? null : e.viewports[s], o = a ? a.from - 1 : this.view.state.doc.length;
|
|
7411
7422
|
if (o > n) {
|
|
7412
7423
|
let l = (e.lineBlockAt(o).bottom - e.lineBlockAt(n).top) / this.view.scaleY;
|
|
7413
|
-
t.push(
|
|
7424
|
+
t.push(t2.replace({ widget: new n9(l), block: true, inclusive: true, isBlockGap: true }).range(n, o));
|
|
7414
7425
|
}
|
|
7415
7426
|
if (!a) break;
|
|
7416
7427
|
n = a.to + 1;
|
|
7417
7428
|
}
|
|
7418
|
-
return
|
|
7429
|
+
return t2.set(t);
|
|
7419
7430
|
}
|
|
7420
7431
|
updateDeco() {
|
|
7421
7432
|
let t = 1, e = this.view.state.facet(Yo).map((a) => (this.dynamicDecorationMap[t++] = typeof a == "function") ? a(this.view) : a), n = false, s = this.view.state.facet(sT).map((a, o) => {
|
|
@@ -8460,7 +8471,7 @@ function ja(r, t) {
|
|
|
8460
8471
|
return r == t ? r : (r.constructor != t.constructor && (xn = true), t);
|
|
8461
8472
|
}
|
|
8462
8473
|
a2.prototype.size = 1;
|
|
8463
|
-
const zC =
|
|
8474
|
+
const zC = t2.replace({});
|
|
8464
8475
|
class _x extends a2 {
|
|
8465
8476
|
constructor(t, e, n) {
|
|
8466
8477
|
super(t, e), this.deco = n, this.spaceAbove = 0;
|
|
@@ -8764,7 +8775,7 @@ class a9 {
|
|
|
8764
8775
|
return true;
|
|
8765
8776
|
}
|
|
8766
8777
|
draw(t, e) {
|
|
8767
|
-
return
|
|
8778
|
+
return t2.replace({ widget: new JC(this.displaySize * (e ? t.scaleY : t.scaleX), e) }).range(this.from, this.to);
|
|
8768
8779
|
}
|
|
8769
8780
|
}
|
|
8770
8781
|
class JC extends $o {
|
|
@@ -8788,7 +8799,7 @@ class Ed {
|
|
|
8788
8799
|
let e = t.facet(nT).some((n) => typeof n != "function" && n.class == "cm-lineWrapping");
|
|
8789
8800
|
this.heightOracle = new jC(e), this.stateDeco = Hd(t), this.heightMap = a2.empty().applyChanges(this.stateDeco, Ie.empty, this.heightOracle.setDoc(t.doc), [new B2(0, 0, 0, t.doc.length)]);
|
|
8790
8801
|
for (let n = 0; n < 2 && (this.viewport = this.getViewport(0, null), !!this.updateForViewport()); n++) ;
|
|
8791
|
-
this.updateViewportLines(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco =
|
|
8802
|
+
this.updateViewportLines(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = t2.set(this.lineGaps.map((n) => n.draw(this, false))), this.computeVisibleRanges();
|
|
8792
8803
|
}
|
|
8793
8804
|
updateForViewport() {
|
|
8794
8805
|
let t = [this.viewport], { main: e } = this.state.selection;
|
|
@@ -8941,7 +8952,7 @@ class Ed {
|
|
|
8941
8952
|
return this.heightOracle.lineWrapping ? t.height * a : s.total * this.heightOracle.charWidth * a;
|
|
8942
8953
|
}
|
|
8943
8954
|
updateLineGaps(t) {
|
|
8944
|
-
a9.same(t, this.lineGaps) || (this.lineGaps = t, this.lineGapDeco =
|
|
8955
|
+
a9.same(t, this.lineGaps) || (this.lineGaps = t, this.lineGapDeco = t2.set(t.map((e) => e.draw(this, this.heightOracle.lineWrapping))));
|
|
8945
8956
|
}
|
|
8946
8957
|
computeVisibleRanges(t) {
|
|
8947
8958
|
let e = this.stateDeco;
|
|
@@ -9303,11 +9314,11 @@ class aD {
|
|
|
9303
9314
|
let u = this.toEditorPos(a.rangeStart), h = this.toEditorPos(a.rangeEnd);
|
|
9304
9315
|
if (u < h) {
|
|
9305
9316
|
let T = `text-decoration: underline ${/^[a-z]/.test(o) ? o + " " : o == "Dashed" ? "dashed " : o == "Squiggle" ? "wavy " : ""}${/thin/i.test(l) ? 1 : 2}px`;
|
|
9306
|
-
s.push(
|
|
9317
|
+
s.push(t2.mark({ attributes: { style: T } }).range(u, h));
|
|
9307
9318
|
}
|
|
9308
9319
|
}
|
|
9309
9320
|
}
|
|
9310
|
-
t.dispatch({ effects: rx.of(
|
|
9321
|
+
t.dispatch({ effects: rx.of(t2.set(s)) });
|
|
9311
9322
|
}, this.handlers.compositionstart = () => {
|
|
9312
9323
|
t.inputState.composing < 0 && (t.inputState.composing = 0, t.inputState.compositionFirstChange = true);
|
|
9313
9324
|
}, this.handlers.compositionend = () => {
|
|
@@ -9415,7 +9426,7 @@ class be {
|
|
|
9415
9426
|
});
|
|
9416
9427
|
}
|
|
9417
9428
|
dispatch(...t) {
|
|
9418
|
-
let e = t.length == 1 && t[0] instanceof
|
|
9429
|
+
let e = t.length == 1 && t[0] instanceof J1 ? t : t.length == 1 && Array.isArray(t[0]) ? t[0] : [this.state.update(...t)];
|
|
9419
9430
|
this.dispatchTransactions(e, this);
|
|
9420
9431
|
}
|
|
9421
9432
|
update(t) {
|
|
@@ -16408,7 +16419,7 @@ function Ue() {
|
|
|
16408
16419
|
return h && h.__esModule ? h : { default: h };
|
|
16409
16420
|
};
|
|
16410
16421
|
Object.defineProperty(Is, "__esModule", { value: true });
|
|
16411
|
-
var n = jt, s = e(Ne), a = e(
|
|
16422
|
+
var n = jt, s = e(Ne), a = e(e2()), o = e(Le), l = zn, u;
|
|
16412
16423
|
return function(h) {
|
|
16413
16424
|
var T = 7.2, f = 72, d = { em: function(W) {
|
|
16414
16425
|
return W;
|
|
@@ -16746,7 +16757,7 @@ var AV = EV(Ne), HV = function() {
|
|
|
16746
16757
|
}();
|
|
16747
16758
|
b7.default = HV;
|
|
16748
16759
|
var Zp;
|
|
16749
|
-
function
|
|
16760
|
+
function e2() {
|
|
16750
16761
|
if (Zp) return Os;
|
|
16751
16762
|
Zp = 1;
|
|
16752
16763
|
var r = _ && _.__values || function(h) {
|
|
@@ -17321,7 +17332,7 @@ var Hi = {};
|
|
|
17321
17332
|
return T && T.__esModule ? T : { default: T };
|
|
17322
17333
|
};
|
|
17323
17334
|
Object.defineProperty(r, "__esModule", { value: true }), r.TagsFactory = r.AllTags = r.NoTags = r.AbstractTags = r.TagInfo = r.Label = void 0;
|
|
17324
|
-
var s = n(
|
|
17335
|
+
var s = n(e2()), a = /* @__PURE__ */ function() {
|
|
17325
17336
|
function T(f, d) {
|
|
17326
17337
|
f === void 0 && (f = "???"), d === void 0 && (d = ""), this.tag = f, this.id = d;
|
|
17327
17338
|
}
|
|
@@ -18623,7 +18634,7 @@ var Cn = _ && _.__assign || function() {
|
|
|
18623
18634
|
return r && r.__esModule ? r : { default: r };
|
|
18624
18635
|
};
|
|
18625
18636
|
Object.defineProperty(p2, "__esModule", { value: true });
|
|
18626
|
-
var HT = SP(Nt), _t = E7(Ne), S1 = E7(Le), A7 = E7(
|
|
18637
|
+
var HT = SP(Nt), _t = E7(Ne), S1 = E7(Le), A7 = E7(e2()), MT = q1, h1 = E7(Ue()), $n = jt, $x = Hi, Yx = G3, zc = zn, EP = H1, Vt = {}, AP = 1.2 / 0.85, HP = { fontfamily: 1, fontsize: 1, fontweight: 1, fontstyle: 1, color: 1, background: 1, id: 1, class: 1, href: 1, style: 1 };
|
|
18627
18638
|
Vt.Open = function(r, t) {
|
|
18628
18639
|
r.Push(r.itemFactory.create("open"));
|
|
18629
18640
|
};
|
|
@@ -18745,7 +18756,7 @@ Vt.MoveRoot = function(r, t, e) {
|
|
|
18745
18756
|
n = parseInt(n, 10) / 15 + "em", n.substr(0, 1) !== "-" && (n = "+" + n), r.stack.global[e] = n;
|
|
18746
18757
|
};
|
|
18747
18758
|
Vt.Accent = function(r, t, e, n) {
|
|
18748
|
-
var s = r.ParseArg(t), a = Cn(Cn({},
|
|
18759
|
+
var s = r.ParseArg(t), a = Cn(Cn({}, h1.default.getFontDef(r)), { accent: true, mathaccent: true }), o = _t.default.createEntity(e), l = r.create("token", "mo", a, o), u = l;
|
|
18749
18760
|
_t.default.setAttribute(u, "stretchy", !!n);
|
|
18750
18761
|
var h = _t.default.isEmbellished(s) ? _t.default.getCoreMO(s) : s;
|
|
18751
18762
|
(_t.default.isType(h, "mo") || _t.default.getProperty(h, "movablelimits")) && _t.default.setProperties(h, { movablelimits: false });
|
|
@@ -18756,23 +18767,23 @@ Vt.Accent = function(r, t, e, n) {
|
|
|
18756
18767
|
};
|
|
18757
18768
|
Vt.UnderOver = function(r, t, e, n) {
|
|
18758
18769
|
var s = _t.default.createEntity(e), a = r.create("token", "mo", { stretchy: true, accent: true }, s), o = t.charAt(1) === "o" ? "over" : "under", l = r.ParseArg(t);
|
|
18759
|
-
r.Push(
|
|
18770
|
+
r.Push(h1.default.underOver(r, l, a, o, n));
|
|
18760
18771
|
};
|
|
18761
18772
|
Vt.Overset = function(r, t) {
|
|
18762
18773
|
var e = r.ParseArg(t), n = r.ParseArg(t);
|
|
18763
|
-
|
|
18774
|
+
h1.default.checkMovableLimits(n), e.isKind("mo") && _t.default.setAttribute(e, "accent", false);
|
|
18764
18775
|
var s = r.create("node", "mover", [n, e]);
|
|
18765
18776
|
r.Push(s);
|
|
18766
18777
|
};
|
|
18767
18778
|
Vt.Underset = function(r, t) {
|
|
18768
18779
|
var e = r.ParseArg(t), n = r.ParseArg(t);
|
|
18769
|
-
|
|
18780
|
+
h1.default.checkMovableLimits(n), e.isKind("mo") && _t.default.setAttribute(e, "accent", false);
|
|
18770
18781
|
var s = r.create("node", "munder", [n, e], { accentunder: false });
|
|
18771
18782
|
r.Push(s);
|
|
18772
18783
|
};
|
|
18773
18784
|
Vt.Overunderset = function(r, t) {
|
|
18774
18785
|
var e = r.ParseArg(t), n = r.ParseArg(t), s = r.ParseArg(t);
|
|
18775
|
-
|
|
18786
|
+
h1.default.checkMovableLimits(s), e.isKind("mo") && _t.default.setAttribute(e, "accent", false), n.isKind("mo") && _t.default.setAttribute(n, "accent", false);
|
|
18776
18787
|
var a = r.create("node", "munderover", [s, n, e], { accent: false, accentunder: false });
|
|
18777
18788
|
r.Push(a);
|
|
18778
18789
|
};
|
|
@@ -18797,7 +18808,7 @@ Vt.MmlToken = function(r, t) {
|
|
|
18797
18808
|
var u = n.match(/^([a-z]+)\s*=\s*('[^']*'|"[^"]*"|[^ ,]*)\s*,?\s*/i);
|
|
18798
18809
|
if (!u) throw new S1.default("InvalidMathMLAttr", "Invalid MathML attribute: %1", n);
|
|
18799
18810
|
if (!l.attributes.hasDefault(u[1]) && !HP[u[1]]) throw new S1.default("UnknownAttrForElement", "%1 is not a recognized attribute for %2", u[1], e);
|
|
18800
|
-
var h =
|
|
18811
|
+
var h = h1.default.MmlFilterAttribute(r, u[1], u[2].replace(/^(['"])(.*)\1$/, "$2"));
|
|
18801
18812
|
h && (h.toLowerCase() === "true" ? h = true : h.toLowerCase() === "false" && (h = false), a[u[1]] = h, o.push(u[1])), n = n.substr(u[0].length);
|
|
18802
18813
|
}
|
|
18803
18814
|
o.length && (a["mjx-keep-attrs"] = o.join(" "));
|
|
@@ -18815,7 +18826,7 @@ Vt.Phantom = function(r, t, e, n) {
|
|
|
18815
18826
|
r.Push(a);
|
|
18816
18827
|
};
|
|
18817
18828
|
Vt.Smash = function(r, t) {
|
|
18818
|
-
var e =
|
|
18829
|
+
var e = h1.default.trimSpaces(r.GetBrackets(t, "")), n = r.create("node", "mpadded", [r.ParseArg(t)]);
|
|
18819
18830
|
switch (e) {
|
|
18820
18831
|
case "b":
|
|
18821
18832
|
_t.default.setAttribute(n, "depth", 0);
|
|
@@ -18876,14 +18887,14 @@ Vt.BuildRel = function(r, t) {
|
|
|
18876
18887
|
r.Push(a);
|
|
18877
18888
|
};
|
|
18878
18889
|
Vt.HBox = function(r, t, e, n) {
|
|
18879
|
-
r.PushAll(
|
|
18890
|
+
r.PushAll(h1.default.internalMath(r, r.GetArgument(t), e, n));
|
|
18880
18891
|
};
|
|
18881
18892
|
Vt.FBox = function(r, t) {
|
|
18882
|
-
var e =
|
|
18893
|
+
var e = h1.default.internalMath(r, r.GetArgument(t)), n = r.create("node", "menclose", e, { notation: "box" });
|
|
18883
18894
|
r.Push(n);
|
|
18884
18895
|
};
|
|
18885
18896
|
Vt.FrameBox = function(r, t) {
|
|
18886
|
-
var e = r.GetBrackets(t), n = r.GetBrackets(t) || "c", s =
|
|
18897
|
+
var e = r.GetBrackets(t), n = r.GetBrackets(t) || "c", s = h1.default.internalMath(r, r.GetArgument(t));
|
|
18887
18898
|
e && (s = [r.create("node", "mpadded", s, { width: e, "data-align": (0, EP.lookup)(n, { l: "left", r: "right" }, "center") })]);
|
|
18888
18899
|
var a = r.create("node", "TeXAtom", [r.create("node", "menclose", s, { notation: "box" })], { texClass: $n.TEXCLASS.ORD });
|
|
18889
18900
|
r.Push(a);
|
|
@@ -18920,7 +18931,7 @@ Vt.Entry = function(r, t) {
|
|
|
18920
18931
|
}
|
|
18921
18932
|
var p = a.substr(r.i, u - r.i);
|
|
18922
18933
|
if (!p.match(/^\s*\\text[^a-zA-Z]/) || l !== p.replace(/\s+$/, "").length - 1) {
|
|
18923
|
-
var m =
|
|
18934
|
+
var m = h1.default.internalMath(r, h1.default.trimSpaces(p), 0);
|
|
18924
18935
|
r.PushAll(m), r.i = u;
|
|
18925
18936
|
}
|
|
18926
18937
|
}
|
|
@@ -18932,7 +18943,7 @@ Vt.CrLaTeX = function(r, t, e) {
|
|
|
18932
18943
|
e === void 0 && (e = false);
|
|
18933
18944
|
var n;
|
|
18934
18945
|
if (!e && (r.string.charAt(r.i) === "*" && r.i++, r.string.charAt(r.i) === "[")) {
|
|
18935
|
-
var s = r.GetBrackets(t, ""), a = AT(
|
|
18946
|
+
var s = r.GetBrackets(t, ""), a = AT(h1.default.matchDimen(s), 2), o = a[0], l = a[1];
|
|
18936
18947
|
if (s && !o) throw new S1.default("BracketMustBeDimension", "Bracket argument to %1 must be a dimension", r.currentCS);
|
|
18937
18948
|
n = o + l;
|
|
18938
18949
|
}
|
|
@@ -18967,7 +18978,7 @@ Vt.BeginEnd = function(r, t) {
|
|
|
18967
18978
|
}
|
|
18968
18979
|
r.stack.env.closing = e;
|
|
18969
18980
|
}
|
|
18970
|
-
|
|
18981
|
+
h1.default.checkMaxMacros(r, false), r.parse("environment", [r, e]);
|
|
18971
18982
|
};
|
|
18972
18983
|
Vt.Array = function(r, t, e, n, s, a, o, l, u) {
|
|
18973
18984
|
s || (s = r.GetArgument("\\begin{" + t.getName() + "}"));
|
|
@@ -18978,13 +18989,13 @@ Vt.Array = function(r, t, e, n, s, a, o, l, u) {
|
|
|
18978
18989
|
};
|
|
18979
18990
|
Vt.AlignedArray = function(r, t) {
|
|
18980
18991
|
var e = r.GetBrackets("\\begin{" + t.getName() + "}"), n = Vt.Array(r, t);
|
|
18981
|
-
return
|
|
18992
|
+
return h1.default.setArrayAlign(n, e);
|
|
18982
18993
|
};
|
|
18983
18994
|
Vt.Equation = function(r, t, e) {
|
|
18984
|
-
return r.Push(t),
|
|
18995
|
+
return r.Push(t), h1.default.checkEqnEnv(r), r.itemFactory.create("equation", e).setProperty("name", t.getName());
|
|
18985
18996
|
};
|
|
18986
18997
|
Vt.EqnArray = function(r, t, e, n, s, a) {
|
|
18987
|
-
r.Push(t), n &&
|
|
18998
|
+
r.Push(t), n && h1.default.checkEqnEnv(r), s = s.replace(/[^clr]/g, "").split("").join(" "), s = s.replace(/l/g, "left").replace(/r/g, "right").replace(/c/g, "center");
|
|
18988
18999
|
var o = r.itemFactory.create("eqnarray", t.getName(), e, n, r.stack.global);
|
|
18989
19000
|
return o.arraydef = { displaystyle: true, columnalign: s, columnspacing: a || "1em", rowspacing: "3pt", side: r.options.tagSide, minlabelspacing: r.options.tagIndent }, o;
|
|
18990
19001
|
};
|
|
@@ -19004,7 +19015,7 @@ Vt.HandleRef = function(r, t, e) {
|
|
|
19004
19015
|
s || (r.tags.refUpdate || (r.tags.redo = true), s = new $x.Label());
|
|
19005
19016
|
var a = s.tag;
|
|
19006
19017
|
e && (a = r.tags.formatTag(a));
|
|
19007
|
-
var o = r.create("node", "mrow",
|
|
19018
|
+
var o = r.create("node", "mrow", h1.default.internalMath(r, a), { href: r.tags.formatUrl(s.id, r.options.baseURL), class: "MathJax_ref" });
|
|
19008
19019
|
r.Push(o);
|
|
19009
19020
|
};
|
|
19010
19021
|
Vt.Macro = function(r, t, e, n, s) {
|
|
@@ -19015,9 +19026,9 @@ Vt.Macro = function(r, t, e, n, s) {
|
|
|
19015
19026
|
a.push(o ?? s);
|
|
19016
19027
|
}
|
|
19017
19028
|
for (var l = a.length; l < n; l++) a.push(r.GetArgument(t));
|
|
19018
|
-
e =
|
|
19029
|
+
e = h1.default.substituteArgs(r, a, e);
|
|
19019
19030
|
}
|
|
19020
|
-
r.string =
|
|
19031
|
+
r.string = h1.default.addArgs(r, e, r.string.slice(r.i)), r.i = 0, h1.default.checkMaxMacros(r);
|
|
19021
19032
|
};
|
|
19022
19033
|
Vt.MathChoice = function(r, t) {
|
|
19023
19034
|
var e = r.ParseArg(t), n = r.ParseArg(t), s = r.ParseArg(t), a = r.ParseArg(t);
|
|
@@ -19264,7 +19275,7 @@ var XP = _ && _.__extends || /* @__PURE__ */ function() {
|
|
|
19264
19275
|
return r && r.__esModule ? r : { default: r };
|
|
19265
19276
|
};
|
|
19266
19277
|
Object.defineProperty(vT, "__esModule", { value: true });
|
|
19267
|
-
var s_ = vT.TeX = void 0, ig = r0, rg = H1, ng = x7, D4 = A0(LT), sg = A0(Ne), YP = A0(
|
|
19278
|
+
var s_ = vT.TeX = void 0, ig = r0, rg = H1, ng = x7, D4 = A0(LT), sg = A0(Ne), YP = A0(e2()), JP = A0(Le), tk = A0(S7), Vs = Hi, ek = he, ik = function(r) {
|
|
19268
19279
|
XP(t, r);
|
|
19269
19280
|
function t(e) {
|
|
19270
19281
|
e === void 0 && (e = {});
|
|
@@ -19315,7 +19326,7 @@ var DT = {}, rk = {};
|
|
|
19315
19326
|
return o && o.__esModule ? o : { default: o };
|
|
19316
19327
|
};
|
|
19317
19328
|
Object.defineProperty(r, "__esModule", { value: true }), r.ActionConfiguration = r.ActionMethods = void 0;
|
|
19318
|
-
var e = he, n = t(
|
|
19329
|
+
var e = he, n = t(e2()), s = Gt, a = t(p2);
|
|
19319
19330
|
r.ActionMethods = {}, r.ActionMethods.Macro = a.default.Macro, r.ActionMethods.Toggle = function(o, l) {
|
|
19320
19331
|
for (var u = [], h; (h = o.GetArgument(l)) !== "\\endtoggle"; ) u.push(new n.default(h, o.stack.env, o.configuration).mml());
|
|
19321
19332
|
o.Push(o.create("node", "maction", u, { actiontype: "toggle" }));
|
|
@@ -19444,7 +19455,7 @@ var Yn = {};
|
|
|
19444
19455
|
return y && y.__esModule ? y : { default: y };
|
|
19445
19456
|
};
|
|
19446
19457
|
Object.defineProperty(r, "__esModule", { value: true }), r.NEW_OPS = r.AmsMethods = void 0;
|
|
19447
|
-
var s = n(Ue()), a = n(h3), o = n(Ne), l = q1, u = n(
|
|
19458
|
+
var s = n(Ue()), a = n(h3), o = n(Ne), l = q1, u = n(e2()), h = n(Le), T = s3, f = n(p2), d = jt;
|
|
19448
19459
|
r.AmsMethods = {}, r.AmsMethods.AmsEqnArray = function(y, c, Q, g, v, L, x) {
|
|
19449
19460
|
var b = y.GetBrackets("\\begin{" + c.getName() + "}"), S = f.default.EqnArray(y, c, Q, g, v, L, x);
|
|
19450
19461
|
return s.default.setArrayAlign(S, b);
|
|
@@ -19606,7 +19617,7 @@ var IT = {}, VT = {}, T_ = _ && _.__importDefault || function(r) {
|
|
|
19606
19617
|
return r && r.__esModule ? r : { default: r };
|
|
19607
19618
|
};
|
|
19608
19619
|
Object.defineProperty(VT, "__esModule", { value: true });
|
|
19609
|
-
var Rs = T_(
|
|
19620
|
+
var Rs = T_(e2()), Qk = sr, dk = jt, O4 = T_(Ne), Qi = {};
|
|
19610
19621
|
Qi.CD = function(r, t) {
|
|
19611
19622
|
r.Push(t);
|
|
19612
19623
|
var e = r.itemFactory.create("array"), n = r.configuration.options.amscd;
|
|
@@ -20152,7 +20163,7 @@ var NT = {}, Bk = _ && _.__createBinding || (Object.create ? function(r, t, e, n
|
|
|
20152
20163
|
return r && r.__esModule ? r : { default: r };
|
|
20153
20164
|
};
|
|
20154
20165
|
Object.defineProperty(NT, "__esModule", { value: true });
|
|
20155
|
-
var a3 = UT(Le), F9 = UT(
|
|
20166
|
+
var a3 = UT(Le), F9 = UT(e2()), Kc = UT(Ue()), di = Nk(D7), z3 = {};
|
|
20156
20167
|
z3.Prooftree = function(r, t) {
|
|
20157
20168
|
r.Push(t);
|
|
20158
20169
|
var e = r.itemFactory.create("proofTree").setProperties({ name: t.getName(), line: "solid", currentLine: "solid", rootAtTop: false });
|
|
@@ -20310,7 +20321,7 @@ var zk = {}, jT = {};
|
|
|
20310
20321
|
return l && l.__esModule ? l : { default: l };
|
|
20311
20322
|
};
|
|
20312
20323
|
Object.defineProperty(r, "__esModule", { value: true }), r.EmpheqUtil = void 0;
|
|
20313
|
-
var a = s(Ue()), o = s(
|
|
20324
|
+
var a = s(Ue()), o = s(e2());
|
|
20314
20325
|
r.EmpheqUtil = { environment: function(l, u, h, T) {
|
|
20315
20326
|
var f = T[0], d = l.itemFactory.create(f + "-begin").setProperties({ name: u, end: f });
|
|
20316
20327
|
l.Push(h.apply(void 0, e([l, d], t(T.slice(1)), false)));
|
|
@@ -20482,7 +20493,7 @@ var k5 = {}, Wk = _ && _.__values || function(r) {
|
|
|
20482
20493
|
};
|
|
20483
20494
|
Object.defineProperty(k5, "__esModule", { value: true });
|
|
20484
20495
|
k5.CenternotConfiguration = k5.filterCenterOver = void 0;
|
|
20485
|
-
var qk = he, Tg = GT(
|
|
20496
|
+
var qk = he, Tg = GT(e2()), fg = GT(Ne), Zk = Gt, Kk = GT(p2);
|
|
20486
20497
|
new Zk.CommandMap("centernot", { centerOver: "CenterOver", centernot: ["Macro", "\\centerOver{#1}{{⧸}}", 1] }, { CenterOver: function(r, t) {
|
|
20487
20498
|
var e = "{" + r.GetArgument(t) + "}", n = r.ParseArg(t), s = new Tg.default(e, r.stack.env, r.configuration).mml(), a = r.create("node", "TeXAtom", [new Tg.default(e, r.stack.env, r.configuration).mml(), r.create("node", "mpadded", [r.create("node", "mpadded", [n], { width: 0, lspace: "-.5width" }), r.create("node", "mphantom", [s])], { width: 0, lspace: "-.5width" })]);
|
|
20488
20499
|
r.configuration.addNode("centerOver", s), r.Push(a);
|
|
@@ -20808,61 +20819,61 @@ var uR = _ && _.__createBinding || (Object.create ? function(r, t, e, n) {
|
|
|
20808
20819
|
return r && r.__esModule ? r : { default: r };
|
|
20809
20820
|
};
|
|
20810
20821
|
Object.defineProperty(H0, "__esModule", { value: true });
|
|
20811
|
-
var TR = V7(Le), fR = hR(Gt), QR = V7(p2), Kr = V7(Ue()),
|
|
20822
|
+
var TR = V7(Le), fR = hR(Gt), QR = V7(p2), Kr = V7(Ue()), T1 = V7(t6), C2 = {};
|
|
20812
20823
|
C2.NewCommand = function(r, t) {
|
|
20813
|
-
var e =
|
|
20814
|
-
|
|
20824
|
+
var e = T1.default.GetCsNameArgument(r, t), n = T1.default.GetArgCount(r, t), s = r.GetBrackets(t), a = r.GetArgument(t);
|
|
20825
|
+
T1.default.addMacro(r, e, C2.Macro, [a, n, s]);
|
|
20815
20826
|
};
|
|
20816
20827
|
C2.NewEnvironment = function(r, t) {
|
|
20817
|
-
var e = Kr.default.trimSpaces(r.GetArgument(t)), n =
|
|
20818
|
-
|
|
20828
|
+
var e = Kr.default.trimSpaces(r.GetArgument(t)), n = T1.default.GetArgCount(r, t), s = r.GetBrackets(t), a = r.GetArgument(t), o = r.GetArgument(t);
|
|
20829
|
+
T1.default.addEnvironment(r, e, C2.BeginEnv, [true, a, o, n, s]);
|
|
20819
20830
|
};
|
|
20820
20831
|
C2.MacroDef = function(r, t) {
|
|
20821
|
-
var e =
|
|
20822
|
-
n instanceof Array ?
|
|
20832
|
+
var e = T1.default.GetCSname(r, t), n = T1.default.GetTemplate(r, t, "\\" + e), s = r.GetArgument(t);
|
|
20833
|
+
n instanceof Array ? T1.default.addMacro(r, e, C2.MacroWithTemplate, [s].concat(n)) : T1.default.addMacro(r, e, C2.Macro, [s, n]);
|
|
20823
20834
|
};
|
|
20824
20835
|
C2.Let = function(r, t) {
|
|
20825
|
-
var e =
|
|
20836
|
+
var e = T1.default.GetCSname(r, t), n = r.GetNext();
|
|
20826
20837
|
n === "=" && (r.i++, n = r.GetNext());
|
|
20827
20838
|
var s = r.configuration.handlers;
|
|
20828
20839
|
if (n === "\\") {
|
|
20829
|
-
t =
|
|
20840
|
+
t = T1.default.GetCSname(r, t);
|
|
20830
20841
|
var a = s.get("delimiter").lookup("\\" + t);
|
|
20831
20842
|
if (a) {
|
|
20832
|
-
|
|
20843
|
+
T1.default.addDelimiter(r, "\\" + e, a.char, a.attributes);
|
|
20833
20844
|
return;
|
|
20834
20845
|
}
|
|
20835
20846
|
var o = s.get("macro").applicable(t);
|
|
20836
20847
|
if (!o) return;
|
|
20837
20848
|
if (o instanceof fR.MacroMap) {
|
|
20838
20849
|
var l = o.lookup(t);
|
|
20839
|
-
|
|
20850
|
+
T1.default.addMacro(r, e, l.func, l.args, l.symbol);
|
|
20840
20851
|
return;
|
|
20841
20852
|
}
|
|
20842
20853
|
a = o.lookup(t);
|
|
20843
|
-
var u =
|
|
20854
|
+
var u = T1.default.disassembleSymbol(e, a), h = function(f, d) {
|
|
20844
20855
|
for (var p = [], m = 2; m < arguments.length; m++) p[m - 2] = arguments[m];
|
|
20845
|
-
var y =
|
|
20856
|
+
var y = T1.default.assembleSymbol(p);
|
|
20846
20857
|
return o.parser(f, y);
|
|
20847
20858
|
};
|
|
20848
|
-
|
|
20859
|
+
T1.default.addMacro(r, e, h, u);
|
|
20849
20860
|
return;
|
|
20850
20861
|
}
|
|
20851
20862
|
r.i++;
|
|
20852
20863
|
var T = s.get("delimiter").lookup(n);
|
|
20853
20864
|
if (T) {
|
|
20854
|
-
|
|
20865
|
+
T1.default.addDelimiter(r, "\\" + e, T.char, T.attributes);
|
|
20855
20866
|
return;
|
|
20856
20867
|
}
|
|
20857
|
-
|
|
20868
|
+
T1.default.addMacro(r, e, C2.Macro, [n]);
|
|
20858
20869
|
};
|
|
20859
20870
|
C2.MacroWithTemplate = function(r, t, e, n) {
|
|
20860
20871
|
for (var s = [], a = 4; a < arguments.length; a++) s[a - 4] = arguments[a];
|
|
20861
20872
|
var o = parseInt(n, 10);
|
|
20862
20873
|
if (o) {
|
|
20863
20874
|
var l = [];
|
|
20864
|
-
if (r.GetNext(), s[0] && !
|
|
20865
|
-
for (var u = 0; u < o; u++) l.push(
|
|
20875
|
+
if (r.GetNext(), s[0] && !T1.default.MatchParam(r, s[0])) throw new TR.default("MismatchUseDef", "Use of %1 doesn't match its definition", t);
|
|
20876
|
+
for (var u = 0; u < o; u++) l.push(T1.default.GetParameter(r, t, s[u + 1]));
|
|
20866
20877
|
e = Kr.default.substituteArgs(r, l, e);
|
|
20867
20878
|
}
|
|
20868
20879
|
r.string = Kr.default.addArgs(r, e, r.string.slice(r.i)), r.i = 0, Kr.default.checkMaxMacros(r);
|
|
@@ -21171,7 +21182,7 @@ function P_() {
|
|
|
21171
21182
|
return T && T.__esModule ? T : { default: T };
|
|
21172
21183
|
};
|
|
21173
21184
|
Object.defineProperty(x6, "__esModule", { value: true }), x6.MathtoolsUtil = void 0;
|
|
21174
|
-
var e = Nt, n = t(Ue()), s = t(
|
|
21185
|
+
var e = Nt, n = t(Ue()), s = t(e2()), a = t(Le), o = s3, l = H1, u = k_(), h = R_();
|
|
21175
21186
|
return x6.MathtoolsUtil = { setDisplayLevel: function(T, f) {
|
|
21176
21187
|
if (f) {
|
|
21177
21188
|
var d = r((0, l.lookup)(f, { "\\displaystyle": [true, 0], "\\textstyle": [false, 0], "\\scriptstyle": [false, 1], "\\scriptscriptstyle": [false, 2] }, [null, null]), 2), p = d[0], m = d[1];
|
|
@@ -21243,7 +21254,7 @@ function k_() {
|
|
|
21243
21254
|
return Q && Q.__esModule ? Q : { default: Q };
|
|
21244
21255
|
};
|
|
21245
21256
|
Object.defineProperty(r, "__esModule", { value: true }), r.MathtoolsMethods = void 0;
|
|
21246
|
-
var a = s(Ue()), o = Yn, l = s(p2), u = s(
|
|
21257
|
+
var a = s(Ue()), o = Yn, l = s(p2), u = s(e2()), h = s(Le), T = s(Ne), f = jt, d = G3, p = H1, m = s(t6), y = s(H0), c = P_();
|
|
21247
21258
|
r.MathtoolsMethods = { MtMatrix: function(Q, g, v, L) {
|
|
21248
21259
|
var x = Q.GetBrackets("\\begin{".concat(g.getName(), "}"), "c");
|
|
21249
21260
|
return r.MathtoolsMethods.Array(Q, g, v, L, x);
|
|
@@ -22389,7 +22400,7 @@ var tf = {}, U7 = {}, hB = _ && _.__extends || /* @__PURE__ */ function() {
|
|
|
22389
22400
|
};
|
|
22390
22401
|
Object.defineProperty(U7, "__esModule", { value: true });
|
|
22391
22402
|
U7.AutoOpen = void 0;
|
|
22392
|
-
var Ag = n3, TB = ef(Ue()), fB = ef(Ne), QB = ef(
|
|
22403
|
+
var Ag = n3, TB = ef(Ue()), fB = ef(Ne), QB = ef(e2()), dB = function(r) {
|
|
22393
22404
|
hB(t, r);
|
|
22394
22405
|
function t() {
|
|
22395
22406
|
var e = r !== null && r.apply(this, arguments) || this;
|
|
@@ -22438,7 +22449,7 @@ var rf = {}, pB = _ && _.__read || function(r, t) {
|
|
|
22438
22449
|
return r && r.__esModule ? r : { default: r };
|
|
22439
22450
|
};
|
|
22440
22451
|
Object.defineProperty(rf, "__esModule", { value: true });
|
|
22441
|
-
var nf = C0(p2), P1 = C0(
|
|
22452
|
+
var nf = C0(p2), P1 = C0(e2()), On = C0(Le), sf = jt, p5 = C0(Ue()), eh = C0(Ne), gB = Xn, Ce = {}, F_ = { "(": ")", "[": "]", "{": "}", "|": "|" }, N_ = /^(b|B)i(g{1,2})$/;
|
|
22442
22453
|
Ce.Quantity = function(r, t, e, n, s, a, o) {
|
|
22443
22454
|
e === void 0 && (e = "("), n === void 0 && (n = ")"), s === void 0 && (s = false), a === void 0 && (a = ""), o === void 0 && (o = "");
|
|
22444
22455
|
var l = s ? r.GetStar() : false, u = r.GetNext(), h = r.i, T = null;
|
|
@@ -22864,7 +22875,7 @@ var of = {}, e6 = {}, W_ = _ && _.__importDefault || function(r) {
|
|
|
22864
22875
|
};
|
|
22865
22876
|
Object.defineProperty(e6, "__esModule", { value: true });
|
|
22866
22877
|
e6.TextMacrosMethods = void 0;
|
|
22867
|
-
var wB = W_(
|
|
22878
|
+
var wB = W_(e2()), CB = fr, V4 = W_(p2);
|
|
22868
22879
|
e6.TextMacrosMethods = { Comment: function(r, t) {
|
|
22869
22880
|
for (; r.i < r.string.length && r.string.charAt(r.i) !== `
|
|
22870
22881
|
`; ) r.i++;
|
|
@@ -22978,7 +22989,7 @@ var D0 = {}, DB = _ && _.__extends || /* @__PURE__ */ function() {
|
|
|
22978
22989
|
};
|
|
22979
22990
|
Object.defineProperty(D0, "__esModule", { value: true });
|
|
22980
22991
|
D0.TextParser = void 0;
|
|
22981
|
-
var VB = j7(
|
|
22992
|
+
var VB = j7(e2()), Cg = j7(Le), PB = j7(Ue()), kB = jt, Dg = j7(Ne), Og = Nt, RB = function(r) {
|
|
22982
22993
|
DB(t, r);
|
|
22983
22994
|
function t(e, n, s, a) {
|
|
22984
22995
|
var o = r.call(this, e, n, s) || this;
|
|
@@ -49863,9 +49874,9 @@ k([dt(false), ot()], E1.prototype, "smoothCorners", 2);
|
|
|
49863
49874
|
k([dt(0.6), ot()], E1.prototype, "cornerSharpness", 2);
|
|
49864
49875
|
k([vt()], E1.prototype, "profile", 1);
|
|
49865
49876
|
E1 = k([k1("Rect")], E1);
|
|
49866
|
-
var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to use a concrete value and not a function:\n\n```ts wrong\nvideo.playbackRate(() => 7);\n```\n\n```ts correct\nvideo.playbackRate(7);\n```\n\nIf you're using a signal, extract its value before passing it to the property:\n\n```ts wrong\nvideo.playbackRate(mySignal);\n```\n\n```ts correct\nvideo.playbackRate(mySignal());\n```\n",
|
|
49877
|
+
var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to use a concrete value and not a function:\n\n```ts wrong\nvideo.playbackRate(() => 7);\n```\n\n```ts correct\nvideo.playbackRate(7);\n```\n\nIf you're using a signal, extract its value before passing it to the property:\n\n```ts wrong\nvideo.playbackRate(mySignal);\n```\n\n```ts correct\nvideo.playbackRate(mySignal());\n```\n", c1 = class extends E1 {
|
|
49867
49878
|
constructor(r) {
|
|
49868
|
-
super(r), this.lastTime = -1, this.isSchedulingPlay = false, this.awaitCanPlay() || this.scheduleSeek(this.time()), r.play && this.play(), this.volume = r.volume ?? 1, this.awaitCanPlay() || this.setVolume(this.volume);
|
|
49879
|
+
super(r), this.lastTime = -1, this.isSchedulingPlay = false, this.trimStart = 0, this.awaitCanPlay() || setTimeout(() => this.scheduleSeek(this.time()), 0), r.play && this.play(), this.volume = r.volume ?? 1, this.clipStart = r.clipStart, this.trimStart = r.trimStart ?? 0, this.awaitCanPlay() || this.setVolume(this.volume);
|
|
49869
49880
|
}
|
|
49870
49881
|
isPlaying() {
|
|
49871
49882
|
return this.playing();
|
|
@@ -49897,18 +49908,34 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
49897
49908
|
completion() {
|
|
49898
49909
|
return this.clampTime(this.time()) / this.getDuration();
|
|
49899
49910
|
}
|
|
49900
|
-
|
|
49911
|
+
syncToCurrentTime(r, t) {
|
|
49912
|
+
let e;
|
|
49913
|
+
r !== void 0 && this.clipStart !== void 0 ? e = this.trimStart + (r - this.clipStart) * this.playbackRate() : e = r ?? this.time();
|
|
49914
|
+
const n = this.setCurrentTime(e, { skipCollectPromise: (t == null ? void 0 : t.waitForSeek) ?? true });
|
|
49915
|
+
if (t != null && t.waitForSeek) return n;
|
|
49916
|
+
}
|
|
49917
|
+
setCurrentTime(r, t) {
|
|
49901
49918
|
try {
|
|
49902
|
-
const
|
|
49903
|
-
if (
|
|
49904
|
-
|
|
49905
|
-
|
|
49906
|
-
|
|
49919
|
+
const e = this.mediaElement(), n = this.key ?? "media";
|
|
49920
|
+
if (e.readyState < 2) return this.lastTime = r, this.time(r), new Promise((a) => {
|
|
49921
|
+
this.waitForCanPlay(e, () => {
|
|
49922
|
+
e.currentTime = r, this.lastTime = r, this.time(r);
|
|
49923
|
+
const o = () => {
|
|
49924
|
+
e.removeEventListener("seeked", o), a();
|
|
49925
|
+
};
|
|
49926
|
+
e.seeking ? e.addEventListener("seeked", o) : a();
|
|
49927
|
+
});
|
|
49928
|
+
});
|
|
49929
|
+
e.currentTime = r, this.lastTime = r, this.time(r);
|
|
49930
|
+
const s = e.seeking ? new Promise((a) => {
|
|
49931
|
+
const o = () => {
|
|
49932
|
+
a(), e.removeEventListener("seeked", o);
|
|
49907
49933
|
};
|
|
49908
|
-
|
|
49909
|
-
}));
|
|
49934
|
+
e.addEventListener("seeked", o);
|
|
49935
|
+
}) : Promise.resolve();
|
|
49936
|
+
return e.seeking && !(t != null && t.skipCollectPromise) && n1.collectPromise(s), s;
|
|
49910
49937
|
} catch {
|
|
49911
|
-
this.lastTime = r;
|
|
49938
|
+
return this.lastTime = r, this.time(r), Promise.resolve();
|
|
49912
49939
|
}
|
|
49913
49940
|
}
|
|
49914
49941
|
setVolume(r) {
|
|
@@ -49927,14 +49954,14 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
49927
49954
|
}
|
|
49928
49955
|
amplify(r, t) {
|
|
49929
49956
|
const e = `${this.src()}/${this.key}`;
|
|
49930
|
-
if (
|
|
49931
|
-
|
|
49957
|
+
if (c1.amplificationPool[e]) {
|
|
49958
|
+
c1.amplificationPool[e].gainNode.gain.value = t;
|
|
49932
49959
|
return;
|
|
49933
49960
|
}
|
|
49934
49961
|
const n = new AudioContext(), s = n.createMediaElementSource(r), a = n.createGain();
|
|
49935
|
-
if (a.gain.value = t, s.connect(a), a.connect(n.destination),
|
|
49962
|
+
if (a.gain.value = t, s.connect(a), a.connect(n.destination), c1.amplificationPool[e] = { audioContext: n, sourceNode: s, gainNode: a }, typeof window > "u" || n.state !== "suspended") return;
|
|
49936
49963
|
const o = () => {
|
|
49937
|
-
|
|
49964
|
+
c1.amplificationPool[e].audioContext.resume(), window.removeEventListener("click", o);
|
|
49938
49965
|
};
|
|
49939
49966
|
window.addEventListener("click", o);
|
|
49940
49967
|
}
|
|
@@ -49973,7 +50000,7 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
49973
50000
|
r.addEventListener("canplay", e), r.addEventListener("canplaythrough", e), r.addEventListener("error", n);
|
|
49974
50001
|
}
|
|
49975
50002
|
waitForCanPlayNecessary(r) {
|
|
49976
|
-
return r.readyState >= 2 ? false : this.awaitCanPlay() || this.view().playbackState() ===
|
|
50003
|
+
return r.readyState >= 2 ? false : this.awaitCanPlay() || this.view().playbackState() === $1.Rendering;
|
|
49977
50004
|
}
|
|
49978
50005
|
play() {
|
|
49979
50006
|
this.playing(true), this.schedulePlay();
|
|
@@ -50015,7 +50042,7 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
50015
50042
|
const t = r.play();
|
|
50016
50043
|
t !== void 0 && t.then(() => {
|
|
50017
50044
|
}).catch((e) => {
|
|
50018
|
-
e.name !== "AbortError" && console.warn("Error in simple play:", e), this.view().playbackState() !==
|
|
50045
|
+
e.name !== "AbortError" && console.warn("Error in simple play:", e), this.view().playbackState() !== $1.Rendering && this.playing(false);
|
|
50019
50046
|
});
|
|
50020
50047
|
}
|
|
50021
50048
|
} catch {
|
|
@@ -50029,7 +50056,7 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
50029
50056
|
const s = r.play();
|
|
50030
50057
|
s !== void 0 && s.then(() => {
|
|
50031
50058
|
}).catch((a) => {
|
|
50032
|
-
a.name !== "AbortError" && console.warn("Error playing media:", a), this.view().playbackState() !==
|
|
50059
|
+
a.name !== "AbortError" && console.warn("Error playing media:", a), this.view().playbackState() !== $1.Rendering && this.playing(false);
|
|
50033
50060
|
});
|
|
50034
50061
|
}
|
|
50035
50062
|
const e = t(), n = r.currentTime;
|
|
@@ -50051,8 +50078,8 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
50051
50078
|
super.collectAsyncResources(), this.seekedMedia(), this.setVolume(this.volume);
|
|
50052
50079
|
}
|
|
50053
50080
|
autoPlayBasedOnTwick() {
|
|
50054
|
-
const r = this.view().playbackState(), t = r ===
|
|
50055
|
-
t && !this.playing() ? (r ===
|
|
50081
|
+
const r = this.view().playbackState(), t = r === $1.Playing || r === $1.Presenting || r === $1.Rendering;
|
|
50082
|
+
t && !this.playing() ? (r === $1.Rendering && this.playing(true), this.play()) : !t && this.playing() && this.pause();
|
|
50056
50083
|
}
|
|
50057
50084
|
getErrorReason(r) {
|
|
50058
50085
|
let t;
|
|
@@ -50078,18 +50105,18 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
50078
50105
|
return typeof navigator > "u" ? false : /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
|
|
50079
50106
|
}
|
|
50080
50107
|
};
|
|
50081
|
-
|
|
50082
|
-
k([dt(""), ot()],
|
|
50083
|
-
k([dt(false), ot()],
|
|
50084
|
-
k([dt(1), ot()],
|
|
50085
|
-
k([dt(0), ot()],
|
|
50086
|
-
k([dt(false), ot()],
|
|
50087
|
-
k([dt(true), ot()],
|
|
50088
|
-
k([dt(false), ot()],
|
|
50089
|
-
k([vt()],
|
|
50090
|
-
k([vt()],
|
|
50091
|
-
|
|
50092
|
-
var w2 = class extends
|
|
50108
|
+
c1.amplificationPool = {};
|
|
50109
|
+
k([dt(""), ot()], c1.prototype, "src", 2);
|
|
50110
|
+
k([dt(false), ot()], c1.prototype, "loop", 2);
|
|
50111
|
+
k([dt(1), ot()], c1.prototype, "playbackRate", 2);
|
|
50112
|
+
k([dt(0), ot()], c1.prototype, "time", 2);
|
|
50113
|
+
k([dt(false), ot()], c1.prototype, "playing", 2);
|
|
50114
|
+
k([dt(true), ot()], c1.prototype, "awaitCanPlay", 2);
|
|
50115
|
+
k([dt(false), ot()], c1.prototype, "allowVolumeAmplificationInPreview", 2);
|
|
50116
|
+
k([vt()], c1.prototype, "completion", 1);
|
|
50117
|
+
k([vt()], c1.prototype, "amplify", 1);
|
|
50118
|
+
c1 = k([k1("Media")], c1);
|
|
50119
|
+
var w2 = class extends c1 {
|
|
50093
50120
|
constructor(r) {
|
|
50094
50121
|
super(r);
|
|
50095
50122
|
}
|
|
@@ -50140,7 +50167,7 @@ var w2 = class extends T1 {
|
|
|
50140
50167
|
async draw(r) {
|
|
50141
50168
|
this.autoPlayBasedOnTwick();
|
|
50142
50169
|
const t = this.view().playbackState();
|
|
50143
|
-
t ===
|
|
50170
|
+
t === $1.Playing || t === $1.Presenting ? this.fastSeekedAudio() : this.seekedAudio(), r.save(), r.restore(), await this.drawChildren(r);
|
|
50144
50171
|
}
|
|
50145
50172
|
};
|
|
50146
50173
|
w2.pool = {};
|
|
@@ -50252,7 +50279,7 @@ var o3 = class extends E1 {
|
|
|
50252
50279
|
return this;
|
|
50253
50280
|
}
|
|
50254
50281
|
};
|
|
50255
|
-
k([dt(
|
|
50282
|
+
k([dt($1.Paused), ot()], o3.prototype, "playbackState", 2);
|
|
50256
50283
|
k([dt(0), ot()], o3.prototype, "globalTime", 2);
|
|
50257
50284
|
k([dt(0), ot()], o3.prototype, "fps", 2);
|
|
50258
50285
|
k([ot()], o3.prototype, "assetHash", 2);
|
|
@@ -51957,7 +51984,7 @@ async function eX(r, t, e, n) {
|
|
|
51957
51984
|
}
|
|
51958
51985
|
return a.getNextFrame();
|
|
51959
51986
|
}
|
|
51960
|
-
var v1 = class extends
|
|
51987
|
+
var v1 = class extends c1 {
|
|
51961
51988
|
constructor(r) {
|
|
51962
51989
|
super(r), this.detectedFileType = "unknown", this.fileTypeWasDetected = false, this.lastFrame = null;
|
|
51963
51990
|
}
|
|
@@ -52058,10 +52085,8 @@ var v1 = class extends T1 {
|
|
|
52058
52085
|
return r.playbackRate = this.playbackRate(), r.paused || r.pause(), this.lastTime === t || this.setCurrentTime(t), r;
|
|
52059
52086
|
}
|
|
52060
52087
|
fastSeekedVideo() {
|
|
52061
|
-
const r = this.video(), t = this.clampTime(this.time());
|
|
52062
|
-
|
|
52063
|
-
const e = this.playing() && t < r.duration && r.playbackRate > 0;
|
|
52064
|
-
return e ? r.paused && n1.collectPromise(r.play()) : r.paused || r.pause(), Math.abs(r.currentTime - t) > 1 ? this.setCurrentTime(t) : e || (r.currentTime = t), r;
|
|
52088
|
+
const r = this.video(), t = this.clampTime(this.time()), e = this.playing() && t < r.duration && r.playbackRate > 0, n = t < 0.5 && r.currentTime > 1 && Math.abs(r.currentTime - this.lastTime) < 0.5, s = Math.abs(r.currentTime - t) > 1;
|
|
52089
|
+
return r.playbackRate = this.playbackRate(), this.lastTime === t || (e ? r.paused && n1.collectPromise(r.play()) : r.paused || r.pause(), n || (s ? this.setCurrentTime(t) : e || this.setCurrentTime(t))), r;
|
|
52065
52090
|
}
|
|
52066
52091
|
async webcodecSeekedVideo() {
|
|
52067
52092
|
const r = this.video(), t = this.clampTime(this.time());
|
|
@@ -52079,7 +52104,7 @@ var v1 = class extends T1 {
|
|
|
52079
52104
|
}
|
|
52080
52105
|
async seekFunction() {
|
|
52081
52106
|
const r = this.view().playbackState();
|
|
52082
|
-
return r ===
|
|
52107
|
+
return r === $1.Playing || r === $1.Presenting ? this.fastSeekedVideo() : r === $1.Paused ? this.seekedVideo() : this.decoder() === "slow" ? this.seekedVideo() : this.decoder() === "ffmpeg" ? this.ffmpegSeekedVideo() : this.decoder() === "web" ? this.webcodecSeekedVideo() : (this.fileTypeWasDetected || this.detectFileType(), this.detectedFileType === "webm" ? this.ffmpegSeekedVideo() : this.detectedFileType === "hls" ? this.seekedVideo() : this.webcodecSeekedVideo());
|
|
52083
52108
|
}
|
|
52084
52109
|
async draw(r) {
|
|
52085
52110
|
this.autoPlayBasedOnTwick(), this.drawShape(r);
|
|
@@ -52166,7 +52191,7 @@ var iX = class extends zM {
|
|
|
52166
52191
|
return (r = this.getView()) == null || r.playbackState(this.playback.state).globalTime(this.playback.time), super.next();
|
|
52167
52192
|
}
|
|
52168
52193
|
async draw(r) {
|
|
52169
|
-
r.save(), this.renderLifecycle.dispatch([e5.BeforeRender, r]), r.save(), this.renderLifecycle.dispatch([e5.BeginRender, r]), this.getView().playbackState(this.playback.state).globalTime(this.playback.time).fps(this.playback.fps), await this.getView().render(r), this.renderLifecycle.dispatch([e5.FinishRender, r]), r.restore(), this.renderLifecycle.dispatch([e5.AfterRender, r]), r.restore();
|
|
52194
|
+
r.save(), this.renderLifecycle.dispatch([e5.BeforeRender, r]), r.save(), this.renderLifecycle.dispatch([e5.BeginRender, r]), this.getView().playbackState(this.playback.state).globalTime(this.playback.time).fps(this.playback.fps), this.playback.state === $1.Paused && await this.syncAllMediaToCurrentTime(true), await this.getView().render(r), this.renderLifecycle.dispatch([e5.FinishRender, r]), r.restore(), this.renderLifecycle.dispatch([e5.AfterRender, r]), r.restore();
|
|
52170
52195
|
}
|
|
52171
52196
|
reset(r) {
|
|
52172
52197
|
for (const t of this.registeredNodes.keys()) try {
|
|
@@ -52217,7 +52242,7 @@ var iX = class extends zM {
|
|
|
52217
52242
|
for (const r of this.registeredNodes.values()) !r.parent() && r !== this.view && (yield r);
|
|
52218
52243
|
}
|
|
52219
52244
|
getMediaAssets() {
|
|
52220
|
-
const t = this.playback.state ===
|
|
52245
|
+
const t = this.playback.state === $1.Rendering, e = Array.from(this.registeredNodes.values()).filter((l) => l instanceof v1), n = Array.from(this.registeredNodes.values()).filter((l) => l instanceof w2);
|
|
52221
52246
|
t && (e.forEach((l) => {
|
|
52222
52247
|
const u = l.src();
|
|
52223
52248
|
u && u !== "undefined" && !l.isPlaying() && l.playing(true);
|
|
@@ -52228,12 +52253,26 @@ var iX = class extends zM {
|
|
|
52228
52253
|
const s = e.filter((l) => l.isPlaying()), a = n.filter((l) => l.isPlaying()), o = [];
|
|
52229
52254
|
return o.push(...s.map((l) => ({ key: l.key, type: "video", src: l.src(), decoder: l.decoder(), playbackRate: typeof l.playbackRate == "function" ? l.playbackRate() : l.playbackRate, volume: l.getVolume(), currentTime: l.getCurrentTime(), duration: l.getDuration() }))), o.push(...a.map((l) => ({ key: l.key, type: "audio", src: l.src(), playbackRate: typeof l.playbackRate == "function" ? l.playbackRate() : l.playbackRate, volume: l.getVolume(), currentTime: l.getCurrentTime(), duration: l.getDuration() }))), o;
|
|
52230
52255
|
}
|
|
52256
|
+
async syncAllMediaToCurrentTime(r) {
|
|
52257
|
+
const t = this.playback.time, n = Array.from(this.registeredNodes.values()).filter((s) => s instanceof c1).map((s) => {
|
|
52258
|
+
try {
|
|
52259
|
+
return s.syncToCurrentTime(t, { waitForSeek: r });
|
|
52260
|
+
} catch (a) {
|
|
52261
|
+
this.logger.warn({ message: `syncAllMediaToCurrentTime: skipped node ${s.key ?? "unknown"}`, object: a });
|
|
52262
|
+
return;
|
|
52263
|
+
}
|
|
52264
|
+
});
|
|
52265
|
+
if (r) {
|
|
52266
|
+
const s = n.filter((a) => a !== void 0);
|
|
52267
|
+
await Promise.all(s);
|
|
52268
|
+
}
|
|
52269
|
+
}
|
|
52231
52270
|
stopAllMedia() {
|
|
52232
|
-
const r = Array.from(this.registeredNodes.values()).filter((t) => t instanceof
|
|
52271
|
+
const r = Array.from(this.registeredNodes.values()).filter((t) => t instanceof c1).filter((t) => t.isPlaying());
|
|
52233
52272
|
for (const t of r) t.dispose();
|
|
52234
52273
|
}
|
|
52235
52274
|
adjustVolume(r) {
|
|
52236
|
-
const t = Array.from(this.registeredNodes.values()).filter((e) => e instanceof
|
|
52275
|
+
const t = Array.from(this.registeredNodes.values()).filter((e) => e instanceof c1);
|
|
52237
52276
|
for (const e of t) e.setVolume(e.getVolume() * r);
|
|
52238
52277
|
}
|
|
52239
52278
|
recreateView() {
|
|
@@ -52246,13 +52285,16 @@ var iX = class extends zM {
|
|
|
52246
52285
|
function rX(r, t) {
|
|
52247
52286
|
return { klass: iX, name: r, config: t, stack: new Error().stack, plugins: ["@twick/2d/editor"] };
|
|
52248
52287
|
}
|
|
52249
|
-
const rE = "#000000", nE = { x: 0, y: 0 }, er = "easeInOut", t5 = { VIDEO: "video", AUDIO: "audio", CAPTION: "caption", SCENE: "scene", ELEMENT: "element" }, Qv = { highlight_bg: { rect: { alignItems: "center", gap: 2 }, word: { lineWidth: 0.35, stroke: "#000000", fontWeight: 700, shadowOffset: [-3, 3], shadowColor: "#000000", fill: "#ffffff", fontFamily: "Bangers", bgColor: "#444444", bgOffsetWidth: 30, bgOffsetHeight: 8, fontSize: 46 } }, word_by_word: { rect: { alignItems: "center", justifyContent: "center", gap: 8 }, word: { lineWidth: 0.35, stroke: "#000000", fontWeight: 700, strokeFirst: true, shadowOffset: [-2, 2], shadowColor: "#000000", shadowBlur: 5, fontFamily: "Bangers", fill: "#FFFFFF", bgOffsetWidth: 20, bgOffsetHeight: 10, fontSize: 46 } }, word_by_word_with_bg: { rect: { alignItems: "center", gap: 8, padding: [10, 20], radius: 10 }, word: { lineWidth: 0.35, stroke: "#000000", fontWeight: 700, strokeFirst: true, shadowOffset: [-2, 2], shadowColor: "#000000", shadowBlur: 5, fontFamily: "Bangers", fill: "#FFFFFF", bgOffsetWidth: 20, bgOffsetHeight: 10, fontSize: 46 } } }, nX = { text: "#000000", bgColor: "#444444" }, sX = { family: "Poppins", size: 48, weight: 400 }, aX = "#FFFFFF00", dv = { VIDEO: "video", IMAGE: "image" }, Vu = { CONTAIN: "contain", COVER: "cover", FILL: "fill" },
|
|
52288
|
+
const rE = "#000000", nE = { x: 0, y: 0 }, er = "easeInOut", t5 = { VIDEO: "video", AUDIO: "audio", CAPTION: "caption", SCENE: "scene", ELEMENT: "element" }, Qv = { highlight_bg: { rect: { alignItems: "center", gap: 2 }, word: { lineWidth: 0.35, stroke: "#000000", fontWeight: 700, shadowOffset: [-3, 3], shadowColor: "#000000", fill: "#ffffff", fontFamily: "Bangers", bgColor: "#444444", bgOffsetWidth: 30, bgOffsetHeight: 8, fontSize: 46 } }, word_by_word: { rect: { alignItems: "center", justifyContent: "center", gap: 8 }, word: { lineWidth: 0.35, stroke: "#000000", fontWeight: 700, strokeFirst: true, shadowOffset: [-2, 2], shadowColor: "#000000", shadowBlur: 5, fontFamily: "Bangers", fill: "#FFFFFF", bgOffsetWidth: 20, bgOffsetHeight: 10, fontSize: 46 } }, word_by_word_with_bg: { rect: { alignItems: "center", gap: 8, padding: [10, 20], radius: 10 }, word: { lineWidth: 0.35, stroke: "#000000", fontWeight: 700, strokeFirst: true, shadowOffset: [-2, 2], shadowColor: "#000000", shadowBlur: 5, fontFamily: "Bangers", fill: "#FFFFFF", bgOffsetWidth: 20, bgOffsetHeight: 10, fontSize: 46 } } }, nX = { text: "#000000", bgColor: "#444444" }, sX = { family: "Poppins", size: 48, weight: 400 }, aX = "#FFFFFF00", dv = { VIDEO: "video", IMAGE: "image" }, Vu = { CONTAIN: "contain", COVER: "cover", FILL: "fill" }, i2 = { SATURATED: "saturated", BRIGHT: "bright", VIBRANT: "vibrant", RETRO: "retro", BLACK_WHITE: "blackWhite", COOL: "cool", WARM: "warm", CINEMATIC: "cinematic", SOFT_GLOW: "softGlow", MOODY: "moody", DREAMY: "dreamy", INVERTED: "inverted", VINTAGE: "vintage", DRAMATIC: "dramatic", FADED: "faded" }, pv = { PLAYER_UPDATE: "twick:playerUpdate" };
|
|
52250
52289
|
function k0(r, t) {
|
|
52251
52290
|
console.log(`[Visualizer] ${r}`, t || "");
|
|
52252
52291
|
}
|
|
52253
52292
|
const oX = { name: "audio", *create({ containerRef: r, element: t, view: e }) {
|
|
52293
|
+
var l, u;
|
|
52254
52294
|
const n = Je();
|
|
52255
|
-
yield* Kt(t == null ? void 0 : t.s)
|
|
52295
|
+
yield* Kt(t == null ? void 0 : t.s);
|
|
52296
|
+
const s = ((l = t.props) == null ? void 0 : l.time) ?? 0, a = ((u = t.props) == null ? void 0 : u.playbackRate) ?? 1, o = (s + (e.globalTime() - t.s)) * a;
|
|
52297
|
+
yield r().add(Xe(w2, { ref: n, play: true, ...t.props, time: o, clipStart: t.s, trimStart: s }, t.id)), yield* Kt(Math.max(0, t.e - t.s)), yield n().play(false), yield n().remove();
|
|
52256
52298
|
} };
|
|
52257
52299
|
function lX({ t: r, s: t, e }) {
|
|
52258
52300
|
const n = r.split(" "), s = e - t, a = n.join("").length;
|
|
@@ -52512,49 +52554,49 @@ const CX = { name: "circle", *create({ containerRef: r, element: t, view: e }) {
|
|
|
52512
52554
|
yield* Kt(t == null ? void 0 : t.s), yield r().add(Xe(gr, { ref: n, ...t.props }, t.id)), yield* xe(Bn({ elementRef: n, element: t, view: e }), Kt(Math.max(0, t.e - t.s))), yield n().remove();
|
|
52513
52555
|
} }, aE = (r, t) => {
|
|
52514
52556
|
switch (t) {
|
|
52515
|
-
case
|
|
52557
|
+
case i2.SATURATED:
|
|
52516
52558
|
r().filters.saturate(1.4), r().filters.contrast(1.1);
|
|
52517
52559
|
break;
|
|
52518
|
-
case
|
|
52560
|
+
case i2.BRIGHT:
|
|
52519
52561
|
r().filters.brightness(1.3), r().filters.contrast(1.05);
|
|
52520
52562
|
break;
|
|
52521
|
-
case
|
|
52563
|
+
case i2.VIBRANT:
|
|
52522
52564
|
r().filters.saturate(1.6), r().filters.brightness(1.15), r().filters.contrast(1.1);
|
|
52523
52565
|
break;
|
|
52524
|
-
case
|
|
52566
|
+
case i2.RETRO:
|
|
52525
52567
|
r().filters.sepia(0.8), r().filters.contrast(1.3), r().filters.brightness(0.85), r().filters.saturate(0.8);
|
|
52526
52568
|
break;
|
|
52527
|
-
case
|
|
52569
|
+
case i2.BLACK_WHITE:
|
|
52528
52570
|
r().filters.grayscale(1), r().filters.contrast(1.25), r().filters.brightness(1.05);
|
|
52529
52571
|
break;
|
|
52530
|
-
case
|
|
52572
|
+
case i2.COOL:
|
|
52531
52573
|
r().filters.hue(15), r().filters.brightness(1.1), r().filters.saturate(1.3), r().filters.contrast(1.05);
|
|
52532
52574
|
break;
|
|
52533
|
-
case
|
|
52575
|
+
case i2.WARM:
|
|
52534
52576
|
r().filters.hue(-15), r().filters.brightness(1.15), r().filters.saturate(1.3), r().filters.contrast(1.05);
|
|
52535
52577
|
break;
|
|
52536
|
-
case
|
|
52578
|
+
case i2.CINEMATIC:
|
|
52537
52579
|
r().filters.contrast(1.4), r().filters.brightness(0.95), r().filters.saturate(0.85), r().filters.sepia(0.2);
|
|
52538
52580
|
break;
|
|
52539
|
-
case
|
|
52581
|
+
case i2.SOFT_GLOW:
|
|
52540
52582
|
r().filters.brightness(1.2), r().filters.contrast(0.95), r().filters.blur(1.2), r().filters.saturate(1.1);
|
|
52541
52583
|
break;
|
|
52542
|
-
case
|
|
52584
|
+
case i2.MOODY:
|
|
52543
52585
|
r().filters.brightness(1.05), r().filters.contrast(1.4), r().filters.saturate(0.65), r().filters.sepia(0.2);
|
|
52544
52586
|
break;
|
|
52545
|
-
case
|
|
52587
|
+
case i2.DREAMY:
|
|
52546
52588
|
r().filters.brightness(1.3), r().filters.blur(2), r().filters.saturate(1.4), r().filters.contrast(0.95);
|
|
52547
52589
|
break;
|
|
52548
|
-
case
|
|
52590
|
+
case i2.INVERTED:
|
|
52549
52591
|
r().filters.invert(1), r().filters.hue(180);
|
|
52550
52592
|
break;
|
|
52551
|
-
case
|
|
52593
|
+
case i2.VINTAGE:
|
|
52552
52594
|
r().filters.sepia(0.4), r().filters.saturate(1.4), r().filters.contrast(1.2), r().filters.brightness(1.1);
|
|
52553
52595
|
break;
|
|
52554
|
-
case
|
|
52596
|
+
case i2.DRAMATIC:
|
|
52555
52597
|
r().filters.contrast(1.5), r().filters.brightness(0.9), r().filters.saturate(1.2);
|
|
52556
52598
|
break;
|
|
52557
|
-
case
|
|
52599
|
+
case i2.FADED:
|
|
52558
52600
|
r().filters.opacity(0.9), r().filters.brightness(1.2), r().filters.saturate(0.8), r().filters.contrast(0.9);
|
|
52559
52601
|
break;
|
|
52560
52602
|
}
|
|
@@ -52567,10 +52609,10 @@ const CX = { name: "circle", *create({ containerRef: r, element: t, view: e }) {
|
|
|
52567
52609
|
const n = Je();
|
|
52568
52610
|
yield* Kt(t == null ? void 0 : t.s), k0(`RectElement: ${JSON.stringify(t)}`), yield r().add(Xe(E1, { ref: n, ...t.props }, t.id)), yield* xe(Bn({ elementRef: n, element: t, view: e }), Kt(Math.max(0, t.e - t.s))), yield n().remove();
|
|
52569
52611
|
} }, lE = { name: "video", *create({ containerRef: r, element: t, view: e }) {
|
|
52570
|
-
var
|
|
52612
|
+
var u, h, T;
|
|
52571
52613
|
yield* Kt(t == null ? void 0 : t.s);
|
|
52572
|
-
const n = Je(), s = Je();
|
|
52573
|
-
yield r().add(Xe(E1, { ref: n, ...t.frame, children: Xe(v1, { ref: s, play: true, ...t.props }, `child-${t.id}`) }, t.id)), n() && (yield R0({ elementRef: s, containerSize: n().size(), elementSize: s().size(), objectFit: t.objectFit }), (
|
|
52614
|
+
const n = Je(), s = Je(), a = ((u = t.props) == null ? void 0 : u.time) ?? 0, o = ((h = t.props) == null ? void 0 : h.playbackRate) ?? 1, l = (a + (e.globalTime() - t.s)) * o;
|
|
52615
|
+
yield r().add(Xe(E1, { ref: n, ...t.frame, children: Xe(v1, { ref: s, play: true, ...t.props, time: l, clipStart: t.s, trimStart: a }, `child-${t.id}`) }, t.id)), n() && (yield R0({ elementRef: s, containerSize: n().size(), elementSize: s().size(), objectFit: t.objectFit }), (T = t == null ? void 0 : t.props) != null && T.mediaFilter && aE(s, t.props.mediaFilter), yield* xe(Bn({ elementRef: s, containerRef: n, element: t, view: e }), sE({ containerRef: n, elementRef: s, element: t }), Kt(Math.max(0, t.e - t.s))), yield s().play(false), yield s().remove(), yield n().remove());
|
|
52574
52616
|
} }, OX = { name: "scene", *create({ containerRef: r, element: t, view: e }) {
|
|
52575
52617
|
yield* Kt(t == null ? void 0 : t.s);
|
|
52576
52618
|
const n = Je();
|
|
@@ -52800,8 +52842,12 @@ const LivePlayer = ({
|
|
|
52800
52842
|
var _a3;
|
|
52801
52843
|
if (isFirstRender.current && ((_a3 = playerRef.current) == null ? void 0 : _a3.htmlElement)) {
|
|
52802
52844
|
setProjectData(projectData);
|
|
52845
|
+
const el2 = playerRef.current.htmlElement;
|
|
52846
|
+
requestAnimationFrame(() => {
|
|
52847
|
+
el2.dispatchEvent(new CustomEvent("seekto", { detail: seekTime }));
|
|
52848
|
+
});
|
|
52803
52849
|
}
|
|
52804
|
-
}, [projectData, setProjectData]);
|
|
52850
|
+
}, [projectData, setProjectData, seekTime]);
|
|
52805
52851
|
react.useEffect(() => {
|
|
52806
52852
|
var _a3;
|
|
52807
52853
|
if ((_a3 = playerRef.current) == null ? void 0 : _a3.player) {
|