@designcombo/state 0.1.17 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +510 -504
- package/dist/index.umd.js +3 -3
- package/dist/utils/load-item.d.ts +5 -4
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
@@ -6,7 +6,7 @@ var nn = function(t, r) {
|
|
6
6
|
return nn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
7
7
|
n.__proto__ = i;
|
8
8
|
} || function(n, i) {
|
9
|
-
for (var
|
9
|
+
for (var s in i) Object.prototype.hasOwnProperty.call(i, s) && (n[s] = i[s]);
|
10
10
|
}, nn(t, r);
|
11
11
|
};
|
12
12
|
function be(t, r) {
|
@@ -31,14 +31,14 @@ function an(t) {
|
|
31
31
|
function sn(t, r) {
|
32
32
|
var n = typeof Symbol == "function" && t[Symbol.iterator];
|
33
33
|
if (!n) return t;
|
34
|
-
var i = n.call(t),
|
34
|
+
var i = n.call(t), s, c = [], f;
|
35
35
|
try {
|
36
|
-
for (; (r === void 0 || r-- > 0) && !(
|
36
|
+
for (; (r === void 0 || r-- > 0) && !(s = i.next()).done; ) c.push(s.value);
|
37
37
|
} catch (d) {
|
38
38
|
f = { error: d };
|
39
39
|
} finally {
|
40
40
|
try {
|
41
|
-
|
41
|
+
s && !s.done && (n = i.return) && n.call(i);
|
42
42
|
} finally {
|
43
43
|
if (f) throw f.error;
|
44
44
|
}
|
@@ -46,7 +46,7 @@ function sn(t, r) {
|
|
46
46
|
return c;
|
47
47
|
}
|
48
48
|
function on(t, r, n) {
|
49
|
-
if (n || arguments.length === 2) for (var i = 0,
|
49
|
+
if (n || arguments.length === 2) for (var i = 0, s = r.length, c; i < s; i++)
|
50
50
|
(c || !(i in r)) && (c || (c = Array.prototype.slice.call(r, 0, i)), c[i] = r[i]);
|
51
51
|
return t.concat(c || Array.prototype.slice.call(r));
|
52
52
|
}
|
@@ -62,8 +62,8 @@ function Yn(t) {
|
|
62
62
|
var Zr = Yn(function(t) {
|
63
63
|
return function(n) {
|
64
64
|
t(this), this.message = n ? n.length + ` errors occurred during unsubscription:
|
65
|
-
` + n.map(function(i,
|
66
|
-
return
|
65
|
+
` + n.map(function(i, s) {
|
66
|
+
return s + 1 + ") " + i.toString();
|
67
67
|
}).join(`
|
68
68
|
`) : "", this.name = "UnsubscriptionError", this.errors = n;
|
69
69
|
};
|
@@ -79,7 +79,7 @@ var tr = function() {
|
|
79
79
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
80
80
|
}
|
81
81
|
return t.prototype.unsubscribe = function() {
|
82
|
-
var r, n, i,
|
82
|
+
var r, n, i, s, c;
|
83
83
|
if (!this.closed) {
|
84
84
|
this.closed = !0;
|
85
85
|
var f = this._parentage;
|
@@ -101,10 +101,10 @@ var tr = function() {
|
|
101
101
|
}
|
102
102
|
else
|
103
103
|
f.remove(this);
|
104
|
-
var
|
105
|
-
if (yt(
|
104
|
+
var k = this.initialTeardown;
|
105
|
+
if (yt(k))
|
106
106
|
try {
|
107
|
-
|
107
|
+
k();
|
108
108
|
} catch (l) {
|
109
109
|
c = l instanceof Zr ? l.errors : [l];
|
110
110
|
}
|
@@ -124,7 +124,7 @@ var tr = function() {
|
|
124
124
|
i = { error: l };
|
125
125
|
} finally {
|
126
126
|
try {
|
127
|
-
p && !p.done && (
|
127
|
+
p && !p.done && (s = y.return) && s.call(y);
|
128
128
|
} finally {
|
129
129
|
if (i) throw i.error;
|
130
130
|
}
|
@@ -203,8 +203,8 @@ var Zn = function(t) {
|
|
203
203
|
var i = t.call(this) || this;
|
204
204
|
return i.isStopped = !1, n ? (i.destination = n, Xn(n) && n.add(i)) : i.destination = Fi, i;
|
205
205
|
}
|
206
|
-
return r.create = function(n, i,
|
207
|
-
return new un(n, i,
|
206
|
+
return r.create = function(n, i, s) {
|
207
|
+
return new un(n, i, s);
|
208
208
|
}, r.prototype.next = function(n) {
|
209
209
|
this.isStopped || this._next(n);
|
210
210
|
}, r.prototype.error = function(n) {
|
@@ -265,13 +265,13 @@ var ji = function() {
|
|
265
265
|
}, t;
|
266
266
|
}(), un = function(t) {
|
267
267
|
be(r, t);
|
268
|
-
function r(n, i,
|
268
|
+
function r(n, i, s) {
|
269
269
|
var c = t.call(this) || this, f;
|
270
270
|
if (yt(n) || !n)
|
271
271
|
f = {
|
272
272
|
next: n ?? void 0,
|
273
273
|
error: i ?? void 0,
|
274
|
-
complete:
|
274
|
+
complete: s ?? void 0
|
275
275
|
};
|
276
276
|
else {
|
277
277
|
var d;
|
@@ -306,8 +306,8 @@ function Ni(t) {
|
|
306
306
|
}
|
307
307
|
function Hi(t) {
|
308
308
|
return t.length === 0 ? Ni : t.length === 1 ? t[0] : function(n) {
|
309
|
-
return t.reduce(function(i,
|
310
|
-
return
|
309
|
+
return t.reduce(function(i, s) {
|
310
|
+
return s(i);
|
311
311
|
}, n);
|
312
312
|
};
|
313
313
|
}
|
@@ -319,10 +319,10 @@ var En = function() {
|
|
319
319
|
var n = new t();
|
320
320
|
return n.source = this, n.operator = r, n;
|
321
321
|
}, t.prototype.subscribe = function(r, n, i) {
|
322
|
-
var
|
322
|
+
var s = this, c = Li(r) ? r : new un(r, n, i);
|
323
323
|
return Xe(function() {
|
324
|
-
var f =
|
325
|
-
c.add(d ? d.call(c, M) : M ?
|
324
|
+
var f = s, d = f.operator, M = f.source;
|
325
|
+
c.add(d ? d.call(c, M) : M ? s._subscribe(c) : s._trySubscribe(c));
|
326
326
|
}), c;
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
328
328
|
try {
|
@@ -332,7 +332,7 @@ var En = function() {
|
|
332
332
|
}
|
333
333
|
}, t.prototype.forEach = function(r, n) {
|
334
334
|
var i = this;
|
335
|
-
return n = On(n), new n(function(
|
335
|
+
return n = On(n), new n(function(s, c) {
|
336
336
|
var f = new un({
|
337
337
|
next: function(d) {
|
338
338
|
try {
|
@@ -342,7 +342,7 @@ var En = function() {
|
|
342
342
|
}
|
343
343
|
},
|
344
344
|
error: c,
|
345
|
-
complete:
|
345
|
+
complete: s
|
346
346
|
});
|
347
347
|
i.subscribe(f);
|
348
348
|
});
|
@@ -357,12 +357,12 @@ var En = function() {
|
|
357
357
|
return Hi(r)(this);
|
358
358
|
}, t.prototype.toPromise = function(r) {
|
359
359
|
var n = this;
|
360
|
-
return r = On(r), new r(function(i,
|
360
|
+
return r = On(r), new r(function(i, s) {
|
361
361
|
var c;
|
362
362
|
n.subscribe(function(f) {
|
363
363
|
return c = f;
|
364
364
|
}, function(f) {
|
365
|
-
return
|
365
|
+
return s(f);
|
366
366
|
}, function() {
|
367
367
|
return i(c);
|
368
368
|
});
|
@@ -400,7 +400,7 @@ var Gi = Yn(function(t) {
|
|
400
400
|
}, r.prototype.next = function(n) {
|
401
401
|
var i = this;
|
402
402
|
Xe(function() {
|
403
|
-
var
|
403
|
+
var s, c;
|
404
404
|
if (i._throwIfClosed(), !i.isStopped) {
|
405
405
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
406
406
|
try {
|
@@ -409,12 +409,12 @@ var Gi = Yn(function(t) {
|
|
409
409
|
M.next(n);
|
410
410
|
}
|
411
411
|
} catch (R) {
|
412
|
-
|
412
|
+
s = { error: R };
|
413
413
|
} finally {
|
414
414
|
try {
|
415
415
|
d && !d.done && (c = f.return) && c.call(f);
|
416
416
|
} finally {
|
417
|
-
if (
|
417
|
+
if (s) throw s.error;
|
418
418
|
}
|
419
419
|
}
|
420
420
|
}
|
@@ -424,8 +424,8 @@ var Gi = Yn(function(t) {
|
|
424
424
|
Xe(function() {
|
425
425
|
if (i._throwIfClosed(), !i.isStopped) {
|
426
426
|
i.hasError = i.isStopped = !0, i.thrownError = n;
|
427
|
-
for (var
|
428
|
-
|
427
|
+
for (var s = i.observers; s.length; )
|
428
|
+
s.shift().error(n);
|
429
429
|
}
|
430
430
|
});
|
431
431
|
}, r.prototype.complete = function() {
|
@@ -451,13 +451,13 @@ var Gi = Yn(function(t) {
|
|
451
451
|
}, r.prototype._subscribe = function(n) {
|
452
452
|
return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
|
453
453
|
}, r.prototype._innerSubscribe = function(n) {
|
454
|
-
var i = this,
|
454
|
+
var i = this, s = this, c = s.hasError, f = s.isStopped, d = s.observers;
|
455
455
|
return c || f ? Vn : (this.currentObservers = null, d.push(n), new tr(function() {
|
456
456
|
i.currentObservers = null, cn(d, n);
|
457
457
|
}));
|
458
458
|
}, r.prototype._checkFinalizedStatuses = function(n) {
|
459
|
-
var i = this,
|
460
|
-
|
459
|
+
var i = this, s = i.hasError, c = i.thrownError, f = i.isStopped;
|
460
|
+
s ? n.error(c) : f && n.complete();
|
461
461
|
}, r.prototype.asObservable = function() {
|
462
462
|
var n = new En();
|
463
463
|
return n.source = this, n;
|
@@ -467,21 +467,21 @@ var Gi = Yn(function(t) {
|
|
467
467
|
}(En), xn = function(t) {
|
468
468
|
be(r, t);
|
469
469
|
function r(n, i) {
|
470
|
-
var
|
471
|
-
return
|
470
|
+
var s = t.call(this) || this;
|
471
|
+
return s.destination = n, s.source = i, s;
|
472
472
|
}
|
473
473
|
return r.prototype.next = function(n) {
|
474
|
-
var i,
|
475
|
-
(
|
474
|
+
var i, s;
|
475
|
+
(s = (i = this.destination) === null || i === void 0 ? void 0 : i.next) === null || s === void 0 || s.call(i, n);
|
476
476
|
}, r.prototype.error = function(n) {
|
477
|
-
var i,
|
478
|
-
(
|
477
|
+
var i, s;
|
478
|
+
(s = (i = this.destination) === null || i === void 0 ? void 0 : i.error) === null || s === void 0 || s.call(i, n);
|
479
479
|
}, r.prototype.complete = function() {
|
480
480
|
var n, i;
|
481
481
|
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.complete) === null || i === void 0 || i.call(n);
|
482
482
|
}, r.prototype._subscribe = function(n) {
|
483
|
-
var i,
|
484
|
-
return (
|
483
|
+
var i, s;
|
484
|
+
return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && s !== void 0 ? s : Vn;
|
485
485
|
}, r;
|
486
486
|
}(Qn), Mn = function(t) {
|
487
487
|
be(r, t);
|
@@ -499,9 +499,9 @@ var Gi = Yn(function(t) {
|
|
499
499
|
var i = t.prototype._subscribe.call(this, n);
|
500
500
|
return !i.closed && n.next(this._value), i;
|
501
501
|
}, r.prototype.getValue = function() {
|
502
|
-
var n = this, i = n.hasError,
|
502
|
+
var n = this, i = n.hasError, s = n.thrownError, c = n._value;
|
503
503
|
if (i)
|
504
|
-
throw
|
504
|
+
throw s;
|
505
505
|
return this._throwIfClosed(), c;
|
506
506
|
}, r.prototype.next = function(n) {
|
507
507
|
t.prototype.next.call(this, this._value = n);
|
@@ -513,8 +513,8 @@ function bn(t) {
|
|
513
513
|
var qe = { exports: {} };
|
514
514
|
qe.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__",
|
517
|
-
N[Dt] = N[Ct] = N[Ie] = N[ir] = N[ar] = N[sr] = N[or] = N[z] = N[cr] = !0, N[d] = N[M] = N[P] = N[
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, f = 9007199254740991, d = "[object Arguments]", M = "[object Array]", R = "[object AsyncFunction]", k = "[object Boolean]", H = "[object Date]", y = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", l = "[object Map]", b = "[object Number]", v = "[object Null]", m = "[object Object]", g = "[object Promise]", _ = "[object Proxy]", A = "[object RegExp]", E = "[object Set]", T = "[object String]", x = "[object Symbol]", S = "[object Undefined]", w = "[object WeakMap]", P = "[object ArrayBuffer]", F = "[object DataView]", Dt = "[object Float32Array]", Ct = "[object Float64Array]", Ie = "[object Int8Array]", ir = "[object Int16Array]", ar = "[object Int32Array]", sr = "[object Uint8Array]", or = "[object Uint8ClampedArray]", z = "[object Uint16Array]", cr = "[object Uint32Array]", ur = /[\\^$.*+?()[\]{}|]/g, rt = /^\[object .+?Constructor\]$/, Se = /^(?:0|[1-9]\d*)$/, N = {};
|
517
|
+
N[Dt] = N[Ct] = N[Ie] = N[ir] = N[ar] = N[sr] = N[or] = N[z] = N[cr] = !0, N[d] = N[M] = N[P] = N[k] = N[F] = N[H] = N[y] = N[p] = N[l] = N[b] = N[m] = N[A] = N[E] = N[T] = N[w] = !1;
|
518
518
|
var we = typeof et == "object" && et && et.Object === Object && et, lr = typeof self == "object" && self && self.Object === Object && self, nt = we || lr || Function("return this")(), Te = r && !r.nodeType && r, ke = Te && !0 && t && !t.nodeType && t, Yt = ke && ke.exports === Te, Vt = Yt && we.process, Ae = function() {
|
519
519
|
try {
|
520
520
|
return Vt && Vt.binding && Vt.binding("util");
|
@@ -522,26 +522,26 @@ qe.exports;
|
|
522
522
|
}
|
523
523
|
}(), Xt = Ae && Ae.isTypedArray;
|
524
524
|
function Ee(e, a) {
|
525
|
-
for (var
|
526
|
-
var C = e[
|
527
|
-
a(C,
|
525
|
+
for (var o = -1, u = e == null ? 0 : e.length, O = 0, I = []; ++o < u; ) {
|
526
|
+
var C = e[o];
|
527
|
+
a(C, o, e) && (I[O++] = C);
|
528
528
|
}
|
529
529
|
return I;
|
530
530
|
}
|
531
531
|
function qt(e, a) {
|
532
|
-
for (var
|
533
|
-
e[O +
|
532
|
+
for (var o = -1, u = a.length, O = e.length; ++o < u; )
|
533
|
+
e[O + o] = a[o];
|
534
534
|
return e;
|
535
535
|
}
|
536
536
|
function Oe(e, a) {
|
537
|
-
for (var
|
538
|
-
if (a(e[
|
537
|
+
for (var o = -1, u = e == null ? 0 : e.length; ++o < u; )
|
538
|
+
if (a(e[o], o, e))
|
539
539
|
return !0;
|
540
540
|
return !1;
|
541
541
|
}
|
542
542
|
function fr(e, a) {
|
543
|
-
for (var
|
544
|
-
u[
|
543
|
+
for (var o = -1, u = Array(e); ++o < e; )
|
544
|
+
u[o] = a(o);
|
545
545
|
return u;
|
546
546
|
}
|
547
547
|
function pr(e) {
|
@@ -556,31 +556,31 @@ qe.exports;
|
|
556
556
|
return e == null ? void 0 : e[a];
|
557
557
|
}
|
558
558
|
function xe(e) {
|
559
|
-
var a = -1,
|
559
|
+
var a = -1, o = Array(e.size);
|
560
560
|
return e.forEach(function(u, O) {
|
561
|
-
|
562
|
-
}),
|
561
|
+
o[++a] = [O, u];
|
562
|
+
}), o;
|
563
563
|
}
|
564
564
|
function Me(e, a) {
|
565
|
-
return function(
|
566
|
-
return e(a(
|
565
|
+
return function(o) {
|
566
|
+
return e(a(o));
|
567
567
|
};
|
568
568
|
}
|
569
569
|
function ot(e) {
|
570
|
-
var a = -1,
|
570
|
+
var a = -1, o = Array(e.size);
|
571
571
|
return e.forEach(function(u) {
|
572
|
-
|
573
|
-
}),
|
572
|
+
o[++a] = u;
|
573
|
+
}), o;
|
574
574
|
}
|
575
|
-
var Rt = Array.prototype, dr = Function.prototype, _t = Object.prototype, Ft = nt["__core-js_shared__"], Zt = dr.toString,
|
575
|
+
var Rt = Array.prototype, dr = Function.prototype, _t = Object.prototype, Ft = nt["__core-js_shared__"], Zt = dr.toString, tt = _t.hasOwnProperty, Pe = function() {
|
576
576
|
var e = /[^.]+$/.exec(Ft && Ft.keys && Ft.keys.IE_PROTO || "");
|
577
577
|
return e ? "Symbol(src)_1." + e : "";
|
578
578
|
}(), De = _t.toString, hr = RegExp(
|
579
|
-
"^" + Zt.call(
|
579
|
+
"^" + Zt.call(tt).replace(ur, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
580
580
|
), Qt = Yt ? nt.Buffer : void 0, zt = nt.Symbol, Ce = nt.Uint8Array, Nt = _t.propertyIsEnumerable, vt = Rt.splice, it = zt ? zt.toStringTag : void 0, Ht = Object.getOwnPropertySymbols, te = Qt ? Qt.isBuffer : void 0, It = Me(Object.keys, Object), ee = pt(nt, "DataView"), St = pt(nt, "Map"), re = pt(nt, "Promise"), ne = pt(nt, "Set"), ie = pt(nt, "WeakMap"), mt = pt(Object, "create"), je = V(ee), ft = V(St), yr = V(re), mr = V(ne), br = V(ie), Re = zt ? zt.prototype : void 0, ae = Re ? Re.valueOf : void 0;
|
581
581
|
function W(e) {
|
582
|
-
var a = -1,
|
583
|
-
for (this.clear(); ++a <
|
582
|
+
var a = -1, o = e == null ? 0 : e.length;
|
583
|
+
for (this.clear(); ++a < o; ) {
|
584
584
|
var u = e[a];
|
585
585
|
this.set(u[0], u[1]);
|
586
586
|
}
|
@@ -595,23 +595,23 @@ qe.exports;
|
|
595
595
|
function vr(e) {
|
596
596
|
var a = this.__data__;
|
597
597
|
if (mt) {
|
598
|
-
var
|
599
|
-
return
|
598
|
+
var o = a[e];
|
599
|
+
return o === i ? void 0 : o;
|
600
600
|
}
|
601
|
-
return
|
601
|
+
return tt.call(a, e) ? a[e] : void 0;
|
602
602
|
}
|
603
603
|
function Ir(e) {
|
604
604
|
var a = this.__data__;
|
605
|
-
return mt ? a[e] !== void 0 :
|
605
|
+
return mt ? a[e] !== void 0 : tt.call(a, e);
|
606
606
|
}
|
607
607
|
function Sr(e, a) {
|
608
|
-
var
|
609
|
-
return this.size += this.has(e) ? 0 : 1,
|
608
|
+
var o = this.__data__;
|
609
|
+
return this.size += this.has(e) ? 0 : 1, o[e] = mt && a === void 0 ? i : a, this;
|
610
610
|
}
|
611
611
|
W.prototype.clear = gr, W.prototype.delete = _r, W.prototype.get = vr, W.prototype.has = Ir, W.prototype.set = Sr;
|
612
612
|
function $(e) {
|
613
|
-
var a = -1,
|
614
|
-
for (this.clear(); ++a <
|
613
|
+
var a = -1, o = e == null ? 0 : e.length;
|
614
|
+
for (this.clear(); ++a < o; ) {
|
615
615
|
var u = e[a];
|
616
616
|
this.set(u[0], u[1]);
|
617
617
|
}
|
@@ -620,27 +620,27 @@ qe.exports;
|
|
620
620
|
this.__data__ = [], this.size = 0;
|
621
621
|
}
|
622
622
|
function Tr(e) {
|
623
|
-
var a = this.__data__,
|
624
|
-
if (
|
623
|
+
var a = this.__data__, o = Gt(a, e);
|
624
|
+
if (o < 0)
|
625
625
|
return !1;
|
626
626
|
var u = a.length - 1;
|
627
|
-
return
|
627
|
+
return o == u ? a.pop() : vt.call(a, o, 1), --this.size, !0;
|
628
628
|
}
|
629
629
|
function kr(e) {
|
630
|
-
var a = this.__data__,
|
631
|
-
return
|
630
|
+
var a = this.__data__, o = Gt(a, e);
|
631
|
+
return o < 0 ? void 0 : a[o][1];
|
632
632
|
}
|
633
633
|
function Ar(e) {
|
634
634
|
return Gt(this.__data__, e) > -1;
|
635
635
|
}
|
636
636
|
function Er(e, a) {
|
637
|
-
var
|
638
|
-
return u < 0 ? (++this.size,
|
637
|
+
var o = this.__data__, u = Gt(o, e);
|
638
|
+
return u < 0 ? (++this.size, o.push([e, a])) : o[u][1] = a, this;
|
639
639
|
}
|
640
640
|
$.prototype.clear = wr, $.prototype.delete = Tr, $.prototype.get = kr, $.prototype.has = Ar, $.prototype.set = Er;
|
641
641
|
function X(e) {
|
642
|
-
var a = -1,
|
643
|
-
for (this.clear(); ++a <
|
642
|
+
var a = -1, o = e == null ? 0 : e.length;
|
643
|
+
for (this.clear(); ++a < o; ) {
|
644
644
|
var u = e[a];
|
645
645
|
this.set(u[0], u[1]);
|
646
646
|
}
|
@@ -663,13 +663,13 @@ qe.exports;
|
|
663
663
|
return at(this, e).has(e);
|
664
664
|
}
|
665
665
|
function Dr(e, a) {
|
666
|
-
var
|
667
|
-
return
|
666
|
+
var o = at(this, e), u = o.size;
|
667
|
+
return o.set(e, a), this.size += o.size == u ? 0 : 1, this;
|
668
668
|
}
|
669
669
|
X.prototype.clear = Or, X.prototype.delete = xr, X.prototype.get = Mr, X.prototype.has = Pr, X.prototype.set = Dr;
|
670
670
|
function Ut(e) {
|
671
|
-
var a = -1,
|
672
|
-
for (this.__data__ = new X(); ++a <
|
671
|
+
var a = -1, o = e == null ? 0 : e.length;
|
672
|
+
for (this.__data__ = new X(); ++a < o; )
|
673
673
|
this.add(e[a]);
|
674
674
|
}
|
675
675
|
function Fe(e) {
|
@@ -687,8 +687,8 @@ qe.exports;
|
|
687
687
|
this.__data__ = new $(), this.size = 0;
|
688
688
|
}
|
689
689
|
function Cr(e) {
|
690
|
-
var a = this.__data__,
|
691
|
-
return this.size = a.size,
|
690
|
+
var a = this.__data__, o = a.delete(e);
|
691
|
+
return this.size = a.size, o;
|
692
692
|
}
|
693
693
|
function jr(e) {
|
694
694
|
return this.__data__.get(e);
|
@@ -697,20 +697,20 @@ qe.exports;
|
|
697
697
|
return this.__data__.has(e);
|
698
698
|
}
|
699
699
|
function Fr(e, a) {
|
700
|
-
var
|
701
|
-
if (
|
702
|
-
var u =
|
700
|
+
var o = this.__data__;
|
701
|
+
if (o instanceof $) {
|
702
|
+
var u = o.__data__;
|
703
703
|
if (!St || u.length < n - 1)
|
704
|
-
return u.push([e, a]), this.size = ++
|
705
|
-
|
704
|
+
return u.push([e, a]), this.size = ++o.size, this;
|
705
|
+
o = this.__data__ = new X(u);
|
706
706
|
}
|
707
|
-
return
|
707
|
+
return o.set(e, a), this.size = o.size, this;
|
708
708
|
}
|
709
709
|
ct.prototype.clear = se, ct.prototype.delete = Cr, ct.prototype.get = jr, ct.prototype.has = Rr, ct.prototype.set = Fr;
|
710
710
|
function zr(e, a) {
|
711
|
-
var
|
711
|
+
var o = Wt(e), u = !o && Le(e), O = !o && !u && Bt(e), I = !o && !u && !O && Be(e), C = o || u || O || I, D = C ? fr(e.length, String) : [], U = D.length;
|
712
712
|
for (var j in e)
|
713
|
-
|
713
|
+
tt.call(e, j) && !(C && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
714
|
(j == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
715
|
O && (j == "offset" || j == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
716
|
I && (j == "buffer" || j == "byteLength" || j == "byteOffset") || // Skip index properties.
|
@@ -718,14 +718,14 @@ qe.exports;
|
|
718
718
|
return D;
|
719
719
|
}
|
720
720
|
function Gt(e, a) {
|
721
|
-
for (var
|
722
|
-
if (Ue(e[
|
723
|
-
return
|
721
|
+
for (var o = e.length; o--; )
|
722
|
+
if (Ue(e[o][0], a))
|
723
|
+
return o;
|
724
724
|
return -1;
|
725
725
|
}
|
726
|
-
function oe(e, a,
|
726
|
+
function oe(e, a, o) {
|
727
727
|
var u = a(e);
|
728
|
-
return Wt(e) ? u : qt(u,
|
728
|
+
return Wt(e) ? u : qt(u, o(e));
|
729
729
|
}
|
730
730
|
function wt(e) {
|
731
731
|
return e == null ? e === void 0 ? S : v : it && it in Object(e) ? dt(e) : He(e);
|
@@ -733,10 +733,10 @@ qe.exports;
|
|
733
733
|
function ze(e) {
|
734
734
|
return lt(e) && wt(e) == d;
|
735
735
|
}
|
736
|
-
function Ne(e, a,
|
737
|
-
return e === a ? !0 : e == null || a == null || !lt(e) && !lt(a) ? e !== e && a !== a : Nr(e, a,
|
736
|
+
function Ne(e, a, o, u, O) {
|
737
|
+
return e === a ? !0 : e == null || a == null || !lt(e) && !lt(a) ? e !== e && a !== a : Nr(e, a, o, u, Ne, O);
|
738
738
|
}
|
739
|
-
function Nr(e, a,
|
739
|
+
function Nr(e, a, o, u, O, I) {
|
740
740
|
var C = Wt(e), D = Wt(a), U = C ? M : ut(e), j = D ? M : ut(a);
|
741
741
|
U = U == d ? m : U, j = j == d ? m : j;
|
742
742
|
var K = U == m, q = j == m, L = U == j;
|
@@ -746,15 +746,15 @@ qe.exports;
|
|
746
746
|
C = !0, K = !1;
|
747
747
|
}
|
748
748
|
if (L && !K)
|
749
|
-
return I || (I = new ct()), C || Be(e) ? ce(e, a,
|
750
|
-
if (!(
|
751
|
-
var Y = K &&
|
749
|
+
return I || (I = new ct()), C || Be(e) ? ce(e, a, o, u, O, I) : Gr(e, a, U, o, u, O, I);
|
750
|
+
if (!(o & s)) {
|
751
|
+
var Y = K && tt.call(e, "__wrapped__"), B = q && tt.call(a, "__wrapped__");
|
752
752
|
if (Y || B) {
|
753
753
|
var bt = Y ? e.value() : e, ht = B ? a.value() : a;
|
754
|
-
return I || (I = new ct()), O(bt, ht,
|
754
|
+
return I || (I = new ct()), O(bt, ht, o, u, I);
|
755
755
|
}
|
756
756
|
}
|
757
|
-
return L ? (I || (I = new ct()), Wr(e, a,
|
757
|
+
return L ? (I || (I = new ct()), Wr(e, a, o, u, O, I)) : !1;
|
758
758
|
}
|
759
759
|
function Hr(e) {
|
760
760
|
if (!We(e) || Yr(e))
|
@@ -769,18 +769,18 @@ qe.exports;
|
|
769
769
|
if (!Vr(e))
|
770
770
|
return It(e);
|
771
771
|
var a = [];
|
772
|
-
for (var
|
773
|
-
|
772
|
+
for (var o in Object(e))
|
773
|
+
tt.call(e, o) && o != "constructor" && a.push(o);
|
774
774
|
return a;
|
775
775
|
}
|
776
|
-
function ce(e, a,
|
777
|
-
var C =
|
776
|
+
function ce(e, a, o, u, O, I) {
|
777
|
+
var C = o & s, D = e.length, U = a.length;
|
778
778
|
if (D != U && !(C && U > D))
|
779
779
|
return !1;
|
780
780
|
var j = I.get(e);
|
781
781
|
if (j && I.get(a))
|
782
782
|
return j == a;
|
783
|
-
var K = -1, q = !0, L =
|
783
|
+
var K = -1, q = !0, L = o & c ? new Ut() : void 0;
|
784
784
|
for (I.set(e, a), I.set(a, e); ++K < D; ) {
|
785
785
|
var Y = e[K], B = a[K];
|
786
786
|
if (u)
|
@@ -793,40 +793,40 @@ qe.exports;
|
|
793
793
|
}
|
794
794
|
if (L) {
|
795
795
|
if (!Oe(a, function(ht, kt) {
|
796
|
-
if (!jt(L, kt) && (Y === ht || O(Y, ht,
|
796
|
+
if (!jt(L, kt) && (Y === ht || O(Y, ht, o, u, I)))
|
797
797
|
return L.push(kt);
|
798
798
|
})) {
|
799
799
|
q = !1;
|
800
800
|
break;
|
801
801
|
}
|
802
|
-
} else if (!(Y === B || O(Y, B,
|
802
|
+
} else if (!(Y === B || O(Y, B, o, u, I))) {
|
803
803
|
q = !1;
|
804
804
|
break;
|
805
805
|
}
|
806
806
|
}
|
807
807
|
return I.delete(e), I.delete(a), q;
|
808
808
|
}
|
809
|
-
function Gr(e, a,
|
810
|
-
switch (
|
809
|
+
function Gr(e, a, o, u, O, I, C) {
|
810
|
+
switch (o) {
|
811
811
|
case F:
|
812
812
|
if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
|
813
813
|
return !1;
|
814
814
|
e = e.buffer, a = a.buffer;
|
815
815
|
case P:
|
816
816
|
return !(e.byteLength != a.byteLength || !I(new Ce(e), new Ce(a)));
|
817
|
-
case
|
817
|
+
case k:
|
818
818
|
case H:
|
819
819
|
case b:
|
820
820
|
return Ue(+e, +a);
|
821
821
|
case y:
|
822
822
|
return e.name == a.name && e.message == a.message;
|
823
823
|
case A:
|
824
|
-
case
|
824
|
+
case T:
|
825
825
|
return e == a + "";
|
826
826
|
case l:
|
827
827
|
var D = xe;
|
828
|
-
case
|
829
|
-
var U = u &
|
828
|
+
case E:
|
829
|
+
var U = u & s;
|
830
830
|
if (D || (D = ot), e.size != a.size && !U)
|
831
831
|
return !1;
|
832
832
|
var j = C.get(e);
|
@@ -841,13 +841,13 @@ qe.exports;
|
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function Wr(e, a,
|
845
|
-
var C =
|
844
|
+
function Wr(e, a, o, u, O, I) {
|
845
|
+
var C = o & s, D = Tt(e), U = D.length, j = Tt(a), K = j.length;
|
846
846
|
if (U != K && !C)
|
847
847
|
return !1;
|
848
848
|
for (var q = U; q--; ) {
|
849
849
|
var L = D[q];
|
850
|
-
if (!(C ? L in a :
|
850
|
+
if (!(C ? L in a : tt.call(a, L)))
|
851
851
|
return !1;
|
852
852
|
}
|
853
853
|
var Y = I.get(e);
|
@@ -860,7 +860,7 @@ qe.exports;
|
|
860
860
|
var ht = e[L], kt = a[L];
|
861
861
|
if (u)
|
862
862
|
var Tn = C ? u(kt, ht, L, a, e, I) : u(ht, kt, L, e, a, I);
|
863
|
-
if (!(Tn === void 0 ? ht === kt || O(ht, kt,
|
863
|
+
if (!(Tn === void 0 ? ht === kt || O(ht, kt, o, u, I) : Tn)) {
|
864
864
|
B = !1;
|
865
865
|
break;
|
866
866
|
}
|
@@ -876,30 +876,30 @@ qe.exports;
|
|
876
876
|
return oe(e, fe, Br);
|
877
877
|
}
|
878
878
|
function at(e, a) {
|
879
|
-
var
|
880
|
-
return Kr(a) ?
|
879
|
+
var o = e.__data__;
|
880
|
+
return Kr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
881
881
|
}
|
882
882
|
function pt(e, a) {
|
883
|
-
var
|
884
|
-
return Hr(
|
883
|
+
var o = Jt(e, a);
|
884
|
+
return Hr(o) ? o : void 0;
|
885
885
|
}
|
886
886
|
function dt(e) {
|
887
|
-
var a =
|
887
|
+
var a = tt.call(e, it), o = e[it];
|
888
888
|
try {
|
889
889
|
e[it] = void 0;
|
890
890
|
var u = !0;
|
891
891
|
} catch {
|
892
892
|
}
|
893
893
|
var O = De.call(e);
|
894
|
-
return u && (a ? e[it] =
|
894
|
+
return u && (a ? e[it] = o : delete e[it]), O;
|
895
895
|
}
|
896
896
|
var Br = Ht ? function(e) {
|
897
897
|
return e == null ? [] : (e = Object(e), Ee(Ht(e), function(a) {
|
898
898
|
return Nt.call(e, a);
|
899
899
|
}));
|
900
900
|
} : qr, ut = wt;
|
901
|
-
(ee && ut(new ee(new ArrayBuffer(1))) != F || St && ut(new St()) != l || re && ut(re.resolve()) != g || ne && ut(new ne()) !=
|
902
|
-
var a = wt(e),
|
901
|
+
(ee && ut(new ee(new ArrayBuffer(1))) != F || St && ut(new St()) != l || re && ut(re.resolve()) != g || ne && ut(new ne()) != E || ie && ut(new ie()) != w) && (ut = function(e) {
|
902
|
+
var a = wt(e), o = a == m ? e.constructor : void 0, u = o ? V(o) : "";
|
903
903
|
if (u)
|
904
904
|
switch (u) {
|
905
905
|
case je:
|
@@ -909,9 +909,9 @@ qe.exports;
|
|
909
909
|
case yr:
|
910
910
|
return g;
|
911
911
|
case mr:
|
912
|
-
return w;
|
913
|
-
case br:
|
914
912
|
return E;
|
913
|
+
case br:
|
914
|
+
return w;
|
915
915
|
}
|
916
916
|
return a;
|
917
917
|
});
|
@@ -926,8 +926,8 @@ qe.exports;
|
|
926
926
|
return !!Pe && Pe in e;
|
927
927
|
}
|
928
928
|
function Vr(e) {
|
929
|
-
var a = e && e.constructor,
|
930
|
-
return e ===
|
929
|
+
var a = e && e.constructor, o = typeof a == "function" && a.prototype || _t;
|
930
|
+
return e === o;
|
931
931
|
}
|
932
932
|
function He(e) {
|
933
933
|
return De.call(e);
|
@@ -951,7 +951,7 @@ qe.exports;
|
|
951
951
|
var Le = ze(/* @__PURE__ */ function() {
|
952
952
|
return arguments;
|
953
953
|
}()) ? ze : function(e) {
|
954
|
-
return lt(e) &&
|
954
|
+
return lt(e) && tt.call(e, "callee") && !Nt.call(e, "callee");
|
955
955
|
}, Wt = Array.isArray;
|
956
956
|
function ue(e) {
|
957
957
|
return e != null && le(e.length) && !Ge(e);
|
@@ -993,8 +993,8 @@ const st = /* @__PURE__ */ bn(Wi);
|
|
993
993
|
var Je = { exports: {} };
|
994
994
|
Je.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__",
|
997
|
-
z[c] = z[f] = z[A] = z[
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]", M = "[object Date]", R = "[object Error]", k = "[object Function]", H = "[object GeneratorFunction]", y = "[object Map]", p = "[object Number]", h = "[object Object]", l = "[object Promise]", b = "[object RegExp]", v = "[object Set]", m = "[object String]", g = "[object Symbol]", _ = "[object WeakMap]", A = "[object ArrayBuffer]", E = "[object DataView]", T = "[object Float32Array]", x = "[object Float64Array]", S = "[object Int8Array]", w = "[object Int16Array]", P = "[object Int32Array]", F = "[object Uint8Array]", Dt = "[object Uint8ClampedArray]", Ct = "[object Uint16Array]", Ie = "[object Uint32Array]", ir = /[\\^$.*+?()[\]{}|]/g, ar = /\w*$/, sr = /^\[object .+?Constructor\]$/, or = /^(?:0|[1-9]\d*)$/, z = {};
|
997
|
+
z[c] = z[f] = z[A] = z[E] = z[d] = z[M] = z[T] = z[x] = z[S] = z[w] = z[P] = z[y] = z[p] = z[h] = z[b] = z[v] = z[m] = z[g] = z[F] = z[Dt] = z[Ct] = z[Ie] = !0, z[R] = z[k] = z[_] = !1;
|
998
998
|
var cr = typeof et == "object" && et && et.Object === Object && et, ur = typeof self == "object" && self && self.Object === Object && self, rt = cr || ur || Function("return this")(), Se = r && !r.nodeType && r, N = Se && !0 && t && !t.nodeType && t, we = N && N.exports === Se;
|
999
999
|
function lr(e, a) {
|
1000
1000
|
return e.set(a[0], a[1]), e;
|
@@ -1003,23 +1003,23 @@ Je.exports;
|
|
1003
1003
|
return e.add(a), e;
|
1004
1004
|
}
|
1005
1005
|
function Te(e, a) {
|
1006
|
-
for (var
|
1006
|
+
for (var o = -1, u = e ? e.length : 0; ++o < u && a(e[o], o, e) !== !1; )
|
1007
1007
|
;
|
1008
1008
|
return e;
|
1009
1009
|
}
|
1010
1010
|
function ke(e, a) {
|
1011
|
-
for (var
|
1012
|
-
e[O +
|
1011
|
+
for (var o = -1, u = a.length, O = e.length; ++o < u; )
|
1012
|
+
e[O + o] = a[o];
|
1013
1013
|
return e;
|
1014
1014
|
}
|
1015
|
-
function Yt(e, a,
|
1015
|
+
function Yt(e, a, o, u) {
|
1016
1016
|
for (var O = -1, I = e ? e.length : 0; ++O < I; )
|
1017
|
-
|
1018
|
-
return
|
1017
|
+
o = a(o, e[O], O, e);
|
1018
|
+
return o;
|
1019
1019
|
}
|
1020
1020
|
function Vt(e, a) {
|
1021
|
-
for (var
|
1022
|
-
u[
|
1021
|
+
for (var o = -1, u = Array(e); ++o < e; )
|
1022
|
+
u[o] = a(o);
|
1023
1023
|
return u;
|
1024
1024
|
}
|
1025
1025
|
function Ae(e, a) {
|
@@ -1035,31 +1035,31 @@ Je.exports;
|
|
1035
1035
|
return a;
|
1036
1036
|
}
|
1037
1037
|
function Ee(e) {
|
1038
|
-
var a = -1,
|
1038
|
+
var a = -1, o = Array(e.size);
|
1039
1039
|
return e.forEach(function(u, O) {
|
1040
|
-
|
1041
|
-
}),
|
1040
|
+
o[++a] = [O, u];
|
1041
|
+
}), o;
|
1042
1042
|
}
|
1043
1043
|
function qt(e, a) {
|
1044
|
-
return function(
|
1045
|
-
return e(a(
|
1044
|
+
return function(o) {
|
1045
|
+
return e(a(o));
|
1046
1046
|
};
|
1047
1047
|
}
|
1048
1048
|
function Oe(e) {
|
1049
|
-
var a = -1,
|
1049
|
+
var a = -1, o = Array(e.size);
|
1050
1050
|
return e.forEach(function(u) {
|
1051
|
-
|
1052
|
-
}),
|
1051
|
+
o[++a] = u;
|
1052
|
+
}), o;
|
1053
1053
|
}
|
1054
1054
|
var fr = Array.prototype, pr = Function.prototype, jt = Object.prototype, Jt = rt["__core-js_shared__"], xe = function() {
|
1055
1055
|
var e = /[^.]+$/.exec(Jt && Jt.keys && Jt.keys.IE_PROTO || "");
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
1057
1057
|
}(), Me = pr.toString, ot = jt.hasOwnProperty, Rt = jt.toString, dr = RegExp(
|
1058
1058
|
"^" + Me.call(ot).replace(ir, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
1059
|
-
), _t = we ? rt.Buffer : void 0, Ft = rt.Symbol, Zt = rt.Uint8Array,
|
1059
|
+
), _t = we ? rt.Buffer : void 0, Ft = rt.Symbol, Zt = rt.Uint8Array, tt = qt(Object.getPrototypeOf, Object), Pe = Object.create, De = jt.propertyIsEnumerable, hr = fr.splice, Qt = Object.getOwnPropertySymbols, zt = _t ? _t.isBuffer : void 0, Ce = qt(Object.keys, Object), Nt = at(rt, "DataView"), vt = at(rt, "Map"), it = at(rt, "Promise"), Ht = at(rt, "Set"), te = at(rt, "WeakMap"), It = at(Object, "create"), ee = V(Nt), St = V(vt), re = V(it), ne = V(Ht), ie = V(te), mt = Ft ? Ft.prototype : void 0, je = mt ? mt.valueOf : void 0;
|
1060
1060
|
function ft(e) {
|
1061
|
-
var a = -1,
|
1062
|
-
for (this.clear(); ++a <
|
1061
|
+
var a = -1, o = e ? e.length : 0;
|
1062
|
+
for (this.clear(); ++a < o; ) {
|
1063
1063
|
var u = e[a];
|
1064
1064
|
this.set(u[0], u[1]);
|
1065
1065
|
}
|
@@ -1073,8 +1073,8 @@ Je.exports;
|
|
1073
1073
|
function br(e) {
|
1074
1074
|
var a = this.__data__;
|
1075
1075
|
if (It) {
|
1076
|
-
var
|
1077
|
-
return
|
1076
|
+
var o = a[e];
|
1077
|
+
return o === i ? void 0 : o;
|
1078
1078
|
}
|
1079
1079
|
return ot.call(a, e) ? a[e] : void 0;
|
1080
1080
|
}
|
@@ -1083,13 +1083,13 @@ Je.exports;
|
|
1083
1083
|
return It ? a[e] !== void 0 : ot.call(a, e);
|
1084
1084
|
}
|
1085
1085
|
function ae(e, a) {
|
1086
|
-
var
|
1087
|
-
return
|
1086
|
+
var o = this.__data__;
|
1087
|
+
return o[e] = It && a === void 0 ? i : a, this;
|
1088
1088
|
}
|
1089
1089
|
ft.prototype.clear = yr, ft.prototype.delete = mr, ft.prototype.get = br, ft.prototype.has = Re, ft.prototype.set = ae;
|
1090
1090
|
function W(e) {
|
1091
|
-
var a = -1,
|
1092
|
-
for (this.clear(); ++a <
|
1091
|
+
var a = -1, o = e ? e.length : 0;
|
1092
|
+
for (this.clear(); ++a < o; ) {
|
1093
1093
|
var u = e[a];
|
1094
1094
|
this.set(u[0], u[1]);
|
1095
1095
|
}
|
@@ -1098,27 +1098,27 @@ Je.exports;
|
|
1098
1098
|
this.__data__ = [];
|
1099
1099
|
}
|
1100
1100
|
function _r(e) {
|
1101
|
-
var a = this.__data__,
|
1102
|
-
if (
|
1101
|
+
var a = this.__data__, o = Lt(a, e);
|
1102
|
+
if (o < 0)
|
1103
1103
|
return !1;
|
1104
1104
|
var u = a.length - 1;
|
1105
|
-
return
|
1105
|
+
return o == u ? a.pop() : hr.call(a, o, 1), !0;
|
1106
1106
|
}
|
1107
1107
|
function vr(e) {
|
1108
|
-
var a = this.__data__,
|
1109
|
-
return
|
1108
|
+
var a = this.__data__, o = Lt(a, e);
|
1109
|
+
return o < 0 ? void 0 : a[o][1];
|
1110
1110
|
}
|
1111
1111
|
function Ir(e) {
|
1112
1112
|
return Lt(this.__data__, e) > -1;
|
1113
1113
|
}
|
1114
1114
|
function Sr(e, a) {
|
1115
|
-
var
|
1116
|
-
return u < 0 ?
|
1115
|
+
var o = this.__data__, u = Lt(o, e);
|
1116
|
+
return u < 0 ? o.push([e, a]) : o[u][1] = a, this;
|
1117
1117
|
}
|
1118
1118
|
W.prototype.clear = gr, W.prototype.delete = _r, W.prototype.get = vr, W.prototype.has = Ir, W.prototype.set = Sr;
|
1119
1119
|
function $(e) {
|
1120
|
-
var a = -1,
|
1121
|
-
for (this.clear(); ++a <
|
1120
|
+
var a = -1, o = e ? e.length : 0;
|
1121
|
+
for (this.clear(); ++a < o; ) {
|
1122
1122
|
var u = e[a];
|
1123
1123
|
this.set(u[0], u[1]);
|
1124
1124
|
}
|
@@ -1159,36 +1159,36 @@ Je.exports;
|
|
1159
1159
|
return this.__data__.has(e);
|
1160
1160
|
}
|
1161
1161
|
function Dr(e, a) {
|
1162
|
-
var
|
1163
|
-
if (
|
1164
|
-
var u =
|
1162
|
+
var o = this.__data__;
|
1163
|
+
if (o instanceof W) {
|
1164
|
+
var u = o.__data__;
|
1165
1165
|
if (!vt || u.length < n - 1)
|
1166
1166
|
return u.push([e, a]), this;
|
1167
|
-
|
1167
|
+
o = this.__data__ = new $(u);
|
1168
1168
|
}
|
1169
|
-
return
|
1169
|
+
return o.set(e, a), this;
|
1170
1170
|
}
|
1171
1171
|
X.prototype.clear = Or, X.prototype.delete = xr, X.prototype.get = Mr, X.prototype.has = Pr, X.prototype.set = Dr;
|
1172
1172
|
function Ut(e, a) {
|
1173
|
-
var
|
1173
|
+
var o = ue(e) || Wt(e) ? Vt(e.length, String) : [], u = o.length, O = !!u;
|
1174
1174
|
for (var I in e)
|
1175
|
-
ot.call(e, I) && !(O && (I == "length" || Kr(I, u))) &&
|
1176
|
-
return
|
1175
|
+
ot.call(e, I) && !(O && (I == "length" || Kr(I, u))) && o.push(I);
|
1176
|
+
return o;
|
1177
1177
|
}
|
1178
|
-
function Fe(e, a,
|
1178
|
+
function Fe(e, a, o) {
|
1179
1179
|
var u = e[a];
|
1180
|
-
(!(ot.call(e, a) && Le(u,
|
1180
|
+
(!(ot.call(e, a) && Le(u, o)) || o === void 0 && !(a in e)) && (e[a] = o);
|
1181
1181
|
}
|
1182
1182
|
function Lt(e, a) {
|
1183
|
-
for (var
|
1184
|
-
if (Le(e[
|
1185
|
-
return
|
1183
|
+
for (var o = e.length; o--; )
|
1184
|
+
if (Le(e[o][0], a))
|
1185
|
+
return o;
|
1186
1186
|
return -1;
|
1187
1187
|
}
|
1188
1188
|
function ct(e, a) {
|
1189
1189
|
return e && ce(a, fe(a), e);
|
1190
1190
|
}
|
1191
|
-
function se(e, a,
|
1191
|
+
function se(e, a, o, u, O, I, C) {
|
1192
1192
|
var D;
|
1193
1193
|
if (u && (D = I ? u(e, O, I, C) : u(e)), D !== void 0)
|
1194
1194
|
return D;
|
@@ -1199,7 +1199,7 @@ Je.exports;
|
|
1199
1199
|
if (D = Br(e), !a)
|
1200
1200
|
return Lr(e, D);
|
1201
1201
|
} else {
|
1202
|
-
var j = dt(e), K = j ==
|
1202
|
+
var j = dt(e), K = j == k || j == H;
|
1203
1203
|
if (Ge(e))
|
1204
1204
|
return Gt(e, a);
|
1205
1205
|
if (j == h || j == c || K && !I) {
|
@@ -1218,17 +1218,17 @@ Je.exports;
|
|
1218
1218
|
if (q)
|
1219
1219
|
return q;
|
1220
1220
|
if (C.set(e, D), !U)
|
1221
|
-
var L =
|
1221
|
+
var L = o ? Wr(e) : fe(e);
|
1222
1222
|
return Te(L || e, function(Y, B) {
|
1223
|
-
L && (B = Y, Y = e[B]), Fe(D, B, se(Y, a,
|
1223
|
+
L && (B = Y, Y = e[B]), Fe(D, B, se(Y, a, o, u, B, e, C));
|
1224
1224
|
}), D;
|
1225
1225
|
}
|
1226
1226
|
function Cr(e) {
|
1227
1227
|
return lt(e) ? Pe(e) : {};
|
1228
1228
|
}
|
1229
|
-
function jr(e, a,
|
1229
|
+
function jr(e, a, o) {
|
1230
1230
|
var u = a(e);
|
1231
|
-
return ue(e) ? u : ke(u,
|
1231
|
+
return ue(e) ? u : ke(u, o(e));
|
1232
1232
|
}
|
1233
1233
|
function Rr(e) {
|
1234
1234
|
return Rt.call(e);
|
@@ -1243,56 +1243,56 @@ Je.exports;
|
|
1243
1243
|
if (!He(e))
|
1244
1244
|
return Ce(e);
|
1245
1245
|
var a = [];
|
1246
|
-
for (var
|
1247
|
-
ot.call(e,
|
1246
|
+
for (var o in Object(e))
|
1247
|
+
ot.call(e, o) && o != "constructor" && a.push(o);
|
1248
1248
|
return a;
|
1249
1249
|
}
|
1250
1250
|
function Gt(e, a) {
|
1251
1251
|
if (a)
|
1252
1252
|
return e.slice();
|
1253
|
-
var
|
1254
|
-
return e.copy(
|
1253
|
+
var o = new e.constructor(e.length);
|
1254
|
+
return e.copy(o), o;
|
1255
1255
|
}
|
1256
1256
|
function oe(e) {
|
1257
1257
|
var a = new e.constructor(e.byteLength);
|
1258
1258
|
return new Zt(a).set(new Zt(e)), a;
|
1259
1259
|
}
|
1260
1260
|
function wt(e, a) {
|
1261
|
-
var
|
1262
|
-
return new e.constructor(
|
1261
|
+
var o = a ? oe(e.buffer) : e.buffer;
|
1262
|
+
return new e.constructor(o, e.byteOffset, e.byteLength);
|
1263
1263
|
}
|
1264
|
-
function ze(e, a,
|
1265
|
-
var u = a ?
|
1264
|
+
function ze(e, a, o) {
|
1265
|
+
var u = a ? o(Ee(e), !0) : Ee(e);
|
1266
1266
|
return Yt(u, lr, new e.constructor());
|
1267
1267
|
}
|
1268
1268
|
function Ne(e) {
|
1269
1269
|
var a = new e.constructor(e.source, ar.exec(e));
|
1270
1270
|
return a.lastIndex = e.lastIndex, a;
|
1271
1271
|
}
|
1272
|
-
function Nr(e, a,
|
1273
|
-
var u = a ?
|
1272
|
+
function Nr(e, a, o) {
|
1273
|
+
var u = a ? o(Oe(e), !0) : Oe(e);
|
1274
1274
|
return Yt(u, nt, new e.constructor());
|
1275
1275
|
}
|
1276
1276
|
function Hr(e) {
|
1277
1277
|
return je ? Object(je.call(e)) : {};
|
1278
1278
|
}
|
1279
1279
|
function Ur(e, a) {
|
1280
|
-
var
|
1281
|
-
return new e.constructor(
|
1280
|
+
var o = a ? oe(e.buffer) : e.buffer;
|
1281
|
+
return new e.constructor(o, e.byteOffset, e.length);
|
1282
1282
|
}
|
1283
1283
|
function Lr(e, a) {
|
1284
|
-
var
|
1285
|
-
for (a || (a = Array(u)); ++
|
1286
|
-
a[
|
1284
|
+
var o = -1, u = e.length;
|
1285
|
+
for (a || (a = Array(u)); ++o < u; )
|
1286
|
+
a[o] = e[o];
|
1287
1287
|
return a;
|
1288
1288
|
}
|
1289
|
-
function ce(e, a,
|
1290
|
-
|
1289
|
+
function ce(e, a, o, u) {
|
1290
|
+
o || (o = {});
|
1291
1291
|
for (var O = -1, I = a.length; ++O < I; ) {
|
1292
1292
|
var C = a[O], D = void 0;
|
1293
|
-
Fe(
|
1293
|
+
Fe(o, C, D === void 0 ? e[C] : D);
|
1294
1294
|
}
|
1295
|
-
return
|
1295
|
+
return o;
|
1296
1296
|
}
|
1297
1297
|
function Gr(e, a) {
|
1298
1298
|
return ce(e, pt(e), a);
|
@@ -1301,20 +1301,20 @@ Je.exports;
|
|
1301
1301
|
return jr(e, fe, pt);
|
1302
1302
|
}
|
1303
1303
|
function Tt(e, a) {
|
1304
|
-
var
|
1305
|
-
return Yr(a) ?
|
1304
|
+
var o = e.__data__;
|
1305
|
+
return Yr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
1306
1306
|
}
|
1307
1307
|
function at(e, a) {
|
1308
|
-
var
|
1309
|
-
return Fr(
|
1308
|
+
var o = Ae(e, a);
|
1309
|
+
return Fr(o) ? o : void 0;
|
1310
1310
|
}
|
1311
1311
|
var pt = Qt ? qt(Qt, Object) : qr, dt = Rr;
|
1312
|
-
(Nt && dt(new Nt(new ArrayBuffer(1))) !=
|
1313
|
-
var a = Rt.call(e),
|
1312
|
+
(Nt && dt(new Nt(new ArrayBuffer(1))) != E || vt && dt(new vt()) != y || it && dt(it.resolve()) != l || Ht && dt(new Ht()) != v || te && dt(new te()) != _) && (dt = function(e) {
|
1313
|
+
var a = Rt.call(e), o = a == h ? e.constructor : void 0, u = o ? V(o) : void 0;
|
1314
1314
|
if (u)
|
1315
1315
|
switch (u) {
|
1316
1316
|
case ee:
|
1317
|
-
return
|
1317
|
+
return E;
|
1318
1318
|
case St:
|
1319
1319
|
return y;
|
1320
1320
|
case re:
|
@@ -1327,13 +1327,13 @@ Je.exports;
|
|
1327
1327
|
return a;
|
1328
1328
|
});
|
1329
1329
|
function Br(e) {
|
1330
|
-
var a = e.length,
|
1331
|
-
return a && typeof e[0] == "string" && ot.call(e, "index") && (
|
1330
|
+
var a = e.length, o = e.constructor(a);
|
1331
|
+
return a && typeof e[0] == "string" && ot.call(e, "index") && (o.index = e.index, o.input = e.input), o;
|
1332
1332
|
}
|
1333
1333
|
function ut(e) {
|
1334
|
-
return typeof e.constructor == "function" && !He(e) ? Cr(
|
1334
|
+
return typeof e.constructor == "function" && !He(e) ? Cr(tt(e)) : {};
|
1335
1335
|
}
|
1336
|
-
function $r(e, a,
|
1336
|
+
function $r(e, a, o, u) {
|
1337
1337
|
var O = e.constructor;
|
1338
1338
|
switch (a) {
|
1339
1339
|
case A:
|
@@ -1341,12 +1341,12 @@ Je.exports;
|
|
1341
1341
|
case d:
|
1342
1342
|
case M:
|
1343
1343
|
return new O(+e);
|
1344
|
-
case
|
1344
|
+
case E:
|
1345
1345
|
return wt(e, u);
|
1346
|
-
case
|
1346
|
+
case T:
|
1347
1347
|
case x:
|
1348
1348
|
case S:
|
1349
|
-
case
|
1349
|
+
case w:
|
1350
1350
|
case P:
|
1351
1351
|
case F:
|
1352
1352
|
case Dt:
|
@@ -1354,20 +1354,20 @@ Je.exports;
|
|
1354
1354
|
case Ie:
|
1355
1355
|
return Ur(e, u);
|
1356
1356
|
case y:
|
1357
|
-
return ze(e, u,
|
1357
|
+
return ze(e, u, o);
|
1358
1358
|
case p:
|
1359
1359
|
case m:
|
1360
1360
|
return new O(e);
|
1361
1361
|
case b:
|
1362
1362
|
return Ne(e);
|
1363
1363
|
case v:
|
1364
|
-
return Nr(e, u,
|
1364
|
+
return Nr(e, u, o);
|
1365
1365
|
case g:
|
1366
1366
|
return Hr(e);
|
1367
1367
|
}
|
1368
1368
|
}
|
1369
1369
|
function Kr(e, a) {
|
1370
|
-
return a = a ??
|
1370
|
+
return a = a ?? s, !!a && (typeof e == "number" || or.test(e)) && e > -1 && e % 1 == 0 && e < a;
|
1371
1371
|
}
|
1372
1372
|
function Yr(e) {
|
1373
1373
|
var a = typeof e;
|
@@ -1377,8 +1377,8 @@ Je.exports;
|
|
1377
1377
|
return !!xe && xe in e;
|
1378
1378
|
}
|
1379
1379
|
function He(e) {
|
1380
|
-
var a = e && e.constructor,
|
1381
|
-
return e ===
|
1380
|
+
var a = e && e.constructor, o = typeof a == "function" && a.prototype || jt;
|
1381
|
+
return e === o;
|
1382
1382
|
}
|
1383
1383
|
function V(e) {
|
1384
1384
|
if (e != null) {
|
@@ -1412,10 +1412,10 @@ Je.exports;
|
|
1412
1412
|
var Ge = zt || Jr;
|
1413
1413
|
function le(e) {
|
1414
1414
|
var a = lt(e) ? Rt.call(e) : "";
|
1415
|
-
return a ==
|
1415
|
+
return a == k || a == H;
|
1416
1416
|
}
|
1417
1417
|
function We(e) {
|
1418
|
-
return typeof e == "number" && e > -1 && e % 1 == 0 && e <=
|
1418
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= s;
|
1419
1419
|
}
|
1420
1420
|
function lt(e) {
|
1421
1421
|
var a = typeof e;
|
@@ -1436,45 +1436,45 @@ Je.exports;
|
|
1436
1436
|
t.exports = Ue;
|
1437
1437
|
})(Je, Je.exports);
|
1438
1438
|
var Bi = Je.exports;
|
1439
|
-
const
|
1439
|
+
const J = /* @__PURE__ */ bn(Bi), $i = (t) => new Promise((r, n) => {
|
1440
1440
|
const i = new Image();
|
1441
1441
|
console.warn("update cdn config for cors?"), i.onload = () => {
|
1442
|
-
const
|
1443
|
-
r({ width:
|
1444
|
-
}, i.onerror = (
|
1445
|
-
n(
|
1442
|
+
const s = i.width, c = i.height;
|
1443
|
+
r({ width: s, height: c });
|
1444
|
+
}, i.onerror = (s) => {
|
1445
|
+
n(s);
|
1446
1446
|
}, i.crossOrigin = "anonymous", i.src = t;
|
1447
1447
|
}), Ki = (t) => new Promise((r, n) => {
|
1448
1448
|
const i = new Audio();
|
1449
1449
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
1450
|
-
const
|
1451
|
-
r({ duration:
|
1452
|
-
}), i.addEventListener("error", (
|
1453
|
-
n(
|
1450
|
+
const s = i.duration * 1e3;
|
1451
|
+
r({ duration: s });
|
1452
|
+
}), i.addEventListener("error", (s) => {
|
1453
|
+
n(s);
|
1454
1454
|
}), i.src = t, i.crossOrigin = "anonymous", i.load();
|
1455
1455
|
}), Yi = (t) => new Promise((r, n) => {
|
1456
1456
|
const i = document.createElement("video");
|
1457
1457
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
1458
|
-
const
|
1459
|
-
r({ duration:
|
1460
|
-
}), i.addEventListener("error", (
|
1461
|
-
n(
|
1458
|
+
const s = i.duration * 1e3, c = i.videoWidth, f = i.videoHeight;
|
1459
|
+
r({ duration: s, width: c, height: f });
|
1460
|
+
}), i.addEventListener("error", (s) => {
|
1461
|
+
n(s);
|
1462
1462
|
}), i.src = t, i.load();
|
1463
1463
|
}), ti = (t, r) => {
|
1464
1464
|
const n = document.createElement("div");
|
1465
|
-
Object.keys(r).forEach((
|
1466
|
-
|
1465
|
+
Object.keys(r).forEach((s) => {
|
1466
|
+
s !== "height" && (n.style[s] = r[s]);
|
1467
1467
|
}), document.body.appendChild(n), n.textContent = t, n.style.whiteSpace = "normal", n.style.position = "absolute", n.style.visibility = "hidden", n.style.display = "inline-block", n.style.width = r.width + "px", n.style.fontSize = r.fontSize + "px";
|
1468
1468
|
const i = getComputedStyle(n).height;
|
1469
1469
|
return document.body.removeChild(n), parseFloat(i);
|
1470
1470
|
}, gn = (t) => {
|
1471
1471
|
const r = t.map((n) => new FontFace(n.fontFamily, `url(${n.url})`).load().catch((i) => i));
|
1472
1472
|
return r.length === 0 ? Promise.resolve(!0) : new Promise((n, i) => {
|
1473
|
-
Promise.all(r).then((
|
1474
|
-
|
1473
|
+
Promise.all(r).then((s) => {
|
1474
|
+
s.forEach((c) => {
|
1475
1475
|
c && c.family && (document.fonts.add(c), n(!0));
|
1476
1476
|
});
|
1477
|
-
}).catch((
|
1477
|
+
}).catch((s) => i(s));
|
1478
1478
|
});
|
1479
1479
|
}, er = {
|
1480
1480
|
color: "#000000",
|
@@ -1520,18 +1520,18 @@ function rr(t, r) {
|
|
1520
1520
|
const n = {
|
1521
1521
|
x: t.size.width / 2,
|
1522
1522
|
y: t.size.height / 2
|
1523
|
-
}, i = { x: r.width / 2, y: r.height / 2 },
|
1523
|
+
}, i = { x: r.width / 2, y: r.height / 2 }, s = Math.min(
|
1524
1524
|
t.size.width / r.width,
|
1525
1525
|
t.size.height / r.height
|
1526
1526
|
), c = n.x - i.x;
|
1527
1527
|
return {
|
1528
1528
|
top: `${n.y - i.y}px`,
|
1529
1529
|
left: `${c}px`,
|
1530
|
-
transform: `scale(${
|
1530
|
+
transform: `scale(${s})`
|
1531
1531
|
};
|
1532
1532
|
}
|
1533
1533
|
const Pn = async (t, r) => {
|
1534
|
-
const n = t.details.src, i = await Yi(n),
|
1534
|
+
const n = t.details.src, i = await Yi(n), s = rr(r, {
|
1535
1535
|
...i
|
1536
1536
|
}), c = ei(t.trim, { duration: i.duration }), f = {
|
1537
1537
|
width: i.width,
|
@@ -1548,16 +1548,17 @@ const Pn = async (t, r) => {
|
|
1548
1548
|
borderColor: t.details.borderColor || "#000000",
|
1549
1549
|
// Default border color
|
1550
1550
|
boxShadow: t.details.boxShadow || er,
|
1551
|
-
top:
|
1551
|
+
top: t.details.top || s.top || "0px",
|
1552
1552
|
// Default top
|
1553
|
-
left:
|
1553
|
+
left: t.details.left || s.left || "0px",
|
1554
1554
|
// Default left
|
1555
|
-
transform:
|
1555
|
+
transform: t.details.transform || s.transform,
|
1556
1556
|
// Default transform
|
1557
1557
|
blur: t.details.blur || 0,
|
1558
1558
|
brightness: t.details.brightness || 100,
|
1559
1559
|
flipX: t.details.flipX || !1,
|
1560
|
-
flipY: t.details.flipY || !1
|
1560
|
+
flipY: t.details.flipY || !1,
|
1561
|
+
rotate: t.details.rotate || "0deg"
|
1561
1562
|
};
|
1562
1563
|
return {
|
1563
1564
|
...t,
|
@@ -1569,24 +1570,24 @@ const Pn = async (t, r) => {
|
|
1569
1570
|
display: ge(t.display, { duration: i.duration, trim: c })
|
1570
1571
|
};
|
1571
1572
|
}, Dn = async (t) => {
|
1572
|
-
const r = t.id, n = t.details,
|
1573
|
+
const r = t.id, n = t.details, s = (await Ki(n.src)).duration, c = ei(t.trim, { duration: s });
|
1573
1574
|
return {
|
1574
1575
|
id: r,
|
1575
1576
|
name: "",
|
1576
1577
|
type: "audio",
|
1577
|
-
display: ge(t.display, { duration:
|
1578
|
+
display: ge(t.display, { duration: s, trim: c }),
|
1578
1579
|
trim: c,
|
1579
1580
|
playbackRate: t.playbackRate || 1,
|
1580
1581
|
details: {
|
1581
1582
|
src: n.src,
|
1582
|
-
duration:
|
1583
|
+
duration: s,
|
1583
1584
|
volume: n.volume ?? 100
|
1584
1585
|
// Default volume
|
1585
1586
|
},
|
1586
1587
|
metadata: { ...t.metadata }
|
1587
1588
|
};
|
1588
1589
|
}, Cn = async (t, r) => {
|
1589
|
-
const n = t.details, i = await $i(n.src),
|
1590
|
+
const n = t.details, i = await $i(n.src), s = rr(r, i);
|
1590
1591
|
return {
|
1591
1592
|
id: t.id,
|
1592
1593
|
type: "image",
|
@@ -1602,7 +1603,7 @@ const Pn = async (t, r) => {
|
|
1602
1603
|
// Default height
|
1603
1604
|
opacity: n.opacity ?? 100,
|
1604
1605
|
// Default opacity
|
1605
|
-
transform:
|
1606
|
+
transform: n.transform || s.transform,
|
1606
1607
|
// Default transform
|
1607
1608
|
border: n.border || "none",
|
1608
1609
|
// Default border
|
@@ -1610,9 +1611,9 @@ const Pn = async (t, r) => {
|
|
1610
1611
|
// Default border radius
|
1611
1612
|
boxShadow: n.boxShadow || er,
|
1612
1613
|
// Default box shadow
|
1613
|
-
top:
|
1614
|
+
top: n.top || s.top || "0px",
|
1614
1615
|
// Default top
|
1615
|
-
left:
|
1616
|
+
left: n.left || s.left || "0px",
|
1616
1617
|
// Default left
|
1617
1618
|
borderWidth: n.borderWidth ?? 0,
|
1618
1619
|
// Default border width
|
@@ -1621,19 +1622,20 @@ const Pn = async (t, r) => {
|
|
1621
1622
|
blur: n.blur || 0,
|
1622
1623
|
brightness: n.brightness || 100,
|
1623
1624
|
flipX: n.flipX || !1,
|
1624
|
-
flipY: n.flipY || !1
|
1625
|
+
flipY: n.flipY || !1,
|
1626
|
+
rotate: n.rotate || "0deg"
|
1625
1627
|
},
|
1626
1628
|
metadata: t.metadata || {}
|
1627
1629
|
};
|
1628
1630
|
}, jn = async (t, r) => {
|
1629
1631
|
const n = t;
|
1630
|
-
await gn([
|
1632
|
+
n.details.fontUrl && await gn([
|
1631
1633
|
{
|
1632
1634
|
fontFamily: n.details.fontFamily,
|
1633
1635
|
url: n.details.fontUrl
|
1634
1636
|
}
|
1635
1637
|
]);
|
1636
|
-
const i = n.id,
|
1638
|
+
const i = n.id, s = n.details, c = ri(s), f = ti(n.details.text, c), d = rr(r, {
|
1637
1639
|
width: c.width,
|
1638
1640
|
height: f
|
1639
1641
|
});
|
@@ -1644,29 +1646,29 @@ const Pn = async (t, r) => {
|
|
1644
1646
|
display: ge(n.display),
|
1645
1647
|
details: {
|
1646
1648
|
...c,
|
1647
|
-
text:
|
1649
|
+
text: s.text || "",
|
1648
1650
|
// Default text content
|
1649
1651
|
height: f,
|
1650
1652
|
// Default height
|
1651
|
-
fontUrl:
|
1652
|
-
top: d.top,
|
1653
|
-
left: d.left,
|
1654
|
-
borderWidth:
|
1655
|
-
borderColor:
|
1656
|
-
boxShadow:
|
1657
|
-
words:
|
1653
|
+
fontUrl: s.fontUrl,
|
1654
|
+
top: c.top || d.top,
|
1655
|
+
left: c.left || d.left,
|
1656
|
+
borderWidth: s.borderWidth || 0,
|
1657
|
+
borderColor: s.borderColor || "#000000",
|
1658
|
+
boxShadow: s.boxShadow || er,
|
1659
|
+
words: s.words || []
|
1658
1660
|
},
|
1659
1661
|
metadata: {}
|
1660
1662
|
};
|
1661
1663
|
}, Rn = async (t, r) => {
|
1662
|
-
await gn([
|
1664
|
+
t.details.fontUrl && await gn([
|
1663
1665
|
{
|
1664
1666
|
fontFamily: t.details.fontFamily,
|
1665
1667
|
url: t.details.fontUrl
|
1666
1668
|
}
|
1667
1669
|
]);
|
1668
|
-
const n = t.id, i = t.details,
|
1669
|
-
width:
|
1670
|
+
const n = t.id, i = t.details, s = ri(i), c = ti(t.details.text, s), f = rr(r, {
|
1671
|
+
width: s.width,
|
1670
1672
|
height: c
|
1671
1673
|
});
|
1672
1674
|
return {
|
@@ -1675,14 +1677,14 @@ const Pn = async (t, r) => {
|
|
1675
1677
|
type: "text",
|
1676
1678
|
display: ge(t.display),
|
1677
1679
|
details: {
|
1678
|
-
...
|
1680
|
+
...s,
|
1679
1681
|
text: i.text || "",
|
1680
1682
|
// Default text content
|
1681
1683
|
height: c,
|
1682
1684
|
// Default height
|
1683
1685
|
fontUrl: i.fontUrl,
|
1684
|
-
top: f.top,
|
1685
|
-
left: f.left,
|
1686
|
+
top: s.top || f.top,
|
1687
|
+
left: s.left || f.left,
|
1686
1688
|
borderWidth: i.borderWidth || 0,
|
1687
1689
|
borderColor: i.borderColor || "#000000",
|
1688
1690
|
boxShadow: i.boxShadow || er
|
@@ -1740,7 +1742,7 @@ let ln = (t = 21) => {
|
|
1740
1742
|
function Xi(t, r) {
|
1741
1743
|
return t.filter((i) => ({
|
1742
1744
|
...i,
|
1743
|
-
items: i.items.filter((
|
1745
|
+
items: i.items.filter((s) => !r.includes(s))
|
1744
1746
|
})).filter((i) => !i.items.length);
|
1745
1747
|
}
|
1746
1748
|
function Fn(t = 16) {
|
@@ -1749,8 +1751,8 @@ function Fn(t = 16) {
|
|
1749
1751
|
return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
|
1750
1752
|
}
|
1751
1753
|
const Ve = (t) => Object.keys(t).reduce((r, n) => {
|
1752
|
-
const { display: i, playbackRate:
|
1753
|
-
return Math.max(r, i.to / (
|
1754
|
+
const { display: i, playbackRate: s } = t[n];
|
1755
|
+
return Math.max(r, i.to / (s || 1));
|
1754
1756
|
}, 0);
|
1755
1757
|
function qi(t) {
|
1756
1758
|
const r = $t.pipe(
|
@@ -1759,7 +1761,7 @@ function qi(t) {
|
|
1759
1761
|
Kt(({ key: p }) => p.startsWith(hi))
|
1760
1762
|
), i = $t.pipe(
|
1761
1763
|
Kt(({ key: p }) => p.startsWith(yi))
|
1762
|
-
),
|
1764
|
+
), s = $t.pipe(
|
1763
1765
|
Kt(({ key: p }) => p.startsWith(mi))
|
1764
1766
|
), c = $t.pipe(
|
1765
1767
|
Kt(({ key: p }) => p.startsWith(bi))
|
@@ -1771,58 +1773,61 @@ function qi(t) {
|
|
1771
1773
|
const l = (h = p.value) == null ? void 0 : h.payload, b = l.trackItemIds, v = {}, m = l.trackItemDetailsMap;
|
1772
1774
|
console.warn("IMPROVE FONTS LOADING");
|
1773
1775
|
const g = b.map(async (A) => {
|
1776
|
+
var E;
|
1774
1777
|
try {
|
1775
|
-
const
|
1776
|
-
if (
|
1777
|
-
const
|
1778
|
-
{ id: A, details:
|
1778
|
+
const T = m[A];
|
1779
|
+
if (T.type === "image") {
|
1780
|
+
const x = await Cn(
|
1781
|
+
{ id: A, details: T.details },
|
1779
1782
|
{
|
1780
1783
|
size: {
|
1781
1784
|
width: 1080,
|
1782
1785
|
height: 1920
|
1783
1786
|
}
|
1784
1787
|
}
|
1785
|
-
), { details:
|
1786
|
-
m[A] = { type: "image", details:
|
1787
|
-
} else if (
|
1788
|
-
const
|
1789
|
-
|
1788
|
+
), { details: S, ...w } = x;
|
1789
|
+
m[A] = { type: "image", details: S }, v[A] = w;
|
1790
|
+
} else if (T.type === "video") {
|
1791
|
+
const x = J(
|
1792
|
+
(E = p.value) == null ? void 0 : E.payload.trackItemsMap[A]
|
1793
|
+
), S = await Pn(
|
1794
|
+
{ ...T, ...x },
|
1790
1795
|
{
|
1791
1796
|
size: {
|
1792
1797
|
width: 1080,
|
1793
1798
|
height: 1920
|
1794
1799
|
}
|
1795
1800
|
}
|
1796
|
-
), { details:
|
1797
|
-
m[A] = { type: "video", details:
|
1798
|
-
} else if (
|
1799
|
-
const
|
1801
|
+
), { details: w, ...P } = S;
|
1802
|
+
m[A] = { type: "video", details: w }, v[A] = P;
|
1803
|
+
} else if (T.type === "audio") {
|
1804
|
+
const x = await Dn({
|
1800
1805
|
id: A,
|
1801
|
-
details:
|
1802
|
-
}), { details:
|
1803
|
-
m[A] = { type: "audio", details:
|
1804
|
-
} else if (
|
1805
|
-
const
|
1806
|
-
{ id: A, details:
|
1806
|
+
details: T.details
|
1807
|
+
}), { details: S, ...w } = x;
|
1808
|
+
m[A] = { type: "audio", details: S }, v[A] = w;
|
1809
|
+
} else if (T.type === "caption") {
|
1810
|
+
const x = await jn(
|
1811
|
+
{ id: A, details: T.details },
|
1807
1812
|
{
|
1808
1813
|
size: {
|
1809
1814
|
width: 1080,
|
1810
1815
|
height: 1920
|
1811
1816
|
}
|
1812
1817
|
}
|
1813
|
-
), { details:
|
1814
|
-
m[A] = { type: "caption", details:
|
1815
|
-
} else if (
|
1816
|
-
const
|
1817
|
-
{ id: A, details:
|
1818
|
+
), { details: S, ...w } = x;
|
1819
|
+
m[A] = { type: "caption", details: S }, v[A] = w;
|
1820
|
+
} else if (T.type === "text") {
|
1821
|
+
const x = await Rn(
|
1822
|
+
{ id: A, details: T.details },
|
1818
1823
|
{
|
1819
1824
|
size: {
|
1820
1825
|
width: 1080,
|
1821
1826
|
height: 1920
|
1822
1827
|
}
|
1823
1828
|
}
|
1824
|
-
), { details:
|
1825
|
-
m[A] = { type: "
|
1829
|
+
), { details: S, ...w } = x;
|
1830
|
+
m[A] = { type: "text", details: S }, v[A] = w;
|
1826
1831
|
}
|
1827
1832
|
return !0;
|
1828
1833
|
} catch {
|
@@ -1833,50 +1838,51 @@ function qi(t) {
|
|
1833
1838
|
const _ = Ve(v);
|
1834
1839
|
t.updateState({
|
1835
1840
|
...l,
|
1841
|
+
trackItemsMap: v,
|
1836
1842
|
duration: _
|
1837
1843
|
});
|
1838
1844
|
}
|
1839
|
-
}), M =
|
1845
|
+
}), M = s.subscribe((p) => {
|
1840
1846
|
if (p.key === vi) return t.undo();
|
1841
1847
|
if (p.key === Ii) return t.redo();
|
1842
1848
|
}), R = i.subscribe((p) => {
|
1843
1849
|
var l, b, v;
|
1844
1850
|
const h = [];
|
1845
1851
|
if ((l = p.value) != null && l.payload.trackItemIds && (h.push((b = p.value) == null ? void 0 : b.payload.trackItemIds), t.updateState({ activeIds: h })), p.key === Si) {
|
1846
|
-
const m = (v = p.value) == null ? void 0 : v.payload.trackItemIds, g =
|
1852
|
+
const m = (v = p.value) == null ? void 0 : v.payload.trackItemIds, g = J(t.getState()), _ = m && m.length ? m : g.activeIds, A = g.trackItemIds, E = g.trackItemDetailsMap, T = A.filter(
|
1847
1853
|
(F) => !_.includes(F)
|
1848
1854
|
), x = Object.fromEntries(
|
1849
|
-
Object.entries(
|
1855
|
+
Object.entries(E).filter(
|
1850
1856
|
([F]) => !_.includes(F)
|
1851
1857
|
)
|
1852
1858
|
), S = Xi(
|
1853
1859
|
g.tracks,
|
1854
1860
|
_
|
1855
|
-
),
|
1861
|
+
), w = Object.fromEntries(
|
1856
1862
|
Object.entries(g.trackItemsMap).filter(
|
1857
1863
|
([F]) => !_.includes(F)
|
1858
1864
|
)
|
1859
1865
|
), P = Ve(g.trackItemsMap);
|
1860
1866
|
t.updateState(
|
1861
1867
|
{
|
1862
|
-
trackItemIds:
|
1868
|
+
trackItemIds: T,
|
1863
1869
|
trackItemDetailsMap: x,
|
1864
1870
|
activeIds: [],
|
1865
|
-
trackItemsMap:
|
1871
|
+
trackItemsMap: w,
|
1866
1872
|
tracks: S,
|
1867
1873
|
duration: P
|
1868
1874
|
},
|
1869
1875
|
{ updateHistory: !0, kind: "remove" }
|
1870
1876
|
);
|
1871
1877
|
}
|
1872
|
-
}),
|
1873
|
-
var m, g, _, A,
|
1874
|
-
const h =
|
1878
|
+
}), k = n.subscribe(async (p) => {
|
1879
|
+
var m, g, _, A, E;
|
1880
|
+
const h = J(t.getState());
|
1875
1881
|
let l = [], b = "text";
|
1876
1882
|
if (p.key === wi) {
|
1877
1883
|
b = "caption";
|
1878
|
-
const
|
1879
|
-
for (const P of
|
1884
|
+
const T = (m = p.value) == null ? void 0 : m.payload, x = [];
|
1885
|
+
for (const P of T) {
|
1880
1886
|
const F = jn(P, {
|
1881
1887
|
size: {
|
1882
1888
|
width: 1080,
|
@@ -1885,26 +1891,26 @@ function qi(t) {
|
|
1885
1891
|
});
|
1886
1892
|
x.push(F);
|
1887
1893
|
}
|
1888
|
-
const S = await Promise.all(x),
|
1894
|
+
const S = await Promise.all(x), w = [];
|
1889
1895
|
for (const P of S) {
|
1890
1896
|
const F = P.id;
|
1891
|
-
|
1897
|
+
w.push(F);
|
1892
1898
|
const { details: Dt, ...Ct } = P;
|
1893
1899
|
h.trackItemDetailsMap[F] = {
|
1894
1900
|
type: b,
|
1895
1901
|
details: Dt
|
1896
1902
|
}, h.trackItemsMap[F] = Ct, h.trackItemIds.push(F);
|
1897
1903
|
}
|
1898
|
-
l =
|
1904
|
+
l = w;
|
1899
1905
|
}
|
1900
1906
|
if (p.key === Ti) {
|
1901
1907
|
b = "text";
|
1902
|
-
const
|
1908
|
+
const T = await Rn((g = p.value) == null ? void 0 : g.payload, {
|
1903
1909
|
size: {
|
1904
1910
|
width: 1080,
|
1905
1911
|
height: 1920
|
1906
1912
|
}
|
1907
|
-
}), { details: x, ...S } =
|
1913
|
+
}), { details: x, ...S } = T;
|
1908
1914
|
h.trackItemDetailsMap[S.id] = {
|
1909
1915
|
type: b,
|
1910
1916
|
details: x
|
@@ -1912,12 +1918,12 @@ function qi(t) {
|
|
1912
1918
|
}
|
1913
1919
|
if (p.key === ki) {
|
1914
1920
|
b = "image";
|
1915
|
-
const
|
1921
|
+
const T = await Cn((_ = p.value) == null ? void 0 : _.payload, {
|
1916
1922
|
size: {
|
1917
1923
|
width: 1080,
|
1918
1924
|
height: 1920
|
1919
1925
|
}
|
1920
|
-
}), { details: x, ...S } =
|
1926
|
+
}), { details: x, ...S } = T;
|
1921
1927
|
h.trackItemDetailsMap[S.id] = {
|
1922
1928
|
type: b,
|
1923
1929
|
details: x
|
@@ -1925,7 +1931,7 @@ function qi(t) {
|
|
1925
1931
|
}
|
1926
1932
|
if (p.key === Ai) {
|
1927
1933
|
b = "audio";
|
1928
|
-
const
|
1934
|
+
const T = await Dn((A = p.value) == null ? void 0 : A.payload), { details: x, ...S } = T;
|
1929
1935
|
h.trackItemDetailsMap[S.id] = {
|
1930
1936
|
type: b,
|
1931
1937
|
details: x
|
@@ -1933,12 +1939,12 @@ function qi(t) {
|
|
1933
1939
|
}
|
1934
1940
|
if (p.key === Ei) {
|
1935
1941
|
b = "video";
|
1936
|
-
const
|
1942
|
+
const T = await Pn((E = p.value) == null ? void 0 : E.payload, {
|
1937
1943
|
size: {
|
1938
1944
|
width: 1080,
|
1939
1945
|
height: 1920
|
1940
1946
|
}
|
1941
|
-
}), { details: x, ...S } =
|
1947
|
+
}), { details: x, ...S } = T;
|
1942
1948
|
h.trackItemDetailsMap[S.id] = {
|
1943
1949
|
type: b,
|
1944
1950
|
details: x
|
@@ -1969,7 +1975,7 @@ function qi(t) {
|
|
1969
1975
|
}), H = c.subscribe(async (p) => {
|
1970
1976
|
var h;
|
1971
1977
|
if (p.key === Oi) {
|
1972
|
-
const l =
|
1978
|
+
const l = J(t.getState()), b = (h = p.value) == null ? void 0 : h.options.time;
|
1973
1979
|
if (l.activeIds.length === 1) {
|
1974
1980
|
const v = l.activeIds[0], m = l.trackItemsMap[v];
|
1975
1981
|
if (b >= m.display.to || b <= m.display.from)
|
@@ -1986,8 +1992,8 @@ function qi(t) {
|
|
1986
1992
|
to: m.display.to
|
1987
1993
|
}
|
1988
1994
|
};
|
1989
|
-
l.trackItemsMap[v].display.to = b, l.trackItemsMap[_] = A, l.trackItemIds.push(_), l.trackItemDetailsMap[_] = g, l.tracks.forEach((
|
1990
|
-
|
1995
|
+
l.trackItemsMap[v].display.to = b, l.trackItemsMap[_] = A, l.trackItemIds.push(_), l.trackItemDetailsMap[_] = g, l.tracks.forEach((E) => {
|
1996
|
+
E.items.includes(v) && E.items.push(_);
|
1991
1997
|
}), t.updateState(
|
1992
1998
|
{
|
1993
1999
|
trackItemDetailsMap: l.trackItemDetailsMap,
|
@@ -2004,7 +2010,7 @@ function qi(t) {
|
|
2004
2010
|
return;
|
2005
2011
|
}
|
2006
2012
|
if (p.key === xi) {
|
2007
|
-
const l =
|
2013
|
+
const l = J(t.getState());
|
2008
2014
|
if (l.activeIds.length) {
|
2009
2015
|
const b = l.activeIds, v = [], m = {
|
2010
2016
|
activeIds: b,
|
@@ -2024,28 +2030,28 @@ function qi(t) {
|
|
2024
2030
|
if (p.key === Mi) {
|
2025
2031
|
const l = localStorage.getItem("DesignComboTemp");
|
2026
2032
|
if (!l) return;
|
2027
|
-
const b =
|
2033
|
+
const b = J(t.getState()), v = JSON.parse(l), m = {}, g = v.trackItemsMap, _ = v.trackItemDetailsMap, A = v.tracks, E = [], T = v.activeIds.map(async (x) => {
|
2028
2034
|
const S = _[x];
|
2029
|
-
(S.type === "caption" || S.type === "text") && await gn([
|
2035
|
+
(S.type === "caption" || S.type === "text") && S.details.fontUrl && await gn([
|
2030
2036
|
{
|
2031
2037
|
fontFamily: S.details.fontFamily,
|
2032
2038
|
url: S.details.fontUrl
|
2033
2039
|
}
|
2034
2040
|
]);
|
2035
|
-
const
|
2036
|
-
return m[x] =
|
2041
|
+
const w = Fn();
|
2042
|
+
return m[x] = w, b.trackItemsMap[w] = {
|
2037
2043
|
...g[x],
|
2038
|
-
id:
|
2039
|
-
}, b.trackItemDetailsMap[
|
2044
|
+
id: w
|
2045
|
+
}, b.trackItemDetailsMap[w] = S, b.trackItemIds.push(w), !0;
|
2040
2046
|
});
|
2041
|
-
await Promise.all(
|
2042
|
-
const S = x.items.map((P) => m[P]),
|
2047
|
+
await Promise.all(T), A.forEach((x) => {
|
2048
|
+
const S = x.items.map((P) => m[P]), w = {
|
2043
2049
|
...x,
|
2044
2050
|
items: S,
|
2045
2051
|
id: ln()
|
2046
2052
|
};
|
2047
|
-
|
2048
|
-
}), b.tracks = [...b.tracks, ...
|
2053
|
+
E.push(w);
|
2054
|
+
}), b.tracks = [...b.tracks, ...E], t.updateState(
|
2049
2055
|
{
|
2050
2056
|
trackItemDetailsMap: b.trackItemDetailsMap,
|
2051
2057
|
tracks: b.tracks,
|
@@ -2061,14 +2067,14 @@ function qi(t) {
|
|
2061
2067
|
}), y = f.subscribe((p) => {
|
2062
2068
|
var h, l;
|
2063
2069
|
if (p.key === Pi) {
|
2064
|
-
const b =
|
2070
|
+
const b = J(t.getState()), v = b.trackItemDetailsMap, m = b.trackItemsMap, g = Object.keys((h = p.value) == null ? void 0 : h.payload);
|
2065
2071
|
if (!g.length) return;
|
2066
2072
|
const _ = (l = p.value) == null ? void 0 : l.payload;
|
2067
|
-
g.forEach((
|
2068
|
-
_[
|
2069
|
-
...v[
|
2070
|
-
..._[
|
2071
|
-
} : _[
|
2073
|
+
g.forEach((E) => {
|
2074
|
+
_[E].details ? v[E].details = {
|
2075
|
+
...v[E].details,
|
2076
|
+
..._[E].details
|
2077
|
+
} : _[E].playbackRate && (m[E].playbackRate = _[E].playbackRate);
|
2072
2078
|
});
|
2073
2079
|
const A = Ve(m);
|
2074
2080
|
t.updateState(
|
@@ -2086,47 +2092,47 @@ function qi(t) {
|
|
2086
2092
|
});
|
2087
2093
|
return {
|
2088
2094
|
unsubscribe: () => {
|
2089
|
-
|
2095
|
+
k.unsubscribe(), H.unsubscribe(), y.unsubscribe(), M.unsubscribe(), R.unsubscribe(), d.unsubscribe();
|
2090
2096
|
}
|
2091
2097
|
};
|
2092
2098
|
}
|
2093
2099
|
const Ji = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
2094
2100
|
function ni(t, r, n = { cyclesFix: !0 }, i = []) {
|
2095
2101
|
var d, M;
|
2096
|
-
let
|
2102
|
+
let s = [];
|
2097
2103
|
const c = Array.isArray(t);
|
2098
2104
|
for (const R in t) {
|
2099
|
-
const
|
2105
|
+
const k = t[R], H = c ? +R : R;
|
2100
2106
|
if (!(R in r)) {
|
2101
|
-
|
2107
|
+
s.push({
|
2102
2108
|
type: "REMOVE",
|
2103
2109
|
path: [H],
|
2104
2110
|
oldValue: t[R]
|
2105
2111
|
});
|
2106
2112
|
continue;
|
2107
2113
|
}
|
2108
|
-
const y = r[R], p = typeof
|
2109
|
-
if (
|
2110
|
-
const h = ni(
|
2111
|
-
|
2112
|
-
} else
|
2113
|
-
!(Number.isNaN(
|
2114
|
+
const y = r[R], p = typeof k == "object" && typeof y == "object" && Array.isArray(k) === Array.isArray(y);
|
2115
|
+
if (k && y && p && !Ji[(M = (d = Object.getPrototypeOf(k)) == null ? void 0 : d.constructor) == null ? void 0 : M.name] && (!n.cyclesFix || !i.includes(k))) {
|
2116
|
+
const h = ni(k, y, n, n.cyclesFix ? i.concat([k]) : []);
|
2117
|
+
s.push.apply(s, h.map((l) => (l.path.unshift(H), l)));
|
2118
|
+
} else k !== y && // treat NaN values as equivalent
|
2119
|
+
!(Number.isNaN(k) && Number.isNaN(y)) && !(p && (isNaN(k) ? k + "" == y + "" : +k == +y)) && s.push({
|
2114
2120
|
path: [H],
|
2115
2121
|
type: "CHANGE",
|
2116
2122
|
value: y,
|
2117
|
-
oldValue:
|
2123
|
+
oldValue: k
|
2118
2124
|
});
|
2119
2125
|
}
|
2120
2126
|
const f = Array.isArray(r);
|
2121
2127
|
for (const R in r)
|
2122
|
-
R in t ||
|
2128
|
+
R in t || s.push({
|
2123
2129
|
type: "CREATE",
|
2124
2130
|
path: [f ? +R : R],
|
2125
2131
|
value: r[R]
|
2126
2132
|
});
|
2127
|
-
return
|
2133
|
+
return s;
|
2128
2134
|
}
|
2129
|
-
var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"),
|
2135
|
+
var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"), Z = Symbol.for("immer-state"), ii = process.env.NODE_ENV !== "production" ? [
|
2130
2136
|
// All error codes, starting by 0:
|
2131
2137
|
function(t) {
|
2132
2138
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
@@ -2168,7 +2174,7 @@ function G(t, ...r) {
|
|
2168
2174
|
}
|
2169
2175
|
var Ot = Object.getPrototypeOf;
|
2170
2176
|
function xt(t) {
|
2171
|
-
return !!t && !!t[
|
2177
|
+
return !!t && !!t[Z];
|
2172
2178
|
}
|
2173
2179
|
function gt(t) {
|
2174
2180
|
var r;
|
@@ -2190,7 +2196,7 @@ function de(t, r) {
|
|
2190
2196
|
}) : t.forEach((n, i) => r(i, n, t));
|
2191
2197
|
}
|
2192
2198
|
function Mt(t) {
|
2193
|
-
const r = t[
|
2199
|
+
const r = t[Z];
|
2194
2200
|
return r ? r.type_ : Array.isArray(t) ? 1 : _e(t) ? 2 : ve(t) ? 3 : 0;
|
2195
2201
|
}
|
2196
2202
|
function he(t, r) {
|
@@ -2225,10 +2231,10 @@ function fn(t, r) {
|
|
2225
2231
|
const n = ai(t);
|
2226
2232
|
if (r === !0 || r === "class_only" && !n) {
|
2227
2233
|
const i = Object.getOwnPropertyDescriptors(t);
|
2228
|
-
delete i[
|
2229
|
-
let
|
2230
|
-
for (let c = 0; c <
|
2231
|
-
const f =
|
2234
|
+
delete i[Z];
|
2235
|
+
let s = Reflect.ownKeys(i);
|
2236
|
+
for (let c = 0; c < s.length; c++) {
|
2237
|
+
const f = s[c], d = i[f];
|
2232
2238
|
d.writable === !1 && (d.writable = !0, d.configurable = !0), (d.get || d.set) && (i[f] = {
|
2233
2239
|
configurable: !0,
|
2234
2240
|
writable: !0,
|
@@ -2242,8 +2248,8 @@ function fn(t, r) {
|
|
2242
2248
|
const i = Ot(t);
|
2243
2249
|
if (i !== null && n)
|
2244
2250
|
return { ...t };
|
2245
|
-
const
|
2246
|
-
return Object.assign(
|
2251
|
+
const s = Object.create(i);
|
2252
|
+
return Object.assign(s, t);
|
2247
2253
|
}
|
2248
2254
|
}
|
2249
2255
|
function vn(t, r = !1) {
|
@@ -2291,14 +2297,14 @@ function Nn(t) {
|
|
2291
2297
|
return ye = ra(ye, t);
|
2292
2298
|
}
|
2293
2299
|
function na(t) {
|
2294
|
-
const r = t[
|
2300
|
+
const r = t[Z];
|
2295
2301
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
2296
2302
|
}
|
2297
2303
|
function Hn(t, r) {
|
2298
2304
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
2299
2305
|
const n = r.drafts_[0];
|
2300
|
-
return t !== void 0 && t !== n ? (n[
|
2301
|
-
n[
|
2306
|
+
return t !== void 0 && t !== n ? (n[Z].modified_ && (dn(r), G(4)), gt(t) && (t = Ze(r, t), r.parent_ || Qe(r, t)), r.patches_ && Pt("Patches").generateReplacementPatches_(
|
2307
|
+
n[Z].base_,
|
2302
2308
|
t,
|
2303
2309
|
r.patches_,
|
2304
2310
|
r.inversePatches_
|
@@ -2307,11 +2313,11 @@ function Hn(t, r) {
|
|
2307
2313
|
function Ze(t, r, n) {
|
2308
2314
|
if (nr(r))
|
2309
2315
|
return r;
|
2310
|
-
const i = r[
|
2316
|
+
const i = r[Z];
|
2311
2317
|
if (!i)
|
2312
2318
|
return de(
|
2313
2319
|
r,
|
2314
|
-
(
|
2320
|
+
(s, c) => Un(t, i, r, s, c, n)
|
2315
2321
|
), r;
|
2316
2322
|
if (i.scope_ !== t)
|
2317
2323
|
return r;
|
@@ -2319,12 +2325,12 @@ function Ze(t, r, n) {
|
|
2319
2325
|
return Qe(t, i.base_, !0), i.base_;
|
2320
2326
|
if (!i.finalized_) {
|
2321
2327
|
i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
|
2322
|
-
const
|
2323
|
-
let c =
|
2324
|
-
i.type_ === 3 && (c = new Set(
|
2328
|
+
const s = i.copy_;
|
2329
|
+
let c = s, f = !1;
|
2330
|
+
i.type_ === 3 && (c = new Set(s), s.clear(), f = !0), de(
|
2325
2331
|
c,
|
2326
|
-
(d, M) => Un(t, i,
|
2327
|
-
), Qe(t,
|
2332
|
+
(d, M) => Un(t, i, s, d, M, n, f)
|
2333
|
+
), Qe(t, s, !1), n && t.patches_ && Pt("Patches").generatePatches_(
|
2328
2334
|
i,
|
2329
2335
|
n,
|
2330
2336
|
t.patches_,
|
@@ -2333,19 +2339,19 @@ function Ze(t, r, n) {
|
|
2333
2339
|
}
|
2334
2340
|
return i.copy_;
|
2335
2341
|
}
|
2336
|
-
function Un(t, r, n, i,
|
2337
|
-
if (process.env.NODE_ENV !== "production" &&
|
2342
|
+
function Un(t, r, n, i, s, c, f) {
|
2343
|
+
if (process.env.NODE_ENV !== "production" && s === n && G(5), xt(s)) {
|
2338
2344
|
const d = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2339
|
-
!he(r.assigned_, i) ? c.concat(i) : void 0, M = Ze(t,
|
2345
|
+
!he(r.assigned_, i) ? c.concat(i) : void 0, M = Ze(t, s, d);
|
2340
2346
|
if (si(n, i, M), xt(M))
|
2341
2347
|
t.canAutoFreeze_ = !1;
|
2342
2348
|
else
|
2343
2349
|
return;
|
2344
|
-
} else f && n.add(
|
2345
|
-
if (gt(
|
2350
|
+
} else f && n.add(s);
|
2351
|
+
if (gt(s) && !nr(s)) {
|
2346
2352
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
2347
2353
|
return;
|
2348
|
-
Ze(t,
|
2354
|
+
Ze(t, s), (!r || !r.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(n, i) && Qe(t, s);
|
2349
2355
|
}
|
2350
2356
|
}
|
2351
2357
|
function Qe(t, r, n = !1) {
|
@@ -2375,14 +2381,14 @@ function ia(t, r) {
|
|
2375
2381
|
revoke_: null,
|
2376
2382
|
isManual_: !1
|
2377
2383
|
};
|
2378
|
-
let
|
2379
|
-
n && (
|
2380
|
-
const { revoke: f, proxy: d } = Proxy.revocable(
|
2384
|
+
let s = i, c = In;
|
2385
|
+
n && (s = [i], c = me);
|
2386
|
+
const { revoke: f, proxy: d } = Proxy.revocable(s, c);
|
2381
2387
|
return i.draft_ = d, i.revoke_ = f, d;
|
2382
2388
|
}
|
2383
2389
|
var In = {
|
2384
2390
|
get(t, r) {
|
2385
|
-
if (r ===
|
2391
|
+
if (r === Z)
|
2386
2392
|
return t;
|
2387
2393
|
const n = Et(t);
|
2388
2394
|
if (!he(n, r))
|
@@ -2401,10 +2407,10 @@ var In = {
|
|
2401
2407
|
if (i != null && i.set)
|
2402
2408
|
return i.set.call(t.draft_, n), !0;
|
2403
2409
|
if (!t.modified_) {
|
2404
|
-
const
|
2410
|
+
const s = en(Et(t), r), c = s == null ? void 0 : s[Z];
|
2405
2411
|
if (c && c.base_ === n)
|
2406
2412
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2407
|
-
if (Qi(n,
|
2413
|
+
if (Qi(n, s) && (n !== void 0 || he(t.base_, r)))
|
2408
2414
|
return !0;
|
2409
2415
|
rn(t), yn(t);
|
2410
2416
|
}
|
@@ -2448,16 +2454,16 @@ me.set = function(t, r, n) {
|
|
2448
2454
|
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && G(14), In.set.call(this, t[0], r, n, t[0]);
|
2449
2455
|
};
|
2450
2456
|
function en(t, r) {
|
2451
|
-
const n = t[
|
2457
|
+
const n = t[Z];
|
2452
2458
|
return (n ? Et(n) : t)[r];
|
2453
2459
|
}
|
2454
2460
|
function aa(t, r, n) {
|
2455
|
-
var
|
2461
|
+
var s;
|
2456
2462
|
const i = ci(r, n);
|
2457
2463
|
return i ? "value" in i ? i.value : (
|
2458
2464
|
// This is a very special case, if the prop is a getter defined by the
|
2459
2465
|
// prototype, we should invoke it with the draft as context!
|
2460
|
-
(
|
2466
|
+
(s = i.get) == null ? void 0 : s.call(t.draft_)
|
2461
2467
|
) : void 0;
|
2462
2468
|
}
|
2463
2469
|
function ci(t, r) {
|
@@ -2488,44 +2494,44 @@ var sa = class {
|
|
2488
2494
|
n = r;
|
2489
2495
|
const f = this;
|
2490
2496
|
return function(M = c, ...R) {
|
2491
|
-
return f.produce(M, (
|
2497
|
+
return f.produce(M, (k) => n.call(this, k, ...R));
|
2492
2498
|
};
|
2493
2499
|
}
|
2494
2500
|
typeof n != "function" && G(6), i !== void 0 && typeof i != "function" && G(7);
|
2495
|
-
let
|
2501
|
+
let s;
|
2496
2502
|
if (gt(r)) {
|
2497
2503
|
const c = Nn(this), f = mn(r, void 0);
|
2498
2504
|
let d = !0;
|
2499
2505
|
try {
|
2500
|
-
|
2506
|
+
s = n(f), d = !1;
|
2501
2507
|
} finally {
|
2502
2508
|
d ? dn(c) : hn(c);
|
2503
2509
|
}
|
2504
|
-
return zn(c, i), Hn(
|
2510
|
+
return zn(c, i), Hn(s, c);
|
2505
2511
|
} else if (!r || typeof r != "object") {
|
2506
|
-
if (
|
2512
|
+
if (s = n(r), s === void 0 && (s = r), s === _n && (s = void 0), this.autoFreeze_ && vn(s, !0), i) {
|
2507
2513
|
const c = [], f = [];
|
2508
|
-
Pt("Patches").generateReplacementPatches_(r,
|
2514
|
+
Pt("Patches").generateReplacementPatches_(r, s, c, f), i(c, f);
|
2509
2515
|
}
|
2510
|
-
return
|
2516
|
+
return s;
|
2511
2517
|
} else
|
2512
2518
|
G(1, r);
|
2513
2519
|
}, this.produceWithPatches = (r, n) => {
|
2514
2520
|
if (typeof r == "function")
|
2515
2521
|
return (f, ...d) => this.produceWithPatches(f, (M) => r(M, ...d));
|
2516
|
-
let i,
|
2522
|
+
let i, s;
|
2517
2523
|
return [this.produce(r, n, (f, d) => {
|
2518
|
-
i = f,
|
2519
|
-
}), i,
|
2524
|
+
i = f, s = d;
|
2525
|
+
}), i, s];
|
2520
2526
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
2521
2527
|
}
|
2522
2528
|
createDraft(t) {
|
2523
2529
|
gt(t) || G(8), xt(t) && (t = oa(t));
|
2524
2530
|
const r = Nn(this), n = mn(t, void 0);
|
2525
|
-
return n[
|
2531
|
+
return n[Z].isManual_ = !0, hn(r), n;
|
2526
2532
|
}
|
2527
2533
|
finishDraft(t, r) {
|
2528
|
-
const n = t && t[
|
2534
|
+
const n = t && t[Z];
|
2529
2535
|
(!n || !n.isManual_) && G(9);
|
2530
2536
|
const { scope_: i } = n;
|
2531
2537
|
return zn(i, r), Hn(void 0, i);
|
@@ -2549,9 +2555,9 @@ var sa = class {
|
|
2549
2555
|
applyPatches(t, r) {
|
2550
2556
|
let n;
|
2551
2557
|
for (n = r.length - 1; n >= 0; n--) {
|
2552
|
-
const
|
2553
|
-
if (
|
2554
|
-
t =
|
2558
|
+
const s = r[n];
|
2559
|
+
if (s.path.length === 0 && s.op === "replace") {
|
2560
|
+
t = s.value;
|
2555
2561
|
break;
|
2556
2562
|
}
|
2557
2563
|
}
|
@@ -2559,7 +2565,7 @@ var sa = class {
|
|
2559
2565
|
const i = Pt("Patches").applyPatches_;
|
2560
2566
|
return xt(t) ? i(t, r) : this.produce(
|
2561
2567
|
t,
|
2562
|
-
(
|
2568
|
+
(s) => i(s, r)
|
2563
2569
|
);
|
2564
2570
|
}
|
2565
2571
|
};
|
@@ -2573,7 +2579,7 @@ function oa(t) {
|
|
2573
2579
|
function ui(t) {
|
2574
2580
|
if (!gt(t) || nr(t))
|
2575
2581
|
return t;
|
2576
|
-
const r = t[
|
2582
|
+
const r = t[Z];
|
2577
2583
|
let n;
|
2578
2584
|
if (r) {
|
2579
2585
|
if (!r.modified_)
|
@@ -2581,8 +2587,8 @@ function ui(t) {
|
|
2581
2587
|
r.finalized_ = !0, n = fn(t, r.scope_.immer_.useStrictShallowCopy_);
|
2582
2588
|
} else
|
2583
2589
|
n = fn(t, !0);
|
2584
|
-
return de(n, (i,
|
2585
|
-
si(n, i, ui(
|
2590
|
+
return de(n, (i, s) => {
|
2591
|
+
si(n, i, ui(s));
|
2586
2592
|
}), r && (r.finalized_ = !1), n;
|
2587
2593
|
}
|
2588
2594
|
function Ln() {
|
@@ -2597,7 +2603,7 @@ function Ln() {
|
|
2597
2603
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
2598
2604
|
);
|
2599
2605
|
const r = "replace", n = "add", i = "remove";
|
2600
|
-
function
|
2606
|
+
function s(y, p, h, l) {
|
2601
2607
|
switch (y.type_) {
|
2602
2608
|
case 0:
|
2603
2609
|
case 2:
|
@@ -2657,12 +2663,12 @@ function Ln() {
|
|
2657
2663
|
function f(y, p, h, l) {
|
2658
2664
|
const { base_: b, copy_: v } = y;
|
2659
2665
|
de(y.assigned_, (m, g) => {
|
2660
|
-
const _ = tn(b, m), A = tn(v, m),
|
2661
|
-
if (_ === A &&
|
2666
|
+
const _ = tn(b, m), A = tn(v, m), E = g ? he(b, m) ? r : n : i;
|
2667
|
+
if (_ === A && E === r)
|
2662
2668
|
return;
|
2663
|
-
const
|
2664
|
-
h.push(
|
2665
|
-
|
2669
|
+
const T = p.concat(m);
|
2670
|
+
h.push(E === i ? { op: E, path: T } : { op: E, path: T, value: A }), l.push(
|
2671
|
+
E === n ? { op: i, path: T } : E === i ? { op: n, path: T, value: H(_) } : { op: r, path: T, value: H(_) }
|
2666
2672
|
);
|
2667
2673
|
});
|
2668
2674
|
}
|
@@ -2714,11 +2720,11 @@ function Ln() {
|
|
2714
2720
|
const { path: l, op: b } = h;
|
2715
2721
|
let v = y;
|
2716
2722
|
for (let A = 0; A < l.length - 1; A++) {
|
2717
|
-
const
|
2718
|
-
let
|
2719
|
-
typeof
|
2723
|
+
const E = Mt(v);
|
2724
|
+
let T = l[A];
|
2725
|
+
typeof T != "string" && typeof T != "number" && (T = "" + T), (E === 0 || E === 1) && (T === "__proto__" || T === "constructor") && G(19), typeof v == "function" && T === "prototype" && G(19), v = tn(v, T), typeof v != "object" && G(18, l.join("/"));
|
2720
2726
|
}
|
2721
|
-
const m = Mt(v), g =
|
2727
|
+
const m = Mt(v), g = k(h.value), _ = l[l.length - 1];
|
2722
2728
|
switch (b) {
|
2723
2729
|
case r:
|
2724
2730
|
switch (m) {
|
@@ -2756,40 +2762,40 @@ function Ln() {
|
|
2756
2762
|
}
|
2757
2763
|
}), y;
|
2758
2764
|
}
|
2759
|
-
function
|
2765
|
+
function k(y) {
|
2760
2766
|
if (!gt(y))
|
2761
2767
|
return y;
|
2762
2768
|
if (Array.isArray(y))
|
2763
|
-
return y.map(
|
2769
|
+
return y.map(k);
|
2764
2770
|
if (_e(y))
|
2765
2771
|
return new Map(
|
2766
|
-
Array.from(y.entries()).map(([h, l]) => [h,
|
2772
|
+
Array.from(y.entries()).map(([h, l]) => [h, k(l)])
|
2767
2773
|
);
|
2768
2774
|
if (ve(y))
|
2769
|
-
return new Set(Array.from(y).map(
|
2775
|
+
return new Set(Array.from(y).map(k));
|
2770
2776
|
const p = Object.create(Ot(y));
|
2771
2777
|
for (const h in y)
|
2772
|
-
p[h] =
|
2778
|
+
p[h] = k(y[h]);
|
2773
2779
|
return he(y, pe) && (p[pe] = y[pe]), p;
|
2774
2780
|
}
|
2775
2781
|
function H(y) {
|
2776
|
-
return xt(y) ?
|
2782
|
+
return xt(y) ? k(y) : y;
|
2777
2783
|
}
|
2778
2784
|
ea("Patches", {
|
2779
2785
|
applyPatches_: R,
|
2780
|
-
generatePatches_:
|
2786
|
+
generatePatches_: s,
|
2781
2787
|
generateReplacementPatches_: M
|
2782
2788
|
});
|
2783
2789
|
}
|
2784
|
-
var
|
2785
|
-
|
2786
|
-
|
2790
|
+
var Q = new sa(), ca = Q.produce;
|
2791
|
+
Q.produceWithPatches.bind(
|
2792
|
+
Q
|
2787
2793
|
);
|
2788
|
-
|
2789
|
-
|
2790
|
-
var ua =
|
2791
|
-
|
2792
|
-
|
2794
|
+
Q.setAutoFreeze.bind(Q);
|
2795
|
+
Q.setUseStrictShallowCopy.bind(Q);
|
2796
|
+
var ua = Q.applyPatches.bind(Q);
|
2797
|
+
Q.createDraft.bind(Q);
|
2798
|
+
Q.finishDraft.bind(Q);
|
2793
2799
|
var la = 1 / 0, fa = 9007199254740991, pa = "[object Arguments]", da = "[object Function]", ha = "[object GeneratorFunction]", ya = "[object Symbol]", ma = typeof et == "object" && et && et.Object === Object && et, ba = typeof self == "object" && self && self.Object === Object && self, ga = ma || ba || Function("return this")();
|
2794
2800
|
function _a(t, r, n) {
|
2795
2801
|
switch (n.length) {
|
@@ -2805,23 +2811,23 @@ function _a(t, r, n) {
|
|
2805
2811
|
return t.apply(r, n);
|
2806
2812
|
}
|
2807
2813
|
function va(t, r) {
|
2808
|
-
for (var n = -1, i = t ? t.length : 0,
|
2809
|
-
|
2810
|
-
return
|
2814
|
+
for (var n = -1, i = t ? t.length : 0, s = Array(i); ++n < i; )
|
2815
|
+
s[n] = r(t[n], n, t);
|
2816
|
+
return s;
|
2811
2817
|
}
|
2812
2818
|
function Ia(t, r) {
|
2813
|
-
for (var n = -1, i = r.length,
|
2814
|
-
t[
|
2819
|
+
for (var n = -1, i = r.length, s = t.length; ++n < i; )
|
2820
|
+
t[s + n] = r[n];
|
2815
2821
|
return t;
|
2816
2822
|
}
|
2817
2823
|
var Sn = Object.prototype, Sa = Sn.hasOwnProperty, wn = Sn.toString, Gn = ga.Symbol, wa = Sn.propertyIsEnumerable, Wn = Gn ? Gn.isConcatSpreadable : void 0, Bn = Math.max;
|
2818
|
-
function Ta(t, r, n, i,
|
2824
|
+
function Ta(t, r, n, i, s) {
|
2819
2825
|
var c = -1, f = t.length;
|
2820
|
-
for (n || (n = Oa),
|
2826
|
+
for (n || (n = Oa), s || (s = []); ++c < f; ) {
|
2821
2827
|
var d = t[c];
|
2822
|
-
n(d) ? Ia(
|
2828
|
+
n(d) ? Ia(s, d) : s[s.length] = d;
|
2823
2829
|
}
|
2824
|
-
return
|
2830
|
+
return s;
|
2825
2831
|
}
|
2826
2832
|
function ka(t, r) {
|
2827
2833
|
return t = Object(t), Aa(t, r, function(n, i) {
|
@@ -2829,7 +2835,7 @@ function ka(t, r) {
|
|
2829
2835
|
});
|
2830
2836
|
}
|
2831
2837
|
function Aa(t, r, n) {
|
2832
|
-
for (var i = -1,
|
2838
|
+
for (var i = -1, s = r.length, c = {}; ++i < s; ) {
|
2833
2839
|
var f = r[i], d = t[f];
|
2834
2840
|
n(d, f) && (c[f] = d);
|
2835
2841
|
}
|
@@ -2837,7 +2843,7 @@ function Aa(t, r, n) {
|
|
2837
2843
|
}
|
2838
2844
|
function Ea(t, r) {
|
2839
2845
|
return r = Bn(r === void 0 ? t.length - 1 : r, 0), function() {
|
2840
|
-
for (var n = arguments, i = -1,
|
2846
|
+
for (var n = arguments, i = -1, s = Bn(n.length - r, 0), c = Array(s); ++i < s; )
|
2841
2847
|
c[i] = n[r + i];
|
2842
2848
|
i = -1;
|
2843
2849
|
for (var f = Array(r + 1); ++i < r; )
|
@@ -2930,7 +2936,7 @@ class Wa {
|
|
2930
2936
|
this.destroyListeners();
|
2931
2937
|
}
|
2932
2938
|
updateHistory(r, n) {
|
2933
|
-
const i = $n(r, Kn),
|
2939
|
+
const i = $n(r, Kn), s = $n(this.getState(), Kn), c = ni(s, i);
|
2934
2940
|
c.length && (this.undos.push({ undos: c, type: n }), this.redos = []);
|
2935
2941
|
}
|
2936
2942
|
getStateHistory() {
|
@@ -2949,11 +2955,11 @@ class Wa {
|
|
2949
2955
|
}
|
2950
2956
|
// Update the state, emitting only if the part of the state has changed
|
2951
2957
|
updateState(r, n = { updateHistory: !1 }) {
|
2952
|
-
const i = this.getState(),
|
2958
|
+
const i = this.getState(), s = {
|
2953
2959
|
...i,
|
2954
2960
|
...r
|
2955
2961
|
};
|
2956
|
-
st(i,
|
2962
|
+
st(i, s) || (n.updateHistory && this.updateHistory(s, n.kind), this.prevState = i, this.stateSubject.next(s));
|
2957
2963
|
}
|
2958
2964
|
// Selectively subscribe to scale changes
|
2959
2965
|
subscribeToScale(r) {
|
@@ -3018,68 +3024,68 @@ class Wa {
|
|
3018
3024
|
if (!n || !i) return;
|
3019
3025
|
Ln();
|
3020
3026
|
const {
|
3021
|
-
trackItemDetailsMap:
|
3027
|
+
trackItemDetailsMap: s,
|
3022
3028
|
trackItemIds: c,
|
3023
3029
|
tracks: f,
|
3024
3030
|
transitionIds: d,
|
3025
3031
|
transitionsMap: M,
|
3026
3032
|
trackItemsMap: R
|
3027
|
-
} = this.getState(),
|
3028
|
-
trackItemDetailsMap:
|
3033
|
+
} = this.getState(), k = J({
|
3034
|
+
trackItemDetailsMap: s,
|
3029
3035
|
trackItemIds: c,
|
3030
3036
|
tracks: f,
|
3031
3037
|
transitionIds: d,
|
3032
3038
|
transitionsMap: M,
|
3033
3039
|
trackItemsMap: R
|
3034
3040
|
}), H = [], y = [], p = [], h = [], l = [], b = [];
|
3035
|
-
n.forEach((
|
3041
|
+
n.forEach((w) => {
|
3036
3042
|
let P;
|
3037
|
-
const F =
|
3038
|
-
|
3043
|
+
const F = w.path.slice(1);
|
3044
|
+
w.type === "CREATE" ? P = {
|
3039
3045
|
path: F,
|
3040
3046
|
op: "remove",
|
3041
|
-
value:
|
3042
|
-
} :
|
3047
|
+
value: w.value
|
3048
|
+
} : w.type === "CHANGE" ? P = {
|
3043
3049
|
path: F,
|
3044
3050
|
op: "replace",
|
3045
|
-
value:
|
3051
|
+
value: w.oldValue
|
3046
3052
|
} : P = {
|
3047
3053
|
path: F,
|
3048
3054
|
op: "add",
|
3049
|
-
value:
|
3050
|
-
},
|
3055
|
+
value: w.oldValue
|
3056
|
+
}, w.path.includes("trackItemIds") ? p.push(P) : w.path.includes("transitionIds") ? y.push(P) : w.path.includes("trackItemsMap") ? l.push(P) : w.path.includes("transitionsMap") ? h.push(P) : w.path.includes("tracks") ? H.push(P) : w.path.includes("trackItemDetailsMap") && b.push(P);
|
3051
3057
|
});
|
3052
3058
|
const v = this.applyPatch(
|
3053
|
-
|
3059
|
+
k.tracks,
|
3054
3060
|
H
|
3055
3061
|
), m = this.applyPatch(
|
3056
|
-
|
3062
|
+
k.transitionIds,
|
3057
3063
|
y
|
3058
3064
|
), g = this.applyPatch(
|
3059
|
-
|
3065
|
+
k.trackItemIds,
|
3060
3066
|
p
|
3061
3067
|
), _ = this.applyPatch(
|
3062
|
-
|
3068
|
+
k.transitionsMap,
|
3063
3069
|
h
|
3064
3070
|
), A = this.applyPatch(
|
3065
|
-
|
3071
|
+
k.trackItemsMap,
|
3066
3072
|
l
|
3067
|
-
),
|
3068
|
-
|
3073
|
+
), E = this.applyPatch(
|
3074
|
+
k.trackItemDetailsMap,
|
3069
3075
|
b
|
3070
|
-
),
|
3076
|
+
), T = J({
|
3071
3077
|
tracks: v,
|
3072
3078
|
transitionIds: m,
|
3073
3079
|
trackItemIds: g,
|
3074
3080
|
transitionsMap: _,
|
3075
3081
|
trackItemsMap: A,
|
3076
|
-
trackItemDetailsMap:
|
3077
|
-
}), x =
|
3082
|
+
trackItemDetailsMap: E
|
3083
|
+
}), x = J(this.getState()), S = { ...x, ...T };
|
3078
3084
|
this.prevState = x, this.redos.push({ redos: n, type: i }), this.stateSubject.next(S), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3079
3085
|
}
|
3080
3086
|
applyPatch(r, n) {
|
3081
|
-
return n.reverse().reduce((i,
|
3082
|
-
ua(c, [
|
3087
|
+
return n.reverse().reduce((i, s) => ca(i, (c) => {
|
3088
|
+
ua(c, [s]);
|
3083
3089
|
}), r);
|
3084
3090
|
}
|
3085
3091
|
redo() {
|
@@ -3087,63 +3093,63 @@ class Wa {
|
|
3087
3093
|
if (!n || !i) return;
|
3088
3094
|
Ln();
|
3089
3095
|
const {
|
3090
|
-
trackItemDetailsMap:
|
3096
|
+
trackItemDetailsMap: s,
|
3091
3097
|
trackItemIds: c,
|
3092
3098
|
tracks: f,
|
3093
3099
|
transitionIds: d,
|
3094
3100
|
transitionsMap: M,
|
3095
3101
|
trackItemsMap: R
|
3096
|
-
} = this.getState(),
|
3097
|
-
trackItemDetailsMap:
|
3102
|
+
} = this.getState(), k = J({
|
3103
|
+
trackItemDetailsMap: s,
|
3098
3104
|
trackItemIds: c,
|
3099
3105
|
tracks: f,
|
3100
3106
|
transitionIds: d,
|
3101
3107
|
transitionsMap: M,
|
3102
3108
|
trackItemsMap: R
|
3103
3109
|
}), H = [], y = [], p = [], h = [], l = [], b = [];
|
3104
|
-
n.forEach((
|
3110
|
+
n.forEach((w) => {
|
3105
3111
|
let P;
|
3106
|
-
const F =
|
3107
|
-
|
3112
|
+
const F = w.path.slice(1);
|
3113
|
+
w.type === "CREATE" ? P = {
|
3108
3114
|
path: F,
|
3109
3115
|
op: "add",
|
3110
|
-
value:
|
3111
|
-
} :
|
3116
|
+
value: w.value
|
3117
|
+
} : w.type === "CHANGE" ? P = {
|
3112
3118
|
path: F,
|
3113
3119
|
op: "replace",
|
3114
|
-
value:
|
3120
|
+
value: w.value
|
3115
3121
|
} : P = {
|
3116
3122
|
path: F,
|
3117
3123
|
op: "remove",
|
3118
|
-
value:
|
3119
|
-
},
|
3124
|
+
value: w.oldValue
|
3125
|
+
}, w.path.includes("trackItemIds") ? p.push(P) : w.path.includes("transitionIds") ? y.push(P) : w.path.includes("trackItemsMap") ? l.push(P) : w.path.includes("transitionsMap") ? h.push(P) : w.path.includes("trackItemDetailsMap") ? b.push(P) : H.push(P);
|
3120
3126
|
});
|
3121
3127
|
const v = this.applyPatch(
|
3122
|
-
|
3128
|
+
k.tracks,
|
3123
3129
|
H
|
3124
3130
|
), m = this.applyPatch(
|
3125
|
-
|
3131
|
+
k.transitionIds,
|
3126
3132
|
y
|
3127
3133
|
), g = this.applyPatch(
|
3128
|
-
|
3134
|
+
k.trackItemIds,
|
3129
3135
|
p
|
3130
3136
|
), _ = this.applyPatch(
|
3131
|
-
|
3137
|
+
k.transitionsMap,
|
3132
3138
|
h
|
3133
3139
|
), A = this.applyPatch(
|
3134
|
-
|
3140
|
+
k.trackItemsMap,
|
3135
3141
|
l
|
3136
|
-
),
|
3137
|
-
|
3142
|
+
), E = this.applyPatch(
|
3143
|
+
k.trackItemDetailsMap,
|
3138
3144
|
b
|
3139
|
-
),
|
3145
|
+
), T = J({
|
3140
3146
|
tracks: v,
|
3141
3147
|
transitionIds: m,
|
3142
3148
|
trackItemIds: g,
|
3143
3149
|
transitionsMap: _,
|
3144
3150
|
trackItemsMap: A,
|
3145
|
-
trackItemDetailsMap:
|
3146
|
-
}), x =
|
3151
|
+
trackItemDetailsMap: E
|
3152
|
+
}), x = J(this.getState()), S = { ...x, ...T };
|
3147
3153
|
this.prevState = x, this.undos.push({ undos: n, type: i }), this.stateSubject.next(S), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3148
3154
|
}
|
3149
3155
|
}
|