@designcombo/state 0.1.28 → 0.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1488 -1328
- package/dist/index.umd.js +2 -2
- package/dist/utils/load-item.d.ts +122 -1
- package/dist/utils/validateColision.d.ts +3 -0
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { subject as
|
|
1
|
+
var pi = Object.defineProperty;
|
|
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 Dt = (t, r, n) => hi(t, typeof r != "symbol" ? r + "" : r, n);
|
|
4
|
+
import { subject as Vt, filter as Xt, 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 we(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);
|
|
@@ -31,16 +31,16 @@ function on(t) {
|
|
|
31
31
|
function cn(t, r) {
|
|
32
32
|
var n = typeof Symbol == "function" && t[Symbol.iterator];
|
|
33
33
|
if (!n) return t;
|
|
34
|
-
var i = n.call(t), s, c = [],
|
|
34
|
+
var i = n.call(t), s, c = [], h;
|
|
35
35
|
try {
|
|
36
36
|
for (; (r === void 0 || r-- > 0) && !(s = i.next()).done; ) c.push(s.value);
|
|
37
|
-
} catch (
|
|
38
|
-
|
|
37
|
+
} catch (m) {
|
|
38
|
+
h = { error: m };
|
|
39
39
|
} finally {
|
|
40
40
|
try {
|
|
41
41
|
s && !s.done && (n = i.return) && n.call(i);
|
|
42
42
|
} finally {
|
|
43
|
-
if (
|
|
43
|
+
if (h) throw h.error;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
return c;
|
|
@@ -50,7 +50,7 @@ function un(t, r, n) {
|
|
|
50
50
|
(c || !(i in r)) && (c || (c = Array.prototype.slice.call(r, 0, i)), c[i] = r[i]);
|
|
51
51
|
return t.concat(c || Array.prototype.slice.call(r));
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function It(t) {
|
|
54
54
|
return typeof t == "function";
|
|
55
55
|
}
|
|
56
56
|
function Yn(t) {
|
|
@@ -74,7 +74,7 @@ function ln(t, r) {
|
|
|
74
74
|
0 <= n && t.splice(n, 1);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
var
|
|
77
|
+
var ar = function() {
|
|
78
78
|
function t(r) {
|
|
79
79
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
80
80
|
}
|
|
@@ -82,49 +82,49 @@ var er = function() {
|
|
|
82
82
|
var r, n, i, s, c;
|
|
83
83
|
if (!this.closed) {
|
|
84
84
|
this.closed = !0;
|
|
85
|
-
var
|
|
86
|
-
if (
|
|
87
|
-
if (this._parentage = null, Array.isArray(
|
|
85
|
+
var h = this._parentage;
|
|
86
|
+
if (h)
|
|
87
|
+
if (this._parentage = null, Array.isArray(h))
|
|
88
88
|
try {
|
|
89
|
-
for (var
|
|
90
|
-
var F =
|
|
89
|
+
for (var m = on(h), P = m.next(); !P.done; P = m.next()) {
|
|
90
|
+
var F = P.value;
|
|
91
91
|
F.remove(this);
|
|
92
92
|
}
|
|
93
|
-
} catch (
|
|
94
|
-
r = { error:
|
|
93
|
+
} catch (p) {
|
|
94
|
+
r = { error: p };
|
|
95
95
|
} finally {
|
|
96
96
|
try {
|
|
97
|
-
|
|
97
|
+
P && !P.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
|
-
|
|
104
|
-
var
|
|
105
|
-
if (
|
|
103
|
+
h.remove(this);
|
|
104
|
+
var E = this.initialTeardown;
|
|
105
|
+
if (It(E))
|
|
106
106
|
try {
|
|
107
|
-
|
|
108
|
-
} catch (
|
|
109
|
-
c =
|
|
107
|
+
E();
|
|
108
|
+
} catch (p) {
|
|
109
|
+
c = p instanceof Qr ? p.errors : [p];
|
|
110
110
|
}
|
|
111
|
-
var
|
|
112
|
-
if (
|
|
111
|
+
var N = this._finalizers;
|
|
112
|
+
if (N) {
|
|
113
113
|
this._finalizers = null;
|
|
114
114
|
try {
|
|
115
|
-
for (var
|
|
116
|
-
var
|
|
115
|
+
for (var b = on(N), d = b.next(); !d.done; d = b.next()) {
|
|
116
|
+
var f = d.value;
|
|
117
117
|
try {
|
|
118
|
-
|
|
119
|
-
} catch (
|
|
120
|
-
c = c ?? [],
|
|
118
|
+
Dn(f);
|
|
119
|
+
} catch (p) {
|
|
120
|
+
c = c ?? [], p instanceof Qr ? c = un(un([], cn(c)), cn(p.errors)) : c.push(p);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
} catch (
|
|
124
|
-
i = { error:
|
|
123
|
+
} catch (p) {
|
|
124
|
+
i = { error: p };
|
|
125
125
|
} finally {
|
|
126
126
|
try {
|
|
127
|
-
|
|
127
|
+
d && !d.done && (s = b.return) && s.call(b);
|
|
128
128
|
} finally {
|
|
129
129
|
if (i) throw i.error;
|
|
130
130
|
}
|
|
@@ -137,7 +137,7 @@ var er = function() {
|
|
|
137
137
|
var n;
|
|
138
138
|
if (r && r !== this)
|
|
139
139
|
if (this.closed)
|
|
140
|
-
|
|
140
|
+
Dn(r);
|
|
141
141
|
else {
|
|
142
142
|
if (r instanceof t) {
|
|
143
143
|
if (r.closed || r._hasParent(this))
|
|
@@ -162,12 +162,12 @@ var er = function() {
|
|
|
162
162
|
var r = new t();
|
|
163
163
|
return r.closed = !0, r;
|
|
164
164
|
}(), t;
|
|
165
|
-
}(), Vn =
|
|
165
|
+
}(), Vn = ar.EMPTY;
|
|
166
166
|
function Xn(t) {
|
|
167
|
-
return t instanceof
|
|
167
|
+
return t instanceof ar || t && "closed" in t && It(t.remove) && It(t.add) && It(t.unsubscribe);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
|
|
169
|
+
function Dn(t) {
|
|
170
|
+
It(t) ? t() : t.unsubscribe();
|
|
171
171
|
}
|
|
172
172
|
var qn = {
|
|
173
173
|
onUnhandledError: null,
|
|
@@ -187,21 +187,21 @@ var qn = {
|
|
|
187
187
|
},
|
|
188
188
|
delegate: void 0
|
|
189
189
|
};
|
|
190
|
-
function
|
|
190
|
+
function Li(t) {
|
|
191
191
|
Jn.setTimeout(function() {
|
|
192
192
|
throw t;
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Pn() {
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Qe(t) {
|
|
198
198
|
t();
|
|
199
199
|
}
|
|
200
200
|
var Zn = function(t) {
|
|
201
|
-
|
|
201
|
+
we(r, t);
|
|
202
202
|
function r(n) {
|
|
203
203
|
var i = t.call(this) || this;
|
|
204
|
-
return i.isStopped = !1, n ? (i.destination = n, Xn(n) && n.add(i)) : i.destination =
|
|
204
|
+
return i.isStopped = !1, n ? (i.destination = n, Xn(n) && n.add(i)) : i.destination = Bi, i;
|
|
205
205
|
}
|
|
206
206
|
return r.create = function(n, i, s) {
|
|
207
207
|
return new fn(n, i, s);
|
|
@@ -228,11 +228,11 @@ var Zn = function(t) {
|
|
|
228
228
|
this.unsubscribe();
|
|
229
229
|
}
|
|
230
230
|
}, r;
|
|
231
|
-
}(
|
|
231
|
+
}(ar), Ui = Function.prototype.bind;
|
|
232
232
|
function tn(t, r) {
|
|
233
|
-
return
|
|
233
|
+
return Ui.call(t, r);
|
|
234
234
|
}
|
|
235
|
-
var
|
|
235
|
+
var Wi = function() {
|
|
236
236
|
function t(r) {
|
|
237
237
|
this.partialObserver = r;
|
|
238
238
|
}
|
|
@@ -242,7 +242,7 @@ var Fi = function() {
|
|
|
242
242
|
try {
|
|
243
243
|
n.next(r);
|
|
244
244
|
} catch (i) {
|
|
245
|
-
|
|
245
|
+
Ze(i);
|
|
246
246
|
}
|
|
247
247
|
}, t.prototype.error = function(r) {
|
|
248
248
|
var n = this.partialObserver;
|
|
@@ -250,68 +250,68 @@ var Fi = function() {
|
|
|
250
250
|
try {
|
|
251
251
|
n.error(r);
|
|
252
252
|
} catch (i) {
|
|
253
|
-
|
|
253
|
+
Ze(i);
|
|
254
254
|
}
|
|
255
255
|
else
|
|
256
|
-
|
|
256
|
+
Ze(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
|
+
Ze(n);
|
|
264
264
|
}
|
|
265
265
|
}, t;
|
|
266
266
|
}(), fn = function(t) {
|
|
267
|
-
|
|
267
|
+
we(r, t);
|
|
268
268
|
function r(n, i, s) {
|
|
269
|
-
var c = t.call(this) || this,
|
|
270
|
-
if (
|
|
271
|
-
|
|
269
|
+
var c = t.call(this) || this, h;
|
|
270
|
+
if (It(n) || !n)
|
|
271
|
+
h = {
|
|
272
272
|
next: n ?? void 0,
|
|
273
273
|
error: i ?? void 0,
|
|
274
274
|
complete: s ?? void 0
|
|
275
275
|
};
|
|
276
276
|
else {
|
|
277
|
-
var
|
|
278
|
-
c && qn.useDeprecatedNextContext ? (
|
|
277
|
+
var m;
|
|
278
|
+
c && qn.useDeprecatedNextContext ? (m = Object.create(n), m.unsubscribe = function() {
|
|
279
279
|
return c.unsubscribe();
|
|
280
|
-
},
|
|
281
|
-
next: n.next && tn(n.next,
|
|
282
|
-
error: n.error && tn(n.error,
|
|
283
|
-
complete: n.complete && tn(n.complete,
|
|
284
|
-
}) :
|
|
280
|
+
}, h = {
|
|
281
|
+
next: n.next && tn(n.next, m),
|
|
282
|
+
error: n.error && tn(n.error, m),
|
|
283
|
+
complete: n.complete && tn(n.complete, m)
|
|
284
|
+
}) : h = n;
|
|
285
285
|
}
|
|
286
|
-
return c.destination = new
|
|
286
|
+
return c.destination = new Wi(h), c;
|
|
287
287
|
}
|
|
288
288
|
return r;
|
|
289
289
|
}(Zn);
|
|
290
|
-
function
|
|
291
|
-
|
|
290
|
+
function Ze(t) {
|
|
291
|
+
Li(t);
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Gi(t) {
|
|
294
294
|
throw t;
|
|
295
295
|
}
|
|
296
|
-
var
|
|
296
|
+
var Bi = {
|
|
297
297
|
closed: !0,
|
|
298
|
-
next:
|
|
299
|
-
error:
|
|
300
|
-
complete:
|
|
301
|
-
},
|
|
298
|
+
next: Pn,
|
|
299
|
+
error: Gi,
|
|
300
|
+
complete: Pn
|
|
301
|
+
}, $i = function() {
|
|
302
302
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
303
303
|
}();
|
|
304
|
-
function
|
|
304
|
+
function Ki(t) {
|
|
305
305
|
return t;
|
|
306
306
|
}
|
|
307
|
-
function
|
|
308
|
-
return t.length === 0 ?
|
|
307
|
+
function Yi(t) {
|
|
308
|
+
return t.length === 0 ? Ki : t.length === 1 ? t[0] : function(n) {
|
|
309
309
|
return t.reduce(function(i, s) {
|
|
310
310
|
return s(i);
|
|
311
311
|
}, n);
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
|
-
var
|
|
314
|
+
var Cn = function() {
|
|
315
315
|
function t(r) {
|
|
316
316
|
r && (this._subscribe = r);
|
|
317
317
|
}
|
|
@@ -319,10 +319,10 @@ var Mn = function() {
|
|
|
319
319
|
var n = new t();
|
|
320
320
|
return n.source = this, n.operator = r, n;
|
|
321
321
|
}, t.prototype.subscribe = function(r, n, i) {
|
|
322
|
-
var s = this, c =
|
|
323
|
-
return
|
|
324
|
-
var
|
|
325
|
-
c.add(
|
|
322
|
+
var s = this, c = Xi(r) ? r : new fn(r, n, i);
|
|
323
|
+
return Qe(function() {
|
|
324
|
+
var h = s, m = h.operator, P = h.source;
|
|
325
|
+
c.add(m ? m.call(c, P) : P ? s._subscribe(c) : s._trySubscribe(c));
|
|
326
326
|
}), c;
|
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
|
328
328
|
try {
|
|
@@ -332,37 +332,37 @@ var Mn = function() {
|
|
|
332
332
|
}
|
|
333
333
|
}, t.prototype.forEach = function(r, n) {
|
|
334
334
|
var i = this;
|
|
335
|
-
return n =
|
|
336
|
-
var
|
|
337
|
-
next: function(
|
|
335
|
+
return n = Rn(n), new n(function(s, c) {
|
|
336
|
+
var h = new fn({
|
|
337
|
+
next: function(m) {
|
|
338
338
|
try {
|
|
339
|
-
r(
|
|
340
|
-
} catch (
|
|
341
|
-
c(
|
|
339
|
+
r(m);
|
|
340
|
+
} catch (P) {
|
|
341
|
+
c(P), h.unsubscribe();
|
|
342
342
|
}
|
|
343
343
|
},
|
|
344
344
|
error: c,
|
|
345
345
|
complete: s
|
|
346
346
|
});
|
|
347
|
-
i.subscribe(
|
|
347
|
+
i.subscribe(h);
|
|
348
348
|
});
|
|
349
349
|
}, t.prototype._subscribe = function(r) {
|
|
350
350
|
var n;
|
|
351
351
|
return (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r);
|
|
352
|
-
}, t.prototype[
|
|
352
|
+
}, t.prototype[$i] = function() {
|
|
353
353
|
return this;
|
|
354
354
|
}, t.prototype.pipe = function() {
|
|
355
355
|
for (var r = [], n = 0; n < arguments.length; n++)
|
|
356
356
|
r[n] = arguments[n];
|
|
357
|
-
return
|
|
357
|
+
return Yi(r)(this);
|
|
358
358
|
}, t.prototype.toPromise = function(r) {
|
|
359
359
|
var n = this;
|
|
360
|
-
return r =
|
|
360
|
+
return r = Rn(r), new r(function(i, s) {
|
|
361
361
|
var c;
|
|
362
|
-
n.subscribe(function(
|
|
363
|
-
return c =
|
|
364
|
-
}, function(
|
|
365
|
-
return s(
|
|
362
|
+
n.subscribe(function(h) {
|
|
363
|
+
return c = h;
|
|
364
|
+
}, function(h) {
|
|
365
|
+
return s(h);
|
|
366
366
|
}, function() {
|
|
367
367
|
return i(c);
|
|
368
368
|
});
|
|
@@ -371,48 +371,48 @@ var Mn = function() {
|
|
|
371
371
|
return new t(r);
|
|
372
372
|
}, t;
|
|
373
373
|
}();
|
|
374
|
-
function
|
|
374
|
+
function Rn(t) {
|
|
375
375
|
var r;
|
|
376
376
|
return (r = t ?? qn.Promise) !== null && r !== void 0 ? r : Promise;
|
|
377
377
|
}
|
|
378
|
-
function
|
|
379
|
-
return t &&
|
|
378
|
+
function Vi(t) {
|
|
379
|
+
return t && It(t.next) && It(t.error) && It(t.complete);
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
return t && t instanceof Zn ||
|
|
381
|
+
function Xi(t) {
|
|
382
|
+
return t && t instanceof Zn || Vi(t) && Xn(t);
|
|
383
383
|
}
|
|
384
|
-
var
|
|
384
|
+
var qi = Yn(function(t) {
|
|
385
385
|
return function() {
|
|
386
386
|
t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
387
387
|
};
|
|
388
388
|
}), Qn = function(t) {
|
|
389
|
-
|
|
389
|
+
we(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;
|
|
393
393
|
}
|
|
394
394
|
return r.prototype.lift = function(n) {
|
|
395
|
-
var i = new
|
|
395
|
+
var i = new Fn(this, this);
|
|
396
396
|
return i.operator = n, i;
|
|
397
397
|
}, r.prototype._throwIfClosed = function() {
|
|
398
398
|
if (this.closed)
|
|
399
|
-
throw new
|
|
399
|
+
throw new qi();
|
|
400
400
|
}, r.prototype.next = function(n) {
|
|
401
401
|
var i = this;
|
|
402
|
-
|
|
402
|
+
Qe(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
|
-
for (var
|
|
408
|
-
var
|
|
409
|
-
|
|
407
|
+
for (var h = on(i.currentObservers), m = h.next(); !m.done; m = h.next()) {
|
|
408
|
+
var P = m.value;
|
|
409
|
+
P.next(n);
|
|
410
410
|
}
|
|
411
411
|
} catch (F) {
|
|
412
412
|
s = { error: F };
|
|
413
413
|
} finally {
|
|
414
414
|
try {
|
|
415
|
-
|
|
415
|
+
m && !m.done && (c = h.return) && c.call(h);
|
|
416
416
|
} finally {
|
|
417
417
|
if (s) throw s.error;
|
|
418
418
|
}
|
|
@@ -421,7 +421,7 @@ var Bi = Yn(function(t) {
|
|
|
421
421
|
});
|
|
422
422
|
}, r.prototype.error = function(n) {
|
|
423
423
|
var i = this;
|
|
424
|
-
|
|
424
|
+
Qe(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 Bi = Yn(function(t) {
|
|
|
430
430
|
});
|
|
431
431
|
}, r.prototype.complete = function() {
|
|
432
432
|
var n = this;
|
|
433
|
-
|
|
433
|
+
Qe(function() {
|
|
434
434
|
if (n._throwIfClosed(), !n.isStopped) {
|
|
435
435
|
n.isStopped = !0;
|
|
436
436
|
for (var i = n.observers; i.length; )
|
|
@@ -451,21 +451,21 @@ var Bi = Yn(function(t) {
|
|
|
451
451
|
}, r.prototype._subscribe = function(n) {
|
|
452
452
|
return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
|
|
453
453
|
}, r.prototype._innerSubscribe = function(n) {
|
|
454
|
-
var i = this, s = this, c = s.hasError,
|
|
455
|
-
return c ||
|
|
456
|
-
i.currentObservers = null, ln(
|
|
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 ar(function() {
|
|
456
|
+
i.currentObservers = null, ln(m, n);
|
|
457
457
|
}));
|
|
458
458
|
}, r.prototype._checkFinalizedStatuses = function(n) {
|
|
459
|
-
var i = this, s = i.hasError, c = i.thrownError,
|
|
460
|
-
s ? n.error(c) :
|
|
459
|
+
var i = this, s = i.hasError, c = i.thrownError, h = i.isStopped;
|
|
460
|
+
s ? n.error(c) : h && n.complete();
|
|
461
461
|
}, r.prototype.asObservable = function() {
|
|
462
|
-
var n = new
|
|
462
|
+
var n = new Cn();
|
|
463
463
|
return n.source = this, n;
|
|
464
464
|
}, r.create = function(n, i) {
|
|
465
|
-
return new
|
|
465
|
+
return new Fn(n, i);
|
|
466
466
|
}, r;
|
|
467
|
-
}(
|
|
468
|
-
|
|
467
|
+
}(Cn), Fn = function(t) {
|
|
468
|
+
we(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;
|
|
@@ -483,8 +483,8 @@ var Bi = Yn(function(t) {
|
|
|
483
483
|
var i, s;
|
|
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
|
-
}(Qn),
|
|
487
|
-
|
|
486
|
+
}(Qn), jn = function(t) {
|
|
487
|
+
we(r, t);
|
|
488
488
|
function r(n) {
|
|
489
489
|
var i = t.call(this) || this;
|
|
490
490
|
return i._value = n, i;
|
|
@@ -506,79 +506,79 @@ var Bi = Yn(function(t) {
|
|
|
506
506
|
}, r.prototype.next = function(n) {
|
|
507
507
|
t.prototype.next.call(this, this._value = n);
|
|
508
508
|
}, r;
|
|
509
|
-
}(Qn),
|
|
510
|
-
function
|
|
509
|
+
}(Qn), st = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
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 er = { exports: {} };
|
|
514
|
+
er.exports;
|
|
515
515
|
(function(t, r) {
|
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2,
|
|
517
|
-
|
|
518
|
-
var
|
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, h = 9007199254740991, m = "[object Arguments]", P = "[object Array]", F = "[object AsyncFunction]", E = "[object Boolean]", N = "[object Date]", b = "[object Error]", d = "[object Function]", f = "[object GeneratorFunction]", p = "[object Map]", g = "[object Number]", S = "[object Null]", _ = "[object Object]", y = "[object Promise]", l = "[object Proxy]", x = "[object RegExp]", M = "[object Set]", I = "[object String]", C = "[object Symbol]", w = "[object Undefined]", D = "[object WeakMap]", k = "[object ArrayBuffer]", v = "[object DataView]", A = "[object Float32Array]", O = "[object Float64Array]", Z = "[object Int8Array]", V = "[object Int16Array]", ft = "[object Int32Array]", Jt = "[object Uint8Array]", Zt = "[object Uint8ClampedArray]", L = "[object Uint16Array]", ur = "[object Uint32Array]", lr = /[\\^$.*+?()[\]{}|]/g, ot = /^\[object .+?Constructor\]$/, Me = /^(?:0|[1-9]\d*)$/, U = {};
|
|
517
|
+
U[A] = U[O] = U[Z] = U[V] = U[ft] = U[Jt] = U[Zt] = U[L] = U[ur] = !0, U[m] = U[P] = U[k] = U[E] = U[v] = U[N] = U[b] = U[d] = U[p] = U[g] = U[_] = U[x] = U[M] = U[I] = U[D] = !1;
|
|
518
|
+
var Ae = typeof st == "object" && st && st.Object === Object && st, fr = typeof self == "object" && self && self.Object === Object && self, ct = Ae || fr || Function("return this")(), Oe = r && !r.nodeType && r, xe = Oe && !0 && t && !t.nodeType && t, Qt = xe && xe.exports === Oe, te = Qt && Ae.process, De = function() {
|
|
519
519
|
try {
|
|
520
|
-
return
|
|
520
|
+
return te && te.binding && te.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
|
+
}(), ee = De && De.isTypedArray;
|
|
524
|
+
function Pe(e, a) {
|
|
525
|
+
for (var o = -1, u = e == null ? 0 : e.length, R = 0, T = []; ++o < u; ) {
|
|
526
|
+
var z = e[o];
|
|
527
|
+
a(z, o, e) && (T[R++] = z);
|
|
528
528
|
}
|
|
529
|
-
return
|
|
529
|
+
return T;
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
for (var o = -1, u = a.length,
|
|
533
|
-
e[
|
|
531
|
+
function re(e, a) {
|
|
532
|
+
for (var o = -1, u = a.length, R = e.length; ++o < u; )
|
|
533
|
+
e[R + o] = a[o];
|
|
534
534
|
return e;
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function Ce(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;
|
|
540
540
|
return !1;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function dr(e, a) {
|
|
543
543
|
for (var o = -1, u = Array(e); ++o < e; )
|
|
544
544
|
u[o] = a(o);
|
|
545
545
|
return u;
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function pr(e) {
|
|
548
548
|
return function(a) {
|
|
549
549
|
return e(a);
|
|
550
550
|
};
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function zt(e, a) {
|
|
553
553
|
return e.has(a);
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function ne(e, a) {
|
|
556
556
|
return e == null ? void 0 : e[a];
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function Re(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, R) {
|
|
561
|
+
o[++a] = [R, u];
|
|
562
562
|
}), o;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function Fe(e, a) {
|
|
565
565
|
return function(o) {
|
|
566
566
|
return e(a(o));
|
|
567
567
|
};
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function dt(e) {
|
|
570
570
|
var a = -1, o = Array(e.size);
|
|
571
571
|
return e.forEach(function(u) {
|
|
572
572
|
o[++a] = u;
|
|
573
573
|
}), o;
|
|
574
574
|
}
|
|
575
|
-
var
|
|
576
|
-
var e = /[^.]+$/.exec(
|
|
575
|
+
var Ht = Array.prototype, hr = Function.prototype, kt = Object.prototype, Nt = ct["__core-js_shared__"], ie = hr.toString, at = kt.hasOwnProperty, je = function() {
|
|
576
|
+
var e = /[^.]+$/.exec(Nt && Nt.keys && Nt.keys.IE_PROTO || "");
|
|
577
577
|
return e ? "Symbol(src)_1." + e : "";
|
|
578
|
-
}(),
|
|
579
|
-
"^" +
|
|
580
|
-
),
|
|
581
|
-
function
|
|
578
|
+
}(), ze = kt.toString, mr = RegExp(
|
|
579
|
+
"^" + ie.call(at).replace(lr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
580
|
+
), ae = Qt ? ct.Buffer : void 0, Lt = ct.Symbol, He = ct.Uint8Array, Ut = kt.propertyIsEnumerable, Tt = Ht.splice, ut = Lt ? Lt.toStringTag : void 0, Wt = Object.getOwnPropertySymbols, se = ae ? ae.isBuffer : void 0, Et = Fe(Object.keys, Object), oe = bt(ct, "DataView"), Mt = bt(ct, "Map"), ce = bt(ct, "Promise"), ue = bt(ct, "Set"), le = bt(ct, "WeakMap"), vt = bt(Object, "create"), Ne = Q(oe), yt = Q(Mt), yr = Q(ce), br = Q(ue), gr = Q(le), Le = Lt ? Lt.prototype : void 0, fe = Le ? Le.valueOf : void 0;
|
|
581
|
+
function K(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,30 +586,30 @@ Je.exports;
|
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
588
|
function _r() {
|
|
589
|
-
this.__data__ =
|
|
589
|
+
this.__data__ = vt ? vt(null) : {}, this.size = 0;
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function Ir(e) {
|
|
592
592
|
var a = this.has(e) && delete this.__data__[e];
|
|
593
593
|
return this.size -= a ? 1 : 0, a;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function vr(e) {
|
|
596
596
|
var a = this.__data__;
|
|
597
|
-
if (
|
|
597
|
+
if (vt) {
|
|
598
598
|
var o = a[e];
|
|
599
599
|
return o === i ? void 0 : o;
|
|
600
600
|
}
|
|
601
|
-
return
|
|
601
|
+
return at.call(a, e) ? a[e] : void 0;
|
|
602
602
|
}
|
|
603
603
|
function Sr(e) {
|
|
604
604
|
var a = this.__data__;
|
|
605
|
-
return
|
|
605
|
+
return vt ? 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] = vt && a === void 0 ? i : a, this;
|
|
610
610
|
}
|
|
611
|
-
|
|
612
|
-
function
|
|
611
|
+
K.prototype.clear = _r, K.prototype.delete = Ir, K.prototype.get = vr, K.prototype.has = Sr, K.prototype.set = wr;
|
|
612
|
+
function X(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,25 +620,25 @@ Je.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 = $t(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() : Tt.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 = $t(a, e);
|
|
631
631
|
return o < 0 ? void 0 : a[o][1];
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
return
|
|
633
|
+
function Mr(e) {
|
|
634
|
+
return $t(this.__data__, e) > -1;
|
|
635
635
|
}
|
|
636
|
-
function
|
|
637
|
-
var o = this.__data__, u =
|
|
636
|
+
function Ar(e, a) {
|
|
637
|
+
var o = this.__data__, u = $t(o, e);
|
|
638
638
|
return u < 0 ? (++this.size, o.push([e, a])) : o[u][1] = a, this;
|
|
639
639
|
}
|
|
640
|
-
|
|
641
|
-
function
|
|
640
|
+
X.prototype.clear = kr, X.prototype.delete = Tr, X.prototype.get = Er, X.prototype.has = Mr, X.prototype.set = Ar;
|
|
641
|
+
function tt(e) {
|
|
642
642
|
var a = -1, o = e == null ? 0 : e.length;
|
|
643
643
|
for (this.clear(); ++a < o; ) {
|
|
644
644
|
var u = e[a];
|
|
@@ -647,295 +647,295 @@ Je.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 K(),
|
|
651
|
+
map: new (Mt || X)(),
|
|
652
|
+
string: new K()
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
655
|
function xr(e) {
|
|
656
|
-
var a =
|
|
656
|
+
var a = lt(this, e).delete(e);
|
|
657
657
|
return this.size -= a ? 1 : 0, a;
|
|
658
658
|
}
|
|
659
659
|
function Dr(e) {
|
|
660
|
-
return
|
|
660
|
+
return lt(this, e).get(e);
|
|
661
661
|
}
|
|
662
662
|
function Pr(e) {
|
|
663
|
-
return
|
|
663
|
+
return lt(this, e).has(e);
|
|
664
664
|
}
|
|
665
665
|
function Cr(e, a) {
|
|
666
|
-
var o =
|
|
666
|
+
var o = lt(this, e), u = o.size;
|
|
667
667
|
return o.set(e, a), this.size += o.size == u ? 0 : 1, this;
|
|
668
668
|
}
|
|
669
|
-
|
|
670
|
-
function
|
|
669
|
+
tt.prototype.clear = Or, tt.prototype.delete = xr, tt.prototype.get = Dr, tt.prototype.has = Pr, tt.prototype.set = Cr;
|
|
670
|
+
function Gt(e) {
|
|
671
671
|
var a = -1, o = e == null ? 0 : e.length;
|
|
672
|
-
for (this.__data__ = new
|
|
672
|
+
for (this.__data__ = new tt(); ++a < o; )
|
|
673
673
|
this.add(e[a]);
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function Ue(e) {
|
|
676
676
|
return this.__data__.set(e, i), this;
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function Bt(e) {
|
|
679
679
|
return this.__data__.has(e);
|
|
680
680
|
}
|
|
681
|
-
|
|
682
|
-
function
|
|
683
|
-
var a = this.__data__ = new
|
|
681
|
+
Gt.prototype.add = Gt.prototype.push = Ue, Gt.prototype.has = Bt;
|
|
682
|
+
function pt(e) {
|
|
683
|
+
var a = this.__data__ = new X(e);
|
|
684
684
|
this.size = a.size;
|
|
685
685
|
}
|
|
686
|
-
function
|
|
687
|
-
this.__data__ = new
|
|
686
|
+
function de() {
|
|
687
|
+
this.__data__ = new X(), this.size = 0;
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function Rr(e) {
|
|
690
690
|
var a = this.__data__, o = a.delete(e);
|
|
691
691
|
return this.size = a.size, o;
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function Fr(e) {
|
|
694
694
|
return this.__data__.get(e);
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function jr(e) {
|
|
697
697
|
return this.__data__.has(e);
|
|
698
698
|
}
|
|
699
699
|
function zr(e, a) {
|
|
700
700
|
var o = this.__data__;
|
|
701
|
-
if (o instanceof
|
|
701
|
+
if (o instanceof X) {
|
|
702
702
|
var u = o.__data__;
|
|
703
|
-
if (!
|
|
703
|
+
if (!Mt || u.length < n - 1)
|
|
704
704
|
return u.push([e, a]), this.size = ++o.size, this;
|
|
705
|
-
o = this.__data__ = new
|
|
705
|
+
o = this.__data__ = new tt(u);
|
|
706
706
|
}
|
|
707
707
|
return o.set(e, a), this.size = o.size, this;
|
|
708
708
|
}
|
|
709
|
-
|
|
710
|
-
function
|
|
711
|
-
var o =
|
|
712
|
-
for (var
|
|
713
|
-
|
|
714
|
-
(
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
Kr(
|
|
718
|
-
return
|
|
719
|
-
}
|
|
720
|
-
function
|
|
709
|
+
pt.prototype.clear = de, pt.prototype.delete = Rr, pt.prototype.get = Fr, pt.prototype.has = jr, pt.prototype.set = zr;
|
|
710
|
+
function Hr(e, a) {
|
|
711
|
+
var o = Kt(e), u = !o && Ke(e), R = !o && !u && Yt(e), T = !o && !u && !R && Xe(e), z = o || u || R || T, j = z ? dr(e.length, String) : [], W = j.length;
|
|
712
|
+
for (var H in e)
|
|
713
|
+
at.call(e, H) && !(z && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
714
|
+
(H == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
715
|
+
R && (H == "offset" || H == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
716
|
+
T && (H == "buffer" || H == "byteLength" || H == "byteOffset") || // Skip index properties.
|
|
717
|
+
Kr(H, W))) && j.push(H);
|
|
718
|
+
return j;
|
|
719
|
+
}
|
|
720
|
+
function $t(e, a) {
|
|
721
721
|
for (var o = e.length; o--; )
|
|
722
|
-
if (
|
|
722
|
+
if ($e(e[o][0], a))
|
|
723
723
|
return o;
|
|
724
724
|
return -1;
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function pe(e, a, o) {
|
|
727
727
|
var u = a(e);
|
|
728
|
-
return
|
|
728
|
+
return Kt(e) ? u : re(u, o(e));
|
|
729
729
|
}
|
|
730
|
-
function
|
|
731
|
-
return e == null ? e === void 0 ?
|
|
730
|
+
function At(e) {
|
|
731
|
+
return e == null ? e === void 0 ? w : S : ut && ut in Object(e) ? gt(e) : Be(e);
|
|
732
732
|
}
|
|
733
|
-
function
|
|
734
|
-
return
|
|
733
|
+
function We(e) {
|
|
734
|
+
return mt(e) && At(e) == m;
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
return e === a ? !0 : e == null || a == null || !
|
|
736
|
+
function Ge(e, a, o, u, R) {
|
|
737
|
+
return e === a ? !0 : e == null || a == null || !mt(e) && !mt(a) ? e !== e && a !== a : Nr(e, a, o, u, Ge, R);
|
|
738
738
|
}
|
|
739
|
-
function
|
|
740
|
-
var
|
|
741
|
-
|
|
742
|
-
var
|
|
743
|
-
if (G &&
|
|
744
|
-
if (!
|
|
739
|
+
function Nr(e, a, o, u, R, T) {
|
|
740
|
+
var z = Kt(e), j = Kt(a), W = z ? P : ht(e), H = j ? P : ht(a);
|
|
741
|
+
W = W == m ? _ : W, H = H == m ? _ : H;
|
|
742
|
+
var q = W == _, et = H == _, G = W == H;
|
|
743
|
+
if (G && Yt(e)) {
|
|
744
|
+
if (!Yt(a))
|
|
745
745
|
return !1;
|
|
746
|
-
|
|
746
|
+
z = !0, q = !1;
|
|
747
747
|
}
|
|
748
|
-
if (G && !
|
|
749
|
-
return
|
|
748
|
+
if (G && !q)
|
|
749
|
+
return T || (T = new pt()), z || Xe(e) ? he(e, a, o, u, R, T) : Gr(e, a, W, o, u, R, T);
|
|
750
750
|
if (!(o & s)) {
|
|
751
|
-
var
|
|
752
|
-
if (
|
|
753
|
-
var
|
|
754
|
-
return
|
|
751
|
+
var J = q && at.call(e, "__wrapped__"), Y = et && at.call(a, "__wrapped__");
|
|
752
|
+
if (J || Y) {
|
|
753
|
+
var St = J ? e.value() : e, _t = Y ? a.value() : a;
|
|
754
|
+
return T || (T = new pt()), R(St, _t, o, u, T);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
return G ? (
|
|
757
|
+
return G ? (T || (T = new pt()), Br(e, a, o, u, R, T)) : !1;
|
|
758
758
|
}
|
|
759
|
-
function
|
|
760
|
-
if (!
|
|
759
|
+
function Lr(e) {
|
|
760
|
+
if (!Ve(e) || Vr(e))
|
|
761
761
|
return !1;
|
|
762
|
-
var a =
|
|
763
|
-
return a.test(
|
|
762
|
+
var a = Ye(e) ? mr : ot;
|
|
763
|
+
return a.test(Q(e));
|
|
764
764
|
}
|
|
765
|
-
function
|
|
766
|
-
return
|
|
765
|
+
function Ur(e) {
|
|
766
|
+
return mt(e) && ye(e.length) && !!U[At(e)];
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function Wr(e) {
|
|
769
769
|
if (!Xr(e))
|
|
770
|
-
return
|
|
770
|
+
return Et(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 he(e, a, o, u, R, T) {
|
|
777
|
+
var z = o & s, j = e.length, W = a.length;
|
|
778
|
+
if (j != W && !(z && W > j))
|
|
779
779
|
return !1;
|
|
780
|
-
var
|
|
781
|
-
if (
|
|
782
|
-
return
|
|
783
|
-
var
|
|
784
|
-
for (
|
|
785
|
-
var
|
|
780
|
+
var H = T.get(e);
|
|
781
|
+
if (H && T.get(a))
|
|
782
|
+
return H == a;
|
|
783
|
+
var q = -1, et = !0, G = o & c ? new Gt() : void 0;
|
|
784
|
+
for (T.set(e, a), T.set(a, e); ++q < j; ) {
|
|
785
|
+
var J = e[q], Y = a[q];
|
|
786
786
|
if (u)
|
|
787
|
-
var
|
|
788
|
-
if (
|
|
789
|
-
if (
|
|
787
|
+
var St = z ? u(Y, J, q, a, e, T) : u(J, Y, q, e, a, T);
|
|
788
|
+
if (St !== void 0) {
|
|
789
|
+
if (St)
|
|
790
790
|
continue;
|
|
791
|
-
|
|
791
|
+
et = !1;
|
|
792
792
|
break;
|
|
793
793
|
}
|
|
794
794
|
if (G) {
|
|
795
|
-
if (!
|
|
796
|
-
if (!
|
|
797
|
-
return G.push(
|
|
795
|
+
if (!Ce(a, function(_t, xt) {
|
|
796
|
+
if (!zt(G, xt) && (J === _t || R(J, _t, o, u, T)))
|
|
797
|
+
return G.push(xt);
|
|
798
798
|
})) {
|
|
799
|
-
|
|
799
|
+
et = !1;
|
|
800
800
|
break;
|
|
801
801
|
}
|
|
802
|
-
} else if (!(
|
|
803
|
-
|
|
802
|
+
} else if (!(J === Y || R(J, Y, o, u, T))) {
|
|
803
|
+
et = !1;
|
|
804
804
|
break;
|
|
805
805
|
}
|
|
806
806
|
}
|
|
807
|
-
return
|
|
807
|
+
return T.delete(e), T.delete(a), et;
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function Gr(e, a, o, u, R, T, z) {
|
|
810
810
|
switch (o) {
|
|
811
|
-
case
|
|
811
|
+
case v:
|
|
812
812
|
if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
|
|
813
813
|
return !1;
|
|
814
814
|
e = e.buffer, a = a.buffer;
|
|
815
815
|
case k:
|
|
816
|
-
return !(e.byteLength != a.byteLength || !
|
|
817
|
-
case
|
|
818
|
-
case
|
|
819
|
-
case m:
|
|
820
|
-
return Le(+e, +a);
|
|
816
|
+
return !(e.byteLength != a.byteLength || !T(new He(e), new He(a)));
|
|
817
|
+
case E:
|
|
818
|
+
case N:
|
|
821
819
|
case g:
|
|
820
|
+
return $e(+e, +a);
|
|
821
|
+
case b:
|
|
822
822
|
return e.name == a.name && e.message == a.message;
|
|
823
|
-
case
|
|
824
|
-
case
|
|
823
|
+
case x:
|
|
824
|
+
case I:
|
|
825
825
|
return e == a + "";
|
|
826
|
-
case
|
|
827
|
-
var
|
|
828
|
-
case
|
|
829
|
-
var
|
|
830
|
-
if (
|
|
826
|
+
case p:
|
|
827
|
+
var j = Re;
|
|
828
|
+
case M:
|
|
829
|
+
var W = u & s;
|
|
830
|
+
if (j || (j = dt), e.size != a.size && !W)
|
|
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 H = z.get(e);
|
|
833
|
+
if (H)
|
|
834
|
+
return H == a;
|
|
835
|
+
u |= c, z.set(e, a);
|
|
836
|
+
var q = he(j(e), j(a), u, R, T, z);
|
|
837
|
+
return z.delete(e), q;
|
|
838
|
+
case C:
|
|
839
|
+
if (fe)
|
|
840
|
+
return fe.call(e) == fe.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, R, T) {
|
|
845
|
+
var z = o & s, j = Ot(e), W = j.length, H = Ot(a), q = H.length;
|
|
846
|
+
if (W != q && !z)
|
|
847
847
|
return !1;
|
|
848
|
-
for (var
|
|
849
|
-
var G =
|
|
850
|
-
if (!(
|
|
848
|
+
for (var et = W; et--; ) {
|
|
849
|
+
var G = j[et];
|
|
850
|
+
if (!(z ? G in a : at.call(a, G)))
|
|
851
851
|
return !1;
|
|
852
852
|
}
|
|
853
|
-
var
|
|
854
|
-
if (
|
|
855
|
-
return
|
|
856
|
-
var
|
|
857
|
-
|
|
858
|
-
for (var
|
|
859
|
-
G =
|
|
860
|
-
var
|
|
853
|
+
var J = T.get(e);
|
|
854
|
+
if (J && T.get(a))
|
|
855
|
+
return J == a;
|
|
856
|
+
var Y = !0;
|
|
857
|
+
T.set(e, a), T.set(a, e);
|
|
858
|
+
for (var St = z; ++et < W; ) {
|
|
859
|
+
G = j[et];
|
|
860
|
+
var _t = e[G], xt = a[G];
|
|
861
861
|
if (u)
|
|
862
|
-
var
|
|
863
|
-
if (!(
|
|
864
|
-
|
|
862
|
+
var xn = z ? u(xt, _t, G, a, e, T) : u(_t, xt, G, e, a, T);
|
|
863
|
+
if (!(xn === void 0 ? _t === xt || R(_t, xt, o, u, T) : xn)) {
|
|
864
|
+
Y = !1;
|
|
865
865
|
break;
|
|
866
866
|
}
|
|
867
|
-
|
|
867
|
+
St || (St = G == "constructor");
|
|
868
868
|
}
|
|
869
|
-
if (
|
|
870
|
-
var
|
|
871
|
-
|
|
869
|
+
if (Y && !St) {
|
|
870
|
+
var qe = e.constructor, Je = a.constructor;
|
|
871
|
+
qe != Je && "constructor" in e && "constructor" in a && !(typeof qe == "function" && qe instanceof qe && typeof Je == "function" && Je instanceof Je) && (Y = !1);
|
|
872
872
|
}
|
|
873
|
-
return
|
|
873
|
+
return T.delete(e), T.delete(a), Y;
|
|
874
874
|
}
|
|
875
|
-
function
|
|
876
|
-
return
|
|
875
|
+
function Ot(e) {
|
|
876
|
+
return pe(e, be, $r);
|
|
877
877
|
}
|
|
878
|
-
function
|
|
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
|
-
function
|
|
883
|
-
var o =
|
|
884
|
-
return
|
|
882
|
+
function bt(e, a) {
|
|
883
|
+
var o = ne(e, a);
|
|
884
|
+
return Lr(o) ? o : void 0;
|
|
885
885
|
}
|
|
886
|
-
function
|
|
887
|
-
var a =
|
|
886
|
+
function gt(e) {
|
|
887
|
+
var a = at.call(e, ut), o = e[ut];
|
|
888
888
|
try {
|
|
889
|
-
e[
|
|
889
|
+
e[ut] = void 0;
|
|
890
890
|
var u = !0;
|
|
891
891
|
} catch {
|
|
892
892
|
}
|
|
893
|
-
var
|
|
894
|
-
return u && (a ? e[
|
|
893
|
+
var R = ze.call(e);
|
|
894
|
+
return u && (a ? e[ut] = o : delete e[ut]), R;
|
|
895
895
|
}
|
|
896
|
-
var $r =
|
|
897
|
-
return e == null ? [] : (e = Object(e),
|
|
898
|
-
return
|
|
896
|
+
var $r = Wt ? function(e) {
|
|
897
|
+
return e == null ? [] : (e = Object(e), Pe(Wt(e), function(a) {
|
|
898
|
+
return Ut.call(e, a);
|
|
899
899
|
}));
|
|
900
|
-
} : Jr,
|
|
901
|
-
(
|
|
902
|
-
var a =
|
|
900
|
+
} : Jr, ht = At;
|
|
901
|
+
(oe && ht(new oe(new ArrayBuffer(1))) != v || Mt && ht(new Mt()) != p || ce && ht(ce.resolve()) != y || ue && ht(new ue()) != M || le && ht(new le()) != D) && (ht = function(e) {
|
|
902
|
+
var a = At(e), o = a == _ ? e.constructor : void 0, u = o ? Q(o) : "";
|
|
903
903
|
if (u)
|
|
904
904
|
switch (u) {
|
|
905
|
-
case
|
|
906
|
-
return
|
|
907
|
-
case
|
|
908
|
-
return
|
|
909
|
-
case
|
|
910
|
-
return
|
|
905
|
+
case Ne:
|
|
906
|
+
return v;
|
|
907
|
+
case yt:
|
|
908
|
+
return p;
|
|
909
|
+
case yr:
|
|
910
|
+
return y;
|
|
911
911
|
case br:
|
|
912
|
-
return
|
|
912
|
+
return M;
|
|
913
913
|
case gr:
|
|
914
|
-
return
|
|
914
|
+
return D;
|
|
915
915
|
}
|
|
916
916
|
return a;
|
|
917
917
|
});
|
|
918
918
|
function Kr(e, a) {
|
|
919
|
-
return a = a ??
|
|
919
|
+
return a = a ?? h, !!a && (typeof e == "number" || Me.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 !!je && je 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 || kt;
|
|
930
930
|
return e === o;
|
|
931
931
|
}
|
|
932
|
-
function
|
|
933
|
-
return
|
|
932
|
+
function Be(e) {
|
|
933
|
+
return ze.call(e);
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function Q(e) {
|
|
936
936
|
if (e != null) {
|
|
937
937
|
try {
|
|
938
|
-
return
|
|
938
|
+
return ie.call(e);
|
|
939
939
|
} catch {
|
|
940
940
|
}
|
|
941
941
|
try {
|
|
@@ -945,40 +945,40 @@ Je.exports;
|
|
|
945
945
|
}
|
|
946
946
|
return "";
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function $e(e, a) {
|
|
949
949
|
return e === a || e !== e && a !== a;
|
|
950
950
|
}
|
|
951
|
-
var
|
|
951
|
+
var Ke = We(/* @__PURE__ */ function() {
|
|
952
952
|
return arguments;
|
|
953
|
-
}()) ?
|
|
954
|
-
return
|
|
955
|
-
},
|
|
956
|
-
function
|
|
957
|
-
return e != null &&
|
|
953
|
+
}()) ? We : function(e) {
|
|
954
|
+
return mt(e) && at.call(e, "callee") && !Ut.call(e, "callee");
|
|
955
|
+
}, Kt = Array.isArray;
|
|
956
|
+
function me(e) {
|
|
957
|
+
return e != null && ye(e.length) && !Ye(e);
|
|
958
958
|
}
|
|
959
|
-
var
|
|
959
|
+
var Yt = se || Zr;
|
|
960
960
|
function qr(e, a) {
|
|
961
|
-
return
|
|
961
|
+
return Ge(e, a);
|
|
962
962
|
}
|
|
963
|
-
function
|
|
964
|
-
if (!
|
|
963
|
+
function Ye(e) {
|
|
964
|
+
if (!Ve(e))
|
|
965
965
|
return !1;
|
|
966
|
-
var a =
|
|
967
|
-
return a ==
|
|
966
|
+
var a = At(e);
|
|
967
|
+
return a == d || a == f || a == F || a == l;
|
|
968
968
|
}
|
|
969
|
-
function
|
|
970
|
-
return typeof e == "number" && e > -1 && e % 1 == 0 && e <=
|
|
969
|
+
function ye(e) {
|
|
970
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= h;
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function Ve(e) {
|
|
973
973
|
var a = typeof e;
|
|
974
974
|
return e != null && (a == "object" || a == "function");
|
|
975
975
|
}
|
|
976
|
-
function
|
|
976
|
+
function mt(e) {
|
|
977
977
|
return e != null && typeof e == "object";
|
|
978
978
|
}
|
|
979
|
-
var
|
|
980
|
-
function
|
|
981
|
-
return
|
|
979
|
+
var Xe = ee ? pr(ee) : Ur;
|
|
980
|
+
function be(e) {
|
|
981
|
+
return me(e) ? Hr(e) : Wr(e);
|
|
982
982
|
}
|
|
983
983
|
function Jr() {
|
|
984
984
|
return [];
|
|
@@ -987,45 +987,45 @@ Je.exports;
|
|
|
987
987
|
return !1;
|
|
988
988
|
}
|
|
989
989
|
t.exports = qr;
|
|
990
|
-
})(
|
|
991
|
-
var
|
|
992
|
-
const
|
|
993
|
-
var
|
|
994
|
-
|
|
990
|
+
})(er, er.exports);
|
|
991
|
+
var Ji = er.exports;
|
|
992
|
+
const rt = /* @__PURE__ */ wn(Ji);
|
|
993
|
+
var rr = { exports: {} };
|
|
994
|
+
rr.exports;
|
|
995
995
|
(function(t, r) {
|
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]",
|
|
997
|
-
|
|
998
|
-
var ur = typeof
|
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", h = "[object Array]", m = "[object Boolean]", P = "[object Date]", F = "[object Error]", E = "[object Function]", N = "[object GeneratorFunction]", b = "[object Map]", d = "[object Number]", f = "[object Object]", p = "[object Promise]", g = "[object RegExp]", S = "[object Set]", _ = "[object String]", y = "[object Symbol]", l = "[object WeakMap]", x = "[object ArrayBuffer]", M = "[object DataView]", I = "[object Float32Array]", C = "[object Float64Array]", w = "[object Int8Array]", D = "[object Int16Array]", k = "[object Int32Array]", v = "[object Uint8Array]", A = "[object Uint8ClampedArray]", O = "[object Uint16Array]", Z = "[object Uint32Array]", V = /[\\^$.*+?()[\]{}|]/g, ft = /\w*$/, Jt = /^\[object .+?Constructor\]$/, Zt = /^(?:0|[1-9]\d*)$/, L = {};
|
|
997
|
+
L[c] = L[h] = L[x] = L[M] = L[m] = L[P] = L[I] = L[C] = L[w] = L[D] = L[k] = L[b] = L[d] = L[f] = L[g] = L[S] = L[_] = L[y] = L[v] = L[A] = L[O] = L[Z] = !0, L[F] = L[E] = L[l] = !1;
|
|
998
|
+
var ur = typeof st == "object" && st && st.Object === Object && st, lr = typeof self == "object" && self && self.Object === Object && self, ot = ur || lr || Function("return this")(), Me = r && !r.nodeType && r, U = Me && !0 && t && !t.nodeType && t, Ae = U && U.exports === Me;
|
|
999
999
|
function fr(e, a) {
|
|
1000
1000
|
return e.set(a[0], a[1]), e;
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function ct(e, a) {
|
|
1003
1003
|
return e.add(a), e;
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function Oe(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 xe(e, a) {
|
|
1011
|
+
for (var o = -1, u = a.length, R = e.length; ++o < u; )
|
|
1012
|
+
e[R + o] = a[o];
|
|
1013
1013
|
return e;
|
|
1014
1014
|
}
|
|
1015
|
-
function
|
|
1016
|
-
for (var
|
|
1017
|
-
o = a(o, e[
|
|
1015
|
+
function Qt(e, a, o, u) {
|
|
1016
|
+
for (var R = -1, T = e ? e.length : 0; ++R < T; )
|
|
1017
|
+
o = a(o, e[R], R, e);
|
|
1018
1018
|
return o;
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1020
|
+
function te(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 De(e, a) {
|
|
1026
1026
|
return e == null ? void 0 : e[a];
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function ee(e) {
|
|
1029
1029
|
var a = !1;
|
|
1030
1030
|
if (e != null && typeof e.toString != "function")
|
|
1031
1031
|
try {
|
|
@@ -1034,60 +1034,60 @@ Ze.exports;
|
|
|
1034
1034
|
}
|
|
1035
1035
|
return a;
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1037
|
+
function Pe(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, R) {
|
|
1040
|
+
o[++a] = [R, u];
|
|
1041
1041
|
}), o;
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1043
|
+
function re(e, a) {
|
|
1044
1044
|
return function(o) {
|
|
1045
1045
|
return e(a(o));
|
|
1046
1046
|
};
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function Ce(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
|
|
1055
|
-
var e = /[^.]+$/.exec(
|
|
1054
|
+
var dr = Array.prototype, pr = Function.prototype, zt = Object.prototype, ne = ot["__core-js_shared__"], Re = function() {
|
|
1055
|
+
var e = /[^.]+$/.exec(ne && ne.keys && ne.keys.IE_PROTO || "");
|
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
|
1057
|
-
}(),
|
|
1058
|
-
"^" +
|
|
1059
|
-
),
|
|
1060
|
-
function
|
|
1057
|
+
}(), Fe = pr.toString, dt = zt.hasOwnProperty, Ht = zt.toString, hr = RegExp(
|
|
1058
|
+
"^" + Fe.call(dt).replace(V, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1059
|
+
), kt = Ae ? ot.Buffer : void 0, Nt = ot.Symbol, ie = ot.Uint8Array, at = re(Object.getPrototypeOf, Object), je = Object.create, ze = zt.propertyIsEnumerable, mr = dr.splice, ae = Object.getOwnPropertySymbols, Lt = kt ? kt.isBuffer : void 0, He = re(Object.keys, Object), Ut = lt(ot, "DataView"), Tt = lt(ot, "Map"), ut = lt(ot, "Promise"), Wt = lt(ot, "Set"), se = lt(ot, "WeakMap"), Et = lt(Object, "create"), oe = Q(Ut), Mt = Q(Tt), ce = Q(ut), ue = Q(Wt), le = Q(se), vt = Nt ? Nt.prototype : void 0, Ne = vt ? vt.valueOf : void 0;
|
|
1060
|
+
function yt(e) {
|
|
1061
1061
|
var a = -1, o = e ? e.length : 0;
|
|
1062
1062
|
for (this.clear(); ++a < o; ) {
|
|
1063
1063
|
var u = e[a];
|
|
1064
1064
|
this.set(u[0], u[1]);
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1068
|
-
this.__data__ =
|
|
1067
|
+
function yr() {
|
|
1068
|
+
this.__data__ = Et ? Et(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 (Et) {
|
|
1076
1076
|
var o = a[e];
|
|
1077
1077
|
return o === i ? void 0 : o;
|
|
1078
1078
|
}
|
|
1079
|
-
return
|
|
1079
|
+
return dt.call(a, e) ? a[e] : void 0;
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function Le(e) {
|
|
1082
1082
|
var a = this.__data__;
|
|
1083
|
-
return
|
|
1083
|
+
return Et ? a[e] !== void 0 : dt.call(a, e);
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1085
|
+
function fe(e, a) {
|
|
1086
1086
|
var o = this.__data__;
|
|
1087
|
-
return o[e] =
|
|
1087
|
+
return o[e] = Et && a === void 0 ? i : a, this;
|
|
1088
1088
|
}
|
|
1089
|
-
|
|
1090
|
-
function
|
|
1089
|
+
yt.prototype.clear = yr, yt.prototype.delete = br, yt.prototype.get = gr, yt.prototype.has = Le, yt.prototype.set = fe;
|
|
1090
|
+
function K(e) {
|
|
1091
1091
|
var a = -1, o = e ? e.length : 0;
|
|
1092
1092
|
for (this.clear(); ++a < o; ) {
|
|
1093
1093
|
var u = e[a];
|
|
@@ -1097,26 +1097,26 @@ Ze.exports;
|
|
|
1097
1097
|
function _r() {
|
|
1098
1098
|
this.__data__ = [];
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1101
|
-
var a = this.__data__, o =
|
|
1100
|
+
function Ir(e) {
|
|
1101
|
+
var a = this.__data__, o = Bt(a, e);
|
|
1102
1102
|
if (o < 0)
|
|
1103
1103
|
return !1;
|
|
1104
1104
|
var u = a.length - 1;
|
|
1105
|
-
return o == u ? a.pop() :
|
|
1105
|
+
return o == u ? a.pop() : mr.call(a, o, 1), !0;
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1108
|
-
var a = this.__data__, o =
|
|
1107
|
+
function vr(e) {
|
|
1108
|
+
var a = this.__data__, o = Bt(a, e);
|
|
1109
1109
|
return o < 0 ? void 0 : a[o][1];
|
|
1110
1110
|
}
|
|
1111
1111
|
function Sr(e) {
|
|
1112
|
-
return
|
|
1112
|
+
return Bt(this.__data__, e) > -1;
|
|
1113
1113
|
}
|
|
1114
1114
|
function wr(e, a) {
|
|
1115
|
-
var o = this.__data__, u =
|
|
1115
|
+
var o = this.__data__, u = Bt(o, e);
|
|
1116
1116
|
return u < 0 ? o.push([e, a]) : o[u][1] = a, this;
|
|
1117
1117
|
}
|
|
1118
|
-
|
|
1119
|
-
function
|
|
1118
|
+
K.prototype.clear = _r, K.prototype.delete = Ir, K.prototype.get = vr, K.prototype.has = Sr, K.prototype.set = wr;
|
|
1119
|
+
function X(e) {
|
|
1120
1120
|
var a = -1, o = e ? e.length : 0;
|
|
1121
1121
|
for (this.clear(); ++a < o; ) {
|
|
1122
1122
|
var u = e[a];
|
|
@@ -1125,29 +1125,29 @@ Ze.exports;
|
|
|
1125
1125
|
}
|
|
1126
1126
|
function kr() {
|
|
1127
1127
|
this.__data__ = {
|
|
1128
|
-
hash: new
|
|
1129
|
-
map: new (
|
|
1130
|
-
string: new
|
|
1128
|
+
hash: new yt(),
|
|
1129
|
+
map: new (Tt || K)(),
|
|
1130
|
+
string: new yt()
|
|
1131
1131
|
};
|
|
1132
1132
|
}
|
|
1133
1133
|
function Tr(e) {
|
|
1134
|
-
return
|
|
1134
|
+
return Ot(this, e).delete(e);
|
|
1135
1135
|
}
|
|
1136
1136
|
function Er(e) {
|
|
1137
|
-
return
|
|
1137
|
+
return Ot(this, e).get(e);
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1140
|
-
return
|
|
1139
|
+
function Mr(e) {
|
|
1140
|
+
return Ot(this, e).has(e);
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1143
|
-
return
|
|
1142
|
+
function Ar(e, a) {
|
|
1143
|
+
return Ot(this, e).set(e, a), this;
|
|
1144
1144
|
}
|
|
1145
|
-
|
|
1146
|
-
function
|
|
1147
|
-
this.__data__ = new
|
|
1145
|
+
X.prototype.clear = kr, X.prototype.delete = Tr, X.prototype.get = Er, X.prototype.has = Mr, X.prototype.set = Ar;
|
|
1146
|
+
function tt(e) {
|
|
1147
|
+
this.__data__ = new K(e);
|
|
1148
1148
|
}
|
|
1149
1149
|
function Or() {
|
|
1150
|
-
this.__data__ = new
|
|
1150
|
+
this.__data__ = new K();
|
|
1151
1151
|
}
|
|
1152
1152
|
function xr(e) {
|
|
1153
1153
|
return this.__data__.delete(e);
|
|
@@ -1160,230 +1160,230 @@ Ze.exports;
|
|
|
1160
1160
|
}
|
|
1161
1161
|
function Cr(e, a) {
|
|
1162
1162
|
var o = this.__data__;
|
|
1163
|
-
if (o instanceof
|
|
1163
|
+
if (o instanceof K) {
|
|
1164
1164
|
var u = o.__data__;
|
|
1165
|
-
if (!
|
|
1165
|
+
if (!Tt || u.length < n - 1)
|
|
1166
1166
|
return u.push([e, a]), this;
|
|
1167
|
-
o = this.__data__ = new
|
|
1167
|
+
o = this.__data__ = new X(u);
|
|
1168
1168
|
}
|
|
1169
1169
|
return o.set(e, a), this;
|
|
1170
1170
|
}
|
|
1171
|
-
|
|
1172
|
-
function
|
|
1173
|
-
var o =
|
|
1174
|
-
for (var
|
|
1175
|
-
|
|
1171
|
+
tt.prototype.clear = Or, tt.prototype.delete = xr, tt.prototype.get = Dr, tt.prototype.has = Pr, tt.prototype.set = Cr;
|
|
1172
|
+
function Gt(e, a) {
|
|
1173
|
+
var o = me(e) || Kt(e) ? te(e.length, String) : [], u = o.length, R = !!u;
|
|
1174
|
+
for (var T in e)
|
|
1175
|
+
dt.call(e, T) && !(R && (T == "length" || Yr(T, u))) && o.push(T);
|
|
1176
1176
|
return o;
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1178
|
+
function Ue(e, a, o) {
|
|
1179
1179
|
var u = e[a];
|
|
1180
|
-
(!(
|
|
1180
|
+
(!(dt.call(e, a) && Ke(u, o)) || o === void 0 && !(a in e)) && (e[a] = o);
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1182
|
+
function Bt(e, a) {
|
|
1183
1183
|
for (var o = e.length; o--; )
|
|
1184
|
-
if (
|
|
1184
|
+
if (Ke(e[o][0], a))
|
|
1185
1185
|
return o;
|
|
1186
1186
|
return -1;
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1189
|
-
return e &&
|
|
1188
|
+
function pt(e, a) {
|
|
1189
|
+
return e && he(a, be(a), e);
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1192
|
-
var
|
|
1193
|
-
if (u && (
|
|
1194
|
-
return
|
|
1195
|
-
if (!
|
|
1191
|
+
function de(e, a, o, u, R, T, z) {
|
|
1192
|
+
var j;
|
|
1193
|
+
if (u && (j = T ? u(e, R, T, z) : u(e)), j !== void 0)
|
|
1194
|
+
return j;
|
|
1195
|
+
if (!mt(e))
|
|
1196
1196
|
return e;
|
|
1197
|
-
var
|
|
1198
|
-
if (
|
|
1199
|
-
if (
|
|
1200
|
-
return
|
|
1197
|
+
var W = me(e);
|
|
1198
|
+
if (W) {
|
|
1199
|
+
if (j = $r(e), !a)
|
|
1200
|
+
return Wr(e, j);
|
|
1201
1201
|
} else {
|
|
1202
|
-
var
|
|
1203
|
-
if (
|
|
1204
|
-
return
|
|
1205
|
-
if (
|
|
1206
|
-
if (
|
|
1207
|
-
return
|
|
1208
|
-
if (
|
|
1209
|
-
return
|
|
1202
|
+
var H = gt(e), q = H == E || H == N;
|
|
1203
|
+
if (Ye(e))
|
|
1204
|
+
return $t(e, a);
|
|
1205
|
+
if (H == f || H == c || q && !T) {
|
|
1206
|
+
if (ee(e))
|
|
1207
|
+
return T ? e : {};
|
|
1208
|
+
if (j = ht(q ? {} : e), !a)
|
|
1209
|
+
return Gr(e, pt(j, e));
|
|
1210
1210
|
} else {
|
|
1211
|
-
if (!
|
|
1212
|
-
return
|
|
1213
|
-
|
|
1211
|
+
if (!L[H])
|
|
1212
|
+
return T ? e : {};
|
|
1213
|
+
j = Kr(e, H, de, a);
|
|
1214
1214
|
}
|
|
1215
1215
|
}
|
|
1216
|
-
|
|
1217
|
-
var
|
|
1218
|
-
if (
|
|
1219
|
-
return
|
|
1220
|
-
if (
|
|
1221
|
-
var G = o ? Br(e) :
|
|
1222
|
-
return
|
|
1223
|
-
G && (
|
|
1224
|
-
}),
|
|
1216
|
+
z || (z = new tt());
|
|
1217
|
+
var et = z.get(e);
|
|
1218
|
+
if (et)
|
|
1219
|
+
return et;
|
|
1220
|
+
if (z.set(e, j), !W)
|
|
1221
|
+
var G = o ? Br(e) : be(e);
|
|
1222
|
+
return Oe(G || e, function(J, Y) {
|
|
1223
|
+
G && (Y = J, J = e[Y]), Ue(j, Y, de(J, a, o, u, Y, e, z));
|
|
1224
|
+
}), j;
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1227
|
-
return
|
|
1226
|
+
function Rr(e) {
|
|
1227
|
+
return mt(e) ? je(e) : {};
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1229
|
+
function Fr(e, a, o) {
|
|
1230
1230
|
var u = a(e);
|
|
1231
|
-
return
|
|
1231
|
+
return me(e) ? u : xe(u, o(e));
|
|
1232
1232
|
}
|
|
1233
|
-
function
|
|
1234
|
-
return
|
|
1233
|
+
function jr(e) {
|
|
1234
|
+
return Ht.call(e);
|
|
1235
1235
|
}
|
|
1236
1236
|
function zr(e) {
|
|
1237
|
-
if (!
|
|
1237
|
+
if (!mt(e) || Xr(e))
|
|
1238
1238
|
return !1;
|
|
1239
|
-
var a =
|
|
1240
|
-
return a.test(
|
|
1239
|
+
var a = ye(e) || ee(e) ? hr : Jt;
|
|
1240
|
+
return a.test(Q(e));
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1243
|
-
if (!
|
|
1244
|
-
return
|
|
1242
|
+
function Hr(e) {
|
|
1243
|
+
if (!Be(e))
|
|
1244
|
+
return He(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 $t(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 pe(e) {
|
|
1257
1257
|
var a = new e.constructor(e.byteLength);
|
|
1258
|
-
return new
|
|
1258
|
+
return new ie(a).set(new ie(e)), a;
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1261
|
-
var o = a ?
|
|
1260
|
+
function At(e, a) {
|
|
1261
|
+
var o = a ? pe(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 We(e, a, o) {
|
|
1265
|
+
var u = a ? o(Pe(e), !0) : Pe(e);
|
|
1266
|
+
return Qt(u, fr, new e.constructor());
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1269
|
-
var a = new e.constructor(e.source,
|
|
1268
|
+
function Ge(e) {
|
|
1269
|
+
var a = new e.constructor(e.source, ft.exec(e));
|
|
1270
1270
|
return a.lastIndex = e.lastIndex, a;
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1273
|
-
var u = a ? o(
|
|
1274
|
-
return
|
|
1272
|
+
function Nr(e, a, o) {
|
|
1273
|
+
var u = a ? o(Ce(e), !0) : Ce(e);
|
|
1274
|
+
return Qt(u, ct, new e.constructor());
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1277
|
-
return
|
|
1276
|
+
function Lr(e) {
|
|
1277
|
+
return Ne ? Object(Ne.call(e)) : {};
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1280
|
-
var o = a ?
|
|
1279
|
+
function Ur(e, a) {
|
|
1280
|
+
var o = a ? pe(e.buffer) : e.buffer;
|
|
1281
1281
|
return new e.constructor(o, e.byteOffset, e.length);
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1283
|
+
function Wr(e, a) {
|
|
1284
1284
|
var o = -1, u = e.length;
|
|
1285
1285
|
for (a || (a = Array(u)); ++o < u; )
|
|
1286
1286
|
a[o] = e[o];
|
|
1287
1287
|
return a;
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1289
|
+
function he(e, a, o, u) {
|
|
1290
1290
|
o || (o = {});
|
|
1291
|
-
for (var
|
|
1292
|
-
var
|
|
1293
|
-
|
|
1291
|
+
for (var R = -1, T = a.length; ++R < T; ) {
|
|
1292
|
+
var z = a[R], j = void 0;
|
|
1293
|
+
Ue(o, z, j === void 0 ? e[z] : j);
|
|
1294
1294
|
}
|
|
1295
1295
|
return o;
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1298
|
-
return
|
|
1297
|
+
function Gr(e, a) {
|
|
1298
|
+
return he(e, bt(e), a);
|
|
1299
1299
|
}
|
|
1300
1300
|
function Br(e) {
|
|
1301
|
-
return
|
|
1301
|
+
return Fr(e, be, bt);
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1303
|
+
function Ot(e, a) {
|
|
1304
1304
|
var o = e.__data__;
|
|
1305
1305
|
return Vr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1308
|
-
var o =
|
|
1307
|
+
function lt(e, a) {
|
|
1308
|
+
var o = De(e, a);
|
|
1309
1309
|
return zr(o) ? o : void 0;
|
|
1310
1310
|
}
|
|
1311
|
-
var
|
|
1312
|
-
(
|
|
1313
|
-
var a =
|
|
1311
|
+
var bt = ae ? re(ae, Object) : Jr, gt = jr;
|
|
1312
|
+
(Ut && gt(new Ut(new ArrayBuffer(1))) != M || Tt && gt(new Tt()) != b || ut && gt(ut.resolve()) != p || Wt && gt(new Wt()) != S || se && gt(new se()) != l) && (gt = function(e) {
|
|
1313
|
+
var a = Ht.call(e), o = a == f ? e.constructor : void 0, u = o ? Q(o) : void 0;
|
|
1314
1314
|
if (u)
|
|
1315
1315
|
switch (u) {
|
|
1316
|
-
case
|
|
1317
|
-
return
|
|
1318
|
-
case
|
|
1319
|
-
return
|
|
1320
|
-
case
|
|
1321
|
-
return
|
|
1322
|
-
case
|
|
1316
|
+
case oe:
|
|
1317
|
+
return M;
|
|
1318
|
+
case Mt:
|
|
1319
|
+
return b;
|
|
1320
|
+
case ce:
|
|
1321
|
+
return p;
|
|
1322
|
+
case ue:
|
|
1323
1323
|
return S;
|
|
1324
|
-
case
|
|
1325
|
-
return
|
|
1324
|
+
case le:
|
|
1325
|
+
return l;
|
|
1326
1326
|
}
|
|
1327
1327
|
return a;
|
|
1328
1328
|
});
|
|
1329
1329
|
function $r(e) {
|
|
1330
1330
|
var a = e.length, o = e.constructor(a);
|
|
1331
|
-
return a && typeof e[0] == "string" &&
|
|
1331
|
+
return a && typeof e[0] == "string" && dt.call(e, "index") && (o.index = e.index, o.input = e.input), o;
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1334
|
-
return typeof e.constructor == "function" && !
|
|
1333
|
+
function ht(e) {
|
|
1334
|
+
return typeof e.constructor == "function" && !Be(e) ? Rr(at(e)) : {};
|
|
1335
1335
|
}
|
|
1336
1336
|
function Kr(e, a, o, u) {
|
|
1337
|
-
var
|
|
1337
|
+
var R = e.constructor;
|
|
1338
1338
|
switch (a) {
|
|
1339
|
-
case O:
|
|
1340
|
-
return ce(e);
|
|
1341
|
-
case h:
|
|
1342
1339
|
case x:
|
|
1343
|
-
return
|
|
1344
|
-
case
|
|
1345
|
-
return Tt(e, u);
|
|
1346
|
-
case _:
|
|
1347
|
-
case D:
|
|
1348
|
-
case I:
|
|
1340
|
+
return pe(e);
|
|
1341
|
+
case m:
|
|
1349
1342
|
case P:
|
|
1343
|
+
return new R(+e);
|
|
1344
|
+
case M:
|
|
1345
|
+
return At(e, u);
|
|
1346
|
+
case I:
|
|
1347
|
+
case C:
|
|
1348
|
+
case w:
|
|
1349
|
+
case D:
|
|
1350
1350
|
case k:
|
|
1351
|
+
case v:
|
|
1351
1352
|
case A:
|
|
1352
|
-
case
|
|
1353
|
-
case
|
|
1354
|
-
|
|
1355
|
-
|
|
1353
|
+
case O:
|
|
1354
|
+
case Z:
|
|
1355
|
+
return Ur(e, u);
|
|
1356
|
+
case b:
|
|
1357
|
+
return We(e, u, o);
|
|
1358
|
+
case d:
|
|
1359
|
+
case _:
|
|
1360
|
+
return new R(e);
|
|
1356
1361
|
case g:
|
|
1357
|
-
return
|
|
1358
|
-
case p:
|
|
1359
|
-
case v:
|
|
1360
|
-
return new M(e);
|
|
1361
|
-
case m:
|
|
1362
|
-
return He(e);
|
|
1362
|
+
return Ge(e);
|
|
1363
1363
|
case S:
|
|
1364
|
-
return
|
|
1365
|
-
case
|
|
1366
|
-
return
|
|
1364
|
+
return Nr(e, u, o);
|
|
1365
|
+
case y:
|
|
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" || Zt.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 !!Re && Re in e;
|
|
1378
1378
|
}
|
|
1379
|
-
function
|
|
1380
|
-
var a = e && e.constructor, o = typeof a == "function" && a.prototype ||
|
|
1379
|
+
function Be(e) {
|
|
1380
|
+
var a = e && e.constructor, o = typeof a == "function" && a.prototype || zt;
|
|
1381
1381
|
return e === o;
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function Q(e) {
|
|
1384
1384
|
if (e != null) {
|
|
1385
1385
|
try {
|
|
1386
|
-
return
|
|
1386
|
+
return Fe.call(e);
|
|
1387
1387
|
} catch {
|
|
1388
1388
|
}
|
|
1389
1389
|
try {
|
|
@@ -1393,39 +1393,39 @@ Ze.exports;
|
|
|
1393
1393
|
}
|
|
1394
1394
|
return "";
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1397
|
-
return
|
|
1396
|
+
function $e(e) {
|
|
1397
|
+
return de(e, !0, !0);
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1399
|
+
function Ke(e, a) {
|
|
1400
1400
|
return e === a || e !== e && a !== a;
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1403
|
-
return qr(e) &&
|
|
1402
|
+
function Kt(e) {
|
|
1403
|
+
return qr(e) && dt.call(e, "callee") && (!ze.call(e, "callee") || Ht.call(e) == c);
|
|
1404
1404
|
}
|
|
1405
|
-
var
|
|
1406
|
-
function
|
|
1407
|
-
return e != null &&
|
|
1405
|
+
var me = Array.isArray;
|
|
1406
|
+
function Yt(e) {
|
|
1407
|
+
return e != null && Ve(e.length) && !ye(e);
|
|
1408
1408
|
}
|
|
1409
1409
|
function qr(e) {
|
|
1410
|
-
return
|
|
1410
|
+
return Xe(e) && Yt(e);
|
|
1411
1411
|
}
|
|
1412
|
-
var
|
|
1413
|
-
function
|
|
1414
|
-
var a =
|
|
1415
|
-
return a ==
|
|
1412
|
+
var Ye = Lt || Zr;
|
|
1413
|
+
function ye(e) {
|
|
1414
|
+
var a = mt(e) ? Ht.call(e) : "";
|
|
1415
|
+
return a == E || a == N;
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1417
|
+
function Ve(e) {
|
|
1418
1418
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= s;
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function mt(e) {
|
|
1421
1421
|
var a = typeof e;
|
|
1422
1422
|
return !!e && (a == "object" || a == "function");
|
|
1423
1423
|
}
|
|
1424
|
-
function
|
|
1424
|
+
function Xe(e) {
|
|
1425
1425
|
return !!e && typeof e == "object";
|
|
1426
1426
|
}
|
|
1427
|
-
function
|
|
1428
|
-
return
|
|
1427
|
+
function be(e) {
|
|
1428
|
+
return Yt(e) ? Gt(e) : Hr(e);
|
|
1429
1429
|
}
|
|
1430
1430
|
function Jr() {
|
|
1431
1431
|
return [];
|
|
@@ -1433,10 +1433,10 @@ Ze.exports;
|
|
|
1433
1433
|
function Zr() {
|
|
1434
1434
|
return !1;
|
|
1435
1435
|
}
|
|
1436
|
-
t.exports =
|
|
1437
|
-
})(
|
|
1438
|
-
var
|
|
1439
|
-
const
|
|
1436
|
+
t.exports = $e;
|
|
1437
|
+
})(rr, rr.exports);
|
|
1438
|
+
var Zi = rr.exports;
|
|
1439
|
+
const B = /* @__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;
|
|
@@ -1444,7 +1444,7 @@ const X = /* @__PURE__ */ gn(Ki), Yi = (t) => new Promise((r, n) => {
|
|
|
1444
1444
|
}, i.onerror = (s) => {
|
|
1445
1445
|
n(s);
|
|
1446
1446
|
}, i.crossOrigin = "anonymous", i.src = t;
|
|
1447
|
-
}),
|
|
1447
|
+
}), Qi = (t) => new Promise((r, n) => {
|
|
1448
1448
|
const i = new Audio();
|
|
1449
1449
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
|
1450
1450
|
const s = i.duration * 1e3;
|
|
@@ -1452,22 +1452,22 @@ const X = /* @__PURE__ */ gn(Ki), Yi = (t) => new Promise((r, n) => {
|
|
|
1452
1452
|
}), i.addEventListener("error", (s) => {
|
|
1453
1453
|
n(s);
|
|
1454
1454
|
}), i.src = t, i.crossOrigin = "anonymous", i.load();
|
|
1455
|
-
}),
|
|
1455
|
+
}), ei = (t) => new Promise((r, n) => {
|
|
1456
1456
|
const i = document.createElement("video");
|
|
1457
1457
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
|
1458
|
-
const s = i.duration * 1e3, c = i.videoWidth,
|
|
1459
|
-
r({ duration: s, width: c, height:
|
|
1458
|
+
const s = i.duration * 1e3, c = i.videoWidth, h = i.videoHeight;
|
|
1459
|
+
r({ duration: s, width: c, height: h });
|
|
1460
1460
|
}), i.addEventListener("error", (s) => {
|
|
1461
1461
|
n(s);
|
|
1462
1462
|
}), i.src = t, i.load();
|
|
1463
|
-
}),
|
|
1463
|
+
}), ri = (t, r) => {
|
|
1464
1464
|
const n = document.createElement("div");
|
|
1465
1465
|
Object.keys(r).forEach((s) => {
|
|
1466
1466
|
s !== "height" && (n.style[s] = r[s]);
|
|
1467
1467
|
}), document.body.appendChild(n), n.textContent = t, n.style.whiteSpace = "normal", n.style.position = "absolute", n.style.visibility = "hidden", n.style.display = "inline-block", n.style.width = r.width + "px", n.style.fontSize = r.fontSize + "px";
|
|
1468
1468
|
const i = getComputedStyle(n).height;
|
|
1469
1469
|
return document.body.removeChild(n), parseFloat(i);
|
|
1470
|
-
},
|
|
1470
|
+
}, kn = (t) => {
|
|
1471
1471
|
const r = t.map((n) => new FontFace(n.fontFamily, `url(${n.url})`).load().catch((i) => i));
|
|
1472
1472
|
return r.length === 0 ? Promise.resolve(!0) : new Promise((n, i) => {
|
|
1473
1473
|
Promise.all(r).then((s) => {
|
|
@@ -1476,12 +1476,12 @@ const X = /* @__PURE__ */ gn(Ki), Yi = (t) => new Promise((r, n) => {
|
|
|
1476
1476
|
});
|
|
1477
1477
|
}).catch((s) => i(s));
|
|
1478
1478
|
});
|
|
1479
|
-
},
|
|
1479
|
+
}, sr = {
|
|
1480
1480
|
color: "#000000",
|
|
1481
1481
|
x: 0,
|
|
1482
1482
|
y: 0,
|
|
1483
1483
|
blur: 0
|
|
1484
|
-
},
|
|
1484
|
+
}, ke = (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,
|
|
@@ -1509,14 +1509,14 @@ const X = /* @__PURE__ */ gn(Ki), Yi = (t) => new Promise((r, n) => {
|
|
|
1509
1509
|
), i;
|
|
1510
1510
|
}
|
|
1511
1511
|
return t;
|
|
1512
|
-
},
|
|
1512
|
+
}, ni = (t, r) => t ? t.from && !t.to ? {
|
|
1513
1513
|
from: t.from,
|
|
1514
1514
|
to: r.duration
|
|
1515
1515
|
} : t : {
|
|
1516
1516
|
from: 0,
|
|
1517
1517
|
to: r.duration
|
|
1518
1518
|
};
|
|
1519
|
-
function
|
|
1519
|
+
function or(t, r) {
|
|
1520
1520
|
const n = {
|
|
1521
1521
|
x: t.size.width / 2,
|
|
1522
1522
|
y: t.size.height / 2
|
|
@@ -1530,10 +1530,10 @@ function nr(t, r) {
|
|
|
1530
1530
|
transform: `scale(${s})`
|
|
1531
1531
|
};
|
|
1532
1532
|
}
|
|
1533
|
-
const
|
|
1534
|
-
const n = t.details.src, i = await
|
|
1533
|
+
const dn = async (t, r) => {
|
|
1534
|
+
const n = t.details.src, i = await ei(n), s = or(r, {
|
|
1535
1535
|
...i
|
|
1536
|
-
}), c =
|
|
1536
|
+
}), c = ni(t.trim, { duration: i.duration }), h = {
|
|
1537
1537
|
width: i.width,
|
|
1538
1538
|
height: i.height,
|
|
1539
1539
|
opacity: 100,
|
|
@@ -1546,7 +1546,7 @@ const Pn = 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 || sr,
|
|
1550
1550
|
top: t.details.top || s.top || "0px",
|
|
1551
1551
|
// Default top
|
|
1552
1552
|
left: t.details.left || s.left || "0px",
|
|
@@ -1557,28 +1557,31 @@ const Pn = async (t, r) => {
|
|
|
1557
1557
|
brightness: t.details.brightness || 100,
|
|
1558
1558
|
flipX: t.details.flipX || !1,
|
|
1559
1559
|
flipY: t.details.flipY || !1,
|
|
1560
|
-
rotate: t.details.rotate || "0deg"
|
|
1560
|
+
rotate: t.details.rotate || "0deg",
|
|
1561
|
+
visibility: t.details.visibility || "visible",
|
|
1562
|
+
mediaWidth: t.details.mediaWidth || i.width || 100,
|
|
1563
|
+
mediaHeight: t.details.mediaHeight || i.height || 100
|
|
1561
1564
|
};
|
|
1562
1565
|
return {
|
|
1563
1566
|
...t,
|
|
1564
1567
|
trim: c,
|
|
1565
1568
|
type: "video",
|
|
1566
1569
|
name: "video",
|
|
1567
|
-
details:
|
|
1570
|
+
details: h,
|
|
1568
1571
|
playbackRate: t.playbackRate || 1,
|
|
1569
|
-
display:
|
|
1572
|
+
display: ke(t.display, { duration: i.duration, trim: c }),
|
|
1570
1573
|
duration: i.duration
|
|
1571
1574
|
};
|
|
1572
|
-
},
|
|
1575
|
+
}, pn = async (t) => {
|
|
1573
1576
|
console.log({ payload: t });
|
|
1574
|
-
const r = t.id, n = t.details, i = await
|
|
1577
|
+
const r = t.id, n = t.details, i = await Qi(n.src);
|
|
1575
1578
|
console.log({ audioData: i });
|
|
1576
|
-
const s = i.duration, c =
|
|
1579
|
+
const s = i.duration, c = ni(t.trim, { duration: s });
|
|
1577
1580
|
return {
|
|
1578
1581
|
id: r,
|
|
1579
1582
|
name: "",
|
|
1580
1583
|
type: "audio",
|
|
1581
|
-
display:
|
|
1584
|
+
display: ke(t.display, { duration: s, trim: c }),
|
|
1582
1585
|
trim: c,
|
|
1583
1586
|
playbackRate: t.playbackRate || 1,
|
|
1584
1587
|
details: {
|
|
@@ -1589,14 +1592,61 @@ const Pn = async (t, r) => {
|
|
|
1589
1592
|
metadata: { ...t.metadata },
|
|
1590
1593
|
duration: s
|
|
1591
1594
|
};
|
|
1592
|
-
},
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
+
}, ta = async (t, r) => {
|
|
1596
|
+
const n = t.trackItemsIds, i = t.size, s = Math.min(
|
|
1597
|
+
r.size.width / i.width,
|
|
1598
|
+
r.size.height / i.height
|
|
1599
|
+
), c = t.rotate || 0, h = t.position, m = t.display, P = t.trim || t.display;
|
|
1600
|
+
let F = 1 / 0, E = 0;
|
|
1601
|
+
const N = n.map((d) => {
|
|
1602
|
+
const f = t.trackItemsMap[d], p = t.trackItemsDetails[d];
|
|
1603
|
+
if (f.display.from < F && (F = f.display.from), f.display.to > E && (E = f.display.to), f.type === "text")
|
|
1604
|
+
return yn(
|
|
1605
|
+
{ ...f, details: p.details },
|
|
1606
|
+
{ size: i }
|
|
1607
|
+
);
|
|
1608
|
+
if (f.type === "image")
|
|
1609
|
+
return hn(
|
|
1610
|
+
{ ...f, details: p.details },
|
|
1611
|
+
{ size: i }
|
|
1612
|
+
);
|
|
1613
|
+
if (f.type === "video")
|
|
1614
|
+
return dn(
|
|
1615
|
+
{ ...f, details: p.details },
|
|
1616
|
+
{ size: i }
|
|
1617
|
+
);
|
|
1618
|
+
if (f.type === "audio")
|
|
1619
|
+
return pn({
|
|
1620
|
+
...f,
|
|
1621
|
+
details: p.details
|
|
1622
|
+
});
|
|
1623
|
+
if (f.type === "caption")
|
|
1624
|
+
return mn(
|
|
1625
|
+
{ ...f, details: p.details },
|
|
1626
|
+
{ size: i }
|
|
1627
|
+
);
|
|
1628
|
+
}), b = await Promise.all(N);
|
|
1629
|
+
return {
|
|
1630
|
+
id: t.id,
|
|
1631
|
+
details: b,
|
|
1632
|
+
size: i,
|
|
1633
|
+
position: {
|
|
1634
|
+
top: h.top || 0,
|
|
1635
|
+
left: h.left || 0
|
|
1636
|
+
},
|
|
1637
|
+
trim: P,
|
|
1638
|
+
scale: s,
|
|
1639
|
+
display: m || { from: F, to: E },
|
|
1640
|
+
rotate: c,
|
|
1641
|
+
activeEdit: !1
|
|
1642
|
+
};
|
|
1643
|
+
}, hn = async (t, r) => {
|
|
1644
|
+
const n = t.details, i = await ti(n.src), s = or(r, i);
|
|
1595
1645
|
return {
|
|
1596
1646
|
id: t.id,
|
|
1597
1647
|
type: "image",
|
|
1598
1648
|
name: "image",
|
|
1599
|
-
display:
|
|
1649
|
+
display: ke(t.display),
|
|
1600
1650
|
playbackRate: t.playbackRate || 1,
|
|
1601
1651
|
details: {
|
|
1602
1652
|
src: n.src || "",
|
|
@@ -1613,7 +1663,7 @@ const Pn = async (t, r) => {
|
|
|
1613
1663
|
// Default border
|
|
1614
1664
|
borderRadius: n.borderRadius || 0,
|
|
1615
1665
|
// Default border radius
|
|
1616
|
-
boxShadow: n.boxShadow ||
|
|
1666
|
+
boxShadow: n.boxShadow || sr,
|
|
1617
1667
|
// Default box shadow
|
|
1618
1668
|
top: n.top || s.top || "0px",
|
|
1619
1669
|
// Default top
|
|
@@ -1627,51 +1677,54 @@ const Pn = async (t, r) => {
|
|
|
1627
1677
|
brightness: n.brightness || 100,
|
|
1628
1678
|
flipX: n.flipX || !1,
|
|
1629
1679
|
flipY: n.flipY || !1,
|
|
1630
|
-
rotate: n.rotate || "0deg"
|
|
1680
|
+
rotate: n.rotate || "0deg",
|
|
1681
|
+
visibility: n.visibility || "visible",
|
|
1682
|
+
mediaWidth: n.mediaWidth || n.width || i.width || 100,
|
|
1683
|
+
mediaHeight: n.mediaHeight || n.height || i.height || 100
|
|
1631
1684
|
},
|
|
1632
1685
|
metadata: t.metadata || {}
|
|
1633
1686
|
};
|
|
1634
|
-
},
|
|
1687
|
+
}, mn = async (t, r) => {
|
|
1635
1688
|
const n = t;
|
|
1636
|
-
n.details.fontUrl && await
|
|
1689
|
+
n.details.fontUrl && await kn([
|
|
1637
1690
|
{
|
|
1638
1691
|
fontFamily: n.details.fontFamily,
|
|
1639
1692
|
url: n.details.fontUrl
|
|
1640
1693
|
}
|
|
1641
1694
|
]);
|
|
1642
|
-
const i = n.id, s = n.details, c =
|
|
1695
|
+
const i = n.id, s = n.details, c = ii(s), h = ri(n.details.text, c), m = or(r, {
|
|
1643
1696
|
width: c.width,
|
|
1644
|
-
height:
|
|
1697
|
+
height: h
|
|
1645
1698
|
});
|
|
1646
1699
|
return {
|
|
1647
1700
|
id: i,
|
|
1648
1701
|
name: "caption",
|
|
1649
1702
|
type: "caption",
|
|
1650
|
-
display:
|
|
1703
|
+
display: ke(n.display),
|
|
1651
1704
|
details: {
|
|
1652
1705
|
...c,
|
|
1653
1706
|
text: s.text || "",
|
|
1654
1707
|
// Default text content
|
|
1655
|
-
height:
|
|
1708
|
+
height: h,
|
|
1656
1709
|
// Default height
|
|
1657
1710
|
fontUrl: s.fontUrl,
|
|
1658
|
-
top: c.top ||
|
|
1659
|
-
left: c.left ||
|
|
1711
|
+
top: c.top || m.top,
|
|
1712
|
+
left: c.left || m.left,
|
|
1660
1713
|
borderWidth: s.borderWidth || 0,
|
|
1661
1714
|
borderColor: s.borderColor || "#000000",
|
|
1662
|
-
boxShadow: s.boxShadow ||
|
|
1715
|
+
boxShadow: s.boxShadow || sr,
|
|
1663
1716
|
words: s.words || []
|
|
1664
1717
|
},
|
|
1665
1718
|
metadata: {}
|
|
1666
1719
|
};
|
|
1667
|
-
},
|
|
1668
|
-
t.details.fontUrl && await
|
|
1720
|
+
}, yn = async (t, r) => {
|
|
1721
|
+
t.details.fontUrl && await kn([
|
|
1669
1722
|
{
|
|
1670
1723
|
fontFamily: t.details.fontFamily,
|
|
1671
1724
|
url: t.details.fontUrl
|
|
1672
1725
|
}
|
|
1673
1726
|
]);
|
|
1674
|
-
const n = t.id, i = t.details, s =
|
|
1727
|
+
const n = t.id, i = t.details, s = ii(i), c = ri(t.details.text, s), h = or(r, {
|
|
1675
1728
|
width: s.width,
|
|
1676
1729
|
height: c
|
|
1677
1730
|
});
|
|
@@ -1679,7 +1732,7 @@ const Pn = async (t, r) => {
|
|
|
1679
1732
|
id: n,
|
|
1680
1733
|
name: "text",
|
|
1681
1734
|
type: "text",
|
|
1682
|
-
display:
|
|
1735
|
+
display: ke(t.display),
|
|
1683
1736
|
details: {
|
|
1684
1737
|
...s,
|
|
1685
1738
|
text: i.text || "",
|
|
@@ -1687,15 +1740,15 @@ const Pn = async (t, r) => {
|
|
|
1687
1740
|
height: c,
|
|
1688
1741
|
// Default height
|
|
1689
1742
|
fontUrl: i.fontUrl,
|
|
1690
|
-
top: s.top ||
|
|
1691
|
-
left: s.left ||
|
|
1743
|
+
top: s.top || h.top,
|
|
1744
|
+
left: s.left || h.left,
|
|
1692
1745
|
borderWidth: i.borderWidth || 0,
|
|
1693
1746
|
borderColor: i.borderColor || "#000000",
|
|
1694
|
-
boxShadow: i.boxShadow ||
|
|
1747
|
+
boxShadow: i.boxShadow || sr
|
|
1695
1748
|
},
|
|
1696
1749
|
metadata: {}
|
|
1697
1750
|
};
|
|
1698
|
-
},
|
|
1751
|
+
}, ii = (t) => ({
|
|
1699
1752
|
fontFamily: t.fontFamily || "Arial",
|
|
1700
1753
|
// Default font family
|
|
1701
1754
|
fontSize: t.fontSize || "16px",
|
|
@@ -1737,14 +1790,14 @@ const Pn = async (t, r) => {
|
|
|
1737
1790
|
left: t.left,
|
|
1738
1791
|
textTransform: t.textTransform || "none",
|
|
1739
1792
|
transform: t.transform || "none"
|
|
1740
|
-
}),
|
|
1741
|
-
let
|
|
1793
|
+
}), ea = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
1794
|
+
let tr = (t = 21) => {
|
|
1742
1795
|
let r = "", n = crypto.getRandomValues(new Uint8Array(t));
|
|
1743
1796
|
for (; t--; )
|
|
1744
|
-
r +=
|
|
1797
|
+
r += ea[n[t] & 63];
|
|
1745
1798
|
return r;
|
|
1746
1799
|
};
|
|
1747
|
-
function
|
|
1800
|
+
function ra(t, r) {
|
|
1748
1801
|
return t.filter((i) => {
|
|
1749
1802
|
if (r.forEach((s) => {
|
|
1750
1803
|
i.items.includes(s) && (i.items = i.items.filter((c) => c !== s));
|
|
@@ -1754,165 +1807,177 @@ function Ji(t, r) {
|
|
|
1754
1807
|
}
|
|
1755
1808
|
function en(t = 16) {
|
|
1756
1809
|
const r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n = r.charAt(Math.floor(Math.random() * r.length));
|
|
1757
|
-
let i =
|
|
1810
|
+
let i = tr(t - 1);
|
|
1758
1811
|
return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
|
|
1759
1812
|
}
|
|
1760
|
-
const
|
|
1813
|
+
const qt = (t) => Object.keys(t).reduce((r, n) => {
|
|
1761
1814
|
const { display: i, playbackRate: s } = t[n];
|
|
1762
1815
|
return Math.max(r, i.to / (s || 1));
|
|
1763
|
-
}, 0)
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1816
|
+
}, 0), na = (t, r, n, i, s) => {
|
|
1817
|
+
let c = !1;
|
|
1818
|
+
return t.forEach((h) => {
|
|
1819
|
+
const m = n[h], P = m.display.from, F = m.display.to;
|
|
1820
|
+
(i !== void 0 || s !== void 0) && (c = r.find((b, d) => {
|
|
1821
|
+
if (i !== void 0 && b.id === i) return b;
|
|
1822
|
+
if (s !== void 0 && d === s) return b;
|
|
1823
|
+
}).items.map((b) => n[b]).some((b) => {
|
|
1824
|
+
const d = b.display.from, f = b.display.to;
|
|
1825
|
+
return d <= P && f >= F;
|
|
1826
|
+
}));
|
|
1827
|
+
}), c;
|
|
1828
|
+
};
|
|
1829
|
+
function ia(t) {
|
|
1830
|
+
const r = Vt.pipe(
|
|
1831
|
+
Xt(({ key: d }) => d.startsWith(mi))
|
|
1832
|
+
), n = Vt.pipe(
|
|
1833
|
+
Xt(({ key: d }) => d.startsWith(yi))
|
|
1834
|
+
), i = Vt.pipe(
|
|
1835
|
+
Xt(({ key: d }) => d.startsWith(bi))
|
|
1836
|
+
), s = Vt.pipe(
|
|
1837
|
+
Xt(({ key: d }) => d.startsWith(gi))
|
|
1838
|
+
), c = Vt.pipe(
|
|
1839
|
+
Xt(({ key: d }) => d.startsWith(_i))
|
|
1840
|
+
), h = Vt.pipe(
|
|
1841
|
+
Xt(({ key: d }) => d.startsWith(Ii))
|
|
1842
|
+
), m = r.subscribe(async (d) => {
|
|
1843
|
+
var f, p;
|
|
1844
|
+
if (d.key === vi) {
|
|
1845
|
+
const g = (f = d.value) == null ? void 0 : f.payload, S = g.size, _ = g.trackItemIds, y = g.trackItemsMap, l = g.trackItemDetailsMap;
|
|
1781
1846
|
console.warn("IMPROVE FONTS LOADING");
|
|
1782
|
-
const
|
|
1783
|
-
var
|
|
1847
|
+
const x = _.map(async (I) => {
|
|
1848
|
+
var C;
|
|
1784
1849
|
try {
|
|
1785
|
-
const
|
|
1786
|
-
if (
|
|
1787
|
-
const k = await
|
|
1788
|
-
{ id:
|
|
1850
|
+
const w = l[I], D = y[I];
|
|
1851
|
+
if (w.type === "image") {
|
|
1852
|
+
const k = await hn(
|
|
1853
|
+
{ id: I, details: w.details, ...D },
|
|
1789
1854
|
{
|
|
1790
1855
|
size: S
|
|
1791
1856
|
}
|
|
1792
|
-
), { details:
|
|
1793
|
-
|
|
1794
|
-
} else if (
|
|
1795
|
-
const k =
|
|
1796
|
-
(
|
|
1797
|
-
),
|
|
1798
|
-
{ ...
|
|
1857
|
+
), { details: v, ...A } = k;
|
|
1858
|
+
l[I] = { type: "image", details: v }, y[I] = A;
|
|
1859
|
+
} else if (w.type === "video") {
|
|
1860
|
+
const k = B(
|
|
1861
|
+
(C = d.value) == null ? void 0 : C.payload.trackItemsMap[I]
|
|
1862
|
+
), v = await dn(
|
|
1863
|
+
{ ...w, ...k, ...D },
|
|
1799
1864
|
{
|
|
1800
1865
|
size: S
|
|
1801
1866
|
}
|
|
1802
|
-
), { details:
|
|
1803
|
-
|
|
1804
|
-
} else if (
|
|
1805
|
-
const k = await
|
|
1806
|
-
id:
|
|
1807
|
-
details:
|
|
1808
|
-
...
|
|
1809
|
-
}), { details:
|
|
1810
|
-
|
|
1811
|
-
} else if (
|
|
1812
|
-
const k = await
|
|
1813
|
-
{ id:
|
|
1867
|
+
), { details: A, ...O } = v;
|
|
1868
|
+
l[I] = { type: "video", details: A }, y[I] = O;
|
|
1869
|
+
} else if (w.type === "audio") {
|
|
1870
|
+
const k = await pn({
|
|
1871
|
+
id: I,
|
|
1872
|
+
details: w.details,
|
|
1873
|
+
...D
|
|
1874
|
+
}), { details: v, ...A } = k;
|
|
1875
|
+
l[I] = { type: "audio", details: v }, y[I] = A;
|
|
1876
|
+
} else if (w.type === "caption") {
|
|
1877
|
+
const k = await mn(
|
|
1878
|
+
{ id: I, details: w.details, ...D },
|
|
1814
1879
|
{
|
|
1815
1880
|
size: S
|
|
1816
1881
|
}
|
|
1817
|
-
), { details:
|
|
1818
|
-
|
|
1819
|
-
} else if (
|
|
1820
|
-
const k = await
|
|
1821
|
-
{ id:
|
|
1882
|
+
), { details: v, ...A } = k;
|
|
1883
|
+
l[I] = { type: "caption", details: v }, y[I] = A;
|
|
1884
|
+
} else if (w.type === "text") {
|
|
1885
|
+
const k = await yn(
|
|
1886
|
+
{ id: I, details: w.details, ...D },
|
|
1822
1887
|
{
|
|
1823
1888
|
size: S
|
|
1824
1889
|
}
|
|
1825
|
-
), { details:
|
|
1826
|
-
|
|
1890
|
+
), { details: v, ...A } = k;
|
|
1891
|
+
l[I] = { type: "text", details: v }, y[I] = A;
|
|
1827
1892
|
}
|
|
1828
1893
|
return !0;
|
|
1829
1894
|
} catch {
|
|
1830
1895
|
return !1;
|
|
1831
1896
|
}
|
|
1832
1897
|
});
|
|
1833
|
-
await Promise.all(
|
|
1834
|
-
const
|
|
1898
|
+
await Promise.all(x);
|
|
1899
|
+
const M = qt(y);
|
|
1835
1900
|
t.updateState({
|
|
1836
|
-
...
|
|
1837
|
-
trackItemsMap:
|
|
1838
|
-
duration:
|
|
1901
|
+
...g,
|
|
1902
|
+
trackItemsMap: y,
|
|
1903
|
+
duration: M
|
|
1839
1904
|
});
|
|
1840
1905
|
}
|
|
1841
|
-
if (
|
|
1842
|
-
const
|
|
1906
|
+
if (d.key === Si) {
|
|
1907
|
+
const g = (p = d.value) == null ? void 0 : p.payload;
|
|
1843
1908
|
t.updateState({
|
|
1844
|
-
size:
|
|
1909
|
+
size: g
|
|
1845
1910
|
});
|
|
1846
1911
|
}
|
|
1847
|
-
}),
|
|
1848
|
-
if (
|
|
1849
|
-
if (
|
|
1850
|
-
}), F = i.subscribe((
|
|
1851
|
-
var
|
|
1852
|
-
const
|
|
1853
|
-
if ((
|
|
1854
|
-
const
|
|
1855
|
-
(
|
|
1856
|
-
),
|
|
1857
|
-
Object.entries(
|
|
1858
|
-
([
|
|
1912
|
+
}), P = s.subscribe((d) => {
|
|
1913
|
+
if (d.key === wi) return t.undo();
|
|
1914
|
+
if (d.key === ki) return t.redo();
|
|
1915
|
+
}), F = i.subscribe((d) => {
|
|
1916
|
+
var g, S, _, y;
|
|
1917
|
+
const f = [], p = [];
|
|
1918
|
+
if ((g = d.value) != null && g.payload.trackItemIds && (f.push((S = d.value) == null ? void 0 : S.payload.trackItemIds), t.updateState({ activeIds: f })), d.key === Ti) {
|
|
1919
|
+
const l = (_ = d.value) == null ? void 0 : _.payload.trackItemIds, x = B(t.getState()), M = l && l.length ? l : x.activeIds, I = x.trackItemIds, C = x.trackItemDetailsMap, w = I.filter(
|
|
1920
|
+
(O) => !M.includes(O)
|
|
1921
|
+
), D = Object.fromEntries(
|
|
1922
|
+
Object.entries(C).filter(
|
|
1923
|
+
([O]) => !M.includes(O)
|
|
1859
1924
|
)
|
|
1860
|
-
), k =
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
),
|
|
1864
|
-
Object.entries(
|
|
1865
|
-
([
|
|
1925
|
+
), k = ra(
|
|
1926
|
+
x.tracks,
|
|
1927
|
+
M
|
|
1928
|
+
), v = Object.fromEntries(
|
|
1929
|
+
Object.entries(x.trackItemsMap).filter(
|
|
1930
|
+
([O]) => !M.includes(O)
|
|
1866
1931
|
)
|
|
1867
|
-
),
|
|
1932
|
+
), A = qt(v);
|
|
1868
1933
|
t.updateState(
|
|
1869
1934
|
{
|
|
1870
|
-
trackItemIds:
|
|
1871
|
-
trackItemDetailsMap:
|
|
1935
|
+
trackItemIds: w,
|
|
1936
|
+
trackItemDetailsMap: D,
|
|
1872
1937
|
activeIds: [],
|
|
1873
|
-
trackItemsMap:
|
|
1938
|
+
trackItemsMap: v,
|
|
1874
1939
|
tracks: k,
|
|
1875
|
-
duration:
|
|
1940
|
+
duration: A
|
|
1876
1941
|
},
|
|
1877
1942
|
{ updateHistory: !0, kind: "remove" }
|
|
1878
1943
|
);
|
|
1879
1944
|
}
|
|
1880
|
-
if (
|
|
1881
|
-
const
|
|
1882
|
-
if (
|
|
1883
|
-
|
|
1884
|
-
const
|
|
1885
|
-
|
|
1886
|
-
...
|
|
1887
|
-
[
|
|
1888
|
-
},
|
|
1889
|
-
...
|
|
1890
|
-
[
|
|
1891
|
-
...
|
|
1945
|
+
if (d.key === Ei) {
|
|
1946
|
+
const l = B(t.getState()), x = ((y = d.value) == null ? void 0 : y.payload.trackItemIds) || l.activeIds;
|
|
1947
|
+
if (x.length === 0) return;
|
|
1948
|
+
x.forEach((I) => {
|
|
1949
|
+
const C = l.trackItemsMap[I], w = l.trackItemDetailsMap[I], D = en();
|
|
1950
|
+
p.push(D), l.trackItemsMap = {
|
|
1951
|
+
...l.trackItemsMap,
|
|
1952
|
+
[D]: { ...B(C), id: D }
|
|
1953
|
+
}, l.trackItemDetailsMap = {
|
|
1954
|
+
...l.trackItemDetailsMap,
|
|
1955
|
+
[D]: {
|
|
1956
|
+
...B(w)
|
|
1892
1957
|
}
|
|
1893
|
-
},
|
|
1958
|
+
}, l.trackItemIds.push(D);
|
|
1894
1959
|
});
|
|
1895
|
-
const
|
|
1896
|
-
|
|
1897
|
-
const
|
|
1898
|
-
...
|
|
1960
|
+
const M = [];
|
|
1961
|
+
l.tracks.forEach((I) => {
|
|
1962
|
+
const C = {
|
|
1963
|
+
...I,
|
|
1899
1964
|
items: [],
|
|
1900
|
-
id:
|
|
1965
|
+
id: tr()
|
|
1901
1966
|
};
|
|
1902
|
-
|
|
1903
|
-
if (
|
|
1904
|
-
const
|
|
1905
|
-
|
|
1967
|
+
I.items.forEach((w) => {
|
|
1968
|
+
if (x.includes(w)) {
|
|
1969
|
+
const D = x.indexOf(w);
|
|
1970
|
+
C.items.push(p[D]);
|
|
1906
1971
|
}
|
|
1907
|
-
}),
|
|
1908
|
-
}),
|
|
1909
|
-
|
|
1972
|
+
}), M.push(C);
|
|
1973
|
+
}), M.forEach((I) => {
|
|
1974
|
+
I.items.length !== 0 && l.tracks.unshift(I);
|
|
1910
1975
|
}), t.updateState(
|
|
1911
1976
|
{
|
|
1912
|
-
trackItemDetailsMap:
|
|
1913
|
-
tracks:
|
|
1914
|
-
trackItemIds:
|
|
1915
|
-
trackItemsMap:
|
|
1977
|
+
trackItemDetailsMap: l.trackItemDetailsMap,
|
|
1978
|
+
tracks: l.tracks,
|
|
1979
|
+
trackItemIds: l.trackItemIds,
|
|
1980
|
+
trackItemsMap: l.trackItemsMap
|
|
1916
1981
|
},
|
|
1917
1982
|
{
|
|
1918
1983
|
updateHistory: !0,
|
|
@@ -1920,119 +1985,138 @@ function Zi(t) {
|
|
|
1920
1985
|
}
|
|
1921
1986
|
);
|
|
1922
1987
|
}
|
|
1923
|
-
}),
|
|
1924
|
-
var
|
|
1925
|
-
const
|
|
1926
|
-
let
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1988
|
+
}), E = n.subscribe(async (d) => {
|
|
1989
|
+
var l, x, M, I, C, w, D, k;
|
|
1990
|
+
const f = B(t.getState());
|
|
1991
|
+
let p = [], g = "text";
|
|
1992
|
+
const S = (l = d.value) == null ? void 0 : l.options.trackId, _ = (x = d.value) == null ? void 0 : x.options.trackIndex;
|
|
1993
|
+
if (d.key === Mi) {
|
|
1994
|
+
g = "caption";
|
|
1995
|
+
const v = (M = d.value) == null ? void 0 : M.payload, A = [];
|
|
1996
|
+
for (const V of v) {
|
|
1997
|
+
const ft = mn(V, {
|
|
1998
|
+
size: f.size
|
|
1933
1999
|
});
|
|
1934
|
-
|
|
2000
|
+
A.push(ft);
|
|
1935
2001
|
}
|
|
1936
|
-
const
|
|
1937
|
-
for (const
|
|
1938
|
-
const
|
|
1939
|
-
|
|
1940
|
-
const { details:
|
|
1941
|
-
|
|
1942
|
-
type:
|
|
1943
|
-
details:
|
|
1944
|
-
},
|
|
2002
|
+
const O = await Promise.all(A), Z = [];
|
|
2003
|
+
for (const V of O) {
|
|
2004
|
+
const ft = V.id;
|
|
2005
|
+
Z.push(ft);
|
|
2006
|
+
const { details: Jt, ...Zt } = V;
|
|
2007
|
+
f.trackItemDetailsMap[ft] = {
|
|
2008
|
+
type: g,
|
|
2009
|
+
details: Jt
|
|
2010
|
+
}, f.trackItemsMap[ft] = Zt, f.trackItemIds.push(ft);
|
|
1945
2011
|
}
|
|
1946
|
-
|
|
2012
|
+
p = Z;
|
|
2013
|
+
}
|
|
2014
|
+
if (d.key === Ai) {
|
|
2015
|
+
g = "text";
|
|
2016
|
+
const v = await yn((I = d.value) == null ? void 0 : I.payload, {
|
|
2017
|
+
size: f.size
|
|
2018
|
+
}), { details: A, ...O } = v;
|
|
2019
|
+
f.trackItemDetailsMap[O.id] = {
|
|
2020
|
+
type: g,
|
|
2021
|
+
details: A
|
|
2022
|
+
}, f.trackItemsMap[O.id] = O, f.trackItemIds.push(O.id), p = [O.id];
|
|
1947
2023
|
}
|
|
1948
|
-
if (
|
|
1949
|
-
|
|
1950
|
-
const
|
|
1951
|
-
size:
|
|
1952
|
-
}), { details:
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
},
|
|
2024
|
+
if (d.key === Oi) {
|
|
2025
|
+
g = "template";
|
|
2026
|
+
const v = await ta((C = d.value) == null ? void 0 : C.payload, {
|
|
2027
|
+
size: f.size
|
|
2028
|
+
}), { details: A, ...O } = v;
|
|
2029
|
+
f.trackItemsMap[v.id] = {
|
|
2030
|
+
...O,
|
|
2031
|
+
type: "template"
|
|
2032
|
+
}, f.trackItemIds.push(O.id), f.trackItemDetailsMap[O.id] = {
|
|
2033
|
+
type: "template",
|
|
2034
|
+
details: A
|
|
2035
|
+
}, p = [O.id];
|
|
1957
2036
|
}
|
|
1958
|
-
if (
|
|
1959
|
-
|
|
1960
|
-
const
|
|
1961
|
-
size:
|
|
1962
|
-
}), { details:
|
|
1963
|
-
|
|
1964
|
-
type:
|
|
1965
|
-
details:
|
|
1966
|
-
},
|
|
2037
|
+
if (d.key === xi) {
|
|
2038
|
+
g = "image";
|
|
2039
|
+
const v = await hn((w = d.value) == null ? void 0 : w.payload, {
|
|
2040
|
+
size: f.size
|
|
2041
|
+
}), { details: A, ...O } = v;
|
|
2042
|
+
f.trackItemDetailsMap[O.id] = {
|
|
2043
|
+
type: g,
|
|
2044
|
+
details: A
|
|
2045
|
+
}, f.trackItemsMap[O.id] = O, f.trackItemIds.push(O.id), p = [O.id];
|
|
1967
2046
|
}
|
|
1968
|
-
if (
|
|
1969
|
-
|
|
1970
|
-
const
|
|
1971
|
-
|
|
1972
|
-
type:
|
|
1973
|
-
details:
|
|
1974
|
-
},
|
|
2047
|
+
if (d.key === Di) {
|
|
2048
|
+
g = "audio";
|
|
2049
|
+
const v = await pn((D = d.value) == null ? void 0 : D.payload), { details: A, ...O } = v;
|
|
2050
|
+
f.trackItemDetailsMap[O.id] = {
|
|
2051
|
+
type: g,
|
|
2052
|
+
details: A
|
|
2053
|
+
}, f.trackItemsMap[O.id] = O, f.trackItemIds.push(O.id), p = [O.id];
|
|
1975
2054
|
}
|
|
1976
|
-
if (
|
|
1977
|
-
|
|
1978
|
-
const
|
|
1979
|
-
size:
|
|
1980
|
-
}), { details:
|
|
1981
|
-
|
|
1982
|
-
type:
|
|
1983
|
-
details:
|
|
1984
|
-
},
|
|
2055
|
+
if (d.key === Pi) {
|
|
2056
|
+
g = "video";
|
|
2057
|
+
const v = await dn((k = d.value) == null ? void 0 : k.payload, {
|
|
2058
|
+
size: f.size
|
|
2059
|
+
}), { details: A, ...O } = v;
|
|
2060
|
+
f.trackItemDetailsMap[O.id] = {
|
|
2061
|
+
type: g,
|
|
2062
|
+
details: A
|
|
2063
|
+
}, f.trackItemsMap[O.id] = O, f.trackItemIds.push(O.id), p = [O.id];
|
|
1985
2064
|
}
|
|
1986
|
-
y
|
|
1987
|
-
|
|
2065
|
+
const y = na(
|
|
2066
|
+
p,
|
|
2067
|
+
f.tracks,
|
|
2068
|
+
f.trackItemsMap,
|
|
2069
|
+
S,
|
|
2070
|
+
_
|
|
2071
|
+
);
|
|
2072
|
+
S !== void 0 && !y ? f.tracks.map((A) => A.id).includes(S) && (f.tracks = f.tracks.map((A) => (A.id === S && A.items.push(...p), A))) : _ !== void 0 && !y ? f.tracks = f.tracks.map((v, A) => (A === _ && v.items.push(...p), v)) : f.tracks.unshift({
|
|
2073
|
+
id: tr(),
|
|
1988
2074
|
accepts: ["text", "audio", "helper", "video", "image", "caption"],
|
|
1989
|
-
type:
|
|
1990
|
-
items:
|
|
2075
|
+
type: g,
|
|
2076
|
+
items: p,
|
|
1991
2077
|
magnetic: !1,
|
|
1992
2078
|
static: !1
|
|
1993
|
-
})
|
|
1994
|
-
const S = Yt(y.trackItemsMap);
|
|
1995
|
-
t.updateState(
|
|
2079
|
+
}), f.duration = qt(f.trackItemsMap), t.updateState(
|
|
1996
2080
|
{
|
|
1997
|
-
trackItemIds:
|
|
1998
|
-
trackItemDetailsMap:
|
|
1999
|
-
trackItemsMap:
|
|
2000
|
-
tracks:
|
|
2001
|
-
duration:
|
|
2081
|
+
trackItemIds: f.trackItemIds,
|
|
2082
|
+
trackItemDetailsMap: f.trackItemDetailsMap,
|
|
2083
|
+
trackItemsMap: f.trackItemsMap,
|
|
2084
|
+
tracks: f.tracks,
|
|
2085
|
+
duration: f.duration
|
|
2002
2086
|
},
|
|
2003
2087
|
{
|
|
2004
2088
|
updateHistory: !0,
|
|
2005
2089
|
kind: "add"
|
|
2006
2090
|
}
|
|
2007
2091
|
);
|
|
2008
|
-
}),
|
|
2009
|
-
var
|
|
2010
|
-
if (
|
|
2011
|
-
const
|
|
2012
|
-
if (
|
|
2013
|
-
const S =
|
|
2014
|
-
if (
|
|
2092
|
+
}), N = c.subscribe(async (d) => {
|
|
2093
|
+
var f;
|
|
2094
|
+
if (d.key === Ci) {
|
|
2095
|
+
const p = B(t.getState()), g = (f = d.value) == null ? void 0 : f.options.time;
|
|
2096
|
+
if (p.activeIds.length === 1) {
|
|
2097
|
+
const S = p.activeIds[0], _ = p.trackItemsMap[S];
|
|
2098
|
+
if (g >= _.display.to || g <= _.display.from)
|
|
2015
2099
|
return;
|
|
2016
|
-
const
|
|
2017
|
-
...
|
|
2018
|
-
id:
|
|
2100
|
+
const y = p.trackItemDetailsMap[S], l = en(), x = {
|
|
2101
|
+
..._,
|
|
2102
|
+
id: l,
|
|
2019
2103
|
display: {
|
|
2020
|
-
from:
|
|
2021
|
-
to:
|
|
2104
|
+
from: g,
|
|
2105
|
+
to: _.display.to
|
|
2022
2106
|
},
|
|
2023
2107
|
trim: {
|
|
2024
|
-
from:
|
|
2025
|
-
to:
|
|
2108
|
+
from: g,
|
|
2109
|
+
to: _.display.to
|
|
2026
2110
|
}
|
|
2027
2111
|
};
|
|
2028
|
-
|
|
2029
|
-
|
|
2112
|
+
p.trackItemsMap[S].display.to = g, p.trackItemsMap[l] = x, p.trackItemIds.push(l), p.trackItemDetailsMap[l] = y, p.tracks.forEach((M) => {
|
|
2113
|
+
M.items.includes(S) && M.items.push(l);
|
|
2030
2114
|
}), t.updateState(
|
|
2031
2115
|
{
|
|
2032
|
-
trackItemDetailsMap:
|
|
2033
|
-
tracks:
|
|
2034
|
-
trackItemIds:
|
|
2035
|
-
trackItemsMap:
|
|
2116
|
+
trackItemDetailsMap: p.trackItemDetailsMap,
|
|
2117
|
+
tracks: p.tracks,
|
|
2118
|
+
trackItemIds: p.trackItemIds,
|
|
2119
|
+
trackItemsMap: p.trackItemsMap
|
|
2036
2120
|
},
|
|
2037
2121
|
{
|
|
2038
2122
|
updateHistory: !0,
|
|
@@ -2042,54 +2126,54 @@ function Zi(t) {
|
|
|
2042
2126
|
}
|
|
2043
2127
|
return;
|
|
2044
2128
|
}
|
|
2045
|
-
if (
|
|
2046
|
-
const
|
|
2047
|
-
if (
|
|
2048
|
-
const
|
|
2049
|
-
activeIds:
|
|
2129
|
+
if (d.key === Ri) {
|
|
2130
|
+
const p = B(t.getState());
|
|
2131
|
+
if (p.activeIds.length) {
|
|
2132
|
+
const g = p.activeIds, S = [], _ = {
|
|
2133
|
+
activeIds: g,
|
|
2050
2134
|
trackItemDetailsMap: {},
|
|
2051
2135
|
trackItemsMap: {},
|
|
2052
2136
|
tracks: []
|
|
2053
2137
|
};
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2138
|
+
g.forEach((l) => {
|
|
2139
|
+
_.trackItemDetailsMap[l] = p.trackItemDetailsMap[l], _.trackItemsMap[l] = p.trackItemsMap[l], S.push(
|
|
2140
|
+
p.tracks.find((x) => x.items.includes(l))
|
|
2057
2141
|
);
|
|
2058
2142
|
});
|
|
2059
|
-
const
|
|
2060
|
-
S.filter((
|
|
2143
|
+
const y = /* @__PURE__ */ new Set();
|
|
2144
|
+
S.filter((l) => y.has(l.id) ? !1 : (y.add(l), !0)), _.tracks = Array.from(y.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
|
|
2061
2145
|
}
|
|
2062
2146
|
}
|
|
2063
|
-
if (
|
|
2064
|
-
const
|
|
2065
|
-
if (!
|
|
2066
|
-
const
|
|
2067
|
-
const
|
|
2068
|
-
(
|
|
2147
|
+
if (d.key === Fi) {
|
|
2148
|
+
const p = localStorage.getItem("DesignComboTemp");
|
|
2149
|
+
if (!p) return;
|
|
2150
|
+
const g = B(t.getState()), S = JSON.parse(p), _ = {}, y = S.trackItemsMap, l = S.trackItemDetailsMap, x = S.tracks, M = [], I = S.activeIds.map(async (C) => {
|
|
2151
|
+
const w = l[C];
|
|
2152
|
+
(w.type === "caption" || w.type === "text") && w.details.fontUrl && await kn([
|
|
2069
2153
|
{
|
|
2070
|
-
fontFamily:
|
|
2071
|
-
url:
|
|
2154
|
+
fontFamily: w.details.fontFamily,
|
|
2155
|
+
url: w.details.fontUrl
|
|
2072
2156
|
}
|
|
2073
2157
|
]);
|
|
2074
|
-
const
|
|
2075
|
-
return
|
|
2076
|
-
...
|
|
2077
|
-
id:
|
|
2078
|
-
},
|
|
2158
|
+
const D = en();
|
|
2159
|
+
return _[C] = D, g.trackItemsMap[D] = {
|
|
2160
|
+
...y[C],
|
|
2161
|
+
id: D
|
|
2162
|
+
}, g.trackItemDetailsMap[D] = w, g.trackItemIds.push(D), !0;
|
|
2079
2163
|
});
|
|
2080
|
-
await Promise.all(
|
|
2081
|
-
const
|
|
2082
|
-
...
|
|
2083
|
-
items:
|
|
2084
|
-
id:
|
|
2164
|
+
await Promise.all(I), x.forEach((C) => {
|
|
2165
|
+
const w = C.items.map((k) => _[k]), D = {
|
|
2166
|
+
...C,
|
|
2167
|
+
items: w,
|
|
2168
|
+
id: tr()
|
|
2085
2169
|
};
|
|
2086
|
-
|
|
2087
|
-
}),
|
|
2170
|
+
M.push(D);
|
|
2171
|
+
}), g.tracks = [...g.tracks, ...M], t.updateState(
|
|
2088
2172
|
{
|
|
2089
|
-
trackItemDetailsMap:
|
|
2090
|
-
tracks:
|
|
2091
|
-
trackItemIds:
|
|
2092
|
-
trackItemsMap:
|
|
2173
|
+
trackItemDetailsMap: g.trackItemDetailsMap,
|
|
2174
|
+
tracks: g.tracks,
|
|
2175
|
+
trackItemIds: g.trackItemIds,
|
|
2176
|
+
trackItemsMap: g.trackItemsMap
|
|
2093
2177
|
},
|
|
2094
2178
|
{
|
|
2095
2179
|
updateHistory: !0,
|
|
@@ -2097,25 +2181,88 @@ function Zi(t) {
|
|
|
2097
2181
|
}
|
|
2098
2182
|
);
|
|
2099
2183
|
}
|
|
2100
|
-
}),
|
|
2101
|
-
var
|
|
2102
|
-
if (
|
|
2103
|
-
const
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
}
|
|
2184
|
+
}), b = h.subscribe(async (d) => {
|
|
2185
|
+
var f, p, g, S;
|
|
2186
|
+
if (d.key === ji) {
|
|
2187
|
+
const _ = B(t.getState()), [y] = (f = d.value) == null ? void 0 : f.payload.trackItemIds, l = _.trackItemDetailsMap;
|
|
2188
|
+
_.trackItemIds.forEach((M) => {
|
|
2189
|
+
const I = l[M];
|
|
2190
|
+
if (I.type === "template" && I.details.map((w) => w.id).includes(y)) {
|
|
2191
|
+
const w = I.details.filter(
|
|
2192
|
+
(D) => D.id !== y
|
|
2193
|
+
);
|
|
2194
|
+
I.details = w;
|
|
2195
|
+
}
|
|
2196
|
+
}), t.updateState(
|
|
2197
|
+
{
|
|
2198
|
+
trackItemDetailsMap: { ...l }
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
updateHistory: !0,
|
|
2202
|
+
kind: "update"
|
|
2203
|
+
}
|
|
2204
|
+
);
|
|
2205
|
+
}
|
|
2206
|
+
if (d.key === zi) {
|
|
2207
|
+
const _ = B(t.getState()), y = _.trackItemDetailsMap, l = _.trackItemsMap, x = Object.keys((p = d.value) == null ? void 0 : p.payload);
|
|
2208
|
+
if (!x.length) return;
|
|
2209
|
+
const M = (g = d.value) == null ? void 0 : g.payload;
|
|
2210
|
+
x.forEach((C) => {
|
|
2211
|
+
const w = M[C];
|
|
2212
|
+
w.details ? y[C].details = {
|
|
2213
|
+
...y[C].details,
|
|
2214
|
+
...w.details
|
|
2215
|
+
} : M[C].playbackRate ? l[C].playbackRate = M[C].playbackRate : y[C].type === "template" && (l[C] = {
|
|
2216
|
+
...l[C],
|
|
2217
|
+
...M[C]
|
|
2218
|
+
});
|
|
2112
2219
|
});
|
|
2113
|
-
const
|
|
2220
|
+
const I = qt(l);
|
|
2221
|
+
t.updateState(
|
|
2222
|
+
{
|
|
2223
|
+
trackItemDetailsMap: { ...y },
|
|
2224
|
+
trackItemsMap: { ...l },
|
|
2225
|
+
duration: I
|
|
2226
|
+
},
|
|
2227
|
+
{
|
|
2228
|
+
updateHistory: !0,
|
|
2229
|
+
kind: "update:details"
|
|
2230
|
+
}
|
|
2231
|
+
);
|
|
2232
|
+
}
|
|
2233
|
+
if (d.key === Hi) {
|
|
2234
|
+
const _ = (S = d.value) == null ? void 0 : S.payload, y = Object.keys(_)[0], l = Object.values(_)[0], x = B(t.getState());
|
|
2235
|
+
for (const M of x.trackItemIds)
|
|
2236
|
+
if (x.trackItemsMap[M].type === "template") {
|
|
2237
|
+
const I = x.trackItemDetailsMap[M];
|
|
2238
|
+
if (I.details.map((w) => w.id).includes(y)) {
|
|
2239
|
+
for (let w of I.details)
|
|
2240
|
+
if (w.id === y) {
|
|
2241
|
+
if (l.details) {
|
|
2242
|
+
if (l.type === "image" && l.details.src) {
|
|
2243
|
+
const k = await ti(l.details.src), v = w.details.width, A = w.details.height;
|
|
2244
|
+
let O = k.width, Z = k.height;
|
|
2245
|
+
const V = k.width / k.height;
|
|
2246
|
+
v / A > V ? (O = v, Z = v / V) : (Z = A, O = A * V), l.details.mediaWidth = O, l.details.mediaHeight = Z;
|
|
2247
|
+
}
|
|
2248
|
+
if (l.type === "video" && l.details.src) {
|
|
2249
|
+
const k = await ei(l.details.src), v = w.details.width, A = w.details.height;
|
|
2250
|
+
let O = k.width, Z = k.height;
|
|
2251
|
+
const V = k.width / k.height;
|
|
2252
|
+
v / A > V ? (O = v, Z = v / V) : (Z = A, O = A * V), l.details.mediaWidth = O, l.details.mediaHeight = Z;
|
|
2253
|
+
}
|
|
2254
|
+
const D = w.details;
|
|
2255
|
+
w.details = { ...D, ...l.details }, l.details = w.details;
|
|
2256
|
+
}
|
|
2257
|
+
w = { ...w, ...l }, x.trackItemDetailsMap[M].details = I.details.map((D) => D.id === y ? w : D);
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2114
2261
|
t.updateState(
|
|
2115
2262
|
{
|
|
2116
|
-
trackItemDetailsMap: {
|
|
2117
|
-
|
|
2118
|
-
|
|
2263
|
+
trackItemDetailsMap: {
|
|
2264
|
+
...x.trackItemDetailsMap
|
|
2265
|
+
}
|
|
2119
2266
|
},
|
|
2120
2267
|
{
|
|
2121
2268
|
updateHistory: !0,
|
|
@@ -2123,50 +2270,63 @@ function Zi(t) {
|
|
|
2123
2270
|
}
|
|
2124
2271
|
);
|
|
2125
2272
|
}
|
|
2273
|
+
if (d.key === Ni) {
|
|
2274
|
+
const _ = B(t.getState());
|
|
2275
|
+
_.trackItemIds.forEach((y) => {
|
|
2276
|
+
const l = _.trackItemsMap[y];
|
|
2277
|
+
l.type === "template" && (l.activeEdit = !1, t.updateState({
|
|
2278
|
+
trackItemsMap: {
|
|
2279
|
+
..._.trackItemsMap,
|
|
2280
|
+
[y]: l
|
|
2281
|
+
},
|
|
2282
|
+
activeIds: []
|
|
2283
|
+
}));
|
|
2284
|
+
});
|
|
2285
|
+
}
|
|
2126
2286
|
});
|
|
2127
2287
|
return {
|
|
2128
2288
|
unsubscribe: () => {
|
|
2129
|
-
|
|
2289
|
+
E.unsubscribe(), N.unsubscribe(), b.unsubscribe(), P.unsubscribe(), F.unsubscribe(), m.unsubscribe();
|
|
2130
2290
|
}
|
|
2131
2291
|
};
|
|
2132
2292
|
}
|
|
2133
|
-
const
|
|
2134
|
-
function
|
|
2135
|
-
var
|
|
2293
|
+
const aa = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
|
2294
|
+
function ai(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2295
|
+
var m, P;
|
|
2136
2296
|
let s = [];
|
|
2137
2297
|
const c = Array.isArray(t);
|
|
2138
2298
|
for (const F in t) {
|
|
2139
|
-
const
|
|
2299
|
+
const E = t[F], N = c ? +F : F;
|
|
2140
2300
|
if (!(F in r)) {
|
|
2141
2301
|
s.push({
|
|
2142
2302
|
type: "REMOVE",
|
|
2143
|
-
path: [
|
|
2303
|
+
path: [N],
|
|
2144
2304
|
oldValue: t[F]
|
|
2145
2305
|
});
|
|
2146
2306
|
continue;
|
|
2147
2307
|
}
|
|
2148
|
-
const
|
|
2149
|
-
if (
|
|
2150
|
-
const
|
|
2151
|
-
s.push.apply(s,
|
|
2152
|
-
} else
|
|
2153
|
-
!(Number.isNaN(
|
|
2154
|
-
path: [
|
|
2308
|
+
const b = r[F], d = typeof E == "object" && typeof b == "object" && Array.isArray(E) === Array.isArray(b);
|
|
2309
|
+
if (E && b && d && !aa[(P = (m = Object.getPrototypeOf(E)) == null ? void 0 : m.constructor) == null ? void 0 : P.name] && (!n.cyclesFix || !i.includes(E))) {
|
|
2310
|
+
const f = ai(E, b, n, n.cyclesFix ? i.concat([E]) : []);
|
|
2311
|
+
s.push.apply(s, f.map((p) => (p.path.unshift(N), p)));
|
|
2312
|
+
} else E !== b && // treat NaN values as equivalent
|
|
2313
|
+
!(Number.isNaN(E) && Number.isNaN(b)) && !(d && (isNaN(E) ? E + "" == b + "" : +E == +b)) && s.push({
|
|
2314
|
+
path: [N],
|
|
2155
2315
|
type: "CHANGE",
|
|
2156
|
-
value:
|
|
2157
|
-
oldValue:
|
|
2316
|
+
value: b,
|
|
2317
|
+
oldValue: E
|
|
2158
2318
|
});
|
|
2159
2319
|
}
|
|
2160
|
-
const
|
|
2320
|
+
const h = Array.isArray(r);
|
|
2161
2321
|
for (const F in r)
|
|
2162
2322
|
F in t || s.push({
|
|
2163
2323
|
type: "CREATE",
|
|
2164
|
-
path: [
|
|
2324
|
+
path: [h ? +F : F],
|
|
2165
2325
|
value: r[F]
|
|
2166
2326
|
});
|
|
2167
2327
|
return s;
|
|
2168
2328
|
}
|
|
2169
|
-
var
|
|
2329
|
+
var Tn = Symbol.for("immer-nothing"), ge = Symbol.for("immer-draftable"), nt = Symbol.for("immer-state"), si = process.env.NODE_ENV !== "production" ? [
|
|
2170
2330
|
// All error codes, starting by 0:
|
|
2171
2331
|
function(t) {
|
|
2172
2332
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
|
@@ -2197,117 +2357,117 @@ var vn = Symbol.for("immer-nothing"), de = Symbol.for("immer-draftable"), tt = S
|
|
|
2197
2357
|
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
|
|
2198
2358
|
// See Patches.ts for additional errors
|
|
2199
2359
|
] : [];
|
|
2200
|
-
function
|
|
2360
|
+
function $(t, ...r) {
|
|
2201
2361
|
if (process.env.NODE_ENV !== "production") {
|
|
2202
|
-
const n =
|
|
2362
|
+
const n = si[t], i = typeof n == "function" ? n.apply(null, r) : n;
|
|
2203
2363
|
throw new Error(`[Immer] ${i}`);
|
|
2204
2364
|
}
|
|
2205
2365
|
throw new Error(
|
|
2206
2366
|
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
|
2207
2367
|
);
|
|
2208
2368
|
}
|
|
2209
|
-
var
|
|
2210
|
-
function
|
|
2211
|
-
return !!t && !!t[
|
|
2369
|
+
var Ct = Object.getPrototypeOf;
|
|
2370
|
+
function Rt(t) {
|
|
2371
|
+
return !!t && !!t[nt];
|
|
2212
2372
|
}
|
|
2213
|
-
function
|
|
2373
|
+
function wt(t) {
|
|
2214
2374
|
var r;
|
|
2215
|
-
return t ?
|
|
2375
|
+
return t ? oi(t) || Array.isArray(t) || !!t[ge] || !!((r = t.constructor) != null && r[ge]) || Te(t) || Ee(t) : !1;
|
|
2216
2376
|
}
|
|
2217
|
-
var
|
|
2218
|
-
function
|
|
2377
|
+
var sa = Object.prototype.constructor.toString();
|
|
2378
|
+
function oi(t) {
|
|
2219
2379
|
if (!t || typeof t != "object")
|
|
2220
2380
|
return !1;
|
|
2221
|
-
const r =
|
|
2381
|
+
const r = Ct(t);
|
|
2222
2382
|
if (r === null)
|
|
2223
2383
|
return !0;
|
|
2224
2384
|
const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
|
2225
|
-
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) ===
|
|
2385
|
+
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === sa;
|
|
2226
2386
|
}
|
|
2227
|
-
function
|
|
2228
|
-
|
|
2387
|
+
function _e(t, r) {
|
|
2388
|
+
Ft(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
|
2229
2389
|
r(n, t[n], t);
|
|
2230
2390
|
}) : t.forEach((n, i) => r(i, n, t));
|
|
2231
2391
|
}
|
|
2232
|
-
function
|
|
2233
|
-
const r = t[
|
|
2234
|
-
return r ? r.type_ : Array.isArray(t) ? 1 :
|
|
2392
|
+
function Ft(t) {
|
|
2393
|
+
const r = t[nt];
|
|
2394
|
+
return r ? r.type_ : Array.isArray(t) ? 1 : Te(t) ? 2 : Ee(t) ? 3 : 0;
|
|
2235
2395
|
}
|
|
2236
|
-
function
|
|
2237
|
-
return
|
|
2396
|
+
function Ie(t, r) {
|
|
2397
|
+
return Ft(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
|
2238
2398
|
}
|
|
2239
2399
|
function rn(t, r) {
|
|
2240
|
-
return
|
|
2400
|
+
return Ft(t) === 2 ? t.get(r) : t[r];
|
|
2241
2401
|
}
|
|
2242
|
-
function
|
|
2243
|
-
const i =
|
|
2402
|
+
function ci(t, r, n) {
|
|
2403
|
+
const i = Ft(t);
|
|
2244
2404
|
i === 2 ? t.set(r, n) : i === 3 ? t.add(n) : t[r] = n;
|
|
2245
2405
|
}
|
|
2246
|
-
function
|
|
2406
|
+
function oa(t, r) {
|
|
2247
2407
|
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
|
2248
2408
|
}
|
|
2249
|
-
function
|
|
2409
|
+
function Te(t) {
|
|
2250
2410
|
return t instanceof Map;
|
|
2251
2411
|
}
|
|
2252
|
-
function
|
|
2412
|
+
function Ee(t) {
|
|
2253
2413
|
return t instanceof Set;
|
|
2254
2414
|
}
|
|
2255
|
-
function
|
|
2415
|
+
function Pt(t) {
|
|
2256
2416
|
return t.copy_ || t.base_;
|
|
2257
2417
|
}
|
|
2258
|
-
function
|
|
2259
|
-
if (
|
|
2418
|
+
function bn(t, r) {
|
|
2419
|
+
if (Te(t))
|
|
2260
2420
|
return new Map(t);
|
|
2261
|
-
if (
|
|
2421
|
+
if (Ee(t))
|
|
2262
2422
|
return new Set(t);
|
|
2263
2423
|
if (Array.isArray(t))
|
|
2264
2424
|
return Array.prototype.slice.call(t);
|
|
2265
|
-
const n =
|
|
2425
|
+
const n = oi(t);
|
|
2266
2426
|
if (r === !0 || r === "class_only" && !n) {
|
|
2267
2427
|
const i = Object.getOwnPropertyDescriptors(t);
|
|
2268
|
-
delete i[
|
|
2428
|
+
delete i[nt];
|
|
2269
2429
|
let s = Reflect.ownKeys(i);
|
|
2270
2430
|
for (let c = 0; c < s.length; c++) {
|
|
2271
|
-
const
|
|
2272
|
-
|
|
2431
|
+
const h = s[c], m = i[h];
|
|
2432
|
+
m.writable === !1 && (m.writable = !0, m.configurable = !0), (m.get || m.set) && (i[h] = {
|
|
2273
2433
|
configurable: !0,
|
|
2274
2434
|
writable: !0,
|
|
2275
2435
|
// could live with !!desc.set as well here...
|
|
2276
|
-
enumerable:
|
|
2277
|
-
value: t[
|
|
2436
|
+
enumerable: m.enumerable,
|
|
2437
|
+
value: t[h]
|
|
2278
2438
|
});
|
|
2279
2439
|
}
|
|
2280
|
-
return Object.create(
|
|
2440
|
+
return Object.create(Ct(t), i);
|
|
2281
2441
|
} else {
|
|
2282
|
-
const i =
|
|
2442
|
+
const i = Ct(t);
|
|
2283
2443
|
if (i !== null && n)
|
|
2284
2444
|
return { ...t };
|
|
2285
2445
|
const s = Object.create(i);
|
|
2286
2446
|
return Object.assign(s, t);
|
|
2287
2447
|
}
|
|
2288
2448
|
}
|
|
2289
|
-
function
|
|
2290
|
-
return
|
|
2449
|
+
function En(t, r = !1) {
|
|
2450
|
+
return cr(t) || Rt(t) || !wt(t) || (Ft(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;
|
|
2291
2451
|
}
|
|
2292
|
-
function
|
|
2293
|
-
|
|
2452
|
+
function ca() {
|
|
2453
|
+
$(2);
|
|
2294
2454
|
}
|
|
2295
|
-
function
|
|
2455
|
+
function cr(t) {
|
|
2296
2456
|
return Object.isFrozen(t);
|
|
2297
2457
|
}
|
|
2298
|
-
var
|
|
2299
|
-
function
|
|
2300
|
-
const r =
|
|
2301
|
-
return r ||
|
|
2458
|
+
var gn = {};
|
|
2459
|
+
function jt(t) {
|
|
2460
|
+
const r = gn[t];
|
|
2461
|
+
return r || $(0, t), r;
|
|
2302
2462
|
}
|
|
2303
|
-
function
|
|
2304
|
-
|
|
2463
|
+
function ua(t, r) {
|
|
2464
|
+
gn[t] || (gn[t] = r);
|
|
2305
2465
|
}
|
|
2306
|
-
var
|
|
2307
|
-
function
|
|
2308
|
-
return
|
|
2466
|
+
var ve;
|
|
2467
|
+
function ui() {
|
|
2468
|
+
return ve;
|
|
2309
2469
|
}
|
|
2310
|
-
function
|
|
2470
|
+
function la(t, r) {
|
|
2311
2471
|
return {
|
|
2312
2472
|
drafts_: [],
|
|
2313
2473
|
parent_: t,
|
|
@@ -2319,52 +2479,52 @@ function ia(t, r) {
|
|
|
2319
2479
|
};
|
|
2320
2480
|
}
|
|
2321
2481
|
function zn(t, r) {
|
|
2322
|
-
r && (
|
|
2482
|
+
r && (jt("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
|
2323
2483
|
}
|
|
2324
|
-
function
|
|
2325
|
-
|
|
2484
|
+
function _n(t) {
|
|
2485
|
+
In(t), t.drafts_.forEach(fa), t.drafts_ = null;
|
|
2326
2486
|
}
|
|
2327
|
-
function
|
|
2328
|
-
t ===
|
|
2487
|
+
function In(t) {
|
|
2488
|
+
t === ve && (ve = t.parent_);
|
|
2329
2489
|
}
|
|
2330
|
-
function
|
|
2331
|
-
return
|
|
2490
|
+
function Hn(t) {
|
|
2491
|
+
return ve = la(ve, t);
|
|
2332
2492
|
}
|
|
2333
|
-
function
|
|
2334
|
-
const r = t[
|
|
2493
|
+
function fa(t) {
|
|
2494
|
+
const r = t[nt];
|
|
2335
2495
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
|
2336
2496
|
}
|
|
2337
|
-
function
|
|
2497
|
+
function Nn(t, r) {
|
|
2338
2498
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
|
2339
2499
|
const n = r.drafts_[0];
|
|
2340
|
-
return t !== void 0 && t !== n ? (n[
|
|
2341
|
-
n[
|
|
2500
|
+
return t !== void 0 && t !== n ? (n[nt].modified_ && (_n(r), $(4)), wt(t) && (t = nr(r, t), r.parent_ || ir(r, t)), r.patches_ && jt("Patches").generateReplacementPatches_(
|
|
2501
|
+
n[nt].base_,
|
|
2342
2502
|
t,
|
|
2343
2503
|
r.patches_,
|
|
2344
2504
|
r.inversePatches_
|
|
2345
|
-
)) : t =
|
|
2505
|
+
)) : t = nr(r, n, []), _n(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== Tn ? t : void 0;
|
|
2346
2506
|
}
|
|
2347
|
-
function
|
|
2348
|
-
if (
|
|
2507
|
+
function nr(t, r, n) {
|
|
2508
|
+
if (cr(r))
|
|
2349
2509
|
return r;
|
|
2350
|
-
const i = r[
|
|
2510
|
+
const i = r[nt];
|
|
2351
2511
|
if (!i)
|
|
2352
|
-
return
|
|
2512
|
+
return _e(
|
|
2353
2513
|
r,
|
|
2354
|
-
(s, c) =>
|
|
2514
|
+
(s, c) => Ln(t, i, r, s, c, n)
|
|
2355
2515
|
), r;
|
|
2356
2516
|
if (i.scope_ !== t)
|
|
2357
2517
|
return r;
|
|
2358
2518
|
if (!i.modified_)
|
|
2359
|
-
return
|
|
2519
|
+
return ir(t, i.base_, !0), i.base_;
|
|
2360
2520
|
if (!i.finalized_) {
|
|
2361
2521
|
i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
|
|
2362
2522
|
const s = i.copy_;
|
|
2363
|
-
let c = s,
|
|
2364
|
-
i.type_ === 3 && (c = new Set(s), s.clear(),
|
|
2523
|
+
let c = s, h = !1;
|
|
2524
|
+
i.type_ === 3 && (c = new Set(s), s.clear(), h = !0), _e(
|
|
2365
2525
|
c,
|
|
2366
|
-
(
|
|
2367
|
-
),
|
|
2526
|
+
(m, P) => Ln(t, i, s, m, P, n, h)
|
|
2527
|
+
), ir(t, s, !1), n && t.patches_ && jt("Patches").generatePatches_(
|
|
2368
2528
|
i,
|
|
2369
2529
|
n,
|
|
2370
2530
|
t.patches_,
|
|
@@ -2373,29 +2533,29 @@ function Qe(t, r, n) {
|
|
|
2373
2533
|
}
|
|
2374
2534
|
return i.copy_;
|
|
2375
2535
|
}
|
|
2376
|
-
function
|
|
2377
|
-
if (process.env.NODE_ENV !== "production" && s === n &&
|
|
2378
|
-
const
|
|
2379
|
-
!
|
|
2380
|
-
if (
|
|
2536
|
+
function Ln(t, r, n, i, s, c, h) {
|
|
2537
|
+
if (process.env.NODE_ENV !== "production" && s === n && $(5), Rt(s)) {
|
|
2538
|
+
const m = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
|
2539
|
+
!Ie(r.assigned_, i) ? c.concat(i) : void 0, P = nr(t, s, m);
|
|
2540
|
+
if (ci(n, i, P), Rt(P))
|
|
2381
2541
|
t.canAutoFreeze_ = !1;
|
|
2382
2542
|
else
|
|
2383
2543
|
return;
|
|
2384
|
-
} else
|
|
2385
|
-
if (
|
|
2544
|
+
} else h && n.add(s);
|
|
2545
|
+
if (wt(s) && !cr(s)) {
|
|
2386
2546
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
|
2387
2547
|
return;
|
|
2388
|
-
|
|
2548
|
+
nr(t, s), (!r || !r.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(n, i) && ir(t, s);
|
|
2389
2549
|
}
|
|
2390
2550
|
}
|
|
2391
|
-
function
|
|
2392
|
-
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ &&
|
|
2551
|
+
function ir(t, r, n = !1) {
|
|
2552
|
+
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && En(r, n);
|
|
2393
2553
|
}
|
|
2394
|
-
function
|
|
2554
|
+
function da(t, r) {
|
|
2395
2555
|
const n = Array.isArray(t), i = {
|
|
2396
2556
|
type_: n ? 1 : 0,
|
|
2397
2557
|
// Track which produce call this is associated with.
|
|
2398
|
-
scope_: r ? r.scope_ :
|
|
2558
|
+
scope_: r ? r.scope_ : ui(),
|
|
2399
2559
|
// True for both shallow and deep changes.
|
|
2400
2560
|
modified_: !1,
|
|
2401
2561
|
// Used during finalization.
|
|
@@ -2415,50 +2575,50 @@ function sa(t, r) {
|
|
|
2415
2575
|
revoke_: null,
|
|
2416
2576
|
isManual_: !1
|
|
2417
2577
|
};
|
|
2418
|
-
let s = i, c =
|
|
2419
|
-
n && (s = [i], c =
|
|
2420
|
-
const { revoke:
|
|
2421
|
-
return i.draft_ =
|
|
2578
|
+
let s = i, c = Mn;
|
|
2579
|
+
n && (s = [i], c = Se);
|
|
2580
|
+
const { revoke: h, proxy: m } = Proxy.revocable(s, c);
|
|
2581
|
+
return i.draft_ = m, i.revoke_ = h, m;
|
|
2422
2582
|
}
|
|
2423
|
-
var
|
|
2583
|
+
var Mn = {
|
|
2424
2584
|
get(t, r) {
|
|
2425
|
-
if (r ===
|
|
2585
|
+
if (r === nt)
|
|
2426
2586
|
return t;
|
|
2427
|
-
const n =
|
|
2428
|
-
if (!
|
|
2429
|
-
return
|
|
2587
|
+
const n = Pt(t);
|
|
2588
|
+
if (!Ie(n, r))
|
|
2589
|
+
return pa(t, n, r);
|
|
2430
2590
|
const i = n[r];
|
|
2431
|
-
return t.finalized_ || !
|
|
2591
|
+
return t.finalized_ || !wt(i) ? i : i === nn(t.base_, r) ? (an(t), t.copy_[r] = Sn(i, t)) : i;
|
|
2432
2592
|
},
|
|
2433
2593
|
has(t, r) {
|
|
2434
|
-
return r in
|
|
2594
|
+
return r in Pt(t);
|
|
2435
2595
|
},
|
|
2436
2596
|
ownKeys(t) {
|
|
2437
|
-
return Reflect.ownKeys(
|
|
2597
|
+
return Reflect.ownKeys(Pt(t));
|
|
2438
2598
|
},
|
|
2439
2599
|
set(t, r, n) {
|
|
2440
|
-
const i =
|
|
2600
|
+
const i = li(Pt(t), r);
|
|
2441
2601
|
if (i != null && i.set)
|
|
2442
2602
|
return i.set.call(t.draft_, n), !0;
|
|
2443
2603
|
if (!t.modified_) {
|
|
2444
|
-
const s = nn(
|
|
2604
|
+
const s = nn(Pt(t), r), c = s == null ? void 0 : s[nt];
|
|
2445
2605
|
if (c && c.base_ === n)
|
|
2446
2606
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
|
2447
|
-
if (
|
|
2607
|
+
if (oa(n, s) && (n !== void 0 || Ie(t.base_, r)))
|
|
2448
2608
|
return !0;
|
|
2449
|
-
an(t),
|
|
2609
|
+
an(t), vn(t);
|
|
2450
2610
|
}
|
|
2451
2611
|
return t.copy_[r] === n && // special case: handle new props with value 'undefined'
|
|
2452
2612
|
(n !== void 0 || r in t.copy_) || // special case: NaN
|
|
2453
2613
|
Number.isNaN(n) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = n, t.assigned_[r] = !0), !0;
|
|
2454
2614
|
},
|
|
2455
2615
|
deleteProperty(t, r) {
|
|
2456
|
-
return nn(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, an(t),
|
|
2616
|
+
return nn(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, an(t), vn(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
|
|
2457
2617
|
},
|
|
2458
2618
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
2459
2619
|
// the same guarantee in ES5 mode.
|
|
2460
2620
|
getOwnPropertyDescriptor(t, r) {
|
|
2461
|
-
const n =
|
|
2621
|
+
const n = Pt(t), i = Reflect.getOwnPropertyDescriptor(n, r);
|
|
2462
2622
|
return i && {
|
|
2463
2623
|
writable: !0,
|
|
2464
2624
|
configurable: t.type_ !== 1 || r !== "length",
|
|
@@ -2467,108 +2627,108 @@ var Sn = {
|
|
|
2467
2627
|
};
|
|
2468
2628
|
},
|
|
2469
2629
|
defineProperty() {
|
|
2470
|
-
|
|
2630
|
+
$(11);
|
|
2471
2631
|
},
|
|
2472
2632
|
getPrototypeOf(t) {
|
|
2473
|
-
return
|
|
2633
|
+
return Ct(t.base_);
|
|
2474
2634
|
},
|
|
2475
2635
|
setPrototypeOf() {
|
|
2476
|
-
|
|
2636
|
+
$(12);
|
|
2477
2637
|
}
|
|
2478
|
-
},
|
|
2479
|
-
|
|
2480
|
-
|
|
2638
|
+
}, Se = {};
|
|
2639
|
+
_e(Mn, (t, r) => {
|
|
2640
|
+
Se[t] = function() {
|
|
2481
2641
|
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
|
2482
2642
|
};
|
|
2483
2643
|
});
|
|
2484
|
-
|
|
2485
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) &&
|
|
2644
|
+
Se.deleteProperty = function(t, r) {
|
|
2645
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && $(13), Se.set.call(this, t, r, void 0);
|
|
2486
2646
|
};
|
|
2487
|
-
|
|
2488
|
-
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) &&
|
|
2647
|
+
Se.set = function(t, r, n) {
|
|
2648
|
+
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && $(14), Mn.set.call(this, t[0], r, n, t[0]);
|
|
2489
2649
|
};
|
|
2490
2650
|
function nn(t, r) {
|
|
2491
|
-
const n = t[
|
|
2492
|
-
return (n ?
|
|
2651
|
+
const n = t[nt];
|
|
2652
|
+
return (n ? Pt(n) : t)[r];
|
|
2493
2653
|
}
|
|
2494
|
-
function
|
|
2654
|
+
function pa(t, r, n) {
|
|
2495
2655
|
var s;
|
|
2496
|
-
const i =
|
|
2656
|
+
const i = li(r, n);
|
|
2497
2657
|
return i ? "value" in i ? i.value : (
|
|
2498
2658
|
// This is a very special case, if the prop is a getter defined by the
|
|
2499
2659
|
// prototype, we should invoke it with the draft as context!
|
|
2500
2660
|
(s = i.get) == null ? void 0 : s.call(t.draft_)
|
|
2501
2661
|
) : void 0;
|
|
2502
2662
|
}
|
|
2503
|
-
function
|
|
2663
|
+
function li(t, r) {
|
|
2504
2664
|
if (!(r in t))
|
|
2505
2665
|
return;
|
|
2506
|
-
let n =
|
|
2666
|
+
let n = Ct(t);
|
|
2507
2667
|
for (; n; ) {
|
|
2508
2668
|
const i = Object.getOwnPropertyDescriptor(n, r);
|
|
2509
2669
|
if (i)
|
|
2510
2670
|
return i;
|
|
2511
|
-
n =
|
|
2671
|
+
n = Ct(n);
|
|
2512
2672
|
}
|
|
2513
2673
|
}
|
|
2514
|
-
function
|
|
2515
|
-
t.modified_ || (t.modified_ = !0, t.parent_ &&
|
|
2674
|
+
function vn(t) {
|
|
2675
|
+
t.modified_ || (t.modified_ = !0, t.parent_ && vn(t.parent_));
|
|
2516
2676
|
}
|
|
2517
2677
|
function an(t) {
|
|
2518
|
-
t.copy_ || (t.copy_ =
|
|
2678
|
+
t.copy_ || (t.copy_ = bn(
|
|
2519
2679
|
t.base_,
|
|
2520
2680
|
t.scope_.immer_.useStrictShallowCopy_
|
|
2521
2681
|
));
|
|
2522
2682
|
}
|
|
2523
|
-
var
|
|
2683
|
+
var ha = class {
|
|
2524
2684
|
constructor(t) {
|
|
2525
2685
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, n, i) => {
|
|
2526
2686
|
if (typeof r == "function" && typeof n != "function") {
|
|
2527
2687
|
const c = n;
|
|
2528
2688
|
n = r;
|
|
2529
|
-
const
|
|
2530
|
-
return function(
|
|
2531
|
-
return
|
|
2689
|
+
const h = this;
|
|
2690
|
+
return function(P = c, ...F) {
|
|
2691
|
+
return h.produce(P, (E) => n.call(this, E, ...F));
|
|
2532
2692
|
};
|
|
2533
2693
|
}
|
|
2534
|
-
typeof n != "function" &&
|
|
2694
|
+
typeof n != "function" && $(6), i !== void 0 && typeof i != "function" && $(7);
|
|
2535
2695
|
let s;
|
|
2536
|
-
if (
|
|
2537
|
-
const c =
|
|
2538
|
-
let
|
|
2696
|
+
if (wt(r)) {
|
|
2697
|
+
const c = Hn(this), h = Sn(r, void 0);
|
|
2698
|
+
let m = !0;
|
|
2539
2699
|
try {
|
|
2540
|
-
s = n(
|
|
2700
|
+
s = n(h), m = !1;
|
|
2541
2701
|
} finally {
|
|
2542
|
-
|
|
2702
|
+
m ? _n(c) : In(c);
|
|
2543
2703
|
}
|
|
2544
|
-
return zn(c, i),
|
|
2704
|
+
return zn(c, i), Nn(s, c);
|
|
2545
2705
|
} else if (!r || typeof r != "object") {
|
|
2546
|
-
if (s = n(r), s === void 0 && (s = r), s ===
|
|
2547
|
-
const c = [],
|
|
2548
|
-
|
|
2706
|
+
if (s = n(r), s === void 0 && (s = r), s === Tn && (s = void 0), this.autoFreeze_ && En(s, !0), i) {
|
|
2707
|
+
const c = [], h = [];
|
|
2708
|
+
jt("Patches").generateReplacementPatches_(r, s, c, h), i(c, h);
|
|
2549
2709
|
}
|
|
2550
2710
|
return s;
|
|
2551
2711
|
} else
|
|
2552
|
-
|
|
2712
|
+
$(1, r);
|
|
2553
2713
|
}, this.produceWithPatches = (r, n) => {
|
|
2554
2714
|
if (typeof r == "function")
|
|
2555
|
-
return (
|
|
2715
|
+
return (h, ...m) => this.produceWithPatches(h, (P) => r(P, ...m));
|
|
2556
2716
|
let i, s;
|
|
2557
|
-
return [this.produce(r, n, (
|
|
2558
|
-
i =
|
|
2717
|
+
return [this.produce(r, n, (h, m) => {
|
|
2718
|
+
i = h, s = m;
|
|
2559
2719
|
}), i, s];
|
|
2560
2720
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
|
2561
2721
|
}
|
|
2562
2722
|
createDraft(t) {
|
|
2563
|
-
|
|
2564
|
-
const r =
|
|
2565
|
-
return n[
|
|
2723
|
+
wt(t) || $(8), Rt(t) && (t = ma(t));
|
|
2724
|
+
const r = Hn(this), n = Sn(t, void 0);
|
|
2725
|
+
return n[nt].isManual_ = !0, In(r), n;
|
|
2566
2726
|
}
|
|
2567
2727
|
finishDraft(t, r) {
|
|
2568
|
-
const n = t && t[
|
|
2569
|
-
(!n || !n.isManual_) &&
|
|
2728
|
+
const n = t && t[nt];
|
|
2729
|
+
(!n || !n.isManual_) && $(9);
|
|
2570
2730
|
const { scope_: i } = n;
|
|
2571
|
-
return zn(i, r),
|
|
2731
|
+
return zn(i, r), Nn(void 0, i);
|
|
2572
2732
|
}
|
|
2573
2733
|
/**
|
|
2574
2734
|
* Pass true to automatically freeze all copies created by Immer.
|
|
@@ -2596,242 +2756,242 @@ var ca = class {
|
|
|
2596
2756
|
}
|
|
2597
2757
|
}
|
|
2598
2758
|
n > -1 && (r = r.slice(n + 1));
|
|
2599
|
-
const i =
|
|
2600
|
-
return
|
|
2759
|
+
const i = jt("Patches").applyPatches_;
|
|
2760
|
+
return Rt(t) ? i(t, r) : this.produce(
|
|
2601
2761
|
t,
|
|
2602
2762
|
(s) => i(s, r)
|
|
2603
2763
|
);
|
|
2604
2764
|
}
|
|
2605
2765
|
};
|
|
2606
|
-
function
|
|
2607
|
-
const n =
|
|
2608
|
-
return (r ? r.scope_ :
|
|
2766
|
+
function Sn(t, r) {
|
|
2767
|
+
const n = Te(t) ? jt("MapSet").proxyMap_(t, r) : Ee(t) ? jt("MapSet").proxySet_(t, r) : da(t, r);
|
|
2768
|
+
return (r ? r.scope_ : ui()).drafts_.push(n), n;
|
|
2609
2769
|
}
|
|
2610
|
-
function
|
|
2611
|
-
return
|
|
2770
|
+
function ma(t) {
|
|
2771
|
+
return Rt(t) || $(10, t), fi(t);
|
|
2612
2772
|
}
|
|
2613
|
-
function
|
|
2614
|
-
if (!
|
|
2773
|
+
function fi(t) {
|
|
2774
|
+
if (!wt(t) || cr(t))
|
|
2615
2775
|
return t;
|
|
2616
|
-
const r = t[
|
|
2776
|
+
const r = t[nt];
|
|
2617
2777
|
let n;
|
|
2618
2778
|
if (r) {
|
|
2619
2779
|
if (!r.modified_)
|
|
2620
2780
|
return r.base_;
|
|
2621
|
-
r.finalized_ = !0, n =
|
|
2781
|
+
r.finalized_ = !0, n = bn(t, r.scope_.immer_.useStrictShallowCopy_);
|
|
2622
2782
|
} else
|
|
2623
|
-
n =
|
|
2624
|
-
return
|
|
2625
|
-
|
|
2783
|
+
n = bn(t, !0);
|
|
2784
|
+
return _e(n, (i, s) => {
|
|
2785
|
+
ci(n, i, fi(s));
|
|
2626
2786
|
}), r && (r.finalized_ = !1), n;
|
|
2627
2787
|
}
|
|
2628
|
-
function
|
|
2629
|
-
process.env.NODE_ENV !== "production" &&
|
|
2788
|
+
function Un() {
|
|
2789
|
+
process.env.NODE_ENV !== "production" && si.push(
|
|
2630
2790
|
'Sets cannot have "replace" patches.',
|
|
2631
|
-
function(
|
|
2632
|
-
return "Unsupported patch operation: " +
|
|
2791
|
+
function(b) {
|
|
2792
|
+
return "Unsupported patch operation: " + b;
|
|
2633
2793
|
},
|
|
2634
|
-
function(
|
|
2635
|
-
return "Cannot apply patch, path doesn't resolve: " +
|
|
2794
|
+
function(b) {
|
|
2795
|
+
return "Cannot apply patch, path doesn't resolve: " + b;
|
|
2636
2796
|
},
|
|
2637
2797
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
|
2638
2798
|
);
|
|
2639
2799
|
const r = "replace", n = "add", i = "remove";
|
|
2640
|
-
function s(
|
|
2641
|
-
switch (
|
|
2800
|
+
function s(b, d, f, p) {
|
|
2801
|
+
switch (b.type_) {
|
|
2642
2802
|
case 0:
|
|
2643
2803
|
case 2:
|
|
2644
|
-
return
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2804
|
+
return h(
|
|
2805
|
+
b,
|
|
2806
|
+
d,
|
|
2807
|
+
f,
|
|
2808
|
+
p
|
|
2649
2809
|
);
|
|
2650
2810
|
case 1:
|
|
2651
|
-
return c(
|
|
2811
|
+
return c(b, d, f, p);
|
|
2652
2812
|
case 3:
|
|
2653
|
-
return
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2813
|
+
return m(
|
|
2814
|
+
b,
|
|
2815
|
+
d,
|
|
2816
|
+
f,
|
|
2817
|
+
p
|
|
2658
2818
|
);
|
|
2659
2819
|
}
|
|
2660
2820
|
}
|
|
2661
|
-
function c(
|
|
2662
|
-
let { base_:
|
|
2663
|
-
|
|
2664
|
-
for (let
|
|
2665
|
-
if (S[
|
|
2666
|
-
const
|
|
2667
|
-
|
|
2821
|
+
function c(b, d, f, p) {
|
|
2822
|
+
let { base_: g, assigned_: S } = b, _ = b.copy_;
|
|
2823
|
+
_.length < g.length && ([g, _] = [_, g], [f, p] = [p, f]);
|
|
2824
|
+
for (let y = 0; y < g.length; y++)
|
|
2825
|
+
if (S[y] && _[y] !== g[y]) {
|
|
2826
|
+
const l = d.concat([y]);
|
|
2827
|
+
f.push({
|
|
2668
2828
|
op: r,
|
|
2669
|
-
path:
|
|
2829
|
+
path: l,
|
|
2670
2830
|
// Need to maybe clone it, as it can in fact be the original value
|
|
2671
2831
|
// due to the base/copy inversion at the start of this function
|
|
2672
|
-
value:
|
|
2673
|
-
}),
|
|
2832
|
+
value: N(_[y])
|
|
2833
|
+
}), p.push({
|
|
2674
2834
|
op: r,
|
|
2675
|
-
path:
|
|
2676
|
-
value:
|
|
2835
|
+
path: l,
|
|
2836
|
+
value: N(g[y])
|
|
2677
2837
|
});
|
|
2678
2838
|
}
|
|
2679
|
-
for (let
|
|
2680
|
-
const
|
|
2681
|
-
|
|
2839
|
+
for (let y = g.length; y < _.length; y++) {
|
|
2840
|
+
const l = d.concat([y]);
|
|
2841
|
+
f.push({
|
|
2682
2842
|
op: n,
|
|
2683
|
-
path:
|
|
2843
|
+
path: l,
|
|
2684
2844
|
// Need to maybe clone it, as it can in fact be the original value
|
|
2685
2845
|
// due to the base/copy inversion at the start of this function
|
|
2686
|
-
value:
|
|
2846
|
+
value: N(_[y])
|
|
2687
2847
|
});
|
|
2688
2848
|
}
|
|
2689
|
-
for (let
|
|
2690
|
-
const
|
|
2691
|
-
|
|
2849
|
+
for (let y = _.length - 1; g.length <= y; --y) {
|
|
2850
|
+
const l = d.concat([y]);
|
|
2851
|
+
p.push({
|
|
2692
2852
|
op: i,
|
|
2693
|
-
path:
|
|
2853
|
+
path: l
|
|
2694
2854
|
});
|
|
2695
2855
|
}
|
|
2696
2856
|
}
|
|
2697
|
-
function
|
|
2698
|
-
const { base_:
|
|
2699
|
-
|
|
2700
|
-
const
|
|
2701
|
-
if (
|
|
2857
|
+
function h(b, d, f, p) {
|
|
2858
|
+
const { base_: g, copy_: S } = b;
|
|
2859
|
+
_e(b.assigned_, (_, y) => {
|
|
2860
|
+
const l = rn(g, _), x = rn(S, _), M = y ? Ie(g, _) ? r : n : i;
|
|
2861
|
+
if (l === x && M === r)
|
|
2702
2862
|
return;
|
|
2703
|
-
const
|
|
2704
|
-
|
|
2705
|
-
|
|
2863
|
+
const I = d.concat(_);
|
|
2864
|
+
f.push(M === i ? { op: M, path: I } : { op: M, path: I, value: x }), p.push(
|
|
2865
|
+
M === n ? { op: i, path: I } : M === i ? { op: n, path: I, value: N(l) } : { op: r, path: I, value: N(l) }
|
|
2706
2866
|
);
|
|
2707
2867
|
});
|
|
2708
2868
|
}
|
|
2709
|
-
function
|
|
2710
|
-
let { base_:
|
|
2711
|
-
|
|
2712
|
-
if (!S.has(
|
|
2713
|
-
const
|
|
2714
|
-
|
|
2869
|
+
function m(b, d, f, p) {
|
|
2870
|
+
let { base_: g, copy_: S } = b, _ = 0;
|
|
2871
|
+
g.forEach((y) => {
|
|
2872
|
+
if (!S.has(y)) {
|
|
2873
|
+
const l = d.concat([_]);
|
|
2874
|
+
f.push({
|
|
2715
2875
|
op: i,
|
|
2716
|
-
path:
|
|
2717
|
-
value:
|
|
2718
|
-
}),
|
|
2876
|
+
path: l,
|
|
2877
|
+
value: y
|
|
2878
|
+
}), p.unshift({
|
|
2719
2879
|
op: n,
|
|
2720
|
-
path:
|
|
2721
|
-
value:
|
|
2880
|
+
path: l,
|
|
2881
|
+
value: y
|
|
2722
2882
|
});
|
|
2723
2883
|
}
|
|
2724
|
-
|
|
2725
|
-
}),
|
|
2726
|
-
if (!
|
|
2727
|
-
const
|
|
2728
|
-
|
|
2884
|
+
_++;
|
|
2885
|
+
}), _ = 0, S.forEach((y) => {
|
|
2886
|
+
if (!g.has(y)) {
|
|
2887
|
+
const l = d.concat([_]);
|
|
2888
|
+
f.push({
|
|
2729
2889
|
op: n,
|
|
2730
|
-
path:
|
|
2731
|
-
value:
|
|
2732
|
-
}),
|
|
2890
|
+
path: l,
|
|
2891
|
+
value: y
|
|
2892
|
+
}), p.unshift({
|
|
2733
2893
|
op: i,
|
|
2734
|
-
path:
|
|
2735
|
-
value:
|
|
2894
|
+
path: l,
|
|
2895
|
+
value: y
|
|
2736
2896
|
});
|
|
2737
2897
|
}
|
|
2738
|
-
|
|
2898
|
+
_++;
|
|
2739
2899
|
});
|
|
2740
2900
|
}
|
|
2741
|
-
function
|
|
2742
|
-
|
|
2901
|
+
function P(b, d, f, p) {
|
|
2902
|
+
f.push({
|
|
2743
2903
|
op: r,
|
|
2744
2904
|
path: [],
|
|
2745
|
-
value:
|
|
2746
|
-
}),
|
|
2905
|
+
value: d === Tn ? void 0 : d
|
|
2906
|
+
}), p.push({
|
|
2747
2907
|
op: r,
|
|
2748
2908
|
path: [],
|
|
2749
|
-
value:
|
|
2909
|
+
value: b
|
|
2750
2910
|
});
|
|
2751
2911
|
}
|
|
2752
|
-
function F(
|
|
2753
|
-
return
|
|
2754
|
-
const { path:
|
|
2755
|
-
let S =
|
|
2756
|
-
for (let
|
|
2757
|
-
const
|
|
2758
|
-
let
|
|
2759
|
-
typeof
|
|
2912
|
+
function F(b, d) {
|
|
2913
|
+
return d.forEach((f) => {
|
|
2914
|
+
const { path: p, op: g } = f;
|
|
2915
|
+
let S = b;
|
|
2916
|
+
for (let x = 0; x < p.length - 1; x++) {
|
|
2917
|
+
const M = Ft(S);
|
|
2918
|
+
let I = p[x];
|
|
2919
|
+
typeof I != "string" && typeof I != "number" && (I = "" + I), (M === 0 || M === 1) && (I === "__proto__" || I === "constructor") && $(19), typeof S == "function" && I === "prototype" && $(19), S = rn(S, I), typeof S != "object" && $(18, p.join("/"));
|
|
2760
2920
|
}
|
|
2761
|
-
const
|
|
2762
|
-
switch (
|
|
2921
|
+
const _ = Ft(S), y = E(f.value), l = p[p.length - 1];
|
|
2922
|
+
switch (g) {
|
|
2763
2923
|
case r:
|
|
2764
|
-
switch (
|
|
2924
|
+
switch (_) {
|
|
2765
2925
|
case 2:
|
|
2766
|
-
return S.set(
|
|
2926
|
+
return S.set(l, y);
|
|
2767
2927
|
case 3:
|
|
2768
|
-
|
|
2928
|
+
$(16);
|
|
2769
2929
|
default:
|
|
2770
|
-
return S[
|
|
2930
|
+
return S[l] = y;
|
|
2771
2931
|
}
|
|
2772
2932
|
case n:
|
|
2773
|
-
switch (
|
|
2933
|
+
switch (_) {
|
|
2774
2934
|
case 1:
|
|
2775
|
-
return
|
|
2935
|
+
return l === "-" ? S.push(y) : S.splice(l, 0, y);
|
|
2776
2936
|
case 2:
|
|
2777
|
-
return S.set(
|
|
2937
|
+
return S.set(l, y);
|
|
2778
2938
|
case 3:
|
|
2779
|
-
return S.add(
|
|
2939
|
+
return S.add(y);
|
|
2780
2940
|
default:
|
|
2781
|
-
return S[
|
|
2941
|
+
return S[l] = y;
|
|
2782
2942
|
}
|
|
2783
2943
|
case i:
|
|
2784
|
-
switch (
|
|
2944
|
+
switch (_) {
|
|
2785
2945
|
case 1:
|
|
2786
|
-
return S.splice(
|
|
2946
|
+
return S.splice(l, 1);
|
|
2787
2947
|
case 2:
|
|
2788
|
-
return S.delete(
|
|
2948
|
+
return S.delete(l);
|
|
2789
2949
|
case 3:
|
|
2790
|
-
return S.delete(
|
|
2950
|
+
return S.delete(f.value);
|
|
2791
2951
|
default:
|
|
2792
|
-
return delete S[
|
|
2952
|
+
return delete S[l];
|
|
2793
2953
|
}
|
|
2794
2954
|
default:
|
|
2795
|
-
|
|
2955
|
+
$(17, g);
|
|
2796
2956
|
}
|
|
2797
|
-
}),
|
|
2798
|
-
}
|
|
2799
|
-
function
|
|
2800
|
-
if (!
|
|
2801
|
-
return
|
|
2802
|
-
if (Array.isArray(
|
|
2803
|
-
return
|
|
2804
|
-
if (
|
|
2957
|
+
}), b;
|
|
2958
|
+
}
|
|
2959
|
+
function E(b) {
|
|
2960
|
+
if (!wt(b))
|
|
2961
|
+
return b;
|
|
2962
|
+
if (Array.isArray(b))
|
|
2963
|
+
return b.map(E);
|
|
2964
|
+
if (Te(b))
|
|
2805
2965
|
return new Map(
|
|
2806
|
-
Array.from(
|
|
2966
|
+
Array.from(b.entries()).map(([f, p]) => [f, E(p)])
|
|
2807
2967
|
);
|
|
2808
|
-
if (
|
|
2809
|
-
return new Set(Array.from(
|
|
2810
|
-
const
|
|
2811
|
-
for (const
|
|
2812
|
-
|
|
2813
|
-
return
|
|
2968
|
+
if (Ee(b))
|
|
2969
|
+
return new Set(Array.from(b).map(E));
|
|
2970
|
+
const d = Object.create(Ct(b));
|
|
2971
|
+
for (const f in b)
|
|
2972
|
+
d[f] = E(b[f]);
|
|
2973
|
+
return Ie(b, ge) && (d[ge] = b[ge]), d;
|
|
2814
2974
|
}
|
|
2815
|
-
function
|
|
2816
|
-
return
|
|
2975
|
+
function N(b) {
|
|
2976
|
+
return Rt(b) ? E(b) : b;
|
|
2817
2977
|
}
|
|
2818
|
-
|
|
2978
|
+
ua("Patches", {
|
|
2819
2979
|
applyPatches_: F,
|
|
2820
2980
|
generatePatches_: s,
|
|
2821
|
-
generateReplacementPatches_:
|
|
2981
|
+
generateReplacementPatches_: P
|
|
2822
2982
|
});
|
|
2823
2983
|
}
|
|
2824
|
-
var
|
|
2825
|
-
|
|
2826
|
-
|
|
2984
|
+
var it = new ha(), ya = it.produce;
|
|
2985
|
+
it.produceWithPatches.bind(
|
|
2986
|
+
it
|
|
2827
2987
|
);
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
var
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
var
|
|
2834
|
-
function
|
|
2988
|
+
it.setAutoFreeze.bind(it);
|
|
2989
|
+
it.setUseStrictShallowCopy.bind(it);
|
|
2990
|
+
var ba = it.applyPatches.bind(it);
|
|
2991
|
+
it.createDraft.bind(it);
|
|
2992
|
+
it.finishDraft.bind(it);
|
|
2993
|
+
var ga = 1 / 0, _a = 9007199254740991, Ia = "[object Arguments]", va = "[object Function]", Sa = "[object GeneratorFunction]", wa = "[object Symbol]", ka = typeof st == "object" && st && st.Object === Object && st, Ta = typeof self == "object" && self && self.Object === Object && self, Ea = ka || Ta || Function("return this")();
|
|
2994
|
+
function Ma(t, r, n) {
|
|
2835
2995
|
switch (n.length) {
|
|
2836
2996
|
case 0:
|
|
2837
2997
|
return t.call(r);
|
|
@@ -2844,91 +3004,91 @@ function Ia(t, r, n) {
|
|
|
2844
3004
|
}
|
|
2845
3005
|
return t.apply(r, n);
|
|
2846
3006
|
}
|
|
2847
|
-
function
|
|
3007
|
+
function Aa(t, r) {
|
|
2848
3008
|
for (var n = -1, i = t ? t.length : 0, s = Array(i); ++n < i; )
|
|
2849
3009
|
s[n] = r(t[n], n, t);
|
|
2850
3010
|
return s;
|
|
2851
3011
|
}
|
|
2852
|
-
function
|
|
3012
|
+
function Oa(t, r) {
|
|
2853
3013
|
for (var n = -1, i = r.length, s = t.length; ++n < i; )
|
|
2854
3014
|
t[s + n] = r[n];
|
|
2855
3015
|
return t;
|
|
2856
3016
|
}
|
|
2857
|
-
var
|
|
2858
|
-
function
|
|
2859
|
-
var c = -1,
|
|
2860
|
-
for (n || (n =
|
|
2861
|
-
var
|
|
2862
|
-
n(
|
|
3017
|
+
var An = Object.prototype, xa = An.hasOwnProperty, On = An.toString, Wn = Ea.Symbol, Da = An.propertyIsEnumerable, Gn = Wn ? Wn.isConcatSpreadable : void 0, Bn = Math.max;
|
|
3018
|
+
function Pa(t, r, n, i, s) {
|
|
3019
|
+
var c = -1, h = t.length;
|
|
3020
|
+
for (n || (n = ja), s || (s = []); ++c < h; ) {
|
|
3021
|
+
var m = t[c];
|
|
3022
|
+
n(m) ? Oa(s, m) : s[s.length] = m;
|
|
2863
3023
|
}
|
|
2864
3024
|
return s;
|
|
2865
3025
|
}
|
|
2866
|
-
function
|
|
2867
|
-
return t = Object(t),
|
|
3026
|
+
function Ca(t, r) {
|
|
3027
|
+
return t = Object(t), Ra(t, r, function(n, i) {
|
|
2868
3028
|
return i in t;
|
|
2869
3029
|
});
|
|
2870
3030
|
}
|
|
2871
|
-
function
|
|
3031
|
+
function Ra(t, r, n) {
|
|
2872
3032
|
for (var i = -1, s = r.length, c = {}; ++i < s; ) {
|
|
2873
|
-
var
|
|
2874
|
-
n(
|
|
3033
|
+
var h = r[i], m = t[h];
|
|
3034
|
+
n(m, h) && (c[h] = m);
|
|
2875
3035
|
}
|
|
2876
3036
|
return c;
|
|
2877
3037
|
}
|
|
2878
|
-
function
|
|
3038
|
+
function Fa(t, r) {
|
|
2879
3039
|
return r = Bn(r === void 0 ? t.length - 1 : r, 0), function() {
|
|
2880
3040
|
for (var n = arguments, i = -1, s = Bn(n.length - r, 0), c = Array(s); ++i < s; )
|
|
2881
3041
|
c[i] = n[r + i];
|
|
2882
3042
|
i = -1;
|
|
2883
|
-
for (var
|
|
2884
|
-
|
|
2885
|
-
return
|
|
3043
|
+
for (var h = Array(r + 1); ++i < r; )
|
|
3044
|
+
h[i] = n[i];
|
|
3045
|
+
return h[r] = c, Ma(t, this, h);
|
|
2886
3046
|
};
|
|
2887
3047
|
}
|
|
2888
|
-
function
|
|
2889
|
-
return
|
|
3048
|
+
function ja(t) {
|
|
3049
|
+
return Na(t) || Ha(t) || !!(Gn && t && t[Gn]);
|
|
2890
3050
|
}
|
|
2891
|
-
function
|
|
2892
|
-
if (typeof t == "string" ||
|
|
3051
|
+
function za(t) {
|
|
3052
|
+
if (typeof t == "string" || $a(t))
|
|
2893
3053
|
return t;
|
|
2894
3054
|
var r = t + "";
|
|
2895
|
-
return r == "0" && 1 / t == -
|
|
3055
|
+
return r == "0" && 1 / t == -ga ? "-0" : r;
|
|
2896
3056
|
}
|
|
2897
|
-
function
|
|
2898
|
-
return
|
|
3057
|
+
function Ha(t) {
|
|
3058
|
+
return Ua(t) && xa.call(t, "callee") && (!Da.call(t, "callee") || On.call(t) == Ia);
|
|
2899
3059
|
}
|
|
2900
|
-
var
|
|
2901
|
-
function
|
|
2902
|
-
return t != null &&
|
|
3060
|
+
var Na = Array.isArray;
|
|
3061
|
+
function La(t) {
|
|
3062
|
+
return t != null && Ga(t.length) && !Wa(t);
|
|
2903
3063
|
}
|
|
2904
|
-
function
|
|
2905
|
-
return
|
|
3064
|
+
function Ua(t) {
|
|
3065
|
+
return di(t) && La(t);
|
|
2906
3066
|
}
|
|
2907
|
-
function
|
|
2908
|
-
var r =
|
|
2909
|
-
return r ==
|
|
3067
|
+
function Wa(t) {
|
|
3068
|
+
var r = Ba(t) ? On.call(t) : "";
|
|
3069
|
+
return r == va || r == Sa;
|
|
2910
3070
|
}
|
|
2911
|
-
function
|
|
2912
|
-
return typeof t == "number" && t > -1 && t % 1 == 0 && t <=
|
|
3071
|
+
function Ga(t) {
|
|
3072
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= _a;
|
|
2913
3073
|
}
|
|
2914
|
-
function
|
|
3074
|
+
function Ba(t) {
|
|
2915
3075
|
var r = typeof t;
|
|
2916
3076
|
return !!t && (r == "object" || r == "function");
|
|
2917
3077
|
}
|
|
2918
|
-
function
|
|
3078
|
+
function di(t) {
|
|
2919
3079
|
return !!t && typeof t == "object";
|
|
2920
3080
|
}
|
|
2921
|
-
function
|
|
2922
|
-
return typeof t == "symbol" ||
|
|
3081
|
+
function $a(t) {
|
|
3082
|
+
return typeof t == "symbol" || di(t) && On.call(t) == wa;
|
|
2923
3083
|
}
|
|
2924
|
-
var
|
|
2925
|
-
return t == null ? {} :
|
|
2926
|
-
}),
|
|
2927
|
-
const $n = /* @__PURE__ */
|
|
3084
|
+
var Ka = Fa(function(t, r) {
|
|
3085
|
+
return t == null ? {} : Ca(t, Aa(Pa(r), za));
|
|
3086
|
+
}), Ya = Ka;
|
|
3087
|
+
const $n = /* @__PURE__ */ wn(Ya), Va = {
|
|
2928
3088
|
width: 1080,
|
|
2929
3089
|
height: 1920
|
|
2930
|
-
},
|
|
2931
|
-
size:
|
|
3090
|
+
}, Xa = {
|
|
3091
|
+
size: Va,
|
|
2932
3092
|
tracks: [],
|
|
2933
3093
|
trackItemIds: [],
|
|
2934
3094
|
trackItemsMap: {},
|
|
@@ -2951,22 +3111,22 @@ const $n = /* @__PURE__ */ gn(La), Ga = {
|
|
|
2951
3111
|
"transitionsMap",
|
|
2952
3112
|
"trackItemIds"
|
|
2953
3113
|
];
|
|
2954
|
-
class
|
|
3114
|
+
class Za {
|
|
2955
3115
|
constructor(r) {
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
const n = r ||
|
|
2963
|
-
this.stateSubject = new
|
|
3116
|
+
Dt(this, "stateSubject");
|
|
3117
|
+
Dt(this, "stateHistorySubject");
|
|
3118
|
+
Dt(this, "prevState");
|
|
3119
|
+
Dt(this, "undos", []);
|
|
3120
|
+
Dt(this, "redos", []);
|
|
3121
|
+
Dt(this, "listener");
|
|
3122
|
+
const n = r || Xa;
|
|
3123
|
+
this.stateSubject = new jn(n), this.stateHistorySubject = new jn({
|
|
2964
3124
|
handleRedo: !1,
|
|
2965
3125
|
handleUndo: !1
|
|
2966
3126
|
}), this.prevState = n, this.initListeners();
|
|
2967
3127
|
}
|
|
2968
3128
|
initListeners() {
|
|
2969
|
-
|
|
3129
|
+
ia(this);
|
|
2970
3130
|
}
|
|
2971
3131
|
destroyListeners() {
|
|
2972
3132
|
this.listener && this.listener.unsubscribe();
|
|
@@ -2975,7 +3135,7 @@ class Ka {
|
|
|
2975
3135
|
this.destroyListeners();
|
|
2976
3136
|
}
|
|
2977
3137
|
updateHistory(r, n) {
|
|
2978
|
-
const i = $n(r, Kn), s = $n(this.getState(), Kn), c =
|
|
3138
|
+
const i = $n(r, Kn), s = $n(this.getState(), Kn), c = ai(s, i);
|
|
2979
3139
|
c.length && (this.undos.push({ undos: c, type: n }), this.redos = []);
|
|
2980
3140
|
}
|
|
2981
3141
|
getStateHistory() {
|
|
@@ -2998,28 +3158,28 @@ class Ka {
|
|
|
2998
3158
|
...i,
|
|
2999
3159
|
...r
|
|
3000
3160
|
};
|
|
3001
|
-
|
|
3161
|
+
rt(i, s) || (n.updateHistory && this.updateHistory(s, n.kind), this.prevState = i, this.stateSubject.next(s));
|
|
3002
3162
|
}
|
|
3003
3163
|
// emit changes for design size
|
|
3004
3164
|
subscribeToSize(r) {
|
|
3005
3165
|
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3006
|
-
|
|
3166
|
+
rt(n.size, this.prevState.size) || r({ size: n.size });
|
|
3007
3167
|
});
|
|
3008
3168
|
}
|
|
3009
3169
|
// Selectively subscribe to scale changes
|
|
3010
3170
|
subscribeToScale(r) {
|
|
3011
3171
|
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3012
|
-
|
|
3172
|
+
rt(n.scale, this.prevState.scale) || r({ scale: n.scale });
|
|
3013
3173
|
});
|
|
3014
3174
|
}
|
|
3015
3175
|
subscribeToUpdateTrackItem(r) {
|
|
3016
3176
|
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3017
|
-
|
|
3177
|
+
rt(n.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: n.trackItemsMap });
|
|
3018
3178
|
});
|
|
3019
3179
|
}
|
|
3020
3180
|
subscribeToUpdateItemDetails(r) {
|
|
3021
3181
|
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3022
|
-
|
|
3182
|
+
rt(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
|
|
3023
3183
|
});
|
|
3024
3184
|
}
|
|
3025
3185
|
// Selectively subscribe to duration changes
|
|
@@ -3042,19 +3202,19 @@ class Ka {
|
|
|
3042
3202
|
}
|
|
3043
3203
|
subscribeToAddOrRemoveItems(r) {
|
|
3044
3204
|
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3045
|
-
|
|
3205
|
+
rt(n.trackItemIds, this.prevState.trackItemIds) || r({ trackItemIds: n.trackItemIds });
|
|
3046
3206
|
});
|
|
3047
3207
|
}
|
|
3048
3208
|
// Selectively subscribe to activeIds changes
|
|
3049
3209
|
subscribeToActiveIds(r) {
|
|
3050
3210
|
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3051
|
-
|
|
3211
|
+
rt(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
|
|
3052
3212
|
});
|
|
3053
3213
|
}
|
|
3054
3214
|
// Selectively subscribe to multiple track-related properties
|
|
3055
3215
|
subscribeToTracks(r) {
|
|
3056
3216
|
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3057
|
-
(!
|
|
3217
|
+
(!rt(n.tracks, this.prevState.tracks) || !rt(n.trackItemIds, this.prevState.trackItemIds) || !rt(n.trackItemsMap, this.prevState.trackItemsMap) || !rt(n.transitionIds, this.prevState.transitionIds) || !rt(n.transitionsMap, this.prevState.transitionsMap) || !rt(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap)) && r({
|
|
3058
3218
|
tracks: n.tracks,
|
|
3059
3219
|
trackItemIds: n.trackItemIds,
|
|
3060
3220
|
trackItemsMap: n.trackItemsMap,
|
|
@@ -3067,141 +3227,141 @@ class Ka {
|
|
|
3067
3227
|
undo() {
|
|
3068
3228
|
const r = this.undos.pop(), n = r == null ? void 0 : r.undos, i = r == null ? void 0 : r.type;
|
|
3069
3229
|
if (!n || !i) return;
|
|
3070
|
-
|
|
3230
|
+
Un();
|
|
3071
3231
|
const {
|
|
3072
3232
|
trackItemDetailsMap: s,
|
|
3073
3233
|
trackItemIds: c,
|
|
3074
|
-
tracks:
|
|
3075
|
-
transitionIds:
|
|
3076
|
-
transitionsMap:
|
|
3234
|
+
tracks: h,
|
|
3235
|
+
transitionIds: m,
|
|
3236
|
+
transitionsMap: P,
|
|
3077
3237
|
trackItemsMap: F
|
|
3078
|
-
} = this.getState(),
|
|
3238
|
+
} = this.getState(), E = B({
|
|
3079
3239
|
trackItemDetailsMap: s,
|
|
3080
3240
|
trackItemIds: c,
|
|
3081
|
-
tracks:
|
|
3082
|
-
transitionIds:
|
|
3083
|
-
transitionsMap:
|
|
3241
|
+
tracks: h,
|
|
3242
|
+
transitionIds: m,
|
|
3243
|
+
transitionsMap: P,
|
|
3084
3244
|
trackItemsMap: F
|
|
3085
|
-
}),
|
|
3245
|
+
}), N = [], b = [], d = [], f = [], p = [], g = [];
|
|
3086
3246
|
n.forEach((k) => {
|
|
3087
|
-
let
|
|
3088
|
-
const
|
|
3089
|
-
k.type === "CREATE" ?
|
|
3090
|
-
path:
|
|
3247
|
+
let v;
|
|
3248
|
+
const A = k.path.slice(1);
|
|
3249
|
+
k.type === "CREATE" ? v = {
|
|
3250
|
+
path: A,
|
|
3091
3251
|
op: "remove",
|
|
3092
3252
|
value: k.value
|
|
3093
|
-
} : k.type === "CHANGE" ?
|
|
3094
|
-
path:
|
|
3253
|
+
} : k.type === "CHANGE" ? v = {
|
|
3254
|
+
path: A,
|
|
3095
3255
|
op: "replace",
|
|
3096
3256
|
value: k.oldValue
|
|
3097
|
-
} :
|
|
3098
|
-
path:
|
|
3257
|
+
} : v = {
|
|
3258
|
+
path: A,
|
|
3099
3259
|
op: "add",
|
|
3100
3260
|
value: k.oldValue
|
|
3101
|
-
}, k.path.includes("trackItemIds") ?
|
|
3261
|
+
}, k.path.includes("trackItemIds") ? d.push(v) : k.path.includes("transitionIds") ? b.push(v) : k.path.includes("trackItemsMap") ? p.push(v) : k.path.includes("transitionsMap") ? f.push(v) : k.path.includes("tracks") ? N.push(v) : k.path.includes("trackItemDetailsMap") && g.push(v);
|
|
3102
3262
|
});
|
|
3103
3263
|
const S = this.applyPatch(
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
),
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
),
|
|
3110
|
-
|
|
3264
|
+
E.tracks,
|
|
3265
|
+
N
|
|
3266
|
+
), _ = this.applyPatch(
|
|
3267
|
+
E.transitionIds,
|
|
3268
|
+
b
|
|
3269
|
+
), y = this.applyPatch(
|
|
3270
|
+
E.trackItemIds,
|
|
3271
|
+
d
|
|
3272
|
+
), l = this.applyPatch(
|
|
3273
|
+
E.transitionsMap,
|
|
3274
|
+
f
|
|
3275
|
+
), x = this.applyPatch(
|
|
3276
|
+
E.trackItemsMap,
|
|
3111
3277
|
p
|
|
3112
|
-
),
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
),
|
|
3116
|
-
T.trackItemsMap,
|
|
3117
|
-
l
|
|
3118
|
-
), E = this.applyPatch(
|
|
3119
|
-
T.trackItemDetailsMap,
|
|
3120
|
-
m
|
|
3121
|
-
), _ = X({
|
|
3278
|
+
), M = this.applyPatch(
|
|
3279
|
+
E.trackItemDetailsMap,
|
|
3280
|
+
g
|
|
3281
|
+
), I = B({
|
|
3122
3282
|
tracks: S,
|
|
3123
|
-
transitionIds:
|
|
3124
|
-
trackItemIds:
|
|
3125
|
-
transitionsMap:
|
|
3126
|
-
trackItemsMap:
|
|
3127
|
-
trackItemDetailsMap:
|
|
3128
|
-
}),
|
|
3129
|
-
this.prevState =
|
|
3130
|
-
const
|
|
3131
|
-
this.stateSubject.next({ ...
|
|
3283
|
+
transitionIds: _,
|
|
3284
|
+
trackItemIds: y,
|
|
3285
|
+
transitionsMap: l,
|
|
3286
|
+
trackItemsMap: x,
|
|
3287
|
+
trackItemDetailsMap: M
|
|
3288
|
+
}), C = B(this.getState()), w = { ...C, ...I };
|
|
3289
|
+
this.prevState = C, this.redos.push({ redos: n, type: i });
|
|
3290
|
+
const D = qt(w.trackItemsMap);
|
|
3291
|
+
this.stateSubject.next({ ...w, duration: D }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
|
3132
3292
|
}
|
|
3133
3293
|
applyPatch(r, n) {
|
|
3134
|
-
return n.reverse().reduce((i, s) =>
|
|
3135
|
-
|
|
3294
|
+
return n.reverse().reduce((i, s) => ya(i, (c) => {
|
|
3295
|
+
ba(c, [s]);
|
|
3136
3296
|
}), r);
|
|
3137
3297
|
}
|
|
3138
3298
|
redo() {
|
|
3139
3299
|
const r = this.redos.pop(), n = r == null ? void 0 : r.redos, i = r == null ? void 0 : r.type;
|
|
3140
3300
|
if (!n || !i) return;
|
|
3141
|
-
|
|
3301
|
+
Un();
|
|
3142
3302
|
const {
|
|
3143
3303
|
trackItemDetailsMap: s,
|
|
3144
3304
|
trackItemIds: c,
|
|
3145
|
-
tracks:
|
|
3146
|
-
transitionIds:
|
|
3147
|
-
transitionsMap:
|
|
3305
|
+
tracks: h,
|
|
3306
|
+
transitionIds: m,
|
|
3307
|
+
transitionsMap: P,
|
|
3148
3308
|
trackItemsMap: F
|
|
3149
|
-
} = this.getState(),
|
|
3309
|
+
} = this.getState(), E = B({
|
|
3150
3310
|
trackItemDetailsMap: s,
|
|
3151
3311
|
trackItemIds: c,
|
|
3152
|
-
tracks:
|
|
3153
|
-
transitionIds:
|
|
3154
|
-
transitionsMap:
|
|
3312
|
+
tracks: h,
|
|
3313
|
+
transitionIds: m,
|
|
3314
|
+
transitionsMap: P,
|
|
3155
3315
|
trackItemsMap: F
|
|
3156
|
-
}),
|
|
3316
|
+
}), N = [], b = [], d = [], f = [], p = [], g = [];
|
|
3157
3317
|
n.forEach((k) => {
|
|
3158
|
-
let
|
|
3159
|
-
const
|
|
3160
|
-
k.type === "CREATE" ?
|
|
3161
|
-
path:
|
|
3318
|
+
let v;
|
|
3319
|
+
const A = k.path.slice(1);
|
|
3320
|
+
k.type === "CREATE" ? v = {
|
|
3321
|
+
path: A,
|
|
3162
3322
|
op: "add",
|
|
3163
3323
|
value: k.value
|
|
3164
|
-
} : k.type === "CHANGE" ?
|
|
3165
|
-
path:
|
|
3324
|
+
} : k.type === "CHANGE" ? v = {
|
|
3325
|
+
path: A,
|
|
3166
3326
|
op: "replace",
|
|
3167
3327
|
value: k.value
|
|
3168
|
-
} :
|
|
3169
|
-
path:
|
|
3328
|
+
} : v = {
|
|
3329
|
+
path: A,
|
|
3170
3330
|
op: "remove",
|
|
3171
3331
|
value: k.oldValue
|
|
3172
|
-
}, k.path.includes("trackItemIds") ?
|
|
3332
|
+
}, k.path.includes("trackItemIds") ? d.push(v) : k.path.includes("transitionIds") ? b.push(v) : k.path.includes("trackItemsMap") ? p.push(v) : k.path.includes("transitionsMap") ? f.push(v) : k.path.includes("trackItemDetailsMap") ? g.push(v) : N.push(v);
|
|
3173
3333
|
});
|
|
3174
3334
|
const S = this.applyPatch(
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
),
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
),
|
|
3181
|
-
|
|
3335
|
+
E.tracks,
|
|
3336
|
+
N
|
|
3337
|
+
), _ = this.applyPatch(
|
|
3338
|
+
E.transitionIds,
|
|
3339
|
+
b
|
|
3340
|
+
), y = this.applyPatch(
|
|
3341
|
+
E.trackItemIds,
|
|
3342
|
+
d
|
|
3343
|
+
), l = this.applyPatch(
|
|
3344
|
+
E.transitionsMap,
|
|
3345
|
+
f
|
|
3346
|
+
), x = this.applyPatch(
|
|
3347
|
+
E.trackItemsMap,
|
|
3182
3348
|
p
|
|
3183
|
-
),
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
),
|
|
3187
|
-
T.trackItemsMap,
|
|
3188
|
-
l
|
|
3189
|
-
), E = this.applyPatch(
|
|
3190
|
-
T.trackItemDetailsMap,
|
|
3191
|
-
m
|
|
3192
|
-
), _ = X({
|
|
3349
|
+
), M = this.applyPatch(
|
|
3350
|
+
E.trackItemDetailsMap,
|
|
3351
|
+
g
|
|
3352
|
+
), I = B({
|
|
3193
3353
|
tracks: S,
|
|
3194
|
-
transitionIds:
|
|
3195
|
-
trackItemIds:
|
|
3196
|
-
transitionsMap:
|
|
3197
|
-
trackItemsMap:
|
|
3198
|
-
trackItemDetailsMap:
|
|
3199
|
-
}),
|
|
3200
|
-
this.prevState =
|
|
3201
|
-
const
|
|
3202
|
-
this.stateSubject.next({ ...
|
|
3354
|
+
transitionIds: _,
|
|
3355
|
+
trackItemIds: y,
|
|
3356
|
+
transitionsMap: l,
|
|
3357
|
+
trackItemsMap: x,
|
|
3358
|
+
trackItemDetailsMap: M
|
|
3359
|
+
}), C = B(this.getState()), w = { ...C, ...I };
|
|
3360
|
+
this.prevState = C, this.undos.push({ undos: n, type: i });
|
|
3361
|
+
const D = qt(w.trackItemsMap);
|
|
3362
|
+
this.stateSubject.next({ ...w, duration: D }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
|
3203
3363
|
}
|
|
3204
3364
|
}
|
|
3205
3365
|
export {
|
|
3206
|
-
|
|
3366
|
+
Za as default
|
|
3207
3367
|
};
|