@designcombo/state 0.1.29 → 0.1.31
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 +1500 -1336
- 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]", v = "[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]", S = "[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[S] = 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 : v : 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 S:
|
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))) != S || 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 S;
|
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]", v = "[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]", S = "[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[v] = L[_] = L[y] = L[S] = 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()) != v || 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
|
1316
|
+
case oe:
|
1317
|
+
return M;
|
1318
|
+
case Mt:
|
1319
|
+
return b;
|
1320
|
+
case ce:
|
1321
|
+
return p;
|
1322
|
+
case ue:
|
1323
|
+
return v;
|
1324
|
+
case le:
|
1321
1325
|
return l;
|
1322
|
-
case ie:
|
1323
|
-
return S;
|
1324
|
-
case ae:
|
1325
|
-
return d;
|
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 S:
|
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:
|
1362
|
+
return Ge(e);
|
1359
1363
|
case v:
|
1360
|
-
return
|
1361
|
-
case
|
1362
|
-
return
|
1363
|
-
case S:
|
1364
|
-
return Hr(e, u, o);
|
1365
|
-
case b:
|
1366
|
-
return Ur(e);
|
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,181 @@ 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
|
+
if (i !== void 0 || s !== void 0) {
|
1821
|
+
const E = r.find((b, d) => {
|
1822
|
+
if (i !== void 0 && b.id === i) return b;
|
1823
|
+
if (s !== void 0 && d === s) return b;
|
1824
|
+
});
|
1825
|
+
if (!E) return;
|
1826
|
+
c = E.items.map((b) => n[b]).some((b) => {
|
1827
|
+
const d = b.display.from, f = b.display.to;
|
1828
|
+
return d <= P && f >= F;
|
1829
|
+
});
|
1830
|
+
}
|
1831
|
+
}), c;
|
1832
|
+
};
|
1833
|
+
function ia(t) {
|
1834
|
+
const r = Vt.pipe(
|
1835
|
+
Xt(({ key: d }) => d.startsWith(mi))
|
1836
|
+
), n = Vt.pipe(
|
1837
|
+
Xt(({ key: d }) => d.startsWith(yi))
|
1838
|
+
), i = Vt.pipe(
|
1839
|
+
Xt(({ key: d }) => d.startsWith(bi))
|
1840
|
+
), s = Vt.pipe(
|
1841
|
+
Xt(({ key: d }) => d.startsWith(gi))
|
1842
|
+
), c = Vt.pipe(
|
1843
|
+
Xt(({ key: d }) => d.startsWith(_i))
|
1844
|
+
), h = Vt.pipe(
|
1845
|
+
Xt(({ key: d }) => d.startsWith(Ii))
|
1846
|
+
), m = r.subscribe(async (d) => {
|
1847
|
+
var f, p;
|
1848
|
+
if (d.key === vi) {
|
1849
|
+
const g = (f = d.value) == null ? void 0 : f.payload, v = g.size, _ = g.trackItemIds, y = g.trackItemsMap, l = g.trackItemDetailsMap;
|
1781
1850
|
console.warn("IMPROVE FONTS LOADING");
|
1782
|
-
const
|
1783
|
-
var
|
1851
|
+
const x = _.map(async (I) => {
|
1852
|
+
var C;
|
1784
1853
|
try {
|
1785
|
-
const
|
1786
|
-
if (
|
1787
|
-
const k = await
|
1788
|
-
{ id:
|
1854
|
+
const w = l[I], D = y[I];
|
1855
|
+
if (w.type === "image") {
|
1856
|
+
const k = await hn(
|
1857
|
+
{ id: I, details: w.details, ...D },
|
1789
1858
|
{
|
1790
|
-
size:
|
1859
|
+
size: v
|
1791
1860
|
}
|
1792
|
-
), { details:
|
1793
|
-
|
1794
|
-
} else if (
|
1795
|
-
const k =
|
1796
|
-
(
|
1797
|
-
),
|
1798
|
-
{ ...
|
1861
|
+
), { details: S, ...A } = k;
|
1862
|
+
l[I] = { type: "image", details: S }, y[I] = A;
|
1863
|
+
} else if (w.type === "video") {
|
1864
|
+
const k = B(
|
1865
|
+
(C = d.value) == null ? void 0 : C.payload.trackItemsMap[I]
|
1866
|
+
), S = await dn(
|
1867
|
+
{ ...w, ...k, ...D },
|
1799
1868
|
{
|
1800
|
-
size:
|
1869
|
+
size: v
|
1801
1870
|
}
|
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:
|
1871
|
+
), { details: A, ...O } = S;
|
1872
|
+
l[I] = { type: "video", details: A }, y[I] = O;
|
1873
|
+
} else if (w.type === "audio") {
|
1874
|
+
const k = await pn({
|
1875
|
+
id: I,
|
1876
|
+
details: w.details,
|
1877
|
+
...D
|
1878
|
+
}), { details: S, ...A } = k;
|
1879
|
+
l[I] = { type: "audio", details: S }, y[I] = A;
|
1880
|
+
} else if (w.type === "caption") {
|
1881
|
+
const k = await mn(
|
1882
|
+
{ id: I, details: w.details, ...D },
|
1814
1883
|
{
|
1815
|
-
size:
|
1884
|
+
size: v
|
1816
1885
|
}
|
1817
|
-
), { details:
|
1818
|
-
|
1819
|
-
} else if (
|
1820
|
-
const k = await
|
1821
|
-
{ id:
|
1886
|
+
), { details: S, ...A } = k;
|
1887
|
+
l[I] = { type: "caption", details: S }, y[I] = A;
|
1888
|
+
} else if (w.type === "text") {
|
1889
|
+
const k = await yn(
|
1890
|
+
{ id: I, details: w.details, ...D },
|
1822
1891
|
{
|
1823
|
-
size:
|
1892
|
+
size: v
|
1824
1893
|
}
|
1825
|
-
), { details:
|
1826
|
-
|
1894
|
+
), { details: S, ...A } = k;
|
1895
|
+
l[I] = { type: "text", details: S }, y[I] = A;
|
1827
1896
|
}
|
1828
1897
|
return !0;
|
1829
1898
|
} catch {
|
1830
1899
|
return !1;
|
1831
1900
|
}
|
1832
1901
|
});
|
1833
|
-
await Promise.all(
|
1834
|
-
const
|
1902
|
+
await Promise.all(x);
|
1903
|
+
const M = qt(y);
|
1835
1904
|
t.updateState({
|
1836
|
-
...
|
1837
|
-
trackItemsMap:
|
1838
|
-
duration:
|
1905
|
+
...g,
|
1906
|
+
trackItemsMap: y,
|
1907
|
+
duration: M
|
1839
1908
|
});
|
1840
1909
|
}
|
1841
|
-
if (
|
1842
|
-
const
|
1910
|
+
if (d.key === Si) {
|
1911
|
+
const g = (p = d.value) == null ? void 0 : p.payload;
|
1843
1912
|
t.updateState({
|
1844
|
-
size:
|
1913
|
+
size: g
|
1845
1914
|
});
|
1846
1915
|
}
|
1847
|
-
}),
|
1848
|
-
if (
|
1849
|
-
if (
|
1850
|
-
}), F = i.subscribe((
|
1851
|
-
var
|
1852
|
-
const
|
1853
|
-
if ((
|
1854
|
-
const
|
1855
|
-
(
|
1856
|
-
),
|
1857
|
-
Object.entries(
|
1858
|
-
([
|
1916
|
+
}), P = s.subscribe((d) => {
|
1917
|
+
if (d.key === wi) return t.undo();
|
1918
|
+
if (d.key === ki) return t.redo();
|
1919
|
+
}), F = i.subscribe((d) => {
|
1920
|
+
var g, v, _, y;
|
1921
|
+
const f = [], p = [];
|
1922
|
+
if ((g = d.value) != null && g.payload.trackItemIds && (f.push((v = d.value) == null ? void 0 : v.payload.trackItemIds), t.updateState({ activeIds: f })), d.key === Ti) {
|
1923
|
+
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(
|
1924
|
+
(O) => !M.includes(O)
|
1925
|
+
), D = Object.fromEntries(
|
1926
|
+
Object.entries(C).filter(
|
1927
|
+
([O]) => !M.includes(O)
|
1859
1928
|
)
|
1860
|
-
), k =
|
1861
|
-
|
1862
|
-
|
1863
|
-
),
|
1864
|
-
Object.entries(
|
1865
|
-
([
|
1929
|
+
), k = ra(
|
1930
|
+
x.tracks,
|
1931
|
+
M
|
1932
|
+
), S = Object.fromEntries(
|
1933
|
+
Object.entries(x.trackItemsMap).filter(
|
1934
|
+
([O]) => !M.includes(O)
|
1866
1935
|
)
|
1867
|
-
),
|
1936
|
+
), A = qt(S);
|
1868
1937
|
t.updateState(
|
1869
1938
|
{
|
1870
|
-
trackItemIds:
|
1871
|
-
trackItemDetailsMap:
|
1939
|
+
trackItemIds: w,
|
1940
|
+
trackItemDetailsMap: D,
|
1872
1941
|
activeIds: [],
|
1873
|
-
trackItemsMap:
|
1942
|
+
trackItemsMap: S,
|
1874
1943
|
tracks: k,
|
1875
|
-
duration:
|
1944
|
+
duration: A
|
1876
1945
|
},
|
1877
1946
|
{ updateHistory: !0, kind: "remove" }
|
1878
1947
|
);
|
1879
1948
|
}
|
1880
|
-
if (
|
1881
|
-
const
|
1882
|
-
if (
|
1883
|
-
|
1884
|
-
const
|
1885
|
-
|
1886
|
-
...
|
1887
|
-
[
|
1888
|
-
},
|
1889
|
-
...
|
1890
|
-
[
|
1891
|
-
...
|
1949
|
+
if (d.key === Ei) {
|
1950
|
+
const l = B(t.getState()), x = ((y = d.value) == null ? void 0 : y.payload.trackItemIds) || l.activeIds;
|
1951
|
+
if (x.length === 0) return;
|
1952
|
+
x.forEach((I) => {
|
1953
|
+
const C = l.trackItemsMap[I], w = l.trackItemDetailsMap[I], D = en();
|
1954
|
+
p.push(D), l.trackItemsMap = {
|
1955
|
+
...l.trackItemsMap,
|
1956
|
+
[D]: { ...B(C), id: D }
|
1957
|
+
}, l.trackItemDetailsMap = {
|
1958
|
+
...l.trackItemDetailsMap,
|
1959
|
+
[D]: {
|
1960
|
+
...B(w)
|
1892
1961
|
}
|
1893
|
-
},
|
1962
|
+
}, l.trackItemIds.push(D);
|
1894
1963
|
});
|
1895
|
-
const
|
1896
|
-
|
1897
|
-
const
|
1898
|
-
...
|
1964
|
+
const M = [];
|
1965
|
+
l.tracks.forEach((I) => {
|
1966
|
+
const C = {
|
1967
|
+
...I,
|
1899
1968
|
items: [],
|
1900
|
-
id:
|
1969
|
+
id: tr()
|
1901
1970
|
};
|
1902
|
-
|
1903
|
-
if (
|
1904
|
-
const
|
1905
|
-
|
1971
|
+
I.items.forEach((w) => {
|
1972
|
+
if (x.includes(w)) {
|
1973
|
+
const D = x.indexOf(w);
|
1974
|
+
C.items.push(p[D]);
|
1906
1975
|
}
|
1907
|
-
}),
|
1908
|
-
}),
|
1909
|
-
|
1976
|
+
}), M.push(C);
|
1977
|
+
}), M.forEach((I) => {
|
1978
|
+
I.items.length !== 0 && l.tracks.unshift(I);
|
1910
1979
|
}), t.updateState(
|
1911
1980
|
{
|
1912
|
-
trackItemDetailsMap:
|
1913
|
-
tracks:
|
1914
|
-
trackItemIds:
|
1915
|
-
trackItemsMap:
|
1981
|
+
trackItemDetailsMap: l.trackItemDetailsMap,
|
1982
|
+
tracks: l.tracks,
|
1983
|
+
trackItemIds: l.trackItemIds,
|
1984
|
+
trackItemsMap: l.trackItemsMap
|
1916
1985
|
},
|
1917
1986
|
{
|
1918
1987
|
updateHistory: !0,
|
@@ -1920,119 +1989,138 @@ function Zi(t) {
|
|
1920
1989
|
}
|
1921
1990
|
);
|
1922
1991
|
}
|
1923
|
-
}),
|
1924
|
-
var
|
1925
|
-
const
|
1926
|
-
let
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
1932
|
-
|
1992
|
+
}), E = n.subscribe(async (d) => {
|
1993
|
+
var l, x, M, I, C, w, D, k;
|
1994
|
+
const f = B(t.getState());
|
1995
|
+
let p = [], g = "text";
|
1996
|
+
const v = (l = d.value) == null ? void 0 : l.options.trackId, _ = (x = d.value) == null ? void 0 : x.options.trackIndex;
|
1997
|
+
if (d.key === Mi) {
|
1998
|
+
g = "caption";
|
1999
|
+
const S = (M = d.value) == null ? void 0 : M.payload, A = [];
|
2000
|
+
for (const V of S) {
|
2001
|
+
const ft = mn(V, {
|
2002
|
+
size: f.size
|
1933
2003
|
});
|
1934
|
-
|
2004
|
+
A.push(ft);
|
1935
2005
|
}
|
1936
|
-
const
|
1937
|
-
for (const
|
1938
|
-
const
|
1939
|
-
|
1940
|
-
const { details:
|
1941
|
-
|
1942
|
-
type:
|
1943
|
-
details:
|
1944
|
-
},
|
2006
|
+
const O = await Promise.all(A), Z = [];
|
2007
|
+
for (const V of O) {
|
2008
|
+
const ft = V.id;
|
2009
|
+
Z.push(ft);
|
2010
|
+
const { details: Jt, ...Zt } = V;
|
2011
|
+
f.trackItemDetailsMap[ft] = {
|
2012
|
+
type: g,
|
2013
|
+
details: Jt
|
2014
|
+
}, f.trackItemsMap[ft] = Zt, f.trackItemIds.push(ft);
|
1945
2015
|
}
|
1946
|
-
|
2016
|
+
p = Z;
|
2017
|
+
}
|
2018
|
+
if (d.key === Ai) {
|
2019
|
+
g = "text";
|
2020
|
+
const S = await yn((I = d.value) == null ? void 0 : I.payload, {
|
2021
|
+
size: f.size
|
2022
|
+
}), { details: A, ...O } = S;
|
2023
|
+
f.trackItemDetailsMap[O.id] = {
|
2024
|
+
type: g,
|
2025
|
+
details: A
|
2026
|
+
}, f.trackItemsMap[O.id] = O, f.trackItemIds.push(O.id), p = [O.id];
|
1947
2027
|
}
|
1948
|
-
if (
|
1949
|
-
|
1950
|
-
const
|
1951
|
-
size:
|
1952
|
-
}), { details:
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
},
|
2028
|
+
if (d.key === Oi) {
|
2029
|
+
g = "template";
|
2030
|
+
const S = await ta((C = d.value) == null ? void 0 : C.payload, {
|
2031
|
+
size: f.size
|
2032
|
+
}), { details: A, ...O } = S;
|
2033
|
+
f.trackItemsMap[S.id] = {
|
2034
|
+
...O,
|
2035
|
+
type: "template"
|
2036
|
+
}, f.trackItemIds.push(O.id), f.trackItemDetailsMap[O.id] = {
|
2037
|
+
type: "template",
|
2038
|
+
details: A
|
2039
|
+
}, p = [O.id];
|
1957
2040
|
}
|
1958
|
-
if (
|
1959
|
-
|
1960
|
-
const
|
1961
|
-
size:
|
1962
|
-
}), { details:
|
1963
|
-
|
1964
|
-
type:
|
1965
|
-
details:
|
1966
|
-
},
|
2041
|
+
if (d.key === xi) {
|
2042
|
+
g = "image";
|
2043
|
+
const S = await hn((w = d.value) == null ? void 0 : w.payload, {
|
2044
|
+
size: f.size
|
2045
|
+
}), { details: A, ...O } = S;
|
2046
|
+
f.trackItemDetailsMap[O.id] = {
|
2047
|
+
type: g,
|
2048
|
+
details: A
|
2049
|
+
}, f.trackItemsMap[O.id] = O, f.trackItemIds.push(O.id), p = [O.id];
|
1967
2050
|
}
|
1968
|
-
if (
|
1969
|
-
|
1970
|
-
const
|
1971
|
-
|
1972
|
-
type:
|
1973
|
-
details:
|
1974
|
-
},
|
2051
|
+
if (d.key === Di) {
|
2052
|
+
g = "audio";
|
2053
|
+
const S = await pn((D = d.value) == null ? void 0 : D.payload), { details: A, ...O } = S;
|
2054
|
+
f.trackItemDetailsMap[O.id] = {
|
2055
|
+
type: g,
|
2056
|
+
details: A
|
2057
|
+
}, f.trackItemsMap[O.id] = O, f.trackItemIds.push(O.id), p = [O.id];
|
1975
2058
|
}
|
1976
|
-
if (
|
1977
|
-
|
1978
|
-
const
|
1979
|
-
size:
|
1980
|
-
}), { details:
|
1981
|
-
|
1982
|
-
type:
|
1983
|
-
details:
|
1984
|
-
},
|
2059
|
+
if (d.key === Pi) {
|
2060
|
+
g = "video";
|
2061
|
+
const S = await dn((k = d.value) == null ? void 0 : k.payload, {
|
2062
|
+
size: f.size
|
2063
|
+
}), { details: A, ...O } = S;
|
2064
|
+
f.trackItemDetailsMap[O.id] = {
|
2065
|
+
type: g,
|
2066
|
+
details: A
|
2067
|
+
}, f.trackItemsMap[O.id] = O, f.trackItemIds.push(O.id), p = [O.id];
|
1985
2068
|
}
|
1986
|
-
y
|
1987
|
-
|
2069
|
+
const y = na(
|
2070
|
+
p,
|
2071
|
+
f.tracks,
|
2072
|
+
f.trackItemsMap,
|
2073
|
+
v,
|
2074
|
+
_
|
2075
|
+
);
|
2076
|
+
v !== void 0 && v !== "main" && !y ? f.tracks.map((A) => A.id).includes(v) && (f.tracks = f.tracks.map((A) => (A.id === v && A.items.push(...p), A))) : _ !== void 0 && !y ? f.tracks = f.tracks.map((S, A) => (A === _ && S.items.push(...p), S)) : f.tracks.unshift({
|
2077
|
+
id: tr(),
|
1988
2078
|
accepts: ["text", "audio", "helper", "video", "image", "caption"],
|
1989
|
-
type:
|
1990
|
-
items:
|
2079
|
+
type: g,
|
2080
|
+
items: p,
|
1991
2081
|
magnetic: !1,
|
1992
2082
|
static: !1
|
1993
|
-
})
|
1994
|
-
const S = Yt(y.trackItemsMap);
|
1995
|
-
t.updateState(
|
2083
|
+
}), f.duration = qt(f.trackItemsMap), t.updateState(
|
1996
2084
|
{
|
1997
|
-
trackItemIds:
|
1998
|
-
trackItemDetailsMap:
|
1999
|
-
trackItemsMap:
|
2000
|
-
tracks:
|
2001
|
-
duration:
|
2085
|
+
trackItemIds: f.trackItemIds,
|
2086
|
+
trackItemDetailsMap: f.trackItemDetailsMap,
|
2087
|
+
trackItemsMap: f.trackItemsMap,
|
2088
|
+
tracks: f.tracks,
|
2089
|
+
duration: f.duration
|
2002
2090
|
},
|
2003
2091
|
{
|
2004
2092
|
updateHistory: !0,
|
2005
2093
|
kind: "add"
|
2006
2094
|
}
|
2007
2095
|
);
|
2008
|
-
}),
|
2009
|
-
var
|
2010
|
-
if (
|
2011
|
-
const
|
2012
|
-
if (
|
2013
|
-
const
|
2014
|
-
if (
|
2096
|
+
}), N = c.subscribe(async (d) => {
|
2097
|
+
var f;
|
2098
|
+
if (d.key === Ci) {
|
2099
|
+
const p = B(t.getState()), g = (f = d.value) == null ? void 0 : f.options.time;
|
2100
|
+
if (p.activeIds.length === 1) {
|
2101
|
+
const v = p.activeIds[0], _ = p.trackItemsMap[v];
|
2102
|
+
if (g >= _.display.to || g <= _.display.from)
|
2015
2103
|
return;
|
2016
|
-
const
|
2017
|
-
...
|
2018
|
-
id:
|
2104
|
+
const y = p.trackItemDetailsMap[v], l = en(), x = {
|
2105
|
+
..._,
|
2106
|
+
id: l,
|
2019
2107
|
display: {
|
2020
|
-
from:
|
2021
|
-
to:
|
2108
|
+
from: g,
|
2109
|
+
to: _.display.to
|
2022
2110
|
},
|
2023
2111
|
trim: {
|
2024
|
-
from:
|
2025
|
-
to:
|
2112
|
+
from: g,
|
2113
|
+
to: _.display.to
|
2026
2114
|
}
|
2027
2115
|
};
|
2028
|
-
|
2029
|
-
|
2116
|
+
p.trackItemsMap[v].display.to = g, p.trackItemsMap[l] = x, p.trackItemIds.push(l), p.trackItemDetailsMap[l] = y, p.tracks.forEach((M) => {
|
2117
|
+
M.items.includes(v) && M.items.push(l);
|
2030
2118
|
}), t.updateState(
|
2031
2119
|
{
|
2032
|
-
trackItemDetailsMap:
|
2033
|
-
tracks:
|
2034
|
-
trackItemIds:
|
2035
|
-
trackItemsMap:
|
2120
|
+
trackItemDetailsMap: p.trackItemDetailsMap,
|
2121
|
+
tracks: p.tracks,
|
2122
|
+
trackItemIds: p.trackItemIds,
|
2123
|
+
trackItemsMap: p.trackItemsMap
|
2036
2124
|
},
|
2037
2125
|
{
|
2038
2126
|
updateHistory: !0,
|
@@ -2042,54 +2130,76 @@ function Zi(t) {
|
|
2042
2130
|
}
|
2043
2131
|
return;
|
2044
2132
|
}
|
2045
|
-
if (
|
2046
|
-
const
|
2047
|
-
if (
|
2048
|
-
const
|
2049
|
-
activeIds:
|
2133
|
+
if (d.key === Ri) {
|
2134
|
+
const p = B(t.getState());
|
2135
|
+
if (p.activeIds.length) {
|
2136
|
+
const g = p.activeIds, v = [], _ = {
|
2137
|
+
activeIds: g,
|
2050
2138
|
trackItemDetailsMap: {},
|
2051
2139
|
trackItemsMap: {},
|
2052
2140
|
tracks: []
|
2053
2141
|
};
|
2054
|
-
|
2055
|
-
|
2056
|
-
|
2142
|
+
g.forEach((l) => {
|
2143
|
+
_.trackItemDetailsMap[l] = p.trackItemDetailsMap[l], _.trackItemsMap[l] = p.trackItemsMap[l], v.push(
|
2144
|
+
p.tracks.find((x) => x.items.includes(l))
|
2057
2145
|
);
|
2058
2146
|
});
|
2059
|
-
const
|
2060
|
-
|
2147
|
+
const y = /* @__PURE__ */ new Set();
|
2148
|
+
v.filter((l) => y.has(l.id) ? !1 : (y.add(l), !0)), _.tracks = Array.from(y.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
|
2061
2149
|
}
|
2062
2150
|
}
|
2063
|
-
if (
|
2064
|
-
const
|
2065
|
-
if (!
|
2066
|
-
const
|
2067
|
-
const
|
2068
|
-
(
|
2151
|
+
if (d.key === Fi) {
|
2152
|
+
const p = localStorage.getItem("DesignComboTemp");
|
2153
|
+
if (!p) return;
|
2154
|
+
const g = B(t.getState()), v = JSON.parse(p), _ = {}, y = v.trackItemsMap, l = v.trackItemDetailsMap, x = v.tracks, M = [], I = v.activeIds.map(async (C) => {
|
2155
|
+
const w = l[C];
|
2156
|
+
(w.type === "caption" || w.type === "text") && w.details.fontUrl && await kn([
|
2069
2157
|
{
|
2070
|
-
fontFamily:
|
2071
|
-
url:
|
2158
|
+
fontFamily: w.details.fontFamily,
|
2159
|
+
url: w.details.fontUrl
|
2072
2160
|
}
|
2073
2161
|
]);
|
2074
|
-
const
|
2075
|
-
return
|
2076
|
-
...
|
2077
|
-
id:
|
2078
|
-
},
|
2162
|
+
const D = en();
|
2163
|
+
return _[C] = D, g.trackItemsMap[D] = {
|
2164
|
+
...y[C],
|
2165
|
+
id: D
|
2166
|
+
}, g.trackItemDetailsMap[D] = w, g.trackItemIds.push(D), !0;
|
2079
2167
|
});
|
2080
|
-
await Promise.all(
|
2081
|
-
const
|
2082
|
-
...
|
2083
|
-
items:
|
2084
|
-
id:
|
2168
|
+
await Promise.all(I), x.forEach((C) => {
|
2169
|
+
const w = C.items.map((k) => _[k]), D = {
|
2170
|
+
...C,
|
2171
|
+
items: w,
|
2172
|
+
id: tr()
|
2085
2173
|
};
|
2086
|
-
|
2087
|
-
}),
|
2174
|
+
M.push(D);
|
2175
|
+
}), g.tracks = [...g.tracks, ...M], t.updateState(
|
2176
|
+
{
|
2177
|
+
trackItemDetailsMap: g.trackItemDetailsMap,
|
2178
|
+
tracks: g.tracks,
|
2179
|
+
trackItemIds: g.trackItemIds,
|
2180
|
+
trackItemsMap: g.trackItemsMap
|
2181
|
+
},
|
2182
|
+
{
|
2183
|
+
updateHistory: !0,
|
2184
|
+
kind: "update"
|
2185
|
+
}
|
2186
|
+
);
|
2187
|
+
}
|
2188
|
+
}), b = h.subscribe(async (d) => {
|
2189
|
+
var f, p, g, v;
|
2190
|
+
if (d.key === ji) {
|
2191
|
+
const _ = B(t.getState()), [y] = (f = d.value) == null ? void 0 : f.payload.trackItemIds, l = _.trackItemDetailsMap;
|
2192
|
+
_.trackItemIds.forEach((M) => {
|
2193
|
+
const I = l[M];
|
2194
|
+
if (I.type === "template" && I.details.map((w) => w.id).includes(y)) {
|
2195
|
+
const w = I.details.filter(
|
2196
|
+
(D) => D.id !== y
|
2197
|
+
);
|
2198
|
+
I.details = w;
|
2199
|
+
}
|
2200
|
+
}), t.updateState(
|
2088
2201
|
{
|
2089
|
-
trackItemDetailsMap:
|
2090
|
-
tracks: m.tracks,
|
2091
|
-
trackItemIds: m.trackItemIds,
|
2092
|
-
trackItemsMap: m.trackItemsMap
|
2202
|
+
trackItemDetailsMap: { ...l }
|
2093
2203
|
},
|
2094
2204
|
{
|
2095
2205
|
updateHistory: !0,
|
@@ -2097,25 +2207,26 @@ function Zi(t) {
|
|
2097
2207
|
}
|
2098
2208
|
);
|
2099
2209
|
}
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
const
|
2104
|
-
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2109
|
-
|
2110
|
-
...
|
2111
|
-
|
2210
|
+
if (d.key === zi) {
|
2211
|
+
const _ = B(t.getState()), y = _.trackItemDetailsMap, l = _.trackItemsMap, x = Object.keys((p = d.value) == null ? void 0 : p.payload);
|
2212
|
+
if (!x.length) return;
|
2213
|
+
const M = (g = d.value) == null ? void 0 : g.payload;
|
2214
|
+
x.forEach((C) => {
|
2215
|
+
const w = M[C];
|
2216
|
+
w.details ? y[C].details = {
|
2217
|
+
...y[C].details,
|
2218
|
+
...w.details
|
2219
|
+
} : M[C].playbackRate ? l[C].playbackRate = M[C].playbackRate : y[C].type === "template" && (l[C] = {
|
2220
|
+
...l[C],
|
2221
|
+
...M[C]
|
2222
|
+
});
|
2112
2223
|
});
|
2113
|
-
const
|
2224
|
+
const I = qt(l);
|
2114
2225
|
t.updateState(
|
2115
2226
|
{
|
2116
|
-
trackItemDetailsMap: { ...
|
2117
|
-
trackItemsMap: { ...
|
2118
|
-
duration:
|
2227
|
+
trackItemDetailsMap: { ...y },
|
2228
|
+
trackItemsMap: { ...l },
|
2229
|
+
duration: I
|
2119
2230
|
},
|
2120
2231
|
{
|
2121
2232
|
updateHistory: !0,
|
@@ -2123,50 +2234,103 @@ function Zi(t) {
|
|
2123
2234
|
}
|
2124
2235
|
);
|
2125
2236
|
}
|
2237
|
+
if (d.key === Hi) {
|
2238
|
+
const _ = (v = d.value) == null ? void 0 : v.payload, y = Object.keys(_)[0], l = Object.values(_)[0], x = B(t.getState());
|
2239
|
+
for (const M of x.trackItemIds)
|
2240
|
+
if (x.trackItemsMap[M].type === "template") {
|
2241
|
+
const I = x.trackItemDetailsMap[M];
|
2242
|
+
if (I.details.map((w) => w.id).includes(y)) {
|
2243
|
+
for (let w of I.details)
|
2244
|
+
if (w.id === y) {
|
2245
|
+
if (l.details) {
|
2246
|
+
if (l.type === "image" && l.details.src) {
|
2247
|
+
const k = await ti(l.details.src), S = w.details.width, A = w.details.height;
|
2248
|
+
let O = k.width, Z = k.height;
|
2249
|
+
const V = k.width / k.height;
|
2250
|
+
S / A > V ? (O = S, Z = S / V) : (Z = A, O = A * V), l.details.mediaWidth = O, l.details.mediaHeight = Z;
|
2251
|
+
}
|
2252
|
+
if (l.type === "video" && l.details.src) {
|
2253
|
+
const k = await ei(l.details.src), S = w.details.width, A = w.details.height;
|
2254
|
+
let O = k.width, Z = k.height;
|
2255
|
+
const V = k.width / k.height;
|
2256
|
+
S / A > V ? (O = S, Z = S / V) : (Z = A, O = A * V), l.details.mediaWidth = O, l.details.mediaHeight = Z;
|
2257
|
+
}
|
2258
|
+
const D = w.details;
|
2259
|
+
w.details = { ...D, ...l.details }, l.details = w.details;
|
2260
|
+
}
|
2261
|
+
w = { ...w, ...l }, x.trackItemDetailsMap[M].details = I.details.map((D) => D.id === y ? w : D);
|
2262
|
+
}
|
2263
|
+
}
|
2264
|
+
}
|
2265
|
+
t.updateState(
|
2266
|
+
{
|
2267
|
+
trackItemDetailsMap: {
|
2268
|
+
...x.trackItemDetailsMap
|
2269
|
+
}
|
2270
|
+
},
|
2271
|
+
{
|
2272
|
+
updateHistory: !0,
|
2273
|
+
kind: "update:details"
|
2274
|
+
}
|
2275
|
+
);
|
2276
|
+
}
|
2277
|
+
if (d.key === Ni) {
|
2278
|
+
const _ = B(t.getState());
|
2279
|
+
_.trackItemIds.forEach((y) => {
|
2280
|
+
const l = _.trackItemsMap[y];
|
2281
|
+
l.type === "template" && (l.activeEdit = !1, t.updateState({
|
2282
|
+
trackItemsMap: {
|
2283
|
+
..._.trackItemsMap,
|
2284
|
+
[y]: l
|
2285
|
+
},
|
2286
|
+
activeIds: []
|
2287
|
+
}));
|
2288
|
+
});
|
2289
|
+
}
|
2126
2290
|
});
|
2127
2291
|
return {
|
2128
2292
|
unsubscribe: () => {
|
2129
|
-
|
2293
|
+
E.unsubscribe(), N.unsubscribe(), b.unsubscribe(), P.unsubscribe(), F.unsubscribe(), m.unsubscribe();
|
2130
2294
|
}
|
2131
2295
|
};
|
2132
2296
|
}
|
2133
|
-
const
|
2134
|
-
function
|
2135
|
-
var
|
2297
|
+
const aa = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
2298
|
+
function ai(t, r, n = { cyclesFix: !0 }, i = []) {
|
2299
|
+
var m, P;
|
2136
2300
|
let s = [];
|
2137
2301
|
const c = Array.isArray(t);
|
2138
2302
|
for (const F in t) {
|
2139
|
-
const
|
2303
|
+
const E = t[F], N = c ? +F : F;
|
2140
2304
|
if (!(F in r)) {
|
2141
2305
|
s.push({
|
2142
2306
|
type: "REMOVE",
|
2143
|
-
path: [
|
2307
|
+
path: [N],
|
2144
2308
|
oldValue: t[F]
|
2145
2309
|
});
|
2146
2310
|
continue;
|
2147
2311
|
}
|
2148
|
-
const
|
2149
|
-
if (
|
2150
|
-
const
|
2151
|
-
s.push.apply(s,
|
2152
|
-
} else
|
2153
|
-
!(Number.isNaN(
|
2154
|
-
path: [
|
2312
|
+
const b = r[F], d = typeof E == "object" && typeof b == "object" && Array.isArray(E) === Array.isArray(b);
|
2313
|
+
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))) {
|
2314
|
+
const f = ai(E, b, n, n.cyclesFix ? i.concat([E]) : []);
|
2315
|
+
s.push.apply(s, f.map((p) => (p.path.unshift(N), p)));
|
2316
|
+
} else E !== b && // treat NaN values as equivalent
|
2317
|
+
!(Number.isNaN(E) && Number.isNaN(b)) && !(d && (isNaN(E) ? E + "" == b + "" : +E == +b)) && s.push({
|
2318
|
+
path: [N],
|
2155
2319
|
type: "CHANGE",
|
2156
|
-
value:
|
2157
|
-
oldValue:
|
2320
|
+
value: b,
|
2321
|
+
oldValue: E
|
2158
2322
|
});
|
2159
2323
|
}
|
2160
|
-
const
|
2324
|
+
const h = Array.isArray(r);
|
2161
2325
|
for (const F in r)
|
2162
2326
|
F in t || s.push({
|
2163
2327
|
type: "CREATE",
|
2164
|
-
path: [
|
2328
|
+
path: [h ? +F : F],
|
2165
2329
|
value: r[F]
|
2166
2330
|
});
|
2167
2331
|
return s;
|
2168
2332
|
}
|
2169
|
-
var
|
2333
|
+
var Tn = Symbol.for("immer-nothing"), ge = Symbol.for("immer-draftable"), nt = Symbol.for("immer-state"), si = process.env.NODE_ENV !== "production" ? [
|
2170
2334
|
// All error codes, starting by 0:
|
2171
2335
|
function(t) {
|
2172
2336
|
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 +2361,117 @@ var vn = Symbol.for("immer-nothing"), de = Symbol.for("immer-draftable"), tt = S
|
|
2197
2361
|
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
|
2198
2362
|
// See Patches.ts for additional errors
|
2199
2363
|
] : [];
|
2200
|
-
function
|
2364
|
+
function $(t, ...r) {
|
2201
2365
|
if (process.env.NODE_ENV !== "production") {
|
2202
|
-
const n =
|
2366
|
+
const n = si[t], i = typeof n == "function" ? n.apply(null, r) : n;
|
2203
2367
|
throw new Error(`[Immer] ${i}`);
|
2204
2368
|
}
|
2205
2369
|
throw new Error(
|
2206
2370
|
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
2207
2371
|
);
|
2208
2372
|
}
|
2209
|
-
var
|
2210
|
-
function
|
2211
|
-
return !!t && !!t[
|
2373
|
+
var Ct = Object.getPrototypeOf;
|
2374
|
+
function Rt(t) {
|
2375
|
+
return !!t && !!t[nt];
|
2212
2376
|
}
|
2213
|
-
function
|
2377
|
+
function wt(t) {
|
2214
2378
|
var r;
|
2215
|
-
return t ?
|
2379
|
+
return t ? oi(t) || Array.isArray(t) || !!t[ge] || !!((r = t.constructor) != null && r[ge]) || Te(t) || Ee(t) : !1;
|
2216
2380
|
}
|
2217
|
-
var
|
2218
|
-
function
|
2381
|
+
var sa = Object.prototype.constructor.toString();
|
2382
|
+
function oi(t) {
|
2219
2383
|
if (!t || typeof t != "object")
|
2220
2384
|
return !1;
|
2221
|
-
const r =
|
2385
|
+
const r = Ct(t);
|
2222
2386
|
if (r === null)
|
2223
2387
|
return !0;
|
2224
2388
|
const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
2225
|
-
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) ===
|
2389
|
+
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === sa;
|
2226
2390
|
}
|
2227
|
-
function
|
2228
|
-
|
2391
|
+
function _e(t, r) {
|
2392
|
+
Ft(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
2229
2393
|
r(n, t[n], t);
|
2230
2394
|
}) : t.forEach((n, i) => r(i, n, t));
|
2231
2395
|
}
|
2232
|
-
function
|
2233
|
-
const r = t[
|
2234
|
-
return r ? r.type_ : Array.isArray(t) ? 1 :
|
2396
|
+
function Ft(t) {
|
2397
|
+
const r = t[nt];
|
2398
|
+
return r ? r.type_ : Array.isArray(t) ? 1 : Te(t) ? 2 : Ee(t) ? 3 : 0;
|
2235
2399
|
}
|
2236
|
-
function
|
2237
|
-
return
|
2400
|
+
function Ie(t, r) {
|
2401
|
+
return Ft(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
2238
2402
|
}
|
2239
2403
|
function rn(t, r) {
|
2240
|
-
return
|
2404
|
+
return Ft(t) === 2 ? t.get(r) : t[r];
|
2241
2405
|
}
|
2242
|
-
function
|
2243
|
-
const i =
|
2406
|
+
function ci(t, r, n) {
|
2407
|
+
const i = Ft(t);
|
2244
2408
|
i === 2 ? t.set(r, n) : i === 3 ? t.add(n) : t[r] = n;
|
2245
2409
|
}
|
2246
|
-
function
|
2410
|
+
function oa(t, r) {
|
2247
2411
|
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
2248
2412
|
}
|
2249
|
-
function
|
2413
|
+
function Te(t) {
|
2250
2414
|
return t instanceof Map;
|
2251
2415
|
}
|
2252
|
-
function
|
2416
|
+
function Ee(t) {
|
2253
2417
|
return t instanceof Set;
|
2254
2418
|
}
|
2255
|
-
function
|
2419
|
+
function Pt(t) {
|
2256
2420
|
return t.copy_ || t.base_;
|
2257
2421
|
}
|
2258
|
-
function
|
2259
|
-
if (
|
2422
|
+
function bn(t, r) {
|
2423
|
+
if (Te(t))
|
2260
2424
|
return new Map(t);
|
2261
|
-
if (
|
2425
|
+
if (Ee(t))
|
2262
2426
|
return new Set(t);
|
2263
2427
|
if (Array.isArray(t))
|
2264
2428
|
return Array.prototype.slice.call(t);
|
2265
|
-
const n =
|
2429
|
+
const n = oi(t);
|
2266
2430
|
if (r === !0 || r === "class_only" && !n) {
|
2267
2431
|
const i = Object.getOwnPropertyDescriptors(t);
|
2268
|
-
delete i[
|
2432
|
+
delete i[nt];
|
2269
2433
|
let s = Reflect.ownKeys(i);
|
2270
2434
|
for (let c = 0; c < s.length; c++) {
|
2271
|
-
const
|
2272
|
-
|
2435
|
+
const h = s[c], m = i[h];
|
2436
|
+
m.writable === !1 && (m.writable = !0, m.configurable = !0), (m.get || m.set) && (i[h] = {
|
2273
2437
|
configurable: !0,
|
2274
2438
|
writable: !0,
|
2275
2439
|
// could live with !!desc.set as well here...
|
2276
|
-
enumerable:
|
2277
|
-
value: t[
|
2440
|
+
enumerable: m.enumerable,
|
2441
|
+
value: t[h]
|
2278
2442
|
});
|
2279
2443
|
}
|
2280
|
-
return Object.create(
|
2444
|
+
return Object.create(Ct(t), i);
|
2281
2445
|
} else {
|
2282
|
-
const i =
|
2446
|
+
const i = Ct(t);
|
2283
2447
|
if (i !== null && n)
|
2284
2448
|
return { ...t };
|
2285
2449
|
const s = Object.create(i);
|
2286
2450
|
return Object.assign(s, t);
|
2287
2451
|
}
|
2288
2452
|
}
|
2289
|
-
function
|
2290
|
-
return
|
2453
|
+
function En(t, r = !1) {
|
2454
|
+
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
2455
|
}
|
2292
|
-
function
|
2293
|
-
|
2456
|
+
function ca() {
|
2457
|
+
$(2);
|
2294
2458
|
}
|
2295
|
-
function
|
2459
|
+
function cr(t) {
|
2296
2460
|
return Object.isFrozen(t);
|
2297
2461
|
}
|
2298
|
-
var
|
2299
|
-
function
|
2300
|
-
const r =
|
2301
|
-
return r ||
|
2462
|
+
var gn = {};
|
2463
|
+
function jt(t) {
|
2464
|
+
const r = gn[t];
|
2465
|
+
return r || $(0, t), r;
|
2302
2466
|
}
|
2303
|
-
function
|
2304
|
-
|
2467
|
+
function ua(t, r) {
|
2468
|
+
gn[t] || (gn[t] = r);
|
2305
2469
|
}
|
2306
|
-
var
|
2307
|
-
function
|
2308
|
-
return
|
2470
|
+
var ve;
|
2471
|
+
function ui() {
|
2472
|
+
return ve;
|
2309
2473
|
}
|
2310
|
-
function
|
2474
|
+
function la(t, r) {
|
2311
2475
|
return {
|
2312
2476
|
drafts_: [],
|
2313
2477
|
parent_: t,
|
@@ -2319,52 +2483,52 @@ function ia(t, r) {
|
|
2319
2483
|
};
|
2320
2484
|
}
|
2321
2485
|
function zn(t, r) {
|
2322
|
-
r && (
|
2486
|
+
r && (jt("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
2323
2487
|
}
|
2324
|
-
function
|
2325
|
-
|
2488
|
+
function _n(t) {
|
2489
|
+
In(t), t.drafts_.forEach(fa), t.drafts_ = null;
|
2326
2490
|
}
|
2327
|
-
function
|
2328
|
-
t ===
|
2491
|
+
function In(t) {
|
2492
|
+
t === ve && (ve = t.parent_);
|
2329
2493
|
}
|
2330
|
-
function
|
2331
|
-
return
|
2494
|
+
function Hn(t) {
|
2495
|
+
return ve = la(ve, t);
|
2332
2496
|
}
|
2333
|
-
function
|
2334
|
-
const r = t[
|
2497
|
+
function fa(t) {
|
2498
|
+
const r = t[nt];
|
2335
2499
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
2336
2500
|
}
|
2337
|
-
function
|
2501
|
+
function Nn(t, r) {
|
2338
2502
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
2339
2503
|
const n = r.drafts_[0];
|
2340
|
-
return t !== void 0 && t !== n ? (n[
|
2341
|
-
n[
|
2504
|
+
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_(
|
2505
|
+
n[nt].base_,
|
2342
2506
|
t,
|
2343
2507
|
r.patches_,
|
2344
2508
|
r.inversePatches_
|
2345
|
-
)) : t =
|
2509
|
+
)) : t = nr(r, n, []), _n(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== Tn ? t : void 0;
|
2346
2510
|
}
|
2347
|
-
function
|
2348
|
-
if (
|
2511
|
+
function nr(t, r, n) {
|
2512
|
+
if (cr(r))
|
2349
2513
|
return r;
|
2350
|
-
const i = r[
|
2514
|
+
const i = r[nt];
|
2351
2515
|
if (!i)
|
2352
|
-
return
|
2516
|
+
return _e(
|
2353
2517
|
r,
|
2354
|
-
(s, c) =>
|
2518
|
+
(s, c) => Ln(t, i, r, s, c, n)
|
2355
2519
|
), r;
|
2356
2520
|
if (i.scope_ !== t)
|
2357
2521
|
return r;
|
2358
2522
|
if (!i.modified_)
|
2359
|
-
return
|
2523
|
+
return ir(t, i.base_, !0), i.base_;
|
2360
2524
|
if (!i.finalized_) {
|
2361
2525
|
i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
|
2362
2526
|
const s = i.copy_;
|
2363
|
-
let c = s,
|
2364
|
-
i.type_ === 3 && (c = new Set(s), s.clear(),
|
2527
|
+
let c = s, h = !1;
|
2528
|
+
i.type_ === 3 && (c = new Set(s), s.clear(), h = !0), _e(
|
2365
2529
|
c,
|
2366
|
-
(
|
2367
|
-
),
|
2530
|
+
(m, P) => Ln(t, i, s, m, P, n, h)
|
2531
|
+
), ir(t, s, !1), n && t.patches_ && jt("Patches").generatePatches_(
|
2368
2532
|
i,
|
2369
2533
|
n,
|
2370
2534
|
t.patches_,
|
@@ -2373,29 +2537,29 @@ function Qe(t, r, n) {
|
|
2373
2537
|
}
|
2374
2538
|
return i.copy_;
|
2375
2539
|
}
|
2376
|
-
function
|
2377
|
-
if (process.env.NODE_ENV !== "production" && s === n &&
|
2378
|
-
const
|
2379
|
-
!
|
2380
|
-
if (
|
2540
|
+
function Ln(t, r, n, i, s, c, h) {
|
2541
|
+
if (process.env.NODE_ENV !== "production" && s === n && $(5), Rt(s)) {
|
2542
|
+
const m = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2543
|
+
!Ie(r.assigned_, i) ? c.concat(i) : void 0, P = nr(t, s, m);
|
2544
|
+
if (ci(n, i, P), Rt(P))
|
2381
2545
|
t.canAutoFreeze_ = !1;
|
2382
2546
|
else
|
2383
2547
|
return;
|
2384
|
-
} else
|
2385
|
-
if (
|
2548
|
+
} else h && n.add(s);
|
2549
|
+
if (wt(s) && !cr(s)) {
|
2386
2550
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
2387
2551
|
return;
|
2388
|
-
|
2552
|
+
nr(t, s), (!r || !r.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(n, i) && ir(t, s);
|
2389
2553
|
}
|
2390
2554
|
}
|
2391
|
-
function
|
2392
|
-
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ &&
|
2555
|
+
function ir(t, r, n = !1) {
|
2556
|
+
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && En(r, n);
|
2393
2557
|
}
|
2394
|
-
function
|
2558
|
+
function da(t, r) {
|
2395
2559
|
const n = Array.isArray(t), i = {
|
2396
2560
|
type_: n ? 1 : 0,
|
2397
2561
|
// Track which produce call this is associated with.
|
2398
|
-
scope_: r ? r.scope_ :
|
2562
|
+
scope_: r ? r.scope_ : ui(),
|
2399
2563
|
// True for both shallow and deep changes.
|
2400
2564
|
modified_: !1,
|
2401
2565
|
// Used during finalization.
|
@@ -2415,50 +2579,50 @@ function sa(t, r) {
|
|
2415
2579
|
revoke_: null,
|
2416
2580
|
isManual_: !1
|
2417
2581
|
};
|
2418
|
-
let s = i, c =
|
2419
|
-
n && (s = [i], c =
|
2420
|
-
const { revoke:
|
2421
|
-
return i.draft_ =
|
2582
|
+
let s = i, c = Mn;
|
2583
|
+
n && (s = [i], c = Se);
|
2584
|
+
const { revoke: h, proxy: m } = Proxy.revocable(s, c);
|
2585
|
+
return i.draft_ = m, i.revoke_ = h, m;
|
2422
2586
|
}
|
2423
|
-
var
|
2587
|
+
var Mn = {
|
2424
2588
|
get(t, r) {
|
2425
|
-
if (r ===
|
2589
|
+
if (r === nt)
|
2426
2590
|
return t;
|
2427
|
-
const n =
|
2428
|
-
if (!
|
2429
|
-
return
|
2591
|
+
const n = Pt(t);
|
2592
|
+
if (!Ie(n, r))
|
2593
|
+
return pa(t, n, r);
|
2430
2594
|
const i = n[r];
|
2431
|
-
return t.finalized_ || !
|
2595
|
+
return t.finalized_ || !wt(i) ? i : i === nn(t.base_, r) ? (an(t), t.copy_[r] = Sn(i, t)) : i;
|
2432
2596
|
},
|
2433
2597
|
has(t, r) {
|
2434
|
-
return r in
|
2598
|
+
return r in Pt(t);
|
2435
2599
|
},
|
2436
2600
|
ownKeys(t) {
|
2437
|
-
return Reflect.ownKeys(
|
2601
|
+
return Reflect.ownKeys(Pt(t));
|
2438
2602
|
},
|
2439
2603
|
set(t, r, n) {
|
2440
|
-
const i =
|
2604
|
+
const i = li(Pt(t), r);
|
2441
2605
|
if (i != null && i.set)
|
2442
2606
|
return i.set.call(t.draft_, n), !0;
|
2443
2607
|
if (!t.modified_) {
|
2444
|
-
const s = nn(
|
2608
|
+
const s = nn(Pt(t), r), c = s == null ? void 0 : s[nt];
|
2445
2609
|
if (c && c.base_ === n)
|
2446
2610
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2447
|
-
if (
|
2611
|
+
if (oa(n, s) && (n !== void 0 || Ie(t.base_, r)))
|
2448
2612
|
return !0;
|
2449
|
-
an(t),
|
2613
|
+
an(t), vn(t);
|
2450
2614
|
}
|
2451
2615
|
return t.copy_[r] === n && // special case: handle new props with value 'undefined'
|
2452
2616
|
(n !== void 0 || r in t.copy_) || // special case: NaN
|
2453
2617
|
Number.isNaN(n) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = n, t.assigned_[r] = !0), !0;
|
2454
2618
|
},
|
2455
2619
|
deleteProperty(t, r) {
|
2456
|
-
return nn(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, an(t),
|
2620
|
+
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
2621
|
},
|
2458
2622
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
2459
2623
|
// the same guarantee in ES5 mode.
|
2460
2624
|
getOwnPropertyDescriptor(t, r) {
|
2461
|
-
const n =
|
2625
|
+
const n = Pt(t), i = Reflect.getOwnPropertyDescriptor(n, r);
|
2462
2626
|
return i && {
|
2463
2627
|
writable: !0,
|
2464
2628
|
configurable: t.type_ !== 1 || r !== "length",
|
@@ -2467,108 +2631,108 @@ var Sn = {
|
|
2467
2631
|
};
|
2468
2632
|
},
|
2469
2633
|
defineProperty() {
|
2470
|
-
|
2634
|
+
$(11);
|
2471
2635
|
},
|
2472
2636
|
getPrototypeOf(t) {
|
2473
|
-
return
|
2637
|
+
return Ct(t.base_);
|
2474
2638
|
},
|
2475
2639
|
setPrototypeOf() {
|
2476
|
-
|
2640
|
+
$(12);
|
2477
2641
|
}
|
2478
|
-
},
|
2479
|
-
|
2480
|
-
|
2642
|
+
}, Se = {};
|
2643
|
+
_e(Mn, (t, r) => {
|
2644
|
+
Se[t] = function() {
|
2481
2645
|
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
2482
2646
|
};
|
2483
2647
|
});
|
2484
|
-
|
2485
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) &&
|
2648
|
+
Se.deleteProperty = function(t, r) {
|
2649
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && $(13), Se.set.call(this, t, r, void 0);
|
2486
2650
|
};
|
2487
|
-
|
2488
|
-
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) &&
|
2651
|
+
Se.set = function(t, r, n) {
|
2652
|
+
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && $(14), Mn.set.call(this, t[0], r, n, t[0]);
|
2489
2653
|
};
|
2490
2654
|
function nn(t, r) {
|
2491
|
-
const n = t[
|
2492
|
-
return (n ?
|
2655
|
+
const n = t[nt];
|
2656
|
+
return (n ? Pt(n) : t)[r];
|
2493
2657
|
}
|
2494
|
-
function
|
2658
|
+
function pa(t, r, n) {
|
2495
2659
|
var s;
|
2496
|
-
const i =
|
2660
|
+
const i = li(r, n);
|
2497
2661
|
return i ? "value" in i ? i.value : (
|
2498
2662
|
// This is a very special case, if the prop is a getter defined by the
|
2499
2663
|
// prototype, we should invoke it with the draft as context!
|
2500
2664
|
(s = i.get) == null ? void 0 : s.call(t.draft_)
|
2501
2665
|
) : void 0;
|
2502
2666
|
}
|
2503
|
-
function
|
2667
|
+
function li(t, r) {
|
2504
2668
|
if (!(r in t))
|
2505
2669
|
return;
|
2506
|
-
let n =
|
2670
|
+
let n = Ct(t);
|
2507
2671
|
for (; n; ) {
|
2508
2672
|
const i = Object.getOwnPropertyDescriptor(n, r);
|
2509
2673
|
if (i)
|
2510
2674
|
return i;
|
2511
|
-
n =
|
2675
|
+
n = Ct(n);
|
2512
2676
|
}
|
2513
2677
|
}
|
2514
|
-
function
|
2515
|
-
t.modified_ || (t.modified_ = !0, t.parent_ &&
|
2678
|
+
function vn(t) {
|
2679
|
+
t.modified_ || (t.modified_ = !0, t.parent_ && vn(t.parent_));
|
2516
2680
|
}
|
2517
2681
|
function an(t) {
|
2518
|
-
t.copy_ || (t.copy_ =
|
2682
|
+
t.copy_ || (t.copy_ = bn(
|
2519
2683
|
t.base_,
|
2520
2684
|
t.scope_.immer_.useStrictShallowCopy_
|
2521
2685
|
));
|
2522
2686
|
}
|
2523
|
-
var
|
2687
|
+
var ha = class {
|
2524
2688
|
constructor(t) {
|
2525
2689
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, n, i) => {
|
2526
2690
|
if (typeof r == "function" && typeof n != "function") {
|
2527
2691
|
const c = n;
|
2528
2692
|
n = r;
|
2529
|
-
const
|
2530
|
-
return function(
|
2531
|
-
return
|
2693
|
+
const h = this;
|
2694
|
+
return function(P = c, ...F) {
|
2695
|
+
return h.produce(P, (E) => n.call(this, E, ...F));
|
2532
2696
|
};
|
2533
2697
|
}
|
2534
|
-
typeof n != "function" &&
|
2698
|
+
typeof n != "function" && $(6), i !== void 0 && typeof i != "function" && $(7);
|
2535
2699
|
let s;
|
2536
|
-
if (
|
2537
|
-
const c =
|
2538
|
-
let
|
2700
|
+
if (wt(r)) {
|
2701
|
+
const c = Hn(this), h = Sn(r, void 0);
|
2702
|
+
let m = !0;
|
2539
2703
|
try {
|
2540
|
-
s = n(
|
2704
|
+
s = n(h), m = !1;
|
2541
2705
|
} finally {
|
2542
|
-
|
2706
|
+
m ? _n(c) : In(c);
|
2543
2707
|
}
|
2544
|
-
return zn(c, i),
|
2708
|
+
return zn(c, i), Nn(s, c);
|
2545
2709
|
} else if (!r || typeof r != "object") {
|
2546
|
-
if (s = n(r), s === void 0 && (s = r), s ===
|
2547
|
-
const c = [],
|
2548
|
-
|
2710
|
+
if (s = n(r), s === void 0 && (s = r), s === Tn && (s = void 0), this.autoFreeze_ && En(s, !0), i) {
|
2711
|
+
const c = [], h = [];
|
2712
|
+
jt("Patches").generateReplacementPatches_(r, s, c, h), i(c, h);
|
2549
2713
|
}
|
2550
2714
|
return s;
|
2551
2715
|
} else
|
2552
|
-
|
2716
|
+
$(1, r);
|
2553
2717
|
}, this.produceWithPatches = (r, n) => {
|
2554
2718
|
if (typeof r == "function")
|
2555
|
-
return (
|
2719
|
+
return (h, ...m) => this.produceWithPatches(h, (P) => r(P, ...m));
|
2556
2720
|
let i, s;
|
2557
|
-
return [this.produce(r, n, (
|
2558
|
-
i =
|
2721
|
+
return [this.produce(r, n, (h, m) => {
|
2722
|
+
i = h, s = m;
|
2559
2723
|
}), i, s];
|
2560
2724
|
}, 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
2725
|
}
|
2562
2726
|
createDraft(t) {
|
2563
|
-
|
2564
|
-
const r =
|
2565
|
-
return n[
|
2727
|
+
wt(t) || $(8), Rt(t) && (t = ma(t));
|
2728
|
+
const r = Hn(this), n = Sn(t, void 0);
|
2729
|
+
return n[nt].isManual_ = !0, In(r), n;
|
2566
2730
|
}
|
2567
2731
|
finishDraft(t, r) {
|
2568
|
-
const n = t && t[
|
2569
|
-
(!n || !n.isManual_) &&
|
2732
|
+
const n = t && t[nt];
|
2733
|
+
(!n || !n.isManual_) && $(9);
|
2570
2734
|
const { scope_: i } = n;
|
2571
|
-
return zn(i, r),
|
2735
|
+
return zn(i, r), Nn(void 0, i);
|
2572
2736
|
}
|
2573
2737
|
/**
|
2574
2738
|
* Pass true to automatically freeze all copies created by Immer.
|
@@ -2596,242 +2760,242 @@ var ca = class {
|
|
2596
2760
|
}
|
2597
2761
|
}
|
2598
2762
|
n > -1 && (r = r.slice(n + 1));
|
2599
|
-
const i =
|
2600
|
-
return
|
2763
|
+
const i = jt("Patches").applyPatches_;
|
2764
|
+
return Rt(t) ? i(t, r) : this.produce(
|
2601
2765
|
t,
|
2602
2766
|
(s) => i(s, r)
|
2603
2767
|
);
|
2604
2768
|
}
|
2605
2769
|
};
|
2606
|
-
function
|
2607
|
-
const n =
|
2608
|
-
return (r ? r.scope_ :
|
2770
|
+
function Sn(t, r) {
|
2771
|
+
const n = Te(t) ? jt("MapSet").proxyMap_(t, r) : Ee(t) ? jt("MapSet").proxySet_(t, r) : da(t, r);
|
2772
|
+
return (r ? r.scope_ : ui()).drafts_.push(n), n;
|
2609
2773
|
}
|
2610
|
-
function
|
2611
|
-
return
|
2774
|
+
function ma(t) {
|
2775
|
+
return Rt(t) || $(10, t), fi(t);
|
2612
2776
|
}
|
2613
|
-
function
|
2614
|
-
if (!
|
2777
|
+
function fi(t) {
|
2778
|
+
if (!wt(t) || cr(t))
|
2615
2779
|
return t;
|
2616
|
-
const r = t[
|
2780
|
+
const r = t[nt];
|
2617
2781
|
let n;
|
2618
2782
|
if (r) {
|
2619
2783
|
if (!r.modified_)
|
2620
2784
|
return r.base_;
|
2621
|
-
r.finalized_ = !0, n =
|
2785
|
+
r.finalized_ = !0, n = bn(t, r.scope_.immer_.useStrictShallowCopy_);
|
2622
2786
|
} else
|
2623
|
-
n =
|
2624
|
-
return
|
2625
|
-
|
2787
|
+
n = bn(t, !0);
|
2788
|
+
return _e(n, (i, s) => {
|
2789
|
+
ci(n, i, fi(s));
|
2626
2790
|
}), r && (r.finalized_ = !1), n;
|
2627
2791
|
}
|
2628
|
-
function
|
2629
|
-
process.env.NODE_ENV !== "production" &&
|
2792
|
+
function Un() {
|
2793
|
+
process.env.NODE_ENV !== "production" && si.push(
|
2630
2794
|
'Sets cannot have "replace" patches.',
|
2631
|
-
function(
|
2632
|
-
return "Unsupported patch operation: " +
|
2795
|
+
function(b) {
|
2796
|
+
return "Unsupported patch operation: " + b;
|
2633
2797
|
},
|
2634
|
-
function(
|
2635
|
-
return "Cannot apply patch, path doesn't resolve: " +
|
2798
|
+
function(b) {
|
2799
|
+
return "Cannot apply patch, path doesn't resolve: " + b;
|
2636
2800
|
},
|
2637
2801
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
2638
2802
|
);
|
2639
2803
|
const r = "replace", n = "add", i = "remove";
|
2640
|
-
function s(
|
2641
|
-
switch (
|
2804
|
+
function s(b, d, f, p) {
|
2805
|
+
switch (b.type_) {
|
2642
2806
|
case 0:
|
2643
2807
|
case 2:
|
2644
|
-
return
|
2645
|
-
|
2646
|
-
|
2647
|
-
|
2648
|
-
|
2808
|
+
return h(
|
2809
|
+
b,
|
2810
|
+
d,
|
2811
|
+
f,
|
2812
|
+
p
|
2649
2813
|
);
|
2650
2814
|
case 1:
|
2651
|
-
return c(
|
2815
|
+
return c(b, d, f, p);
|
2652
2816
|
case 3:
|
2653
|
-
return
|
2654
|
-
|
2655
|
-
|
2656
|
-
|
2657
|
-
|
2817
|
+
return m(
|
2818
|
+
b,
|
2819
|
+
d,
|
2820
|
+
f,
|
2821
|
+
p
|
2658
2822
|
);
|
2659
2823
|
}
|
2660
2824
|
}
|
2661
|
-
function c(
|
2662
|
-
let { base_:
|
2663
|
-
|
2664
|
-
for (let
|
2665
|
-
if (
|
2666
|
-
const
|
2667
|
-
|
2825
|
+
function c(b, d, f, p) {
|
2826
|
+
let { base_: g, assigned_: v } = b, _ = b.copy_;
|
2827
|
+
_.length < g.length && ([g, _] = [_, g], [f, p] = [p, f]);
|
2828
|
+
for (let y = 0; y < g.length; y++)
|
2829
|
+
if (v[y] && _[y] !== g[y]) {
|
2830
|
+
const l = d.concat([y]);
|
2831
|
+
f.push({
|
2668
2832
|
op: r,
|
2669
|
-
path:
|
2833
|
+
path: l,
|
2670
2834
|
// Need to maybe clone it, as it can in fact be the original value
|
2671
2835
|
// due to the base/copy inversion at the start of this function
|
2672
|
-
value:
|
2673
|
-
}),
|
2836
|
+
value: N(_[y])
|
2837
|
+
}), p.push({
|
2674
2838
|
op: r,
|
2675
|
-
path:
|
2676
|
-
value:
|
2839
|
+
path: l,
|
2840
|
+
value: N(g[y])
|
2677
2841
|
});
|
2678
2842
|
}
|
2679
|
-
for (let
|
2680
|
-
const
|
2681
|
-
|
2843
|
+
for (let y = g.length; y < _.length; y++) {
|
2844
|
+
const l = d.concat([y]);
|
2845
|
+
f.push({
|
2682
2846
|
op: n,
|
2683
|
-
path:
|
2847
|
+
path: l,
|
2684
2848
|
// Need to maybe clone it, as it can in fact be the original value
|
2685
2849
|
// due to the base/copy inversion at the start of this function
|
2686
|
-
value:
|
2850
|
+
value: N(_[y])
|
2687
2851
|
});
|
2688
2852
|
}
|
2689
|
-
for (let
|
2690
|
-
const
|
2691
|
-
|
2853
|
+
for (let y = _.length - 1; g.length <= y; --y) {
|
2854
|
+
const l = d.concat([y]);
|
2855
|
+
p.push({
|
2692
2856
|
op: i,
|
2693
|
-
path:
|
2857
|
+
path: l
|
2694
2858
|
});
|
2695
2859
|
}
|
2696
2860
|
}
|
2697
|
-
function
|
2698
|
-
const { base_:
|
2699
|
-
|
2700
|
-
const
|
2701
|
-
if (
|
2861
|
+
function h(b, d, f, p) {
|
2862
|
+
const { base_: g, copy_: v } = b;
|
2863
|
+
_e(b.assigned_, (_, y) => {
|
2864
|
+
const l = rn(g, _), x = rn(v, _), M = y ? Ie(g, _) ? r : n : i;
|
2865
|
+
if (l === x && M === r)
|
2702
2866
|
return;
|
2703
|
-
const
|
2704
|
-
|
2705
|
-
|
2867
|
+
const I = d.concat(_);
|
2868
|
+
f.push(M === i ? { op: M, path: I } : { op: M, path: I, value: x }), p.push(
|
2869
|
+
M === n ? { op: i, path: I } : M === i ? { op: n, path: I, value: N(l) } : { op: r, path: I, value: N(l) }
|
2706
2870
|
);
|
2707
2871
|
});
|
2708
2872
|
}
|
2709
|
-
function
|
2710
|
-
let { base_:
|
2711
|
-
|
2712
|
-
if (!
|
2713
|
-
const
|
2714
|
-
|
2873
|
+
function m(b, d, f, p) {
|
2874
|
+
let { base_: g, copy_: v } = b, _ = 0;
|
2875
|
+
g.forEach((y) => {
|
2876
|
+
if (!v.has(y)) {
|
2877
|
+
const l = d.concat([_]);
|
2878
|
+
f.push({
|
2715
2879
|
op: i,
|
2716
|
-
path:
|
2717
|
-
value:
|
2718
|
-
}),
|
2880
|
+
path: l,
|
2881
|
+
value: y
|
2882
|
+
}), p.unshift({
|
2719
2883
|
op: n,
|
2720
|
-
path:
|
2721
|
-
value:
|
2884
|
+
path: l,
|
2885
|
+
value: y
|
2722
2886
|
});
|
2723
2887
|
}
|
2724
|
-
|
2725
|
-
}),
|
2726
|
-
if (!
|
2727
|
-
const
|
2728
|
-
|
2888
|
+
_++;
|
2889
|
+
}), _ = 0, v.forEach((y) => {
|
2890
|
+
if (!g.has(y)) {
|
2891
|
+
const l = d.concat([_]);
|
2892
|
+
f.push({
|
2729
2893
|
op: n,
|
2730
|
-
path:
|
2731
|
-
value:
|
2732
|
-
}),
|
2894
|
+
path: l,
|
2895
|
+
value: y
|
2896
|
+
}), p.unshift({
|
2733
2897
|
op: i,
|
2734
|
-
path:
|
2735
|
-
value:
|
2898
|
+
path: l,
|
2899
|
+
value: y
|
2736
2900
|
});
|
2737
2901
|
}
|
2738
|
-
|
2902
|
+
_++;
|
2739
2903
|
});
|
2740
2904
|
}
|
2741
|
-
function
|
2742
|
-
|
2905
|
+
function P(b, d, f, p) {
|
2906
|
+
f.push({
|
2743
2907
|
op: r,
|
2744
2908
|
path: [],
|
2745
|
-
value:
|
2746
|
-
}),
|
2909
|
+
value: d === Tn ? void 0 : d
|
2910
|
+
}), p.push({
|
2747
2911
|
op: r,
|
2748
2912
|
path: [],
|
2749
|
-
value:
|
2913
|
+
value: b
|
2750
2914
|
});
|
2751
2915
|
}
|
2752
|
-
function F(
|
2753
|
-
return
|
2754
|
-
const { path:
|
2755
|
-
let
|
2756
|
-
for (let
|
2757
|
-
const
|
2758
|
-
let
|
2759
|
-
typeof
|
2916
|
+
function F(b, d) {
|
2917
|
+
return d.forEach((f) => {
|
2918
|
+
const { path: p, op: g } = f;
|
2919
|
+
let v = b;
|
2920
|
+
for (let x = 0; x < p.length - 1; x++) {
|
2921
|
+
const M = Ft(v);
|
2922
|
+
let I = p[x];
|
2923
|
+
typeof I != "string" && typeof I != "number" && (I = "" + I), (M === 0 || M === 1) && (I === "__proto__" || I === "constructor") && $(19), typeof v == "function" && I === "prototype" && $(19), v = rn(v, I), typeof v != "object" && $(18, p.join("/"));
|
2760
2924
|
}
|
2761
|
-
const
|
2762
|
-
switch (
|
2925
|
+
const _ = Ft(v), y = E(f.value), l = p[p.length - 1];
|
2926
|
+
switch (g) {
|
2763
2927
|
case r:
|
2764
|
-
switch (
|
2928
|
+
switch (_) {
|
2765
2929
|
case 2:
|
2766
|
-
return
|
2930
|
+
return v.set(l, y);
|
2767
2931
|
case 3:
|
2768
|
-
|
2932
|
+
$(16);
|
2769
2933
|
default:
|
2770
|
-
return
|
2934
|
+
return v[l] = y;
|
2771
2935
|
}
|
2772
2936
|
case n:
|
2773
|
-
switch (
|
2937
|
+
switch (_) {
|
2774
2938
|
case 1:
|
2775
|
-
return
|
2939
|
+
return l === "-" ? v.push(y) : v.splice(l, 0, y);
|
2776
2940
|
case 2:
|
2777
|
-
return
|
2941
|
+
return v.set(l, y);
|
2778
2942
|
case 3:
|
2779
|
-
return
|
2943
|
+
return v.add(y);
|
2780
2944
|
default:
|
2781
|
-
return
|
2945
|
+
return v[l] = y;
|
2782
2946
|
}
|
2783
2947
|
case i:
|
2784
|
-
switch (
|
2948
|
+
switch (_) {
|
2785
2949
|
case 1:
|
2786
|
-
return
|
2950
|
+
return v.splice(l, 1);
|
2787
2951
|
case 2:
|
2788
|
-
return
|
2952
|
+
return v.delete(l);
|
2789
2953
|
case 3:
|
2790
|
-
return
|
2954
|
+
return v.delete(f.value);
|
2791
2955
|
default:
|
2792
|
-
return delete
|
2956
|
+
return delete v[l];
|
2793
2957
|
}
|
2794
2958
|
default:
|
2795
|
-
|
2959
|
+
$(17, g);
|
2796
2960
|
}
|
2797
|
-
}),
|
2798
|
-
}
|
2799
|
-
function
|
2800
|
-
if (!
|
2801
|
-
return
|
2802
|
-
if (Array.isArray(
|
2803
|
-
return
|
2804
|
-
if (
|
2961
|
+
}), b;
|
2962
|
+
}
|
2963
|
+
function E(b) {
|
2964
|
+
if (!wt(b))
|
2965
|
+
return b;
|
2966
|
+
if (Array.isArray(b))
|
2967
|
+
return b.map(E);
|
2968
|
+
if (Te(b))
|
2805
2969
|
return new Map(
|
2806
|
-
Array.from(
|
2970
|
+
Array.from(b.entries()).map(([f, p]) => [f, E(p)])
|
2807
2971
|
);
|
2808
|
-
if (
|
2809
|
-
return new Set(Array.from(
|
2810
|
-
const
|
2811
|
-
for (const
|
2812
|
-
|
2813
|
-
return
|
2972
|
+
if (Ee(b))
|
2973
|
+
return new Set(Array.from(b).map(E));
|
2974
|
+
const d = Object.create(Ct(b));
|
2975
|
+
for (const f in b)
|
2976
|
+
d[f] = E(b[f]);
|
2977
|
+
return Ie(b, ge) && (d[ge] = b[ge]), d;
|
2814
2978
|
}
|
2815
|
-
function
|
2816
|
-
return
|
2979
|
+
function N(b) {
|
2980
|
+
return Rt(b) ? E(b) : b;
|
2817
2981
|
}
|
2818
|
-
|
2982
|
+
ua("Patches", {
|
2819
2983
|
applyPatches_: F,
|
2820
2984
|
generatePatches_: s,
|
2821
|
-
generateReplacementPatches_:
|
2985
|
+
generateReplacementPatches_: P
|
2822
2986
|
});
|
2823
2987
|
}
|
2824
|
-
var
|
2825
|
-
|
2826
|
-
|
2988
|
+
var it = new ha(), ya = it.produce;
|
2989
|
+
it.produceWithPatches.bind(
|
2990
|
+
it
|
2827
2991
|
);
|
2828
|
-
|
2829
|
-
|
2830
|
-
var
|
2831
|
-
|
2832
|
-
|
2833
|
-
var
|
2834
|
-
function
|
2992
|
+
it.setAutoFreeze.bind(it);
|
2993
|
+
it.setUseStrictShallowCopy.bind(it);
|
2994
|
+
var ba = it.applyPatches.bind(it);
|
2995
|
+
it.createDraft.bind(it);
|
2996
|
+
it.finishDraft.bind(it);
|
2997
|
+
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")();
|
2998
|
+
function Ma(t, r, n) {
|
2835
2999
|
switch (n.length) {
|
2836
3000
|
case 0:
|
2837
3001
|
return t.call(r);
|
@@ -2844,91 +3008,91 @@ function Ia(t, r, n) {
|
|
2844
3008
|
}
|
2845
3009
|
return t.apply(r, n);
|
2846
3010
|
}
|
2847
|
-
function
|
3011
|
+
function Aa(t, r) {
|
2848
3012
|
for (var n = -1, i = t ? t.length : 0, s = Array(i); ++n < i; )
|
2849
3013
|
s[n] = r(t[n], n, t);
|
2850
3014
|
return s;
|
2851
3015
|
}
|
2852
|
-
function
|
3016
|
+
function Oa(t, r) {
|
2853
3017
|
for (var n = -1, i = r.length, s = t.length; ++n < i; )
|
2854
3018
|
t[s + n] = r[n];
|
2855
3019
|
return t;
|
2856
3020
|
}
|
2857
|
-
var
|
2858
|
-
function
|
2859
|
-
var c = -1,
|
2860
|
-
for (n || (n =
|
2861
|
-
var
|
2862
|
-
n(
|
3021
|
+
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;
|
3022
|
+
function Pa(t, r, n, i, s) {
|
3023
|
+
var c = -1, h = t.length;
|
3024
|
+
for (n || (n = ja), s || (s = []); ++c < h; ) {
|
3025
|
+
var m = t[c];
|
3026
|
+
n(m) ? Oa(s, m) : s[s.length] = m;
|
2863
3027
|
}
|
2864
3028
|
return s;
|
2865
3029
|
}
|
2866
|
-
function
|
2867
|
-
return t = Object(t),
|
3030
|
+
function Ca(t, r) {
|
3031
|
+
return t = Object(t), Ra(t, r, function(n, i) {
|
2868
3032
|
return i in t;
|
2869
3033
|
});
|
2870
3034
|
}
|
2871
|
-
function
|
3035
|
+
function Ra(t, r, n) {
|
2872
3036
|
for (var i = -1, s = r.length, c = {}; ++i < s; ) {
|
2873
|
-
var
|
2874
|
-
n(
|
3037
|
+
var h = r[i], m = t[h];
|
3038
|
+
n(m, h) && (c[h] = m);
|
2875
3039
|
}
|
2876
3040
|
return c;
|
2877
3041
|
}
|
2878
|
-
function
|
3042
|
+
function Fa(t, r) {
|
2879
3043
|
return r = Bn(r === void 0 ? t.length - 1 : r, 0), function() {
|
2880
3044
|
for (var n = arguments, i = -1, s = Bn(n.length - r, 0), c = Array(s); ++i < s; )
|
2881
3045
|
c[i] = n[r + i];
|
2882
3046
|
i = -1;
|
2883
|
-
for (var
|
2884
|
-
|
2885
|
-
return
|
3047
|
+
for (var h = Array(r + 1); ++i < r; )
|
3048
|
+
h[i] = n[i];
|
3049
|
+
return h[r] = c, Ma(t, this, h);
|
2886
3050
|
};
|
2887
3051
|
}
|
2888
|
-
function
|
2889
|
-
return
|
3052
|
+
function ja(t) {
|
3053
|
+
return Na(t) || Ha(t) || !!(Gn && t && t[Gn]);
|
2890
3054
|
}
|
2891
|
-
function
|
2892
|
-
if (typeof t == "string" ||
|
3055
|
+
function za(t) {
|
3056
|
+
if (typeof t == "string" || $a(t))
|
2893
3057
|
return t;
|
2894
3058
|
var r = t + "";
|
2895
|
-
return r == "0" && 1 / t == -
|
3059
|
+
return r == "0" && 1 / t == -ga ? "-0" : r;
|
2896
3060
|
}
|
2897
|
-
function
|
2898
|
-
return
|
3061
|
+
function Ha(t) {
|
3062
|
+
return Ua(t) && xa.call(t, "callee") && (!Da.call(t, "callee") || On.call(t) == Ia);
|
2899
3063
|
}
|
2900
|
-
var
|
2901
|
-
function
|
2902
|
-
return t != null &&
|
3064
|
+
var Na = Array.isArray;
|
3065
|
+
function La(t) {
|
3066
|
+
return t != null && Ga(t.length) && !Wa(t);
|
2903
3067
|
}
|
2904
|
-
function
|
2905
|
-
return
|
3068
|
+
function Ua(t) {
|
3069
|
+
return di(t) && La(t);
|
2906
3070
|
}
|
2907
|
-
function
|
2908
|
-
var r =
|
2909
|
-
return r ==
|
3071
|
+
function Wa(t) {
|
3072
|
+
var r = Ba(t) ? On.call(t) : "";
|
3073
|
+
return r == va || r == Sa;
|
2910
3074
|
}
|
2911
|
-
function
|
2912
|
-
return typeof t == "number" && t > -1 && t % 1 == 0 && t <=
|
3075
|
+
function Ga(t) {
|
3076
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= _a;
|
2913
3077
|
}
|
2914
|
-
function
|
3078
|
+
function Ba(t) {
|
2915
3079
|
var r = typeof t;
|
2916
3080
|
return !!t && (r == "object" || r == "function");
|
2917
3081
|
}
|
2918
|
-
function
|
3082
|
+
function di(t) {
|
2919
3083
|
return !!t && typeof t == "object";
|
2920
3084
|
}
|
2921
|
-
function
|
2922
|
-
return typeof t == "symbol" ||
|
3085
|
+
function $a(t) {
|
3086
|
+
return typeof t == "symbol" || di(t) && On.call(t) == wa;
|
2923
3087
|
}
|
2924
|
-
var
|
2925
|
-
return t == null ? {} :
|
2926
|
-
}),
|
2927
|
-
const $n = /* @__PURE__ */
|
3088
|
+
var Ka = Fa(function(t, r) {
|
3089
|
+
return t == null ? {} : Ca(t, Aa(Pa(r), za));
|
3090
|
+
}), Ya = Ka;
|
3091
|
+
const $n = /* @__PURE__ */ wn(Ya), Va = {
|
2928
3092
|
width: 1080,
|
2929
3093
|
height: 1920
|
2930
|
-
},
|
2931
|
-
size:
|
3094
|
+
}, Xa = {
|
3095
|
+
size: Va,
|
2932
3096
|
tracks: [],
|
2933
3097
|
trackItemIds: [],
|
2934
3098
|
trackItemsMap: {},
|
@@ -2951,22 +3115,22 @@ const $n = /* @__PURE__ */ gn(La), Ga = {
|
|
2951
3115
|
"transitionsMap",
|
2952
3116
|
"trackItemIds"
|
2953
3117
|
];
|
2954
|
-
class
|
3118
|
+
class Za {
|
2955
3119
|
constructor(r) {
|
2956
|
-
|
2957
|
-
|
2958
|
-
|
2959
|
-
|
2960
|
-
|
2961
|
-
|
2962
|
-
const n = r ||
|
2963
|
-
this.stateSubject = new
|
3120
|
+
Dt(this, "stateSubject");
|
3121
|
+
Dt(this, "stateHistorySubject");
|
3122
|
+
Dt(this, "prevState");
|
3123
|
+
Dt(this, "undos", []);
|
3124
|
+
Dt(this, "redos", []);
|
3125
|
+
Dt(this, "listener");
|
3126
|
+
const n = r || Xa;
|
3127
|
+
this.stateSubject = new jn(n), this.stateHistorySubject = new jn({
|
2964
3128
|
handleRedo: !1,
|
2965
3129
|
handleUndo: !1
|
2966
3130
|
}), this.prevState = n, this.initListeners();
|
2967
3131
|
}
|
2968
3132
|
initListeners() {
|
2969
|
-
|
3133
|
+
ia(this);
|
2970
3134
|
}
|
2971
3135
|
destroyListeners() {
|
2972
3136
|
this.listener && this.listener.unsubscribe();
|
@@ -2975,7 +3139,7 @@ class Ka {
|
|
2975
3139
|
this.destroyListeners();
|
2976
3140
|
}
|
2977
3141
|
updateHistory(r, n) {
|
2978
|
-
const i = $n(r, Kn), s = $n(this.getState(), Kn), c =
|
3142
|
+
const i = $n(r, Kn), s = $n(this.getState(), Kn), c = ai(s, i);
|
2979
3143
|
c.length && (this.undos.push({ undos: c, type: n }), this.redos = []);
|
2980
3144
|
}
|
2981
3145
|
getStateHistory() {
|
@@ -2998,28 +3162,28 @@ class Ka {
|
|
2998
3162
|
...i,
|
2999
3163
|
...r
|
3000
3164
|
};
|
3001
|
-
|
3165
|
+
rt(i, s) || (n.updateHistory && this.updateHistory(s, n.kind), this.prevState = i, this.stateSubject.next(s));
|
3002
3166
|
}
|
3003
3167
|
// emit changes for design size
|
3004
3168
|
subscribeToSize(r) {
|
3005
3169
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3006
|
-
|
3170
|
+
rt(n.size, this.prevState.size) || r({ size: n.size });
|
3007
3171
|
});
|
3008
3172
|
}
|
3009
3173
|
// Selectively subscribe to scale changes
|
3010
3174
|
subscribeToScale(r) {
|
3011
3175
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3012
|
-
|
3176
|
+
rt(n.scale, this.prevState.scale) || r({ scale: n.scale });
|
3013
3177
|
});
|
3014
3178
|
}
|
3015
3179
|
subscribeToUpdateTrackItem(r) {
|
3016
3180
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3017
|
-
|
3181
|
+
rt(n.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: n.trackItemsMap });
|
3018
3182
|
});
|
3019
3183
|
}
|
3020
3184
|
subscribeToUpdateItemDetails(r) {
|
3021
3185
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3022
|
-
|
3186
|
+
rt(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
|
3023
3187
|
});
|
3024
3188
|
}
|
3025
3189
|
// Selectively subscribe to duration changes
|
@@ -3042,19 +3206,19 @@ class Ka {
|
|
3042
3206
|
}
|
3043
3207
|
subscribeToAddOrRemoveItems(r) {
|
3044
3208
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3045
|
-
|
3209
|
+
rt(n.trackItemIds, this.prevState.trackItemIds) || r({ trackItemIds: n.trackItemIds });
|
3046
3210
|
});
|
3047
3211
|
}
|
3048
3212
|
// Selectively subscribe to activeIds changes
|
3049
3213
|
subscribeToActiveIds(r) {
|
3050
3214
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3051
|
-
|
3215
|
+
rt(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
|
3052
3216
|
});
|
3053
3217
|
}
|
3054
3218
|
// Selectively subscribe to multiple track-related properties
|
3055
3219
|
subscribeToTracks(r) {
|
3056
3220
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3057
|
-
(!
|
3221
|
+
(!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
3222
|
tracks: n.tracks,
|
3059
3223
|
trackItemIds: n.trackItemIds,
|
3060
3224
|
trackItemsMap: n.trackItemsMap,
|
@@ -3067,141 +3231,141 @@ class Ka {
|
|
3067
3231
|
undo() {
|
3068
3232
|
const r = this.undos.pop(), n = r == null ? void 0 : r.undos, i = r == null ? void 0 : r.type;
|
3069
3233
|
if (!n || !i) return;
|
3070
|
-
|
3234
|
+
Un();
|
3071
3235
|
const {
|
3072
3236
|
trackItemDetailsMap: s,
|
3073
3237
|
trackItemIds: c,
|
3074
|
-
tracks:
|
3075
|
-
transitionIds:
|
3076
|
-
transitionsMap:
|
3238
|
+
tracks: h,
|
3239
|
+
transitionIds: m,
|
3240
|
+
transitionsMap: P,
|
3077
3241
|
trackItemsMap: F
|
3078
|
-
} = this.getState(),
|
3242
|
+
} = this.getState(), E = B({
|
3079
3243
|
trackItemDetailsMap: s,
|
3080
3244
|
trackItemIds: c,
|
3081
|
-
tracks:
|
3082
|
-
transitionIds:
|
3083
|
-
transitionsMap:
|
3245
|
+
tracks: h,
|
3246
|
+
transitionIds: m,
|
3247
|
+
transitionsMap: P,
|
3084
3248
|
trackItemsMap: F
|
3085
|
-
}),
|
3249
|
+
}), N = [], b = [], d = [], f = [], p = [], g = [];
|
3086
3250
|
n.forEach((k) => {
|
3087
|
-
let
|
3088
|
-
const
|
3089
|
-
k.type === "CREATE" ?
|
3090
|
-
path:
|
3251
|
+
let S;
|
3252
|
+
const A = k.path.slice(1);
|
3253
|
+
k.type === "CREATE" ? S = {
|
3254
|
+
path: A,
|
3091
3255
|
op: "remove",
|
3092
3256
|
value: k.value
|
3093
|
-
} : k.type === "CHANGE" ?
|
3094
|
-
path:
|
3257
|
+
} : k.type === "CHANGE" ? S = {
|
3258
|
+
path: A,
|
3095
3259
|
op: "replace",
|
3096
3260
|
value: k.oldValue
|
3097
|
-
} :
|
3098
|
-
path:
|
3261
|
+
} : S = {
|
3262
|
+
path: A,
|
3099
3263
|
op: "add",
|
3100
3264
|
value: k.oldValue
|
3101
|
-
}, k.path.includes("trackItemIds") ?
|
3265
|
+
}, k.path.includes("trackItemIds") ? d.push(S) : k.path.includes("transitionIds") ? b.push(S) : k.path.includes("trackItemsMap") ? p.push(S) : k.path.includes("transitionsMap") ? f.push(S) : k.path.includes("tracks") ? N.push(S) : k.path.includes("trackItemDetailsMap") && g.push(S);
|
3102
3266
|
});
|
3103
|
-
const
|
3104
|
-
|
3105
|
-
|
3106
|
-
),
|
3107
|
-
|
3108
|
-
|
3109
|
-
),
|
3110
|
-
|
3267
|
+
const v = this.applyPatch(
|
3268
|
+
E.tracks,
|
3269
|
+
N
|
3270
|
+
), _ = this.applyPatch(
|
3271
|
+
E.transitionIds,
|
3272
|
+
b
|
3273
|
+
), y = this.applyPatch(
|
3274
|
+
E.trackItemIds,
|
3275
|
+
d
|
3276
|
+
), l = this.applyPatch(
|
3277
|
+
E.transitionsMap,
|
3278
|
+
f
|
3279
|
+
), x = this.applyPatch(
|
3280
|
+
E.trackItemsMap,
|
3111
3281
|
p
|
3112
|
-
),
|
3113
|
-
|
3114
|
-
|
3115
|
-
),
|
3116
|
-
|
3117
|
-
|
3118
|
-
|
3119
|
-
|
3120
|
-
|
3121
|
-
|
3122
|
-
|
3123
|
-
|
3124
|
-
|
3125
|
-
|
3126
|
-
trackItemsMap: O,
|
3127
|
-
trackItemDetailsMap: E
|
3128
|
-
}), D = X(this.getState()), I = { ...D, ..._ };
|
3129
|
-
this.prevState = D, this.redos.push({ redos: n, type: i });
|
3130
|
-
const P = Yt(I.trackItemsMap);
|
3131
|
-
this.stateSubject.next({ ...I, duration: P }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3282
|
+
), M = this.applyPatch(
|
3283
|
+
E.trackItemDetailsMap,
|
3284
|
+
g
|
3285
|
+
), I = B({
|
3286
|
+
tracks: v,
|
3287
|
+
transitionIds: _,
|
3288
|
+
trackItemIds: y,
|
3289
|
+
transitionsMap: l,
|
3290
|
+
trackItemsMap: x,
|
3291
|
+
trackItemDetailsMap: M
|
3292
|
+
}), C = B(this.getState()), w = { ...C, ...I };
|
3293
|
+
this.prevState = C, this.redos.push({ redos: n, type: i });
|
3294
|
+
const D = qt(w.trackItemsMap);
|
3295
|
+
this.stateSubject.next({ ...w, duration: D }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3132
3296
|
}
|
3133
3297
|
applyPatch(r, n) {
|
3134
|
-
return n.reverse().reduce((i, s) =>
|
3135
|
-
|
3298
|
+
return n.reverse().reduce((i, s) => ya(i, (c) => {
|
3299
|
+
ba(c, [s]);
|
3136
3300
|
}), r);
|
3137
3301
|
}
|
3138
3302
|
redo() {
|
3139
3303
|
const r = this.redos.pop(), n = r == null ? void 0 : r.redos, i = r == null ? void 0 : r.type;
|
3140
3304
|
if (!n || !i) return;
|
3141
|
-
|
3305
|
+
Un();
|
3142
3306
|
const {
|
3143
3307
|
trackItemDetailsMap: s,
|
3144
3308
|
trackItemIds: c,
|
3145
|
-
tracks:
|
3146
|
-
transitionIds:
|
3147
|
-
transitionsMap:
|
3309
|
+
tracks: h,
|
3310
|
+
transitionIds: m,
|
3311
|
+
transitionsMap: P,
|
3148
3312
|
trackItemsMap: F
|
3149
|
-
} = this.getState(),
|
3313
|
+
} = this.getState(), E = B({
|
3150
3314
|
trackItemDetailsMap: s,
|
3151
3315
|
trackItemIds: c,
|
3152
|
-
tracks:
|
3153
|
-
transitionIds:
|
3154
|
-
transitionsMap:
|
3316
|
+
tracks: h,
|
3317
|
+
transitionIds: m,
|
3318
|
+
transitionsMap: P,
|
3155
3319
|
trackItemsMap: F
|
3156
|
-
}),
|
3320
|
+
}), N = [], b = [], d = [], f = [], p = [], g = [];
|
3157
3321
|
n.forEach((k) => {
|
3158
|
-
let
|
3159
|
-
const
|
3160
|
-
k.type === "CREATE" ?
|
3161
|
-
path:
|
3322
|
+
let S;
|
3323
|
+
const A = k.path.slice(1);
|
3324
|
+
k.type === "CREATE" ? S = {
|
3325
|
+
path: A,
|
3162
3326
|
op: "add",
|
3163
3327
|
value: k.value
|
3164
|
-
} : k.type === "CHANGE" ?
|
3165
|
-
path:
|
3328
|
+
} : k.type === "CHANGE" ? S = {
|
3329
|
+
path: A,
|
3166
3330
|
op: "replace",
|
3167
3331
|
value: k.value
|
3168
|
-
} :
|
3169
|
-
path:
|
3332
|
+
} : S = {
|
3333
|
+
path: A,
|
3170
3334
|
op: "remove",
|
3171
3335
|
value: k.oldValue
|
3172
|
-
}, k.path.includes("trackItemIds") ?
|
3336
|
+
}, k.path.includes("trackItemIds") ? d.push(S) : k.path.includes("transitionIds") ? b.push(S) : k.path.includes("trackItemsMap") ? p.push(S) : k.path.includes("transitionsMap") ? f.push(S) : k.path.includes("trackItemDetailsMap") ? g.push(S) : N.push(S);
|
3173
3337
|
});
|
3174
|
-
const
|
3175
|
-
|
3176
|
-
|
3177
|
-
),
|
3178
|
-
|
3179
|
-
|
3180
|
-
),
|
3181
|
-
|
3338
|
+
const v = this.applyPatch(
|
3339
|
+
E.tracks,
|
3340
|
+
N
|
3341
|
+
), _ = this.applyPatch(
|
3342
|
+
E.transitionIds,
|
3343
|
+
b
|
3344
|
+
), y = this.applyPatch(
|
3345
|
+
E.trackItemIds,
|
3346
|
+
d
|
3347
|
+
), l = this.applyPatch(
|
3348
|
+
E.transitionsMap,
|
3349
|
+
f
|
3350
|
+
), x = this.applyPatch(
|
3351
|
+
E.trackItemsMap,
|
3182
3352
|
p
|
3183
|
-
),
|
3184
|
-
|
3185
|
-
|
3186
|
-
),
|
3187
|
-
|
3188
|
-
|
3189
|
-
|
3190
|
-
|
3191
|
-
|
3192
|
-
|
3193
|
-
|
3194
|
-
|
3195
|
-
|
3196
|
-
|
3197
|
-
trackItemsMap: O,
|
3198
|
-
trackItemDetailsMap: E
|
3199
|
-
}), D = X(this.getState()), I = { ...D, ..._ };
|
3200
|
-
this.prevState = D, this.undos.push({ undos: n, type: i });
|
3201
|
-
const P = Yt(I.trackItemsMap);
|
3202
|
-
this.stateSubject.next({ ...I, duration: P }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3353
|
+
), M = this.applyPatch(
|
3354
|
+
E.trackItemDetailsMap,
|
3355
|
+
g
|
3356
|
+
), I = B({
|
3357
|
+
tracks: v,
|
3358
|
+
transitionIds: _,
|
3359
|
+
trackItemIds: y,
|
3360
|
+
transitionsMap: l,
|
3361
|
+
trackItemsMap: x,
|
3362
|
+
trackItemDetailsMap: M
|
3363
|
+
}), C = B(this.getState()), w = { ...C, ...I };
|
3364
|
+
this.prevState = C, this.undos.push({ undos: n, type: i });
|
3365
|
+
const D = qt(w.trackItemsMap);
|
3366
|
+
this.stateSubject.next({ ...w, duration: D }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3203
3367
|
}
|
3204
3368
|
}
|
3205
3369
|
export {
|
3206
|
-
|
3370
|
+
Za as default
|
3207
3371
|
};
|