@designcombo/state 5.4.9 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1006 -984
- package/dist/index.umd.js +2 -2
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -31,9 +31,9 @@ function kn(t) {
|
|
|
31
31
|
function vn(t, r) {
|
|
32
32
|
var e = typeof Symbol == "function" && t[Symbol.iterator];
|
|
33
33
|
if (!e) return t;
|
|
34
|
-
var n = e.call(t), i,
|
|
34
|
+
var n = e.call(t), i, a = [], u;
|
|
35
35
|
try {
|
|
36
|
-
for (; (r === void 0 || r-- > 0) && !(i = n.next()).done; )
|
|
36
|
+
for (; (r === void 0 || r-- > 0) && !(i = n.next()).done; ) a.push(i.value);
|
|
37
37
|
} catch (c) {
|
|
38
38
|
u = { error: c };
|
|
39
39
|
} finally {
|
|
@@ -43,12 +43,12 @@ function vn(t, r) {
|
|
|
43
43
|
if (u) throw u.error;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
return
|
|
46
|
+
return a;
|
|
47
47
|
}
|
|
48
48
|
function _n(t, r, e) {
|
|
49
|
-
if (e || arguments.length === 2) for (var n = 0, i = r.length,
|
|
50
|
-
(
|
|
51
|
-
return t.concat(
|
|
49
|
+
if (e || arguments.length === 2) for (var n = 0, i = r.length, a; n < i; n++)
|
|
50
|
+
(a || !(n in r)) && (a || (a = Array.prototype.slice.call(r, 0, n)), a[n] = r[n]);
|
|
51
|
+
return t.concat(a || Array.prototype.slice.call(r));
|
|
52
52
|
}
|
|
53
53
|
function Dt(t) {
|
|
54
54
|
return typeof t == "function";
|
|
@@ -79,7 +79,7 @@ var Mr = function() {
|
|
|
79
79
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
80
80
|
}
|
|
81
81
|
return t.prototype.unsubscribe = function() {
|
|
82
|
-
var r, e, n, i,
|
|
82
|
+
var r, e, n, i, a;
|
|
83
83
|
if (!this.closed) {
|
|
84
84
|
this.closed = !0;
|
|
85
85
|
var u = this._parentage;
|
|
@@ -90,8 +90,8 @@ var Mr = function() {
|
|
|
90
90
|
var p = d.value;
|
|
91
91
|
p.remove(this);
|
|
92
92
|
}
|
|
93
|
-
} catch (
|
|
94
|
-
r = { error:
|
|
93
|
+
} catch (b) {
|
|
94
|
+
r = { error: b };
|
|
95
95
|
} finally {
|
|
96
96
|
try {
|
|
97
97
|
d && !d.done && (e = c.return) && e.call(c);
|
|
@@ -105,33 +105,33 @@ var Mr = function() {
|
|
|
105
105
|
if (Dt(h))
|
|
106
106
|
try {
|
|
107
107
|
h();
|
|
108
|
-
} catch (
|
|
109
|
-
|
|
108
|
+
} catch (b) {
|
|
109
|
+
a = b instanceof pn ? b.errors : [b];
|
|
110
110
|
}
|
|
111
|
-
var
|
|
112
|
-
if (
|
|
111
|
+
var y = this._finalizers;
|
|
112
|
+
if (y) {
|
|
113
113
|
this._finalizers = null;
|
|
114
114
|
try {
|
|
115
|
-
for (var m = kn(
|
|
116
|
-
var
|
|
115
|
+
for (var m = kn(y), I = m.next(); !I.done; I = m.next()) {
|
|
116
|
+
var k = I.value;
|
|
117
117
|
try {
|
|
118
|
-
Wn(
|
|
119
|
-
} catch (
|
|
120
|
-
|
|
118
|
+
Wn(k);
|
|
119
|
+
} catch (b) {
|
|
120
|
+
a = a ?? [], b instanceof pn ? a = _n(_n([], vn(a)), vn(b.errors)) : a.push(b);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
} catch (
|
|
124
|
-
n = { error:
|
|
123
|
+
} catch (b) {
|
|
124
|
+
n = { error: b };
|
|
125
125
|
} finally {
|
|
126
126
|
try {
|
|
127
|
-
|
|
127
|
+
I && !I.done && (i = m.return) && i.call(m);
|
|
128
128
|
} finally {
|
|
129
129
|
if (n) throw n.error;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
if (
|
|
134
|
-
throw new pn(
|
|
133
|
+
if (a)
|
|
134
|
+
throw new pn(a);
|
|
135
135
|
}
|
|
136
136
|
}, t.prototype.add = function(r) {
|
|
137
137
|
var e;
|
|
@@ -257,12 +257,12 @@ var ls = function(t) {
|
|
|
257
257
|
}(), wn = function(t) {
|
|
258
258
|
rr(r, t);
|
|
259
259
|
function r(e, n, i) {
|
|
260
|
-
var
|
|
260
|
+
var a = t.call(this) || this, u;
|
|
261
261
|
return Dt(e) || !e ? u = {
|
|
262
262
|
next: e ?? void 0,
|
|
263
263
|
error: n ?? void 0,
|
|
264
264
|
complete: i ?? void 0
|
|
265
|
-
} : u = e,
|
|
265
|
+
} : u = e, a.destination = new Gs(u), a;
|
|
266
266
|
}
|
|
267
267
|
return r;
|
|
268
268
|
}(ls);
|
|
@@ -298,11 +298,11 @@ var Bn = function() {
|
|
|
298
298
|
var e = new t();
|
|
299
299
|
return e.source = this, e.operator = r, e;
|
|
300
300
|
}, t.prototype.subscribe = function(r, e, n) {
|
|
301
|
-
var i = this,
|
|
301
|
+
var i = this, a = Qs(r) ? r : new wn(r, e, n);
|
|
302
302
|
return kr(function() {
|
|
303
303
|
var u = i, c = u.operator, d = u.source;
|
|
304
|
-
|
|
305
|
-
}),
|
|
304
|
+
a.add(c ? c.call(a, d) : d ? i._subscribe(a) : i._trySubscribe(a));
|
|
305
|
+
}), a;
|
|
306
306
|
}, t.prototype._trySubscribe = function(r) {
|
|
307
307
|
try {
|
|
308
308
|
return this._subscribe(r);
|
|
@@ -311,16 +311,16 @@ var Bn = function() {
|
|
|
311
311
|
}
|
|
312
312
|
}, t.prototype.forEach = function(r, e) {
|
|
313
313
|
var n = this;
|
|
314
|
-
return e = Yn(e), new e(function(i,
|
|
314
|
+
return e = Yn(e), new e(function(i, a) {
|
|
315
315
|
var u = new wn({
|
|
316
316
|
next: function(c) {
|
|
317
317
|
try {
|
|
318
318
|
r(c);
|
|
319
319
|
} catch (d) {
|
|
320
|
-
|
|
320
|
+
a(d), u.unsubscribe();
|
|
321
321
|
}
|
|
322
322
|
},
|
|
323
|
-
error:
|
|
323
|
+
error: a,
|
|
324
324
|
complete: i
|
|
325
325
|
});
|
|
326
326
|
n.subscribe(u);
|
|
@@ -337,13 +337,13 @@ var Bn = function() {
|
|
|
337
337
|
}, t.prototype.toPromise = function(r) {
|
|
338
338
|
var e = this;
|
|
339
339
|
return r = Yn(r), new r(function(n, i) {
|
|
340
|
-
var
|
|
340
|
+
var a;
|
|
341
341
|
e.subscribe(function(u) {
|
|
342
|
-
return
|
|
342
|
+
return a = u;
|
|
343
343
|
}, function(u) {
|
|
344
344
|
return i(u);
|
|
345
345
|
}, function() {
|
|
346
|
-
return n(
|
|
346
|
+
return n(a);
|
|
347
347
|
});
|
|
348
348
|
});
|
|
349
349
|
}, t.create = function(r) {
|
|
@@ -379,7 +379,7 @@ var ti = os(function(t) {
|
|
|
379
379
|
}, r.prototype.next = function(e) {
|
|
380
380
|
var n = this;
|
|
381
381
|
kr(function() {
|
|
382
|
-
var i,
|
|
382
|
+
var i, a;
|
|
383
383
|
if (n._throwIfClosed(), !n.isStopped) {
|
|
384
384
|
n.currentObservers || (n.currentObservers = Array.from(n.observers));
|
|
385
385
|
try {
|
|
@@ -391,7 +391,7 @@ var ti = os(function(t) {
|
|
|
391
391
|
i = { error: p };
|
|
392
392
|
} finally {
|
|
393
393
|
try {
|
|
394
|
-
c && !c.done && (
|
|
394
|
+
c && !c.done && (a = u.return) && a.call(u);
|
|
395
395
|
} finally {
|
|
396
396
|
if (i) throw i.error;
|
|
397
397
|
}
|
|
@@ -430,13 +430,13 @@ var ti = os(function(t) {
|
|
|
430
430
|
}, r.prototype._subscribe = function(e) {
|
|
431
431
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
|
432
432
|
}, r.prototype._innerSubscribe = function(e) {
|
|
433
|
-
var n = this, i = this,
|
|
434
|
-
return
|
|
433
|
+
var n = this, i = this, a = i.hasError, u = i.isStopped, c = i.observers;
|
|
434
|
+
return a || u ? cs : (this.currentObservers = null, c.push(e), new Mr(function() {
|
|
435
435
|
n.currentObservers = null, Sn(c, e);
|
|
436
436
|
}));
|
|
437
437
|
}, r.prototype._checkFinalizedStatuses = function(e) {
|
|
438
|
-
var n = this, i = n.hasError,
|
|
439
|
-
i ? e.error(
|
|
438
|
+
var n = this, i = n.hasError, a = n.thrownError, u = n.isStopped;
|
|
439
|
+
i ? e.error(a) : u && e.complete();
|
|
440
440
|
}, r.prototype.asObservable = function() {
|
|
441
441
|
var e = new Bn();
|
|
442
442
|
return e.source = this, e;
|
|
@@ -478,10 +478,10 @@ var ti = os(function(t) {
|
|
|
478
478
|
var n = t.prototype._subscribe.call(this, e);
|
|
479
479
|
return !n.closed && e.next(this._value), n;
|
|
480
480
|
}, r.prototype.getValue = function() {
|
|
481
|
-
var e = this, n = e.hasError, i = e.thrownError,
|
|
481
|
+
var e = this, n = e.hasError, i = e.thrownError, a = e._value;
|
|
482
482
|
if (n)
|
|
483
483
|
throw i;
|
|
484
|
-
return this._throwIfClosed(),
|
|
484
|
+
return this._throwIfClosed(), a;
|
|
485
485
|
}, r.prototype.next = function(e) {
|
|
486
486
|
t.prototype.next.call(this, this._value = e);
|
|
487
487
|
}, r;
|
|
@@ -492,136 +492,136 @@ function Cn(t) {
|
|
|
492
492
|
var vr = { exports: {} };
|
|
493
493
|
vr.exports;
|
|
494
494
|
(function(t, r) {
|
|
495
|
-
var e = 200, n = "__lodash_hash_undefined__", i = 1,
|
|
496
|
-
$[
|
|
495
|
+
var e = 200, n = "__lodash_hash_undefined__", i = 1, a = 2, u = 9007199254740991, c = "[object Arguments]", d = "[object Array]", p = "[object AsyncFunction]", h = "[object Boolean]", y = "[object Date]", m = "[object Error]", I = "[object Function]", k = "[object GeneratorFunction]", b = "[object Map]", _ = "[object Number]", f = "[object Null]", v = "[object Object]", w = "[object Promise]", S = "[object Proxy]", E = "[object RegExp]", T = "[object Set]", M = "[object String]", L = "[object Symbol]", R = "[object Undefined]", G = "[object WeakMap]", x = "[object ArrayBuffer]", F = "[object DataView]", et = "[object Float32Array]", Qt = "[object Float64Array]", te = "[object Int8Array]", Se = "[object Int16Array]", we = "[object Int32Array]", Te = "[object Uint8Array]", Me = "[object Uint8ClampedArray]", z = "[object Uint16Array]", Ee = "[object Uint32Array]", Ae = /[\\^$.*+?()[\]{}|]/g, st = /^\[object .+?Constructor\]$/, ee = /^(?:0|[1-9]\d*)$/, $ = {};
|
|
496
|
+
$[et] = $[Qt] = $[te] = $[Se] = $[we] = $[Te] = $[Me] = $[z] = $[Ee] = !0, $[c] = $[d] = $[x] = $[h] = $[F] = $[y] = $[m] = $[I] = $[b] = $[_] = $[v] = $[E] = $[T] = $[M] = $[G] = !1;
|
|
497
497
|
var re = typeof ft == "object" && ft && ft.Object === Object && ft, xe = typeof self == "object" && self && self.Object === Object && self, it = re || xe || Function("return this")(), ne = r && !r.nodeType && r, se = ne && !0 && t && !t.nodeType && t, zt = se && se.exports === ne, $t = zt && re.process, ie = function() {
|
|
498
498
|
try {
|
|
499
499
|
return $t && $t.binding && $t.binding("util");
|
|
500
500
|
} catch {
|
|
501
501
|
}
|
|
502
502
|
}(), Ft = ie && ie.isTypedArray;
|
|
503
|
-
function ae(s,
|
|
504
|
-
for (var l = -1,
|
|
503
|
+
function ae(s, o) {
|
|
504
|
+
for (var l = -1, g = s == null ? 0 : s.length, O = 0, A = []; ++l < g; ) {
|
|
505
505
|
var D = s[l];
|
|
506
|
-
|
|
506
|
+
o(D, l, s) && (A[O++] = D);
|
|
507
507
|
}
|
|
508
508
|
return A;
|
|
509
509
|
}
|
|
510
|
-
function Nt(s,
|
|
511
|
-
for (var l = -1,
|
|
512
|
-
s[O + l] =
|
|
510
|
+
function Nt(s, o) {
|
|
511
|
+
for (var l = -1, g = o.length, O = s.length; ++l < g; )
|
|
512
|
+
s[O + l] = o[l];
|
|
513
513
|
return s;
|
|
514
514
|
}
|
|
515
|
-
function oe(s,
|
|
516
|
-
for (var l = -1,
|
|
517
|
-
if (
|
|
515
|
+
function oe(s, o) {
|
|
516
|
+
for (var l = -1, g = s == null ? 0 : s.length; ++l < g; )
|
|
517
|
+
if (o(s[l], l, s))
|
|
518
518
|
return !0;
|
|
519
519
|
return !1;
|
|
520
520
|
}
|
|
521
|
-
function Oe(s,
|
|
522
|
-
for (var l = -1,
|
|
523
|
-
|
|
524
|
-
return
|
|
521
|
+
function Oe(s, o) {
|
|
522
|
+
for (var l = -1, g = Array(s); ++l < s; )
|
|
523
|
+
g[l] = o(l);
|
|
524
|
+
return g;
|
|
525
525
|
}
|
|
526
526
|
function Ce(s) {
|
|
527
|
-
return function(
|
|
528
|
-
return s(
|
|
527
|
+
return function(o) {
|
|
528
|
+
return s(o);
|
|
529
529
|
};
|
|
530
530
|
}
|
|
531
|
-
function wt(s,
|
|
532
|
-
return s.has(
|
|
531
|
+
function wt(s, o) {
|
|
532
|
+
return s.has(o);
|
|
533
533
|
}
|
|
534
|
-
function Lt(s,
|
|
535
|
-
return s == null ? void 0 : s[
|
|
534
|
+
function Lt(s, o) {
|
|
535
|
+
return s == null ? void 0 : s[o];
|
|
536
536
|
}
|
|
537
537
|
function ce(s) {
|
|
538
|
-
var
|
|
539
|
-
return s.forEach(function(
|
|
540
|
-
l[++
|
|
538
|
+
var o = -1, l = Array(s.size);
|
|
539
|
+
return s.forEach(function(g, O) {
|
|
540
|
+
l[++o] = [O, g];
|
|
541
541
|
}), l;
|
|
542
542
|
}
|
|
543
|
-
function ue(s,
|
|
543
|
+
function ue(s, o) {
|
|
544
544
|
return function(l) {
|
|
545
|
-
return s(
|
|
545
|
+
return s(o(l));
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
548
|
function ut(s) {
|
|
549
|
-
var
|
|
550
|
-
return s.forEach(function(
|
|
551
|
-
l[++
|
|
549
|
+
var o = -1, l = Array(s.size);
|
|
550
|
+
return s.forEach(function(g) {
|
|
551
|
+
l[++o] = g;
|
|
552
552
|
}), l;
|
|
553
553
|
}
|
|
554
|
-
var Tt = Array.prototype, Re = Function.prototype,
|
|
554
|
+
var Tt = Array.prototype, Re = Function.prototype, yt = Object.prototype, Mt = it["__core-js_shared__"], Ht = Re.toString, rt = yt.hasOwnProperty, le = function() {
|
|
555
555
|
var s = /[^.]+$/.exec(Mt && Mt.keys && Mt.keys.IE_PROTO || "");
|
|
556
556
|
return s ? "Symbol(src)_1." + s : "";
|
|
557
|
-
}(), de =
|
|
558
|
-
"^" + Ht.call(
|
|
559
|
-
), Ut = zt ? it.Buffer : void 0, Et = it.Symbol, fe = it.Uint8Array, At =
|
|
557
|
+
}(), de = yt.toString, Pe = RegExp(
|
|
558
|
+
"^" + Ht.call(rt).replace(Ae, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
559
|
+
), Ut = zt ? it.Buffer : void 0, Et = it.Symbol, fe = it.Uint8Array, At = yt.propertyIsEnumerable, gt = Tt.splice, at = Et ? Et.toStringTag : void 0, xt = Object.getOwnPropertySymbols, Wt = Ut ? Ut.isBuffer : void 0, It = ue(Object.keys, Object), jt = Ct(it, "DataView"), bt = Ct(it, "Map"), Bt = Ct(it, "Promise"), Yt = Ct(it, "Set"), We = Ct(it, "WeakMap"), Gt = Ct(Object, "create"), ar = nt(jt), Ot = nt(bt), xr = nt(Bt), Or = nt(Yt), Cr = nt(We), or = Et ? Et.prototype : void 0, je = or ? or.valueOf : void 0;
|
|
560
560
|
function X(s) {
|
|
561
|
-
var
|
|
562
|
-
for (this.clear(); ++
|
|
563
|
-
var
|
|
564
|
-
this.set(
|
|
561
|
+
var o = -1, l = s == null ? 0 : s.length;
|
|
562
|
+
for (this.clear(); ++o < l; ) {
|
|
563
|
+
var g = s[o];
|
|
564
|
+
this.set(g[0], g[1]);
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
function Rr() {
|
|
568
568
|
this.__data__ = Gt ? Gt(null) : {}, this.size = 0;
|
|
569
569
|
}
|
|
570
570
|
function Pr(s) {
|
|
571
|
-
var
|
|
572
|
-
return this.size -=
|
|
571
|
+
var o = this.has(s) && delete this.__data__[s];
|
|
572
|
+
return this.size -= o ? 1 : 0, o;
|
|
573
573
|
}
|
|
574
574
|
function Dr(s) {
|
|
575
|
-
var
|
|
575
|
+
var o = this.__data__;
|
|
576
576
|
if (Gt) {
|
|
577
|
-
var l =
|
|
577
|
+
var l = o[s];
|
|
578
578
|
return l === n ? void 0 : l;
|
|
579
579
|
}
|
|
580
|
-
return
|
|
580
|
+
return rt.call(o, s) ? o[s] : void 0;
|
|
581
581
|
}
|
|
582
582
|
function zr(s) {
|
|
583
|
-
var
|
|
584
|
-
return Gt ?
|
|
583
|
+
var o = this.__data__;
|
|
584
|
+
return Gt ? o[s] !== void 0 : rt.call(o, s);
|
|
585
585
|
}
|
|
586
|
-
function $r(s,
|
|
586
|
+
function $r(s, o) {
|
|
587
587
|
var l = this.__data__;
|
|
588
|
-
return this.size += this.has(s) ? 0 : 1, l[s] = Gt &&
|
|
588
|
+
return this.size += this.has(s) ? 0 : 1, l[s] = Gt && o === void 0 ? n : o, this;
|
|
589
589
|
}
|
|
590
590
|
X.prototype.clear = Rr, X.prototype.delete = Pr, X.prototype.get = Dr, X.prototype.has = zr, X.prototype.set = $r;
|
|
591
591
|
function q(s) {
|
|
592
|
-
var
|
|
593
|
-
for (this.clear(); ++
|
|
594
|
-
var
|
|
595
|
-
this.set(
|
|
592
|
+
var o = -1, l = s == null ? 0 : s.length;
|
|
593
|
+
for (this.clear(); ++o < l; ) {
|
|
594
|
+
var g = s[o];
|
|
595
|
+
this.set(g[0], g[1]);
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
function Fr() {
|
|
599
599
|
this.__data__ = [], this.size = 0;
|
|
600
600
|
}
|
|
601
601
|
function Nr(s) {
|
|
602
|
-
var
|
|
602
|
+
var o = this.__data__, l = $e(o, s);
|
|
603
603
|
if (l < 0)
|
|
604
604
|
return !1;
|
|
605
|
-
var
|
|
606
|
-
return l ==
|
|
605
|
+
var g = o.length - 1;
|
|
606
|
+
return l == g ? o.pop() : gt.call(o, l, 1), --this.size, !0;
|
|
607
607
|
}
|
|
608
608
|
function Lr(s) {
|
|
609
|
-
var
|
|
610
|
-
return l < 0 ? void 0 :
|
|
609
|
+
var o = this.__data__, l = $e(o, s);
|
|
610
|
+
return l < 0 ? void 0 : o[l][1];
|
|
611
611
|
}
|
|
612
612
|
function Hr(s) {
|
|
613
613
|
return $e(this.__data__, s) > -1;
|
|
614
614
|
}
|
|
615
|
-
function Ur(s,
|
|
616
|
-
var l = this.__data__,
|
|
617
|
-
return
|
|
615
|
+
function Ur(s, o) {
|
|
616
|
+
var l = this.__data__, g = $e(l, s);
|
|
617
|
+
return g < 0 ? (++this.size, l.push([s, o])) : l[g][1] = o, this;
|
|
618
618
|
}
|
|
619
619
|
q.prototype.clear = Fr, q.prototype.delete = Nr, q.prototype.get = Lr, q.prototype.has = Hr, q.prototype.set = Ur;
|
|
620
620
|
function ot(s) {
|
|
621
|
-
var
|
|
622
|
-
for (this.clear(); ++
|
|
623
|
-
var
|
|
624
|
-
this.set(
|
|
621
|
+
var o = -1, l = s == null ? 0 : s.length;
|
|
622
|
+
for (this.clear(); ++o < l; ) {
|
|
623
|
+
var g = s[o];
|
|
624
|
+
this.set(g[0], g[1]);
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
627
|
function Wr() {
|
|
@@ -632,8 +632,8 @@ vr.exports;
|
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
634
|
function jr(s) {
|
|
635
|
-
var
|
|
636
|
-
return this.size -=
|
|
635
|
+
var o = mt(this, s).delete(s);
|
|
636
|
+
return this.size -= o ? 1 : 0, o;
|
|
637
637
|
}
|
|
638
638
|
function Br(s) {
|
|
639
639
|
return mt(this, s).get(s);
|
|
@@ -641,15 +641,15 @@ vr.exports;
|
|
|
641
641
|
function Yr(s) {
|
|
642
642
|
return mt(this, s).has(s);
|
|
643
643
|
}
|
|
644
|
-
function Gr(s,
|
|
645
|
-
var l = mt(this, s),
|
|
646
|
-
return l.set(s,
|
|
644
|
+
function Gr(s, o) {
|
|
645
|
+
var l = mt(this, s), g = l.size;
|
|
646
|
+
return l.set(s, o), this.size += l.size == g ? 0 : 1, this;
|
|
647
647
|
}
|
|
648
648
|
ot.prototype.clear = Wr, ot.prototype.delete = jr, ot.prototype.get = Br, ot.prototype.has = Yr, ot.prototype.set = Gr;
|
|
649
649
|
function De(s) {
|
|
650
|
-
var
|
|
651
|
-
for (this.__data__ = new ot(); ++
|
|
652
|
-
this.add(s[
|
|
650
|
+
var o = -1, l = s == null ? 0 : s.length;
|
|
651
|
+
for (this.__data__ = new ot(); ++o < l; )
|
|
652
|
+
this.add(s[o]);
|
|
653
653
|
}
|
|
654
654
|
function cr(s) {
|
|
655
655
|
return this.__data__.set(s, n), this;
|
|
@@ -659,15 +659,15 @@ vr.exports;
|
|
|
659
659
|
}
|
|
660
660
|
De.prototype.add = De.prototype.push = cr, De.prototype.has = ze;
|
|
661
661
|
function kt(s) {
|
|
662
|
-
var
|
|
663
|
-
this.size =
|
|
662
|
+
var o = this.__data__ = new q(s);
|
|
663
|
+
this.size = o.size;
|
|
664
664
|
}
|
|
665
665
|
function Be() {
|
|
666
666
|
this.__data__ = new q(), this.size = 0;
|
|
667
667
|
}
|
|
668
668
|
function Xr(s) {
|
|
669
|
-
var
|
|
670
|
-
return this.size =
|
|
669
|
+
var o = this.__data__, l = o.delete(s);
|
|
670
|
+
return this.size = o.size, l;
|
|
671
671
|
}
|
|
672
672
|
function Kr(s) {
|
|
673
673
|
return this.__data__.get(s);
|
|
@@ -675,36 +675,36 @@ vr.exports;
|
|
|
675
675
|
function Vr(s) {
|
|
676
676
|
return this.__data__.has(s);
|
|
677
677
|
}
|
|
678
|
-
function qr(s,
|
|
678
|
+
function qr(s, o) {
|
|
679
679
|
var l = this.__data__;
|
|
680
680
|
if (l instanceof q) {
|
|
681
|
-
var
|
|
682
|
-
if (!bt ||
|
|
683
|
-
return
|
|
684
|
-
l = this.__data__ = new ot(
|
|
681
|
+
var g = l.__data__;
|
|
682
|
+
if (!bt || g.length < e - 1)
|
|
683
|
+
return g.push([s, o]), this.size = ++l.size, this;
|
|
684
|
+
l = this.__data__ = new ot(g);
|
|
685
685
|
}
|
|
686
|
-
return l.set(s,
|
|
686
|
+
return l.set(s, o), this.size = l.size, this;
|
|
687
687
|
}
|
|
688
688
|
kt.prototype.clear = Be, kt.prototype.delete = Xr, kt.prototype.get = Kr, kt.prototype.has = Vr, kt.prototype.set = qr;
|
|
689
|
-
function Jr(s,
|
|
690
|
-
var l = Fe(s),
|
|
689
|
+
function Jr(s, o) {
|
|
690
|
+
var l = Fe(s), g = !l && pr(s), O = !l && !g && Ne(s), A = !l && !g && !O && yr(s), D = l || g || O || A, P = D ? Oe(s.length, String) : [], U = P.length;
|
|
691
691
|
for (var N in s)
|
|
692
|
-
|
|
692
|
+
rt.call(s, N) && !(D && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
693
693
|
(N == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
694
694
|
O && (N == "offset" || N == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
695
695
|
A && (N == "buffer" || N == "byteLength" || N == "byteOffset") || // Skip index properties.
|
|
696
696
|
an(N, U))) && P.push(N);
|
|
697
697
|
return P;
|
|
698
698
|
}
|
|
699
|
-
function $e(s,
|
|
699
|
+
function $e(s, o) {
|
|
700
700
|
for (var l = s.length; l--; )
|
|
701
|
-
if (fr(s[l][0],
|
|
701
|
+
if (fr(s[l][0], o))
|
|
702
702
|
return l;
|
|
703
703
|
return -1;
|
|
704
704
|
}
|
|
705
|
-
function Ye(s,
|
|
706
|
-
var
|
|
707
|
-
return Fe(s) ?
|
|
705
|
+
function Ye(s, o, l) {
|
|
706
|
+
var g = o(s);
|
|
707
|
+
return Fe(s) ? g : Nt(g, l(s));
|
|
708
708
|
}
|
|
709
709
|
function pe(s) {
|
|
710
710
|
return s == null ? s === void 0 ? R : f : at && at in Object(s) ? Rt(s) : dr(s);
|
|
@@ -712,34 +712,34 @@ vr.exports;
|
|
|
712
712
|
function ur(s) {
|
|
713
713
|
return _t(s) && pe(s) == c;
|
|
714
714
|
}
|
|
715
|
-
function lr(s,
|
|
716
|
-
return s ===
|
|
715
|
+
function lr(s, o, l, g, O) {
|
|
716
|
+
return s === o ? !0 : s == null || o == null || !_t(s) && !_t(o) ? s !== s && o !== o : Zr(s, o, l, g, lr, O);
|
|
717
717
|
}
|
|
718
|
-
function Zr(s,
|
|
719
|
-
var D = Fe(s), P = Fe(
|
|
720
|
-
U = U == c ?
|
|
721
|
-
var J = U ==
|
|
718
|
+
function Zr(s, o, l, g, O, A) {
|
|
719
|
+
var D = Fe(s), P = Fe(o), U = D ? d : vt(s), N = P ? d : vt(o);
|
|
720
|
+
U = U == c ? v : U, N = N == c ? v : N;
|
|
721
|
+
var J = U == v, ct = N == v, W = U == N;
|
|
722
722
|
if (W && Ne(s)) {
|
|
723
|
-
if (!Ne(
|
|
723
|
+
if (!Ne(o))
|
|
724
724
|
return !1;
|
|
725
725
|
D = !0, J = !1;
|
|
726
726
|
}
|
|
727
727
|
if (W && !J)
|
|
728
|
-
return A || (A = new kt()), D ||
|
|
728
|
+
return A || (A = new kt()), D || yr(s) ? Ge(s, o, l, g, O, A) : rn(s, o, U, l, g, O, A);
|
|
729
729
|
if (!(l & i)) {
|
|
730
|
-
var Z = J &&
|
|
730
|
+
var Z = J && rt.call(s, "__wrapped__"), K = ct && rt.call(o, "__wrapped__");
|
|
731
731
|
if (Z || K) {
|
|
732
|
-
var Xt = Z ? s.value() : s, Pt = K ?
|
|
733
|
-
return A || (A = new kt()), O(Xt, Pt, l,
|
|
732
|
+
var Xt = Z ? s.value() : s, Pt = K ? o.value() : o;
|
|
733
|
+
return A || (A = new kt()), O(Xt, Pt, l, g, A);
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
|
-
return W ? (A || (A = new kt()), nn(s,
|
|
736
|
+
return W ? (A || (A = new kt()), nn(s, o, l, g, O, A)) : !1;
|
|
737
737
|
}
|
|
738
738
|
function Qr(s) {
|
|
739
739
|
if (!mr(s) || cn(s))
|
|
740
740
|
return !1;
|
|
741
|
-
var
|
|
742
|
-
return
|
|
741
|
+
var o = hr(s) ? Pe : st;
|
|
742
|
+
return o.test(nt(s));
|
|
743
743
|
}
|
|
744
744
|
function tn(s) {
|
|
745
745
|
return _t(s) && Ke(s.length) && !!$[pe(s)];
|
|
@@ -747,23 +747,23 @@ vr.exports;
|
|
|
747
747
|
function en(s) {
|
|
748
748
|
if (!un(s))
|
|
749
749
|
return It(s);
|
|
750
|
-
var
|
|
750
|
+
var o = [];
|
|
751
751
|
for (var l in Object(s))
|
|
752
|
-
|
|
753
|
-
return
|
|
752
|
+
rt.call(s, l) && l != "constructor" && o.push(l);
|
|
753
|
+
return o;
|
|
754
754
|
}
|
|
755
|
-
function Ge(s,
|
|
756
|
-
var D = l & i, P = s.length, U =
|
|
755
|
+
function Ge(s, o, l, g, O, A) {
|
|
756
|
+
var D = l & i, P = s.length, U = o.length;
|
|
757
757
|
if (P != U && !(D && U > P))
|
|
758
758
|
return !1;
|
|
759
759
|
var N = A.get(s);
|
|
760
|
-
if (N && A.get(
|
|
761
|
-
return N ==
|
|
762
|
-
var J = -1, ct = !0, W = l &
|
|
763
|
-
for (A.set(s,
|
|
764
|
-
var Z = s[J], K =
|
|
765
|
-
if (
|
|
766
|
-
var Xt = D ?
|
|
760
|
+
if (N && A.get(o))
|
|
761
|
+
return N == o;
|
|
762
|
+
var J = -1, ct = !0, W = l & a ? new De() : void 0;
|
|
763
|
+
for (A.set(s, o), A.set(o, s); ++J < P; ) {
|
|
764
|
+
var Z = s[J], K = o[J];
|
|
765
|
+
if (g)
|
|
766
|
+
var Xt = D ? g(K, Z, J, o, s, A) : g(Z, K, J, s, o, A);
|
|
767
767
|
if (Xt !== void 0) {
|
|
768
768
|
if (Xt)
|
|
769
769
|
continue;
|
|
@@ -771,147 +771,147 @@ vr.exports;
|
|
|
771
771
|
break;
|
|
772
772
|
}
|
|
773
773
|
if (W) {
|
|
774
|
-
if (!oe(
|
|
775
|
-
if (!wt(W, me) && (Z === Pt || O(Z, Pt, l,
|
|
774
|
+
if (!oe(o, function(Pt, me) {
|
|
775
|
+
if (!wt(W, me) && (Z === Pt || O(Z, Pt, l, g, A)))
|
|
776
776
|
return W.push(me);
|
|
777
777
|
})) {
|
|
778
778
|
ct = !1;
|
|
779
779
|
break;
|
|
780
780
|
}
|
|
781
|
-
} else if (!(Z === K || O(Z, K, l,
|
|
781
|
+
} else if (!(Z === K || O(Z, K, l, g, A))) {
|
|
782
782
|
ct = !1;
|
|
783
783
|
break;
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
return A.delete(s), A.delete(
|
|
786
|
+
return A.delete(s), A.delete(o), ct;
|
|
787
787
|
}
|
|
788
|
-
function rn(s,
|
|
788
|
+
function rn(s, o, l, g, O, A, D) {
|
|
789
789
|
switch (l) {
|
|
790
790
|
case F:
|
|
791
|
-
if (s.byteLength !=
|
|
791
|
+
if (s.byteLength != o.byteLength || s.byteOffset != o.byteOffset)
|
|
792
792
|
return !1;
|
|
793
|
-
s = s.buffer,
|
|
793
|
+
s = s.buffer, o = o.buffer;
|
|
794
794
|
case x:
|
|
795
|
-
return !(s.byteLength !=
|
|
795
|
+
return !(s.byteLength != o.byteLength || !A(new fe(s), new fe(o)));
|
|
796
796
|
case h:
|
|
797
|
-
case
|
|
797
|
+
case y:
|
|
798
798
|
case _:
|
|
799
|
-
return fr(+s, +
|
|
799
|
+
return fr(+s, +o);
|
|
800
800
|
case m:
|
|
801
|
-
return s.name ==
|
|
801
|
+
return s.name == o.name && s.message == o.message;
|
|
802
802
|
case E:
|
|
803
803
|
case M:
|
|
804
|
-
return s ==
|
|
805
|
-
case
|
|
804
|
+
return s == o + "";
|
|
805
|
+
case b:
|
|
806
806
|
var P = ce;
|
|
807
807
|
case T:
|
|
808
|
-
var U =
|
|
809
|
-
if (P || (P = ut), s.size !=
|
|
808
|
+
var U = g & i;
|
|
809
|
+
if (P || (P = ut), s.size != o.size && !U)
|
|
810
810
|
return !1;
|
|
811
811
|
var N = D.get(s);
|
|
812
812
|
if (N)
|
|
813
|
-
return N ==
|
|
814
|
-
|
|
815
|
-
var J = Ge(P(s), P(
|
|
813
|
+
return N == o;
|
|
814
|
+
g |= a, D.set(s, o);
|
|
815
|
+
var J = Ge(P(s), P(o), g, O, A, D);
|
|
816
816
|
return D.delete(s), J;
|
|
817
817
|
case L:
|
|
818
818
|
if (je)
|
|
819
|
-
return je.call(s) == je.call(
|
|
819
|
+
return je.call(s) == je.call(o);
|
|
820
820
|
}
|
|
821
821
|
return !1;
|
|
822
822
|
}
|
|
823
|
-
function nn(s,
|
|
824
|
-
var D = l & i, P = he(s), U = P.length, N = he(
|
|
823
|
+
function nn(s, o, l, g, O, A) {
|
|
824
|
+
var D = l & i, P = he(s), U = P.length, N = he(o), J = N.length;
|
|
825
825
|
if (U != J && !D)
|
|
826
826
|
return !1;
|
|
827
827
|
for (var ct = U; ct--; ) {
|
|
828
828
|
var W = P[ct];
|
|
829
|
-
if (!(D ? W in
|
|
829
|
+
if (!(D ? W in o : rt.call(o, W)))
|
|
830
830
|
return !1;
|
|
831
831
|
}
|
|
832
832
|
var Z = A.get(s);
|
|
833
|
-
if (Z && A.get(
|
|
834
|
-
return Z ==
|
|
833
|
+
if (Z && A.get(o))
|
|
834
|
+
return Z == o;
|
|
835
835
|
var K = !0;
|
|
836
|
-
A.set(s,
|
|
836
|
+
A.set(s, o), A.set(o, s);
|
|
837
837
|
for (var Xt = D; ++ct < U; ) {
|
|
838
838
|
W = P[ct];
|
|
839
|
-
var Pt = s[W], me =
|
|
840
|
-
if (
|
|
841
|
-
var Un = D ?
|
|
842
|
-
if (!(Un === void 0 ? Pt === me || O(Pt, me, l,
|
|
839
|
+
var Pt = s[W], me = o[W];
|
|
840
|
+
if (g)
|
|
841
|
+
var Un = D ? g(me, Pt, W, o, s, A) : g(Pt, me, W, s, o, A);
|
|
842
|
+
if (!(Un === void 0 ? Pt === me || O(Pt, me, l, g, A) : Un)) {
|
|
843
843
|
K = !1;
|
|
844
844
|
break;
|
|
845
845
|
}
|
|
846
846
|
Xt || (Xt = W == "constructor");
|
|
847
847
|
}
|
|
848
848
|
if (K && !Xt) {
|
|
849
|
-
var
|
|
850
|
-
|
|
849
|
+
var gr = s.constructor, Ir = o.constructor;
|
|
850
|
+
gr != Ir && "constructor" in s && "constructor" in o && !(typeof gr == "function" && gr instanceof gr && typeof Ir == "function" && Ir instanceof Ir) && (K = !1);
|
|
851
851
|
}
|
|
852
|
-
return A.delete(s), A.delete(
|
|
852
|
+
return A.delete(s), A.delete(o), K;
|
|
853
853
|
}
|
|
854
854
|
function he(s) {
|
|
855
855
|
return Ye(s, Ve, sn);
|
|
856
856
|
}
|
|
857
|
-
function mt(s,
|
|
857
|
+
function mt(s, o) {
|
|
858
858
|
var l = s.__data__;
|
|
859
|
-
return on(
|
|
859
|
+
return on(o) ? l[typeof o == "string" ? "string" : "hash"] : l.map;
|
|
860
860
|
}
|
|
861
|
-
function Ct(s,
|
|
862
|
-
var l = Lt(s,
|
|
861
|
+
function Ct(s, o) {
|
|
862
|
+
var l = Lt(s, o);
|
|
863
863
|
return Qr(l) ? l : void 0;
|
|
864
864
|
}
|
|
865
865
|
function Rt(s) {
|
|
866
|
-
var
|
|
866
|
+
var o = rt.call(s, at), l = s[at];
|
|
867
867
|
try {
|
|
868
868
|
s[at] = void 0;
|
|
869
|
-
var
|
|
869
|
+
var g = !0;
|
|
870
870
|
} catch {
|
|
871
871
|
}
|
|
872
872
|
var O = de.call(s);
|
|
873
|
-
return
|
|
873
|
+
return g && (o ? s[at] = l : delete s[at]), O;
|
|
874
874
|
}
|
|
875
875
|
var sn = xt ? function(s) {
|
|
876
|
-
return s == null ? [] : (s = Object(s), ae(xt(s), function(
|
|
877
|
-
return At.call(s,
|
|
876
|
+
return s == null ? [] : (s = Object(s), ae(xt(s), function(o) {
|
|
877
|
+
return At.call(s, o);
|
|
878
878
|
}));
|
|
879
879
|
} : dn, vt = pe;
|
|
880
|
-
(jt && vt(new jt(new ArrayBuffer(1))) != F || bt && vt(new bt()) !=
|
|
881
|
-
var
|
|
882
|
-
if (
|
|
883
|
-
switch (
|
|
880
|
+
(jt && vt(new jt(new ArrayBuffer(1))) != F || bt && vt(new bt()) != b || Bt && vt(Bt.resolve()) != w || Yt && vt(new Yt()) != T || We && vt(new We()) != G) && (vt = function(s) {
|
|
881
|
+
var o = pe(s), l = o == v ? s.constructor : void 0, g = l ? nt(l) : "";
|
|
882
|
+
if (g)
|
|
883
|
+
switch (g) {
|
|
884
884
|
case ar:
|
|
885
885
|
return F;
|
|
886
886
|
case Ot:
|
|
887
|
-
return
|
|
887
|
+
return b;
|
|
888
888
|
case xr:
|
|
889
889
|
return w;
|
|
890
890
|
case Or:
|
|
891
891
|
return T;
|
|
892
892
|
case Cr:
|
|
893
|
-
return
|
|
893
|
+
return G;
|
|
894
894
|
}
|
|
895
|
-
return
|
|
895
|
+
return o;
|
|
896
896
|
});
|
|
897
|
-
function an(s,
|
|
898
|
-
return
|
|
897
|
+
function an(s, o) {
|
|
898
|
+
return o = o ?? u, !!o && (typeof s == "number" || ee.test(s)) && s > -1 && s % 1 == 0 && s < o;
|
|
899
899
|
}
|
|
900
900
|
function on(s) {
|
|
901
|
-
var
|
|
902
|
-
return
|
|
901
|
+
var o = typeof s;
|
|
902
|
+
return o == "string" || o == "number" || o == "symbol" || o == "boolean" ? s !== "__proto__" : s === null;
|
|
903
903
|
}
|
|
904
904
|
function cn(s) {
|
|
905
905
|
return !!le && le in s;
|
|
906
906
|
}
|
|
907
907
|
function un(s) {
|
|
908
|
-
var
|
|
908
|
+
var o = s && s.constructor, l = typeof o == "function" && o.prototype || yt;
|
|
909
909
|
return s === l;
|
|
910
910
|
}
|
|
911
911
|
function dr(s) {
|
|
912
912
|
return de.call(s);
|
|
913
913
|
}
|
|
914
|
-
function
|
|
914
|
+
function nt(s) {
|
|
915
915
|
if (s != null) {
|
|
916
916
|
try {
|
|
917
917
|
return Ht.call(s);
|
|
@@ -924,38 +924,38 @@ vr.exports;
|
|
|
924
924
|
}
|
|
925
925
|
return "";
|
|
926
926
|
}
|
|
927
|
-
function fr(s,
|
|
928
|
-
return s ===
|
|
927
|
+
function fr(s, o) {
|
|
928
|
+
return s === o || s !== s && o !== o;
|
|
929
929
|
}
|
|
930
930
|
var pr = ur(/* @__PURE__ */ function() {
|
|
931
931
|
return arguments;
|
|
932
932
|
}()) ? ur : function(s) {
|
|
933
|
-
return _t(s) &&
|
|
933
|
+
return _t(s) && rt.call(s, "callee") && !At.call(s, "callee");
|
|
934
934
|
}, Fe = Array.isArray;
|
|
935
935
|
function Xe(s) {
|
|
936
936
|
return s != null && Ke(s.length) && !hr(s);
|
|
937
937
|
}
|
|
938
938
|
var Ne = Wt || fn;
|
|
939
|
-
function ln(s,
|
|
940
|
-
return lr(s,
|
|
939
|
+
function ln(s, o) {
|
|
940
|
+
return lr(s, o);
|
|
941
941
|
}
|
|
942
942
|
function hr(s) {
|
|
943
943
|
if (!mr(s))
|
|
944
944
|
return !1;
|
|
945
|
-
var
|
|
946
|
-
return
|
|
945
|
+
var o = pe(s);
|
|
946
|
+
return o == I || o == k || o == p || o == S;
|
|
947
947
|
}
|
|
948
948
|
function Ke(s) {
|
|
949
949
|
return typeof s == "number" && s > -1 && s % 1 == 0 && s <= u;
|
|
950
950
|
}
|
|
951
951
|
function mr(s) {
|
|
952
|
-
var
|
|
953
|
-
return s != null && (
|
|
952
|
+
var o = typeof s;
|
|
953
|
+
return s != null && (o == "object" || o == "function");
|
|
954
954
|
}
|
|
955
955
|
function _t(s) {
|
|
956
956
|
return s != null && typeof s == "object";
|
|
957
957
|
}
|
|
958
|
-
var
|
|
958
|
+
var yr = Ft ? Ce(Ft) : tn;
|
|
959
959
|
function Ve(s) {
|
|
960
960
|
return Xe(s) ? Jr(s) : en(s);
|
|
961
961
|
}
|
|
@@ -968,66 +968,66 @@ vr.exports;
|
|
|
968
968
|
t.exports = ln;
|
|
969
969
|
})(vr, vr.exports);
|
|
970
970
|
var ei = vr.exports;
|
|
971
|
-
const j = /* @__PURE__ */ Cn(ei), vo = "add", ri = "track", ni = "trackItems", _o = `${ri}:changed`, So = `${ni}:changed`, si = "state", wo = `${si}:changed`, ii = "bulk", Kn = `${ii}:edit`, Rn = "design", ai = `${Rn}:load`, oi = `${Rn}:resize`, H = "add", ci = `${H}:text`, ui = `${H}:video`, li = `${H}:audio`, To = `${H}:placeholder`, di = `${H}:image`, fi = `${H}:illustration`, pi = `${H}:shape`, Mo = `${H}:mask`, Eo = `${H}:transition`, hi = `${H}:animation`, mi = `${H}:caption`,
|
|
971
|
+
const j = /* @__PURE__ */ Cn(ei), vo = "add", ri = "track", ni = "trackItems", _o = `${ri}:changed`, So = `${ni}:changed`, si = "state", wo = `${si}:changed`, ii = "bulk", Kn = `${ii}:edit`, Rn = "design", ai = `${Rn}:load`, oi = `${Rn}:resize`, H = "add", ci = `${H}:text`, ui = `${H}:video`, li = `${H}:audio`, To = `${H}:placeholder`, di = `${H}:image`, fi = `${H}:illustration`, pi = `${H}:shape`, Mo = `${H}:mask`, Eo = `${H}:transition`, hi = `${H}:animation`, mi = `${H}:caption`, yi = `${H}:template`, gi = `${H}:items`, Ii = `${H}:composition`, bi = `${H}:progressBar`, ki = `${H}:progressFrame`, vi = `${H}:radialAudioBars`, _i = `${H}:linealAudioBars`, Si = `${H}:progressSquare`, wi = `${H}:waveAudioBars`, Ti = `${H}:hillAudioBars`, Mi = `${H}:rect`, Zt = "edit", Ei = `${Zt}:object`, Ai = `${Zt}:replaceMedia`, Ao = `${Zt}:text`, xo = `${Zt}:shape`, Oo = `${Zt}:templateItem`, Co = `${Zt}:deleteTemplateItem`, xi = `${Zt}:backgroundEditor`, Ro = "enterEditMode", Le = "active", Po = `${Le}:set`, Do = `${Le}:delete`, Oi = `${Le}:paste`, zo = `${Le}:clone`, Ci = `${Le}:split`, tt = "layer", $o = `${tt}:locked`, Fo = `${tt}:hidden`, No = `${tt}:move`, Ri = `${tt}:select`, Lo = `${tt}:selection`, Ho = `${tt}:sendTo`, Uo = `${tt}:rename`, Wo = `${tt}:editingName`, Pi = `${tt}:copy`, jo = `${tt}:paste`, Di = `${tt}:clone`, Bo = `${tt}:split`, Yo = `${tt}:cut`, zi = `${tt}:delete`, $i = `${tt}:replace`, Er = "history", Fi = `${Er}:undo`, Ni = `${Er}:redo`, Go = `${Er}:reset`, fs = "scale", Li = `${fs}:changed`;
|
|
972
972
|
var _r = { exports: {} };
|
|
973
973
|
_r.exports;
|
|
974
974
|
(function(t, r) {
|
|
975
|
-
var e = 200, n = "__lodash_hash_undefined__", i = 9007199254740991,
|
|
976
|
-
z[
|
|
975
|
+
var e = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, a = "[object Arguments]", u = "[object Array]", c = "[object Boolean]", d = "[object Date]", p = "[object Error]", h = "[object Function]", y = "[object GeneratorFunction]", m = "[object Map]", I = "[object Number]", k = "[object Object]", b = "[object Promise]", _ = "[object RegExp]", f = "[object Set]", v = "[object String]", w = "[object Symbol]", S = "[object WeakMap]", E = "[object ArrayBuffer]", T = "[object DataView]", M = "[object Float32Array]", L = "[object Float64Array]", R = "[object Int8Array]", G = "[object Int16Array]", x = "[object Int32Array]", F = "[object Uint8Array]", et = "[object Uint8ClampedArray]", Qt = "[object Uint16Array]", te = "[object Uint32Array]", Se = /[\\^$.*+?()[\]{}|]/g, we = /\w*$/, Te = /^\[object .+?Constructor\]$/, Me = /^(?:0|[1-9]\d*)$/, z = {};
|
|
976
|
+
z[a] = z[u] = z[E] = z[T] = z[c] = z[d] = z[M] = z[L] = z[R] = z[G] = z[x] = z[m] = z[I] = z[k] = z[_] = z[f] = z[v] = z[w] = z[F] = z[et] = z[Qt] = z[te] = !0, z[p] = z[h] = z[S] = !1;
|
|
977
977
|
var Ee = typeof ft == "object" && ft && ft.Object === Object && ft, Ae = typeof self == "object" && self && self.Object === Object && self, st = Ee || Ae || Function("return this")(), ee = r && !r.nodeType && r, $ = ee && !0 && t && !t.nodeType && t, re = $ && $.exports === ee;
|
|
978
|
-
function xe(s,
|
|
979
|
-
return s.set(
|
|
978
|
+
function xe(s, o) {
|
|
979
|
+
return s.set(o[0], o[1]), s;
|
|
980
980
|
}
|
|
981
|
-
function it(s,
|
|
982
|
-
return s.add(
|
|
981
|
+
function it(s, o) {
|
|
982
|
+
return s.add(o), s;
|
|
983
983
|
}
|
|
984
|
-
function ne(s,
|
|
985
|
-
for (var l = -1,
|
|
984
|
+
function ne(s, o) {
|
|
985
|
+
for (var l = -1, g = s ? s.length : 0; ++l < g && o(s[l], l, s) !== !1; )
|
|
986
986
|
;
|
|
987
987
|
return s;
|
|
988
988
|
}
|
|
989
|
-
function se(s,
|
|
990
|
-
for (var l = -1,
|
|
991
|
-
s[O + l] =
|
|
989
|
+
function se(s, o) {
|
|
990
|
+
for (var l = -1, g = o.length, O = s.length; ++l < g; )
|
|
991
|
+
s[O + l] = o[l];
|
|
992
992
|
return s;
|
|
993
993
|
}
|
|
994
|
-
function zt(s,
|
|
994
|
+
function zt(s, o, l, g) {
|
|
995
995
|
for (var O = -1, A = s ? s.length : 0; ++O < A; )
|
|
996
|
-
l =
|
|
996
|
+
l = o(l, s[O], O, s);
|
|
997
997
|
return l;
|
|
998
998
|
}
|
|
999
|
-
function $t(s,
|
|
1000
|
-
for (var l = -1,
|
|
1001
|
-
|
|
1002
|
-
return
|
|
999
|
+
function $t(s, o) {
|
|
1000
|
+
for (var l = -1, g = Array(s); ++l < s; )
|
|
1001
|
+
g[l] = o(l);
|
|
1002
|
+
return g;
|
|
1003
1003
|
}
|
|
1004
|
-
function ie(s,
|
|
1005
|
-
return s == null ? void 0 : s[
|
|
1004
|
+
function ie(s, o) {
|
|
1005
|
+
return s == null ? void 0 : s[o];
|
|
1006
1006
|
}
|
|
1007
1007
|
function Ft(s) {
|
|
1008
|
-
var
|
|
1008
|
+
var o = !1;
|
|
1009
1009
|
if (s != null && typeof s.toString != "function")
|
|
1010
1010
|
try {
|
|
1011
|
-
|
|
1011
|
+
o = !!(s + "");
|
|
1012
1012
|
} catch {
|
|
1013
1013
|
}
|
|
1014
|
-
return
|
|
1014
|
+
return o;
|
|
1015
1015
|
}
|
|
1016
1016
|
function ae(s) {
|
|
1017
|
-
var
|
|
1018
|
-
return s.forEach(function(
|
|
1019
|
-
l[++
|
|
1017
|
+
var o = -1, l = Array(s.size);
|
|
1018
|
+
return s.forEach(function(g, O) {
|
|
1019
|
+
l[++o] = [O, g];
|
|
1020
1020
|
}), l;
|
|
1021
1021
|
}
|
|
1022
|
-
function Nt(s,
|
|
1022
|
+
function Nt(s, o) {
|
|
1023
1023
|
return function(l) {
|
|
1024
|
-
return s(
|
|
1024
|
+
return s(o(l));
|
|
1025
1025
|
};
|
|
1026
1026
|
}
|
|
1027
1027
|
function oe(s) {
|
|
1028
|
-
var
|
|
1029
|
-
return s.forEach(function(
|
|
1030
|
-
l[++
|
|
1028
|
+
var o = -1, l = Array(s.size);
|
|
1029
|
+
return s.forEach(function(g) {
|
|
1030
|
+
l[++o] = g;
|
|
1031
1031
|
}), l;
|
|
1032
1032
|
}
|
|
1033
1033
|
var Oe = Array.prototype, Ce = Function.prototype, wt = Object.prototype, Lt = st["__core-js_shared__"], ce = function() {
|
|
@@ -1035,12 +1035,12 @@ _r.exports;
|
|
|
1035
1035
|
return s ? "Symbol(src)_1." + s : "";
|
|
1036
1036
|
}(), ue = Ce.toString, ut = wt.hasOwnProperty, Tt = wt.toString, Re = RegExp(
|
|
1037
1037
|
"^" + ue.call(ut).replace(Se, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1038
|
-
),
|
|
1038
|
+
), yt = re ? st.Buffer : void 0, Mt = st.Symbol, Ht = st.Uint8Array, rt = Nt(Object.getPrototypeOf, Object), le = Object.create, de = wt.propertyIsEnumerable, Pe = Oe.splice, Ut = Object.getOwnPropertySymbols, Et = yt ? yt.isBuffer : void 0, fe = Nt(Object.keys, Object), At = mt(st, "DataView"), gt = mt(st, "Map"), at = mt(st, "Promise"), xt = mt(st, "Set"), Wt = mt(st, "WeakMap"), It = mt(Object, "create"), jt = nt(At), bt = nt(gt), Bt = nt(at), Yt = nt(xt), We = nt(Wt), Gt = Mt ? Mt.prototype : void 0, ar = Gt ? Gt.valueOf : void 0;
|
|
1039
1039
|
function Ot(s) {
|
|
1040
|
-
var
|
|
1041
|
-
for (this.clear(); ++
|
|
1042
|
-
var
|
|
1043
|
-
this.set(
|
|
1040
|
+
var o = -1, l = s ? s.length : 0;
|
|
1041
|
+
for (this.clear(); ++o < l; ) {
|
|
1042
|
+
var g = s[o];
|
|
1043
|
+
this.set(g[0], g[1]);
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
function xr() {
|
|
@@ -1050,62 +1050,62 @@ _r.exports;
|
|
|
1050
1050
|
return this.has(s) && delete this.__data__[s];
|
|
1051
1051
|
}
|
|
1052
1052
|
function Cr(s) {
|
|
1053
|
-
var
|
|
1053
|
+
var o = this.__data__;
|
|
1054
1054
|
if (It) {
|
|
1055
|
-
var l =
|
|
1055
|
+
var l = o[s];
|
|
1056
1056
|
return l === n ? void 0 : l;
|
|
1057
1057
|
}
|
|
1058
|
-
return ut.call(
|
|
1058
|
+
return ut.call(o, s) ? o[s] : void 0;
|
|
1059
1059
|
}
|
|
1060
1060
|
function or(s) {
|
|
1061
|
-
var
|
|
1062
|
-
return It ?
|
|
1061
|
+
var o = this.__data__;
|
|
1062
|
+
return It ? o[s] !== void 0 : ut.call(o, s);
|
|
1063
1063
|
}
|
|
1064
|
-
function je(s,
|
|
1064
|
+
function je(s, o) {
|
|
1065
1065
|
var l = this.__data__;
|
|
1066
|
-
return l[s] = It &&
|
|
1066
|
+
return l[s] = It && o === void 0 ? n : o, this;
|
|
1067
1067
|
}
|
|
1068
1068
|
Ot.prototype.clear = xr, Ot.prototype.delete = Or, Ot.prototype.get = Cr, Ot.prototype.has = or, Ot.prototype.set = je;
|
|
1069
1069
|
function X(s) {
|
|
1070
|
-
var
|
|
1071
|
-
for (this.clear(); ++
|
|
1072
|
-
var
|
|
1073
|
-
this.set(
|
|
1070
|
+
var o = -1, l = s ? s.length : 0;
|
|
1071
|
+
for (this.clear(); ++o < l; ) {
|
|
1072
|
+
var g = s[o];
|
|
1073
|
+
this.set(g[0], g[1]);
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
1076
|
function Rr() {
|
|
1077
1077
|
this.__data__ = [];
|
|
1078
1078
|
}
|
|
1079
1079
|
function Pr(s) {
|
|
1080
|
-
var
|
|
1080
|
+
var o = this.__data__, l = ze(o, s);
|
|
1081
1081
|
if (l < 0)
|
|
1082
1082
|
return !1;
|
|
1083
|
-
var
|
|
1084
|
-
return l ==
|
|
1083
|
+
var g = o.length - 1;
|
|
1084
|
+
return l == g ? o.pop() : Pe.call(o, l, 1), !0;
|
|
1085
1085
|
}
|
|
1086
1086
|
function Dr(s) {
|
|
1087
|
-
var
|
|
1088
|
-
return l < 0 ? void 0 :
|
|
1087
|
+
var o = this.__data__, l = ze(o, s);
|
|
1088
|
+
return l < 0 ? void 0 : o[l][1];
|
|
1089
1089
|
}
|
|
1090
1090
|
function zr(s) {
|
|
1091
1091
|
return ze(this.__data__, s) > -1;
|
|
1092
1092
|
}
|
|
1093
|
-
function $r(s,
|
|
1094
|
-
var l = this.__data__,
|
|
1095
|
-
return
|
|
1093
|
+
function $r(s, o) {
|
|
1094
|
+
var l = this.__data__, g = ze(l, s);
|
|
1095
|
+
return g < 0 ? l.push([s, o]) : l[g][1] = o, this;
|
|
1096
1096
|
}
|
|
1097
1097
|
X.prototype.clear = Rr, X.prototype.delete = Pr, X.prototype.get = Dr, X.prototype.has = zr, X.prototype.set = $r;
|
|
1098
1098
|
function q(s) {
|
|
1099
|
-
var
|
|
1100
|
-
for (this.clear(); ++
|
|
1101
|
-
var
|
|
1102
|
-
this.set(
|
|
1099
|
+
var o = -1, l = s ? s.length : 0;
|
|
1100
|
+
for (this.clear(); ++o < l; ) {
|
|
1101
|
+
var g = s[o];
|
|
1102
|
+
this.set(g[0], g[1]);
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
1105
|
function Fr() {
|
|
1106
1106
|
this.__data__ = {
|
|
1107
1107
|
hash: new Ot(),
|
|
1108
|
-
map: new (
|
|
1108
|
+
map: new (gt || X)(),
|
|
1109
1109
|
string: new Ot()
|
|
1110
1110
|
};
|
|
1111
1111
|
}
|
|
@@ -1118,8 +1118,8 @@ _r.exports;
|
|
|
1118
1118
|
function Hr(s) {
|
|
1119
1119
|
return he(this, s).has(s);
|
|
1120
1120
|
}
|
|
1121
|
-
function Ur(s,
|
|
1122
|
-
return he(this, s).set(s,
|
|
1121
|
+
function Ur(s, o) {
|
|
1122
|
+
return he(this, s).set(s, o), this;
|
|
1123
1123
|
}
|
|
1124
1124
|
q.prototype.clear = Fr, q.prototype.delete = Nr, q.prototype.get = Lr, q.prototype.has = Hr, q.prototype.set = Ur;
|
|
1125
1125
|
function ot(s) {
|
|
@@ -1137,59 +1137,59 @@ _r.exports;
|
|
|
1137
1137
|
function Yr(s) {
|
|
1138
1138
|
return this.__data__.has(s);
|
|
1139
1139
|
}
|
|
1140
|
-
function Gr(s,
|
|
1140
|
+
function Gr(s, o) {
|
|
1141
1141
|
var l = this.__data__;
|
|
1142
1142
|
if (l instanceof X) {
|
|
1143
|
-
var
|
|
1144
|
-
if (!
|
|
1145
|
-
return
|
|
1146
|
-
l = this.__data__ = new q(
|
|
1143
|
+
var g = l.__data__;
|
|
1144
|
+
if (!gt || g.length < e - 1)
|
|
1145
|
+
return g.push([s, o]), this;
|
|
1146
|
+
l = this.__data__ = new q(g);
|
|
1147
1147
|
}
|
|
1148
|
-
return l.set(s,
|
|
1148
|
+
return l.set(s, o), this;
|
|
1149
1149
|
}
|
|
1150
1150
|
ot.prototype.clear = Wr, ot.prototype.delete = jr, ot.prototype.get = Br, ot.prototype.has = Yr, ot.prototype.set = Gr;
|
|
1151
|
-
function De(s,
|
|
1152
|
-
var l = Xe(s) || Fe(s) ? $t(s.length, String) : [],
|
|
1151
|
+
function De(s, o) {
|
|
1152
|
+
var l = Xe(s) || Fe(s) ? $t(s.length, String) : [], g = l.length, O = !!g;
|
|
1153
1153
|
for (var A in s)
|
|
1154
|
-
ut.call(s, A) && !(O && (A == "length" || on(A,
|
|
1154
|
+
ut.call(s, A) && !(O && (A == "length" || on(A, g))) && l.push(A);
|
|
1155
1155
|
return l;
|
|
1156
1156
|
}
|
|
1157
|
-
function cr(s,
|
|
1158
|
-
var
|
|
1159
|
-
(!(ut.call(s,
|
|
1157
|
+
function cr(s, o, l) {
|
|
1158
|
+
var g = s[o];
|
|
1159
|
+
(!(ut.call(s, o) && pr(g, l)) || l === void 0 && !(o in s)) && (s[o] = l);
|
|
1160
1160
|
}
|
|
1161
|
-
function ze(s,
|
|
1161
|
+
function ze(s, o) {
|
|
1162
1162
|
for (var l = s.length; l--; )
|
|
1163
|
-
if (pr(s[l][0],
|
|
1163
|
+
if (pr(s[l][0], o))
|
|
1164
1164
|
return l;
|
|
1165
1165
|
return -1;
|
|
1166
1166
|
}
|
|
1167
|
-
function kt(s,
|
|
1168
|
-
return s && Ge(
|
|
1167
|
+
function kt(s, o) {
|
|
1168
|
+
return s && Ge(o, Ve(o), s);
|
|
1169
1169
|
}
|
|
1170
|
-
function Be(s,
|
|
1170
|
+
function Be(s, o, l, g, O, A, D) {
|
|
1171
1171
|
var P;
|
|
1172
|
-
if (
|
|
1172
|
+
if (g && (P = A ? g(s, O, A, D) : g(s)), P !== void 0)
|
|
1173
1173
|
return P;
|
|
1174
1174
|
if (!_t(s))
|
|
1175
1175
|
return s;
|
|
1176
1176
|
var U = Xe(s);
|
|
1177
1177
|
if (U) {
|
|
1178
|
-
if (P = sn(s), !
|
|
1178
|
+
if (P = sn(s), !o)
|
|
1179
1179
|
return en(s, P);
|
|
1180
1180
|
} else {
|
|
1181
|
-
var N = Rt(s), J = N == h || N ==
|
|
1181
|
+
var N = Rt(s), J = N == h || N == y;
|
|
1182
1182
|
if (hr(s))
|
|
1183
|
-
return $e(s,
|
|
1184
|
-
if (N ==
|
|
1183
|
+
return $e(s, o);
|
|
1184
|
+
if (N == k || N == a || J && !A) {
|
|
1185
1185
|
if (Ft(s))
|
|
1186
1186
|
return A ? s : {};
|
|
1187
|
-
if (P = vt(J ? {} : s), !
|
|
1187
|
+
if (P = vt(J ? {} : s), !o)
|
|
1188
1188
|
return rn(s, kt(P, s));
|
|
1189
1189
|
} else {
|
|
1190
1190
|
if (!z[N])
|
|
1191
1191
|
return A ? s : {};
|
|
1192
|
-
P = an(s, N, Be,
|
|
1192
|
+
P = an(s, N, Be, o);
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
1195
1195
|
D || (D = new ot());
|
|
@@ -1199,15 +1199,15 @@ _r.exports;
|
|
|
1199
1199
|
if (D.set(s, P), !U)
|
|
1200
1200
|
var W = l ? nn(s) : Ve(s);
|
|
1201
1201
|
return ne(W || s, function(Z, K) {
|
|
1202
|
-
W && (K = Z, Z = s[K]), cr(P, K, Be(Z,
|
|
1202
|
+
W && (K = Z, Z = s[K]), cr(P, K, Be(Z, o, l, g, K, s, D));
|
|
1203
1203
|
}), P;
|
|
1204
1204
|
}
|
|
1205
1205
|
function Xr(s) {
|
|
1206
1206
|
return _t(s) ? le(s) : {};
|
|
1207
1207
|
}
|
|
1208
|
-
function Kr(s,
|
|
1209
|
-
var
|
|
1210
|
-
return Xe(s) ?
|
|
1208
|
+
function Kr(s, o, l) {
|
|
1209
|
+
var g = o(s);
|
|
1210
|
+
return Xe(s) ? g : se(g, l(s));
|
|
1211
1211
|
}
|
|
1212
1212
|
function Vr(s) {
|
|
1213
1213
|
return Tt.call(s);
|
|
@@ -1215,151 +1215,151 @@ _r.exports;
|
|
|
1215
1215
|
function qr(s) {
|
|
1216
1216
|
if (!_t(s) || un(s))
|
|
1217
1217
|
return !1;
|
|
1218
|
-
var
|
|
1219
|
-
return
|
|
1218
|
+
var o = Ke(s) || Ft(s) ? Re : Te;
|
|
1219
|
+
return o.test(nt(s));
|
|
1220
1220
|
}
|
|
1221
1221
|
function Jr(s) {
|
|
1222
1222
|
if (!dr(s))
|
|
1223
1223
|
return fe(s);
|
|
1224
|
-
var
|
|
1224
|
+
var o = [];
|
|
1225
1225
|
for (var l in Object(s))
|
|
1226
|
-
ut.call(s, l) && l != "constructor" &&
|
|
1227
|
-
return
|
|
1226
|
+
ut.call(s, l) && l != "constructor" && o.push(l);
|
|
1227
|
+
return o;
|
|
1228
1228
|
}
|
|
1229
|
-
function $e(s,
|
|
1230
|
-
if (
|
|
1229
|
+
function $e(s, o) {
|
|
1230
|
+
if (o)
|
|
1231
1231
|
return s.slice();
|
|
1232
1232
|
var l = new s.constructor(s.length);
|
|
1233
1233
|
return s.copy(l), l;
|
|
1234
1234
|
}
|
|
1235
1235
|
function Ye(s) {
|
|
1236
|
-
var
|
|
1237
|
-
return new Ht(
|
|
1236
|
+
var o = new s.constructor(s.byteLength);
|
|
1237
|
+
return new Ht(o).set(new Ht(s)), o;
|
|
1238
1238
|
}
|
|
1239
|
-
function pe(s,
|
|
1240
|
-
var l =
|
|
1239
|
+
function pe(s, o) {
|
|
1240
|
+
var l = o ? Ye(s.buffer) : s.buffer;
|
|
1241
1241
|
return new s.constructor(l, s.byteOffset, s.byteLength);
|
|
1242
1242
|
}
|
|
1243
|
-
function ur(s,
|
|
1244
|
-
var
|
|
1245
|
-
return zt(
|
|
1243
|
+
function ur(s, o, l) {
|
|
1244
|
+
var g = o ? l(ae(s), !0) : ae(s);
|
|
1245
|
+
return zt(g, xe, new s.constructor());
|
|
1246
1246
|
}
|
|
1247
1247
|
function lr(s) {
|
|
1248
|
-
var
|
|
1249
|
-
return
|
|
1248
|
+
var o = new s.constructor(s.source, we.exec(s));
|
|
1249
|
+
return o.lastIndex = s.lastIndex, o;
|
|
1250
1250
|
}
|
|
1251
|
-
function Zr(s,
|
|
1252
|
-
var
|
|
1253
|
-
return zt(
|
|
1251
|
+
function Zr(s, o, l) {
|
|
1252
|
+
var g = o ? l(oe(s), !0) : oe(s);
|
|
1253
|
+
return zt(g, it, new s.constructor());
|
|
1254
1254
|
}
|
|
1255
1255
|
function Qr(s) {
|
|
1256
1256
|
return ar ? Object(ar.call(s)) : {};
|
|
1257
1257
|
}
|
|
1258
|
-
function tn(s,
|
|
1259
|
-
var l =
|
|
1258
|
+
function tn(s, o) {
|
|
1259
|
+
var l = o ? Ye(s.buffer) : s.buffer;
|
|
1260
1260
|
return new s.constructor(l, s.byteOffset, s.length);
|
|
1261
1261
|
}
|
|
1262
|
-
function en(s,
|
|
1263
|
-
var l = -1,
|
|
1264
|
-
for (
|
|
1265
|
-
|
|
1266
|
-
return
|
|
1262
|
+
function en(s, o) {
|
|
1263
|
+
var l = -1, g = s.length;
|
|
1264
|
+
for (o || (o = Array(g)); ++l < g; )
|
|
1265
|
+
o[l] = s[l];
|
|
1266
|
+
return o;
|
|
1267
1267
|
}
|
|
1268
|
-
function Ge(s,
|
|
1268
|
+
function Ge(s, o, l, g) {
|
|
1269
1269
|
l || (l = {});
|
|
1270
|
-
for (var O = -1, A =
|
|
1271
|
-
var D =
|
|
1270
|
+
for (var O = -1, A = o.length; ++O < A; ) {
|
|
1271
|
+
var D = o[O], P = void 0;
|
|
1272
1272
|
cr(l, D, P === void 0 ? s[D] : P);
|
|
1273
1273
|
}
|
|
1274
1274
|
return l;
|
|
1275
1275
|
}
|
|
1276
|
-
function rn(s,
|
|
1277
|
-
return Ge(s, Ct(s),
|
|
1276
|
+
function rn(s, o) {
|
|
1277
|
+
return Ge(s, Ct(s), o);
|
|
1278
1278
|
}
|
|
1279
1279
|
function nn(s) {
|
|
1280
1280
|
return Kr(s, Ve, Ct);
|
|
1281
1281
|
}
|
|
1282
|
-
function he(s,
|
|
1282
|
+
function he(s, o) {
|
|
1283
1283
|
var l = s.__data__;
|
|
1284
|
-
return cn(
|
|
1284
|
+
return cn(o) ? l[typeof o == "string" ? "string" : "hash"] : l.map;
|
|
1285
1285
|
}
|
|
1286
|
-
function mt(s,
|
|
1287
|
-
var l = ie(s,
|
|
1286
|
+
function mt(s, o) {
|
|
1287
|
+
var l = ie(s, o);
|
|
1288
1288
|
return qr(l) ? l : void 0;
|
|
1289
1289
|
}
|
|
1290
1290
|
var Ct = Ut ? Nt(Ut, Object) : dn, Rt = Vr;
|
|
1291
|
-
(At && Rt(new At(new ArrayBuffer(1))) != T ||
|
|
1292
|
-
var
|
|
1293
|
-
if (
|
|
1294
|
-
switch (
|
|
1291
|
+
(At && Rt(new At(new ArrayBuffer(1))) != T || gt && Rt(new gt()) != m || at && Rt(at.resolve()) != b || xt && Rt(new xt()) != f || Wt && Rt(new Wt()) != S) && (Rt = function(s) {
|
|
1292
|
+
var o = Tt.call(s), l = o == k ? s.constructor : void 0, g = l ? nt(l) : void 0;
|
|
1293
|
+
if (g)
|
|
1294
|
+
switch (g) {
|
|
1295
1295
|
case jt:
|
|
1296
1296
|
return T;
|
|
1297
1297
|
case bt:
|
|
1298
1298
|
return m;
|
|
1299
1299
|
case Bt:
|
|
1300
|
-
return
|
|
1300
|
+
return b;
|
|
1301
1301
|
case Yt:
|
|
1302
1302
|
return f;
|
|
1303
1303
|
case We:
|
|
1304
1304
|
return S;
|
|
1305
1305
|
}
|
|
1306
|
-
return
|
|
1306
|
+
return o;
|
|
1307
1307
|
});
|
|
1308
1308
|
function sn(s) {
|
|
1309
|
-
var
|
|
1310
|
-
return
|
|
1309
|
+
var o = s.length, l = s.constructor(o);
|
|
1310
|
+
return o && typeof s[0] == "string" && ut.call(s, "index") && (l.index = s.index, l.input = s.input), l;
|
|
1311
1311
|
}
|
|
1312
1312
|
function vt(s) {
|
|
1313
|
-
return typeof s.constructor == "function" && !dr(s) ? Xr(
|
|
1313
|
+
return typeof s.constructor == "function" && !dr(s) ? Xr(rt(s)) : {};
|
|
1314
1314
|
}
|
|
1315
|
-
function an(s,
|
|
1315
|
+
function an(s, o, l, g) {
|
|
1316
1316
|
var O = s.constructor;
|
|
1317
|
-
switch (
|
|
1317
|
+
switch (o) {
|
|
1318
1318
|
case E:
|
|
1319
1319
|
return Ye(s);
|
|
1320
1320
|
case c:
|
|
1321
1321
|
case d:
|
|
1322
1322
|
return new O(+s);
|
|
1323
1323
|
case T:
|
|
1324
|
-
return pe(s,
|
|
1324
|
+
return pe(s, g);
|
|
1325
1325
|
case M:
|
|
1326
1326
|
case L:
|
|
1327
1327
|
case R:
|
|
1328
|
-
case
|
|
1328
|
+
case G:
|
|
1329
1329
|
case x:
|
|
1330
1330
|
case F:
|
|
1331
|
-
case
|
|
1331
|
+
case et:
|
|
1332
1332
|
case Qt:
|
|
1333
1333
|
case te:
|
|
1334
|
-
return tn(s,
|
|
1334
|
+
return tn(s, g);
|
|
1335
1335
|
case m:
|
|
1336
|
-
return ur(s,
|
|
1337
|
-
case
|
|
1338
|
-
case
|
|
1336
|
+
return ur(s, g, l);
|
|
1337
|
+
case I:
|
|
1338
|
+
case v:
|
|
1339
1339
|
return new O(s);
|
|
1340
1340
|
case _:
|
|
1341
1341
|
return lr(s);
|
|
1342
1342
|
case f:
|
|
1343
|
-
return Zr(s,
|
|
1343
|
+
return Zr(s, g, l);
|
|
1344
1344
|
case w:
|
|
1345
1345
|
return Qr(s);
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
1348
|
-
function on(s,
|
|
1349
|
-
return
|
|
1348
|
+
function on(s, o) {
|
|
1349
|
+
return o = o ?? i, !!o && (typeof s == "number" || Me.test(s)) && s > -1 && s % 1 == 0 && s < o;
|
|
1350
1350
|
}
|
|
1351
1351
|
function cn(s) {
|
|
1352
|
-
var
|
|
1353
|
-
return
|
|
1352
|
+
var o = typeof s;
|
|
1353
|
+
return o == "string" || o == "number" || o == "symbol" || o == "boolean" ? s !== "__proto__" : s === null;
|
|
1354
1354
|
}
|
|
1355
1355
|
function un(s) {
|
|
1356
1356
|
return !!ce && ce in s;
|
|
1357
1357
|
}
|
|
1358
1358
|
function dr(s) {
|
|
1359
|
-
var
|
|
1359
|
+
var o = s && s.constructor, l = typeof o == "function" && o.prototype || wt;
|
|
1360
1360
|
return s === l;
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function nt(s) {
|
|
1363
1363
|
if (s != null) {
|
|
1364
1364
|
try {
|
|
1365
1365
|
return ue.call(s);
|
|
@@ -1375,32 +1375,32 @@ _r.exports;
|
|
|
1375
1375
|
function fr(s) {
|
|
1376
1376
|
return Be(s, !0, !0);
|
|
1377
1377
|
}
|
|
1378
|
-
function pr(s,
|
|
1379
|
-
return s ===
|
|
1378
|
+
function pr(s, o) {
|
|
1379
|
+
return s === o || s !== s && o !== o;
|
|
1380
1380
|
}
|
|
1381
1381
|
function Fe(s) {
|
|
1382
|
-
return ln(s) && ut.call(s, "callee") && (!de.call(s, "callee") || Tt.call(s) ==
|
|
1382
|
+
return ln(s) && ut.call(s, "callee") && (!de.call(s, "callee") || Tt.call(s) == a);
|
|
1383
1383
|
}
|
|
1384
1384
|
var Xe = Array.isArray;
|
|
1385
1385
|
function Ne(s) {
|
|
1386
1386
|
return s != null && mr(s.length) && !Ke(s);
|
|
1387
1387
|
}
|
|
1388
1388
|
function ln(s) {
|
|
1389
|
-
return
|
|
1389
|
+
return yr(s) && Ne(s);
|
|
1390
1390
|
}
|
|
1391
1391
|
var hr = Et || fn;
|
|
1392
1392
|
function Ke(s) {
|
|
1393
|
-
var
|
|
1394
|
-
return
|
|
1393
|
+
var o = _t(s) ? Tt.call(s) : "";
|
|
1394
|
+
return o == h || o == y;
|
|
1395
1395
|
}
|
|
1396
1396
|
function mr(s) {
|
|
1397
1397
|
return typeof s == "number" && s > -1 && s % 1 == 0 && s <= i;
|
|
1398
1398
|
}
|
|
1399
1399
|
function _t(s) {
|
|
1400
|
-
var
|
|
1401
|
-
return !!s && (
|
|
1400
|
+
var o = typeof s;
|
|
1401
|
+
return !!s && (o == "object" || o == "function");
|
|
1402
1402
|
}
|
|
1403
|
-
function
|
|
1403
|
+
function yr(s) {
|
|
1404
1404
|
return !!s && typeof s == "object";
|
|
1405
1405
|
}
|
|
1406
1406
|
function Ve(s) {
|
|
@@ -1419,82 +1419,82 @@ const C = /* @__PURE__ */ Cn(Hi);
|
|
|
1419
1419
|
function Ui(t, r) {
|
|
1420
1420
|
return t.filter((n) => {
|
|
1421
1421
|
if (r.forEach((i) => {
|
|
1422
|
-
n.items.includes(i) && (n.items = n.items.filter((
|
|
1422
|
+
n.items.includes(i) && (n.items = n.items.filter((a) => a !== i));
|
|
1423
1423
|
}), n.items.length !== 0 || n.static)
|
|
1424
1424
|
return n;
|
|
1425
1425
|
});
|
|
1426
1426
|
}
|
|
1427
|
-
const
|
|
1427
|
+
const Y = (t) => Object.keys(t).reduce((r, e) => {
|
|
1428
1428
|
const { display: n } = t[e];
|
|
1429
1429
|
return Math.max(r, n.to);
|
|
1430
1430
|
}, 0);
|
|
1431
|
-
function
|
|
1431
|
+
function Q(t, r, e) {
|
|
1432
1432
|
t.forEach((n) => {
|
|
1433
|
-
const i = n.items.map((
|
|
1434
|
-
(
|
|
1435
|
-
), c =
|
|
1436
|
-
(
|
|
1433
|
+
const i = n.items.map((k) => String(k)), a = Object.values(r).filter(
|
|
1434
|
+
(k) => i.includes(String(k.id))
|
|
1435
|
+
), c = a.filter(
|
|
1436
|
+
(k) => !e.includes(String(k.id))
|
|
1437
1437
|
).sort(
|
|
1438
|
-
(
|
|
1439
|
-
), d =
|
|
1440
|
-
(
|
|
1438
|
+
(k, b) => k.display.from - b.display.from
|
|
1439
|
+
), d = a.sort(
|
|
1440
|
+
(k, b) => k.display.from - b.display.from
|
|
1441
1441
|
), p = c[c.length - 1];
|
|
1442
1442
|
let h = (p == null ? void 0 : p.display.to) || 0;
|
|
1443
|
-
d.forEach((
|
|
1444
|
-
if (e.includes(String(
|
|
1445
|
-
const
|
|
1443
|
+
d.forEach((k) => {
|
|
1444
|
+
if (e.includes(String(k.id))) {
|
|
1445
|
+
const b = k.playbackRate || 1;
|
|
1446
1446
|
let _;
|
|
1447
|
-
(
|
|
1447
|
+
(k.type === "video" || k.type === "audio") && k.trim ? _ = (k.trim.to - k.trim.from) / b : _ = k.display.to - k.display.from, k.display = {
|
|
1448
1448
|
from: h,
|
|
1449
1449
|
to: h + _
|
|
1450
1450
|
}, h = h + _;
|
|
1451
1451
|
}
|
|
1452
1452
|
});
|
|
1453
|
-
const m =
|
|
1454
|
-
(
|
|
1455
|
-
).map((
|
|
1456
|
-
let
|
|
1457
|
-
m.forEach((
|
|
1458
|
-
const
|
|
1453
|
+
const m = a.sort(
|
|
1454
|
+
(k, b) => k.display.from - b.display.from
|
|
1455
|
+
).map((k) => String(k.id));
|
|
1456
|
+
let I = 0;
|
|
1457
|
+
m.forEach((k) => {
|
|
1458
|
+
const b = [];
|
|
1459
1459
|
let _ = 0;
|
|
1460
|
-
if (
|
|
1461
|
-
f.forEach((
|
|
1462
|
-
|
|
1460
|
+
if (b.forEach((f) => {
|
|
1461
|
+
f.forEach((v) => {
|
|
1462
|
+
v.type === "transition" && (_ += v.duration);
|
|
1463
1463
|
});
|
|
1464
|
-
}), r[String(
|
|
1465
|
-
const f = r[String(
|
|
1464
|
+
}), r[String(k)]) {
|
|
1465
|
+
const f = r[String(k)], v = f.playbackRate || 1;
|
|
1466
1466
|
let w;
|
|
1467
|
-
(f.type === "video" || f.type === "audio") && f.trim ? w = (f.trim.to - f.trim.from) /
|
|
1468
|
-
from:
|
|
1469
|
-
to:
|
|
1470
|
-
},
|
|
1467
|
+
(f.type === "video" || f.type === "audio") && f.trim ? w = (f.trim.to - f.trim.from) / v : w = f.display.to - f.display.from, r[String(k)].display = {
|
|
1468
|
+
from: I - _,
|
|
1469
|
+
to: I + w - _
|
|
1470
|
+
}, I += w;
|
|
1471
1471
|
}
|
|
1472
1472
|
});
|
|
1473
1473
|
});
|
|
1474
1474
|
}
|
|
1475
|
-
function ps(t, r, e, n, i,
|
|
1475
|
+
function ps(t, r, e, n, i, a) {
|
|
1476
1476
|
return r.forEach((u) => {
|
|
1477
1477
|
if (!t.includes(u) && (i[u] = e[u], e[u].type === "composition" || e[u].type === "template")) {
|
|
1478
1478
|
const c = n.find((d) => d.id === u);
|
|
1479
|
-
c && (
|
|
1479
|
+
c && (a.push(c), ps(
|
|
1480
1480
|
t,
|
|
1481
1481
|
c.items,
|
|
1482
1482
|
e,
|
|
1483
1483
|
n,
|
|
1484
1484
|
i,
|
|
1485
|
-
|
|
1485
|
+
a
|
|
1486
1486
|
));
|
|
1487
1487
|
}
|
|
1488
|
-
}), { updatedTrackItems: i, updatedStructure:
|
|
1488
|
+
}), { updatedTrackItems: i, updatedStructure: a };
|
|
1489
1489
|
}
|
|
1490
1490
|
function Wi(t, r) {
|
|
1491
|
-
const e = C(t), n = r && r.length ? r : e.activeIds, i = n.map((T) => e.trackItemsMap[T]).filter((T) => !!T).map((T) => T.id),
|
|
1491
|
+
const e = C(t), n = r && r.length ? r : e.activeIds, i = n.map((T) => e.trackItemsMap[T]).filter((T) => !!T).map((T) => T.id), a = e.transitionIds.filter(
|
|
1492
1492
|
(T) => {
|
|
1493
1493
|
const M = e.transitionsMap[T];
|
|
1494
1494
|
return i.includes(M.fromId) || i.includes(M.toId);
|
|
1495
1495
|
}
|
|
1496
1496
|
);
|
|
1497
|
-
i.push(...
|
|
1497
|
+
i.push(...a);
|
|
1498
1498
|
const u = e.trackItemIds, c = e.transitionIds, d = C(e.tracks), p = C(e.structure);
|
|
1499
1499
|
i.forEach((T) => {
|
|
1500
1500
|
var L;
|
|
@@ -1504,10 +1504,10 @@ function Wi(t, r) {
|
|
|
1504
1504
|
(x) => x.id === M.id
|
|
1505
1505
|
)) == null ? void 0 : L.items;
|
|
1506
1506
|
i.push(...R);
|
|
1507
|
-
const
|
|
1507
|
+
const G = p.findIndex(
|
|
1508
1508
|
(x) => x.id === M.id
|
|
1509
1509
|
);
|
|
1510
|
-
p.splice(
|
|
1510
|
+
p.splice(G, 1);
|
|
1511
1511
|
}
|
|
1512
1512
|
}), i.forEach((T) => {
|
|
1513
1513
|
p.forEach((M) => {
|
|
@@ -1520,7 +1520,7 @@ function Wi(t, r) {
|
|
|
1520
1520
|
c.forEach((T) => {
|
|
1521
1521
|
n.includes(T) && n.length === 1 && C(e.transitionsMap[T]);
|
|
1522
1522
|
});
|
|
1523
|
-
const
|
|
1523
|
+
const y = c.filter(
|
|
1524
1524
|
(T) => !i.includes(T) && !n.includes(T)
|
|
1525
1525
|
), m = Object.fromEntries(
|
|
1526
1526
|
Object.entries(e.transitionsMap).filter(
|
|
@@ -1530,33 +1530,33 @@ function Wi(t, r) {
|
|
|
1530
1530
|
Object.keys(m).forEach((T) => {
|
|
1531
1531
|
n.includes(T) && (m[T].kind = "none");
|
|
1532
1532
|
});
|
|
1533
|
-
const
|
|
1533
|
+
const I = e.trackItemIds.filter(
|
|
1534
1534
|
(T) => !n.includes(T)
|
|
1535
|
-
),
|
|
1535
|
+
), k = Ui(
|
|
1536
1536
|
e.tracks,
|
|
1537
1537
|
n
|
|
1538
|
-
),
|
|
1538
|
+
), b = Object.fromEntries(
|
|
1539
1539
|
Object.entries(e.trackItemsMap).filter(
|
|
1540
1540
|
([T]) => !i.includes(T)
|
|
1541
1541
|
)
|
|
1542
1542
|
), _ = d.filter((T) => T.magnetic);
|
|
1543
|
-
|
|
1544
|
-
const f = {},
|
|
1543
|
+
Q(_, b, []);
|
|
1544
|
+
const f = {}, v = [], { updatedTrackItems: w, updatedStructure: S } = ps(
|
|
1545
1545
|
i,
|
|
1546
|
-
|
|
1546
|
+
I,
|
|
1547
1547
|
e.trackItemsMap,
|
|
1548
1548
|
e.structure,
|
|
1549
1549
|
f,
|
|
1550
|
-
|
|
1551
|
-
), E =
|
|
1550
|
+
v
|
|
1551
|
+
), E = Y(w);
|
|
1552
1552
|
return {
|
|
1553
1553
|
trackItemIds: h,
|
|
1554
1554
|
activeIds: [],
|
|
1555
1555
|
trackItemsMap: w,
|
|
1556
|
-
tracks:
|
|
1556
|
+
tracks: k,
|
|
1557
1557
|
duration: E,
|
|
1558
1558
|
structure: S,
|
|
1559
|
-
transitionIds:
|
|
1559
|
+
transitionIds: y,
|
|
1560
1560
|
transitionsMap: m
|
|
1561
1561
|
};
|
|
1562
1562
|
}
|
|
@@ -1576,8 +1576,8 @@ const He = (t) => {
|
|
|
1576
1576
|
const r = t.map((e) => new FontFace(e.fontFamily, `url(${e.url})`).load().catch((n) => n));
|
|
1577
1577
|
return r.length === 0 ? Promise.resolve(!0) : new Promise((e, n) => {
|
|
1578
1578
|
Promise.all(r).then((i) => {
|
|
1579
|
-
i.forEach((
|
|
1580
|
-
|
|
1579
|
+
i.forEach((a) => {
|
|
1580
|
+
a && a.family && (document.fonts.add(a), e(!0));
|
|
1581
1581
|
});
|
|
1582
1582
|
}).catch((i) => n(i));
|
|
1583
1583
|
});
|
|
@@ -1588,18 +1588,18 @@ function Bi(t, r) {
|
|
|
1588
1588
|
}), r;
|
|
1589
1589
|
}
|
|
1590
1590
|
function hs(t, r, e) {
|
|
1591
|
-
const n = t.find((
|
|
1591
|
+
const n = t.find((a) => a.id === r);
|
|
1592
1592
|
if (!n) return [];
|
|
1593
1593
|
const i = n.items;
|
|
1594
|
-
return i.forEach((
|
|
1595
|
-
const u = e[
|
|
1594
|
+
return i.forEach((a) => {
|
|
1595
|
+
const u = e[a];
|
|
1596
1596
|
(u.type === "text" || u.type === "caption") && He([
|
|
1597
1597
|
{
|
|
1598
1598
|
fontFamily: u.details.fontFamily,
|
|
1599
1599
|
url: u.details.fontUrl
|
|
1600
1600
|
}
|
|
1601
1601
|
]), (u.type === "composition" || u.type === "template") && i.push(
|
|
1602
|
-
...hs(t,
|
|
1602
|
+
...hs(t, a, e)
|
|
1603
1603
|
);
|
|
1604
1604
|
}), i;
|
|
1605
1605
|
}
|
|
@@ -1608,9 +1608,9 @@ async function Yi(t) {
|
|
|
1608
1608
|
if (!r) return {};
|
|
1609
1609
|
const e = C(t);
|
|
1610
1610
|
let n = C(JSON.parse(r));
|
|
1611
|
-
const i = n.activeIds,
|
|
1612
|
-
Object.keys(
|
|
1613
|
-
const _ =
|
|
1611
|
+
const i = n.activeIds, a = n.trackItemsMap, u = n.structure;
|
|
1612
|
+
Object.keys(a).forEach((b) => {
|
|
1613
|
+
const _ = a[b];
|
|
1614
1614
|
if ((_.type === "text" || _.type === "caption") && He([
|
|
1615
1615
|
{
|
|
1616
1616
|
fontFamily: _.details.fontFamily,
|
|
@@ -1619,40 +1619,40 @@ async function Yi(t) {
|
|
|
1619
1619
|
]), _.type === "composition" || _.type === "template") {
|
|
1620
1620
|
const f = hs(
|
|
1621
1621
|
u,
|
|
1622
|
-
|
|
1623
|
-
|
|
1622
|
+
b,
|
|
1623
|
+
a
|
|
1624
1624
|
);
|
|
1625
1625
|
i.push(...f);
|
|
1626
1626
|
}
|
|
1627
1627
|
});
|
|
1628
1628
|
const c = Bi(i, r), d = C(JSON.parse(c)), p = e.tracks;
|
|
1629
|
-
d.activeIds.forEach((
|
|
1630
|
-
const _ = d.trackItemsMap[
|
|
1631
|
-
e.trackItemsMap[
|
|
1629
|
+
d.activeIds.forEach((b) => {
|
|
1630
|
+
const _ = d.trackItemsMap[b];
|
|
1631
|
+
e.trackItemsMap[b] = _, e.trackItemIds.push(b);
|
|
1632
1632
|
const f = {
|
|
1633
1633
|
id: Ie(),
|
|
1634
1634
|
type: _.type,
|
|
1635
|
-
items: [
|
|
1635
|
+
items: [b],
|
|
1636
1636
|
magnetic: !1,
|
|
1637
1637
|
static: !1
|
|
1638
1638
|
};
|
|
1639
1639
|
p.unshift(f);
|
|
1640
1640
|
});
|
|
1641
|
-
const h = [...d.structure, ...e.structure],
|
|
1641
|
+
const h = [...d.structure, ...e.structure], y = e.trackItemIds, m = {
|
|
1642
1642
|
...d.trackItemsMap,
|
|
1643
1643
|
...e.trackItemsMap
|
|
1644
|
-
},
|
|
1644
|
+
}, I = {
|
|
1645
1645
|
structure: h,
|
|
1646
|
-
trackItemIds:
|
|
1646
|
+
trackItemIds: y,
|
|
1647
1647
|
trackItemsMap: m,
|
|
1648
1648
|
tracks: p
|
|
1649
|
-
},
|
|
1649
|
+
}, k = Y(I.trackItemsMap);
|
|
1650
1650
|
return {
|
|
1651
|
-
trackItemIds:
|
|
1652
|
-
trackItemsMap:
|
|
1653
|
-
structure:
|
|
1654
|
-
tracks:
|
|
1655
|
-
duration:
|
|
1651
|
+
trackItemIds: I.trackItemIds,
|
|
1652
|
+
trackItemsMap: I.trackItemsMap,
|
|
1653
|
+
structure: I.structure,
|
|
1654
|
+
tracks: I.tracks,
|
|
1655
|
+
duration: k
|
|
1656
1656
|
};
|
|
1657
1657
|
}
|
|
1658
1658
|
let Sr = {
|
|
@@ -1691,32 +1691,32 @@ const Gi = (t) => {
|
|
|
1691
1691
|
}, Dn = () => Sr.cors, ms = () => Sr.acceptsMap, Ue = (t) => new Promise((r, e) => {
|
|
1692
1692
|
const n = new Image();
|
|
1693
1693
|
n.onload = () => {
|
|
1694
|
-
const
|
|
1695
|
-
r({ width:
|
|
1696
|
-
}, n.onerror = (
|
|
1697
|
-
e(
|
|
1694
|
+
const a = n.width, u = n.height;
|
|
1695
|
+
r({ width: a, height: u });
|
|
1696
|
+
}, n.onerror = (a) => {
|
|
1697
|
+
e(a);
|
|
1698
1698
|
}, Dn().image && (n.crossOrigin = "anonymous"), n.src = t;
|
|
1699
|
-
}),
|
|
1699
|
+
}), ys = (t) => new Promise((r, e) => {
|
|
1700
1700
|
const n = new Audio();
|
|
1701
1701
|
n.preload = "auto", n.addEventListener("loadedmetadata", () => {
|
|
1702
|
-
const
|
|
1703
|
-
r({ duration:
|
|
1704
|
-
}), n.addEventListener("error", (
|
|
1705
|
-
e(
|
|
1702
|
+
const a = n.duration * 1e3;
|
|
1703
|
+
r({ duration: a });
|
|
1704
|
+
}), n.addEventListener("error", (a) => {
|
|
1705
|
+
e(a);
|
|
1706
1706
|
}), n.src = t, Dn().audio && (n.crossOrigin = "anonymous"), n.load();
|
|
1707
1707
|
}), zn = (t) => new Promise((r, e) => {
|
|
1708
1708
|
const n = document.createElement("video");
|
|
1709
1709
|
n.preload = "auto", n.addEventListener("loadedmetadata", () => {
|
|
1710
|
-
const
|
|
1711
|
-
r({ duration:
|
|
1712
|
-
}), n.addEventListener("error", (
|
|
1713
|
-
e(
|
|
1710
|
+
const a = n.duration * 1e3, u = n.videoWidth, c = n.videoHeight;
|
|
1711
|
+
r({ duration: a, width: u, height: c });
|
|
1712
|
+
}), n.addEventListener("error", (a) => {
|
|
1713
|
+
e(a);
|
|
1714
1714
|
}), n.src = t, Dn().video && (n.crossOrigin = "anonymous"), n.load();
|
|
1715
1715
|
}), Xi = async (t) => {
|
|
1716
|
-
var i,
|
|
1717
|
-
const r = t.duration, e = (i = t.details) == null ? void 0 : i.width, n = (
|
|
1716
|
+
var i, a;
|
|
1717
|
+
const r = t.duration, e = (i = t.details) == null ? void 0 : i.width, n = (a = t.details) == null ? void 0 : a.height;
|
|
1718
1718
|
return r && e && n ? { duration: r, width: e, height: n } : zn(t.details.src);
|
|
1719
|
-
},
|
|
1719
|
+
}, gs = (t, r) => {
|
|
1720
1720
|
const e = document.createElement("div");
|
|
1721
1721
|
Object.keys(r).forEach((i) => {
|
|
1722
1722
|
i !== "height" && (e.style[i] = r[i]);
|
|
@@ -1726,11 +1726,11 @@ const Gi = (t) => {
|
|
|
1726
1726
|
}, Vn = (t, r) => {
|
|
1727
1727
|
var c, d;
|
|
1728
1728
|
const e = ((c = t.details.crop) == null ? void 0 : c.width) || t.details.width || 0, n = ((d = t.details.crop) == null ? void 0 : d.height) || t.details.height || 0;
|
|
1729
|
-
let i = r.width,
|
|
1729
|
+
let i = r.width, a = r.height;
|
|
1730
1730
|
const u = r.width / r.height;
|
|
1731
|
-
return e / n > u ? (i = e,
|
|
1731
|
+
return e / n > u ? (i = e, a = e / u) : (a = n, i = n * u), {
|
|
1732
1732
|
newWidth: i,
|
|
1733
|
-
newHeight:
|
|
1733
|
+
newHeight: a,
|
|
1734
1734
|
crop: {
|
|
1735
1735
|
x: 0,
|
|
1736
1736
|
y: 0,
|
|
@@ -1747,19 +1747,19 @@ const Gi = (t) => {
|
|
|
1747
1747
|
};
|
|
1748
1748
|
};
|
|
1749
1749
|
async function Ki(t, r) {
|
|
1750
|
-
const e = { ...t }, n = Object.keys(r)[0], i = Object.values(r)[0],
|
|
1750
|
+
const e = { ...t }, n = Object.keys(r)[0], i = Object.values(r)[0], a = e.trackItemsMap[n], u = { ...e.trackItemsMap[n] }, c = a.details;
|
|
1751
1751
|
if (!i.details.src) return {};
|
|
1752
|
-
if (
|
|
1753
|
-
const d = await Ue(i.details.src), { crop: p, newHeight: h, newWidth:
|
|
1754
|
-
i.details.crop = p, i.details.height = h, i.details.width =
|
|
1755
|
-
} else if (
|
|
1756
|
-
const d = await zn(i.details.src), p = e.trackItemsMap[n], { display: h, duration:
|
|
1757
|
-
i.details.crop =
|
|
1758
|
-
} else if (
|
|
1759
|
-
const d = await
|
|
1760
|
-
u.display = h, u.duration =
|
|
1761
|
-
}
|
|
1762
|
-
return
|
|
1752
|
+
if (a.type === "image") {
|
|
1753
|
+
const d = await Ue(i.details.src), { crop: p, newHeight: h, newWidth: y } = Vn(a, d);
|
|
1754
|
+
i.details.crop = p, i.details.height = h, i.details.width = y;
|
|
1755
|
+
} else if (a.type === "video") {
|
|
1756
|
+
const d = await zn(i.details.src), p = e.trackItemsMap[n], { display: h, duration: y, trim: m } = qn(p, d), { crop: I, newHeight: k, newWidth: b } = Vn(a, d);
|
|
1757
|
+
i.details.crop = I, i.details.height = k, i.details.width = b, u.display = h, u.duration = y, u.trim = m;
|
|
1758
|
+
} else if (a.type === "audio") {
|
|
1759
|
+
const d = await ys(i.details.src), p = e.trackItemsMap[n], { display: h, duration: y, trim: m } = qn(p, d);
|
|
1760
|
+
u.display = h, u.duration = y, u.trim = m;
|
|
1761
|
+
}
|
|
1762
|
+
return a.metadata && i.metadata ? u.metadata = { ...a.metadata, ...i.metadata } : i.metadata && (u.metadata = i.metadata), a.details = { ...c, ...i.details }, e.trackItemsMap[n] = { ...u }, {
|
|
1763
1763
|
trackItemsMap: {
|
|
1764
1764
|
...e.trackItemsMap,
|
|
1765
1765
|
[n]: { ...u, details: { ...c, ...i.details } }
|
|
@@ -1786,8 +1786,8 @@ function Vi(t, r) {
|
|
|
1786
1786
|
magnetic: !1
|
|
1787
1787
|
};
|
|
1788
1788
|
});
|
|
1789
|
-
const
|
|
1790
|
-
return e.tracks = [...
|
|
1789
|
+
const a = Object.values(n);
|
|
1790
|
+
return e.tracks = [...a, ...e.tracks], {
|
|
1791
1791
|
trackItemsMap: e.trackItemsMap,
|
|
1792
1792
|
tracks: e.tracks,
|
|
1793
1793
|
trackItemIds: e.trackItemIds
|
|
@@ -1798,15 +1798,15 @@ function qi(t) {
|
|
|
1798
1798
|
function i(u) {
|
|
1799
1799
|
return u.length === 3 ? `#${u[0]}${u[0]}${u[1]}${u[1]}${u[2]}${u[2]}`.toUpperCase() : `#${u.toUpperCase()}`;
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1801
|
+
function a(u, c, d) {
|
|
1802
1802
|
return `#${(1 << 24 | u << 16 | c << 8 | d).toString(16).slice(1).toUpperCase()}`;
|
|
1803
1803
|
}
|
|
1804
1804
|
return t = t.replace(r, (u, c) => i(c)), t = t.replace(
|
|
1805
1805
|
e,
|
|
1806
|
-
(u, c, d, p) =>
|
|
1806
|
+
(u, c, d, p) => a(+c, +d, +p)
|
|
1807
1807
|
), t = t.replace(
|
|
1808
1808
|
n,
|
|
1809
|
-
(u, c, d, p) =>
|
|
1809
|
+
(u, c, d, p) => a(+c, +d, +p)
|
|
1810
1810
|
), t;
|
|
1811
1811
|
}
|
|
1812
1812
|
function V(t) {
|
|
@@ -1829,9 +1829,9 @@ function bs(t) {
|
|
|
1829
1829
|
if (e) {
|
|
1830
1830
|
const i = /fill\s*:\s*([^;]+);?/.exec(e);
|
|
1831
1831
|
if (i) {
|
|
1832
|
-
const
|
|
1833
|
-
if (
|
|
1834
|
-
return
|
|
1832
|
+
const a = i[1].trim();
|
|
1833
|
+
if (a !== "" && a !== "none")
|
|
1834
|
+
return a;
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
1837
|
const n = t.parentElement;
|
|
@@ -1841,11 +1841,11 @@ function qe(t) {
|
|
|
1841
1841
|
return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(t);
|
|
1842
1842
|
}
|
|
1843
1843
|
const Ji = (t) => {
|
|
1844
|
-
const r = `.${t.split(".").filter((
|
|
1844
|
+
const r = `.${t.split(".").filter((a) => a.includes("fill:")).join(".")}`, e = {}, n = /\.([\w-]+)\s*\{\s*([^}]+)\s*\}/g;
|
|
1845
1845
|
let i;
|
|
1846
1846
|
for (; (i = n.exec(r)) !== null; ) {
|
|
1847
|
-
const
|
|
1848
|
-
d && (c.fill = V(d[1].trim())), p && (c.stroke = V(p[1].trim())), e[
|
|
1847
|
+
const a = i[1], u = i[2], c = {}, d = /fill\s*:\s*([^;]+);?/.exec(u), p = /stroke\s*:\s*([^;]+);?/.exec(u);
|
|
1848
|
+
d && (c.fill = V(d[1].trim())), p && (c.stroke = V(p[1].trim())), e[a] = c;
|
|
1849
1849
|
}
|
|
1850
1850
|
return e;
|
|
1851
1851
|
};
|
|
@@ -1862,11 +1862,11 @@ function Zi(t, r, e = 300, n = 300) {
|
|
|
1862
1862
|
const i = [], u = new DOMParser().parseFromString(t, "image/svg+xml"), c = u.documentElement;
|
|
1863
1863
|
c.setAttribute("width", `${e}`), c.setAttribute("height", `${n}`);
|
|
1864
1864
|
const d = c.querySelectorAll("style"), p = {};
|
|
1865
|
-
d.forEach((
|
|
1866
|
-
const _ =
|
|
1865
|
+
d.forEach((b) => {
|
|
1866
|
+
const _ = b.textContent || "", f = Ji(_);
|
|
1867
1867
|
Object.assign(p, f);
|
|
1868
|
-
const
|
|
1869
|
-
|
|
1868
|
+
const v = _.replace(/\.(st[\w-]+)/g, `.${r}-$1`).replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`);
|
|
1869
|
+
b.textContent = v;
|
|
1870
1870
|
const w = Array.from(u.querySelectorAll("*")), S = /* @__PURE__ */ new Set();
|
|
1871
1871
|
w.forEach((E) => {
|
|
1872
1872
|
if (hn(E)) return;
|
|
@@ -1876,7 +1876,7 @@ function Zi(t, r, e = 300, n = 300) {
|
|
|
1876
1876
|
});
|
|
1877
1877
|
const T = E.getAttribute("style");
|
|
1878
1878
|
if (T) {
|
|
1879
|
-
const L = /fill\s*:\s*([^;]+);?/.exec(T), R = /stroke\s*:\s*([^;]+);?/.exec(T),
|
|
1879
|
+
const L = /fill\s*:\s*([^;]+);?/.exec(T), R = /stroke\s*:\s*([^;]+);?/.exec(T), G = /stop-color\s*:\s*([^;]+);?/.exec(T);
|
|
1880
1880
|
if (L) {
|
|
1881
1881
|
const x = L[1].trim();
|
|
1882
1882
|
x && !["none", "transparent"].includes(x) && qe(V(x)) && S.add(V(x));
|
|
@@ -1885,8 +1885,8 @@ function Zi(t, r, e = 300, n = 300) {
|
|
|
1885
1885
|
const x = R[1].trim();
|
|
1886
1886
|
x && !["none", "transparent"].includes(x) && qe(V(x)) && S.add(V(x));
|
|
1887
1887
|
}
|
|
1888
|
-
if (
|
|
1889
|
-
const x =
|
|
1888
|
+
if (G) {
|
|
1889
|
+
const x = G[1].trim();
|
|
1890
1890
|
x && !["none", "transparent"].includes(x) && qe(V(x)) && S.add(V(x));
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
@@ -1899,62 +1899,62 @@ function Zi(t, r, e = 300, n = 300) {
|
|
|
1899
1899
|
qe(E) && i.push(E);
|
|
1900
1900
|
});
|
|
1901
1901
|
});
|
|
1902
|
-
const h = Array.from(u.querySelectorAll("*")),
|
|
1903
|
-
return h.forEach((
|
|
1904
|
-
if (hn(
|
|
1905
|
-
const _ =
|
|
1902
|
+
const h = Array.from(u.querySelectorAll("*")), y = /* @__PURE__ */ new Set();
|
|
1903
|
+
return h.forEach((b) => {
|
|
1904
|
+
if (hn(b)) return;
|
|
1905
|
+
const _ = b.getAttribute("class");
|
|
1906
1906
|
if (_) {
|
|
1907
|
-
const
|
|
1908
|
-
|
|
1907
|
+
const v = _.split(" ").map((w) => `${r}-${w}`).join(" ");
|
|
1908
|
+
b.setAttribute("class", v), v.split(" ").forEach((w) => {
|
|
1909
1909
|
const S = p[w];
|
|
1910
|
-
S != null && S.fill && !["none", "transparent"].includes(S.fill) &&
|
|
1910
|
+
S != null && S.fill && !["none", "transparent"].includes(S.fill) && y.add(V(S.fill)), S != null && S.stroke && !["none", "transparent"].includes(S.stroke) && y.add(V(S.stroke));
|
|
1911
1911
|
});
|
|
1912
1912
|
}
|
|
1913
|
-
["fill", "stroke", "stop-color"].forEach((
|
|
1914
|
-
const w =
|
|
1915
|
-
w && !["none", "transparent"].includes(w) &&
|
|
1913
|
+
["fill", "stroke", "stop-color"].forEach((v) => {
|
|
1914
|
+
const w = b.getAttribute(v);
|
|
1915
|
+
w && !["none", "transparent"].includes(w) && y.add(V(w));
|
|
1916
1916
|
});
|
|
1917
|
-
const f =
|
|
1917
|
+
const f = b.getAttribute("style");
|
|
1918
1918
|
if (f) {
|
|
1919
|
-
const
|
|
1920
|
-
if (
|
|
1921
|
-
const E =
|
|
1922
|
-
E && !["none", "transparent"].includes(E) &&
|
|
1919
|
+
const v = /fill\s*:\s*([^;]+);?/.exec(f), w = /stroke\s*:\s*([^;]+);?/.exec(f), S = /stop-color\s*:\s*([^;]+);?/.exec(f);
|
|
1920
|
+
if (v) {
|
|
1921
|
+
const E = v[1].trim();
|
|
1922
|
+
E && !["none", "transparent"].includes(E) && y.add(V(E));
|
|
1923
1923
|
}
|
|
1924
1924
|
if (w) {
|
|
1925
1925
|
const E = w[1].trim();
|
|
1926
|
-
E && !["none", "transparent"].includes(E) &&
|
|
1926
|
+
E && !["none", "transparent"].includes(E) && y.add(V(E));
|
|
1927
1927
|
}
|
|
1928
1928
|
if (S) {
|
|
1929
1929
|
const E = S[1].trim();
|
|
1930
|
-
E && !["none", "transparent"].includes(E) &&
|
|
1930
|
+
E && !["none", "transparent"].includes(E) && y.add(V(E));
|
|
1931
1931
|
}
|
|
1932
1932
|
}
|
|
1933
|
-
}),
|
|
1934
|
-
(
|
|
1935
|
-
), Array.from(u.querySelectorAll("*")).forEach((
|
|
1936
|
-
if (
|
|
1937
|
-
const _ =
|
|
1938
|
-
|
|
1933
|
+
}), y.forEach(
|
|
1934
|
+
(b) => !i.includes(b) && qe(b) && i.push(b)
|
|
1935
|
+
), Array.from(u.querySelectorAll("*")).forEach((b) => {
|
|
1936
|
+
if (b.hasAttribute("id")) {
|
|
1937
|
+
const _ = b.getAttribute("id");
|
|
1938
|
+
b.setAttribute("id", `${r}-${_}`);
|
|
1939
1939
|
}
|
|
1940
1940
|
if (["fill", "stroke", "stop-color", "filter", "clip-path", "mask"].forEach(
|
|
1941
1941
|
(_) => {
|
|
1942
|
-
const f =
|
|
1943
|
-
f && f.includes("url(#") &&
|
|
1942
|
+
const f = b.getAttribute(_);
|
|
1943
|
+
f && f.includes("url(#") && b.setAttribute(
|
|
1944
1944
|
_,
|
|
1945
1945
|
f.replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`)
|
|
1946
1946
|
);
|
|
1947
1947
|
}
|
|
1948
|
-
),
|
|
1949
|
-
const _ =
|
|
1950
|
-
_.includes("url(#") &&
|
|
1948
|
+
), b.hasAttribute("style")) {
|
|
1949
|
+
const _ = b.getAttribute("style");
|
|
1950
|
+
_.includes("url(#") && b.setAttribute(
|
|
1951
1951
|
"style",
|
|
1952
1952
|
_.replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`)
|
|
1953
1953
|
);
|
|
1954
1954
|
}
|
|
1955
|
-
}), Array.from(u.querySelectorAll("path")).forEach((
|
|
1956
|
-
if (hn(
|
|
1957
|
-
!bs(
|
|
1955
|
+
}), Array.from(u.querySelectorAll("path")).forEach((b) => {
|
|
1956
|
+
if (hn(b)) return;
|
|
1957
|
+
!bs(b) && !b.getAttribute("class") && (b.setAttribute("fill", "#000000"), i.includes("#000000") || i.push("#000000"));
|
|
1958
1958
|
}), { serializer: new XMLSerializer().serializeToString(u), colors: i };
|
|
1959
1959
|
}
|
|
1960
1960
|
const nr = {
|
|
@@ -2014,20 +2014,20 @@ function ht(t, r) {
|
|
|
2014
2014
|
x: t.size.width / 2,
|
|
2015
2015
|
y: t.size.height / 2
|
|
2016
2016
|
}, i = { x: r.width / 2, y: r.height / 2 };
|
|
2017
|
-
let
|
|
2017
|
+
let a;
|
|
2018
2018
|
if (e === "fill")
|
|
2019
|
-
|
|
2019
|
+
a = Math.max(
|
|
2020
2020
|
t.size.width / r.width,
|
|
2021
2021
|
t.size.height / r.height
|
|
2022
2022
|
);
|
|
2023
2023
|
else if (e === "fit") {
|
|
2024
2024
|
const d = t.scaleAspectRatio || 1;
|
|
2025
|
-
|
|
2025
|
+
a = Math.min(
|
|
2026
2026
|
t.size.width / r.width,
|
|
2027
2027
|
t.size.height / r.height
|
|
2028
2028
|
) * d;
|
|
2029
2029
|
} else
|
|
2030
|
-
|
|
2030
|
+
a = Math.min(
|
|
2031
2031
|
t.size.width / r.width,
|
|
2032
2032
|
t.size.height / r.height
|
|
2033
2033
|
);
|
|
@@ -2035,13 +2035,13 @@ function ht(t, r) {
|
|
|
2035
2035
|
return {
|
|
2036
2036
|
top: `${n.y - i.y}px`,
|
|
2037
2037
|
left: `${u}px`,
|
|
2038
|
-
transform: `scale(${
|
|
2038
|
+
transform: `scale(${a})`
|
|
2039
2039
|
};
|
|
2040
2040
|
}
|
|
2041
2041
|
const _s = async (t, r) => {
|
|
2042
2042
|
const e = t.details.src, n = await Xi(t), i = ht(r, {
|
|
2043
2043
|
...n
|
|
2044
|
-
}),
|
|
2044
|
+
}), a = ks(t.trim, { duration: n.duration }), u = {
|
|
2045
2045
|
width: n.width,
|
|
2046
2046
|
height: n.height,
|
|
2047
2047
|
opacity: 100,
|
|
@@ -2070,22 +2070,22 @@ const _s = async (t, r) => {
|
|
|
2070
2070
|
};
|
|
2071
2071
|
return {
|
|
2072
2072
|
...t,
|
|
2073
|
-
trim:
|
|
2073
|
+
trim: a,
|
|
2074
2074
|
type: "video",
|
|
2075
2075
|
name: "video",
|
|
2076
2076
|
details: u,
|
|
2077
2077
|
playbackRate: t.playbackRate || 1,
|
|
2078
|
-
display: pt(t.display, { duration: n.duration, trim:
|
|
2078
|
+
display: pt(t.display, { duration: n.duration, trim: a }),
|
|
2079
2079
|
duration: n.duration
|
|
2080
2080
|
};
|
|
2081
2081
|
}, Ss = async (t) => {
|
|
2082
|
-
const r = t.id, e = t.details, i = (await
|
|
2082
|
+
const r = t.id, e = t.details, i = (await ys(e.src)).duration, a = ks(t.trim, { duration: i });
|
|
2083
2083
|
return {
|
|
2084
2084
|
id: r,
|
|
2085
2085
|
name: t.name || "audio",
|
|
2086
2086
|
type: "audio",
|
|
2087
|
-
display: pt(t.display, { duration: i, trim:
|
|
2088
|
-
trim:
|
|
2087
|
+
display: pt(t.display, { duration: i, trim: a }),
|
|
2088
|
+
trim: a,
|
|
2089
2089
|
playbackRate: t.playbackRate || 1,
|
|
2090
2090
|
details: {
|
|
2091
2091
|
src: e.src,
|
|
@@ -2100,7 +2100,7 @@ const _s = async (t, r) => {
|
|
|
2100
2100
|
const e = t.id, n = {
|
|
2101
2101
|
width: ((c = t.details) == null ? void 0 : c.width) || r.size.width,
|
|
2102
2102
|
height: ((d = t.details) == null ? void 0 : d.height) || r.size.height
|
|
2103
|
-
}, i = t.details,
|
|
2103
|
+
}, i = t.details, a = ht(r, n), u = pt(t.display);
|
|
2104
2104
|
return {
|
|
2105
2105
|
id: e,
|
|
2106
2106
|
name: t.type,
|
|
@@ -2111,8 +2111,8 @@ const _s = async (t, r) => {
|
|
|
2111
2111
|
// Default width
|
|
2112
2112
|
height: (i == null ? void 0 : i.height) || n.height,
|
|
2113
2113
|
// Default height
|
|
2114
|
-
top: (i == null ? void 0 : i.top) ||
|
|
2115
|
-
left: (i == null ? void 0 : i.left) ||
|
|
2114
|
+
top: (i == null ? void 0 : i.top) || a.top,
|
|
2115
|
+
left: (i == null ? void 0 : i.left) || a.left,
|
|
2116
2116
|
border: i.border || "none",
|
|
2117
2117
|
// Default border
|
|
2118
2118
|
borderRadius: i.borderRadius || 0,
|
|
@@ -2138,7 +2138,7 @@ const _s = async (t, r) => {
|
|
|
2138
2138
|
const e = t.id, n = {
|
|
2139
2139
|
width: ((c = t.details) == null ? void 0 : c.width) || r.size.width,
|
|
2140
2140
|
height: ((d = t.details) == null ? void 0 : d.height) || r.size.height
|
|
2141
|
-
}, i = t.details,
|
|
2141
|
+
}, i = t.details, a = ht(r, n), u = pt(t.display);
|
|
2142
2142
|
return {
|
|
2143
2143
|
id: e,
|
|
2144
2144
|
name: t.type,
|
|
@@ -2149,8 +2149,8 @@ const _s = async (t, r) => {
|
|
|
2149
2149
|
// Default width
|
|
2150
2150
|
height: (i == null ? void 0 : i.height) || n.height,
|
|
2151
2151
|
// Default height
|
|
2152
|
-
top: (i == null ? void 0 : i.top) ||
|
|
2153
|
-
left: (i == null ? void 0 : i.left) ||
|
|
2152
|
+
top: (i == null ? void 0 : i.top) || a.top,
|
|
2153
|
+
left: (i == null ? void 0 : i.left) || a.left,
|
|
2154
2154
|
border: i.border || "none",
|
|
2155
2155
|
// Default border
|
|
2156
2156
|
borderRadius: i.borderRadius || 0,
|
|
@@ -2177,7 +2177,7 @@ const _s = async (t, r) => {
|
|
|
2177
2177
|
const e = t.id, n = {
|
|
2178
2178
|
width: ((c = t.details) == null ? void 0 : c.width) || r.size.width,
|
|
2179
2179
|
height: ((d = t.details) == null ? void 0 : d.height) || r.size.height
|
|
2180
|
-
}, i = t.details,
|
|
2180
|
+
}, i = t.details, a = ht(r, n), u = pt(t.display);
|
|
2181
2181
|
return {
|
|
2182
2182
|
id: e,
|
|
2183
2183
|
name: t.type,
|
|
@@ -2188,8 +2188,8 @@ const _s = async (t, r) => {
|
|
|
2188
2188
|
// Default width
|
|
2189
2189
|
height: (i == null ? void 0 : i.height) || n.height,
|
|
2190
2190
|
// Default height
|
|
2191
|
-
top: (i == null ? void 0 : i.top) ||
|
|
2192
|
-
left: (i == null ? void 0 : i.left) ||
|
|
2191
|
+
top: (i == null ? void 0 : i.top) || a.top,
|
|
2192
|
+
left: (i == null ? void 0 : i.left) || a.left,
|
|
2193
2193
|
radialBarColor: i.radialBarColor || "rgba(128, 128, 128,1)",
|
|
2194
2194
|
border: i.border || "none",
|
|
2195
2195
|
// Default border
|
|
@@ -2211,7 +2211,7 @@ const _s = async (t, r) => {
|
|
|
2211
2211
|
const e = t.id, n = {
|
|
2212
2212
|
width: ((c = t.details) == null ? void 0 : c.width) || r.size.width,
|
|
2213
2213
|
height: ((d = t.details) == null ? void 0 : d.height) || r.size.height
|
|
2214
|
-
}, i = t.details,
|
|
2214
|
+
}, i = t.details, a = ht(r, n), u = pt(t.display);
|
|
2215
2215
|
return {
|
|
2216
2216
|
id: e,
|
|
2217
2217
|
name: t.type,
|
|
@@ -2222,8 +2222,8 @@ const _s = async (t, r) => {
|
|
|
2222
2222
|
// Default width
|
|
2223
2223
|
height: (i == null ? void 0 : i.height) || n.height,
|
|
2224
2224
|
// Default height
|
|
2225
|
-
top: (i == null ? void 0 : i.top) ||
|
|
2226
|
-
left: (i == null ? void 0 : i.left) ||
|
|
2225
|
+
top: (i == null ? void 0 : i.top) || a.top,
|
|
2226
|
+
left: (i == null ? void 0 : i.left) || a.left,
|
|
2227
2227
|
border: i.border || "none",
|
|
2228
2228
|
// Default border
|
|
2229
2229
|
borderRadius: i.borderRadius || 0,
|
|
@@ -2249,7 +2249,7 @@ const _s = async (t, r) => {
|
|
|
2249
2249
|
const e = t.id, n = {
|
|
2250
2250
|
width: ((u = t.details) == null ? void 0 : u.width) || r.size.width,
|
|
2251
2251
|
height: ((c = t.details) == null ? void 0 : c.height) || r.size.height
|
|
2252
|
-
}, i = t.details,
|
|
2252
|
+
}, i = t.details, a = ht(r, n);
|
|
2253
2253
|
return {
|
|
2254
2254
|
id: e,
|
|
2255
2255
|
name: t.type,
|
|
@@ -2263,8 +2263,8 @@ const _s = async (t, r) => {
|
|
|
2263
2263
|
// Default width
|
|
2264
2264
|
height: (i == null ? void 0 : i.height) || n.height,
|
|
2265
2265
|
// Default height
|
|
2266
|
-
top: (i == null ? void 0 : i.top) ||
|
|
2267
|
-
left: (i == null ? void 0 : i.left) ||
|
|
2266
|
+
top: (i == null ? void 0 : i.top) || a.top,
|
|
2267
|
+
left: (i == null ? void 0 : i.left) || a.left,
|
|
2268
2268
|
border: i.border || "none",
|
|
2269
2269
|
// Default border
|
|
2270
2270
|
borderRadius: i.borderRadius || 0,
|
|
@@ -2298,18 +2298,18 @@ const _s = async (t, r) => {
|
|
|
2298
2298
|
metadata: {}
|
|
2299
2299
|
};
|
|
2300
2300
|
}, ws = async (t, r) => {
|
|
2301
|
-
var
|
|
2301
|
+
var y;
|
|
2302
2302
|
const e = t.trackItemIds, n = t.size || {
|
|
2303
2303
|
width: t.details.width,
|
|
2304
2304
|
height: t.details.height
|
|
2305
2305
|
}, i = Math.min(
|
|
2306
2306
|
r.size.width / n.width,
|
|
2307
2307
|
r.size.height / n.height
|
|
2308
|
-
),
|
|
2308
|
+
), a = ((y = t.details) == null ? void 0 : y.rotate) || 0, u = ht(r, n), c = t.display;
|
|
2309
2309
|
let d = 1 / 0, p = 0;
|
|
2310
2310
|
e.forEach((m) => {
|
|
2311
|
-
const
|
|
2312
|
-
|
|
2311
|
+
const I = t.trackItemsMap[m];
|
|
2312
|
+
I.display.from < d && (d = I.display.from), I.display.to > p && (p = I.display.to);
|
|
2313
2313
|
});
|
|
2314
2314
|
const h = t.trim || t.display || { from: d, to: p };
|
|
2315
2315
|
return {
|
|
@@ -2322,7 +2322,7 @@ const _s = async (t, r) => {
|
|
|
2322
2322
|
top: t.details.top || u.top,
|
|
2323
2323
|
left: t.details.left || u.left,
|
|
2324
2324
|
scale: i,
|
|
2325
|
-
rotate:
|
|
2325
|
+
rotate: a,
|
|
2326
2326
|
background: t.details.background || "transparent"
|
|
2327
2327
|
},
|
|
2328
2328
|
trim: h,
|
|
@@ -2337,10 +2337,10 @@ const _s = async (t, r) => {
|
|
|
2337
2337
|
}, i = Math.min(
|
|
2338
2338
|
r.size.width / n.width,
|
|
2339
2339
|
r.size.height / n.height
|
|
2340
|
-
),
|
|
2340
|
+
), a = ((h = t.details) == null ? void 0 : h.rotate) || 0, u = ht(r, n), c = t.display;
|
|
2341
2341
|
let d = 1 / 0, p = 0;
|
|
2342
|
-
return e.forEach((
|
|
2343
|
-
const m = t.trackItemsMap[
|
|
2342
|
+
return e.forEach((y) => {
|
|
2343
|
+
const m = t.trackItemsMap[y];
|
|
2344
2344
|
m.display.from < d && (d = m.display.from), m.display.to > p && (p = m.display.to);
|
|
2345
2345
|
}), {
|
|
2346
2346
|
id: t.id,
|
|
@@ -2352,20 +2352,20 @@ const _s = async (t, r) => {
|
|
|
2352
2352
|
top: t.details.top || u.top,
|
|
2353
2353
|
left: t.details.left || u.left,
|
|
2354
2354
|
scale: i,
|
|
2355
|
-
rotate:
|
|
2355
|
+
rotate: a
|
|
2356
2356
|
},
|
|
2357
2357
|
display: c || { from: d, to: p }
|
|
2358
2358
|
};
|
|
2359
2359
|
}, Ts = async (t, r) => {
|
|
2360
|
-
const e = t.details, n = Ue(e.src), i = fetch(e.src), [
|
|
2360
|
+
const e = t.details, n = Ue(e.src), i = fetch(e.src), [a, u] = await Promise.all([
|
|
2361
2361
|
n,
|
|
2362
2362
|
i
|
|
2363
|
-
]), c = await u.text(), d = ht(r,
|
|
2363
|
+
]), c = await u.text(), d = ht(r, a), { serializer: p, colors: h } = Zi(
|
|
2364
2364
|
qi(c),
|
|
2365
2365
|
t.id,
|
|
2366
|
-
Number(e.width ||
|
|
2367
|
-
Number(e.height ||
|
|
2368
|
-
),
|
|
2366
|
+
Number(e.width || a.width),
|
|
2367
|
+
Number(e.height || a.height)
|
|
2368
|
+
), y = t.details.colorMap || Object.fromEntries(h.map((m) => [m, m]));
|
|
2369
2369
|
return {
|
|
2370
2370
|
id: t.id,
|
|
2371
2371
|
name: "illustration",
|
|
@@ -2375,9 +2375,9 @@ const _s = async (t, r) => {
|
|
|
2375
2375
|
details: {
|
|
2376
2376
|
src: e.src || "",
|
|
2377
2377
|
// Default source URL
|
|
2378
|
-
width: e.width ||
|
|
2378
|
+
width: e.width || a.width || 100,
|
|
2379
2379
|
// Default width
|
|
2380
|
-
height: e.height ||
|
|
2380
|
+
height: e.height || a.height || 100,
|
|
2381
2381
|
// Default height
|
|
2382
2382
|
opacity: e.opacity ?? 100,
|
|
2383
2383
|
// Default opacity
|
|
@@ -2401,12 +2401,12 @@ const _s = async (t, r) => {
|
|
|
2401
2401
|
visibility: e.visibility || "visible",
|
|
2402
2402
|
svgString: p,
|
|
2403
2403
|
initialSvgString: C(p),
|
|
2404
|
-
colorMap:
|
|
2404
|
+
colorMap: y
|
|
2405
2405
|
},
|
|
2406
2406
|
metadata: t.metadata || {}
|
|
2407
2407
|
};
|
|
2408
2408
|
}, sa = async (t, r) => {
|
|
2409
|
-
const e = t.details, n = Ue(e.src), [i] = await Promise.all([n]),
|
|
2409
|
+
const e = t.details, n = Ue(e.src), [i] = await Promise.all([n]), a = ht(r, i);
|
|
2410
2410
|
return {
|
|
2411
2411
|
id: t.id,
|
|
2412
2412
|
name: "shape",
|
|
@@ -2422,15 +2422,15 @@ const _s = async (t, r) => {
|
|
|
2422
2422
|
// Default height
|
|
2423
2423
|
opacity: e.opacity ?? 100,
|
|
2424
2424
|
// Default opacity
|
|
2425
|
-
transform: e.transform ||
|
|
2425
|
+
transform: e.transform || a.transform,
|
|
2426
2426
|
// Default transform
|
|
2427
2427
|
border: e.border || "none",
|
|
2428
2428
|
// Default border
|
|
2429
2429
|
borderRadius: e.borderRadius || 0,
|
|
2430
2430
|
// Default border radius
|
|
2431
|
-
top: e.top ||
|
|
2431
|
+
top: e.top || a.top || "0px",
|
|
2432
2432
|
// Default top
|
|
2433
|
-
left: e.left ||
|
|
2433
|
+
left: e.left || a.left || "0px",
|
|
2434
2434
|
// Default left
|
|
2435
2435
|
borderWidth: e.borderWidth ?? 0,
|
|
2436
2436
|
// Default border width
|
|
@@ -2538,11 +2538,11 @@ const _s = async (t, r) => {
|
|
|
2538
2538
|
url: e.details.fontUrl
|
|
2539
2539
|
}
|
|
2540
2540
|
]);
|
|
2541
|
-
const n = e.id, i = e.details,
|
|
2541
|
+
const n = e.id, i = e.details, a = xs(i), u = i.height || gs(e.details.text, a), c = i.top != null && i.left != null ? {
|
|
2542
2542
|
top: `${i.top}px`,
|
|
2543
2543
|
left: `${i.left}px`
|
|
2544
2544
|
} : vs(r, {
|
|
2545
|
-
width:
|
|
2545
|
+
width: a.width,
|
|
2546
2546
|
height: u
|
|
2547
2547
|
});
|
|
2548
2548
|
return {
|
|
@@ -2552,14 +2552,14 @@ const _s = async (t, r) => {
|
|
|
2552
2552
|
display: pt(e.display),
|
|
2553
2553
|
details: {
|
|
2554
2554
|
...e.details,
|
|
2555
|
-
...
|
|
2555
|
+
...a,
|
|
2556
2556
|
text: i.text || "",
|
|
2557
2557
|
// Default text content
|
|
2558
2558
|
height: u,
|
|
2559
2559
|
// Default height
|
|
2560
2560
|
fontUrl: i.fontUrl,
|
|
2561
|
-
top:
|
|
2562
|
-
left:
|
|
2561
|
+
top: a.top || c.top,
|
|
2562
|
+
left: a.left || c.left,
|
|
2563
2563
|
borderWidth: i.borderWidth || 0,
|
|
2564
2564
|
borderColor: i.borderColor || "#000000",
|
|
2565
2565
|
boxShadow: i.boxShadow || nr,
|
|
@@ -2581,12 +2581,12 @@ const _s = async (t, r) => {
|
|
|
2581
2581
|
url: t.details.fontUrl
|
|
2582
2582
|
}
|
|
2583
2583
|
]);
|
|
2584
|
-
const e = t.id, n = t.details, i = xs(n),
|
|
2584
|
+
const e = t.id, n = t.details, i = xs(n), a = n.height || gs(t.details.text, i), u = n.top != null && n.left != null ? {
|
|
2585
2585
|
top: `${n.top}px`,
|
|
2586
2586
|
left: `${n.left}px`
|
|
2587
2587
|
} : vs(r, {
|
|
2588
2588
|
width: i.width,
|
|
2589
|
-
height:
|
|
2589
|
+
height: a
|
|
2590
2590
|
});
|
|
2591
2591
|
return {
|
|
2592
2592
|
id: e,
|
|
@@ -2598,7 +2598,7 @@ const _s = async (t, r) => {
|
|
|
2598
2598
|
...i,
|
|
2599
2599
|
text: n.text || "",
|
|
2600
2600
|
// Default text content
|
|
2601
|
-
height:
|
|
2601
|
+
height: a,
|
|
2602
2602
|
// Default height
|
|
2603
2603
|
fontUrl: n.fontUrl,
|
|
2604
2604
|
top: i.top || u.top,
|
|
@@ -2699,36 +2699,36 @@ async function oa(t, r) {
|
|
|
2699
2699
|
const h = e[p];
|
|
2700
2700
|
if (h.type === "text" || h.type === "caption") {
|
|
2701
2701
|
if (h.details.fontUrl) {
|
|
2702
|
-
const
|
|
2702
|
+
const y = {
|
|
2703
2703
|
fontFamily: h.details.fontFamily,
|
|
2704
2704
|
url: h.details.fontUrl
|
|
2705
2705
|
};
|
|
2706
|
-
n.add(JSON.stringify(
|
|
2706
|
+
n.add(JSON.stringify(y));
|
|
2707
2707
|
}
|
|
2708
2708
|
(u = h.animations) != null && u.in && h.animations.in.composition.forEach(
|
|
2709
|
-
(
|
|
2709
|
+
(y) => {
|
|
2710
2710
|
var m;
|
|
2711
|
-
(m =
|
|
2712
|
-
(
|
|
2713
|
-
n.add(JSON.stringify(
|
|
2711
|
+
(m = y.details) != null && m.fonts && y.details.fonts.forEach(
|
|
2712
|
+
(I) => {
|
|
2713
|
+
n.add(JSON.stringify(I));
|
|
2714
2714
|
}
|
|
2715
2715
|
);
|
|
2716
2716
|
}
|
|
2717
2717
|
), (c = h.animations) != null && c.loop && h.animations.loop.composition.forEach(
|
|
2718
|
-
(
|
|
2718
|
+
(y) => {
|
|
2719
2719
|
var m;
|
|
2720
|
-
(m =
|
|
2721
|
-
(
|
|
2722
|
-
n.add(JSON.stringify(
|
|
2720
|
+
(m = y.details) != null && m.fonts && y.details.fonts.forEach(
|
|
2721
|
+
(I) => {
|
|
2722
|
+
n.add(JSON.stringify(I));
|
|
2723
2723
|
}
|
|
2724
2724
|
);
|
|
2725
2725
|
}
|
|
2726
2726
|
), (d = h.animations) != null && d.out && h.animations.out.composition.forEach(
|
|
2727
|
-
(
|
|
2727
|
+
(y) => {
|
|
2728
2728
|
var m;
|
|
2729
|
-
(m =
|
|
2730
|
-
(
|
|
2731
|
-
n.add(JSON.stringify(
|
|
2729
|
+
(m = y.details) != null && m.fonts && y.details.fonts.forEach(
|
|
2730
|
+
(I) => {
|
|
2731
|
+
n.add(JSON.stringify(I));
|
|
2732
2732
|
}
|
|
2733
2733
|
);
|
|
2734
2734
|
}
|
|
@@ -2742,21 +2742,21 @@ async function oa(t, r) {
|
|
|
2742
2742
|
Array.from(n).map((p) => JSON.parse(p))
|
|
2743
2743
|
);
|
|
2744
2744
|
for (const [p, h] of i) {
|
|
2745
|
-
const
|
|
2745
|
+
const y = await Ts(
|
|
2746
2746
|
{ ...h.trackItem, details: h.details },
|
|
2747
2747
|
{
|
|
2748
2748
|
size: { width: h.details.width, height: h.details.height }
|
|
2749
2749
|
}
|
|
2750
2750
|
), m = Is(
|
|
2751
|
-
|
|
2751
|
+
y.details.svgString,
|
|
2752
2752
|
h.details.colorMap
|
|
2753
2753
|
);
|
|
2754
|
-
|
|
2754
|
+
y.details.svgString = m, e[p] = y;
|
|
2755
2755
|
}
|
|
2756
|
-
const
|
|
2756
|
+
const a = Y(e);
|
|
2757
2757
|
return {
|
|
2758
2758
|
...r,
|
|
2759
|
-
duration:
|
|
2759
|
+
duration: a
|
|
2760
2760
|
};
|
|
2761
2761
|
}
|
|
2762
2762
|
function ca(t) {
|
|
@@ -2771,8 +2771,8 @@ function ca(t) {
|
|
|
2771
2771
|
e.forEach((d) => {
|
|
2772
2772
|
i.trackItemsMap[d] = r.trackItemsMap[d], n.push(r.tracks.find((p) => p.items.includes(d)));
|
|
2773
2773
|
});
|
|
2774
|
-
const
|
|
2775
|
-
n.filter((d) =>
|
|
2774
|
+
const a = /* @__PURE__ */ new Set();
|
|
2775
|
+
n.filter((d) => a.has(d.id) ? !1 : (a.add(d.id), !0)), i.tracks = Array.from(a), i.activeIds.forEach((d) => {
|
|
2776
2776
|
if (i.trackItemsMap[d].type === "composition" || i.trackItemsMap[d].type === "template") {
|
|
2777
2777
|
const p = r.structure.find(
|
|
2778
2778
|
(h) => h.id === d
|
|
@@ -2791,7 +2791,7 @@ function ua(t, r) {
|
|
|
2791
2791
|
const n = e.activeIds[0], i = C(e.trackItemsMap[n]);
|
|
2792
2792
|
if (r >= i.display.to || r <= i.display.from)
|
|
2793
2793
|
return {};
|
|
2794
|
-
const
|
|
2794
|
+
const a = Ie(), u = {
|
|
2795
2795
|
...i,
|
|
2796
2796
|
display: {
|
|
2797
2797
|
from: i.display.from,
|
|
@@ -2799,7 +2799,7 @@ function ua(t, r) {
|
|
|
2799
2799
|
}
|
|
2800
2800
|
}, c = {
|
|
2801
2801
|
...i,
|
|
2802
|
-
id:
|
|
2802
|
+
id: a,
|
|
2803
2803
|
display: {
|
|
2804
2804
|
from: r,
|
|
2805
2805
|
to: i.display.to
|
|
@@ -2825,32 +2825,32 @@ function ua(t, r) {
|
|
|
2825
2825
|
e.transitionIds = e.transitionIds.filter(
|
|
2826
2826
|
(m) => m !== p.id
|
|
2827
2827
|
);
|
|
2828
|
-
const
|
|
2828
|
+
const y = {};
|
|
2829
2829
|
e.transitionIds.forEach(
|
|
2830
|
-
(m) =>
|
|
2831
|
-
), e.transitionsMap =
|
|
2830
|
+
(m) => y[m] = e.transitionsMap[m]
|
|
2831
|
+
), e.transitionsMap = y;
|
|
2832
2832
|
}
|
|
2833
2833
|
}
|
|
2834
2834
|
if (d) {
|
|
2835
|
-
const h = c.display.to - c.display.from,
|
|
2835
|
+
const h = c.display.to - c.display.from, y = {};
|
|
2836
2836
|
d.duration / 2 > h ? (e.transitionIds = e.transitionIds.filter(
|
|
2837
2837
|
(m) => m !== d.id
|
|
2838
2838
|
), e.transitionIds.forEach(
|
|
2839
|
-
(m) =>
|
|
2840
|
-
), e.transitionsMap =
|
|
2839
|
+
(m) => y[m] = e.transitionsMap[m]
|
|
2840
|
+
), e.transitionsMap = y) : (e.transitionIds = e.transitionIds.map((m) => e.transitionsMap[m].fromId === u.id ? m.replace(u.id, a) : m), Object.keys(e.transitionsMap).forEach((m) => {
|
|
2841
2841
|
if (e.transitionsMap[m].fromId === u.id) {
|
|
2842
|
-
const
|
|
2843
|
-
|
|
2842
|
+
const k = m.replace(u.id, a);
|
|
2843
|
+
y[k] = {
|
|
2844
2844
|
...e.transitionsMap[m],
|
|
2845
|
-
id:
|
|
2846
|
-
fromId:
|
|
2845
|
+
id: k,
|
|
2846
|
+
fromId: a
|
|
2847
2847
|
};
|
|
2848
2848
|
} else
|
|
2849
|
-
|
|
2850
|
-
}), e.transitionsMap =
|
|
2849
|
+
y[m] = e.transitionsMap[m];
|
|
2850
|
+
}), e.transitionsMap = y);
|
|
2851
2851
|
}
|
|
2852
|
-
return e.trackItemsMap[n] = u, e.trackItemsMap[
|
|
2853
|
-
h.items.includes(n) && h.items.push(
|
|
2852
|
+
return e.trackItemsMap[n] = u, e.trackItemsMap[a] = c, e.trackItemIds.push(a), e.tracks.forEach((h) => {
|
|
2853
|
+
h.items.includes(n) && h.items.push(a);
|
|
2854
2854
|
}), {
|
|
2855
2855
|
tracks: e.tracks,
|
|
2856
2856
|
trackItemIds: e.trackItemIds,
|
|
@@ -2878,11 +2878,11 @@ async function la(t, r) {
|
|
|
2878
2878
|
...n[c].metadata,
|
|
2879
2879
|
...d.metadata
|
|
2880
2880
|
} : n[c].metadata = d.metadata), d.display || d.playbackRate) {
|
|
2881
|
-
const p = d.playbackRate, h = n[c].playbackRate || 1,
|
|
2882
|
-
from:
|
|
2883
|
-
to:
|
|
2881
|
+
const p = d.playbackRate, h = n[c].playbackRate || 1, y = n[c].display, k = (y.to - y.from) * h / p, b = {
|
|
2882
|
+
from: y.from,
|
|
2883
|
+
to: y.from + k
|
|
2884
2884
|
};
|
|
2885
|
-
n[c].display =
|
|
2885
|
+
n[c].display = b, n[c].playbackRate = p;
|
|
2886
2886
|
}
|
|
2887
2887
|
d.animations && (n[c].animations = {
|
|
2888
2888
|
...n[c].animations,
|
|
@@ -2901,39 +2901,39 @@ async function la(t, r) {
|
|
|
2901
2901
|
return d.display !== void 0 || d.playbackRate !== void 0;
|
|
2902
2902
|
})) {
|
|
2903
2903
|
const c = e.tracks.filter((h) => h.magnetic);
|
|
2904
|
-
i.filter((h) => c.some((
|
|
2904
|
+
i.filter((h) => c.some((y) => y.items.includes(h))).length > 0 && Q(c, n, []);
|
|
2905
2905
|
const p = [];
|
|
2906
2906
|
for (const h of i) {
|
|
2907
|
-
const
|
|
2908
|
-
if (
|
|
2907
|
+
const y = r[h];
|
|
2908
|
+
if (y.playbackRate === void 0 && y.display === void 0)
|
|
2909
2909
|
continue;
|
|
2910
2910
|
const m = n[h];
|
|
2911
2911
|
if (!m) continue;
|
|
2912
|
-
const
|
|
2913
|
-
(
|
|
2912
|
+
const I = e.tracks.find(
|
|
2913
|
+
(v) => v.items.includes(h)
|
|
2914
2914
|
);
|
|
2915
|
-
if (!
|
|
2916
|
-
const
|
|
2915
|
+
if (!I || I.magnetic) continue;
|
|
2916
|
+
const k = m.display;
|
|
2917
2917
|
if (Object.values(
|
|
2918
2918
|
e.transitionsMap
|
|
2919
2919
|
).filter(
|
|
2920
|
-
(
|
|
2921
|
-
).forEach((
|
|
2922
|
-
const w = n[
|
|
2920
|
+
(v) => v.fromId === h || v.toId === h
|
|
2921
|
+
).forEach((v) => {
|
|
2922
|
+
const w = n[v.fromId], S = n[v.toId];
|
|
2923
2923
|
if (!w || !S) {
|
|
2924
|
-
p.push(
|
|
2924
|
+
p.push(v.id);
|
|
2925
2925
|
return;
|
|
2926
2926
|
}
|
|
2927
2927
|
const E = w.display, T = S.display, M = E.to, L = T.from;
|
|
2928
|
-
Math.abs(M - L) <= 1 || p.push(
|
|
2929
|
-
}),
|
|
2930
|
-
const w =
|
|
2931
|
-
return !(
|
|
2928
|
+
Math.abs(M - L) <= 1 || p.push(v.id);
|
|
2929
|
+
}), I.items.map((v) => n[v]).filter((v) => v && v.id !== h).some((v) => {
|
|
2930
|
+
const w = v.display.from, S = v.display.to, E = k.from;
|
|
2931
|
+
return !(k.to <= w || E >= S);
|
|
2932
2932
|
})) {
|
|
2933
|
-
const
|
|
2934
|
-
(E) => E.id ===
|
|
2933
|
+
const v = e.tracks.findIndex(
|
|
2934
|
+
(E) => E.id === I.id
|
|
2935
2935
|
);
|
|
2936
|
-
|
|
2936
|
+
I.items = I.items.filter(
|
|
2937
2937
|
(E) => E !== h
|
|
2938
2938
|
);
|
|
2939
2939
|
const w = {
|
|
@@ -2943,7 +2943,7 @@ async function la(t, r) {
|
|
|
2943
2943
|
items: [h],
|
|
2944
2944
|
magnetic: !1,
|
|
2945
2945
|
static: !1
|
|
2946
|
-
}, S = Math.max(0,
|
|
2946
|
+
}, S = Math.max(0, v - 1);
|
|
2947
2947
|
e.tracks.splice(S, 0, w);
|
|
2948
2948
|
}
|
|
2949
2949
|
}
|
|
@@ -2953,7 +2953,7 @@ async function la(t, r) {
|
|
|
2953
2953
|
delete e.transitionsMap[h];
|
|
2954
2954
|
}));
|
|
2955
2955
|
}
|
|
2956
|
-
const u =
|
|
2956
|
+
const u = Y(n);
|
|
2957
2957
|
return {
|
|
2958
2958
|
trackItemsMap: { ...n },
|
|
2959
2959
|
tracks: e.tracks,
|
|
@@ -2963,36 +2963,58 @@ async function la(t, r) {
|
|
|
2963
2963
|
};
|
|
2964
2964
|
}
|
|
2965
2965
|
async function da(t, r) {
|
|
2966
|
-
const e = C(t), n = Object.keys(r)[0], i = Object.values(r)[0],
|
|
2966
|
+
const e = C(t), n = Object.keys(r)[0], i = Object.values(r)[0], a = e.trackItemsMap[n], u = a.details;
|
|
2967
2967
|
if (!i.details.src) return {};
|
|
2968
|
-
if (
|
|
2969
|
-
const
|
|
2970
|
-
let
|
|
2971
|
-
const
|
|
2972
|
-
|
|
2968
|
+
if (a.type === "image") {
|
|
2969
|
+
const p = await Ue(i.details.src), h = a.details.width || 0, y = a.details.height || 0;
|
|
2970
|
+
let m = p.width, I = p.height;
|
|
2971
|
+
const k = p.width / p.height;
|
|
2972
|
+
h / y > k ? (m = h, I = h / k) : (I = y, m = y * k), u.crop = {
|
|
2973
2973
|
x: 0,
|
|
2974
2974
|
y: 0,
|
|
2975
2975
|
height: u.height,
|
|
2976
2976
|
width: u.width
|
|
2977
|
-
}, i.details.width =
|
|
2978
|
-
} else if (
|
|
2979
|
-
const
|
|
2980
|
-
let
|
|
2981
|
-
const
|
|
2982
|
-
|
|
2977
|
+
}, i.details.width = m, i.details.height = I;
|
|
2978
|
+
} else if (a.type === "video") {
|
|
2979
|
+
const p = await zn(i.details.src), h = a.details.width || 0, y = a.details.height || 0;
|
|
2980
|
+
let m = p.width, I = p.height;
|
|
2981
|
+
const k = p.width / p.height;
|
|
2982
|
+
h / y > k ? (m = h, I = h / k) : (I = y, m = y * k), u.crop = {
|
|
2983
2983
|
x: 0,
|
|
2984
2984
|
y: 0,
|
|
2985
2985
|
height: u.height,
|
|
2986
2986
|
width: u.width
|
|
2987
|
-
}, i.details.width =
|
|
2987
|
+
}, i.details.width = m, i.details.height = I, a.duration = p.duration, a.trim = {
|
|
2988
|
+
from: 0,
|
|
2989
|
+
to: p.duration
|
|
2990
|
+
};
|
|
2991
|
+
const b = a.playbackRate || 1, _ = p.duration / b, f = a.display.from + _;
|
|
2992
|
+
a.trim = {
|
|
2993
|
+
from: 0,
|
|
2994
|
+
to: a.display.to - a.display.from
|
|
2995
|
+
}, a.display = {
|
|
2996
|
+
from: a.display.from,
|
|
2997
|
+
to: (a.duration || 0) >= p.duration ? a.display.to : f
|
|
2998
|
+
};
|
|
2988
2999
|
}
|
|
2989
|
-
|
|
3000
|
+
i.details && (a.details = { ...u, ...i.details }, i.details = a.details), e.trackItemsMap[n] = {
|
|
2990
3001
|
...e.trackItemsMap[n],
|
|
2991
3002
|
type: i.type
|
|
2992
|
-
},
|
|
3003
|
+
}, a.type === "video" && (e.trackItemsMap[n].display = a.display, e.trackItemsMap[n].duration = a.duration, e.trackItemsMap[n].trim = a.trim);
|
|
3004
|
+
const c = e.tracks.find(
|
|
3005
|
+
(p) => p.items.includes(n)
|
|
3006
|
+
);
|
|
3007
|
+
if (c && c.magnetic && a.type === "video") {
|
|
3008
|
+
const p = e.tracks.filter((h) => h.magnetic);
|
|
3009
|
+
Q(p, e.trackItemsMap, []);
|
|
3010
|
+
}
|
|
3011
|
+
const d = Y(e.trackItemsMap);
|
|
3012
|
+
return {
|
|
2993
3013
|
trackItemsMap: {
|
|
2994
3014
|
...e.trackItemsMap
|
|
2995
|
-
}
|
|
3015
|
+
},
|
|
3016
|
+
tracks: e.tracks,
|
|
3017
|
+
duration: d
|
|
2996
3018
|
};
|
|
2997
3019
|
}
|
|
2998
3020
|
function fa(t, r) {
|
|
@@ -3012,7 +3034,7 @@ function pa(t, { idTrack: r, idItems: e }, n) {
|
|
|
3012
3034
|
{ display: { to: 0 } }
|
|
3013
3035
|
).display.to;
|
|
3014
3036
|
e.forEach((c) => {
|
|
3015
|
-
const d = t.find((
|
|
3037
|
+
const d = t.find((y) => String(y.id) === String(c));
|
|
3016
3038
|
if (!d) return;
|
|
3017
3039
|
const p = d.playbackRate || 1;
|
|
3018
3040
|
let h;
|
|
@@ -3022,50 +3044,50 @@ function pa(t, { idTrack: r, idItems: e }, n) {
|
|
|
3022
3044
|
async function ha(t, r, e = {}) {
|
|
3023
3045
|
var m;
|
|
3024
3046
|
const n = C(t), i = r.trackItems.map(
|
|
3025
|
-
(
|
|
3047
|
+
(I) => aa(I, {
|
|
3026
3048
|
size: n.size
|
|
3027
3049
|
})
|
|
3028
|
-
),
|
|
3029
|
-
(m = r.tracks) == null || m.forEach((
|
|
3050
|
+
), a = await Promise.all(i);
|
|
3051
|
+
(m = r.tracks) == null || m.forEach((I) => {
|
|
3030
3052
|
pa(
|
|
3031
|
-
|
|
3032
|
-
{ idTrack:
|
|
3053
|
+
a,
|
|
3054
|
+
{ idTrack: I.id, idItems: I.items },
|
|
3033
3055
|
n
|
|
3034
3056
|
);
|
|
3035
3057
|
});
|
|
3036
|
-
const u = Cs(r.tracks, r.trackItems), c = [], d =
|
|
3037
|
-
r.trackItems.forEach((
|
|
3038
|
-
if (
|
|
3058
|
+
const u = Cs(r.tracks, r.trackItems), c = [], d = a.map((I) => I.id);
|
|
3059
|
+
r.trackItems.forEach((I) => {
|
|
3060
|
+
if (I.type !== "template") return;
|
|
3039
3061
|
n.trackItemsMap = {
|
|
3040
3062
|
...n.trackItemsMap,
|
|
3041
|
-
...
|
|
3063
|
+
...I.trackItemsMap
|
|
3042
3064
|
}, n.transitionsMap = {
|
|
3043
3065
|
...n.transitionsMap,
|
|
3044
|
-
...
|
|
3066
|
+
...I.transitionsMap
|
|
3045
3067
|
};
|
|
3046
|
-
const
|
|
3047
|
-
id:
|
|
3048
|
-
items:
|
|
3049
|
-
transitions:
|
|
3050
|
-
tracks:
|
|
3068
|
+
const k = {
|
|
3069
|
+
id: I.id,
|
|
3070
|
+
items: I.trackItemIds,
|
|
3071
|
+
transitions: I.transitionsIds || [],
|
|
3072
|
+
tracks: I.tracks
|
|
3051
3073
|
};
|
|
3052
|
-
c.push(
|
|
3074
|
+
c.push(k);
|
|
3053
3075
|
});
|
|
3054
3076
|
const p = [], h = {};
|
|
3055
|
-
return
|
|
3056
|
-
p.push(
|
|
3057
|
-
}), u.map((
|
|
3058
|
-
if (
|
|
3059
|
-
n.tracks.forEach((
|
|
3060
|
-
|
|
3061
|
-
[
|
|
3077
|
+
return a.forEach((I) => {
|
|
3078
|
+
p.push(I.id), h[I.id] = I;
|
|
3079
|
+
}), u.map((I) => Os(n.tracks, [I]) ? I : null).forEach((I, k) => {
|
|
3080
|
+
if (I)
|
|
3081
|
+
n.tracks.forEach((b) => {
|
|
3082
|
+
b.id === I.id && (b.items = b.items.concat(I.items), b.magnetic && Q(
|
|
3083
|
+
[b],
|
|
3062
3084
|
n.trackItemsMap,
|
|
3063
3085
|
d
|
|
3064
3086
|
));
|
|
3065
3087
|
});
|
|
3066
3088
|
else {
|
|
3067
|
-
const
|
|
3068
|
-
Math.max(
|
|
3089
|
+
const b = e.trackIndex || 0, _ = u[k], f = Math.min(
|
|
3090
|
+
Math.max(b, 0),
|
|
3069
3091
|
n.tracks.length
|
|
3070
3092
|
);
|
|
3071
3093
|
n.tracks.splice(f, 0, _);
|
|
@@ -3076,7 +3098,7 @@ async function ha(t, r, e = {}) {
|
|
|
3076
3098
|
}, n.trackItemIds = [
|
|
3077
3099
|
...n.trackItemIds,
|
|
3078
3100
|
...p
|
|
3079
|
-
], n.structure = [...n.structure, ...c], n.duration =
|
|
3101
|
+
], n.structure = [...n.structure, ...c], n.duration = Y(n.trackItemsMap), {
|
|
3080
3102
|
trackItemIds: n.trackItemIds,
|
|
3081
3103
|
trackItemsMap: n.trackItemsMap,
|
|
3082
3104
|
tracks: n.tracks,
|
|
@@ -3089,9 +3111,9 @@ async function ha(t, r, e = {}) {
|
|
|
3089
3111
|
function St(t, r, e = {
|
|
3090
3112
|
isNewTrack: !0
|
|
3091
3113
|
}) {
|
|
3092
|
-
const n = r.map((u) => u.id), i = [],
|
|
3114
|
+
const n = r.map((u) => u.id), i = [], a = {};
|
|
3093
3115
|
if (r.forEach((u) => {
|
|
3094
|
-
i.push(u.id),
|
|
3116
|
+
i.push(u.id), a[u.id] = u;
|
|
3095
3117
|
}), (e.targetTrackIndex !== void 0 || e.targetTrackId) && !e.isNewTrack) {
|
|
3096
3118
|
const u = e.targetTrackIndex || 0, c = e.targetTrackId;
|
|
3097
3119
|
let d = t.tracks[u];
|
|
@@ -3111,7 +3133,7 @@ function St(t, r, e = {
|
|
|
3111
3133
|
}
|
|
3112
3134
|
return t.trackItemsMap = {
|
|
3113
3135
|
...t.trackItemsMap,
|
|
3114
|
-
...
|
|
3136
|
+
...a
|
|
3115
3137
|
}, t.trackItemIds = [
|
|
3116
3138
|
...t.trackItemIds,
|
|
3117
3139
|
...i
|
|
@@ -3124,36 +3146,36 @@ async function ma(t, r, e = {}) {
|
|
|
3124
3146
|
scaleMode: e.scaleMode,
|
|
3125
3147
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3126
3148
|
})
|
|
3127
|
-
],
|
|
3128
|
-
return
|
|
3149
|
+
], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e), d = c.tracks.filter((p) => p.magnetic);
|
|
3150
|
+
return Q(d, c.trackItemsMap, u), c.duration = Y(c.trackItemsMap), {
|
|
3129
3151
|
trackItemIds: c.trackItemIds,
|
|
3130
3152
|
trackItemsMap: c.trackItemsMap,
|
|
3131
3153
|
tracks: c.tracks,
|
|
3132
3154
|
duration: c.duration
|
|
3133
3155
|
};
|
|
3134
3156
|
}
|
|
3135
|
-
async function
|
|
3136
|
-
const n = C(t), i = [Ss(r)],
|
|
3137
|
-
c.duration =
|
|
3157
|
+
async function ya(t, r, e = {}) {
|
|
3158
|
+
const n = C(t), i = [Ss(r)], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e);
|
|
3159
|
+
c.duration = Y(c.trackItemsMap);
|
|
3138
3160
|
const d = c.tracks.filter((p) => p.magnetic);
|
|
3139
|
-
return
|
|
3161
|
+
return Q(d, c.trackItemsMap, u), {
|
|
3140
3162
|
trackItemIds: c.trackItemIds,
|
|
3141
3163
|
trackItemsMap: c.trackItemsMap,
|
|
3142
3164
|
tracks: c.tracks,
|
|
3143
3165
|
duration: c.duration
|
|
3144
3166
|
};
|
|
3145
3167
|
}
|
|
3146
|
-
async function
|
|
3168
|
+
async function ga(t, r, e = {}) {
|
|
3147
3169
|
const n = C(t), i = [
|
|
3148
3170
|
_s(r, {
|
|
3149
3171
|
size: n.size,
|
|
3150
3172
|
scaleMode: e.scaleMode,
|
|
3151
3173
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3152
3174
|
})
|
|
3153
|
-
],
|
|
3154
|
-
c.duration =
|
|
3175
|
+
], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e);
|
|
3176
|
+
c.duration = Y(c.trackItemsMap);
|
|
3155
3177
|
const d = c.tracks.filter((p) => p.magnetic);
|
|
3156
|
-
return
|
|
3178
|
+
return Q(d, c.trackItemsMap, u), {
|
|
3157
3179
|
trackItemIds: c.trackItemIds,
|
|
3158
3180
|
trackItemsMap: c.trackItemsMap,
|
|
3159
3181
|
tracks: c.tracks,
|
|
@@ -3165,10 +3187,10 @@ async function Ia(t, r, e = {}) {
|
|
|
3165
3187
|
As(r, {
|
|
3166
3188
|
size: e.size
|
|
3167
3189
|
})
|
|
3168
|
-
],
|
|
3169
|
-
c.duration =
|
|
3190
|
+
], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e);
|
|
3191
|
+
c.duration = Y(c.trackItemsMap);
|
|
3170
3192
|
const d = c.tracks.filter((p) => p.magnetic);
|
|
3171
|
-
return
|
|
3193
|
+
return Q(d, c.trackItemsMap, u), {
|
|
3172
3194
|
trackItemIds: c.trackItemIds,
|
|
3173
3195
|
trackItemsMap: c.trackItemsMap,
|
|
3174
3196
|
tracks: c.tracks,
|
|
@@ -3182,10 +3204,10 @@ async function ba(t, r, e = {}) {
|
|
|
3182
3204
|
scaleMode: e.scaleMode,
|
|
3183
3205
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3184
3206
|
})
|
|
3185
|
-
],
|
|
3186
|
-
c.duration =
|
|
3207
|
+
], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e);
|
|
3208
|
+
c.duration = Y(c.trackItemsMap);
|
|
3187
3209
|
const d = c.tracks.filter((p) => p.magnetic);
|
|
3188
|
-
return
|
|
3210
|
+
return Q(d, c.trackItemsMap, u), {
|
|
3189
3211
|
trackItemIds: c.trackItemIds,
|
|
3190
3212
|
trackItemsMap: c.trackItemsMap,
|
|
3191
3213
|
tracks: c.tracks,
|
|
@@ -3199,10 +3221,10 @@ async function ka(t, r, e = {}) {
|
|
|
3199
3221
|
scaleMode: e.scaleMode,
|
|
3200
3222
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3201
3223
|
})
|
|
3202
|
-
],
|
|
3203
|
-
c.duration =
|
|
3224
|
+
], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e);
|
|
3225
|
+
c.duration = Y(c.trackItemsMap);
|
|
3204
3226
|
const d = c.tracks.filter((p) => p.magnetic);
|
|
3205
|
-
return
|
|
3227
|
+
return Q(d, c.trackItemsMap, u), {
|
|
3206
3228
|
trackItemIds: c.trackItemIds,
|
|
3207
3229
|
trackItemsMap: c.trackItemsMap,
|
|
3208
3230
|
tracks: c.tracks,
|
|
@@ -3210,47 +3232,47 @@ async function ka(t, r, e = {}) {
|
|
|
3210
3232
|
};
|
|
3211
3233
|
}
|
|
3212
3234
|
async function va(t, r, e = {}) {
|
|
3213
|
-
const n = C(t), i = "composition",
|
|
3235
|
+
const n = C(t), i = "composition", a = r.trackItemsMap, u = r.trackItemIds, c = r.tracks || [], d = r.trackItemDetailsMap, { details: p, ...h } = await na(r, {
|
|
3214
3236
|
size: n.size,
|
|
3215
3237
|
scaleMode: e.scaleMode,
|
|
3216
3238
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3217
|
-
}),
|
|
3239
|
+
}), y = {
|
|
3218
3240
|
id: h.id,
|
|
3219
3241
|
items: u,
|
|
3220
3242
|
transitions: [],
|
|
3221
3243
|
tracks: c
|
|
3222
|
-
},
|
|
3244
|
+
}, I = [{
|
|
3223
3245
|
...h,
|
|
3224
3246
|
type: i,
|
|
3225
3247
|
details: p
|
|
3226
|
-
}],
|
|
3227
|
-
|
|
3228
|
-
...
|
|
3229
|
-
...
|
|
3248
|
+
}], k = St(n, I, e);
|
|
3249
|
+
k.trackItemsMap = {
|
|
3250
|
+
...k.trackItemsMap,
|
|
3251
|
+
...a,
|
|
3230
3252
|
[h.id]: {
|
|
3231
3253
|
...h,
|
|
3232
3254
|
type: i,
|
|
3233
3255
|
details: p
|
|
3234
3256
|
}
|
|
3235
|
-
},
|
|
3236
|
-
const
|
|
3237
|
-
return
|
|
3238
|
-
|
|
3239
|
-
...
|
|
3257
|
+
}, k.structure = [...k.structure, y], k.duration = Y(k.trackItemsMap);
|
|
3258
|
+
const b = k.tracks.filter((_) => _.magnetic);
|
|
3259
|
+
return Q(b, k.trackItemsMap, [h.id]), d && Object.keys(d).forEach((_) => {
|
|
3260
|
+
k.trackItemsMap[_] = {
|
|
3261
|
+
...k.trackItemsMap[_],
|
|
3240
3262
|
details: {
|
|
3241
3263
|
...d[_].details
|
|
3242
3264
|
}
|
|
3243
3265
|
};
|
|
3244
3266
|
}), {
|
|
3245
|
-
trackItemIds:
|
|
3246
|
-
trackItemsMap:
|
|
3247
|
-
tracks:
|
|
3248
|
-
duration:
|
|
3249
|
-
structure:
|
|
3267
|
+
trackItemIds: k.trackItemIds,
|
|
3268
|
+
trackItemsMap: k.trackItemsMap,
|
|
3269
|
+
tracks: k.tracks,
|
|
3270
|
+
duration: k.duration,
|
|
3271
|
+
structure: k.structure
|
|
3250
3272
|
};
|
|
3251
3273
|
}
|
|
3252
|
-
async function
|
|
3253
|
-
const i = C(t),
|
|
3274
|
+
async function ye(t, r, e = {}, n) {
|
|
3275
|
+
const i = C(t), a = (y) => y.display ? y.display : {
|
|
3254
3276
|
from: 0,
|
|
3255
3277
|
to: i.duration
|
|
3256
3278
|
}, u = [];
|
|
@@ -3266,25 +3288,25 @@ async function ge(t, r, e = {}, n) {
|
|
|
3266
3288
|
scaleMode: e.scaleMode,
|
|
3267
3289
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3268
3290
|
})
|
|
3269
|
-
), n === "radial-audio-bars" && (r.display =
|
|
3291
|
+
), n === "radial-audio-bars" && (r.display = a(r), u.push(
|
|
3270
3292
|
ea(r, {
|
|
3271
3293
|
size: i.size,
|
|
3272
3294
|
scaleMode: e.scaleMode,
|
|
3273
3295
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3274
3296
|
})
|
|
3275
|
-
)), n === "lineal-audio-bars" && (r.display =
|
|
3297
|
+
)), n === "lineal-audio-bars" && (r.display = a(r), u.push(
|
|
3276
3298
|
mn(r, {
|
|
3277
3299
|
size: i.size,
|
|
3278
3300
|
scaleMode: e.scaleMode,
|
|
3279
3301
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3280
3302
|
})
|
|
3281
|
-
)), n === "wave-audio-bars" && (r.display =
|
|
3303
|
+
)), n === "wave-audio-bars" && (r.display = a(r), u.push(
|
|
3282
3304
|
mn(r, {
|
|
3283
3305
|
size: i.size,
|
|
3284
3306
|
scaleMode: e.scaleMode,
|
|
3285
3307
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3286
3308
|
})
|
|
3287
|
-
)), n === "hill-audio-bars" && (r.display =
|
|
3309
|
+
)), n === "hill-audio-bars" && (r.display = a(r), u.push(
|
|
3288
3310
|
mn(r, {
|
|
3289
3311
|
size: i.size,
|
|
3290
3312
|
scaleMode: e.scaleMode,
|
|
@@ -3297,10 +3319,10 @@ async function ge(t, r, e = {}, n) {
|
|
|
3297
3319
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3298
3320
|
})
|
|
3299
3321
|
);
|
|
3300
|
-
const c = await Promise.all(u), d = c.map((
|
|
3301
|
-
p.duration =
|
|
3302
|
-
const h = p.tracks.filter((
|
|
3303
|
-
return
|
|
3322
|
+
const c = await Promise.all(u), d = c.map((y) => y.id), p = St(i, c, e);
|
|
3323
|
+
p.duration = Y(p.trackItemsMap);
|
|
3324
|
+
const h = p.tracks.filter((y) => y.magnetic);
|
|
3325
|
+
return Q(h, p.trackItemsMap, d), {
|
|
3304
3326
|
trackItemIds: p.trackItemIds,
|
|
3305
3327
|
trackItemsMap: p.trackItemsMap,
|
|
3306
3328
|
tracks: p.tracks,
|
|
@@ -3308,20 +3330,20 @@ async function ge(t, r, e = {}, n) {
|
|
|
3308
3330
|
};
|
|
3309
3331
|
}
|
|
3310
3332
|
async function _a(t, r, e = {}) {
|
|
3311
|
-
const n = C(t), i = "template",
|
|
3333
|
+
const n = C(t), i = "template", a = r.trackItemsMap, u = r.trackItemIds, c = r.transitionsMap, d = r.transitionIds || [], p = r.tracks || [], h = r.structure || [], { details: y, ...m } = await ws(r, {
|
|
3312
3334
|
size: n.size,
|
|
3313
3335
|
scaleMode: e.scaleMode,
|
|
3314
3336
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3315
|
-
}),
|
|
3337
|
+
}), I = {
|
|
3316
3338
|
id: m.id,
|
|
3317
3339
|
items: u,
|
|
3318
3340
|
transitions: d,
|
|
3319
3341
|
tracks: p
|
|
3320
|
-
},
|
|
3342
|
+
}, b = [{
|
|
3321
3343
|
...m,
|
|
3322
3344
|
type: i,
|
|
3323
|
-
details:
|
|
3324
|
-
}], _ = St(n,
|
|
3345
|
+
details: y
|
|
3346
|
+
}], _ = St(n, b, e);
|
|
3325
3347
|
_.transitionIds = [
|
|
3326
3348
|
..._.transitionIds,
|
|
3327
3349
|
...d
|
|
@@ -3330,19 +3352,19 @@ async function _a(t, r, e = {}) {
|
|
|
3330
3352
|
...c
|
|
3331
3353
|
}, _.trackItemsMap = {
|
|
3332
3354
|
..._.trackItemsMap,
|
|
3333
|
-
...
|
|
3355
|
+
...a,
|
|
3334
3356
|
[m.id]: {
|
|
3335
3357
|
...m,
|
|
3336
3358
|
type: i,
|
|
3337
|
-
details:
|
|
3359
|
+
details: y
|
|
3338
3360
|
}
|
|
3339
3361
|
}, _.structure = [
|
|
3340
3362
|
..._.structure,
|
|
3341
|
-
|
|
3363
|
+
I,
|
|
3342
3364
|
...h
|
|
3343
|
-
], _.duration =
|
|
3344
|
-
const f = _.tracks.filter((
|
|
3345
|
-
return
|
|
3365
|
+
], _.duration = Y(_.trackItemsMap);
|
|
3366
|
+
const f = _.tracks.filter((v) => v.magnetic);
|
|
3367
|
+
return Q(f, _.trackItemsMap, [m.id]), {
|
|
3346
3368
|
trackItemIds: _.trackItemIds,
|
|
3347
3369
|
trackItemsMap: _.trackItemsMap,
|
|
3348
3370
|
tracks: _.tracks,
|
|
@@ -3353,29 +3375,29 @@ async function _a(t, r, e = {}) {
|
|
|
3353
3375
|
}
|
|
3354
3376
|
async function Sa(t, r, e = {}) {
|
|
3355
3377
|
const n = C(t), i = r.trackItems.map(
|
|
3356
|
-
(
|
|
3378
|
+
(y) => Es(y, {
|
|
3357
3379
|
size: e.size
|
|
3358
3380
|
})
|
|
3359
|
-
),
|
|
3360
|
-
if (
|
|
3361
|
-
const { details: m, ...
|
|
3362
|
-
c.push(
|
|
3381
|
+
), a = await Promise.all(i), u = Cs(r.tracks, r.trackItems), c = [], d = {};
|
|
3382
|
+
if (a.forEach((y) => {
|
|
3383
|
+
const { details: m, ...I } = y;
|
|
3384
|
+
c.push(y.id), d[y.id] = I;
|
|
3363
3385
|
}), Os(
|
|
3364
3386
|
n.tracks,
|
|
3365
3387
|
u
|
|
3366
3388
|
))
|
|
3367
|
-
n.tracks.forEach((
|
|
3389
|
+
n.tracks.forEach((y) => {
|
|
3368
3390
|
u.forEach((m) => {
|
|
3369
|
-
|
|
3370
|
-
[
|
|
3391
|
+
y.id === m.id && (y.magnetic && Q(
|
|
3392
|
+
[y],
|
|
3371
3393
|
n.trackItemsMap,
|
|
3372
3394
|
c
|
|
3373
|
-
),
|
|
3395
|
+
), y.items.push(...c));
|
|
3374
3396
|
});
|
|
3375
3397
|
});
|
|
3376
3398
|
else {
|
|
3377
|
-
const
|
|
3378
|
-
Math.max(
|
|
3399
|
+
const y = e.trackIndex || 0, m = Math.min(
|
|
3400
|
+
Math.max(y, 0),
|
|
3379
3401
|
n.tracks.length
|
|
3380
3402
|
);
|
|
3381
3403
|
n.tracks.splice(m, 0, ...u);
|
|
@@ -3386,9 +3408,9 @@ async function Sa(t, r, e = {}) {
|
|
|
3386
3408
|
}, n.trackItemIds = [
|
|
3387
3409
|
...n.trackItemIds,
|
|
3388
3410
|
...c
|
|
3389
|
-
], n.duration =
|
|
3390
|
-
const h = n.tracks.filter((
|
|
3391
|
-
return
|
|
3411
|
+
], n.duration = Y(n.trackItemsMap);
|
|
3412
|
+
const h = n.tracks.filter((y) => y.magnetic);
|
|
3413
|
+
return Q(
|
|
3392
3414
|
h,
|
|
3393
3415
|
n.trackItemsMap,
|
|
3394
3416
|
c
|
|
@@ -3402,7 +3424,7 @@ async function Sa(t, r, e = {}) {
|
|
|
3402
3424
|
async function wa(t, r) {
|
|
3403
3425
|
const e = C(t), n = e.trackItemsMap[r.id], i = [];
|
|
3404
3426
|
if (!n) return {};
|
|
3405
|
-
let
|
|
3427
|
+
let a = n.animations || {};
|
|
3406
3428
|
return r.animations.loop ? r.animations.loop.composition.forEach(
|
|
3407
3429
|
(u) => {
|
|
3408
3430
|
var c;
|
|
@@ -3423,7 +3445,7 @@ async function wa(t, r) {
|
|
|
3423
3445
|
var c;
|
|
3424
3446
|
(c = u.details) != null && c.fonts && i.push(...u.details.fonts);
|
|
3425
3447
|
}
|
|
3426
|
-
), i.length > 0 && await He(i),
|
|
3448
|
+
), i.length > 0 && await He(i), a.in && r.animations.in ? a.in = r.animations.in : a.out && r.animations.out ? a.out = r.animations.out : a.loop && r.animations.loop ? a.loop = r.animations.loop : !a.out && r.animations.out ? a.out = r.animations.out : !a.in && r.animations.in ? a.in = r.animations.in : !a.loop && r.animations.loop ? a.loop = r.animations.loop : a = r.animations, (r.animations.in || r.animations.out || r.animations.loop) && delete a.timed, r.animations.timed && (a.timed = r.animations.timed, delete a.in, delete a.out, delete a.loop), n.animations = a, {
|
|
3427
3449
|
trackItemsMap: e.trackItemsMap
|
|
3428
3450
|
};
|
|
3429
3451
|
}
|
|
@@ -3434,10 +3456,10 @@ async function Ta(t, r, e = {}) {
|
|
|
3434
3456
|
scaleMode: e.scaleMode,
|
|
3435
3457
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3436
3458
|
})
|
|
3437
|
-
],
|
|
3438
|
-
c.duration =
|
|
3459
|
+
], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e);
|
|
3460
|
+
c.duration = Y(c.trackItemsMap);
|
|
3439
3461
|
const d = c.tracks.filter((p) => p.magnetic);
|
|
3440
|
-
return
|
|
3462
|
+
return Q(d, c.trackItemsMap, u), {
|
|
3441
3463
|
trackItemIds: c.trackItemIds,
|
|
3442
3464
|
trackItemsMap: c.trackItemsMap,
|
|
3443
3465
|
tracks: c.tracks,
|
|
@@ -3452,8 +3474,8 @@ function Ma(t) {
|
|
|
3452
3474
|
), n = Vt.pipe(
|
|
3453
3475
|
qt(({ key: f }) => f.startsWith(H))
|
|
3454
3476
|
), i = Vt.pipe(
|
|
3455
|
-
qt(({ key: f }) => f.startsWith(
|
|
3456
|
-
),
|
|
3477
|
+
qt(({ key: f }) => f.startsWith(tt))
|
|
3478
|
+
), a = Vt.pipe(
|
|
3457
3479
|
qt(({ key: f }) => f.startsWith(Er))
|
|
3458
3480
|
), u = Vt.pipe(
|
|
3459
3481
|
qt(({ key: f }) => f.startsWith(Le))
|
|
@@ -3462,17 +3484,17 @@ function Ma(t) {
|
|
|
3462
3484
|
), d = Vt.pipe(
|
|
3463
3485
|
qt(({ key: f }) => f.startsWith(fs))
|
|
3464
3486
|
), p = r.subscribe(async (f) => {
|
|
3465
|
-
var
|
|
3487
|
+
var v;
|
|
3466
3488
|
if (f.key === Kn) {
|
|
3467
|
-
const { actions: w } = (
|
|
3489
|
+
const { actions: w } = (v = f.value) == null ? void 0 : v.payload;
|
|
3468
3490
|
w.forEach((S) => {
|
|
3469
3491
|
Ws(S.type, S.payload && { payload: S.payload });
|
|
3470
3492
|
});
|
|
3471
3493
|
}
|
|
3472
3494
|
}), h = e.subscribe(async (f) => {
|
|
3473
|
-
var
|
|
3495
|
+
var v, w;
|
|
3474
3496
|
if (f.key === ai) {
|
|
3475
|
-
const S = (
|
|
3497
|
+
const S = (v = f.value) == null ? void 0 : v.payload, E = await oa(t.getState(), S);
|
|
3476
3498
|
t.updateState(E, {
|
|
3477
3499
|
kind: "design:load",
|
|
3478
3500
|
updateHistory: !1
|
|
@@ -3490,13 +3512,13 @@ function Ma(t) {
|
|
|
3490
3512
|
}
|
|
3491
3513
|
);
|
|
3492
3514
|
}
|
|
3493
|
-
}),
|
|
3515
|
+
}), y = a.subscribe((f) => {
|
|
3494
3516
|
if (f.key === Fi) return t.undo();
|
|
3495
3517
|
if (f.key === Ni) return t.redo();
|
|
3496
3518
|
}), m = d.subscribe((f) => {
|
|
3497
|
-
var
|
|
3519
|
+
var v;
|
|
3498
3520
|
if (f.key === Li) {
|
|
3499
|
-
const w = (
|
|
3521
|
+
const w = (v = f.value) == null ? void 0 : v.payload.scale;
|
|
3500
3522
|
t.updateState(
|
|
3501
3523
|
{
|
|
3502
3524
|
scale: w
|
|
@@ -3507,10 +3529,10 @@ function Ma(t) {
|
|
|
3507
3529
|
}
|
|
3508
3530
|
);
|
|
3509
3531
|
}
|
|
3510
|
-
}),
|
|
3511
|
-
var
|
|
3532
|
+
}), I = i.subscribe(async (f) => {
|
|
3533
|
+
var v, w, S, E;
|
|
3512
3534
|
if (f.key === Ri) {
|
|
3513
|
-
const T = ((
|
|
3535
|
+
const T = ((v = f.value) == null ? void 0 : v.payload.trackItemIds) || [];
|
|
3514
3536
|
t.updateState(
|
|
3515
3537
|
{ activeIds: T },
|
|
3516
3538
|
{
|
|
@@ -3540,110 +3562,110 @@ function Ma(t) {
|
|
|
3540
3562
|
kind: "update:details"
|
|
3541
3563
|
});
|
|
3542
3564
|
}
|
|
3543
|
-
}),
|
|
3544
|
-
var L, R,
|
|
3545
|
-
const
|
|
3565
|
+
}), k = n.subscribe(async (f) => {
|
|
3566
|
+
var L, R, G, x, F, et, Qt, te, Se, we, Te, Me, z, Ee, Ae, st, ee, $, re, xe, it, ne, se, zt, $t, ie, Ft, ae, Nt, oe, Oe, Ce, wt, Lt, ce, ue, ut, Tt, Re, yt, Mt, Ht, rt, le, de, Pe, Ut, Et, fe, At, gt, at, xt, Wt, It, jt, bt, Bt, Yt;
|
|
3567
|
+
const v = C(t.getState()), w = ((R = (L = f.value) == null ? void 0 : L.options) == null ? void 0 : R.isSelected) || !1, S = (x = (G = f.value) == null ? void 0 : G.options) == null ? void 0 : x.scaleMode, E = (et = (F = f.value) == null ? void 0 : F.options) == null ? void 0 : et.scaleAspectRatio, T = (te = (Qt = f.value) == null ? void 0 : Qt.options) == null ? void 0 : te.trackIndex;
|
|
3546
3568
|
let M = {};
|
|
3547
|
-
f.key === hi ? M = await wa(
|
|
3569
|
+
f.key === hi ? M = await wa(v, (Se = f.value) == null ? void 0 : Se.payload) : f.key === gi ? M = await ha(v, (we = f.value) == null ? void 0 : we.payload, {
|
|
3548
3570
|
trackIndex: T
|
|
3549
|
-
}) : f.key === mi ? M = await Sa(
|
|
3571
|
+
}) : f.key === mi ? M = await Sa(v, (Te = f.value) == null ? void 0 : Te.payload, {
|
|
3550
3572
|
trackIndex: T
|
|
3551
|
-
}) : f.key === ci ? M = await Ia(
|
|
3573
|
+
}) : f.key === ci ? M = await Ia(v, (Me = f.value) == null ? void 0 : Me.payload, {
|
|
3552
3574
|
targetTrackIndex: T,
|
|
3553
3575
|
targetTrackId: (z = f.value) == null ? void 0 : z.options.targetTrackId,
|
|
3554
|
-
size:
|
|
3576
|
+
size: v.size,
|
|
3555
3577
|
isNewTrack: (Ae = (Ee = f.value) == null ? void 0 : Ee.options) == null ? void 0 : Ae.isNewTrack
|
|
3556
|
-
}) : f.key ===
|
|
3578
|
+
}) : f.key === yi ? M = await _a(v, (st = f.value) == null ? void 0 : st.payload, {
|
|
3557
3579
|
scaleMode: S,
|
|
3558
3580
|
scaleAspectRatio: E,
|
|
3559
3581
|
targetTrackIndex: T,
|
|
3560
3582
|
targetTrackId: ($ = (ee = f.value) == null ? void 0 : ee.options) == null ? void 0 : $.targetTrackId
|
|
3561
|
-
}) : f.key === fi ? M = await ka(
|
|
3583
|
+
}) : f.key === fi ? M = await ka(v, (re = f.value) == null ? void 0 : re.payload, {
|
|
3562
3584
|
scaleMode: S,
|
|
3563
3585
|
scaleAspectRatio: E,
|
|
3564
3586
|
targetTrackIndex: T,
|
|
3565
3587
|
targetTrackId: (xe = f.value) == null ? void 0 : xe.options.targetTrackId
|
|
3566
|
-
}) : f.key === pi ? M = await ba(
|
|
3588
|
+
}) : f.key === pi ? M = await ba(v, (it = f.value) == null ? void 0 : it.payload, {
|
|
3567
3589
|
scaleMode: S,
|
|
3568
3590
|
scaleAspectRatio: E,
|
|
3569
3591
|
targetTrackIndex: T,
|
|
3570
3592
|
targetTrackId: (ne = f.value) == null ? void 0 : ne.options.targetTrackId
|
|
3571
|
-
}) : f.key === Mi ? M = await Ta(
|
|
3593
|
+
}) : f.key === Mi ? M = await Ta(v, (se = f.value) == null ? void 0 : se.payload, {
|
|
3572
3594
|
scaleMode: S,
|
|
3573
3595
|
scaleAspectRatio: E,
|
|
3574
3596
|
targetTrackIndex: T,
|
|
3575
3597
|
targetTrackId: (zt = f.value) == null ? void 0 : zt.options.targetTrackId
|
|
3576
|
-
}) : f.key === di ? M = await ma(
|
|
3598
|
+
}) : f.key === di ? M = await ma(v, ($t = f.value) == null ? void 0 : $t.payload, {
|
|
3577
3599
|
scaleMode: S,
|
|
3578
3600
|
scaleAspectRatio: E,
|
|
3579
3601
|
targetTrackIndex: T,
|
|
3580
3602
|
targetTrackId: (ie = f.value) == null ? void 0 : ie.options.targetTrackId,
|
|
3581
3603
|
isNewTrack: (ae = (Ft = f.value) == null ? void 0 : Ft.options) == null ? void 0 : ae.isNewTrack
|
|
3582
|
-
}) : f.key === li ? M = await
|
|
3604
|
+
}) : f.key === li ? M = await ya(v, (Nt = f.value) == null ? void 0 : Nt.payload, {
|
|
3583
3605
|
targetTrackIndex: T,
|
|
3584
3606
|
targetTrackId: (oe = f.value) == null ? void 0 : oe.options.targetTrackId,
|
|
3585
3607
|
isNewTrack: (Ce = (Oe = f.value) == null ? void 0 : Oe.options) == null ? void 0 : Ce.isNewTrack
|
|
3586
|
-
}) : f.key === ui ? M = await
|
|
3608
|
+
}) : f.key === ui ? M = await ga(v, (wt = f.value) == null ? void 0 : wt.payload, {
|
|
3587
3609
|
scaleMode: S,
|
|
3588
3610
|
scaleAspectRatio: E,
|
|
3589
3611
|
targetTrackIndex: T,
|
|
3590
3612
|
targetTrackId: (Lt = f.value) == null ? void 0 : Lt.options.targetTrackId,
|
|
3591
3613
|
isNewTrack: (ue = (ce = f.value) == null ? void 0 : ce.options) == null ? void 0 : ue.isNewTrack
|
|
3592
|
-
}) : f.key === Ii ? M = await va(
|
|
3614
|
+
}) : f.key === Ii ? M = await va(v, (ut = f.value) == null ? void 0 : ut.payload, {
|
|
3593
3615
|
scaleMode: S,
|
|
3594
3616
|
scaleAspectRatio: E,
|
|
3595
3617
|
targetTrackIndex: T,
|
|
3596
3618
|
targetTrackId: (Tt = f.value) == null ? void 0 : Tt.options.targetTrackId
|
|
3597
|
-
}) : f.key === bi ? M = await
|
|
3598
|
-
|
|
3619
|
+
}) : f.key === bi ? M = await ye(
|
|
3620
|
+
v,
|
|
3599
3621
|
(Re = f.value) == null ? void 0 : Re.payload,
|
|
3600
3622
|
{
|
|
3601
3623
|
targetTrackIndex: T,
|
|
3602
|
-
targetTrackId: (Mt = (
|
|
3624
|
+
targetTrackId: (Mt = (yt = f.value) == null ? void 0 : yt.options) == null ? void 0 : Mt.targetTrackId
|
|
3603
3625
|
},
|
|
3604
3626
|
"progress-bar"
|
|
3605
|
-
) : f.key === Si ? M = await
|
|
3606
|
-
|
|
3627
|
+
) : f.key === Si ? M = await ye(
|
|
3628
|
+
v,
|
|
3607
3629
|
(Ht = f.value) == null ? void 0 : Ht.payload,
|
|
3608
3630
|
{
|
|
3609
3631
|
targetTrackIndex: T,
|
|
3610
|
-
targetTrackId: (le = (
|
|
3632
|
+
targetTrackId: (le = (rt = f.value) == null ? void 0 : rt.options) == null ? void 0 : le.targetTrackId
|
|
3611
3633
|
},
|
|
3612
3634
|
"progress-square"
|
|
3613
|
-
) : f.key === ki ? M = await
|
|
3614
|
-
|
|
3635
|
+
) : f.key === ki ? M = await ye(
|
|
3636
|
+
v,
|
|
3615
3637
|
(de = f.value) == null ? void 0 : de.payload,
|
|
3616
3638
|
{
|
|
3617
3639
|
targetTrackIndex: T,
|
|
3618
3640
|
targetTrackId: (Ut = (Pe = f.value) == null ? void 0 : Pe.options) == null ? void 0 : Ut.targetTrackId
|
|
3619
3641
|
},
|
|
3620
3642
|
"progress-frame"
|
|
3621
|
-
) : f.key === vi ? M = await
|
|
3622
|
-
|
|
3643
|
+
) : f.key === vi ? M = await ye(
|
|
3644
|
+
v,
|
|
3623
3645
|
(Et = f.value) == null ? void 0 : Et.payload,
|
|
3624
3646
|
{
|
|
3625
3647
|
targetTrackIndex: T,
|
|
3626
3648
|
targetTrackId: (At = (fe = f.value) == null ? void 0 : fe.options) == null ? void 0 : At.targetTrackId
|
|
3627
3649
|
},
|
|
3628
3650
|
"radial-audio-bars"
|
|
3629
|
-
) : f.key === _i ? M = await
|
|
3630
|
-
|
|
3631
|
-
(
|
|
3651
|
+
) : f.key === _i ? M = await ye(
|
|
3652
|
+
v,
|
|
3653
|
+
(gt = f.value) == null ? void 0 : gt.payload,
|
|
3632
3654
|
{
|
|
3633
3655
|
targetTrackIndex: T,
|
|
3634
3656
|
targetTrackId: (xt = (at = f.value) == null ? void 0 : at.options) == null ? void 0 : xt.targetTrackId
|
|
3635
3657
|
},
|
|
3636
3658
|
"lineal-audio-bars"
|
|
3637
|
-
) : f.key === wi ? M = await
|
|
3638
|
-
|
|
3659
|
+
) : f.key === wi ? M = await ye(
|
|
3660
|
+
v,
|
|
3639
3661
|
(Wt = f.value) == null ? void 0 : Wt.payload,
|
|
3640
3662
|
{
|
|
3641
3663
|
targetTrackIndex: T,
|
|
3642
3664
|
targetTrackId: (jt = (It = f.value) == null ? void 0 : It.options) == null ? void 0 : jt.targetTrackId
|
|
3643
3665
|
},
|
|
3644
3666
|
"wave-audio-bars"
|
|
3645
|
-
) : f.key === Ti && (M = await
|
|
3646
|
-
|
|
3667
|
+
) : f.key === Ti && (M = await ye(
|
|
3668
|
+
v,
|
|
3647
3669
|
(bt = f.value) == null ? void 0 : bt.payload,
|
|
3648
3670
|
{
|
|
3649
3671
|
targetTrackIndex: T,
|
|
@@ -3654,10 +3676,10 @@ function Ma(t) {
|
|
|
3654
3676
|
updateHistory: !0,
|
|
3655
3677
|
kind: "add"
|
|
3656
3678
|
});
|
|
3657
|
-
}),
|
|
3658
|
-
var
|
|
3679
|
+
}), b = u.subscribe(async (f) => {
|
|
3680
|
+
var v;
|
|
3659
3681
|
if (f.key === Ci) {
|
|
3660
|
-
const w = (
|
|
3682
|
+
const w = (v = f.value) == null ? void 0 : v.options.time, S = ua(t.getState(), w);
|
|
3661
3683
|
Object.keys(S).length > 0 && t.updateState(S, {
|
|
3662
3684
|
updateHistory: !0,
|
|
3663
3685
|
kind: "update"
|
|
@@ -3671,11 +3693,11 @@ function Ma(t) {
|
|
|
3671
3693
|
});
|
|
3672
3694
|
}
|
|
3673
3695
|
}), _ = c.subscribe(async (f) => {
|
|
3674
|
-
var
|
|
3696
|
+
var v, w, S;
|
|
3675
3697
|
if (f.key === Ei) {
|
|
3676
3698
|
const E = await la(
|
|
3677
3699
|
t.getState(),
|
|
3678
|
-
(
|
|
3700
|
+
(v = f.value) == null ? void 0 : v.payload
|
|
3679
3701
|
);
|
|
3680
3702
|
t.updateState(E, {
|
|
3681
3703
|
updateHistory: !0,
|
|
@@ -3702,7 +3724,7 @@ function Ma(t) {
|
|
|
3702
3724
|
});
|
|
3703
3725
|
return {
|
|
3704
3726
|
unsubscribe: () => {
|
|
3705
|
-
|
|
3727
|
+
k.unsubscribe(), b.unsubscribe(), _.unsubscribe(), y.unsubscribe(), I.unsubscribe(), h.unsubscribe(), m.unsubscribe(), p.unsubscribe();
|
|
3706
3728
|
}
|
|
3707
3729
|
};
|
|
3708
3730
|
}
|
|
@@ -3710,21 +3732,21 @@ const Ea = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
|
|
3710
3732
|
function Rs(t, r, e = { cyclesFix: !0 }, n = []) {
|
|
3711
3733
|
var c, d;
|
|
3712
3734
|
let i = [];
|
|
3713
|
-
const
|
|
3735
|
+
const a = Array.isArray(t);
|
|
3714
3736
|
for (const p in t) {
|
|
3715
|
-
const h = t[p],
|
|
3737
|
+
const h = t[p], y = a ? +p : p;
|
|
3716
3738
|
if (!(p in r)) {
|
|
3717
3739
|
i.push({
|
|
3718
3740
|
type: "REMOVE",
|
|
3719
|
-
path: [
|
|
3741
|
+
path: [y],
|
|
3720
3742
|
oldValue: t[p]
|
|
3721
3743
|
});
|
|
3722
3744
|
continue;
|
|
3723
3745
|
}
|
|
3724
|
-
const m = r[p],
|
|
3725
|
-
h && m &&
|
|
3726
|
-
!(Number.isNaN(h) && Number.isNaN(m)) && !(
|
|
3727
|
-
path: [
|
|
3746
|
+
const m = r[p], I = typeof h == "object" && typeof m == "object" && Array.isArray(h) === Array.isArray(m);
|
|
3747
|
+
h && m && I && !Ea[(d = (c = Object.getPrototypeOf(h)) == null ? void 0 : c.constructor) == null ? void 0 : d.name] && (!e.cyclesFix || !n.includes(h)) ? i.push.apply(i, Rs(h, m, e, e.cyclesFix ? n.concat([h]) : []).map((k) => (k.path.unshift(y), k))) : h !== m && // treat NaN values as equivalent
|
|
3748
|
+
!(Number.isNaN(h) && Number.isNaN(m)) && !(I && (isNaN(h) ? h + "" == m + "" : +h == +m)) && i.push({
|
|
3749
|
+
path: [y],
|
|
3728
3750
|
type: "CHANGE",
|
|
3729
3751
|
value: m,
|
|
3730
3752
|
oldValue: h
|
|
@@ -3809,7 +3831,7 @@ function ve(t) {
|
|
|
3809
3831
|
function Qe(t, r) {
|
|
3810
3832
|
return ve(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
|
3811
3833
|
}
|
|
3812
|
-
function
|
|
3834
|
+
function yn(t, r) {
|
|
3813
3835
|
return ve(t) === 2 ? t.get(r) : t[r];
|
|
3814
3836
|
}
|
|
3815
3837
|
function zs(t, r, e) {
|
|
@@ -3825,7 +3847,7 @@ function sr(t) {
|
|
|
3825
3847
|
function ir(t) {
|
|
3826
3848
|
return t instanceof Set;
|
|
3827
3849
|
}
|
|
3828
|
-
function
|
|
3850
|
+
function ge(t) {
|
|
3829
3851
|
return t.copy_ || t.base_;
|
|
3830
3852
|
}
|
|
3831
3853
|
function Tn(t, r) {
|
|
@@ -3840,8 +3862,8 @@ function Tn(t, r) {
|
|
|
3840
3862
|
const n = Object.getOwnPropertyDescriptors(t);
|
|
3841
3863
|
delete n[lt];
|
|
3842
3864
|
let i = Reflect.ownKeys(n);
|
|
3843
|
-
for (let
|
|
3844
|
-
const u = i[
|
|
3865
|
+
for (let a = 0; a < i.length; a++) {
|
|
3866
|
+
const u = i[a], c = n[u];
|
|
3845
3867
|
c.writable === !1 && (c.writable = !0, c.configurable = !0), (c.get || c.set) && (n[u] = {
|
|
3846
3868
|
configurable: !0,
|
|
3847
3869
|
writable: !0,
|
|
@@ -3924,7 +3946,7 @@ function wr(t, r, e) {
|
|
|
3924
3946
|
if (!n)
|
|
3925
3947
|
return Ze(
|
|
3926
3948
|
r,
|
|
3927
|
-
(i,
|
|
3949
|
+
(i, a) => ts(t, n, r, i, a, e)
|
|
3928
3950
|
), r;
|
|
3929
3951
|
if (n.scope_ !== t)
|
|
3930
3952
|
return r;
|
|
@@ -3933,9 +3955,9 @@ function wr(t, r, e) {
|
|
|
3933
3955
|
if (!n.finalized_) {
|
|
3934
3956
|
n.finalized_ = !0, n.scope_.unfinalizedDrafts_--;
|
|
3935
3957
|
const i = n.copy_;
|
|
3936
|
-
let
|
|
3937
|
-
n.type_ === 3 && (
|
|
3938
|
-
|
|
3958
|
+
let a = i, u = !1;
|
|
3959
|
+
n.type_ === 3 && (a = new Set(i), i.clear(), u = !0), Ze(
|
|
3960
|
+
a,
|
|
3939
3961
|
(c, d) => ts(t, n, i, c, d, e, u)
|
|
3940
3962
|
), Tr(t, i, !1), e && t.patches_ && _e("Patches").generatePatches_(
|
|
3941
3963
|
n,
|
|
@@ -3946,10 +3968,10 @@ function wr(t, r, e) {
|
|
|
3946
3968
|
}
|
|
3947
3969
|
return n.copy_;
|
|
3948
3970
|
}
|
|
3949
|
-
function ts(t, r, e, n, i,
|
|
3971
|
+
function ts(t, r, e, n, i, a, u) {
|
|
3950
3972
|
if (process.env.NODE_ENV !== "production" && i === e && B(5), ke(i)) {
|
|
3951
|
-
const c =
|
|
3952
|
-
!Qe(r.assigned_, n) ?
|
|
3973
|
+
const c = a && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
|
3974
|
+
!Qe(r.assigned_, n) ? a.concat(n) : void 0, d = wr(t, i, c);
|
|
3953
3975
|
if (zs(e, n, d), ke(d))
|
|
3954
3976
|
t.canAutoFreeze_ = !1;
|
|
3955
3977
|
else
|
|
@@ -3988,34 +4010,34 @@ function Da(t, r) {
|
|
|
3988
4010
|
revoke_: null,
|
|
3989
4011
|
isManual_: !1
|
|
3990
4012
|
};
|
|
3991
|
-
let i = n,
|
|
3992
|
-
e && (i = [n],
|
|
3993
|
-
const { revoke: u, proxy: c } = Proxy.revocable(i,
|
|
4013
|
+
let i = n, a = Nn;
|
|
4014
|
+
e && (i = [n], a = er);
|
|
4015
|
+
const { revoke: u, proxy: c } = Proxy.revocable(i, a);
|
|
3994
4016
|
return n.draft_ = c, n.revoke_ = u, c;
|
|
3995
4017
|
}
|
|
3996
4018
|
var Nn = {
|
|
3997
4019
|
get(t, r) {
|
|
3998
4020
|
if (r === lt)
|
|
3999
4021
|
return t;
|
|
4000
|
-
const e =
|
|
4022
|
+
const e = ge(t);
|
|
4001
4023
|
if (!Qe(e, r))
|
|
4002
4024
|
return za(t, e, r);
|
|
4003
4025
|
const n = e[r];
|
|
4004
|
-
return t.finalized_ || !Jt(n) ? n : n ===
|
|
4026
|
+
return t.finalized_ || !Jt(n) ? n : n === gn(t.base_, r) ? (In(t), t.copy_[r] = On(n, t)) : n;
|
|
4005
4027
|
},
|
|
4006
4028
|
has(t, r) {
|
|
4007
|
-
return r in
|
|
4029
|
+
return r in ge(t);
|
|
4008
4030
|
},
|
|
4009
4031
|
ownKeys(t) {
|
|
4010
|
-
return Reflect.ownKeys(
|
|
4032
|
+
return Reflect.ownKeys(ge(t));
|
|
4011
4033
|
},
|
|
4012
4034
|
set(t, r, e) {
|
|
4013
|
-
const n = Fs(
|
|
4035
|
+
const n = Fs(ge(t), r);
|
|
4014
4036
|
if (n != null && n.set)
|
|
4015
4037
|
return n.set.call(t.draft_, e), !0;
|
|
4016
4038
|
if (!t.modified_) {
|
|
4017
|
-
const i =
|
|
4018
|
-
if (
|
|
4039
|
+
const i = gn(ge(t), r), a = i == null ? void 0 : i[lt];
|
|
4040
|
+
if (a && a.base_ === e)
|
|
4019
4041
|
return t.copy_[r] = e, t.assigned_[r] = !1, !0;
|
|
4020
4042
|
if (xa(e, i) && (e !== void 0 || Qe(t.base_, r)))
|
|
4021
4043
|
return !0;
|
|
@@ -4026,12 +4048,12 @@ var Nn = {
|
|
|
4026
4048
|
Number.isNaN(e) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = e, t.assigned_[r] = !0), !0;
|
|
4027
4049
|
},
|
|
4028
4050
|
deleteProperty(t, r) {
|
|
4029
|
-
return
|
|
4051
|
+
return gn(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, In(t), xn(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
|
|
4030
4052
|
},
|
|
4031
4053
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
4032
4054
|
// the same guarantee in ES5 mode.
|
|
4033
4055
|
getOwnPropertyDescriptor(t, r) {
|
|
4034
|
-
const e =
|
|
4056
|
+
const e = ge(t), n = Reflect.getOwnPropertyDescriptor(e, r);
|
|
4035
4057
|
return n && {
|
|
4036
4058
|
writable: !0,
|
|
4037
4059
|
configurable: t.type_ !== 1 || r !== "length",
|
|
@@ -4060,9 +4082,9 @@ er.deleteProperty = function(t, r) {
|
|
|
4060
4082
|
er.set = function(t, r, e) {
|
|
4061
4083
|
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && B(14), Nn.set.call(this, t[0], r, e, t[0]);
|
|
4062
4084
|
};
|
|
4063
|
-
function
|
|
4085
|
+
function gn(t, r) {
|
|
4064
4086
|
const e = t[lt];
|
|
4065
|
-
return (e ?
|
|
4087
|
+
return (e ? ge(e) : t)[r];
|
|
4066
4088
|
}
|
|
4067
4089
|
function za(t, r, e) {
|
|
4068
4090
|
var i;
|
|
@@ -4097,28 +4119,28 @@ var $a = class {
|
|
|
4097
4119
|
constructor(t) {
|
|
4098
4120
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, e, n) => {
|
|
4099
4121
|
if (typeof r == "function" && typeof e != "function") {
|
|
4100
|
-
const
|
|
4122
|
+
const a = e;
|
|
4101
4123
|
e = r;
|
|
4102
4124
|
const u = this;
|
|
4103
|
-
return function(d =
|
|
4125
|
+
return function(d = a, ...p) {
|
|
4104
4126
|
return u.produce(d, (h) => e.call(this, h, ...p));
|
|
4105
4127
|
};
|
|
4106
4128
|
}
|
|
4107
4129
|
typeof e != "function" && B(6), n !== void 0 && typeof n != "function" && B(7);
|
|
4108
4130
|
let i;
|
|
4109
4131
|
if (Jt(r)) {
|
|
4110
|
-
const
|
|
4132
|
+
const a = Zn(this), u = On(r, void 0);
|
|
4111
4133
|
let c = !0;
|
|
4112
4134
|
try {
|
|
4113
4135
|
i = e(u), c = !1;
|
|
4114
4136
|
} finally {
|
|
4115
|
-
c ? En(
|
|
4137
|
+
c ? En(a) : An(a);
|
|
4116
4138
|
}
|
|
4117
|
-
return Jn(
|
|
4139
|
+
return Jn(a, n), Qn(i, a);
|
|
4118
4140
|
} else if (!r || typeof r != "object") {
|
|
4119
4141
|
if (i = e(r), i === void 0 && (i = r), i === $n && (i = void 0), this.autoFreeze_ && Fn(i, !0), n) {
|
|
4120
|
-
const
|
|
4121
|
-
_e("Patches").generateReplacementPatches_(r, i,
|
|
4142
|
+
const a = [], u = [];
|
|
4143
|
+
_e("Patches").generateReplacementPatches_(r, i, a, u), n(a, u);
|
|
4122
4144
|
}
|
|
4123
4145
|
return i;
|
|
4124
4146
|
} else
|
|
@@ -4210,131 +4232,131 @@ function es() {
|
|
|
4210
4232
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
|
4211
4233
|
);
|
|
4212
4234
|
const r = "replace", e = "add", n = "remove";
|
|
4213
|
-
function i(m,
|
|
4235
|
+
function i(m, I, k, b) {
|
|
4214
4236
|
switch (m.type_) {
|
|
4215
4237
|
case 0:
|
|
4216
4238
|
case 2:
|
|
4217
4239
|
return u(
|
|
4218
4240
|
m,
|
|
4241
|
+
I,
|
|
4219
4242
|
k,
|
|
4220
|
-
|
|
4221
|
-
I
|
|
4243
|
+
b
|
|
4222
4244
|
);
|
|
4223
4245
|
case 1:
|
|
4224
|
-
return
|
|
4246
|
+
return a(m, I, k, b);
|
|
4225
4247
|
case 3:
|
|
4226
4248
|
return c(
|
|
4227
4249
|
m,
|
|
4250
|
+
I,
|
|
4228
4251
|
k,
|
|
4229
|
-
|
|
4230
|
-
I
|
|
4252
|
+
b
|
|
4231
4253
|
);
|
|
4232
4254
|
}
|
|
4233
4255
|
}
|
|
4234
|
-
function
|
|
4235
|
-
let { base_: _, assigned_: f } = m,
|
|
4236
|
-
|
|
4256
|
+
function a(m, I, k, b) {
|
|
4257
|
+
let { base_: _, assigned_: f } = m, v = m.copy_;
|
|
4258
|
+
v.length < _.length && ([_, v] = [v, _], [k, b] = [b, k]);
|
|
4237
4259
|
for (let w = 0; w < _.length; w++)
|
|
4238
|
-
if (f[w] &&
|
|
4239
|
-
const S =
|
|
4240
|
-
|
|
4260
|
+
if (f[w] && v[w] !== _[w]) {
|
|
4261
|
+
const S = I.concat([w]);
|
|
4262
|
+
k.push({
|
|
4241
4263
|
op: r,
|
|
4242
4264
|
path: S,
|
|
4243
4265
|
// Need to maybe clone it, as it can in fact be the original value
|
|
4244
4266
|
// due to the base/copy inversion at the start of this function
|
|
4245
|
-
value:
|
|
4246
|
-
}),
|
|
4267
|
+
value: y(v[w])
|
|
4268
|
+
}), b.push({
|
|
4247
4269
|
op: r,
|
|
4248
4270
|
path: S,
|
|
4249
|
-
value:
|
|
4271
|
+
value: y(_[w])
|
|
4250
4272
|
});
|
|
4251
4273
|
}
|
|
4252
|
-
for (let w = _.length; w <
|
|
4253
|
-
const S =
|
|
4254
|
-
|
|
4274
|
+
for (let w = _.length; w < v.length; w++) {
|
|
4275
|
+
const S = I.concat([w]);
|
|
4276
|
+
k.push({
|
|
4255
4277
|
op: e,
|
|
4256
4278
|
path: S,
|
|
4257
4279
|
// Need to maybe clone it, as it can in fact be the original value
|
|
4258
4280
|
// due to the base/copy inversion at the start of this function
|
|
4259
|
-
value:
|
|
4281
|
+
value: y(v[w])
|
|
4260
4282
|
});
|
|
4261
4283
|
}
|
|
4262
|
-
for (let w =
|
|
4263
|
-
const S =
|
|
4264
|
-
|
|
4284
|
+
for (let w = v.length - 1; _.length <= w; --w) {
|
|
4285
|
+
const S = I.concat([w]);
|
|
4286
|
+
b.push({
|
|
4265
4287
|
op: n,
|
|
4266
4288
|
path: S
|
|
4267
4289
|
});
|
|
4268
4290
|
}
|
|
4269
4291
|
}
|
|
4270
|
-
function u(m,
|
|
4292
|
+
function u(m, I, k, b) {
|
|
4271
4293
|
const { base_: _, copy_: f } = m;
|
|
4272
|
-
Ze(m.assigned_, (
|
|
4273
|
-
const S =
|
|
4294
|
+
Ze(m.assigned_, (v, w) => {
|
|
4295
|
+
const S = yn(_, v), E = yn(f, v), T = w ? Qe(_, v) ? r : e : n;
|
|
4274
4296
|
if (S === E && T === r)
|
|
4275
4297
|
return;
|
|
4276
|
-
const M =
|
|
4277
|
-
|
|
4278
|
-
T === e ? { op: n, path: M } : T === n ? { op: e, path: M, value:
|
|
4298
|
+
const M = I.concat(v);
|
|
4299
|
+
k.push(T === n ? { op: T, path: M } : { op: T, path: M, value: E }), b.push(
|
|
4300
|
+
T === e ? { op: n, path: M } : T === n ? { op: e, path: M, value: y(S) } : { op: r, path: M, value: y(S) }
|
|
4279
4301
|
);
|
|
4280
4302
|
});
|
|
4281
4303
|
}
|
|
4282
|
-
function c(m,
|
|
4283
|
-
let { base_: _, copy_: f } = m,
|
|
4304
|
+
function c(m, I, k, b) {
|
|
4305
|
+
let { base_: _, copy_: f } = m, v = 0;
|
|
4284
4306
|
_.forEach((w) => {
|
|
4285
4307
|
if (!f.has(w)) {
|
|
4286
|
-
const S =
|
|
4287
|
-
|
|
4308
|
+
const S = I.concat([v]);
|
|
4309
|
+
k.push({
|
|
4288
4310
|
op: n,
|
|
4289
4311
|
path: S,
|
|
4290
4312
|
value: w
|
|
4291
|
-
}),
|
|
4313
|
+
}), b.unshift({
|
|
4292
4314
|
op: e,
|
|
4293
4315
|
path: S,
|
|
4294
4316
|
value: w
|
|
4295
4317
|
});
|
|
4296
4318
|
}
|
|
4297
|
-
|
|
4298
|
-
}),
|
|
4319
|
+
v++;
|
|
4320
|
+
}), v = 0, f.forEach((w) => {
|
|
4299
4321
|
if (!_.has(w)) {
|
|
4300
|
-
const S =
|
|
4301
|
-
|
|
4322
|
+
const S = I.concat([v]);
|
|
4323
|
+
k.push({
|
|
4302
4324
|
op: e,
|
|
4303
4325
|
path: S,
|
|
4304
4326
|
value: w
|
|
4305
|
-
}),
|
|
4327
|
+
}), b.unshift({
|
|
4306
4328
|
op: n,
|
|
4307
4329
|
path: S,
|
|
4308
4330
|
value: w
|
|
4309
4331
|
});
|
|
4310
4332
|
}
|
|
4311
|
-
|
|
4333
|
+
v++;
|
|
4312
4334
|
});
|
|
4313
4335
|
}
|
|
4314
|
-
function d(m,
|
|
4315
|
-
|
|
4336
|
+
function d(m, I, k, b) {
|
|
4337
|
+
k.push({
|
|
4316
4338
|
op: r,
|
|
4317
4339
|
path: [],
|
|
4318
|
-
value:
|
|
4319
|
-
}),
|
|
4340
|
+
value: I === $n ? void 0 : I
|
|
4341
|
+
}), b.push({
|
|
4320
4342
|
op: r,
|
|
4321
4343
|
path: [],
|
|
4322
4344
|
value: m
|
|
4323
4345
|
});
|
|
4324
4346
|
}
|
|
4325
|
-
function p(m,
|
|
4326
|
-
return
|
|
4327
|
-
const { path:
|
|
4347
|
+
function p(m, I) {
|
|
4348
|
+
return I.forEach((k) => {
|
|
4349
|
+
const { path: b, op: _ } = k;
|
|
4328
4350
|
let f = m;
|
|
4329
|
-
for (let E = 0; E <
|
|
4351
|
+
for (let E = 0; E < b.length - 1; E++) {
|
|
4330
4352
|
const T = ve(f);
|
|
4331
|
-
let M =
|
|
4332
|
-
typeof M != "string" && typeof M != "number" && (M = "" + M), (T === 0 || T === 1) && (M === "__proto__" || M === "constructor") && B(19), typeof f == "function" && M === "prototype" && B(19), f =
|
|
4353
|
+
let M = b[E];
|
|
4354
|
+
typeof M != "string" && typeof M != "number" && (M = "" + M), (T === 0 || T === 1) && (M === "__proto__" || M === "constructor") && B(19), typeof f == "function" && M === "prototype" && B(19), f = yn(f, M), typeof f != "object" && B(18, b.join("/"));
|
|
4333
4355
|
}
|
|
4334
|
-
const
|
|
4356
|
+
const v = ve(f), w = h(k.value), S = b[b.length - 1];
|
|
4335
4357
|
switch (_) {
|
|
4336
4358
|
case r:
|
|
4337
|
-
switch (
|
|
4359
|
+
switch (v) {
|
|
4338
4360
|
case 2:
|
|
4339
4361
|
return f.set(S, w);
|
|
4340
4362
|
case 3:
|
|
@@ -4343,7 +4365,7 @@ function es() {
|
|
|
4343
4365
|
return f[S] = w;
|
|
4344
4366
|
}
|
|
4345
4367
|
case e:
|
|
4346
|
-
switch (
|
|
4368
|
+
switch (v) {
|
|
4347
4369
|
case 1:
|
|
4348
4370
|
return S === "-" ? f.push(w) : f.splice(S, 0, w);
|
|
4349
4371
|
case 2:
|
|
@@ -4354,13 +4376,13 @@ function es() {
|
|
|
4354
4376
|
return f[S] = w;
|
|
4355
4377
|
}
|
|
4356
4378
|
case n:
|
|
4357
|
-
switch (
|
|
4379
|
+
switch (v) {
|
|
4358
4380
|
case 1:
|
|
4359
4381
|
return f.splice(S, 1);
|
|
4360
4382
|
case 2:
|
|
4361
4383
|
return f.delete(S);
|
|
4362
4384
|
case 3:
|
|
4363
|
-
return f.delete(
|
|
4385
|
+
return f.delete(k.value);
|
|
4364
4386
|
default:
|
|
4365
4387
|
return delete f[S];
|
|
4366
4388
|
}
|
|
@@ -4376,16 +4398,16 @@ function es() {
|
|
|
4376
4398
|
return m.map(h);
|
|
4377
4399
|
if (sr(m))
|
|
4378
4400
|
return new Map(
|
|
4379
|
-
Array.from(m.entries()).map(([
|
|
4401
|
+
Array.from(m.entries()).map(([k, b]) => [k, h(b)])
|
|
4380
4402
|
);
|
|
4381
4403
|
if (ir(m))
|
|
4382
4404
|
return new Set(Array.from(m).map(h));
|
|
4383
|
-
const
|
|
4384
|
-
for (const
|
|
4385
|
-
k
|
|
4386
|
-
return Qe(m, Je) && (
|
|
4405
|
+
const I = Object.create(be(m));
|
|
4406
|
+
for (const k in m)
|
|
4407
|
+
I[k] = h(m[k]);
|
|
4408
|
+
return Qe(m, Je) && (I[Je] = m[Je]), I;
|
|
4387
4409
|
}
|
|
4388
|
-
function
|
|
4410
|
+
function y(m) {
|
|
4389
4411
|
return ke(m) ? h(m) : m;
|
|
4390
4412
|
}
|
|
4391
4413
|
Ca("Patches", {
|
|
@@ -4429,9 +4451,9 @@ function qa(t, r) {
|
|
|
4429
4451
|
}
|
|
4430
4452
|
var Ln = Object.prototype, Ja = Ln.hasOwnProperty, Hn = Ln.toString, rs = Xa.Symbol, Za = Ln.propertyIsEnumerable, ns = rs ? rs.isConcatSpreadable : void 0, ss = Math.max;
|
|
4431
4453
|
function Qa(t, r, e, n, i) {
|
|
4432
|
-
var
|
|
4433
|
-
for (e || (e = no), i || (i = []); ++
|
|
4434
|
-
var c = t[
|
|
4454
|
+
var a = -1, u = t.length;
|
|
4455
|
+
for (e || (e = no), i || (i = []); ++a < u; ) {
|
|
4456
|
+
var c = t[a];
|
|
4435
4457
|
e(c) ? qa(i, c) : i[i.length] = c;
|
|
4436
4458
|
}
|
|
4437
4459
|
return i;
|
|
@@ -4442,20 +4464,20 @@ function to(t, r) {
|
|
|
4442
4464
|
});
|
|
4443
4465
|
}
|
|
4444
4466
|
function eo(t, r, e) {
|
|
4445
|
-
for (var n = -1, i = r.length,
|
|
4467
|
+
for (var n = -1, i = r.length, a = {}; ++n < i; ) {
|
|
4446
4468
|
var u = r[n], c = t[u];
|
|
4447
|
-
e(c, u) && (
|
|
4469
|
+
e(c, u) && (a[u] = c);
|
|
4448
4470
|
}
|
|
4449
|
-
return
|
|
4471
|
+
return a;
|
|
4450
4472
|
}
|
|
4451
4473
|
function ro(t, r) {
|
|
4452
4474
|
return r = ss(r === void 0 ? t.length - 1 : r, 0), function() {
|
|
4453
|
-
for (var e = arguments, n = -1, i = ss(e.length - r, 0),
|
|
4454
|
-
|
|
4475
|
+
for (var e = arguments, n = -1, i = ss(e.length - r, 0), a = Array(i); ++n < i; )
|
|
4476
|
+
a[n] = e[r + n];
|
|
4455
4477
|
n = -1;
|
|
4456
4478
|
for (var u = Array(r + 1); ++n < r; )
|
|
4457
4479
|
u[n] = e[n];
|
|
4458
|
-
return u[r] =
|
|
4480
|
+
return u[r] = a, Ka(t, this, u);
|
|
4459
4481
|
};
|
|
4460
4482
|
}
|
|
4461
4483
|
function no(t) {
|
|
@@ -4497,12 +4519,12 @@ function po(t) {
|
|
|
4497
4519
|
var ho = ro(function(t, r) {
|
|
4498
4520
|
return t == null ? {} : to(t, Va(Qa(r), so));
|
|
4499
4521
|
}), mo = ho;
|
|
4500
|
-
const is = /* @__PURE__ */ Cn(mo),
|
|
4522
|
+
const is = /* @__PURE__ */ Cn(mo), yo = {
|
|
4501
4523
|
width: 1080,
|
|
4502
4524
|
height: 1920
|
|
4503
|
-
},
|
|
4504
|
-
size:
|
|
4505
|
-
fps:
|
|
4525
|
+
}, go = 30, Io = {
|
|
4526
|
+
size: yo,
|
|
4527
|
+
fps: go,
|
|
4506
4528
|
tracks: [],
|
|
4507
4529
|
trackItemIds: [],
|
|
4508
4530
|
trackItemsMap: {},
|
|
@@ -4564,8 +4586,8 @@ class Xo {
|
|
|
4564
4586
|
this.destroyListeners();
|
|
4565
4587
|
}
|
|
4566
4588
|
updateHistory(r, e) {
|
|
4567
|
-
const n = is(r, as), i = is(this.getState(), as),
|
|
4568
|
-
|
|
4589
|
+
const n = is(r, as), i = is(this.getState(), as), a = Rs(i, n);
|
|
4590
|
+
a.length && (this.undos.push({ undos: a, type: e }), this.redos = []);
|
|
4569
4591
|
}
|
|
4570
4592
|
getStateHistory() {
|
|
4571
4593
|
return this.stateHistorySubject.getValue();
|
|
@@ -4619,8 +4641,8 @@ class Xo {
|
|
|
4619
4641
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4620
4642
|
const n = Object.keys(e.trackItemsMap).filter(
|
|
4621
4643
|
(i) => {
|
|
4622
|
-
const
|
|
4623
|
-
return
|
|
4644
|
+
const a = this.prevState.trackItemsMap[i], u = e.trackItemsMap[i];
|
|
4645
|
+
return a && u && !j(a.animations, u.animations);
|
|
4624
4646
|
}
|
|
4625
4647
|
);
|
|
4626
4648
|
r({ trackItemsMap: e.trackItemsMap, changedAnimationIds: n });
|
|
@@ -4629,12 +4651,12 @@ class Xo {
|
|
|
4629
4651
|
subscribeToUpdateTrackItemTiming(r) {
|
|
4630
4652
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4631
4653
|
if (!j(e.trackItemsMap, this.prevState.trackItemsMap)) {
|
|
4632
|
-
const n = Object.keys(e.trackItemsMap).filter((
|
|
4633
|
-
const u = this.prevState.trackItemsMap[
|
|
4654
|
+
const n = Object.keys(e.trackItemsMap).filter((a) => {
|
|
4655
|
+
const u = this.prevState.trackItemsMap[a], c = e.trackItemsMap[a];
|
|
4634
4656
|
return u && c && !j(u.trim, c.trim);
|
|
4635
4657
|
}), i = Object.keys(e.trackItemsMap).filter(
|
|
4636
|
-
(
|
|
4637
|
-
const u = this.prevState.trackItemsMap[
|
|
4658
|
+
(a) => {
|
|
4659
|
+
const u = this.prevState.trackItemsMap[a], c = e.trackItemsMap[a];
|
|
4638
4660
|
return u && c && !j(u.display, c.display);
|
|
4639
4661
|
}
|
|
4640
4662
|
);
|
|
@@ -4649,8 +4671,8 @@ class Xo {
|
|
|
4649
4671
|
subscribeToUpdateItemDetails(r) {
|
|
4650
4672
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4651
4673
|
Object.keys(e.trackItemsMap).some((i) => {
|
|
4652
|
-
const
|
|
4653
|
-
return
|
|
4674
|
+
const a = this.prevState.trackItemsMap[i], u = e.trackItemsMap[i];
|
|
4675
|
+
return a && u && !j(a.details, u.details);
|
|
4654
4676
|
}) && r({ trackItemsMap: e.trackItemsMap });
|
|
4655
4677
|
});
|
|
4656
4678
|
}
|
|
@@ -4674,8 +4696,8 @@ class Xo {
|
|
|
4674
4696
|
}
|
|
4675
4697
|
subscribeToAddOrRemoveItems(r) {
|
|
4676
4698
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4677
|
-
const n = [...e.trackItemIds].sort(), i = [...this.prevState.trackItemIds].sort(),
|
|
4678
|
-
(!j(n, i) || !j(
|
|
4699
|
+
const n = [...e.trackItemIds].sort(), i = [...this.prevState.trackItemIds].sort(), a = [...e.transitionIds].sort(), u = [...this.prevState.transitionIds].sort();
|
|
4700
|
+
(!j(n, i) || !j(a, u)) && r({ trackItemIds: e.trackItemIds });
|
|
4679
4701
|
});
|
|
4680
4702
|
}
|
|
4681
4703
|
// Selectively subscribe to activeIds changes
|
|
@@ -4686,8 +4708,8 @@ class Xo {
|
|
|
4686
4708
|
}
|
|
4687
4709
|
subscribeToTracks(r) {
|
|
4688
4710
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4689
|
-
const n = e.tracks,
|
|
4690
|
-
(c) => !
|
|
4711
|
+
const n = e.tracks, a = this.prevState.tracks.map((c) => c.id), u = n.filter(
|
|
4712
|
+
(c) => !a.includes(c.id)
|
|
4691
4713
|
);
|
|
4692
4714
|
u.length && r({
|
|
4693
4715
|
tracks: e.tracks,
|
|
@@ -4714,69 +4736,69 @@ class Xo {
|
|
|
4714
4736
|
es();
|
|
4715
4737
|
const {
|
|
4716
4738
|
trackItemIds: i,
|
|
4717
|
-
tracks:
|
|
4739
|
+
tracks: a,
|
|
4718
4740
|
transitionIds: u,
|
|
4719
4741
|
transitionsMap: c,
|
|
4720
4742
|
trackItemsMap: d,
|
|
4721
4743
|
structure: p
|
|
4722
4744
|
} = this.getState(), h = C({
|
|
4723
4745
|
trackItemIds: i,
|
|
4724
|
-
tracks:
|
|
4746
|
+
tracks: a,
|
|
4725
4747
|
transitionIds: u,
|
|
4726
4748
|
transitionsMap: c,
|
|
4727
4749
|
trackItemsMap: d,
|
|
4728
4750
|
structure: p
|
|
4729
|
-
}),
|
|
4751
|
+
}), y = [], m = [], I = [], k = [], b = [], _ = [];
|
|
4730
4752
|
e.forEach((x) => {
|
|
4731
4753
|
let F;
|
|
4732
|
-
const
|
|
4754
|
+
const et = x.path.slice(1);
|
|
4733
4755
|
x.type === "CREATE" ? F = {
|
|
4734
|
-
path:
|
|
4756
|
+
path: et,
|
|
4735
4757
|
op: "remove",
|
|
4736
4758
|
value: x.value
|
|
4737
4759
|
} : x.type === "CHANGE" ? F = {
|
|
4738
|
-
path:
|
|
4760
|
+
path: et,
|
|
4739
4761
|
op: "replace",
|
|
4740
4762
|
value: x.oldValue
|
|
4741
4763
|
} : F = {
|
|
4742
|
-
path:
|
|
4764
|
+
path: et,
|
|
4743
4765
|
op: "add",
|
|
4744
4766
|
value: x.oldValue
|
|
4745
|
-
}, x.path.includes("trackItemIds") ?
|
|
4767
|
+
}, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? m.push(F) : x.path.includes("trackItemsMap") ? b.push(F) : x.path.includes("transitionsMap") ? k.push(F) : x.path.includes("tracks") ? y.push(F) : x.path.includes("structure") && _.push(F);
|
|
4746
4768
|
});
|
|
4747
4769
|
const f = this.applyPatch(
|
|
4748
4770
|
h.tracks,
|
|
4749
|
-
|
|
4750
|
-
),
|
|
4771
|
+
y
|
|
4772
|
+
), v = this.applyPatch(
|
|
4751
4773
|
h.transitionIds,
|
|
4752
4774
|
m
|
|
4753
4775
|
), w = this.applyPatch(
|
|
4754
4776
|
h.trackItemIds,
|
|
4755
|
-
|
|
4777
|
+
I
|
|
4756
4778
|
), S = this.applyPatch(
|
|
4757
4779
|
h.transitionsMap,
|
|
4758
|
-
|
|
4780
|
+
k
|
|
4759
4781
|
), E = this.applyPatch(
|
|
4760
4782
|
h.trackItemsMap,
|
|
4761
|
-
|
|
4783
|
+
b
|
|
4762
4784
|
), T = this.applyPatch(
|
|
4763
4785
|
h.structure,
|
|
4764
4786
|
_
|
|
4765
4787
|
), M = C({
|
|
4766
4788
|
tracks: f,
|
|
4767
|
-
transitionIds:
|
|
4789
|
+
transitionIds: v,
|
|
4768
4790
|
trackItemIds: w,
|
|
4769
4791
|
transitionsMap: S,
|
|
4770
4792
|
trackItemsMap: E,
|
|
4771
4793
|
structure: T
|
|
4772
4794
|
}), L = C(this.getState()), R = { ...L, ...M };
|
|
4773
4795
|
this.prevState = L, this.redos.push({ redos: e, type: n });
|
|
4774
|
-
const
|
|
4775
|
-
this.stateSubject.next({ ...R, duration:
|
|
4796
|
+
const G = Y(R.trackItemsMap);
|
|
4797
|
+
this.stateSubject.next({ ...R, duration: G }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 }), this.updateState(R, { updateHistory: !1 });
|
|
4776
4798
|
}
|
|
4777
4799
|
applyPatch(r, e) {
|
|
4778
|
-
return e.reverse().reduce((n, i) => Na(n, (
|
|
4779
|
-
La(
|
|
4800
|
+
return e.reverse().reduce((n, i) => Na(n, (a) => {
|
|
4801
|
+
La(a, [i]);
|
|
4780
4802
|
}), r);
|
|
4781
4803
|
}
|
|
4782
4804
|
redo() {
|
|
@@ -4785,65 +4807,65 @@ class Xo {
|
|
|
4785
4807
|
es();
|
|
4786
4808
|
const {
|
|
4787
4809
|
trackItemIds: i,
|
|
4788
|
-
tracks:
|
|
4810
|
+
tracks: a,
|
|
4789
4811
|
transitionIds: u,
|
|
4790
4812
|
transitionsMap: c,
|
|
4791
4813
|
trackItemsMap: d,
|
|
4792
4814
|
structure: p
|
|
4793
4815
|
} = this.getState(), h = C({
|
|
4794
4816
|
trackItemIds: i,
|
|
4795
|
-
tracks:
|
|
4817
|
+
tracks: a,
|
|
4796
4818
|
transitionIds: u,
|
|
4797
4819
|
transitionsMap: c,
|
|
4798
4820
|
trackItemsMap: d,
|
|
4799
4821
|
structure: p
|
|
4800
|
-
}),
|
|
4822
|
+
}), y = [], m = [], I = [], k = [], b = [], _ = [];
|
|
4801
4823
|
e.forEach((x) => {
|
|
4802
4824
|
let F;
|
|
4803
|
-
const
|
|
4825
|
+
const et = x.path.slice(1);
|
|
4804
4826
|
x.type === "CREATE" ? F = {
|
|
4805
|
-
path:
|
|
4827
|
+
path: et,
|
|
4806
4828
|
op: "add",
|
|
4807
4829
|
value: x.value
|
|
4808
4830
|
} : x.type === "CHANGE" ? F = {
|
|
4809
|
-
path:
|
|
4831
|
+
path: et,
|
|
4810
4832
|
op: "replace",
|
|
4811
4833
|
value: x.value
|
|
4812
4834
|
} : F = {
|
|
4813
|
-
path:
|
|
4835
|
+
path: et,
|
|
4814
4836
|
op: "remove",
|
|
4815
4837
|
value: x.oldValue
|
|
4816
|
-
}, x.path.includes("trackItemIds") ?
|
|
4838
|
+
}, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? m.push(F) : x.path.includes("trackItemsMap") ? b.push(F) : x.path.includes("transitionsMap") ? k.push(F) : x.path.includes("structure") ? _.push(F) : y.push(F);
|
|
4817
4839
|
});
|
|
4818
4840
|
const f = this.applyPatch(
|
|
4819
4841
|
h.tracks,
|
|
4820
|
-
|
|
4821
|
-
),
|
|
4842
|
+
y
|
|
4843
|
+
), v = this.applyPatch(
|
|
4822
4844
|
h.transitionIds,
|
|
4823
4845
|
m
|
|
4824
4846
|
), w = this.applyPatch(
|
|
4825
4847
|
h.trackItemIds,
|
|
4826
|
-
|
|
4848
|
+
I
|
|
4827
4849
|
), S = this.applyPatch(
|
|
4828
4850
|
h.transitionsMap,
|
|
4829
|
-
|
|
4851
|
+
k
|
|
4830
4852
|
), E = this.applyPatch(
|
|
4831
4853
|
h.trackItemsMap,
|
|
4832
|
-
|
|
4854
|
+
b
|
|
4833
4855
|
), T = this.applyPatch(
|
|
4834
4856
|
h.structure,
|
|
4835
4857
|
_
|
|
4836
4858
|
), M = C({
|
|
4837
4859
|
tracks: f,
|
|
4838
|
-
transitionIds:
|
|
4860
|
+
transitionIds: v,
|
|
4839
4861
|
trackItemIds: w,
|
|
4840
4862
|
transitionsMap: S,
|
|
4841
4863
|
trackItemsMap: E,
|
|
4842
4864
|
structure: T
|
|
4843
4865
|
}), L = C(this.getState()), R = { ...L, ...M };
|
|
4844
4866
|
this.prevState = L, this.undos.push({ undos: e, type: n });
|
|
4845
|
-
const
|
|
4846
|
-
this.stateSubject.next({ ...R, duration:
|
|
4867
|
+
const G = Y(R.trackItemsMap);
|
|
4868
|
+
this.stateSubject.next({ ...R, duration: G }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 }), this.updateState(R, { updateHistory: !1 });
|
|
4847
4869
|
}
|
|
4848
4870
|
toJSON() {
|
|
4849
4871
|
const {
|
|
@@ -4851,7 +4873,7 @@ class Xo {
|
|
|
4851
4873
|
tracks: e,
|
|
4852
4874
|
size: n,
|
|
4853
4875
|
trackItemIds: i,
|
|
4854
|
-
transitionsMap:
|
|
4876
|
+
transitionsMap: a,
|
|
4855
4877
|
trackItemsMap: u,
|
|
4856
4878
|
transitionIds: c
|
|
4857
4879
|
} = this.getState();
|
|
@@ -4860,7 +4882,7 @@ class Xo {
|
|
|
4860
4882
|
tracks: e,
|
|
4861
4883
|
size: n,
|
|
4862
4884
|
trackItemIds: i,
|
|
4863
|
-
transitionsMap:
|
|
4885
|
+
transitionsMap: a,
|
|
4864
4886
|
trackItemsMap: u,
|
|
4865
4887
|
transitionIds: c
|
|
4866
4888
|
};
|
|
@@ -4880,7 +4902,7 @@ export {
|
|
|
4880
4902
|
Ti as ADD_HILL_AUDIO_BARS,
|
|
4881
4903
|
fi as ADD_ILLUSTRATION,
|
|
4882
4904
|
di as ADD_IMAGE,
|
|
4883
|
-
|
|
4905
|
+
gi as ADD_ITEMS,
|
|
4884
4906
|
_i as ADD_LINEAL_AUDIO_BARS,
|
|
4885
4907
|
Mo as ADD_MASK,
|
|
4886
4908
|
To as ADD_PLACEHOLDER,
|
|
@@ -4892,7 +4914,7 @@ export {
|
|
|
4892
4914
|
Mi as ADD_RECT,
|
|
4893
4915
|
pi as ADD_SHAPE,
|
|
4894
4916
|
vo as ADD_SUFFIX,
|
|
4895
|
-
|
|
4917
|
+
yi as ADD_TEMPLATE,
|
|
4896
4918
|
ci as ADD_TEXT,
|
|
4897
4919
|
Eo as ADD_TRANSITION,
|
|
4898
4920
|
ui as ADD_VIDEO,
|
|
@@ -4923,7 +4945,7 @@ export {
|
|
|
4923
4945
|
$o as LAYER_LOCKED,
|
|
4924
4946
|
No as LAYER_MOVE,
|
|
4925
4947
|
jo as LAYER_PASTE,
|
|
4926
|
-
|
|
4948
|
+
tt as LAYER_PREFIX,
|
|
4927
4949
|
Uo as LAYER_RENAME,
|
|
4928
4950
|
$i as LAYER_REPLACE,
|
|
4929
4951
|
Ri as LAYER_SELECT,
|