@twick/live-player 0.15.16 → 0.15.18
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.mjs
CHANGED
|
@@ -277,6 +277,7 @@ function Player({
|
|
|
277
277
|
const playerRef = useRef(null);
|
|
278
278
|
const wrapperRef = useRef(null);
|
|
279
279
|
const lastRect = useRef(null);
|
|
280
|
+
const lastLoggedTimeRef = useRef(null);
|
|
280
281
|
const onClickHandler = controls ? () => setPlaying((prev) => !prev) : void 0;
|
|
281
282
|
useEffect(() => {
|
|
282
283
|
setPlaying(playing);
|
|
@@ -290,6 +291,12 @@ function Player({
|
|
|
290
291
|
useEffect(() => {
|
|
291
292
|
setForcedVolume(volume);
|
|
292
293
|
}, [volume]);
|
|
294
|
+
const variablesJson = JSON.stringify(variables);
|
|
295
|
+
useEffect(() => {
|
|
296
|
+
if (playerRef.current) {
|
|
297
|
+
playerRef.current.setAttribute("variables", variablesJson);
|
|
298
|
+
}
|
|
299
|
+
}, [variablesJson]);
|
|
293
300
|
const onTimeUpdateRef = useRef(onTimeUpdate);
|
|
294
301
|
const onDurationChangeRef = useRef(onDurationChange);
|
|
295
302
|
useEffect(() => {
|
|
@@ -300,8 +307,13 @@ function Player({
|
|
|
300
307
|
}, [onDurationChange]);
|
|
301
308
|
const handleTimeUpdate = useCallback((event) => {
|
|
302
309
|
const e = event;
|
|
303
|
-
|
|
304
|
-
|
|
310
|
+
const t = e.detail;
|
|
311
|
+
const last = lastLoggedTimeRef.current;
|
|
312
|
+
if (last === null || Math.abs(t - last) > 0.05) {
|
|
313
|
+
lastLoggedTimeRef.current = t;
|
|
314
|
+
}
|
|
315
|
+
setCurrentTime(t);
|
|
316
|
+
onTimeUpdateRef.current(t);
|
|
305
317
|
}, []);
|
|
306
318
|
const handleDurationUpdate = useCallback((event) => {
|
|
307
319
|
const e = event;
|
|
@@ -372,7 +384,7 @@ function Player({
|
|
|
372
384
|
document.removeEventListener("keydown", handleKeyDown);
|
|
373
385
|
};
|
|
374
386
|
};
|
|
375
|
-
import("./internal-
|
|
387
|
+
import("./internal-LKI2GAXH-C1j65akX.mjs").then(() => {
|
|
376
388
|
requestAnimationFrame(() => {
|
|
377
389
|
if (playerRef.current) {
|
|
378
390
|
playerRef.current.setProject(project);
|
|
@@ -419,15 +431,14 @@ function Player({
|
|
|
419
431
|
"twick-player",
|
|
420
432
|
{
|
|
421
433
|
ref: playerRef,
|
|
422
|
-
playing: String(playingState),
|
|
423
|
-
onClick: onClickHandler,
|
|
424
|
-
variables: JSON.stringify(variables),
|
|
425
|
-
looping: looping ? "true" : "false",
|
|
426
|
-
width,
|
|
427
|
-
height,
|
|
428
434
|
quality,
|
|
429
435
|
fps,
|
|
430
|
-
|
|
436
|
+
width,
|
|
437
|
+
height,
|
|
438
|
+
volume: volumeState,
|
|
439
|
+
playing: playingState,
|
|
440
|
+
looping,
|
|
441
|
+
onClick: onClickHandler
|
|
431
442
|
}
|
|
432
443
|
),
|
|
433
444
|
/* @__PURE__ */ jsx(
|
|
@@ -2404,7 +2415,7 @@ function hi(r, t) {
|
|
|
2404
2415
|
const e = new A5(t);
|
|
2405
2416
|
return new Z(r.x * e.scaleX + r.y * e.skewY, r.x * e.skewX + r.y * e.scaleY);
|
|
2406
2417
|
}
|
|
2407
|
-
var uL = class
|
|
2418
|
+
var uL = class r2 {
|
|
2408
2419
|
constructor(t, e = 0, n = 0, s = 0) {
|
|
2409
2420
|
if (this.x = 0, this.y = 0, this.width = 0, this.height = 0, t != null) {
|
|
2410
2421
|
if (typeof t == "number") {
|
|
@@ -2422,23 +2433,23 @@ var uL = class i2 {
|
|
|
2422
2433
|
this.x = t.x, this.y = t.y, this.width = t.width, this.height = t.height;
|
|
2423
2434
|
}
|
|
2424
2435
|
}
|
|
2425
|
-
static createSignal(t, e =
|
|
2426
|
-
return new Zo(["x", "y", "width", "height"], (n) => new
|
|
2436
|
+
static createSignal(t, e = r2.lerp) {
|
|
2437
|
+
return new Zo(["x", "y", "width", "height"], (n) => new r2(n), t, e).toSignal();
|
|
2427
2438
|
}
|
|
2428
2439
|
static lerp(t, e, n) {
|
|
2429
2440
|
let s, a, o, l;
|
|
2430
|
-
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
|
|
2441
|
+
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));
|
|
2431
2442
|
}
|
|
2432
2443
|
static arcLerp(t, e, n, s = false, a) {
|
|
2433
|
-
return a ?? (a = (t.position.sub(e.position).ctg + t.size.sub(e.size).ctg) / 2),
|
|
2444
|
+
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)));
|
|
2434
2445
|
}
|
|
2435
2446
|
static fromSizeCentered(t) {
|
|
2436
|
-
return new
|
|
2447
|
+
return new r2(-t.width / 2, -t.height / 2, t.width, t.height);
|
|
2437
2448
|
}
|
|
2438
2449
|
static fromPoints(...t) {
|
|
2439
2450
|
let e = 1 / 0, n = 1 / 0, s = -1 / 0, a = -1 / 0;
|
|
2440
2451
|
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);
|
|
2441
|
-
return new
|
|
2452
|
+
return new r2(e, n, s - e, a - n);
|
|
2442
2453
|
}
|
|
2443
2454
|
static fromBBoxes(...t) {
|
|
2444
2455
|
let e = 1 / 0, n = 1 / 0, s = -1 / 0, a = -1 / 0;
|
|
@@ -2448,10 +2459,10 @@ var uL = class i2 {
|
|
|
2448
2459
|
const u = o.y + o.height;
|
|
2449
2460
|
u > a && (a = u), o.y < n && (n = o.y);
|
|
2450
2461
|
}
|
|
2451
|
-
return new
|
|
2462
|
+
return new r2(e, n, s - e, a - n);
|
|
2452
2463
|
}
|
|
2453
2464
|
lerp(t, e) {
|
|
2454
|
-
return
|
|
2465
|
+
return r2.lerp(this, t, e);
|
|
2455
2466
|
}
|
|
2456
2467
|
get position() {
|
|
2457
2468
|
return new Z(this.x, this.y);
|
|
@@ -2505,16 +2516,16 @@ var uL = class i2 {
|
|
|
2505
2516
|
return [this.topLeft, this.topRight, this.bottomRight, this.bottomLeft];
|
|
2506
2517
|
}
|
|
2507
2518
|
get pixelPerfect() {
|
|
2508
|
-
return new
|
|
2519
|
+
return new r2(Math.floor(this.x), Math.floor(this.y), Math.ceil(this.width + 1), Math.ceil(this.height + 1));
|
|
2509
2520
|
}
|
|
2510
2521
|
transform(t) {
|
|
2511
|
-
return new
|
|
2522
|
+
return new r2(Q1(this.position, t), hi(this.size, t));
|
|
2512
2523
|
}
|
|
2513
2524
|
transformCorners(t) {
|
|
2514
2525
|
return this.corners.map((e) => Q1(e, t));
|
|
2515
2526
|
}
|
|
2516
2527
|
expand(t) {
|
|
2517
|
-
const e = new oL(t), n = new
|
|
2528
|
+
const e = new oL(t), n = new r2(this);
|
|
2518
2529
|
return n.left -= e.left, n.top -= e.top, n.right += e.right, n.bottom += e.bottom, n;
|
|
2519
2530
|
}
|
|
2520
2531
|
addSpacing(t) {
|
|
@@ -2527,15 +2538,15 @@ var uL = class i2 {
|
|
|
2527
2538
|
return this.left < t.right && this.right > t.left && this.top < t.bottom && this.bottom > t.top;
|
|
2528
2539
|
}
|
|
2529
2540
|
intersection(t) {
|
|
2530
|
-
const e = new
|
|
2541
|
+
const e = new r2();
|
|
2531
2542
|
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;
|
|
2532
2543
|
}
|
|
2533
2544
|
union(t) {
|
|
2534
|
-
const e = new
|
|
2545
|
+
const e = new r2();
|
|
2535
2546
|
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;
|
|
2536
2547
|
}
|
|
2537
2548
|
toSymbol() {
|
|
2538
|
-
return
|
|
2549
|
+
return r2.symbol;
|
|
2539
2550
|
}
|
|
2540
2551
|
toString() {
|
|
2541
2552
|
return `BBox(${this.x}, ${this.y}, ${this.width}, ${this.height})`;
|
|
@@ -2646,7 +2657,7 @@ function MM(r) {
|
|
|
2646
2657
|
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) } };
|
|
2647
2658
|
return { ...r, name: r.name ?? "project", settings: e, plugins: [], logger: new EH(), versions: HM("0.10.4") };
|
|
2648
2659
|
}
|
|
2649
|
-
var
|
|
2660
|
+
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 || {});
|
|
2650
2661
|
function wM(r) {
|
|
2651
2662
|
return r && (typeof r == "object" || typeof r == "function") && "toPromise" in r;
|
|
2652
2663
|
}
|
|
@@ -4424,15 +4435,15 @@ class D1 extends pi {
|
|
|
4424
4435
|
for (; l < u || l == u && a.len == 0; ) {
|
|
4425
4436
|
if (a.done) break t;
|
|
4426
4437
|
let T = Math.min(a.len, u - l);
|
|
4427
|
-
|
|
4438
|
+
Y1(s, T, -1);
|
|
4428
4439
|
let f = a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0;
|
|
4429
|
-
|
|
4440
|
+
Y1(e, T, f), f > 0 && Ji(n, e, a.text), a.forward(T), l += T;
|
|
4430
4441
|
}
|
|
4431
4442
|
let h = t[o++];
|
|
4432
4443
|
for (; l < h; ) {
|
|
4433
4444
|
if (a.done) break t;
|
|
4434
4445
|
let T = Math.min(a.len, h - l);
|
|
4435
|
-
|
|
4446
|
+
Y1(e, T, -1), Y1(s, T, a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0), a.forward(T), l += T;
|
|
4436
4447
|
}
|
|
4437
4448
|
}
|
|
4438
4449
|
return { changes: new D1(e, n), filtered: pi.create(s) };
|
|
@@ -4449,7 +4460,7 @@ class D1 extends pi {
|
|
|
4449
4460
|
let s = [], a = [], o = 0, l = null;
|
|
4450
4461
|
function u(T = false) {
|
|
4451
4462
|
if (!T && !s.length) return;
|
|
4452
|
-
o < e &&
|
|
4463
|
+
o < e && Y1(s, e - o, -1);
|
|
4453
4464
|
let f = new D1(s, a);
|
|
4454
4465
|
l = l ? l.compose(f.map(l)) : f, s = [], a = [], o = 0;
|
|
4455
4466
|
}
|
|
@@ -4463,7 +4474,7 @@ class D1 extends pi {
|
|
|
4463
4474
|
if (f > d || f < 0 || d > e) throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${e})`);
|
|
4464
4475
|
let m = p ? typeof p == "string" ? Ie.of(p.split(n || Xu)) : p : Ie.empty, y = m.length;
|
|
4465
4476
|
if (f == d && y == 0) return;
|
|
4466
|
-
f < o && u(), f > o &&
|
|
4477
|
+
f < o && u(), f > o && Y1(s, f - o, -1), Y1(s, d - f, y), Ji(a, s, m), o = d;
|
|
4467
4478
|
}
|
|
4468
4479
|
}
|
|
4469
4480
|
return h(t), u(!l), l;
|
|
@@ -4492,7 +4503,7 @@ class D1 extends pi {
|
|
|
4492
4503
|
return new D1(t, e);
|
|
4493
4504
|
}
|
|
4494
4505
|
}
|
|
4495
|
-
function
|
|
4506
|
+
function Y1(r, t, e, n = false) {
|
|
4496
4507
|
if (t == 0 && e <= 0) return;
|
|
4497
4508
|
let s = r.length - 2;
|
|
4498
4509
|
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);
|
|
@@ -4524,12 +4535,12 @@ function Yu(r, t, e, n = false) {
|
|
|
4524
4535
|
if (o.done && l.len || l.done && o.len) throw new Error("Mismatched change set lengths");
|
|
4525
4536
|
if (o.ins == -1 && l.ins == -1) {
|
|
4526
4537
|
let h = Math.min(o.len, l.len);
|
|
4527
|
-
|
|
4538
|
+
Y1(s, h, -1), o.forward(h), l.forward(h);
|
|
4528
4539
|
} else if (l.ins >= 0 && (o.ins < 0 || u == o.i || o.off == 0 && (l.len < o.len || l.len == o.len && !e))) {
|
|
4529
4540
|
let h = l.len;
|
|
4530
|
-
for (
|
|
4541
|
+
for (Y1(s, l.ins, -1); h; ) {
|
|
4531
4542
|
let T = Math.min(o.len, h);
|
|
4532
|
-
o.ins >= 0 && u < o.i && o.len <= T && (
|
|
4543
|
+
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;
|
|
4533
4544
|
}
|
|
4534
4545
|
l.next();
|
|
4535
4546
|
} else if (o.ins >= 0) {
|
|
@@ -4539,7 +4550,7 @@ function Yu(r, t, e, n = false) {
|
|
|
4539
4550
|
h += f, T -= f, l.forward(f);
|
|
4540
4551
|
} else if (l.ins == 0 && l.len < T) T -= l.len, l.next();
|
|
4541
4552
|
else break;
|
|
4542
|
-
|
|
4553
|
+
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);
|
|
4543
4554
|
} else {
|
|
4544
4555
|
if (o.done && l.done) return a ? D1.createSet(s, a) : pi.create(s);
|
|
4545
4556
|
throw new Error("Mismatched change set lengths");
|
|
@@ -4550,16 +4561,16 @@ function bL(r, t, e = false) {
|
|
|
4550
4561
|
let n = [], s = e ? [] : null, a = new M5(r), o = new M5(t);
|
|
4551
4562
|
for (let l = false; ; ) {
|
|
4552
4563
|
if (a.done && o.done) return s ? D1.createSet(n, s) : pi.create(n);
|
|
4553
|
-
if (a.ins == 0)
|
|
4554
|
-
else if (o.len == 0 && !o.done)
|
|
4564
|
+
if (a.ins == 0) Y1(n, a.len, 0, l), a.next();
|
|
4565
|
+
else if (o.len == 0 && !o.done) Y1(n, 0, o.ins, l), s && Ji(s, n, o.text), o.next();
|
|
4555
4566
|
else {
|
|
4556
4567
|
if (a.done || o.done) throw new Error("Mismatched change set lengths");
|
|
4557
4568
|
{
|
|
4558
4569
|
let u = Math.min(a.len2, o.len), h = n.length;
|
|
4559
4570
|
if (a.ins == -1) {
|
|
4560
4571
|
let T = o.ins == -1 ? -1 : o.off ? 0 : o.ins;
|
|
4561
|
-
|
|
4562
|
-
} else o.ins == -1 ? (
|
|
4572
|
+
Y1(n, u, T, l), s && T && Ji(s, n, o.text);
|
|
4573
|
+
} 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));
|
|
4563
4574
|
l = (a.ins > u || o.ins >= 0 && o.len > u) && (l || n.length > h), a.forward2(u), o.forward(u);
|
|
4564
4575
|
}
|
|
4565
4576
|
}
|
|
@@ -4969,12 +4980,12 @@ class _1 {
|
|
|
4969
4980
|
}
|
|
4970
4981
|
_1.reconfigure = _1.define();
|
|
4971
4982
|
_1.appendConfig = _1.define();
|
|
4972
|
-
class
|
|
4983
|
+
class J1 {
|
|
4973
4984
|
constructor(t, e, n, s, a, o) {
|
|
4974
|
-
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 ==
|
|
4985
|
+
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())));
|
|
4975
4986
|
}
|
|
4976
4987
|
static create(t, e, n, s, a, o) {
|
|
4977
|
-
return new
|
|
4988
|
+
return new J1(t, e, n, s, a, o);
|
|
4978
4989
|
}
|
|
4979
4990
|
get newDoc() {
|
|
4980
4991
|
return this._doc || (this._doc = this.changes.apply(this.startState.doc));
|
|
@@ -4995,14 +5006,14 @@ class Y1 {
|
|
|
4995
5006
|
return this.startState.config != this.state.config;
|
|
4996
5007
|
}
|
|
4997
5008
|
isUserEvent(t) {
|
|
4998
|
-
let e = this.annotation(
|
|
5009
|
+
let e = this.annotation(J1.userEvent);
|
|
4999
5010
|
return !!(e && (e == t || e.length > t.length && e.slice(0, t.length) == t && e[t.length] == "."));
|
|
5000
5011
|
}
|
|
5001
5012
|
}
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5013
|
+
J1.time = Gn.define();
|
|
5014
|
+
J1.userEvent = Gn.define();
|
|
5015
|
+
J1.addToHistory = Gn.define();
|
|
5016
|
+
J1.remote = Gn.define();
|
|
5006
5017
|
function dw(r, t) {
|
|
5007
5018
|
let e = [];
|
|
5008
5019
|
for (let n = 0, s = 0; ; ) {
|
|
@@ -5020,7 +5031,7 @@ function IL(r, t, e) {
|
|
|
5020
5031
|
}
|
|
5021
5032
|
function ic(r, t, e) {
|
|
5022
5033
|
let n = t.selection, s = rn(t.annotations);
|
|
5023
|
-
return t.userEvent && (s = s.concat(
|
|
5034
|
+
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 };
|
|
5024
5035
|
}
|
|
5025
5036
|
function VL(r, t, e) {
|
|
5026
5037
|
let n = ic(r, t.length ? t[0] : {}, r.doc.length);
|
|
@@ -5030,7 +5041,7 @@ function VL(r, t, e) {
|
|
|
5030
5041
|
let o = !!t[a].sequential;
|
|
5031
5042
|
n = IL(n, ic(r, t[a], o ? n.changes.newLength : r.doc.length), o);
|
|
5032
5043
|
}
|
|
5033
|
-
let s =
|
|
5044
|
+
let s = J1.create(r, n.changes, n.selection, n.effects, n.annotations, n.scrollIntoView);
|
|
5034
5045
|
return gw(e ? pw(s) : s);
|
|
5035
5046
|
}
|
|
5036
5047
|
function pw(r) {
|
|
@@ -5050,12 +5061,12 @@ function pw(r) {
|
|
|
5050
5061
|
let o = r.changes.filter(e);
|
|
5051
5062
|
s = o.changes, a = o.filtered.mapDesc(o.changes).invertedDesc;
|
|
5052
5063
|
}
|
|
5053
|
-
r =
|
|
5064
|
+
r = J1.create(t, s, r.selection && r.selection.map(a), _1.mapEffects(r.effects, a), r.annotations, r.scrollIntoView);
|
|
5054
5065
|
}
|
|
5055
5066
|
let n = t.facet(CL);
|
|
5056
5067
|
for (let s = n.length - 1; s >= 0; s--) {
|
|
5057
5068
|
let a = n[s](r);
|
|
5058
|
-
a instanceof
|
|
5069
|
+
a instanceof J1 ? r = a : Array.isArray(a) && a.length == 1 && a[0] instanceof J1 ? r = a[0] : r = VL(t, rn(a), false);
|
|
5059
5070
|
}
|
|
5060
5071
|
return r;
|
|
5061
5072
|
}
|
|
@@ -5065,7 +5076,7 @@ function gw(r) {
|
|
|
5065
5076
|
let a = e[s](r);
|
|
5066
5077
|
a && Object.keys(a).length && (n = IL(n, ic(t, a, r.changes.newLength), true));
|
|
5067
5078
|
}
|
|
5068
|
-
return n == r ? r :
|
|
5079
|
+
return n == r ? r : J1.create(t, r.changes, r.selection, n.effects, n.annotations, n.scrollIntoView);
|
|
5069
5080
|
}
|
|
5070
5081
|
const mw = [];
|
|
5071
5082
|
function rn(r) {
|
|
@@ -5778,7 +5789,7 @@ class $o {
|
|
|
5778
5789
|
var U2 = function(r) {
|
|
5779
5790
|
return r[r.Text = 0] = "Text", r[r.WidgetBefore = 1] = "WidgetBefore", r[r.WidgetAfter = 2] = "WidgetAfter", r[r.WidgetRange = 3] = "WidgetRange", r;
|
|
5780
5791
|
}(U2 || (U2 = {}));
|
|
5781
|
-
class
|
|
5792
|
+
class t2 extends Jr {
|
|
5782
5793
|
constructor(t, e, n, s) {
|
|
5783
5794
|
super(), this.startSide = t, this.endSide = e, this.widget = n, this.spec = s;
|
|
5784
5795
|
}
|
|
@@ -5811,8 +5822,8 @@ class J1 extends Jr {
|
|
|
5811
5822
|
return this.widget ? this.widget.estimatedHeight > -1 : false;
|
|
5812
5823
|
}
|
|
5813
5824
|
}
|
|
5814
|
-
|
|
5815
|
-
class J5 extends
|
|
5825
|
+
t2.none = Me.empty;
|
|
5826
|
+
class J5 extends t2 {
|
|
5816
5827
|
constructor(t) {
|
|
5817
5828
|
let { start: e, end: n } = RL(t);
|
|
5818
5829
|
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;
|
|
@@ -5826,7 +5837,7 @@ class J5 extends J1 {
|
|
|
5826
5837
|
}
|
|
5827
5838
|
}
|
|
5828
5839
|
J5.prototype.point = false;
|
|
5829
|
-
class t0 extends
|
|
5840
|
+
class t0 extends t2 {
|
|
5830
5841
|
constructor(t) {
|
|
5831
5842
|
super(-2e8, -2e8, null, t);
|
|
5832
5843
|
}
|
|
@@ -5840,7 +5851,7 @@ class t0 extends J1 {
|
|
|
5840
5851
|
}
|
|
5841
5852
|
t0.prototype.mapMode = S2.TrackBefore;
|
|
5842
5853
|
t0.prototype.point = true;
|
|
5843
|
-
class t4 extends
|
|
5854
|
+
class t4 extends t2 {
|
|
5844
5855
|
constructor(t, e, n, s, a, o) {
|
|
5845
5856
|
super(e, n, a, t), this.block = s, this.isReplace = o, this.mapMode = s ? e <= 0 ? S2.TrackBefore : S2.TrackAfter : S2.TrackDel;
|
|
5846
5857
|
}
|
|
@@ -6345,7 +6356,7 @@ class yn {
|
|
|
6345
6356
|
let u = [];
|
|
6346
6357
|
return o && u.push(Yo.of((h) => {
|
|
6347
6358
|
let T = h.plugin(l);
|
|
6348
|
-
return T ? o(T) :
|
|
6359
|
+
return T ? o(T) : t2.none;
|
|
6349
6360
|
})), a && u.push(a(l)), u;
|
|
6350
6361
|
});
|
|
6351
6362
|
}
|
|
@@ -7190,7 +7201,7 @@ const r9 = new class extends $o {
|
|
|
7190
7201
|
}();
|
|
7191
7202
|
class Td {
|
|
7192
7203
|
constructor(t) {
|
|
7193
|
-
this.view = t, this.decorations = [], this.blockWrappers = [], this.dynamicDecorationMap = [false], this.domChanged = null, this.hasComposition = null, this.editContextFormatting =
|
|
7204
|
+
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);
|
|
7194
7205
|
}
|
|
7195
7206
|
update(t) {
|
|
7196
7207
|
var e;
|
|
@@ -7408,12 +7419,12 @@ class Td {
|
|
|
7408
7419
|
let a = s == e.viewports.length ? null : e.viewports[s], o = a ? a.from - 1 : this.view.state.doc.length;
|
|
7409
7420
|
if (o > n) {
|
|
7410
7421
|
let l = (e.lineBlockAt(o).bottom - e.lineBlockAt(n).top) / this.view.scaleY;
|
|
7411
|
-
t.push(
|
|
7422
|
+
t.push(t2.replace({ widget: new n9(l), block: true, inclusive: true, isBlockGap: true }).range(n, o));
|
|
7412
7423
|
}
|
|
7413
7424
|
if (!a) break;
|
|
7414
7425
|
n = a.to + 1;
|
|
7415
7426
|
}
|
|
7416
|
-
return
|
|
7427
|
+
return t2.set(t);
|
|
7417
7428
|
}
|
|
7418
7429
|
updateDeco() {
|
|
7419
7430
|
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) => {
|
|
@@ -8458,7 +8469,7 @@ function ja(r, t) {
|
|
|
8458
8469
|
return r == t ? r : (r.constructor != t.constructor && (xn = true), t);
|
|
8459
8470
|
}
|
|
8460
8471
|
a2.prototype.size = 1;
|
|
8461
|
-
const zC =
|
|
8472
|
+
const zC = t2.replace({});
|
|
8462
8473
|
class _x extends a2 {
|
|
8463
8474
|
constructor(t, e, n) {
|
|
8464
8475
|
super(t, e), this.deco = n, this.spaceAbove = 0;
|
|
@@ -8762,7 +8773,7 @@ class a9 {
|
|
|
8762
8773
|
return true;
|
|
8763
8774
|
}
|
|
8764
8775
|
draw(t, e) {
|
|
8765
|
-
return
|
|
8776
|
+
return t2.replace({ widget: new JC(this.displaySize * (e ? t.scaleY : t.scaleX), e) }).range(this.from, this.to);
|
|
8766
8777
|
}
|
|
8767
8778
|
}
|
|
8768
8779
|
class JC extends $o {
|
|
@@ -8786,7 +8797,7 @@ class Ed {
|
|
|
8786
8797
|
let e = t.facet(nT).some((n) => typeof n != "function" && n.class == "cm-lineWrapping");
|
|
8787
8798
|
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)]);
|
|
8788
8799
|
for (let n = 0; n < 2 && (this.viewport = this.getViewport(0, null), !!this.updateForViewport()); n++) ;
|
|
8789
|
-
this.updateViewportLines(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco =
|
|
8800
|
+
this.updateViewportLines(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = t2.set(this.lineGaps.map((n) => n.draw(this, false))), this.computeVisibleRanges();
|
|
8790
8801
|
}
|
|
8791
8802
|
updateForViewport() {
|
|
8792
8803
|
let t = [this.viewport], { main: e } = this.state.selection;
|
|
@@ -8939,7 +8950,7 @@ class Ed {
|
|
|
8939
8950
|
return this.heightOracle.lineWrapping ? t.height * a : s.total * this.heightOracle.charWidth * a;
|
|
8940
8951
|
}
|
|
8941
8952
|
updateLineGaps(t) {
|
|
8942
|
-
a9.same(t, this.lineGaps) || (this.lineGaps = t, this.lineGapDeco =
|
|
8953
|
+
a9.same(t, this.lineGaps) || (this.lineGaps = t, this.lineGapDeco = t2.set(t.map((e) => e.draw(this, this.heightOracle.lineWrapping))));
|
|
8943
8954
|
}
|
|
8944
8955
|
computeVisibleRanges(t) {
|
|
8945
8956
|
let e = this.stateDeco;
|
|
@@ -9301,11 +9312,11 @@ class aD {
|
|
|
9301
9312
|
let u = this.toEditorPos(a.rangeStart), h = this.toEditorPos(a.rangeEnd);
|
|
9302
9313
|
if (u < h) {
|
|
9303
9314
|
let T = `text-decoration: underline ${/^[a-z]/.test(o) ? o + " " : o == "Dashed" ? "dashed " : o == "Squiggle" ? "wavy " : ""}${/thin/i.test(l) ? 1 : 2}px`;
|
|
9304
|
-
s.push(
|
|
9315
|
+
s.push(t2.mark({ attributes: { style: T } }).range(u, h));
|
|
9305
9316
|
}
|
|
9306
9317
|
}
|
|
9307
9318
|
}
|
|
9308
|
-
t.dispatch({ effects: rx.of(
|
|
9319
|
+
t.dispatch({ effects: rx.of(t2.set(s)) });
|
|
9309
9320
|
}, this.handlers.compositionstart = () => {
|
|
9310
9321
|
t.inputState.composing < 0 && (t.inputState.composing = 0, t.inputState.compositionFirstChange = true);
|
|
9311
9322
|
}, this.handlers.compositionend = () => {
|
|
@@ -9413,7 +9424,7 @@ class be {
|
|
|
9413
9424
|
});
|
|
9414
9425
|
}
|
|
9415
9426
|
dispatch(...t) {
|
|
9416
|
-
let e = t.length == 1 && t[0] instanceof
|
|
9427
|
+
let e = t.length == 1 && t[0] instanceof J1 ? t : t.length == 1 && Array.isArray(t[0]) ? t[0] : [this.state.update(...t)];
|
|
9417
9428
|
this.dispatchTransactions(e, this);
|
|
9418
9429
|
}
|
|
9419
9430
|
update(t) {
|
|
@@ -16406,7 +16417,7 @@ function Ue() {
|
|
|
16406
16417
|
return h && h.__esModule ? h : { default: h };
|
|
16407
16418
|
};
|
|
16408
16419
|
Object.defineProperty(Is, "__esModule", { value: true });
|
|
16409
|
-
var n = jt, s = e(Ne), a = e(
|
|
16420
|
+
var n = jt, s = e(Ne), a = e(e2()), o = e(Le), l = zn, u;
|
|
16410
16421
|
return function(h) {
|
|
16411
16422
|
var T = 7.2, f = 72, d = { em: function(W) {
|
|
16412
16423
|
return W;
|
|
@@ -16744,7 +16755,7 @@ var AV = EV(Ne), HV = function() {
|
|
|
16744
16755
|
}();
|
|
16745
16756
|
b7.default = HV;
|
|
16746
16757
|
var Zp;
|
|
16747
|
-
function
|
|
16758
|
+
function e2() {
|
|
16748
16759
|
if (Zp) return Os;
|
|
16749
16760
|
Zp = 1;
|
|
16750
16761
|
var r = _ && _.__values || function(h) {
|
|
@@ -17319,7 +17330,7 @@ var Hi = {};
|
|
|
17319
17330
|
return T && T.__esModule ? T : { default: T };
|
|
17320
17331
|
};
|
|
17321
17332
|
Object.defineProperty(r, "__esModule", { value: true }), r.TagsFactory = r.AllTags = r.NoTags = r.AbstractTags = r.TagInfo = r.Label = void 0;
|
|
17322
|
-
var s = n(
|
|
17333
|
+
var s = n(e2()), a = /* @__PURE__ */ function() {
|
|
17323
17334
|
function T(f, d) {
|
|
17324
17335
|
f === void 0 && (f = "???"), d === void 0 && (d = ""), this.tag = f, this.id = d;
|
|
17325
17336
|
}
|
|
@@ -18621,7 +18632,7 @@ var Cn = _ && _.__assign || function() {
|
|
|
18621
18632
|
return r && r.__esModule ? r : { default: r };
|
|
18622
18633
|
};
|
|
18623
18634
|
Object.defineProperty(p2, "__esModule", { value: true });
|
|
18624
|
-
var HT = SP(Nt), _t = E7(Ne), S1 = E7(Le), A7 = E7(
|
|
18635
|
+
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 };
|
|
18625
18636
|
Vt.Open = function(r, t) {
|
|
18626
18637
|
r.Push(r.itemFactory.create("open"));
|
|
18627
18638
|
};
|
|
@@ -18743,7 +18754,7 @@ Vt.MoveRoot = function(r, t, e) {
|
|
|
18743
18754
|
n = parseInt(n, 10) / 15 + "em", n.substr(0, 1) !== "-" && (n = "+" + n), r.stack.global[e] = n;
|
|
18744
18755
|
};
|
|
18745
18756
|
Vt.Accent = function(r, t, e, n) {
|
|
18746
|
-
var s = r.ParseArg(t), a = Cn(Cn({},
|
|
18757
|
+
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;
|
|
18747
18758
|
_t.default.setAttribute(u, "stretchy", !!n);
|
|
18748
18759
|
var h = _t.default.isEmbellished(s) ? _t.default.getCoreMO(s) : s;
|
|
18749
18760
|
(_t.default.isType(h, "mo") || _t.default.getProperty(h, "movablelimits")) && _t.default.setProperties(h, { movablelimits: false });
|
|
@@ -18754,23 +18765,23 @@ Vt.Accent = function(r, t, e, n) {
|
|
|
18754
18765
|
};
|
|
18755
18766
|
Vt.UnderOver = function(r, t, e, n) {
|
|
18756
18767
|
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);
|
|
18757
|
-
r.Push(
|
|
18768
|
+
r.Push(h1.default.underOver(r, l, a, o, n));
|
|
18758
18769
|
};
|
|
18759
18770
|
Vt.Overset = function(r, t) {
|
|
18760
18771
|
var e = r.ParseArg(t), n = r.ParseArg(t);
|
|
18761
|
-
|
|
18772
|
+
h1.default.checkMovableLimits(n), e.isKind("mo") && _t.default.setAttribute(e, "accent", false);
|
|
18762
18773
|
var s = r.create("node", "mover", [n, e]);
|
|
18763
18774
|
r.Push(s);
|
|
18764
18775
|
};
|
|
18765
18776
|
Vt.Underset = function(r, t) {
|
|
18766
18777
|
var e = r.ParseArg(t), n = r.ParseArg(t);
|
|
18767
|
-
|
|
18778
|
+
h1.default.checkMovableLimits(n), e.isKind("mo") && _t.default.setAttribute(e, "accent", false);
|
|
18768
18779
|
var s = r.create("node", "munder", [n, e], { accentunder: false });
|
|
18769
18780
|
r.Push(s);
|
|
18770
18781
|
};
|
|
18771
18782
|
Vt.Overunderset = function(r, t) {
|
|
18772
18783
|
var e = r.ParseArg(t), n = r.ParseArg(t), s = r.ParseArg(t);
|
|
18773
|
-
|
|
18784
|
+
h1.default.checkMovableLimits(s), e.isKind("mo") && _t.default.setAttribute(e, "accent", false), n.isKind("mo") && _t.default.setAttribute(n, "accent", false);
|
|
18774
18785
|
var a = r.create("node", "munderover", [s, n, e], { accent: false, accentunder: false });
|
|
18775
18786
|
r.Push(a);
|
|
18776
18787
|
};
|
|
@@ -18795,7 +18806,7 @@ Vt.MmlToken = function(r, t) {
|
|
|
18795
18806
|
var u = n.match(/^([a-z]+)\s*=\s*('[^']*'|"[^"]*"|[^ ,]*)\s*,?\s*/i);
|
|
18796
18807
|
if (!u) throw new S1.default("InvalidMathMLAttr", "Invalid MathML attribute: %1", n);
|
|
18797
18808
|
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);
|
|
18798
|
-
var h =
|
|
18809
|
+
var h = h1.default.MmlFilterAttribute(r, u[1], u[2].replace(/^(['"])(.*)\1$/, "$2"));
|
|
18799
18810
|
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);
|
|
18800
18811
|
}
|
|
18801
18812
|
o.length && (a["mjx-keep-attrs"] = o.join(" "));
|
|
@@ -18813,7 +18824,7 @@ Vt.Phantom = function(r, t, e, n) {
|
|
|
18813
18824
|
r.Push(a);
|
|
18814
18825
|
};
|
|
18815
18826
|
Vt.Smash = function(r, t) {
|
|
18816
|
-
var e =
|
|
18827
|
+
var e = h1.default.trimSpaces(r.GetBrackets(t, "")), n = r.create("node", "mpadded", [r.ParseArg(t)]);
|
|
18817
18828
|
switch (e) {
|
|
18818
18829
|
case "b":
|
|
18819
18830
|
_t.default.setAttribute(n, "depth", 0);
|
|
@@ -18874,14 +18885,14 @@ Vt.BuildRel = function(r, t) {
|
|
|
18874
18885
|
r.Push(a);
|
|
18875
18886
|
};
|
|
18876
18887
|
Vt.HBox = function(r, t, e, n) {
|
|
18877
|
-
r.PushAll(
|
|
18888
|
+
r.PushAll(h1.default.internalMath(r, r.GetArgument(t), e, n));
|
|
18878
18889
|
};
|
|
18879
18890
|
Vt.FBox = function(r, t) {
|
|
18880
|
-
var e =
|
|
18891
|
+
var e = h1.default.internalMath(r, r.GetArgument(t)), n = r.create("node", "menclose", e, { notation: "box" });
|
|
18881
18892
|
r.Push(n);
|
|
18882
18893
|
};
|
|
18883
18894
|
Vt.FrameBox = function(r, t) {
|
|
18884
|
-
var e = r.GetBrackets(t), n = r.GetBrackets(t) || "c", s =
|
|
18895
|
+
var e = r.GetBrackets(t), n = r.GetBrackets(t) || "c", s = h1.default.internalMath(r, r.GetArgument(t));
|
|
18885
18896
|
e && (s = [r.create("node", "mpadded", s, { width: e, "data-align": (0, EP.lookup)(n, { l: "left", r: "right" }, "center") })]);
|
|
18886
18897
|
var a = r.create("node", "TeXAtom", [r.create("node", "menclose", s, { notation: "box" })], { texClass: $n.TEXCLASS.ORD });
|
|
18887
18898
|
r.Push(a);
|
|
@@ -18918,7 +18929,7 @@ Vt.Entry = function(r, t) {
|
|
|
18918
18929
|
}
|
|
18919
18930
|
var p = a.substr(r.i, u - r.i);
|
|
18920
18931
|
if (!p.match(/^\s*\\text[^a-zA-Z]/) || l !== p.replace(/\s+$/, "").length - 1) {
|
|
18921
|
-
var m =
|
|
18932
|
+
var m = h1.default.internalMath(r, h1.default.trimSpaces(p), 0);
|
|
18922
18933
|
r.PushAll(m), r.i = u;
|
|
18923
18934
|
}
|
|
18924
18935
|
}
|
|
@@ -18930,7 +18941,7 @@ Vt.CrLaTeX = function(r, t, e) {
|
|
|
18930
18941
|
e === void 0 && (e = false);
|
|
18931
18942
|
var n;
|
|
18932
18943
|
if (!e && (r.string.charAt(r.i) === "*" && r.i++, r.string.charAt(r.i) === "[")) {
|
|
18933
|
-
var s = r.GetBrackets(t, ""), a = AT(
|
|
18944
|
+
var s = r.GetBrackets(t, ""), a = AT(h1.default.matchDimen(s), 2), o = a[0], l = a[1];
|
|
18934
18945
|
if (s && !o) throw new S1.default("BracketMustBeDimension", "Bracket argument to %1 must be a dimension", r.currentCS);
|
|
18935
18946
|
n = o + l;
|
|
18936
18947
|
}
|
|
@@ -18965,7 +18976,7 @@ Vt.BeginEnd = function(r, t) {
|
|
|
18965
18976
|
}
|
|
18966
18977
|
r.stack.env.closing = e;
|
|
18967
18978
|
}
|
|
18968
|
-
|
|
18979
|
+
h1.default.checkMaxMacros(r, false), r.parse("environment", [r, e]);
|
|
18969
18980
|
};
|
|
18970
18981
|
Vt.Array = function(r, t, e, n, s, a, o, l, u) {
|
|
18971
18982
|
s || (s = r.GetArgument("\\begin{" + t.getName() + "}"));
|
|
@@ -18976,13 +18987,13 @@ Vt.Array = function(r, t, e, n, s, a, o, l, u) {
|
|
|
18976
18987
|
};
|
|
18977
18988
|
Vt.AlignedArray = function(r, t) {
|
|
18978
18989
|
var e = r.GetBrackets("\\begin{" + t.getName() + "}"), n = Vt.Array(r, t);
|
|
18979
|
-
return
|
|
18990
|
+
return h1.default.setArrayAlign(n, e);
|
|
18980
18991
|
};
|
|
18981
18992
|
Vt.Equation = function(r, t, e) {
|
|
18982
|
-
return r.Push(t),
|
|
18993
|
+
return r.Push(t), h1.default.checkEqnEnv(r), r.itemFactory.create("equation", e).setProperty("name", t.getName());
|
|
18983
18994
|
};
|
|
18984
18995
|
Vt.EqnArray = function(r, t, e, n, s, a) {
|
|
18985
|
-
r.Push(t), n &&
|
|
18996
|
+
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");
|
|
18986
18997
|
var o = r.itemFactory.create("eqnarray", t.getName(), e, n, r.stack.global);
|
|
18987
18998
|
return o.arraydef = { displaystyle: true, columnalign: s, columnspacing: a || "1em", rowspacing: "3pt", side: r.options.tagSide, minlabelspacing: r.options.tagIndent }, o;
|
|
18988
18999
|
};
|
|
@@ -19002,7 +19013,7 @@ Vt.HandleRef = function(r, t, e) {
|
|
|
19002
19013
|
s || (r.tags.refUpdate || (r.tags.redo = true), s = new $x.Label());
|
|
19003
19014
|
var a = s.tag;
|
|
19004
19015
|
e && (a = r.tags.formatTag(a));
|
|
19005
|
-
var o = r.create("node", "mrow",
|
|
19016
|
+
var o = r.create("node", "mrow", h1.default.internalMath(r, a), { href: r.tags.formatUrl(s.id, r.options.baseURL), class: "MathJax_ref" });
|
|
19006
19017
|
r.Push(o);
|
|
19007
19018
|
};
|
|
19008
19019
|
Vt.Macro = function(r, t, e, n, s) {
|
|
@@ -19013,9 +19024,9 @@ Vt.Macro = function(r, t, e, n, s) {
|
|
|
19013
19024
|
a.push(o ?? s);
|
|
19014
19025
|
}
|
|
19015
19026
|
for (var l = a.length; l < n; l++) a.push(r.GetArgument(t));
|
|
19016
|
-
e =
|
|
19027
|
+
e = h1.default.substituteArgs(r, a, e);
|
|
19017
19028
|
}
|
|
19018
|
-
r.string =
|
|
19029
|
+
r.string = h1.default.addArgs(r, e, r.string.slice(r.i)), r.i = 0, h1.default.checkMaxMacros(r);
|
|
19019
19030
|
};
|
|
19020
19031
|
Vt.MathChoice = function(r, t) {
|
|
19021
19032
|
var e = r.ParseArg(t), n = r.ParseArg(t), s = r.ParseArg(t), a = r.ParseArg(t);
|
|
@@ -19262,7 +19273,7 @@ var XP = _ && _.__extends || /* @__PURE__ */ function() {
|
|
|
19262
19273
|
return r && r.__esModule ? r : { default: r };
|
|
19263
19274
|
};
|
|
19264
19275
|
Object.defineProperty(vT, "__esModule", { value: true });
|
|
19265
|
-
var s_ = vT.TeX = void 0, ig = r0, rg = H1, ng = x7, D4 = A0(LT), sg = A0(Ne), YP = A0(
|
|
19276
|
+
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) {
|
|
19266
19277
|
XP(t, r);
|
|
19267
19278
|
function t(e) {
|
|
19268
19279
|
e === void 0 && (e = {});
|
|
@@ -19313,7 +19324,7 @@ var DT = {}, rk = {};
|
|
|
19313
19324
|
return o && o.__esModule ? o : { default: o };
|
|
19314
19325
|
};
|
|
19315
19326
|
Object.defineProperty(r, "__esModule", { value: true }), r.ActionConfiguration = r.ActionMethods = void 0;
|
|
19316
|
-
var e = he, n = t(
|
|
19327
|
+
var e = he, n = t(e2()), s = Gt, a = t(p2);
|
|
19317
19328
|
r.ActionMethods = {}, r.ActionMethods.Macro = a.default.Macro, r.ActionMethods.Toggle = function(o, l) {
|
|
19318
19329
|
for (var u = [], h; (h = o.GetArgument(l)) !== "\\endtoggle"; ) u.push(new n.default(h, o.stack.env, o.configuration).mml());
|
|
19319
19330
|
o.Push(o.create("node", "maction", u, { actiontype: "toggle" }));
|
|
@@ -19442,7 +19453,7 @@ var Yn = {};
|
|
|
19442
19453
|
return y && y.__esModule ? y : { default: y };
|
|
19443
19454
|
};
|
|
19444
19455
|
Object.defineProperty(r, "__esModule", { value: true }), r.NEW_OPS = r.AmsMethods = void 0;
|
|
19445
|
-
var s = n(Ue()), a = n(h3), o = n(Ne), l = q1, u = n(
|
|
19456
|
+
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;
|
|
19446
19457
|
r.AmsMethods = {}, r.AmsMethods.AmsEqnArray = function(y, c, Q, g, v, L, x) {
|
|
19447
19458
|
var b = y.GetBrackets("\\begin{" + c.getName() + "}"), S = f.default.EqnArray(y, c, Q, g, v, L, x);
|
|
19448
19459
|
return s.default.setArrayAlign(S, b);
|
|
@@ -19604,7 +19615,7 @@ var IT = {}, VT = {}, T_ = _ && _.__importDefault || function(r) {
|
|
|
19604
19615
|
return r && r.__esModule ? r : { default: r };
|
|
19605
19616
|
};
|
|
19606
19617
|
Object.defineProperty(VT, "__esModule", { value: true });
|
|
19607
|
-
var Rs = T_(
|
|
19618
|
+
var Rs = T_(e2()), Qk = sr, dk = jt, O4 = T_(Ne), Qi = {};
|
|
19608
19619
|
Qi.CD = function(r, t) {
|
|
19609
19620
|
r.Push(t);
|
|
19610
19621
|
var e = r.itemFactory.create("array"), n = r.configuration.options.amscd;
|
|
@@ -20150,7 +20161,7 @@ var NT = {}, Bk = _ && _.__createBinding || (Object.create ? function(r, t, e, n
|
|
|
20150
20161
|
return r && r.__esModule ? r : { default: r };
|
|
20151
20162
|
};
|
|
20152
20163
|
Object.defineProperty(NT, "__esModule", { value: true });
|
|
20153
|
-
var a3 = UT(Le), F9 = UT(
|
|
20164
|
+
var a3 = UT(Le), F9 = UT(e2()), Kc = UT(Ue()), di = Nk(D7), z3 = {};
|
|
20154
20165
|
z3.Prooftree = function(r, t) {
|
|
20155
20166
|
r.Push(t);
|
|
20156
20167
|
var e = r.itemFactory.create("proofTree").setProperties({ name: t.getName(), line: "solid", currentLine: "solid", rootAtTop: false });
|
|
@@ -20308,7 +20319,7 @@ var zk = {}, jT = {};
|
|
|
20308
20319
|
return l && l.__esModule ? l : { default: l };
|
|
20309
20320
|
};
|
|
20310
20321
|
Object.defineProperty(r, "__esModule", { value: true }), r.EmpheqUtil = void 0;
|
|
20311
|
-
var a = s(Ue()), o = s(
|
|
20322
|
+
var a = s(Ue()), o = s(e2());
|
|
20312
20323
|
r.EmpheqUtil = { environment: function(l, u, h, T) {
|
|
20313
20324
|
var f = T[0], d = l.itemFactory.create(f + "-begin").setProperties({ name: u, end: f });
|
|
20314
20325
|
l.Push(h.apply(void 0, e([l, d], t(T.slice(1)), false)));
|
|
@@ -20480,7 +20491,7 @@ var k5 = {}, Wk = _ && _.__values || function(r) {
|
|
|
20480
20491
|
};
|
|
20481
20492
|
Object.defineProperty(k5, "__esModule", { value: true });
|
|
20482
20493
|
k5.CenternotConfiguration = k5.filterCenterOver = void 0;
|
|
20483
|
-
var qk = he, Tg = GT(
|
|
20494
|
+
var qk = he, Tg = GT(e2()), fg = GT(Ne), Zk = Gt, Kk = GT(p2);
|
|
20484
20495
|
new Zk.CommandMap("centernot", { centerOver: "CenterOver", centernot: ["Macro", "\\centerOver{#1}{{⧸}}", 1] }, { CenterOver: function(r, t) {
|
|
20485
20496
|
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" })]);
|
|
20486
20497
|
r.configuration.addNode("centerOver", s), r.Push(a);
|
|
@@ -20806,61 +20817,61 @@ var uR = _ && _.__createBinding || (Object.create ? function(r, t, e, n) {
|
|
|
20806
20817
|
return r && r.__esModule ? r : { default: r };
|
|
20807
20818
|
};
|
|
20808
20819
|
Object.defineProperty(H0, "__esModule", { value: true });
|
|
20809
|
-
var TR = V7(Le), fR = hR(Gt), QR = V7(p2), Kr = V7(Ue()),
|
|
20820
|
+
var TR = V7(Le), fR = hR(Gt), QR = V7(p2), Kr = V7(Ue()), T1 = V7(t6), C2 = {};
|
|
20810
20821
|
C2.NewCommand = function(r, t) {
|
|
20811
|
-
var e =
|
|
20812
|
-
|
|
20822
|
+
var e = T1.default.GetCsNameArgument(r, t), n = T1.default.GetArgCount(r, t), s = r.GetBrackets(t), a = r.GetArgument(t);
|
|
20823
|
+
T1.default.addMacro(r, e, C2.Macro, [a, n, s]);
|
|
20813
20824
|
};
|
|
20814
20825
|
C2.NewEnvironment = function(r, t) {
|
|
20815
|
-
var e = Kr.default.trimSpaces(r.GetArgument(t)), n =
|
|
20816
|
-
|
|
20826
|
+
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);
|
|
20827
|
+
T1.default.addEnvironment(r, e, C2.BeginEnv, [true, a, o, n, s]);
|
|
20817
20828
|
};
|
|
20818
20829
|
C2.MacroDef = function(r, t) {
|
|
20819
|
-
var e =
|
|
20820
|
-
n instanceof Array ?
|
|
20830
|
+
var e = T1.default.GetCSname(r, t), n = T1.default.GetTemplate(r, t, "\\" + e), s = r.GetArgument(t);
|
|
20831
|
+
n instanceof Array ? T1.default.addMacro(r, e, C2.MacroWithTemplate, [s].concat(n)) : T1.default.addMacro(r, e, C2.Macro, [s, n]);
|
|
20821
20832
|
};
|
|
20822
20833
|
C2.Let = function(r, t) {
|
|
20823
|
-
var e =
|
|
20834
|
+
var e = T1.default.GetCSname(r, t), n = r.GetNext();
|
|
20824
20835
|
n === "=" && (r.i++, n = r.GetNext());
|
|
20825
20836
|
var s = r.configuration.handlers;
|
|
20826
20837
|
if (n === "\\") {
|
|
20827
|
-
t =
|
|
20838
|
+
t = T1.default.GetCSname(r, t);
|
|
20828
20839
|
var a = s.get("delimiter").lookup("\\" + t);
|
|
20829
20840
|
if (a) {
|
|
20830
|
-
|
|
20841
|
+
T1.default.addDelimiter(r, "\\" + e, a.char, a.attributes);
|
|
20831
20842
|
return;
|
|
20832
20843
|
}
|
|
20833
20844
|
var o = s.get("macro").applicable(t);
|
|
20834
20845
|
if (!o) return;
|
|
20835
20846
|
if (o instanceof fR.MacroMap) {
|
|
20836
20847
|
var l = o.lookup(t);
|
|
20837
|
-
|
|
20848
|
+
T1.default.addMacro(r, e, l.func, l.args, l.symbol);
|
|
20838
20849
|
return;
|
|
20839
20850
|
}
|
|
20840
20851
|
a = o.lookup(t);
|
|
20841
|
-
var u =
|
|
20852
|
+
var u = T1.default.disassembleSymbol(e, a), h = function(f, d) {
|
|
20842
20853
|
for (var p = [], m = 2; m < arguments.length; m++) p[m - 2] = arguments[m];
|
|
20843
|
-
var y =
|
|
20854
|
+
var y = T1.default.assembleSymbol(p);
|
|
20844
20855
|
return o.parser(f, y);
|
|
20845
20856
|
};
|
|
20846
|
-
|
|
20857
|
+
T1.default.addMacro(r, e, h, u);
|
|
20847
20858
|
return;
|
|
20848
20859
|
}
|
|
20849
20860
|
r.i++;
|
|
20850
20861
|
var T = s.get("delimiter").lookup(n);
|
|
20851
20862
|
if (T) {
|
|
20852
|
-
|
|
20863
|
+
T1.default.addDelimiter(r, "\\" + e, T.char, T.attributes);
|
|
20853
20864
|
return;
|
|
20854
20865
|
}
|
|
20855
|
-
|
|
20866
|
+
T1.default.addMacro(r, e, C2.Macro, [n]);
|
|
20856
20867
|
};
|
|
20857
20868
|
C2.MacroWithTemplate = function(r, t, e, n) {
|
|
20858
20869
|
for (var s = [], a = 4; a < arguments.length; a++) s[a - 4] = arguments[a];
|
|
20859
20870
|
var o = parseInt(n, 10);
|
|
20860
20871
|
if (o) {
|
|
20861
20872
|
var l = [];
|
|
20862
|
-
if (r.GetNext(), s[0] && !
|
|
20863
|
-
for (var u = 0; u < o; u++) l.push(
|
|
20873
|
+
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);
|
|
20874
|
+
for (var u = 0; u < o; u++) l.push(T1.default.GetParameter(r, t, s[u + 1]));
|
|
20864
20875
|
e = Kr.default.substituteArgs(r, l, e);
|
|
20865
20876
|
}
|
|
20866
20877
|
r.string = Kr.default.addArgs(r, e, r.string.slice(r.i)), r.i = 0, Kr.default.checkMaxMacros(r);
|
|
@@ -21169,7 +21180,7 @@ function P_() {
|
|
|
21169
21180
|
return T && T.__esModule ? T : { default: T };
|
|
21170
21181
|
};
|
|
21171
21182
|
Object.defineProperty(x6, "__esModule", { value: true }), x6.MathtoolsUtil = void 0;
|
|
21172
|
-
var e = Nt, n = t(Ue()), s = t(
|
|
21183
|
+
var e = Nt, n = t(Ue()), s = t(e2()), a = t(Le), o = s3, l = H1, u = k_(), h = R_();
|
|
21173
21184
|
return x6.MathtoolsUtil = { setDisplayLevel: function(T, f) {
|
|
21174
21185
|
if (f) {
|
|
21175
21186
|
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];
|
|
@@ -21241,7 +21252,7 @@ function k_() {
|
|
|
21241
21252
|
return Q && Q.__esModule ? Q : { default: Q };
|
|
21242
21253
|
};
|
|
21243
21254
|
Object.defineProperty(r, "__esModule", { value: true }), r.MathtoolsMethods = void 0;
|
|
21244
|
-
var a = s(Ue()), o = Yn, l = s(p2), u = s(
|
|
21255
|
+
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_();
|
|
21245
21256
|
r.MathtoolsMethods = { MtMatrix: function(Q, g, v, L) {
|
|
21246
21257
|
var x = Q.GetBrackets("\\begin{".concat(g.getName(), "}"), "c");
|
|
21247
21258
|
return r.MathtoolsMethods.Array(Q, g, v, L, x);
|
|
@@ -22387,7 +22398,7 @@ var tf = {}, U7 = {}, hB = _ && _.__extends || /* @__PURE__ */ function() {
|
|
|
22387
22398
|
};
|
|
22388
22399
|
Object.defineProperty(U7, "__esModule", { value: true });
|
|
22389
22400
|
U7.AutoOpen = void 0;
|
|
22390
|
-
var Ag = n3, TB = ef(Ue()), fB = ef(Ne), QB = ef(
|
|
22401
|
+
var Ag = n3, TB = ef(Ue()), fB = ef(Ne), QB = ef(e2()), dB = function(r) {
|
|
22391
22402
|
hB(t, r);
|
|
22392
22403
|
function t() {
|
|
22393
22404
|
var e = r !== null && r.apply(this, arguments) || this;
|
|
@@ -22436,7 +22447,7 @@ var rf = {}, pB = _ && _.__read || function(r, t) {
|
|
|
22436
22447
|
return r && r.__esModule ? r : { default: r };
|
|
22437
22448
|
};
|
|
22438
22449
|
Object.defineProperty(rf, "__esModule", { value: true });
|
|
22439
|
-
var nf = C0(p2), P1 = C0(
|
|
22450
|
+
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})$/;
|
|
22440
22451
|
Ce.Quantity = function(r, t, e, n, s, a, o) {
|
|
22441
22452
|
e === void 0 && (e = "("), n === void 0 && (n = ")"), s === void 0 && (s = false), a === void 0 && (a = ""), o === void 0 && (o = "");
|
|
22442
22453
|
var l = s ? r.GetStar() : false, u = r.GetNext(), h = r.i, T = null;
|
|
@@ -22862,7 +22873,7 @@ var of = {}, e6 = {}, W_ = _ && _.__importDefault || function(r) {
|
|
|
22862
22873
|
};
|
|
22863
22874
|
Object.defineProperty(e6, "__esModule", { value: true });
|
|
22864
22875
|
e6.TextMacrosMethods = void 0;
|
|
22865
|
-
var wB = W_(
|
|
22876
|
+
var wB = W_(e2()), CB = fr, V4 = W_(p2);
|
|
22866
22877
|
e6.TextMacrosMethods = { Comment: function(r, t) {
|
|
22867
22878
|
for (; r.i < r.string.length && r.string.charAt(r.i) !== `
|
|
22868
22879
|
`; ) r.i++;
|
|
@@ -22976,7 +22987,7 @@ var D0 = {}, DB = _ && _.__extends || /* @__PURE__ */ function() {
|
|
|
22976
22987
|
};
|
|
22977
22988
|
Object.defineProperty(D0, "__esModule", { value: true });
|
|
22978
22989
|
D0.TextParser = void 0;
|
|
22979
|
-
var VB = j7(
|
|
22990
|
+
var VB = j7(e2()), Cg = j7(Le), PB = j7(Ue()), kB = jt, Dg = j7(Ne), Og = Nt, RB = function(r) {
|
|
22980
22991
|
DB(t, r);
|
|
22981
22992
|
function t(e, n, s, a) {
|
|
22982
22993
|
var o = r.call(this, e, n, s) || this;
|
|
@@ -49861,9 +49872,9 @@ k([dt(false), ot()], E1.prototype, "smoothCorners", 2);
|
|
|
49861
49872
|
k([dt(0.6), ot()], E1.prototype, "cornerSharpness", 2);
|
|
49862
49873
|
k([vt()], E1.prototype, "profile", 1);
|
|
49863
49874
|
E1 = k([k1("Rect")], E1);
|
|
49864
|
-
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",
|
|
49875
|
+
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 {
|
|
49865
49876
|
constructor(r) {
|
|
49866
|
-
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);
|
|
49877
|
+
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);
|
|
49867
49878
|
}
|
|
49868
49879
|
isPlaying() {
|
|
49869
49880
|
return this.playing();
|
|
@@ -49895,18 +49906,34 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
49895
49906
|
completion() {
|
|
49896
49907
|
return this.clampTime(this.time()) / this.getDuration();
|
|
49897
49908
|
}
|
|
49898
|
-
|
|
49909
|
+
syncToCurrentTime(r, t) {
|
|
49910
|
+
let e;
|
|
49911
|
+
r !== void 0 && this.clipStart !== void 0 ? e = this.trimStart + (r - this.clipStart) * this.playbackRate() : e = r ?? this.time();
|
|
49912
|
+
const n = this.setCurrentTime(e, { skipCollectPromise: (t == null ? void 0 : t.waitForSeek) ?? true });
|
|
49913
|
+
if (t != null && t.waitForSeek) return n;
|
|
49914
|
+
}
|
|
49915
|
+
setCurrentTime(r, t) {
|
|
49899
49916
|
try {
|
|
49900
|
-
const
|
|
49901
|
-
if (
|
|
49902
|
-
|
|
49903
|
-
|
|
49904
|
-
|
|
49917
|
+
const e = this.mediaElement(), n = this.key ?? "media";
|
|
49918
|
+
if (e.readyState < 2) return this.lastTime = r, this.time(r), new Promise((a) => {
|
|
49919
|
+
this.waitForCanPlay(e, () => {
|
|
49920
|
+
e.currentTime = r, this.lastTime = r, this.time(r);
|
|
49921
|
+
const o = () => {
|
|
49922
|
+
e.removeEventListener("seeked", o), a();
|
|
49923
|
+
};
|
|
49924
|
+
e.seeking ? e.addEventListener("seeked", o) : a();
|
|
49925
|
+
});
|
|
49926
|
+
});
|
|
49927
|
+
e.currentTime = r, this.lastTime = r, this.time(r);
|
|
49928
|
+
const s = e.seeking ? new Promise((a) => {
|
|
49929
|
+
const o = () => {
|
|
49930
|
+
a(), e.removeEventListener("seeked", o);
|
|
49905
49931
|
};
|
|
49906
|
-
|
|
49907
|
-
}));
|
|
49932
|
+
e.addEventListener("seeked", o);
|
|
49933
|
+
}) : Promise.resolve();
|
|
49934
|
+
return e.seeking && !(t != null && t.skipCollectPromise) && n1.collectPromise(s), s;
|
|
49908
49935
|
} catch {
|
|
49909
|
-
this.lastTime = r;
|
|
49936
|
+
return this.lastTime = r, this.time(r), Promise.resolve();
|
|
49910
49937
|
}
|
|
49911
49938
|
}
|
|
49912
49939
|
setVolume(r) {
|
|
@@ -49925,14 +49952,14 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
49925
49952
|
}
|
|
49926
49953
|
amplify(r, t) {
|
|
49927
49954
|
const e = `${this.src()}/${this.key}`;
|
|
49928
|
-
if (
|
|
49929
|
-
|
|
49955
|
+
if (c1.amplificationPool[e]) {
|
|
49956
|
+
c1.amplificationPool[e].gainNode.gain.value = t;
|
|
49930
49957
|
return;
|
|
49931
49958
|
}
|
|
49932
49959
|
const n = new AudioContext(), s = n.createMediaElementSource(r), a = n.createGain();
|
|
49933
|
-
if (a.gain.value = t, s.connect(a), a.connect(n.destination),
|
|
49960
|
+
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;
|
|
49934
49961
|
const o = () => {
|
|
49935
|
-
|
|
49962
|
+
c1.amplificationPool[e].audioContext.resume(), window.removeEventListener("click", o);
|
|
49936
49963
|
};
|
|
49937
49964
|
window.addEventListener("click", o);
|
|
49938
49965
|
}
|
|
@@ -49971,7 +49998,7 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
49971
49998
|
r.addEventListener("canplay", e), r.addEventListener("canplaythrough", e), r.addEventListener("error", n);
|
|
49972
49999
|
}
|
|
49973
50000
|
waitForCanPlayNecessary(r) {
|
|
49974
|
-
return r.readyState >= 2 ? false : this.awaitCanPlay() || this.view().playbackState() ===
|
|
50001
|
+
return r.readyState >= 2 ? false : this.awaitCanPlay() || this.view().playbackState() === $1.Rendering;
|
|
49975
50002
|
}
|
|
49976
50003
|
play() {
|
|
49977
50004
|
this.playing(true), this.schedulePlay();
|
|
@@ -50013,7 +50040,7 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
50013
50040
|
const t = r.play();
|
|
50014
50041
|
t !== void 0 && t.then(() => {
|
|
50015
50042
|
}).catch((e) => {
|
|
50016
|
-
e.name !== "AbortError" && console.warn("Error in simple play:", e), this.view().playbackState() !==
|
|
50043
|
+
e.name !== "AbortError" && console.warn("Error in simple play:", e), this.view().playbackState() !== $1.Rendering && this.playing(false);
|
|
50017
50044
|
});
|
|
50018
50045
|
}
|
|
50019
50046
|
} catch {
|
|
@@ -50027,7 +50054,7 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
50027
50054
|
const s = r.play();
|
|
50028
50055
|
s !== void 0 && s.then(() => {
|
|
50029
50056
|
}).catch((a) => {
|
|
50030
|
-
a.name !== "AbortError" && console.warn("Error playing media:", a), this.view().playbackState() !==
|
|
50057
|
+
a.name !== "AbortError" && console.warn("Error playing media:", a), this.view().playbackState() !== $1.Rendering && this.playing(false);
|
|
50031
50058
|
});
|
|
50032
50059
|
}
|
|
50033
50060
|
const e = t(), n = r.currentTime;
|
|
@@ -50049,8 +50076,8 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
50049
50076
|
super.collectAsyncResources(), this.seekedMedia(), this.setVolume(this.volume);
|
|
50050
50077
|
}
|
|
50051
50078
|
autoPlayBasedOnTwick() {
|
|
50052
|
-
const r = this.view().playbackState(), t = r ===
|
|
50053
|
-
t && !this.playing() ? (r ===
|
|
50079
|
+
const r = this.view().playbackState(), t = r === $1.Playing || r === $1.Presenting || r === $1.Rendering;
|
|
50080
|
+
t && !this.playing() ? (r === $1.Rendering && this.playing(true), this.play()) : !t && this.playing() && this.pause();
|
|
50054
50081
|
}
|
|
50055
50082
|
getErrorReason(r) {
|
|
50056
50083
|
let t;
|
|
@@ -50076,18 +50103,18 @@ var HK = "\nThe `playbackRate` of a `Video` cannot be reactive.\n\nMake sure to
|
|
|
50076
50103
|
return typeof navigator > "u" ? false : /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
|
|
50077
50104
|
}
|
|
50078
50105
|
};
|
|
50079
|
-
|
|
50080
|
-
k([dt(""), ot()],
|
|
50081
|
-
k([dt(false), ot()],
|
|
50082
|
-
k([dt(1), ot()],
|
|
50083
|
-
k([dt(0), ot()],
|
|
50084
|
-
k([dt(false), ot()],
|
|
50085
|
-
k([dt(true), ot()],
|
|
50086
|
-
k([dt(false), ot()],
|
|
50087
|
-
k([vt()],
|
|
50088
|
-
k([vt()],
|
|
50089
|
-
|
|
50090
|
-
var w2 = class extends
|
|
50106
|
+
c1.amplificationPool = {};
|
|
50107
|
+
k([dt(""), ot()], c1.prototype, "src", 2);
|
|
50108
|
+
k([dt(false), ot()], c1.prototype, "loop", 2);
|
|
50109
|
+
k([dt(1), ot()], c1.prototype, "playbackRate", 2);
|
|
50110
|
+
k([dt(0), ot()], c1.prototype, "time", 2);
|
|
50111
|
+
k([dt(false), ot()], c1.prototype, "playing", 2);
|
|
50112
|
+
k([dt(true), ot()], c1.prototype, "awaitCanPlay", 2);
|
|
50113
|
+
k([dt(false), ot()], c1.prototype, "allowVolumeAmplificationInPreview", 2);
|
|
50114
|
+
k([vt()], c1.prototype, "completion", 1);
|
|
50115
|
+
k([vt()], c1.prototype, "amplify", 1);
|
|
50116
|
+
c1 = k([k1("Media")], c1);
|
|
50117
|
+
var w2 = class extends c1 {
|
|
50091
50118
|
constructor(r) {
|
|
50092
50119
|
super(r);
|
|
50093
50120
|
}
|
|
@@ -50138,7 +50165,7 @@ var w2 = class extends T1 {
|
|
|
50138
50165
|
async draw(r) {
|
|
50139
50166
|
this.autoPlayBasedOnTwick();
|
|
50140
50167
|
const t = this.view().playbackState();
|
|
50141
|
-
t ===
|
|
50168
|
+
t === $1.Playing || t === $1.Presenting ? this.fastSeekedAudio() : this.seekedAudio(), r.save(), r.restore(), await this.drawChildren(r);
|
|
50142
50169
|
}
|
|
50143
50170
|
};
|
|
50144
50171
|
w2.pool = {};
|
|
@@ -50250,7 +50277,7 @@ var o3 = class extends E1 {
|
|
|
50250
50277
|
return this;
|
|
50251
50278
|
}
|
|
50252
50279
|
};
|
|
50253
|
-
k([dt(
|
|
50280
|
+
k([dt($1.Paused), ot()], o3.prototype, "playbackState", 2);
|
|
50254
50281
|
k([dt(0), ot()], o3.prototype, "globalTime", 2);
|
|
50255
50282
|
k([dt(0), ot()], o3.prototype, "fps", 2);
|
|
50256
50283
|
k([ot()], o3.prototype, "assetHash", 2);
|
|
@@ -51955,7 +51982,7 @@ async function eX(r, t, e, n) {
|
|
|
51955
51982
|
}
|
|
51956
51983
|
return a.getNextFrame();
|
|
51957
51984
|
}
|
|
51958
|
-
var v1 = class extends
|
|
51985
|
+
var v1 = class extends c1 {
|
|
51959
51986
|
constructor(r) {
|
|
51960
51987
|
super(r), this.detectedFileType = "unknown", this.fileTypeWasDetected = false, this.lastFrame = null;
|
|
51961
51988
|
}
|
|
@@ -52056,10 +52083,8 @@ var v1 = class extends T1 {
|
|
|
52056
52083
|
return r.playbackRate = this.playbackRate(), r.paused || r.pause(), this.lastTime === t || this.setCurrentTime(t), r;
|
|
52057
52084
|
}
|
|
52058
52085
|
fastSeekedVideo() {
|
|
52059
|
-
const r = this.video(), t = this.clampTime(this.time());
|
|
52060
|
-
|
|
52061
|
-
const e = this.playing() && t < r.duration && r.playbackRate > 0;
|
|
52062
|
-
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;
|
|
52086
|
+
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;
|
|
52087
|
+
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;
|
|
52063
52088
|
}
|
|
52064
52089
|
async webcodecSeekedVideo() {
|
|
52065
52090
|
const r = this.video(), t = this.clampTime(this.time());
|
|
@@ -52077,7 +52102,7 @@ var v1 = class extends T1 {
|
|
|
52077
52102
|
}
|
|
52078
52103
|
async seekFunction() {
|
|
52079
52104
|
const r = this.view().playbackState();
|
|
52080
|
-
return r ===
|
|
52105
|
+
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());
|
|
52081
52106
|
}
|
|
52082
52107
|
async draw(r) {
|
|
52083
52108
|
this.autoPlayBasedOnTwick(), this.drawShape(r);
|
|
@@ -52164,7 +52189,7 @@ var iX = class extends zM {
|
|
|
52164
52189
|
return (r = this.getView()) == null || r.playbackState(this.playback.state).globalTime(this.playback.time), super.next();
|
|
52165
52190
|
}
|
|
52166
52191
|
async draw(r) {
|
|
52167
|
-
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();
|
|
52192
|
+
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();
|
|
52168
52193
|
}
|
|
52169
52194
|
reset(r) {
|
|
52170
52195
|
for (const t of this.registeredNodes.keys()) try {
|
|
@@ -52215,7 +52240,7 @@ var iX = class extends zM {
|
|
|
52215
52240
|
for (const r of this.registeredNodes.values()) !r.parent() && r !== this.view && (yield r);
|
|
52216
52241
|
}
|
|
52217
52242
|
getMediaAssets() {
|
|
52218
|
-
const t = this.playback.state ===
|
|
52243
|
+
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);
|
|
52219
52244
|
t && (e.forEach((l) => {
|
|
52220
52245
|
const u = l.src();
|
|
52221
52246
|
u && u !== "undefined" && !l.isPlaying() && l.playing(true);
|
|
@@ -52226,12 +52251,26 @@ var iX = class extends zM {
|
|
|
52226
52251
|
const s = e.filter((l) => l.isPlaying()), a = n.filter((l) => l.isPlaying()), o = [];
|
|
52227
52252
|
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;
|
|
52228
52253
|
}
|
|
52254
|
+
async syncAllMediaToCurrentTime(r) {
|
|
52255
|
+
const t = this.playback.time, n = Array.from(this.registeredNodes.values()).filter((s) => s instanceof c1).map((s) => {
|
|
52256
|
+
try {
|
|
52257
|
+
return s.syncToCurrentTime(t, { waitForSeek: r });
|
|
52258
|
+
} catch (a) {
|
|
52259
|
+
this.logger.warn({ message: `syncAllMediaToCurrentTime: skipped node ${s.key ?? "unknown"}`, object: a });
|
|
52260
|
+
return;
|
|
52261
|
+
}
|
|
52262
|
+
});
|
|
52263
|
+
if (r) {
|
|
52264
|
+
const s = n.filter((a) => a !== void 0);
|
|
52265
|
+
await Promise.all(s);
|
|
52266
|
+
}
|
|
52267
|
+
}
|
|
52229
52268
|
stopAllMedia() {
|
|
52230
|
-
const r = Array.from(this.registeredNodes.values()).filter((t) => t instanceof
|
|
52269
|
+
const r = Array.from(this.registeredNodes.values()).filter((t) => t instanceof c1).filter((t) => t.isPlaying());
|
|
52231
52270
|
for (const t of r) t.dispose();
|
|
52232
52271
|
}
|
|
52233
52272
|
adjustVolume(r) {
|
|
52234
|
-
const t = Array.from(this.registeredNodes.values()).filter((e) => e instanceof
|
|
52273
|
+
const t = Array.from(this.registeredNodes.values()).filter((e) => e instanceof c1);
|
|
52235
52274
|
for (const e of t) e.setVolume(e.getVolume() * r);
|
|
52236
52275
|
}
|
|
52237
52276
|
recreateView() {
|
|
@@ -52244,13 +52283,16 @@ var iX = class extends zM {
|
|
|
52244
52283
|
function rX(r, t) {
|
|
52245
52284
|
return { klass: iX, name: r, config: t, stack: new Error().stack, plugins: ["@twick/2d/editor"] };
|
|
52246
52285
|
}
|
|
52247
|
-
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" },
|
|
52286
|
+
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" };
|
|
52248
52287
|
function k0(r, t) {
|
|
52249
52288
|
console.log(`[Visualizer] ${r}`, t || "");
|
|
52250
52289
|
}
|
|
52251
52290
|
const oX = { name: "audio", *create({ containerRef: r, element: t, view: e }) {
|
|
52291
|
+
var l, u;
|
|
52252
52292
|
const n = Je();
|
|
52253
|
-
yield* Kt(t == null ? void 0 : t.s)
|
|
52293
|
+
yield* Kt(t == null ? void 0 : t.s);
|
|
52294
|
+
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;
|
|
52295
|
+
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();
|
|
52254
52296
|
} };
|
|
52255
52297
|
function lX({ t: r, s: t, e }) {
|
|
52256
52298
|
const n = r.split(" "), s = e - t, a = n.join("").length;
|
|
@@ -52510,49 +52552,49 @@ const CX = { name: "circle", *create({ containerRef: r, element: t, view: e }) {
|
|
|
52510
52552
|
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();
|
|
52511
52553
|
} }, aE = (r, t) => {
|
|
52512
52554
|
switch (t) {
|
|
52513
|
-
case
|
|
52555
|
+
case i2.SATURATED:
|
|
52514
52556
|
r().filters.saturate(1.4), r().filters.contrast(1.1);
|
|
52515
52557
|
break;
|
|
52516
|
-
case
|
|
52558
|
+
case i2.BRIGHT:
|
|
52517
52559
|
r().filters.brightness(1.3), r().filters.contrast(1.05);
|
|
52518
52560
|
break;
|
|
52519
|
-
case
|
|
52561
|
+
case i2.VIBRANT:
|
|
52520
52562
|
r().filters.saturate(1.6), r().filters.brightness(1.15), r().filters.contrast(1.1);
|
|
52521
52563
|
break;
|
|
52522
|
-
case
|
|
52564
|
+
case i2.RETRO:
|
|
52523
52565
|
r().filters.sepia(0.8), r().filters.contrast(1.3), r().filters.brightness(0.85), r().filters.saturate(0.8);
|
|
52524
52566
|
break;
|
|
52525
|
-
case
|
|
52567
|
+
case i2.BLACK_WHITE:
|
|
52526
52568
|
r().filters.grayscale(1), r().filters.contrast(1.25), r().filters.brightness(1.05);
|
|
52527
52569
|
break;
|
|
52528
|
-
case
|
|
52570
|
+
case i2.COOL:
|
|
52529
52571
|
r().filters.hue(15), r().filters.brightness(1.1), r().filters.saturate(1.3), r().filters.contrast(1.05);
|
|
52530
52572
|
break;
|
|
52531
|
-
case
|
|
52573
|
+
case i2.WARM:
|
|
52532
52574
|
r().filters.hue(-15), r().filters.brightness(1.15), r().filters.saturate(1.3), r().filters.contrast(1.05);
|
|
52533
52575
|
break;
|
|
52534
|
-
case
|
|
52576
|
+
case i2.CINEMATIC:
|
|
52535
52577
|
r().filters.contrast(1.4), r().filters.brightness(0.95), r().filters.saturate(0.85), r().filters.sepia(0.2);
|
|
52536
52578
|
break;
|
|
52537
|
-
case
|
|
52579
|
+
case i2.SOFT_GLOW:
|
|
52538
52580
|
r().filters.brightness(1.2), r().filters.contrast(0.95), r().filters.blur(1.2), r().filters.saturate(1.1);
|
|
52539
52581
|
break;
|
|
52540
|
-
case
|
|
52582
|
+
case i2.MOODY:
|
|
52541
52583
|
r().filters.brightness(1.05), r().filters.contrast(1.4), r().filters.saturate(0.65), r().filters.sepia(0.2);
|
|
52542
52584
|
break;
|
|
52543
|
-
case
|
|
52585
|
+
case i2.DREAMY:
|
|
52544
52586
|
r().filters.brightness(1.3), r().filters.blur(2), r().filters.saturate(1.4), r().filters.contrast(0.95);
|
|
52545
52587
|
break;
|
|
52546
|
-
case
|
|
52588
|
+
case i2.INVERTED:
|
|
52547
52589
|
r().filters.invert(1), r().filters.hue(180);
|
|
52548
52590
|
break;
|
|
52549
|
-
case
|
|
52591
|
+
case i2.VINTAGE:
|
|
52550
52592
|
r().filters.sepia(0.4), r().filters.saturate(1.4), r().filters.contrast(1.2), r().filters.brightness(1.1);
|
|
52551
52593
|
break;
|
|
52552
|
-
case
|
|
52594
|
+
case i2.DRAMATIC:
|
|
52553
52595
|
r().filters.contrast(1.5), r().filters.brightness(0.9), r().filters.saturate(1.2);
|
|
52554
52596
|
break;
|
|
52555
|
-
case
|
|
52597
|
+
case i2.FADED:
|
|
52556
52598
|
r().filters.opacity(0.9), r().filters.brightness(1.2), r().filters.saturate(0.8), r().filters.contrast(0.9);
|
|
52557
52599
|
break;
|
|
52558
52600
|
}
|
|
@@ -52565,10 +52607,10 @@ const CX = { name: "circle", *create({ containerRef: r, element: t, view: e }) {
|
|
|
52565
52607
|
const n = Je();
|
|
52566
52608
|
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();
|
|
52567
52609
|
} }, lE = { name: "video", *create({ containerRef: r, element: t, view: e }) {
|
|
52568
|
-
var
|
|
52610
|
+
var u, h, T;
|
|
52569
52611
|
yield* Kt(t == null ? void 0 : t.s);
|
|
52570
|
-
const n = Je(), s = Je();
|
|
52571
|
-
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 }), (
|
|
52612
|
+
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;
|
|
52613
|
+
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());
|
|
52572
52614
|
} }, OX = { name: "scene", *create({ containerRef: r, element: t, view: e }) {
|
|
52573
52615
|
yield* Kt(t == null ? void 0 : t.s);
|
|
52574
52616
|
const n = Je();
|
|
@@ -52798,8 +52840,12 @@ const LivePlayer = ({
|
|
|
52798
52840
|
var _a3;
|
|
52799
52841
|
if (isFirstRender.current && ((_a3 = playerRef.current) == null ? void 0 : _a3.htmlElement)) {
|
|
52800
52842
|
setProjectData(projectData);
|
|
52843
|
+
const el2 = playerRef.current.htmlElement;
|
|
52844
|
+
requestAnimationFrame(() => {
|
|
52845
|
+
el2.dispatchEvent(new CustomEvent("seekto", { detail: seekTime }));
|
|
52846
|
+
});
|
|
52801
52847
|
}
|
|
52802
|
-
}, [projectData, setProjectData]);
|
|
52848
|
+
}, [projectData, setProjectData, seekTime]);
|
|
52803
52849
|
useEffect(() => {
|
|
52804
52850
|
var _a3;
|
|
52805
52851
|
if ((_a3 = playerRef.current) == null ? void 0 : _a3.player) {
|