@designcombo/state 5.0.0 → 5.0.2
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/events.d.ts +3 -0
- package/dist/handlers/add/custom.d.ts +1 -1
- package/dist/handlers/add/rect.d.ts +10 -0
- package/dist/index.es.js +1359 -1246
- package/dist/index.umd.js +3 -3
- package/dist/utils/load-item.d.ts +51 -1
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
import { subject as
|
1
|
+
var Rs = Object.defineProperty;
|
2
|
+
var zs = (t, r, e) => r in t ? Rs(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
|
3
|
+
var Ct = (t, r, e) => zs(t, typeof r != "symbol" ? r + "" : r, e);
|
4
|
+
import { subject as Wt, filter as Bt, dispatch as $s } from "@designcombo/events";
|
5
5
|
var yn = function(t, r) {
|
6
6
|
return yn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, s) {
|
7
7
|
e.__proto__ = s;
|
@@ -9,7 +9,7 @@ var yn = function(t, r) {
|
|
9
9
|
for (var a in s) Object.prototype.hasOwnProperty.call(s, a) && (e[a] = s[a]);
|
10
10
|
}, yn(t, r);
|
11
11
|
};
|
12
|
-
function
|
12
|
+
function tr(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
|
yn(t, r);
|
@@ -18,7 +18,7 @@ function Je(t, r) {
|
|
18
18
|
}
|
19
19
|
t.prototype = r === null ? Object.create(r) : (e.prototype = r.prototype, new e());
|
20
20
|
}
|
21
|
-
function
|
21
|
+
function bn(t) {
|
22
22
|
var r = typeof Symbol == "function" && Symbol.iterator, e = r && t[r], s = 0;
|
23
23
|
if (e) return e.call(t);
|
24
24
|
if (t && typeof t.length == "number") return {
|
@@ -28,7 +28,7 @@ function gn(t) {
|
|
28
28
|
};
|
29
29
|
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
30
30
|
}
|
31
|
-
function
|
31
|
+
function kn(t, r) {
|
32
32
|
var e = typeof Symbol == "function" && t[Symbol.iterator];
|
33
33
|
if (!e) return t;
|
34
34
|
var s = e.call(t), a, o = [], u;
|
@@ -45,21 +45,21 @@ function bn(t, r) {
|
|
45
45
|
}
|
46
46
|
return o;
|
47
47
|
}
|
48
|
-
function
|
48
|
+
function _n(t, r, e) {
|
49
49
|
if (e || arguments.length === 2) for (var s = 0, a = r.length, o; s < a; s++)
|
50
50
|
(o || !(s in r)) && (o || (o = Array.prototype.slice.call(r, 0, s)), o[s] = r[s]);
|
51
51
|
return t.concat(o || Array.prototype.slice.call(r));
|
52
52
|
}
|
53
|
-
function
|
53
|
+
function Pt(t) {
|
54
54
|
return typeof t == "function";
|
55
55
|
}
|
56
|
-
function
|
56
|
+
function ss(t) {
|
57
57
|
var r = function(s) {
|
58
58
|
Error.call(s), s.stack = new Error().stack;
|
59
59
|
}, e = t(r);
|
60
60
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
61
61
|
}
|
62
|
-
var fn =
|
62
|
+
var fn = ss(function(t) {
|
63
63
|
return function(e) {
|
64
64
|
t(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
65
65
|
` + e.map(function(s, a) {
|
@@ -68,13 +68,13 @@ var fn = ns(function(t) {
|
|
68
68
|
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
69
69
|
};
|
70
70
|
});
|
71
|
-
function
|
71
|
+
function vn(t, r) {
|
72
72
|
if (t) {
|
73
73
|
var e = t.indexOf(r);
|
74
74
|
0 <= e && t.splice(e, 1);
|
75
75
|
}
|
76
76
|
}
|
77
|
-
var
|
77
|
+
var Mr = function() {
|
78
78
|
function t(r) {
|
79
79
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
80
80
|
}
|
@@ -86,7 +86,7 @@ var Sr = function() {
|
|
86
86
|
if (u)
|
87
87
|
if (this._parentage = null, Array.isArray(u))
|
88
88
|
try {
|
89
|
-
for (var c =
|
89
|
+
for (var c = bn(u), p = c.next(); !p.done; p = c.next()) {
|
90
90
|
var h = p.value;
|
91
91
|
h.remove(this);
|
92
92
|
}
|
@@ -102,7 +102,7 @@ var Sr = function() {
|
|
102
102
|
else
|
103
103
|
u.remove(this);
|
104
104
|
var k = this.initialTeardown;
|
105
|
-
if (
|
105
|
+
if (Pt(k))
|
106
106
|
try {
|
107
107
|
k();
|
108
108
|
} catch (_) {
|
@@ -112,12 +112,12 @@ var Sr = function() {
|
|
112
112
|
if (m) {
|
113
113
|
this._finalizers = null;
|
114
114
|
try {
|
115
|
-
for (var f =
|
115
|
+
for (var f = bn(m), I = f.next(); !I.done; I = f.next()) {
|
116
116
|
var b = I.value;
|
117
117
|
try {
|
118
|
-
|
118
|
+
Nn(b);
|
119
119
|
} catch (_) {
|
120
|
-
o = o ?? [], _ instanceof fn ? o =
|
120
|
+
o = o ?? [], _ instanceof fn ? o = _n(_n([], kn(o)), kn(_.errors)) : o.push(_);
|
121
121
|
}
|
122
122
|
}
|
123
123
|
} catch (_) {
|
@@ -137,7 +137,7 @@ var Sr = function() {
|
|
137
137
|
var e;
|
138
138
|
if (r && r !== this)
|
139
139
|
if (this.closed)
|
140
|
-
|
140
|
+
Nn(r);
|
141
141
|
else {
|
142
142
|
if (r instanceof t) {
|
143
143
|
if (r.closed || r._hasParent(this))
|
@@ -154,52 +154,52 @@ var Sr = function() {
|
|
154
154
|
this._parentage = Array.isArray(e) ? (e.push(r), e) : e ? [e, r] : r;
|
155
155
|
}, t.prototype._removeParent = function(r) {
|
156
156
|
var e = this._parentage;
|
157
|
-
e === r ? this._parentage = null : Array.isArray(e) &&
|
157
|
+
e === r ? this._parentage = null : Array.isArray(e) && vn(e, r);
|
158
158
|
}, t.prototype.remove = function(r) {
|
159
159
|
var e = this._finalizers;
|
160
|
-
e &&
|
160
|
+
e && vn(e, r), r instanceof t && r._removeParent(this);
|
161
161
|
}, t.EMPTY = function() {
|
162
162
|
var r = new t();
|
163
163
|
return r.closed = !0, r;
|
164
164
|
}(), t;
|
165
|
-
}(),
|
166
|
-
function
|
167
|
-
return t instanceof
|
165
|
+
}(), as = Mr.EMPTY;
|
166
|
+
function is(t) {
|
167
|
+
return t instanceof Mr || t && "closed" in t && Pt(t.remove) && Pt(t.add) && Pt(t.unsubscribe);
|
168
168
|
}
|
169
|
-
function
|
170
|
-
|
169
|
+
function Nn(t) {
|
170
|
+
Pt(t) ? t() : t.unsubscribe();
|
171
171
|
}
|
172
|
-
var
|
172
|
+
var Fs = {
|
173
173
|
Promise: void 0
|
174
|
-
},
|
174
|
+
}, Ls = {
|
175
175
|
setTimeout: function(t, r) {
|
176
176
|
for (var e = [], s = 2; s < arguments.length; s++)
|
177
177
|
e[s - 2] = arguments[s];
|
178
|
-
return setTimeout.apply(void 0,
|
178
|
+
return setTimeout.apply(void 0, _n([t, r], kn(e)));
|
179
179
|
},
|
180
180
|
clearTimeout: function(t) {
|
181
181
|
return clearTimeout(t);
|
182
182
|
},
|
183
183
|
delegate: void 0
|
184
184
|
};
|
185
|
-
function
|
186
|
-
|
185
|
+
function Ns(t) {
|
186
|
+
Ls.setTimeout(function() {
|
187
187
|
throw t;
|
188
188
|
});
|
189
189
|
}
|
190
|
-
function
|
190
|
+
function Hn() {
|
191
191
|
}
|
192
|
-
function
|
192
|
+
function kr(t) {
|
193
193
|
t();
|
194
194
|
}
|
195
|
-
var
|
196
|
-
|
195
|
+
var os = function(t) {
|
196
|
+
tr(r, t);
|
197
197
|
function r(e) {
|
198
198
|
var s = t.call(this) || this;
|
199
|
-
return s.isStopped = !1, e ? (s.destination = e,
|
199
|
+
return s.isStopped = !1, e ? (s.destination = e, is(e) && e.add(s)) : s.destination = js, s;
|
200
200
|
}
|
201
201
|
return r.create = function(e, s, a) {
|
202
|
-
return new
|
202
|
+
return new Sn(e, s, a);
|
203
203
|
}, r.prototype.next = function(e) {
|
204
204
|
this.isStopped || this._next(e);
|
205
205
|
}, r.prototype.error = function(e) {
|
@@ -223,7 +223,7 @@ var is = function(t) {
|
|
223
223
|
this.unsubscribe();
|
224
224
|
}
|
225
225
|
}, r;
|
226
|
-
}(
|
226
|
+
}(Mr), Hs = function() {
|
227
227
|
function t(r) {
|
228
228
|
this.partialObserver = r;
|
229
229
|
}
|
@@ -233,7 +233,7 @@ var is = function(t) {
|
|
233
233
|
try {
|
234
234
|
e.next(r);
|
235
235
|
} catch (s) {
|
236
|
-
|
236
|
+
br(s);
|
237
237
|
}
|
238
238
|
}, t.prototype.error = function(r) {
|
239
239
|
var e = this.partialObserver;
|
@@ -241,56 +241,56 @@ var is = function(t) {
|
|
241
241
|
try {
|
242
242
|
e.error(r);
|
243
243
|
} catch (s) {
|
244
|
-
|
244
|
+
br(s);
|
245
245
|
}
|
246
246
|
else
|
247
|
-
|
247
|
+
br(r);
|
248
248
|
}, t.prototype.complete = function() {
|
249
249
|
var r = this.partialObserver;
|
250
250
|
if (r.complete)
|
251
251
|
try {
|
252
252
|
r.complete();
|
253
253
|
} catch (e) {
|
254
|
-
|
254
|
+
br(e);
|
255
255
|
}
|
256
256
|
}, t;
|
257
|
-
}(),
|
258
|
-
|
257
|
+
}(), Sn = function(t) {
|
258
|
+
tr(r, t);
|
259
259
|
function r(e, s, a) {
|
260
260
|
var o = t.call(this) || this, u;
|
261
|
-
return
|
261
|
+
return Pt(e) || !e ? u = {
|
262
262
|
next: e ?? void 0,
|
263
263
|
error: s ?? void 0,
|
264
264
|
complete: a ?? void 0
|
265
|
-
} : u = e, o.destination = new
|
265
|
+
} : u = e, o.destination = new Hs(u), o;
|
266
266
|
}
|
267
267
|
return r;
|
268
|
-
}(
|
269
|
-
function
|
270
|
-
|
268
|
+
}(os);
|
269
|
+
function br(t) {
|
270
|
+
Ns(t);
|
271
271
|
}
|
272
|
-
function
|
272
|
+
function Us(t) {
|
273
273
|
throw t;
|
274
274
|
}
|
275
275
|
var js = {
|
276
276
|
closed: !0,
|
277
|
-
next:
|
278
|
-
error:
|
279
|
-
complete:
|
280
|
-
},
|
277
|
+
next: Hn,
|
278
|
+
error: Us,
|
279
|
+
complete: Hn
|
280
|
+
}, Ws = function() {
|
281
281
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
282
282
|
}();
|
283
|
-
function
|
283
|
+
function Bs(t) {
|
284
284
|
return t;
|
285
285
|
}
|
286
|
-
function
|
287
|
-
return t.length === 0 ?
|
286
|
+
function Gs(t) {
|
287
|
+
return t.length === 0 ? Bs : t.length === 1 ? t[0] : function(e) {
|
288
288
|
return t.reduce(function(s, a) {
|
289
289
|
return a(s);
|
290
290
|
}, e);
|
291
291
|
};
|
292
292
|
}
|
293
|
-
var
|
293
|
+
var Un = function() {
|
294
294
|
function t(r) {
|
295
295
|
r && (this._subscribe = r);
|
296
296
|
}
|
@@ -298,8 +298,8 @@ var Hn = function() {
|
|
298
298
|
var e = new t();
|
299
299
|
return e.source = this, e.operator = r, e;
|
300
300
|
}, t.prototype.subscribe = function(r, e, s) {
|
301
|
-
var a = this, o =
|
302
|
-
return
|
301
|
+
var a = this, o = Xs(r) ? r : new Sn(r, e, s);
|
302
|
+
return kr(function() {
|
303
303
|
var u = a, c = u.operator, p = u.source;
|
304
304
|
o.add(c ? c.call(o, p) : p ? a._subscribe(o) : a._trySubscribe(o));
|
305
305
|
}), o;
|
@@ -312,7 +312,7 @@ var Hn = function() {
|
|
312
312
|
}, t.prototype.forEach = function(r, e) {
|
313
313
|
var s = this;
|
314
314
|
return e = jn(e), new e(function(a, o) {
|
315
|
-
var u = new
|
315
|
+
var u = new Sn({
|
316
316
|
next: function(c) {
|
317
317
|
try {
|
318
318
|
r(c);
|
@@ -328,12 +328,12 @@ var Hn = function() {
|
|
328
328
|
}, t.prototype._subscribe = function(r) {
|
329
329
|
var e;
|
330
330
|
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(r);
|
331
|
-
}, t.prototype[
|
331
|
+
}, t.prototype[Ws] = function() {
|
332
332
|
return this;
|
333
333
|
}, t.prototype.pipe = function() {
|
334
334
|
for (var r = [], e = 0; e < arguments.length; e++)
|
335
335
|
r[e] = arguments[e];
|
336
|
-
return
|
336
|
+
return Gs(r)(this);
|
337
337
|
}, t.prototype.toPromise = function(r) {
|
338
338
|
var e = this;
|
339
339
|
return r = jn(r), new r(function(s, a) {
|
@@ -352,38 +352,38 @@ var Hn = function() {
|
|
352
352
|
}();
|
353
353
|
function jn(t) {
|
354
354
|
var r;
|
355
|
-
return (r = t ??
|
356
|
-
}
|
357
|
-
function Gs(t) {
|
358
|
-
return t && xt(t.next) && xt(t.error) && xt(t.complete);
|
355
|
+
return (r = t ?? Fs.Promise) !== null && r !== void 0 ? r : Promise;
|
359
356
|
}
|
360
357
|
function Ys(t) {
|
361
|
-
return t && t
|
358
|
+
return t && Pt(t.next) && Pt(t.error) && Pt(t.complete);
|
359
|
+
}
|
360
|
+
function Xs(t) {
|
361
|
+
return t && t instanceof os || Ys(t) && is(t);
|
362
362
|
}
|
363
|
-
var
|
363
|
+
var Ks = ss(function(t) {
|
364
364
|
return function() {
|
365
365
|
t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
366
366
|
};
|
367
|
-
}),
|
368
|
-
|
367
|
+
}), cs = function(t) {
|
368
|
+
tr(r, t);
|
369
369
|
function r() {
|
370
370
|
var e = t.call(this) || this;
|
371
371
|
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
372
372
|
}
|
373
373
|
return r.prototype.lift = function(e) {
|
374
|
-
var s = new
|
374
|
+
var s = new Wn(this, this);
|
375
375
|
return s.operator = e, s;
|
376
376
|
}, r.prototype._throwIfClosed = function() {
|
377
377
|
if (this.closed)
|
378
|
-
throw new
|
378
|
+
throw new Ks();
|
379
379
|
}, r.prototype.next = function(e) {
|
380
380
|
var s = this;
|
381
|
-
|
381
|
+
kr(function() {
|
382
382
|
var a, o;
|
383
383
|
if (s._throwIfClosed(), !s.isStopped) {
|
384
384
|
s.currentObservers || (s.currentObservers = Array.from(s.observers));
|
385
385
|
try {
|
386
|
-
for (var u =
|
386
|
+
for (var u = bn(s.currentObservers), c = u.next(); !c.done; c = u.next()) {
|
387
387
|
var p = c.value;
|
388
388
|
p.next(e);
|
389
389
|
}
|
@@ -400,7 +400,7 @@ var Xs = ns(function(t) {
|
|
400
400
|
});
|
401
401
|
}, r.prototype.error = function(e) {
|
402
402
|
var s = this;
|
403
|
-
|
403
|
+
kr(function() {
|
404
404
|
if (s._throwIfClosed(), !s.isStopped) {
|
405
405
|
s.hasError = s.isStopped = !0, s.thrownError = e;
|
406
406
|
for (var a = s.observers; a.length; )
|
@@ -409,7 +409,7 @@ var Xs = ns(function(t) {
|
|
409
409
|
});
|
410
410
|
}, r.prototype.complete = function() {
|
411
411
|
var e = this;
|
412
|
-
|
412
|
+
kr(function() {
|
413
413
|
if (e._throwIfClosed(), !e.isStopped) {
|
414
414
|
e.isStopped = !0;
|
415
415
|
for (var s = e.observers; s.length; )
|
@@ -431,20 +431,20 @@ var Xs = ns(function(t) {
|
|
431
431
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
432
432
|
}, r.prototype._innerSubscribe = function(e) {
|
433
433
|
var s = this, a = this, o = a.hasError, u = a.isStopped, c = a.observers;
|
434
|
-
return o || u ?
|
435
|
-
s.currentObservers = null,
|
434
|
+
return o || u ? as : (this.currentObservers = null, c.push(e), new Mr(function() {
|
435
|
+
s.currentObservers = null, vn(c, e);
|
436
436
|
}));
|
437
437
|
}, r.prototype._checkFinalizedStatuses = function(e) {
|
438
438
|
var s = this, a = s.hasError, o = s.thrownError, u = s.isStopped;
|
439
439
|
a ? e.error(o) : u && e.complete();
|
440
440
|
}, r.prototype.asObservable = function() {
|
441
|
-
var e = new
|
441
|
+
var e = new Un();
|
442
442
|
return e.source = this, e;
|
443
443
|
}, r.create = function(e, s) {
|
444
|
-
return new
|
444
|
+
return new Wn(e, s);
|
445
445
|
}, r;
|
446
|
-
}(
|
447
|
-
|
446
|
+
}(Un), Wn = function(t) {
|
447
|
+
tr(r, t);
|
448
448
|
function r(e, s) {
|
449
449
|
var a = t.call(this) || this;
|
450
450
|
return a.destination = e, a.source = s, a;
|
@@ -460,10 +460,10 @@ var Xs = ns(function(t) {
|
|
460
460
|
(s = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || s === void 0 || s.call(e);
|
461
461
|
}, r.prototype._subscribe = function(e) {
|
462
462
|
var s, a;
|
463
|
-
return (a = (s = this.source) === null || s === void 0 ? void 0 : s.subscribe(e)) !== null && a !== void 0 ? a :
|
463
|
+
return (a = (s = this.source) === null || s === void 0 ? void 0 : s.subscribe(e)) !== null && a !== void 0 ? a : as;
|
464
464
|
}, r;
|
465
|
-
}(
|
466
|
-
|
465
|
+
}(cs), Bn = function(t) {
|
466
|
+
tr(r, t);
|
467
467
|
function r(e) {
|
468
468
|
var s = t.call(this) || this;
|
469
469
|
return s._value = e, s;
|
@@ -485,87 +485,87 @@ var Xs = ns(function(t) {
|
|
485
485
|
}, r.prototype.next = function(e) {
|
486
486
|
t.prototype.next.call(this, this._value = e);
|
487
487
|
}, r;
|
488
|
-
}(
|
489
|
-
function
|
488
|
+
}(cs), ht = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
489
|
+
function xn(t) {
|
490
490
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
491
491
|
}
|
492
|
-
var
|
493
|
-
|
492
|
+
var _r = { exports: {} };
|
493
|
+
_r.exports;
|
494
494
|
(function(t, r) {
|
495
|
-
var e = 200, s = "__lodash_hash_undefined__", a = 1, o = 2, u = 9007199254740991, c = "[object Arguments]", p = "[object Array]", h = "[object AsyncFunction]", k = "[object Boolean]", m = "[object Date]", f = "[object Error]", I = "[object Function]", b = "[object GeneratorFunction]", _ = "[object Map]",
|
496
|
-
$[mt] = $[O] = $[N] = $[
|
497
|
-
var
|
495
|
+
var e = 200, s = "__lodash_hash_undefined__", a = 1, o = 2, u = 9007199254740991, c = "[object Arguments]", p = "[object Array]", h = "[object AsyncFunction]", k = "[object Boolean]", m = "[object Date]", f = "[object Error]", I = "[object Function]", b = "[object GeneratorFunction]", _ = "[object Map]", T = "[object Number]", d = "[object Null]", v = "[object Object]", S = "[object Promise]", y = "[object Proxy]", w = "[object RegExp]", M = "[object Set]", E = "[object String]", U = "[object Symbol]", C = "[object Undefined]", q = "[object WeakMap]", L = "[object ArrayBuffer]", Y = "[object DataView]", mt = "[object Float32Array]", O = "[object Float64Array]", N = "[object Int8Array]", at = "[object Int16Array]", Ie = "[object Int32Array]", ge = "[object Uint8Array]", ye = "[object Uint8ClampedArray]", z = "[object Uint16Array]", be = "[object Uint32Array]", ke = /[\\^$.*+?()[\]{}|]/g, it = /^\[object .+?Constructor\]$/, Xt = /^(?:0|[1-9]\d*)$/, $ = {};
|
496
|
+
$[mt] = $[O] = $[N] = $[at] = $[Ie] = $[ge] = $[ye] = $[z] = $[be] = !0, $[c] = $[p] = $[L] = $[k] = $[Y] = $[m] = $[f] = $[I] = $[_] = $[T] = $[v] = $[w] = $[M] = $[E] = $[q] = !1;
|
497
|
+
var Kt = typeof ht == "object" && ht && ht.Object === Object && ht, _e = typeof self == "object" && self && self.Object === Object && self, ot = Kt || _e || Function("return this")(), Vt = r && !r.nodeType && r, Jt = Vt && !0 && t && !t.nodeType && t, Rt = Jt && Jt.exports === Vt, zt = Rt && Kt.process, qt = function() {
|
498
498
|
try {
|
499
|
-
return
|
499
|
+
return zt && zt.binding && zt.binding("util");
|
500
500
|
} catch {
|
501
501
|
}
|
502
|
-
}(),
|
503
|
-
function
|
504
|
-
for (var l = -1,
|
502
|
+
}(), $t = qt && qt.isTypedArray;
|
503
|
+
function Zt(n, i) {
|
504
|
+
for (var l = -1, g = n == null ? 0 : n.length, D = 0, A = []; ++l < g; ) {
|
505
505
|
var R = n[l];
|
506
|
-
i(R, l, n) && (
|
506
|
+
i(R, l, n) && (A[D++] = R);
|
507
507
|
}
|
508
|
-
return
|
508
|
+
return A;
|
509
509
|
}
|
510
|
-
function
|
511
|
-
for (var l = -1,
|
510
|
+
function Ft(n, i) {
|
511
|
+
for (var l = -1, g = i.length, D = n.length; ++l < g; )
|
512
512
|
n[D + l] = i[l];
|
513
513
|
return n;
|
514
514
|
}
|
515
|
-
function
|
516
|
-
for (var l = -1,
|
515
|
+
function Qt(n, i) {
|
516
|
+
for (var l = -1, g = n == null ? 0 : n.length; ++l < g; )
|
517
517
|
if (i(n[l], l, n))
|
518
518
|
return !0;
|
519
519
|
return !1;
|
520
520
|
}
|
521
|
-
function
|
522
|
-
for (var l = -1,
|
523
|
-
|
524
|
-
return
|
521
|
+
function ve(n, i) {
|
522
|
+
for (var l = -1, g = Array(n); ++l < n; )
|
523
|
+
g[l] = i(l);
|
524
|
+
return g;
|
525
525
|
}
|
526
|
-
function
|
526
|
+
function Se(n) {
|
527
527
|
return function(i) {
|
528
528
|
return n(i);
|
529
529
|
};
|
530
530
|
}
|
531
|
-
function
|
531
|
+
function wt(n, i) {
|
532
532
|
return n.has(i);
|
533
533
|
}
|
534
|
-
function
|
534
|
+
function Lt(n, i) {
|
535
535
|
return n == null ? void 0 : n[i];
|
536
536
|
}
|
537
|
-
function
|
537
|
+
function te(n) {
|
538
538
|
var i = -1, l = Array(n.size);
|
539
|
-
return n.forEach(function(
|
540
|
-
l[++i] = [D,
|
539
|
+
return n.forEach(function(g, D) {
|
540
|
+
l[++i] = [D, g];
|
541
541
|
}), l;
|
542
542
|
}
|
543
|
-
function
|
543
|
+
function ee(n, i) {
|
544
544
|
return function(l) {
|
545
545
|
return n(i(l));
|
546
546
|
};
|
547
547
|
}
|
548
|
-
function
|
548
|
+
function lt(n) {
|
549
549
|
var i = -1, l = Array(n.size);
|
550
|
-
return n.forEach(function(
|
551
|
-
l[++i] =
|
550
|
+
return n.forEach(function(g) {
|
551
|
+
l[++i] = g;
|
552
552
|
}), l;
|
553
553
|
}
|
554
|
-
var
|
555
|
-
var n = /[^.]+$/.exec(
|
554
|
+
var Mt = Array.prototype, we = Function.prototype, bt = Object.prototype, Tt = ot["__core-js_shared__"], Nt = we.toString, rt = bt.hasOwnProperty, re = function() {
|
555
|
+
var n = /[^.]+$/.exec(Tt && Tt.keys && Tt.keys.IE_PROTO || "");
|
556
556
|
return n ? "Symbol(src)_1." + n : "";
|
557
|
-
}(),
|
558
|
-
"^" +
|
559
|
-
),
|
557
|
+
}(), ne = bt.toString, Me = RegExp(
|
558
|
+
"^" + Nt.call(rt).replace(ke, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
559
|
+
), Ht = Rt ? ot.Buffer : void 0, Et = ot.Symbol, ar = ot.Uint8Array, Te = bt.propertyIsEnumerable, se = Mt.splice, It = Et ? Et.toStringTag : void 0, Ee = Object.getOwnPropertySymbols, $e = Ht ? Ht.isBuffer : void 0, ae = ee(Object.keys, Object), Fe = Dt(ot, "DataView"), ie = Dt(ot, "Map"), Le = Dt(ot, "Promise"), Ne = Dt(ot, "Set"), He = Dt(ot, "WeakMap"), Ut = Dt(Object, "create"), ir = nt(Fe), At = nt(ie), Ar = nt(Le), Dr = nt(Ne), xr = nt(He), or = Et ? Et.prototype : void 0, Ue = or ? or.valueOf : void 0;
|
560
560
|
function X(n) {
|
561
561
|
var i = -1, l = n == null ? 0 : n.length;
|
562
562
|
for (this.clear(); ++i < l; ) {
|
563
|
-
var
|
564
|
-
this.set(
|
563
|
+
var g = n[i];
|
564
|
+
this.set(g[0], g[1]);
|
565
565
|
}
|
566
566
|
}
|
567
567
|
function Or() {
|
568
|
-
this.__data__ =
|
568
|
+
this.__data__ = Ut ? Ut(null) : {}, this.size = 0;
|
569
569
|
}
|
570
570
|
function Cr(n) {
|
571
571
|
var i = this.has(n) && delete this.__data__[n];
|
@@ -573,97 +573,97 @@ br.exports;
|
|
573
573
|
}
|
574
574
|
function Pr(n) {
|
575
575
|
var i = this.__data__;
|
576
|
-
if (
|
576
|
+
if (Ut) {
|
577
577
|
var l = i[n];
|
578
578
|
return l === s ? void 0 : l;
|
579
579
|
}
|
580
|
-
return
|
580
|
+
return rt.call(i, n) ? i[n] : void 0;
|
581
581
|
}
|
582
582
|
function Rr(n) {
|
583
583
|
var i = this.__data__;
|
584
|
-
return
|
584
|
+
return Ut ? i[n] !== void 0 : rt.call(i, n);
|
585
585
|
}
|
586
586
|
function zr(n, i) {
|
587
587
|
var l = this.__data__;
|
588
|
-
return this.size += this.has(n) ? 0 : 1, l[n] =
|
588
|
+
return this.size += this.has(n) ? 0 : 1, l[n] = Ut && i === void 0 ? s : i, this;
|
589
589
|
}
|
590
590
|
X.prototype.clear = Or, X.prototype.delete = Cr, X.prototype.get = Pr, X.prototype.has = Rr, X.prototype.set = zr;
|
591
|
-
function
|
591
|
+
function Z(n) {
|
592
592
|
var i = -1, l = n == null ? 0 : n.length;
|
593
593
|
for (this.clear(); ++i < l; ) {
|
594
|
-
var
|
595
|
-
this.set(
|
594
|
+
var g = n[i];
|
595
|
+
this.set(g[0], g[1]);
|
596
596
|
}
|
597
597
|
}
|
598
598
|
function $r() {
|
599
599
|
this.__data__ = [], this.size = 0;
|
600
600
|
}
|
601
601
|
function Fr(n) {
|
602
|
-
var i = this.__data__, l =
|
602
|
+
var i = this.__data__, l = xe(i, n);
|
603
603
|
if (l < 0)
|
604
604
|
return !1;
|
605
|
-
var
|
606
|
-
return l ==
|
605
|
+
var g = i.length - 1;
|
606
|
+
return l == g ? i.pop() : se.call(i, l, 1), --this.size, !0;
|
607
607
|
}
|
608
608
|
function Lr(n) {
|
609
|
-
var i = this.__data__, l =
|
609
|
+
var i = this.__data__, l = xe(i, n);
|
610
610
|
return l < 0 ? void 0 : i[l][1];
|
611
611
|
}
|
612
612
|
function Nr(n) {
|
613
|
-
return
|
613
|
+
return xe(this.__data__, n) > -1;
|
614
614
|
}
|
615
615
|
function Hr(n, i) {
|
616
|
-
var l = this.__data__,
|
617
|
-
return
|
616
|
+
var l = this.__data__, g = xe(l, n);
|
617
|
+
return g < 0 ? (++this.size, l.push([n, i])) : l[g][1] = i, this;
|
618
618
|
}
|
619
|
-
|
620
|
-
function
|
619
|
+
Z.prototype.clear = $r, Z.prototype.delete = Fr, Z.prototype.get = Lr, Z.prototype.has = Nr, Z.prototype.set = Hr;
|
620
|
+
function ct(n) {
|
621
621
|
var i = -1, l = n == null ? 0 : n.length;
|
622
622
|
for (this.clear(); ++i < l; ) {
|
623
|
-
var
|
624
|
-
this.set(
|
623
|
+
var g = n[i];
|
624
|
+
this.set(g[0], g[1]);
|
625
625
|
}
|
626
626
|
}
|
627
|
-
function
|
627
|
+
function Ur() {
|
628
628
|
this.size = 0, this.__data__ = {
|
629
629
|
hash: new X(),
|
630
|
-
map: new (
|
630
|
+
map: new (ie || Z)(),
|
631
631
|
string: new X()
|
632
632
|
};
|
633
633
|
}
|
634
|
-
function
|
635
|
-
var i =
|
634
|
+
function jr(n) {
|
635
|
+
var i = gt(this, n).delete(n);
|
636
636
|
return this.size -= i ? 1 : 0, i;
|
637
637
|
}
|
638
638
|
function Wr(n) {
|
639
|
-
return
|
639
|
+
return gt(this, n).get(n);
|
640
640
|
}
|
641
641
|
function Br(n) {
|
642
|
-
return
|
642
|
+
return gt(this, n).has(n);
|
643
643
|
}
|
644
644
|
function Gr(n, i) {
|
645
|
-
var l =
|
646
|
-
return l.set(n, i), this.size += l.size ==
|
645
|
+
var l = gt(this, n), g = l.size;
|
646
|
+
return l.set(n, i), this.size += l.size == g ? 0 : 1, this;
|
647
647
|
}
|
648
|
-
|
649
|
-
function
|
648
|
+
ct.prototype.clear = Ur, ct.prototype.delete = jr, ct.prototype.get = Wr, ct.prototype.has = Br, ct.prototype.set = Gr;
|
649
|
+
function Ae(n) {
|
650
650
|
var i = -1, l = n == null ? 0 : n.length;
|
651
|
-
for (this.__data__ = new
|
651
|
+
for (this.__data__ = new ct(); ++i < l; )
|
652
652
|
this.add(n[i]);
|
653
653
|
}
|
654
|
-
function
|
654
|
+
function cr(n) {
|
655
655
|
return this.__data__.set(n, s), this;
|
656
656
|
}
|
657
|
-
function
|
657
|
+
function De(n) {
|
658
658
|
return this.__data__.has(n);
|
659
659
|
}
|
660
|
-
|
661
|
-
function
|
662
|
-
var i = this.__data__ = new
|
660
|
+
Ae.prototype.add = Ae.prototype.push = cr, Ae.prototype.has = De;
|
661
|
+
function kt(n) {
|
662
|
+
var i = this.__data__ = new Z(n);
|
663
663
|
this.size = i.size;
|
664
664
|
}
|
665
|
-
function
|
666
|
-
this.__data__ = new
|
665
|
+
function je() {
|
666
|
+
this.__data__ = new Z(), this.size = 0;
|
667
667
|
}
|
668
668
|
function Yr(n) {
|
669
669
|
var i = this.__data__, l = i.delete(n);
|
@@ -677,244 +677,244 @@ br.exports;
|
|
677
677
|
}
|
678
678
|
function Vr(n, i) {
|
679
679
|
var l = this.__data__;
|
680
|
-
if (l instanceof
|
681
|
-
var
|
682
|
-
if (!
|
683
|
-
return
|
684
|
-
l = this.__data__ = new
|
680
|
+
if (l instanceof Z) {
|
681
|
+
var g = l.__data__;
|
682
|
+
if (!ie || g.length < e - 1)
|
683
|
+
return g.push([n, i]), this.size = ++l.size, this;
|
684
|
+
l = this.__data__ = new ct(g);
|
685
685
|
}
|
686
686
|
return l.set(n, i), this.size = l.size, this;
|
687
687
|
}
|
688
|
-
|
688
|
+
kt.prototype.clear = je, kt.prototype.delete = Yr, kt.prototype.get = Xr, kt.prototype.has = Kr, kt.prototype.set = Vr;
|
689
689
|
function Jr(n, i) {
|
690
|
-
var l =
|
690
|
+
var l = Oe(n), g = !l && pr(n), D = !l && !g && Ce(n), A = !l && !g && !D && Ir(n), R = l || g || D || A, P = R ? ve(n.length, String) : [], j = P.length;
|
691
691
|
for (var F in n)
|
692
|
-
|
692
|
+
rt.call(n, F) && !(R && // Safari 9 has enumerable `arguments.length` in strict mode.
|
693
693
|
(F == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
694
694
|
D && (F == "offset" || F == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
695
|
-
|
695
|
+
A && (F == "buffer" || F == "byteLength" || F == "byteOffset") || // Skip index properties.
|
696
696
|
sn(F, j))) && P.push(F);
|
697
697
|
return P;
|
698
698
|
}
|
699
|
-
function
|
699
|
+
function xe(n, i) {
|
700
700
|
for (var l = n.length; l--; )
|
701
|
-
if (
|
701
|
+
if (fr(n[l][0], i))
|
702
702
|
return l;
|
703
703
|
return -1;
|
704
704
|
}
|
705
|
-
function
|
706
|
-
var
|
707
|
-
return
|
705
|
+
function We(n, i, l) {
|
706
|
+
var g = i(n);
|
707
|
+
return Oe(n) ? g : Ft(g, l(n));
|
708
708
|
}
|
709
|
-
function
|
710
|
-
return n == null ? n === void 0 ? C : d : It && It in Object(n) ?
|
709
|
+
function oe(n) {
|
710
|
+
return n == null ? n === void 0 ? C : d : It && It in Object(n) ? xt(n) : dr(n);
|
711
711
|
}
|
712
|
-
function
|
713
|
-
return
|
712
|
+
function ur(n) {
|
713
|
+
return vt(n) && oe(n) == c;
|
714
714
|
}
|
715
|
-
function
|
716
|
-
return n === i ? !0 : n == null || i == null || !
|
715
|
+
function lr(n, i, l, g, D) {
|
716
|
+
return n === i ? !0 : n == null || i == null || !vt(n) && !vt(i) ? n !== n && i !== i : qr(n, i, l, g, lr, D);
|
717
717
|
}
|
718
|
-
function qr(n, i, l,
|
719
|
-
var R =
|
718
|
+
function qr(n, i, l, g, D, A) {
|
719
|
+
var R = Oe(n), P = Oe(i), j = R ? p : _t(n), F = P ? p : _t(i);
|
720
720
|
j = j == c ? v : j, F = F == c ? v : F;
|
721
|
-
var
|
722
|
-
if (
|
723
|
-
if (!
|
721
|
+
var Q = j == v, ut = F == v, B = j == F;
|
722
|
+
if (B && Ce(n)) {
|
723
|
+
if (!Ce(i))
|
724
724
|
return !1;
|
725
|
-
R = !0,
|
725
|
+
R = !0, Q = !1;
|
726
726
|
}
|
727
|
-
if (
|
728
|
-
return
|
727
|
+
if (B && !Q)
|
728
|
+
return A || (A = new kt()), R || Ir(n) ? Be(n, i, l, g, D, A) : en(n, i, j, l, g, D, A);
|
729
729
|
if (!(l & a)) {
|
730
|
-
var
|
731
|
-
if (
|
732
|
-
var
|
733
|
-
return
|
730
|
+
var tt = Q && rt.call(n, "__wrapped__"), K = ut && rt.call(i, "__wrapped__");
|
731
|
+
if (tt || K) {
|
732
|
+
var jt = tt ? n.value() : n, Ot = K ? i.value() : i;
|
733
|
+
return A || (A = new kt()), D(jt, Ot, l, g, A);
|
734
734
|
}
|
735
735
|
}
|
736
|
-
return
|
736
|
+
return B ? (A || (A = new kt()), rn(n, i, l, g, D, A)) : !1;
|
737
737
|
}
|
738
738
|
function Zr(n) {
|
739
|
-
if (!
|
739
|
+
if (!mr(n) || on(n))
|
740
740
|
return !1;
|
741
|
-
var i =
|
742
|
-
return i.test(
|
741
|
+
var i = hr(n) ? Me : it;
|
742
|
+
return i.test(nt(n));
|
743
743
|
}
|
744
744
|
function Qr(n) {
|
745
|
-
return
|
745
|
+
return vt(n) && Ye(n.length) && !!$[oe(n)];
|
746
746
|
}
|
747
747
|
function tn(n) {
|
748
748
|
if (!cn(n))
|
749
|
-
return
|
749
|
+
return ae(n);
|
750
750
|
var i = [];
|
751
751
|
for (var l in Object(n))
|
752
|
-
|
752
|
+
rt.call(n, l) && l != "constructor" && i.push(l);
|
753
753
|
return i;
|
754
754
|
}
|
755
|
-
function
|
755
|
+
function Be(n, i, l, g, D, A) {
|
756
756
|
var R = l & a, P = n.length, j = i.length;
|
757
757
|
if (P != j && !(R && j > P))
|
758
758
|
return !1;
|
759
|
-
var F =
|
760
|
-
if (F &&
|
759
|
+
var F = A.get(n);
|
760
|
+
if (F && A.get(i))
|
761
761
|
return F == i;
|
762
|
-
var
|
763
|
-
for (
|
764
|
-
var
|
765
|
-
if (
|
766
|
-
var
|
767
|
-
if (
|
768
|
-
if (
|
762
|
+
var Q = -1, ut = !0, B = l & o ? new Ae() : void 0;
|
763
|
+
for (A.set(n, i), A.set(i, n); ++Q < P; ) {
|
764
|
+
var tt = n[Q], K = i[Q];
|
765
|
+
if (g)
|
766
|
+
var jt = R ? g(K, tt, Q, i, n, A) : g(tt, K, Q, n, i, A);
|
767
|
+
if (jt !== void 0) {
|
768
|
+
if (jt)
|
769
769
|
continue;
|
770
|
-
|
770
|
+
ut = !1;
|
771
771
|
break;
|
772
772
|
}
|
773
|
-
if (
|
774
|
-
if (!
|
775
|
-
if (!
|
776
|
-
return
|
773
|
+
if (B) {
|
774
|
+
if (!Qt(i, function(Ot, ue) {
|
775
|
+
if (!wt(B, ue) && (tt === Ot || D(tt, Ot, l, g, A)))
|
776
|
+
return B.push(ue);
|
777
777
|
})) {
|
778
|
-
|
778
|
+
ut = !1;
|
779
779
|
break;
|
780
780
|
}
|
781
|
-
} else if (!(
|
782
|
-
|
781
|
+
} else if (!(tt === K || D(tt, K, l, g, A))) {
|
782
|
+
ut = !1;
|
783
783
|
break;
|
784
784
|
}
|
785
785
|
}
|
786
|
-
return
|
786
|
+
return A.delete(n), A.delete(i), ut;
|
787
787
|
}
|
788
|
-
function en(n, i, l,
|
788
|
+
function en(n, i, l, g, D, A, R) {
|
789
789
|
switch (l) {
|
790
790
|
case Y:
|
791
791
|
if (n.byteLength != i.byteLength || n.byteOffset != i.byteOffset)
|
792
792
|
return !1;
|
793
793
|
n = n.buffer, i = i.buffer;
|
794
794
|
case L:
|
795
|
-
return !(n.byteLength != i.byteLength || !
|
795
|
+
return !(n.byteLength != i.byteLength || !A(new ar(n), new ar(i)));
|
796
796
|
case k:
|
797
797
|
case m:
|
798
|
-
case
|
799
|
-
return
|
798
|
+
case T:
|
799
|
+
return fr(+n, +i);
|
800
800
|
case f:
|
801
801
|
return n.name == i.name && n.message == i.message;
|
802
802
|
case w:
|
803
|
-
case
|
803
|
+
case E:
|
804
804
|
return n == i + "";
|
805
805
|
case _:
|
806
|
-
var P =
|
807
|
-
case
|
808
|
-
var j =
|
809
|
-
if (P || (P =
|
806
|
+
var P = te;
|
807
|
+
case M:
|
808
|
+
var j = g & a;
|
809
|
+
if (P || (P = lt), n.size != i.size && !j)
|
810
810
|
return !1;
|
811
811
|
var F = R.get(n);
|
812
812
|
if (F)
|
813
813
|
return F == i;
|
814
|
-
|
815
|
-
var
|
816
|
-
return R.delete(n),
|
817
|
-
case
|
818
|
-
if (
|
819
|
-
return
|
814
|
+
g |= o, R.set(n, i);
|
815
|
+
var Q = Be(P(n), P(i), g, D, A, R);
|
816
|
+
return R.delete(n), Q;
|
817
|
+
case U:
|
818
|
+
if (Ue)
|
819
|
+
return Ue.call(n) == Ue.call(i);
|
820
820
|
}
|
821
821
|
return !1;
|
822
822
|
}
|
823
|
-
function rn(n, i, l,
|
824
|
-
var R = l & a, P =
|
825
|
-
if (j !=
|
823
|
+
function rn(n, i, l, g, D, A) {
|
824
|
+
var R = l & a, P = ce(n), j = P.length, F = ce(i), Q = F.length;
|
825
|
+
if (j != Q && !R)
|
826
826
|
return !1;
|
827
|
-
for (var
|
828
|
-
var
|
829
|
-
if (!(R ?
|
827
|
+
for (var ut = j; ut--; ) {
|
828
|
+
var B = P[ut];
|
829
|
+
if (!(R ? B in i : rt.call(i, B)))
|
830
830
|
return !1;
|
831
831
|
}
|
832
|
-
var
|
833
|
-
if (
|
834
|
-
return
|
832
|
+
var tt = A.get(n);
|
833
|
+
if (tt && A.get(i))
|
834
|
+
return tt == i;
|
835
835
|
var K = !0;
|
836
|
-
|
837
|
-
for (var
|
838
|
-
|
839
|
-
var
|
840
|
-
if (
|
841
|
-
var
|
842
|
-
if (!(
|
836
|
+
A.set(n, i), A.set(i, n);
|
837
|
+
for (var jt = R; ++ut < j; ) {
|
838
|
+
B = P[ut];
|
839
|
+
var Ot = n[B], ue = i[B];
|
840
|
+
if (g)
|
841
|
+
var Ln = R ? g(ue, Ot, B, i, n, A) : g(Ot, ue, B, n, i, A);
|
842
|
+
if (!(Ln === void 0 ? Ot === ue || D(Ot, ue, l, g, A) : Ln)) {
|
843
843
|
K = !1;
|
844
844
|
break;
|
845
845
|
}
|
846
|
-
|
846
|
+
jt || (jt = B == "constructor");
|
847
847
|
}
|
848
|
-
if (K && !
|
849
|
-
var
|
850
|
-
|
848
|
+
if (K && !jt) {
|
849
|
+
var gr = n.constructor, yr = i.constructor;
|
850
|
+
gr != yr && "constructor" in n && "constructor" in i && !(typeof gr == "function" && gr instanceof gr && typeof yr == "function" && yr instanceof yr) && (K = !1);
|
851
851
|
}
|
852
|
-
return
|
852
|
+
return A.delete(n), A.delete(i), K;
|
853
853
|
}
|
854
|
-
function
|
855
|
-
return
|
854
|
+
function ce(n) {
|
855
|
+
return We(n, Xe, nn);
|
856
856
|
}
|
857
|
-
function
|
857
|
+
function gt(n, i) {
|
858
858
|
var l = n.__data__;
|
859
859
|
return an(i) ? l[typeof i == "string" ? "string" : "hash"] : l.map;
|
860
860
|
}
|
861
|
-
function
|
862
|
-
var l =
|
861
|
+
function Dt(n, i) {
|
862
|
+
var l = Lt(n, i);
|
863
863
|
return Zr(l) ? l : void 0;
|
864
864
|
}
|
865
|
-
function
|
866
|
-
var i =
|
865
|
+
function xt(n) {
|
866
|
+
var i = rt.call(n, It), l = n[It];
|
867
867
|
try {
|
868
868
|
n[It] = void 0;
|
869
|
-
var
|
869
|
+
var g = !0;
|
870
870
|
} catch {
|
871
871
|
}
|
872
|
-
var D =
|
873
|
-
return
|
872
|
+
var D = ne.call(n);
|
873
|
+
return g && (i ? n[It] = l : delete n[It]), D;
|
874
874
|
}
|
875
|
-
var nn =
|
876
|
-
return n == null ? [] : (n = Object(n),
|
877
|
-
return
|
875
|
+
var nn = Ee ? function(n) {
|
876
|
+
return n == null ? [] : (n = Object(n), Zt(Ee(n), function(i) {
|
877
|
+
return Te.call(n, i);
|
878
878
|
}));
|
879
|
-
} : ln,
|
880
|
-
(
|
881
|
-
var i =
|
882
|
-
if (
|
883
|
-
switch (
|
884
|
-
case
|
879
|
+
} : ln, _t = oe;
|
880
|
+
(Fe && _t(new Fe(new ArrayBuffer(1))) != Y || ie && _t(new ie()) != _ || Le && _t(Le.resolve()) != S || Ne && _t(new Ne()) != M || He && _t(new He()) != q) && (_t = function(n) {
|
881
|
+
var i = oe(n), l = i == v ? n.constructor : void 0, g = l ? nt(l) : "";
|
882
|
+
if (g)
|
883
|
+
switch (g) {
|
884
|
+
case ir:
|
885
885
|
return Y;
|
886
|
-
case
|
886
|
+
case At:
|
887
887
|
return _;
|
888
888
|
case Ar:
|
889
889
|
return S;
|
890
890
|
case Dr:
|
891
|
-
return
|
891
|
+
return M;
|
892
892
|
case xr:
|
893
|
-
return
|
893
|
+
return q;
|
894
894
|
}
|
895
895
|
return i;
|
896
896
|
});
|
897
897
|
function sn(n, i) {
|
898
|
-
return i = i ?? u, !!i && (typeof n == "number" ||
|
898
|
+
return i = i ?? u, !!i && (typeof n == "number" || Xt.test(n)) && n > -1 && n % 1 == 0 && n < i;
|
899
899
|
}
|
900
900
|
function an(n) {
|
901
901
|
var i = typeof n;
|
902
902
|
return i == "string" || i == "number" || i == "symbol" || i == "boolean" ? n !== "__proto__" : n === null;
|
903
903
|
}
|
904
904
|
function on(n) {
|
905
|
-
return !!
|
905
|
+
return !!re && re in n;
|
906
906
|
}
|
907
907
|
function cn(n) {
|
908
|
-
var i = n && n.constructor, l = typeof i == "function" && i.prototype ||
|
908
|
+
var i = n && n.constructor, l = typeof i == "function" && i.prototype || bt;
|
909
909
|
return n === l;
|
910
910
|
}
|
911
|
-
function
|
912
|
-
return
|
911
|
+
function dr(n) {
|
912
|
+
return ne.call(n);
|
913
913
|
}
|
914
|
-
function
|
914
|
+
function nt(n) {
|
915
915
|
if (n != null) {
|
916
916
|
try {
|
917
|
-
return
|
917
|
+
return Nt.call(n);
|
918
918
|
} catch {
|
919
919
|
}
|
920
920
|
try {
|
@@ -924,40 +924,40 @@ br.exports;
|
|
924
924
|
}
|
925
925
|
return "";
|
926
926
|
}
|
927
|
-
function
|
927
|
+
function fr(n, i) {
|
928
928
|
return n === i || n !== n && i !== i;
|
929
929
|
}
|
930
|
-
var
|
930
|
+
var pr = ur(/* @__PURE__ */ function() {
|
931
931
|
return arguments;
|
932
|
-
}()) ?
|
933
|
-
return
|
934
|
-
},
|
935
|
-
function
|
936
|
-
return n != null &&
|
932
|
+
}()) ? ur : function(n) {
|
933
|
+
return vt(n) && rt.call(n, "callee") && !Te.call(n, "callee");
|
934
|
+
}, Oe = Array.isArray;
|
935
|
+
function Ge(n) {
|
936
|
+
return n != null && Ye(n.length) && !hr(n);
|
937
937
|
}
|
938
|
-
var
|
938
|
+
var Ce = $e || dn;
|
939
939
|
function un(n, i) {
|
940
|
-
return
|
940
|
+
return lr(n, i);
|
941
941
|
}
|
942
|
-
function
|
943
|
-
if (!
|
942
|
+
function hr(n) {
|
943
|
+
if (!mr(n))
|
944
944
|
return !1;
|
945
|
-
var i =
|
946
|
-
return i == I || i == b || i == h || i ==
|
945
|
+
var i = oe(n);
|
946
|
+
return i == I || i == b || i == h || i == y;
|
947
947
|
}
|
948
|
-
function
|
948
|
+
function Ye(n) {
|
949
949
|
return typeof n == "number" && n > -1 && n % 1 == 0 && n <= u;
|
950
950
|
}
|
951
|
-
function
|
951
|
+
function mr(n) {
|
952
952
|
var i = typeof n;
|
953
953
|
return n != null && (i == "object" || i == "function");
|
954
954
|
}
|
955
|
-
function
|
955
|
+
function vt(n) {
|
956
956
|
return n != null && typeof n == "object";
|
957
957
|
}
|
958
|
-
var
|
959
|
-
function
|
960
|
-
return
|
958
|
+
var Ir = $t ? Se($t) : Qr;
|
959
|
+
function Xe(n) {
|
960
|
+
return Ge(n) ? Jr(n) : tn(n);
|
961
961
|
}
|
962
962
|
function ln() {
|
963
963
|
return [];
|
@@ -966,45 +966,45 @@ br.exports;
|
|
966
966
|
return !1;
|
967
967
|
}
|
968
968
|
t.exports = un;
|
969
|
-
})(
|
970
|
-
var
|
971
|
-
const
|
972
|
-
var
|
973
|
-
|
969
|
+
})(_r, _r.exports);
|
970
|
+
var Vs = _r.exports;
|
971
|
+
const W = /* @__PURE__ */ xn(Vs), lo = "add", Js = "track", qs = "trackItems", fo = `${Js}:changed`, po = `${qs}:changed`, Zs = "state", ho = `${Zs}:changed`, Qs = "bulk", Gn = `${Qs}:edit`, On = "design", ta = `${On}:load`, ea = `${On}:resize`, H = "add", ra = `${H}:text`, na = `${H}:video`, sa = `${H}:audio`, mo = `${H}:placeholder`, aa = `${H}:image`, ia = `${H}:illustration`, oa = `${H}:shape`, Io = `${H}:mask`, go = `${H}:transition`, ca = `${H}:animation`, ua = `${H}:caption`, la = `${H}:template`, da = `${H}:items`, fa = `${H}:composition`, pa = `${H}:progressBar`, ha = `${H}:progressFrame`, ma = `${H}:radialAudioBars`, Ia = `${H}:linealAudioBars`, ga = `${H}:waveAudioBars`, ya = `${H}:hillAudioBars`, ba = `${H}:rect`, Yt = "edit", ka = `${Yt}:object`, _a = `${Yt}:replaceMedia`, yo = `${Yt}:text`, bo = `${Yt}:shape`, ko = `${Yt}:templateItem`, _o = `${Yt}:deleteTemplateItem`, va = `${Yt}:backgroundEditor`, vo = "enterEditMode", Re = "active", So = `${Re}:set`, wo = `${Re}:delete`, Sa = `${Re}:paste`, Mo = `${Re}:clone`, wa = `${Re}:split`, et = "layer", To = `${et}:locked`, Eo = `${et}:hidden`, Ao = `${et}:move`, Ma = `${et}:select`, Do = `${et}:selection`, xo = `${et}:sendTo`, Oo = `${et}:rename`, Co = `${et}:editingName`, Ta = `${et}:copy`, Po = `${et}:paste`, Ea = `${et}:clone`, Ro = `${et}:split`, zo = `${et}:cut`, Aa = `${et}:delete`, Da = `${et}:replace`, Tr = "history", xa = `${Tr}:undo`, Oa = `${Tr}:redo`, $o = `${Tr}:reset`, us = "scale", Ca = `${us}:changed`;
|
972
|
+
var vr = { exports: {} };
|
973
|
+
vr.exports;
|
974
974
|
(function(t, r) {
|
975
|
-
var e = 200, s = "__lodash_hash_undefined__", a = 9007199254740991, o = "[object Arguments]", u = "[object Array]", c = "[object Boolean]", p = "[object Date]", h = "[object Error]", k = "[object Function]", m = "[object GeneratorFunction]", f = "[object Map]", I = "[object Number]", b = "[object Object]", _ = "[object Promise]",
|
976
|
-
z[o] = z[u] = z[w] = z[
|
977
|
-
var
|
978
|
-
function
|
975
|
+
var e = 200, s = "__lodash_hash_undefined__", a = 9007199254740991, o = "[object Arguments]", u = "[object Array]", c = "[object Boolean]", p = "[object Date]", h = "[object Error]", k = "[object Function]", m = "[object GeneratorFunction]", f = "[object Map]", I = "[object Number]", b = "[object Object]", _ = "[object Promise]", T = "[object RegExp]", d = "[object Set]", v = "[object String]", S = "[object Symbol]", y = "[object WeakMap]", w = "[object ArrayBuffer]", M = "[object DataView]", E = "[object Float32Array]", U = "[object Float64Array]", C = "[object Int8Array]", q = "[object Int16Array]", L = "[object Int32Array]", Y = "[object Uint8Array]", mt = "[object Uint8ClampedArray]", O = "[object Uint16Array]", N = "[object Uint32Array]", at = /[\\^$.*+?()[\]{}|]/g, Ie = /\w*$/, ge = /^\[object .+?Constructor\]$/, ye = /^(?:0|[1-9]\d*)$/, z = {};
|
976
|
+
z[o] = z[u] = z[w] = z[M] = z[c] = z[p] = z[E] = z[U] = z[C] = z[q] = z[L] = z[f] = z[I] = z[b] = z[T] = z[d] = z[v] = z[S] = z[Y] = z[mt] = z[O] = z[N] = !0, z[h] = z[k] = z[y] = !1;
|
977
|
+
var be = typeof ht == "object" && ht && ht.Object === Object && ht, ke = typeof self == "object" && self && self.Object === Object && self, it = be || ke || Function("return this")(), Xt = r && !r.nodeType && r, $ = Xt && !0 && t && !t.nodeType && t, Kt = $ && $.exports === Xt;
|
978
|
+
function _e(n, i) {
|
979
979
|
return n.set(i[0], i[1]), n;
|
980
980
|
}
|
981
|
-
function
|
981
|
+
function ot(n, i) {
|
982
982
|
return n.add(i), n;
|
983
983
|
}
|
984
|
-
function
|
985
|
-
for (var l = -1,
|
984
|
+
function Vt(n, i) {
|
985
|
+
for (var l = -1, g = n ? n.length : 0; ++l < g && i(n[l], l, n) !== !1; )
|
986
986
|
;
|
987
987
|
return n;
|
988
988
|
}
|
989
|
-
function
|
990
|
-
for (var l = -1,
|
989
|
+
function Jt(n, i) {
|
990
|
+
for (var l = -1, g = i.length, D = n.length; ++l < g; )
|
991
991
|
n[D + l] = i[l];
|
992
992
|
return n;
|
993
993
|
}
|
994
|
-
function
|
995
|
-
for (var D = -1,
|
994
|
+
function Rt(n, i, l, g) {
|
995
|
+
for (var D = -1, A = n ? n.length : 0; ++D < A; )
|
996
996
|
l = i(l, n[D], D, n);
|
997
997
|
return l;
|
998
998
|
}
|
999
|
-
function
|
1000
|
-
for (var l = -1,
|
1001
|
-
|
1002
|
-
return
|
999
|
+
function zt(n, i) {
|
1000
|
+
for (var l = -1, g = Array(n); ++l < n; )
|
1001
|
+
g[l] = i(l);
|
1002
|
+
return g;
|
1003
1003
|
}
|
1004
|
-
function
|
1004
|
+
function qt(n, i) {
|
1005
1005
|
return n == null ? void 0 : n[i];
|
1006
1006
|
}
|
1007
|
-
function
|
1007
|
+
function $t(n) {
|
1008
1008
|
var i = !1;
|
1009
1009
|
if (n != null && typeof n.toString != "function")
|
1010
1010
|
try {
|
@@ -1013,122 +1013,122 @@ kr.exports;
|
|
1013
1013
|
}
|
1014
1014
|
return i;
|
1015
1015
|
}
|
1016
|
-
function
|
1016
|
+
function Zt(n) {
|
1017
1017
|
var i = -1, l = Array(n.size);
|
1018
|
-
return n.forEach(function(
|
1019
|
-
l[++i] = [D,
|
1018
|
+
return n.forEach(function(g, D) {
|
1019
|
+
l[++i] = [D, g];
|
1020
1020
|
}), l;
|
1021
1021
|
}
|
1022
|
-
function
|
1022
|
+
function Ft(n, i) {
|
1023
1023
|
return function(l) {
|
1024
1024
|
return n(i(l));
|
1025
1025
|
};
|
1026
1026
|
}
|
1027
|
-
function
|
1027
|
+
function Qt(n) {
|
1028
1028
|
var i = -1, l = Array(n.size);
|
1029
|
-
return n.forEach(function(
|
1030
|
-
l[++i] =
|
1029
|
+
return n.forEach(function(g) {
|
1030
|
+
l[++i] = g;
|
1031
1031
|
}), l;
|
1032
1032
|
}
|
1033
|
-
var
|
1034
|
-
var n = /[^.]+$/.exec(
|
1033
|
+
var ve = Array.prototype, Se = Function.prototype, wt = Object.prototype, Lt = it["__core-js_shared__"], te = function() {
|
1034
|
+
var n = /[^.]+$/.exec(Lt && Lt.keys && Lt.keys.IE_PROTO || "");
|
1035
1035
|
return n ? "Symbol(src)_1." + n : "";
|
1036
|
-
}(),
|
1037
|
-
"^" +
|
1038
|
-
),
|
1039
|
-
function
|
1036
|
+
}(), ee = Se.toString, lt = wt.hasOwnProperty, Mt = wt.toString, we = RegExp(
|
1037
|
+
"^" + ee.call(lt).replace(at, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
1038
|
+
), bt = Kt ? it.Buffer : void 0, Tt = it.Symbol, Nt = it.Uint8Array, rt = Ft(Object.getPrototypeOf, Object), re = Object.create, ne = wt.propertyIsEnumerable, Me = ve.splice, Ht = Object.getOwnPropertySymbols, Et = bt ? bt.isBuffer : void 0, ar = Ft(Object.keys, Object), Te = gt(it, "DataView"), se = gt(it, "Map"), It = gt(it, "Promise"), Ee = gt(it, "Set"), $e = gt(it, "WeakMap"), ae = gt(Object, "create"), Fe = nt(Te), ie = nt(se), Le = nt(It), Ne = nt(Ee), He = nt($e), Ut = Tt ? Tt.prototype : void 0, ir = Ut ? Ut.valueOf : void 0;
|
1039
|
+
function At(n) {
|
1040
1040
|
var i = -1, l = n ? n.length : 0;
|
1041
1041
|
for (this.clear(); ++i < l; ) {
|
1042
|
-
var
|
1043
|
-
this.set(
|
1042
|
+
var g = n[i];
|
1043
|
+
this.set(g[0], g[1]);
|
1044
1044
|
}
|
1045
1045
|
}
|
1046
1046
|
function Ar() {
|
1047
|
-
this.__data__ =
|
1047
|
+
this.__data__ = ae ? ae(null) : {};
|
1048
1048
|
}
|
1049
1049
|
function Dr(n) {
|
1050
1050
|
return this.has(n) && delete this.__data__[n];
|
1051
1051
|
}
|
1052
1052
|
function xr(n) {
|
1053
1053
|
var i = this.__data__;
|
1054
|
-
if (
|
1054
|
+
if (ae) {
|
1055
1055
|
var l = i[n];
|
1056
1056
|
return l === s ? void 0 : l;
|
1057
1057
|
}
|
1058
|
-
return
|
1058
|
+
return lt.call(i, n) ? i[n] : void 0;
|
1059
1059
|
}
|
1060
|
-
function
|
1060
|
+
function or(n) {
|
1061
1061
|
var i = this.__data__;
|
1062
|
-
return
|
1062
|
+
return ae ? i[n] !== void 0 : lt.call(i, n);
|
1063
1063
|
}
|
1064
|
-
function
|
1064
|
+
function Ue(n, i) {
|
1065
1065
|
var l = this.__data__;
|
1066
|
-
return l[n] =
|
1066
|
+
return l[n] = ae && i === void 0 ? s : i, this;
|
1067
1067
|
}
|
1068
|
-
|
1068
|
+
At.prototype.clear = Ar, At.prototype.delete = Dr, At.prototype.get = xr, At.prototype.has = or, At.prototype.set = Ue;
|
1069
1069
|
function X(n) {
|
1070
1070
|
var i = -1, l = n ? n.length : 0;
|
1071
1071
|
for (this.clear(); ++i < l; ) {
|
1072
|
-
var
|
1073
|
-
this.set(
|
1072
|
+
var g = n[i];
|
1073
|
+
this.set(g[0], g[1]);
|
1074
1074
|
}
|
1075
1075
|
}
|
1076
1076
|
function Or() {
|
1077
1077
|
this.__data__ = [];
|
1078
1078
|
}
|
1079
1079
|
function Cr(n) {
|
1080
|
-
var i = this.__data__, l =
|
1080
|
+
var i = this.__data__, l = De(i, n);
|
1081
1081
|
if (l < 0)
|
1082
1082
|
return !1;
|
1083
|
-
var
|
1084
|
-
return l ==
|
1083
|
+
var g = i.length - 1;
|
1084
|
+
return l == g ? i.pop() : Me.call(i, l, 1), !0;
|
1085
1085
|
}
|
1086
1086
|
function Pr(n) {
|
1087
|
-
var i = this.__data__, l =
|
1087
|
+
var i = this.__data__, l = De(i, n);
|
1088
1088
|
return l < 0 ? void 0 : i[l][1];
|
1089
1089
|
}
|
1090
1090
|
function Rr(n) {
|
1091
|
-
return
|
1091
|
+
return De(this.__data__, n) > -1;
|
1092
1092
|
}
|
1093
1093
|
function zr(n, i) {
|
1094
|
-
var l = this.__data__,
|
1095
|
-
return
|
1094
|
+
var l = this.__data__, g = De(l, n);
|
1095
|
+
return g < 0 ? l.push([n, i]) : l[g][1] = i, this;
|
1096
1096
|
}
|
1097
1097
|
X.prototype.clear = Or, X.prototype.delete = Cr, X.prototype.get = Pr, X.prototype.has = Rr, X.prototype.set = zr;
|
1098
|
-
function
|
1098
|
+
function Z(n) {
|
1099
1099
|
var i = -1, l = n ? n.length : 0;
|
1100
1100
|
for (this.clear(); ++i < l; ) {
|
1101
|
-
var
|
1102
|
-
this.set(
|
1101
|
+
var g = n[i];
|
1102
|
+
this.set(g[0], g[1]);
|
1103
1103
|
}
|
1104
1104
|
}
|
1105
1105
|
function $r() {
|
1106
1106
|
this.__data__ = {
|
1107
|
-
hash: new
|
1108
|
-
map: new (
|
1109
|
-
string: new
|
1107
|
+
hash: new At(),
|
1108
|
+
map: new (se || X)(),
|
1109
|
+
string: new At()
|
1110
1110
|
};
|
1111
1111
|
}
|
1112
1112
|
function Fr(n) {
|
1113
|
-
return
|
1113
|
+
return ce(this, n).delete(n);
|
1114
1114
|
}
|
1115
1115
|
function Lr(n) {
|
1116
|
-
return
|
1116
|
+
return ce(this, n).get(n);
|
1117
1117
|
}
|
1118
1118
|
function Nr(n) {
|
1119
|
-
return
|
1119
|
+
return ce(this, n).has(n);
|
1120
1120
|
}
|
1121
1121
|
function Hr(n, i) {
|
1122
|
-
return
|
1122
|
+
return ce(this, n).set(n, i), this;
|
1123
1123
|
}
|
1124
|
-
|
1125
|
-
function
|
1124
|
+
Z.prototype.clear = $r, Z.prototype.delete = Fr, Z.prototype.get = Lr, Z.prototype.has = Nr, Z.prototype.set = Hr;
|
1125
|
+
function ct(n) {
|
1126
1126
|
this.__data__ = new X(n);
|
1127
1127
|
}
|
1128
|
-
function
|
1128
|
+
function Ur() {
|
1129
1129
|
this.__data__ = new X();
|
1130
1130
|
}
|
1131
|
-
function
|
1131
|
+
function jr(n) {
|
1132
1132
|
return this.__data__.delete(n);
|
1133
1133
|
}
|
1134
1134
|
function Wr(n) {
|
@@ -1140,229 +1140,229 @@ kr.exports;
|
|
1140
1140
|
function Gr(n, i) {
|
1141
1141
|
var l = this.__data__;
|
1142
1142
|
if (l instanceof X) {
|
1143
|
-
var
|
1144
|
-
if (!
|
1145
|
-
return
|
1146
|
-
l = this.__data__ = new
|
1143
|
+
var g = l.__data__;
|
1144
|
+
if (!se || g.length < e - 1)
|
1145
|
+
return g.push([n, i]), this;
|
1146
|
+
l = this.__data__ = new Z(g);
|
1147
1147
|
}
|
1148
1148
|
return l.set(n, i), this;
|
1149
1149
|
}
|
1150
|
-
|
1151
|
-
function
|
1152
|
-
var l =
|
1153
|
-
for (var
|
1154
|
-
|
1150
|
+
ct.prototype.clear = Ur, ct.prototype.delete = jr, ct.prototype.get = Wr, ct.prototype.has = Br, ct.prototype.set = Gr;
|
1151
|
+
function Ae(n, i) {
|
1152
|
+
var l = Ge(n) || Oe(n) ? zt(n.length, String) : [], g = l.length, D = !!g;
|
1153
|
+
for (var A in n)
|
1154
|
+
lt.call(n, A) && !(D && (A == "length" || an(A, g))) && l.push(A);
|
1155
1155
|
return l;
|
1156
1156
|
}
|
1157
|
-
function
|
1158
|
-
var
|
1159
|
-
(!(
|
1157
|
+
function cr(n, i, l) {
|
1158
|
+
var g = n[i];
|
1159
|
+
(!(lt.call(n, i) && pr(g, l)) || l === void 0 && !(i in n)) && (n[i] = l);
|
1160
1160
|
}
|
1161
|
-
function
|
1161
|
+
function De(n, i) {
|
1162
1162
|
for (var l = n.length; l--; )
|
1163
|
-
if (
|
1163
|
+
if (pr(n[l][0], i))
|
1164
1164
|
return l;
|
1165
1165
|
return -1;
|
1166
1166
|
}
|
1167
|
-
function
|
1168
|
-
return n &&
|
1167
|
+
function kt(n, i) {
|
1168
|
+
return n && Be(i, Xe(i), n);
|
1169
1169
|
}
|
1170
|
-
function
|
1170
|
+
function je(n, i, l, g, D, A, R) {
|
1171
1171
|
var P;
|
1172
|
-
if (
|
1172
|
+
if (g && (P = A ? g(n, D, A, R) : g(n)), P !== void 0)
|
1173
1173
|
return P;
|
1174
|
-
if (!
|
1174
|
+
if (!vt(n))
|
1175
1175
|
return n;
|
1176
|
-
var j =
|
1176
|
+
var j = Ge(n);
|
1177
1177
|
if (j) {
|
1178
1178
|
if (P = nn(n), !i)
|
1179
1179
|
return tn(n, P);
|
1180
1180
|
} else {
|
1181
|
-
var F =
|
1182
|
-
if (
|
1183
|
-
return
|
1184
|
-
if (F == b || F == o ||
|
1185
|
-
if (
|
1186
|
-
return
|
1187
|
-
if (P =
|
1188
|
-
return en(n,
|
1181
|
+
var F = xt(n), Q = F == k || F == m;
|
1182
|
+
if (hr(n))
|
1183
|
+
return xe(n, i);
|
1184
|
+
if (F == b || F == o || Q && !A) {
|
1185
|
+
if ($t(n))
|
1186
|
+
return A ? n : {};
|
1187
|
+
if (P = _t(Q ? {} : n), !i)
|
1188
|
+
return en(n, kt(P, n));
|
1189
1189
|
} else {
|
1190
1190
|
if (!z[F])
|
1191
|
-
return
|
1192
|
-
P = sn(n, F,
|
1191
|
+
return A ? n : {};
|
1192
|
+
P = sn(n, F, je, i);
|
1193
1193
|
}
|
1194
1194
|
}
|
1195
|
-
R || (R = new
|
1196
|
-
var
|
1197
|
-
if (
|
1198
|
-
return
|
1195
|
+
R || (R = new ct());
|
1196
|
+
var ut = R.get(n);
|
1197
|
+
if (ut)
|
1198
|
+
return ut;
|
1199
1199
|
if (R.set(n, P), !j)
|
1200
|
-
var
|
1201
|
-
return
|
1202
|
-
|
1200
|
+
var B = l ? rn(n) : Xe(n);
|
1201
|
+
return Vt(B || n, function(tt, K) {
|
1202
|
+
B && (K = tt, tt = n[K]), cr(P, K, je(tt, i, l, g, K, n, R));
|
1203
1203
|
}), P;
|
1204
1204
|
}
|
1205
1205
|
function Yr(n) {
|
1206
|
-
return
|
1206
|
+
return vt(n) ? re(n) : {};
|
1207
1207
|
}
|
1208
1208
|
function Xr(n, i, l) {
|
1209
|
-
var
|
1210
|
-
return
|
1209
|
+
var g = i(n);
|
1210
|
+
return Ge(n) ? g : Jt(g, l(n));
|
1211
1211
|
}
|
1212
1212
|
function Kr(n) {
|
1213
|
-
return
|
1213
|
+
return Mt.call(n);
|
1214
1214
|
}
|
1215
1215
|
function Vr(n) {
|
1216
|
-
if (!
|
1216
|
+
if (!vt(n) || cn(n))
|
1217
1217
|
return !1;
|
1218
|
-
var i =
|
1219
|
-
return i.test(
|
1218
|
+
var i = Ye(n) || $t(n) ? we : ge;
|
1219
|
+
return i.test(nt(n));
|
1220
1220
|
}
|
1221
1221
|
function Jr(n) {
|
1222
|
-
if (!
|
1223
|
-
return
|
1222
|
+
if (!dr(n))
|
1223
|
+
return ar(n);
|
1224
1224
|
var i = [];
|
1225
1225
|
for (var l in Object(n))
|
1226
|
-
|
1226
|
+
lt.call(n, l) && l != "constructor" && i.push(l);
|
1227
1227
|
return i;
|
1228
1228
|
}
|
1229
|
-
function
|
1229
|
+
function xe(n, i) {
|
1230
1230
|
if (i)
|
1231
1231
|
return n.slice();
|
1232
1232
|
var l = new n.constructor(n.length);
|
1233
1233
|
return n.copy(l), l;
|
1234
1234
|
}
|
1235
|
-
function
|
1235
|
+
function We(n) {
|
1236
1236
|
var i = new n.constructor(n.byteLength);
|
1237
|
-
return new
|
1237
|
+
return new Nt(i).set(new Nt(n)), i;
|
1238
1238
|
}
|
1239
|
-
function
|
1240
|
-
var l = i ?
|
1239
|
+
function oe(n, i) {
|
1240
|
+
var l = i ? We(n.buffer) : n.buffer;
|
1241
1241
|
return new n.constructor(l, n.byteOffset, n.byteLength);
|
1242
1242
|
}
|
1243
|
-
function
|
1244
|
-
var
|
1245
|
-
return
|
1243
|
+
function ur(n, i, l) {
|
1244
|
+
var g = i ? l(Zt(n), !0) : Zt(n);
|
1245
|
+
return Rt(g, _e, new n.constructor());
|
1246
1246
|
}
|
1247
|
-
function
|
1248
|
-
var i = new n.constructor(n.source,
|
1247
|
+
function lr(n) {
|
1248
|
+
var i = new n.constructor(n.source, Ie.exec(n));
|
1249
1249
|
return i.lastIndex = n.lastIndex, i;
|
1250
1250
|
}
|
1251
1251
|
function qr(n, i, l) {
|
1252
|
-
var
|
1253
|
-
return
|
1252
|
+
var g = i ? l(Qt(n), !0) : Qt(n);
|
1253
|
+
return Rt(g, ot, new n.constructor());
|
1254
1254
|
}
|
1255
1255
|
function Zr(n) {
|
1256
|
-
return
|
1256
|
+
return ir ? Object(ir.call(n)) : {};
|
1257
1257
|
}
|
1258
1258
|
function Qr(n, i) {
|
1259
|
-
var l = i ?
|
1259
|
+
var l = i ? We(n.buffer) : n.buffer;
|
1260
1260
|
return new n.constructor(l, n.byteOffset, n.length);
|
1261
1261
|
}
|
1262
1262
|
function tn(n, i) {
|
1263
|
-
var l = -1,
|
1264
|
-
for (i || (i = Array(
|
1263
|
+
var l = -1, g = n.length;
|
1264
|
+
for (i || (i = Array(g)); ++l < g; )
|
1265
1265
|
i[l] = n[l];
|
1266
1266
|
return i;
|
1267
1267
|
}
|
1268
|
-
function
|
1268
|
+
function Be(n, i, l, g) {
|
1269
1269
|
l || (l = {});
|
1270
|
-
for (var D = -1,
|
1270
|
+
for (var D = -1, A = i.length; ++D < A; ) {
|
1271
1271
|
var R = i[D], P = void 0;
|
1272
|
-
|
1272
|
+
cr(l, R, P === void 0 ? n[R] : P);
|
1273
1273
|
}
|
1274
1274
|
return l;
|
1275
1275
|
}
|
1276
1276
|
function en(n, i) {
|
1277
|
-
return
|
1277
|
+
return Be(n, Dt(n), i);
|
1278
1278
|
}
|
1279
1279
|
function rn(n) {
|
1280
|
-
return Xr(n,
|
1280
|
+
return Xr(n, Xe, Dt);
|
1281
1281
|
}
|
1282
|
-
function
|
1282
|
+
function ce(n, i) {
|
1283
1283
|
var l = n.__data__;
|
1284
1284
|
return on(i) ? l[typeof i == "string" ? "string" : "hash"] : l.map;
|
1285
1285
|
}
|
1286
|
-
function
|
1287
|
-
var l =
|
1286
|
+
function gt(n, i) {
|
1287
|
+
var l = qt(n, i);
|
1288
1288
|
return Vr(l) ? l : void 0;
|
1289
1289
|
}
|
1290
|
-
var
|
1291
|
-
(
|
1292
|
-
var i =
|
1293
|
-
if (
|
1294
|
-
switch (
|
1295
|
-
case
|
1296
|
-
return
|
1297
|
-
case
|
1290
|
+
var Dt = Ht ? Ft(Ht, Object) : ln, xt = Kr;
|
1291
|
+
(Te && xt(new Te(new ArrayBuffer(1))) != M || se && xt(new se()) != f || It && xt(It.resolve()) != _ || Ee && xt(new Ee()) != d || $e && xt(new $e()) != y) && (xt = function(n) {
|
1292
|
+
var i = Mt.call(n), l = i == b ? n.constructor : void 0, g = l ? nt(l) : void 0;
|
1293
|
+
if (g)
|
1294
|
+
switch (g) {
|
1295
|
+
case Fe:
|
1296
|
+
return M;
|
1297
|
+
case ie:
|
1298
1298
|
return f;
|
1299
|
-
case
|
1299
|
+
case Le:
|
1300
1300
|
return _;
|
1301
|
-
case
|
1301
|
+
case Ne:
|
1302
1302
|
return d;
|
1303
|
-
case
|
1304
|
-
return
|
1303
|
+
case He:
|
1304
|
+
return y;
|
1305
1305
|
}
|
1306
1306
|
return i;
|
1307
1307
|
});
|
1308
1308
|
function nn(n) {
|
1309
1309
|
var i = n.length, l = n.constructor(i);
|
1310
|
-
return i && typeof n[0] == "string" &&
|
1310
|
+
return i && typeof n[0] == "string" && lt.call(n, "index") && (l.index = n.index, l.input = n.input), l;
|
1311
1311
|
}
|
1312
|
-
function
|
1313
|
-
return typeof n.constructor == "function" && !
|
1312
|
+
function _t(n) {
|
1313
|
+
return typeof n.constructor == "function" && !dr(n) ? Yr(rt(n)) : {};
|
1314
1314
|
}
|
1315
|
-
function sn(n, i, l,
|
1315
|
+
function sn(n, i, l, g) {
|
1316
1316
|
var D = n.constructor;
|
1317
1317
|
switch (i) {
|
1318
1318
|
case w:
|
1319
|
-
return
|
1319
|
+
return We(n);
|
1320
1320
|
case c:
|
1321
1321
|
case p:
|
1322
1322
|
return new D(+n);
|
1323
|
-
case
|
1324
|
-
return
|
1325
|
-
case
|
1326
|
-
case
|
1323
|
+
case M:
|
1324
|
+
return oe(n, g);
|
1325
|
+
case E:
|
1326
|
+
case U:
|
1327
1327
|
case C:
|
1328
|
-
case
|
1328
|
+
case q:
|
1329
1329
|
case L:
|
1330
1330
|
case Y:
|
1331
1331
|
case mt:
|
1332
1332
|
case O:
|
1333
1333
|
case N:
|
1334
|
-
return Qr(n,
|
1334
|
+
return Qr(n, g);
|
1335
1335
|
case f:
|
1336
|
-
return
|
1336
|
+
return ur(n, g, l);
|
1337
1337
|
case I:
|
1338
1338
|
case v:
|
1339
1339
|
return new D(n);
|
1340
|
-
case
|
1341
|
-
return
|
1340
|
+
case T:
|
1341
|
+
return lr(n);
|
1342
1342
|
case d:
|
1343
|
-
return qr(n,
|
1343
|
+
return qr(n, g, l);
|
1344
1344
|
case S:
|
1345
1345
|
return Zr(n);
|
1346
1346
|
}
|
1347
1347
|
}
|
1348
1348
|
function an(n, i) {
|
1349
|
-
return i = i ?? a, !!i && (typeof n == "number" ||
|
1349
|
+
return i = i ?? a, !!i && (typeof n == "number" || ye.test(n)) && n > -1 && n % 1 == 0 && n < i;
|
1350
1350
|
}
|
1351
1351
|
function on(n) {
|
1352
1352
|
var i = typeof n;
|
1353
1353
|
return i == "string" || i == "number" || i == "symbol" || i == "boolean" ? n !== "__proto__" : n === null;
|
1354
1354
|
}
|
1355
1355
|
function cn(n) {
|
1356
|
-
return !!
|
1356
|
+
return !!te && te in n;
|
1357
1357
|
}
|
1358
|
-
function
|
1359
|
-
var i = n && n.constructor, l = typeof i == "function" && i.prototype ||
|
1358
|
+
function dr(n) {
|
1359
|
+
var i = n && n.constructor, l = typeof i == "function" && i.prototype || wt;
|
1360
1360
|
return n === l;
|
1361
1361
|
}
|
1362
|
-
function
|
1362
|
+
function nt(n) {
|
1363
1363
|
if (n != null) {
|
1364
1364
|
try {
|
1365
|
-
return
|
1365
|
+
return ee.call(n);
|
1366
1366
|
} catch {
|
1367
1367
|
}
|
1368
1368
|
try {
|
@@ -1372,39 +1372,39 @@ kr.exports;
|
|
1372
1372
|
}
|
1373
1373
|
return "";
|
1374
1374
|
}
|
1375
|
-
function
|
1376
|
-
return
|
1375
|
+
function fr(n) {
|
1376
|
+
return je(n, !0, !0);
|
1377
1377
|
}
|
1378
|
-
function
|
1378
|
+
function pr(n, i) {
|
1379
1379
|
return n === i || n !== n && i !== i;
|
1380
1380
|
}
|
1381
|
-
function
|
1382
|
-
return un(n) &&
|
1381
|
+
function Oe(n) {
|
1382
|
+
return un(n) && lt.call(n, "callee") && (!ne.call(n, "callee") || Mt.call(n) == o);
|
1383
1383
|
}
|
1384
|
-
var
|
1385
|
-
function
|
1386
|
-
return n != null &&
|
1384
|
+
var Ge = Array.isArray;
|
1385
|
+
function Ce(n) {
|
1386
|
+
return n != null && mr(n.length) && !Ye(n);
|
1387
1387
|
}
|
1388
1388
|
function un(n) {
|
1389
|
-
return
|
1389
|
+
return Ir(n) && Ce(n);
|
1390
1390
|
}
|
1391
|
-
var
|
1392
|
-
function
|
1393
|
-
var i =
|
1391
|
+
var hr = Et || dn;
|
1392
|
+
function Ye(n) {
|
1393
|
+
var i = vt(n) ? Mt.call(n) : "";
|
1394
1394
|
return i == k || i == m;
|
1395
1395
|
}
|
1396
|
-
function
|
1396
|
+
function mr(n) {
|
1397
1397
|
return typeof n == "number" && n > -1 && n % 1 == 0 && n <= a;
|
1398
1398
|
}
|
1399
|
-
function
|
1399
|
+
function vt(n) {
|
1400
1400
|
var i = typeof n;
|
1401
1401
|
return !!n && (i == "object" || i == "function");
|
1402
1402
|
}
|
1403
|
-
function
|
1403
|
+
function Ir(n) {
|
1404
1404
|
return !!n && typeof n == "object";
|
1405
1405
|
}
|
1406
|
-
function
|
1407
|
-
return
|
1406
|
+
function Xe(n) {
|
1407
|
+
return Ce(n) ? Ae(n) : Jr(n);
|
1408
1408
|
}
|
1409
1409
|
function ln() {
|
1410
1410
|
return [];
|
@@ -1412,11 +1412,11 @@ kr.exports;
|
|
1412
1412
|
function dn() {
|
1413
1413
|
return !1;
|
1414
1414
|
}
|
1415
|
-
t.exports =
|
1416
|
-
})(
|
1417
|
-
var
|
1418
|
-
const x = /* @__PURE__ */
|
1419
|
-
function
|
1415
|
+
t.exports = fr;
|
1416
|
+
})(vr, vr.exports);
|
1417
|
+
var Pa = vr.exports;
|
1418
|
+
const x = /* @__PURE__ */ xn(Pa);
|
1419
|
+
function Ra(t, r) {
|
1420
1420
|
return t.filter((s) => {
|
1421
1421
|
if (r.forEach((a) => {
|
1422
1422
|
s.items.includes(a) && (s.items = s.items.filter((o) => o !== a));
|
@@ -1424,11 +1424,11 @@ function xa(t, r) {
|
|
1424
1424
|
return s;
|
1425
1425
|
});
|
1426
1426
|
}
|
1427
|
-
const
|
1427
|
+
const J = (t) => Object.keys(t).reduce((r, e) => {
|
1428
1428
|
const { display: s } = t[e];
|
1429
1429
|
return Math.max(r, s.to);
|
1430
1430
|
}, 0);
|
1431
|
-
function
|
1431
|
+
function st(t, r, e) {
|
1432
1432
|
t.forEach((s) => {
|
1433
1433
|
const a = Object.values(r).filter(
|
1434
1434
|
(f) => s.items.includes(f.id)
|
@@ -1455,8 +1455,8 @@ function ct(t, r, e) {
|
|
1455
1455
|
const I = [];
|
1456
1456
|
let b = 0;
|
1457
1457
|
if (I.forEach((_) => {
|
1458
|
-
_.forEach((
|
1459
|
-
|
1458
|
+
_.forEach((T) => {
|
1459
|
+
T.type === "transition" && (b += T.duration);
|
1460
1460
|
});
|
1461
1461
|
}), r[f]) {
|
1462
1462
|
const _ = r[f].display.to - r[f].display.from;
|
@@ -1468,74 +1468,74 @@ function ct(t, r, e) {
|
|
1468
1468
|
});
|
1469
1469
|
});
|
1470
1470
|
}
|
1471
|
-
function
|
1471
|
+
function za(t, r, e) {
|
1472
1472
|
const s = t.toId, a = e[s], o = r.find((u) => u.items.includes(s));
|
1473
1473
|
o && (o.magnetic || o.items.forEach((u) => {
|
1474
1474
|
const c = e[u];
|
1475
1475
|
c.display.from > a.display.from && (c.display.from = c.display.from + t.duration, c.display.to = c.display.to + t.duration);
|
1476
1476
|
}));
|
1477
1477
|
}
|
1478
|
-
function
|
1479
|
-
const e = x(t), s = r && r.length ? r : e.activeIds, a = s.map((
|
1480
|
-
(
|
1481
|
-
const w = e.transitionsMap[
|
1478
|
+
function $a(t, r) {
|
1479
|
+
const e = x(t), s = r && r.length ? r : e.activeIds, a = s.map((y) => e.trackItemsMap[y]).filter((y) => !!y).map((y) => y.id), o = e.transitionIds.filter(
|
1480
|
+
(y) => {
|
1481
|
+
const w = e.transitionsMap[y];
|
1482
1482
|
return a.includes(w.fromId) || a.includes(w.toId);
|
1483
1483
|
}
|
1484
1484
|
);
|
1485
1485
|
a.push(...o);
|
1486
1486
|
const u = {}, c = e.trackItemIds, p = e.transitionIds, h = e.trackItemDetailsMap, k = x(e.tracks), m = x(e.structure);
|
1487
|
-
a.forEach((
|
1488
|
-
var
|
1489
|
-
const w = e.trackItemsMap[
|
1487
|
+
a.forEach((y) => {
|
1488
|
+
var M;
|
1489
|
+
const w = e.trackItemsMap[y] || e.transitionsMap[y];
|
1490
1490
|
if (w.type === "template" || w.type === "composition") {
|
1491
|
-
const
|
1491
|
+
const E = (M = e.structure.find(
|
1492
1492
|
(C) => C.id === w.id
|
1493
|
-
)) == null ? void 0 :
|
1494
|
-
a.push(...
|
1495
|
-
const
|
1493
|
+
)) == null ? void 0 : M.items;
|
1494
|
+
a.push(...E);
|
1495
|
+
const U = m.findIndex(
|
1496
1496
|
(C) => C.id === w.id
|
1497
1497
|
);
|
1498
|
-
m.splice(
|
1498
|
+
m.splice(U, 1);
|
1499
1499
|
}
|
1500
|
-
}), a.forEach((
|
1500
|
+
}), a.forEach((y) => {
|
1501
1501
|
m.forEach((w) => {
|
1502
|
-
w.items.includes(
|
1502
|
+
w.items.includes(y) && (w.items = w.items.filter((M) => M !== y));
|
1503
1503
|
});
|
1504
1504
|
});
|
1505
1505
|
const f = c.filter(
|
1506
|
-
(
|
1506
|
+
(y) => !a.includes(y)
|
1507
1507
|
);
|
1508
|
-
p.forEach((
|
1509
|
-
s.includes(
|
1508
|
+
p.forEach((y) => {
|
1509
|
+
s.includes(y) && s.length === 1 && (u[y] = x(e.transitionsMap[y]));
|
1510
1510
|
});
|
1511
1511
|
const I = p.filter(
|
1512
|
-
(
|
1512
|
+
(y) => !a.includes(y) && !s.includes(y)
|
1513
1513
|
), b = Object.fromEntries(
|
1514
1514
|
Object.entries(h).filter(
|
1515
|
-
([
|
1515
|
+
([y]) => !a.includes(y)
|
1516
1516
|
)
|
1517
1517
|
), _ = Object.fromEntries(
|
1518
1518
|
Object.entries(e.transitionsMap).filter(
|
1519
|
-
([
|
1519
|
+
([y]) => !a.includes(y)
|
1520
1520
|
)
|
1521
1521
|
);
|
1522
|
-
Object.keys(_).forEach((
|
1523
|
-
s.includes(
|
1522
|
+
Object.keys(_).forEach((y) => {
|
1523
|
+
s.includes(y) && (_[y].kind = "none");
|
1524
1524
|
});
|
1525
|
-
const
|
1525
|
+
const T = Ra(
|
1526
1526
|
e.tracks,
|
1527
1527
|
a
|
1528
1528
|
), d = Object.fromEntries(
|
1529
1529
|
Object.entries(e.trackItemsMap).filter(
|
1530
|
-
([
|
1530
|
+
([y]) => !a.includes(y)
|
1531
1531
|
)
|
1532
|
-
), v = k.filter((
|
1533
|
-
|
1534
|
-
const S =
|
1535
|
-
return Object.keys(u).forEach((
|
1536
|
-
|
1537
|
-
u[
|
1538
|
-
|
1532
|
+
), v = k.filter((y) => y.magnetic);
|
1533
|
+
st(v, d, []);
|
1534
|
+
const S = J(d);
|
1535
|
+
return Object.keys(u).forEach((y) => {
|
1536
|
+
za(
|
1537
|
+
u[y],
|
1538
|
+
T,
|
1539
1539
|
d
|
1540
1540
|
);
|
1541
1541
|
}), {
|
@@ -1543,26 +1543,26 @@ function Ca(t, r) {
|
|
1543
1543
|
trackItemDetailsMap: b,
|
1544
1544
|
activeIds: [],
|
1545
1545
|
trackItemsMap: d,
|
1546
|
-
tracks:
|
1546
|
+
tracks: T,
|
1547
1547
|
duration: S,
|
1548
1548
|
structure: m,
|
1549
1549
|
transitionIds: I,
|
1550
1550
|
transitionsMap: _
|
1551
1551
|
};
|
1552
1552
|
}
|
1553
|
-
const
|
1554
|
-
let
|
1553
|
+
const Fa = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
1554
|
+
let ls = (t = 21) => {
|
1555
1555
|
let r = "", e = crypto.getRandomValues(new Uint8Array(t |= 0));
|
1556
1556
|
for (; t--; )
|
1557
|
-
r +=
|
1557
|
+
r += Fa[e[t] & 63];
|
1558
1558
|
return r;
|
1559
1559
|
};
|
1560
|
-
function
|
1560
|
+
function de(t = 16) {
|
1561
1561
|
const r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", e = r.charAt(Math.floor(Math.random() * r.length));
|
1562
|
-
let s =
|
1562
|
+
let s = ls(t - 1);
|
1563
1563
|
return s = s.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), e + s;
|
1564
1564
|
}
|
1565
|
-
const
|
1565
|
+
const er = (t) => {
|
1566
1566
|
const r = t.map((e) => new FontFace(e.fontFamily, `url(${e.url})`).load().catch((s) => s));
|
1567
1567
|
return r.length === 0 ? Promise.resolve(!0) : new Promise((e, s) => {
|
1568
1568
|
Promise.all(r).then((a) => {
|
@@ -1572,18 +1572,18 @@ const qe = (t) => {
|
|
1572
1572
|
}).catch((a) => s(a));
|
1573
1573
|
});
|
1574
1574
|
};
|
1575
|
-
async function
|
1575
|
+
async function La(t) {
|
1576
1576
|
const r = localStorage.getItem("DesignComboTemp");
|
1577
1577
|
if (!r) return {};
|
1578
1578
|
const e = { ...t }, s = JSON.parse(r), a = {}, o = s.trackItemsMap, u = s.trackItemDetailsMap, c = s.tracks, p = [], h = s.activeIds.map(async (k) => {
|
1579
1579
|
const m = u[k];
|
1580
|
-
(m.type === "caption" || m.type === "text") && m.details.fontUrl && await
|
1580
|
+
(m.type === "caption" || m.type === "text") && m.details.fontUrl && await er([
|
1581
1581
|
{
|
1582
1582
|
fontFamily: m.details.fontFamily,
|
1583
1583
|
url: m.details.fontUrl
|
1584
1584
|
}
|
1585
1585
|
]);
|
1586
|
-
const f =
|
1586
|
+
const f = de();
|
1587
1587
|
return a[k] = f, e.trackItemsMap[f] = {
|
1588
1588
|
...o[k],
|
1589
1589
|
id: f
|
@@ -1595,7 +1595,7 @@ async function Ra(t) {
|
|
1595
1595
|
magnetic: !1,
|
1596
1596
|
static: !1,
|
1597
1597
|
items: m,
|
1598
|
-
id:
|
1598
|
+
id: de()
|
1599
1599
|
};
|
1600
1600
|
p.push(f);
|
1601
1601
|
}), e.tracks = [...p, ...e.tracks], {
|
@@ -1605,7 +1605,7 @@ async function Ra(t) {
|
|
1605
1605
|
trackItemsMap: e.trackItemsMap
|
1606
1606
|
};
|
1607
1607
|
}
|
1608
|
-
const
|
1608
|
+
const ze = (t) => new Promise((r, e) => {
|
1609
1609
|
const s = new Image();
|
1610
1610
|
console.warn("update cdn config for cors?"), s.onload = () => {
|
1611
1611
|
const a = s.width, o = s.height;
|
@@ -1613,7 +1613,7 @@ const De = (t) => new Promise((r, e) => {
|
|
1613
1613
|
}, s.onerror = (a) => {
|
1614
1614
|
e(a);
|
1615
1615
|
}, s.crossOrigin = "anonymous", s.src = t;
|
1616
|
-
}),
|
1616
|
+
}), ds = (t) => new Promise((r, e) => {
|
1617
1617
|
const s = new Audio();
|
1618
1618
|
s.preload = "auto", s.addEventListener("loadedmetadata", () => {
|
1619
1619
|
const a = s.duration * 1e3;
|
@@ -1621,7 +1621,7 @@ const De = (t) => new Promise((r, e) => {
|
|
1621
1621
|
}), s.addEventListener("error", (a) => {
|
1622
1622
|
e(a);
|
1623
1623
|
}), s.src = t, s.crossOrigin = "anonymous", s.load();
|
1624
|
-
}),
|
1624
|
+
}), Cn = (t) => new Promise((r, e) => {
|
1625
1625
|
const s = document.createElement("video");
|
1626
1626
|
s.preload = "auto", s.addEventListener("loadedmetadata", () => {
|
1627
1627
|
const a = s.duration * 1e3, o = s.videoWidth, u = s.videoHeight;
|
@@ -1629,18 +1629,18 @@ const De = (t) => new Promise((r, e) => {
|
|
1629
1629
|
}), s.addEventListener("error", (a) => {
|
1630
1630
|
e(a);
|
1631
1631
|
}), s.src = t, s.load();
|
1632
|
-
}),
|
1632
|
+
}), Na = async (t) => {
|
1633
1633
|
var a, o;
|
1634
1634
|
const r = t.duration, e = (a = t.details) == null ? void 0 : a.width, s = (o = t.details) == null ? void 0 : o.height;
|
1635
|
-
return r && e && s ? { duration: r, width: e, height: s } :
|
1636
|
-
},
|
1635
|
+
return r && e && s ? { duration: r, width: e, height: s } : Cn(t.details.src);
|
1636
|
+
}, fs = (t, r) => {
|
1637
1637
|
const e = document.createElement("div");
|
1638
1638
|
Object.keys(r).forEach((a) => {
|
1639
1639
|
a !== "height" && (e.style[a] = r[a]);
|
1640
1640
|
}), document.body.appendChild(e), e.textContent = t, e.style.whiteSpace = "normal", e.style.position = "absolute", e.style.visibility = "hidden", e.style.display = "inline-block", e.style.width = r.width + "px", e.style.fontSize = r.fontSize + "px";
|
1641
1641
|
const s = getComputedStyle(e).height;
|
1642
1642
|
return document.body.removeChild(e), parseFloat(s);
|
1643
|
-
},
|
1643
|
+
}, Yn = (t, r) => {
|
1644
1644
|
var c, p;
|
1645
1645
|
const e = ((c = t.details.crop) == null ? void 0 : c.width) || t.details.width || 0, s = ((p = t.details.crop) == null ? void 0 : p.height) || t.details.height || 0;
|
1646
1646
|
let a = r.width, o = r.height;
|
@@ -1655,7 +1655,7 @@ const De = (t) => new Promise((r, e) => {
|
|
1655
1655
|
width: e
|
1656
1656
|
}
|
1657
1657
|
};
|
1658
|
-
},
|
1658
|
+
}, Xn = (t, r) => {
|
1659
1659
|
const e = x(t.trim), s = x(t.display);
|
1660
1660
|
return r.duration < t.display.to && (s.to = r.duration, e && (e.to = r.duration)), {
|
1661
1661
|
duration: r.duration,
|
@@ -1663,17 +1663,17 @@ const De = (t) => new Promise((r, e) => {
|
|
1663
1663
|
display: s
|
1664
1664
|
};
|
1665
1665
|
};
|
1666
|
-
async function
|
1666
|
+
async function Ha(t, r) {
|
1667
1667
|
const e = { ...t }, s = Object.keys(r)[0], a = Object.values(r)[0], o = e.trackItemDetailsMap[s], u = { ...e.trackItemsMap[s] }, c = o.details;
|
1668
1668
|
if (!a.details.src) return {};
|
1669
1669
|
if (o.type === "image") {
|
1670
|
-
const p = await
|
1670
|
+
const p = await ze(a.details.src), { crop: h, newHeight: k, newWidth: m } = Yn(o, p);
|
1671
1671
|
a.details.crop = h, a.details.height = k, a.details.width = m;
|
1672
1672
|
} else if (o.type === "video") {
|
1673
|
-
const p = await
|
1673
|
+
const p = await Cn(a.details.src), h = e.trackItemsMap[s], { display: k, duration: m, trim: f } = Xn(h, p), { crop: I, newHeight: b, newWidth: _ } = Yn(o, p);
|
1674
1674
|
a.details.crop = I, a.details.height = b, a.details.width = _, u.display = k, u.duration = m, u.trim = f;
|
1675
1675
|
} else if (o.type === "audio") {
|
1676
|
-
const p = await
|
1676
|
+
const p = await ds(a.details.src), h = e.trackItemsMap[s], { display: k, duration: m, trim: f } = Xn(h, p);
|
1677
1677
|
u.display = k, u.duration = m, u.trim = f;
|
1678
1678
|
}
|
1679
1679
|
return o.details = { ...c, ...a.details }, e.trackItemDetailsMap[s] = { ...o }, e.trackItemsMap[s] = { ...u }, {
|
@@ -1681,11 +1681,11 @@ async function $a(t, r) {
|
|
1681
1681
|
trackItemsMap: e.trackItemsMap
|
1682
1682
|
};
|
1683
1683
|
}
|
1684
|
-
function
|
1684
|
+
function Ua(t, r) {
|
1685
1685
|
const e = x(t), s = {}, a = r && r.length ? r : e.activeIds;
|
1686
1686
|
if (a.length === 0) return {};
|
1687
1687
|
a.forEach((u) => {
|
1688
|
-
const c = e.trackItemsMap[u], p = e.trackItemDetailsMap[u], h =
|
1688
|
+
const c = e.trackItemsMap[u], p = e.trackItemDetailsMap[u], h = de();
|
1689
1689
|
e.trackItemsMap[h] = {
|
1690
1690
|
...x(c),
|
1691
1691
|
id: h
|
@@ -1697,7 +1697,7 @@ function Fa(t, r) {
|
|
1697
1697
|
);
|
1698
1698
|
s[k.id] ? s[k.id].items.push(h) : s[k.id] = {
|
1699
1699
|
...k,
|
1700
|
-
id:
|
1700
|
+
id: de(),
|
1701
1701
|
items: [h],
|
1702
1702
|
static: !1,
|
1703
1703
|
magnetic: !1
|
@@ -1711,7 +1711,7 @@ function Fa(t, r) {
|
|
1711
1711
|
trackItemsMap: e.trackItemsMap
|
1712
1712
|
};
|
1713
1713
|
}
|
1714
|
-
function
|
1714
|
+
function ja(t) {
|
1715
1715
|
const r = /#([0-9a-fA-F]{3,6})\b/g, e = /rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\s*\)/g, s = /rgba\(\s*(\d+),\s*(\d+),\s*(\d+),\s*([0-9.]+)\s*\)/g;
|
1716
1716
|
function a(u) {
|
1717
1717
|
return u.length === 3 ? `#${u[0]}${u[0]}${u[1]}${u[1]}${u[2]}${u[2]}`.toUpperCase() : `#${u.toUpperCase()}`;
|
@@ -1730,7 +1730,7 @@ function La(t) {
|
|
1730
1730
|
function V(t) {
|
1731
1731
|
return /^#[0-9a-fA-F]{3}$/.test(t) ? "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3] : t;
|
1732
1732
|
}
|
1733
|
-
function
|
1733
|
+
function ps(t, r) {
|
1734
1734
|
let e = t;
|
1735
1735
|
for (const s in r)
|
1736
1736
|
if (Object.prototype.hasOwnProperty.call(r, s)) {
|
@@ -1739,7 +1739,7 @@ function fs(t, r) {
|
|
1739
1739
|
}
|
1740
1740
|
return e;
|
1741
1741
|
}
|
1742
|
-
function
|
1742
|
+
function hs(t) {
|
1743
1743
|
const r = t.getAttribute("fill");
|
1744
1744
|
if (r && r.trim() !== "" && r.trim() !== "none")
|
1745
1745
|
return r.trim();
|
@@ -1753,12 +1753,12 @@ function ps(t) {
|
|
1753
1753
|
}
|
1754
1754
|
}
|
1755
1755
|
const s = t.parentElement;
|
1756
|
-
return s ?
|
1756
|
+
return s ? hs(s) : null;
|
1757
1757
|
}
|
1758
|
-
function
|
1758
|
+
function Ke(t) {
|
1759
1759
|
return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(t);
|
1760
1760
|
}
|
1761
|
-
const
|
1761
|
+
const Wa = (t) => {
|
1762
1762
|
const r = `.${t.split(".").filter((o) => o.includes("fill:")).join(".")}`, e = {}, s = /\.([\w-]+)\s*\{\s*([^}]+)\s*\}/g;
|
1763
1763
|
let a;
|
1764
1764
|
for (; (a = s.exec(r)) !== null; ) {
|
@@ -1776,56 +1776,56 @@ function pn(t) {
|
|
1776
1776
|
}
|
1777
1777
|
return !1;
|
1778
1778
|
}
|
1779
|
-
function
|
1779
|
+
function Ba(t, r, e = 300, s = 300) {
|
1780
1780
|
const a = [], u = new DOMParser().parseFromString(t, "image/svg+xml"), c = u.documentElement;
|
1781
1781
|
c.setAttribute("width", `${e}`), c.setAttribute("height", `${s}`);
|
1782
1782
|
const p = c.querySelectorAll("style"), h = {};
|
1783
1783
|
p.forEach((_) => {
|
1784
|
-
const
|
1784
|
+
const T = _.textContent || "", d = Wa(T);
|
1785
1785
|
Object.assign(h, d);
|
1786
|
-
const v =
|
1786
|
+
const v = T.replace(/\.(st[\w-]+)/g, `.${r}-$1`).replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`);
|
1787
1787
|
_.textContent = v;
|
1788
|
-
const S = Array.from(u.querySelectorAll("*")),
|
1788
|
+
const S = Array.from(u.querySelectorAll("*")), y = /* @__PURE__ */ new Set();
|
1789
1789
|
S.forEach((w) => {
|
1790
1790
|
if (pn(w)) return;
|
1791
|
-
["fill", "stroke", "stop-color"].forEach((
|
1792
|
-
const C = w.getAttribute(
|
1793
|
-
C && !["none", "transparent"].includes(C) &&
|
1791
|
+
["fill", "stroke", "stop-color"].forEach((U) => {
|
1792
|
+
const C = w.getAttribute(U);
|
1793
|
+
C && !["none", "transparent"].includes(C) && y.add(V(C));
|
1794
1794
|
});
|
1795
|
-
const
|
1796
|
-
if (
|
1797
|
-
const
|
1798
|
-
if (
|
1799
|
-
const L =
|
1800
|
-
L && !["none", "transparent"].includes(L) &&
|
1795
|
+
const M = w.getAttribute("style");
|
1796
|
+
if (M) {
|
1797
|
+
const U = /fill\s*:\s*([^;]+);?/.exec(M), C = /stroke\s*:\s*([^;]+);?/.exec(M), q = /stop-color\s*:\s*([^;]+);?/.exec(M);
|
1798
|
+
if (U) {
|
1799
|
+
const L = U[1].trim();
|
1800
|
+
L && !["none", "transparent"].includes(L) && Ke(V(L)) && y.add(V(L));
|
1801
1801
|
}
|
1802
1802
|
if (C) {
|
1803
1803
|
const L = C[1].trim();
|
1804
|
-
L && !["none", "transparent"].includes(L) &&
|
1804
|
+
L && !["none", "transparent"].includes(L) && Ke(V(L)) && y.add(V(L));
|
1805
1805
|
}
|
1806
|
-
if (
|
1807
|
-
const L =
|
1808
|
-
L && !["none", "transparent"].includes(L) &&
|
1806
|
+
if (q) {
|
1807
|
+
const L = q[1].trim();
|
1808
|
+
L && !["none", "transparent"].includes(L) && Ke(V(L)) && y.add(V(L));
|
1809
1809
|
}
|
1810
1810
|
}
|
1811
|
-
const
|
1812
|
-
|
1813
|
-
const C = h[
|
1814
|
-
C != null && C.fill && !["none", "transparent"].includes(C.fill) &&
|
1811
|
+
const E = w.getAttribute("class");
|
1812
|
+
E && E.split(" ").forEach((U) => {
|
1813
|
+
const C = h[U];
|
1814
|
+
C != null && C.fill && !["none", "transparent"].includes(C.fill) && y.add(V(C.fill)), C != null && C.stroke && !["none", "transparent"].includes(C.stroke) && y.add(V(C.stroke));
|
1815
1815
|
});
|
1816
|
-
}), Array.from(
|
1817
|
-
|
1816
|
+
}), Array.from(y).forEach((w) => {
|
1817
|
+
Ke(w) && a.push(w);
|
1818
1818
|
});
|
1819
1819
|
});
|
1820
1820
|
const k = Array.from(u.querySelectorAll("*")), m = /* @__PURE__ */ new Set();
|
1821
1821
|
return k.forEach((_) => {
|
1822
1822
|
if (pn(_)) return;
|
1823
|
-
const
|
1824
|
-
if (
|
1825
|
-
const v =
|
1823
|
+
const T = _.getAttribute("class");
|
1824
|
+
if (T) {
|
1825
|
+
const v = T.split(" ").map((S) => `${r}-${S}`).join(" ");
|
1826
1826
|
_.setAttribute("class", v), v.split(" ").forEach((S) => {
|
1827
|
-
const
|
1828
|
-
|
1827
|
+
const y = h[S];
|
1828
|
+
y != null && y.fill && !["none", "transparent"].includes(y.fill) && m.add(V(y.fill)), y != null && y.stroke && !["none", "transparent"].includes(y.stroke) && m.add(V(y.stroke));
|
1829
1829
|
});
|
1830
1830
|
}
|
1831
1831
|
["fill", "stroke", "stop-color"].forEach((v) => {
|
@@ -1834,7 +1834,7 @@ function Ha(t, r, e = 300, s = 300) {
|
|
1834
1834
|
});
|
1835
1835
|
const d = _.getAttribute("style");
|
1836
1836
|
if (d) {
|
1837
|
-
const v = /fill\s*:\s*([^;]+);?/.exec(d), S = /stroke\s*:\s*([^;]+);?/.exec(d),
|
1837
|
+
const v = /fill\s*:\s*([^;]+);?/.exec(d), S = /stroke\s*:\s*([^;]+);?/.exec(d), y = /stop-color\s*:\s*([^;]+);?/.exec(d);
|
1838
1838
|
if (v) {
|
1839
1839
|
const w = v[1].trim();
|
1840
1840
|
w && !["none", "transparent"].includes(w) && m.add(V(w));
|
@@ -1843,44 +1843,44 @@ function Ha(t, r, e = 300, s = 300) {
|
|
1843
1843
|
const w = S[1].trim();
|
1844
1844
|
w && !["none", "transparent"].includes(w) && m.add(V(w));
|
1845
1845
|
}
|
1846
|
-
if (
|
1847
|
-
const w =
|
1846
|
+
if (y) {
|
1847
|
+
const w = y[1].trim();
|
1848
1848
|
w && !["none", "transparent"].includes(w) && m.add(V(w));
|
1849
1849
|
}
|
1850
1850
|
}
|
1851
1851
|
}), m.forEach(
|
1852
|
-
(_) => !a.includes(_) &&
|
1852
|
+
(_) => !a.includes(_) && Ke(_) && a.push(_)
|
1853
1853
|
), Array.from(u.querySelectorAll("*")).forEach((_) => {
|
1854
1854
|
if (_.hasAttribute("id")) {
|
1855
|
-
const
|
1856
|
-
_.setAttribute("id", `${r}-${
|
1855
|
+
const T = _.getAttribute("id");
|
1856
|
+
_.setAttribute("id", `${r}-${T}`);
|
1857
1857
|
}
|
1858
1858
|
if (["fill", "stroke", "stop-color", "filter", "clip-path", "mask"].forEach(
|
1859
|
-
(
|
1860
|
-
const d = _.getAttribute(
|
1859
|
+
(T) => {
|
1860
|
+
const d = _.getAttribute(T);
|
1861
1861
|
d && d.includes("url(#") && _.setAttribute(
|
1862
|
-
|
1862
|
+
T,
|
1863
1863
|
d.replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`)
|
1864
1864
|
);
|
1865
1865
|
}
|
1866
1866
|
), _.hasAttribute("style")) {
|
1867
|
-
const
|
1868
|
-
|
1867
|
+
const T = _.getAttribute("style");
|
1868
|
+
T.includes("url(#") && _.setAttribute(
|
1869
1869
|
"style",
|
1870
|
-
|
1870
|
+
T.replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`)
|
1871
1871
|
);
|
1872
1872
|
}
|
1873
1873
|
}), Array.from(u.querySelectorAll("path")).forEach((_) => {
|
1874
1874
|
if (pn(_)) return;
|
1875
|
-
!
|
1875
|
+
!hs(_) && !_.getAttribute("class") && (_.setAttribute("fill", "#000000"), a.includes("#000000") || a.push("#000000"));
|
1876
1876
|
}), { serializer: new XMLSerializer().serializeToString(u), colors: a };
|
1877
1877
|
}
|
1878
|
-
const
|
1878
|
+
const rr = {
|
1879
1879
|
color: "#000000",
|
1880
1880
|
x: 0,
|
1881
1881
|
y: 0,
|
1882
1882
|
blur: 0
|
1883
|
-
},
|
1883
|
+
}, yt = (t, r) => {
|
1884
1884
|
let e = r != null && r.trim ? r.trim.to - r.trim.from : (r == null ? void 0 : r.duration) || 5e3;
|
1885
1885
|
const s = {
|
1886
1886
|
from: 0,
|
@@ -1908,14 +1908,14 @@ const Mr = {
|
|
1908
1908
|
), s;
|
1909
1909
|
}
|
1910
1910
|
return t;
|
1911
|
-
},
|
1911
|
+
}, ms = (t, r) => t ? t.from && !t.to ? {
|
1912
1912
|
from: t.from,
|
1913
1913
|
to: r.duration
|
1914
1914
|
} : t : {
|
1915
1915
|
from: 0,
|
1916
1916
|
to: r.duration
|
1917
1917
|
};
|
1918
|
-
function
|
1918
|
+
function pt(t, r) {
|
1919
1919
|
const e = t.scaleMode, s = {
|
1920
1920
|
x: t.size.width / 2,
|
1921
1921
|
y: t.size.height / 2
|
@@ -1944,10 +1944,10 @@ function ht(t, r) {
|
|
1944
1944
|
transform: `scale(${o})`
|
1945
1945
|
};
|
1946
1946
|
}
|
1947
|
-
const
|
1948
|
-
const e = t.details.src, s = await
|
1947
|
+
const Is = async (t, r) => {
|
1948
|
+
const e = t.details.src, s = await Na(t), a = pt(r, {
|
1949
1949
|
...s
|
1950
|
-
}), o =
|
1950
|
+
}), o = ms(t.trim, { duration: s.duration }), u = {
|
1951
1951
|
width: s.width,
|
1952
1952
|
height: s.height,
|
1953
1953
|
opacity: 100,
|
@@ -1960,7 +1960,7 @@ const ms = async (t, r) => {
|
|
1960
1960
|
// Default border width
|
1961
1961
|
borderColor: t.details.borderColor || "#000000",
|
1962
1962
|
// Default border color
|
1963
|
-
boxShadow: t.details.boxShadow ||
|
1963
|
+
boxShadow: t.details.boxShadow || rr,
|
1964
1964
|
top: t.details.top || a.top || "0px",
|
1965
1965
|
// Default top
|
1966
1966
|
left: t.details.left || a.left || "0px",
|
@@ -1981,16 +1981,16 @@ const ms = async (t, r) => {
|
|
1981
1981
|
name: "video",
|
1982
1982
|
details: u,
|
1983
1983
|
playbackRate: t.playbackRate || 1,
|
1984
|
-
display:
|
1984
|
+
display: yt(t.display, { duration: s.duration, trim: o }),
|
1985
1985
|
duration: s.duration
|
1986
1986
|
};
|
1987
|
-
},
|
1988
|
-
const r = t.id, e = t.details, a = (await
|
1987
|
+
}, gs = async (t) => {
|
1988
|
+
const r = t.id, e = t.details, a = (await ds(e.src)).duration, o = ms(t.trim, { duration: a });
|
1989
1989
|
return {
|
1990
1990
|
id: r,
|
1991
1991
|
name: t.name || "audio",
|
1992
1992
|
type: "audio",
|
1993
|
-
display:
|
1993
|
+
display: yt(t.display, { duration: a, trim: o }),
|
1994
1994
|
trim: o,
|
1995
1995
|
playbackRate: t.playbackRate || 1,
|
1996
1996
|
details: {
|
@@ -2001,12 +2001,12 @@ const ms = async (t, r) => {
|
|
2001
2001
|
metadata: { ...t.metadata },
|
2002
2002
|
duration: a
|
2003
2003
|
};
|
2004
|
-
},
|
2004
|
+
}, Ga = async (t, r) => {
|
2005
2005
|
var c, p;
|
2006
2006
|
const e = t.id, s = {
|
2007
2007
|
width: ((c = t.details) == null ? void 0 : c.width) || r.size.width,
|
2008
2008
|
height: ((p = t.details) == null ? void 0 : p.height) || r.size.height
|
2009
|
-
}, a = t.details, o =
|
2009
|
+
}, a = t.details, o = pt(r, s), u = yt(t.display);
|
2010
2010
|
return {
|
2011
2011
|
id: e,
|
2012
2012
|
name: t.type,
|
@@ -2039,12 +2039,12 @@ const ms = async (t, r) => {
|
|
2039
2039
|
},
|
2040
2040
|
metadata: {}
|
2041
2041
|
};
|
2042
|
-
},
|
2042
|
+
}, Ya = async (t, r) => {
|
2043
2043
|
var c, p;
|
2044
2044
|
const e = t.id, s = {
|
2045
2045
|
width: ((c = t.details) == null ? void 0 : c.width) || r.size.width,
|
2046
2046
|
height: ((p = t.details) == null ? void 0 : p.height) || r.size.height
|
2047
|
-
}, a = t.details, o =
|
2047
|
+
}, a = t.details, o = pt(r, s), u = yt(t.display);
|
2048
2048
|
return {
|
2049
2049
|
id: e,
|
2050
2050
|
name: t.type,
|
@@ -2078,12 +2078,12 @@ const ms = async (t, r) => {
|
|
2078
2078
|
},
|
2079
2079
|
metadata: {}
|
2080
2080
|
};
|
2081
|
-
},
|
2081
|
+
}, Xa = async (t, r) => {
|
2082
2082
|
var c, p;
|
2083
2083
|
const e = t.id, s = {
|
2084
2084
|
width: ((c = t.details) == null ? void 0 : c.width) || r.size.width,
|
2085
2085
|
height: ((p = t.details) == null ? void 0 : p.height) || r.size.height
|
2086
|
-
}, a = t.details, o =
|
2086
|
+
}, a = t.details, o = pt(r, s), u = yt(t.display);
|
2087
2087
|
return {
|
2088
2088
|
id: e,
|
2089
2089
|
name: t.type,
|
@@ -2112,12 +2112,12 @@ const ms = async (t, r) => {
|
|
2112
2112
|
},
|
2113
2113
|
metadata: {}
|
2114
2114
|
};
|
2115
|
-
},
|
2115
|
+
}, hn = async (t, r) => {
|
2116
2116
|
var u, c;
|
2117
2117
|
const e = t.id, s = {
|
2118
2118
|
width: ((u = t.details) == null ? void 0 : u.width) || r.size.width,
|
2119
2119
|
height: ((c = t.details) == null ? void 0 : c.height) || r.size.height
|
2120
|
-
}, a = t.details, o =
|
2120
|
+
}, a = t.details, o = pt(r, s);
|
2121
2121
|
return {
|
2122
2122
|
id: e,
|
2123
2123
|
name: t.type,
|
@@ -2146,7 +2146,22 @@ const ms = async (t, r) => {
|
|
2146
2146
|
flipX: a.flipX || !1,
|
2147
2147
|
flipY: a.flipY || !1,
|
2148
2148
|
inverted: a.inverted || !1,
|
2149
|
-
linealBarColor: a.linealBarColor || "rgba(128, 128, 128,1)"
|
2149
|
+
linealBarColor: a.linealBarColor || "rgba(128, 128, 128,1)",
|
2150
|
+
lineThickness: a.lineThickness || 1,
|
2151
|
+
gapSize: a.gapSize || 1,
|
2152
|
+
roundness: a.roundness || 1,
|
2153
|
+
placement: a.placement || null,
|
2154
|
+
strokeColor: a.strokeColor || "#92E1B0",
|
2155
|
+
fillColor: a.fillColor || null,
|
2156
|
+
strokeWidth: a.strokeWidth || null,
|
2157
|
+
copies: a.copies || null,
|
2158
|
+
offsetPixelSpeed: a.offsetPixelSpeed || 0,
|
2159
|
+
lineColor: a.lineColor || "#92E1B0",
|
2160
|
+
lineGap: a.lineGap || 0,
|
2161
|
+
topRoundness: a.topRoundness || 0,
|
2162
|
+
bottomRoundness: a.bottomRoundness || 0,
|
2163
|
+
lines: a.lines || 0,
|
2164
|
+
sections: a.sections || 0
|
2150
2165
|
},
|
2151
2166
|
metadata: {}
|
2152
2167
|
};
|
@@ -2158,7 +2173,7 @@ const ms = async (t, r) => {
|
|
2158
2173
|
}, a = Math.min(
|
2159
2174
|
r.size.width / s.width,
|
2160
2175
|
r.size.height / s.height
|
2161
|
-
), o = ((m = t.details) == null ? void 0 : m.rotate) || 0, u =
|
2176
|
+
), o = ((m = t.details) == null ? void 0 : m.rotate) || 0, u = pt(r, s), c = t.display;
|
2162
2177
|
let p = 1 / 0, h = 0;
|
2163
2178
|
e.forEach((f) => {
|
2164
2179
|
const I = t.trackItemsMap[f];
|
@@ -2182,7 +2197,7 @@ const ms = async (t, r) => {
|
|
2182
2197
|
display: c || { from: p, to: h },
|
2183
2198
|
activeEdit: !1
|
2184
2199
|
};
|
2185
|
-
},
|
2200
|
+
}, Ka = async (t, r) => {
|
2186
2201
|
var k;
|
2187
2202
|
const e = t.trackItemIds, s = t.size || {
|
2188
2203
|
width: t.details.width,
|
@@ -2190,7 +2205,7 @@ const ms = async (t, r) => {
|
|
2190
2205
|
}, a = Math.min(
|
2191
2206
|
r.size.width / s.width,
|
2192
2207
|
r.size.height / s.height
|
2193
|
-
), o = ((k = t.details) == null ? void 0 : k.rotate) || 0, u =
|
2208
|
+
), o = ((k = t.details) == null ? void 0 : k.rotate) || 0, u = pt(r, s), c = t.display;
|
2194
2209
|
let p = 1 / 0, h = 0;
|
2195
2210
|
return e.forEach((m) => {
|
2196
2211
|
const f = t.trackItemsMap[m];
|
@@ -2209,12 +2224,12 @@ const ms = async (t, r) => {
|
|
2209
2224
|
},
|
2210
2225
|
display: c || { from: p, to: h }
|
2211
2226
|
};
|
2212
|
-
},
|
2213
|
-
const e = t.details, s =
|
2227
|
+
}, bs = async (t, r) => {
|
2228
|
+
const e = t.details, s = ze(e.src), a = fetch(e.src), [o, u] = await Promise.all([
|
2214
2229
|
s,
|
2215
2230
|
a
|
2216
|
-
]), c = await u.text(), p =
|
2217
|
-
|
2231
|
+
]), c = await u.text(), p = pt(r, o), { serializer: h, colors: k } = Ba(
|
2232
|
+
ja(c),
|
2218
2233
|
t.id,
|
2219
2234
|
parseFloat(e.width || o.width),
|
2220
2235
|
parseFloat(e.height || o.height)
|
@@ -2223,7 +2238,7 @@ const ms = async (t, r) => {
|
|
2223
2238
|
id: t.id,
|
2224
2239
|
name: "illustration",
|
2225
2240
|
type: t.type,
|
2226
|
-
display:
|
2241
|
+
display: yt(t.display),
|
2227
2242
|
playbackRate: t.playbackRate || 1,
|
2228
2243
|
details: {
|
2229
2244
|
src: e.src || "",
|
@@ -2258,13 +2273,13 @@ const ms = async (t, r) => {
|
|
2258
2273
|
},
|
2259
2274
|
metadata: t.metadata || {}
|
2260
2275
|
};
|
2261
|
-
},
|
2262
|
-
const e = t.details, s =
|
2276
|
+
}, Va = async (t, r) => {
|
2277
|
+
const e = t.details, s = ze(e.src), [a] = await Promise.all([s]), o = pt(r, a);
|
2263
2278
|
return {
|
2264
2279
|
id: t.id,
|
2265
2280
|
name: "shape",
|
2266
2281
|
type: t.type,
|
2267
|
-
display:
|
2282
|
+
display: yt(t.display),
|
2268
2283
|
playbackRate: t.playbackRate || 1,
|
2269
2284
|
details: {
|
2270
2285
|
src: e.src || "",
|
@@ -2297,13 +2312,57 @@ const ms = async (t, r) => {
|
|
2297
2312
|
},
|
2298
2313
|
metadata: t.metadata || {}
|
2299
2314
|
};
|
2300
|
-
},
|
2301
|
-
const e = t.details, s =
|
2315
|
+
}, Ja = async (t, r) => {
|
2316
|
+
const e = t.details, s = pt(r, {
|
2317
|
+
width: e.width,
|
2318
|
+
height: e.height
|
2319
|
+
});
|
2320
|
+
return {
|
2321
|
+
id: t.id,
|
2322
|
+
name: "rect",
|
2323
|
+
type: t.type,
|
2324
|
+
display: yt(t.display),
|
2325
|
+
playbackRate: t.playbackRate || 1,
|
2326
|
+
details: {
|
2327
|
+
width: e.width || 100,
|
2328
|
+
// Default width
|
2329
|
+
height: e.height || 100,
|
2330
|
+
// Default height
|
2331
|
+
opacity: e.opacity ?? 100,
|
2332
|
+
// Default opacity
|
2333
|
+
transform: e.transform || s.transform,
|
2334
|
+
// Default transform
|
2335
|
+
border: e.border || "none",
|
2336
|
+
// Default border
|
2337
|
+
borderRadius: e.borderRadius || 0,
|
2338
|
+
// Default border radius
|
2339
|
+
top: e.top || s.top || "0px",
|
2340
|
+
// Default top
|
2341
|
+
left: e.left || s.left || "0px",
|
2342
|
+
// Default left
|
2343
|
+
borderWidth: e.borderWidth ?? 0,
|
2344
|
+
// Default border width
|
2345
|
+
borderColor: e.borderColor || "#000000",
|
2346
|
+
// Default border color
|
2347
|
+
flipX: e.flipX || !1,
|
2348
|
+
flipY: e.flipY || !1,
|
2349
|
+
rotate: e.rotate || "0deg",
|
2350
|
+
visibility: e.visibility || "visible",
|
2351
|
+
backgroundColor: e.backgroundColor || "#808080",
|
2352
|
+
boxShadow: e.boxShadow || rr,
|
2353
|
+
// Default box shadow
|
2354
|
+
blur: e.blur || 0,
|
2355
|
+
brightness: e.brightness || 100
|
2356
|
+
},
|
2357
|
+
metadata: t.metadata || {}
|
2358
|
+
};
|
2359
|
+
}, ks = async (t, r) => {
|
2360
|
+
const e = t.details, s = await ze(e.src), a = pt(r, s);
|
2302
2361
|
return {
|
2303
2362
|
id: t.id,
|
2304
2363
|
type: "image",
|
2305
2364
|
name: "image",
|
2306
|
-
display:
|
2365
|
+
display: yt(t.display),
|
2307
2366
|
playbackRate: t.playbackRate || 1,
|
2308
2367
|
details: {
|
2309
2368
|
src: e.src || "",
|
@@ -2320,7 +2379,7 @@ const ms = async (t, r) => {
|
|
2320
2379
|
// Default border
|
2321
2380
|
borderRadius: e.borderRadius || 0,
|
2322
2381
|
// Default border radius
|
2323
|
-
boxShadow: e.boxShadow ||
|
2382
|
+
boxShadow: e.boxShadow || rr,
|
2324
2383
|
// Default box shadow
|
2325
2384
|
top: e.top || a.top || "0px",
|
2326
2385
|
// Default top
|
@@ -2339,15 +2398,15 @@ const ms = async (t, r) => {
|
|
2339
2398
|
},
|
2340
2399
|
metadata: t.metadata || {}
|
2341
2400
|
};
|
2342
|
-
},
|
2401
|
+
}, _s = async (t, r) => {
|
2343
2402
|
const e = t;
|
2344
|
-
e.details.fontUrl && await
|
2403
|
+
e.details.fontUrl && await er([
|
2345
2404
|
{
|
2346
2405
|
fontFamily: e.details.fontFamily,
|
2347
2406
|
url: e.details.fontUrl
|
2348
2407
|
}
|
2349
2408
|
]);
|
2350
|
-
const s = e.id, a = e.details, o =
|
2409
|
+
const s = e.id, a = e.details, o = Ss(a), u = fs(e.details.text, o), c = pt(r, {
|
2351
2410
|
width: o.width,
|
2352
2411
|
height: u
|
2353
2412
|
});
|
@@ -2355,7 +2414,7 @@ const ms = async (t, r) => {
|
|
2355
2414
|
id: s,
|
2356
2415
|
name: "caption",
|
2357
2416
|
type: "caption",
|
2358
|
-
display:
|
2417
|
+
display: yt(e.display),
|
2359
2418
|
details: {
|
2360
2419
|
...o,
|
2361
2420
|
text: a.text || "",
|
@@ -2367,7 +2426,7 @@ const ms = async (t, r) => {
|
|
2367
2426
|
left: o.left || c.left,
|
2368
2427
|
borderWidth: a.borderWidth || 0,
|
2369
2428
|
borderColor: a.borderColor || "#000000",
|
2370
|
-
boxShadow: a.boxShadow ||
|
2429
|
+
boxShadow: a.boxShadow || rr,
|
2371
2430
|
words: a.words || [],
|
2372
2431
|
appearedColor: a.appearedColor || a.color,
|
2373
2432
|
activeColor: a.activeColor || a.color,
|
@@ -2375,14 +2434,14 @@ const ms = async (t, r) => {
|
|
2375
2434
|
},
|
2376
2435
|
metadata: t.metadata || {}
|
2377
2436
|
};
|
2378
|
-
},
|
2379
|
-
t.details.fontUrl && await
|
2437
|
+
}, vs = async (t, r) => {
|
2438
|
+
t.details.fontUrl && await er([
|
2380
2439
|
{
|
2381
2440
|
fontFamily: t.details.fontFamily,
|
2382
2441
|
url: t.details.fontUrl
|
2383
2442
|
}
|
2384
2443
|
]);
|
2385
|
-
const e = t.id, s = t.details, a =
|
2444
|
+
const e = t.id, s = t.details, a = Ss(s), o = fs(t.details.text, a), u = pt(r, {
|
2386
2445
|
width: a.width,
|
2387
2446
|
height: o
|
2388
2447
|
});
|
@@ -2390,7 +2449,7 @@ const ms = async (t, r) => {
|
|
2390
2449
|
id: e,
|
2391
2450
|
name: "text",
|
2392
2451
|
type: "text",
|
2393
|
-
display:
|
2452
|
+
display: yt(t.display),
|
2394
2453
|
details: {
|
2395
2454
|
...a,
|
2396
2455
|
text: s.text || "",
|
@@ -2402,11 +2461,11 @@ const ms = async (t, r) => {
|
|
2402
2461
|
left: a.left || u.left,
|
2403
2462
|
borderWidth: s.borderWidth || 0,
|
2404
2463
|
borderColor: s.borderColor || "#000000",
|
2405
|
-
boxShadow: s.boxShadow ||
|
2464
|
+
boxShadow: s.boxShadow || rr
|
2406
2465
|
},
|
2407
2466
|
metadata: {}
|
2408
2467
|
};
|
2409
|
-
},
|
2468
|
+
}, Ss = (t) => ({
|
2410
2469
|
fontFamily: t.fontFamily || "Arial",
|
2411
2470
|
// Default font family
|
2412
2471
|
fontSize: t.fontSize || "16px",
|
@@ -2450,18 +2509,18 @@ const ms = async (t, r) => {
|
|
2450
2509
|
transform: t.transform || "none",
|
2451
2510
|
skewX: t.skewX || 0,
|
2452
2511
|
skewY: t.skewY || 0
|
2453
|
-
}),
|
2512
|
+
}), qa = async (t, r) => {
|
2454
2513
|
switch (t.type) {
|
2455
2514
|
case "video":
|
2456
|
-
return
|
2515
|
+
return Is(t, r || {});
|
2457
2516
|
case "audio":
|
2458
|
-
return
|
2517
|
+
return gs(t);
|
2459
2518
|
case "image":
|
2460
|
-
return
|
2519
|
+
return ks(t, r || {});
|
2461
2520
|
case "text":
|
2462
|
-
return
|
2521
|
+
return vs(t, r || {});
|
2463
2522
|
case "caption":
|
2464
|
-
return
|
2523
|
+
return _s(t, r || {});
|
2465
2524
|
case "template":
|
2466
2525
|
return ys(t, {
|
2467
2526
|
size: r == null ? void 0 : r.size
|
@@ -2470,13 +2529,13 @@ const ms = async (t, r) => {
|
|
2470
2529
|
throw new Error("Unsupported track item");
|
2471
2530
|
}
|
2472
2531
|
};
|
2473
|
-
function
|
2532
|
+
function ws(t, r) {
|
2474
2533
|
return r.some(
|
2475
2534
|
(e) => t.some((s) => s.id === e.id)
|
2476
2535
|
);
|
2477
2536
|
}
|
2478
|
-
const
|
2479
|
-
id:
|
2537
|
+
const Ms = (t = [], r = []) => t.length === 0 ? r.map((s) => ({
|
2538
|
+
id: de(),
|
2480
2539
|
items: [s.id],
|
2481
2540
|
type: s.type,
|
2482
2541
|
accepts: ["text", "image", "video", "audio", "caption", "template"]
|
@@ -2487,9 +2546,9 @@ const ws = (t = [], r = []) => t.length === 0 ? r.map((s) => ({
|
|
2487
2546
|
type: e.type || "text",
|
2488
2547
|
magnetic: e.magnetic || !1,
|
2489
2548
|
static: e.static || !1,
|
2490
|
-
id: e.id ||
|
2549
|
+
id: e.id || de()
|
2491
2550
|
}));
|
2492
|
-
async function
|
2551
|
+
async function Za(t, r) {
|
2493
2552
|
var c, p, h;
|
2494
2553
|
const e = r.trackItemsMap, s = r.trackItemDetailsMap, a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
2495
2554
|
for (const k in s) {
|
@@ -2527,28 +2586,28 @@ async function Ka(t, r) {
|
|
2527
2586
|
});
|
2528
2587
|
}
|
2529
2588
|
}
|
2530
|
-
a.size > 0 && await
|
2589
|
+
a.size > 0 && await er(
|
2531
2590
|
Array.from(a).map((k) => JSON.parse(k))
|
2532
2591
|
);
|
2533
2592
|
for (const [k, m] of o) {
|
2534
|
-
const f = await
|
2593
|
+
const f = await bs(
|
2535
2594
|
{ ...m.trackItem, details: m.details },
|
2536
2595
|
{
|
2537
2596
|
size: { width: m.details.width, height: m.details.height }
|
2538
2597
|
}
|
2539
|
-
), I =
|
2598
|
+
), I = ps(
|
2540
2599
|
f.details.svgString,
|
2541
2600
|
m.details.colorMap
|
2542
2601
|
);
|
2543
2602
|
f.details.svgString = I, s[k].details = f.details, e[k] = f;
|
2544
2603
|
}
|
2545
|
-
const u =
|
2604
|
+
const u = J(e);
|
2546
2605
|
return {
|
2547
2606
|
...r,
|
2548
2607
|
duration: u
|
2549
2608
|
};
|
2550
2609
|
}
|
2551
|
-
function
|
2610
|
+
function Qa(t) {
|
2552
2611
|
const r = x(t);
|
2553
2612
|
if (!r.activeIds.length) return;
|
2554
2613
|
const e = r.activeIds, s = [], a = {
|
@@ -2563,13 +2622,13 @@ function Va(t) {
|
|
2563
2622
|
const o = /* @__PURE__ */ new Set();
|
2564
2623
|
s.filter((u) => o.has(u.id) ? !1 : (o.add(u.id), !0)), a.tracks = Array.from(o), localStorage.setItem("DesignComboTemp", JSON.stringify(a));
|
2565
2624
|
}
|
2566
|
-
function
|
2625
|
+
function ti(t, r) {
|
2567
2626
|
const e = x(t);
|
2568
2627
|
if (e.activeIds.length !== 1) return {};
|
2569
2628
|
const s = e.activeIds[0], a = x(e.trackItemsMap[s]);
|
2570
2629
|
if (r >= a.display.to || r <= a.display.from)
|
2571
2630
|
return {};
|
2572
|
-
const o = x(e.trackItemDetailsMap[s]), u =
|
2631
|
+
const o = x(e.trackItemDetailsMap[s]), u = de(), c = {
|
2573
2632
|
...a,
|
2574
2633
|
display: {
|
2575
2634
|
from: a.display.from,
|
@@ -2638,7 +2697,7 @@ function Ja(t, r) {
|
|
2638
2697
|
transitionIds: e.transitionIds
|
2639
2698
|
};
|
2640
2699
|
}
|
2641
|
-
async function
|
2700
|
+
async function ei(t, r) {
|
2642
2701
|
const e = x(t), s = e.trackItemDetailsMap, a = e.trackItemsMap, o = Object.keys(r);
|
2643
2702
|
if (!o.length) return {};
|
2644
2703
|
for (const c of o) {
|
@@ -2647,7 +2706,7 @@ async function qa(t, r) {
|
|
2647
2706
|
...s[c].details,
|
2648
2707
|
...p.details
|
2649
2708
|
}, p.details.colorMap)) {
|
2650
|
-
const h = s[c].details.initialSvgString, k =
|
2709
|
+
const h = s[c].details.initialSvgString, k = ps(
|
2651
2710
|
h,
|
2652
2711
|
p.details.colorMap
|
2653
2712
|
);
|
@@ -2671,22 +2730,22 @@ async function qa(t, r) {
|
|
2671
2730
|
for (const c of o) {
|
2672
2731
|
const p = r[c];
|
2673
2732
|
if (a[c].type === "shape" && p.details.src) {
|
2674
|
-
const h = await
|
2733
|
+
const h = await ze(p.details.src);
|
2675
2734
|
s[c].details.width = h.width, s[c].details.height = h.height;
|
2676
2735
|
}
|
2677
2736
|
}
|
2678
|
-
const u =
|
2737
|
+
const u = J(a);
|
2679
2738
|
return {
|
2680
2739
|
trackItemDetailsMap: { ...s },
|
2681
2740
|
trackItemsMap: { ...a },
|
2682
2741
|
duration: u
|
2683
2742
|
};
|
2684
2743
|
}
|
2685
|
-
async function
|
2744
|
+
async function ri(t, r) {
|
2686
2745
|
const e = x(t), s = Object.keys(r)[0], a = Object.values(r)[0], o = e.trackItemDetailsMap[s], u = o.details;
|
2687
2746
|
if (!a.details.src) return {};
|
2688
2747
|
if (o.type === "image") {
|
2689
|
-
const p = await
|
2748
|
+
const p = await ze(a.details.src), h = o.details.width || 0, k = o.details.height || 0;
|
2690
2749
|
let m = p.width, f = p.height;
|
2691
2750
|
const I = p.width / p.height;
|
2692
2751
|
h / k > I ? (m = h, f = h / I) : (f = k, m = k * I), u.crop = {
|
@@ -2696,7 +2755,7 @@ async function Za(t, r) {
|
|
2696
2755
|
width: u.width
|
2697
2756
|
}, a.details.width = m, a.details.height = f;
|
2698
2757
|
} else if (o.type === "video") {
|
2699
|
-
const p = await
|
2758
|
+
const p = await Cn(a.details.src), h = o.details.width || 0, k = o.details.height || 0;
|
2700
2759
|
let m = p.width, f = p.height;
|
2701
2760
|
const I = p.width / p.height;
|
2702
2761
|
h / k > I ? (m = h, f = h / I) : (f = k, m = k * I), u.crop = {
|
@@ -2720,18 +2779,18 @@ async function Za(t, r) {
|
|
2720
2779
|
}
|
2721
2780
|
};
|
2722
2781
|
}
|
2723
|
-
function
|
2782
|
+
function ni(t, r) {
|
2724
2783
|
const e = x(t);
|
2725
2784
|
return e.background.value = r.value, e.background.type = r.type || "color", {
|
2726
2785
|
...e
|
2727
2786
|
};
|
2728
2787
|
}
|
2729
|
-
async function
|
2788
|
+
async function si(t, r, e = {}) {
|
2730
2789
|
const s = x(t), a = r.trackItems.map(
|
2731
|
-
(b) =>
|
2790
|
+
(b) => qa(b, {
|
2732
2791
|
size: s.size
|
2733
2792
|
})
|
2734
|
-
), o = await Promise.all(a), u =
|
2793
|
+
), o = await Promise.all(a), u = Ms(r.tracks, r.trackItems), c = [], p = o.map((b) => b.id);
|
2735
2794
|
r.trackItems.forEach((b) => {
|
2736
2795
|
if (b.type !== "template") return;
|
2737
2796
|
s.trackItemsMap = {
|
@@ -2754,18 +2813,18 @@ async function ti(t, r, e = {}) {
|
|
2754
2813
|
});
|
2755
2814
|
const h = [], k = {}, m = {};
|
2756
2815
|
if (o.forEach((b) => {
|
2757
|
-
const { details: _, ...
|
2816
|
+
const { details: _, ...T } = b;
|
2758
2817
|
h.push(b.id), k[b.id] = {
|
2759
2818
|
type: b.type,
|
2760
2819
|
details: _
|
2761
|
-
}, m[b.id] =
|
2762
|
-
}),
|
2820
|
+
}, m[b.id] = T;
|
2821
|
+
}), ws(
|
2763
2822
|
s.tracks,
|
2764
2823
|
u
|
2765
2824
|
))
|
2766
2825
|
s.tracks.forEach((b) => {
|
2767
2826
|
u.forEach((_) => {
|
2768
|
-
b.id === _.id && (b.magnetic &&
|
2827
|
+
b.id === _.id && (b.magnetic && st(
|
2769
2828
|
[b],
|
2770
2829
|
s.trackItemsMap,
|
2771
2830
|
p
|
@@ -2790,7 +2849,7 @@ async function ti(t, r, e = {}) {
|
|
2790
2849
|
...h
|
2791
2850
|
], s.structure = [...s.structure, ...c];
|
2792
2851
|
const I = s.tracks.filter((b) => b.magnetic);
|
2793
|
-
return
|
2852
|
+
return st(I, s.trackItemsMap, p), s.duration = J(s.trackItemsMap), {
|
2794
2853
|
trackItemIds: s.trackItemIds,
|
2795
2854
|
trackItemDetailsMap: s.trackItemDetailsMap,
|
2796
2855
|
trackItemsMap: s.trackItemsMap,
|
@@ -2801,7 +2860,7 @@ async function ti(t, r, e = {}) {
|
|
2801
2860
|
transitionsMap: s.transitionsMap
|
2802
2861
|
};
|
2803
2862
|
}
|
2804
|
-
function
|
2863
|
+
function St(t, r, e = {}) {
|
2805
2864
|
const s = r.map((c) => c.id), a = [], o = {}, u = {};
|
2806
2865
|
if (r.forEach((c) => {
|
2807
2866
|
const { details: p, ...h } = c;
|
@@ -2817,7 +2876,7 @@ function Ot(t, r, e = {}) {
|
|
2817
2876
|
h.items.push(...a);
|
2818
2877
|
} else {
|
2819
2878
|
const c = {
|
2820
|
-
id:
|
2879
|
+
id: ls(),
|
2821
2880
|
accepts: Object.keys(t.acceptsMap),
|
2822
2881
|
type: r[0].type,
|
2823
2882
|
items: s,
|
@@ -2837,15 +2896,15 @@ function Ot(t, r, e = {}) {
|
|
2837
2896
|
...a
|
2838
2897
|
], t;
|
2839
2898
|
}
|
2840
|
-
async function
|
2899
|
+
async function ai(t, r, e = {}) {
|
2841
2900
|
const s = x(t), a = [
|
2842
|
-
|
2901
|
+
ks(r, {
|
2843
2902
|
size: s.size,
|
2844
2903
|
scaleMode: e.scaleMode,
|
2845
2904
|
scaleAspectRatio: e.scaleAspectRatio
|
2846
2905
|
})
|
2847
|
-
], o = await Promise.all(a), u = o.map((h) => h.id), c =
|
2848
|
-
return
|
2906
|
+
], o = await Promise.all(a), u = o.map((h) => h.id), c = St(s, o, e), p = c.tracks.filter((h) => h.magnetic);
|
2907
|
+
return st(p, c.trackItemsMap, u), c.duration = J(c.trackItemsMap), {
|
2849
2908
|
trackItemIds: c.trackItemIds,
|
2850
2909
|
trackItemDetailsMap: c.trackItemDetailsMap,
|
2851
2910
|
trackItemsMap: c.trackItemsMap,
|
@@ -2853,11 +2912,11 @@ async function ei(t, r, e = {}) {
|
|
2853
2912
|
duration: c.duration
|
2854
2913
|
};
|
2855
2914
|
}
|
2856
|
-
async function
|
2857
|
-
const s = x(t), a = [
|
2858
|
-
c.duration =
|
2915
|
+
async function ii(t, r, e = {}) {
|
2916
|
+
const s = x(t), a = [gs(r)], o = await Promise.all(a), u = o.map((h) => h.id), c = St(s, o, e);
|
2917
|
+
c.duration = J(c.trackItemsMap);
|
2859
2918
|
const p = c.tracks.filter((h) => h.magnetic);
|
2860
|
-
return
|
2919
|
+
return st(p, c.trackItemsMap, u), {
|
2861
2920
|
trackItemIds: c.trackItemIds,
|
2862
2921
|
trackItemDetailsMap: c.trackItemDetailsMap,
|
2863
2922
|
trackItemsMap: c.trackItemsMap,
|
@@ -2865,17 +2924,17 @@ async function ri(t, r, e = {}) {
|
|
2865
2924
|
duration: c.duration
|
2866
2925
|
};
|
2867
2926
|
}
|
2868
|
-
async function
|
2927
|
+
async function oi(t, r, e = {}) {
|
2869
2928
|
const s = x(t), a = [
|
2870
|
-
|
2929
|
+
Is(r, {
|
2871
2930
|
size: s.size,
|
2872
2931
|
scaleMode: e.scaleMode,
|
2873
2932
|
scaleAspectRatio: e.scaleAspectRatio
|
2874
2933
|
})
|
2875
|
-
], o = await Promise.all(a), u = o.map((h) => h.id), c =
|
2876
|
-
c.duration =
|
2934
|
+
], o = await Promise.all(a), u = o.map((h) => h.id), c = St(s, o, e);
|
2935
|
+
c.duration = J(c.trackItemsMap);
|
2877
2936
|
const p = c.tracks.filter((h) => h.magnetic);
|
2878
|
-
return
|
2937
|
+
return st(p, c.trackItemsMap, u), {
|
2879
2938
|
trackItemIds: c.trackItemIds,
|
2880
2939
|
trackItemDetailsMap: c.trackItemDetailsMap,
|
2881
2940
|
trackItemsMap: c.trackItemsMap,
|
@@ -2883,15 +2942,15 @@ async function ni(t, r, e = {}) {
|
|
2883
2942
|
duration: c.duration
|
2884
2943
|
};
|
2885
2944
|
}
|
2886
|
-
async function
|
2945
|
+
async function ci(t, r, e = {}) {
|
2887
2946
|
const s = x(t), a = [
|
2888
|
-
|
2947
|
+
vs(r, {
|
2889
2948
|
size: e.size
|
2890
2949
|
})
|
2891
|
-
], o = await Promise.all(a), u = o.map((h) => h.id), c =
|
2892
|
-
c.duration =
|
2950
|
+
], o = await Promise.all(a), u = o.map((h) => h.id), c = St(s, o, e);
|
2951
|
+
c.duration = J(c.trackItemsMap);
|
2893
2952
|
const p = c.tracks.filter((h) => h.magnetic);
|
2894
|
-
return
|
2953
|
+
return st(p, c.trackItemsMap, u), {
|
2895
2954
|
trackItemIds: c.trackItemIds,
|
2896
2955
|
trackItemDetailsMap: c.trackItemDetailsMap,
|
2897
2956
|
trackItemsMap: c.trackItemsMap,
|
@@ -2899,17 +2958,17 @@ async function si(t, r, e = {}) {
|
|
2899
2958
|
duration: c.duration
|
2900
2959
|
};
|
2901
2960
|
}
|
2902
|
-
async function
|
2961
|
+
async function ui(t, r, e = {}) {
|
2903
2962
|
const s = x(t), a = [
|
2904
|
-
|
2963
|
+
Va(r, {
|
2905
2964
|
size: s.size,
|
2906
2965
|
scaleMode: e.scaleMode,
|
2907
2966
|
scaleAspectRatio: e.scaleAspectRatio
|
2908
2967
|
})
|
2909
|
-
], o = await Promise.all(a), u = o.map((h) => h.id), c =
|
2910
|
-
c.duration =
|
2968
|
+
], o = await Promise.all(a), u = o.map((h) => h.id), c = St(s, o, e);
|
2969
|
+
c.duration = J(c.trackItemsMap);
|
2911
2970
|
const p = c.tracks.filter((h) => h.magnetic);
|
2912
|
-
return
|
2971
|
+
return st(p, c.trackItemsMap, u), {
|
2913
2972
|
trackItemIds: c.trackItemIds,
|
2914
2973
|
trackItemDetailsMap: c.trackItemDetailsMap,
|
2915
2974
|
trackItemsMap: c.trackItemsMap,
|
@@ -2917,17 +2976,17 @@ async function ai(t, r, e = {}) {
|
|
2917
2976
|
duration: c.duration
|
2918
2977
|
};
|
2919
2978
|
}
|
2920
|
-
async function
|
2979
|
+
async function li(t, r, e = {}) {
|
2921
2980
|
const s = x(t), a = [
|
2922
|
-
|
2981
|
+
bs(r, {
|
2923
2982
|
size: s.size,
|
2924
2983
|
scaleMode: e.scaleMode,
|
2925
2984
|
scaleAspectRatio: e.scaleAspectRatio
|
2926
2985
|
})
|
2927
|
-
], o = await Promise.all(a), u = o.map((h) => h.id), c =
|
2928
|
-
c.duration =
|
2986
|
+
], o = await Promise.all(a), u = o.map((h) => h.id), c = St(s, o, e);
|
2987
|
+
c.duration = J(c.trackItemsMap);
|
2929
2988
|
const p = c.tracks.filter((h) => h.magnetic);
|
2930
|
-
return
|
2989
|
+
return st(p, c.trackItemsMap, u), {
|
2931
2990
|
trackItemIds: c.trackItemIds,
|
2932
2991
|
trackItemDetailsMap: c.trackItemDetailsMap,
|
2933
2992
|
trackItemsMap: c.trackItemsMap,
|
@@ -2935,8 +2994,8 @@ async function ii(t, r, e = {}) {
|
|
2935
2994
|
duration: c.duration
|
2936
2995
|
};
|
2937
2996
|
}
|
2938
|
-
async function
|
2939
|
-
const s = x(t), a = "composition", o = r.trackItemsMap, u = r.trackItemDetailsMap, c = r.trackItemIds, p = r.tracks || [], { details: h, ...k } = await
|
2997
|
+
async function di(t, r, e = {}) {
|
2998
|
+
const s = x(t), a = "composition", o = r.trackItemsMap, u = r.trackItemDetailsMap, c = r.trackItemIds, p = r.tracks || [], { details: h, ...k } = await Ka(r, {
|
2940
2999
|
size: s.size,
|
2941
3000
|
scaleMode: e.scaleMode,
|
2942
3001
|
scaleAspectRatio: e.scaleAspectRatio
|
@@ -2949,7 +3008,7 @@ async function oi(t, r, e = {}) {
|
|
2949
3008
|
...k,
|
2950
3009
|
type: a,
|
2951
3010
|
details: h
|
2952
|
-
}], b =
|
3011
|
+
}], b = St(s, I, e);
|
2953
3012
|
b.trackItemDetailsMap[k.id] = {
|
2954
3013
|
type: a,
|
2955
3014
|
details: h
|
@@ -2966,9 +3025,9 @@ async function oi(t, r, e = {}) {
|
|
2966
3025
|
type: a,
|
2967
3026
|
details: h
|
2968
3027
|
}
|
2969
|
-
}, b.structure = [...b.structure, m], b.duration =
|
2970
|
-
const _ = b.tracks.filter((
|
2971
|
-
return
|
3028
|
+
}, b.structure = [...b.structure, m], b.duration = J(b.trackItemsMap);
|
3029
|
+
const _ = b.tracks.filter((T) => T.magnetic);
|
3030
|
+
return st(_, b.trackItemsMap, [k.id]), {
|
2972
3031
|
trackItemIds: b.trackItemIds,
|
2973
3032
|
trackItemDetailsMap: b.trackItemDetailsMap,
|
2974
3033
|
trackItemsMap: b.trackItemsMap,
|
@@ -2977,40 +3036,52 @@ async function oi(t, r, e = {}) {
|
|
2977
3036
|
structure: b.structure
|
2978
3037
|
};
|
2979
3038
|
}
|
2980
|
-
async function
|
3039
|
+
async function Pe(t, r, e = {}, s) {
|
2981
3040
|
const a = x(t), o = (m) => m.display ? m.display : {
|
2982
3041
|
from: 0,
|
2983
3042
|
to: a.duration
|
2984
3043
|
}, u = [];
|
2985
3044
|
s === "progress-bar" && u.push(
|
2986
|
-
|
3045
|
+
Ga(r, {
|
2987
3046
|
size: a.size,
|
2988
3047
|
scaleMode: e.scaleMode,
|
2989
3048
|
scaleAspectRatio: e.scaleAspectRatio
|
2990
3049
|
})
|
2991
3050
|
), s === "progress-frame" && u.push(
|
2992
|
-
|
3051
|
+
Ya(r, {
|
2993
3052
|
size: a.size,
|
2994
3053
|
scaleMode: e.scaleMode,
|
2995
3054
|
scaleAspectRatio: e.scaleAspectRatio
|
2996
3055
|
})
|
2997
3056
|
), s === "radial-audio-bars" && (r.display = o(r), u.push(
|
2998
|
-
|
3057
|
+
Xa(r, {
|
2999
3058
|
size: a.size,
|
3000
3059
|
scaleMode: e.scaleMode,
|
3001
3060
|
scaleAspectRatio: e.scaleAspectRatio
|
3002
3061
|
})
|
3003
3062
|
)), s === "lineal-audio-bars" && (r.display = o(r), u.push(
|
3004
|
-
|
3063
|
+
hn(r, {
|
3064
|
+
size: a.size,
|
3065
|
+
scaleMode: e.scaleMode,
|
3066
|
+
scaleAspectRatio: e.scaleAspectRatio
|
3067
|
+
})
|
3068
|
+
)), s === "wave-audio-bars" && (r.display = o(r), u.push(
|
3069
|
+
hn(r, {
|
3070
|
+
size: a.size,
|
3071
|
+
scaleMode: e.scaleMode,
|
3072
|
+
scaleAspectRatio: e.scaleAspectRatio
|
3073
|
+
})
|
3074
|
+
)), s === "hill-audio-bars" && (r.display = o(r), u.push(
|
3075
|
+
hn(r, {
|
3005
3076
|
size: a.size,
|
3006
3077
|
scaleMode: e.scaleMode,
|
3007
3078
|
scaleAspectRatio: e.scaleAspectRatio
|
3008
3079
|
})
|
3009
3080
|
));
|
3010
|
-
const c = await Promise.all(u), p = c.map((m) => m.id), h =
|
3011
|
-
h.duration =
|
3081
|
+
const c = await Promise.all(u), p = c.map((m) => m.id), h = St(a, c, e);
|
3082
|
+
h.duration = J(h.trackItemsMap);
|
3012
3083
|
const k = h.tracks.filter((m) => m.magnetic);
|
3013
|
-
return
|
3084
|
+
return st(k, h.trackItemsMap, p), {
|
3014
3085
|
trackItemIds: h.trackItemIds,
|
3015
3086
|
trackItemDetailsMap: h.trackItemDetailsMap,
|
3016
3087
|
trackItemsMap: h.trackItemsMap,
|
@@ -3018,7 +3089,7 @@ async function yr(t, r, e = {}, s) {
|
|
3018
3089
|
duration: h.duration
|
3019
3090
|
};
|
3020
3091
|
}
|
3021
|
-
async function
|
3092
|
+
async function fi(t, r, e = {}) {
|
3022
3093
|
const s = x(t), a = "template", o = r.trackItemsMap, u = r.trackItemDetailsMap, c = r.trackItemIds, p = r.transitionsMap, h = r.transitionIds || [], k = r.tracks || [], m = r.structure || [], { details: f, ...I } = await ys(r, {
|
3023
3094
|
size: s.size,
|
3024
3095
|
scaleMode: e.scaleMode,
|
@@ -3028,11 +3099,11 @@ async function ci(t, r, e = {}) {
|
|
3028
3099
|
items: c,
|
3029
3100
|
transitions: h,
|
3030
3101
|
tracks: k
|
3031
|
-
},
|
3102
|
+
}, T = [{
|
3032
3103
|
...I,
|
3033
3104
|
type: a,
|
3034
3105
|
details: f
|
3035
|
-
}], d =
|
3106
|
+
}], d = St(s, T, e);
|
3036
3107
|
d.trackItemDetailsMap[I.id] = {
|
3037
3108
|
type: a,
|
3038
3109
|
details: f
|
@@ -3059,9 +3130,9 @@ async function ci(t, r, e = {}) {
|
|
3059
3130
|
...d.structure,
|
3060
3131
|
b,
|
3061
3132
|
...m
|
3062
|
-
], d.duration =
|
3133
|
+
], d.duration = J(d.trackItemsMap);
|
3063
3134
|
const v = d.tracks.filter((S) => S.magnetic);
|
3064
|
-
return
|
3135
|
+
return st(v, d.trackItemsMap, [I.id]), {
|
3065
3136
|
trackItemIds: d.trackItemIds,
|
3066
3137
|
trackItemDetailsMap: d.trackItemDetailsMap,
|
3067
3138
|
trackItemsMap: d.trackItemsMap,
|
@@ -3071,25 +3142,25 @@ async function ci(t, r, e = {}) {
|
|
3071
3142
|
transitionsMap: d.transitionsMap
|
3072
3143
|
};
|
3073
3144
|
}
|
3074
|
-
async function
|
3145
|
+
async function pi(t, r, e = {}) {
|
3075
3146
|
const s = x(t), a = r.trackItems.map(
|
3076
|
-
(f) =>
|
3147
|
+
(f) => _s(f, {
|
3077
3148
|
size: e.size
|
3078
3149
|
})
|
3079
|
-
), o = await Promise.all(a), u =
|
3150
|
+
), o = await Promise.all(a), u = Ms(r.tracks, r.trackItems), c = [], p = {}, h = {};
|
3080
3151
|
if (o.forEach((f) => {
|
3081
3152
|
const { details: I, ...b } = f;
|
3082
3153
|
c.push(f.id), p[f.id] = {
|
3083
3154
|
type: f.type,
|
3084
3155
|
details: I
|
3085
3156
|
}, h[f.id] = b;
|
3086
|
-
}),
|
3157
|
+
}), ws(
|
3087
3158
|
s.tracks,
|
3088
3159
|
u
|
3089
3160
|
))
|
3090
3161
|
s.tracks.forEach((f) => {
|
3091
3162
|
u.forEach((I) => {
|
3092
|
-
f.id === I.id && (f.magnetic &&
|
3163
|
+
f.id === I.id && (f.magnetic && st(
|
3093
3164
|
[f],
|
3094
3165
|
s.trackItemsMap,
|
3095
3166
|
c
|
@@ -3112,9 +3183,9 @@ async function ui(t, r, e = {}) {
|
|
3112
3183
|
}, s.trackItemIds = [
|
3113
3184
|
...s.trackItemIds,
|
3114
3185
|
...c
|
3115
|
-
], s.duration =
|
3186
|
+
], s.duration = J(s.trackItemsMap);
|
3116
3187
|
const m = s.tracks.filter((f) => f.magnetic);
|
3117
|
-
return
|
3188
|
+
return st(
|
3118
3189
|
m,
|
3119
3190
|
s.trackItemsMap,
|
3120
3191
|
c
|
@@ -3126,7 +3197,7 @@ async function ui(t, r, e = {}) {
|
|
3126
3197
|
duration: s.duration
|
3127
3198
|
};
|
3128
3199
|
}
|
3129
|
-
async function
|
3200
|
+
async function hi(t, r) {
|
3130
3201
|
const e = x(t), s = e.trackItemsMap[r.id], a = [];
|
3131
3202
|
if (!s) return {};
|
3132
3203
|
let o = s.animations || {};
|
@@ -3145,49 +3216,67 @@ async function li(t, r) {
|
|
3145
3216
|
var c;
|
3146
3217
|
(c = u.details) != null && c.fonts && a.push(...u.details.fonts);
|
3147
3218
|
}
|
3148
|
-
), a.length > 0 && await
|
3219
|
+
), a.length > 0 && await er(a), o.in && r.animations.in ? o.in = r.animations.in : o.out && r.animations.out ? o.out = r.animations.out : o.loop && r.animations.loop ? o.loop = r.animations.loop : !o.out && r.animations.out ? o.out = r.animations.out : !o.in && r.animations.in ? o.in = r.animations.in : !o.loop && r.animations.loop ? o.loop = r.animations.loop : o = r.animations, s.animations = o, {
|
3149
3220
|
trackItemsMap: e.trackItemsMap
|
3150
3221
|
};
|
3151
3222
|
}
|
3152
|
-
function
|
3153
|
-
const
|
3154
|
-
|
3155
|
-
|
3156
|
-
|
3157
|
-
|
3158
|
-
|
3159
|
-
|
3160
|
-
|
3161
|
-
|
3162
|
-
|
3163
|
-
|
3164
|
-
|
3165
|
-
|
3166
|
-
|
3167
|
-
|
3168
|
-
|
3223
|
+
async function mi(t, r, e = {}) {
|
3224
|
+
const s = x(t), a = [
|
3225
|
+
Ja(r, {
|
3226
|
+
size: s.size,
|
3227
|
+
scaleMode: e.scaleMode,
|
3228
|
+
scaleAspectRatio: e.scaleAspectRatio
|
3229
|
+
})
|
3230
|
+
], o = await Promise.all(a), u = o.map((h) => h.id), c = St(s, o, e);
|
3231
|
+
c.duration = J(c.trackItemsMap);
|
3232
|
+
const p = c.tracks.filter((h) => h.magnetic);
|
3233
|
+
return st(p, c.trackItemsMap, u), {
|
3234
|
+
trackItemIds: c.trackItemIds,
|
3235
|
+
trackItemDetailsMap: c.trackItemDetailsMap,
|
3236
|
+
trackItemsMap: c.trackItemsMap,
|
3237
|
+
tracks: c.tracks,
|
3238
|
+
duration: c.duration
|
3239
|
+
};
|
3240
|
+
}
|
3241
|
+
function Ii(t) {
|
3242
|
+
const r = Wt.pipe(
|
3243
|
+
Bt(({ key: d }) => d.startsWith(Gn))
|
3244
|
+
), e = Wt.pipe(
|
3245
|
+
Bt(({ key: d }) => d.startsWith(On))
|
3246
|
+
), s = Wt.pipe(
|
3247
|
+
Bt(({ key: d }) => d.startsWith(H))
|
3248
|
+
), a = Wt.pipe(
|
3249
|
+
Bt(({ key: d }) => d.startsWith(et))
|
3250
|
+
), o = Wt.pipe(
|
3251
|
+
Bt(({ key: d }) => d.startsWith(Tr))
|
3252
|
+
), u = Wt.pipe(
|
3253
|
+
Bt(({ key: d }) => d.startsWith(Re))
|
3254
|
+
), c = Wt.pipe(
|
3255
|
+
Bt(({ key: d }) => d.startsWith(Yt))
|
3256
|
+
), p = Wt.pipe(
|
3257
|
+
Bt(({ key: d }) => d.startsWith(us))
|
3169
3258
|
), h = r.subscribe(async (d) => {
|
3170
3259
|
var v;
|
3171
|
-
if (d.key ===
|
3260
|
+
if (d.key === Gn) {
|
3172
3261
|
const { actions: S } = (v = d.value) == null ? void 0 : v.payload;
|
3173
|
-
S.forEach((
|
3174
|
-
|
3262
|
+
S.forEach((y) => {
|
3263
|
+
$s(y.type, y.payload && { payload: y.payload });
|
3175
3264
|
});
|
3176
3265
|
}
|
3177
3266
|
}), k = e.subscribe(async (d) => {
|
3178
3267
|
var v, S;
|
3179
|
-
if (d.key ===
|
3180
|
-
const
|
3268
|
+
if (d.key === ta) {
|
3269
|
+
const y = (v = d.value) == null ? void 0 : v.payload, w = await Za(t.getState(), y);
|
3181
3270
|
t.updateState(w, {
|
3182
3271
|
kind: "design:load",
|
3183
3272
|
updateHistory: !1
|
3184
3273
|
});
|
3185
3274
|
}
|
3186
|
-
if (d.key ===
|
3187
|
-
const
|
3275
|
+
if (d.key === ea) {
|
3276
|
+
const y = (S = d.value) == null ? void 0 : S.payload;
|
3188
3277
|
t.updateState(
|
3189
3278
|
{
|
3190
|
-
size:
|
3279
|
+
size: y
|
3191
3280
|
},
|
3192
3281
|
{
|
3193
3282
|
kind: "design:resize",
|
@@ -3196,11 +3285,11 @@ function di(t) {
|
|
3196
3285
|
);
|
3197
3286
|
}
|
3198
3287
|
}), m = o.subscribe((d) => {
|
3199
|
-
if (d.key ===
|
3200
|
-
if (d.key ===
|
3288
|
+
if (d.key === xa) return t.undo();
|
3289
|
+
if (d.key === Oa) return t.redo();
|
3201
3290
|
}), f = p.subscribe((d) => {
|
3202
3291
|
var v;
|
3203
|
-
if (d.key ===
|
3292
|
+
if (d.key === Ca) {
|
3204
3293
|
const S = (v = d.value) == null ? void 0 : v.payload.scale;
|
3205
3294
|
t.updateState(
|
3206
3295
|
{
|
@@ -3213,139 +3302,160 @@ function di(t) {
|
|
3213
3302
|
);
|
3214
3303
|
}
|
3215
3304
|
}), I = a.subscribe(async (d) => {
|
3216
|
-
var v, S,
|
3217
|
-
if (d.key ===
|
3218
|
-
const
|
3305
|
+
var v, S, y, w;
|
3306
|
+
if (d.key === Ma) {
|
3307
|
+
const M = ((v = d.value) == null ? void 0 : v.payload.trackItemIds) || [];
|
3219
3308
|
t.updateState(
|
3220
|
-
{ activeIds:
|
3309
|
+
{ activeIds: M },
|
3221
3310
|
{
|
3222
3311
|
kind: "update",
|
3223
3312
|
updateHistory: !1
|
3224
3313
|
}
|
3225
3314
|
);
|
3226
3315
|
}
|
3227
|
-
if (d.key ===
|
3228
|
-
const
|
3229
|
-
t.updateState(
|
3316
|
+
if (d.key === Ta && Qa(t.getState()), d.key === Aa) {
|
3317
|
+
const M = (S = d.value) == null ? void 0 : S.payload.trackItemIds, E = $a(t.getState(), M);
|
3318
|
+
t.updateState(E, { updateHistory: !0, kind: "remove" });
|
3230
3319
|
}
|
3231
|
-
if (d.key ===
|
3232
|
-
const
|
3320
|
+
if (d.key === Ea) {
|
3321
|
+
const M = Ua(
|
3233
3322
|
t.getState(),
|
3234
|
-
(
|
3323
|
+
(y = d.value) == null ? void 0 : y.payload.trackItemIds
|
3235
3324
|
);
|
3236
|
-
t.updateState(
|
3325
|
+
t.updateState(M, {
|
3237
3326
|
updateHistory: !0,
|
3238
3327
|
kind: "update"
|
3239
3328
|
});
|
3240
3329
|
}
|
3241
|
-
if (d.key ===
|
3242
|
-
const
|
3243
|
-
t.updateState(
|
3330
|
+
if (d.key === Da) {
|
3331
|
+
const M = (w = d.value) == null ? void 0 : w.payload, E = await Ha(t.getState(), M);
|
3332
|
+
t.updateState(E, {
|
3244
3333
|
updateHistory: !0,
|
3245
3334
|
kind: "update:details"
|
3246
3335
|
});
|
3247
3336
|
}
|
3248
3337
|
}), b = s.subscribe(async (d) => {
|
3249
|
-
var
|
3250
|
-
const v = x(t.getState()), S = ((C = (
|
3251
|
-
let
|
3252
|
-
d.key ===
|
3253
|
-
trackIndex:
|
3254
|
-
}) : d.key ===
|
3255
|
-
trackIndex:
|
3256
|
-
}) : d.key ===
|
3257
|
-
targetTrackIndex:
|
3338
|
+
var U, C, q, L, Y, mt, O, N, at, Ie, ge, ye, z, be, ke, it, Xt, $, Kt, _e, ot, Vt, Jt, Rt, zt, qt, $t, Zt, Ft, Qt, ve, Se, wt, Lt, te, ee, lt, Mt, we, bt, Tt, Nt, rt, re, ne, Me, Ht, Et;
|
3339
|
+
const v = x(t.getState()), S = ((C = (U = d.value) == null ? void 0 : U.options) == null ? void 0 : C.isSelected) || !1, y = (L = (q = d.value) == null ? void 0 : q.options) == null ? void 0 : L.scaleMode, w = (mt = (Y = d.value) == null ? void 0 : Y.options) == null ? void 0 : mt.scaleAspectRatio, M = (N = (O = d.value) == null ? void 0 : O.options) == null ? void 0 : N.trackIndex;
|
3340
|
+
let E = {};
|
3341
|
+
d.key === ca ? E = await hi(v, (at = d.value) == null ? void 0 : at.payload) : d.key === da ? E = await si(v, (Ie = d.value) == null ? void 0 : Ie.payload, {
|
3342
|
+
trackIndex: M
|
3343
|
+
}) : d.key === ua ? E = await pi(v, (ge = d.value) == null ? void 0 : ge.payload, {
|
3344
|
+
trackIndex: M
|
3345
|
+
}) : d.key === ra ? E = await ci(v, (ye = d.value) == null ? void 0 : ye.payload, {
|
3346
|
+
targetTrackIndex: M,
|
3258
3347
|
targetTrackId: (z = d.value) == null ? void 0 : z.options.targetTrackId,
|
3259
3348
|
size: v.size
|
3260
|
-
}) : d.key ===
|
3261
|
-
scaleMode:
|
3349
|
+
}) : d.key === la ? E = await fi(v, (be = d.value) == null ? void 0 : be.payload, {
|
3350
|
+
scaleMode: y,
|
3262
3351
|
scaleAspectRatio: w,
|
3263
|
-
targetTrackIndex:
|
3264
|
-
targetTrackId: (
|
3265
|
-
}) : d.key ===
|
3266
|
-
scaleMode:
|
3352
|
+
targetTrackIndex: M,
|
3353
|
+
targetTrackId: (it = (ke = d.value) == null ? void 0 : ke.options) == null ? void 0 : it.targetTrackId
|
3354
|
+
}) : d.key === ia ? E = await li(v, (Xt = d.value) == null ? void 0 : Xt.payload, {
|
3355
|
+
scaleMode: y,
|
3267
3356
|
scaleAspectRatio: w,
|
3268
|
-
targetTrackIndex:
|
3357
|
+
targetTrackIndex: M,
|
3269
3358
|
targetTrackId: ($ = d.value) == null ? void 0 : $.options.targetTrackId
|
3270
|
-
}) : d.key ===
|
3271
|
-
scaleMode:
|
3359
|
+
}) : d.key === oa ? E = await ui(v, (Kt = d.value) == null ? void 0 : Kt.payload, {
|
3360
|
+
scaleMode: y,
|
3361
|
+
scaleAspectRatio: w,
|
3362
|
+
targetTrackIndex: M,
|
3363
|
+
targetTrackId: (_e = d.value) == null ? void 0 : _e.options.targetTrackId
|
3364
|
+
}) : d.key === ba ? E = await mi(v, (ot = d.value) == null ? void 0 : ot.payload, {
|
3365
|
+
scaleMode: y,
|
3272
3366
|
scaleAspectRatio: w,
|
3273
|
-
targetTrackIndex:
|
3274
|
-
targetTrackId: (
|
3275
|
-
}) : d.key ===
|
3276
|
-
scaleMode:
|
3367
|
+
targetTrackIndex: M,
|
3368
|
+
targetTrackId: (Vt = d.value) == null ? void 0 : Vt.options.targetTrackId
|
3369
|
+
}) : d.key === aa ? E = await ai(v, (Jt = d.value) == null ? void 0 : Jt.payload, {
|
3370
|
+
scaleMode: y,
|
3277
3371
|
scaleAspectRatio: w,
|
3278
|
-
targetTrackIndex:
|
3279
|
-
targetTrackId: (
|
3280
|
-
}) : d.key ===
|
3281
|
-
targetTrackIndex:
|
3282
|
-
targetTrackId: (
|
3283
|
-
}) : d.key ===
|
3284
|
-
scaleMode:
|
3372
|
+
targetTrackIndex: M,
|
3373
|
+
targetTrackId: (Rt = d.value) == null ? void 0 : Rt.options.targetTrackId
|
3374
|
+
}) : d.key === sa ? E = await ii(v, (zt = d.value) == null ? void 0 : zt.payload, {
|
3375
|
+
targetTrackIndex: M,
|
3376
|
+
targetTrackId: (qt = d.value) == null ? void 0 : qt.options.targetTrackId
|
3377
|
+
}) : d.key === na ? E = await oi(v, ($t = d.value) == null ? void 0 : $t.payload, {
|
3378
|
+
scaleMode: y,
|
3285
3379
|
scaleAspectRatio: w,
|
3286
|
-
targetTrackIndex:
|
3287
|
-
targetTrackId: (
|
3288
|
-
}) : d.key ===
|
3289
|
-
scaleMode:
|
3380
|
+
targetTrackIndex: M,
|
3381
|
+
targetTrackId: (Zt = d.value) == null ? void 0 : Zt.options.targetTrackId
|
3382
|
+
}) : d.key === fa ? E = await di(v, (Ft = d.value) == null ? void 0 : Ft.payload, {
|
3383
|
+
scaleMode: y,
|
3290
3384
|
scaleAspectRatio: w,
|
3291
|
-
targetTrackIndex:
|
3292
|
-
targetTrackId: (
|
3293
|
-
}) : d.key ===
|
3385
|
+
targetTrackIndex: M,
|
3386
|
+
targetTrackId: (Qt = d.value) == null ? void 0 : Qt.options.targetTrackId
|
3387
|
+
}) : d.key === pa ? E = await Pe(
|
3294
3388
|
v,
|
3295
|
-
(
|
3389
|
+
(ve = d.value) == null ? void 0 : ve.payload,
|
3296
3390
|
{
|
3297
|
-
targetTrackIndex:
|
3298
|
-
targetTrackId: (
|
3391
|
+
targetTrackIndex: M,
|
3392
|
+
targetTrackId: (wt = (Se = d.value) == null ? void 0 : Se.options) == null ? void 0 : wt.targetTrackId
|
3299
3393
|
},
|
3300
3394
|
"progress-bar"
|
3301
|
-
) : d.key ===
|
3395
|
+
) : d.key === ha ? E = await Pe(
|
3302
3396
|
v,
|
3303
|
-
(
|
3397
|
+
(Lt = d.value) == null ? void 0 : Lt.payload,
|
3304
3398
|
{
|
3305
|
-
targetTrackIndex:
|
3306
|
-
targetTrackId: (
|
3399
|
+
targetTrackIndex: M,
|
3400
|
+
targetTrackId: (ee = (te = d.value) == null ? void 0 : te.options) == null ? void 0 : ee.targetTrackId
|
3307
3401
|
},
|
3308
3402
|
"progress-frame"
|
3309
|
-
) : d.key ===
|
3403
|
+
) : d.key === ma ? E = await Pe(
|
3310
3404
|
v,
|
3311
|
-
(
|
3405
|
+
(lt = d.value) == null ? void 0 : lt.payload,
|
3312
3406
|
{
|
3313
|
-
targetTrackIndex:
|
3314
|
-
targetTrackId: (
|
3407
|
+
targetTrackIndex: M,
|
3408
|
+
targetTrackId: (we = (Mt = d.value) == null ? void 0 : Mt.options) == null ? void 0 : we.targetTrackId
|
3315
3409
|
},
|
3316
3410
|
"radial-audio-bars"
|
3317
|
-
) : d.key ===
|
3411
|
+
) : d.key === Ia ? E = await Pe(
|
3318
3412
|
v,
|
3319
|
-
(
|
3413
|
+
(bt = d.value) == null ? void 0 : bt.payload,
|
3320
3414
|
{
|
3321
|
-
targetTrackIndex:
|
3322
|
-
targetTrackId: (
|
3415
|
+
targetTrackIndex: M,
|
3416
|
+
targetTrackId: (Nt = (Tt = d.value) == null ? void 0 : Tt.options) == null ? void 0 : Nt.targetTrackId
|
3323
3417
|
},
|
3324
3418
|
"lineal-audio-bars"
|
3325
|
-
)
|
3419
|
+
) : d.key === ga ? E = await Pe(
|
3420
|
+
v,
|
3421
|
+
(rt = d.value) == null ? void 0 : rt.payload,
|
3422
|
+
{
|
3423
|
+
targetTrackIndex: M,
|
3424
|
+
targetTrackId: (ne = (re = d.value) == null ? void 0 : re.options) == null ? void 0 : ne.targetTrackId
|
3425
|
+
},
|
3426
|
+
"wave-audio-bars"
|
3427
|
+
) : d.key === ya && (E = await Pe(
|
3428
|
+
v,
|
3429
|
+
(Me = d.value) == null ? void 0 : Me.payload,
|
3430
|
+
{
|
3431
|
+
targetTrackIndex: M,
|
3432
|
+
targetTrackId: (Et = (Ht = d.value) == null ? void 0 : Ht.options) == null ? void 0 : Et.targetTrackId
|
3433
|
+
},
|
3434
|
+
"hill-audio-bars"
|
3435
|
+
)), S && E.trackItemIds && (E.activeIds = E.trackItemIds), t.updateState(E, {
|
3326
3436
|
updateHistory: !0,
|
3327
3437
|
kind: "add"
|
3328
3438
|
});
|
3329
3439
|
}), _ = u.subscribe(async (d) => {
|
3330
3440
|
var v;
|
3331
|
-
if (d.key ===
|
3332
|
-
const S = (v = d.value) == null ? void 0 : v.options.time,
|
3333
|
-
Object.keys(
|
3441
|
+
if (d.key === wa) {
|
3442
|
+
const S = (v = d.value) == null ? void 0 : v.options.time, y = ti(t.getState(), S);
|
3443
|
+
Object.keys(y).length > 0 && t.updateState(y, {
|
3334
3444
|
updateHistory: !0,
|
3335
3445
|
kind: "update"
|
3336
3446
|
});
|
3337
3447
|
}
|
3338
|
-
if (d.key ===
|
3339
|
-
const S = await
|
3448
|
+
if (d.key === Sa) {
|
3449
|
+
const S = await La(t.getState());
|
3340
3450
|
t.updateState(S, {
|
3341
3451
|
updateHistory: !0,
|
3342
3452
|
kind: "update"
|
3343
3453
|
});
|
3344
3454
|
}
|
3345
|
-
}),
|
3346
|
-
var v, S,
|
3347
|
-
if (d.key ===
|
3348
|
-
const w = await
|
3455
|
+
}), T = c.subscribe(async (d) => {
|
3456
|
+
var v, S, y;
|
3457
|
+
if (d.key === ka) {
|
3458
|
+
const w = await ei(
|
3349
3459
|
t.getState(),
|
3350
3460
|
(v = d.value) == null ? void 0 : v.payload
|
3351
3461
|
);
|
@@ -3354,8 +3464,8 @@ function di(t) {
|
|
3354
3464
|
kind: "update:details"
|
3355
3465
|
});
|
3356
3466
|
}
|
3357
|
-
if (d.key ===
|
3358
|
-
const w = await
|
3467
|
+
if (d.key === _a) {
|
3468
|
+
const w = await ri(
|
3359
3469
|
t.getState(),
|
3360
3470
|
(S = d.value) == null ? void 0 : S.payload
|
3361
3471
|
);
|
@@ -3364,8 +3474,8 @@ function di(t) {
|
|
3364
3474
|
kind: "update:details"
|
3365
3475
|
});
|
3366
3476
|
}
|
3367
|
-
if (d.key ===
|
3368
|
-
const w =
|
3477
|
+
if (d.key === va) {
|
3478
|
+
const w = ni(t.getState(), (y = d.value) == null ? void 0 : y.payload);
|
3369
3479
|
t.updateState(w, {
|
3370
3480
|
updateHistory: !0,
|
3371
3481
|
kind: "update:details"
|
@@ -3374,12 +3484,12 @@ function di(t) {
|
|
3374
3484
|
});
|
3375
3485
|
return {
|
3376
3486
|
unsubscribe: () => {
|
3377
|
-
b.unsubscribe(), _.unsubscribe(),
|
3487
|
+
b.unsubscribe(), _.unsubscribe(), T.unsubscribe(), m.unsubscribe(), I.unsubscribe(), k.unsubscribe(), f.unsubscribe(), h.unsubscribe();
|
3378
3488
|
}
|
3379
3489
|
};
|
3380
3490
|
}
|
3381
|
-
const
|
3382
|
-
function
|
3491
|
+
const gi = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
3492
|
+
function Ts(t, r, e = { cyclesFix: !0 }, s = []) {
|
3383
3493
|
var c, p;
|
3384
3494
|
let a = [];
|
3385
3495
|
const o = Array.isArray(t);
|
@@ -3394,7 +3504,7 @@ function Ms(t, r, e = { cyclesFix: !0 }, s = []) {
|
|
3394
3504
|
continue;
|
3395
3505
|
}
|
3396
3506
|
const f = r[h], I = typeof k == "object" && typeof f == "object" && Array.isArray(k) === Array.isArray(f);
|
3397
|
-
k && f && I && !
|
3507
|
+
k && f && I && !gi[(p = (c = Object.getPrototypeOf(k)) == null ? void 0 : c.constructor) == null ? void 0 : p.name] && (!e.cyclesFix || !s.includes(k)) ? a.push.apply(a, Ts(k, f, e, e.cyclesFix ? s.concat([k]) : []).map((b) => (b.path.unshift(m), b))) : k !== f && // treat NaN values as equivalent
|
3398
3508
|
!(Number.isNaN(k) && Number.isNaN(f)) && !(I && (isNaN(k) ? k + "" == f + "" : +k == +f)) && a.push({
|
3399
3509
|
path: [m],
|
3400
3510
|
type: "CHANGE",
|
@@ -3411,7 +3521,7 @@ function Ms(t, r, e = { cyclesFix: !0 }, s = []) {
|
|
3411
3521
|
});
|
3412
3522
|
return a;
|
3413
3523
|
}
|
3414
|
-
var
|
3524
|
+
var Pn = Symbol.for("immer-nothing"), Ve = Symbol.for("immer-draftable"), dt = Symbol.for("immer-state"), Es = process.env.NODE_ENV !== "production" ? [
|
3415
3525
|
// All error codes, starting by 0:
|
3416
3526
|
function(t) {
|
3417
3527
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
@@ -3442,75 +3552,75 @@ var Cn = Symbol.for("immer-nothing"), Ge = Symbol.for("immer-draftable"), lt = S
|
|
3442
3552
|
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
|
3443
3553
|
// See Patches.ts for additional errors
|
3444
3554
|
] : [];
|
3445
|
-
function
|
3555
|
+
function G(t, ...r) {
|
3446
3556
|
if (process.env.NODE_ENV !== "production") {
|
3447
|
-
const e =
|
3557
|
+
const e = Es[t], s = typeof e == "function" ? e.apply(null, r) : e;
|
3448
3558
|
throw new Error(`[Immer] ${s}`);
|
3449
3559
|
}
|
3450
3560
|
throw new Error(
|
3451
3561
|
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
3452
3562
|
);
|
3453
3563
|
}
|
3454
|
-
var
|
3455
|
-
function
|
3456
|
-
return !!t && !!t[
|
3564
|
+
var fe = Object.getPrototypeOf;
|
3565
|
+
function pe(t) {
|
3566
|
+
return !!t && !!t[dt];
|
3457
3567
|
}
|
3458
|
-
function
|
3568
|
+
function Gt(t) {
|
3459
3569
|
var r;
|
3460
|
-
return t ?
|
3570
|
+
return t ? As(t) || Array.isArray(t) || !!t[Ve] || !!((r = t.constructor) != null && r[Ve]) || nr(t) || sr(t) : !1;
|
3461
3571
|
}
|
3462
|
-
var
|
3463
|
-
function
|
3572
|
+
var yi = Object.prototype.constructor.toString();
|
3573
|
+
function As(t) {
|
3464
3574
|
if (!t || typeof t != "object")
|
3465
3575
|
return !1;
|
3466
|
-
const r =
|
3576
|
+
const r = fe(t);
|
3467
3577
|
if (r === null)
|
3468
3578
|
return !0;
|
3469
3579
|
const e = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
3470
|
-
return e === Object ? !0 : typeof e == "function" && Function.toString.call(e) ===
|
3580
|
+
return e === Object ? !0 : typeof e == "function" && Function.toString.call(e) === yi;
|
3471
3581
|
}
|
3472
|
-
function
|
3473
|
-
|
3582
|
+
function Je(t, r) {
|
3583
|
+
he(t) === 0 ? Reflect.ownKeys(t).forEach((e) => {
|
3474
3584
|
r(e, t[e], t);
|
3475
3585
|
}) : t.forEach((e, s) => r(s, e, t));
|
3476
3586
|
}
|
3477
|
-
function
|
3478
|
-
const r = t[
|
3479
|
-
return r ? r.type_ : Array.isArray(t) ? 1 :
|
3587
|
+
function he(t) {
|
3588
|
+
const r = t[dt];
|
3589
|
+
return r ? r.type_ : Array.isArray(t) ? 1 : nr(t) ? 2 : sr(t) ? 3 : 0;
|
3480
3590
|
}
|
3481
|
-
function
|
3482
|
-
return
|
3591
|
+
function qe(t, r) {
|
3592
|
+
return he(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
3483
3593
|
}
|
3484
|
-
function
|
3485
|
-
return
|
3594
|
+
function mn(t, r) {
|
3595
|
+
return he(t) === 2 ? t.get(r) : t[r];
|
3486
3596
|
}
|
3487
|
-
function
|
3488
|
-
const s =
|
3597
|
+
function Ds(t, r, e) {
|
3598
|
+
const s = he(t);
|
3489
3599
|
s === 2 ? t.set(r, e) : s === 3 ? t.add(e) : t[r] = e;
|
3490
3600
|
}
|
3491
|
-
function
|
3601
|
+
function bi(t, r) {
|
3492
3602
|
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
3493
3603
|
}
|
3494
|
-
function
|
3604
|
+
function nr(t) {
|
3495
3605
|
return t instanceof Map;
|
3496
3606
|
}
|
3497
|
-
function
|
3607
|
+
function sr(t) {
|
3498
3608
|
return t instanceof Set;
|
3499
3609
|
}
|
3500
|
-
function
|
3610
|
+
function le(t) {
|
3501
3611
|
return t.copy_ || t.base_;
|
3502
3612
|
}
|
3503
|
-
function
|
3504
|
-
if (
|
3613
|
+
function wn(t, r) {
|
3614
|
+
if (nr(t))
|
3505
3615
|
return new Map(t);
|
3506
|
-
if (
|
3616
|
+
if (sr(t))
|
3507
3617
|
return new Set(t);
|
3508
3618
|
if (Array.isArray(t))
|
3509
3619
|
return Array.prototype.slice.call(t);
|
3510
|
-
const e =
|
3620
|
+
const e = As(t);
|
3511
3621
|
if (r === !0 || r === "class_only" && !e) {
|
3512
3622
|
const s = Object.getOwnPropertyDescriptors(t);
|
3513
|
-
delete s[
|
3623
|
+
delete s[dt];
|
3514
3624
|
let a = Reflect.ownKeys(s);
|
3515
3625
|
for (let o = 0; o < a.length; o++) {
|
3516
3626
|
const u = a[o], c = s[u];
|
@@ -3522,37 +3632,37 @@ function Sn(t, r) {
|
|
3522
3632
|
value: t[u]
|
3523
3633
|
});
|
3524
3634
|
}
|
3525
|
-
return Object.create(
|
3635
|
+
return Object.create(fe(t), s);
|
3526
3636
|
} else {
|
3527
|
-
const s =
|
3637
|
+
const s = fe(t);
|
3528
3638
|
if (s !== null && e)
|
3529
3639
|
return { ...t };
|
3530
3640
|
const a = Object.create(s);
|
3531
3641
|
return Object.assign(a, t);
|
3532
3642
|
}
|
3533
3643
|
}
|
3534
|
-
function
|
3535
|
-
return
|
3644
|
+
function Rn(t, r = !1) {
|
3645
|
+
return Er(t) || pe(t) || !Gt(t) || (he(t) > 1 && (t.set = t.add = t.clear = t.delete = ki), Object.freeze(t), r && Object.entries(t).forEach(([e, s]) => Rn(s, !0))), t;
|
3536
3646
|
}
|
3537
|
-
function
|
3538
|
-
|
3647
|
+
function ki() {
|
3648
|
+
G(2);
|
3539
3649
|
}
|
3540
|
-
function
|
3650
|
+
function Er(t) {
|
3541
3651
|
return Object.isFrozen(t);
|
3542
3652
|
}
|
3543
|
-
var
|
3544
|
-
function
|
3545
|
-
const r =
|
3546
|
-
return r ||
|
3653
|
+
var Mn = {};
|
3654
|
+
function me(t) {
|
3655
|
+
const r = Mn[t];
|
3656
|
+
return r || G(0, t), r;
|
3547
3657
|
}
|
3548
|
-
function
|
3549
|
-
|
3658
|
+
function _i(t, r) {
|
3659
|
+
Mn[t] || (Mn[t] = r);
|
3550
3660
|
}
|
3551
|
-
var
|
3552
|
-
function
|
3553
|
-
return
|
3661
|
+
var Ze;
|
3662
|
+
function xs() {
|
3663
|
+
return Ze;
|
3554
3664
|
}
|
3555
|
-
function
|
3665
|
+
function vi(t, r) {
|
3556
3666
|
return {
|
3557
3667
|
drafts_: [],
|
3558
3668
|
parent_: t,
|
@@ -3563,53 +3673,53 @@ function yi(t, r) {
|
|
3563
3673
|
unfinalizedDrafts_: 0
|
3564
3674
|
};
|
3565
3675
|
}
|
3566
|
-
function
|
3567
|
-
r && (
|
3568
|
-
}
|
3569
|
-
function Mn(t) {
|
3570
|
-
Tn(t), t.drafts_.forEach(gi), t.drafts_ = null;
|
3676
|
+
function Kn(t, r) {
|
3677
|
+
r && (me("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
3571
3678
|
}
|
3572
3679
|
function Tn(t) {
|
3573
|
-
t
|
3680
|
+
En(t), t.drafts_.forEach(Si), t.drafts_ = null;
|
3574
3681
|
}
|
3575
|
-
function
|
3576
|
-
|
3682
|
+
function En(t) {
|
3683
|
+
t === Ze && (Ze = t.parent_);
|
3684
|
+
}
|
3685
|
+
function Vn(t) {
|
3686
|
+
return Ze = vi(Ze, t);
|
3577
3687
|
}
|
3578
|
-
function
|
3579
|
-
const r = t[
|
3688
|
+
function Si(t) {
|
3689
|
+
const r = t[dt];
|
3580
3690
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
3581
3691
|
}
|
3582
|
-
function
|
3692
|
+
function Jn(t, r) {
|
3583
3693
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
3584
3694
|
const e = r.drafts_[0];
|
3585
|
-
return t !== void 0 && t !== e ? (e[
|
3586
|
-
e[
|
3695
|
+
return t !== void 0 && t !== e ? (e[dt].modified_ && (Tn(r), G(4)), Gt(t) && (t = Sr(r, t), r.parent_ || wr(r, t)), r.patches_ && me("Patches").generateReplacementPatches_(
|
3696
|
+
e[dt].base_,
|
3587
3697
|
t,
|
3588
3698
|
r.patches_,
|
3589
3699
|
r.inversePatches_
|
3590
|
-
)) : t =
|
3700
|
+
)) : t = Sr(r, e, []), Tn(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== Pn ? t : void 0;
|
3591
3701
|
}
|
3592
|
-
function
|
3593
|
-
if (
|
3702
|
+
function Sr(t, r, e) {
|
3703
|
+
if (Er(r))
|
3594
3704
|
return r;
|
3595
|
-
const s = r[
|
3705
|
+
const s = r[dt];
|
3596
3706
|
if (!s)
|
3597
|
-
return
|
3707
|
+
return Je(
|
3598
3708
|
r,
|
3599
|
-
(a, o) =>
|
3709
|
+
(a, o) => qn(t, s, r, a, o, e)
|
3600
3710
|
), r;
|
3601
3711
|
if (s.scope_ !== t)
|
3602
3712
|
return r;
|
3603
3713
|
if (!s.modified_)
|
3604
|
-
return
|
3714
|
+
return wr(t, s.base_, !0), s.base_;
|
3605
3715
|
if (!s.finalized_) {
|
3606
3716
|
s.finalized_ = !0, s.scope_.unfinalizedDrafts_--;
|
3607
3717
|
const a = s.copy_;
|
3608
3718
|
let o = a, u = !1;
|
3609
|
-
s.type_ === 3 && (o = new Set(a), a.clear(), u = !0),
|
3719
|
+
s.type_ === 3 && (o = new Set(a), a.clear(), u = !0), Je(
|
3610
3720
|
o,
|
3611
|
-
(c, p) =>
|
3612
|
-
),
|
3721
|
+
(c, p) => qn(t, s, a, c, p, e, u)
|
3722
|
+
), wr(t, a, !1), e && t.patches_ && me("Patches").generatePatches_(
|
3613
3723
|
s,
|
3614
3724
|
e,
|
3615
3725
|
t.patches_,
|
@@ -3618,29 +3728,29 @@ function _r(t, r, e) {
|
|
3618
3728
|
}
|
3619
3729
|
return s.copy_;
|
3620
3730
|
}
|
3621
|
-
function
|
3622
|
-
if (process.env.NODE_ENV !== "production" && a === e &&
|
3731
|
+
function qn(t, r, e, s, a, o, u) {
|
3732
|
+
if (process.env.NODE_ENV !== "production" && a === e && G(5), pe(a)) {
|
3623
3733
|
const c = o && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
3624
|
-
!
|
3625
|
-
if (
|
3734
|
+
!qe(r.assigned_, s) ? o.concat(s) : void 0, p = Sr(t, a, c);
|
3735
|
+
if (Ds(e, s, p), pe(p))
|
3626
3736
|
t.canAutoFreeze_ = !1;
|
3627
3737
|
else
|
3628
3738
|
return;
|
3629
3739
|
} else u && e.add(a);
|
3630
|
-
if (
|
3740
|
+
if (Gt(a) && !Er(a)) {
|
3631
3741
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
3632
3742
|
return;
|
3633
|
-
|
3743
|
+
Sr(t, a), (!r || !r.scope_.parent_) && typeof s != "symbol" && Object.prototype.propertyIsEnumerable.call(e, s) && wr(t, a);
|
3634
3744
|
}
|
3635
3745
|
}
|
3636
|
-
function
|
3637
|
-
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ &&
|
3746
|
+
function wr(t, r, e = !1) {
|
3747
|
+
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && Rn(r, e);
|
3638
3748
|
}
|
3639
|
-
function
|
3749
|
+
function wi(t, r) {
|
3640
3750
|
const e = Array.isArray(t), s = {
|
3641
3751
|
type_: e ? 1 : 0,
|
3642
3752
|
// Track which produce call this is associated with.
|
3643
|
-
scope_: r ? r.scope_ :
|
3753
|
+
scope_: r ? r.scope_ : xs(),
|
3644
3754
|
// True for both shallow and deep changes.
|
3645
3755
|
modified_: !1,
|
3646
3756
|
// Used during finalization.
|
@@ -3660,50 +3770,50 @@ function bi(t, r) {
|
|
3660
3770
|
revoke_: null,
|
3661
3771
|
isManual_: !1
|
3662
3772
|
};
|
3663
|
-
let a = s, o =
|
3664
|
-
e && (a = [s], o =
|
3773
|
+
let a = s, o = zn;
|
3774
|
+
e && (a = [s], o = Qe);
|
3665
3775
|
const { revoke: u, proxy: c } = Proxy.revocable(a, o);
|
3666
3776
|
return s.draft_ = c, s.revoke_ = u, c;
|
3667
3777
|
}
|
3668
|
-
var
|
3778
|
+
var zn = {
|
3669
3779
|
get(t, r) {
|
3670
|
-
if (r ===
|
3780
|
+
if (r === dt)
|
3671
3781
|
return t;
|
3672
|
-
const e =
|
3673
|
-
if (!
|
3674
|
-
return
|
3782
|
+
const e = le(t);
|
3783
|
+
if (!qe(e, r))
|
3784
|
+
return Mi(t, e, r);
|
3675
3785
|
const s = e[r];
|
3676
|
-
return t.finalized_ || !
|
3786
|
+
return t.finalized_ || !Gt(s) ? s : s === In(t.base_, r) ? (gn(t), t.copy_[r] = Dn(s, t)) : s;
|
3677
3787
|
},
|
3678
3788
|
has(t, r) {
|
3679
|
-
return r in
|
3789
|
+
return r in le(t);
|
3680
3790
|
},
|
3681
3791
|
ownKeys(t) {
|
3682
|
-
return Reflect.ownKeys(
|
3792
|
+
return Reflect.ownKeys(le(t));
|
3683
3793
|
},
|
3684
3794
|
set(t, r, e) {
|
3685
|
-
const s =
|
3795
|
+
const s = Os(le(t), r);
|
3686
3796
|
if (s != null && s.set)
|
3687
3797
|
return s.set.call(t.draft_, e), !0;
|
3688
3798
|
if (!t.modified_) {
|
3689
|
-
const a =
|
3799
|
+
const a = In(le(t), r), o = a == null ? void 0 : a[dt];
|
3690
3800
|
if (o && o.base_ === e)
|
3691
3801
|
return t.copy_[r] = e, t.assigned_[r] = !1, !0;
|
3692
|
-
if (
|
3802
|
+
if (bi(e, a) && (e !== void 0 || qe(t.base_, r)))
|
3693
3803
|
return !0;
|
3694
|
-
|
3804
|
+
gn(t), An(t);
|
3695
3805
|
}
|
3696
3806
|
return t.copy_[r] === e && // special case: handle new props with value 'undefined'
|
3697
3807
|
(e !== void 0 || r in t.copy_) || // special case: NaN
|
3698
3808
|
Number.isNaN(e) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = e, t.assigned_[r] = !0), !0;
|
3699
3809
|
},
|
3700
3810
|
deleteProperty(t, r) {
|
3701
|
-
return
|
3811
|
+
return In(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, gn(t), An(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
|
3702
3812
|
},
|
3703
3813
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
3704
3814
|
// the same guarantee in ES5 mode.
|
3705
3815
|
getOwnPropertyDescriptor(t, r) {
|
3706
|
-
const e =
|
3816
|
+
const e = le(t), s = Reflect.getOwnPropertyDescriptor(e, r);
|
3707
3817
|
return s && {
|
3708
3818
|
writable: !0,
|
3709
3819
|
configurable: t.type_ !== 1 || r !== "length",
|
@@ -3712,60 +3822,60 @@ var Rn = {
|
|
3712
3822
|
};
|
3713
3823
|
},
|
3714
3824
|
defineProperty() {
|
3715
|
-
|
3825
|
+
G(11);
|
3716
3826
|
},
|
3717
3827
|
getPrototypeOf(t) {
|
3718
|
-
return
|
3828
|
+
return fe(t.base_);
|
3719
3829
|
},
|
3720
3830
|
setPrototypeOf() {
|
3721
|
-
|
3831
|
+
G(12);
|
3722
3832
|
}
|
3723
|
-
},
|
3724
|
-
|
3725
|
-
|
3833
|
+
}, Qe = {};
|
3834
|
+
Je(zn, (t, r) => {
|
3835
|
+
Qe[t] = function() {
|
3726
3836
|
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
3727
3837
|
};
|
3728
3838
|
});
|
3729
|
-
|
3730
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) &&
|
3839
|
+
Qe.deleteProperty = function(t, r) {
|
3840
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && G(13), Qe.set.call(this, t, r, void 0);
|
3731
3841
|
};
|
3732
|
-
|
3733
|
-
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) &&
|
3842
|
+
Qe.set = function(t, r, e) {
|
3843
|
+
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && G(14), zn.set.call(this, t[0], r, e, t[0]);
|
3734
3844
|
};
|
3735
|
-
function
|
3736
|
-
const e = t[
|
3737
|
-
return (e ?
|
3845
|
+
function In(t, r) {
|
3846
|
+
const e = t[dt];
|
3847
|
+
return (e ? le(e) : t)[r];
|
3738
3848
|
}
|
3739
|
-
function
|
3849
|
+
function Mi(t, r, e) {
|
3740
3850
|
var a;
|
3741
|
-
const s =
|
3851
|
+
const s = Os(r, e);
|
3742
3852
|
return s ? "value" in s ? s.value : (
|
3743
3853
|
// This is a very special case, if the prop is a getter defined by the
|
3744
3854
|
// prototype, we should invoke it with the draft as context!
|
3745
3855
|
(a = s.get) == null ? void 0 : a.call(t.draft_)
|
3746
3856
|
) : void 0;
|
3747
3857
|
}
|
3748
|
-
function
|
3858
|
+
function Os(t, r) {
|
3749
3859
|
if (!(r in t))
|
3750
3860
|
return;
|
3751
|
-
let e =
|
3861
|
+
let e = fe(t);
|
3752
3862
|
for (; e; ) {
|
3753
3863
|
const s = Object.getOwnPropertyDescriptor(e, r);
|
3754
3864
|
if (s)
|
3755
3865
|
return s;
|
3756
|
-
e =
|
3866
|
+
e = fe(e);
|
3757
3867
|
}
|
3758
3868
|
}
|
3759
|
-
function
|
3760
|
-
t.modified_ || (t.modified_ = !0, t.parent_ &&
|
3869
|
+
function An(t) {
|
3870
|
+
t.modified_ || (t.modified_ = !0, t.parent_ && An(t.parent_));
|
3761
3871
|
}
|
3762
|
-
function
|
3763
|
-
t.copy_ || (t.copy_ =
|
3872
|
+
function gn(t) {
|
3873
|
+
t.copy_ || (t.copy_ = wn(
|
3764
3874
|
t.base_,
|
3765
3875
|
t.scope_.immer_.useStrictShallowCopy_
|
3766
3876
|
));
|
3767
3877
|
}
|
3768
|
-
var
|
3878
|
+
var Ti = class {
|
3769
3879
|
constructor(t) {
|
3770
3880
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, e, s) => {
|
3771
3881
|
if (typeof r == "function" && typeof e != "function") {
|
@@ -3776,25 +3886,25 @@ var _i = class {
|
|
3776
3886
|
return u.produce(p, (k) => e.call(this, k, ...h));
|
3777
3887
|
};
|
3778
3888
|
}
|
3779
|
-
typeof e != "function" &&
|
3889
|
+
typeof e != "function" && G(6), s !== void 0 && typeof s != "function" && G(7);
|
3780
3890
|
let a;
|
3781
|
-
if (
|
3782
|
-
const o =
|
3891
|
+
if (Gt(r)) {
|
3892
|
+
const o = Vn(this), u = Dn(r, void 0);
|
3783
3893
|
let c = !0;
|
3784
3894
|
try {
|
3785
3895
|
a = e(u), c = !1;
|
3786
3896
|
} finally {
|
3787
|
-
c ?
|
3897
|
+
c ? Tn(o) : En(o);
|
3788
3898
|
}
|
3789
|
-
return
|
3899
|
+
return Kn(o, s), Jn(a, o);
|
3790
3900
|
} else if (!r || typeof r != "object") {
|
3791
|
-
if (a = e(r), a === void 0 && (a = r), a ===
|
3901
|
+
if (a = e(r), a === void 0 && (a = r), a === Pn && (a = void 0), this.autoFreeze_ && Rn(a, !0), s) {
|
3792
3902
|
const o = [], u = [];
|
3793
|
-
|
3903
|
+
me("Patches").generateReplacementPatches_(r, a, o, u), s(o, u);
|
3794
3904
|
}
|
3795
3905
|
return a;
|
3796
3906
|
} else
|
3797
|
-
|
3907
|
+
G(1, r);
|
3798
3908
|
}, this.produceWithPatches = (r, e) => {
|
3799
3909
|
if (typeof r == "function")
|
3800
3910
|
return (u, ...c) => this.produceWithPatches(u, (p) => r(p, ...c));
|
@@ -3805,15 +3915,15 @@ var _i = class {
|
|
3805
3915
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
3806
3916
|
}
|
3807
3917
|
createDraft(t) {
|
3808
|
-
|
3809
|
-
const r =
|
3810
|
-
return e[
|
3918
|
+
Gt(t) || G(8), pe(t) && (t = Ei(t));
|
3919
|
+
const r = Vn(this), e = Dn(t, void 0);
|
3920
|
+
return e[dt].isManual_ = !0, En(r), e;
|
3811
3921
|
}
|
3812
3922
|
finishDraft(t, r) {
|
3813
|
-
const e = t && t[
|
3814
|
-
(!e || !e.isManual_) &&
|
3923
|
+
const e = t && t[dt];
|
3924
|
+
(!e || !e.isManual_) && G(9);
|
3815
3925
|
const { scope_: s } = e;
|
3816
|
-
return
|
3926
|
+
return Kn(s, r), Jn(void 0, s);
|
3817
3927
|
}
|
3818
3928
|
/**
|
3819
3929
|
* Pass true to automatically freeze all copies created by Immer.
|
@@ -3841,37 +3951,37 @@ var _i = class {
|
|
3841
3951
|
}
|
3842
3952
|
}
|
3843
3953
|
e > -1 && (r = r.slice(e + 1));
|
3844
|
-
const s =
|
3845
|
-
return
|
3954
|
+
const s = me("Patches").applyPatches_;
|
3955
|
+
return pe(t) ? s(t, r) : this.produce(
|
3846
3956
|
t,
|
3847
3957
|
(a) => s(a, r)
|
3848
3958
|
);
|
3849
3959
|
}
|
3850
3960
|
};
|
3851
|
-
function
|
3852
|
-
const e =
|
3853
|
-
return (r ? r.scope_ :
|
3961
|
+
function Dn(t, r) {
|
3962
|
+
const e = nr(t) ? me("MapSet").proxyMap_(t, r) : sr(t) ? me("MapSet").proxySet_(t, r) : wi(t, r);
|
3963
|
+
return (r ? r.scope_ : xs()).drafts_.push(e), e;
|
3854
3964
|
}
|
3855
|
-
function
|
3856
|
-
return
|
3965
|
+
function Ei(t) {
|
3966
|
+
return pe(t) || G(10, t), Cs(t);
|
3857
3967
|
}
|
3858
|
-
function
|
3859
|
-
if (!
|
3968
|
+
function Cs(t) {
|
3969
|
+
if (!Gt(t) || Er(t))
|
3860
3970
|
return t;
|
3861
|
-
const r = t[
|
3971
|
+
const r = t[dt];
|
3862
3972
|
let e;
|
3863
3973
|
if (r) {
|
3864
3974
|
if (!r.modified_)
|
3865
3975
|
return r.base_;
|
3866
|
-
r.finalized_ = !0, e =
|
3976
|
+
r.finalized_ = !0, e = wn(t, r.scope_.immer_.useStrictShallowCopy_);
|
3867
3977
|
} else
|
3868
|
-
e =
|
3869
|
-
return
|
3870
|
-
|
3978
|
+
e = wn(t, !0);
|
3979
|
+
return Je(e, (s, a) => {
|
3980
|
+
Ds(e, s, Cs(a));
|
3871
3981
|
}), r && (r.finalized_ = !1), e;
|
3872
3982
|
}
|
3873
|
-
function
|
3874
|
-
process.env.NODE_ENV !== "production" &&
|
3983
|
+
function Zn() {
|
3984
|
+
process.env.NODE_ENV !== "production" && Es.push(
|
3875
3985
|
'Sets cannot have "replace" patches.',
|
3876
3986
|
function(f) {
|
3877
3987
|
return "Unsupported patch operation: " + f;
|
@@ -3904,79 +4014,79 @@ function qn() {
|
|
3904
4014
|
}
|
3905
4015
|
}
|
3906
4016
|
function o(f, I, b, _) {
|
3907
|
-
let { base_:
|
3908
|
-
v.length <
|
3909
|
-
for (let S = 0; S <
|
3910
|
-
if (d[S] && v[S] !==
|
3911
|
-
const
|
4017
|
+
let { base_: T, assigned_: d } = f, v = f.copy_;
|
4018
|
+
v.length < T.length && ([T, v] = [v, T], [b, _] = [_, b]);
|
4019
|
+
for (let S = 0; S < T.length; S++)
|
4020
|
+
if (d[S] && v[S] !== T[S]) {
|
4021
|
+
const y = I.concat([S]);
|
3912
4022
|
b.push({
|
3913
4023
|
op: r,
|
3914
|
-
path:
|
4024
|
+
path: y,
|
3915
4025
|
// Need to maybe clone it, as it can in fact be the original value
|
3916
4026
|
// due to the base/copy inversion at the start of this function
|
3917
4027
|
value: m(v[S])
|
3918
4028
|
}), _.push({
|
3919
4029
|
op: r,
|
3920
|
-
path:
|
3921
|
-
value: m(
|
4030
|
+
path: y,
|
4031
|
+
value: m(T[S])
|
3922
4032
|
});
|
3923
4033
|
}
|
3924
|
-
for (let S =
|
3925
|
-
const
|
4034
|
+
for (let S = T.length; S < v.length; S++) {
|
4035
|
+
const y = I.concat([S]);
|
3926
4036
|
b.push({
|
3927
4037
|
op: e,
|
3928
|
-
path:
|
4038
|
+
path: y,
|
3929
4039
|
// Need to maybe clone it, as it can in fact be the original value
|
3930
4040
|
// due to the base/copy inversion at the start of this function
|
3931
4041
|
value: m(v[S])
|
3932
4042
|
});
|
3933
4043
|
}
|
3934
|
-
for (let S = v.length - 1;
|
3935
|
-
const
|
4044
|
+
for (let S = v.length - 1; T.length <= S; --S) {
|
4045
|
+
const y = I.concat([S]);
|
3936
4046
|
_.push({
|
3937
4047
|
op: s,
|
3938
|
-
path:
|
4048
|
+
path: y
|
3939
4049
|
});
|
3940
4050
|
}
|
3941
4051
|
}
|
3942
4052
|
function u(f, I, b, _) {
|
3943
|
-
const { base_:
|
3944
|
-
|
3945
|
-
const
|
3946
|
-
if (
|
4053
|
+
const { base_: T, copy_: d } = f;
|
4054
|
+
Je(f.assigned_, (v, S) => {
|
4055
|
+
const y = mn(T, v), w = mn(d, v), M = S ? qe(T, v) ? r : e : s;
|
4056
|
+
if (y === w && M === r)
|
3947
4057
|
return;
|
3948
|
-
const
|
3949
|
-
b.push(
|
3950
|
-
|
4058
|
+
const E = I.concat(v);
|
4059
|
+
b.push(M === s ? { op: M, path: E } : { op: M, path: E, value: w }), _.push(
|
4060
|
+
M === e ? { op: s, path: E } : M === s ? { op: e, path: E, value: m(y) } : { op: r, path: E, value: m(y) }
|
3951
4061
|
);
|
3952
4062
|
});
|
3953
4063
|
}
|
3954
4064
|
function c(f, I, b, _) {
|
3955
|
-
let { base_:
|
3956
|
-
|
4065
|
+
let { base_: T, copy_: d } = f, v = 0;
|
4066
|
+
T.forEach((S) => {
|
3957
4067
|
if (!d.has(S)) {
|
3958
|
-
const
|
4068
|
+
const y = I.concat([v]);
|
3959
4069
|
b.push({
|
3960
4070
|
op: s,
|
3961
|
-
path:
|
4071
|
+
path: y,
|
3962
4072
|
value: S
|
3963
4073
|
}), _.unshift({
|
3964
4074
|
op: e,
|
3965
|
-
path:
|
4075
|
+
path: y,
|
3966
4076
|
value: S
|
3967
4077
|
});
|
3968
4078
|
}
|
3969
4079
|
v++;
|
3970
4080
|
}), v = 0, d.forEach((S) => {
|
3971
|
-
if (!
|
3972
|
-
const
|
4081
|
+
if (!T.has(S)) {
|
4082
|
+
const y = I.concat([v]);
|
3973
4083
|
b.push({
|
3974
4084
|
op: e,
|
3975
|
-
path:
|
4085
|
+
path: y,
|
3976
4086
|
value: S
|
3977
4087
|
}), _.unshift({
|
3978
4088
|
op: s,
|
3979
|
-
path:
|
4089
|
+
path: y,
|
3980
4090
|
value: S
|
3981
4091
|
});
|
3982
4092
|
}
|
@@ -3987,7 +4097,7 @@ function qn() {
|
|
3987
4097
|
b.push({
|
3988
4098
|
op: r,
|
3989
4099
|
path: [],
|
3990
|
-
value: I ===
|
4100
|
+
value: I === Pn ? void 0 : I
|
3991
4101
|
}), _.push({
|
3992
4102
|
op: r,
|
3993
4103
|
path: [],
|
@@ -3996,87 +4106,87 @@ function qn() {
|
|
3996
4106
|
}
|
3997
4107
|
function h(f, I) {
|
3998
4108
|
return I.forEach((b) => {
|
3999
|
-
const { path: _, op:
|
4109
|
+
const { path: _, op: T } = b;
|
4000
4110
|
let d = f;
|
4001
4111
|
for (let w = 0; w < _.length - 1; w++) {
|
4002
|
-
const
|
4003
|
-
let
|
4004
|
-
typeof
|
4112
|
+
const M = he(d);
|
4113
|
+
let E = _[w];
|
4114
|
+
typeof E != "string" && typeof E != "number" && (E = "" + E), (M === 0 || M === 1) && (E === "__proto__" || E === "constructor") && G(19), typeof d == "function" && E === "prototype" && G(19), d = mn(d, E), typeof d != "object" && G(18, _.join("/"));
|
4005
4115
|
}
|
4006
|
-
const v =
|
4007
|
-
switch (
|
4116
|
+
const v = he(d), S = k(b.value), y = _[_.length - 1];
|
4117
|
+
switch (T) {
|
4008
4118
|
case r:
|
4009
4119
|
switch (v) {
|
4010
4120
|
case 2:
|
4011
|
-
return d.set(
|
4121
|
+
return d.set(y, S);
|
4012
4122
|
case 3:
|
4013
|
-
|
4123
|
+
G(16);
|
4014
4124
|
default:
|
4015
|
-
return d[
|
4125
|
+
return d[y] = S;
|
4016
4126
|
}
|
4017
4127
|
case e:
|
4018
4128
|
switch (v) {
|
4019
4129
|
case 1:
|
4020
|
-
return
|
4130
|
+
return y === "-" ? d.push(S) : d.splice(y, 0, S);
|
4021
4131
|
case 2:
|
4022
|
-
return d.set(
|
4132
|
+
return d.set(y, S);
|
4023
4133
|
case 3:
|
4024
4134
|
return d.add(S);
|
4025
4135
|
default:
|
4026
|
-
return d[
|
4136
|
+
return d[y] = S;
|
4027
4137
|
}
|
4028
4138
|
case s:
|
4029
4139
|
switch (v) {
|
4030
4140
|
case 1:
|
4031
|
-
return d.splice(
|
4141
|
+
return d.splice(y, 1);
|
4032
4142
|
case 2:
|
4033
|
-
return d.delete(
|
4143
|
+
return d.delete(y);
|
4034
4144
|
case 3:
|
4035
4145
|
return d.delete(b.value);
|
4036
4146
|
default:
|
4037
|
-
return delete d[
|
4147
|
+
return delete d[y];
|
4038
4148
|
}
|
4039
4149
|
default:
|
4040
|
-
|
4150
|
+
G(17, T);
|
4041
4151
|
}
|
4042
4152
|
}), f;
|
4043
4153
|
}
|
4044
4154
|
function k(f) {
|
4045
|
-
if (!
|
4155
|
+
if (!Gt(f))
|
4046
4156
|
return f;
|
4047
4157
|
if (Array.isArray(f))
|
4048
4158
|
return f.map(k);
|
4049
|
-
if (
|
4159
|
+
if (nr(f))
|
4050
4160
|
return new Map(
|
4051
4161
|
Array.from(f.entries()).map(([b, _]) => [b, k(_)])
|
4052
4162
|
);
|
4053
|
-
if (
|
4163
|
+
if (sr(f))
|
4054
4164
|
return new Set(Array.from(f).map(k));
|
4055
|
-
const I = Object.create(
|
4165
|
+
const I = Object.create(fe(f));
|
4056
4166
|
for (const b in f)
|
4057
4167
|
I[b] = k(f[b]);
|
4058
|
-
return
|
4168
|
+
return qe(f, Ve) && (I[Ve] = f[Ve]), I;
|
4059
4169
|
}
|
4060
4170
|
function m(f) {
|
4061
|
-
return
|
4171
|
+
return pe(f) ? k(f) : f;
|
4062
4172
|
}
|
4063
|
-
|
4173
|
+
_i("Patches", {
|
4064
4174
|
applyPatches_: h,
|
4065
4175
|
generatePatches_: a,
|
4066
4176
|
generateReplacementPatches_: p
|
4067
4177
|
});
|
4068
4178
|
}
|
4069
|
-
var
|
4070
|
-
|
4071
|
-
|
4179
|
+
var ft = new Ti(), Ai = ft.produce;
|
4180
|
+
ft.produceWithPatches.bind(
|
4181
|
+
ft
|
4072
4182
|
);
|
4073
|
-
|
4074
|
-
|
4075
|
-
var
|
4076
|
-
|
4077
|
-
|
4078
|
-
var
|
4079
|
-
function
|
4183
|
+
ft.setAutoFreeze.bind(ft);
|
4184
|
+
ft.setUseStrictShallowCopy.bind(ft);
|
4185
|
+
var Di = ft.applyPatches.bind(ft);
|
4186
|
+
ft.createDraft.bind(ft);
|
4187
|
+
ft.finishDraft.bind(ft);
|
4188
|
+
var xi = 9007199254740991, Oi = "[object Arguments]", Ci = "[object Function]", Pi = "[object GeneratorFunction]", Ri = "[object Symbol]", zi = typeof ht == "object" && ht && ht.Object === Object && ht, $i = typeof self == "object" && self && self.Object === Object && self, Fi = zi || $i || Function("return this")();
|
4189
|
+
function Li(t, r, e) {
|
4080
4190
|
switch (e.length) {
|
4081
4191
|
case 0:
|
4082
4192
|
return t.call(r);
|
@@ -4089,92 +4199,92 @@ function Pi(t, r, e) {
|
|
4089
4199
|
}
|
4090
4200
|
return t.apply(r, e);
|
4091
4201
|
}
|
4092
|
-
function
|
4202
|
+
function Ni(t, r) {
|
4093
4203
|
for (var e = -1, s = t ? t.length : 0, a = Array(s); ++e < s; )
|
4094
4204
|
a[e] = r(t[e], e, t);
|
4095
4205
|
return a;
|
4096
4206
|
}
|
4097
|
-
function
|
4207
|
+
function Hi(t, r) {
|
4098
4208
|
for (var e = -1, s = r.length, a = t.length; ++e < s; )
|
4099
4209
|
t[a + e] = r[e];
|
4100
4210
|
return t;
|
4101
4211
|
}
|
4102
|
-
var
|
4103
|
-
function
|
4212
|
+
var $n = Object.prototype, Ui = $n.hasOwnProperty, Fn = $n.toString, Qn = Fi.Symbol, ji = $n.propertyIsEnumerable, ts = Qn ? Qn.isConcatSpreadable : void 0, es = Math.max;
|
4213
|
+
function Wi(t, r, e, s, a) {
|
4104
4214
|
var o = -1, u = t.length;
|
4105
|
-
for (e || (e =
|
4215
|
+
for (e || (e = Xi), a || (a = []); ++o < u; ) {
|
4106
4216
|
var c = t[o];
|
4107
|
-
e(c) ?
|
4217
|
+
e(c) ? Hi(a, c) : a[a.length] = c;
|
4108
4218
|
}
|
4109
4219
|
return a;
|
4110
4220
|
}
|
4111
|
-
function
|
4112
|
-
return t = Object(t),
|
4221
|
+
function Bi(t, r) {
|
4222
|
+
return t = Object(t), Gi(t, r, function(e, s) {
|
4113
4223
|
return s in t;
|
4114
4224
|
});
|
4115
4225
|
}
|
4116
|
-
function
|
4226
|
+
function Gi(t, r, e) {
|
4117
4227
|
for (var s = -1, a = r.length, o = {}; ++s < a; ) {
|
4118
4228
|
var u = r[s], c = t[u];
|
4119
4229
|
e(c, u) && (o[u] = c);
|
4120
4230
|
}
|
4121
4231
|
return o;
|
4122
4232
|
}
|
4123
|
-
function
|
4124
|
-
return r =
|
4125
|
-
for (var e = arguments, s = -1, a =
|
4233
|
+
function Yi(t, r) {
|
4234
|
+
return r = es(r === void 0 ? t.length - 1 : r, 0), function() {
|
4235
|
+
for (var e = arguments, s = -1, a = es(e.length - r, 0), o = Array(a); ++s < a; )
|
4126
4236
|
o[s] = e[r + s];
|
4127
4237
|
s = -1;
|
4128
4238
|
for (var u = Array(r + 1); ++s < r; )
|
4129
4239
|
u[s] = e[s];
|
4130
|
-
return u[r] = o,
|
4240
|
+
return u[r] = o, Li(t, this, u);
|
4131
4241
|
};
|
4132
4242
|
}
|
4133
|
-
function
|
4134
|
-
return
|
4243
|
+
function Xi(t) {
|
4244
|
+
return Ji(t) || Vi(t) || !!(ts && t && t[ts]);
|
4135
4245
|
}
|
4136
|
-
function
|
4137
|
-
if (typeof t == "string" ||
|
4246
|
+
function Ki(t) {
|
4247
|
+
if (typeof t == "string" || ro(t))
|
4138
4248
|
return t;
|
4139
4249
|
var r = t + "";
|
4140
4250
|
return r == "0" && 1 / t == -1 / 0 ? "-0" : r;
|
4141
4251
|
}
|
4142
|
-
function
|
4143
|
-
return
|
4252
|
+
function Vi(t) {
|
4253
|
+
return Zi(t) && Ui.call(t, "callee") && (!ji.call(t, "callee") || Fn.call(t) == Oi);
|
4144
4254
|
}
|
4145
|
-
var
|
4146
|
-
function
|
4147
|
-
return t != null &&
|
4255
|
+
var Ji = Array.isArray;
|
4256
|
+
function qi(t) {
|
4257
|
+
return t != null && to(t.length) && !Qi(t);
|
4148
4258
|
}
|
4149
|
-
function
|
4150
|
-
return
|
4259
|
+
function Zi(t) {
|
4260
|
+
return Ps(t) && qi(t);
|
4151
4261
|
}
|
4152
|
-
function
|
4153
|
-
var r =
|
4154
|
-
return r ==
|
4262
|
+
function Qi(t) {
|
4263
|
+
var r = eo(t) ? Fn.call(t) : "";
|
4264
|
+
return r == Ci || r == Pi;
|
4155
4265
|
}
|
4156
|
-
function
|
4157
|
-
return typeof t == "number" && t > -1 && t % 1 == 0 && t <=
|
4266
|
+
function to(t) {
|
4267
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= xi;
|
4158
4268
|
}
|
4159
|
-
function
|
4269
|
+
function eo(t) {
|
4160
4270
|
var r = typeof t;
|
4161
4271
|
return !!t && (r == "object" || r == "function");
|
4162
4272
|
}
|
4163
|
-
function
|
4273
|
+
function Ps(t) {
|
4164
4274
|
return !!t && typeof t == "object";
|
4165
4275
|
}
|
4166
|
-
function
|
4167
|
-
return typeof t == "symbol" ||
|
4276
|
+
function ro(t) {
|
4277
|
+
return typeof t == "symbol" || Ps(t) && Fn.call(t) == Ri;
|
4168
4278
|
}
|
4169
|
-
var
|
4170
|
-
return t == null ? {} :
|
4171
|
-
}),
|
4172
|
-
const
|
4279
|
+
var no = Yi(function(t, r) {
|
4280
|
+
return t == null ? {} : Bi(t, Ni(Wi(r), Ki));
|
4281
|
+
}), so = no;
|
4282
|
+
const rs = /* @__PURE__ */ xn(so), ao = {
|
4173
4283
|
width: 1080,
|
4174
4284
|
height: 1920
|
4175
|
-
},
|
4176
|
-
size:
|
4177
|
-
fps:
|
4285
|
+
}, io = 30, oo = {
|
4286
|
+
size: ao,
|
4287
|
+
fps: io,
|
4178
4288
|
tracks: [],
|
4179
4289
|
trackItemIds: [],
|
4180
4290
|
trackItemsMap: {},
|
@@ -4195,7 +4305,7 @@ const es = /* @__PURE__ */ Dn(Qi), to = {
|
|
4195
4305
|
value: "transparent"
|
4196
4306
|
},
|
4197
4307
|
acceptsMap: {}
|
4198
|
-
},
|
4308
|
+
}, ns = [
|
4199
4309
|
"tracks",
|
4200
4310
|
"trackItemsMap",
|
4201
4311
|
"trackItemDetailsMap",
|
@@ -4204,24 +4314,24 @@ const es = /* @__PURE__ */ Dn(Qi), to = {
|
|
4204
4314
|
"trackItemIds",
|
4205
4315
|
"structure"
|
4206
4316
|
];
|
4207
|
-
class
|
4317
|
+
class Fo {
|
4208
4318
|
constructor(r) {
|
4209
|
-
|
4210
|
-
|
4211
|
-
|
4212
|
-
|
4213
|
-
|
4214
|
-
|
4215
|
-
|
4216
|
-
|
4217
|
-
const e = Object.assign({},
|
4218
|
-
this.stateSubject = new
|
4319
|
+
Ct(this, "stateSubject");
|
4320
|
+
Ct(this, "stateHistorySubject");
|
4321
|
+
Ct(this, "prevState");
|
4322
|
+
Ct(this, "background");
|
4323
|
+
Ct(this, "undos", []);
|
4324
|
+
Ct(this, "redos", []);
|
4325
|
+
Ct(this, "acceptsMap");
|
4326
|
+
Ct(this, "listener");
|
4327
|
+
const e = Object.assign({}, oo, r);
|
4328
|
+
this.stateSubject = new Bn(e), this.stateHistorySubject = new Bn({
|
4219
4329
|
handleRedo: !1,
|
4220
4330
|
handleUndo: !1
|
4221
4331
|
}), this.background = e.background, this.prevState = e, this.acceptsMap = e.acceptsMap, this.initListeners();
|
4222
4332
|
}
|
4223
4333
|
initListeners() {
|
4224
|
-
|
4334
|
+
Ii(this);
|
4225
4335
|
}
|
4226
4336
|
destroyListeners() {
|
4227
4337
|
this.listener && this.listener.unsubscribe();
|
@@ -4230,7 +4340,7 @@ class Co {
|
|
4230
4340
|
this.destroyListeners();
|
4231
4341
|
}
|
4232
4342
|
updateHistory(r, e) {
|
4233
|
-
const s =
|
4343
|
+
const s = rs(r, ns), a = rs(this.getState(), ns), o = Ts(a, s);
|
4234
4344
|
o.length && (this.undos.push({ undos: o, type: e }), this.redos = []);
|
4235
4345
|
}
|
4236
4346
|
getStateHistory() {
|
@@ -4253,12 +4363,12 @@ class Co {
|
|
4253
4363
|
...x(s),
|
4254
4364
|
...x(r)
|
4255
4365
|
};
|
4256
|
-
|
4366
|
+
W(s, a) || (e.updateHistory && this.updateHistory(a, e.kind), this.prevState = s, this.stateSubject.next(a));
|
4257
4367
|
}
|
4258
4368
|
// emit changes for design size
|
4259
4369
|
subscribeToUpdateStateDetails(r) {
|
4260
4370
|
return this.stateSubject.asObservable().subscribe((e) => {
|
4261
|
-
(!
|
4371
|
+
(!W(e.size, this.prevState.size) || !W(e.background, this.prevState.background)) && r({
|
4262
4372
|
size: e.size,
|
4263
4373
|
background: e.background
|
4264
4374
|
});
|
@@ -4267,7 +4377,7 @@ class Co {
|
|
4267
4377
|
// Selectively subscribe to scale changes
|
4268
4378
|
subscribeToScale(r) {
|
4269
4379
|
return this.stateSubject.asObservable().subscribe((e) => {
|
4270
|
-
|
4380
|
+
W(e.scale, this.prevState.scale) || r({ scale: e.scale });
|
4271
4381
|
});
|
4272
4382
|
}
|
4273
4383
|
// Selectively subscribe to fps changes
|
@@ -4278,7 +4388,7 @@ class Co {
|
|
4278
4388
|
}
|
4279
4389
|
subscribeToUpdateTrackItem(r) {
|
4280
4390
|
return this.stateSubject.asObservable().subscribe((e) => {
|
4281
|
-
|
4391
|
+
W(e.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: e.trackItemsMap });
|
4282
4392
|
});
|
4283
4393
|
}
|
4284
4394
|
subscribeToUpdateAnimations(r) {
|
@@ -4286,7 +4396,7 @@ class Co {
|
|
4286
4396
|
const s = Object.keys(e.trackItemsMap).filter(
|
4287
4397
|
(a) => {
|
4288
4398
|
const o = this.prevState.trackItemsMap[a], u = e.trackItemsMap[a];
|
4289
|
-
return o && u && !
|
4399
|
+
return o && u && !W(o.animations, u.animations);
|
4290
4400
|
}
|
4291
4401
|
);
|
4292
4402
|
r({ trackItemsMap: e.trackItemsMap, changedAnimationIds: s });
|
@@ -4294,14 +4404,14 @@ class Co {
|
|
4294
4404
|
}
|
4295
4405
|
subscribeToUpdateTrackItemTiming(r) {
|
4296
4406
|
return this.stateSubject.asObservable().subscribe((e) => {
|
4297
|
-
if (!
|
4407
|
+
if (!W(e.trackItemsMap, this.prevState.trackItemsMap)) {
|
4298
4408
|
const s = Object.keys(e.trackItemsMap).filter((o) => {
|
4299
4409
|
const u = this.prevState.trackItemsMap[o], c = e.trackItemsMap[o];
|
4300
|
-
return u && c && !
|
4410
|
+
return u && c && !W(u.trim, c.trim);
|
4301
4411
|
}), a = Object.keys(e.trackItemsMap).filter(
|
4302
4412
|
(o) => {
|
4303
4413
|
const u = this.prevState.trackItemsMap[o], c = e.trackItemsMap[o];
|
4304
|
-
return u && c && !
|
4414
|
+
return u && c && !W(u.display, c.display);
|
4305
4415
|
}
|
4306
4416
|
);
|
4307
4417
|
r({
|
@@ -4314,7 +4424,7 @@ class Co {
|
|
4314
4424
|
}
|
4315
4425
|
subscribeToUpdateItemDetails(r) {
|
4316
4426
|
return this.stateSubject.asObservable().subscribe((e) => {
|
4317
|
-
|
4427
|
+
W(e.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: e.trackItemDetailsMap });
|
4318
4428
|
});
|
4319
4429
|
}
|
4320
4430
|
// Selectively subscribe to duration changes
|
@@ -4338,13 +4448,13 @@ class Co {
|
|
4338
4448
|
subscribeToAddOrRemoveItems(r) {
|
4339
4449
|
return this.stateSubject.asObservable().subscribe((e) => {
|
4340
4450
|
const s = [...e.trackItemIds].sort(), a = [...this.prevState.trackItemIds].sort(), o = [...e.transitionIds].sort(), u = [...this.prevState.transitionIds].sort();
|
4341
|
-
(!
|
4451
|
+
(!W(s, a) || !W(o, u)) && r({ trackItemIds: e.trackItemIds });
|
4342
4452
|
});
|
4343
4453
|
}
|
4344
4454
|
// Selectively subscribe to activeIds changes
|
4345
4455
|
subscribeToActiveIds(r) {
|
4346
4456
|
return this.stateSubject.asObservable().subscribe((e) => {
|
4347
|
-
|
4457
|
+
W(e.activeIds, this.prevState.activeIds) || r({ activeIds: e.activeIds });
|
4348
4458
|
});
|
4349
4459
|
}
|
4350
4460
|
subscribeToTracks(r) {
|
@@ -4361,10 +4471,10 @@ class Co {
|
|
4361
4471
|
// Selectively subscribe to multiple track-related properties
|
4362
4472
|
subscribeToState(r) {
|
4363
4473
|
return this.stateSubject.asObservable().subscribe((e) => {
|
4364
|
-
(!
|
4474
|
+
(!W(e.tracks, this.prevState.tracks) || !W(e.trackItemIds, this.prevState.trackItemIds) || !W(e.trackItemsMap, this.prevState.trackItemsMap) || !W(e.transitionIds, this.prevState.transitionIds) || !W(e.transitionsMap, this.prevState.transitionsMap) || !W(
|
4365
4475
|
e.trackItemDetailsMap,
|
4366
4476
|
this.prevState.trackItemDetailsMap
|
4367
|
-
) || !
|
4477
|
+
) || !W(e.structure, this.prevState.structure)) && r({
|
4368
4478
|
tracks: e.tracks,
|
4369
4479
|
trackItemIds: e.trackItemIds,
|
4370
4480
|
trackItemsMap: e.trackItemsMap,
|
@@ -4378,7 +4488,7 @@ class Co {
|
|
4378
4488
|
undo() {
|
4379
4489
|
const r = this.undos.pop(), e = r == null ? void 0 : r.undos, s = r == null ? void 0 : r.type;
|
4380
4490
|
if (!e || !s) return;
|
4381
|
-
|
4491
|
+
Zn();
|
4382
4492
|
const {
|
4383
4493
|
trackItemDetailsMap: a,
|
4384
4494
|
trackItemIds: o,
|
@@ -4395,67 +4505,67 @@ class Co {
|
|
4395
4505
|
transitionsMap: p,
|
4396
4506
|
trackItemsMap: h,
|
4397
4507
|
structure: k
|
4398
|
-
}), f = [], I = [], b = [], _ = [],
|
4508
|
+
}), f = [], I = [], b = [], _ = [], T = [], d = [], v = [];
|
4399
4509
|
e.forEach((O) => {
|
4400
4510
|
let N;
|
4401
|
-
const
|
4511
|
+
const at = O.path.slice(1);
|
4402
4512
|
O.type === "CREATE" ? N = {
|
4403
|
-
path:
|
4513
|
+
path: at,
|
4404
4514
|
op: "remove",
|
4405
4515
|
value: O.value
|
4406
4516
|
} : O.type === "CHANGE" ? N = {
|
4407
|
-
path:
|
4517
|
+
path: at,
|
4408
4518
|
op: "replace",
|
4409
4519
|
value: O.oldValue
|
4410
4520
|
} : N = {
|
4411
|
-
path:
|
4521
|
+
path: at,
|
4412
4522
|
op: "add",
|
4413
4523
|
value: O.oldValue
|
4414
|
-
}, O.path.includes("trackItemIds") ? b.push(N) : O.path.includes("transitionIds") ? I.push(N) : O.path.includes("trackItemsMap") ?
|
4524
|
+
}, O.path.includes("trackItemIds") ? b.push(N) : O.path.includes("transitionIds") ? I.push(N) : O.path.includes("trackItemsMap") ? T.push(N) : O.path.includes("transitionsMap") ? _.push(N) : O.path.includes("tracks") ? f.push(N) : O.path.includes("trackItemDetailsMap") ? d.push(N) : O.path.includes("structure") && v.push(N);
|
4415
4525
|
});
|
4416
4526
|
const S = this.applyPatch(
|
4417
4527
|
m.tracks,
|
4418
4528
|
f
|
4419
|
-
),
|
4529
|
+
), y = this.applyPatch(
|
4420
4530
|
m.transitionIds,
|
4421
4531
|
I
|
4422
4532
|
), w = this.applyPatch(
|
4423
4533
|
m.trackItemIds,
|
4424
4534
|
b
|
4425
|
-
),
|
4535
|
+
), M = this.applyPatch(
|
4426
4536
|
m.transitionsMap,
|
4427
4537
|
_
|
4428
|
-
),
|
4538
|
+
), E = this.applyPatch(
|
4429
4539
|
m.trackItemsMap,
|
4430
|
-
|
4431
|
-
),
|
4540
|
+
T
|
4541
|
+
), U = this.applyPatch(
|
4432
4542
|
m.trackItemDetailsMap,
|
4433
4543
|
d
|
4434
4544
|
), C = this.applyPatch(
|
4435
4545
|
m.structure,
|
4436
4546
|
v
|
4437
|
-
),
|
4547
|
+
), q = x({
|
4438
4548
|
tracks: S,
|
4439
|
-
transitionIds:
|
4549
|
+
transitionIds: y,
|
4440
4550
|
trackItemIds: w,
|
4441
|
-
transitionsMap:
|
4442
|
-
trackItemsMap:
|
4443
|
-
trackItemDetailsMap:
|
4551
|
+
transitionsMap: M,
|
4552
|
+
trackItemsMap: E,
|
4553
|
+
trackItemDetailsMap: U,
|
4444
4554
|
structure: C
|
4445
|
-
}), L = x(this.getState()), Y = { ...L, ...
|
4555
|
+
}), L = x(this.getState()), Y = { ...L, ...q };
|
4446
4556
|
this.prevState = L, this.redos.push({ redos: e, type: s });
|
4447
|
-
const mt =
|
4557
|
+
const mt = J(Y.trackItemsMap);
|
4448
4558
|
this.stateSubject.next({ ...Y, duration: mt }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 }), this.updateState(Y, { updateHistory: !1 });
|
4449
4559
|
}
|
4450
4560
|
applyPatch(r, e) {
|
4451
|
-
return e.reverse().reduce((s, a) =>
|
4452
|
-
|
4561
|
+
return e.reverse().reduce((s, a) => Ai(s, (o) => {
|
4562
|
+
Di(o, [a]);
|
4453
4563
|
}), r);
|
4454
4564
|
}
|
4455
4565
|
redo() {
|
4456
4566
|
const r = this.redos.pop(), e = r == null ? void 0 : r.redos, s = r == null ? void 0 : r.type;
|
4457
4567
|
if (!e || !s) return;
|
4458
|
-
|
4568
|
+
Zn();
|
4459
4569
|
const {
|
4460
4570
|
trackItemDetailsMap: a,
|
4461
4571
|
trackItemIds: o,
|
@@ -4472,56 +4582,56 @@ class Co {
|
|
4472
4582
|
transitionsMap: p,
|
4473
4583
|
trackItemsMap: h,
|
4474
4584
|
structure: k
|
4475
|
-
}), f = [], I = [], b = [], _ = [],
|
4585
|
+
}), f = [], I = [], b = [], _ = [], T = [], d = [], v = [];
|
4476
4586
|
e.forEach((O) => {
|
4477
4587
|
let N;
|
4478
|
-
const
|
4588
|
+
const at = O.path.slice(1);
|
4479
4589
|
O.type === "CREATE" ? N = {
|
4480
|
-
path:
|
4590
|
+
path: at,
|
4481
4591
|
op: "add",
|
4482
4592
|
value: O.value
|
4483
4593
|
} : O.type === "CHANGE" ? N = {
|
4484
|
-
path:
|
4594
|
+
path: at,
|
4485
4595
|
op: "replace",
|
4486
4596
|
value: O.value
|
4487
4597
|
} : N = {
|
4488
|
-
path:
|
4598
|
+
path: at,
|
4489
4599
|
op: "remove",
|
4490
4600
|
value: O.oldValue
|
4491
|
-
}, O.path.includes("trackItemIds") ? b.push(N) : O.path.includes("transitionIds") ? I.push(N) : O.path.includes("trackItemsMap") ?
|
4601
|
+
}, O.path.includes("trackItemIds") ? b.push(N) : O.path.includes("transitionIds") ? I.push(N) : O.path.includes("trackItemsMap") ? T.push(N) : O.path.includes("transitionsMap") ? _.push(N) : O.path.includes("trackItemDetailsMap") ? d.push(N) : O.path.includes("structure") ? v.push(N) : f.push(N);
|
4492
4602
|
});
|
4493
4603
|
const S = this.applyPatch(
|
4494
4604
|
m.tracks,
|
4495
4605
|
f
|
4496
|
-
),
|
4606
|
+
), y = this.applyPatch(
|
4497
4607
|
m.transitionIds,
|
4498
4608
|
I
|
4499
4609
|
), w = this.applyPatch(
|
4500
4610
|
m.trackItemIds,
|
4501
4611
|
b
|
4502
|
-
),
|
4612
|
+
), M = this.applyPatch(
|
4503
4613
|
m.transitionsMap,
|
4504
4614
|
_
|
4505
|
-
),
|
4615
|
+
), E = this.applyPatch(
|
4506
4616
|
m.trackItemsMap,
|
4507
|
-
|
4508
|
-
),
|
4617
|
+
T
|
4618
|
+
), U = this.applyPatch(
|
4509
4619
|
m.trackItemDetailsMap,
|
4510
4620
|
d
|
4511
4621
|
), C = this.applyPatch(
|
4512
4622
|
m.structure,
|
4513
4623
|
v
|
4514
|
-
),
|
4624
|
+
), q = x({
|
4515
4625
|
tracks: S,
|
4516
|
-
transitionIds:
|
4626
|
+
transitionIds: y,
|
4517
4627
|
trackItemIds: w,
|
4518
|
-
transitionsMap:
|
4519
|
-
trackItemsMap:
|
4520
|
-
trackItemDetailsMap:
|
4628
|
+
transitionsMap: M,
|
4629
|
+
trackItemsMap: E,
|
4630
|
+
trackItemDetailsMap: U,
|
4521
4631
|
structure: C
|
4522
|
-
}), L = x(this.getState()), Y = { ...L, ...
|
4632
|
+
}), L = x(this.getState()), Y = { ...L, ...q };
|
4523
4633
|
this.prevState = L, this.undos.push({ undos: e, type: s });
|
4524
|
-
const mt =
|
4634
|
+
const mt = J(Y.trackItemsMap);
|
4525
4635
|
this.stateSubject.next({ ...Y, duration: mt }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 }), this.updateState(Y, { updateHistory: !1 });
|
4526
4636
|
}
|
4527
4637
|
toJSON() {
|
@@ -4548,73 +4658,76 @@ class Co {
|
|
4548
4658
|
}
|
4549
4659
|
}
|
4550
4660
|
export {
|
4551
|
-
|
4552
|
-
|
4553
|
-
|
4554
|
-
|
4555
|
-
|
4556
|
-
|
4557
|
-
|
4558
|
-
|
4559
|
-
|
4560
|
-
|
4561
|
-
|
4562
|
-
|
4563
|
-
|
4564
|
-
|
4565
|
-
|
4566
|
-
|
4567
|
-
|
4568
|
-
|
4569
|
-
pa as
|
4570
|
-
ha as
|
4571
|
-
|
4572
|
-
|
4573
|
-
|
4574
|
-
|
4575
|
-
|
4576
|
-
ra as
|
4577
|
-
|
4578
|
-
|
4579
|
-
|
4580
|
-
|
4581
|
-
|
4582
|
-
|
4583
|
-
|
4584
|
-
|
4585
|
-
|
4586
|
-
|
4587
|
-
|
4588
|
-
|
4589
|
-
|
4590
|
-
|
4591
|
-
|
4592
|
-
|
4593
|
-
|
4594
|
-
|
4595
|
-
|
4596
|
-
|
4597
|
-
|
4598
|
-
|
4599
|
-
|
4600
|
-
|
4601
|
-
|
4602
|
-
|
4661
|
+
Mo as ACTIVE_CLONE,
|
4662
|
+
wo as ACTIVE_DELETE,
|
4663
|
+
Sa as ACTIVE_PASTE,
|
4664
|
+
Re as ACTIVE_PREFIX,
|
4665
|
+
So as ACTIVE_SET,
|
4666
|
+
wa as ACTIVE_SPLIT,
|
4667
|
+
ca as ADD_ANIMATION,
|
4668
|
+
sa as ADD_AUDIO,
|
4669
|
+
ua as ADD_CAPTIONS,
|
4670
|
+
fa as ADD_COMPOSITION,
|
4671
|
+
ya as ADD_HILL_AUDIO_BARS,
|
4672
|
+
ia as ADD_ILLUSTRATION,
|
4673
|
+
aa as ADD_IMAGE,
|
4674
|
+
da as ADD_ITEMS,
|
4675
|
+
Ia as ADD_LINEAL_AUDIO_BARS,
|
4676
|
+
Io as ADD_MASK,
|
4677
|
+
mo as ADD_PLACEHOLDER,
|
4678
|
+
H as ADD_PREFIX,
|
4679
|
+
pa as ADD_PROGRESS_BAR,
|
4680
|
+
ha as ADD_PROGRESS_FRAME,
|
4681
|
+
ma as ADD_RADIAL_AUDIO_BARS,
|
4682
|
+
ba as ADD_RECT,
|
4683
|
+
oa as ADD_SHAPE,
|
4684
|
+
lo as ADD_SUFFIX,
|
4685
|
+
la as ADD_TEMPLATE,
|
4686
|
+
ra as ADD_TEXT,
|
4687
|
+
go as ADD_TRANSITION,
|
4688
|
+
na as ADD_VIDEO,
|
4689
|
+
ga as ADD_WAVE_AUDIO_BARS,
|
4690
|
+
Qs as BULK_PREFIX,
|
4691
|
+
_o as DELETE_TEMPLATE_ITEM,
|
4692
|
+
ta as DESIGN_LOAD,
|
4693
|
+
On as DESIGN_PREFIX,
|
4694
|
+
ea as DESIGN_RESIZE,
|
4695
|
+
va as EDIT_BACKGROUND_EDITOR,
|
4696
|
+
Gn as EDIT_BULK,
|
4697
|
+
ka as EDIT_OBJECT,
|
4698
|
+
Yt as EDIT_PREFIX,
|
4699
|
+
bo as EDIT_SHAPE,
|
4700
|
+
ko as EDIT_TEMPLATE_ITEM,
|
4701
|
+
yo as EDIT_TEXT,
|
4702
|
+
vo as ENTER_EDIT_MODE,
|
4703
|
+
Tr as HISTORY_PREFIX,
|
4704
|
+
Oa as HISTORY_REDO,
|
4705
|
+
$o as HISTORY_RESET,
|
4706
|
+
xa as HISTORY_UNDO,
|
4707
|
+
Ea as LAYER_CLONE,
|
4708
|
+
Ta as LAYER_COPY,
|
4709
|
+
zo as LAYER_CUT,
|
4710
|
+
Aa as LAYER_DELETE,
|
4711
|
+
Co as LAYER_EDITING_NAME,
|
4712
|
+
Eo as LAYER_HIDDEN,
|
4713
|
+
To as LAYER_LOCKED,
|
4714
|
+
Ao as LAYER_MOVE,
|
4715
|
+
Po as LAYER_PASTE,
|
4603
4716
|
et as LAYER_PREFIX,
|
4604
|
-
|
4605
|
-
|
4606
|
-
|
4607
|
-
|
4608
|
-
|
4609
|
-
|
4610
|
-
|
4611
|
-
|
4612
|
-
|
4613
|
-
|
4614
|
-
|
4615
|
-
|
4616
|
-
|
4617
|
-
|
4618
|
-
|
4619
|
-
|
4717
|
+
Oo as LAYER_RENAME,
|
4718
|
+
Da as LAYER_REPLACE,
|
4719
|
+
Ma as LAYER_SELECT,
|
4720
|
+
Do as LAYER_SELECTION,
|
4721
|
+
xo as LAYER_SEND_TO,
|
4722
|
+
Ro as LAYER_SPLIT,
|
4723
|
+
_a as REPLACE_MEDIA,
|
4724
|
+
ho as STATE_CHANGED,
|
4725
|
+
Zs as STATE_PREFIX,
|
4726
|
+
Ca as TIMELINE_SCALE_CHANGED,
|
4727
|
+
us as TIMELINE_SCALE_PREFIX,
|
4728
|
+
fo as TRACKS_CHANGED,
|
4729
|
+
po as TRACK_ITEMS_CHANGED,
|
4730
|
+
qs as TRACK_ITEMS_PREFIX,
|
4731
|
+
Js as TRACK_PREFIX,
|
4732
|
+
Fo as default
|
4620
4733
|
};
|