@designcombo/state 1.0.2 → 1.0.3
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 +783 -766
- package/dist/index.umd.js +2 -2
- package/dist/utils/load-item.d.ts +2 -2
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
var vi = Object.defineProperty;
|
2
2
|
var Si = (t, r, n) => r in t ? vi(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
|
3
|
-
var
|
4
|
-
import { subject as
|
3
|
+
var Zt = (t, r, n) => Si(t, typeof r != "symbol" ? r + "" : r, n);
|
4
|
+
import { subject as Qt, filter as te } from "@designcombo/events";
|
5
5
|
var dn = function(t, r) {
|
6
6
|
return dn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
7
7
|
n.__proto__ = i;
|
@@ -86,33 +86,33 @@ var yr = function() {
|
|
86
86
|
if (d)
|
87
87
|
if (this._parentage = null, Array.isArray(d))
|
88
88
|
try {
|
89
|
-
for (var p = pn(d),
|
90
|
-
var
|
91
|
-
|
89
|
+
for (var p = pn(d), T = p.next(); !T.done; T = p.next()) {
|
90
|
+
var x = T.value;
|
91
|
+
x.remove(this);
|
92
92
|
}
|
93
93
|
} catch (u) {
|
94
94
|
r = { error: u };
|
95
95
|
} finally {
|
96
96
|
try {
|
97
|
-
|
97
|
+
T && !T.done && (n = p.return) && n.call(p);
|
98
98
|
} finally {
|
99
99
|
if (r) throw r.error;
|
100
100
|
}
|
101
101
|
}
|
102
102
|
else
|
103
103
|
d.remove(this);
|
104
|
-
var
|
105
|
-
if (Rt(
|
104
|
+
var S = this.initialTeardown;
|
105
|
+
if (Rt(S))
|
106
106
|
try {
|
107
|
-
|
107
|
+
S();
|
108
108
|
} catch (u) {
|
109
109
|
c = u instanceof on ? u.errors : [u];
|
110
110
|
}
|
111
|
-
var
|
112
|
-
if (
|
111
|
+
var C = this._finalizers;
|
112
|
+
if (C) {
|
113
113
|
this._finalizers = null;
|
114
114
|
try {
|
115
|
-
for (var m = pn(
|
115
|
+
for (var m = pn(C), M = m.next(); !M.done; M = m.next()) {
|
116
116
|
var A = M.value;
|
117
117
|
try {
|
118
118
|
Cn(A);
|
@@ -232,7 +232,7 @@ var ti = function(t) {
|
|
232
232
|
function cn(t, r) {
|
233
233
|
return wi.call(t, r);
|
234
234
|
}
|
235
|
-
var
|
235
|
+
var Ei = function() {
|
236
236
|
function t(r) {
|
237
237
|
this.partialObserver = r;
|
238
238
|
}
|
@@ -283,29 +283,29 @@ var Ti = function() {
|
|
283
283
|
complete: n.complete && cn(n.complete, p)
|
284
284
|
}) : d = n;
|
285
285
|
}
|
286
|
-
return c.destination = new
|
286
|
+
return c.destination = new Ei(d), c;
|
287
287
|
}
|
288
288
|
return r;
|
289
289
|
}(ti);
|
290
290
|
function cr(t) {
|
291
291
|
ki(t);
|
292
292
|
}
|
293
|
-
function
|
293
|
+
function Ti(t) {
|
294
294
|
throw t;
|
295
295
|
}
|
296
296
|
var Mi = {
|
297
297
|
closed: !0,
|
298
298
|
next: Rn,
|
299
|
-
error:
|
299
|
+
error: Ti,
|
300
300
|
complete: Rn
|
301
301
|
}, Ai = function() {
|
302
302
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
303
303
|
}();
|
304
|
-
function
|
304
|
+
function xi(t) {
|
305
305
|
return t;
|
306
306
|
}
|
307
|
-
function
|
308
|
-
return t.length === 0 ?
|
307
|
+
function Di(t) {
|
308
|
+
return t.length === 0 ? xi : t.length === 1 ? t[0] : function(n) {
|
309
309
|
return t.reduce(function(i, s) {
|
310
310
|
return s(i);
|
311
311
|
}, n);
|
@@ -321,8 +321,8 @@ var Fn = function() {
|
|
321
321
|
}, t.prototype.subscribe = function(r, n, i) {
|
322
322
|
var s = this, c = Pi(r) ? r : new gn(r, n, i);
|
323
323
|
return ur(function() {
|
324
|
-
var d = s, p = d.operator,
|
325
|
-
c.add(p ? p.call(c,
|
324
|
+
var d = s, p = d.operator, T = d.source;
|
325
|
+
c.add(p ? p.call(c, T) : T ? s._subscribe(c) : s._trySubscribe(c));
|
326
326
|
}), c;
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
328
328
|
try {
|
@@ -337,8 +337,8 @@ var Fn = function() {
|
|
337
337
|
next: function(p) {
|
338
338
|
try {
|
339
339
|
r(p);
|
340
|
-
} catch (
|
341
|
-
c(
|
340
|
+
} catch (T) {
|
341
|
+
c(T), d.unsubscribe();
|
342
342
|
}
|
343
343
|
},
|
344
344
|
error: c,
|
@@ -354,7 +354,7 @@ var Fn = function() {
|
|
354
354
|
}, t.prototype.pipe = function() {
|
355
355
|
for (var r = [], n = 0; n < arguments.length; n++)
|
356
356
|
r[n] = arguments[n];
|
357
|
-
return
|
357
|
+
return Di(r)(this);
|
358
358
|
}, t.prototype.toPromise = function(r) {
|
359
359
|
var n = this;
|
360
360
|
return r = zn(r), new r(function(i, s) {
|
@@ -405,11 +405,11 @@ var Ci = Vn(function(t) {
|
|
405
405
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
406
406
|
try {
|
407
407
|
for (var d = pn(i.currentObservers), p = d.next(); !p.done; p = d.next()) {
|
408
|
-
var
|
409
|
-
|
408
|
+
var T = p.value;
|
409
|
+
T.next(n);
|
410
410
|
}
|
411
|
-
} catch (
|
412
|
-
s = { error:
|
411
|
+
} catch (x) {
|
412
|
+
s = { error: x };
|
413
413
|
} finally {
|
414
414
|
try {
|
415
415
|
p && !p.done && (c = d.return) && c.call(d);
|
@@ -506,31 +506,31 @@ var Ci = Vn(function(t) {
|
|
506
506
|
}, r.prototype.next = function(n) {
|
507
507
|
t.prototype.next.call(this, this._value = n);
|
508
508
|
}, r;
|
509
|
-
}(ei),
|
510
|
-
function
|
509
|
+
}(ei), It = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
510
|
+
function En(t) {
|
511
511
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
512
512
|
}
|
513
513
|
var fr = { exports: {} };
|
514
514
|
fr.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, d = 9007199254740991, p = "[object Arguments]",
|
517
|
-
L[H] = L[
|
518
|
-
var
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, d = 9007199254740991, p = "[object Arguments]", T = "[object Array]", x = "[object AsyncFunction]", S = "[object Boolean]", C = "[object Date]", m = "[object Error]", M = "[object Function]", A = "[object GeneratorFunction]", u = "[object Map]", f = "[object Number]", b = "[object Null]", y = "[object Object]", h = "[object Promise]", g = "[object Proxy]", _ = "[object RegExp]", I = "[object Set]", v = "[object String]", U = "[object Symbol]", R = "[object Undefined]", P = "[object WeakMap]", k = "[object ArrayBuffer]", E = "[object DataView]", H = "[object Float32Array]", K = "[object Float64Array]", W = "[object Int8Array]", $t = "[object Int16Array]", Ft = "[object Int32Array]", Y = "[object Uint8Array]", lt = "[object Uint8ClampedArray]", O = "[object Uint16Array]", _t = "[object Uint32Array]", zt = /[\\^$.*+?()[\]{}|]/g, q = /^\[object .+?Constructor\]$/, Ut = /^(?:0|[1-9]\d*)$/, L = {};
|
517
|
+
L[H] = L[K] = L[W] = L[$t] = L[Ft] = L[Y] = L[lt] = L[O] = L[_t] = !0, L[p] = L[T] = L[k] = L[S] = L[E] = L[C] = L[m] = L[M] = L[u] = L[f] = L[y] = L[_] = L[I] = L[v] = L[P] = !1;
|
518
|
+
var Wt = typeof It == "object" && It && It.Object === Object && It, ce = typeof self == "object" && self && self.Object === Object && self, j = Wt || ce || Function("return this")(), G = r && !r.nodeType && r, F = G && !0 && t && !t.nodeType && t, ft = F && F.exports === G, rt = ft && Wt.process, nt = function() {
|
519
519
|
try {
|
520
|
-
return
|
520
|
+
return rt && rt.binding && rt.binding("util");
|
521
521
|
} catch {
|
522
522
|
}
|
523
|
-
}(),
|
524
|
-
function
|
525
|
-
for (var o = -1, l = e == null ? 0 : e.length,
|
523
|
+
}(), dt = nt && nt.isTypedArray;
|
524
|
+
function Q(e, a) {
|
525
|
+
for (var o = -1, l = e == null ? 0 : e.length, D = 0, w = []; ++o < l; ) {
|
526
526
|
var N = e[o];
|
527
|
-
a(N, o, e) && (
|
527
|
+
a(N, o, e) && (w[D++] = N);
|
528
528
|
}
|
529
|
-
return
|
529
|
+
return w;
|
530
530
|
}
|
531
|
-
function
|
532
|
-
for (var o = -1, l = a.length,
|
533
|
-
e[
|
531
|
+
function xt(e, a) {
|
532
|
+
for (var o = -1, l = a.length, D = e.length; ++o < l; )
|
533
|
+
e[D + o] = a[o];
|
534
534
|
return e;
|
535
535
|
}
|
536
536
|
function ue(e, a) {
|
@@ -539,7 +539,7 @@ fr.exports;
|
|
539
539
|
return !0;
|
540
540
|
return !1;
|
541
541
|
}
|
542
|
-
function
|
542
|
+
function J(e, a) {
|
543
543
|
for (var o = -1, l = Array(e); ++o < e; )
|
544
544
|
l[o] = a(o);
|
545
545
|
return l;
|
@@ -552,13 +552,13 @@ fr.exports;
|
|
552
552
|
function wt(e, a) {
|
553
553
|
return e.has(a);
|
554
554
|
}
|
555
|
-
function
|
555
|
+
function Gt(e, a) {
|
556
556
|
return e == null ? void 0 : e[a];
|
557
557
|
}
|
558
|
-
function
|
558
|
+
function Ht(e) {
|
559
559
|
var a = -1, o = Array(e.size);
|
560
|
-
return e.forEach(function(l,
|
561
|
-
o[++a] = [
|
560
|
+
return e.forEach(function(l, D) {
|
561
|
+
o[++a] = [D, l];
|
562
562
|
}), o;
|
563
563
|
}
|
564
564
|
function Ye(e, a) {
|
@@ -566,27 +566,27 @@ fr.exports;
|
|
566
566
|
return e(a(o));
|
567
567
|
};
|
568
568
|
}
|
569
|
-
function
|
569
|
+
function Et(e) {
|
570
570
|
var a = -1, o = Array(e.size);
|
571
571
|
return e.forEach(function(l) {
|
572
572
|
o[++a] = l;
|
573
573
|
}), o;
|
574
574
|
}
|
575
|
-
var le = Array.prototype, vr = Function.prototype,
|
575
|
+
var le = Array.prototype, vr = Function.prototype, Yt = Object.prototype, fe = j["__core-js_shared__"], Se = vr.toString, gt = Yt.hasOwnProperty, Be = function() {
|
576
576
|
var e = /[^.]+$/.exec(fe && fe.keys && fe.keys.IE_PROTO || "");
|
577
577
|
return e ? "Symbol(src)_1." + e : "";
|
578
|
-
}(), Ke =
|
579
|
-
"^" + Se.call(
|
580
|
-
), ke =
|
581
|
-
function
|
578
|
+
}(), Ke = Yt.toString, Sr = RegExp(
|
579
|
+
"^" + Se.call(gt).replace(zt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
580
|
+
), ke = ft ? j.Buffer : void 0, de = j.Symbol, Xe = j.Uint8Array, pe = Yt.propertyIsEnumerable, Bt = le.splice, vt = de ? de.toStringTag : void 0, he = Object.getOwnPropertySymbols, we = ke ? ke.isBuffer : void 0, Kt = Ye(Object.keys, Object), Ee = Ot(j, "DataView"), Xt = Ot(j, "Map"), Te = Ot(j, "Promise"), Me = Ot(j, "Set"), Ae = Ot(j, "WeakMap"), jt = Ot(Object, "create"), Ve = ot(Ee), Dt = ot(Xt), kr = ot(Te), wr = ot(Me), Er = ot(Ae), qe = de ? de.prototype : void 0, xe = qe ? qe.valueOf : void 0;
|
581
|
+
function tt(e) {
|
582
582
|
var a = -1, o = e == null ? 0 : e.length;
|
583
583
|
for (this.clear(); ++a < o; ) {
|
584
584
|
var l = e[a];
|
585
585
|
this.set(l[0], l[1]);
|
586
586
|
}
|
587
587
|
}
|
588
|
-
function
|
589
|
-
this.__data__ =
|
588
|
+
function Tr() {
|
589
|
+
this.__data__ = jt ? jt(null) : {}, this.size = 0;
|
590
590
|
}
|
591
591
|
function Mr(e) {
|
592
592
|
var a = this.has(e) && delete this.__data__[e];
|
@@ -594,22 +594,22 @@ fr.exports;
|
|
594
594
|
}
|
595
595
|
function Ar(e) {
|
596
596
|
var a = this.__data__;
|
597
|
-
if (
|
597
|
+
if (jt) {
|
598
598
|
var o = a[e];
|
599
599
|
return o === i ? void 0 : o;
|
600
600
|
}
|
601
|
-
return
|
601
|
+
return gt.call(a, e) ? a[e] : void 0;
|
602
602
|
}
|
603
|
-
function
|
603
|
+
function xr(e) {
|
604
604
|
var a = this.__data__;
|
605
|
-
return
|
605
|
+
return jt ? a[e] !== void 0 : gt.call(a, e);
|
606
606
|
}
|
607
|
-
function
|
607
|
+
function Dr(e, a) {
|
608
608
|
var o = this.__data__;
|
609
|
-
return this.size += this.has(e) ? 0 : 1, o[e] =
|
609
|
+
return this.size += this.has(e) ? 0 : 1, o[e] = jt && a === void 0 ? i : a, this;
|
610
610
|
}
|
611
|
-
|
612
|
-
function
|
611
|
+
tt.prototype.clear = Tr, tt.prototype.delete = Mr, tt.prototype.get = Ar, tt.prototype.has = xr, tt.prototype.set = Dr;
|
612
|
+
function it(e) {
|
613
613
|
var a = -1, o = e == null ? 0 : e.length;
|
614
614
|
for (this.clear(); ++a < o; ) {
|
615
615
|
var l = e[a];
|
@@ -624,7 +624,7 @@ fr.exports;
|
|
624
624
|
if (o < 0)
|
625
625
|
return !1;
|
626
626
|
var l = a.length - 1;
|
627
|
-
return o == l ? a.pop() :
|
627
|
+
return o == l ? a.pop() : Bt.call(a, o, 1), --this.size, !0;
|
628
628
|
}
|
629
629
|
function Cr(e) {
|
630
630
|
var a = this.__data__, o = ge(a, e);
|
@@ -637,8 +637,8 @@ fr.exports;
|
|
637
637
|
var o = this.__data__, l = ge(o, e);
|
638
638
|
return l < 0 ? (++this.size, o.push([e, a])) : o[l][1] = a, this;
|
639
639
|
}
|
640
|
-
|
641
|
-
function
|
640
|
+
it.prototype.clear = Or, it.prototype.delete = Pr, it.prototype.get = Cr, it.prototype.has = Rr, it.prototype.set = Fr;
|
641
|
+
function pt(e) {
|
642
642
|
var a = -1, o = e == null ? 0 : e.length;
|
643
643
|
for (this.clear(); ++a < o; ) {
|
644
644
|
var l = e[a];
|
@@ -647,29 +647,29 @@ fr.exports;
|
|
647
647
|
}
|
648
648
|
function zr() {
|
649
649
|
this.size = 0, this.__data__ = {
|
650
|
-
hash: new
|
651
|
-
map: new (
|
652
|
-
string: new
|
650
|
+
hash: new tt(),
|
651
|
+
map: new (Xt || it)(),
|
652
|
+
string: new tt()
|
653
653
|
};
|
654
654
|
}
|
655
655
|
function Hr(e) {
|
656
|
-
var a =
|
656
|
+
var a = St(this, e).delete(e);
|
657
657
|
return this.size -= a ? 1 : 0, a;
|
658
658
|
}
|
659
659
|
function jr(e) {
|
660
|
-
return
|
660
|
+
return St(this, e).get(e);
|
661
661
|
}
|
662
662
|
function Nr(e) {
|
663
|
-
return
|
663
|
+
return St(this, e).has(e);
|
664
664
|
}
|
665
665
|
function Lr(e, a) {
|
666
|
-
var o =
|
666
|
+
var o = St(this, e), l = o.size;
|
667
667
|
return o.set(e, a), this.size += o.size == l ? 0 : 1, this;
|
668
668
|
}
|
669
|
-
|
669
|
+
pt.prototype.clear = zr, pt.prototype.delete = Hr, pt.prototype.get = jr, pt.prototype.has = Nr, pt.prototype.set = Lr;
|
670
670
|
function me(e) {
|
671
671
|
var a = -1, o = e == null ? 0 : e.length;
|
672
|
-
for (this.__data__ = new
|
672
|
+
for (this.__data__ = new pt(); ++a < o; )
|
673
673
|
this.add(e[a]);
|
674
674
|
}
|
675
675
|
function Je(e) {
|
@@ -679,12 +679,12 @@ fr.exports;
|
|
679
679
|
return this.__data__.has(e);
|
680
680
|
}
|
681
681
|
me.prototype.add = me.prototype.push = Je, me.prototype.has = ye;
|
682
|
-
function
|
683
|
-
var a = this.__data__ = new
|
682
|
+
function Tt(e) {
|
683
|
+
var a = this.__data__ = new it(e);
|
684
684
|
this.size = a.size;
|
685
685
|
}
|
686
|
-
function
|
687
|
-
this.__data__ = new
|
686
|
+
function De() {
|
687
|
+
this.__data__ = new it(), this.size = 0;
|
688
688
|
}
|
689
689
|
function $r(e) {
|
690
690
|
var a = this.__data__, o = a.delete(e);
|
@@ -698,23 +698,23 @@ fr.exports;
|
|
698
698
|
}
|
699
699
|
function Gr(e, a) {
|
700
700
|
var o = this.__data__;
|
701
|
-
if (o instanceof
|
701
|
+
if (o instanceof it) {
|
702
702
|
var l = o.__data__;
|
703
|
-
if (!
|
703
|
+
if (!Xt || l.length < n - 1)
|
704
704
|
return l.push([e, a]), this.size = ++o.size, this;
|
705
|
-
o = this.__data__ = new
|
705
|
+
o = this.__data__ = new pt(l);
|
706
706
|
}
|
707
707
|
return o.set(e, a), this.size = o.size, this;
|
708
708
|
}
|
709
|
-
|
709
|
+
Tt.prototype.clear = De, Tt.prototype.delete = $r, Tt.prototype.get = Ur, Tt.prototype.has = Wr, Tt.prototype.set = Gr;
|
710
710
|
function Yr(e, a) {
|
711
|
-
var o = Ie(e), l = !o && rr(e),
|
711
|
+
var o = Ie(e), l = !o && rr(e), D = !o && !l && be(e), w = !o && !l && !D && ar(e), N = o || l || D || w, z = N ? J(e.length, String) : [], B = z.length;
|
712
712
|
for (var $ in e)
|
713
|
-
|
713
|
+
gt.call(e, $) && !(N && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
714
|
($ == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
|
-
|
716
|
-
|
717
|
-
Qr($,
|
715
|
+
D && ($ == "offset" || $ == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
|
+
w && ($ == "buffer" || $ == "byteLength" || $ == "byteOffset") || // Skip index properties.
|
717
|
+
Qr($, B))) && z.push($);
|
718
718
|
return z;
|
719
719
|
}
|
720
720
|
function ge(e, a) {
|
@@ -725,198 +725,198 @@ fr.exports;
|
|
725
725
|
}
|
726
726
|
function Oe(e, a, o) {
|
727
727
|
var l = a(e);
|
728
|
-
return Ie(e) ? l :
|
728
|
+
return Ie(e) ? l : xt(l, o(e));
|
729
729
|
}
|
730
|
-
function
|
731
|
-
return e == null ? e === void 0 ?
|
730
|
+
function Vt(e) {
|
731
|
+
return e == null ? e === void 0 ? R : b : vt && vt in Object(e) ? Pt(e) : tr(e);
|
732
732
|
}
|
733
733
|
function Ze(e) {
|
734
|
-
return At(e) &&
|
734
|
+
return At(e) && Vt(e) == p;
|
735
735
|
}
|
736
|
-
function Qe(e, a, o, l,
|
737
|
-
return e === a ? !0 : e == null || a == null || !At(e) && !At(a) ? e !== e && a !== a : Br(e, a, o, l, Qe,
|
736
|
+
function Qe(e, a, o, l, D) {
|
737
|
+
return e === a ? !0 : e == null || a == null || !At(e) && !At(a) ? e !== e && a !== a : Br(e, a, o, l, Qe, D);
|
738
738
|
}
|
739
|
-
function Br(e, a, o, l,
|
740
|
-
var N = Ie(e), z = Ie(a),
|
741
|
-
|
742
|
-
var
|
743
|
-
if (
|
739
|
+
function Br(e, a, o, l, D, w) {
|
740
|
+
var N = Ie(e), z = Ie(a), B = N ? T : Mt(e), $ = z ? T : Mt(a);
|
741
|
+
B = B == p ? y : B, $ = $ == p ? y : $;
|
742
|
+
var at = B == y, ht = $ == y, X = B == $;
|
743
|
+
if (X && be(e)) {
|
744
744
|
if (!be(a))
|
745
745
|
return !1;
|
746
|
-
N = !0,
|
746
|
+
N = !0, at = !1;
|
747
747
|
}
|
748
|
-
if (
|
749
|
-
return
|
748
|
+
if (X && !at)
|
749
|
+
return w || (w = new Tt()), N || ar(e) ? Pe(e, a, o, l, D, w) : qr(e, a, B, o, l, D, w);
|
750
750
|
if (!(o & s)) {
|
751
|
-
var
|
752
|
-
if (
|
753
|
-
var
|
754
|
-
return
|
751
|
+
var st = at && gt.call(e, "__wrapped__"), et = ht && gt.call(a, "__wrapped__");
|
752
|
+
if (st || et) {
|
753
|
+
var Nt = st ? e.value() : e, Ct = et ? a.value() : a;
|
754
|
+
return w || (w = new Tt()), D(Nt, Ct, o, l, w);
|
755
755
|
}
|
756
756
|
}
|
757
|
-
return
|
757
|
+
return X ? (w || (w = new Tt()), Jr(e, a, o, l, D, w)) : !1;
|
758
758
|
}
|
759
759
|
function Kr(e) {
|
760
760
|
if (!ir(e) || en(e))
|
761
761
|
return !1;
|
762
|
-
var a = nr(e) ? Sr :
|
763
|
-
return a.test(
|
762
|
+
var a = nr(e) ? Sr : q;
|
763
|
+
return a.test(ot(e));
|
764
764
|
}
|
765
765
|
function Xr(e) {
|
766
|
-
return At(e) && Re(e.length) && !!L[
|
766
|
+
return At(e) && Re(e.length) && !!L[Vt(e)];
|
767
767
|
}
|
768
768
|
function Vr(e) {
|
769
769
|
if (!rn(e))
|
770
|
-
return
|
770
|
+
return Kt(e);
|
771
771
|
var a = [];
|
772
772
|
for (var o in Object(e))
|
773
|
-
|
773
|
+
gt.call(e, o) && o != "constructor" && a.push(o);
|
774
774
|
return a;
|
775
775
|
}
|
776
|
-
function Pe(e, a, o, l,
|
777
|
-
var N = o & s, z = e.length,
|
778
|
-
if (z !=
|
776
|
+
function Pe(e, a, o, l, D, w) {
|
777
|
+
var N = o & s, z = e.length, B = a.length;
|
778
|
+
if (z != B && !(N && B > z))
|
779
779
|
return !1;
|
780
|
-
var $ =
|
781
|
-
if ($ &&
|
780
|
+
var $ = w.get(e);
|
781
|
+
if ($ && w.get(a))
|
782
782
|
return $ == a;
|
783
|
-
var
|
784
|
-
for (
|
785
|
-
var
|
783
|
+
var at = -1, ht = !0, X = o & c ? new me() : void 0;
|
784
|
+
for (w.set(e, a), w.set(a, e); ++at < z; ) {
|
785
|
+
var st = e[at], et = a[at];
|
786
786
|
if (l)
|
787
|
-
var
|
788
|
-
if (
|
789
|
-
if (
|
787
|
+
var Nt = N ? l(et, st, at, a, e, w) : l(st, et, at, e, a, w);
|
788
|
+
if (Nt !== void 0) {
|
789
|
+
if (Nt)
|
790
790
|
continue;
|
791
|
-
|
791
|
+
ht = !1;
|
792
792
|
break;
|
793
793
|
}
|
794
|
-
if (
|
795
|
-
if (!ue(a, function(Ct,
|
796
|
-
if (!wt(
|
797
|
-
return
|
794
|
+
if (X) {
|
795
|
+
if (!ue(a, function(Ct, Jt) {
|
796
|
+
if (!wt(X, Jt) && (st === Ct || D(st, Ct, o, l, w)))
|
797
|
+
return X.push(Jt);
|
798
798
|
})) {
|
799
|
-
|
799
|
+
ht = !1;
|
800
800
|
break;
|
801
801
|
}
|
802
|
-
} else if (!(
|
803
|
-
|
802
|
+
} else if (!(st === et || D(st, et, o, l, w))) {
|
803
|
+
ht = !1;
|
804
804
|
break;
|
805
805
|
}
|
806
806
|
}
|
807
|
-
return
|
807
|
+
return w.delete(e), w.delete(a), ht;
|
808
808
|
}
|
809
|
-
function qr(e, a, o, l,
|
809
|
+
function qr(e, a, o, l, D, w, N) {
|
810
810
|
switch (o) {
|
811
|
-
case
|
811
|
+
case E:
|
812
812
|
if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
|
813
813
|
return !1;
|
814
814
|
e = e.buffer, a = a.buffer;
|
815
|
-
case
|
816
|
-
return !(e.byteLength != a.byteLength || !
|
817
|
-
case
|
818
|
-
case
|
815
|
+
case k:
|
816
|
+
return !(e.byteLength != a.byteLength || !w(new Xe(e), new Xe(a)));
|
817
|
+
case S:
|
818
|
+
case C:
|
819
819
|
case f:
|
820
820
|
return er(+e, +a);
|
821
821
|
case m:
|
822
822
|
return e.name == a.name && e.message == a.message;
|
823
823
|
case _:
|
824
|
-
case
|
824
|
+
case v:
|
825
825
|
return e == a + "";
|
826
826
|
case u:
|
827
|
-
var z =
|
828
|
-
case
|
829
|
-
var
|
830
|
-
if (z || (z =
|
827
|
+
var z = Ht;
|
828
|
+
case I:
|
829
|
+
var B = l & s;
|
830
|
+
if (z || (z = Et), e.size != a.size && !B)
|
831
831
|
return !1;
|
832
832
|
var $ = N.get(e);
|
833
833
|
if ($)
|
834
834
|
return $ == a;
|
835
835
|
l |= c, N.set(e, a);
|
836
|
-
var
|
837
|
-
return N.delete(e),
|
836
|
+
var at = Pe(z(e), z(a), l, D, w, N);
|
837
|
+
return N.delete(e), at;
|
838
838
|
case U:
|
839
|
-
if (
|
840
|
-
return
|
839
|
+
if (xe)
|
840
|
+
return xe.call(e) == xe.call(a);
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function Jr(e, a, o, l,
|
845
|
-
var N = o & s, z =
|
846
|
-
if (
|
844
|
+
function Jr(e, a, o, l, D, w) {
|
845
|
+
var N = o & s, z = qt(e), B = z.length, $ = qt(a), at = $.length;
|
846
|
+
if (B != at && !N)
|
847
847
|
return !1;
|
848
|
-
for (var
|
849
|
-
var
|
850
|
-
if (!(N ?
|
848
|
+
for (var ht = B; ht--; ) {
|
849
|
+
var X = z[ht];
|
850
|
+
if (!(N ? X in a : gt.call(a, X)))
|
851
851
|
return !1;
|
852
852
|
}
|
853
|
-
var
|
854
|
-
if (
|
855
|
-
return
|
856
|
-
var
|
857
|
-
|
858
|
-
for (var
|
859
|
-
|
860
|
-
var Ct = e[
|
853
|
+
var st = w.get(e);
|
854
|
+
if (st && w.get(a))
|
855
|
+
return st == a;
|
856
|
+
var et = !0;
|
857
|
+
w.set(e, a), w.set(a, e);
|
858
|
+
for (var Nt = N; ++ht < B; ) {
|
859
|
+
X = z[ht];
|
860
|
+
var Ct = e[X], Jt = a[X];
|
861
861
|
if (l)
|
862
|
-
var Pn = N ? l(
|
863
|
-
if (!(Pn === void 0 ? Ct ===
|
864
|
-
|
862
|
+
var Pn = N ? l(Jt, Ct, X, a, e, w) : l(Ct, Jt, X, e, a, w);
|
863
|
+
if (!(Pn === void 0 ? Ct === Jt || D(Ct, Jt, o, l, w) : Pn)) {
|
864
|
+
et = !1;
|
865
865
|
break;
|
866
866
|
}
|
867
|
-
|
867
|
+
Nt || (Nt = X == "constructor");
|
868
868
|
}
|
869
|
-
if (
|
869
|
+
if (et && !Nt) {
|
870
870
|
var sr = e.constructor, or = a.constructor;
|
871
|
-
sr != or && "constructor" in e && "constructor" in a && !(typeof sr == "function" && sr instanceof sr && typeof or == "function" && or instanceof or) && (
|
871
|
+
sr != or && "constructor" in e && "constructor" in a && !(typeof sr == "function" && sr instanceof sr && typeof or == "function" && or instanceof or) && (et = !1);
|
872
872
|
}
|
873
|
-
return
|
873
|
+
return w.delete(e), w.delete(a), et;
|
874
874
|
}
|
875
|
-
function
|
875
|
+
function qt(e) {
|
876
876
|
return Oe(e, Fe, Zr);
|
877
877
|
}
|
878
|
-
function
|
878
|
+
function St(e, a) {
|
879
879
|
var o = e.__data__;
|
880
880
|
return tn(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
881
881
|
}
|
882
882
|
function Ot(e, a) {
|
883
|
-
var o =
|
883
|
+
var o = Gt(e, a);
|
884
884
|
return Kr(o) ? o : void 0;
|
885
885
|
}
|
886
886
|
function Pt(e) {
|
887
|
-
var a =
|
887
|
+
var a = gt.call(e, vt), o = e[vt];
|
888
888
|
try {
|
889
|
-
e[
|
889
|
+
e[vt] = void 0;
|
890
890
|
var l = !0;
|
891
891
|
} catch {
|
892
892
|
}
|
893
|
-
var
|
894
|
-
return l && (a ? e[
|
893
|
+
var D = Ke.call(e);
|
894
|
+
return l && (a ? e[vt] = o : delete e[vt]), D;
|
895
895
|
}
|
896
896
|
var Zr = he ? function(e) {
|
897
|
-
return e == null ? [] : (e = Object(e),
|
897
|
+
return e == null ? [] : (e = Object(e), Q(he(e), function(a) {
|
898
898
|
return pe.call(e, a);
|
899
899
|
}));
|
900
|
-
} : an, Mt =
|
901
|
-
(
|
902
|
-
var a =
|
900
|
+
} : an, Mt = Vt;
|
901
|
+
(Ee && Mt(new Ee(new ArrayBuffer(1))) != E || Xt && Mt(new Xt()) != u || Te && Mt(Te.resolve()) != h || Me && Mt(new Me()) != I || Ae && Mt(new Ae()) != P) && (Mt = function(e) {
|
902
|
+
var a = Vt(e), o = a == y ? e.constructor : void 0, l = o ? ot(o) : "";
|
903
903
|
if (l)
|
904
904
|
switch (l) {
|
905
905
|
case Ve:
|
906
|
-
return
|
907
|
-
case
|
906
|
+
return E;
|
907
|
+
case Dt:
|
908
908
|
return u;
|
909
909
|
case kr:
|
910
910
|
return h;
|
911
911
|
case wr:
|
912
|
-
return
|
913
|
-
case
|
914
|
-
return
|
912
|
+
return I;
|
913
|
+
case Er:
|
914
|
+
return P;
|
915
915
|
}
|
916
916
|
return a;
|
917
917
|
});
|
918
918
|
function Qr(e, a) {
|
919
|
-
return a = a ?? d, !!a && (typeof e == "number" ||
|
919
|
+
return a = a ?? d, !!a && (typeof e == "number" || Ut.test(e)) && e > -1 && e % 1 == 0 && e < a;
|
920
920
|
}
|
921
921
|
function tn(e) {
|
922
922
|
var a = typeof e;
|
@@ -926,13 +926,13 @@ fr.exports;
|
|
926
926
|
return !!Be && Be in e;
|
927
927
|
}
|
928
928
|
function rn(e) {
|
929
|
-
var a = e && e.constructor, o = typeof a == "function" && a.prototype ||
|
929
|
+
var a = e && e.constructor, o = typeof a == "function" && a.prototype || Yt;
|
930
930
|
return e === o;
|
931
931
|
}
|
932
932
|
function tr(e) {
|
933
933
|
return Ke.call(e);
|
934
934
|
}
|
935
|
-
function
|
935
|
+
function ot(e) {
|
936
936
|
if (e != null) {
|
937
937
|
try {
|
938
938
|
return Se.call(e);
|
@@ -951,7 +951,7 @@ fr.exports;
|
|
951
951
|
var rr = Ze(/* @__PURE__ */ function() {
|
952
952
|
return arguments;
|
953
953
|
}()) ? Ze : function(e) {
|
954
|
-
return At(e) &&
|
954
|
+
return At(e) && gt.call(e, "callee") && !pe.call(e, "callee");
|
955
955
|
}, Ie = Array.isArray;
|
956
956
|
function Ce(e) {
|
957
957
|
return e != null && Re(e.length) && !nr(e);
|
@@ -963,8 +963,8 @@ fr.exports;
|
|
963
963
|
function nr(e) {
|
964
964
|
if (!ir(e))
|
965
965
|
return !1;
|
966
|
-
var a =
|
967
|
-
return a == M || a == A || a ==
|
966
|
+
var a = Vt(e);
|
967
|
+
return a == M || a == A || a == x || a == g;
|
968
968
|
}
|
969
969
|
function Re(e) {
|
970
970
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= d;
|
@@ -976,7 +976,7 @@ fr.exports;
|
|
976
976
|
function At(e) {
|
977
977
|
return e != null && typeof e == "object";
|
978
978
|
}
|
979
|
-
var ar =
|
979
|
+
var ar = dt ? kt(dt) : Xr;
|
980
980
|
function Fe(e) {
|
981
981
|
return Ce(e) ? Yr(e) : Vr(e);
|
982
982
|
}
|
@@ -989,13 +989,13 @@ fr.exports;
|
|
989
989
|
t.exports = nn;
|
990
990
|
})(fr, fr.exports);
|
991
991
|
var Ri = fr.exports;
|
992
|
-
const
|
992
|
+
const ct = /* @__PURE__ */ En(Ri), cs = "add", Fi = "track", zi = "trackItems", us = `${Fi}:changed`, ls = `${zi}:changed`, Hi = "state", fs = `${Hi}:changed`, Tn = "design", ji = `${Tn}:load`, Ni = `${Tn}:resize`, bt = "add", Li = `${bt}:text`, $i = `${bt}:video`, Ui = `${bt}:audio`, ds = `${bt}:placeholder`, Wi = `${bt}:image`, ps = `${bt}:mask`, hs = `${bt}:transition`, ms = `${bt}:animation`, Gi = `${bt}:caption`, Yi = `${bt}:template`, Bi = `${bt}:items`, oe = "edit", Ki = `${oe}:object`, Xi = `${oe}:replaceMedia`, ys = `${oe}:text`, gs = `${oe}:shape`, Is = `${oe}:templateItem`, bs = `${oe}:deleteTemplateItem`, _s = "enterEditMode", ve = "active", vs = `${ve}:set`, Ss = `${ve}:delete`, Vi = `${ve}:paste`, qi = `${ve}:clone`, Ji = `${ve}:split`, ut = "layer", ks = `${ut}:locked`, ws = `${ut}:hidden`, Es = `${ut}:move`, Ts = `${ut}:select`, Ms = `${ut}:selection`, As = `${ut}:sendTo`, xs = `${ut}:rename`, Ds = `${ut}:editingName`, Os = `${ut}:copy`, Ps = `${ut}:paste`, Zi = `${ut}:clone`, Cs = `${ut}:split`, Rs = `${ut}:cut`, Qi = `${ut}:delete`, gr = "history", ta = `${gr}:undo`, ea = `${gr}:redo`, Fs = `${gr}:reset`, ri = "scale", ra = `${ri}:changed`;
|
993
993
|
var dr = { exports: {} };
|
994
994
|
dr.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", d = "[object Array]", p = "[object Boolean]",
|
997
|
-
|
998
|
-
var
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", d = "[object Array]", p = "[object Boolean]", T = "[object Date]", x = "[object Error]", S = "[object Function]", C = "[object GeneratorFunction]", m = "[object Map]", M = "[object Number]", A = "[object Object]", u = "[object Promise]", f = "[object RegExp]", b = "[object Set]", y = "[object String]", h = "[object Symbol]", g = "[object WeakMap]", _ = "[object ArrayBuffer]", I = "[object DataView]", v = "[object Float32Array]", U = "[object Float64Array]", R = "[object Int8Array]", P = "[object Int16Array]", k = "[object Int32Array]", E = "[object Uint8Array]", H = "[object Uint8ClampedArray]", K = "[object Uint16Array]", W = "[object Uint32Array]", $t = /[\\^$.*+?()[\]{}|]/g, Ft = /\w*$/, Y = /^\[object .+?Constructor\]$/, lt = /^(?:0|[1-9]\d*)$/, O = {};
|
997
|
+
O[c] = O[d] = O[_] = O[I] = O[p] = O[T] = O[v] = O[U] = O[R] = O[P] = O[k] = O[m] = O[M] = O[A] = O[f] = O[b] = O[y] = O[h] = O[E] = O[H] = O[K] = O[W] = !0, O[x] = O[S] = O[g] = !1;
|
998
|
+
var _t = typeof It == "object" && It && It.Object === Object && It, zt = typeof self == "object" && self && self.Object === Object && self, q = _t || zt || Function("return this")(), Ut = r && !r.nodeType && r, L = Ut && !0 && t && !t.nodeType && t, Wt = L && L.exports === Ut;
|
999
999
|
function ce(e, a) {
|
1000
1000
|
return e.set(a[0], a[1]), e;
|
1001
1001
|
}
|
@@ -1008,24 +1008,24 @@ dr.exports;
|
|
1008
1008
|
return e;
|
1009
1009
|
}
|
1010
1010
|
function F(e, a) {
|
1011
|
-
for (var o = -1, l = a.length,
|
1012
|
-
e[
|
1011
|
+
for (var o = -1, l = a.length, D = e.length; ++o < l; )
|
1012
|
+
e[D + o] = a[o];
|
1013
1013
|
return e;
|
1014
1014
|
}
|
1015
|
-
function
|
1016
|
-
for (var
|
1017
|
-
o = a(o, e[
|
1015
|
+
function ft(e, a, o, l) {
|
1016
|
+
for (var D = -1, w = e ? e.length : 0; ++D < w; )
|
1017
|
+
o = a(o, e[D], D, e);
|
1018
1018
|
return o;
|
1019
1019
|
}
|
1020
|
-
function
|
1020
|
+
function rt(e, a) {
|
1021
1021
|
for (var o = -1, l = Array(e); ++o < e; )
|
1022
1022
|
l[o] = a(o);
|
1023
1023
|
return l;
|
1024
1024
|
}
|
1025
|
-
function
|
1025
|
+
function nt(e, a) {
|
1026
1026
|
return e == null ? void 0 : e[a];
|
1027
1027
|
}
|
1028
|
-
function
|
1028
|
+
function dt(e) {
|
1029
1029
|
var a = !1;
|
1030
1030
|
if (e != null && typeof e.toString != "function")
|
1031
1031
|
try {
|
@@ -1034,13 +1034,13 @@ dr.exports;
|
|
1034
1034
|
}
|
1035
1035
|
return a;
|
1036
1036
|
}
|
1037
|
-
function
|
1037
|
+
function Q(e) {
|
1038
1038
|
var a = -1, o = Array(e.size);
|
1039
|
-
return e.forEach(function(l,
|
1040
|
-
o[++a] = [
|
1039
|
+
return e.forEach(function(l, D) {
|
1040
|
+
o[++a] = [D, l];
|
1041
1041
|
}), o;
|
1042
1042
|
}
|
1043
|
-
function
|
1043
|
+
function xt(e, a) {
|
1044
1044
|
return function(o) {
|
1045
1045
|
return e(a(o));
|
1046
1046
|
};
|
@@ -1051,13 +1051,13 @@ dr.exports;
|
|
1051
1051
|
o[++a] = l;
|
1052
1052
|
}), o;
|
1053
1053
|
}
|
1054
|
-
var
|
1055
|
-
var e = /[^.]+$/.exec(
|
1054
|
+
var J = Array.prototype, kt = Function.prototype, wt = Object.prototype, Gt = q["__core-js_shared__"], Ht = function() {
|
1055
|
+
var e = /[^.]+$/.exec(Gt && Gt.keys && Gt.keys.IE_PROTO || "");
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
1057
|
-
}(), Ye = kt.toString,
|
1058
|
-
"^" + Ye.call(
|
1059
|
-
),
|
1060
|
-
function
|
1057
|
+
}(), Ye = kt.toString, Et = wt.hasOwnProperty, le = wt.toString, vr = RegExp(
|
1058
|
+
"^" + Ye.call(Et).replace($t, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
1059
|
+
), Yt = Wt ? q.Buffer : void 0, fe = q.Symbol, Se = q.Uint8Array, gt = xt(Object.getPrototypeOf, Object), Be = Object.create, Ke = wt.propertyIsEnumerable, Sr = J.splice, ke = Object.getOwnPropertySymbols, de = Yt ? Yt.isBuffer : void 0, Xe = xt(Object.keys, Object), pe = St(q, "DataView"), Bt = St(q, "Map"), vt = St(q, "Promise"), he = St(q, "Set"), we = St(q, "WeakMap"), Kt = St(Object, "create"), Ee = ot(pe), Xt = ot(Bt), Te = ot(vt), Me = ot(he), Ae = ot(we), jt = fe ? fe.prototype : void 0, Ve = jt ? jt.valueOf : void 0;
|
1060
|
+
function Dt(e) {
|
1061
1061
|
var a = -1, o = e ? e.length : 0;
|
1062
1062
|
for (this.clear(); ++a < o; ) {
|
1063
1063
|
var l = e[a];
|
@@ -1065,36 +1065,36 @@ dr.exports;
|
|
1065
1065
|
}
|
1066
1066
|
}
|
1067
1067
|
function kr() {
|
1068
|
-
this.__data__ =
|
1068
|
+
this.__data__ = Kt ? Kt(null) : {};
|
1069
1069
|
}
|
1070
1070
|
function wr(e) {
|
1071
1071
|
return this.has(e) && delete this.__data__[e];
|
1072
1072
|
}
|
1073
|
-
function
|
1073
|
+
function Er(e) {
|
1074
1074
|
var a = this.__data__;
|
1075
|
-
if (
|
1075
|
+
if (Kt) {
|
1076
1076
|
var o = a[e];
|
1077
1077
|
return o === i ? void 0 : o;
|
1078
1078
|
}
|
1079
|
-
return
|
1079
|
+
return Et.call(a, e) ? a[e] : void 0;
|
1080
1080
|
}
|
1081
1081
|
function qe(e) {
|
1082
1082
|
var a = this.__data__;
|
1083
|
-
return
|
1083
|
+
return Kt ? a[e] !== void 0 : Et.call(a, e);
|
1084
1084
|
}
|
1085
|
-
function
|
1085
|
+
function xe(e, a) {
|
1086
1086
|
var o = this.__data__;
|
1087
|
-
return o[e] =
|
1087
|
+
return o[e] = Kt && a === void 0 ? i : a, this;
|
1088
1088
|
}
|
1089
|
-
|
1090
|
-
function
|
1089
|
+
Dt.prototype.clear = kr, Dt.prototype.delete = wr, Dt.prototype.get = Er, Dt.prototype.has = qe, Dt.prototype.set = xe;
|
1090
|
+
function tt(e) {
|
1091
1091
|
var a = -1, o = e ? e.length : 0;
|
1092
1092
|
for (this.clear(); ++a < o; ) {
|
1093
1093
|
var l = e[a];
|
1094
1094
|
this.set(l[0], l[1]);
|
1095
1095
|
}
|
1096
1096
|
}
|
1097
|
-
function
|
1097
|
+
function Tr() {
|
1098
1098
|
this.__data__ = [];
|
1099
1099
|
}
|
1100
1100
|
function Mr(e) {
|
@@ -1108,15 +1108,15 @@ dr.exports;
|
|
1108
1108
|
var a = this.__data__, o = ye(a, e);
|
1109
1109
|
return o < 0 ? void 0 : a[o][1];
|
1110
1110
|
}
|
1111
|
-
function
|
1111
|
+
function xr(e) {
|
1112
1112
|
return ye(this.__data__, e) > -1;
|
1113
1113
|
}
|
1114
|
-
function
|
1114
|
+
function Dr(e, a) {
|
1115
1115
|
var o = this.__data__, l = ye(o, e);
|
1116
1116
|
return l < 0 ? o.push([e, a]) : o[l][1] = a, this;
|
1117
1117
|
}
|
1118
|
-
|
1119
|
-
function
|
1118
|
+
tt.prototype.clear = Tr, tt.prototype.delete = Mr, tt.prototype.get = Ar, tt.prototype.has = xr, tt.prototype.set = Dr;
|
1119
|
+
function it(e) {
|
1120
1120
|
var a = -1, o = e ? e.length : 0;
|
1121
1121
|
for (this.clear(); ++a < o; ) {
|
1122
1122
|
var l = e[a];
|
@@ -1125,29 +1125,29 @@ dr.exports;
|
|
1125
1125
|
}
|
1126
1126
|
function Or() {
|
1127
1127
|
this.__data__ = {
|
1128
|
-
hash: new
|
1129
|
-
map: new (
|
1130
|
-
string: new
|
1128
|
+
hash: new Dt(),
|
1129
|
+
map: new (Bt || tt)(),
|
1130
|
+
string: new Dt()
|
1131
1131
|
};
|
1132
1132
|
}
|
1133
1133
|
function Pr(e) {
|
1134
|
-
return
|
1134
|
+
return qt(this, e).delete(e);
|
1135
1135
|
}
|
1136
1136
|
function Cr(e) {
|
1137
|
-
return
|
1137
|
+
return qt(this, e).get(e);
|
1138
1138
|
}
|
1139
1139
|
function Rr(e) {
|
1140
|
-
return
|
1140
|
+
return qt(this, e).has(e);
|
1141
1141
|
}
|
1142
1142
|
function Fr(e, a) {
|
1143
|
-
return
|
1143
|
+
return qt(this, e).set(e, a), this;
|
1144
1144
|
}
|
1145
|
-
|
1146
|
-
function
|
1147
|
-
this.__data__ = new
|
1145
|
+
it.prototype.clear = Or, it.prototype.delete = Pr, it.prototype.get = Cr, it.prototype.has = Rr, it.prototype.set = Fr;
|
1146
|
+
function pt(e) {
|
1147
|
+
this.__data__ = new tt(e);
|
1148
1148
|
}
|
1149
1149
|
function zr() {
|
1150
|
-
this.__data__ = new
|
1150
|
+
this.__data__ = new tt();
|
1151
1151
|
}
|
1152
1152
|
function Hr(e) {
|
1153
1153
|
return this.__data__.delete(e);
|
@@ -1160,24 +1160,24 @@ dr.exports;
|
|
1160
1160
|
}
|
1161
1161
|
function Lr(e, a) {
|
1162
1162
|
var o = this.__data__;
|
1163
|
-
if (o instanceof
|
1163
|
+
if (o instanceof tt) {
|
1164
1164
|
var l = o.__data__;
|
1165
|
-
if (!
|
1165
|
+
if (!Bt || l.length < n - 1)
|
1166
1166
|
return l.push([e, a]), this;
|
1167
|
-
o = this.__data__ = new
|
1167
|
+
o = this.__data__ = new it(l);
|
1168
1168
|
}
|
1169
1169
|
return o.set(e, a), this;
|
1170
1170
|
}
|
1171
|
-
|
1171
|
+
pt.prototype.clear = zr, pt.prototype.delete = Hr, pt.prototype.get = jr, pt.prototype.has = Nr, pt.prototype.set = Lr;
|
1172
1172
|
function me(e, a) {
|
1173
|
-
var o = Ce(e) || Ie(e) ?
|
1174
|
-
for (var
|
1175
|
-
|
1173
|
+
var o = Ce(e) || Ie(e) ? rt(e.length, String) : [], l = o.length, D = !!l;
|
1174
|
+
for (var w in e)
|
1175
|
+
Et.call(e, w) && !(D && (w == "length" || tn(w, l))) && o.push(w);
|
1176
1176
|
return o;
|
1177
1177
|
}
|
1178
1178
|
function Je(e, a, o) {
|
1179
1179
|
var l = e[a];
|
1180
|
-
(!(
|
1180
|
+
(!(Et.call(e, a) && rr(l, o)) || o === void 0 && !(a in e)) && (e[a] = o);
|
1181
1181
|
}
|
1182
1182
|
function ye(e, a) {
|
1183
1183
|
for (var o = e.length; o--; )
|
@@ -1185,42 +1185,42 @@ dr.exports;
|
|
1185
1185
|
return o;
|
1186
1186
|
return -1;
|
1187
1187
|
}
|
1188
|
-
function
|
1188
|
+
function Tt(e, a) {
|
1189
1189
|
return e && Pe(a, Fe(a), e);
|
1190
1190
|
}
|
1191
|
-
function
|
1191
|
+
function De(e, a, o, l, D, w, N) {
|
1192
1192
|
var z;
|
1193
|
-
if (l && (z =
|
1193
|
+
if (l && (z = w ? l(e, D, w, N) : l(e)), z !== void 0)
|
1194
1194
|
return z;
|
1195
1195
|
if (!At(e))
|
1196
1196
|
return e;
|
1197
|
-
var
|
1198
|
-
if (
|
1197
|
+
var B = Ce(e);
|
1198
|
+
if (B) {
|
1199
1199
|
if (z = Zr(e), !a)
|
1200
1200
|
return Vr(e, z);
|
1201
1201
|
} else {
|
1202
|
-
var $ = Pt(e),
|
1202
|
+
var $ = Pt(e), at = $ == S || $ == C;
|
1203
1203
|
if (nr(e))
|
1204
1204
|
return ge(e, a);
|
1205
|
-
if ($ == A || $ == c ||
|
1206
|
-
if (
|
1207
|
-
return
|
1208
|
-
if (z = Mt(
|
1209
|
-
return qr(e,
|
1205
|
+
if ($ == A || $ == c || at && !w) {
|
1206
|
+
if (dt(e))
|
1207
|
+
return w ? e : {};
|
1208
|
+
if (z = Mt(at ? {} : e), !a)
|
1209
|
+
return qr(e, Tt(z, e));
|
1210
1210
|
} else {
|
1211
|
-
if (!
|
1212
|
-
return
|
1213
|
-
z = Qr(e, $,
|
1211
|
+
if (!O[$])
|
1212
|
+
return w ? e : {};
|
1213
|
+
z = Qr(e, $, De, a);
|
1214
1214
|
}
|
1215
1215
|
}
|
1216
|
-
N || (N = new
|
1217
|
-
var
|
1218
|
-
if (
|
1219
|
-
return
|
1220
|
-
if (N.set(e, z), !
|
1221
|
-
var
|
1222
|
-
return G(
|
1223
|
-
|
1216
|
+
N || (N = new pt());
|
1217
|
+
var ht = N.get(e);
|
1218
|
+
if (ht)
|
1219
|
+
return ht;
|
1220
|
+
if (N.set(e, z), !B)
|
1221
|
+
var X = o ? Jr(e) : Fe(e);
|
1222
|
+
return G(X || e, function(st, et) {
|
1223
|
+
X && (et = st, st = e[et]), Je(z, et, De(st, a, o, l, et, e, N));
|
1224
1224
|
}), z;
|
1225
1225
|
}
|
1226
1226
|
function $r(e) {
|
@@ -1236,15 +1236,15 @@ dr.exports;
|
|
1236
1236
|
function Gr(e) {
|
1237
1237
|
if (!At(e) || rn(e))
|
1238
1238
|
return !1;
|
1239
|
-
var a = Re(e) ||
|
1240
|
-
return a.test(
|
1239
|
+
var a = Re(e) || dt(e) ? vr : Y;
|
1240
|
+
return a.test(ot(e));
|
1241
1241
|
}
|
1242
1242
|
function Yr(e) {
|
1243
1243
|
if (!tr(e))
|
1244
1244
|
return Xe(e);
|
1245
1245
|
var a = [];
|
1246
1246
|
for (var o in Object(e))
|
1247
|
-
|
1247
|
+
Et.call(e, o) && o != "constructor" && a.push(o);
|
1248
1248
|
return a;
|
1249
1249
|
}
|
1250
1250
|
function ge(e, a) {
|
@@ -1257,21 +1257,21 @@ dr.exports;
|
|
1257
1257
|
var a = new e.constructor(e.byteLength);
|
1258
1258
|
return new Se(a).set(new Se(e)), a;
|
1259
1259
|
}
|
1260
|
-
function
|
1260
|
+
function Vt(e, a) {
|
1261
1261
|
var o = a ? Oe(e.buffer) : e.buffer;
|
1262
1262
|
return new e.constructor(o, e.byteOffset, e.byteLength);
|
1263
1263
|
}
|
1264
1264
|
function Ze(e, a, o) {
|
1265
|
-
var l = a ? o(
|
1266
|
-
return
|
1265
|
+
var l = a ? o(Q(e), !0) : Q(e);
|
1266
|
+
return ft(l, ce, new e.constructor());
|
1267
1267
|
}
|
1268
1268
|
function Qe(e) {
|
1269
|
-
var a = new e.constructor(e.source,
|
1269
|
+
var a = new e.constructor(e.source, Ft.exec(e));
|
1270
1270
|
return a.lastIndex = e.lastIndex, a;
|
1271
1271
|
}
|
1272
1272
|
function Br(e, a, o) {
|
1273
1273
|
var l = a ? o(ue(e), !0) : ue(e);
|
1274
|
-
return
|
1274
|
+
return ft(l, j, new e.constructor());
|
1275
1275
|
}
|
1276
1276
|
function Kr(e) {
|
1277
1277
|
return Ve ? Object(Ve.call(e)) : {};
|
@@ -1288,8 +1288,8 @@ dr.exports;
|
|
1288
1288
|
}
|
1289
1289
|
function Pe(e, a, o, l) {
|
1290
1290
|
o || (o = {});
|
1291
|
-
for (var
|
1292
|
-
var N = a[
|
1291
|
+
for (var D = -1, w = a.length; ++D < w; ) {
|
1292
|
+
var N = a[D], z = void 0;
|
1293
1293
|
Je(o, N, z === void 0 ? e[N] : z);
|
1294
1294
|
}
|
1295
1295
|
return o;
|
@@ -1300,27 +1300,27 @@ dr.exports;
|
|
1300
1300
|
function Jr(e) {
|
1301
1301
|
return Ur(e, Fe, Ot);
|
1302
1302
|
}
|
1303
|
-
function
|
1303
|
+
function qt(e, a) {
|
1304
1304
|
var o = e.__data__;
|
1305
1305
|
return en(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
1306
1306
|
}
|
1307
|
-
function
|
1308
|
-
var o =
|
1307
|
+
function St(e, a) {
|
1308
|
+
var o = nt(e, a);
|
1309
1309
|
return Gr(o) ? o : void 0;
|
1310
1310
|
}
|
1311
|
-
var Ot = ke ?
|
1312
|
-
(pe && Pt(new pe(new ArrayBuffer(1))) !=
|
1313
|
-
var a = le.call(e), o = a == A ? e.constructor : void 0, l = o ?
|
1311
|
+
var Ot = ke ? xt(ke, Object) : an, Pt = Wr;
|
1312
|
+
(pe && Pt(new pe(new ArrayBuffer(1))) != I || Bt && Pt(new Bt()) != m || vt && Pt(vt.resolve()) != u || he && Pt(new he()) != b || we && Pt(new we()) != g) && (Pt = function(e) {
|
1313
|
+
var a = le.call(e), o = a == A ? e.constructor : void 0, l = o ? ot(o) : void 0;
|
1314
1314
|
if (l)
|
1315
1315
|
switch (l) {
|
1316
|
-
case Te:
|
1317
|
-
return b;
|
1318
|
-
case Bt:
|
1319
|
-
return m;
|
1320
1316
|
case Ee:
|
1317
|
+
return I;
|
1318
|
+
case Xt:
|
1319
|
+
return m;
|
1320
|
+
case Te:
|
1321
1321
|
return u;
|
1322
1322
|
case Me:
|
1323
|
-
return
|
1323
|
+
return b;
|
1324
1324
|
case Ae:
|
1325
1325
|
return g;
|
1326
1326
|
}
|
@@ -1328,59 +1328,59 @@ dr.exports;
|
|
1328
1328
|
});
|
1329
1329
|
function Zr(e) {
|
1330
1330
|
var a = e.length, o = e.constructor(a);
|
1331
|
-
return a && typeof e[0] == "string" &&
|
1331
|
+
return a && typeof e[0] == "string" && Et.call(e, "index") && (o.index = e.index, o.input = e.input), o;
|
1332
1332
|
}
|
1333
1333
|
function Mt(e) {
|
1334
|
-
return typeof e.constructor == "function" && !tr(e) ? $r(
|
1334
|
+
return typeof e.constructor == "function" && !tr(e) ? $r(gt(e)) : {};
|
1335
1335
|
}
|
1336
1336
|
function Qr(e, a, o, l) {
|
1337
|
-
var
|
1337
|
+
var D = e.constructor;
|
1338
1338
|
switch (a) {
|
1339
1339
|
case _:
|
1340
1340
|
return Oe(e);
|
1341
1341
|
case p:
|
1342
|
-
case E:
|
1343
|
-
return new x(+e);
|
1344
|
-
case b:
|
1345
|
-
return Kt(e, l);
|
1346
|
-
case S:
|
1347
|
-
case U:
|
1348
|
-
case C:
|
1349
|
-
case O:
|
1350
1342
|
case T:
|
1351
|
-
|
1343
|
+
return new D(+e);
|
1344
|
+
case I:
|
1345
|
+
return Vt(e, l);
|
1346
|
+
case v:
|
1347
|
+
case U:
|
1348
|
+
case R:
|
1349
|
+
case P:
|
1350
|
+
case k:
|
1351
|
+
case E:
|
1352
1352
|
case H:
|
1353
|
+
case K:
|
1353
1354
|
case W:
|
1354
|
-
case tt:
|
1355
1355
|
return Xr(e, l);
|
1356
1356
|
case m:
|
1357
1357
|
return Ze(e, l, o);
|
1358
1358
|
case M:
|
1359
1359
|
case y:
|
1360
|
-
return new
|
1360
|
+
return new D(e);
|
1361
1361
|
case f:
|
1362
1362
|
return Qe(e);
|
1363
|
-
case
|
1363
|
+
case b:
|
1364
1364
|
return Br(e, l, o);
|
1365
1365
|
case h:
|
1366
1366
|
return Kr(e);
|
1367
1367
|
}
|
1368
1368
|
}
|
1369
1369
|
function tn(e, a) {
|
1370
|
-
return a = a ?? s, !!a && (typeof e == "number" ||
|
1370
|
+
return a = a ?? s, !!a && (typeof e == "number" || lt.test(e)) && e > -1 && e % 1 == 0 && e < a;
|
1371
1371
|
}
|
1372
1372
|
function en(e) {
|
1373
1373
|
var a = typeof e;
|
1374
1374
|
return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? e !== "__proto__" : e === null;
|
1375
1375
|
}
|
1376
1376
|
function rn(e) {
|
1377
|
-
return !!
|
1377
|
+
return !!Ht && Ht in e;
|
1378
1378
|
}
|
1379
1379
|
function tr(e) {
|
1380
1380
|
var a = e && e.constructor, o = typeof a == "function" && a.prototype || wt;
|
1381
1381
|
return e === o;
|
1382
1382
|
}
|
1383
|
-
function
|
1383
|
+
function ot(e) {
|
1384
1384
|
if (e != null) {
|
1385
1385
|
try {
|
1386
1386
|
return Ye.call(e);
|
@@ -1394,13 +1394,13 @@ dr.exports;
|
|
1394
1394
|
return "";
|
1395
1395
|
}
|
1396
1396
|
function er(e) {
|
1397
|
-
return
|
1397
|
+
return De(e, !0, !0);
|
1398
1398
|
}
|
1399
1399
|
function rr(e, a) {
|
1400
1400
|
return e === a || e !== e && a !== a;
|
1401
1401
|
}
|
1402
1402
|
function Ie(e) {
|
1403
|
-
return nn(e) &&
|
1403
|
+
return nn(e) && Et.call(e, "callee") && (!Ke.call(e, "callee") || le.call(e) == c);
|
1404
1404
|
}
|
1405
1405
|
var Ce = Array.isArray;
|
1406
1406
|
function be(e) {
|
@@ -1412,7 +1412,7 @@ dr.exports;
|
|
1412
1412
|
var nr = de || sn;
|
1413
1413
|
function Re(e) {
|
1414
1414
|
var a = At(e) ? le.call(e) : "";
|
1415
|
-
return a ==
|
1415
|
+
return a == S || a == C;
|
1416
1416
|
}
|
1417
1417
|
function ir(e) {
|
1418
1418
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= s;
|
@@ -1436,7 +1436,7 @@ dr.exports;
|
|
1436
1436
|
t.exports = er;
|
1437
1437
|
})(dr, dr.exports);
|
1438
1438
|
var na = dr.exports;
|
1439
|
-
const
|
1439
|
+
const Z = /* @__PURE__ */ En(na), ni = (t) => new Promise((r, n) => {
|
1440
1440
|
const i = new Image();
|
1441
1441
|
console.warn("update cdn config for cors?"), i.onload = () => {
|
1442
1442
|
const s = i.width, c = i.height;
|
@@ -1602,21 +1602,21 @@ const oi = async (t, r) => {
|
|
1602
1602
|
duration: s
|
1603
1603
|
};
|
1604
1604
|
}, sa = async (t, r) => {
|
1605
|
-
var
|
1605
|
+
var C, m, M;
|
1606
1606
|
const n = t.trackItemIds, i = t.size || {
|
1607
1607
|
width: t.details.width,
|
1608
1608
|
height: t.details.height
|
1609
1609
|
}, s = Math.min(
|
1610
1610
|
r.size.width / i.width,
|
1611
1611
|
r.size.height / i.height
|
1612
|
-
), c = ((
|
1612
|
+
), c = ((C = t.details) == null ? void 0 : C.rotate) || 0, d = {
|
1613
1613
|
top: ((m = t.details) == null ? void 0 : m.top) || 0,
|
1614
1614
|
left: ((M = t.details) == null ? void 0 : M.left) || 0
|
1615
|
-
}, p = t.display,
|
1616
|
-
let
|
1615
|
+
}, p = t.display, T = t.trim || t.display;
|
1616
|
+
let x = 1 / 0, S = 0;
|
1617
1617
|
return n.forEach((A) => {
|
1618
1618
|
const u = t.trackItemsMap[A];
|
1619
|
-
u.display.from <
|
1619
|
+
u.display.from < x && (x = u.display.from), u.display.to > S && (S = u.display.to);
|
1620
1620
|
}), {
|
1621
1621
|
id: t.id,
|
1622
1622
|
details: {
|
@@ -1626,8 +1626,8 @@ const oi = async (t, r) => {
|
|
1626
1626
|
scale: s,
|
1627
1627
|
rotate: c
|
1628
1628
|
},
|
1629
|
-
trim:
|
1630
|
-
display: p || { from:
|
1629
|
+
trim: T,
|
1630
|
+
display: p || { from: x, to: S },
|
1631
1631
|
activeEdit: !1
|
1632
1632
|
};
|
1633
1633
|
}, ui = async (t, r) => {
|
@@ -1825,7 +1825,7 @@ function la(t, r) {
|
|
1825
1825
|
return i;
|
1826
1826
|
});
|
1827
1827
|
}
|
1828
|
-
const
|
1828
|
+
const re = (t) => Object.keys(t).reduce((r, n) => {
|
1829
1829
|
const { display: i, playbackRate: s } = t[n];
|
1830
1830
|
return Math.max(r, i.to / (s || 1));
|
1831
1831
|
}, 0);
|
@@ -1835,18 +1835,18 @@ function In(t, r, n) {
|
|
1835
1835
|
const fa = (t, r, n, i, s) => {
|
1836
1836
|
if (i === void 0 && s === void 0)
|
1837
1837
|
return { trackId: void 0, trackIndex: void 0 };
|
1838
|
-
const c = s !== void 0 ? r[In(s, 0, r.length)] : r.find((
|
1838
|
+
const c = s !== void 0 ? r[In(s, 0, r.length)] : r.find((T) => T.id === i);
|
1839
1839
|
if (!c)
|
1840
1840
|
return {
|
1841
1841
|
trackId: void 0,
|
1842
1842
|
trackIndex: s !== void 0 ? In(s, 0, r.length) : void 0
|
1843
1843
|
};
|
1844
|
-
const d = c.items.map((
|
1845
|
-
for (const
|
1846
|
-
const
|
1847
|
-
for (const
|
1848
|
-
const m =
|
1849
|
-
if (!(
|
1844
|
+
const d = c.items.map((T) => n[T]), p = t.map((T) => n[T]);
|
1845
|
+
for (const T of d) {
|
1846
|
+
const x = T.display.from, S = T.display.to;
|
1847
|
+
for (const C of p) {
|
1848
|
+
const m = C.display.from;
|
1849
|
+
if (!(C.display.to <= x || m >= S))
|
1850
1850
|
return {
|
1851
1851
|
trackId: void 0,
|
1852
1852
|
trackIndex: r.indexOf(c)
|
@@ -1871,20 +1871,20 @@ function da(t, r) {
|
|
1871
1871
|
function pa(t) {
|
1872
1872
|
const r = t, n = r.tracks, i = r.trackItemsMap, s = [], c = {};
|
1873
1873
|
return n.forEach((d) => {
|
1874
|
-
var
|
1875
|
-
const p = d.items.map((
|
1876
|
-
for (let
|
1877
|
-
const
|
1878
|
-
if (Math.abs(
|
1879
|
-
const m = `${
|
1880
|
-
if ((
|
1874
|
+
var T;
|
1875
|
+
const p = d.items.map((x) => i[x]).sort((x, S) => x.display.from - S.display.from);
|
1876
|
+
for (let x = 0; x < p.length - 1; x++) {
|
1877
|
+
const S = p[x], C = p[x + 1];
|
1878
|
+
if (Math.abs(S.display.to - C.display.from) <= 1) {
|
1879
|
+
const m = `${S.id}-${C.id}`;
|
1880
|
+
if ((T = r.transitionIds) == null ? void 0 : T.includes(m))
|
1881
1881
|
c[m] = r.transitionsMap[m];
|
1882
1882
|
else {
|
1883
1883
|
const A = {
|
1884
1884
|
id: m,
|
1885
1885
|
duration: 1500,
|
1886
|
-
fromId:
|
1887
|
-
toId:
|
1886
|
+
fromId: S.id,
|
1887
|
+
toId: C.id,
|
1888
1888
|
kind: "none",
|
1889
1889
|
trackId: d.id,
|
1890
1890
|
type: "transition"
|
@@ -1900,36 +1900,36 @@ function pa(t) {
|
|
1900
1900
|
};
|
1901
1901
|
}
|
1902
1902
|
function ha(t) {
|
1903
|
-
const r =
|
1904
|
-
|
1905
|
-
), n =
|
1906
|
-
|
1907
|
-
), i =
|
1908
|
-
|
1909
|
-
), s =
|
1910
|
-
|
1911
|
-
), c =
|
1912
|
-
|
1913
|
-
), d =
|
1914
|
-
|
1915
|
-
), p =
|
1916
|
-
|
1917
|
-
),
|
1918
|
-
var f,
|
1903
|
+
const r = Qt.pipe(
|
1904
|
+
te(({ key: u }) => u.startsWith(Tn))
|
1905
|
+
), n = Qt.pipe(
|
1906
|
+
te(({ key: u }) => u.startsWith(bt))
|
1907
|
+
), i = Qt.pipe(
|
1908
|
+
te(({ key: u }) => u.startsWith(ut))
|
1909
|
+
), s = Qt.pipe(
|
1910
|
+
te(({ key: u }) => u.startsWith(gr))
|
1911
|
+
), c = Qt.pipe(
|
1912
|
+
te(({ key: u }) => u.startsWith(ve))
|
1913
|
+
), d = Qt.pipe(
|
1914
|
+
te(({ key: u }) => u.startsWith(oe))
|
1915
|
+
), p = Qt.pipe(
|
1916
|
+
te(({ key: u }) => u.startsWith(ri))
|
1917
|
+
), T = r.subscribe(async (u) => {
|
1918
|
+
var f, b;
|
1919
1919
|
if (u.key === ji) {
|
1920
1920
|
const y = (f = u.value) == null ? void 0 : f.payload, h = y.trackItemsMap, g = y.trackItemDetailsMap;
|
1921
1921
|
console.warn("IMPROVE FONTS LOADING");
|
1922
|
-
for (const
|
1923
|
-
if (g[
|
1924
|
-
const
|
1922
|
+
for (const I in g)
|
1923
|
+
if (g[I].type === "text" || g[I].type === "caption") {
|
1924
|
+
const v = g[I].details;
|
1925
1925
|
await pr([
|
1926
1926
|
{
|
1927
|
-
fontFamily:
|
1928
|
-
url:
|
1927
|
+
fontFamily: v.fontFamily,
|
1928
|
+
url: v.fontUrl
|
1929
1929
|
}
|
1930
1930
|
]);
|
1931
1931
|
}
|
1932
|
-
const _ =
|
1932
|
+
const _ = re(h);
|
1933
1933
|
t.updateState(
|
1934
1934
|
{
|
1935
1935
|
...y,
|
@@ -1942,7 +1942,7 @@ function ha(t) {
|
|
1942
1942
|
);
|
1943
1943
|
}
|
1944
1944
|
if (u.key === Ni) {
|
1945
|
-
const y = (
|
1945
|
+
const y = (b = u.value) == null ? void 0 : b.payload;
|
1946
1946
|
t.updateState(
|
1947
1947
|
{
|
1948
1948
|
size: y
|
@@ -1953,16 +1953,16 @@ function ha(t) {
|
|
1953
1953
|
}
|
1954
1954
|
);
|
1955
1955
|
}
|
1956
|
-
}),
|
1956
|
+
}), x = s.subscribe((u) => {
|
1957
1957
|
if (u.key === ta) return t.undo();
|
1958
1958
|
if (u.key === ea) return t.redo();
|
1959
|
-
}),
|
1959
|
+
}), S = p.subscribe((u) => {
|
1960
1960
|
var f;
|
1961
1961
|
if (u.key === ra) {
|
1962
|
-
const
|
1962
|
+
const b = (f = u.value) == null ? void 0 : f.payload.scale;
|
1963
1963
|
t.updateState(
|
1964
1964
|
{
|
1965
|
-
scale:
|
1965
|
+
scale: b
|
1966
1966
|
},
|
1967
1967
|
{
|
1968
1968
|
kind: "update",
|
@@ -1970,78 +1970,94 @@ function ha(t) {
|
|
1970
1970
|
}
|
1971
1971
|
);
|
1972
1972
|
}
|
1973
|
-
}),
|
1974
|
-
var
|
1973
|
+
}), C = i.subscribe((u) => {
|
1974
|
+
var b, y, h, g;
|
1975
1975
|
const f = [];
|
1976
|
-
if ((
|
1976
|
+
if ((b = u.value) != null && b.payload.trackItemIds && (f.push((y = u.value) == null ? void 0 : y.payload.trackItemIds), t.updateState(
|
1977
1977
|
{ activeIds: f },
|
1978
1978
|
{
|
1979
1979
|
kind: "update",
|
1980
1980
|
updateHistory: !1
|
1981
1981
|
}
|
1982
1982
|
)), u.key === Qi) {
|
1983
|
-
const _ = (h = u.value) == null ? void 0 : h.payload.trackItemIds,
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
|
1983
|
+
const _ = (h = u.value) == null ? void 0 : h.payload.trackItemIds, I = Z(t.getState()), v = _ && _.length ? _ : I.activeIds, U = I.trackItemIds, R = I.trackItemDetailsMap, P = Z(I.tracks), k = Z(I.structure);
|
1984
|
+
v.forEach((Y) => {
|
1985
|
+
var O;
|
1986
|
+
const lt = I.trackItemsMap[Y];
|
1987
|
+
if (lt.type === "template") {
|
1988
|
+
const _t = (O = I.structure.find(
|
1989
|
+
(q) => q.id === lt.id
|
1990
|
+
)) == null ? void 0 : O.items;
|
1991
|
+
v.push(..._t);
|
1992
|
+
const zt = k.findIndex(
|
1993
|
+
(q) => q.id === lt.id
|
1994
|
+
);
|
1995
|
+
k.splice(zt, 1);
|
1996
|
+
}
|
1997
|
+
});
|
1998
|
+
const E = U.filter(
|
1999
|
+
(Y) => !v.includes(Y)
|
2000
|
+
), H = Object.fromEntries(
|
2001
|
+
Object.entries(R).filter(
|
2002
|
+
([Y]) => !v.includes(Y)
|
1988
2003
|
)
|
1989
|
-
),
|
1990
|
-
|
1991
|
-
|
2004
|
+
), K = la(
|
2005
|
+
I.tracks,
|
2006
|
+
v
|
1992
2007
|
), W = Object.fromEntries(
|
1993
|
-
Object.entries(
|
1994
|
-
([
|
2008
|
+
Object.entries(I.trackItemsMap).filter(
|
2009
|
+
([Y]) => !v.includes(Y)
|
1995
2010
|
)
|
1996
2011
|
);
|
1997
|
-
|
1998
|
-
let
|
1999
|
-
|
2000
|
-
if (W[
|
2001
|
-
const
|
2002
|
-
W[
|
2003
|
-
from:
|
2004
|
-
to:
|
2005
|
-
},
|
2012
|
+
P.filter((Y) => Y.magnetic).forEach((Y) => {
|
2013
|
+
let lt = 0;
|
2014
|
+
Y == null || Y.items.forEach((O) => {
|
2015
|
+
if (W[O]) {
|
2016
|
+
const _t = W[O].display.to - W[O].display.from;
|
2017
|
+
W[O].display = {
|
2018
|
+
from: lt,
|
2019
|
+
to: lt + _t
|
2020
|
+
}, lt += _t;
|
2006
2021
|
}
|
2007
2022
|
});
|
2008
2023
|
});
|
2009
|
-
const Ft =
|
2024
|
+
const Ft = re(W);
|
2010
2025
|
t.updateState(
|
2011
2026
|
{
|
2012
|
-
trackItemIds:
|
2013
|
-
trackItemDetailsMap:
|
2027
|
+
trackItemIds: E,
|
2028
|
+
trackItemDetailsMap: H,
|
2014
2029
|
activeIds: [],
|
2015
2030
|
trackItemsMap: W,
|
2016
|
-
tracks:
|
2017
|
-
duration: Ft
|
2031
|
+
tracks: K,
|
2032
|
+
duration: Ft,
|
2033
|
+
structure: k
|
2018
2034
|
},
|
2019
2035
|
{ updateHistory: !0, kind: "remove" }
|
2020
2036
|
);
|
2021
2037
|
}
|
2022
2038
|
if (u.key === Zi) {
|
2023
|
-
const _ =
|
2024
|
-
if (
|
2025
|
-
|
2026
|
-
const
|
2027
|
-
_.trackItemsMap[
|
2028
|
-
...
|
2029
|
-
id:
|
2030
|
-
}, _.trackItemDetailsMap[
|
2031
|
-
...
|
2032
|
-
}, _.trackItemIds.push(
|
2039
|
+
const _ = Z(t.getState()), I = {}, v = ((g = u.value) == null ? void 0 : g.payload.trackItemIds) || _.activeIds;
|
2040
|
+
if (v.length === 0) return;
|
2041
|
+
v.forEach((R) => {
|
2042
|
+
const P = _.trackItemsMap[R], k = _.trackItemDetailsMap[R], E = _e();
|
2043
|
+
_.trackItemsMap[E] = {
|
2044
|
+
...Z(P),
|
2045
|
+
id: E
|
2046
|
+
}, _.trackItemDetailsMap[E] = {
|
2047
|
+
...Z(k)
|
2048
|
+
}, _.trackItemIds.push(E);
|
2033
2049
|
const H = _.tracks.find(
|
2034
|
-
(
|
2050
|
+
(K) => K.items.includes(R)
|
2035
2051
|
);
|
2036
|
-
|
2052
|
+
I[H.id] ? I[H.id].items.push(E) : I[H.id] = {
|
2037
2053
|
...H,
|
2038
2054
|
id: _e(),
|
2039
|
-
items: [
|
2055
|
+
items: [E],
|
2040
2056
|
static: !1,
|
2041
2057
|
magnetic: !1
|
2042
2058
|
};
|
2043
2059
|
});
|
2044
|
-
const U = Object.values(
|
2060
|
+
const U = Object.values(I);
|
2045
2061
|
_.tracks = [...U, ..._.tracks], t.updateState(
|
2046
2062
|
{
|
2047
2063
|
trackItemDetailsMap: _.trackItemDetailsMap,
|
@@ -2056,62 +2072,62 @@ function ha(t) {
|
|
2056
2072
|
);
|
2057
2073
|
}
|
2058
2074
|
}), m = n.subscribe(async (u) => {
|
2059
|
-
var
|
2060
|
-
const f =
|
2075
|
+
var v, U, R, P, k, E, H, K, W, $t, Ft, Y, lt, O, _t, zt, q, Ut, L, Wt, ce;
|
2076
|
+
const f = Z(t.getState()), b = ((U = (v = u.value) == null ? void 0 : v.options) == null ? void 0 : U.isSelected) || !1;
|
2061
2077
|
let y = [], h = "text";
|
2062
|
-
const g = (
|
2063
|
-
let _ = (
|
2078
|
+
const g = (P = (R = u.value) == null ? void 0 : R.options) == null ? void 0 : P.trackId;
|
2079
|
+
let _ = (E = (k = u.value) == null ? void 0 : k.options) == null ? void 0 : E.trackIndex;
|
2064
2080
|
if (u.key === Bi) {
|
2065
2081
|
const j = (H = u.value) == null ? void 0 : H.payload, G = j.trackItems.map(
|
2066
|
-
(
|
2082
|
+
(J) => oa(J, {
|
2067
2083
|
size: f.size
|
2068
2084
|
})
|
2069
|
-
), F = await Promise.all(G),
|
2070
|
-
if (F.forEach((
|
2071
|
-
const { details: kt, ...wt } =
|
2072
|
-
|
2073
|
-
type:
|
2085
|
+
), F = await Promise.all(G), ft = ua(j.tracks, j.trackItems), rt = [], nt = {}, dt = {};
|
2086
|
+
if (F.forEach((J) => {
|
2087
|
+
const { details: kt, ...wt } = J;
|
2088
|
+
rt.push(J.id), nt[J.id] = {
|
2089
|
+
type: J.type,
|
2074
2090
|
details: kt
|
2075
|
-
},
|
2091
|
+
}, dt[J.id] = wt;
|
2076
2092
|
}), ca(
|
2077
2093
|
f.tracks,
|
2078
|
-
|
2094
|
+
ft
|
2079
2095
|
))
|
2080
|
-
f.tracks.forEach((
|
2081
|
-
|
2082
|
-
if (
|
2083
|
-
if (
|
2084
|
-
const wt = kt.items.map((
|
2085
|
-
(
|
2096
|
+
f.tracks.forEach((J) => {
|
2097
|
+
ft.forEach((kt) => {
|
2098
|
+
if (J.id === kt.id) {
|
2099
|
+
if (J.magnetic) {
|
2100
|
+
const wt = kt.items.map((Ht) => dt[Ht]), Gt = J.items.map(
|
2101
|
+
(Ht) => f.trackItemsMap[Ht]
|
2086
2102
|
);
|
2087
2103
|
da(
|
2088
2104
|
wt,
|
2089
|
-
|
2105
|
+
Gt
|
2090
2106
|
);
|
2091
2107
|
}
|
2092
|
-
|
2108
|
+
J.items.push(...rt);
|
2093
2109
|
}
|
2094
2110
|
});
|
2095
2111
|
});
|
2096
2112
|
else {
|
2097
|
-
const
|
2098
|
-
|
2113
|
+
const J = ((W = (K = u.value) == null ? void 0 : K.options) == null ? void 0 : W.trackIndex) || 0, kt = In(
|
2114
|
+
J,
|
2099
2115
|
0,
|
2100
2116
|
f.tracks.length
|
2101
2117
|
);
|
2102
|
-
f.tracks.splice(kt, 0, ...
|
2118
|
+
f.tracks.splice(kt, 0, ...ft);
|
2103
2119
|
}
|
2104
2120
|
f.trackItemDetailsMap = {
|
2105
2121
|
...f.trackItemDetailsMap,
|
2106
|
-
...
|
2122
|
+
...nt
|
2107
2123
|
}, f.trackItemsMap = {
|
2108
2124
|
...f.trackItemsMap,
|
2109
|
-
...
|
2125
|
+
...dt
|
2110
2126
|
}, f.trackItemIds = [
|
2111
2127
|
...f.trackItemIds,
|
2112
|
-
...
|
2113
|
-
], f.duration =
|
2114
|
-
const { transitionIds:
|
2128
|
+
...rt
|
2129
|
+
], f.duration = re(f.trackItemsMap);
|
2130
|
+
const { transitionIds: xt, transitionsMap: ue } = pa(
|
2115
2131
|
f
|
2116
2132
|
);
|
2117
2133
|
t.updateState(
|
@@ -2121,7 +2137,7 @@ function ha(t) {
|
|
2121
2137
|
trackItemsMap: f.trackItemsMap,
|
2122
2138
|
tracks: f.tracks,
|
2123
2139
|
duration: f.duration,
|
2124
|
-
transitionIds:
|
2140
|
+
transitionIds: xt,
|
2125
2141
|
transitionsMap: ue
|
2126
2142
|
},
|
2127
2143
|
{
|
@@ -2133,28 +2149,28 @@ function ha(t) {
|
|
2133
2149
|
}
|
2134
2150
|
if (u.key === Gi) {
|
2135
2151
|
h = "caption";
|
2136
|
-
const j = (
|
2137
|
-
for (const
|
2138
|
-
const
|
2152
|
+
const j = ($t = u.value) == null ? void 0 : $t.payload, G = [];
|
2153
|
+
for (const rt of j) {
|
2154
|
+
const nt = li(rt, {
|
2139
2155
|
size: f.size
|
2140
2156
|
});
|
2141
|
-
G.push(
|
2157
|
+
G.push(nt);
|
2142
2158
|
}
|
2143
|
-
const F = await Promise.all(G),
|
2144
|
-
for (const
|
2145
|
-
const
|
2146
|
-
|
2147
|
-
const { details:
|
2148
|
-
f.trackItemDetailsMap[
|
2159
|
+
const F = await Promise.all(G), ft = [];
|
2160
|
+
for (const rt of F) {
|
2161
|
+
const nt = rt.id;
|
2162
|
+
ft.push(nt);
|
2163
|
+
const { details: dt, ...Q } = rt;
|
2164
|
+
f.trackItemDetailsMap[nt] = {
|
2149
2165
|
type: h,
|
2150
|
-
details:
|
2151
|
-
}, f.trackItemsMap[
|
2166
|
+
details: dt
|
2167
|
+
}, f.trackItemsMap[nt] = Q, f.trackItemIds.push(nt);
|
2152
2168
|
}
|
2153
|
-
y =
|
2169
|
+
y = ft;
|
2154
2170
|
}
|
2155
2171
|
if (u.key === Li) {
|
2156
2172
|
h = "text";
|
2157
|
-
const j = await fi((
|
2173
|
+
const j = await fi((Ft = u.value) == null ? void 0 : Ft.payload, {
|
2158
2174
|
size: f.size
|
2159
2175
|
}), { details: G, ...F } = j;
|
2160
2176
|
f.trackItemDetailsMap[F.id] = {
|
@@ -2164,35 +2180,35 @@ function ha(t) {
|
|
2164
2180
|
}
|
2165
2181
|
if (u.key === Yi) {
|
2166
2182
|
h = "template";
|
2167
|
-
const j = (
|
2183
|
+
const j = (Y = u.value) == null ? void 0 : Y.payload.trackItemsMap, G = (lt = u.value) == null ? void 0 : lt.payload.trackItemDetailsMap, F = (O = u.value) == null ? void 0 : O.payload.transitionsMap, ft = ((_t = u.value) == null ? void 0 : _t.payload.transitionIds) || [], rt = (zt = u.value) == null ? void 0 : zt.payload.trackItemIds, nt = ((q = u.value) == null ? void 0 : q.payload.tracks) || [], { details: dt, ...Q } = await sa((Ut = u.value) == null ? void 0 : Ut.payload, {
|
2168
2184
|
size: f.size
|
2169
|
-
}),
|
2170
|
-
id:
|
2171
|
-
items:
|
2172
|
-
transitions:
|
2173
|
-
tracks:
|
2185
|
+
}), xt = {
|
2186
|
+
id: Q.id,
|
2187
|
+
items: rt,
|
2188
|
+
transitions: ft,
|
2189
|
+
tracks: nt
|
2174
2190
|
};
|
2175
|
-
f.trackItemDetailsMap[
|
2191
|
+
f.trackItemDetailsMap[Q.id] = {
|
2176
2192
|
type: h,
|
2177
|
-
details:
|
2178
|
-
}, f.trackItemsMap[
|
2193
|
+
details: dt
|
2194
|
+
}, f.trackItemsMap[Q.id] = Q, f.trackItemIds.push(Q.id), y = [Q.id], f.trackItemsMap = {
|
2179
2195
|
...f.trackItemsMap,
|
2180
2196
|
...j,
|
2181
|
-
[
|
2197
|
+
[Q.id]: {
|
2182
2198
|
type: "template",
|
2183
|
-
...
|
2199
|
+
...Q
|
2184
2200
|
}
|
2185
2201
|
}, f.trackItemDetailsMap = {
|
2186
2202
|
...f.trackItemDetailsMap,
|
2187
2203
|
...G,
|
2188
|
-
[
|
2204
|
+
[Q.id]: {
|
2189
2205
|
type: "template",
|
2190
|
-
details:
|
2206
|
+
details: dt
|
2191
2207
|
}
|
2192
2208
|
}, f.transitionsMap = {
|
2193
2209
|
...f.transitionsMap,
|
2194
2210
|
...F
|
2195
|
-
}, f.structure = [...f.structure,
|
2211
|
+
}, f.structure = [...f.structure, xt];
|
2196
2212
|
}
|
2197
2213
|
if (u.key === Wi) {
|
2198
2214
|
h = "image";
|
@@ -2206,7 +2222,7 @@ function ha(t) {
|
|
2206
2222
|
}
|
2207
2223
|
if (u.key === Ui) {
|
2208
2224
|
h = "audio";
|
2209
|
-
const j = await ci((
|
2225
|
+
const j = await ci((Wt = u.value) == null ? void 0 : Wt.payload), { details: G, ...F } = j;
|
2210
2226
|
f.trackItemDetailsMap[F.id] = {
|
2211
2227
|
type: h,
|
2212
2228
|
details: G
|
@@ -2219,22 +2235,23 @@ function ha(t) {
|
|
2219
2235
|
}), { details: G, ...F } = j;
|
2220
2236
|
f.trackItemDetailsMap[F.id] = {
|
2221
2237
|
type: h,
|
2222
|
-
details: G
|
2238
|
+
details: G,
|
2239
|
+
metadata: F.metadata
|
2223
2240
|
}, f.trackItemsMap[F.id] = F, f.trackItemIds.push(F.id), y = [F.id];
|
2224
2241
|
}
|
2225
|
-
const
|
2242
|
+
const I = fa(
|
2226
2243
|
y,
|
2227
2244
|
f.tracks,
|
2228
2245
|
f.trackItemsMap,
|
2229
2246
|
g,
|
2230
2247
|
_
|
2231
2248
|
);
|
2232
|
-
if (
|
2249
|
+
if (I.trackId) {
|
2233
2250
|
const j = f.tracks.find(
|
2234
|
-
(G) => G.id ===
|
2251
|
+
(G) => G.id === I.trackId
|
2235
2252
|
);
|
2236
2253
|
j && j.items.push(...y);
|
2237
|
-
} else if (
|
2254
|
+
} else if (I.trackIndex !== void 0) {
|
2238
2255
|
const j = {
|
2239
2256
|
id: lr(),
|
2240
2257
|
accepts: [
|
@@ -2251,7 +2268,7 @@ function ha(t) {
|
|
2251
2268
|
magnetic: !1,
|
2252
2269
|
static: !1
|
2253
2270
|
};
|
2254
|
-
f.tracks.splice(
|
2271
|
+
f.tracks.splice(I.trackIndex, 0, j);
|
2255
2272
|
} else
|
2256
2273
|
f.tracks.unshift({
|
2257
2274
|
id: lr(),
|
@@ -2269,7 +2286,7 @@ function ha(t) {
|
|
2269
2286
|
magnetic: !1,
|
2270
2287
|
static: !1
|
2271
2288
|
});
|
2272
|
-
|
2289
|
+
b && (f.activeIds = y), f.duration = re(f.trackItemsMap), t.updateState(
|
2273
2290
|
{
|
2274
2291
|
activeIds: f.activeIds,
|
2275
2292
|
trackItemIds: f.trackItemIds,
|
@@ -2288,12 +2305,12 @@ function ha(t) {
|
|
2288
2305
|
}), M = c.subscribe(async (u) => {
|
2289
2306
|
var f;
|
2290
2307
|
if (u.key === Ji) {
|
2291
|
-
const
|
2292
|
-
if (
|
2293
|
-
const h =
|
2308
|
+
const b = Z(t.getState()), y = (f = u.value) == null ? void 0 : f.options.time;
|
2309
|
+
if (b.activeIds.length === 1) {
|
2310
|
+
const h = b.activeIds[0], g = b.trackItemsMap[h];
|
2294
2311
|
if (y >= g.display.to || y <= g.display.from)
|
2295
2312
|
return;
|
2296
|
-
const _ =
|
2313
|
+
const _ = b.trackItemDetailsMap[h], I = _e(), v = {
|
2297
2314
|
...g,
|
2298
2315
|
display: {
|
2299
2316
|
from: g.display.from,
|
@@ -2301,30 +2318,30 @@ function ha(t) {
|
|
2301
2318
|
}
|
2302
2319
|
}, U = {
|
2303
2320
|
...g,
|
2304
|
-
id:
|
2321
|
+
id: I,
|
2305
2322
|
display: {
|
2306
2323
|
from: y,
|
2307
2324
|
to: g.display.to
|
2308
2325
|
}
|
2309
2326
|
};
|
2310
2327
|
if (g.type === "video" || g.type === "audio") {
|
2311
|
-
const
|
2312
|
-
|
2328
|
+
const R = y - v.display.from;
|
2329
|
+
v.trim = {
|
2313
2330
|
from: g.trim.from,
|
2314
|
-
to: g.trim.from +
|
2331
|
+
to: g.trim.from + R
|
2315
2332
|
}, U.trim = {
|
2316
|
-
from: g.trim.from +
|
2333
|
+
from: g.trim.from + R,
|
2317
2334
|
to: g.trim.to
|
2318
2335
|
};
|
2319
2336
|
}
|
2320
|
-
|
2321
|
-
|
2337
|
+
b.trackItemsMap[h] = v, b.trackItemsMap[I] = U, b.trackItemIds.push(I), b.trackItemDetailsMap[I] = _, b.tracks.forEach((R) => {
|
2338
|
+
R.items.includes(h) && R.items.push(I);
|
2322
2339
|
}), t.updateState(
|
2323
2340
|
{
|
2324
|
-
trackItemDetailsMap:
|
2325
|
-
tracks:
|
2326
|
-
trackItemIds:
|
2327
|
-
trackItemsMap:
|
2341
|
+
trackItemDetailsMap: b.trackItemDetailsMap,
|
2342
|
+
tracks: b.tracks,
|
2343
|
+
trackItemIds: b.trackItemIds,
|
2344
|
+
trackItemsMap: b.trackItemsMap
|
2328
2345
|
},
|
2329
2346
|
{
|
2330
2347
|
updateHistory: !0,
|
@@ -2335,47 +2352,47 @@ function ha(t) {
|
|
2335
2352
|
return;
|
2336
2353
|
}
|
2337
2354
|
if (u.key === qi) {
|
2338
|
-
const
|
2339
|
-
if (
|
2340
|
-
const y =
|
2355
|
+
const b = Z(t.getState());
|
2356
|
+
if (b.activeIds.length) {
|
2357
|
+
const y = b.activeIds, h = [], g = {
|
2341
2358
|
activeIds: y,
|
2342
2359
|
trackItemDetailsMap: {},
|
2343
2360
|
trackItemsMap: {},
|
2344
2361
|
tracks: []
|
2345
2362
|
};
|
2346
|
-
y.forEach((
|
2347
|
-
g.trackItemDetailsMap[
|
2348
|
-
|
2363
|
+
y.forEach((I) => {
|
2364
|
+
g.trackItemDetailsMap[I] = b.trackItemDetailsMap[I], g.trackItemsMap[I] = b.trackItemsMap[I], h.push(
|
2365
|
+
b.tracks.find((v) => v.items.includes(I))
|
2349
2366
|
);
|
2350
2367
|
});
|
2351
2368
|
const _ = /* @__PURE__ */ new Set();
|
2352
|
-
h.filter((
|
2369
|
+
h.filter((I) => _.has(I.id) ? !1 : (_.add(I), !0)), g.tracks = Array.from(_.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(g));
|
2353
2370
|
}
|
2354
2371
|
}
|
2355
2372
|
if (u.key === Vi) {
|
2356
|
-
const
|
2357
|
-
if (!
|
2358
|
-
const y =
|
2359
|
-
const
|
2360
|
-
(
|
2373
|
+
const b = localStorage.getItem("DesignComboTemp");
|
2374
|
+
if (!b) return;
|
2375
|
+
const y = Z(t.getState()), h = JSON.parse(b), g = {}, _ = h.trackItemsMap, I = h.trackItemDetailsMap, v = h.tracks, U = [], R = h.activeIds.map(async (P) => {
|
2376
|
+
const k = I[P];
|
2377
|
+
(k.type === "caption" || k.type === "text") && k.details.fontUrl && await pr([
|
2361
2378
|
{
|
2362
|
-
fontFamily:
|
2363
|
-
url:
|
2379
|
+
fontFamily: k.details.fontFamily,
|
2380
|
+
url: k.details.fontUrl
|
2364
2381
|
}
|
2365
2382
|
]);
|
2366
|
-
const
|
2367
|
-
return g[
|
2368
|
-
..._[
|
2369
|
-
id:
|
2370
|
-
}, y.trackItemDetailsMap[
|
2383
|
+
const E = _e();
|
2384
|
+
return g[P] = E, y.trackItemsMap[E] = {
|
2385
|
+
..._[P],
|
2386
|
+
id: E
|
2387
|
+
}, y.trackItemDetailsMap[E] = k, y.trackItemIds.push(E), !0;
|
2371
2388
|
});
|
2372
|
-
await Promise.all(
|
2373
|
-
const
|
2374
|
-
...
|
2375
|
-
items:
|
2389
|
+
await Promise.all(R), v.forEach((P) => {
|
2390
|
+
const k = P.items.map((H) => g[H]), E = {
|
2391
|
+
...P,
|
2392
|
+
items: k,
|
2376
2393
|
id: lr()
|
2377
2394
|
};
|
2378
|
-
U.push(
|
2395
|
+
U.push(E);
|
2379
2396
|
}), y.tracks = [...y.tracks, ...U], t.updateState(
|
2380
2397
|
{
|
2381
2398
|
trackItemDetailsMap: y.trackItemDetailsMap,
|
@@ -2390,19 +2407,19 @@ function ha(t) {
|
|
2390
2407
|
);
|
2391
2408
|
}
|
2392
2409
|
}), A = d.subscribe(async (u) => {
|
2393
|
-
var f,
|
2410
|
+
var f, b, y;
|
2394
2411
|
if (u.key === Ki) {
|
2395
|
-
const h =
|
2396
|
-
if (!
|
2397
|
-
const
|
2398
|
-
|
2399
|
-
const
|
2400
|
-
|
2401
|
-
...g[
|
2402
|
-
...
|
2403
|
-
} :
|
2412
|
+
const h = Z(t.getState()), g = h.trackItemDetailsMap, _ = h.trackItemsMap, I = Object.keys((f = u.value) == null ? void 0 : f.payload);
|
2413
|
+
if (!I.length) return;
|
2414
|
+
const v = (b = u.value) == null ? void 0 : b.payload;
|
2415
|
+
I.forEach((R) => {
|
2416
|
+
const P = v[R];
|
2417
|
+
P.details ? g[R].details = {
|
2418
|
+
...g[R].details,
|
2419
|
+
...P.details
|
2420
|
+
} : v[R].playbackRate && (_[R].playbackRate = v[R].playbackRate);
|
2404
2421
|
});
|
2405
|
-
const U =
|
2422
|
+
const U = re(_);
|
2406
2423
|
t.updateState(
|
2407
2424
|
{
|
2408
2425
|
trackItemDetailsMap: { ...g },
|
@@ -2416,34 +2433,34 @@ function ha(t) {
|
|
2416
2433
|
);
|
2417
2434
|
}
|
2418
2435
|
if (u.key === Xi) {
|
2419
|
-
const h = (y = u.value) == null ? void 0 : y.payload, g = Object.keys(h)[0], _ = Object.values(h)[0],
|
2436
|
+
const h = (y = u.value) == null ? void 0 : y.payload, g = Object.keys(h)[0], _ = Object.values(h)[0], I = Z(t.getState()), v = I.trackItemDetailsMap[g];
|
2420
2437
|
if (_.details) {
|
2421
2438
|
if (_.type === "image" && _.details.src) {
|
2422
|
-
const
|
2423
|
-
let H =
|
2424
|
-
const
|
2425
|
-
|
2439
|
+
const P = await ni(_.details.src), k = v.details.width || 0, E = v.details.height || 0;
|
2440
|
+
let H = P.width, K = P.height;
|
2441
|
+
const W = P.width / P.height;
|
2442
|
+
k / E > W ? (H = k, K = k / W) : (K = E, H = E * W), _.details.mediaWidth = H, _.details.mediaHeight = K;
|
2426
2443
|
}
|
2427
2444
|
if (_.type === "video" && _.details.src) {
|
2428
|
-
const
|
2429
|
-
let H =
|
2430
|
-
const
|
2431
|
-
|
2445
|
+
const P = await ii(_.details.src), k = v.details.width || 0, E = v.details.height || 0;
|
2446
|
+
let H = P.width, K = P.height;
|
2447
|
+
const W = P.width / P.height;
|
2448
|
+
k / E > W ? (H = k, K = k / W) : (K = E, H = E * W), _.details.mediaWidth = H, _.details.mediaHeight = K;
|
2432
2449
|
}
|
2433
|
-
const
|
2434
|
-
|
2450
|
+
const R = v.details;
|
2451
|
+
v.details = { ...R, ..._.details }, _.details = v.details;
|
2435
2452
|
}
|
2436
|
-
const U = { ...
|
2437
|
-
|
2438
|
-
...
|
2453
|
+
const U = { ...v, ..._ };
|
2454
|
+
I.trackItemDetailsMap[g] = U, I.trackItemsMap[g] = {
|
2455
|
+
...I.trackItemsMap[g],
|
2439
2456
|
type: _.type
|
2440
2457
|
}, t.updateState(
|
2441
2458
|
{
|
2442
2459
|
trackItemDetailsMap: {
|
2443
|
-
...
|
2460
|
+
...I.trackItemDetailsMap
|
2444
2461
|
},
|
2445
2462
|
trackItemsMap: {
|
2446
|
-
...
|
2463
|
+
...I.trackItemsMap
|
2447
2464
|
}
|
2448
2465
|
},
|
2449
2466
|
{
|
@@ -2455,47 +2472,47 @@ function ha(t) {
|
|
2455
2472
|
});
|
2456
2473
|
return {
|
2457
2474
|
unsubscribe: () => {
|
2458
|
-
m.unsubscribe(), M.unsubscribe(), A.unsubscribe(),
|
2475
|
+
m.unsubscribe(), M.unsubscribe(), A.unsubscribe(), x.unsubscribe(), C.unsubscribe(), T.unsubscribe(), S.unsubscribe();
|
2459
2476
|
}
|
2460
2477
|
};
|
2461
2478
|
}
|
2462
2479
|
const ma = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
2463
2480
|
function pi(t, r, n = { cyclesFix: !0 }, i = []) {
|
2464
|
-
var p,
|
2481
|
+
var p, T;
|
2465
2482
|
let s = [];
|
2466
2483
|
const c = Array.isArray(t);
|
2467
|
-
for (const
|
2468
|
-
const
|
2469
|
-
if (!(
|
2484
|
+
for (const x in t) {
|
2485
|
+
const S = t[x], C = c ? +x : x;
|
2486
|
+
if (!(x in r)) {
|
2470
2487
|
s.push({
|
2471
2488
|
type: "REMOVE",
|
2472
|
-
path: [
|
2473
|
-
oldValue: t[
|
2489
|
+
path: [C],
|
2490
|
+
oldValue: t[x]
|
2474
2491
|
});
|
2475
2492
|
continue;
|
2476
2493
|
}
|
2477
|
-
const m = r[
|
2478
|
-
if (
|
2479
|
-
const A = pi(
|
2480
|
-
s.push.apply(s, A.map((u) => (u.path.unshift(
|
2481
|
-
} else
|
2482
|
-
!(Number.isNaN(
|
2483
|
-
path: [
|
2494
|
+
const m = r[x], M = typeof S == "object" && typeof m == "object" && Array.isArray(S) === Array.isArray(m);
|
2495
|
+
if (S && m && M && !ma[(T = (p = Object.getPrototypeOf(S)) == null ? void 0 : p.constructor) == null ? void 0 : T.name] && (!n.cyclesFix || !i.includes(S))) {
|
2496
|
+
const A = pi(S, m, n, n.cyclesFix ? i.concat([S]) : []);
|
2497
|
+
s.push.apply(s, A.map((u) => (u.path.unshift(C), u)));
|
2498
|
+
} else S !== m && // treat NaN values as equivalent
|
2499
|
+
!(Number.isNaN(S) && Number.isNaN(m)) && !(M && (isNaN(S) ? S + "" == m + "" : +S == +m)) && s.push({
|
2500
|
+
path: [C],
|
2484
2501
|
type: "CHANGE",
|
2485
2502
|
value: m,
|
2486
|
-
oldValue:
|
2503
|
+
oldValue: S
|
2487
2504
|
});
|
2488
2505
|
}
|
2489
2506
|
const d = Array.isArray(r);
|
2490
|
-
for (const
|
2491
|
-
|
2507
|
+
for (const x in r)
|
2508
|
+
x in t || s.push({
|
2492
2509
|
type: "CREATE",
|
2493
|
-
path: [d ? +
|
2494
|
-
value: r[
|
2510
|
+
path: [d ? +x : x],
|
2511
|
+
value: r[x]
|
2495
2512
|
});
|
2496
2513
|
return s;
|
2497
2514
|
}
|
2498
|
-
var Mn = Symbol.for("immer-nothing"), ze = Symbol.for("immer-draftable"),
|
2515
|
+
var Mn = Symbol.for("immer-nothing"), ze = Symbol.for("immer-draftable"), mt = Symbol.for("immer-state"), hi = process.env.NODE_ENV !== "production" ? [
|
2499
2516
|
// All error codes, starting by 0:
|
2500
2517
|
function(t) {
|
2501
2518
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
@@ -2526,7 +2543,7 @@ var Mn = Symbol.for("immer-nothing"), ze = Symbol.for("immer-draftable"), ht = S
|
|
2526
2543
|
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
|
2527
2544
|
// See Patches.ts for additional errors
|
2528
2545
|
] : [];
|
2529
|
-
function
|
2546
|
+
function V(t, ...r) {
|
2530
2547
|
if (process.env.NODE_ENV !== "production") {
|
2531
2548
|
const n = hi[t], i = typeof n == "function" ? n.apply(null, r) : n;
|
2532
2549
|
throw new Error(`[Immer] ${i}`);
|
@@ -2535,11 +2552,11 @@ function K(t, ...r) {
|
|
2535
2552
|
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
2536
2553
|
);
|
2537
2554
|
}
|
2538
|
-
var
|
2539
|
-
function
|
2540
|
-
return !!t && !!t[
|
2555
|
+
var ne = Object.getPrototypeOf;
|
2556
|
+
function ie(t) {
|
2557
|
+
return !!t && !!t[mt];
|
2541
2558
|
}
|
2542
|
-
function
|
2559
|
+
function Lt(t) {
|
2543
2560
|
var r;
|
2544
2561
|
return t ? mi(t) || Array.isArray(t) || !!t[ze] || !!((r = t.constructor) != null && r[ze]) || We(t) || Ge(t) : !1;
|
2545
2562
|
}
|
@@ -2547,29 +2564,29 @@ var ya = Object.prototype.constructor.toString();
|
|
2547
2564
|
function mi(t) {
|
2548
2565
|
if (!t || typeof t != "object")
|
2549
2566
|
return !1;
|
2550
|
-
const r =
|
2567
|
+
const r = ne(t);
|
2551
2568
|
if (r === null)
|
2552
2569
|
return !0;
|
2553
2570
|
const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
2554
2571
|
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === ya;
|
2555
2572
|
}
|
2556
2573
|
function He(t, r) {
|
2557
|
-
|
2574
|
+
ae(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
2558
2575
|
r(n, t[n], t);
|
2559
2576
|
}) : t.forEach((n, i) => r(i, n, t));
|
2560
2577
|
}
|
2561
|
-
function
|
2562
|
-
const r = t[
|
2578
|
+
function ae(t) {
|
2579
|
+
const r = t[mt];
|
2563
2580
|
return r ? r.type_ : Array.isArray(t) ? 1 : We(t) ? 2 : Ge(t) ? 3 : 0;
|
2564
2581
|
}
|
2565
2582
|
function je(t, r) {
|
2566
|
-
return
|
2583
|
+
return ae(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
2567
2584
|
}
|
2568
2585
|
function un(t, r) {
|
2569
|
-
return
|
2586
|
+
return ae(t) === 2 ? t.get(r) : t[r];
|
2570
2587
|
}
|
2571
2588
|
function yi(t, r, n) {
|
2572
|
-
const i =
|
2589
|
+
const i = ae(t);
|
2573
2590
|
i === 2 ? t.set(r, n) : i === 3 ? t.add(n) : t[r] = n;
|
2574
2591
|
}
|
2575
2592
|
function ga(t, r) {
|
@@ -2581,7 +2598,7 @@ function We(t) {
|
|
2581
2598
|
function Ge(t) {
|
2582
2599
|
return t instanceof Set;
|
2583
2600
|
}
|
2584
|
-
function
|
2601
|
+
function ee(t) {
|
2585
2602
|
return t.copy_ || t.base_;
|
2586
2603
|
}
|
2587
2604
|
function bn(t, r) {
|
@@ -2594,7 +2611,7 @@ function bn(t, r) {
|
|
2594
2611
|
const n = mi(t);
|
2595
2612
|
if (r === !0 || r === "class_only" && !n) {
|
2596
2613
|
const i = Object.getOwnPropertyDescriptors(t);
|
2597
|
-
delete i[
|
2614
|
+
delete i[mt];
|
2598
2615
|
let s = Reflect.ownKeys(i);
|
2599
2616
|
for (let c = 0; c < s.length; c++) {
|
2600
2617
|
const d = s[c], p = i[d];
|
@@ -2606,9 +2623,9 @@ function bn(t, r) {
|
|
2606
2623
|
value: t[d]
|
2607
2624
|
});
|
2608
2625
|
}
|
2609
|
-
return Object.create(
|
2626
|
+
return Object.create(ne(t), i);
|
2610
2627
|
} else {
|
2611
|
-
const i =
|
2628
|
+
const i = ne(t);
|
2612
2629
|
if (i !== null && n)
|
2613
2630
|
return { ...t };
|
2614
2631
|
const s = Object.create(i);
|
@@ -2616,18 +2633,18 @@ function bn(t, r) {
|
|
2616
2633
|
}
|
2617
2634
|
}
|
2618
2635
|
function An(t, r = !1) {
|
2619
|
-
return _r(t) ||
|
2636
|
+
return _r(t) || ie(t) || !Lt(t) || (ae(t) > 1 && (t.set = t.add = t.clear = t.delete = Ia), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => An(i, !0))), t;
|
2620
2637
|
}
|
2621
2638
|
function Ia() {
|
2622
|
-
|
2639
|
+
V(2);
|
2623
2640
|
}
|
2624
2641
|
function _r(t) {
|
2625
2642
|
return Object.isFrozen(t);
|
2626
2643
|
}
|
2627
2644
|
var _n = {};
|
2628
|
-
function
|
2645
|
+
function se(t) {
|
2629
2646
|
const r = _n[t];
|
2630
|
-
return r ||
|
2647
|
+
return r || V(0, t), r;
|
2631
2648
|
}
|
2632
2649
|
function ba(t, r) {
|
2633
2650
|
_n[t] || (_n[t] = r);
|
@@ -2648,7 +2665,7 @@ function _a(t, r) {
|
|
2648
2665
|
};
|
2649
2666
|
}
|
2650
2667
|
function Nn(t, r) {
|
2651
|
-
r && (
|
2668
|
+
r && (se("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
2652
2669
|
}
|
2653
2670
|
function vn(t) {
|
2654
2671
|
Sn(t), t.drafts_.forEach(va), t.drafts_ = null;
|
@@ -2660,14 +2677,14 @@ function Ln(t) {
|
|
2660
2677
|
return Ne = _a(Ne, t);
|
2661
2678
|
}
|
2662
2679
|
function va(t) {
|
2663
|
-
const r = t[
|
2680
|
+
const r = t[mt];
|
2664
2681
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
2665
2682
|
}
|
2666
2683
|
function $n(t, r) {
|
2667
2684
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
2668
2685
|
const n = r.drafts_[0];
|
2669
|
-
return t !== void 0 && t !== n ? (n[
|
2670
|
-
n[
|
2686
|
+
return t !== void 0 && t !== n ? (n[mt].modified_ && (vn(r), V(4)), Lt(t) && (t = hr(r, t), r.parent_ || mr(r, t)), r.patches_ && se("Patches").generateReplacementPatches_(
|
2687
|
+
n[mt].base_,
|
2671
2688
|
t,
|
2672
2689
|
r.patches_,
|
2673
2690
|
r.inversePatches_
|
@@ -2676,7 +2693,7 @@ function $n(t, r) {
|
|
2676
2693
|
function hr(t, r, n) {
|
2677
2694
|
if (_r(r))
|
2678
2695
|
return r;
|
2679
|
-
const i = r[
|
2696
|
+
const i = r[mt];
|
2680
2697
|
if (!i)
|
2681
2698
|
return He(
|
2682
2699
|
r,
|
@@ -2692,8 +2709,8 @@ function hr(t, r, n) {
|
|
2692
2709
|
let c = s, d = !1;
|
2693
2710
|
i.type_ === 3 && (c = new Set(s), s.clear(), d = !0), He(
|
2694
2711
|
c,
|
2695
|
-
(p,
|
2696
|
-
), mr(t, s, !1), n && t.patches_ &&
|
2712
|
+
(p, T) => Un(t, i, s, p, T, n, d)
|
2713
|
+
), mr(t, s, !1), n && t.patches_ && se("Patches").generatePatches_(
|
2697
2714
|
i,
|
2698
2715
|
n,
|
2699
2716
|
t.patches_,
|
@@ -2703,15 +2720,15 @@ function hr(t, r, n) {
|
|
2703
2720
|
return i.copy_;
|
2704
2721
|
}
|
2705
2722
|
function Un(t, r, n, i, s, c, d) {
|
2706
|
-
if (process.env.NODE_ENV !== "production" && s === n &&
|
2723
|
+
if (process.env.NODE_ENV !== "production" && s === n && V(5), ie(s)) {
|
2707
2724
|
const p = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2708
|
-
!je(r.assigned_, i) ? c.concat(i) : void 0,
|
2709
|
-
if (yi(n, i,
|
2725
|
+
!je(r.assigned_, i) ? c.concat(i) : void 0, T = hr(t, s, p);
|
2726
|
+
if (yi(n, i, T), ie(T))
|
2710
2727
|
t.canAutoFreeze_ = !1;
|
2711
2728
|
else
|
2712
2729
|
return;
|
2713
2730
|
} else d && n.add(s);
|
2714
|
-
if (
|
2731
|
+
if (Lt(s) && !_r(s)) {
|
2715
2732
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
2716
2733
|
return;
|
2717
2734
|
hr(t, s), (!r || !r.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(n, i) && mr(t, s);
|
@@ -2744,33 +2761,33 @@ function Sa(t, r) {
|
|
2744
2761
|
revoke_: null,
|
2745
2762
|
isManual_: !1
|
2746
2763
|
};
|
2747
|
-
let s = i, c =
|
2764
|
+
let s = i, c = xn;
|
2748
2765
|
n && (s = [i], c = Le);
|
2749
2766
|
const { revoke: d, proxy: p } = Proxy.revocable(s, c);
|
2750
2767
|
return i.draft_ = p, i.revoke_ = d, p;
|
2751
2768
|
}
|
2752
|
-
var
|
2769
|
+
var xn = {
|
2753
2770
|
get(t, r) {
|
2754
|
-
if (r ===
|
2771
|
+
if (r === mt)
|
2755
2772
|
return t;
|
2756
|
-
const n =
|
2773
|
+
const n = ee(t);
|
2757
2774
|
if (!je(n, r))
|
2758
2775
|
return ka(t, n, r);
|
2759
2776
|
const i = n[r];
|
2760
|
-
return t.finalized_ || !
|
2777
|
+
return t.finalized_ || !Lt(i) ? i : i === ln(t.base_, r) ? (fn(t), t.copy_[r] = wn(i, t)) : i;
|
2761
2778
|
},
|
2762
2779
|
has(t, r) {
|
2763
|
-
return r in
|
2780
|
+
return r in ee(t);
|
2764
2781
|
},
|
2765
2782
|
ownKeys(t) {
|
2766
|
-
return Reflect.ownKeys(
|
2783
|
+
return Reflect.ownKeys(ee(t));
|
2767
2784
|
},
|
2768
2785
|
set(t, r, n) {
|
2769
|
-
const i = Ii(
|
2786
|
+
const i = Ii(ee(t), r);
|
2770
2787
|
if (i != null && i.set)
|
2771
2788
|
return i.set.call(t.draft_, n), !0;
|
2772
2789
|
if (!t.modified_) {
|
2773
|
-
const s = ln(
|
2790
|
+
const s = ln(ee(t), r), c = s == null ? void 0 : s[mt];
|
2774
2791
|
if (c && c.base_ === n)
|
2775
2792
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2776
2793
|
if (ga(n, s) && (n !== void 0 || je(t.base_, r)))
|
@@ -2787,7 +2804,7 @@ var Dn = {
|
|
2787
2804
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
2788
2805
|
// the same guarantee in ES5 mode.
|
2789
2806
|
getOwnPropertyDescriptor(t, r) {
|
2790
|
-
const n =
|
2807
|
+
const n = ee(t), i = Reflect.getOwnPropertyDescriptor(n, r);
|
2791
2808
|
return i && {
|
2792
2809
|
writable: !0,
|
2793
2810
|
configurable: t.type_ !== 1 || r !== "length",
|
@@ -2796,29 +2813,29 @@ var Dn = {
|
|
2796
2813
|
};
|
2797
2814
|
},
|
2798
2815
|
defineProperty() {
|
2799
|
-
|
2816
|
+
V(11);
|
2800
2817
|
},
|
2801
2818
|
getPrototypeOf(t) {
|
2802
|
-
return
|
2819
|
+
return ne(t.base_);
|
2803
2820
|
},
|
2804
2821
|
setPrototypeOf() {
|
2805
|
-
|
2822
|
+
V(12);
|
2806
2823
|
}
|
2807
2824
|
}, Le = {};
|
2808
|
-
He(
|
2825
|
+
He(xn, (t, r) => {
|
2809
2826
|
Le[t] = function() {
|
2810
2827
|
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
2811
2828
|
};
|
2812
2829
|
});
|
2813
2830
|
Le.deleteProperty = function(t, r) {
|
2814
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) &&
|
2831
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && V(13), Le.set.call(this, t, r, void 0);
|
2815
2832
|
};
|
2816
2833
|
Le.set = function(t, r, n) {
|
2817
|
-
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) &&
|
2834
|
+
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && V(14), xn.set.call(this, t[0], r, n, t[0]);
|
2818
2835
|
};
|
2819
2836
|
function ln(t, r) {
|
2820
|
-
const n = t[
|
2821
|
-
return (n ?
|
2837
|
+
const n = t[mt];
|
2838
|
+
return (n ? ee(n) : t)[r];
|
2822
2839
|
}
|
2823
2840
|
function ka(t, r, n) {
|
2824
2841
|
var s;
|
@@ -2832,12 +2849,12 @@ function ka(t, r, n) {
|
|
2832
2849
|
function Ii(t, r) {
|
2833
2850
|
if (!(r in t))
|
2834
2851
|
return;
|
2835
|
-
let n =
|
2852
|
+
let n = ne(t);
|
2836
2853
|
for (; n; ) {
|
2837
2854
|
const i = Object.getOwnPropertyDescriptor(n, r);
|
2838
2855
|
if (i)
|
2839
2856
|
return i;
|
2840
|
-
n =
|
2857
|
+
n = ne(n);
|
2841
2858
|
}
|
2842
2859
|
}
|
2843
2860
|
function kn(t) {
|
@@ -2856,13 +2873,13 @@ var wa = class {
|
|
2856
2873
|
const c = n;
|
2857
2874
|
n = r;
|
2858
2875
|
const d = this;
|
2859
|
-
return function(
|
2860
|
-
return d.produce(
|
2876
|
+
return function(T = c, ...x) {
|
2877
|
+
return d.produce(T, (S) => n.call(this, S, ...x));
|
2861
2878
|
};
|
2862
2879
|
}
|
2863
|
-
typeof n != "function" &&
|
2880
|
+
typeof n != "function" && V(6), i !== void 0 && typeof i != "function" && V(7);
|
2864
2881
|
let s;
|
2865
|
-
if (
|
2882
|
+
if (Lt(r)) {
|
2866
2883
|
const c = Ln(this), d = wn(r, void 0);
|
2867
2884
|
let p = !0;
|
2868
2885
|
try {
|
@@ -2874,14 +2891,14 @@ var wa = class {
|
|
2874
2891
|
} else if (!r || typeof r != "object") {
|
2875
2892
|
if (s = n(r), s === void 0 && (s = r), s === Mn && (s = void 0), this.autoFreeze_ && An(s, !0), i) {
|
2876
2893
|
const c = [], d = [];
|
2877
|
-
|
2894
|
+
se("Patches").generateReplacementPatches_(r, s, c, d), i(c, d);
|
2878
2895
|
}
|
2879
2896
|
return s;
|
2880
2897
|
} else
|
2881
|
-
|
2898
|
+
V(1, r);
|
2882
2899
|
}, this.produceWithPatches = (r, n) => {
|
2883
2900
|
if (typeof r == "function")
|
2884
|
-
return (d, ...p) => this.produceWithPatches(d, (
|
2901
|
+
return (d, ...p) => this.produceWithPatches(d, (T) => r(T, ...p));
|
2885
2902
|
let i, s;
|
2886
2903
|
return [this.produce(r, n, (d, p) => {
|
2887
2904
|
i = d, s = p;
|
@@ -2889,13 +2906,13 @@ var wa = class {
|
|
2889
2906
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
2890
2907
|
}
|
2891
2908
|
createDraft(t) {
|
2892
|
-
|
2909
|
+
Lt(t) || V(8), ie(t) && (t = Ea(t));
|
2893
2910
|
const r = Ln(this), n = wn(t, void 0);
|
2894
|
-
return n[
|
2911
|
+
return n[mt].isManual_ = !0, Sn(r), n;
|
2895
2912
|
}
|
2896
2913
|
finishDraft(t, r) {
|
2897
|
-
const n = t && t[
|
2898
|
-
(!n || !n.isManual_) &&
|
2914
|
+
const n = t && t[mt];
|
2915
|
+
(!n || !n.isManual_) && V(9);
|
2899
2916
|
const { scope_: i } = n;
|
2900
2917
|
return Nn(i, r), $n(void 0, i);
|
2901
2918
|
}
|
@@ -2925,24 +2942,24 @@ var wa = class {
|
|
2925
2942
|
}
|
2926
2943
|
}
|
2927
2944
|
n > -1 && (r = r.slice(n + 1));
|
2928
|
-
const i =
|
2929
|
-
return
|
2945
|
+
const i = se("Patches").applyPatches_;
|
2946
|
+
return ie(t) ? i(t, r) : this.produce(
|
2930
2947
|
t,
|
2931
2948
|
(s) => i(s, r)
|
2932
2949
|
);
|
2933
2950
|
}
|
2934
2951
|
};
|
2935
2952
|
function wn(t, r) {
|
2936
|
-
const n = We(t) ?
|
2953
|
+
const n = We(t) ? se("MapSet").proxyMap_(t, r) : Ge(t) ? se("MapSet").proxySet_(t, r) : Sa(t, r);
|
2937
2954
|
return (r ? r.scope_ : gi()).drafts_.push(n), n;
|
2938
2955
|
}
|
2939
|
-
function
|
2940
|
-
return
|
2956
|
+
function Ea(t) {
|
2957
|
+
return ie(t) || V(10, t), bi(t);
|
2941
2958
|
}
|
2942
2959
|
function bi(t) {
|
2943
|
-
if (!
|
2960
|
+
if (!Lt(t) || _r(t))
|
2944
2961
|
return t;
|
2945
|
-
const r = t[
|
2962
|
+
const r = t[mt];
|
2946
2963
|
let n;
|
2947
2964
|
if (r) {
|
2948
2965
|
if (!r.modified_)
|
@@ -2988,21 +3005,21 @@ function Wn() {
|
|
2988
3005
|
}
|
2989
3006
|
}
|
2990
3007
|
function c(m, M, A, u) {
|
2991
|
-
let { base_: f, assigned_:
|
3008
|
+
let { base_: f, assigned_: b } = m, y = m.copy_;
|
2992
3009
|
y.length < f.length && ([f, y] = [y, f], [A, u] = [u, A]);
|
2993
3010
|
for (let h = 0; h < f.length; h++)
|
2994
|
-
if (
|
3011
|
+
if (b[h] && y[h] !== f[h]) {
|
2995
3012
|
const g = M.concat([h]);
|
2996
3013
|
A.push({
|
2997
3014
|
op: r,
|
2998
3015
|
path: g,
|
2999
3016
|
// Need to maybe clone it, as it can in fact be the original value
|
3000
3017
|
// due to the base/copy inversion at the start of this function
|
3001
|
-
value:
|
3018
|
+
value: C(y[h])
|
3002
3019
|
}), u.push({
|
3003
3020
|
op: r,
|
3004
3021
|
path: g,
|
3005
|
-
value:
|
3022
|
+
value: C(f[h])
|
3006
3023
|
});
|
3007
3024
|
}
|
3008
3025
|
for (let h = f.length; h < y.length; h++) {
|
@@ -3012,7 +3029,7 @@ function Wn() {
|
|
3012
3029
|
path: g,
|
3013
3030
|
// Need to maybe clone it, as it can in fact be the original value
|
3014
3031
|
// due to the base/copy inversion at the start of this function
|
3015
|
-
value:
|
3032
|
+
value: C(y[h])
|
3016
3033
|
});
|
3017
3034
|
}
|
3018
3035
|
for (let h = y.length - 1; f.length <= h; --h) {
|
@@ -3024,21 +3041,21 @@ function Wn() {
|
|
3024
3041
|
}
|
3025
3042
|
}
|
3026
3043
|
function d(m, M, A, u) {
|
3027
|
-
const { base_: f, copy_:
|
3044
|
+
const { base_: f, copy_: b } = m;
|
3028
3045
|
He(m.assigned_, (y, h) => {
|
3029
|
-
const g = un(f, y), _ = un(
|
3030
|
-
if (g === _ &&
|
3046
|
+
const g = un(f, y), _ = un(b, y), I = h ? je(f, y) ? r : n : i;
|
3047
|
+
if (g === _ && I === r)
|
3031
3048
|
return;
|
3032
|
-
const
|
3033
|
-
A.push(
|
3034
|
-
|
3049
|
+
const v = M.concat(y);
|
3050
|
+
A.push(I === i ? { op: I, path: v } : { op: I, path: v, value: _ }), u.push(
|
3051
|
+
I === n ? { op: i, path: v } : I === i ? { op: n, path: v, value: C(g) } : { op: r, path: v, value: C(g) }
|
3035
3052
|
);
|
3036
3053
|
});
|
3037
3054
|
}
|
3038
3055
|
function p(m, M, A, u) {
|
3039
|
-
let { base_: f, copy_:
|
3056
|
+
let { base_: f, copy_: b } = m, y = 0;
|
3040
3057
|
f.forEach((h) => {
|
3041
|
-
if (!
|
3058
|
+
if (!b.has(h)) {
|
3042
3059
|
const g = M.concat([y]);
|
3043
3060
|
A.push({
|
3044
3061
|
op: i,
|
@@ -3051,7 +3068,7 @@ function Wn() {
|
|
3051
3068
|
});
|
3052
3069
|
}
|
3053
3070
|
y++;
|
3054
|
-
}), y = 0,
|
3071
|
+
}), y = 0, b.forEach((h) => {
|
3055
3072
|
if (!f.has(h)) {
|
3056
3073
|
const g = M.concat([y]);
|
3057
3074
|
A.push({
|
@@ -3067,7 +3084,7 @@ function Wn() {
|
|
3067
3084
|
y++;
|
3068
3085
|
});
|
3069
3086
|
}
|
3070
|
-
function
|
3087
|
+
function T(m, M, A, u) {
|
3071
3088
|
A.push({
|
3072
3089
|
op: r,
|
3073
3090
|
path: [],
|
@@ -3078,88 +3095,88 @@ function Wn() {
|
|
3078
3095
|
value: m
|
3079
3096
|
});
|
3080
3097
|
}
|
3081
|
-
function
|
3098
|
+
function x(m, M) {
|
3082
3099
|
return M.forEach((A) => {
|
3083
3100
|
const { path: u, op: f } = A;
|
3084
|
-
let
|
3101
|
+
let b = m;
|
3085
3102
|
for (let _ = 0; _ < u.length - 1; _++) {
|
3086
|
-
const
|
3087
|
-
let
|
3088
|
-
typeof
|
3103
|
+
const I = ae(b);
|
3104
|
+
let v = u[_];
|
3105
|
+
typeof v != "string" && typeof v != "number" && (v = "" + v), (I === 0 || I === 1) && (v === "__proto__" || v === "constructor") && V(19), typeof b == "function" && v === "prototype" && V(19), b = un(b, v), typeof b != "object" && V(18, u.join("/"));
|
3089
3106
|
}
|
3090
|
-
const y =
|
3107
|
+
const y = ae(b), h = S(A.value), g = u[u.length - 1];
|
3091
3108
|
switch (f) {
|
3092
3109
|
case r:
|
3093
3110
|
switch (y) {
|
3094
3111
|
case 2:
|
3095
|
-
return
|
3112
|
+
return b.set(g, h);
|
3096
3113
|
case 3:
|
3097
|
-
|
3114
|
+
V(16);
|
3098
3115
|
default:
|
3099
|
-
return
|
3116
|
+
return b[g] = h;
|
3100
3117
|
}
|
3101
3118
|
case n:
|
3102
3119
|
switch (y) {
|
3103
3120
|
case 1:
|
3104
|
-
return g === "-" ?
|
3121
|
+
return g === "-" ? b.push(h) : b.splice(g, 0, h);
|
3105
3122
|
case 2:
|
3106
|
-
return
|
3123
|
+
return b.set(g, h);
|
3107
3124
|
case 3:
|
3108
|
-
return
|
3125
|
+
return b.add(h);
|
3109
3126
|
default:
|
3110
|
-
return
|
3127
|
+
return b[g] = h;
|
3111
3128
|
}
|
3112
3129
|
case i:
|
3113
3130
|
switch (y) {
|
3114
3131
|
case 1:
|
3115
|
-
return
|
3132
|
+
return b.splice(g, 1);
|
3116
3133
|
case 2:
|
3117
|
-
return
|
3134
|
+
return b.delete(g);
|
3118
3135
|
case 3:
|
3119
|
-
return
|
3136
|
+
return b.delete(A.value);
|
3120
3137
|
default:
|
3121
|
-
return delete
|
3138
|
+
return delete b[g];
|
3122
3139
|
}
|
3123
3140
|
default:
|
3124
|
-
|
3141
|
+
V(17, f);
|
3125
3142
|
}
|
3126
3143
|
}), m;
|
3127
3144
|
}
|
3128
|
-
function
|
3129
|
-
if (!
|
3145
|
+
function S(m) {
|
3146
|
+
if (!Lt(m))
|
3130
3147
|
return m;
|
3131
3148
|
if (Array.isArray(m))
|
3132
|
-
return m.map(
|
3149
|
+
return m.map(S);
|
3133
3150
|
if (We(m))
|
3134
3151
|
return new Map(
|
3135
|
-
Array.from(m.entries()).map(([A, u]) => [A,
|
3152
|
+
Array.from(m.entries()).map(([A, u]) => [A, S(u)])
|
3136
3153
|
);
|
3137
3154
|
if (Ge(m))
|
3138
|
-
return new Set(Array.from(m).map(
|
3139
|
-
const M = Object.create(
|
3155
|
+
return new Set(Array.from(m).map(S));
|
3156
|
+
const M = Object.create(ne(m));
|
3140
3157
|
for (const A in m)
|
3141
|
-
M[A] =
|
3158
|
+
M[A] = S(m[A]);
|
3142
3159
|
return je(m, ze) && (M[ze] = m[ze]), M;
|
3143
3160
|
}
|
3144
|
-
function
|
3145
|
-
return
|
3161
|
+
function C(m) {
|
3162
|
+
return ie(m) ? S(m) : m;
|
3146
3163
|
}
|
3147
3164
|
ba("Patches", {
|
3148
|
-
applyPatches_:
|
3165
|
+
applyPatches_: x,
|
3149
3166
|
generatePatches_: s,
|
3150
|
-
generateReplacementPatches_:
|
3167
|
+
generateReplacementPatches_: T
|
3151
3168
|
});
|
3152
3169
|
}
|
3153
|
-
var
|
3154
|
-
|
3155
|
-
|
3170
|
+
var yt = new wa(), Ta = yt.produce;
|
3171
|
+
yt.produceWithPatches.bind(
|
3172
|
+
yt
|
3156
3173
|
);
|
3157
|
-
|
3158
|
-
|
3159
|
-
var Ma =
|
3160
|
-
|
3161
|
-
|
3162
|
-
var Aa = 1 / 0,
|
3174
|
+
yt.setAutoFreeze.bind(yt);
|
3175
|
+
yt.setUseStrictShallowCopy.bind(yt);
|
3176
|
+
var Ma = yt.applyPatches.bind(yt);
|
3177
|
+
yt.createDraft.bind(yt);
|
3178
|
+
yt.finishDraft.bind(yt);
|
3179
|
+
var Aa = 1 / 0, xa = 9007199254740991, Da = "[object Arguments]", Oa = "[object Function]", Pa = "[object GeneratorFunction]", Ca = "[object Symbol]", Ra = typeof It == "object" && It && It.Object === Object && It, Fa = typeof self == "object" && self && self.Object === Object && self, za = Ra || Fa || Function("return this")();
|
3163
3180
|
function Ha(t, r, n) {
|
3164
3181
|
switch (n.length) {
|
3165
3182
|
case 0:
|
@@ -3183,7 +3200,7 @@ function Na(t, r) {
|
|
3183
3200
|
t[s + n] = r[n];
|
3184
3201
|
return t;
|
3185
3202
|
}
|
3186
|
-
var
|
3203
|
+
var Dn = Object.prototype, La = Dn.hasOwnProperty, On = Dn.toString, Gn = za.Symbol, $a = Dn.propertyIsEnumerable, Yn = Gn ? Gn.isConcatSpreadable : void 0, Bn = Math.max;
|
3187
3204
|
function Ua(t, r, n, i, s) {
|
3188
3205
|
var c = -1, d = t.length;
|
3189
3206
|
for (n || (n = Ba), s || (s = []); ++c < d; ) {
|
@@ -3224,7 +3241,7 @@ function Ka(t) {
|
|
3224
3241
|
return r == "0" && 1 / t == -Aa ? "-0" : r;
|
3225
3242
|
}
|
3226
3243
|
function Xa(t) {
|
3227
|
-
return Ja(t) && La.call(t, "callee") && (!$a.call(t, "callee") || On.call(t) ==
|
3244
|
+
return Ja(t) && La.call(t, "callee") && (!$a.call(t, "callee") || On.call(t) == Da);
|
3228
3245
|
}
|
3229
3246
|
var Va = Array.isArray;
|
3230
3247
|
function qa(t) {
|
@@ -3238,7 +3255,7 @@ function Za(t) {
|
|
3238
3255
|
return r == Oa || r == Pa;
|
3239
3256
|
}
|
3240
3257
|
function Qa(t) {
|
3241
|
-
return typeof t == "number" && t > -1 && t % 1 == 0 && t <=
|
3258
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= xa;
|
3242
3259
|
}
|
3243
3260
|
function ts(t) {
|
3244
3261
|
var r = typeof t;
|
@@ -3253,7 +3270,7 @@ function es(t) {
|
|
3253
3270
|
var rs = Ya(function(t, r) {
|
3254
3271
|
return t == null ? {} : Wa(t, ja(Ua(r), Ka));
|
3255
3272
|
}), ns = rs;
|
3256
|
-
const Kn = /* @__PURE__ */
|
3273
|
+
const Kn = /* @__PURE__ */ En(ns), is = {
|
3257
3274
|
width: 1080,
|
3258
3275
|
height: 1920
|
3259
3276
|
}, as = {
|
@@ -3283,12 +3300,12 @@ const Kn = /* @__PURE__ */ Tn(ns), is = {
|
|
3283
3300
|
];
|
3284
3301
|
class zs {
|
3285
3302
|
constructor(r) {
|
3286
|
-
|
3287
|
-
|
3288
|
-
|
3289
|
-
|
3290
|
-
|
3291
|
-
|
3303
|
+
Zt(this, "stateSubject");
|
3304
|
+
Zt(this, "stateHistorySubject");
|
3305
|
+
Zt(this, "prevState");
|
3306
|
+
Zt(this, "undos", []);
|
3307
|
+
Zt(this, "redos", []);
|
3308
|
+
Zt(this, "listener");
|
3292
3309
|
const n = r || as;
|
3293
3310
|
this.stateSubject = new jn(n), this.stateHistorySubject = new jn({
|
3294
3311
|
handleRedo: !1,
|
@@ -3328,28 +3345,28 @@ class zs {
|
|
3328
3345
|
...i,
|
3329
3346
|
...r
|
3330
3347
|
};
|
3331
|
-
|
3348
|
+
ct(i, s) || (n.updateHistory && this.updateHistory(s, n.kind), this.prevState = i, this.stateSubject.next(s));
|
3332
3349
|
}
|
3333
3350
|
// emit changes for design size
|
3334
3351
|
subscribeToSize(r) {
|
3335
3352
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3336
|
-
|
3353
|
+
ct(n.size, this.prevState.size) || r({ size: n.size });
|
3337
3354
|
});
|
3338
3355
|
}
|
3339
3356
|
// Selectively subscribe to scale changes
|
3340
3357
|
subscribeToScale(r) {
|
3341
3358
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3342
|
-
|
3359
|
+
ct(n.scale, this.prevState.scale) || r({ scale: n.scale });
|
3343
3360
|
});
|
3344
3361
|
}
|
3345
3362
|
subscribeToUpdateTrackItem(r) {
|
3346
3363
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3347
|
-
|
3364
|
+
ct(n.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: n.trackItemsMap });
|
3348
3365
|
});
|
3349
3366
|
}
|
3350
3367
|
subscribeToUpdateItemDetails(r) {
|
3351
3368
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3352
|
-
|
3369
|
+
ct(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
|
3353
3370
|
});
|
3354
3371
|
}
|
3355
3372
|
// Selectively subscribe to duration changes
|
@@ -3372,22 +3389,22 @@ class zs {
|
|
3372
3389
|
}
|
3373
3390
|
subscribeToAddOrRemoveItems(r) {
|
3374
3391
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3375
|
-
(!
|
3392
|
+
(!ct(n.trackItemIds, this.prevState.trackItemIds) || !ct(n.tracks, this.prevState.tracks)) && r({ trackItemIds: n.trackItemIds });
|
3376
3393
|
});
|
3377
3394
|
}
|
3378
3395
|
// Selectively subscribe to activeIds changes
|
3379
3396
|
subscribeToActiveIds(r) {
|
3380
3397
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3381
|
-
|
3398
|
+
ct(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
|
3382
3399
|
});
|
3383
3400
|
}
|
3384
3401
|
// Selectively subscribe to multiple track-related properties
|
3385
3402
|
subscribeToTracks(r) {
|
3386
3403
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3387
|
-
(!
|
3404
|
+
(!ct(n.tracks, this.prevState.tracks) || !ct(n.trackItemIds, this.prevState.trackItemIds) || !ct(n.trackItemsMap, this.prevState.trackItemsMap) || !ct(n.transitionIds, this.prevState.transitionIds) || !ct(n.transitionsMap, this.prevState.transitionsMap) || !ct(
|
3388
3405
|
n.trackItemDetailsMap,
|
3389
3406
|
this.prevState.trackItemDetailsMap
|
3390
|
-
) || !
|
3407
|
+
) || !ct(n.structure, this.prevState.structure)) && r({
|
3391
3408
|
tracks: n.tracks,
|
3392
3409
|
trackItemIds: n.trackItemIds,
|
3393
3410
|
trackItemsMap: n.trackItemsMap,
|
@@ -3407,65 +3424,65 @@ class zs {
|
|
3407
3424
|
trackItemIds: c,
|
3408
3425
|
tracks: d,
|
3409
3426
|
transitionIds: p,
|
3410
|
-
transitionsMap:
|
3411
|
-
trackItemsMap:
|
3412
|
-
} = this.getState(),
|
3427
|
+
transitionsMap: T,
|
3428
|
+
trackItemsMap: x
|
3429
|
+
} = this.getState(), S = Z({
|
3413
3430
|
trackItemDetailsMap: s,
|
3414
3431
|
trackItemIds: c,
|
3415
3432
|
tracks: d,
|
3416
3433
|
transitionIds: p,
|
3417
|
-
transitionsMap:
|
3418
|
-
trackItemsMap:
|
3419
|
-
}),
|
3420
|
-
n.forEach((
|
3421
|
-
let
|
3422
|
-
const H =
|
3423
|
-
|
3434
|
+
transitionsMap: T,
|
3435
|
+
trackItemsMap: x
|
3436
|
+
}), C = [], m = [], M = [], A = [], u = [], f = [];
|
3437
|
+
n.forEach((k) => {
|
3438
|
+
let E;
|
3439
|
+
const H = k.path.slice(1);
|
3440
|
+
k.type === "CREATE" ? E = {
|
3424
3441
|
path: H,
|
3425
3442
|
op: "remove",
|
3426
|
-
value:
|
3427
|
-
} :
|
3443
|
+
value: k.value
|
3444
|
+
} : k.type === "CHANGE" ? E = {
|
3428
3445
|
path: H,
|
3429
3446
|
op: "replace",
|
3430
|
-
value:
|
3431
|
-
} :
|
3447
|
+
value: k.oldValue
|
3448
|
+
} : E = {
|
3432
3449
|
path: H,
|
3433
3450
|
op: "add",
|
3434
|
-
value:
|
3435
|
-
},
|
3451
|
+
value: k.oldValue
|
3452
|
+
}, k.path.includes("trackItemIds") ? M.push(E) : k.path.includes("transitionIds") ? m.push(E) : k.path.includes("trackItemsMap") ? u.push(E) : k.path.includes("transitionsMap") ? A.push(E) : k.path.includes("tracks") ? C.push(E) : k.path.includes("trackItemDetailsMap") && f.push(E);
|
3436
3453
|
});
|
3437
|
-
const
|
3438
|
-
|
3439
|
-
|
3454
|
+
const b = this.applyPatch(
|
3455
|
+
S.tracks,
|
3456
|
+
C
|
3440
3457
|
), y = this.applyPatch(
|
3441
|
-
|
3458
|
+
S.transitionIds,
|
3442
3459
|
m
|
3443
3460
|
), h = this.applyPatch(
|
3444
|
-
|
3461
|
+
S.trackItemIds,
|
3445
3462
|
M
|
3446
3463
|
), g = this.applyPatch(
|
3447
|
-
|
3464
|
+
S.transitionsMap,
|
3448
3465
|
A
|
3449
3466
|
), _ = this.applyPatch(
|
3450
|
-
|
3467
|
+
S.trackItemsMap,
|
3451
3468
|
u
|
3452
|
-
),
|
3453
|
-
|
3469
|
+
), I = this.applyPatch(
|
3470
|
+
S.trackItemDetailsMap,
|
3454
3471
|
f
|
3455
|
-
),
|
3456
|
-
tracks:
|
3472
|
+
), v = Z({
|
3473
|
+
tracks: b,
|
3457
3474
|
transitionIds: y,
|
3458
3475
|
trackItemIds: h,
|
3459
3476
|
transitionsMap: g,
|
3460
3477
|
trackItemsMap: _,
|
3461
|
-
trackItemDetailsMap:
|
3462
|
-
}), U =
|
3478
|
+
trackItemDetailsMap: I
|
3479
|
+
}), U = Z(this.getState()), R = { ...U, ...v };
|
3463
3480
|
this.prevState = U, this.redos.push({ redos: n, type: i });
|
3464
|
-
const
|
3465
|
-
this.stateSubject.next({ ...
|
3481
|
+
const P = re(R.trackItemsMap);
|
3482
|
+
this.stateSubject.next({ ...R, duration: P }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3466
3483
|
}
|
3467
3484
|
applyPatch(r, n) {
|
3468
|
-
return n.reverse().reduce((i, s) =>
|
3485
|
+
return n.reverse().reduce((i, s) => Ta(i, (c) => {
|
3469
3486
|
Ma(c, [s]);
|
3470
3487
|
}), r);
|
3471
3488
|
}
|
@@ -3478,62 +3495,62 @@ class zs {
|
|
3478
3495
|
trackItemIds: c,
|
3479
3496
|
tracks: d,
|
3480
3497
|
transitionIds: p,
|
3481
|
-
transitionsMap:
|
3482
|
-
trackItemsMap:
|
3483
|
-
} = this.getState(),
|
3498
|
+
transitionsMap: T,
|
3499
|
+
trackItemsMap: x
|
3500
|
+
} = this.getState(), S = Z({
|
3484
3501
|
trackItemDetailsMap: s,
|
3485
3502
|
trackItemIds: c,
|
3486
3503
|
tracks: d,
|
3487
3504
|
transitionIds: p,
|
3488
|
-
transitionsMap:
|
3489
|
-
trackItemsMap:
|
3490
|
-
}),
|
3491
|
-
n.forEach((
|
3492
|
-
let
|
3493
|
-
const H =
|
3494
|
-
|
3505
|
+
transitionsMap: T,
|
3506
|
+
trackItemsMap: x
|
3507
|
+
}), C = [], m = [], M = [], A = [], u = [], f = [];
|
3508
|
+
n.forEach((k) => {
|
3509
|
+
let E;
|
3510
|
+
const H = k.path.slice(1);
|
3511
|
+
k.type === "CREATE" ? E = {
|
3495
3512
|
path: H,
|
3496
3513
|
op: "add",
|
3497
|
-
value:
|
3498
|
-
} :
|
3514
|
+
value: k.value
|
3515
|
+
} : k.type === "CHANGE" ? E = {
|
3499
3516
|
path: H,
|
3500
3517
|
op: "replace",
|
3501
|
-
value:
|
3502
|
-
} :
|
3518
|
+
value: k.value
|
3519
|
+
} : E = {
|
3503
3520
|
path: H,
|
3504
3521
|
op: "remove",
|
3505
|
-
value:
|
3506
|
-
},
|
3522
|
+
value: k.oldValue
|
3523
|
+
}, k.path.includes("trackItemIds") ? M.push(E) : k.path.includes("transitionIds") ? m.push(E) : k.path.includes("trackItemsMap") ? u.push(E) : k.path.includes("transitionsMap") ? A.push(E) : k.path.includes("trackItemDetailsMap") ? f.push(E) : C.push(E);
|
3507
3524
|
});
|
3508
|
-
const
|
3509
|
-
|
3510
|
-
|
3525
|
+
const b = this.applyPatch(
|
3526
|
+
S.tracks,
|
3527
|
+
C
|
3511
3528
|
), y = this.applyPatch(
|
3512
|
-
|
3529
|
+
S.transitionIds,
|
3513
3530
|
m
|
3514
3531
|
), h = this.applyPatch(
|
3515
|
-
|
3532
|
+
S.trackItemIds,
|
3516
3533
|
M
|
3517
3534
|
), g = this.applyPatch(
|
3518
|
-
|
3535
|
+
S.transitionsMap,
|
3519
3536
|
A
|
3520
3537
|
), _ = this.applyPatch(
|
3521
|
-
|
3538
|
+
S.trackItemsMap,
|
3522
3539
|
u
|
3523
|
-
),
|
3524
|
-
|
3540
|
+
), I = this.applyPatch(
|
3541
|
+
S.trackItemDetailsMap,
|
3525
3542
|
f
|
3526
|
-
),
|
3527
|
-
tracks:
|
3543
|
+
), v = Z({
|
3544
|
+
tracks: b,
|
3528
3545
|
transitionIds: y,
|
3529
3546
|
trackItemIds: h,
|
3530
3547
|
transitionsMap: g,
|
3531
3548
|
trackItemsMap: _,
|
3532
|
-
trackItemDetailsMap:
|
3533
|
-
}), U =
|
3549
|
+
trackItemDetailsMap: I
|
3550
|
+
}), U = Z(this.getState()), R = { ...U, ...v };
|
3534
3551
|
this.prevState = U, this.undos.push({ undos: n, type: i });
|
3535
|
-
const
|
3536
|
-
this.stateSubject.next({ ...
|
3552
|
+
const P = re(R.trackItemsMap);
|
3553
|
+
this.stateSubject.next({ ...R, duration: P }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3537
3554
|
}
|
3538
3555
|
}
|
3539
3556
|
export {
|
@@ -3550,7 +3567,7 @@ export {
|
|
3550
3567
|
Bi as ADD_ITEMS,
|
3551
3568
|
ps as ADD_MASK,
|
3552
3569
|
ds as ADD_PLACEHOLDER,
|
3553
|
-
|
3570
|
+
bt as ADD_PREFIX,
|
3554
3571
|
cs as ADD_SUFFIX,
|
3555
3572
|
Yi as ADD_TEMPLATE,
|
3556
3573
|
Li as ADD_TEXT,
|
@@ -3558,10 +3575,10 @@ export {
|
|
3558
3575
|
$i as ADD_VIDEO,
|
3559
3576
|
bs as DELETE_TEMPLATE_ITEM,
|
3560
3577
|
ji as DESIGN_LOAD,
|
3561
|
-
|
3578
|
+
Tn as DESIGN_PREFIX,
|
3562
3579
|
Ni as DESIGN_RESIZE,
|
3563
3580
|
Ki as EDIT_OBJECT,
|
3564
|
-
|
3581
|
+
oe as EDIT_PREFIX,
|
3565
3582
|
gs as EDIT_SHAPE,
|
3566
3583
|
Is as EDIT_TEMPLATE_ITEM,
|
3567
3584
|
ys as EDIT_TEXT,
|
@@ -3574,14 +3591,14 @@ export {
|
|
3574
3591
|
Os as LAYER_COPY,
|
3575
3592
|
Rs as LAYER_CUT,
|
3576
3593
|
Qi as LAYER_DELETE,
|
3577
|
-
|
3594
|
+
Ds as LAYER_EDITING_NAME,
|
3578
3595
|
ws as LAYER_HIDDEN,
|
3579
3596
|
ks as LAYER_LOCKED,
|
3580
|
-
|
3597
|
+
Es as LAYER_MOVE,
|
3581
3598
|
Ps as LAYER_PASTE,
|
3582
|
-
|
3583
|
-
|
3584
|
-
|
3599
|
+
ut as LAYER_PREFIX,
|
3600
|
+
xs as LAYER_RENAME,
|
3601
|
+
Ts as LAYER_SELECT,
|
3585
3602
|
Ms as LAYER_SELECTION,
|
3586
3603
|
As as LAYER_SEND_TO,
|
3587
3604
|
Cs as LAYER_SPLIT,
|