@designcombo/state 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +398 -368
- package/dist/index.umd.js +2 -2
- package/package.json +8 -7
package/dist/index.es.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
var ei = Object.defineProperty;
|
2
2
|
var ri = (t, r, n) => r in t ? ei(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
|
3
3
|
var Et = (t, r, n) => ri(t, typeof r != "symbol" ? r + "" : r, n);
|
4
|
-
import { subject as
|
4
|
+
import { subject as We, filter as $e, ADD_PREFIX as ni, HISTORY_PREFIX as ii, ACTIVE_PREFIX as oi, EDIT_PREFIX as si, HISTORY_UNDO as ai, HISTORY_REDO as ci, ADD_TEXT as ui, ADD_IMAGE as fi, ADD_AUDIO as li, ADD_VIDEO as pi, ACTIVE_DELETE as di, EDIT_OBJECT as hi } from "@designcombo/events";
|
5
5
|
var tn = function(t, r) {
|
6
6
|
return tn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, o) {
|
7
7
|
n.__proto__ = o;
|
@@ -86,15 +86,15 @@ var Ze = function() {
|
|
86
86
|
if (f)
|
87
87
|
if (this._parentage = null, Array.isArray(f))
|
88
88
|
try {
|
89
|
-
for (var p = en(f),
|
90
|
-
var _ =
|
89
|
+
for (var p = en(f), w = p.next(); !w.done; w = p.next()) {
|
90
|
+
var _ = w.value;
|
91
91
|
_.remove(this);
|
92
92
|
}
|
93
93
|
} catch (y) {
|
94
94
|
r = { error: y };
|
95
95
|
} finally {
|
96
96
|
try {
|
97
|
-
|
97
|
+
w && !w.done && (n = p.return) && n.call(p);
|
98
98
|
} finally {
|
99
99
|
if (r) throw r.error;
|
100
100
|
}
|
@@ -113,9 +113,9 @@ var Ze = function() {
|
|
113
113
|
this._finalizers = null;
|
114
114
|
try {
|
115
115
|
for (var l = en(E), g = l.next(); !g.done; g = l.next()) {
|
116
|
-
var
|
116
|
+
var v = g.value;
|
117
117
|
try {
|
118
|
-
In(
|
118
|
+
In(v);
|
119
119
|
} catch (y) {
|
120
120
|
u = u ?? [], y instanceof Xr ? u = nn(nn([], rn(u)), rn(y.errors)) : u.push(y);
|
121
121
|
}
|
@@ -197,7 +197,7 @@ function wn() {
|
|
197
197
|
function Ve(t) {
|
198
198
|
t();
|
199
199
|
}
|
200
|
-
var
|
200
|
+
var Wn = function(t) {
|
201
201
|
de(r, t);
|
202
202
|
function r(n) {
|
203
203
|
var o = t.call(this) || this;
|
@@ -286,7 +286,7 @@ var _i = function() {
|
|
286
286
|
return u.destination = new _i(f), u;
|
287
287
|
}
|
288
288
|
return r;
|
289
|
-
}(
|
289
|
+
}(Wn);
|
290
290
|
function Ke(t) {
|
291
291
|
yi(t);
|
292
292
|
}
|
@@ -321,8 +321,8 @@ var Tn = function() {
|
|
321
321
|
}, t.prototype.subscribe = function(r, n, o) {
|
322
322
|
var a = this, u = Ti(r) ? r : new sn(r, n, o);
|
323
323
|
return Ve(function() {
|
324
|
-
var f = a, p = f.operator,
|
325
|
-
u.add(p ? p.call(u,
|
324
|
+
var f = a, p = f.operator, w = f.source;
|
325
|
+
u.add(p ? p.call(u, w) : w ? a._subscribe(u) : a._trySubscribe(u));
|
326
326
|
}), u;
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
328
328
|
try {
|
@@ -337,8 +337,8 @@ var Tn = function() {
|
|
337
337
|
next: function(p) {
|
338
338
|
try {
|
339
339
|
r(p);
|
340
|
-
} catch (
|
341
|
-
u(
|
340
|
+
} catch (w) {
|
341
|
+
u(w), f.unsubscribe();
|
342
342
|
}
|
343
343
|
},
|
344
344
|
error: u,
|
@@ -379,13 +379,13 @@ function wi(t) {
|
|
379
379
|
return t && ht(t.next) && ht(t.error) && ht(t.complete);
|
380
380
|
}
|
381
381
|
function Ti(t) {
|
382
|
-
return t && t instanceof
|
382
|
+
return t && t instanceof Wn || wi(t) && Ln(t);
|
383
383
|
}
|
384
384
|
var Ai = Nn(function(t) {
|
385
385
|
return function() {
|
386
386
|
t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
387
387
|
};
|
388
|
-
}),
|
388
|
+
}), $n = function(t) {
|
389
389
|
de(r, t);
|
390
390
|
function r() {
|
391
391
|
var n = t.call(this) || this;
|
@@ -405,8 +405,8 @@ var Ai = Nn(function(t) {
|
|
405
405
|
o.currentObservers || (o.currentObservers = Array.from(o.observers));
|
406
406
|
try {
|
407
407
|
for (var f = en(o.currentObservers), p = f.next(); !p.done; p = f.next()) {
|
408
|
-
var
|
409
|
-
|
408
|
+
var w = p.value;
|
409
|
+
w.next(n);
|
410
410
|
}
|
411
411
|
} catch (_) {
|
412
412
|
a = { error: _ };
|
@@ -483,7 +483,7 @@ var Ai = Nn(function(t) {
|
|
483
483
|
var o, a;
|
484
484
|
return (a = (o = this.source) === null || o === void 0 ? void 0 : o.subscribe(n)) !== null && a !== void 0 ? a : Un;
|
485
485
|
}, r;
|
486
|
-
}(
|
486
|
+
}($n), On = function(t) {
|
487
487
|
de(r, t);
|
488
488
|
function r(n) {
|
489
489
|
var o = t.call(this) || this;
|
@@ -506,31 +506,31 @@ var Ai = Nn(function(t) {
|
|
506
506
|
}, r.prototype.next = function(n) {
|
507
507
|
t.prototype.next.call(this, this._value = n);
|
508
508
|
}, r;
|
509
|
-
}(
|
509
|
+
}($n), Z = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
510
510
|
function dn(t) {
|
511
511
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
512
512
|
}
|
513
513
|
var Ye = { exports: {} };
|
514
514
|
Ye.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, o = "__lodash_hash_undefined__", a = 1, u = 2, f = 9007199254740991, p = "[object Arguments]",
|
517
|
-
|
518
|
-
var ve = typeof Z == "object" && Z && Z.Object === Object && Z, ar = typeof self == "object" && self && self.Object === Object && self, tt = ve || ar || Function("return this")(), Se = r && !r.nodeType && r, Ie = Se && !0 && t && !t.nodeType && t, Bt = Ie && Ie.exports === Se,
|
516
|
+
var n = 200, o = "__lodash_hash_undefined__", a = 1, u = 2, f = 9007199254740991, p = "[object Arguments]", w = "[object Array]", _ = "[object AsyncFunction]", d = "[object Boolean]", E = "[object Date]", l = "[object Error]", g = "[object Function]", v = "[object GeneratorFunction]", y = "[object Map]", T = "[object Number]", S = "[object Null]", m = "[object Object]", h = "[object Promise]", A = "[object Proxy]", L = "[object RegExp]", F = "[object Set]", j = "[object String]", nt = "[object Symbol]", yt = "[object Undefined]", P = "[object WeakMap]", D = "[object ArrayBuffer]", $ = "[object DataView]", be = "[object Float32Array]", _e = "[object Float64Array]", ge = "[object Int8Array]", er = "[object Int16Array]", rr = "[object Int32Array]", nr = "[object Uint8Array]", ir = "[object Uint8ClampedArray]", C = "[object Uint16Array]", or = "[object Uint32Array]", sr = /[\\^$.*+?()[\]{}|]/g, Q = /^\[object .+?Constructor\]$/, me = /^(?:0|[1-9]\d*)$/, k = {};
|
517
|
+
k[be] = k[_e] = k[ge] = k[er] = k[rr] = k[nr] = k[ir] = k[C] = k[or] = !0, k[p] = k[w] = k[D] = k[d] = k[$] = k[E] = k[l] = k[g] = k[y] = k[T] = k[m] = k[L] = k[F] = k[j] = k[P] = !1;
|
518
|
+
var ve = typeof Z == "object" && Z && Z.Object === Object && Z, ar = typeof self == "object" && self && self.Object === Object && self, tt = ve || ar || Function("return this")(), Se = r && !r.nodeType && r, Ie = Se && !0 && t && !t.nodeType && t, Bt = Ie && Ie.exports === Se, Wt = Bt && ve.process, we = function() {
|
519
519
|
try {
|
520
|
-
return
|
520
|
+
return Wt && Wt.binding && Wt.binding("util");
|
521
521
|
} catch {
|
522
522
|
}
|
523
|
-
}(),
|
523
|
+
}(), $t = we && we.isTypedArray;
|
524
524
|
function Te(e, i) {
|
525
|
-
for (var s = -1, c = e == null ? 0 : e.length,
|
525
|
+
for (var s = -1, c = e == null ? 0 : e.length, I = 0, b = []; ++s < c; ) {
|
526
526
|
var x = e[s];
|
527
|
-
i(x, s, e) && (b[
|
527
|
+
i(x, s, e) && (b[I++] = x);
|
528
528
|
}
|
529
529
|
return b;
|
530
530
|
}
|
531
531
|
function Kt(e, i) {
|
532
|
-
for (var s = -1, c = i.length,
|
533
|
-
e[
|
532
|
+
for (var s = -1, c = i.length, I = e.length; ++s < c; )
|
533
|
+
e[I + s] = i[s];
|
534
534
|
return e;
|
535
535
|
}
|
536
536
|
function Ae(e, i) {
|
@@ -549,7 +549,7 @@ Ye.exports;
|
|
549
549
|
return e(i);
|
550
550
|
};
|
551
551
|
}
|
552
|
-
function
|
552
|
+
function kt(e, i) {
|
553
553
|
return e.has(i);
|
554
554
|
}
|
555
555
|
function Vt(e, i) {
|
@@ -557,8 +557,8 @@ Ye.exports;
|
|
557
557
|
}
|
558
558
|
function Ee(e) {
|
559
559
|
var i = -1, s = Array(e.size);
|
560
|
-
return e.forEach(function(c,
|
561
|
-
s[++i] = [
|
560
|
+
return e.forEach(function(c, I) {
|
561
|
+
s[++i] = [I, c];
|
562
562
|
}), s;
|
563
563
|
}
|
564
564
|
function Oe(e, i) {
|
@@ -572,12 +572,12 @@ Ye.exports;
|
|
572
572
|
s[++i] = c;
|
573
573
|
}), s;
|
574
574
|
}
|
575
|
-
var
|
575
|
+
var Dt = Array.prototype, fr = Function.prototype, mt = Object.prototype, jt = tt["__core-js_shared__"], Yt = fr.toString, J = mt.hasOwnProperty, xe = function() {
|
576
576
|
var e = /[^.]+$/.exec(jt && jt.keys && jt.keys.IE_PROTO || "");
|
577
577
|
return e ? "Symbol(src)_1." + e : "";
|
578
578
|
}(), Pe = mt.toString, lr = RegExp(
|
579
579
|
"^" + Yt.call(J).replace(sr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
580
|
-
), Xt = Bt ? tt.Buffer : void 0, Ft = tt.Symbol, Me = tt.Uint8Array, Rt = mt.propertyIsEnumerable, vt =
|
580
|
+
), Xt = Bt ? tt.Buffer : void 0, Ft = tt.Symbol, Me = tt.Uint8Array, Rt = mt.propertyIsEnumerable, vt = Dt.splice, et = Ft ? Ft.toStringTag : void 0, zt = Object.getOwnPropertySymbols, qt = Xt ? Xt.isBuffer : void 0, St = Oe(Object.keys, Object), Jt = ft(tt, "DataView"), It = ft(tt, "Map"), Zt = ft(tt, "Promise"), Qt = ft(tt, "Set"), te = ft(tt, "WeakMap"), bt = ft(Object, "create"), Ce = K(Jt), ut = K(It), pr = K(Zt), dr = K(Qt), hr = K(te), ke = Ft ? Ft.prototype : void 0, ee = ke ? ke.valueOf : void 0;
|
581
581
|
function N(e) {
|
582
582
|
var i = -1, s = e == null ? 0 : e.length;
|
583
583
|
for (this.clear(); ++i < s; ) {
|
@@ -672,13 +672,13 @@ Ye.exports;
|
|
672
672
|
for (this.__data__ = new V(); ++i < s; )
|
673
673
|
this.add(e[i]);
|
674
674
|
}
|
675
|
-
function
|
675
|
+
function De(e) {
|
676
676
|
return this.__data__.set(e, o), this;
|
677
677
|
}
|
678
678
|
function Nt(e) {
|
679
679
|
return this.__data__.has(e);
|
680
680
|
}
|
681
|
-
Ht.prototype.add = Ht.prototype.push =
|
681
|
+
Ht.prototype.add = Ht.prototype.push = De, Ht.prototype.has = Nt;
|
682
682
|
function ot(e) {
|
683
683
|
var i = this.__data__ = new G(e);
|
684
684
|
this.size = i.size;
|
@@ -693,10 +693,10 @@ Ye.exports;
|
|
693
693
|
function Cr(e) {
|
694
694
|
return this.__data__.get(e);
|
695
695
|
}
|
696
|
-
function
|
696
|
+
function kr(e) {
|
697
697
|
return this.__data__.has(e);
|
698
698
|
}
|
699
|
-
function
|
699
|
+
function Dr(e, i) {
|
700
700
|
var s = this.__data__;
|
701
701
|
if (s instanceof G) {
|
702
702
|
var c = s.__data__;
|
@@ -706,13 +706,13 @@ Ye.exports;
|
|
706
706
|
}
|
707
707
|
return s.set(e, i), this.size = s.size, this;
|
708
708
|
}
|
709
|
-
ot.prototype.clear = re, ot.prototype.delete = Mr, ot.prototype.get = Cr, ot.prototype.has =
|
709
|
+
ot.prototype.clear = re, ot.prototype.delete = Mr, ot.prototype.get = Cr, ot.prototype.has = kr, ot.prototype.set = Dr;
|
710
710
|
function jr(e, i) {
|
711
|
-
var s = Lt(e), c = !s && He(e),
|
711
|
+
var s = Lt(e), c = !s && He(e), I = !s && !c && Gt(e), b = !s && !c && !I && Le(e), x = s || c || I || b, O = x ? cr(e.length, String) : [], R = O.length;
|
712
712
|
for (var M in e)
|
713
713
|
J.call(e, M) && !(x && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
714
|
(M == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
|
-
|
715
|
+
I && (M == "offset" || M == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
716
|
b && (M == "buffer" || M == "byteLength" || M == "byteOffset") || // Skip index properties.
|
717
717
|
Gr(M, R))) && O.push(M);
|
718
718
|
return O;
|
@@ -728,52 +728,52 @@ Ye.exports;
|
|
728
728
|
return Lt(e) ? c : Kt(c, s(e));
|
729
729
|
}
|
730
730
|
function wt(e) {
|
731
|
-
return e == null ? e === void 0 ? yt :
|
731
|
+
return e == null ? e === void 0 ? yt : S : et && et in Object(e) ? lt(e) : Re(e);
|
732
732
|
}
|
733
733
|
function je(e) {
|
734
734
|
return at(e) && wt(e) == p;
|
735
735
|
}
|
736
|
-
function Fe(e, i, s, c,
|
737
|
-
return e === i ? !0 : e == null || i == null || !at(e) && !at(i) ? e !== e && i !== i : Fr(e, i, s, c, Fe,
|
736
|
+
function Fe(e, i, s, c, I) {
|
737
|
+
return e === i ? !0 : e == null || i == null || !at(e) && !at(i) ? e !== e && i !== i : Fr(e, i, s, c, Fe, I);
|
738
738
|
}
|
739
|
-
function Fr(e, i, s, c,
|
740
|
-
var x = Lt(e), O = Lt(i), R = x ?
|
741
|
-
R = R == p ?
|
742
|
-
var B = R ==
|
739
|
+
function Fr(e, i, s, c, I, b) {
|
740
|
+
var x = Lt(e), O = Lt(i), R = x ? w : st(e), M = O ? w : st(i);
|
741
|
+
R = R == p ? m : R, M = M == p ? m : M;
|
742
|
+
var B = R == m, Y = M == m, z = R == M;
|
743
743
|
if (z && Gt(e)) {
|
744
744
|
if (!Gt(i))
|
745
745
|
return !1;
|
746
746
|
x = !0, B = !1;
|
747
747
|
}
|
748
748
|
if (z && !B)
|
749
|
-
return b || (b = new ot()), x || Le(e) ? ie(e, i, s, c,
|
749
|
+
return b || (b = new ot()), x || Le(e) ? ie(e, i, s, c, I, b) : Nr(e, i, R, s, c, I, b);
|
750
750
|
if (!(s & a)) {
|
751
|
-
var
|
752
|
-
if (
|
753
|
-
var _t =
|
754
|
-
return b || (b = new ot()),
|
751
|
+
var W = B && J.call(e, "__wrapped__"), U = Y && J.call(i, "__wrapped__");
|
752
|
+
if (W || U) {
|
753
|
+
var _t = W ? e.value() : e, pt = U ? i.value() : i;
|
754
|
+
return b || (b = new ot()), I(_t, pt, s, c, b);
|
755
755
|
}
|
756
756
|
}
|
757
|
-
return z ? (b || (b = new ot()), Ur(e, i, s, c,
|
757
|
+
return z ? (b || (b = new ot()), Ur(e, i, s, c, I, b)) : !1;
|
758
758
|
}
|
759
759
|
function Rr(e) {
|
760
|
-
if (!Ue(e) ||
|
760
|
+
if (!Ue(e) || Wr(e))
|
761
761
|
return !1;
|
762
762
|
var i = Ne(e) ? lr : Q;
|
763
763
|
return i.test(K(e));
|
764
764
|
}
|
765
765
|
function zr(e) {
|
766
|
-
return at(e) && se(e.length) && !!
|
766
|
+
return at(e) && se(e.length) && !!k[wt(e)];
|
767
767
|
}
|
768
768
|
function Hr(e) {
|
769
|
-
if (
|
769
|
+
if (!$r(e))
|
770
770
|
return St(e);
|
771
771
|
var i = [];
|
772
772
|
for (var s in Object(e))
|
773
773
|
J.call(e, s) && s != "constructor" && i.push(s);
|
774
774
|
return i;
|
775
775
|
}
|
776
|
-
function ie(e, i, s, c,
|
776
|
+
function ie(e, i, s, c, I, b) {
|
777
777
|
var x = s & a, O = e.length, R = i.length;
|
778
778
|
if (O != R && !(x && R > O))
|
779
779
|
return !1;
|
@@ -782,9 +782,9 @@ Ye.exports;
|
|
782
782
|
return M == i;
|
783
783
|
var B = -1, Y = !0, z = s & u ? new Ht() : void 0;
|
784
784
|
for (b.set(e, i), b.set(i, e); ++B < O; ) {
|
785
|
-
var
|
785
|
+
var W = e[B], U = i[B];
|
786
786
|
if (c)
|
787
|
-
var _t = x ? c(U,
|
787
|
+
var _t = x ? c(U, W, B, i, e, b) : c(W, U, B, e, i, b);
|
788
788
|
if (_t !== void 0) {
|
789
789
|
if (_t)
|
790
790
|
continue;
|
@@ -793,30 +793,30 @@ Ye.exports;
|
|
793
793
|
}
|
794
794
|
if (z) {
|
795
795
|
if (!Ae(i, function(pt, At) {
|
796
|
-
if (!
|
796
|
+
if (!kt(z, At) && (W === pt || I(W, pt, s, c, b)))
|
797
797
|
return z.push(At);
|
798
798
|
})) {
|
799
799
|
Y = !1;
|
800
800
|
break;
|
801
801
|
}
|
802
|
-
} else if (!(
|
802
|
+
} else if (!(W === U || I(W, U, s, c, b))) {
|
803
803
|
Y = !1;
|
804
804
|
break;
|
805
805
|
}
|
806
806
|
}
|
807
807
|
return b.delete(e), b.delete(i), Y;
|
808
808
|
}
|
809
|
-
function Nr(e, i, s, c,
|
809
|
+
function Nr(e, i, s, c, I, b, x) {
|
810
810
|
switch (s) {
|
811
|
-
case
|
811
|
+
case $:
|
812
812
|
if (e.byteLength != i.byteLength || e.byteOffset != i.byteOffset)
|
813
813
|
return !1;
|
814
814
|
e = e.buffer, i = i.buffer;
|
815
|
-
case
|
815
|
+
case D:
|
816
816
|
return !(e.byteLength != i.byteLength || !b(new Me(e), new Me(i)));
|
817
817
|
case d:
|
818
818
|
case E:
|
819
|
-
case
|
819
|
+
case T:
|
820
820
|
return ze(+e, +i);
|
821
821
|
case l:
|
822
822
|
return e.name == i.name && e.message == i.message;
|
@@ -833,7 +833,7 @@ Ye.exports;
|
|
833
833
|
if (M)
|
834
834
|
return M == i;
|
835
835
|
c |= u, x.set(e, i);
|
836
|
-
var B = ie(O(e), O(i), c,
|
836
|
+
var B = ie(O(e), O(i), c, I, b, x);
|
837
837
|
return x.delete(e), B;
|
838
838
|
case nt:
|
839
839
|
if (ee)
|
@@ -841,7 +841,7 @@ Ye.exports;
|
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function Ur(e, i, s, c,
|
844
|
+
function Ur(e, i, s, c, I, b) {
|
845
845
|
var x = s & a, O = Tt(e), R = O.length, M = Tt(i), B = M.length;
|
846
846
|
if (R != B && !x)
|
847
847
|
return !1;
|
@@ -850,9 +850,9 @@ Ye.exports;
|
|
850
850
|
if (!(x ? z in i : J.call(i, z)))
|
851
851
|
return !1;
|
852
852
|
}
|
853
|
-
var
|
854
|
-
if (
|
855
|
-
return
|
853
|
+
var W = b.get(e);
|
854
|
+
if (W && b.get(i))
|
855
|
+
return W == i;
|
856
856
|
var U = !0;
|
857
857
|
b.set(e, i), b.set(i, e);
|
858
858
|
for (var _t = x; ++Y < R; ) {
|
@@ -860,7 +860,7 @@ Ye.exports;
|
|
860
860
|
var pt = e[z], At = i[z];
|
861
861
|
if (c)
|
862
862
|
var Sn = x ? c(At, pt, z, i, e, b) : c(pt, At, z, e, i, b);
|
863
|
-
if (!(Sn === void 0 ? pt === At ||
|
863
|
+
if (!(Sn === void 0 ? pt === At || I(pt, At, s, c, b) : Sn)) {
|
864
864
|
U = !1;
|
865
865
|
break;
|
866
866
|
}
|
@@ -890,24 +890,24 @@ Ye.exports;
|
|
890
890
|
var c = !0;
|
891
891
|
} catch {
|
892
892
|
}
|
893
|
-
var
|
894
|
-
return c && (i ? e[et] = s : delete e[et]),
|
893
|
+
var I = Pe.call(e);
|
894
|
+
return c && (i ? e[et] = s : delete e[et]), I;
|
895
895
|
}
|
896
896
|
var Lr = zt ? function(e) {
|
897
897
|
return e == null ? [] : (e = Object(e), Te(zt(e), function(i) {
|
898
898
|
return Rt.call(e, i);
|
899
899
|
}));
|
900
900
|
} : Vr, st = wt;
|
901
|
-
(Jt && st(new Jt(new ArrayBuffer(1))) !=
|
902
|
-
var i = wt(e), s = i ==
|
901
|
+
(Jt && st(new Jt(new ArrayBuffer(1))) != $ || It && st(new It()) != y || Zt && st(Zt.resolve()) != h || Qt && st(new Qt()) != F || te && st(new te()) != P) && (st = function(e) {
|
902
|
+
var i = wt(e), s = i == m ? e.constructor : void 0, c = s ? K(s) : "";
|
903
903
|
if (c)
|
904
904
|
switch (c) {
|
905
905
|
case Ce:
|
906
|
-
return
|
906
|
+
return $;
|
907
907
|
case ut:
|
908
908
|
return y;
|
909
909
|
case pr:
|
910
|
-
return
|
910
|
+
return h;
|
911
911
|
case dr:
|
912
912
|
return F;
|
913
913
|
case hr:
|
@@ -922,10 +922,10 @@ Ye.exports;
|
|
922
922
|
var i = typeof e;
|
923
923
|
return i == "string" || i == "number" || i == "symbol" || i == "boolean" ? e !== "__proto__" : e === null;
|
924
924
|
}
|
925
|
-
function
|
925
|
+
function Wr(e) {
|
926
926
|
return !!xe && xe in e;
|
927
927
|
}
|
928
|
-
function
|
928
|
+
function $r(e) {
|
929
929
|
var i = e && e.constructor, s = typeof i == "function" && i.prototype || mt;
|
930
930
|
return e === s;
|
931
931
|
}
|
@@ -964,7 +964,7 @@ Ye.exports;
|
|
964
964
|
if (!Ue(e))
|
965
965
|
return !1;
|
966
966
|
var i = wt(e);
|
967
|
-
return i == g || i ==
|
967
|
+
return i == g || i == v || i == _ || i == A;
|
968
968
|
}
|
969
969
|
function se(e) {
|
970
970
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= f;
|
@@ -976,7 +976,7 @@ Ye.exports;
|
|
976
976
|
function at(e) {
|
977
977
|
return e != null && typeof e == "object";
|
978
978
|
}
|
979
|
-
var Le =
|
979
|
+
var Le = $t ? ur($t) : zr;
|
980
980
|
function ae(e) {
|
981
981
|
return oe(e) ? jr(e) : Hr(e);
|
982
982
|
}
|
@@ -993,9 +993,9 @@ const ct = /* @__PURE__ */ dn(Ei);
|
|
993
993
|
var Xe = { exports: {} };
|
994
994
|
Xe.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, o = "__lodash_hash_undefined__", a = 9007199254740991, u = "[object Arguments]", f = "[object Array]", p = "[object Boolean]",
|
997
|
-
C[u] = C[f] = C[L] = C[F] = C[p] = C[
|
998
|
-
var or = typeof Z == "object" && Z && Z.Object === Object && Z, sr = typeof self == "object" && self && self.Object === Object && self, Q = or || sr || Function("return this")(), me = r && !r.nodeType && r,
|
996
|
+
var n = 200, o = "__lodash_hash_undefined__", a = 9007199254740991, u = "[object Arguments]", f = "[object Array]", p = "[object Boolean]", w = "[object Date]", _ = "[object Error]", d = "[object Function]", E = "[object GeneratorFunction]", l = "[object Map]", g = "[object Number]", v = "[object Object]", y = "[object Promise]", T = "[object RegExp]", S = "[object Set]", m = "[object String]", h = "[object Symbol]", A = "[object WeakMap]", L = "[object ArrayBuffer]", F = "[object DataView]", j = "[object Float32Array]", nt = "[object Float64Array]", yt = "[object Int8Array]", P = "[object Int16Array]", D = "[object Int32Array]", $ = "[object Uint8Array]", be = "[object Uint8ClampedArray]", _e = "[object Uint16Array]", ge = "[object Uint32Array]", er = /[\\^$.*+?()[\]{}|]/g, rr = /\w*$/, nr = /^\[object .+?Constructor\]$/, ir = /^(?:0|[1-9]\d*)$/, C = {};
|
997
|
+
C[u] = C[f] = C[L] = C[F] = C[p] = C[w] = C[j] = C[nt] = C[yt] = C[P] = C[D] = C[l] = C[g] = C[v] = C[T] = C[S] = C[m] = C[h] = C[$] = C[be] = C[_e] = C[ge] = !0, C[_] = C[d] = C[A] = !1;
|
998
|
+
var or = typeof Z == "object" && Z && Z.Object === Object && Z, sr = typeof self == "object" && self && self.Object === Object && self, Q = or || sr || Function("return this")(), me = r && !r.nodeType && r, k = me && !0 && t && !t.nodeType && t, ve = k && k.exports === me;
|
999
999
|
function ar(e, i) {
|
1000
1000
|
return e.set(i[0], i[1]), e;
|
1001
1001
|
}
|
@@ -1008,16 +1008,16 @@ Xe.exports;
|
|
1008
1008
|
return e;
|
1009
1009
|
}
|
1010
1010
|
function Ie(e, i) {
|
1011
|
-
for (var s = -1, c = i.length,
|
1012
|
-
e[
|
1011
|
+
for (var s = -1, c = i.length, I = e.length; ++s < c; )
|
1012
|
+
e[I + s] = i[s];
|
1013
1013
|
return e;
|
1014
1014
|
}
|
1015
1015
|
function Bt(e, i, s, c) {
|
1016
|
-
for (var
|
1017
|
-
s = i(s, e[
|
1016
|
+
for (var I = -1, b = e ? e.length : 0; ++I < b; )
|
1017
|
+
s = i(s, e[I], I, e);
|
1018
1018
|
return s;
|
1019
1019
|
}
|
1020
|
-
function
|
1020
|
+
function Wt(e, i) {
|
1021
1021
|
for (var s = -1, c = Array(e); ++s < e; )
|
1022
1022
|
c[s] = i(s);
|
1023
1023
|
return c;
|
@@ -1025,7 +1025,7 @@ Xe.exports;
|
|
1025
1025
|
function we(e, i) {
|
1026
1026
|
return e == null ? void 0 : e[i];
|
1027
1027
|
}
|
1028
|
-
function
|
1028
|
+
function $t(e) {
|
1029
1029
|
var i = !1;
|
1030
1030
|
if (e != null && typeof e.toString != "function")
|
1031
1031
|
try {
|
@@ -1036,8 +1036,8 @@ Xe.exports;
|
|
1036
1036
|
}
|
1037
1037
|
function Te(e) {
|
1038
1038
|
var i = -1, s = Array(e.size);
|
1039
|
-
return e.forEach(function(c,
|
1040
|
-
s[++i] = [
|
1039
|
+
return e.forEach(function(c, I) {
|
1040
|
+
s[++i] = [I, c];
|
1041
1041
|
}), s;
|
1042
1042
|
}
|
1043
1043
|
function Kt(e, i) {
|
@@ -1051,12 +1051,12 @@ Xe.exports;
|
|
1051
1051
|
s[++i] = c;
|
1052
1052
|
}), s;
|
1053
1053
|
}
|
1054
|
-
var cr = Array.prototype, ur = Function.prototype,
|
1054
|
+
var cr = Array.prototype, ur = Function.prototype, kt = Object.prototype, Vt = Q["__core-js_shared__"], Ee = function() {
|
1055
1055
|
var e = /[^.]+$/.exec(Vt && Vt.keys && Vt.keys.IE_PROTO || "");
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
1057
|
-
}(), Oe = ur.toString, it =
|
1057
|
+
}(), Oe = ur.toString, it = kt.hasOwnProperty, Dt = kt.toString, fr = RegExp(
|
1058
1058
|
"^" + Oe.call(it).replace(er, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
1059
|
-
), mt = ve ? Q.Buffer : void 0, jt = Q.Symbol, Yt = Q.Uint8Array, J = Kt(Object.getPrototypeOf, Object), xe = Object.create, Pe =
|
1059
|
+
), mt = ve ? Q.Buffer : void 0, jt = Q.Symbol, Yt = Q.Uint8Array, J = Kt(Object.getPrototypeOf, Object), xe = Object.create, Pe = kt.propertyIsEnumerable, lr = cr.splice, Xt = Object.getOwnPropertySymbols, Ft = mt ? mt.isBuffer : void 0, Me = Kt(Object.keys, Object), Rt = rt(Q, "DataView"), vt = rt(Q, "Map"), et = rt(Q, "Promise"), zt = rt(Q, "Set"), qt = rt(Q, "WeakMap"), St = rt(Object, "create"), Jt = K(Rt), It = K(vt), Zt = K(et), Qt = K(zt), te = K(qt), bt = jt ? jt.prototype : void 0, Ce = bt ? bt.valueOf : void 0;
|
1060
1060
|
function ut(e) {
|
1061
1061
|
var i = -1, s = e ? e.length : 0;
|
1062
1062
|
for (this.clear(); ++i < s; ) {
|
@@ -1078,7 +1078,7 @@ Xe.exports;
|
|
1078
1078
|
}
|
1079
1079
|
return it.call(i, e) ? i[e] : void 0;
|
1080
1080
|
}
|
1081
|
-
function
|
1081
|
+
function ke(e) {
|
1082
1082
|
var i = this.__data__;
|
1083
1083
|
return St ? i[e] !== void 0 : it.call(i, e);
|
1084
1084
|
}
|
@@ -1086,7 +1086,7 @@ Xe.exports;
|
|
1086
1086
|
var s = this.__data__;
|
1087
1087
|
return s[e] = St && i === void 0 ? o : i, this;
|
1088
1088
|
}
|
1089
|
-
ut.prototype.clear = pr, ut.prototype.delete = dr, ut.prototype.get = hr, ut.prototype.has =
|
1089
|
+
ut.prototype.clear = pr, ut.prototype.delete = dr, ut.prototype.get = hr, ut.prototype.has = ke, ut.prototype.set = ee;
|
1090
1090
|
function N(e) {
|
1091
1091
|
var i = -1, s = e ? e.length : 0;
|
1092
1092
|
for (this.clear(); ++i < s; ) {
|
@@ -1170,12 +1170,12 @@ Xe.exports;
|
|
1170
1170
|
}
|
1171
1171
|
V.prototype.clear = Ar, V.prototype.delete = Er, V.prototype.get = Or, V.prototype.has = xr, V.prototype.set = Pr;
|
1172
1172
|
function Ht(e, i) {
|
1173
|
-
var s = oe(e) || Lt(e) ?
|
1173
|
+
var s = oe(e) || Lt(e) ? Wt(e.length, String) : [], c = s.length, I = !!c;
|
1174
1174
|
for (var b in e)
|
1175
|
-
it.call(e, b) && !(
|
1175
|
+
it.call(e, b) && !(I && (b == "length" || Br(b, c))) && s.push(b);
|
1176
1176
|
return s;
|
1177
1177
|
}
|
1178
|
-
function
|
1178
|
+
function De(e, i, s) {
|
1179
1179
|
var c = e[i];
|
1180
1180
|
(!(it.call(e, i) && He(c, s)) || s === void 0 && !(i in e)) && (e[i] = s);
|
1181
1181
|
}
|
@@ -1188,9 +1188,9 @@ Xe.exports;
|
|
1188
1188
|
function ot(e, i) {
|
1189
1189
|
return e && ie(i, ae(i), e);
|
1190
1190
|
}
|
1191
|
-
function re(e, i, s, c,
|
1191
|
+
function re(e, i, s, c, I, b, x) {
|
1192
1192
|
var O;
|
1193
|
-
if (c && (O = b ? c(e,
|
1193
|
+
if (c && (O = b ? c(e, I, b, x) : c(e)), O !== void 0)
|
1194
1194
|
return O;
|
1195
1195
|
if (!at(e))
|
1196
1196
|
return e;
|
@@ -1202,8 +1202,8 @@ Xe.exports;
|
|
1202
1202
|
var M = lt(e), B = M == d || M == E;
|
1203
1203
|
if (Ne(e))
|
1204
1204
|
return Ut(e, i);
|
1205
|
-
if (M ==
|
1206
|
-
if (
|
1205
|
+
if (M == v || M == u || B && !b) {
|
1206
|
+
if ($t(e))
|
1207
1207
|
return b ? e : {};
|
1208
1208
|
if (O = st(B ? {} : e), !i)
|
1209
1209
|
return Nr(e, ot(O, e));
|
@@ -1219,8 +1219,8 @@ Xe.exports;
|
|
1219
1219
|
return Y;
|
1220
1220
|
if (x.set(e, O), !R)
|
1221
1221
|
var z = s ? Ur(e) : ae(e);
|
1222
|
-
return Se(z || e, function(
|
1223
|
-
z && (U =
|
1222
|
+
return Se(z || e, function(W, U) {
|
1223
|
+
z && (U = W, W = e[U]), De(O, U, re(W, i, s, c, U, e, x));
|
1224
1224
|
}), O;
|
1225
1225
|
}
|
1226
1226
|
function Mr(e) {
|
@@ -1230,13 +1230,13 @@ Xe.exports;
|
|
1230
1230
|
var c = i(e);
|
1231
1231
|
return oe(e) ? c : Ie(c, s(e));
|
1232
1232
|
}
|
1233
|
-
function Dr(e) {
|
1234
|
-
return kt.call(e);
|
1235
|
-
}
|
1236
1233
|
function kr(e) {
|
1237
|
-
|
1234
|
+
return Dt.call(e);
|
1235
|
+
}
|
1236
|
+
function Dr(e) {
|
1237
|
+
if (!at(e) || $r(e))
|
1238
1238
|
return !1;
|
1239
|
-
var i = se(e) ||
|
1239
|
+
var i = se(e) || $t(e) ? fr : nr;
|
1240
1240
|
return i.test(K(e));
|
1241
1241
|
}
|
1242
1242
|
function jr(e) {
|
@@ -1288,9 +1288,9 @@ Xe.exports;
|
|
1288
1288
|
}
|
1289
1289
|
function ie(e, i, s, c) {
|
1290
1290
|
s || (s = {});
|
1291
|
-
for (var
|
1292
|
-
var x = i[
|
1293
|
-
|
1291
|
+
for (var I = -1, b = i.length; ++I < b; ) {
|
1292
|
+
var x = i[I], O = void 0;
|
1293
|
+
De(s, x, O === void 0 ? e[x] : O);
|
1294
1294
|
}
|
1295
1295
|
return s;
|
1296
1296
|
}
|
@@ -1302,15 +1302,15 @@ Xe.exports;
|
|
1302
1302
|
}
|
1303
1303
|
function Tt(e, i) {
|
1304
1304
|
var s = e.__data__;
|
1305
|
-
return
|
1305
|
+
return Wr(i) ? s[typeof i == "string" ? "string" : "hash"] : s.map;
|
1306
1306
|
}
|
1307
1307
|
function rt(e, i) {
|
1308
1308
|
var s = we(e, i);
|
1309
|
-
return
|
1309
|
+
return Dr(s) ? s : void 0;
|
1310
1310
|
}
|
1311
|
-
var ft = Xt ? Kt(Xt, Object) : Vr, lt =
|
1312
|
-
(Rt && lt(new Rt(new ArrayBuffer(1))) != F || vt && lt(new vt()) != l || et && lt(et.resolve()) != y || zt && lt(new zt()) !=
|
1313
|
-
var i =
|
1311
|
+
var ft = Xt ? Kt(Xt, Object) : Vr, lt = kr;
|
1312
|
+
(Rt && lt(new Rt(new ArrayBuffer(1))) != F || vt && lt(new vt()) != l || et && lt(et.resolve()) != y || zt && lt(new zt()) != S || qt && lt(new qt()) != A) && (lt = function(e) {
|
1313
|
+
var i = Dt.call(e), s = i == v ? e.constructor : void 0, c = s ? K(s) : void 0;
|
1314
1314
|
if (c)
|
1315
1315
|
switch (c) {
|
1316
1316
|
case Jt:
|
@@ -1320,7 +1320,7 @@ Xe.exports;
|
|
1320
1320
|
case Zt:
|
1321
1321
|
return y;
|
1322
1322
|
case Qt:
|
1323
|
-
return
|
1323
|
+
return S;
|
1324
1324
|
case te:
|
1325
1325
|
return A;
|
1326
1326
|
}
|
@@ -1334,21 +1334,21 @@ Xe.exports;
|
|
1334
1334
|
return typeof e.constructor == "function" && !Re(e) ? Mr(J(e)) : {};
|
1335
1335
|
}
|
1336
1336
|
function Gr(e, i, s, c) {
|
1337
|
-
var
|
1337
|
+
var I = e.constructor;
|
1338
1338
|
switch (i) {
|
1339
1339
|
case L:
|
1340
1340
|
return ne(e);
|
1341
1341
|
case p:
|
1342
|
-
case
|
1343
|
-
return new
|
1342
|
+
case w:
|
1343
|
+
return new I(+e);
|
1344
1344
|
case F:
|
1345
1345
|
return wt(e, c);
|
1346
1346
|
case j:
|
1347
1347
|
case nt:
|
1348
1348
|
case yt:
|
1349
1349
|
case P:
|
1350
|
-
case
|
1351
|
-
case
|
1350
|
+
case D:
|
1351
|
+
case $:
|
1352
1352
|
case be:
|
1353
1353
|
case _e:
|
1354
1354
|
case ge:
|
@@ -1356,28 +1356,28 @@ Xe.exports;
|
|
1356
1356
|
case l:
|
1357
1357
|
return je(e, c, s);
|
1358
1358
|
case g:
|
1359
|
-
case
|
1360
|
-
return new
|
1361
|
-
case
|
1359
|
+
case m:
|
1360
|
+
return new I(e);
|
1361
|
+
case T:
|
1362
1362
|
return Fe(e);
|
1363
|
-
case v:
|
1364
|
-
return Fr(e, c, s);
|
1365
1363
|
case S:
|
1364
|
+
return Fr(e, c, s);
|
1365
|
+
case h:
|
1366
1366
|
return Rr(e);
|
1367
1367
|
}
|
1368
1368
|
}
|
1369
1369
|
function Br(e, i) {
|
1370
1370
|
return i = i ?? a, !!i && (typeof e == "number" || ir.test(e)) && e > -1 && e % 1 == 0 && e < i;
|
1371
1371
|
}
|
1372
|
-
function
|
1372
|
+
function Wr(e) {
|
1373
1373
|
var i = typeof e;
|
1374
1374
|
return i == "string" || i == "number" || i == "symbol" || i == "boolean" ? e !== "__proto__" : e === null;
|
1375
1375
|
}
|
1376
|
-
function
|
1376
|
+
function $r(e) {
|
1377
1377
|
return !!Ee && Ee in e;
|
1378
1378
|
}
|
1379
1379
|
function Re(e) {
|
1380
|
-
var i = e && e.constructor, s = typeof i == "function" && i.prototype ||
|
1380
|
+
var i = e && e.constructor, s = typeof i == "function" && i.prototype || kt;
|
1381
1381
|
return e === s;
|
1382
1382
|
}
|
1383
1383
|
function K(e) {
|
@@ -1400,7 +1400,7 @@ Xe.exports;
|
|
1400
1400
|
return e === i || e !== e && i !== i;
|
1401
1401
|
}
|
1402
1402
|
function Lt(e) {
|
1403
|
-
return Kr(e) && it.call(e, "callee") && (!Pe.call(e, "callee") ||
|
1403
|
+
return Kr(e) && it.call(e, "callee") && (!Pe.call(e, "callee") || Dt.call(e) == u);
|
1404
1404
|
}
|
1405
1405
|
var oe = Array.isArray;
|
1406
1406
|
function Gt(e) {
|
@@ -1411,7 +1411,7 @@ Xe.exports;
|
|
1411
1411
|
}
|
1412
1412
|
var Ne = Ft || Yr;
|
1413
1413
|
function se(e) {
|
1414
|
-
var i = at(e) ?
|
1414
|
+
var i = at(e) ? Dt.call(e) : "";
|
1415
1415
|
return i == d || i == E;
|
1416
1416
|
}
|
1417
1417
|
function Ue(e) {
|
@@ -1469,7 +1469,7 @@ const dt = /* @__PURE__ */ dn(Oi), xi = (t) => {
|
|
1469
1469
|
}), o.addEventListener("error", (a) => {
|
1470
1470
|
n(a);
|
1471
1471
|
}), o.src = t, o.load();
|
1472
|
-
}),
|
1472
|
+
}), ki = (t, r) => {
|
1473
1473
|
const n = document.createElement("div");
|
1474
1474
|
Object.keys(r).forEach((a) => {
|
1475
1475
|
a !== "height" && (n.style[a] = r[a]);
|
@@ -1481,12 +1481,33 @@ const dt = /* @__PURE__ */ dn(Oi), xi = (t) => {
|
|
1481
1481
|
x: 0,
|
1482
1482
|
y: 0,
|
1483
1483
|
blur: 0
|
1484
|
-
}, Qe = (t, r) =>
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1484
|
+
}, Qe = (t, r) => {
|
1485
|
+
const n = (r == null ? void 0 : r.duration) || 5e3, o = {
|
1486
|
+
from: 0,
|
1487
|
+
to: n
|
1488
|
+
};
|
1489
|
+
if (!t)
|
1490
|
+
return o;
|
1491
|
+
if (t.from < 0)
|
1492
|
+
return console.error(
|
1493
|
+
"'from' must be a non-negative number. Returning default display."
|
1494
|
+
), o;
|
1495
|
+
if (t.from !== void 0 && t.to === void 0)
|
1496
|
+
return {
|
1497
|
+
from: t.from,
|
1498
|
+
to: t.from + n
|
1499
|
+
};
|
1500
|
+
if (t.to !== void 0) {
|
1501
|
+
if (t.to < 0)
|
1502
|
+
return console.error(
|
1503
|
+
"'to' must be a non-negative number. Returning default display."
|
1504
|
+
), o;
|
1505
|
+
if (t.to < t.from)
|
1506
|
+
return console.error(
|
1507
|
+
"'to' must be greater than or equal to 'from'. Returning default display."
|
1508
|
+
), o;
|
1509
|
+
}
|
1510
|
+
return t;
|
1490
1511
|
}, Kn = (t, r) => t ? t.from && !t.to ? {
|
1491
1512
|
from: t.from,
|
1492
1513
|
to: r.duration
|
@@ -1508,7 +1529,7 @@ function yn(t, r) {
|
|
1508
1529
|
transform: `scale(${a})`
|
1509
1530
|
};
|
1510
1531
|
}
|
1511
|
-
const
|
1532
|
+
const Di = async (t, r) => {
|
1512
1533
|
const n = t.details.src, o = await Ci(n), a = yn(r, {
|
1513
1534
|
...o
|
1514
1535
|
}), u = {
|
@@ -1600,7 +1621,7 @@ const ki = async (t, r) => {
|
|
1600
1621
|
url: t.details.fontUrl
|
1601
1622
|
}
|
1602
1623
|
]);
|
1603
|
-
const o = t.details, a = zi(o), u =
|
1624
|
+
const o = t.details, a = zi(o), u = ki(t.details.text, a), f = yn(r, {
|
1604
1625
|
width: a.width,
|
1605
1626
|
height: u
|
1606
1627
|
});
|
@@ -1664,80 +1685,89 @@ const ki = async (t, r) => {
|
|
1664
1685
|
WebkitTextStrokeWidth: t.WebkitTextStrokeWidth || "0px",
|
1665
1686
|
top: t.top || "0px",
|
1666
1687
|
left: t.left || "0px"
|
1667
|
-
}),
|
1688
|
+
}), Hi = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
1689
|
+
let Ni = (t = 21) => {
|
1690
|
+
let r = "", n = crypto.getRandomValues(new Uint8Array(t));
|
1691
|
+
for (; t--; )
|
1692
|
+
r += Hi[n[t] & 63];
|
1693
|
+
return r;
|
1694
|
+
};
|
1695
|
+
const xn = (t) => Object.keys(t).reduce((r, n) => {
|
1668
1696
|
const { display: o } = t[n];
|
1669
1697
|
return Math.max(r, o.to);
|
1670
1698
|
}, 0);
|
1671
|
-
function
|
1699
|
+
function Ui(t, r) {
|
1672
1700
|
return t.map((n) => ({
|
1673
1701
|
...n,
|
1674
1702
|
items: n.items.filter((o) => !r.includes(o))
|
1675
1703
|
}));
|
1676
1704
|
}
|
1677
|
-
function
|
1678
|
-
const r =
|
1679
|
-
|
1680
|
-
), n =
|
1681
|
-
|
1682
|
-
), o =
|
1683
|
-
|
1684
|
-
), a =
|
1685
|
-
|
1705
|
+
function Li(t) {
|
1706
|
+
const r = We.pipe(
|
1707
|
+
$e(({ key: _ }) => _.startsWith(ni))
|
1708
|
+
), n = We.pipe(
|
1709
|
+
$e(({ key: _ }) => _.startsWith(ii))
|
1710
|
+
), o = We.pipe(
|
1711
|
+
$e(({ key: _ }) => _.startsWith(oi))
|
1712
|
+
), a = We.pipe(
|
1713
|
+
$e(({ key: _ }) => _.startsWith(si))
|
1686
1714
|
), u = n.subscribe((_) => {
|
1687
1715
|
if (_.key === ai) return t.undo();
|
1688
1716
|
if (_.key === ci) return t.redo();
|
1689
1717
|
}), f = r.subscribe(async (_) => {
|
1690
|
-
var l, g,
|
1718
|
+
var l, g, v, y, T;
|
1691
1719
|
const d = dt(t.getState());
|
1692
1720
|
if (_.key === ui) {
|
1693
|
-
const
|
1721
|
+
const S = await Ri((l = _.value) == null ? void 0 : l.payload, {
|
1694
1722
|
size: {
|
1695
1723
|
width: 1080,
|
1696
1724
|
height: 1920
|
1697
1725
|
}
|
1698
|
-
}), { details:
|
1726
|
+
}), { details: m, ...h } = S;
|
1699
1727
|
d.trackItemDetailsMap[h.id] = {
|
1700
1728
|
type: "text",
|
1701
|
-
details:
|
1729
|
+
details: m
|
1702
1730
|
}, d.trackItemsMap[h.id] = h, d.trackItemIds.push(h.id);
|
1703
1731
|
}
|
1704
1732
|
if (_.key === fi) {
|
1705
|
-
const
|
1733
|
+
const S = await Fi((g = _.value) == null ? void 0 : g.payload, {
|
1706
1734
|
size: {
|
1707
1735
|
width: 1080,
|
1708
1736
|
height: 1920
|
1709
1737
|
}
|
1710
|
-
}), { details:
|
1738
|
+
}), { details: m, ...h } = S;
|
1711
1739
|
d.trackItemDetailsMap[h.id] = {
|
1712
1740
|
type: "image",
|
1713
|
-
details:
|
1741
|
+
details: m
|
1714
1742
|
}, d.trackItemsMap[h.id] = h, d.trackItemIds.push(h.id);
|
1715
1743
|
}
|
1716
1744
|
if (_.key === li) {
|
1717
|
-
const
|
1745
|
+
const S = await ji((v = _.value) == null ? void 0 : v.payload), { details: m, ...h } = S;
|
1718
1746
|
d.trackItemDetailsMap[h.id] = {
|
1719
1747
|
type: "audio",
|
1720
|
-
details:
|
1748
|
+
details: m
|
1721
1749
|
}, d.trackItemsMap[h.id] = h, d.trackItemIds.push(h.id);
|
1722
1750
|
}
|
1723
1751
|
if (_.key === pi) {
|
1724
|
-
const
|
1752
|
+
const S = await Di((y = _.value) == null ? void 0 : y.payload, {
|
1725
1753
|
size: {
|
1726
1754
|
width: 1080,
|
1727
1755
|
height: 1920
|
1728
1756
|
}
|
1729
|
-
}), { details:
|
1757
|
+
}), { details: m, ...h } = S;
|
1730
1758
|
d.trackItemDetailsMap[h.id] = {
|
1731
1759
|
type: "video",
|
1732
|
-
details:
|
1760
|
+
details: m
|
1733
1761
|
}, d.trackItemsMap[h.id] = h, d.trackItemIds.push(h.id);
|
1734
1762
|
}
|
1763
|
+
d.tracks.unshift({ id: Ni(), accepts: ["text", "audio", "helper", "video", "image"], type: "text", items: [(T = _.value) == null ? void 0 : T.payload.id], magnetic: !1, static: !1 });
|
1735
1764
|
const E = xn(d.trackItemsMap);
|
1736
1765
|
t.updateState(
|
1737
1766
|
{
|
1738
1767
|
trackItemIds: d.trackItemIds,
|
1739
1768
|
trackItemDetailsMap: { ...d.trackItemDetailsMap },
|
1740
1769
|
trackItemsMap: { ...d.trackItemsMap },
|
1770
|
+
tracks: d.tracks,
|
1741
1771
|
duration: E
|
1742
1772
|
},
|
1743
1773
|
{
|
@@ -1747,37 +1777,37 @@ function Ni(t) {
|
|
1747
1777
|
);
|
1748
1778
|
}), p = o.subscribe((_) => {
|
1749
1779
|
if (_.key === di) {
|
1750
|
-
const d = dt(t.getState()), E = d.activeIds, l = d.trackItemIds, g = d.trackItemDetailsMap,
|
1751
|
-
(
|
1780
|
+
const d = dt(t.getState()), E = d.activeIds, l = d.trackItemIds, g = d.trackItemDetailsMap, v = l.filter(
|
1781
|
+
(m) => !E.includes(m)
|
1752
1782
|
), y = Object.fromEntries(
|
1753
1783
|
Object.entries(g).filter(
|
1754
|
-
([
|
1784
|
+
([m]) => !E.includes(m)
|
1755
1785
|
)
|
1756
|
-
),
|
1786
|
+
), T = Ui(
|
1757
1787
|
d.tracks,
|
1758
1788
|
E
|
1759
|
-
),
|
1789
|
+
), S = xn(d.trackItemsMap);
|
1760
1790
|
t.updateState(
|
1761
1791
|
{
|
1762
|
-
trackItemIds:
|
1792
|
+
trackItemIds: v,
|
1763
1793
|
trackItemDetailsMap: y,
|
1764
1794
|
activeIds: [],
|
1765
|
-
tracks:
|
1766
|
-
duration:
|
1795
|
+
tracks: T,
|
1796
|
+
duration: S
|
1767
1797
|
},
|
1768
1798
|
{ updateHistory: !0, kind: "remove" }
|
1769
1799
|
);
|
1770
1800
|
}
|
1771
|
-
}),
|
1801
|
+
}), w = a.subscribe((_) => {
|
1772
1802
|
var d, E;
|
1773
1803
|
if (_.key === hi) {
|
1774
|
-
const l = t.getState(), g = dt(l.trackItemDetailsMap),
|
1775
|
-
if (!
|
1804
|
+
const l = t.getState(), g = dt(l.trackItemDetailsMap), v = Object.keys((d = _.value) == null ? void 0 : d.payload);
|
1805
|
+
if (!v.length) return;
|
1776
1806
|
const y = (E = _.value) == null ? void 0 : E.payload;
|
1777
|
-
|
1778
|
-
g[
|
1779
|
-
...g[
|
1780
|
-
...y[
|
1807
|
+
v.forEach((T) => {
|
1808
|
+
g[T].details = {
|
1809
|
+
...g[T].details,
|
1810
|
+
...y[T].details
|
1781
1811
|
};
|
1782
1812
|
}), t.updateState(
|
1783
1813
|
{
|
@@ -1792,13 +1822,13 @@ function Ni(t) {
|
|
1792
1822
|
});
|
1793
1823
|
return {
|
1794
1824
|
unsubscribe: () => {
|
1795
|
-
f.unsubscribe(), p.unsubscribe(),
|
1825
|
+
f.unsubscribe(), p.unsubscribe(), w.unsubscribe(), u.unsubscribe();
|
1796
1826
|
}
|
1797
1827
|
};
|
1798
1828
|
}
|
1799
|
-
const
|
1829
|
+
const Gi = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
1800
1830
|
function Vn(t, r, n = { cyclesFix: !0 }, o = []) {
|
1801
|
-
var p,
|
1831
|
+
var p, w;
|
1802
1832
|
let a = [];
|
1803
1833
|
const u = Array.isArray(t);
|
1804
1834
|
for (const _ in t) {
|
@@ -1812,9 +1842,9 @@ function Vn(t, r, n = { cyclesFix: !0 }, o = []) {
|
|
1812
1842
|
continue;
|
1813
1843
|
}
|
1814
1844
|
const l = r[_], g = typeof d == "object" && typeof l == "object" && Array.isArray(d) === Array.isArray(l);
|
1815
|
-
if (d && l && g && !
|
1816
|
-
const
|
1817
|
-
a.push.apply(a,
|
1845
|
+
if (d && l && g && !Gi[(w = (p = Object.getPrototypeOf(d)) == null ? void 0 : p.constructor) == null ? void 0 : w.name] && (!n.cyclesFix || !o.includes(d))) {
|
1846
|
+
const v = Vn(d, l, n, n.cyclesFix ? o.concat([d]) : []);
|
1847
|
+
a.push.apply(a, v.map((y) => (y.path.unshift(E), y)));
|
1818
1848
|
} else d !== l && // treat NaN values as equivalent
|
1819
1849
|
!(Number.isNaN(d) && Number.isNaN(l)) && !(g && (isNaN(d) ? d + "" == l + "" : +d == +l)) && a.push({
|
1820
1850
|
path: [E],
|
@@ -1880,7 +1910,7 @@ function gt(t) {
|
|
1880
1910
|
var r;
|
1881
1911
|
return t ? Xn(t) || Array.isArray(t) || !!t[ce] || !!((r = t.constructor) != null && r[ce]) || he(t) || ye(t) : !1;
|
1882
1912
|
}
|
1883
|
-
var
|
1913
|
+
var Bi = Object.prototype.constructor.toString();
|
1884
1914
|
function Xn(t) {
|
1885
1915
|
if (!t || typeof t != "object")
|
1886
1916
|
return !1;
|
@@ -1888,7 +1918,7 @@ function Xn(t) {
|
|
1888
1918
|
if (r === null)
|
1889
1919
|
return !0;
|
1890
1920
|
const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
1891
|
-
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) ===
|
1921
|
+
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === Bi;
|
1892
1922
|
}
|
1893
1923
|
function ue(t, r) {
|
1894
1924
|
Mt(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
@@ -1909,7 +1939,7 @@ function qn(t, r, n) {
|
|
1909
1939
|
const o = Mt(t);
|
1910
1940
|
o === 2 ? t.set(r, n) : o === 3 ? t.add(n) : t[r] = n;
|
1911
1941
|
}
|
1912
|
-
function
|
1942
|
+
function Wi(t, r) {
|
1913
1943
|
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
1914
1944
|
}
|
1915
1945
|
function he(t) {
|
@@ -1953,9 +1983,9 @@ function an(t, r) {
|
|
1953
1983
|
}
|
1954
1984
|
}
|
1955
1985
|
function _n(t, r = !1) {
|
1956
|
-
return tr(t) || Pt(t) || !gt(t) || (Mt(t) > 1 && (t.set = t.add = t.clear = t.delete =
|
1986
|
+
return tr(t) || Pt(t) || !gt(t) || (Mt(t) > 1 && (t.set = t.add = t.clear = t.delete = $i), Object.freeze(t), r && Object.entries(t).forEach(([n, o]) => _n(o, !0))), t;
|
1957
1987
|
}
|
1958
|
-
function
|
1988
|
+
function $i() {
|
1959
1989
|
H(2);
|
1960
1990
|
}
|
1961
1991
|
function tr(t) {
|
@@ -1966,14 +1996,14 @@ function Ct(t) {
|
|
1966
1996
|
const r = cn[t];
|
1967
1997
|
return r || H(0, t), r;
|
1968
1998
|
}
|
1969
|
-
function
|
1999
|
+
function Ki(t, r) {
|
1970
2000
|
cn[t] || (cn[t] = r);
|
1971
2001
|
}
|
1972
2002
|
var le;
|
1973
2003
|
function Jn() {
|
1974
2004
|
return le;
|
1975
2005
|
}
|
1976
|
-
function
|
2006
|
+
function Vi(t, r) {
|
1977
2007
|
return {
|
1978
2008
|
drafts_: [],
|
1979
2009
|
parent_: t,
|
@@ -1988,15 +2018,15 @@ function Pn(t, r) {
|
|
1988
2018
|
r && (Ct("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
1989
2019
|
}
|
1990
2020
|
function un(t) {
|
1991
|
-
fn(t), t.drafts_.forEach(
|
2021
|
+
fn(t), t.drafts_.forEach(Yi), t.drafts_ = null;
|
1992
2022
|
}
|
1993
2023
|
function fn(t) {
|
1994
2024
|
t === le && (le = t.parent_);
|
1995
2025
|
}
|
1996
2026
|
function Mn(t) {
|
1997
|
-
return le =
|
2027
|
+
return le = Vi(le, t);
|
1998
2028
|
}
|
1999
|
-
function
|
2029
|
+
function Yi(t) {
|
2000
2030
|
const r = t[X];
|
2001
2031
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
2002
2032
|
}
|
@@ -2017,7 +2047,7 @@ function qe(t, r, n) {
|
|
2017
2047
|
if (!o)
|
2018
2048
|
return ue(
|
2019
2049
|
r,
|
2020
|
-
(a, u) =>
|
2050
|
+
(a, u) => kn(t, o, r, a, u, n)
|
2021
2051
|
), r;
|
2022
2052
|
if (o.scope_ !== t)
|
2023
2053
|
return r;
|
@@ -2029,7 +2059,7 @@ function qe(t, r, n) {
|
|
2029
2059
|
let u = a, f = !1;
|
2030
2060
|
o.type_ === 3 && (u = new Set(a), a.clear(), f = !0), ue(
|
2031
2061
|
u,
|
2032
|
-
(p,
|
2062
|
+
(p, w) => kn(t, o, a, p, w, n, f)
|
2033
2063
|
), Je(t, a, !1), n && t.patches_ && Ct("Patches").generatePatches_(
|
2034
2064
|
o,
|
2035
2065
|
n,
|
@@ -2039,11 +2069,11 @@ function qe(t, r, n) {
|
|
2039
2069
|
}
|
2040
2070
|
return o.copy_;
|
2041
2071
|
}
|
2042
|
-
function
|
2072
|
+
function kn(t, r, n, o, a, u, f) {
|
2043
2073
|
if (process.env.NODE_ENV !== "production" && a === n && H(5), Pt(a)) {
|
2044
2074
|
const p = u && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2045
|
-
!fe(r.assigned_, o) ? u.concat(o) : void 0,
|
2046
|
-
if (qn(n, o,
|
2075
|
+
!fe(r.assigned_, o) ? u.concat(o) : void 0, w = qe(t, a, p);
|
2076
|
+
if (qn(n, o, w), Pt(w))
|
2047
2077
|
t.canAutoFreeze_ = !1;
|
2048
2078
|
else
|
2049
2079
|
return;
|
@@ -2057,7 +2087,7 @@ function Dn(t, r, n, o, a, u, f) {
|
|
2057
2087
|
function Je(t, r, n = !1) {
|
2058
2088
|
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && _n(r, n);
|
2059
2089
|
}
|
2060
|
-
function
|
2090
|
+
function Xi(t, r) {
|
2061
2091
|
const n = Array.isArray(t), o = {
|
2062
2092
|
type_: n ? 1 : 0,
|
2063
2093
|
// Track which produce call this is associated with.
|
@@ -2092,7 +2122,7 @@ var gn = {
|
|
2092
2122
|
return t;
|
2093
2123
|
const n = Ot(t);
|
2094
2124
|
if (!fe(n, r))
|
2095
|
-
return
|
2125
|
+
return qi(t, n, r);
|
2096
2126
|
const o = n[r];
|
2097
2127
|
return t.finalized_ || !gt(o) ? o : o === Zr(t.base_, r) ? (Qr(t), t.copy_[r] = pn(o, t)) : o;
|
2098
2128
|
},
|
@@ -2110,7 +2140,7 @@ var gn = {
|
|
2110
2140
|
const a = Zr(Ot(t), r), u = a == null ? void 0 : a[X];
|
2111
2141
|
if (u && u.base_ === n)
|
2112
2142
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2113
|
-
if (
|
2143
|
+
if (Wi(n, a) && (n !== void 0 || fe(t.base_, r)))
|
2114
2144
|
return !0;
|
2115
2145
|
Qr(t), ln(t);
|
2116
2146
|
}
|
@@ -2157,7 +2187,7 @@ function Zr(t, r) {
|
|
2157
2187
|
const n = t[X];
|
2158
2188
|
return (n ? Ot(n) : t)[r];
|
2159
2189
|
}
|
2160
|
-
function
|
2190
|
+
function qi(t, r, n) {
|
2161
2191
|
var a;
|
2162
2192
|
const o = Zn(r, n);
|
2163
2193
|
return o ? "value" in o ? o.value : (
|
@@ -2186,15 +2216,15 @@ function Qr(t) {
|
|
2186
2216
|
t.scope_.immer_.useStrictShallowCopy_
|
2187
2217
|
));
|
2188
2218
|
}
|
2189
|
-
var
|
2219
|
+
var Ji = class {
|
2190
2220
|
constructor(t) {
|
2191
2221
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, n, o) => {
|
2192
2222
|
if (typeof r == "function" && typeof n != "function") {
|
2193
2223
|
const u = n;
|
2194
2224
|
n = r;
|
2195
2225
|
const f = this;
|
2196
|
-
return function(
|
2197
|
-
return f.produce(
|
2226
|
+
return function(w = u, ..._) {
|
2227
|
+
return f.produce(w, (d) => n.call(this, d, ..._));
|
2198
2228
|
};
|
2199
2229
|
}
|
2200
2230
|
typeof n != "function" && H(6), o !== void 0 && typeof o != "function" && H(7);
|
@@ -2218,7 +2248,7 @@ var Xi = class {
|
|
2218
2248
|
H(1, r);
|
2219
2249
|
}, this.produceWithPatches = (r, n) => {
|
2220
2250
|
if (typeof r == "function")
|
2221
|
-
return (f, ...p) => this.produceWithPatches(f, (
|
2251
|
+
return (f, ...p) => this.produceWithPatches(f, (w) => r(w, ...p));
|
2222
2252
|
let o, a;
|
2223
2253
|
return [this.produce(r, n, (f, p) => {
|
2224
2254
|
o = f, a = p;
|
@@ -2226,7 +2256,7 @@ var Xi = class {
|
|
2226
2256
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
2227
2257
|
}
|
2228
2258
|
createDraft(t) {
|
2229
|
-
gt(t) || H(8), Pt(t) && (t =
|
2259
|
+
gt(t) || H(8), Pt(t) && (t = Zi(t));
|
2230
2260
|
const r = Mn(this), n = pn(t, void 0);
|
2231
2261
|
return n[X].isManual_ = !0, fn(r), n;
|
2232
2262
|
}
|
@@ -2270,10 +2300,10 @@ var Xi = class {
|
|
2270
2300
|
}
|
2271
2301
|
};
|
2272
2302
|
function pn(t, r) {
|
2273
|
-
const n = he(t) ? Ct("MapSet").proxyMap_(t, r) : ye(t) ? Ct("MapSet").proxySet_(t, r) :
|
2303
|
+
const n = he(t) ? Ct("MapSet").proxyMap_(t, r) : ye(t) ? Ct("MapSet").proxySet_(t, r) : Xi(t, r);
|
2274
2304
|
return (r ? r.scope_ : Jn()).drafts_.push(n), n;
|
2275
2305
|
}
|
2276
|
-
function
|
2306
|
+
function Zi(t) {
|
2277
2307
|
return Pt(t) || H(10, t), Qn(t);
|
2278
2308
|
}
|
2279
2309
|
function Qn(t) {
|
@@ -2291,7 +2321,7 @@ function Qn(t) {
|
|
2291
2321
|
qn(n, o, Qn(a));
|
2292
2322
|
}), r && (r.finalized_ = !1), n;
|
2293
2323
|
}
|
2294
|
-
function
|
2324
|
+
function Dn() {
|
2295
2325
|
process.env.NODE_ENV !== "production" && Yn.push(
|
2296
2326
|
'Sets cannot have "replace" patches.',
|
2297
2327
|
function(l) {
|
@@ -2303,109 +2333,109 @@ function kn() {
|
|
2303
2333
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
2304
2334
|
);
|
2305
2335
|
const r = "replace", n = "add", o = "remove";
|
2306
|
-
function a(l, g,
|
2336
|
+
function a(l, g, v, y) {
|
2307
2337
|
switch (l.type_) {
|
2308
2338
|
case 0:
|
2309
2339
|
case 2:
|
2310
2340
|
return f(
|
2311
2341
|
l,
|
2312
2342
|
g,
|
2313
|
-
|
2343
|
+
v,
|
2314
2344
|
y
|
2315
2345
|
);
|
2316
2346
|
case 1:
|
2317
|
-
return u(l, g,
|
2347
|
+
return u(l, g, v, y);
|
2318
2348
|
case 3:
|
2319
2349
|
return p(
|
2320
2350
|
l,
|
2321
2351
|
g,
|
2322
|
-
|
2352
|
+
v,
|
2323
2353
|
y
|
2324
2354
|
);
|
2325
2355
|
}
|
2326
2356
|
}
|
2327
|
-
function u(l, g,
|
2328
|
-
let { base_:
|
2329
|
-
|
2330
|
-
for (let
|
2331
|
-
if (
|
2332
|
-
const A = g.concat([
|
2333
|
-
|
2357
|
+
function u(l, g, v, y) {
|
2358
|
+
let { base_: T, assigned_: S } = l, m = l.copy_;
|
2359
|
+
m.length < T.length && ([T, m] = [m, T], [v, y] = [y, v]);
|
2360
|
+
for (let h = 0; h < T.length; h++)
|
2361
|
+
if (S[h] && m[h] !== T[h]) {
|
2362
|
+
const A = g.concat([h]);
|
2363
|
+
v.push({
|
2334
2364
|
op: r,
|
2335
2365
|
path: A,
|
2336
2366
|
// Need to maybe clone it, as it can in fact be the original value
|
2337
2367
|
// due to the base/copy inversion at the start of this function
|
2338
|
-
value: E(h
|
2368
|
+
value: E(m[h])
|
2339
2369
|
}), y.push({
|
2340
2370
|
op: r,
|
2341
2371
|
path: A,
|
2342
|
-
value: E(
|
2372
|
+
value: E(T[h])
|
2343
2373
|
});
|
2344
2374
|
}
|
2345
|
-
for (let
|
2346
|
-
const A = g.concat([
|
2347
|
-
|
2375
|
+
for (let h = T.length; h < m.length; h++) {
|
2376
|
+
const A = g.concat([h]);
|
2377
|
+
v.push({
|
2348
2378
|
op: n,
|
2349
2379
|
path: A,
|
2350
2380
|
// Need to maybe clone it, as it can in fact be the original value
|
2351
2381
|
// due to the base/copy inversion at the start of this function
|
2352
|
-
value: E(h
|
2382
|
+
value: E(m[h])
|
2353
2383
|
});
|
2354
2384
|
}
|
2355
|
-
for (let
|
2356
|
-
const A = g.concat([
|
2385
|
+
for (let h = m.length - 1; T.length <= h; --h) {
|
2386
|
+
const A = g.concat([h]);
|
2357
2387
|
y.push({
|
2358
2388
|
op: o,
|
2359
2389
|
path: A
|
2360
2390
|
});
|
2361
2391
|
}
|
2362
2392
|
}
|
2363
|
-
function f(l, g,
|
2364
|
-
const { base_:
|
2365
|
-
ue(l.assigned_, (
|
2366
|
-
const A = Jr(
|
2393
|
+
function f(l, g, v, y) {
|
2394
|
+
const { base_: T, copy_: S } = l;
|
2395
|
+
ue(l.assigned_, (m, h) => {
|
2396
|
+
const A = Jr(T, m), L = Jr(S, m), F = h ? fe(T, m) ? r : n : o;
|
2367
2397
|
if (A === L && F === r)
|
2368
2398
|
return;
|
2369
|
-
const j = g.concat(
|
2370
|
-
|
2399
|
+
const j = g.concat(m);
|
2400
|
+
v.push(F === o ? { op: F, path: j } : { op: F, path: j, value: L }), y.push(
|
2371
2401
|
F === n ? { op: o, path: j } : F === o ? { op: n, path: j, value: E(A) } : { op: r, path: j, value: E(A) }
|
2372
2402
|
);
|
2373
2403
|
});
|
2374
2404
|
}
|
2375
|
-
function p(l, g,
|
2376
|
-
let { base_:
|
2377
|
-
|
2378
|
-
if (!
|
2379
|
-
const A = g.concat([
|
2380
|
-
|
2405
|
+
function p(l, g, v, y) {
|
2406
|
+
let { base_: T, copy_: S } = l, m = 0;
|
2407
|
+
T.forEach((h) => {
|
2408
|
+
if (!S.has(h)) {
|
2409
|
+
const A = g.concat([m]);
|
2410
|
+
v.push({
|
2381
2411
|
op: o,
|
2382
2412
|
path: A,
|
2383
|
-
value:
|
2413
|
+
value: h
|
2384
2414
|
}), y.unshift({
|
2385
2415
|
op: n,
|
2386
2416
|
path: A,
|
2387
|
-
value:
|
2417
|
+
value: h
|
2388
2418
|
});
|
2389
2419
|
}
|
2390
|
-
|
2391
|
-
}),
|
2392
|
-
if (!
|
2393
|
-
const A = g.concat([
|
2394
|
-
|
2420
|
+
m++;
|
2421
|
+
}), m = 0, S.forEach((h) => {
|
2422
|
+
if (!T.has(h)) {
|
2423
|
+
const A = g.concat([m]);
|
2424
|
+
v.push({
|
2395
2425
|
op: n,
|
2396
2426
|
path: A,
|
2397
|
-
value:
|
2427
|
+
value: h
|
2398
2428
|
}), y.unshift({
|
2399
2429
|
op: o,
|
2400
2430
|
path: A,
|
2401
|
-
value:
|
2431
|
+
value: h
|
2402
2432
|
});
|
2403
2433
|
}
|
2404
|
-
|
2434
|
+
m++;
|
2405
2435
|
});
|
2406
2436
|
}
|
2407
|
-
function
|
2408
|
-
|
2437
|
+
function w(l, g, v, y) {
|
2438
|
+
v.push({
|
2409
2439
|
op: r,
|
2410
2440
|
path: [],
|
2411
2441
|
value: g === bn ? void 0 : g
|
@@ -2416,49 +2446,49 @@ function kn() {
|
|
2416
2446
|
});
|
2417
2447
|
}
|
2418
2448
|
function _(l, g) {
|
2419
|
-
return g.forEach((
|
2420
|
-
const { path: y, op:
|
2421
|
-
let
|
2449
|
+
return g.forEach((v) => {
|
2450
|
+
const { path: y, op: T } = v;
|
2451
|
+
let S = l;
|
2422
2452
|
for (let L = 0; L < y.length - 1; L++) {
|
2423
|
-
const F = Mt(
|
2453
|
+
const F = Mt(S);
|
2424
2454
|
let j = y[L];
|
2425
|
-
typeof j != "string" && typeof j != "number" && (j = "" + j), (F === 0 || F === 1) && (j === "__proto__" || j === "constructor") && H(19), typeof
|
2455
|
+
typeof j != "string" && typeof j != "number" && (j = "" + j), (F === 0 || F === 1) && (j === "__proto__" || j === "constructor") && H(19), typeof S == "function" && j === "prototype" && H(19), S = Jr(S, j), typeof S != "object" && H(18, y.join("/"));
|
2426
2456
|
}
|
2427
|
-
const
|
2428
|
-
switch (
|
2457
|
+
const m = Mt(S), h = d(v.value), A = y[y.length - 1];
|
2458
|
+
switch (T) {
|
2429
2459
|
case r:
|
2430
|
-
switch (
|
2460
|
+
switch (m) {
|
2431
2461
|
case 2:
|
2432
|
-
return
|
2462
|
+
return S.set(A, h);
|
2433
2463
|
case 3:
|
2434
2464
|
H(16);
|
2435
2465
|
default:
|
2436
|
-
return
|
2466
|
+
return S[A] = h;
|
2437
2467
|
}
|
2438
2468
|
case n:
|
2439
|
-
switch (
|
2469
|
+
switch (m) {
|
2440
2470
|
case 1:
|
2441
|
-
return A === "-" ?
|
2471
|
+
return A === "-" ? S.push(h) : S.splice(A, 0, h);
|
2442
2472
|
case 2:
|
2443
|
-
return
|
2473
|
+
return S.set(A, h);
|
2444
2474
|
case 3:
|
2445
|
-
return
|
2475
|
+
return S.add(h);
|
2446
2476
|
default:
|
2447
|
-
return
|
2477
|
+
return S[A] = h;
|
2448
2478
|
}
|
2449
2479
|
case o:
|
2450
|
-
switch (
|
2480
|
+
switch (m) {
|
2451
2481
|
case 1:
|
2452
|
-
return
|
2482
|
+
return S.splice(A, 1);
|
2453
2483
|
case 2:
|
2454
|
-
return
|
2484
|
+
return S.delete(A);
|
2455
2485
|
case 3:
|
2456
|
-
return
|
2486
|
+
return S.delete(v.value);
|
2457
2487
|
default:
|
2458
|
-
return delete
|
2488
|
+
return delete S[A];
|
2459
2489
|
}
|
2460
2490
|
default:
|
2461
|
-
H(17,
|
2491
|
+
H(17, T);
|
2462
2492
|
}
|
2463
2493
|
}), l;
|
2464
2494
|
}
|
@@ -2469,35 +2499,35 @@ function kn() {
|
|
2469
2499
|
return l.map(d);
|
2470
2500
|
if (he(l))
|
2471
2501
|
return new Map(
|
2472
|
-
Array.from(l.entries()).map(([
|
2502
|
+
Array.from(l.entries()).map(([v, y]) => [v, d(y)])
|
2473
2503
|
);
|
2474
2504
|
if (ye(l))
|
2475
2505
|
return new Set(Array.from(l).map(d));
|
2476
2506
|
const g = Object.create(xt(l));
|
2477
|
-
for (const
|
2478
|
-
g[
|
2507
|
+
for (const v in l)
|
2508
|
+
g[v] = d(l[v]);
|
2479
2509
|
return fe(l, ce) && (g[ce] = l[ce]), g;
|
2480
2510
|
}
|
2481
2511
|
function E(l) {
|
2482
2512
|
return Pt(l) ? d(l) : l;
|
2483
2513
|
}
|
2484
|
-
|
2514
|
+
Ki("Patches", {
|
2485
2515
|
applyPatches_: _,
|
2486
2516
|
generatePatches_: a,
|
2487
|
-
generateReplacementPatches_:
|
2517
|
+
generateReplacementPatches_: w
|
2488
2518
|
});
|
2489
2519
|
}
|
2490
|
-
var q = new
|
2520
|
+
var q = new Ji(), Qi = q.produce;
|
2491
2521
|
q.produceWithPatches.bind(
|
2492
2522
|
q
|
2493
2523
|
);
|
2494
2524
|
q.setAutoFreeze.bind(q);
|
2495
2525
|
q.setUseStrictShallowCopy.bind(q);
|
2496
|
-
var
|
2526
|
+
var to = q.applyPatches.bind(q);
|
2497
2527
|
q.createDraft.bind(q);
|
2498
2528
|
q.finishDraft.bind(q);
|
2499
|
-
var
|
2500
|
-
function
|
2529
|
+
var eo = 1 / 0, ro = 9007199254740991, no = "[object Arguments]", io = "[object Function]", oo = "[object GeneratorFunction]", so = "[object Symbol]", ao = typeof Z == "object" && Z && Z.Object === Object && Z, co = typeof self == "object" && self && self.Object === Object && self, uo = ao || co || Function("return this")();
|
2530
|
+
function fo(t, r, n) {
|
2501
2531
|
switch (n.length) {
|
2502
2532
|
case 0:
|
2503
2533
|
return t.call(r);
|
@@ -2510,87 +2540,87 @@ function co(t, r, n) {
|
|
2510
2540
|
}
|
2511
2541
|
return t.apply(r, n);
|
2512
2542
|
}
|
2513
|
-
function
|
2543
|
+
function lo(t, r) {
|
2514
2544
|
for (var n = -1, o = t ? t.length : 0, a = Array(o); ++n < o; )
|
2515
2545
|
a[n] = r(t[n], n, t);
|
2516
2546
|
return a;
|
2517
2547
|
}
|
2518
|
-
function
|
2548
|
+
function po(t, r) {
|
2519
2549
|
for (var n = -1, o = r.length, a = t.length; ++n < o; )
|
2520
2550
|
t[a + n] = r[n];
|
2521
2551
|
return t;
|
2522
2552
|
}
|
2523
|
-
var mn = Object.prototype,
|
2524
|
-
function
|
2553
|
+
var mn = Object.prototype, ho = mn.hasOwnProperty, vn = mn.toString, jn = uo.Symbol, yo = mn.propertyIsEnumerable, Fn = jn ? jn.isConcatSpreadable : void 0, Rn = Math.max;
|
2554
|
+
function bo(t, r, n, o, a) {
|
2525
2555
|
var u = -1, f = t.length;
|
2526
|
-
for (n || (n =
|
2556
|
+
for (n || (n = vo), a || (a = []); ++u < f; ) {
|
2527
2557
|
var p = t[u];
|
2528
|
-
n(p) ?
|
2558
|
+
n(p) ? po(a, p) : a[a.length] = p;
|
2529
2559
|
}
|
2530
2560
|
return a;
|
2531
2561
|
}
|
2532
|
-
function
|
2533
|
-
return t = Object(t),
|
2562
|
+
function _o(t, r) {
|
2563
|
+
return t = Object(t), go(t, r, function(n, o) {
|
2534
2564
|
return o in t;
|
2535
2565
|
});
|
2536
2566
|
}
|
2537
|
-
function
|
2567
|
+
function go(t, r, n) {
|
2538
2568
|
for (var o = -1, a = r.length, u = {}; ++o < a; ) {
|
2539
2569
|
var f = r[o], p = t[f];
|
2540
2570
|
n(p, f) && (u[f] = p);
|
2541
2571
|
}
|
2542
2572
|
return u;
|
2543
2573
|
}
|
2544
|
-
function
|
2574
|
+
function mo(t, r) {
|
2545
2575
|
return r = Rn(r === void 0 ? t.length - 1 : r, 0), function() {
|
2546
2576
|
for (var n = arguments, o = -1, a = Rn(n.length - r, 0), u = Array(a); ++o < a; )
|
2547
2577
|
u[o] = n[r + o];
|
2548
2578
|
o = -1;
|
2549
2579
|
for (var f = Array(r + 1); ++o < r; )
|
2550
2580
|
f[o] = n[o];
|
2551
|
-
return f[r] = u,
|
2581
|
+
return f[r] = u, fo(t, this, f);
|
2552
2582
|
};
|
2553
2583
|
}
|
2554
|
-
function
|
2555
|
-
return
|
2584
|
+
function vo(t) {
|
2585
|
+
return wo(t) || Io(t) || !!(Fn && t && t[Fn]);
|
2556
2586
|
}
|
2557
|
-
function
|
2558
|
-
if (typeof t == "string" ||
|
2587
|
+
function So(t) {
|
2588
|
+
if (typeof t == "string" || Po(t))
|
2559
2589
|
return t;
|
2560
2590
|
var r = t + "";
|
2561
|
-
return r == "0" && 1 / t == -
|
2591
|
+
return r == "0" && 1 / t == -eo ? "-0" : r;
|
2562
2592
|
}
|
2563
|
-
function vo(t) {
|
2564
|
-
return wo(t) && lo.call(t, "callee") && (!po.call(t, "callee") || vn.call(t) == eo);
|
2565
|
-
}
|
2566
|
-
var So = Array.isArray;
|
2567
2593
|
function Io(t) {
|
2568
|
-
return t
|
2569
|
-
}
|
2570
|
-
function wo(t) {
|
2571
|
-
return ti(t) && Io(t);
|
2594
|
+
return Ao(t) && ho.call(t, "callee") && (!yo.call(t, "callee") || vn.call(t) == no);
|
2572
2595
|
}
|
2596
|
+
var wo = Array.isArray;
|
2573
2597
|
function To(t) {
|
2574
|
-
|
2575
|
-
return r == ro || r == no;
|
2598
|
+
return t != null && Oo(t.length) && !Eo(t);
|
2576
2599
|
}
|
2577
2600
|
function Ao(t) {
|
2578
|
-
return
|
2601
|
+
return ti(t) && To(t);
|
2579
2602
|
}
|
2580
2603
|
function Eo(t) {
|
2604
|
+
var r = xo(t) ? vn.call(t) : "";
|
2605
|
+
return r == io || r == oo;
|
2606
|
+
}
|
2607
|
+
function Oo(t) {
|
2608
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= ro;
|
2609
|
+
}
|
2610
|
+
function xo(t) {
|
2581
2611
|
var r = typeof t;
|
2582
2612
|
return !!t && (r == "object" || r == "function");
|
2583
2613
|
}
|
2584
2614
|
function ti(t) {
|
2585
2615
|
return !!t && typeof t == "object";
|
2586
2616
|
}
|
2587
|
-
function
|
2588
|
-
return typeof t == "symbol" || ti(t) && vn.call(t) ==
|
2617
|
+
function Po(t) {
|
2618
|
+
return typeof t == "symbol" || ti(t) && vn.call(t) == so;
|
2589
2619
|
}
|
2590
|
-
var
|
2591
|
-
return t == null ? {} :
|
2592
|
-
}),
|
2593
|
-
const zn = /* @__PURE__ */ dn(
|
2620
|
+
var Mo = mo(function(t, r) {
|
2621
|
+
return t == null ? {} : _o(t, lo(bo(r), So));
|
2622
|
+
}), Co = Mo;
|
2623
|
+
const zn = /* @__PURE__ */ dn(Co), ko = {
|
2594
2624
|
tracks: [],
|
2595
2625
|
trackItemIds: [],
|
2596
2626
|
trackItemsMap: {},
|
@@ -2612,7 +2642,7 @@ const zn = /* @__PURE__ */ dn(Po), Mo = {
|
|
2612
2642
|
"transitionsMap",
|
2613
2643
|
"trackItemIds"
|
2614
2644
|
];
|
2615
|
-
class
|
2645
|
+
class Fo {
|
2616
2646
|
constructor(r) {
|
2617
2647
|
Et(this, "stateSubject");
|
2618
2648
|
Et(this, "stateHistorySubject");
|
@@ -2620,14 +2650,14 @@ class ko {
|
|
2620
2650
|
Et(this, "undos", []);
|
2621
2651
|
Et(this, "redos", []);
|
2622
2652
|
Et(this, "listener");
|
2623
|
-
const n = r ||
|
2653
|
+
const n = r || ko;
|
2624
2654
|
this.stateSubject = new On(n), this.stateHistorySubject = new On({
|
2625
2655
|
handleRedo: !1,
|
2626
2656
|
handleUndo: !1
|
2627
2657
|
}), this.prevState = n, this.initListeners();
|
2628
2658
|
}
|
2629
2659
|
initListeners() {
|
2630
|
-
|
2660
|
+
Li(this);
|
2631
2661
|
}
|
2632
2662
|
destroyListeners() {
|
2633
2663
|
this.listener && this.listener.unsubscribe();
|
@@ -2716,61 +2746,61 @@ class ko {
|
|
2716
2746
|
undo() {
|
2717
2747
|
const r = this.undos.pop(), n = r == null ? void 0 : r.undos, o = r == null ? void 0 : r.type;
|
2718
2748
|
if (!n || !o) return;
|
2719
|
-
|
2749
|
+
Dn();
|
2720
2750
|
const {
|
2721
2751
|
trackItemDetailsMap: a,
|
2722
2752
|
trackItemIds: u,
|
2723
2753
|
tracks: f,
|
2724
2754
|
transitionIds: p,
|
2725
|
-
transitionsMap:
|
2755
|
+
transitionsMap: w,
|
2726
2756
|
trackItemsMap: _
|
2727
2757
|
} = this.getState(), d = dt({
|
2728
2758
|
trackItemDetailsMap: a,
|
2729
2759
|
trackItemIds: u,
|
2730
2760
|
tracks: f,
|
2731
2761
|
transitionIds: p,
|
2732
|
-
transitionsMap:
|
2762
|
+
transitionsMap: w,
|
2733
2763
|
trackItemsMap: _
|
2734
|
-
}), E = [], l = [], g = [],
|
2764
|
+
}), E = [], l = [], g = [], v = [], y = [], T = [];
|
2735
2765
|
n.forEach((P) => {
|
2736
|
-
let
|
2737
|
-
const
|
2738
|
-
P.type === "CREATE" ?
|
2739
|
-
path:
|
2766
|
+
let D;
|
2767
|
+
const $ = P.path.slice(1);
|
2768
|
+
P.type === "CREATE" ? D = {
|
2769
|
+
path: $,
|
2740
2770
|
op: "remove",
|
2741
2771
|
value: P.value
|
2742
|
-
} : P.type === "CHANGE" ?
|
2743
|
-
path:
|
2772
|
+
} : P.type === "CHANGE" ? D = {
|
2773
|
+
path: $,
|
2744
2774
|
op: "replace",
|
2745
2775
|
value: P.oldValue
|
2746
|
-
} :
|
2747
|
-
path:
|
2776
|
+
} : D = {
|
2777
|
+
path: $,
|
2748
2778
|
op: "add",
|
2749
2779
|
value: P.oldValue
|
2750
|
-
}, P.path.includes("trackItemIds") ? g.push(
|
2780
|
+
}, P.path.includes("trackItemIds") ? g.push(D) : P.path.includes("transitionIds") ? l.push(D) : P.path.includes("trackItemsMap") ? y.push(D) : P.path.includes("transitionsMap") ? v.push(D) : P.path.includes("tracks") ? E.push(D) : P.path.includes("trackItemDetailsMap") && T.push(D);
|
2751
2781
|
});
|
2752
|
-
const
|
2782
|
+
const S = this.applyPatch(
|
2753
2783
|
d.tracks,
|
2754
2784
|
E
|
2755
|
-
),
|
2785
|
+
), m = this.applyPatch(
|
2756
2786
|
d.transitionIds,
|
2757
2787
|
l
|
2758
|
-
),
|
2788
|
+
), h = this.applyPatch(
|
2759
2789
|
d.trackItemIds,
|
2760
2790
|
g
|
2761
2791
|
), A = this.applyPatch(
|
2762
2792
|
d.transitionsMap,
|
2763
|
-
|
2793
|
+
v
|
2764
2794
|
), L = this.applyPatch(
|
2765
2795
|
d.trackItemsMap,
|
2766
2796
|
y
|
2767
2797
|
), F = this.applyPatch(
|
2768
2798
|
d.trackItemDetailsMap,
|
2769
|
-
|
2799
|
+
T
|
2770
2800
|
), j = dt({
|
2771
|
-
tracks:
|
2772
|
-
transitionIds:
|
2773
|
-
trackItemIds:
|
2801
|
+
tracks: S,
|
2802
|
+
transitionIds: m,
|
2803
|
+
trackItemIds: h,
|
2774
2804
|
transitionsMap: A,
|
2775
2805
|
trackItemsMap: L,
|
2776
2806
|
trackItemDetailsMap: F
|
@@ -2778,68 +2808,68 @@ class ko {
|
|
2778
2808
|
this.prevState = nt, this.redos.push({ redos: n, type: o }), this.stateSubject.next(yt), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
2779
2809
|
}
|
2780
2810
|
applyPatch(r, n) {
|
2781
|
-
return n.reverse().reduce((o, a) =>
|
2782
|
-
|
2811
|
+
return n.reverse().reduce((o, a) => Qi(o, (u) => {
|
2812
|
+
to(u, [a]);
|
2783
2813
|
}), r);
|
2784
2814
|
}
|
2785
2815
|
redo() {
|
2786
2816
|
const r = this.redos.pop(), n = r == null ? void 0 : r.redos, o = r == null ? void 0 : r.type;
|
2787
2817
|
if (!n || !o) return;
|
2788
|
-
|
2818
|
+
Dn();
|
2789
2819
|
const {
|
2790
2820
|
trackItemDetailsMap: a,
|
2791
2821
|
trackItemIds: u,
|
2792
2822
|
tracks: f,
|
2793
2823
|
transitionIds: p,
|
2794
|
-
transitionsMap:
|
2824
|
+
transitionsMap: w,
|
2795
2825
|
trackItemsMap: _
|
2796
2826
|
} = this.getState(), d = dt({
|
2797
2827
|
trackItemDetailsMap: a,
|
2798
2828
|
trackItemIds: u,
|
2799
2829
|
tracks: f,
|
2800
2830
|
transitionIds: p,
|
2801
|
-
transitionsMap:
|
2831
|
+
transitionsMap: w,
|
2802
2832
|
trackItemsMap: _
|
2803
|
-
}), E = [], l = [], g = [],
|
2833
|
+
}), E = [], l = [], g = [], v = [], y = [], T = [];
|
2804
2834
|
n.forEach((P) => {
|
2805
|
-
let
|
2806
|
-
const
|
2807
|
-
P.type === "CREATE" ?
|
2808
|
-
path:
|
2835
|
+
let D;
|
2836
|
+
const $ = P.path.slice(1);
|
2837
|
+
P.type === "CREATE" ? D = {
|
2838
|
+
path: $,
|
2809
2839
|
op: "add",
|
2810
2840
|
value: P.value
|
2811
|
-
} : P.type === "CHANGE" ?
|
2812
|
-
path:
|
2841
|
+
} : P.type === "CHANGE" ? D = {
|
2842
|
+
path: $,
|
2813
2843
|
op: "replace",
|
2814
2844
|
value: P.value
|
2815
|
-
} :
|
2816
|
-
path:
|
2845
|
+
} : D = {
|
2846
|
+
path: $,
|
2817
2847
|
op: "remove",
|
2818
2848
|
value: P.oldValue
|
2819
|
-
}, P.path.includes("trackItemIds") ? g.push(
|
2849
|
+
}, P.path.includes("trackItemIds") ? g.push(D) : P.path.includes("transitionIds") ? l.push(D) : P.path.includes("trackItemsMap") ? y.push(D) : P.path.includes("transitionsMap") ? v.push(D) : P.path.includes("trackItemDetailsMap") ? T.push(D) : E.push(D);
|
2820
2850
|
});
|
2821
|
-
const
|
2851
|
+
const S = this.applyPatch(
|
2822
2852
|
d.tracks,
|
2823
2853
|
E
|
2824
|
-
),
|
2854
|
+
), m = this.applyPatch(
|
2825
2855
|
d.transitionIds,
|
2826
2856
|
l
|
2827
|
-
),
|
2857
|
+
), h = this.applyPatch(
|
2828
2858
|
d.trackItemIds,
|
2829
2859
|
g
|
2830
2860
|
), A = this.applyPatch(
|
2831
2861
|
d.transitionsMap,
|
2832
|
-
|
2862
|
+
v
|
2833
2863
|
), L = this.applyPatch(
|
2834
2864
|
d.trackItemsMap,
|
2835
2865
|
y
|
2836
2866
|
), F = this.applyPatch(
|
2837
2867
|
d.trackItemDetailsMap,
|
2838
|
-
|
2868
|
+
T
|
2839
2869
|
), j = dt({
|
2840
|
-
tracks:
|
2841
|
-
transitionIds:
|
2842
|
-
trackItemIds:
|
2870
|
+
tracks: S,
|
2871
|
+
transitionIds: m,
|
2872
|
+
trackItemIds: h,
|
2843
2873
|
transitionsMap: A,
|
2844
2874
|
trackItemsMap: L,
|
2845
2875
|
trackItemDetailsMap: F
|
@@ -2848,5 +2878,5 @@ class ko {
|
|
2848
2878
|
}
|
2849
2879
|
}
|
2850
2880
|
export {
|
2851
|
-
|
2881
|
+
Fo as default
|
2852
2882
|
};
|