@designcombo/state 0.1.30 → 0.1.32
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +955 -940
- package/dist/index.umd.js +2 -2
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
var pi = Object.defineProperty;
|
2
2
|
var hi = (t, r, n) => r in t ? pi(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
|
3
|
-
var
|
4
|
-
import { subject as
|
3
|
+
var Pt = (t, r, n) => hi(t, typeof r != "symbol" ? r + "" : r, n);
|
4
|
+
import { subject as qt, filter as Jt, DESIGN_PREFIX as mi, ADD_PREFIX as yi, LAYER_PREFIX as bi, HISTORY_PREFIX as gi, ACTIVE_PREFIX as _i, EDIT_PREFIX as Ii, DESIGN_LOAD as vi, DESIGN_RESIZE as Si, HISTORY_UNDO as wi, HISTORY_REDO as ki, LAYER_DELETE as Ti, LAYER_CLONE as Ei, ADD_CAPTION as Mi, ADD_TEXT as Ai, ADD_TEMPLATE as Oi, ADD_IMAGE as xi, ADD_AUDIO as Di, ADD_VIDEO as Pi, ACTIVE_SPLIT as Ci, ACTIVE_CLONE as Ri, ACTIVE_PASTE as Fi, DELETE_TEMPLATE_ITEM as ji, EDIT_OBJECT as zi, EDIT_TEMPLATE_ITEM as Hi, CLOSE_EDIT_TEMPLATE as Ni } from "@designcombo/events";
|
5
5
|
var sn = function(t, r) {
|
6
6
|
return sn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
7
7
|
n.__proto__ = i;
|
@@ -9,7 +9,7 @@ var sn = function(t, r) {
|
|
9
9
|
for (var s in i) Object.prototype.hasOwnProperty.call(i, s) && (n[s] = i[s]);
|
10
10
|
}, sn(t, r);
|
11
11
|
};
|
12
|
-
function
|
12
|
+
function ke(t, r) {
|
13
13
|
if (typeof r != "function" && r !== null)
|
14
14
|
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
15
15
|
sn(t, r);
|
@@ -74,7 +74,7 @@ function ln(t, r) {
|
|
74
74
|
0 <= n && t.splice(n, 1);
|
75
75
|
}
|
76
76
|
}
|
77
|
-
var
|
77
|
+
var sr = function() {
|
78
78
|
function t(r) {
|
79
79
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
80
80
|
}
|
@@ -86,36 +86,36 @@ var ar = function() {
|
|
86
86
|
if (h)
|
87
87
|
if (this._parentage = null, Array.isArray(h))
|
88
88
|
try {
|
89
|
-
for (var m = on(h),
|
90
|
-
var F =
|
89
|
+
for (var m = on(h), x = m.next(); !x.done; x = m.next()) {
|
90
|
+
var F = x.value;
|
91
91
|
F.remove(this);
|
92
92
|
}
|
93
93
|
} catch (p) {
|
94
94
|
r = { error: p };
|
95
95
|
} finally {
|
96
96
|
try {
|
97
|
-
|
97
|
+
x && !x.done && (n = m.return) && n.call(m);
|
98
98
|
} finally {
|
99
99
|
if (r) throw r.error;
|
100
100
|
}
|
101
101
|
}
|
102
102
|
else
|
103
103
|
h.remove(this);
|
104
|
-
var
|
105
|
-
if (It(
|
104
|
+
var T = this.initialTeardown;
|
105
|
+
if (It(T))
|
106
106
|
try {
|
107
|
-
|
107
|
+
T();
|
108
108
|
} catch (p) {
|
109
109
|
c = p instanceof Qr ? p.errors : [p];
|
110
110
|
}
|
111
|
-
var
|
112
|
-
if (
|
111
|
+
var W = this._finalizers;
|
112
|
+
if (W) {
|
113
113
|
this._finalizers = null;
|
114
114
|
try {
|
115
|
-
for (var b = on(
|
116
|
-
var
|
115
|
+
for (var b = on(W), d = b.next(); !d.done; d = b.next()) {
|
116
|
+
var l = d.value;
|
117
117
|
try {
|
118
|
-
Dn(
|
118
|
+
Dn(l);
|
119
119
|
} catch (p) {
|
120
120
|
c = c ?? [], p instanceof Qr ? c = un(un([], cn(c)), cn(p.errors)) : c.push(p);
|
121
121
|
}
|
@@ -162,9 +162,9 @@ var ar = function() {
|
|
162
162
|
var r = new t();
|
163
163
|
return r.closed = !0, r;
|
164
164
|
}(), t;
|
165
|
-
}(), Vn =
|
165
|
+
}(), Vn = sr.EMPTY;
|
166
166
|
function Xn(t) {
|
167
|
-
return t instanceof
|
167
|
+
return t instanceof sr || t && "closed" in t && It(t.remove) && It(t.add) && It(t.unsubscribe);
|
168
168
|
}
|
169
169
|
function Dn(t) {
|
170
170
|
It(t) ? t() : t.unsubscribe();
|
@@ -194,11 +194,11 @@ function Li(t) {
|
|
194
194
|
}
|
195
195
|
function Pn() {
|
196
196
|
}
|
197
|
-
function
|
197
|
+
function tr(t) {
|
198
198
|
t();
|
199
199
|
}
|
200
200
|
var Zn = function(t) {
|
201
|
-
|
201
|
+
ke(r, t);
|
202
202
|
function r(n) {
|
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 = Bi, i;
|
@@ -228,7 +228,7 @@ var Zn = function(t) {
|
|
228
228
|
this.unsubscribe();
|
229
229
|
}
|
230
230
|
}, r;
|
231
|
-
}(
|
231
|
+
}(sr), Ui = Function.prototype.bind;
|
232
232
|
function tn(t, r) {
|
233
233
|
return Ui.call(t, r);
|
234
234
|
}
|
@@ -242,7 +242,7 @@ var Wi = function() {
|
|
242
242
|
try {
|
243
243
|
n.next(r);
|
244
244
|
} catch (i) {
|
245
|
-
|
245
|
+
Qe(i);
|
246
246
|
}
|
247
247
|
}, t.prototype.error = function(r) {
|
248
248
|
var n = this.partialObserver;
|
@@ -250,21 +250,21 @@ var Wi = function() {
|
|
250
250
|
try {
|
251
251
|
n.error(r);
|
252
252
|
} catch (i) {
|
253
|
-
|
253
|
+
Qe(i);
|
254
254
|
}
|
255
255
|
else
|
256
|
-
|
256
|
+
Qe(r);
|
257
257
|
}, t.prototype.complete = function() {
|
258
258
|
var r = this.partialObserver;
|
259
259
|
if (r.complete)
|
260
260
|
try {
|
261
261
|
r.complete();
|
262
262
|
} catch (n) {
|
263
|
-
|
263
|
+
Qe(n);
|
264
264
|
}
|
265
265
|
}, t;
|
266
266
|
}(), fn = function(t) {
|
267
|
-
|
267
|
+
ke(r, t);
|
268
268
|
function r(n, i, s) {
|
269
269
|
var c = t.call(this) || this, h;
|
270
270
|
if (It(n) || !n)
|
@@ -287,7 +287,7 @@ var Wi = function() {
|
|
287
287
|
}
|
288
288
|
return r;
|
289
289
|
}(Zn);
|
290
|
-
function
|
290
|
+
function Qe(t) {
|
291
291
|
Li(t);
|
292
292
|
}
|
293
293
|
function Gi(t) {
|
@@ -320,9 +320,9 @@ var Cn = function() {
|
|
320
320
|
return n.source = this, n.operator = r, n;
|
321
321
|
}, t.prototype.subscribe = function(r, n, i) {
|
322
322
|
var s = this, c = Xi(r) ? r : new fn(r, n, i);
|
323
|
-
return
|
324
|
-
var h = s, m = h.operator,
|
325
|
-
c.add(m ? m.call(c,
|
323
|
+
return tr(function() {
|
324
|
+
var h = s, m = h.operator, x = h.source;
|
325
|
+
c.add(m ? m.call(c, x) : x ? s._subscribe(c) : s._trySubscribe(c));
|
326
326
|
}), c;
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
328
328
|
try {
|
@@ -337,8 +337,8 @@ var Cn = function() {
|
|
337
337
|
next: function(m) {
|
338
338
|
try {
|
339
339
|
r(m);
|
340
|
-
} catch (
|
341
|
-
c(
|
340
|
+
} catch (x) {
|
341
|
+
c(x), h.unsubscribe();
|
342
342
|
}
|
343
343
|
},
|
344
344
|
error: c,
|
@@ -386,7 +386,7 @@ var qi = Yn(function(t) {
|
|
386
386
|
t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
387
387
|
};
|
388
388
|
}), Qn = function(t) {
|
389
|
-
|
389
|
+
ke(r, t);
|
390
390
|
function r() {
|
391
391
|
var n = t.call(this) || this;
|
392
392
|
return n.closed = !1, n.currentObservers = null, n.observers = [], n.isStopped = !1, n.hasError = !1, n.thrownError = null, n;
|
@@ -399,14 +399,14 @@ var qi = Yn(function(t) {
|
|
399
399
|
throw new qi();
|
400
400
|
}, r.prototype.next = function(n) {
|
401
401
|
var i = this;
|
402
|
-
|
402
|
+
tr(function() {
|
403
403
|
var s, c;
|
404
404
|
if (i._throwIfClosed(), !i.isStopped) {
|
405
405
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
406
406
|
try {
|
407
407
|
for (var h = on(i.currentObservers), m = h.next(); !m.done; m = h.next()) {
|
408
|
-
var
|
409
|
-
|
408
|
+
var x = m.value;
|
409
|
+
x.next(n);
|
410
410
|
}
|
411
411
|
} catch (F) {
|
412
412
|
s = { error: F };
|
@@ -421,7 +421,7 @@ var qi = Yn(function(t) {
|
|
421
421
|
});
|
422
422
|
}, r.prototype.error = function(n) {
|
423
423
|
var i = this;
|
424
|
-
|
424
|
+
tr(function() {
|
425
425
|
if (i._throwIfClosed(), !i.isStopped) {
|
426
426
|
i.hasError = i.isStopped = !0, i.thrownError = n;
|
427
427
|
for (var s = i.observers; s.length; )
|
@@ -430,7 +430,7 @@ var qi = Yn(function(t) {
|
|
430
430
|
});
|
431
431
|
}, r.prototype.complete = function() {
|
432
432
|
var n = this;
|
433
|
-
|
433
|
+
tr(function() {
|
434
434
|
if (n._throwIfClosed(), !n.isStopped) {
|
435
435
|
n.isStopped = !0;
|
436
436
|
for (var i = n.observers; i.length; )
|
@@ -452,7 +452,7 @@ var qi = Yn(function(t) {
|
|
452
452
|
return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
|
453
453
|
}, r.prototype._innerSubscribe = function(n) {
|
454
454
|
var i = this, s = this, c = s.hasError, h = s.isStopped, m = s.observers;
|
455
|
-
return c || h ? Vn : (this.currentObservers = null, m.push(n), new
|
455
|
+
return c || h ? Vn : (this.currentObservers = null, m.push(n), new sr(function() {
|
456
456
|
i.currentObservers = null, ln(m, n);
|
457
457
|
}));
|
458
458
|
}, r.prototype._checkFinalizedStatuses = function(n) {
|
@@ -465,7 +465,7 @@ var qi = Yn(function(t) {
|
|
465
465
|
return new Fn(n, i);
|
466
466
|
}, r;
|
467
467
|
}(Cn), Fn = function(t) {
|
468
|
-
|
468
|
+
ke(r, t);
|
469
469
|
function r(n, i) {
|
470
470
|
var s = t.call(this) || this;
|
471
471
|
return s.destination = n, s.source = i, s;
|
@@ -484,7 +484,7 @@ var qi = Yn(function(t) {
|
|
484
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), jn = function(t) {
|
487
|
-
|
487
|
+
ke(r, t);
|
488
488
|
function r(n) {
|
489
489
|
var i = t.call(this) || this;
|
490
490
|
return i._value = n, i;
|
@@ -510,30 +510,30 @@ var qi = Yn(function(t) {
|
|
510
510
|
function wn(t) {
|
511
511
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
512
512
|
}
|
513
|
-
var
|
514
|
-
|
513
|
+
var rr = { exports: {} };
|
514
|
+
rr.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, h = 9007199254740991, m = "[object Arguments]",
|
517
|
-
|
518
|
-
var
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, h = 9007199254740991, m = "[object Arguments]", x = "[object Array]", F = "[object AsyncFunction]", T = "[object Boolean]", W = "[object Date]", b = "[object Error]", d = "[object Function]", l = "[object GeneratorFunction]", p = "[object Map]", g = "[object Number]", v = "[object Null]", _ = "[object Object]", y = "[object Promise]", f = "[object Proxy]", A = "[object RegExp]", E = "[object Set]", I = "[object String]", D = "[object Symbol]", S = "[object Undefined]", O = "[object WeakMap]", w = "[object ArrayBuffer]", M = "[object DataView]", j = "[object Float32Array]", R = "[object Float64Array]", z = "[object Int8Array]", C = "[object Int16Array]", Ht = "[object Int32Array]", vt = "[object Uint8Array]", ft = "[object Uint8ClampedArray]", L = "[object Uint16Array]", Qt = "[object Uint32Array]", lr = /[\\^$.*+?()[\]{}|]/g, ot = /^\[object .+?Constructor\]$/, Ae = /^(?:0|[1-9]\d*)$/, G = {};
|
517
|
+
G[j] = G[R] = G[z] = G[C] = G[Ht] = G[vt] = G[ft] = G[L] = G[Qt] = !0, G[m] = G[x] = G[w] = G[T] = G[M] = G[W] = G[b] = G[d] = G[p] = G[g] = G[_] = G[A] = G[E] = G[I] = G[O] = !1;
|
518
|
+
var Oe = typeof st == "object" && st && st.Object === Object && st, fr = typeof self == "object" && self && self.Object === Object && self, ct = Oe || fr || Function("return this")(), xe = r && !r.nodeType && r, De = xe && !0 && t && !t.nodeType && t, te = De && De.exports === xe, ee = te && Oe.process, Pe = function() {
|
519
519
|
try {
|
520
|
-
return
|
520
|
+
return ee && ee.binding && ee.binding("util");
|
521
521
|
} catch {
|
522
522
|
}
|
523
|
-
}(),
|
524
|
-
function
|
525
|
-
for (var o = -1, u = e == null ? 0 : e.length,
|
526
|
-
var
|
527
|
-
a(
|
523
|
+
}(), re = Pe && Pe.isTypedArray;
|
524
|
+
function Ce(e, a) {
|
525
|
+
for (var o = -1, u = e == null ? 0 : e.length, P = 0, k = []; ++o < u; ) {
|
526
|
+
var N = e[o];
|
527
|
+
a(N, o, e) && (k[P++] = N);
|
528
528
|
}
|
529
|
-
return
|
529
|
+
return k;
|
530
530
|
}
|
531
|
-
function
|
532
|
-
for (var o = -1, u = a.length,
|
533
|
-
e[
|
531
|
+
function ne(e, a) {
|
532
|
+
for (var o = -1, u = a.length, P = e.length; ++o < u; )
|
533
|
+
e[P + o] = a[o];
|
534
534
|
return e;
|
535
535
|
}
|
536
|
-
function
|
536
|
+
function Re(e, a) {
|
537
537
|
for (var o = -1, u = e == null ? 0 : e.length; ++o < u; )
|
538
538
|
if (a(e[o], o, e))
|
539
539
|
return !0;
|
@@ -549,19 +549,19 @@ er.exports;
|
|
549
549
|
return e(a);
|
550
550
|
};
|
551
551
|
}
|
552
|
-
function
|
552
|
+
function Nt(e, a) {
|
553
553
|
return e.has(a);
|
554
554
|
}
|
555
|
-
function
|
555
|
+
function ie(e, a) {
|
556
556
|
return e == null ? void 0 : e[a];
|
557
557
|
}
|
558
|
-
function
|
558
|
+
function Fe(e) {
|
559
559
|
var a = -1, o = Array(e.size);
|
560
|
-
return e.forEach(function(u,
|
561
|
-
o[++a] = [
|
560
|
+
return e.forEach(function(u, P) {
|
561
|
+
o[++a] = [P, u];
|
562
562
|
}), o;
|
563
563
|
}
|
564
|
-
function
|
564
|
+
function je(e, a) {
|
565
565
|
return function(o) {
|
566
566
|
return e(a(o));
|
567
567
|
};
|
@@ -572,13 +572,13 @@ er.exports;
|
|
572
572
|
o[++a] = u;
|
573
573
|
}), o;
|
574
574
|
}
|
575
|
-
var
|
576
|
-
var e = /[^.]+$/.exec(
|
575
|
+
var Lt = Array.prototype, hr = Function.prototype, Tt = Object.prototype, Ut = ct["__core-js_shared__"], ae = hr.toString, at = Tt.hasOwnProperty, ze = function() {
|
576
|
+
var e = /[^.]+$/.exec(Ut && Ut.keys && Ut.keys.IE_PROTO || "");
|
577
577
|
return e ? "Symbol(src)_1." + e : "";
|
578
|
-
}(),
|
579
|
-
"^" +
|
580
|
-
),
|
581
|
-
function
|
578
|
+
}(), He = Tt.toString, mr = RegExp(
|
579
|
+
"^" + ae.call(at).replace(lr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
580
|
+
), se = te ? ct.Buffer : void 0, Wt = ct.Symbol, Ne = ct.Uint8Array, Gt = Tt.propertyIsEnumerable, Et = Lt.splice, ut = Wt ? Wt.toStringTag : void 0, Bt = Object.getOwnPropertySymbols, oe = se ? se.isBuffer : void 0, Mt = je(Object.keys, Object), ce = bt(ct, "DataView"), At = bt(ct, "Map"), ue = bt(ct, "Promise"), le = bt(ct, "Set"), fe = bt(ct, "WeakMap"), St = bt(Object, "create"), Le = Q(ce), yt = Q(At), yr = Q(ue), br = Q(le), gr = Q(fe), Ue = Wt ? Wt.prototype : void 0, de = Ue ? Ue.valueOf : void 0;
|
581
|
+
function V(e) {
|
582
582
|
var a = -1, o = e == null ? 0 : e.length;
|
583
583
|
for (this.clear(); ++a < o; ) {
|
584
584
|
var u = e[a];
|
@@ -586,7 +586,7 @@ er.exports;
|
|
586
586
|
}
|
587
587
|
}
|
588
588
|
function _r() {
|
589
|
-
this.__data__ =
|
589
|
+
this.__data__ = St ? St(null) : {}, this.size = 0;
|
590
590
|
}
|
591
591
|
function Ir(e) {
|
592
592
|
var a = this.has(e) && delete this.__data__[e];
|
@@ -594,7 +594,7 @@ er.exports;
|
|
594
594
|
}
|
595
595
|
function vr(e) {
|
596
596
|
var a = this.__data__;
|
597
|
-
if (
|
597
|
+
if (St) {
|
598
598
|
var o = a[e];
|
599
599
|
return o === i ? void 0 : o;
|
600
600
|
}
|
@@ -602,14 +602,14 @@ er.exports;
|
|
602
602
|
}
|
603
603
|
function Sr(e) {
|
604
604
|
var a = this.__data__;
|
605
|
-
return
|
605
|
+
return St ? a[e] !== void 0 : at.call(a, e);
|
606
606
|
}
|
607
607
|
function wr(e, a) {
|
608
608
|
var o = this.__data__;
|
609
|
-
return this.size += this.has(e) ? 0 : 1, o[e] =
|
609
|
+
return this.size += this.has(e) ? 0 : 1, o[e] = St && a === void 0 ? i : a, this;
|
610
610
|
}
|
611
|
-
|
612
|
-
function
|
611
|
+
V.prototype.clear = _r, V.prototype.delete = Ir, V.prototype.get = vr, V.prototype.has = Sr, V.prototype.set = wr;
|
612
|
+
function q(e) {
|
613
613
|
var a = -1, o = e == null ? 0 : e.length;
|
614
614
|
for (this.clear(); ++a < o; ) {
|
615
615
|
var u = e[a];
|
@@ -620,24 +620,24 @@ er.exports;
|
|
620
620
|
this.__data__ = [], this.size = 0;
|
621
621
|
}
|
622
622
|
function Tr(e) {
|
623
|
-
var a = this.__data__, o =
|
623
|
+
var a = this.__data__, o = Yt(a, e);
|
624
624
|
if (o < 0)
|
625
625
|
return !1;
|
626
626
|
var u = a.length - 1;
|
627
|
-
return o == u ? a.pop() :
|
627
|
+
return o == u ? a.pop() : Et.call(a, o, 1), --this.size, !0;
|
628
628
|
}
|
629
629
|
function Er(e) {
|
630
|
-
var a = this.__data__, o =
|
630
|
+
var a = this.__data__, o = Yt(a, e);
|
631
631
|
return o < 0 ? void 0 : a[o][1];
|
632
632
|
}
|
633
633
|
function Mr(e) {
|
634
|
-
return
|
634
|
+
return Yt(this.__data__, e) > -1;
|
635
635
|
}
|
636
636
|
function Ar(e, a) {
|
637
|
-
var o = this.__data__, u =
|
637
|
+
var o = this.__data__, u = Yt(o, e);
|
638
638
|
return u < 0 ? (++this.size, o.push([e, a])) : o[u][1] = a, this;
|
639
639
|
}
|
640
|
-
|
640
|
+
q.prototype.clear = kr, q.prototype.delete = Tr, q.prototype.get = Er, q.prototype.has = Mr, q.prototype.set = Ar;
|
641
641
|
function tt(e) {
|
642
642
|
var a = -1, o = e == null ? 0 : e.length;
|
643
643
|
for (this.clear(); ++a < o; ) {
|
@@ -647,9 +647,9 @@ er.exports;
|
|
647
647
|
}
|
648
648
|
function Or() {
|
649
649
|
this.size = 0, this.__data__ = {
|
650
|
-
hash: new
|
651
|
-
map: new (
|
652
|
-
string: new
|
650
|
+
hash: new V(),
|
651
|
+
map: new (At || q)(),
|
652
|
+
string: new V()
|
653
653
|
};
|
654
654
|
}
|
655
655
|
function xr(e) {
|
@@ -667,24 +667,24 @@ er.exports;
|
|
667
667
|
return o.set(e, a), this.size += o.size == u ? 0 : 1, this;
|
668
668
|
}
|
669
669
|
tt.prototype.clear = Or, tt.prototype.delete = xr, tt.prototype.get = Dr, tt.prototype.has = Pr, tt.prototype.set = Cr;
|
670
|
-
function
|
670
|
+
function $t(e) {
|
671
671
|
var a = -1, o = e == null ? 0 : e.length;
|
672
672
|
for (this.__data__ = new tt(); ++a < o; )
|
673
673
|
this.add(e[a]);
|
674
674
|
}
|
675
|
-
function
|
675
|
+
function We(e) {
|
676
676
|
return this.__data__.set(e, i), this;
|
677
677
|
}
|
678
|
-
function
|
678
|
+
function Kt(e) {
|
679
679
|
return this.__data__.has(e);
|
680
680
|
}
|
681
|
-
|
681
|
+
$t.prototype.add = $t.prototype.push = We, $t.prototype.has = Kt;
|
682
682
|
function pt(e) {
|
683
|
-
var a = this.__data__ = new
|
683
|
+
var a = this.__data__ = new q(e);
|
684
684
|
this.size = a.size;
|
685
685
|
}
|
686
|
-
function
|
687
|
-
this.__data__ = new
|
686
|
+
function pe() {
|
687
|
+
this.__data__ = new q(), this.size = 0;
|
688
688
|
}
|
689
689
|
function Rr(e) {
|
690
690
|
var a = this.__data__, o = a.delete(e);
|
@@ -698,189 +698,189 @@ er.exports;
|
|
698
698
|
}
|
699
699
|
function zr(e, a) {
|
700
700
|
var o = this.__data__;
|
701
|
-
if (o instanceof
|
701
|
+
if (o instanceof q) {
|
702
702
|
var u = o.__data__;
|
703
|
-
if (!
|
703
|
+
if (!At || u.length < n - 1)
|
704
704
|
return u.push([e, a]), this.size = ++o.size, this;
|
705
705
|
o = this.__data__ = new tt(u);
|
706
706
|
}
|
707
707
|
return o.set(e, a), this.size = o.size, this;
|
708
708
|
}
|
709
|
-
pt.prototype.clear =
|
709
|
+
pt.prototype.clear = pe, pt.prototype.delete = Rr, pt.prototype.get = Fr, pt.prototype.has = jr, pt.prototype.set = zr;
|
710
710
|
function Hr(e, a) {
|
711
|
-
var o =
|
712
|
-
for (var
|
713
|
-
at.call(e,
|
714
|
-
(
|
715
|
-
|
716
|
-
|
717
|
-
Kr(
|
718
|
-
return
|
719
|
-
}
|
720
|
-
function
|
711
|
+
var o = Vt(e), u = !o && Ye(e), P = !o && !u && Xt(e), k = !o && !u && !P && qe(e), N = o || u || P || k, H = N ? dr(e.length, String) : [], B = H.length;
|
712
|
+
for (var U in e)
|
713
|
+
at.call(e, U) && !(N && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
|
+
(U == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
|
+
P && (U == "offset" || U == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
|
+
k && (U == "buffer" || U == "byteLength" || U == "byteOffset") || // Skip index properties.
|
717
|
+
Kr(U, B))) && H.push(U);
|
718
|
+
return H;
|
719
|
+
}
|
720
|
+
function Yt(e, a) {
|
721
721
|
for (var o = e.length; o--; )
|
722
|
-
if (
|
722
|
+
if (Ke(e[o][0], a))
|
723
723
|
return o;
|
724
724
|
return -1;
|
725
725
|
}
|
726
|
-
function
|
726
|
+
function he(e, a, o) {
|
727
727
|
var u = a(e);
|
728
|
-
return
|
728
|
+
return Vt(e) ? u : ne(u, o(e));
|
729
729
|
}
|
730
|
-
function
|
731
|
-
return e == null ? e === void 0 ?
|
730
|
+
function Ot(e) {
|
731
|
+
return e == null ? e === void 0 ? S : v : ut && ut in Object(e) ? gt(e) : $e(e);
|
732
732
|
}
|
733
|
-
function
|
734
|
-
return mt(e) &&
|
733
|
+
function Ge(e) {
|
734
|
+
return mt(e) && Ot(e) == m;
|
735
735
|
}
|
736
|
-
function
|
737
|
-
return e === a ? !0 : e == null || a == null || !mt(e) && !mt(a) ? e !== e && a !== a : Nr(e, a, o, u,
|
736
|
+
function Be(e, a, o, u, P) {
|
737
|
+
return e === a ? !0 : e == null || a == null || !mt(e) && !mt(a) ? e !== e && a !== a : Nr(e, a, o, u, Be, P);
|
738
738
|
}
|
739
|
-
function Nr(e, a, o, u,
|
740
|
-
var
|
741
|
-
|
742
|
-
var
|
743
|
-
if (
|
744
|
-
if (!
|
739
|
+
function Nr(e, a, o, u, P, k) {
|
740
|
+
var N = Vt(e), H = Vt(a), B = N ? x : ht(e), U = H ? x : ht(a);
|
741
|
+
B = B == m ? _ : B, U = U == m ? _ : U;
|
742
|
+
var J = B == _, et = U == _, $ = B == U;
|
743
|
+
if ($ && Xt(e)) {
|
744
|
+
if (!Xt(a))
|
745
745
|
return !1;
|
746
|
-
|
746
|
+
N = !0, J = !1;
|
747
747
|
}
|
748
|
-
if (
|
749
|
-
return
|
748
|
+
if ($ && !J)
|
749
|
+
return k || (k = new pt()), N || qe(e) ? me(e, a, o, u, P, k) : Gr(e, a, B, o, u, P, k);
|
750
750
|
if (!(o & s)) {
|
751
|
-
var
|
752
|
-
if (
|
753
|
-
var
|
754
|
-
return
|
751
|
+
var Z = J && at.call(e, "__wrapped__"), X = et && at.call(a, "__wrapped__");
|
752
|
+
if (Z || X) {
|
753
|
+
var wt = Z ? e.value() : e, _t = X ? a.value() : a;
|
754
|
+
return k || (k = new pt()), P(wt, _t, o, u, k);
|
755
755
|
}
|
756
756
|
}
|
757
|
-
return
|
757
|
+
return $ ? (k || (k = new pt()), Br(e, a, o, u, P, k)) : !1;
|
758
758
|
}
|
759
759
|
function Lr(e) {
|
760
|
-
if (!
|
760
|
+
if (!Xe(e) || Vr(e))
|
761
761
|
return !1;
|
762
|
-
var a =
|
762
|
+
var a = Ve(e) ? mr : ot;
|
763
763
|
return a.test(Q(e));
|
764
764
|
}
|
765
765
|
function Ur(e) {
|
766
|
-
return mt(e) &&
|
766
|
+
return mt(e) && be(e.length) && !!G[Ot(e)];
|
767
767
|
}
|
768
768
|
function Wr(e) {
|
769
769
|
if (!Xr(e))
|
770
|
-
return
|
770
|
+
return Mt(e);
|
771
771
|
var a = [];
|
772
772
|
for (var o in Object(e))
|
773
773
|
at.call(e, o) && o != "constructor" && a.push(o);
|
774
774
|
return a;
|
775
775
|
}
|
776
|
-
function
|
777
|
-
var
|
778
|
-
if (
|
776
|
+
function me(e, a, o, u, P, k) {
|
777
|
+
var N = o & s, H = e.length, B = a.length;
|
778
|
+
if (H != B && !(N && B > H))
|
779
779
|
return !1;
|
780
|
-
var
|
781
|
-
if (
|
782
|
-
return
|
783
|
-
var
|
784
|
-
for (
|
785
|
-
var
|
780
|
+
var U = k.get(e);
|
781
|
+
if (U && k.get(a))
|
782
|
+
return U == a;
|
783
|
+
var J = -1, et = !0, $ = o & c ? new $t() : void 0;
|
784
|
+
for (k.set(e, a), k.set(a, e); ++J < H; ) {
|
785
|
+
var Z = e[J], X = a[J];
|
786
786
|
if (u)
|
787
|
-
var
|
788
|
-
if (
|
789
|
-
if (
|
787
|
+
var wt = N ? u(X, Z, J, a, e, k) : u(Z, X, J, e, a, k);
|
788
|
+
if (wt !== void 0) {
|
789
|
+
if (wt)
|
790
790
|
continue;
|
791
791
|
et = !1;
|
792
792
|
break;
|
793
793
|
}
|
794
|
-
if (
|
795
|
-
if (!
|
796
|
-
if (!
|
797
|
-
return
|
794
|
+
if ($) {
|
795
|
+
if (!Re(a, function(_t, Dt) {
|
796
|
+
if (!Nt($, Dt) && (Z === _t || P(Z, _t, o, u, k)))
|
797
|
+
return $.push(Dt);
|
798
798
|
})) {
|
799
799
|
et = !1;
|
800
800
|
break;
|
801
801
|
}
|
802
|
-
} else if (!(
|
802
|
+
} else if (!(Z === X || P(Z, X, o, u, k))) {
|
803
803
|
et = !1;
|
804
804
|
break;
|
805
805
|
}
|
806
806
|
}
|
807
|
-
return
|
807
|
+
return k.delete(e), k.delete(a), et;
|
808
808
|
}
|
809
|
-
function Gr(e, a, o, u,
|
809
|
+
function Gr(e, a, o, u, P, k, N) {
|
810
810
|
switch (o) {
|
811
|
-
case
|
811
|
+
case M:
|
812
812
|
if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
|
813
813
|
return !1;
|
814
814
|
e = e.buffer, a = a.buffer;
|
815
|
-
case
|
816
|
-
return !(e.byteLength != a.byteLength || !
|
817
|
-
case
|
818
|
-
case
|
815
|
+
case w:
|
816
|
+
return !(e.byteLength != a.byteLength || !k(new Ne(e), new Ne(a)));
|
817
|
+
case T:
|
818
|
+
case W:
|
819
819
|
case g:
|
820
|
-
return
|
820
|
+
return Ke(+e, +a);
|
821
821
|
case b:
|
822
822
|
return e.name == a.name && e.message == a.message;
|
823
|
-
case
|
823
|
+
case A:
|
824
824
|
case I:
|
825
825
|
return e == a + "";
|
826
826
|
case p:
|
827
|
-
var
|
828
|
-
case
|
829
|
-
var
|
830
|
-
if (
|
827
|
+
var H = Fe;
|
828
|
+
case E:
|
829
|
+
var B = u & s;
|
830
|
+
if (H || (H = dt), e.size != a.size && !B)
|
831
831
|
return !1;
|
832
|
-
var
|
833
|
-
if (
|
834
|
-
return
|
835
|
-
u |= c,
|
836
|
-
var
|
837
|
-
return
|
838
|
-
case
|
839
|
-
if (
|
840
|
-
return
|
832
|
+
var U = N.get(e);
|
833
|
+
if (U)
|
834
|
+
return U == a;
|
835
|
+
u |= c, N.set(e, a);
|
836
|
+
var J = me(H(e), H(a), u, P, k, N);
|
837
|
+
return N.delete(e), J;
|
838
|
+
case D:
|
839
|
+
if (de)
|
840
|
+
return de.call(e) == de.call(a);
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function Br(e, a, o, u,
|
845
|
-
var
|
846
|
-
if (
|
844
|
+
function Br(e, a, o, u, P, k) {
|
845
|
+
var N = o & s, H = xt(e), B = H.length, U = xt(a), J = U.length;
|
846
|
+
if (B != J && !N)
|
847
847
|
return !1;
|
848
|
-
for (var et =
|
849
|
-
var
|
850
|
-
if (!(
|
848
|
+
for (var et = B; et--; ) {
|
849
|
+
var $ = H[et];
|
850
|
+
if (!(N ? $ in a : at.call(a, $)))
|
851
851
|
return !1;
|
852
852
|
}
|
853
|
-
var
|
854
|
-
if (
|
855
|
-
return
|
856
|
-
var
|
857
|
-
|
858
|
-
for (var
|
859
|
-
|
860
|
-
var _t = e[
|
853
|
+
var Z = k.get(e);
|
854
|
+
if (Z && k.get(a))
|
855
|
+
return Z == a;
|
856
|
+
var X = !0;
|
857
|
+
k.set(e, a), k.set(a, e);
|
858
|
+
for (var wt = N; ++et < B; ) {
|
859
|
+
$ = H[et];
|
860
|
+
var _t = e[$], Dt = a[$];
|
861
861
|
if (u)
|
862
|
-
var xn =
|
863
|
-
if (!(xn === void 0 ? _t ===
|
864
|
-
|
862
|
+
var xn = N ? u(Dt, _t, $, a, e, k) : u(_t, Dt, $, e, a, k);
|
863
|
+
if (!(xn === void 0 ? _t === Dt || P(_t, Dt, o, u, k) : xn)) {
|
864
|
+
X = !1;
|
865
865
|
break;
|
866
866
|
}
|
867
|
-
|
867
|
+
wt || (wt = $ == "constructor");
|
868
868
|
}
|
869
|
-
if (
|
870
|
-
var
|
871
|
-
|
869
|
+
if (X && !wt) {
|
870
|
+
var Je = e.constructor, Ze = a.constructor;
|
871
|
+
Je != Ze && "constructor" in e && "constructor" in a && !(typeof Je == "function" && Je instanceof Je && typeof Ze == "function" && Ze instanceof Ze) && (X = !1);
|
872
872
|
}
|
873
|
-
return
|
873
|
+
return k.delete(e), k.delete(a), X;
|
874
874
|
}
|
875
|
-
function
|
876
|
-
return
|
875
|
+
function xt(e) {
|
876
|
+
return he(e, ge, $r);
|
877
877
|
}
|
878
878
|
function lt(e, a) {
|
879
879
|
var o = e.__data__;
|
880
880
|
return Yr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
881
881
|
}
|
882
882
|
function bt(e, a) {
|
883
|
-
var o =
|
883
|
+
var o = ie(e, a);
|
884
884
|
return Lr(o) ? o : void 0;
|
885
885
|
}
|
886
886
|
function gt(e) {
|
@@ -890,52 +890,52 @@ er.exports;
|
|
890
890
|
var u = !0;
|
891
891
|
} catch {
|
892
892
|
}
|
893
|
-
var
|
894
|
-
return u && (a ? e[ut] = o : delete e[ut]),
|
893
|
+
var P = He.call(e);
|
894
|
+
return u && (a ? e[ut] = o : delete e[ut]), P;
|
895
895
|
}
|
896
|
-
var $r =
|
897
|
-
return e == null ? [] : (e = Object(e),
|
898
|
-
return
|
896
|
+
var $r = Bt ? function(e) {
|
897
|
+
return e == null ? [] : (e = Object(e), Ce(Bt(e), function(a) {
|
898
|
+
return Gt.call(e, a);
|
899
899
|
}));
|
900
|
-
} : Jr, ht =
|
901
|
-
(
|
902
|
-
var a =
|
900
|
+
} : Jr, ht = Ot;
|
901
|
+
(ce && ht(new ce(new ArrayBuffer(1))) != M || At && ht(new At()) != p || ue && ht(ue.resolve()) != y || le && ht(new le()) != E || fe && ht(new fe()) != O) && (ht = function(e) {
|
902
|
+
var a = Ot(e), o = a == _ ? e.constructor : void 0, u = o ? Q(o) : "";
|
903
903
|
if (u)
|
904
904
|
switch (u) {
|
905
|
-
case
|
906
|
-
return
|
905
|
+
case Le:
|
906
|
+
return M;
|
907
907
|
case yt:
|
908
908
|
return p;
|
909
909
|
case yr:
|
910
910
|
return y;
|
911
911
|
case br:
|
912
|
-
return
|
912
|
+
return E;
|
913
913
|
case gr:
|
914
|
-
return
|
914
|
+
return O;
|
915
915
|
}
|
916
916
|
return a;
|
917
917
|
});
|
918
918
|
function Kr(e, a) {
|
919
|
-
return a = a ?? h, !!a && (typeof e == "number" ||
|
919
|
+
return a = a ?? h, !!a && (typeof e == "number" || Ae.test(e)) && e > -1 && e % 1 == 0 && e < a;
|
920
920
|
}
|
921
921
|
function Yr(e) {
|
922
922
|
var a = typeof e;
|
923
923
|
return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? e !== "__proto__" : e === null;
|
924
924
|
}
|
925
925
|
function Vr(e) {
|
926
|
-
return !!
|
926
|
+
return !!ze && ze in e;
|
927
927
|
}
|
928
928
|
function Xr(e) {
|
929
|
-
var a = e && e.constructor, o = typeof a == "function" && a.prototype ||
|
929
|
+
var a = e && e.constructor, o = typeof a == "function" && a.prototype || Tt;
|
930
930
|
return e === o;
|
931
931
|
}
|
932
|
-
function
|
933
|
-
return
|
932
|
+
function $e(e) {
|
933
|
+
return He.call(e);
|
934
934
|
}
|
935
935
|
function Q(e) {
|
936
936
|
if (e != null) {
|
937
937
|
try {
|
938
|
-
return
|
938
|
+
return ae.call(e);
|
939
939
|
} catch {
|
940
940
|
}
|
941
941
|
try {
|
@@ -945,40 +945,40 @@ er.exports;
|
|
945
945
|
}
|
946
946
|
return "";
|
947
947
|
}
|
948
|
-
function
|
948
|
+
function Ke(e, a) {
|
949
949
|
return e === a || e !== e && a !== a;
|
950
950
|
}
|
951
|
-
var
|
951
|
+
var Ye = Ge(/* @__PURE__ */ function() {
|
952
952
|
return arguments;
|
953
|
-
}()) ?
|
954
|
-
return mt(e) && at.call(e, "callee") && !
|
955
|
-
},
|
956
|
-
function
|
957
|
-
return e != null &&
|
953
|
+
}()) ? Ge : function(e) {
|
954
|
+
return mt(e) && at.call(e, "callee") && !Gt.call(e, "callee");
|
955
|
+
}, Vt = Array.isArray;
|
956
|
+
function ye(e) {
|
957
|
+
return e != null && be(e.length) && !Ve(e);
|
958
958
|
}
|
959
|
-
var
|
959
|
+
var Xt = oe || Zr;
|
960
960
|
function qr(e, a) {
|
961
|
-
return
|
961
|
+
return Be(e, a);
|
962
962
|
}
|
963
|
-
function
|
964
|
-
if (!
|
963
|
+
function Ve(e) {
|
964
|
+
if (!Xe(e))
|
965
965
|
return !1;
|
966
|
-
var a =
|
967
|
-
return a == d || a ==
|
966
|
+
var a = Ot(e);
|
967
|
+
return a == d || a == l || a == F || a == f;
|
968
968
|
}
|
969
|
-
function
|
969
|
+
function be(e) {
|
970
970
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= h;
|
971
971
|
}
|
972
|
-
function
|
972
|
+
function Xe(e) {
|
973
973
|
var a = typeof e;
|
974
974
|
return e != null && (a == "object" || a == "function");
|
975
975
|
}
|
976
976
|
function mt(e) {
|
977
977
|
return e != null && typeof e == "object";
|
978
978
|
}
|
979
|
-
var
|
980
|
-
function
|
981
|
-
return
|
979
|
+
var qe = re ? pr(re) : Ur;
|
980
|
+
function ge(e) {
|
981
|
+
return ye(e) ? Hr(e) : Wr(e);
|
982
982
|
}
|
983
983
|
function Jr() {
|
984
984
|
return [];
|
@@ -987,45 +987,45 @@ er.exports;
|
|
987
987
|
return !1;
|
988
988
|
}
|
989
989
|
t.exports = qr;
|
990
|
-
})(
|
991
|
-
var Ji =
|
990
|
+
})(rr, rr.exports);
|
991
|
+
var Ji = rr.exports;
|
992
992
|
const rt = /* @__PURE__ */ wn(Ji);
|
993
|
-
var
|
994
|
-
|
993
|
+
var nr = { exports: {} };
|
994
|
+
nr.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", h = "[object Array]", m = "[object Boolean]",
|
997
|
-
L[c] = L[h] = L[
|
998
|
-
var
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", h = "[object Array]", m = "[object Boolean]", x = "[object Date]", F = "[object Error]", T = "[object Function]", W = "[object GeneratorFunction]", b = "[object Map]", d = "[object Number]", l = "[object Object]", p = "[object Promise]", g = "[object RegExp]", v = "[object Set]", _ = "[object String]", y = "[object Symbol]", f = "[object WeakMap]", A = "[object ArrayBuffer]", E = "[object DataView]", I = "[object Float32Array]", D = "[object Float64Array]", S = "[object Int8Array]", O = "[object Int16Array]", w = "[object Int32Array]", M = "[object Uint8Array]", j = "[object Uint8ClampedArray]", R = "[object Uint16Array]", z = "[object Uint32Array]", C = /[\\^$.*+?()[\]{}|]/g, Ht = /\w*$/, vt = /^\[object .+?Constructor\]$/, ft = /^(?:0|[1-9]\d*)$/, L = {};
|
997
|
+
L[c] = L[h] = L[A] = L[E] = L[m] = L[x] = L[I] = L[D] = L[S] = L[O] = L[w] = L[b] = L[d] = L[l] = L[g] = L[v] = L[_] = L[y] = L[M] = L[j] = L[R] = L[z] = !0, L[F] = L[T] = L[f] = !1;
|
998
|
+
var Qt = typeof st == "object" && st && st.Object === Object && st, lr = typeof self == "object" && self && self.Object === Object && self, ot = Qt || lr || Function("return this")(), Ae = r && !r.nodeType && r, G = Ae && !0 && t && !t.nodeType && t, Oe = G && G.exports === Ae;
|
999
999
|
function fr(e, a) {
|
1000
1000
|
return e.set(a[0], a[1]), e;
|
1001
1001
|
}
|
1002
1002
|
function ct(e, a) {
|
1003
1003
|
return e.add(a), e;
|
1004
1004
|
}
|
1005
|
-
function
|
1005
|
+
function xe(e, a) {
|
1006
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
|
-
function
|
1011
|
-
for (var o = -1, u = a.length,
|
1012
|
-
e[
|
1010
|
+
function De(e, a) {
|
1011
|
+
for (var o = -1, u = a.length, P = e.length; ++o < u; )
|
1012
|
+
e[P + o] = a[o];
|
1013
1013
|
return e;
|
1014
1014
|
}
|
1015
|
-
function
|
1016
|
-
for (var
|
1017
|
-
o = a(o, e[
|
1015
|
+
function te(e, a, o, u) {
|
1016
|
+
for (var P = -1, k = e ? e.length : 0; ++P < k; )
|
1017
|
+
o = a(o, e[P], P, e);
|
1018
1018
|
return o;
|
1019
1019
|
}
|
1020
|
-
function
|
1020
|
+
function ee(e, a) {
|
1021
1021
|
for (var o = -1, u = Array(e); ++o < e; )
|
1022
1022
|
u[o] = a(o);
|
1023
1023
|
return u;
|
1024
1024
|
}
|
1025
|
-
function
|
1025
|
+
function Pe(e, a) {
|
1026
1026
|
return e == null ? void 0 : e[a];
|
1027
1027
|
}
|
1028
|
-
function
|
1028
|
+
function re(e) {
|
1029
1029
|
var a = !1;
|
1030
1030
|
if (e != null && typeof e.toString != "function")
|
1031
1031
|
try {
|
@@ -1034,29 +1034,29 @@ rr.exports;
|
|
1034
1034
|
}
|
1035
1035
|
return a;
|
1036
1036
|
}
|
1037
|
-
function
|
1037
|
+
function Ce(e) {
|
1038
1038
|
var a = -1, o = Array(e.size);
|
1039
|
-
return e.forEach(function(u,
|
1040
|
-
o[++a] = [
|
1039
|
+
return e.forEach(function(u, P) {
|
1040
|
+
o[++a] = [P, u];
|
1041
1041
|
}), o;
|
1042
1042
|
}
|
1043
|
-
function
|
1043
|
+
function ne(e, a) {
|
1044
1044
|
return function(o) {
|
1045
1045
|
return e(a(o));
|
1046
1046
|
};
|
1047
1047
|
}
|
1048
|
-
function
|
1048
|
+
function Re(e) {
|
1049
1049
|
var a = -1, o = Array(e.size);
|
1050
1050
|
return e.forEach(function(u) {
|
1051
1051
|
o[++a] = u;
|
1052
1052
|
}), o;
|
1053
1053
|
}
|
1054
|
-
var dr = Array.prototype, pr = Function.prototype,
|
1055
|
-
var e = /[^.]+$/.exec(
|
1054
|
+
var dr = Array.prototype, pr = Function.prototype, Nt = Object.prototype, ie = ot["__core-js_shared__"], Fe = function() {
|
1055
|
+
var e = /[^.]+$/.exec(ie && ie.keys && ie.keys.IE_PROTO || "");
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
1057
|
-
}(),
|
1058
|
-
"^" +
|
1059
|
-
),
|
1057
|
+
}(), je = pr.toString, dt = Nt.hasOwnProperty, Lt = Nt.toString, hr = RegExp(
|
1058
|
+
"^" + je.call(dt).replace(C, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
1059
|
+
), Tt = Oe ? ot.Buffer : void 0, Ut = ot.Symbol, ae = ot.Uint8Array, at = ne(Object.getPrototypeOf, Object), ze = Object.create, He = Nt.propertyIsEnumerable, mr = dr.splice, se = Object.getOwnPropertySymbols, Wt = Tt ? Tt.isBuffer : void 0, Ne = ne(Object.keys, Object), Gt = lt(ot, "DataView"), Et = lt(ot, "Map"), ut = lt(ot, "Promise"), Bt = lt(ot, "Set"), oe = lt(ot, "WeakMap"), Mt = lt(Object, "create"), ce = Q(Gt), At = Q(Et), ue = Q(ut), le = Q(Bt), fe = Q(oe), St = Ut ? Ut.prototype : void 0, Le = St ? St.valueOf : void 0;
|
1060
1060
|
function yt(e) {
|
1061
1061
|
var a = -1, o = e ? e.length : 0;
|
1062
1062
|
for (this.clear(); ++a < o; ) {
|
@@ -1065,29 +1065,29 @@ rr.exports;
|
|
1065
1065
|
}
|
1066
1066
|
}
|
1067
1067
|
function yr() {
|
1068
|
-
this.__data__ =
|
1068
|
+
this.__data__ = Mt ? Mt(null) : {};
|
1069
1069
|
}
|
1070
1070
|
function br(e) {
|
1071
1071
|
return this.has(e) && delete this.__data__[e];
|
1072
1072
|
}
|
1073
1073
|
function gr(e) {
|
1074
1074
|
var a = this.__data__;
|
1075
|
-
if (
|
1075
|
+
if (Mt) {
|
1076
1076
|
var o = a[e];
|
1077
1077
|
return o === i ? void 0 : o;
|
1078
1078
|
}
|
1079
1079
|
return dt.call(a, e) ? a[e] : void 0;
|
1080
1080
|
}
|
1081
|
-
function
|
1081
|
+
function Ue(e) {
|
1082
1082
|
var a = this.__data__;
|
1083
|
-
return
|
1083
|
+
return Mt ? a[e] !== void 0 : dt.call(a, e);
|
1084
1084
|
}
|
1085
|
-
function
|
1085
|
+
function de(e, a) {
|
1086
1086
|
var o = this.__data__;
|
1087
|
-
return o[e] =
|
1087
|
+
return o[e] = Mt && a === void 0 ? i : a, this;
|
1088
1088
|
}
|
1089
|
-
yt.prototype.clear = yr, yt.prototype.delete = br, yt.prototype.get = gr, yt.prototype.has =
|
1090
|
-
function
|
1089
|
+
yt.prototype.clear = yr, yt.prototype.delete = br, yt.prototype.get = gr, yt.prototype.has = Ue, yt.prototype.set = de;
|
1090
|
+
function V(e) {
|
1091
1091
|
var a = -1, o = e ? e.length : 0;
|
1092
1092
|
for (this.clear(); ++a < o; ) {
|
1093
1093
|
var u = e[a];
|
@@ -1098,25 +1098,25 @@ rr.exports;
|
|
1098
1098
|
this.__data__ = [];
|
1099
1099
|
}
|
1100
1100
|
function Ir(e) {
|
1101
|
-
var a = this.__data__, o =
|
1101
|
+
var a = this.__data__, o = Kt(a, e);
|
1102
1102
|
if (o < 0)
|
1103
1103
|
return !1;
|
1104
1104
|
var u = a.length - 1;
|
1105
1105
|
return o == u ? a.pop() : mr.call(a, o, 1), !0;
|
1106
1106
|
}
|
1107
1107
|
function vr(e) {
|
1108
|
-
var a = this.__data__, o =
|
1108
|
+
var a = this.__data__, o = Kt(a, e);
|
1109
1109
|
return o < 0 ? void 0 : a[o][1];
|
1110
1110
|
}
|
1111
1111
|
function Sr(e) {
|
1112
|
-
return
|
1112
|
+
return Kt(this.__data__, e) > -1;
|
1113
1113
|
}
|
1114
1114
|
function wr(e, a) {
|
1115
|
-
var o = this.__data__, u =
|
1115
|
+
var o = this.__data__, u = Kt(o, e);
|
1116
1116
|
return u < 0 ? o.push([e, a]) : o[u][1] = a, this;
|
1117
1117
|
}
|
1118
|
-
|
1119
|
-
function
|
1118
|
+
V.prototype.clear = _r, V.prototype.delete = Ir, V.prototype.get = vr, V.prototype.has = Sr, V.prototype.set = wr;
|
1119
|
+
function q(e) {
|
1120
1120
|
var a = -1, o = e ? e.length : 0;
|
1121
1121
|
for (this.clear(); ++a < o; ) {
|
1122
1122
|
var u = e[a];
|
@@ -1126,28 +1126,28 @@ rr.exports;
|
|
1126
1126
|
function kr() {
|
1127
1127
|
this.__data__ = {
|
1128
1128
|
hash: new yt(),
|
1129
|
-
map: new (
|
1129
|
+
map: new (Et || V)(),
|
1130
1130
|
string: new yt()
|
1131
1131
|
};
|
1132
1132
|
}
|
1133
1133
|
function Tr(e) {
|
1134
|
-
return
|
1134
|
+
return xt(this, e).delete(e);
|
1135
1135
|
}
|
1136
1136
|
function Er(e) {
|
1137
|
-
return
|
1137
|
+
return xt(this, e).get(e);
|
1138
1138
|
}
|
1139
1139
|
function Mr(e) {
|
1140
|
-
return
|
1140
|
+
return xt(this, e).has(e);
|
1141
1141
|
}
|
1142
1142
|
function Ar(e, a) {
|
1143
|
-
return
|
1143
|
+
return xt(this, e).set(e, a), this;
|
1144
1144
|
}
|
1145
|
-
|
1145
|
+
q.prototype.clear = kr, q.prototype.delete = Tr, q.prototype.get = Er, q.prototype.has = Mr, q.prototype.set = Ar;
|
1146
1146
|
function tt(e) {
|
1147
|
-
this.__data__ = new
|
1147
|
+
this.__data__ = new V(e);
|
1148
1148
|
}
|
1149
1149
|
function Or() {
|
1150
|
-
this.__data__ = new
|
1150
|
+
this.__data__ = new V();
|
1151
1151
|
}
|
1152
1152
|
function xr(e) {
|
1153
1153
|
return this.__data__.delete(e);
|
@@ -1160,124 +1160,124 @@ rr.exports;
|
|
1160
1160
|
}
|
1161
1161
|
function Cr(e, a) {
|
1162
1162
|
var o = this.__data__;
|
1163
|
-
if (o instanceof
|
1163
|
+
if (o instanceof V) {
|
1164
1164
|
var u = o.__data__;
|
1165
|
-
if (!
|
1165
|
+
if (!Et || u.length < n - 1)
|
1166
1166
|
return u.push([e, a]), this;
|
1167
|
-
o = this.__data__ = new
|
1167
|
+
o = this.__data__ = new q(u);
|
1168
1168
|
}
|
1169
1169
|
return o.set(e, a), this;
|
1170
1170
|
}
|
1171
1171
|
tt.prototype.clear = Or, tt.prototype.delete = xr, tt.prototype.get = Dr, tt.prototype.has = Pr, tt.prototype.set = Cr;
|
1172
|
-
function
|
1173
|
-
var o =
|
1174
|
-
for (var
|
1175
|
-
dt.call(e,
|
1172
|
+
function $t(e, a) {
|
1173
|
+
var o = ye(e) || Vt(e) ? ee(e.length, String) : [], u = o.length, P = !!u;
|
1174
|
+
for (var k in e)
|
1175
|
+
dt.call(e, k) && !(P && (k == "length" || Yr(k, u))) && o.push(k);
|
1176
1176
|
return o;
|
1177
1177
|
}
|
1178
|
-
function
|
1178
|
+
function We(e, a, o) {
|
1179
1179
|
var u = e[a];
|
1180
|
-
(!(dt.call(e, a) &&
|
1180
|
+
(!(dt.call(e, a) && Ye(u, o)) || o === void 0 && !(a in e)) && (e[a] = o);
|
1181
1181
|
}
|
1182
|
-
function
|
1182
|
+
function Kt(e, a) {
|
1183
1183
|
for (var o = e.length; o--; )
|
1184
|
-
if (
|
1184
|
+
if (Ye(e[o][0], a))
|
1185
1185
|
return o;
|
1186
1186
|
return -1;
|
1187
1187
|
}
|
1188
1188
|
function pt(e, a) {
|
1189
|
-
return e &&
|
1189
|
+
return e && me(a, ge(a), e);
|
1190
1190
|
}
|
1191
|
-
function
|
1192
|
-
var
|
1193
|
-
if (u && (
|
1194
|
-
return
|
1191
|
+
function pe(e, a, o, u, P, k, N) {
|
1192
|
+
var H;
|
1193
|
+
if (u && (H = k ? u(e, P, k, N) : u(e)), H !== void 0)
|
1194
|
+
return H;
|
1195
1195
|
if (!mt(e))
|
1196
1196
|
return e;
|
1197
|
-
var
|
1198
|
-
if (
|
1199
|
-
if (
|
1200
|
-
return Wr(e,
|
1197
|
+
var B = ye(e);
|
1198
|
+
if (B) {
|
1199
|
+
if (H = $r(e), !a)
|
1200
|
+
return Wr(e, H);
|
1201
1201
|
} else {
|
1202
|
-
var
|
1203
|
-
if (
|
1204
|
-
return
|
1205
|
-
if (
|
1206
|
-
if (
|
1207
|
-
return
|
1208
|
-
if (
|
1209
|
-
return Gr(e, pt(
|
1202
|
+
var U = gt(e), J = U == T || U == W;
|
1203
|
+
if (Ve(e))
|
1204
|
+
return Yt(e, a);
|
1205
|
+
if (U == l || U == c || J && !k) {
|
1206
|
+
if (re(e))
|
1207
|
+
return k ? e : {};
|
1208
|
+
if (H = ht(J ? {} : e), !a)
|
1209
|
+
return Gr(e, pt(H, e));
|
1210
1210
|
} else {
|
1211
|
-
if (!L[
|
1212
|
-
return
|
1213
|
-
|
1211
|
+
if (!L[U])
|
1212
|
+
return k ? e : {};
|
1213
|
+
H = Kr(e, U, pe, a);
|
1214
1214
|
}
|
1215
1215
|
}
|
1216
|
-
|
1217
|
-
var et =
|
1216
|
+
N || (N = new tt());
|
1217
|
+
var et = N.get(e);
|
1218
1218
|
if (et)
|
1219
1219
|
return et;
|
1220
|
-
if (
|
1221
|
-
var
|
1222
|
-
return
|
1223
|
-
|
1224
|
-
}),
|
1220
|
+
if (N.set(e, H), !B)
|
1221
|
+
var $ = o ? Br(e) : ge(e);
|
1222
|
+
return xe($ || e, function(Z, X) {
|
1223
|
+
$ && (X = Z, Z = e[X]), We(H, X, pe(Z, a, o, u, X, e, N));
|
1224
|
+
}), H;
|
1225
1225
|
}
|
1226
1226
|
function Rr(e) {
|
1227
|
-
return mt(e) ?
|
1227
|
+
return mt(e) ? ze(e) : {};
|
1228
1228
|
}
|
1229
1229
|
function Fr(e, a, o) {
|
1230
1230
|
var u = a(e);
|
1231
|
-
return
|
1231
|
+
return ye(e) ? u : De(u, o(e));
|
1232
1232
|
}
|
1233
1233
|
function jr(e) {
|
1234
|
-
return
|
1234
|
+
return Lt.call(e);
|
1235
1235
|
}
|
1236
1236
|
function zr(e) {
|
1237
1237
|
if (!mt(e) || Xr(e))
|
1238
1238
|
return !1;
|
1239
|
-
var a =
|
1239
|
+
var a = be(e) || re(e) ? hr : vt;
|
1240
1240
|
return a.test(Q(e));
|
1241
1241
|
}
|
1242
1242
|
function Hr(e) {
|
1243
|
-
if (
|
1244
|
-
return
|
1243
|
+
if (!$e(e))
|
1244
|
+
return Ne(e);
|
1245
1245
|
var a = [];
|
1246
1246
|
for (var o in Object(e))
|
1247
1247
|
dt.call(e, o) && o != "constructor" && a.push(o);
|
1248
1248
|
return a;
|
1249
1249
|
}
|
1250
|
-
function
|
1250
|
+
function Yt(e, a) {
|
1251
1251
|
if (a)
|
1252
1252
|
return e.slice();
|
1253
1253
|
var o = new e.constructor(e.length);
|
1254
1254
|
return e.copy(o), o;
|
1255
1255
|
}
|
1256
|
-
function
|
1256
|
+
function he(e) {
|
1257
1257
|
var a = new e.constructor(e.byteLength);
|
1258
|
-
return new
|
1258
|
+
return new ae(a).set(new ae(e)), a;
|
1259
1259
|
}
|
1260
|
-
function
|
1261
|
-
var o = a ?
|
1260
|
+
function Ot(e, a) {
|
1261
|
+
var o = a ? he(e.buffer) : e.buffer;
|
1262
1262
|
return new e.constructor(o, e.byteOffset, e.byteLength);
|
1263
1263
|
}
|
1264
|
-
function
|
1265
|
-
var u = a ? o(
|
1266
|
-
return
|
1264
|
+
function Ge(e, a, o) {
|
1265
|
+
var u = a ? o(Ce(e), !0) : Ce(e);
|
1266
|
+
return te(u, fr, new e.constructor());
|
1267
1267
|
}
|
1268
|
-
function
|
1269
|
-
var a = new e.constructor(e.source,
|
1268
|
+
function Be(e) {
|
1269
|
+
var a = new e.constructor(e.source, Ht.exec(e));
|
1270
1270
|
return a.lastIndex = e.lastIndex, a;
|
1271
1271
|
}
|
1272
1272
|
function Nr(e, a, o) {
|
1273
|
-
var u = a ? o(
|
1274
|
-
return
|
1273
|
+
var u = a ? o(Re(e), !0) : Re(e);
|
1274
|
+
return te(u, ct, new e.constructor());
|
1275
1275
|
}
|
1276
1276
|
function Lr(e) {
|
1277
|
-
return
|
1277
|
+
return Le ? Object(Le.call(e)) : {};
|
1278
1278
|
}
|
1279
1279
|
function Ur(e, a) {
|
1280
|
-
var o = a ?
|
1280
|
+
var o = a ? he(e.buffer) : e.buffer;
|
1281
1281
|
return new e.constructor(o, e.byteOffset, e.length);
|
1282
1282
|
}
|
1283
1283
|
function Wr(e, a) {
|
@@ -1286,43 +1286,43 @@ rr.exports;
|
|
1286
1286
|
a[o] = e[o];
|
1287
1287
|
return a;
|
1288
1288
|
}
|
1289
|
-
function
|
1289
|
+
function me(e, a, o, u) {
|
1290
1290
|
o || (o = {});
|
1291
|
-
for (var
|
1292
|
-
var
|
1293
|
-
|
1291
|
+
for (var P = -1, k = a.length; ++P < k; ) {
|
1292
|
+
var N = a[P], H = void 0;
|
1293
|
+
We(o, N, H === void 0 ? e[N] : H);
|
1294
1294
|
}
|
1295
1295
|
return o;
|
1296
1296
|
}
|
1297
1297
|
function Gr(e, a) {
|
1298
|
-
return
|
1298
|
+
return me(e, bt(e), a);
|
1299
1299
|
}
|
1300
1300
|
function Br(e) {
|
1301
|
-
return Fr(e,
|
1301
|
+
return Fr(e, ge, bt);
|
1302
1302
|
}
|
1303
|
-
function
|
1303
|
+
function xt(e, a) {
|
1304
1304
|
var o = e.__data__;
|
1305
1305
|
return Vr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
1306
1306
|
}
|
1307
1307
|
function lt(e, a) {
|
1308
|
-
var o =
|
1308
|
+
var o = Pe(e, a);
|
1309
1309
|
return zr(o) ? o : void 0;
|
1310
1310
|
}
|
1311
|
-
var bt =
|
1312
|
-
(
|
1313
|
-
var a =
|
1311
|
+
var bt = se ? ne(se, Object) : Jr, gt = jr;
|
1312
|
+
(Gt && gt(new Gt(new ArrayBuffer(1))) != E || Et && gt(new Et()) != b || ut && gt(ut.resolve()) != p || Bt && gt(new Bt()) != v || oe && gt(new oe()) != f) && (gt = function(e) {
|
1313
|
+
var a = Lt.call(e), o = a == l ? e.constructor : void 0, u = o ? Q(o) : void 0;
|
1314
1314
|
if (u)
|
1315
1315
|
switch (u) {
|
1316
|
-
case oe:
|
1317
|
-
return M;
|
1318
|
-
case Mt:
|
1319
|
-
return b;
|
1320
1316
|
case ce:
|
1321
|
-
return
|
1317
|
+
return E;
|
1318
|
+
case At:
|
1319
|
+
return b;
|
1322
1320
|
case ue:
|
1323
|
-
return
|
1321
|
+
return p;
|
1324
1322
|
case le:
|
1325
|
-
return
|
1323
|
+
return v;
|
1324
|
+
case fe:
|
1325
|
+
return f;
|
1326
1326
|
}
|
1327
1327
|
return a;
|
1328
1328
|
});
|
@@ -1331,59 +1331,59 @@ rr.exports;
|
|
1331
1331
|
return a && typeof e[0] == "string" && dt.call(e, "index") && (o.index = e.index, o.input = e.input), o;
|
1332
1332
|
}
|
1333
1333
|
function ht(e) {
|
1334
|
-
return typeof e.constructor == "function" &&
|
1334
|
+
return typeof e.constructor == "function" && !$e(e) ? Rr(at(e)) : {};
|
1335
1335
|
}
|
1336
1336
|
function Kr(e, a, o, u) {
|
1337
|
-
var
|
1337
|
+
var P = e.constructor;
|
1338
1338
|
switch (a) {
|
1339
|
-
case
|
1340
|
-
return
|
1339
|
+
case A:
|
1340
|
+
return he(e);
|
1341
1341
|
case m:
|
1342
|
-
case
|
1343
|
-
return new
|
1344
|
-
case
|
1345
|
-
return
|
1342
|
+
case x:
|
1343
|
+
return new P(+e);
|
1344
|
+
case E:
|
1345
|
+
return Ot(e, u);
|
1346
1346
|
case I:
|
1347
|
-
case C:
|
1348
|
-
case w:
|
1349
1347
|
case D:
|
1350
|
-
case
|
1351
|
-
case v:
|
1352
|
-
case A:
|
1348
|
+
case S:
|
1353
1349
|
case O:
|
1354
|
-
case
|
1350
|
+
case w:
|
1351
|
+
case M:
|
1352
|
+
case j:
|
1353
|
+
case R:
|
1354
|
+
case z:
|
1355
1355
|
return Ur(e, u);
|
1356
1356
|
case b:
|
1357
|
-
return
|
1357
|
+
return Ge(e, u, o);
|
1358
1358
|
case d:
|
1359
1359
|
case _:
|
1360
|
-
return new
|
1360
|
+
return new P(e);
|
1361
1361
|
case g:
|
1362
|
-
return
|
1363
|
-
case
|
1362
|
+
return Be(e);
|
1363
|
+
case v:
|
1364
1364
|
return Nr(e, u, o);
|
1365
1365
|
case y:
|
1366
1366
|
return Lr(e);
|
1367
1367
|
}
|
1368
1368
|
}
|
1369
1369
|
function Yr(e, a) {
|
1370
|
-
return a = a ?? s, !!a && (typeof e == "number" ||
|
1370
|
+
return a = a ?? s, !!a && (typeof e == "number" || ft.test(e)) && e > -1 && e % 1 == 0 && e < a;
|
1371
1371
|
}
|
1372
1372
|
function Vr(e) {
|
1373
1373
|
var a = typeof e;
|
1374
1374
|
return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? e !== "__proto__" : e === null;
|
1375
1375
|
}
|
1376
1376
|
function Xr(e) {
|
1377
|
-
return !!
|
1377
|
+
return !!Fe && Fe in e;
|
1378
1378
|
}
|
1379
|
-
function
|
1380
|
-
var a = e && e.constructor, o = typeof a == "function" && a.prototype ||
|
1379
|
+
function $e(e) {
|
1380
|
+
var a = e && e.constructor, o = typeof a == "function" && a.prototype || Nt;
|
1381
1381
|
return e === o;
|
1382
1382
|
}
|
1383
1383
|
function Q(e) {
|
1384
1384
|
if (e != null) {
|
1385
1385
|
try {
|
1386
|
-
return
|
1386
|
+
return je.call(e);
|
1387
1387
|
} catch {
|
1388
1388
|
}
|
1389
1389
|
try {
|
@@ -1393,39 +1393,39 @@ rr.exports;
|
|
1393
1393
|
}
|
1394
1394
|
return "";
|
1395
1395
|
}
|
1396
|
-
function
|
1397
|
-
return
|
1396
|
+
function Ke(e) {
|
1397
|
+
return pe(e, !0, !0);
|
1398
1398
|
}
|
1399
|
-
function
|
1399
|
+
function Ye(e, a) {
|
1400
1400
|
return e === a || e !== e && a !== a;
|
1401
1401
|
}
|
1402
|
-
function
|
1403
|
-
return qr(e) && dt.call(e, "callee") && (!
|
1402
|
+
function Vt(e) {
|
1403
|
+
return qr(e) && dt.call(e, "callee") && (!He.call(e, "callee") || Lt.call(e) == c);
|
1404
1404
|
}
|
1405
|
-
var
|
1406
|
-
function
|
1407
|
-
return e != null &&
|
1405
|
+
var ye = Array.isArray;
|
1406
|
+
function Xt(e) {
|
1407
|
+
return e != null && Xe(e.length) && !be(e);
|
1408
1408
|
}
|
1409
1409
|
function qr(e) {
|
1410
|
-
return
|
1410
|
+
return qe(e) && Xt(e);
|
1411
1411
|
}
|
1412
|
-
var
|
1413
|
-
function
|
1414
|
-
var a = mt(e) ?
|
1415
|
-
return a ==
|
1412
|
+
var Ve = Wt || Zr;
|
1413
|
+
function be(e) {
|
1414
|
+
var a = mt(e) ? Lt.call(e) : "";
|
1415
|
+
return a == T || a == W;
|
1416
1416
|
}
|
1417
|
-
function
|
1417
|
+
function Xe(e) {
|
1418
1418
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= s;
|
1419
1419
|
}
|
1420
1420
|
function mt(e) {
|
1421
1421
|
var a = typeof e;
|
1422
1422
|
return !!e && (a == "object" || a == "function");
|
1423
1423
|
}
|
1424
|
-
function
|
1424
|
+
function qe(e) {
|
1425
1425
|
return !!e && typeof e == "object";
|
1426
1426
|
}
|
1427
|
-
function
|
1428
|
-
return
|
1427
|
+
function ge(e) {
|
1428
|
+
return Xt(e) ? $t(e) : Hr(e);
|
1429
1429
|
}
|
1430
1430
|
function Jr() {
|
1431
1431
|
return [];
|
@@ -1433,10 +1433,10 @@ rr.exports;
|
|
1433
1433
|
function Zr() {
|
1434
1434
|
return !1;
|
1435
1435
|
}
|
1436
|
-
t.exports =
|
1437
|
-
})(
|
1438
|
-
var Zi =
|
1439
|
-
const
|
1436
|
+
t.exports = Ke;
|
1437
|
+
})(nr, nr.exports);
|
1438
|
+
var Zi = nr.exports;
|
1439
|
+
const K = /* @__PURE__ */ wn(Zi), ti = (t) => new Promise((r, n) => {
|
1440
1440
|
const i = new Image();
|
1441
1441
|
console.warn("update cdn config for cors?"), i.onload = () => {
|
1442
1442
|
const s = i.width, c = i.height;
|
@@ -1476,12 +1476,12 @@ const B = /* @__PURE__ */ wn(Zi), ti = (t) => new Promise((r, n) => {
|
|
1476
1476
|
});
|
1477
1477
|
}).catch((s) => i(s));
|
1478
1478
|
});
|
1479
|
-
},
|
1479
|
+
}, or = {
|
1480
1480
|
color: "#000000",
|
1481
1481
|
x: 0,
|
1482
1482
|
y: 0,
|
1483
1483
|
blur: 0
|
1484
|
-
},
|
1484
|
+
}, Te = (t, r) => {
|
1485
1485
|
let n = r != null && r.trim ? r.trim.to - r.trim.from : (r == null ? void 0 : r.duration) || 5e3;
|
1486
1486
|
const i = {
|
1487
1487
|
from: 0,
|
@@ -1516,7 +1516,7 @@ const B = /* @__PURE__ */ wn(Zi), ti = (t) => new Promise((r, n) => {
|
|
1516
1516
|
from: 0,
|
1517
1517
|
to: r.duration
|
1518
1518
|
};
|
1519
|
-
function
|
1519
|
+
function cr(t, r) {
|
1520
1520
|
const n = {
|
1521
1521
|
x: t.size.width / 2,
|
1522
1522
|
y: t.size.height / 2
|
@@ -1531,7 +1531,7 @@ function or(t, r) {
|
|
1531
1531
|
};
|
1532
1532
|
}
|
1533
1533
|
const dn = async (t, r) => {
|
1534
|
-
const n = t.details.src, i = await ei(n), s =
|
1534
|
+
const n = t.details.src, i = await ei(n), s = cr(r, {
|
1535
1535
|
...i
|
1536
1536
|
}), c = ni(t.trim, { duration: i.duration }), h = {
|
1537
1537
|
width: i.width,
|
@@ -1546,7 +1546,7 @@ const dn = async (t, r) => {
|
|
1546
1546
|
// Default border width
|
1547
1547
|
borderColor: t.details.borderColor || "#000000",
|
1548
1548
|
// Default border color
|
1549
|
-
boxShadow: t.details.boxShadow ||
|
1549
|
+
boxShadow: t.details.boxShadow || or,
|
1550
1550
|
top: t.details.top || s.top || "0px",
|
1551
1551
|
// Default top
|
1552
1552
|
left: t.details.left || s.left || "0px",
|
@@ -1569,7 +1569,7 @@ const dn = async (t, r) => {
|
|
1569
1569
|
name: "video",
|
1570
1570
|
details: h,
|
1571
1571
|
playbackRate: t.playbackRate || 1,
|
1572
|
-
display:
|
1572
|
+
display: Te(t.display, { duration: i.duration, trim: c }),
|
1573
1573
|
duration: i.duration
|
1574
1574
|
};
|
1575
1575
|
}, pn = async (t) => {
|
@@ -1581,7 +1581,7 @@ const dn = async (t, r) => {
|
|
1581
1581
|
id: r,
|
1582
1582
|
name: "",
|
1583
1583
|
type: "audio",
|
1584
|
-
display:
|
1584
|
+
display: Te(t.display, { duration: s, trim: c }),
|
1585
1585
|
trim: c,
|
1586
1586
|
playbackRate: t.playbackRate || 1,
|
1587
1587
|
details: {
|
@@ -1596,36 +1596,36 @@ const dn = async (t, r) => {
|
|
1596
1596
|
const n = t.trackItemsIds, i = t.size, s = Math.min(
|
1597
1597
|
r.size.width / i.width,
|
1598
1598
|
r.size.height / i.height
|
1599
|
-
), c = t.rotate || 0, h = t.position, m = t.display,
|
1600
|
-
let F = 1 / 0,
|
1601
|
-
const
|
1602
|
-
const
|
1603
|
-
if (
|
1599
|
+
), c = t.rotate || 0, h = t.position, m = t.display, x = t.trim || t.display;
|
1600
|
+
let F = 1 / 0, T = 0;
|
1601
|
+
const W = n.map((d) => {
|
1602
|
+
const l = t.trackItemsMap[d], p = t.trackItemsDetails[d];
|
1603
|
+
if (l.display.from < F && (F = l.display.from), l.display.to > T && (T = l.display.to), l.type === "text")
|
1604
1604
|
return yn(
|
1605
|
-
{ ...
|
1605
|
+
{ ...l, details: p.details },
|
1606
1606
|
{ size: i }
|
1607
1607
|
);
|
1608
|
-
if (
|
1608
|
+
if (l.type === "image")
|
1609
1609
|
return hn(
|
1610
|
-
{ ...
|
1610
|
+
{ ...l, details: p.details },
|
1611
1611
|
{ size: i }
|
1612
1612
|
);
|
1613
|
-
if (
|
1613
|
+
if (l.type === "video")
|
1614
1614
|
return dn(
|
1615
|
-
{ ...
|
1615
|
+
{ ...l, details: p.details },
|
1616
1616
|
{ size: i }
|
1617
1617
|
);
|
1618
|
-
if (
|
1618
|
+
if (l.type === "audio")
|
1619
1619
|
return pn({
|
1620
|
-
...
|
1620
|
+
...l,
|
1621
1621
|
details: p.details
|
1622
1622
|
});
|
1623
|
-
if (
|
1623
|
+
if (l.type === "caption")
|
1624
1624
|
return mn(
|
1625
|
-
{ ...
|
1625
|
+
{ ...l, details: p.details },
|
1626
1626
|
{ size: i }
|
1627
1627
|
);
|
1628
|
-
}), b = await Promise.all(
|
1628
|
+
}), b = await Promise.all(W);
|
1629
1629
|
return {
|
1630
1630
|
id: t.id,
|
1631
1631
|
details: b,
|
@@ -1634,19 +1634,19 @@ const dn = async (t, r) => {
|
|
1634
1634
|
top: h.top || 0,
|
1635
1635
|
left: h.left || 0
|
1636
1636
|
},
|
1637
|
-
trim:
|
1637
|
+
trim: x,
|
1638
1638
|
scale: s,
|
1639
|
-
display: m || { from: F, to:
|
1639
|
+
display: m || { from: F, to: T },
|
1640
1640
|
rotate: c,
|
1641
1641
|
activeEdit: !1
|
1642
1642
|
};
|
1643
1643
|
}, hn = async (t, r) => {
|
1644
|
-
const n = t.details, i = await ti(n.src), s =
|
1644
|
+
const n = t.details, i = await ti(n.src), s = cr(r, i);
|
1645
1645
|
return {
|
1646
1646
|
id: t.id,
|
1647
1647
|
type: "image",
|
1648
1648
|
name: "image",
|
1649
|
-
display:
|
1649
|
+
display: Te(t.display),
|
1650
1650
|
playbackRate: t.playbackRate || 1,
|
1651
1651
|
details: {
|
1652
1652
|
src: n.src || "",
|
@@ -1663,7 +1663,7 @@ const dn = async (t, r) => {
|
|
1663
1663
|
// Default border
|
1664
1664
|
borderRadius: n.borderRadius || 0,
|
1665
1665
|
// Default border radius
|
1666
|
-
boxShadow: n.boxShadow ||
|
1666
|
+
boxShadow: n.boxShadow || or,
|
1667
1667
|
// Default box shadow
|
1668
1668
|
top: n.top || s.top || "0px",
|
1669
1669
|
// Default top
|
@@ -1692,7 +1692,7 @@ const dn = async (t, r) => {
|
|
1692
1692
|
url: n.details.fontUrl
|
1693
1693
|
}
|
1694
1694
|
]);
|
1695
|
-
const i = n.id, s = n.details, c = ii(s), h = ri(n.details.text, c), m =
|
1695
|
+
const i = n.id, s = n.details, c = ii(s), h = ri(n.details.text, c), m = cr(r, {
|
1696
1696
|
width: c.width,
|
1697
1697
|
height: h
|
1698
1698
|
});
|
@@ -1700,7 +1700,7 @@ const dn = async (t, r) => {
|
|
1700
1700
|
id: i,
|
1701
1701
|
name: "caption",
|
1702
1702
|
type: "caption",
|
1703
|
-
display:
|
1703
|
+
display: Te(n.display),
|
1704
1704
|
details: {
|
1705
1705
|
...c,
|
1706
1706
|
text: s.text || "",
|
@@ -1712,7 +1712,7 @@ const dn = async (t, r) => {
|
|
1712
1712
|
left: c.left || m.left,
|
1713
1713
|
borderWidth: s.borderWidth || 0,
|
1714
1714
|
borderColor: s.borderColor || "#000000",
|
1715
|
-
boxShadow: s.boxShadow ||
|
1715
|
+
boxShadow: s.boxShadow || or,
|
1716
1716
|
words: s.words || []
|
1717
1717
|
},
|
1718
1718
|
metadata: {}
|
@@ -1724,7 +1724,7 @@ const dn = async (t, r) => {
|
|
1724
1724
|
url: t.details.fontUrl
|
1725
1725
|
}
|
1726
1726
|
]);
|
1727
|
-
const n = t.id, i = t.details, s = ii(i), c = ri(t.details.text, s), h =
|
1727
|
+
const n = t.id, i = t.details, s = ii(i), c = ri(t.details.text, s), h = cr(r, {
|
1728
1728
|
width: s.width,
|
1729
1729
|
height: c
|
1730
1730
|
});
|
@@ -1732,7 +1732,7 @@ const dn = async (t, r) => {
|
|
1732
1732
|
id: n,
|
1733
1733
|
name: "text",
|
1734
1734
|
type: "text",
|
1735
|
-
display:
|
1735
|
+
display: Te(t.display),
|
1736
1736
|
details: {
|
1737
1737
|
...s,
|
1738
1738
|
text: i.text || "",
|
@@ -1744,7 +1744,7 @@ const dn = async (t, r) => {
|
|
1744
1744
|
left: s.left || h.left,
|
1745
1745
|
borderWidth: i.borderWidth || 0,
|
1746
1746
|
borderColor: i.borderColor || "#000000",
|
1747
|
-
boxShadow: i.boxShadow ||
|
1747
|
+
boxShadow: i.boxShadow || or
|
1748
1748
|
},
|
1749
1749
|
metadata: {}
|
1750
1750
|
};
|
@@ -1791,7 +1791,7 @@ const dn = async (t, r) => {
|
|
1791
1791
|
textTransform: t.textTransform || "none",
|
1792
1792
|
transform: t.transform || "none"
|
1793
1793
|
}), ea = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
1794
|
-
let
|
1794
|
+
let er = (t = 21) => {
|
1795
1795
|
let r = "", n = crypto.getRandomValues(new Uint8Array(t));
|
1796
1796
|
for (; t--; )
|
1797
1797
|
r += ea[n[t] & 63];
|
@@ -1807,100 +1807,105 @@ function ra(t, r) {
|
|
1807
1807
|
}
|
1808
1808
|
function en(t = 16) {
|
1809
1809
|
const r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n = r.charAt(Math.floor(Math.random() * r.length));
|
1810
|
-
let i =
|
1810
|
+
let i = er(t - 1);
|
1811
1811
|
return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
|
1812
1812
|
}
|
1813
|
-
const
|
1813
|
+
const Zt = (t) => Object.keys(t).reduce((r, n) => {
|
1814
1814
|
const { display: i, playbackRate: s } = t[n];
|
1815
1815
|
return Math.max(r, i.to / (s || 1));
|
1816
1816
|
}, 0), na = (t, r, n, i, s) => {
|
1817
1817
|
let c = !1;
|
1818
1818
|
return t.forEach((h) => {
|
1819
|
-
const m = n[h],
|
1820
|
-
(i !== void 0 || s !== void 0)
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1819
|
+
const m = n[h], x = m.display.from, F = m.display.to;
|
1820
|
+
if (i !== void 0 || s !== void 0) {
|
1821
|
+
const T = r.find((b, d) => {
|
1822
|
+
if (i !== void 0 && b.id === i) return b;
|
1823
|
+
if (s !== void 0 && d === s) return b;
|
1824
|
+
});
|
1825
|
+
if (!T)
|
1826
|
+
return c = !0, !0;
|
1827
|
+
c = T.items.map((b) => n[b]).some((b) => {
|
1828
|
+
const d = b.display.from, l = b.display.to;
|
1829
|
+
return d <= x && l >= F;
|
1830
|
+
});
|
1831
|
+
}
|
1827
1832
|
}), c;
|
1828
1833
|
};
|
1829
1834
|
function ia(t) {
|
1830
|
-
const r =
|
1831
|
-
|
1832
|
-
), n =
|
1833
|
-
|
1834
|
-
), i =
|
1835
|
-
|
1836
|
-
), s =
|
1837
|
-
|
1838
|
-
), c =
|
1839
|
-
|
1840
|
-
), h =
|
1841
|
-
|
1835
|
+
const r = qt.pipe(
|
1836
|
+
Jt(({ key: d }) => d.startsWith(mi))
|
1837
|
+
), n = qt.pipe(
|
1838
|
+
Jt(({ key: d }) => d.startsWith(yi))
|
1839
|
+
), i = qt.pipe(
|
1840
|
+
Jt(({ key: d }) => d.startsWith(bi))
|
1841
|
+
), s = qt.pipe(
|
1842
|
+
Jt(({ key: d }) => d.startsWith(gi))
|
1843
|
+
), c = qt.pipe(
|
1844
|
+
Jt(({ key: d }) => d.startsWith(_i))
|
1845
|
+
), h = qt.pipe(
|
1846
|
+
Jt(({ key: d }) => d.startsWith(Ii))
|
1842
1847
|
), m = r.subscribe(async (d) => {
|
1843
|
-
var
|
1848
|
+
var l, p;
|
1844
1849
|
if (d.key === vi) {
|
1845
|
-
const g = (
|
1850
|
+
const g = (l = d.value) == null ? void 0 : l.payload, v = g.size, _ = g.trackItemIds, y = g.trackItemsMap, f = g.trackItemDetailsMap;
|
1846
1851
|
console.warn("IMPROVE FONTS LOADING");
|
1847
|
-
const
|
1848
|
-
var
|
1852
|
+
const A = _.map(async (I) => {
|
1853
|
+
var D;
|
1849
1854
|
try {
|
1850
|
-
const
|
1851
|
-
if (
|
1852
|
-
const
|
1853
|
-
{ id: I, details:
|
1855
|
+
const S = f[I], O = y[I];
|
1856
|
+
if (S.type === "image") {
|
1857
|
+
const w = await hn(
|
1858
|
+
{ id: I, details: S.details, ...O },
|
1854
1859
|
{
|
1855
|
-
size:
|
1860
|
+
size: v
|
1856
1861
|
}
|
1857
|
-
), { details:
|
1858
|
-
|
1859
|
-
} else if (
|
1860
|
-
const
|
1861
|
-
(
|
1862
|
-
),
|
1863
|
-
{ ...
|
1862
|
+
), { details: M, ...j } = w;
|
1863
|
+
f[I] = { type: "image", details: M }, y[I] = j;
|
1864
|
+
} else if (S.type === "video") {
|
1865
|
+
const w = K(
|
1866
|
+
(D = d.value) == null ? void 0 : D.payload.trackItemsMap[I]
|
1867
|
+
), M = await dn(
|
1868
|
+
{ ...S, ...w, ...O },
|
1864
1869
|
{
|
1865
|
-
size:
|
1870
|
+
size: v
|
1866
1871
|
}
|
1867
|
-
), { details:
|
1868
|
-
|
1869
|
-
} else if (
|
1870
|
-
const
|
1872
|
+
), { details: j, ...R } = M;
|
1873
|
+
f[I] = { type: "video", details: j }, y[I] = R;
|
1874
|
+
} else if (S.type === "audio") {
|
1875
|
+
const w = await pn({
|
1871
1876
|
id: I,
|
1872
|
-
details:
|
1873
|
-
...
|
1874
|
-
}), { details:
|
1875
|
-
|
1876
|
-
} else if (
|
1877
|
-
const
|
1878
|
-
{ id: I, details:
|
1877
|
+
details: S.details,
|
1878
|
+
...O
|
1879
|
+
}), { details: M, ...j } = w;
|
1880
|
+
f[I] = { type: "audio", details: M }, y[I] = j;
|
1881
|
+
} else if (S.type === "caption") {
|
1882
|
+
const w = await mn(
|
1883
|
+
{ id: I, details: S.details, ...O },
|
1879
1884
|
{
|
1880
|
-
size:
|
1885
|
+
size: v
|
1881
1886
|
}
|
1882
|
-
), { details:
|
1883
|
-
|
1884
|
-
} else if (
|
1885
|
-
const
|
1886
|
-
{ id: I, details:
|
1887
|
+
), { details: M, ...j } = w;
|
1888
|
+
f[I] = { type: "caption", details: M }, y[I] = j;
|
1889
|
+
} else if (S.type === "text") {
|
1890
|
+
const w = await yn(
|
1891
|
+
{ id: I, details: S.details, ...O },
|
1887
1892
|
{
|
1888
|
-
size:
|
1893
|
+
size: v
|
1889
1894
|
}
|
1890
|
-
), { details:
|
1891
|
-
|
1895
|
+
), { details: M, ...j } = w;
|
1896
|
+
f[I] = { type: "text", details: M }, y[I] = j;
|
1892
1897
|
}
|
1893
1898
|
return !0;
|
1894
1899
|
} catch {
|
1895
1900
|
return !1;
|
1896
1901
|
}
|
1897
1902
|
});
|
1898
|
-
await Promise.all(
|
1899
|
-
const
|
1903
|
+
await Promise.all(A);
|
1904
|
+
const E = Zt(y);
|
1900
1905
|
t.updateState({
|
1901
1906
|
...g,
|
1902
1907
|
trackItemsMap: y,
|
1903
|
-
duration:
|
1908
|
+
duration: E
|
1904
1909
|
});
|
1905
1910
|
}
|
1906
1911
|
if (d.key === Si) {
|
@@ -1909,75 +1914,75 @@ function ia(t) {
|
|
1909
1914
|
size: g
|
1910
1915
|
});
|
1911
1916
|
}
|
1912
|
-
}),
|
1917
|
+
}), x = s.subscribe((d) => {
|
1913
1918
|
if (d.key === wi) return t.undo();
|
1914
1919
|
if (d.key === ki) return t.redo();
|
1915
1920
|
}), F = i.subscribe((d) => {
|
1916
|
-
var g,
|
1917
|
-
const
|
1918
|
-
if ((g = d.value) != null && g.payload.trackItemIds && (
|
1919
|
-
const
|
1920
|
-
(
|
1921
|
-
),
|
1922
|
-
Object.entries(
|
1923
|
-
([
|
1921
|
+
var g, v, _, y;
|
1922
|
+
const l = [], p = [];
|
1923
|
+
if ((g = d.value) != null && g.payload.trackItemIds && (l.push((v = d.value) == null ? void 0 : v.payload.trackItemIds), t.updateState({ activeIds: l })), d.key === Ti) {
|
1924
|
+
const f = (_ = d.value) == null ? void 0 : _.payload.trackItemIds, A = K(t.getState()), E = f && f.length ? f : A.activeIds, I = A.trackItemIds, D = A.trackItemDetailsMap, S = I.filter(
|
1925
|
+
(R) => !E.includes(R)
|
1926
|
+
), O = Object.fromEntries(
|
1927
|
+
Object.entries(D).filter(
|
1928
|
+
([R]) => !E.includes(R)
|
1924
1929
|
)
|
1925
|
-
),
|
1926
|
-
|
1927
|
-
|
1928
|
-
),
|
1929
|
-
Object.entries(
|
1930
|
-
([
|
1930
|
+
), w = ra(
|
1931
|
+
A.tracks,
|
1932
|
+
E
|
1933
|
+
), M = Object.fromEntries(
|
1934
|
+
Object.entries(A.trackItemsMap).filter(
|
1935
|
+
([R]) => !E.includes(R)
|
1931
1936
|
)
|
1932
|
-
),
|
1937
|
+
), j = Zt(M);
|
1933
1938
|
t.updateState(
|
1934
1939
|
{
|
1935
|
-
trackItemIds:
|
1936
|
-
trackItemDetailsMap:
|
1940
|
+
trackItemIds: S,
|
1941
|
+
trackItemDetailsMap: O,
|
1937
1942
|
activeIds: [],
|
1938
|
-
trackItemsMap:
|
1939
|
-
tracks:
|
1940
|
-
duration:
|
1943
|
+
trackItemsMap: M,
|
1944
|
+
tracks: w,
|
1945
|
+
duration: j
|
1941
1946
|
},
|
1942
1947
|
{ updateHistory: !0, kind: "remove" }
|
1943
1948
|
);
|
1944
1949
|
}
|
1945
1950
|
if (d.key === Ei) {
|
1946
|
-
const
|
1947
|
-
if (
|
1948
|
-
|
1949
|
-
const
|
1950
|
-
p.push(
|
1951
|
-
...
|
1952
|
-
[
|
1953
|
-
},
|
1954
|
-
...
|
1955
|
-
[
|
1956
|
-
...
|
1951
|
+
const f = K(t.getState()), A = ((y = d.value) == null ? void 0 : y.payload.trackItemIds) || f.activeIds;
|
1952
|
+
if (A.length === 0) return;
|
1953
|
+
A.forEach((I) => {
|
1954
|
+
const D = f.trackItemsMap[I], S = f.trackItemDetailsMap[I], O = en();
|
1955
|
+
p.push(O), f.trackItemsMap = {
|
1956
|
+
...f.trackItemsMap,
|
1957
|
+
[O]: { ...K(D), id: O }
|
1958
|
+
}, f.trackItemDetailsMap = {
|
1959
|
+
...f.trackItemDetailsMap,
|
1960
|
+
[O]: {
|
1961
|
+
...K(S)
|
1957
1962
|
}
|
1958
|
-
},
|
1963
|
+
}, f.trackItemIds.push(O);
|
1959
1964
|
});
|
1960
|
-
const
|
1961
|
-
|
1962
|
-
const
|
1965
|
+
const E = [];
|
1966
|
+
f.tracks.forEach((I) => {
|
1967
|
+
const D = {
|
1963
1968
|
...I,
|
1964
1969
|
items: [],
|
1965
|
-
id:
|
1970
|
+
id: er()
|
1966
1971
|
};
|
1967
|
-
I.items.forEach((
|
1968
|
-
if (
|
1969
|
-
const
|
1970
|
-
|
1972
|
+
I.items.forEach((S) => {
|
1973
|
+
if (A.includes(S)) {
|
1974
|
+
const O = A.indexOf(S);
|
1975
|
+
D.items.push(p[O]);
|
1971
1976
|
}
|
1972
|
-
}),
|
1973
|
-
}),
|
1974
|
-
I.items.length !== 0 &&
|
1977
|
+
}), E.push(D);
|
1978
|
+
}), E.forEach((I) => {
|
1979
|
+
I.items.length !== 0 && f.tracks.unshift(I);
|
1975
1980
|
}), t.updateState(
|
1976
1981
|
{
|
1977
|
-
trackItemDetailsMap:
|
1978
|
-
tracks:
|
1979
|
-
trackItemIds:
|
1980
|
-
trackItemsMap:
|
1982
|
+
trackItemDetailsMap: f.trackItemDetailsMap,
|
1983
|
+
tracks: f.tracks,
|
1984
|
+
trackItemIds: f.trackItemIds,
|
1985
|
+
trackItemsMap: f.trackItemsMap
|
1981
1986
|
},
|
1982
1987
|
{
|
1983
1988
|
updateHistory: !0,
|
@@ -1985,121 +1990,131 @@ function ia(t) {
|
|
1985
1990
|
}
|
1986
1991
|
);
|
1987
1992
|
}
|
1988
|
-
}),
|
1989
|
-
var
|
1990
|
-
const
|
1993
|
+
}), T = n.subscribe(async (d) => {
|
1994
|
+
var f, A, E, I, D, S, O, w, M, j;
|
1995
|
+
const l = K(t.getState());
|
1991
1996
|
let p = [], g = "text";
|
1992
|
-
const
|
1997
|
+
const v = (A = (f = d.value) == null ? void 0 : f.options) == null ? void 0 : A.trackId;
|
1998
|
+
let _ = (I = (E = d.value) == null ? void 0 : E.options) == null ? void 0 : I.trackIndex;
|
1993
1999
|
if (d.key === Mi) {
|
1994
2000
|
g = "caption";
|
1995
|
-
const
|
1996
|
-
for (const
|
1997
|
-
const ft = mn(
|
1998
|
-
size:
|
2001
|
+
const R = (D = d.value) == null ? void 0 : D.payload, z = [];
|
2002
|
+
for (const vt of R) {
|
2003
|
+
const ft = mn(vt, {
|
2004
|
+
size: l.size
|
1999
2005
|
});
|
2000
|
-
|
2006
|
+
z.push(ft);
|
2001
2007
|
}
|
2002
|
-
const
|
2003
|
-
for (const
|
2004
|
-
const ft =
|
2005
|
-
|
2006
|
-
const { details:
|
2007
|
-
|
2008
|
+
const C = await Promise.all(z), Ht = [];
|
2009
|
+
for (const vt of C) {
|
2010
|
+
const ft = vt.id;
|
2011
|
+
Ht.push(ft);
|
2012
|
+
const { details: L, ...Qt } = vt;
|
2013
|
+
l.trackItemDetailsMap[ft] = {
|
2008
2014
|
type: g,
|
2009
|
-
details:
|
2010
|
-
},
|
2015
|
+
details: L
|
2016
|
+
}, l.trackItemsMap[ft] = Qt, l.trackItemIds.push(ft);
|
2011
2017
|
}
|
2012
|
-
p =
|
2018
|
+
p = Ht;
|
2013
2019
|
}
|
2014
2020
|
if (d.key === Ai) {
|
2015
2021
|
g = "text";
|
2016
|
-
const
|
2017
|
-
size:
|
2018
|
-
}), { details:
|
2019
|
-
|
2022
|
+
const R = await yn((S = d.value) == null ? void 0 : S.payload, {
|
2023
|
+
size: l.size
|
2024
|
+
}), { details: z, ...C } = R;
|
2025
|
+
l.trackItemDetailsMap[C.id] = {
|
2020
2026
|
type: g,
|
2021
|
-
details:
|
2022
|
-
},
|
2027
|
+
details: z
|
2028
|
+
}, l.trackItemsMap[C.id] = C, l.trackItemIds.push(C.id), p = [C.id];
|
2023
2029
|
}
|
2024
2030
|
if (d.key === Oi) {
|
2025
2031
|
g = "template";
|
2026
|
-
const
|
2027
|
-
size:
|
2028
|
-
}), { details:
|
2029
|
-
|
2030
|
-
...
|
2032
|
+
const R = await ta((O = d.value) == null ? void 0 : O.payload, {
|
2033
|
+
size: l.size
|
2034
|
+
}), { details: z, ...C } = R;
|
2035
|
+
l.trackItemsMap[R.id] = {
|
2036
|
+
...C,
|
2031
2037
|
type: "template"
|
2032
|
-
},
|
2038
|
+
}, l.trackItemIds.push(C.id), l.trackItemDetailsMap[C.id] = {
|
2033
2039
|
type: "template",
|
2034
|
-
details:
|
2035
|
-
}, p = [
|
2040
|
+
details: z
|
2041
|
+
}, p = [C.id];
|
2036
2042
|
}
|
2037
2043
|
if (d.key === xi) {
|
2038
2044
|
g = "image";
|
2039
|
-
const
|
2040
|
-
size:
|
2041
|
-
}), { details:
|
2042
|
-
|
2045
|
+
const R = await hn((w = d.value) == null ? void 0 : w.payload, {
|
2046
|
+
size: l.size
|
2047
|
+
}), { details: z, ...C } = R;
|
2048
|
+
l.trackItemDetailsMap[C.id] = {
|
2043
2049
|
type: g,
|
2044
|
-
details:
|
2045
|
-
},
|
2050
|
+
details: z
|
2051
|
+
}, l.trackItemsMap[C.id] = C, l.trackItemIds.push(C.id), p = [C.id];
|
2046
2052
|
}
|
2047
2053
|
if (d.key === Di) {
|
2048
2054
|
g = "audio";
|
2049
|
-
const
|
2050
|
-
|
2055
|
+
const R = await pn((M = d.value) == null ? void 0 : M.payload), { details: z, ...C } = R;
|
2056
|
+
l.trackItemDetailsMap[C.id] = {
|
2051
2057
|
type: g,
|
2052
|
-
details:
|
2053
|
-
},
|
2058
|
+
details: z
|
2059
|
+
}, l.trackItemsMap[C.id] = C, l.trackItemIds.push(C.id), p = [C.id];
|
2054
2060
|
}
|
2055
2061
|
if (d.key === Pi) {
|
2056
2062
|
g = "video";
|
2057
|
-
const
|
2058
|
-
size:
|
2059
|
-
}), { details:
|
2060
|
-
|
2063
|
+
const R = await dn((j = d.value) == null ? void 0 : j.payload, {
|
2064
|
+
size: l.size
|
2065
|
+
}), { details: z, ...C } = R;
|
2066
|
+
l.trackItemDetailsMap[C.id] = {
|
2061
2067
|
type: g,
|
2062
|
-
details:
|
2063
|
-
},
|
2068
|
+
details: z
|
2069
|
+
}, l.trackItemsMap[C.id] = C, l.trackItemIds.push(C.id), p = [C.id];
|
2064
2070
|
}
|
2071
|
+
_ < 0 ? _ = 0 : _ > l.tracks.length && (_ = l.tracks.length);
|
2065
2072
|
const y = na(
|
2066
2073
|
p,
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2074
|
+
l.tracks,
|
2075
|
+
l.trackItemsMap,
|
2076
|
+
v,
|
2070
2077
|
_
|
2071
2078
|
);
|
2072
|
-
|
2073
|
-
id
|
2074
|
-
|
2075
|
-
|
2076
|
-
|
2077
|
-
|
2078
|
-
|
2079
|
-
|
2079
|
+
if (l.tracks.length > 0 && v !== void 0 && v !== "main" && !y)
|
2080
|
+
l.tracks.map((z) => z.id).includes(v) && (l.tracks = l.tracks.map((z) => (z.id === v && z.items.push(...p), z)));
|
2081
|
+
else if (l.tracks.length > 0 && _ !== void 0 && !y)
|
2082
|
+
l.tracks = l.tracks.map((R, z) => (z === _ && R.items.push(...p), R));
|
2083
|
+
else {
|
2084
|
+
const R = {
|
2085
|
+
id: er(),
|
2086
|
+
accepts: ["text", "audio", "helper", "video", "image", "caption"],
|
2087
|
+
type: g,
|
2088
|
+
items: p,
|
2089
|
+
magnetic: !1,
|
2090
|
+
static: !1
|
2091
|
+
};
|
2092
|
+
_ > 0 ? l.tracks.push(R) : l.tracks.unshift(R);
|
2093
|
+
}
|
2094
|
+
l.duration = Zt(l.trackItemsMap), t.updateState(
|
2080
2095
|
{
|
2081
|
-
trackItemIds:
|
2082
|
-
trackItemDetailsMap:
|
2083
|
-
trackItemsMap:
|
2084
|
-
tracks:
|
2085
|
-
duration:
|
2096
|
+
trackItemIds: l.trackItemIds,
|
2097
|
+
trackItemDetailsMap: l.trackItemDetailsMap,
|
2098
|
+
trackItemsMap: l.trackItemsMap,
|
2099
|
+
tracks: l.tracks,
|
2100
|
+
duration: l.duration
|
2086
2101
|
},
|
2087
2102
|
{
|
2088
2103
|
updateHistory: !0,
|
2089
2104
|
kind: "add"
|
2090
2105
|
}
|
2091
2106
|
);
|
2092
|
-
}),
|
2093
|
-
var
|
2107
|
+
}), W = c.subscribe(async (d) => {
|
2108
|
+
var l;
|
2094
2109
|
if (d.key === Ci) {
|
2095
|
-
const p =
|
2110
|
+
const p = K(t.getState()), g = (l = d.value) == null ? void 0 : l.options.time;
|
2096
2111
|
if (p.activeIds.length === 1) {
|
2097
|
-
const
|
2112
|
+
const v = p.activeIds[0], _ = p.trackItemsMap[v];
|
2098
2113
|
if (g >= _.display.to || g <= _.display.from)
|
2099
2114
|
return;
|
2100
|
-
const y = p.trackItemDetailsMap[
|
2115
|
+
const y = p.trackItemDetailsMap[v], f = en(), A = {
|
2101
2116
|
..._,
|
2102
|
-
id:
|
2117
|
+
id: f,
|
2103
2118
|
display: {
|
2104
2119
|
from: g,
|
2105
2120
|
to: _.display.to
|
@@ -2109,8 +2124,8 @@ function ia(t) {
|
|
2109
2124
|
to: _.display.to
|
2110
2125
|
}
|
2111
2126
|
};
|
2112
|
-
p.trackItemsMap[
|
2113
|
-
|
2127
|
+
p.trackItemsMap[v].display.to = g, p.trackItemsMap[f] = A, p.trackItemIds.push(f), p.trackItemDetailsMap[f] = y, p.tracks.forEach((E) => {
|
2128
|
+
E.items.includes(v) && E.items.push(f);
|
2114
2129
|
}), t.updateState(
|
2115
2130
|
{
|
2116
2131
|
trackItemDetailsMap: p.trackItemDetailsMap,
|
@@ -2127,48 +2142,48 @@ function ia(t) {
|
|
2127
2142
|
return;
|
2128
2143
|
}
|
2129
2144
|
if (d.key === Ri) {
|
2130
|
-
const p =
|
2145
|
+
const p = K(t.getState());
|
2131
2146
|
if (p.activeIds.length) {
|
2132
|
-
const g = p.activeIds,
|
2147
|
+
const g = p.activeIds, v = [], _ = {
|
2133
2148
|
activeIds: g,
|
2134
2149
|
trackItemDetailsMap: {},
|
2135
2150
|
trackItemsMap: {},
|
2136
2151
|
tracks: []
|
2137
2152
|
};
|
2138
|
-
g.forEach((
|
2139
|
-
_.trackItemDetailsMap[
|
2140
|
-
p.tracks.find((
|
2153
|
+
g.forEach((f) => {
|
2154
|
+
_.trackItemDetailsMap[f] = p.trackItemDetailsMap[f], _.trackItemsMap[f] = p.trackItemsMap[f], v.push(
|
2155
|
+
p.tracks.find((A) => A.items.includes(f))
|
2141
2156
|
);
|
2142
2157
|
});
|
2143
2158
|
const y = /* @__PURE__ */ new Set();
|
2144
|
-
|
2159
|
+
v.filter((f) => y.has(f.id) ? !1 : (y.add(f), !0)), _.tracks = Array.from(y.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
|
2145
2160
|
}
|
2146
2161
|
}
|
2147
2162
|
if (d.key === Fi) {
|
2148
2163
|
const p = localStorage.getItem("DesignComboTemp");
|
2149
2164
|
if (!p) return;
|
2150
|
-
const g =
|
2151
|
-
const
|
2152
|
-
(
|
2165
|
+
const g = K(t.getState()), v = JSON.parse(p), _ = {}, y = v.trackItemsMap, f = v.trackItemDetailsMap, A = v.tracks, E = [], I = v.activeIds.map(async (D) => {
|
2166
|
+
const S = f[D];
|
2167
|
+
(S.type === "caption" || S.type === "text") && S.details.fontUrl && await kn([
|
2153
2168
|
{
|
2154
|
-
fontFamily:
|
2155
|
-
url:
|
2169
|
+
fontFamily: S.details.fontFamily,
|
2170
|
+
url: S.details.fontUrl
|
2156
2171
|
}
|
2157
2172
|
]);
|
2158
|
-
const
|
2159
|
-
return _[
|
2160
|
-
...y[
|
2161
|
-
id:
|
2162
|
-
}, g.trackItemDetailsMap[
|
2173
|
+
const O = en();
|
2174
|
+
return _[D] = O, g.trackItemsMap[O] = {
|
2175
|
+
...y[D],
|
2176
|
+
id: O
|
2177
|
+
}, g.trackItemDetailsMap[O] = S, g.trackItemIds.push(O), !0;
|
2163
2178
|
});
|
2164
|
-
await Promise.all(I),
|
2165
|
-
const
|
2166
|
-
...
|
2167
|
-
items:
|
2168
|
-
id:
|
2179
|
+
await Promise.all(I), A.forEach((D) => {
|
2180
|
+
const S = D.items.map((w) => _[w]), O = {
|
2181
|
+
...D,
|
2182
|
+
items: S,
|
2183
|
+
id: er()
|
2169
2184
|
};
|
2170
|
-
|
2171
|
-
}), g.tracks = [...g.tracks, ...
|
2185
|
+
E.push(O);
|
2186
|
+
}), g.tracks = [...g.tracks, ...E], t.updateState(
|
2172
2187
|
{
|
2173
2188
|
trackItemDetailsMap: g.trackItemDetailsMap,
|
2174
2189
|
tracks: g.tracks,
|
@@ -2182,20 +2197,20 @@ function ia(t) {
|
|
2182
2197
|
);
|
2183
2198
|
}
|
2184
2199
|
}), b = h.subscribe(async (d) => {
|
2185
|
-
var
|
2200
|
+
var l, p, g, v;
|
2186
2201
|
if (d.key === ji) {
|
2187
|
-
const _ =
|
2188
|
-
_.trackItemIds.forEach((
|
2189
|
-
const I =
|
2190
|
-
if (I.type === "template" && I.details.map((
|
2191
|
-
const
|
2192
|
-
(
|
2202
|
+
const _ = K(t.getState()), [y] = (l = d.value) == null ? void 0 : l.payload.trackItemIds, f = _.trackItemDetailsMap;
|
2203
|
+
_.trackItemIds.forEach((E) => {
|
2204
|
+
const I = f[E];
|
2205
|
+
if (I.type === "template" && I.details.map((S) => S.id).includes(y)) {
|
2206
|
+
const S = I.details.filter(
|
2207
|
+
(O) => O.id !== y
|
2193
2208
|
);
|
2194
|
-
I.details =
|
2209
|
+
I.details = S;
|
2195
2210
|
}
|
2196
2211
|
}), t.updateState(
|
2197
2212
|
{
|
2198
|
-
trackItemDetailsMap: { ...
|
2213
|
+
trackItemDetailsMap: { ...f }
|
2199
2214
|
},
|
2200
2215
|
{
|
2201
2216
|
updateHistory: !0,
|
@@ -2204,24 +2219,24 @@ function ia(t) {
|
|
2204
2219
|
);
|
2205
2220
|
}
|
2206
2221
|
if (d.key === zi) {
|
2207
|
-
const _ =
|
2208
|
-
if (!
|
2209
|
-
const
|
2210
|
-
|
2211
|
-
const
|
2212
|
-
|
2213
|
-
...y[
|
2214
|
-
...
|
2215
|
-
} :
|
2216
|
-
...
|
2217
|
-
...
|
2222
|
+
const _ = K(t.getState()), y = _.trackItemDetailsMap, f = _.trackItemsMap, A = Object.keys((p = d.value) == null ? void 0 : p.payload);
|
2223
|
+
if (!A.length) return;
|
2224
|
+
const E = (g = d.value) == null ? void 0 : g.payload;
|
2225
|
+
A.forEach((D) => {
|
2226
|
+
const S = E[D];
|
2227
|
+
S.details ? y[D].details = {
|
2228
|
+
...y[D].details,
|
2229
|
+
...S.details
|
2230
|
+
} : E[D].playbackRate ? f[D].playbackRate = E[D].playbackRate : y[D].type === "template" && (f[D] = {
|
2231
|
+
...f[D],
|
2232
|
+
...E[D]
|
2218
2233
|
});
|
2219
2234
|
});
|
2220
|
-
const I =
|
2235
|
+
const I = Zt(f);
|
2221
2236
|
t.updateState(
|
2222
2237
|
{
|
2223
2238
|
trackItemDetailsMap: { ...y },
|
2224
|
-
trackItemsMap: { ...
|
2239
|
+
trackItemsMap: { ...f },
|
2225
2240
|
duration: I
|
2226
2241
|
},
|
2227
2242
|
{
|
@@ -2231,37 +2246,37 @@ function ia(t) {
|
|
2231
2246
|
);
|
2232
2247
|
}
|
2233
2248
|
if (d.key === Hi) {
|
2234
|
-
const _ = (
|
2235
|
-
for (const
|
2236
|
-
if (
|
2237
|
-
const I =
|
2238
|
-
if (I.details.map((
|
2239
|
-
for (let
|
2240
|
-
if (
|
2241
|
-
if (
|
2242
|
-
if (
|
2243
|
-
const
|
2244
|
-
let
|
2245
|
-
const
|
2246
|
-
|
2249
|
+
const _ = (v = d.value) == null ? void 0 : v.payload, y = Object.keys(_)[0], f = Object.values(_)[0], A = K(t.getState());
|
2250
|
+
for (const E of A.trackItemIds)
|
2251
|
+
if (A.trackItemsMap[E].type === "template") {
|
2252
|
+
const I = A.trackItemDetailsMap[E];
|
2253
|
+
if (I.details.map((S) => S.id).includes(y)) {
|
2254
|
+
for (let S of I.details)
|
2255
|
+
if (S.id === y) {
|
2256
|
+
if (f.details) {
|
2257
|
+
if (f.type === "image" && f.details.src) {
|
2258
|
+
const w = await ti(f.details.src), M = S.details.width, j = S.details.height;
|
2259
|
+
let R = w.width, z = w.height;
|
2260
|
+
const C = w.width / w.height;
|
2261
|
+
M / j > C ? (R = M, z = M / C) : (z = j, R = j * C), f.details.mediaWidth = R, f.details.mediaHeight = z;
|
2247
2262
|
}
|
2248
|
-
if (
|
2249
|
-
const
|
2250
|
-
let
|
2251
|
-
const
|
2252
|
-
|
2263
|
+
if (f.type === "video" && f.details.src) {
|
2264
|
+
const w = await ei(f.details.src), M = S.details.width, j = S.details.height;
|
2265
|
+
let R = w.width, z = w.height;
|
2266
|
+
const C = w.width / w.height;
|
2267
|
+
M / j > C ? (R = M, z = M / C) : (z = j, R = j * C), f.details.mediaWidth = R, f.details.mediaHeight = z;
|
2253
2268
|
}
|
2254
|
-
const
|
2255
|
-
|
2269
|
+
const O = S.details;
|
2270
|
+
S.details = { ...O, ...f.details }, f.details = S.details;
|
2256
2271
|
}
|
2257
|
-
|
2272
|
+
S = { ...S, ...f }, A.trackItemDetailsMap[E].details = I.details.map((O) => O.id === y ? S : O);
|
2258
2273
|
}
|
2259
2274
|
}
|
2260
2275
|
}
|
2261
2276
|
t.updateState(
|
2262
2277
|
{
|
2263
2278
|
trackItemDetailsMap: {
|
2264
|
-
...
|
2279
|
+
...A.trackItemDetailsMap
|
2265
2280
|
}
|
2266
2281
|
},
|
2267
2282
|
{
|
@@ -2271,13 +2286,13 @@ function ia(t) {
|
|
2271
2286
|
);
|
2272
2287
|
}
|
2273
2288
|
if (d.key === Ni) {
|
2274
|
-
const _ =
|
2289
|
+
const _ = K(t.getState());
|
2275
2290
|
_.trackItemIds.forEach((y) => {
|
2276
|
-
const
|
2277
|
-
|
2291
|
+
const f = _.trackItemsMap[y];
|
2292
|
+
f.type === "template" && (f.activeEdit = !1, t.updateState({
|
2278
2293
|
trackItemsMap: {
|
2279
2294
|
..._.trackItemsMap,
|
2280
|
-
[y]:
|
2295
|
+
[y]: f
|
2281
2296
|
},
|
2282
2297
|
activeIds: []
|
2283
2298
|
}));
|
@@ -2286,35 +2301,35 @@ function ia(t) {
|
|
2286
2301
|
});
|
2287
2302
|
return {
|
2288
2303
|
unsubscribe: () => {
|
2289
|
-
|
2304
|
+
T.unsubscribe(), W.unsubscribe(), b.unsubscribe(), x.unsubscribe(), F.unsubscribe(), m.unsubscribe();
|
2290
2305
|
}
|
2291
2306
|
};
|
2292
2307
|
}
|
2293
2308
|
const aa = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
2294
2309
|
function ai(t, r, n = { cyclesFix: !0 }, i = []) {
|
2295
|
-
var m,
|
2310
|
+
var m, x;
|
2296
2311
|
let s = [];
|
2297
2312
|
const c = Array.isArray(t);
|
2298
2313
|
for (const F in t) {
|
2299
|
-
const
|
2314
|
+
const T = t[F], W = c ? +F : F;
|
2300
2315
|
if (!(F in r)) {
|
2301
2316
|
s.push({
|
2302
2317
|
type: "REMOVE",
|
2303
|
-
path: [
|
2318
|
+
path: [W],
|
2304
2319
|
oldValue: t[F]
|
2305
2320
|
});
|
2306
2321
|
continue;
|
2307
2322
|
}
|
2308
|
-
const b = r[F], d = typeof
|
2309
|
-
if (
|
2310
|
-
const
|
2311
|
-
s.push.apply(s,
|
2312
|
-
} else
|
2313
|
-
!(Number.isNaN(
|
2314
|
-
path: [
|
2323
|
+
const b = r[F], d = typeof T == "object" && typeof b == "object" && Array.isArray(T) === Array.isArray(b);
|
2324
|
+
if (T && b && d && !aa[(x = (m = Object.getPrototypeOf(T)) == null ? void 0 : m.constructor) == null ? void 0 : x.name] && (!n.cyclesFix || !i.includes(T))) {
|
2325
|
+
const l = ai(T, b, n, n.cyclesFix ? i.concat([T]) : []);
|
2326
|
+
s.push.apply(s, l.map((p) => (p.path.unshift(W), p)));
|
2327
|
+
} else T !== b && // treat NaN values as equivalent
|
2328
|
+
!(Number.isNaN(T) && Number.isNaN(b)) && !(d && (isNaN(T) ? T + "" == b + "" : +T == +b)) && s.push({
|
2329
|
+
path: [W],
|
2315
2330
|
type: "CHANGE",
|
2316
2331
|
value: b,
|
2317
|
-
oldValue:
|
2332
|
+
oldValue: T
|
2318
2333
|
});
|
2319
2334
|
}
|
2320
2335
|
const h = Array.isArray(r);
|
@@ -2326,7 +2341,7 @@ function ai(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2326
2341
|
});
|
2327
2342
|
return s;
|
2328
2343
|
}
|
2329
|
-
var Tn = Symbol.for("immer-nothing"),
|
2344
|
+
var Tn = Symbol.for("immer-nothing"), _e = Symbol.for("immer-draftable"), nt = Symbol.for("immer-state"), si = process.env.NODE_ENV !== "production" ? [
|
2330
2345
|
// All error codes, starting by 0:
|
2331
2346
|
function(t) {
|
2332
2347
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
@@ -2357,7 +2372,7 @@ var Tn = Symbol.for("immer-nothing"), ge = Symbol.for("immer-draftable"), nt = S
|
|
2357
2372
|
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
|
2358
2373
|
// See Patches.ts for additional errors
|
2359
2374
|
] : [];
|
2360
|
-
function
|
2375
|
+
function Y(t, ...r) {
|
2361
2376
|
if (process.env.NODE_ENV !== "production") {
|
2362
2377
|
const n = si[t], i = typeof n == "function" ? n.apply(null, r) : n;
|
2363
2378
|
throw new Error(`[Immer] ${i}`);
|
@@ -2366,59 +2381,59 @@ function $(t, ...r) {
|
|
2366
2381
|
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
2367
2382
|
);
|
2368
2383
|
}
|
2369
|
-
var
|
2370
|
-
function
|
2384
|
+
var Rt = Object.getPrototypeOf;
|
2385
|
+
function Ft(t) {
|
2371
2386
|
return !!t && !!t[nt];
|
2372
2387
|
}
|
2373
|
-
function
|
2388
|
+
function kt(t) {
|
2374
2389
|
var r;
|
2375
|
-
return t ? oi(t) || Array.isArray(t) || !!t[
|
2390
|
+
return t ? oi(t) || Array.isArray(t) || !!t[_e] || !!((r = t.constructor) != null && r[_e]) || Ee(t) || Me(t) : !1;
|
2376
2391
|
}
|
2377
2392
|
var sa = Object.prototype.constructor.toString();
|
2378
2393
|
function oi(t) {
|
2379
2394
|
if (!t || typeof t != "object")
|
2380
2395
|
return !1;
|
2381
|
-
const r =
|
2396
|
+
const r = Rt(t);
|
2382
2397
|
if (r === null)
|
2383
2398
|
return !0;
|
2384
2399
|
const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
2385
2400
|
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === sa;
|
2386
2401
|
}
|
2387
|
-
function
|
2388
|
-
|
2402
|
+
function Ie(t, r) {
|
2403
|
+
jt(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
2389
2404
|
r(n, t[n], t);
|
2390
2405
|
}) : t.forEach((n, i) => r(i, n, t));
|
2391
2406
|
}
|
2392
|
-
function
|
2407
|
+
function jt(t) {
|
2393
2408
|
const r = t[nt];
|
2394
|
-
return r ? r.type_ : Array.isArray(t) ? 1 :
|
2409
|
+
return r ? r.type_ : Array.isArray(t) ? 1 : Ee(t) ? 2 : Me(t) ? 3 : 0;
|
2395
2410
|
}
|
2396
|
-
function
|
2397
|
-
return
|
2411
|
+
function ve(t, r) {
|
2412
|
+
return jt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
2398
2413
|
}
|
2399
2414
|
function rn(t, r) {
|
2400
|
-
return
|
2415
|
+
return jt(t) === 2 ? t.get(r) : t[r];
|
2401
2416
|
}
|
2402
2417
|
function ci(t, r, n) {
|
2403
|
-
const i =
|
2418
|
+
const i = jt(t);
|
2404
2419
|
i === 2 ? t.set(r, n) : i === 3 ? t.add(n) : t[r] = n;
|
2405
2420
|
}
|
2406
2421
|
function oa(t, r) {
|
2407
2422
|
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
2408
2423
|
}
|
2409
|
-
function
|
2424
|
+
function Ee(t) {
|
2410
2425
|
return t instanceof Map;
|
2411
2426
|
}
|
2412
|
-
function
|
2427
|
+
function Me(t) {
|
2413
2428
|
return t instanceof Set;
|
2414
2429
|
}
|
2415
|
-
function
|
2430
|
+
function Ct(t) {
|
2416
2431
|
return t.copy_ || t.base_;
|
2417
2432
|
}
|
2418
2433
|
function bn(t, r) {
|
2419
|
-
if (Te(t))
|
2420
|
-
return new Map(t);
|
2421
2434
|
if (Ee(t))
|
2435
|
+
return new Map(t);
|
2436
|
+
if (Me(t))
|
2422
2437
|
return new Set(t);
|
2423
2438
|
if (Array.isArray(t))
|
2424
2439
|
return Array.prototype.slice.call(t);
|
@@ -2437,9 +2452,9 @@ function bn(t, r) {
|
|
2437
2452
|
value: t[h]
|
2438
2453
|
});
|
2439
2454
|
}
|
2440
|
-
return Object.create(
|
2455
|
+
return Object.create(Rt(t), i);
|
2441
2456
|
} else {
|
2442
|
-
const i =
|
2457
|
+
const i = Rt(t);
|
2443
2458
|
if (i !== null && n)
|
2444
2459
|
return { ...t };
|
2445
2460
|
const s = Object.create(i);
|
@@ -2447,25 +2462,25 @@ function bn(t, r) {
|
|
2447
2462
|
}
|
2448
2463
|
}
|
2449
2464
|
function En(t, r = !1) {
|
2450
|
-
return
|
2465
|
+
return ur(t) || Ft(t) || !kt(t) || (jt(t) > 1 && (t.set = t.add = t.clear = t.delete = ca), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => En(i, !0))), t;
|
2451
2466
|
}
|
2452
2467
|
function ca() {
|
2453
|
-
|
2468
|
+
Y(2);
|
2454
2469
|
}
|
2455
|
-
function
|
2470
|
+
function ur(t) {
|
2456
2471
|
return Object.isFrozen(t);
|
2457
2472
|
}
|
2458
2473
|
var gn = {};
|
2459
|
-
function
|
2474
|
+
function zt(t) {
|
2460
2475
|
const r = gn[t];
|
2461
|
-
return r ||
|
2476
|
+
return r || Y(0, t), r;
|
2462
2477
|
}
|
2463
2478
|
function ua(t, r) {
|
2464
2479
|
gn[t] || (gn[t] = r);
|
2465
2480
|
}
|
2466
|
-
var
|
2481
|
+
var Se;
|
2467
2482
|
function ui() {
|
2468
|
-
return
|
2483
|
+
return Se;
|
2469
2484
|
}
|
2470
2485
|
function la(t, r) {
|
2471
2486
|
return {
|
@@ -2479,16 +2494,16 @@ function la(t, r) {
|
|
2479
2494
|
};
|
2480
2495
|
}
|
2481
2496
|
function zn(t, r) {
|
2482
|
-
r && (
|
2497
|
+
r && (zt("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
2483
2498
|
}
|
2484
2499
|
function _n(t) {
|
2485
2500
|
In(t), t.drafts_.forEach(fa), t.drafts_ = null;
|
2486
2501
|
}
|
2487
2502
|
function In(t) {
|
2488
|
-
t ===
|
2503
|
+
t === Se && (Se = t.parent_);
|
2489
2504
|
}
|
2490
2505
|
function Hn(t) {
|
2491
|
-
return
|
2506
|
+
return Se = la(Se, t);
|
2492
2507
|
}
|
2493
2508
|
function fa(t) {
|
2494
2509
|
const r = t[nt];
|
@@ -2497,34 +2512,34 @@ function fa(t) {
|
|
2497
2512
|
function Nn(t, r) {
|
2498
2513
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
2499
2514
|
const n = r.drafts_[0];
|
2500
|
-
return t !== void 0 && t !== n ? (n[nt].modified_ && (_n(r),
|
2515
|
+
return t !== void 0 && t !== n ? (n[nt].modified_ && (_n(r), Y(4)), kt(t) && (t = ir(r, t), r.parent_ || ar(r, t)), r.patches_ && zt("Patches").generateReplacementPatches_(
|
2501
2516
|
n[nt].base_,
|
2502
2517
|
t,
|
2503
2518
|
r.patches_,
|
2504
2519
|
r.inversePatches_
|
2505
|
-
)) : t =
|
2520
|
+
)) : t = ir(r, n, []), _n(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== Tn ? t : void 0;
|
2506
2521
|
}
|
2507
|
-
function
|
2508
|
-
if (
|
2522
|
+
function ir(t, r, n) {
|
2523
|
+
if (ur(r))
|
2509
2524
|
return r;
|
2510
2525
|
const i = r[nt];
|
2511
2526
|
if (!i)
|
2512
|
-
return
|
2527
|
+
return Ie(
|
2513
2528
|
r,
|
2514
2529
|
(s, c) => Ln(t, i, r, s, c, n)
|
2515
2530
|
), r;
|
2516
2531
|
if (i.scope_ !== t)
|
2517
2532
|
return r;
|
2518
2533
|
if (!i.modified_)
|
2519
|
-
return
|
2534
|
+
return ar(t, i.base_, !0), i.base_;
|
2520
2535
|
if (!i.finalized_) {
|
2521
2536
|
i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
|
2522
2537
|
const s = i.copy_;
|
2523
2538
|
let c = s, h = !1;
|
2524
|
-
i.type_ === 3 && (c = new Set(s), s.clear(), h = !0),
|
2539
|
+
i.type_ === 3 && (c = new Set(s), s.clear(), h = !0), Ie(
|
2525
2540
|
c,
|
2526
|
-
(m,
|
2527
|
-
),
|
2541
|
+
(m, x) => Ln(t, i, s, m, x, n, h)
|
2542
|
+
), ar(t, s, !1), n && t.patches_ && zt("Patches").generatePatches_(
|
2528
2543
|
i,
|
2529
2544
|
n,
|
2530
2545
|
t.patches_,
|
@@ -2534,21 +2549,21 @@ function nr(t, r, n) {
|
|
2534
2549
|
return i.copy_;
|
2535
2550
|
}
|
2536
2551
|
function Ln(t, r, n, i, s, c, h) {
|
2537
|
-
if (process.env.NODE_ENV !== "production" && s === n &&
|
2552
|
+
if (process.env.NODE_ENV !== "production" && s === n && Y(5), Ft(s)) {
|
2538
2553
|
const m = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2539
|
-
!
|
2540
|
-
if (ci(n, i,
|
2554
|
+
!ve(r.assigned_, i) ? c.concat(i) : void 0, x = ir(t, s, m);
|
2555
|
+
if (ci(n, i, x), Ft(x))
|
2541
2556
|
t.canAutoFreeze_ = !1;
|
2542
2557
|
else
|
2543
2558
|
return;
|
2544
2559
|
} else h && n.add(s);
|
2545
|
-
if (
|
2560
|
+
if (kt(s) && !ur(s)) {
|
2546
2561
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
2547
2562
|
return;
|
2548
|
-
|
2563
|
+
ir(t, s), (!r || !r.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(n, i) && ar(t, s);
|
2549
2564
|
}
|
2550
2565
|
}
|
2551
|
-
function
|
2566
|
+
function ar(t, r, n = !1) {
|
2552
2567
|
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && En(r, n);
|
2553
2568
|
}
|
2554
2569
|
function da(t, r) {
|
@@ -2576,7 +2591,7 @@ function da(t, r) {
|
|
2576
2591
|
isManual_: !1
|
2577
2592
|
};
|
2578
2593
|
let s = i, c = Mn;
|
2579
|
-
n && (s = [i], c =
|
2594
|
+
n && (s = [i], c = we);
|
2580
2595
|
const { revoke: h, proxy: m } = Proxy.revocable(s, c);
|
2581
2596
|
return i.draft_ = m, i.revoke_ = h, m;
|
2582
2597
|
}
|
@@ -2584,27 +2599,27 @@ var Mn = {
|
|
2584
2599
|
get(t, r) {
|
2585
2600
|
if (r === nt)
|
2586
2601
|
return t;
|
2587
|
-
const n =
|
2588
|
-
if (!
|
2602
|
+
const n = Ct(t);
|
2603
|
+
if (!ve(n, r))
|
2589
2604
|
return pa(t, n, r);
|
2590
2605
|
const i = n[r];
|
2591
|
-
return t.finalized_ || !
|
2606
|
+
return t.finalized_ || !kt(i) ? i : i === nn(t.base_, r) ? (an(t), t.copy_[r] = Sn(i, t)) : i;
|
2592
2607
|
},
|
2593
2608
|
has(t, r) {
|
2594
|
-
return r in
|
2609
|
+
return r in Ct(t);
|
2595
2610
|
},
|
2596
2611
|
ownKeys(t) {
|
2597
|
-
return Reflect.ownKeys(
|
2612
|
+
return Reflect.ownKeys(Ct(t));
|
2598
2613
|
},
|
2599
2614
|
set(t, r, n) {
|
2600
|
-
const i = li(
|
2615
|
+
const i = li(Ct(t), r);
|
2601
2616
|
if (i != null && i.set)
|
2602
2617
|
return i.set.call(t.draft_, n), !0;
|
2603
2618
|
if (!t.modified_) {
|
2604
|
-
const s = nn(
|
2619
|
+
const s = nn(Ct(t), r), c = s == null ? void 0 : s[nt];
|
2605
2620
|
if (c && c.base_ === n)
|
2606
2621
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2607
|
-
if (oa(n, s) && (n !== void 0 ||
|
2622
|
+
if (oa(n, s) && (n !== void 0 || ve(t.base_, r)))
|
2608
2623
|
return !0;
|
2609
2624
|
an(t), vn(t);
|
2610
2625
|
}
|
@@ -2618,7 +2633,7 @@ var Mn = {
|
|
2618
2633
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
2619
2634
|
// the same guarantee in ES5 mode.
|
2620
2635
|
getOwnPropertyDescriptor(t, r) {
|
2621
|
-
const n =
|
2636
|
+
const n = Ct(t), i = Reflect.getOwnPropertyDescriptor(n, r);
|
2622
2637
|
return i && {
|
2623
2638
|
writable: !0,
|
2624
2639
|
configurable: t.type_ !== 1 || r !== "length",
|
@@ -2627,29 +2642,29 @@ var Mn = {
|
|
2627
2642
|
};
|
2628
2643
|
},
|
2629
2644
|
defineProperty() {
|
2630
|
-
|
2645
|
+
Y(11);
|
2631
2646
|
},
|
2632
2647
|
getPrototypeOf(t) {
|
2633
|
-
return
|
2648
|
+
return Rt(t.base_);
|
2634
2649
|
},
|
2635
2650
|
setPrototypeOf() {
|
2636
|
-
|
2651
|
+
Y(12);
|
2637
2652
|
}
|
2638
|
-
},
|
2639
|
-
|
2640
|
-
|
2653
|
+
}, we = {};
|
2654
|
+
Ie(Mn, (t, r) => {
|
2655
|
+
we[t] = function() {
|
2641
2656
|
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
2642
2657
|
};
|
2643
2658
|
});
|
2644
|
-
|
2645
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) &&
|
2659
|
+
we.deleteProperty = function(t, r) {
|
2660
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && Y(13), we.set.call(this, t, r, void 0);
|
2646
2661
|
};
|
2647
|
-
|
2648
|
-
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) &&
|
2662
|
+
we.set = function(t, r, n) {
|
2663
|
+
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && Y(14), Mn.set.call(this, t[0], r, n, t[0]);
|
2649
2664
|
};
|
2650
2665
|
function nn(t, r) {
|
2651
2666
|
const n = t[nt];
|
2652
|
-
return (n ?
|
2667
|
+
return (n ? Ct(n) : t)[r];
|
2653
2668
|
}
|
2654
2669
|
function pa(t, r, n) {
|
2655
2670
|
var s;
|
@@ -2663,12 +2678,12 @@ function pa(t, r, n) {
|
|
2663
2678
|
function li(t, r) {
|
2664
2679
|
if (!(r in t))
|
2665
2680
|
return;
|
2666
|
-
let n =
|
2681
|
+
let n = Rt(t);
|
2667
2682
|
for (; n; ) {
|
2668
2683
|
const i = Object.getOwnPropertyDescriptor(n, r);
|
2669
2684
|
if (i)
|
2670
2685
|
return i;
|
2671
|
-
n =
|
2686
|
+
n = Rt(n);
|
2672
2687
|
}
|
2673
2688
|
}
|
2674
2689
|
function vn(t) {
|
@@ -2687,13 +2702,13 @@ var ha = class {
|
|
2687
2702
|
const c = n;
|
2688
2703
|
n = r;
|
2689
2704
|
const h = this;
|
2690
|
-
return function(
|
2691
|
-
return h.produce(
|
2705
|
+
return function(x = c, ...F) {
|
2706
|
+
return h.produce(x, (T) => n.call(this, T, ...F));
|
2692
2707
|
};
|
2693
2708
|
}
|
2694
|
-
typeof n != "function" &&
|
2709
|
+
typeof n != "function" && Y(6), i !== void 0 && typeof i != "function" && Y(7);
|
2695
2710
|
let s;
|
2696
|
-
if (
|
2711
|
+
if (kt(r)) {
|
2697
2712
|
const c = Hn(this), h = Sn(r, void 0);
|
2698
2713
|
let m = !0;
|
2699
2714
|
try {
|
@@ -2705,14 +2720,14 @@ var ha = class {
|
|
2705
2720
|
} else if (!r || typeof r != "object") {
|
2706
2721
|
if (s = n(r), s === void 0 && (s = r), s === Tn && (s = void 0), this.autoFreeze_ && En(s, !0), i) {
|
2707
2722
|
const c = [], h = [];
|
2708
|
-
|
2723
|
+
zt("Patches").generateReplacementPatches_(r, s, c, h), i(c, h);
|
2709
2724
|
}
|
2710
2725
|
return s;
|
2711
2726
|
} else
|
2712
|
-
|
2727
|
+
Y(1, r);
|
2713
2728
|
}, this.produceWithPatches = (r, n) => {
|
2714
2729
|
if (typeof r == "function")
|
2715
|
-
return (h, ...m) => this.produceWithPatches(h, (
|
2730
|
+
return (h, ...m) => this.produceWithPatches(h, (x) => r(x, ...m));
|
2716
2731
|
let i, s;
|
2717
2732
|
return [this.produce(r, n, (h, m) => {
|
2718
2733
|
i = h, s = m;
|
@@ -2720,13 +2735,13 @@ var ha = class {
|
|
2720
2735
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
2721
2736
|
}
|
2722
2737
|
createDraft(t) {
|
2723
|
-
|
2738
|
+
kt(t) || Y(8), Ft(t) && (t = ma(t));
|
2724
2739
|
const r = Hn(this), n = Sn(t, void 0);
|
2725
2740
|
return n[nt].isManual_ = !0, In(r), n;
|
2726
2741
|
}
|
2727
2742
|
finishDraft(t, r) {
|
2728
2743
|
const n = t && t[nt];
|
2729
|
-
(!n || !n.isManual_) &&
|
2744
|
+
(!n || !n.isManual_) && Y(9);
|
2730
2745
|
const { scope_: i } = n;
|
2731
2746
|
return zn(i, r), Nn(void 0, i);
|
2732
2747
|
}
|
@@ -2756,22 +2771,22 @@ var ha = class {
|
|
2756
2771
|
}
|
2757
2772
|
}
|
2758
2773
|
n > -1 && (r = r.slice(n + 1));
|
2759
|
-
const i =
|
2760
|
-
return
|
2774
|
+
const i = zt("Patches").applyPatches_;
|
2775
|
+
return Ft(t) ? i(t, r) : this.produce(
|
2761
2776
|
t,
|
2762
2777
|
(s) => i(s, r)
|
2763
2778
|
);
|
2764
2779
|
}
|
2765
2780
|
};
|
2766
2781
|
function Sn(t, r) {
|
2767
|
-
const n =
|
2782
|
+
const n = Ee(t) ? zt("MapSet").proxyMap_(t, r) : Me(t) ? zt("MapSet").proxySet_(t, r) : da(t, r);
|
2768
2783
|
return (r ? r.scope_ : ui()).drafts_.push(n), n;
|
2769
2784
|
}
|
2770
2785
|
function ma(t) {
|
2771
|
-
return
|
2786
|
+
return Ft(t) || Y(10, t), fi(t);
|
2772
2787
|
}
|
2773
2788
|
function fi(t) {
|
2774
|
-
if (!
|
2789
|
+
if (!kt(t) || ur(t))
|
2775
2790
|
return t;
|
2776
2791
|
const r = t[nt];
|
2777
2792
|
let n;
|
@@ -2781,7 +2796,7 @@ function fi(t) {
|
|
2781
2796
|
r.finalized_ = !0, n = bn(t, r.scope_.immer_.useStrictShallowCopy_);
|
2782
2797
|
} else
|
2783
2798
|
n = bn(t, !0);
|
2784
|
-
return
|
2799
|
+
return Ie(n, (i, s) => {
|
2785
2800
|
ci(n, i, fi(s));
|
2786
2801
|
}), r && (r.finalized_ = !1), n;
|
2787
2802
|
}
|
@@ -2797,109 +2812,109 @@ function Un() {
|
|
2797
2812
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
2798
2813
|
);
|
2799
2814
|
const r = "replace", n = "add", i = "remove";
|
2800
|
-
function s(b, d,
|
2815
|
+
function s(b, d, l, p) {
|
2801
2816
|
switch (b.type_) {
|
2802
2817
|
case 0:
|
2803
2818
|
case 2:
|
2804
2819
|
return h(
|
2805
2820
|
b,
|
2806
2821
|
d,
|
2807
|
-
|
2822
|
+
l,
|
2808
2823
|
p
|
2809
2824
|
);
|
2810
2825
|
case 1:
|
2811
|
-
return c(b, d,
|
2826
|
+
return c(b, d, l, p);
|
2812
2827
|
case 3:
|
2813
2828
|
return m(
|
2814
2829
|
b,
|
2815
2830
|
d,
|
2816
|
-
|
2831
|
+
l,
|
2817
2832
|
p
|
2818
2833
|
);
|
2819
2834
|
}
|
2820
2835
|
}
|
2821
|
-
function c(b, d,
|
2822
|
-
let { base_: g, assigned_:
|
2823
|
-
_.length < g.length && ([g, _] = [_, g], [
|
2836
|
+
function c(b, d, l, p) {
|
2837
|
+
let { base_: g, assigned_: v } = b, _ = b.copy_;
|
2838
|
+
_.length < g.length && ([g, _] = [_, g], [l, p] = [p, l]);
|
2824
2839
|
for (let y = 0; y < g.length; y++)
|
2825
|
-
if (
|
2826
|
-
const
|
2827
|
-
|
2840
|
+
if (v[y] && _[y] !== g[y]) {
|
2841
|
+
const f = d.concat([y]);
|
2842
|
+
l.push({
|
2828
2843
|
op: r,
|
2829
|
-
path:
|
2844
|
+
path: f,
|
2830
2845
|
// Need to maybe clone it, as it can in fact be the original value
|
2831
2846
|
// due to the base/copy inversion at the start of this function
|
2832
|
-
value:
|
2847
|
+
value: W(_[y])
|
2833
2848
|
}), p.push({
|
2834
2849
|
op: r,
|
2835
|
-
path:
|
2836
|
-
value:
|
2850
|
+
path: f,
|
2851
|
+
value: W(g[y])
|
2837
2852
|
});
|
2838
2853
|
}
|
2839
2854
|
for (let y = g.length; y < _.length; y++) {
|
2840
|
-
const
|
2841
|
-
|
2855
|
+
const f = d.concat([y]);
|
2856
|
+
l.push({
|
2842
2857
|
op: n,
|
2843
|
-
path:
|
2858
|
+
path: f,
|
2844
2859
|
// Need to maybe clone it, as it can in fact be the original value
|
2845
2860
|
// due to the base/copy inversion at the start of this function
|
2846
|
-
value:
|
2861
|
+
value: W(_[y])
|
2847
2862
|
});
|
2848
2863
|
}
|
2849
2864
|
for (let y = _.length - 1; g.length <= y; --y) {
|
2850
|
-
const
|
2865
|
+
const f = d.concat([y]);
|
2851
2866
|
p.push({
|
2852
2867
|
op: i,
|
2853
|
-
path:
|
2868
|
+
path: f
|
2854
2869
|
});
|
2855
2870
|
}
|
2856
2871
|
}
|
2857
|
-
function h(b, d,
|
2858
|
-
const { base_: g, copy_:
|
2859
|
-
|
2860
|
-
const
|
2861
|
-
if (
|
2872
|
+
function h(b, d, l, p) {
|
2873
|
+
const { base_: g, copy_: v } = b;
|
2874
|
+
Ie(b.assigned_, (_, y) => {
|
2875
|
+
const f = rn(g, _), A = rn(v, _), E = y ? ve(g, _) ? r : n : i;
|
2876
|
+
if (f === A && E === r)
|
2862
2877
|
return;
|
2863
2878
|
const I = d.concat(_);
|
2864
|
-
|
2865
|
-
|
2879
|
+
l.push(E === i ? { op: E, path: I } : { op: E, path: I, value: A }), p.push(
|
2880
|
+
E === n ? { op: i, path: I } : E === i ? { op: n, path: I, value: W(f) } : { op: r, path: I, value: W(f) }
|
2866
2881
|
);
|
2867
2882
|
});
|
2868
2883
|
}
|
2869
|
-
function m(b, d,
|
2870
|
-
let { base_: g, copy_:
|
2884
|
+
function m(b, d, l, p) {
|
2885
|
+
let { base_: g, copy_: v } = b, _ = 0;
|
2871
2886
|
g.forEach((y) => {
|
2872
|
-
if (!
|
2873
|
-
const
|
2874
|
-
|
2887
|
+
if (!v.has(y)) {
|
2888
|
+
const f = d.concat([_]);
|
2889
|
+
l.push({
|
2875
2890
|
op: i,
|
2876
|
-
path:
|
2891
|
+
path: f,
|
2877
2892
|
value: y
|
2878
2893
|
}), p.unshift({
|
2879
2894
|
op: n,
|
2880
|
-
path:
|
2895
|
+
path: f,
|
2881
2896
|
value: y
|
2882
2897
|
});
|
2883
2898
|
}
|
2884
2899
|
_++;
|
2885
|
-
}), _ = 0,
|
2900
|
+
}), _ = 0, v.forEach((y) => {
|
2886
2901
|
if (!g.has(y)) {
|
2887
|
-
const
|
2888
|
-
|
2902
|
+
const f = d.concat([_]);
|
2903
|
+
l.push({
|
2889
2904
|
op: n,
|
2890
|
-
path:
|
2905
|
+
path: f,
|
2891
2906
|
value: y
|
2892
2907
|
}), p.unshift({
|
2893
2908
|
op: i,
|
2894
|
-
path:
|
2909
|
+
path: f,
|
2895
2910
|
value: y
|
2896
2911
|
});
|
2897
2912
|
}
|
2898
2913
|
_++;
|
2899
2914
|
});
|
2900
2915
|
}
|
2901
|
-
function
|
2902
|
-
|
2916
|
+
function x(b, d, l, p) {
|
2917
|
+
l.push({
|
2903
2918
|
op: r,
|
2904
2919
|
path: [],
|
2905
2920
|
value: d === Tn ? void 0 : d
|
@@ -2910,75 +2925,75 @@ function Un() {
|
|
2910
2925
|
});
|
2911
2926
|
}
|
2912
2927
|
function F(b, d) {
|
2913
|
-
return d.forEach((
|
2914
|
-
const { path: p, op: g } =
|
2915
|
-
let
|
2916
|
-
for (let
|
2917
|
-
const
|
2918
|
-
let I = p[
|
2919
|
-
typeof I != "string" && typeof I != "number" && (I = "" + I), (
|
2928
|
+
return d.forEach((l) => {
|
2929
|
+
const { path: p, op: g } = l;
|
2930
|
+
let v = b;
|
2931
|
+
for (let A = 0; A < p.length - 1; A++) {
|
2932
|
+
const E = jt(v);
|
2933
|
+
let I = p[A];
|
2934
|
+
typeof I != "string" && typeof I != "number" && (I = "" + I), (E === 0 || E === 1) && (I === "__proto__" || I === "constructor") && Y(19), typeof v == "function" && I === "prototype" && Y(19), v = rn(v, I), typeof v != "object" && Y(18, p.join("/"));
|
2920
2935
|
}
|
2921
|
-
const _ =
|
2936
|
+
const _ = jt(v), y = T(l.value), f = p[p.length - 1];
|
2922
2937
|
switch (g) {
|
2923
2938
|
case r:
|
2924
2939
|
switch (_) {
|
2925
2940
|
case 2:
|
2926
|
-
return
|
2941
|
+
return v.set(f, y);
|
2927
2942
|
case 3:
|
2928
|
-
|
2943
|
+
Y(16);
|
2929
2944
|
default:
|
2930
|
-
return
|
2945
|
+
return v[f] = y;
|
2931
2946
|
}
|
2932
2947
|
case n:
|
2933
2948
|
switch (_) {
|
2934
2949
|
case 1:
|
2935
|
-
return
|
2950
|
+
return f === "-" ? v.push(y) : v.splice(f, 0, y);
|
2936
2951
|
case 2:
|
2937
|
-
return
|
2952
|
+
return v.set(f, y);
|
2938
2953
|
case 3:
|
2939
|
-
return
|
2954
|
+
return v.add(y);
|
2940
2955
|
default:
|
2941
|
-
return
|
2956
|
+
return v[f] = y;
|
2942
2957
|
}
|
2943
2958
|
case i:
|
2944
2959
|
switch (_) {
|
2945
2960
|
case 1:
|
2946
|
-
return
|
2961
|
+
return v.splice(f, 1);
|
2947
2962
|
case 2:
|
2948
|
-
return
|
2963
|
+
return v.delete(f);
|
2949
2964
|
case 3:
|
2950
|
-
return
|
2965
|
+
return v.delete(l.value);
|
2951
2966
|
default:
|
2952
|
-
return delete
|
2967
|
+
return delete v[f];
|
2953
2968
|
}
|
2954
2969
|
default:
|
2955
|
-
|
2970
|
+
Y(17, g);
|
2956
2971
|
}
|
2957
2972
|
}), b;
|
2958
2973
|
}
|
2959
|
-
function
|
2960
|
-
if (!
|
2974
|
+
function T(b) {
|
2975
|
+
if (!kt(b))
|
2961
2976
|
return b;
|
2962
2977
|
if (Array.isArray(b))
|
2963
|
-
return b.map(
|
2964
|
-
if (
|
2978
|
+
return b.map(T);
|
2979
|
+
if (Ee(b))
|
2965
2980
|
return new Map(
|
2966
|
-
Array.from(b.entries()).map(([
|
2981
|
+
Array.from(b.entries()).map(([l, p]) => [l, T(p)])
|
2967
2982
|
);
|
2968
|
-
if (
|
2969
|
-
return new Set(Array.from(b).map(
|
2970
|
-
const d = Object.create(
|
2971
|
-
for (const
|
2972
|
-
d[
|
2973
|
-
return
|
2983
|
+
if (Me(b))
|
2984
|
+
return new Set(Array.from(b).map(T));
|
2985
|
+
const d = Object.create(Rt(b));
|
2986
|
+
for (const l in b)
|
2987
|
+
d[l] = T(b[l]);
|
2988
|
+
return ve(b, _e) && (d[_e] = b[_e]), d;
|
2974
2989
|
}
|
2975
|
-
function
|
2976
|
-
return
|
2990
|
+
function W(b) {
|
2991
|
+
return Ft(b) ? T(b) : b;
|
2977
2992
|
}
|
2978
2993
|
ua("Patches", {
|
2979
2994
|
applyPatches_: F,
|
2980
2995
|
generatePatches_: s,
|
2981
|
-
generateReplacementPatches_:
|
2996
|
+
generateReplacementPatches_: x
|
2982
2997
|
});
|
2983
2998
|
}
|
2984
2999
|
var it = new ha(), ya = it.produce;
|
@@ -3113,12 +3128,12 @@ const $n = /* @__PURE__ */ wn(Ya), Va = {
|
|
3113
3128
|
];
|
3114
3129
|
class Za {
|
3115
3130
|
constructor(r) {
|
3116
|
-
|
3117
|
-
|
3118
|
-
|
3119
|
-
|
3120
|
-
|
3121
|
-
|
3131
|
+
Pt(this, "stateSubject");
|
3132
|
+
Pt(this, "stateHistorySubject");
|
3133
|
+
Pt(this, "prevState");
|
3134
|
+
Pt(this, "undos", []);
|
3135
|
+
Pt(this, "redos", []);
|
3136
|
+
Pt(this, "listener");
|
3122
3137
|
const n = r || Xa;
|
3123
3138
|
this.stateSubject = new jn(n), this.stateHistorySubject = new jn({
|
3124
3139
|
handleRedo: !1,
|
@@ -3233,62 +3248,62 @@ class Za {
|
|
3233
3248
|
trackItemIds: c,
|
3234
3249
|
tracks: h,
|
3235
3250
|
transitionIds: m,
|
3236
|
-
transitionsMap:
|
3251
|
+
transitionsMap: x,
|
3237
3252
|
trackItemsMap: F
|
3238
|
-
} = this.getState(),
|
3253
|
+
} = this.getState(), T = K({
|
3239
3254
|
trackItemDetailsMap: s,
|
3240
3255
|
trackItemIds: c,
|
3241
3256
|
tracks: h,
|
3242
3257
|
transitionIds: m,
|
3243
|
-
transitionsMap:
|
3258
|
+
transitionsMap: x,
|
3244
3259
|
trackItemsMap: F
|
3245
|
-
}),
|
3246
|
-
n.forEach((
|
3247
|
-
let
|
3248
|
-
const
|
3249
|
-
|
3250
|
-
path:
|
3260
|
+
}), W = [], b = [], d = [], l = [], p = [], g = [];
|
3261
|
+
n.forEach((w) => {
|
3262
|
+
let M;
|
3263
|
+
const j = w.path.slice(1);
|
3264
|
+
w.type === "CREATE" ? M = {
|
3265
|
+
path: j,
|
3251
3266
|
op: "remove",
|
3252
|
-
value:
|
3253
|
-
} :
|
3254
|
-
path:
|
3267
|
+
value: w.value
|
3268
|
+
} : w.type === "CHANGE" ? M = {
|
3269
|
+
path: j,
|
3255
3270
|
op: "replace",
|
3256
|
-
value:
|
3257
|
-
} :
|
3258
|
-
path:
|
3271
|
+
value: w.oldValue
|
3272
|
+
} : M = {
|
3273
|
+
path: j,
|
3259
3274
|
op: "add",
|
3260
|
-
value:
|
3261
|
-
},
|
3275
|
+
value: w.oldValue
|
3276
|
+
}, w.path.includes("trackItemIds") ? d.push(M) : w.path.includes("transitionIds") ? b.push(M) : w.path.includes("trackItemsMap") ? p.push(M) : w.path.includes("transitionsMap") ? l.push(M) : w.path.includes("tracks") ? W.push(M) : w.path.includes("trackItemDetailsMap") && g.push(M);
|
3262
3277
|
});
|
3263
|
-
const
|
3264
|
-
|
3265
|
-
|
3278
|
+
const v = this.applyPatch(
|
3279
|
+
T.tracks,
|
3280
|
+
W
|
3266
3281
|
), _ = this.applyPatch(
|
3267
|
-
|
3282
|
+
T.transitionIds,
|
3268
3283
|
b
|
3269
3284
|
), y = this.applyPatch(
|
3270
|
-
|
3285
|
+
T.trackItemIds,
|
3271
3286
|
d
|
3272
|
-
),
|
3273
|
-
|
3274
|
-
|
3275
|
-
),
|
3276
|
-
|
3287
|
+
), f = this.applyPatch(
|
3288
|
+
T.transitionsMap,
|
3289
|
+
l
|
3290
|
+
), A = this.applyPatch(
|
3291
|
+
T.trackItemsMap,
|
3277
3292
|
p
|
3278
|
-
),
|
3279
|
-
|
3293
|
+
), E = this.applyPatch(
|
3294
|
+
T.trackItemDetailsMap,
|
3280
3295
|
g
|
3281
|
-
), I =
|
3282
|
-
tracks:
|
3296
|
+
), I = K({
|
3297
|
+
tracks: v,
|
3283
3298
|
transitionIds: _,
|
3284
3299
|
trackItemIds: y,
|
3285
|
-
transitionsMap:
|
3286
|
-
trackItemsMap:
|
3287
|
-
trackItemDetailsMap:
|
3288
|
-
}),
|
3289
|
-
this.prevState =
|
3290
|
-
const
|
3291
|
-
this.stateSubject.next({ ...
|
3300
|
+
transitionsMap: f,
|
3301
|
+
trackItemsMap: A,
|
3302
|
+
trackItemDetailsMap: E
|
3303
|
+
}), D = K(this.getState()), S = { ...D, ...I };
|
3304
|
+
this.prevState = D, this.redos.push({ redos: n, type: i });
|
3305
|
+
const O = Zt(S.trackItemsMap);
|
3306
|
+
this.stateSubject.next({ ...S, duration: O }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3292
3307
|
}
|
3293
3308
|
applyPatch(r, n) {
|
3294
3309
|
return n.reverse().reduce((i, s) => ya(i, (c) => {
|
@@ -3304,62 +3319,62 @@ class Za {
|
|
3304
3319
|
trackItemIds: c,
|
3305
3320
|
tracks: h,
|
3306
3321
|
transitionIds: m,
|
3307
|
-
transitionsMap:
|
3322
|
+
transitionsMap: x,
|
3308
3323
|
trackItemsMap: F
|
3309
|
-
} = this.getState(),
|
3324
|
+
} = this.getState(), T = K({
|
3310
3325
|
trackItemDetailsMap: s,
|
3311
3326
|
trackItemIds: c,
|
3312
3327
|
tracks: h,
|
3313
3328
|
transitionIds: m,
|
3314
|
-
transitionsMap:
|
3329
|
+
transitionsMap: x,
|
3315
3330
|
trackItemsMap: F
|
3316
|
-
}),
|
3317
|
-
n.forEach((
|
3318
|
-
let
|
3319
|
-
const
|
3320
|
-
|
3321
|
-
path:
|
3331
|
+
}), W = [], b = [], d = [], l = [], p = [], g = [];
|
3332
|
+
n.forEach((w) => {
|
3333
|
+
let M;
|
3334
|
+
const j = w.path.slice(1);
|
3335
|
+
w.type === "CREATE" ? M = {
|
3336
|
+
path: j,
|
3322
3337
|
op: "add",
|
3323
|
-
value:
|
3324
|
-
} :
|
3325
|
-
path:
|
3338
|
+
value: w.value
|
3339
|
+
} : w.type === "CHANGE" ? M = {
|
3340
|
+
path: j,
|
3326
3341
|
op: "replace",
|
3327
|
-
value:
|
3328
|
-
} :
|
3329
|
-
path:
|
3342
|
+
value: w.value
|
3343
|
+
} : M = {
|
3344
|
+
path: j,
|
3330
3345
|
op: "remove",
|
3331
|
-
value:
|
3332
|
-
},
|
3346
|
+
value: w.oldValue
|
3347
|
+
}, w.path.includes("trackItemIds") ? d.push(M) : w.path.includes("transitionIds") ? b.push(M) : w.path.includes("trackItemsMap") ? p.push(M) : w.path.includes("transitionsMap") ? l.push(M) : w.path.includes("trackItemDetailsMap") ? g.push(M) : W.push(M);
|
3333
3348
|
});
|
3334
|
-
const
|
3335
|
-
|
3336
|
-
|
3349
|
+
const v = this.applyPatch(
|
3350
|
+
T.tracks,
|
3351
|
+
W
|
3337
3352
|
), _ = this.applyPatch(
|
3338
|
-
|
3353
|
+
T.transitionIds,
|
3339
3354
|
b
|
3340
3355
|
), y = this.applyPatch(
|
3341
|
-
|
3356
|
+
T.trackItemIds,
|
3342
3357
|
d
|
3343
|
-
),
|
3344
|
-
|
3345
|
-
|
3346
|
-
),
|
3347
|
-
|
3358
|
+
), f = this.applyPatch(
|
3359
|
+
T.transitionsMap,
|
3360
|
+
l
|
3361
|
+
), A = this.applyPatch(
|
3362
|
+
T.trackItemsMap,
|
3348
3363
|
p
|
3349
|
-
),
|
3350
|
-
|
3364
|
+
), E = this.applyPatch(
|
3365
|
+
T.trackItemDetailsMap,
|
3351
3366
|
g
|
3352
|
-
), I =
|
3353
|
-
tracks:
|
3367
|
+
), I = K({
|
3368
|
+
tracks: v,
|
3354
3369
|
transitionIds: _,
|
3355
3370
|
trackItemIds: y,
|
3356
|
-
transitionsMap:
|
3357
|
-
trackItemsMap:
|
3358
|
-
trackItemDetailsMap:
|
3359
|
-
}),
|
3360
|
-
this.prevState =
|
3361
|
-
const
|
3362
|
-
this.stateSubject.next({ ...
|
3371
|
+
transitionsMap: f,
|
3372
|
+
trackItemsMap: A,
|
3373
|
+
trackItemDetailsMap: E
|
3374
|
+
}), D = K(this.getState()), S = { ...D, ...I };
|
3375
|
+
this.prevState = D, this.undos.push({ undos: n, type: i });
|
3376
|
+
const O = Zt(S.trackItemsMap);
|
3377
|
+
this.stateSubject.next({ ...S, duration: O }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3363
3378
|
}
|
3364
3379
|
}
|
3365
3380
|
export {
|