@designcombo/state 5.5.0 → 5.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -31,9 +31,9 @@ function kn(t) {
31
31
  function vn(t, r) {
32
32
  var e = typeof Symbol == "function" && t[Symbol.iterator];
33
33
  if (!e) return t;
34
- var n = e.call(t), i, a = [], u;
34
+ var n = e.call(t), i, o = [], u;
35
35
  try {
36
- for (; (r === void 0 || r-- > 0) && !(i = n.next()).done; ) a.push(i.value);
36
+ for (; (r === void 0 || r-- > 0) && !(i = n.next()).done; ) o.push(i.value);
37
37
  } catch (c) {
38
38
  u = { error: c };
39
39
  } finally {
@@ -43,12 +43,12 @@ function vn(t, r) {
43
43
  if (u) throw u.error;
44
44
  }
45
45
  }
46
- return a;
46
+ return o;
47
47
  }
48
48
  function _n(t, r, e) {
49
- if (e || arguments.length === 2) for (var n = 0, i = r.length, a; n < i; n++)
50
- (a || !(n in r)) && (a || (a = Array.prototype.slice.call(r, 0, n)), a[n] = r[n]);
51
- return t.concat(a || Array.prototype.slice.call(r));
49
+ if (e || arguments.length === 2) for (var n = 0, i = r.length, o; n < i; n++)
50
+ (o || !(n in r)) && (o || (o = Array.prototype.slice.call(r, 0, n)), o[n] = r[n]);
51
+ return t.concat(o || Array.prototype.slice.call(r));
52
52
  }
53
53
  function Dt(t) {
54
54
  return typeof t == "function";
@@ -79,7 +79,7 @@ var Mr = function() {
79
79
  this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
80
80
  }
81
81
  return t.prototype.unsubscribe = function() {
82
- var r, e, n, i, a;
82
+ var r, e, n, i, o;
83
83
  if (!this.closed) {
84
84
  this.closed = !0;
85
85
  var u = this._parentage;
@@ -90,8 +90,8 @@ var Mr = function() {
90
90
  var p = d.value;
91
91
  p.remove(this);
92
92
  }
93
- } catch (b) {
94
- r = { error: b };
93
+ } catch (I) {
94
+ r = { error: I };
95
95
  } finally {
96
96
  try {
97
97
  d && !d.done && (e = c.return) && e.call(c);
@@ -105,33 +105,33 @@ var Mr = function() {
105
105
  if (Dt(h))
106
106
  try {
107
107
  h();
108
- } catch (b) {
109
- a = b instanceof pn ? b.errors : [b];
108
+ } catch (I) {
109
+ o = I instanceof pn ? I.errors : [I];
110
110
  }
111
- var y = this._finalizers;
112
- if (y) {
111
+ var g = this._finalizers;
112
+ if (g) {
113
113
  this._finalizers = null;
114
114
  try {
115
- for (var m = kn(y), I = m.next(); !I.done; I = m.next()) {
116
- var k = I.value;
115
+ for (var m = kn(g), k = m.next(); !k.done; k = m.next()) {
116
+ var v = k.value;
117
117
  try {
118
- Wn(k);
119
- } catch (b) {
120
- a = a ?? [], b instanceof pn ? a = _n(_n([], vn(a)), vn(b.errors)) : a.push(b);
118
+ Wn(v);
119
+ } catch (I) {
120
+ o = o ?? [], I instanceof pn ? o = _n(_n([], vn(o)), vn(I.errors)) : o.push(I);
121
121
  }
122
122
  }
123
- } catch (b) {
124
- n = { error: b };
123
+ } catch (I) {
124
+ n = { error: I };
125
125
  } finally {
126
126
  try {
127
- I && !I.done && (i = m.return) && i.call(m);
127
+ k && !k.done && (i = m.return) && i.call(m);
128
128
  } finally {
129
129
  if (n) throw n.error;
130
130
  }
131
131
  }
132
132
  }
133
- if (a)
134
- throw new pn(a);
133
+ if (o)
134
+ throw new pn(o);
135
135
  }
136
136
  }, t.prototype.add = function(r) {
137
137
  var e;
@@ -257,12 +257,12 @@ var ls = function(t) {
257
257
  }(), wn = function(t) {
258
258
  rr(r, t);
259
259
  function r(e, n, i) {
260
- var a = t.call(this) || this, u;
260
+ var o = t.call(this) || this, u;
261
261
  return Dt(e) || !e ? u = {
262
262
  next: e ?? void 0,
263
263
  error: n ?? void 0,
264
264
  complete: i ?? void 0
265
- } : u = e, a.destination = new Gs(u), a;
265
+ } : u = e, o.destination = new Gs(u), o;
266
266
  }
267
267
  return r;
268
268
  }(ls);
@@ -298,11 +298,11 @@ var Bn = 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, n) {
301
- var i = this, a = Qs(r) ? r : new wn(r, e, n);
301
+ var i = this, o = Qs(r) ? r : new wn(r, e, n);
302
302
  return kr(function() {
303
303
  var u = i, c = u.operator, d = u.source;
304
- a.add(c ? c.call(a, d) : d ? i._subscribe(a) : i._trySubscribe(a));
305
- }), a;
304
+ o.add(c ? c.call(o, d) : d ? i._subscribe(o) : i._trySubscribe(o));
305
+ }), o;
306
306
  }, t.prototype._trySubscribe = function(r) {
307
307
  try {
308
308
  return this._subscribe(r);
@@ -311,16 +311,16 @@ var Bn = function() {
311
311
  }
312
312
  }, t.prototype.forEach = function(r, e) {
313
313
  var n = this;
314
- return e = Yn(e), new e(function(i, a) {
314
+ return e = Yn(e), new e(function(i, o) {
315
315
  var u = new wn({
316
316
  next: function(c) {
317
317
  try {
318
318
  r(c);
319
319
  } catch (d) {
320
- a(d), u.unsubscribe();
320
+ o(d), u.unsubscribe();
321
321
  }
322
322
  },
323
- error: a,
323
+ error: o,
324
324
  complete: i
325
325
  });
326
326
  n.subscribe(u);
@@ -337,13 +337,13 @@ var Bn = function() {
337
337
  }, t.prototype.toPromise = function(r) {
338
338
  var e = this;
339
339
  return r = Yn(r), new r(function(n, i) {
340
- var a;
340
+ var o;
341
341
  e.subscribe(function(u) {
342
- return a = u;
342
+ return o = u;
343
343
  }, function(u) {
344
344
  return i(u);
345
345
  }, function() {
346
- return n(a);
346
+ return n(o);
347
347
  });
348
348
  });
349
349
  }, t.create = function(r) {
@@ -379,7 +379,7 @@ var ti = os(function(t) {
379
379
  }, r.prototype.next = function(e) {
380
380
  var n = this;
381
381
  kr(function() {
382
- var i, a;
382
+ var i, o;
383
383
  if (n._throwIfClosed(), !n.isStopped) {
384
384
  n.currentObservers || (n.currentObservers = Array.from(n.observers));
385
385
  try {
@@ -391,7 +391,7 @@ var ti = os(function(t) {
391
391
  i = { error: p };
392
392
  } finally {
393
393
  try {
394
- c && !c.done && (a = u.return) && a.call(u);
394
+ c && !c.done && (o = u.return) && o.call(u);
395
395
  } finally {
396
396
  if (i) throw i.error;
397
397
  }
@@ -430,13 +430,13 @@ var ti = os(function(t) {
430
430
  }, r.prototype._subscribe = function(e) {
431
431
  return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
432
432
  }, r.prototype._innerSubscribe = function(e) {
433
- var n = this, i = this, a = i.hasError, u = i.isStopped, c = i.observers;
434
- return a || u ? cs : (this.currentObservers = null, c.push(e), new Mr(function() {
433
+ var n = this, i = this, o = i.hasError, u = i.isStopped, c = i.observers;
434
+ return o || u ? cs : (this.currentObservers = null, c.push(e), new Mr(function() {
435
435
  n.currentObservers = null, Sn(c, e);
436
436
  }));
437
437
  }, r.prototype._checkFinalizedStatuses = function(e) {
438
- var n = this, i = n.hasError, a = n.thrownError, u = n.isStopped;
439
- i ? e.error(a) : u && e.complete();
438
+ var n = this, i = n.hasError, o = n.thrownError, u = n.isStopped;
439
+ i ? e.error(o) : u && e.complete();
440
440
  }, r.prototype.asObservable = function() {
441
441
  var e = new Bn();
442
442
  return e.source = this, e;
@@ -478,10 +478,10 @@ var ti = os(function(t) {
478
478
  var n = t.prototype._subscribe.call(this, e);
479
479
  return !n.closed && e.next(this._value), n;
480
480
  }, r.prototype.getValue = function() {
481
- var e = this, n = e.hasError, i = e.thrownError, a = e._value;
481
+ var e = this, n = e.hasError, i = e.thrownError, o = e._value;
482
482
  if (n)
483
483
  throw i;
484
- return this._throwIfClosed(), a;
484
+ return this._throwIfClosed(), o;
485
485
  }, r.prototype.next = function(e) {
486
486
  t.prototype.next.call(this, this._value = e);
487
487
  }, r;
@@ -492,136 +492,136 @@ function Cn(t) {
492
492
  var vr = { exports: {} };
493
493
  vr.exports;
494
494
  (function(t, r) {
495
- var e = 200, n = "__lodash_hash_undefined__", i = 1, a = 2, u = 9007199254740991, c = "[object Arguments]", d = "[object Array]", p = "[object AsyncFunction]", h = "[object Boolean]", y = "[object Date]", m = "[object Error]", I = "[object Function]", k = "[object GeneratorFunction]", b = "[object Map]", _ = "[object Number]", f = "[object Null]", v = "[object Object]", w = "[object Promise]", S = "[object Proxy]", E = "[object RegExp]", T = "[object Set]", M = "[object String]", L = "[object Symbol]", R = "[object Undefined]", G = "[object WeakMap]", x = "[object ArrayBuffer]", F = "[object DataView]", et = "[object Float32Array]", Qt = "[object Float64Array]", te = "[object Int8Array]", Se = "[object Int16Array]", we = "[object Int32Array]", Te = "[object Uint8Array]", Me = "[object Uint8ClampedArray]", z = "[object Uint16Array]", Ee = "[object Uint32Array]", Ae = /[\\^$.*+?()[\]{}|]/g, st = /^\[object .+?Constructor\]$/, ee = /^(?:0|[1-9]\d*)$/, $ = {};
496
- $[et] = $[Qt] = $[te] = $[Se] = $[we] = $[Te] = $[Me] = $[z] = $[Ee] = !0, $[c] = $[d] = $[x] = $[h] = $[F] = $[y] = $[m] = $[I] = $[b] = $[_] = $[v] = $[E] = $[T] = $[M] = $[G] = !1;
495
+ var e = 200, n = "__lodash_hash_undefined__", i = 1, o = 2, u = 9007199254740991, c = "[object Arguments]", d = "[object Array]", p = "[object AsyncFunction]", h = "[object Boolean]", g = "[object Date]", m = "[object Error]", k = "[object Function]", v = "[object GeneratorFunction]", I = "[object Map]", _ = "[object Number]", f = "[object Null]", b = "[object Object]", w = "[object Promise]", S = "[object Proxy]", E = "[object RegExp]", T = "[object Set]", M = "[object String]", L = "[object Symbol]", R = "[object Undefined]", Y = "[object WeakMap]", x = "[object ArrayBuffer]", F = "[object DataView]", tt = "[object Float32Array]", Qt = "[object Float64Array]", te = "[object Int8Array]", Se = "[object Int16Array]", we = "[object Int32Array]", Te = "[object Uint8Array]", Me = "[object Uint8ClampedArray]", z = "[object Uint16Array]", Ee = "[object Uint32Array]", Ae = /[\\^$.*+?()[\]{}|]/g, st = /^\[object .+?Constructor\]$/, ee = /^(?:0|[1-9]\d*)$/, $ = {};
496
+ $[tt] = $[Qt] = $[te] = $[Se] = $[we] = $[Te] = $[Me] = $[z] = $[Ee] = !0, $[c] = $[d] = $[x] = $[h] = $[F] = $[g] = $[m] = $[k] = $[I] = $[_] = $[b] = $[E] = $[T] = $[M] = $[Y] = !1;
497
497
  var re = typeof ft == "object" && ft && ft.Object === Object && ft, xe = typeof self == "object" && self && self.Object === Object && self, it = re || xe || Function("return this")(), ne = r && !r.nodeType && r, se = ne && !0 && t && !t.nodeType && t, zt = se && se.exports === ne, $t = zt && re.process, ie = function() {
498
498
  try {
499
499
  return $t && $t.binding && $t.binding("util");
500
500
  } catch {
501
501
  }
502
502
  }(), Ft = ie && ie.isTypedArray;
503
- function ae(s, o) {
504
- for (var l = -1, g = s == null ? 0 : s.length, O = 0, A = []; ++l < g; ) {
503
+ function ae(s, a) {
504
+ for (var l = -1, y = s == null ? 0 : s.length, O = 0, A = []; ++l < y; ) {
505
505
  var D = s[l];
506
- o(D, l, s) && (A[O++] = D);
506
+ a(D, l, s) && (A[O++] = D);
507
507
  }
508
508
  return A;
509
509
  }
510
- function Nt(s, o) {
511
- for (var l = -1, g = o.length, O = s.length; ++l < g; )
512
- s[O + l] = o[l];
510
+ function Nt(s, a) {
511
+ for (var l = -1, y = a.length, O = s.length; ++l < y; )
512
+ s[O + l] = a[l];
513
513
  return s;
514
514
  }
515
- function oe(s, o) {
516
- for (var l = -1, g = s == null ? 0 : s.length; ++l < g; )
517
- if (o(s[l], l, s))
515
+ function oe(s, a) {
516
+ for (var l = -1, y = s == null ? 0 : s.length; ++l < y; )
517
+ if (a(s[l], l, s))
518
518
  return !0;
519
519
  return !1;
520
520
  }
521
- function Oe(s, o) {
522
- for (var l = -1, g = Array(s); ++l < s; )
523
- g[l] = o(l);
524
- return g;
521
+ function Oe(s, a) {
522
+ for (var l = -1, y = Array(s); ++l < s; )
523
+ y[l] = a(l);
524
+ return y;
525
525
  }
526
526
  function Ce(s) {
527
- return function(o) {
528
- return s(o);
527
+ return function(a) {
528
+ return s(a);
529
529
  };
530
530
  }
531
- function wt(s, o) {
532
- return s.has(o);
531
+ function wt(s, a) {
532
+ return s.has(a);
533
533
  }
534
- function Lt(s, o) {
535
- return s == null ? void 0 : s[o];
534
+ function Lt(s, a) {
535
+ return s == null ? void 0 : s[a];
536
536
  }
537
537
  function ce(s) {
538
- var o = -1, l = Array(s.size);
539
- return s.forEach(function(g, O) {
540
- l[++o] = [O, g];
538
+ var a = -1, l = Array(s.size);
539
+ return s.forEach(function(y, O) {
540
+ l[++a] = [O, y];
541
541
  }), l;
542
542
  }
543
- function ue(s, o) {
543
+ function ue(s, a) {
544
544
  return function(l) {
545
- return s(o(l));
545
+ return s(a(l));
546
546
  };
547
547
  }
548
548
  function ut(s) {
549
- var o = -1, l = Array(s.size);
550
- return s.forEach(function(g) {
551
- l[++o] = g;
549
+ var a = -1, l = Array(s.size);
550
+ return s.forEach(function(y) {
551
+ l[++a] = y;
552
552
  }), l;
553
553
  }
554
- var Tt = Array.prototype, Re = Function.prototype, yt = Object.prototype, Mt = it["__core-js_shared__"], Ht = Re.toString, rt = yt.hasOwnProperty, le = function() {
554
+ var Tt = Array.prototype, Re = Function.prototype, gt = Object.prototype, Mt = it["__core-js_shared__"], Ht = Re.toString, et = gt.hasOwnProperty, le = function() {
555
555
  var s = /[^.]+$/.exec(Mt && Mt.keys && Mt.keys.IE_PROTO || "");
556
556
  return s ? "Symbol(src)_1." + s : "";
557
- }(), de = yt.toString, Pe = RegExp(
558
- "^" + Ht.call(rt).replace(Ae, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
559
- ), Ut = zt ? it.Buffer : void 0, Et = it.Symbol, fe = it.Uint8Array, At = yt.propertyIsEnumerable, gt = Tt.splice, at = Et ? Et.toStringTag : void 0, xt = Object.getOwnPropertySymbols, Wt = Ut ? Ut.isBuffer : void 0, It = ue(Object.keys, Object), jt = Ct(it, "DataView"), bt = Ct(it, "Map"), Bt = Ct(it, "Promise"), Yt = Ct(it, "Set"), We = Ct(it, "WeakMap"), Gt = Ct(Object, "create"), ar = nt(jt), Ot = nt(bt), xr = nt(Bt), Or = nt(Yt), Cr = nt(We), or = Et ? Et.prototype : void 0, je = or ? or.valueOf : void 0;
557
+ }(), de = gt.toString, Pe = RegExp(
558
+ "^" + Ht.call(et).replace(Ae, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
559
+ ), Ut = zt ? it.Buffer : void 0, Et = it.Symbol, fe = it.Uint8Array, At = gt.propertyIsEnumerable, yt = Tt.splice, at = Et ? Et.toStringTag : void 0, xt = Object.getOwnPropertySymbols, Wt = Ut ? Ut.isBuffer : void 0, It = ue(Object.keys, Object), jt = Ct(it, "DataView"), bt = Ct(it, "Map"), Bt = Ct(it, "Promise"), Yt = Ct(it, "Set"), We = Ct(it, "WeakMap"), Gt = Ct(Object, "create"), ar = rt(jt), Ot = rt(bt), xr = rt(Bt), Or = rt(Yt), Cr = rt(We), or = Et ? Et.prototype : void 0, je = or ? or.valueOf : void 0;
560
560
  function X(s) {
561
- var o = -1, l = s == null ? 0 : s.length;
562
- for (this.clear(); ++o < l; ) {
563
- var g = s[o];
564
- this.set(g[0], g[1]);
561
+ var a = -1, l = s == null ? 0 : s.length;
562
+ for (this.clear(); ++a < l; ) {
563
+ var y = s[a];
564
+ this.set(y[0], y[1]);
565
565
  }
566
566
  }
567
567
  function Rr() {
568
568
  this.__data__ = Gt ? Gt(null) : {}, this.size = 0;
569
569
  }
570
570
  function Pr(s) {
571
- var o = this.has(s) && delete this.__data__[s];
572
- return this.size -= o ? 1 : 0, o;
571
+ var a = this.has(s) && delete this.__data__[s];
572
+ return this.size -= a ? 1 : 0, a;
573
573
  }
574
574
  function Dr(s) {
575
- var o = this.__data__;
575
+ var a = this.__data__;
576
576
  if (Gt) {
577
- var l = o[s];
577
+ var l = a[s];
578
578
  return l === n ? void 0 : l;
579
579
  }
580
- return rt.call(o, s) ? o[s] : void 0;
580
+ return et.call(a, s) ? a[s] : void 0;
581
581
  }
582
582
  function zr(s) {
583
- var o = this.__data__;
584
- return Gt ? o[s] !== void 0 : rt.call(o, s);
583
+ var a = this.__data__;
584
+ return Gt ? a[s] !== void 0 : et.call(a, s);
585
585
  }
586
- function $r(s, o) {
586
+ function $r(s, a) {
587
587
  var l = this.__data__;
588
- return this.size += this.has(s) ? 0 : 1, l[s] = Gt && o === void 0 ? n : o, this;
588
+ return this.size += this.has(s) ? 0 : 1, l[s] = Gt && a === void 0 ? n : a, this;
589
589
  }
590
590
  X.prototype.clear = Rr, X.prototype.delete = Pr, X.prototype.get = Dr, X.prototype.has = zr, X.prototype.set = $r;
591
591
  function q(s) {
592
- var o = -1, l = s == null ? 0 : s.length;
593
- for (this.clear(); ++o < l; ) {
594
- var g = s[o];
595
- this.set(g[0], g[1]);
592
+ var a = -1, l = s == null ? 0 : s.length;
593
+ for (this.clear(); ++a < l; ) {
594
+ var y = s[a];
595
+ this.set(y[0], y[1]);
596
596
  }
597
597
  }
598
598
  function Fr() {
599
599
  this.__data__ = [], this.size = 0;
600
600
  }
601
601
  function Nr(s) {
602
- var o = this.__data__, l = $e(o, s);
602
+ var a = this.__data__, l = $e(a, s);
603
603
  if (l < 0)
604
604
  return !1;
605
- var g = o.length - 1;
606
- return l == g ? o.pop() : gt.call(o, l, 1), --this.size, !0;
605
+ var y = a.length - 1;
606
+ return l == y ? a.pop() : yt.call(a, l, 1), --this.size, !0;
607
607
  }
608
608
  function Lr(s) {
609
- var o = this.__data__, l = $e(o, s);
610
- return l < 0 ? void 0 : o[l][1];
609
+ var a = this.__data__, l = $e(a, s);
610
+ return l < 0 ? void 0 : a[l][1];
611
611
  }
612
612
  function Hr(s) {
613
613
  return $e(this.__data__, s) > -1;
614
614
  }
615
- function Ur(s, o) {
616
- var l = this.__data__, g = $e(l, s);
617
- return g < 0 ? (++this.size, l.push([s, o])) : l[g][1] = o, this;
615
+ function Ur(s, a) {
616
+ var l = this.__data__, y = $e(l, s);
617
+ return y < 0 ? (++this.size, l.push([s, a])) : l[y][1] = a, this;
618
618
  }
619
619
  q.prototype.clear = Fr, q.prototype.delete = Nr, q.prototype.get = Lr, q.prototype.has = Hr, q.prototype.set = Ur;
620
620
  function ot(s) {
621
- var o = -1, l = s == null ? 0 : s.length;
622
- for (this.clear(); ++o < l; ) {
623
- var g = s[o];
624
- this.set(g[0], g[1]);
621
+ var a = -1, l = s == null ? 0 : s.length;
622
+ for (this.clear(); ++a < l; ) {
623
+ var y = s[a];
624
+ this.set(y[0], y[1]);
625
625
  }
626
626
  }
627
627
  function Wr() {
@@ -632,8 +632,8 @@ vr.exports;
632
632
  };
633
633
  }
634
634
  function jr(s) {
635
- var o = mt(this, s).delete(s);
636
- return this.size -= o ? 1 : 0, o;
635
+ var a = mt(this, s).delete(s);
636
+ return this.size -= a ? 1 : 0, a;
637
637
  }
638
638
  function Br(s) {
639
639
  return mt(this, s).get(s);
@@ -641,15 +641,15 @@ vr.exports;
641
641
  function Yr(s) {
642
642
  return mt(this, s).has(s);
643
643
  }
644
- function Gr(s, o) {
645
- var l = mt(this, s), g = l.size;
646
- return l.set(s, o), this.size += l.size == g ? 0 : 1, this;
644
+ function Gr(s, a) {
645
+ var l = mt(this, s), y = l.size;
646
+ return l.set(s, a), this.size += l.size == y ? 0 : 1, this;
647
647
  }
648
648
  ot.prototype.clear = Wr, ot.prototype.delete = jr, ot.prototype.get = Br, ot.prototype.has = Yr, ot.prototype.set = Gr;
649
649
  function De(s) {
650
- var o = -1, l = s == null ? 0 : s.length;
651
- for (this.__data__ = new ot(); ++o < l; )
652
- this.add(s[o]);
650
+ var a = -1, l = s == null ? 0 : s.length;
651
+ for (this.__data__ = new ot(); ++a < l; )
652
+ this.add(s[a]);
653
653
  }
654
654
  function cr(s) {
655
655
  return this.__data__.set(s, n), this;
@@ -659,15 +659,15 @@ vr.exports;
659
659
  }
660
660
  De.prototype.add = De.prototype.push = cr, De.prototype.has = ze;
661
661
  function kt(s) {
662
- var o = this.__data__ = new q(s);
663
- this.size = o.size;
662
+ var a = this.__data__ = new q(s);
663
+ this.size = a.size;
664
664
  }
665
665
  function Be() {
666
666
  this.__data__ = new q(), this.size = 0;
667
667
  }
668
668
  function Xr(s) {
669
- var o = this.__data__, l = o.delete(s);
670
- return this.size = o.size, l;
669
+ var a = this.__data__, l = a.delete(s);
670
+ return this.size = a.size, l;
671
671
  }
672
672
  function Kr(s) {
673
673
  return this.__data__.get(s);
@@ -675,36 +675,36 @@ vr.exports;
675
675
  function Vr(s) {
676
676
  return this.__data__.has(s);
677
677
  }
678
- function qr(s, o) {
678
+ function qr(s, a) {
679
679
  var l = this.__data__;
680
680
  if (l instanceof q) {
681
- var g = l.__data__;
682
- if (!bt || g.length < e - 1)
683
- return g.push([s, o]), this.size = ++l.size, this;
684
- l = this.__data__ = new ot(g);
681
+ var y = l.__data__;
682
+ if (!bt || y.length < e - 1)
683
+ return y.push([s, a]), this.size = ++l.size, this;
684
+ l = this.__data__ = new ot(y);
685
685
  }
686
- return l.set(s, o), this.size = l.size, this;
686
+ return l.set(s, a), this.size = l.size, this;
687
687
  }
688
688
  kt.prototype.clear = Be, kt.prototype.delete = Xr, kt.prototype.get = Kr, kt.prototype.has = Vr, kt.prototype.set = qr;
689
- function Jr(s, o) {
690
- var l = Fe(s), g = !l && pr(s), O = !l && !g && Ne(s), A = !l && !g && !O && yr(s), D = l || g || O || A, P = D ? Oe(s.length, String) : [], U = P.length;
689
+ function Jr(s, a) {
690
+ var l = Fe(s), y = !l && pr(s), O = !l && !y && Ne(s), A = !l && !y && !O && gr(s), D = l || y || O || A, P = D ? Oe(s.length, String) : [], U = P.length;
691
691
  for (var N in s)
692
- rt.call(s, N) && !(D && // Safari 9 has enumerable `arguments.length` in strict mode.
692
+ et.call(s, N) && !(D && // Safari 9 has enumerable `arguments.length` in strict mode.
693
693
  (N == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
694
694
  O && (N == "offset" || N == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
695
695
  A && (N == "buffer" || N == "byteLength" || N == "byteOffset") || // Skip index properties.
696
696
  an(N, U))) && P.push(N);
697
697
  return P;
698
698
  }
699
- function $e(s, o) {
699
+ function $e(s, a) {
700
700
  for (var l = s.length; l--; )
701
- if (fr(s[l][0], o))
701
+ if (fr(s[l][0], a))
702
702
  return l;
703
703
  return -1;
704
704
  }
705
- function Ye(s, o, l) {
706
- var g = o(s);
707
- return Fe(s) ? g : Nt(g, l(s));
705
+ function Ye(s, a, l) {
706
+ var y = a(s);
707
+ return Fe(s) ? y : Nt(y, l(s));
708
708
  }
709
709
  function pe(s) {
710
710
  return s == null ? s === void 0 ? R : f : at && at in Object(s) ? Rt(s) : dr(s);
@@ -712,34 +712,34 @@ vr.exports;
712
712
  function ur(s) {
713
713
  return _t(s) && pe(s) == c;
714
714
  }
715
- function lr(s, o, l, g, O) {
716
- return s === o ? !0 : s == null || o == null || !_t(s) && !_t(o) ? s !== s && o !== o : Zr(s, o, l, g, lr, O);
715
+ function lr(s, a, l, y, O) {
716
+ return s === a ? !0 : s == null || a == null || !_t(s) && !_t(a) ? s !== s && a !== a : Zr(s, a, l, y, lr, O);
717
717
  }
718
- function Zr(s, o, l, g, O, A) {
719
- var D = Fe(s), P = Fe(o), U = D ? d : vt(s), N = P ? d : vt(o);
720
- U = U == c ? v : U, N = N == c ? v : N;
721
- var J = U == v, ct = N == v, W = U == N;
718
+ function Zr(s, a, l, y, O, A) {
719
+ var D = Fe(s), P = Fe(a), U = D ? d : vt(s), N = P ? d : vt(a);
720
+ U = U == c ? b : U, N = N == c ? b : N;
721
+ var J = U == b, ct = N == b, W = U == N;
722
722
  if (W && Ne(s)) {
723
- if (!Ne(o))
723
+ if (!Ne(a))
724
724
  return !1;
725
725
  D = !0, J = !1;
726
726
  }
727
727
  if (W && !J)
728
- return A || (A = new kt()), D || yr(s) ? Ge(s, o, l, g, O, A) : rn(s, o, U, l, g, O, A);
728
+ return A || (A = new kt()), D || gr(s) ? Ge(s, a, l, y, O, A) : rn(s, a, U, l, y, O, A);
729
729
  if (!(l & i)) {
730
- var Z = J && rt.call(s, "__wrapped__"), K = ct && rt.call(o, "__wrapped__");
730
+ var Z = J && et.call(s, "__wrapped__"), K = ct && et.call(a, "__wrapped__");
731
731
  if (Z || K) {
732
- var Xt = Z ? s.value() : s, Pt = K ? o.value() : o;
733
- return A || (A = new kt()), O(Xt, Pt, l, g, A);
732
+ var Xt = Z ? s.value() : s, Pt = K ? a.value() : a;
733
+ return A || (A = new kt()), O(Xt, Pt, l, y, A);
734
734
  }
735
735
  }
736
- return W ? (A || (A = new kt()), nn(s, o, l, g, O, A)) : !1;
736
+ return W ? (A || (A = new kt()), nn(s, a, l, y, O, A)) : !1;
737
737
  }
738
738
  function Qr(s) {
739
739
  if (!mr(s) || cn(s))
740
740
  return !1;
741
- var o = hr(s) ? Pe : st;
742
- return o.test(nt(s));
741
+ var a = hr(s) ? Pe : st;
742
+ return a.test(rt(s));
743
743
  }
744
744
  function tn(s) {
745
745
  return _t(s) && Ke(s.length) && !!$[pe(s)];
@@ -747,23 +747,23 @@ vr.exports;
747
747
  function en(s) {
748
748
  if (!un(s))
749
749
  return It(s);
750
- var o = [];
750
+ var a = [];
751
751
  for (var l in Object(s))
752
- rt.call(s, l) && l != "constructor" && o.push(l);
753
- return o;
752
+ et.call(s, l) && l != "constructor" && a.push(l);
753
+ return a;
754
754
  }
755
- function Ge(s, o, l, g, O, A) {
756
- var D = l & i, P = s.length, U = o.length;
755
+ function Ge(s, a, l, y, O, A) {
756
+ var D = l & i, P = s.length, U = a.length;
757
757
  if (P != U && !(D && U > P))
758
758
  return !1;
759
759
  var N = A.get(s);
760
- if (N && A.get(o))
761
- return N == o;
762
- var J = -1, ct = !0, W = l & a ? new De() : void 0;
763
- for (A.set(s, o), A.set(o, s); ++J < P; ) {
764
- var Z = s[J], K = o[J];
765
- if (g)
766
- var Xt = D ? g(K, Z, J, o, s, A) : g(Z, K, J, s, o, A);
760
+ if (N && A.get(a))
761
+ return N == a;
762
+ var J = -1, ct = !0, W = l & o ? new De() : void 0;
763
+ for (A.set(s, a), A.set(a, s); ++J < P; ) {
764
+ var Z = s[J], K = a[J];
765
+ if (y)
766
+ var Xt = D ? y(K, Z, J, a, s, A) : y(Z, K, J, s, a, A);
767
767
  if (Xt !== void 0) {
768
768
  if (Xt)
769
769
  continue;
@@ -771,147 +771,147 @@ vr.exports;
771
771
  break;
772
772
  }
773
773
  if (W) {
774
- if (!oe(o, function(Pt, me) {
775
- if (!wt(W, me) && (Z === Pt || O(Z, Pt, l, g, A)))
774
+ if (!oe(a, function(Pt, me) {
775
+ if (!wt(W, me) && (Z === Pt || O(Z, Pt, l, y, A)))
776
776
  return W.push(me);
777
777
  })) {
778
778
  ct = !1;
779
779
  break;
780
780
  }
781
- } else if (!(Z === K || O(Z, K, l, g, A))) {
781
+ } else if (!(Z === K || O(Z, K, l, y, A))) {
782
782
  ct = !1;
783
783
  break;
784
784
  }
785
785
  }
786
- return A.delete(s), A.delete(o), ct;
786
+ return A.delete(s), A.delete(a), ct;
787
787
  }
788
- function rn(s, o, l, g, O, A, D) {
788
+ function rn(s, a, l, y, O, A, D) {
789
789
  switch (l) {
790
790
  case F:
791
- if (s.byteLength != o.byteLength || s.byteOffset != o.byteOffset)
791
+ if (s.byteLength != a.byteLength || s.byteOffset != a.byteOffset)
792
792
  return !1;
793
- s = s.buffer, o = o.buffer;
793
+ s = s.buffer, a = a.buffer;
794
794
  case x:
795
- return !(s.byteLength != o.byteLength || !A(new fe(s), new fe(o)));
795
+ return !(s.byteLength != a.byteLength || !A(new fe(s), new fe(a)));
796
796
  case h:
797
- case y:
797
+ case g:
798
798
  case _:
799
- return fr(+s, +o);
799
+ return fr(+s, +a);
800
800
  case m:
801
- return s.name == o.name && s.message == o.message;
801
+ return s.name == a.name && s.message == a.message;
802
802
  case E:
803
803
  case M:
804
- return s == o + "";
805
- case b:
804
+ return s == a + "";
805
+ case I:
806
806
  var P = ce;
807
807
  case T:
808
- var U = g & i;
809
- if (P || (P = ut), s.size != o.size && !U)
808
+ var U = y & i;
809
+ if (P || (P = ut), s.size != a.size && !U)
810
810
  return !1;
811
811
  var N = D.get(s);
812
812
  if (N)
813
- return N == o;
814
- g |= a, D.set(s, o);
815
- var J = Ge(P(s), P(o), g, O, A, D);
813
+ return N == a;
814
+ y |= o, D.set(s, a);
815
+ var J = Ge(P(s), P(a), y, O, A, D);
816
816
  return D.delete(s), J;
817
817
  case L:
818
818
  if (je)
819
- return je.call(s) == je.call(o);
819
+ return je.call(s) == je.call(a);
820
820
  }
821
821
  return !1;
822
822
  }
823
- function nn(s, o, l, g, O, A) {
824
- var D = l & i, P = he(s), U = P.length, N = he(o), J = N.length;
823
+ function nn(s, a, l, y, O, A) {
824
+ var D = l & i, P = he(s), U = P.length, N = he(a), J = N.length;
825
825
  if (U != J && !D)
826
826
  return !1;
827
827
  for (var ct = U; ct--; ) {
828
828
  var W = P[ct];
829
- if (!(D ? W in o : rt.call(o, W)))
829
+ if (!(D ? W in a : et.call(a, W)))
830
830
  return !1;
831
831
  }
832
832
  var Z = A.get(s);
833
- if (Z && A.get(o))
834
- return Z == o;
833
+ if (Z && A.get(a))
834
+ return Z == a;
835
835
  var K = !0;
836
- A.set(s, o), A.set(o, s);
836
+ A.set(s, a), A.set(a, s);
837
837
  for (var Xt = D; ++ct < U; ) {
838
838
  W = P[ct];
839
- var Pt = s[W], me = o[W];
840
- if (g)
841
- var Un = D ? g(me, Pt, W, o, s, A) : g(Pt, me, W, s, o, A);
842
- if (!(Un === void 0 ? Pt === me || O(Pt, me, l, g, A) : Un)) {
839
+ var Pt = s[W], me = a[W];
840
+ if (y)
841
+ var Un = D ? y(me, Pt, W, a, s, A) : y(Pt, me, W, s, a, A);
842
+ if (!(Un === void 0 ? Pt === me || O(Pt, me, l, y, A) : Un)) {
843
843
  K = !1;
844
844
  break;
845
845
  }
846
846
  Xt || (Xt = W == "constructor");
847
847
  }
848
848
  if (K && !Xt) {
849
- var gr = s.constructor, Ir = o.constructor;
850
- gr != Ir && "constructor" in s && "constructor" in o && !(typeof gr == "function" && gr instanceof gr && typeof Ir == "function" && Ir instanceof Ir) && (K = !1);
849
+ var yr = s.constructor, Ir = a.constructor;
850
+ yr != Ir && "constructor" in s && "constructor" in a && !(typeof yr == "function" && yr instanceof yr && typeof Ir == "function" && Ir instanceof Ir) && (K = !1);
851
851
  }
852
- return A.delete(s), A.delete(o), K;
852
+ return A.delete(s), A.delete(a), K;
853
853
  }
854
854
  function he(s) {
855
855
  return Ye(s, Ve, sn);
856
856
  }
857
- function mt(s, o) {
857
+ function mt(s, a) {
858
858
  var l = s.__data__;
859
- return on(o) ? l[typeof o == "string" ? "string" : "hash"] : l.map;
859
+ return on(a) ? l[typeof a == "string" ? "string" : "hash"] : l.map;
860
860
  }
861
- function Ct(s, o) {
862
- var l = Lt(s, o);
861
+ function Ct(s, a) {
862
+ var l = Lt(s, a);
863
863
  return Qr(l) ? l : void 0;
864
864
  }
865
865
  function Rt(s) {
866
- var o = rt.call(s, at), l = s[at];
866
+ var a = et.call(s, at), l = s[at];
867
867
  try {
868
868
  s[at] = void 0;
869
- var g = !0;
869
+ var y = !0;
870
870
  } catch {
871
871
  }
872
872
  var O = de.call(s);
873
- return g && (o ? s[at] = l : delete s[at]), O;
873
+ return y && (a ? s[at] = l : delete s[at]), O;
874
874
  }
875
875
  var sn = xt ? function(s) {
876
- return s == null ? [] : (s = Object(s), ae(xt(s), function(o) {
877
- return At.call(s, o);
876
+ return s == null ? [] : (s = Object(s), ae(xt(s), function(a) {
877
+ return At.call(s, a);
878
878
  }));
879
879
  } : dn, vt = pe;
880
- (jt && vt(new jt(new ArrayBuffer(1))) != F || bt && vt(new bt()) != b || Bt && vt(Bt.resolve()) != w || Yt && vt(new Yt()) != T || We && vt(new We()) != G) && (vt = function(s) {
881
- var o = pe(s), l = o == v ? s.constructor : void 0, g = l ? nt(l) : "";
882
- if (g)
883
- switch (g) {
880
+ (jt && vt(new jt(new ArrayBuffer(1))) != F || bt && vt(new bt()) != I || Bt && vt(Bt.resolve()) != w || Yt && vt(new Yt()) != T || We && vt(new We()) != Y) && (vt = function(s) {
881
+ var a = pe(s), l = a == b ? s.constructor : void 0, y = l ? rt(l) : "";
882
+ if (y)
883
+ switch (y) {
884
884
  case ar:
885
885
  return F;
886
886
  case Ot:
887
- return b;
887
+ return I;
888
888
  case xr:
889
889
  return w;
890
890
  case Or:
891
891
  return T;
892
892
  case Cr:
893
- return G;
893
+ return Y;
894
894
  }
895
- return o;
895
+ return a;
896
896
  });
897
- function an(s, o) {
898
- return o = o ?? u, !!o && (typeof s == "number" || ee.test(s)) && s > -1 && s % 1 == 0 && s < o;
897
+ function an(s, a) {
898
+ return a = a ?? u, !!a && (typeof s == "number" || ee.test(s)) && s > -1 && s % 1 == 0 && s < a;
899
899
  }
900
900
  function on(s) {
901
- var o = typeof s;
902
- return o == "string" || o == "number" || o == "symbol" || o == "boolean" ? s !== "__proto__" : s === null;
901
+ var a = typeof s;
902
+ return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? s !== "__proto__" : s === null;
903
903
  }
904
904
  function cn(s) {
905
905
  return !!le && le in s;
906
906
  }
907
907
  function un(s) {
908
- var o = s && s.constructor, l = typeof o == "function" && o.prototype || yt;
908
+ var a = s && s.constructor, l = typeof a == "function" && a.prototype || gt;
909
909
  return s === l;
910
910
  }
911
911
  function dr(s) {
912
912
  return de.call(s);
913
913
  }
914
- function nt(s) {
914
+ function rt(s) {
915
915
  if (s != null) {
916
916
  try {
917
917
  return Ht.call(s);
@@ -924,38 +924,38 @@ vr.exports;
924
924
  }
925
925
  return "";
926
926
  }
927
- function fr(s, o) {
928
- return s === o || s !== s && o !== o;
927
+ function fr(s, a) {
928
+ return s === a || s !== s && a !== a;
929
929
  }
930
930
  var pr = ur(/* @__PURE__ */ function() {
931
931
  return arguments;
932
932
  }()) ? ur : function(s) {
933
- return _t(s) && rt.call(s, "callee") && !At.call(s, "callee");
933
+ return _t(s) && et.call(s, "callee") && !At.call(s, "callee");
934
934
  }, Fe = Array.isArray;
935
935
  function Xe(s) {
936
936
  return s != null && Ke(s.length) && !hr(s);
937
937
  }
938
938
  var Ne = Wt || fn;
939
- function ln(s, o) {
940
- return lr(s, o);
939
+ function ln(s, a) {
940
+ return lr(s, a);
941
941
  }
942
942
  function hr(s) {
943
943
  if (!mr(s))
944
944
  return !1;
945
- var o = pe(s);
946
- return o == I || o == k || o == p || o == S;
945
+ var a = pe(s);
946
+ return a == k || a == v || a == p || a == S;
947
947
  }
948
948
  function Ke(s) {
949
949
  return typeof s == "number" && s > -1 && s % 1 == 0 && s <= u;
950
950
  }
951
951
  function mr(s) {
952
- var o = typeof s;
953
- return s != null && (o == "object" || o == "function");
952
+ var a = typeof s;
953
+ return s != null && (a == "object" || a == "function");
954
954
  }
955
955
  function _t(s) {
956
956
  return s != null && typeof s == "object";
957
957
  }
958
- var yr = Ft ? Ce(Ft) : tn;
958
+ var gr = Ft ? Ce(Ft) : tn;
959
959
  function Ve(s) {
960
960
  return Xe(s) ? Jr(s) : en(s);
961
961
  }
@@ -968,66 +968,66 @@ vr.exports;
968
968
  t.exports = ln;
969
969
  })(vr, vr.exports);
970
970
  var ei = vr.exports;
971
- const j = /* @__PURE__ */ Cn(ei), vo = "add", ri = "track", ni = "trackItems", _o = `${ri}:changed`, So = `${ni}:changed`, si = "state", wo = `${si}:changed`, ii = "bulk", Kn = `${ii}:edit`, Rn = "design", ai = `${Rn}:load`, oi = `${Rn}:resize`, H = "add", ci = `${H}:text`, ui = `${H}:video`, li = `${H}:audio`, To = `${H}:placeholder`, di = `${H}:image`, fi = `${H}:illustration`, pi = `${H}:shape`, Mo = `${H}:mask`, Eo = `${H}:transition`, hi = `${H}:animation`, mi = `${H}:caption`, yi = `${H}:template`, gi = `${H}:items`, Ii = `${H}:composition`, bi = `${H}:progressBar`, ki = `${H}:progressFrame`, vi = `${H}:radialAudioBars`, _i = `${H}:linealAudioBars`, Si = `${H}:progressSquare`, wi = `${H}:waveAudioBars`, Ti = `${H}:hillAudioBars`, Mi = `${H}:rect`, Zt = "edit", Ei = `${Zt}:object`, Ai = `${Zt}:replaceMedia`, Ao = `${Zt}:text`, xo = `${Zt}:shape`, Oo = `${Zt}:templateItem`, Co = `${Zt}:deleteTemplateItem`, xi = `${Zt}:backgroundEditor`, Ro = "enterEditMode", Le = "active", Po = `${Le}:set`, Do = `${Le}:delete`, Oi = `${Le}:paste`, zo = `${Le}:clone`, Ci = `${Le}:split`, tt = "layer", $o = `${tt}:locked`, Fo = `${tt}:hidden`, No = `${tt}:move`, Ri = `${tt}:select`, Lo = `${tt}:selection`, Ho = `${tt}:sendTo`, Uo = `${tt}:rename`, Wo = `${tt}:editingName`, Pi = `${tt}:copy`, jo = `${tt}:paste`, Di = `${tt}:clone`, Bo = `${tt}:split`, Yo = `${tt}:cut`, zi = `${tt}:delete`, $i = `${tt}:replace`, Er = "history", Fi = `${Er}:undo`, Ni = `${Er}:redo`, Go = `${Er}:reset`, fs = "scale", Li = `${fs}:changed`;
971
+ const j = /* @__PURE__ */ Cn(ei), vo = "add", ri = "track", ni = "trackItems", _o = `${ri}:changed`, So = `${ni}:changed`, si = "state", wo = `${si}:changed`, ii = "bulk", Kn = `${ii}:edit`, Rn = "design", ai = `${Rn}:load`, oi = `${Rn}:resize`, H = "add", ci = `${H}:text`, ui = `${H}:video`, li = `${H}:audio`, To = `${H}:placeholder`, di = `${H}:image`, fi = `${H}:illustration`, pi = `${H}:shape`, Mo = `${H}:mask`, Eo = `${H}:transition`, hi = `${H}:animation`, mi = `${H}:caption`, gi = `${H}:template`, yi = `${H}:items`, Ii = `${H}:composition`, bi = `${H}:progressBar`, ki = `${H}:progressFrame`, vi = `${H}:radialAudioBars`, _i = `${H}:linealAudioBars`, Si = `${H}:progressSquare`, wi = `${H}:waveAudioBars`, Ti = `${H}:hillAudioBars`, Mi = `${H}:rect`, Zt = "edit", Ei = `${Zt}:object`, Ai = `${Zt}:replaceMedia`, Ao = `${Zt}:text`, xo = `${Zt}:shape`, Oo = `${Zt}:templateItem`, Co = `${Zt}:deleteTemplateItem`, xi = `${Zt}:backgroundEditor`, Ro = "enterEditMode", Le = "active", Po = `${Le}:set`, Do = `${Le}:delete`, Oi = `${Le}:paste`, zo = `${Le}:clone`, Ci = `${Le}:split`, Q = "layer", $o = `${Q}:locked`, Fo = `${Q}:hidden`, No = `${Q}:move`, Ri = `${Q}:select`, Lo = `${Q}:selection`, Ho = `${Q}:sendTo`, Uo = `${Q}:rename`, Wo = `${Q}:editingName`, Pi = `${Q}:copy`, jo = `${Q}:paste`, Di = `${Q}:clone`, Bo = `${Q}:split`, Yo = `${Q}:cut`, zi = `${Q}:delete`, $i = `${Q}:replace`, Er = "history", Fi = `${Er}:undo`, Ni = `${Er}:redo`, Go = `${Er}:reset`, fs = "scale", Li = `${fs}:changed`;
972
972
  var _r = { exports: {} };
973
973
  _r.exports;
974
974
  (function(t, r) {
975
- var e = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, a = "[object Arguments]", u = "[object Array]", c = "[object Boolean]", d = "[object Date]", p = "[object Error]", h = "[object Function]", y = "[object GeneratorFunction]", m = "[object Map]", I = "[object Number]", k = "[object Object]", b = "[object Promise]", _ = "[object RegExp]", f = "[object Set]", v = "[object String]", w = "[object Symbol]", S = "[object WeakMap]", E = "[object ArrayBuffer]", T = "[object DataView]", M = "[object Float32Array]", L = "[object Float64Array]", R = "[object Int8Array]", G = "[object Int16Array]", x = "[object Int32Array]", F = "[object Uint8Array]", et = "[object Uint8ClampedArray]", Qt = "[object Uint16Array]", te = "[object Uint32Array]", Se = /[\\^$.*+?()[\]{}|]/g, we = /\w*$/, Te = /^\[object .+?Constructor\]$/, Me = /^(?:0|[1-9]\d*)$/, z = {};
976
- z[a] = z[u] = z[E] = z[T] = z[c] = z[d] = z[M] = z[L] = z[R] = z[G] = z[x] = z[m] = z[I] = z[k] = z[_] = z[f] = z[v] = z[w] = z[F] = z[et] = z[Qt] = z[te] = !0, z[p] = z[h] = z[S] = !1;
975
+ var e = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, o = "[object Arguments]", u = "[object Array]", c = "[object Boolean]", d = "[object Date]", p = "[object Error]", h = "[object Function]", g = "[object GeneratorFunction]", m = "[object Map]", k = "[object Number]", v = "[object Object]", I = "[object Promise]", _ = "[object RegExp]", f = "[object Set]", b = "[object String]", w = "[object Symbol]", S = "[object WeakMap]", E = "[object ArrayBuffer]", T = "[object DataView]", M = "[object Float32Array]", L = "[object Float64Array]", R = "[object Int8Array]", Y = "[object Int16Array]", x = "[object Int32Array]", F = "[object Uint8Array]", tt = "[object Uint8ClampedArray]", Qt = "[object Uint16Array]", te = "[object Uint32Array]", Se = /[\\^$.*+?()[\]{}|]/g, we = /\w*$/, Te = /^\[object .+?Constructor\]$/, Me = /^(?:0|[1-9]\d*)$/, z = {};
976
+ z[o] = z[u] = z[E] = z[T] = z[c] = z[d] = z[M] = z[L] = z[R] = z[Y] = z[x] = z[m] = z[k] = z[v] = z[_] = z[f] = z[b] = z[w] = z[F] = z[tt] = z[Qt] = z[te] = !0, z[p] = z[h] = z[S] = !1;
977
977
  var Ee = typeof ft == "object" && ft && ft.Object === Object && ft, Ae = typeof self == "object" && self && self.Object === Object && self, st = Ee || Ae || Function("return this")(), ee = r && !r.nodeType && r, $ = ee && !0 && t && !t.nodeType && t, re = $ && $.exports === ee;
978
- function xe(s, o) {
979
- return s.set(o[0], o[1]), s;
978
+ function xe(s, a) {
979
+ return s.set(a[0], a[1]), s;
980
980
  }
981
- function it(s, o) {
982
- return s.add(o), s;
981
+ function it(s, a) {
982
+ return s.add(a), s;
983
983
  }
984
- function ne(s, o) {
985
- for (var l = -1, g = s ? s.length : 0; ++l < g && o(s[l], l, s) !== !1; )
984
+ function ne(s, a) {
985
+ for (var l = -1, y = s ? s.length : 0; ++l < y && a(s[l], l, s) !== !1; )
986
986
  ;
987
987
  return s;
988
988
  }
989
- function se(s, o) {
990
- for (var l = -1, g = o.length, O = s.length; ++l < g; )
991
- s[O + l] = o[l];
989
+ function se(s, a) {
990
+ for (var l = -1, y = a.length, O = s.length; ++l < y; )
991
+ s[O + l] = a[l];
992
992
  return s;
993
993
  }
994
- function zt(s, o, l, g) {
994
+ function zt(s, a, l, y) {
995
995
  for (var O = -1, A = s ? s.length : 0; ++O < A; )
996
- l = o(l, s[O], O, s);
996
+ l = a(l, s[O], O, s);
997
997
  return l;
998
998
  }
999
- function $t(s, o) {
1000
- for (var l = -1, g = Array(s); ++l < s; )
1001
- g[l] = o(l);
1002
- return g;
999
+ function $t(s, a) {
1000
+ for (var l = -1, y = Array(s); ++l < s; )
1001
+ y[l] = a(l);
1002
+ return y;
1003
1003
  }
1004
- function ie(s, o) {
1005
- return s == null ? void 0 : s[o];
1004
+ function ie(s, a) {
1005
+ return s == null ? void 0 : s[a];
1006
1006
  }
1007
1007
  function Ft(s) {
1008
- var o = !1;
1008
+ var a = !1;
1009
1009
  if (s != null && typeof s.toString != "function")
1010
1010
  try {
1011
- o = !!(s + "");
1011
+ a = !!(s + "");
1012
1012
  } catch {
1013
1013
  }
1014
- return o;
1014
+ return a;
1015
1015
  }
1016
1016
  function ae(s) {
1017
- var o = -1, l = Array(s.size);
1018
- return s.forEach(function(g, O) {
1019
- l[++o] = [O, g];
1017
+ var a = -1, l = Array(s.size);
1018
+ return s.forEach(function(y, O) {
1019
+ l[++a] = [O, y];
1020
1020
  }), l;
1021
1021
  }
1022
- function Nt(s, o) {
1022
+ function Nt(s, a) {
1023
1023
  return function(l) {
1024
- return s(o(l));
1024
+ return s(a(l));
1025
1025
  };
1026
1026
  }
1027
1027
  function oe(s) {
1028
- var o = -1, l = Array(s.size);
1029
- return s.forEach(function(g) {
1030
- l[++o] = g;
1028
+ var a = -1, l = Array(s.size);
1029
+ return s.forEach(function(y) {
1030
+ l[++a] = y;
1031
1031
  }), l;
1032
1032
  }
1033
1033
  var Oe = Array.prototype, Ce = Function.prototype, wt = Object.prototype, Lt = st["__core-js_shared__"], ce = function() {
@@ -1035,12 +1035,12 @@ _r.exports;
1035
1035
  return s ? "Symbol(src)_1." + s : "";
1036
1036
  }(), ue = Ce.toString, ut = wt.hasOwnProperty, Tt = wt.toString, Re = RegExp(
1037
1037
  "^" + ue.call(ut).replace(Se, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1038
- ), yt = re ? st.Buffer : void 0, Mt = st.Symbol, Ht = st.Uint8Array, rt = Nt(Object.getPrototypeOf, Object), le = Object.create, de = wt.propertyIsEnumerable, Pe = Oe.splice, Ut = Object.getOwnPropertySymbols, Et = yt ? yt.isBuffer : void 0, fe = Nt(Object.keys, Object), At = mt(st, "DataView"), gt = mt(st, "Map"), at = mt(st, "Promise"), xt = mt(st, "Set"), Wt = mt(st, "WeakMap"), It = mt(Object, "create"), jt = nt(At), bt = nt(gt), Bt = nt(at), Yt = nt(xt), We = nt(Wt), Gt = Mt ? Mt.prototype : void 0, ar = Gt ? Gt.valueOf : void 0;
1038
+ ), gt = re ? st.Buffer : void 0, Mt = st.Symbol, Ht = st.Uint8Array, et = Nt(Object.getPrototypeOf, Object), le = Object.create, de = wt.propertyIsEnumerable, Pe = Oe.splice, Ut = Object.getOwnPropertySymbols, Et = gt ? gt.isBuffer : void 0, fe = Nt(Object.keys, Object), At = mt(st, "DataView"), yt = mt(st, "Map"), at = mt(st, "Promise"), xt = mt(st, "Set"), Wt = mt(st, "WeakMap"), It = mt(Object, "create"), jt = rt(At), bt = rt(yt), Bt = rt(at), Yt = rt(xt), We = rt(Wt), Gt = Mt ? Mt.prototype : void 0, ar = Gt ? Gt.valueOf : void 0;
1039
1039
  function Ot(s) {
1040
- var o = -1, l = s ? s.length : 0;
1041
- for (this.clear(); ++o < l; ) {
1042
- var g = s[o];
1043
- this.set(g[0], g[1]);
1040
+ var a = -1, l = s ? s.length : 0;
1041
+ for (this.clear(); ++a < l; ) {
1042
+ var y = s[a];
1043
+ this.set(y[0], y[1]);
1044
1044
  }
1045
1045
  }
1046
1046
  function xr() {
@@ -1050,62 +1050,62 @@ _r.exports;
1050
1050
  return this.has(s) && delete this.__data__[s];
1051
1051
  }
1052
1052
  function Cr(s) {
1053
- var o = this.__data__;
1053
+ var a = this.__data__;
1054
1054
  if (It) {
1055
- var l = o[s];
1055
+ var l = a[s];
1056
1056
  return l === n ? void 0 : l;
1057
1057
  }
1058
- return ut.call(o, s) ? o[s] : void 0;
1058
+ return ut.call(a, s) ? a[s] : void 0;
1059
1059
  }
1060
1060
  function or(s) {
1061
- var o = this.__data__;
1062
- return It ? o[s] !== void 0 : ut.call(o, s);
1061
+ var a = this.__data__;
1062
+ return It ? a[s] !== void 0 : ut.call(a, s);
1063
1063
  }
1064
- function je(s, o) {
1064
+ function je(s, a) {
1065
1065
  var l = this.__data__;
1066
- return l[s] = It && o === void 0 ? n : o, this;
1066
+ return l[s] = It && a === void 0 ? n : a, this;
1067
1067
  }
1068
1068
  Ot.prototype.clear = xr, Ot.prototype.delete = Or, Ot.prototype.get = Cr, Ot.prototype.has = or, Ot.prototype.set = je;
1069
1069
  function X(s) {
1070
- var o = -1, l = s ? s.length : 0;
1071
- for (this.clear(); ++o < l; ) {
1072
- var g = s[o];
1073
- this.set(g[0], g[1]);
1070
+ var a = -1, l = s ? s.length : 0;
1071
+ for (this.clear(); ++a < l; ) {
1072
+ var y = s[a];
1073
+ this.set(y[0], y[1]);
1074
1074
  }
1075
1075
  }
1076
1076
  function Rr() {
1077
1077
  this.__data__ = [];
1078
1078
  }
1079
1079
  function Pr(s) {
1080
- var o = this.__data__, l = ze(o, s);
1080
+ var a = this.__data__, l = ze(a, s);
1081
1081
  if (l < 0)
1082
1082
  return !1;
1083
- var g = o.length - 1;
1084
- return l == g ? o.pop() : Pe.call(o, l, 1), !0;
1083
+ var y = a.length - 1;
1084
+ return l == y ? a.pop() : Pe.call(a, l, 1), !0;
1085
1085
  }
1086
1086
  function Dr(s) {
1087
- var o = this.__data__, l = ze(o, s);
1088
- return l < 0 ? void 0 : o[l][1];
1087
+ var a = this.__data__, l = ze(a, s);
1088
+ return l < 0 ? void 0 : a[l][1];
1089
1089
  }
1090
1090
  function zr(s) {
1091
1091
  return ze(this.__data__, s) > -1;
1092
1092
  }
1093
- function $r(s, o) {
1094
- var l = this.__data__, g = ze(l, s);
1095
- return g < 0 ? l.push([s, o]) : l[g][1] = o, this;
1093
+ function $r(s, a) {
1094
+ var l = this.__data__, y = ze(l, s);
1095
+ return y < 0 ? l.push([s, a]) : l[y][1] = a, this;
1096
1096
  }
1097
1097
  X.prototype.clear = Rr, X.prototype.delete = Pr, X.prototype.get = Dr, X.prototype.has = zr, X.prototype.set = $r;
1098
1098
  function q(s) {
1099
- var o = -1, l = s ? s.length : 0;
1100
- for (this.clear(); ++o < l; ) {
1101
- var g = s[o];
1102
- this.set(g[0], g[1]);
1099
+ var a = -1, l = s ? s.length : 0;
1100
+ for (this.clear(); ++a < l; ) {
1101
+ var y = s[a];
1102
+ this.set(y[0], y[1]);
1103
1103
  }
1104
1104
  }
1105
1105
  function Fr() {
1106
1106
  this.__data__ = {
1107
1107
  hash: new Ot(),
1108
- map: new (gt || X)(),
1108
+ map: new (yt || X)(),
1109
1109
  string: new Ot()
1110
1110
  };
1111
1111
  }
@@ -1118,8 +1118,8 @@ _r.exports;
1118
1118
  function Hr(s) {
1119
1119
  return he(this, s).has(s);
1120
1120
  }
1121
- function Ur(s, o) {
1122
- return he(this, s).set(s, o), this;
1121
+ function Ur(s, a) {
1122
+ return he(this, s).set(s, a), this;
1123
1123
  }
1124
1124
  q.prototype.clear = Fr, q.prototype.delete = Nr, q.prototype.get = Lr, q.prototype.has = Hr, q.prototype.set = Ur;
1125
1125
  function ot(s) {
@@ -1137,59 +1137,59 @@ _r.exports;
1137
1137
  function Yr(s) {
1138
1138
  return this.__data__.has(s);
1139
1139
  }
1140
- function Gr(s, o) {
1140
+ function Gr(s, a) {
1141
1141
  var l = this.__data__;
1142
1142
  if (l instanceof X) {
1143
- var g = l.__data__;
1144
- if (!gt || g.length < e - 1)
1145
- return g.push([s, o]), this;
1146
- l = this.__data__ = new q(g);
1143
+ var y = l.__data__;
1144
+ if (!yt || y.length < e - 1)
1145
+ return y.push([s, a]), this;
1146
+ l = this.__data__ = new q(y);
1147
1147
  }
1148
- return l.set(s, o), this;
1148
+ return l.set(s, a), this;
1149
1149
  }
1150
1150
  ot.prototype.clear = Wr, ot.prototype.delete = jr, ot.prototype.get = Br, ot.prototype.has = Yr, ot.prototype.set = Gr;
1151
- function De(s, o) {
1152
- var l = Xe(s) || Fe(s) ? $t(s.length, String) : [], g = l.length, O = !!g;
1151
+ function De(s, a) {
1152
+ var l = Xe(s) || Fe(s) ? $t(s.length, String) : [], y = l.length, O = !!y;
1153
1153
  for (var A in s)
1154
- ut.call(s, A) && !(O && (A == "length" || on(A, g))) && l.push(A);
1154
+ ut.call(s, A) && !(O && (A == "length" || on(A, y))) && l.push(A);
1155
1155
  return l;
1156
1156
  }
1157
- function cr(s, o, l) {
1158
- var g = s[o];
1159
- (!(ut.call(s, o) && pr(g, l)) || l === void 0 && !(o in s)) && (s[o] = l);
1157
+ function cr(s, a, l) {
1158
+ var y = s[a];
1159
+ (!(ut.call(s, a) && pr(y, l)) || l === void 0 && !(a in s)) && (s[a] = l);
1160
1160
  }
1161
- function ze(s, o) {
1161
+ function ze(s, a) {
1162
1162
  for (var l = s.length; l--; )
1163
- if (pr(s[l][0], o))
1163
+ if (pr(s[l][0], a))
1164
1164
  return l;
1165
1165
  return -1;
1166
1166
  }
1167
- function kt(s, o) {
1168
- return s && Ge(o, Ve(o), s);
1167
+ function kt(s, a) {
1168
+ return s && Ge(a, Ve(a), s);
1169
1169
  }
1170
- function Be(s, o, l, g, O, A, D) {
1170
+ function Be(s, a, l, y, O, A, D) {
1171
1171
  var P;
1172
- if (g && (P = A ? g(s, O, A, D) : g(s)), P !== void 0)
1172
+ if (y && (P = A ? y(s, O, A, D) : y(s)), P !== void 0)
1173
1173
  return P;
1174
1174
  if (!_t(s))
1175
1175
  return s;
1176
1176
  var U = Xe(s);
1177
1177
  if (U) {
1178
- if (P = sn(s), !o)
1178
+ if (P = sn(s), !a)
1179
1179
  return en(s, P);
1180
1180
  } else {
1181
- var N = Rt(s), J = N == h || N == y;
1181
+ var N = Rt(s), J = N == h || N == g;
1182
1182
  if (hr(s))
1183
- return $e(s, o);
1184
- if (N == k || N == a || J && !A) {
1183
+ return $e(s, a);
1184
+ if (N == v || N == o || J && !A) {
1185
1185
  if (Ft(s))
1186
1186
  return A ? s : {};
1187
- if (P = vt(J ? {} : s), !o)
1187
+ if (P = vt(J ? {} : s), !a)
1188
1188
  return rn(s, kt(P, s));
1189
1189
  } else {
1190
1190
  if (!z[N])
1191
1191
  return A ? s : {};
1192
- P = an(s, N, Be, o);
1192
+ P = an(s, N, Be, a);
1193
1193
  }
1194
1194
  }
1195
1195
  D || (D = new ot());
@@ -1199,15 +1199,15 @@ _r.exports;
1199
1199
  if (D.set(s, P), !U)
1200
1200
  var W = l ? nn(s) : Ve(s);
1201
1201
  return ne(W || s, function(Z, K) {
1202
- W && (K = Z, Z = s[K]), cr(P, K, Be(Z, o, l, g, K, s, D));
1202
+ W && (K = Z, Z = s[K]), cr(P, K, Be(Z, a, l, y, K, s, D));
1203
1203
  }), P;
1204
1204
  }
1205
1205
  function Xr(s) {
1206
1206
  return _t(s) ? le(s) : {};
1207
1207
  }
1208
- function Kr(s, o, l) {
1209
- var g = o(s);
1210
- return Xe(s) ? g : se(g, l(s));
1208
+ function Kr(s, a, l) {
1209
+ var y = a(s);
1210
+ return Xe(s) ? y : se(y, l(s));
1211
1211
  }
1212
1212
  function Vr(s) {
1213
1213
  return Tt.call(s);
@@ -1215,151 +1215,151 @@ _r.exports;
1215
1215
  function qr(s) {
1216
1216
  if (!_t(s) || un(s))
1217
1217
  return !1;
1218
- var o = Ke(s) || Ft(s) ? Re : Te;
1219
- return o.test(nt(s));
1218
+ var a = Ke(s) || Ft(s) ? Re : Te;
1219
+ return a.test(rt(s));
1220
1220
  }
1221
1221
  function Jr(s) {
1222
1222
  if (!dr(s))
1223
1223
  return fe(s);
1224
- var o = [];
1224
+ var a = [];
1225
1225
  for (var l in Object(s))
1226
- ut.call(s, l) && l != "constructor" && o.push(l);
1227
- return o;
1226
+ ut.call(s, l) && l != "constructor" && a.push(l);
1227
+ return a;
1228
1228
  }
1229
- function $e(s, o) {
1230
- if (o)
1229
+ function $e(s, a) {
1230
+ if (a)
1231
1231
  return s.slice();
1232
1232
  var l = new s.constructor(s.length);
1233
1233
  return s.copy(l), l;
1234
1234
  }
1235
1235
  function Ye(s) {
1236
- var o = new s.constructor(s.byteLength);
1237
- return new Ht(o).set(new Ht(s)), o;
1236
+ var a = new s.constructor(s.byteLength);
1237
+ return new Ht(a).set(new Ht(s)), a;
1238
1238
  }
1239
- function pe(s, o) {
1240
- var l = o ? Ye(s.buffer) : s.buffer;
1239
+ function pe(s, a) {
1240
+ var l = a ? Ye(s.buffer) : s.buffer;
1241
1241
  return new s.constructor(l, s.byteOffset, s.byteLength);
1242
1242
  }
1243
- function ur(s, o, l) {
1244
- var g = o ? l(ae(s), !0) : ae(s);
1245
- return zt(g, xe, new s.constructor());
1243
+ function ur(s, a, l) {
1244
+ var y = a ? l(ae(s), !0) : ae(s);
1245
+ return zt(y, xe, new s.constructor());
1246
1246
  }
1247
1247
  function lr(s) {
1248
- var o = new s.constructor(s.source, we.exec(s));
1249
- return o.lastIndex = s.lastIndex, o;
1248
+ var a = new s.constructor(s.source, we.exec(s));
1249
+ return a.lastIndex = s.lastIndex, a;
1250
1250
  }
1251
- function Zr(s, o, l) {
1252
- var g = o ? l(oe(s), !0) : oe(s);
1253
- return zt(g, it, new s.constructor());
1251
+ function Zr(s, a, l) {
1252
+ var y = a ? l(oe(s), !0) : oe(s);
1253
+ return zt(y, it, new s.constructor());
1254
1254
  }
1255
1255
  function Qr(s) {
1256
1256
  return ar ? Object(ar.call(s)) : {};
1257
1257
  }
1258
- function tn(s, o) {
1259
- var l = o ? Ye(s.buffer) : s.buffer;
1258
+ function tn(s, a) {
1259
+ var l = a ? Ye(s.buffer) : s.buffer;
1260
1260
  return new s.constructor(l, s.byteOffset, s.length);
1261
1261
  }
1262
- function en(s, o) {
1263
- var l = -1, g = s.length;
1264
- for (o || (o = Array(g)); ++l < g; )
1265
- o[l] = s[l];
1266
- return o;
1262
+ function en(s, a) {
1263
+ var l = -1, y = s.length;
1264
+ for (a || (a = Array(y)); ++l < y; )
1265
+ a[l] = s[l];
1266
+ return a;
1267
1267
  }
1268
- function Ge(s, o, l, g) {
1268
+ function Ge(s, a, l, y) {
1269
1269
  l || (l = {});
1270
- for (var O = -1, A = o.length; ++O < A; ) {
1271
- var D = o[O], P = void 0;
1270
+ for (var O = -1, A = a.length; ++O < A; ) {
1271
+ var D = a[O], P = void 0;
1272
1272
  cr(l, D, P === void 0 ? s[D] : P);
1273
1273
  }
1274
1274
  return l;
1275
1275
  }
1276
- function rn(s, o) {
1277
- return Ge(s, Ct(s), o);
1276
+ function rn(s, a) {
1277
+ return Ge(s, Ct(s), a);
1278
1278
  }
1279
1279
  function nn(s) {
1280
1280
  return Kr(s, Ve, Ct);
1281
1281
  }
1282
- function he(s, o) {
1282
+ function he(s, a) {
1283
1283
  var l = s.__data__;
1284
- return cn(o) ? l[typeof o == "string" ? "string" : "hash"] : l.map;
1284
+ return cn(a) ? l[typeof a == "string" ? "string" : "hash"] : l.map;
1285
1285
  }
1286
- function mt(s, o) {
1287
- var l = ie(s, o);
1286
+ function mt(s, a) {
1287
+ var l = ie(s, a);
1288
1288
  return qr(l) ? l : void 0;
1289
1289
  }
1290
1290
  var Ct = Ut ? Nt(Ut, Object) : dn, Rt = Vr;
1291
- (At && Rt(new At(new ArrayBuffer(1))) != T || gt && Rt(new gt()) != m || at && Rt(at.resolve()) != b || xt && Rt(new xt()) != f || Wt && Rt(new Wt()) != S) && (Rt = function(s) {
1292
- var o = Tt.call(s), l = o == k ? s.constructor : void 0, g = l ? nt(l) : void 0;
1293
- if (g)
1294
- switch (g) {
1291
+ (At && Rt(new At(new ArrayBuffer(1))) != T || yt && Rt(new yt()) != m || at && Rt(at.resolve()) != I || xt && Rt(new xt()) != f || Wt && Rt(new Wt()) != S) && (Rt = function(s) {
1292
+ var a = Tt.call(s), l = a == v ? s.constructor : void 0, y = l ? rt(l) : void 0;
1293
+ if (y)
1294
+ switch (y) {
1295
1295
  case jt:
1296
1296
  return T;
1297
1297
  case bt:
1298
1298
  return m;
1299
1299
  case Bt:
1300
- return b;
1300
+ return I;
1301
1301
  case Yt:
1302
1302
  return f;
1303
1303
  case We:
1304
1304
  return S;
1305
1305
  }
1306
- return o;
1306
+ return a;
1307
1307
  });
1308
1308
  function sn(s) {
1309
- var o = s.length, l = s.constructor(o);
1310
- return o && typeof s[0] == "string" && ut.call(s, "index") && (l.index = s.index, l.input = s.input), l;
1309
+ var a = s.length, l = s.constructor(a);
1310
+ return a && typeof s[0] == "string" && ut.call(s, "index") && (l.index = s.index, l.input = s.input), l;
1311
1311
  }
1312
1312
  function vt(s) {
1313
- return typeof s.constructor == "function" && !dr(s) ? Xr(rt(s)) : {};
1313
+ return typeof s.constructor == "function" && !dr(s) ? Xr(et(s)) : {};
1314
1314
  }
1315
- function an(s, o, l, g) {
1315
+ function an(s, a, l, y) {
1316
1316
  var O = s.constructor;
1317
- switch (o) {
1317
+ switch (a) {
1318
1318
  case E:
1319
1319
  return Ye(s);
1320
1320
  case c:
1321
1321
  case d:
1322
1322
  return new O(+s);
1323
1323
  case T:
1324
- return pe(s, g);
1324
+ return pe(s, y);
1325
1325
  case M:
1326
1326
  case L:
1327
1327
  case R:
1328
- case G:
1328
+ case Y:
1329
1329
  case x:
1330
1330
  case F:
1331
- case et:
1331
+ case tt:
1332
1332
  case Qt:
1333
1333
  case te:
1334
- return tn(s, g);
1334
+ return tn(s, y);
1335
1335
  case m:
1336
- return ur(s, g, l);
1337
- case I:
1338
- case v:
1336
+ return ur(s, y, l);
1337
+ case k:
1338
+ case b:
1339
1339
  return new O(s);
1340
1340
  case _:
1341
1341
  return lr(s);
1342
1342
  case f:
1343
- return Zr(s, g, l);
1343
+ return Zr(s, y, l);
1344
1344
  case w:
1345
1345
  return Qr(s);
1346
1346
  }
1347
1347
  }
1348
- function on(s, o) {
1349
- return o = o ?? i, !!o && (typeof s == "number" || Me.test(s)) && s > -1 && s % 1 == 0 && s < o;
1348
+ function on(s, a) {
1349
+ return a = a ?? i, !!a && (typeof s == "number" || Me.test(s)) && s > -1 && s % 1 == 0 && s < a;
1350
1350
  }
1351
1351
  function cn(s) {
1352
- var o = typeof s;
1353
- return o == "string" || o == "number" || o == "symbol" || o == "boolean" ? s !== "__proto__" : s === null;
1352
+ var a = typeof s;
1353
+ return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? s !== "__proto__" : s === null;
1354
1354
  }
1355
1355
  function un(s) {
1356
1356
  return !!ce && ce in s;
1357
1357
  }
1358
1358
  function dr(s) {
1359
- var o = s && s.constructor, l = typeof o == "function" && o.prototype || wt;
1359
+ var a = s && s.constructor, l = typeof a == "function" && a.prototype || wt;
1360
1360
  return s === l;
1361
1361
  }
1362
- function nt(s) {
1362
+ function rt(s) {
1363
1363
  if (s != null) {
1364
1364
  try {
1365
1365
  return ue.call(s);
@@ -1375,32 +1375,32 @@ _r.exports;
1375
1375
  function fr(s) {
1376
1376
  return Be(s, !0, !0);
1377
1377
  }
1378
- function pr(s, o) {
1379
- return s === o || s !== s && o !== o;
1378
+ function pr(s, a) {
1379
+ return s === a || s !== s && a !== a;
1380
1380
  }
1381
1381
  function Fe(s) {
1382
- return ln(s) && ut.call(s, "callee") && (!de.call(s, "callee") || Tt.call(s) == a);
1382
+ return ln(s) && ut.call(s, "callee") && (!de.call(s, "callee") || Tt.call(s) == o);
1383
1383
  }
1384
1384
  var Xe = Array.isArray;
1385
1385
  function Ne(s) {
1386
1386
  return s != null && mr(s.length) && !Ke(s);
1387
1387
  }
1388
1388
  function ln(s) {
1389
- return yr(s) && Ne(s);
1389
+ return gr(s) && Ne(s);
1390
1390
  }
1391
1391
  var hr = Et || fn;
1392
1392
  function Ke(s) {
1393
- var o = _t(s) ? Tt.call(s) : "";
1394
- return o == h || o == y;
1393
+ var a = _t(s) ? Tt.call(s) : "";
1394
+ return a == h || a == g;
1395
1395
  }
1396
1396
  function mr(s) {
1397
1397
  return typeof s == "number" && s > -1 && s % 1 == 0 && s <= i;
1398
1398
  }
1399
1399
  function _t(s) {
1400
- var o = typeof s;
1401
- return !!s && (o == "object" || o == "function");
1400
+ var a = typeof s;
1401
+ return !!s && (a == "object" || a == "function");
1402
1402
  }
1403
- function yr(s) {
1403
+ function gr(s) {
1404
1404
  return !!s && typeof s == "object";
1405
1405
  }
1406
1406
  function Ve(s) {
@@ -1419,82 +1419,82 @@ const C = /* @__PURE__ */ Cn(Hi);
1419
1419
  function Ui(t, r) {
1420
1420
  return t.filter((n) => {
1421
1421
  if (r.forEach((i) => {
1422
- n.items.includes(i) && (n.items = n.items.filter((a) => a !== i));
1422
+ n.items.includes(i) && (n.items = n.items.filter((o) => o !== i));
1423
1423
  }), n.items.length !== 0 || n.static)
1424
1424
  return n;
1425
1425
  });
1426
1426
  }
1427
- const Y = (t) => Object.keys(t).reduce((r, e) => {
1427
+ const G = (t) => Object.keys(t).reduce((r, e) => {
1428
1428
  const { display: n } = t[e];
1429
1429
  return Math.max(r, n.to);
1430
1430
  }, 0);
1431
- function Q(t, r, e) {
1431
+ function nt(t, r, e) {
1432
1432
  t.forEach((n) => {
1433
- const i = n.items.map((k) => String(k)), a = Object.values(r).filter(
1434
- (k) => i.includes(String(k.id))
1435
- ), c = a.filter(
1436
- (k) => !e.includes(String(k.id))
1433
+ const i = n.items.map((v) => String(v)), o = Object.values(r).filter(
1434
+ (v) => i.includes(String(v.id))
1435
+ ), c = o.filter(
1436
+ (v) => !e.includes(String(v.id))
1437
1437
  ).sort(
1438
- (k, b) => k.display.from - b.display.from
1439
- ), d = a.sort(
1440
- (k, b) => k.display.from - b.display.from
1438
+ (v, I) => v.display.from - I.display.from
1439
+ ), d = o.sort(
1440
+ (v, I) => v.display.from - I.display.from
1441
1441
  ), p = c[c.length - 1];
1442
1442
  let h = (p == null ? void 0 : p.display.to) || 0;
1443
- d.forEach((k) => {
1444
- if (e.includes(String(k.id))) {
1445
- const b = k.playbackRate || 1;
1443
+ d.forEach((v) => {
1444
+ if (e.includes(String(v.id))) {
1445
+ const I = v.playbackRate || 1;
1446
1446
  let _;
1447
- (k.type === "video" || k.type === "audio") && k.trim ? _ = (k.trim.to - k.trim.from) / b : _ = k.display.to - k.display.from, k.display = {
1447
+ (v.type === "video" || v.type === "audio") && v.trim ? _ = (v.trim.to - v.trim.from) / I : _ = v.display.to - v.display.from, v.display = {
1448
1448
  from: h,
1449
1449
  to: h + _
1450
1450
  }, h = h + _;
1451
1451
  }
1452
1452
  });
1453
- const m = a.sort(
1454
- (k, b) => k.display.from - b.display.from
1455
- ).map((k) => String(k.id));
1456
- let I = 0;
1457
- m.forEach((k) => {
1458
- const b = [];
1453
+ const m = o.sort(
1454
+ (v, I) => v.display.from - I.display.from
1455
+ ).map((v) => String(v.id));
1456
+ let k = 0;
1457
+ m.forEach((v) => {
1458
+ const I = [];
1459
1459
  let _ = 0;
1460
- if (b.forEach((f) => {
1461
- f.forEach((v) => {
1462
- v.type === "transition" && (_ += v.duration);
1460
+ if (I.forEach((f) => {
1461
+ f.forEach((b) => {
1462
+ b.type === "transition" && (_ += b.duration);
1463
1463
  });
1464
- }), r[String(k)]) {
1465
- const f = r[String(k)], v = f.playbackRate || 1;
1464
+ }), r[String(v)]) {
1465
+ const f = r[String(v)], b = f.playbackRate || 1;
1466
1466
  let w;
1467
- (f.type === "video" || f.type === "audio") && f.trim ? w = (f.trim.to - f.trim.from) / v : w = f.display.to - f.display.from, r[String(k)].display = {
1468
- from: I - _,
1469
- to: I + w - _
1470
- }, I += w;
1467
+ (f.type === "video" || f.type === "audio") && f.trim ? w = (f.trim.to - f.trim.from) / b : w = f.display.to - f.display.from, r[String(v)].display = {
1468
+ from: k - _,
1469
+ to: k + w - _
1470
+ }, k += w;
1471
1471
  }
1472
1472
  });
1473
1473
  });
1474
1474
  }
1475
- function ps(t, r, e, n, i, a) {
1475
+ function ps(t, r, e, n, i, o) {
1476
1476
  return r.forEach((u) => {
1477
1477
  if (!t.includes(u) && (i[u] = e[u], e[u].type === "composition" || e[u].type === "template")) {
1478
1478
  const c = n.find((d) => d.id === u);
1479
- c && (a.push(c), ps(
1479
+ c && (o.push(c), ps(
1480
1480
  t,
1481
1481
  c.items,
1482
1482
  e,
1483
1483
  n,
1484
1484
  i,
1485
- a
1485
+ o
1486
1486
  ));
1487
1487
  }
1488
- }), { updatedTrackItems: i, updatedStructure: a };
1488
+ }), { updatedTrackItems: i, updatedStructure: o };
1489
1489
  }
1490
1490
  function Wi(t, r) {
1491
- const e = C(t), n = r && r.length ? r : e.activeIds, i = n.map((T) => e.trackItemsMap[T]).filter((T) => !!T).map((T) => T.id), a = e.transitionIds.filter(
1491
+ const e = C(t), n = r && r.length ? r : e.activeIds, i = n.map((T) => e.trackItemsMap[T]).filter((T) => !!T).map((T) => T.id), o = e.transitionIds.filter(
1492
1492
  (T) => {
1493
1493
  const M = e.transitionsMap[T];
1494
1494
  return i.includes(M.fromId) || i.includes(M.toId);
1495
1495
  }
1496
1496
  );
1497
- i.push(...a);
1497
+ i.push(...o);
1498
1498
  const u = e.trackItemIds, c = e.transitionIds, d = C(e.tracks), p = C(e.structure);
1499
1499
  i.forEach((T) => {
1500
1500
  var L;
@@ -1504,10 +1504,10 @@ function Wi(t, r) {
1504
1504
  (x) => x.id === M.id
1505
1505
  )) == null ? void 0 : L.items;
1506
1506
  i.push(...R);
1507
- const G = p.findIndex(
1507
+ const Y = p.findIndex(
1508
1508
  (x) => x.id === M.id
1509
1509
  );
1510
- p.splice(G, 1);
1510
+ p.splice(Y, 1);
1511
1511
  }
1512
1512
  }), i.forEach((T) => {
1513
1513
  p.forEach((M) => {
@@ -1520,7 +1520,7 @@ function Wi(t, r) {
1520
1520
  c.forEach((T) => {
1521
1521
  n.includes(T) && n.length === 1 && C(e.transitionsMap[T]);
1522
1522
  });
1523
- const y = c.filter(
1523
+ const g = c.filter(
1524
1524
  (T) => !i.includes(T) && !n.includes(T)
1525
1525
  ), m = Object.fromEntries(
1526
1526
  Object.entries(e.transitionsMap).filter(
@@ -1530,33 +1530,33 @@ function Wi(t, r) {
1530
1530
  Object.keys(m).forEach((T) => {
1531
1531
  n.includes(T) && (m[T].kind = "none");
1532
1532
  });
1533
- const I = e.trackItemIds.filter(
1533
+ const k = e.trackItemIds.filter(
1534
1534
  (T) => !n.includes(T)
1535
- ), k = Ui(
1535
+ ), v = Ui(
1536
1536
  e.tracks,
1537
1537
  n
1538
- ), b = Object.fromEntries(
1538
+ ), I = Object.fromEntries(
1539
1539
  Object.entries(e.trackItemsMap).filter(
1540
1540
  ([T]) => !i.includes(T)
1541
1541
  )
1542
1542
  ), _ = d.filter((T) => T.magnetic);
1543
- Q(_, b, []);
1544
- const f = {}, v = [], { updatedTrackItems: w, updatedStructure: S } = ps(
1543
+ nt(_, I, []);
1544
+ const f = {}, b = [], { updatedTrackItems: w, updatedStructure: S } = ps(
1545
1545
  i,
1546
- I,
1546
+ k,
1547
1547
  e.trackItemsMap,
1548
1548
  e.structure,
1549
1549
  f,
1550
- v
1551
- ), E = Y(w);
1550
+ b
1551
+ ), E = G(w);
1552
1552
  return {
1553
1553
  trackItemIds: h,
1554
1554
  activeIds: [],
1555
1555
  trackItemsMap: w,
1556
- tracks: k,
1556
+ tracks: v,
1557
1557
  duration: E,
1558
1558
  structure: S,
1559
- transitionIds: y,
1559
+ transitionIds: g,
1560
1560
  transitionsMap: m
1561
1561
  };
1562
1562
  }
@@ -1576,8 +1576,8 @@ const He = (t) => {
1576
1576
  const r = t.map((e) => new FontFace(e.fontFamily, `url(${e.url})`).load().catch((n) => n));
1577
1577
  return r.length === 0 ? Promise.resolve(!0) : new Promise((e, n) => {
1578
1578
  Promise.all(r).then((i) => {
1579
- i.forEach((a) => {
1580
- a && a.family && (document.fonts.add(a), e(!0));
1579
+ i.forEach((o) => {
1580
+ o && o.family && (document.fonts.add(o), e(!0));
1581
1581
  });
1582
1582
  }).catch((i) => n(i));
1583
1583
  });
@@ -1588,18 +1588,18 @@ function Bi(t, r) {
1588
1588
  }), r;
1589
1589
  }
1590
1590
  function hs(t, r, e) {
1591
- const n = t.find((a) => a.id === r);
1591
+ const n = t.find((o) => o.id === r);
1592
1592
  if (!n) return [];
1593
1593
  const i = n.items;
1594
- return i.forEach((a) => {
1595
- const u = e[a];
1594
+ return i.forEach((o) => {
1595
+ const u = e[o];
1596
1596
  (u.type === "text" || u.type === "caption") && He([
1597
1597
  {
1598
1598
  fontFamily: u.details.fontFamily,
1599
1599
  url: u.details.fontUrl
1600
1600
  }
1601
1601
  ]), (u.type === "composition" || u.type === "template") && i.push(
1602
- ...hs(t, a, e)
1602
+ ...hs(t, o, e)
1603
1603
  );
1604
1604
  }), i;
1605
1605
  }
@@ -1608,9 +1608,9 @@ async function Yi(t) {
1608
1608
  if (!r) return {};
1609
1609
  const e = C(t);
1610
1610
  let n = C(JSON.parse(r));
1611
- const i = n.activeIds, a = n.trackItemsMap, u = n.structure;
1612
- Object.keys(a).forEach((b) => {
1613
- const _ = a[b];
1611
+ const i = n.activeIds, o = n.trackItemsMap, u = n.structure;
1612
+ Object.keys(o).forEach((I) => {
1613
+ const _ = o[I];
1614
1614
  if ((_.type === "text" || _.type === "caption") && He([
1615
1615
  {
1616
1616
  fontFamily: _.details.fontFamily,
@@ -1619,40 +1619,40 @@ async function Yi(t) {
1619
1619
  ]), _.type === "composition" || _.type === "template") {
1620
1620
  const f = hs(
1621
1621
  u,
1622
- b,
1623
- a
1622
+ I,
1623
+ o
1624
1624
  );
1625
1625
  i.push(...f);
1626
1626
  }
1627
1627
  });
1628
1628
  const c = Bi(i, r), d = C(JSON.parse(c)), p = e.tracks;
1629
- d.activeIds.forEach((b) => {
1630
- const _ = d.trackItemsMap[b];
1631
- e.trackItemsMap[b] = _, e.trackItemIds.push(b);
1629
+ d.activeIds.forEach((I) => {
1630
+ const _ = d.trackItemsMap[I];
1631
+ e.trackItemsMap[I] = _, e.trackItemIds.push(I);
1632
1632
  const f = {
1633
1633
  id: Ie(),
1634
1634
  type: _.type,
1635
- items: [b],
1635
+ items: [I],
1636
1636
  magnetic: !1,
1637
1637
  static: !1
1638
1638
  };
1639
1639
  p.unshift(f);
1640
1640
  });
1641
- const h = [...d.structure, ...e.structure], y = e.trackItemIds, m = {
1641
+ const h = [...d.structure, ...e.structure], g = e.trackItemIds, m = {
1642
1642
  ...d.trackItemsMap,
1643
1643
  ...e.trackItemsMap
1644
- }, I = {
1644
+ }, k = {
1645
1645
  structure: h,
1646
- trackItemIds: y,
1646
+ trackItemIds: g,
1647
1647
  trackItemsMap: m,
1648
1648
  tracks: p
1649
- }, k = Y(I.trackItemsMap);
1649
+ }, v = G(k.trackItemsMap);
1650
1650
  return {
1651
- trackItemIds: I.trackItemIds,
1652
- trackItemsMap: I.trackItemsMap,
1653
- structure: I.structure,
1654
- tracks: I.tracks,
1655
- duration: k
1651
+ trackItemIds: k.trackItemIds,
1652
+ trackItemsMap: k.trackItemsMap,
1653
+ structure: k.structure,
1654
+ tracks: k.tracks,
1655
+ duration: v
1656
1656
  };
1657
1657
  }
1658
1658
  let Sr = {
@@ -1691,32 +1691,32 @@ const Gi = (t) => {
1691
1691
  }, Dn = () => Sr.cors, ms = () => Sr.acceptsMap, Ue = (t) => new Promise((r, e) => {
1692
1692
  const n = new Image();
1693
1693
  n.onload = () => {
1694
- const a = n.width, u = n.height;
1695
- r({ width: a, height: u });
1696
- }, n.onerror = (a) => {
1697
- e(a);
1694
+ const o = n.width, u = n.height;
1695
+ r({ width: o, height: u });
1696
+ }, n.onerror = (o) => {
1697
+ e(o);
1698
1698
  }, Dn().image && (n.crossOrigin = "anonymous"), n.src = t;
1699
- }), ys = (t) => new Promise((r, e) => {
1699
+ }), gs = (t) => new Promise((r, e) => {
1700
1700
  const n = new Audio();
1701
1701
  n.preload = "auto", n.addEventListener("loadedmetadata", () => {
1702
- const a = n.duration * 1e3;
1703
- r({ duration: a });
1704
- }), n.addEventListener("error", (a) => {
1705
- e(a);
1702
+ const o = n.duration * 1e3;
1703
+ r({ duration: o });
1704
+ }), n.addEventListener("error", (o) => {
1705
+ e(o);
1706
1706
  }), n.src = t, Dn().audio && (n.crossOrigin = "anonymous"), n.load();
1707
1707
  }), zn = (t) => new Promise((r, e) => {
1708
1708
  const n = document.createElement("video");
1709
1709
  n.preload = "auto", n.addEventListener("loadedmetadata", () => {
1710
- const a = n.duration * 1e3, u = n.videoWidth, c = n.videoHeight;
1711
- r({ duration: a, width: u, height: c });
1712
- }), n.addEventListener("error", (a) => {
1713
- e(a);
1710
+ const o = n.duration * 1e3, u = n.videoWidth, c = n.videoHeight;
1711
+ r({ duration: o, width: u, height: c });
1712
+ }), n.addEventListener("error", (o) => {
1713
+ e(o);
1714
1714
  }), n.src = t, Dn().video && (n.crossOrigin = "anonymous"), n.load();
1715
1715
  }), Xi = async (t) => {
1716
- var i, a;
1717
- const r = t.duration, e = (i = t.details) == null ? void 0 : i.width, n = (a = t.details) == null ? void 0 : a.height;
1716
+ var i, o;
1717
+ const r = t.duration, e = (i = t.details) == null ? void 0 : i.width, n = (o = t.details) == null ? void 0 : o.height;
1718
1718
  return r && e && n ? { duration: r, width: e, height: n } : zn(t.details.src);
1719
- }, gs = (t, r) => {
1719
+ }, ys = (t, r) => {
1720
1720
  const e = document.createElement("div");
1721
1721
  Object.keys(r).forEach((i) => {
1722
1722
  i !== "height" && (e.style[i] = r[i]);
@@ -1726,11 +1726,11 @@ const Gi = (t) => {
1726
1726
  }, Vn = (t, r) => {
1727
1727
  var c, d;
1728
1728
  const e = ((c = t.details.crop) == null ? void 0 : c.width) || t.details.width || 0, n = ((d = t.details.crop) == null ? void 0 : d.height) || t.details.height || 0;
1729
- let i = r.width, a = r.height;
1729
+ let i = r.width, o = r.height;
1730
1730
  const u = r.width / r.height;
1731
- return e / n > u ? (i = e, a = e / u) : (a = n, i = n * u), {
1731
+ return e / n > u ? (i = e, o = e / u) : (o = n, i = n * u), {
1732
1732
  newWidth: i,
1733
- newHeight: a,
1733
+ newHeight: o,
1734
1734
  crop: {
1735
1735
  x: 0,
1736
1736
  y: 0,
@@ -1747,19 +1747,19 @@ const Gi = (t) => {
1747
1747
  };
1748
1748
  };
1749
1749
  async function Ki(t, r) {
1750
- const e = { ...t }, n = Object.keys(r)[0], i = Object.values(r)[0], a = e.trackItemsMap[n], u = { ...e.trackItemsMap[n] }, c = a.details;
1750
+ const e = { ...t }, n = Object.keys(r)[0], i = Object.values(r)[0], o = e.trackItemsMap[n], u = { ...e.trackItemsMap[n] }, c = o.details;
1751
1751
  if (!i.details.src) return {};
1752
- if (a.type === "image") {
1753
- const d = await Ue(i.details.src), { crop: p, newHeight: h, newWidth: y } = Vn(a, d);
1754
- i.details.crop = p, i.details.height = h, i.details.width = y;
1755
- } else if (a.type === "video") {
1756
- const d = await zn(i.details.src), p = e.trackItemsMap[n], { display: h, duration: y, trim: m } = qn(p, d), { crop: I, newHeight: k, newWidth: b } = Vn(a, d);
1757
- i.details.crop = I, i.details.height = k, i.details.width = b, u.display = h, u.duration = y, u.trim = m;
1758
- } else if (a.type === "audio") {
1759
- const d = await ys(i.details.src), p = e.trackItemsMap[n], { display: h, duration: y, trim: m } = qn(p, d);
1760
- u.display = h, u.duration = y, u.trim = m;
1761
- }
1762
- return a.metadata && i.metadata ? u.metadata = { ...a.metadata, ...i.metadata } : i.metadata && (u.metadata = i.metadata), a.details = { ...c, ...i.details }, e.trackItemsMap[n] = { ...u }, {
1752
+ if (o.type === "image") {
1753
+ const d = await Ue(i.details.src), { crop: p, newHeight: h, newWidth: g } = Vn(o, d);
1754
+ i.details.crop = p, i.details.height = h, i.details.width = g;
1755
+ } else if (o.type === "video") {
1756
+ const d = await zn(i.details.src), p = e.trackItemsMap[n], { display: h, duration: g, trim: m } = qn(p, d), { crop: k, newHeight: v, newWidth: I } = Vn(o, d);
1757
+ i.details.crop = k, i.details.height = v, i.details.width = I, u.display = h, u.duration = g, u.trim = m;
1758
+ } else if (o.type === "audio") {
1759
+ const d = await gs(i.details.src), p = e.trackItemsMap[n], { display: h, duration: g, trim: m } = qn(p, d);
1760
+ u.display = h, u.duration = g, u.trim = m;
1761
+ }
1762
+ return o.metadata && i.metadata ? u.metadata = { ...o.metadata, ...i.metadata } : i.metadata && (u.metadata = i.metadata), o.details = { ...c, ...i.details }, e.trackItemsMap[n] = { ...u }, {
1763
1763
  trackItemsMap: {
1764
1764
  ...e.trackItemsMap,
1765
1765
  [n]: { ...u, details: { ...c, ...i.details } }
@@ -1786,8 +1786,8 @@ function Vi(t, r) {
1786
1786
  magnetic: !1
1787
1787
  };
1788
1788
  });
1789
- const a = Object.values(n);
1790
- return e.tracks = [...a, ...e.tracks], {
1789
+ const o = Object.values(n);
1790
+ return e.tracks = [...o, ...e.tracks], {
1791
1791
  trackItemsMap: e.trackItemsMap,
1792
1792
  tracks: e.tracks,
1793
1793
  trackItemIds: e.trackItemIds
@@ -1798,15 +1798,15 @@ function qi(t) {
1798
1798
  function i(u) {
1799
1799
  return u.length === 3 ? `#${u[0]}${u[0]}${u[1]}${u[1]}${u[2]}${u[2]}`.toUpperCase() : `#${u.toUpperCase()}`;
1800
1800
  }
1801
- function a(u, c, d) {
1801
+ function o(u, c, d) {
1802
1802
  return `#${(1 << 24 | u << 16 | c << 8 | d).toString(16).slice(1).toUpperCase()}`;
1803
1803
  }
1804
1804
  return t = t.replace(r, (u, c) => i(c)), t = t.replace(
1805
1805
  e,
1806
- (u, c, d, p) => a(+c, +d, +p)
1806
+ (u, c, d, p) => o(+c, +d, +p)
1807
1807
  ), t = t.replace(
1808
1808
  n,
1809
- (u, c, d, p) => a(+c, +d, +p)
1809
+ (u, c, d, p) => o(+c, +d, +p)
1810
1810
  ), t;
1811
1811
  }
1812
1812
  function V(t) {
@@ -1829,9 +1829,9 @@ function bs(t) {
1829
1829
  if (e) {
1830
1830
  const i = /fill\s*:\s*([^;]+);?/.exec(e);
1831
1831
  if (i) {
1832
- const a = i[1].trim();
1833
- if (a !== "" && a !== "none")
1834
- return a;
1832
+ const o = i[1].trim();
1833
+ if (o !== "" && o !== "none")
1834
+ return o;
1835
1835
  }
1836
1836
  }
1837
1837
  const n = t.parentElement;
@@ -1841,11 +1841,11 @@ function qe(t) {
1841
1841
  return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(t);
1842
1842
  }
1843
1843
  const Ji = (t) => {
1844
- const r = `.${t.split(".").filter((a) => a.includes("fill:")).join(".")}`, e = {}, n = /\.([\w-]+)\s*\{\s*([^}]+)\s*\}/g;
1844
+ const r = `.${t.split(".").filter((o) => o.includes("fill:")).join(".")}`, e = {}, n = /\.([\w-]+)\s*\{\s*([^}]+)\s*\}/g;
1845
1845
  let i;
1846
1846
  for (; (i = n.exec(r)) !== null; ) {
1847
- const a = i[1], u = i[2], c = {}, d = /fill\s*:\s*([^;]+);?/.exec(u), p = /stroke\s*:\s*([^;]+);?/.exec(u);
1848
- d && (c.fill = V(d[1].trim())), p && (c.stroke = V(p[1].trim())), e[a] = c;
1847
+ const o = i[1], u = i[2], c = {}, d = /fill\s*:\s*([^;]+);?/.exec(u), p = /stroke\s*:\s*([^;]+);?/.exec(u);
1848
+ d && (c.fill = V(d[1].trim())), p && (c.stroke = V(p[1].trim())), e[o] = c;
1849
1849
  }
1850
1850
  return e;
1851
1851
  };
@@ -1862,11 +1862,11 @@ function Zi(t, r, e = 300, n = 300) {
1862
1862
  const i = [], u = new DOMParser().parseFromString(t, "image/svg+xml"), c = u.documentElement;
1863
1863
  c.setAttribute("width", `${e}`), c.setAttribute("height", `${n}`);
1864
1864
  const d = c.querySelectorAll("style"), p = {};
1865
- d.forEach((b) => {
1866
- const _ = b.textContent || "", f = Ji(_);
1865
+ d.forEach((I) => {
1866
+ const _ = I.textContent || "", f = Ji(_);
1867
1867
  Object.assign(p, f);
1868
- const v = _.replace(/\.(st[\w-]+)/g, `.${r}-$1`).replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`);
1869
- b.textContent = v;
1868
+ const b = _.replace(/\.(st[\w-]+)/g, `.${r}-$1`).replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`);
1869
+ I.textContent = b;
1870
1870
  const w = Array.from(u.querySelectorAll("*")), S = /* @__PURE__ */ new Set();
1871
1871
  w.forEach((E) => {
1872
1872
  if (hn(E)) return;
@@ -1876,7 +1876,7 @@ function Zi(t, r, e = 300, n = 300) {
1876
1876
  });
1877
1877
  const T = E.getAttribute("style");
1878
1878
  if (T) {
1879
- const L = /fill\s*:\s*([^;]+);?/.exec(T), R = /stroke\s*:\s*([^;]+);?/.exec(T), G = /stop-color\s*:\s*([^;]+);?/.exec(T);
1879
+ const L = /fill\s*:\s*([^;]+);?/.exec(T), R = /stroke\s*:\s*([^;]+);?/.exec(T), Y = /stop-color\s*:\s*([^;]+);?/.exec(T);
1880
1880
  if (L) {
1881
1881
  const x = L[1].trim();
1882
1882
  x && !["none", "transparent"].includes(x) && qe(V(x)) && S.add(V(x));
@@ -1885,8 +1885,8 @@ function Zi(t, r, e = 300, n = 300) {
1885
1885
  const x = R[1].trim();
1886
1886
  x && !["none", "transparent"].includes(x) && qe(V(x)) && S.add(V(x));
1887
1887
  }
1888
- if (G) {
1889
- const x = G[1].trim();
1888
+ if (Y) {
1889
+ const x = Y[1].trim();
1890
1890
  x && !["none", "transparent"].includes(x) && qe(V(x)) && S.add(V(x));
1891
1891
  }
1892
1892
  }
@@ -1899,62 +1899,62 @@ function Zi(t, r, e = 300, n = 300) {
1899
1899
  qe(E) && i.push(E);
1900
1900
  });
1901
1901
  });
1902
- const h = Array.from(u.querySelectorAll("*")), y = /* @__PURE__ */ new Set();
1903
- return h.forEach((b) => {
1904
- if (hn(b)) return;
1905
- const _ = b.getAttribute("class");
1902
+ const h = Array.from(u.querySelectorAll("*")), g = /* @__PURE__ */ new Set();
1903
+ return h.forEach((I) => {
1904
+ if (hn(I)) return;
1905
+ const _ = I.getAttribute("class");
1906
1906
  if (_) {
1907
- const v = _.split(" ").map((w) => `${r}-${w}`).join(" ");
1908
- b.setAttribute("class", v), v.split(" ").forEach((w) => {
1907
+ const b = _.split(" ").map((w) => `${r}-${w}`).join(" ");
1908
+ I.setAttribute("class", b), b.split(" ").forEach((w) => {
1909
1909
  const S = p[w];
1910
- S != null && S.fill && !["none", "transparent"].includes(S.fill) && y.add(V(S.fill)), S != null && S.stroke && !["none", "transparent"].includes(S.stroke) && y.add(V(S.stroke));
1910
+ S != null && S.fill && !["none", "transparent"].includes(S.fill) && g.add(V(S.fill)), S != null && S.stroke && !["none", "transparent"].includes(S.stroke) && g.add(V(S.stroke));
1911
1911
  });
1912
1912
  }
1913
- ["fill", "stroke", "stop-color"].forEach((v) => {
1914
- const w = b.getAttribute(v);
1915
- w && !["none", "transparent"].includes(w) && y.add(V(w));
1913
+ ["fill", "stroke", "stop-color"].forEach((b) => {
1914
+ const w = I.getAttribute(b);
1915
+ w && !["none", "transparent"].includes(w) && g.add(V(w));
1916
1916
  });
1917
- const f = b.getAttribute("style");
1917
+ const f = I.getAttribute("style");
1918
1918
  if (f) {
1919
- const v = /fill\s*:\s*([^;]+);?/.exec(f), w = /stroke\s*:\s*([^;]+);?/.exec(f), S = /stop-color\s*:\s*([^;]+);?/.exec(f);
1920
- if (v) {
1921
- const E = v[1].trim();
1922
- E && !["none", "transparent"].includes(E) && y.add(V(E));
1919
+ const b = /fill\s*:\s*([^;]+);?/.exec(f), w = /stroke\s*:\s*([^;]+);?/.exec(f), S = /stop-color\s*:\s*([^;]+);?/.exec(f);
1920
+ if (b) {
1921
+ const E = b[1].trim();
1922
+ E && !["none", "transparent"].includes(E) && g.add(V(E));
1923
1923
  }
1924
1924
  if (w) {
1925
1925
  const E = w[1].trim();
1926
- E && !["none", "transparent"].includes(E) && y.add(V(E));
1926
+ E && !["none", "transparent"].includes(E) && g.add(V(E));
1927
1927
  }
1928
1928
  if (S) {
1929
1929
  const E = S[1].trim();
1930
- E && !["none", "transparent"].includes(E) && y.add(V(E));
1930
+ E && !["none", "transparent"].includes(E) && g.add(V(E));
1931
1931
  }
1932
1932
  }
1933
- }), y.forEach(
1934
- (b) => !i.includes(b) && qe(b) && i.push(b)
1935
- ), Array.from(u.querySelectorAll("*")).forEach((b) => {
1936
- if (b.hasAttribute("id")) {
1937
- const _ = b.getAttribute("id");
1938
- b.setAttribute("id", `${r}-${_}`);
1933
+ }), g.forEach(
1934
+ (I) => !i.includes(I) && qe(I) && i.push(I)
1935
+ ), Array.from(u.querySelectorAll("*")).forEach((I) => {
1936
+ if (I.hasAttribute("id")) {
1937
+ const _ = I.getAttribute("id");
1938
+ I.setAttribute("id", `${r}-${_}`);
1939
1939
  }
1940
1940
  if (["fill", "stroke", "stop-color", "filter", "clip-path", "mask"].forEach(
1941
1941
  (_) => {
1942
- const f = b.getAttribute(_);
1943
- f && f.includes("url(#") && b.setAttribute(
1942
+ const f = I.getAttribute(_);
1943
+ f && f.includes("url(#") && I.setAttribute(
1944
1944
  _,
1945
1945
  f.replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`)
1946
1946
  );
1947
1947
  }
1948
- ), b.hasAttribute("style")) {
1949
- const _ = b.getAttribute("style");
1950
- _.includes("url(#") && b.setAttribute(
1948
+ ), I.hasAttribute("style")) {
1949
+ const _ = I.getAttribute("style");
1950
+ _.includes("url(#") && I.setAttribute(
1951
1951
  "style",
1952
1952
  _.replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`)
1953
1953
  );
1954
1954
  }
1955
- }), Array.from(u.querySelectorAll("path")).forEach((b) => {
1956
- if (hn(b)) return;
1957
- !bs(b) && !b.getAttribute("class") && (b.setAttribute("fill", "#000000"), i.includes("#000000") || i.push("#000000"));
1955
+ }), Array.from(u.querySelectorAll("path")).forEach((I) => {
1956
+ if (hn(I)) return;
1957
+ !bs(I) && !I.getAttribute("class") && (I.setAttribute("fill", "#000000"), i.includes("#000000") || i.push("#000000"));
1958
1958
  }), { serializer: new XMLSerializer().serializeToString(u), colors: i };
1959
1959
  }
1960
1960
  const nr = {
@@ -2014,20 +2014,20 @@ function ht(t, r) {
2014
2014
  x: t.size.width / 2,
2015
2015
  y: t.size.height / 2
2016
2016
  }, i = { x: r.width / 2, y: r.height / 2 };
2017
- let a;
2017
+ let o;
2018
2018
  if (e === "fill")
2019
- a = Math.max(
2019
+ o = Math.max(
2020
2020
  t.size.width / r.width,
2021
2021
  t.size.height / r.height
2022
2022
  );
2023
2023
  else if (e === "fit") {
2024
2024
  const d = t.scaleAspectRatio || 1;
2025
- a = Math.min(
2025
+ o = Math.min(
2026
2026
  t.size.width / r.width,
2027
2027
  t.size.height / r.height
2028
2028
  ) * d;
2029
2029
  } else
2030
- a = Math.min(
2030
+ o = Math.min(
2031
2031
  t.size.width / r.width,
2032
2032
  t.size.height / r.height
2033
2033
  );
@@ -2035,13 +2035,13 @@ function ht(t, r) {
2035
2035
  return {
2036
2036
  top: `${n.y - i.y}px`,
2037
2037
  left: `${u}px`,
2038
- transform: `scale(${a})`
2038
+ transform: `scale(${o})`
2039
2039
  };
2040
2040
  }
2041
2041
  const _s = async (t, r) => {
2042
2042
  const e = t.details.src, n = await Xi(t), i = ht(r, {
2043
2043
  ...n
2044
- }), a = ks(t.trim, { duration: n.duration }), u = {
2044
+ }), o = ks(t.trim, { duration: n.duration }), u = {
2045
2045
  width: n.width,
2046
2046
  height: n.height,
2047
2047
  opacity: 100,
@@ -2070,22 +2070,22 @@ const _s = async (t, r) => {
2070
2070
  };
2071
2071
  return {
2072
2072
  ...t,
2073
- trim: a,
2073
+ trim: o,
2074
2074
  type: "video",
2075
2075
  name: "video",
2076
2076
  details: u,
2077
2077
  playbackRate: t.playbackRate || 1,
2078
- display: pt(t.display, { duration: n.duration, trim: a }),
2078
+ display: pt(t.display, { duration: n.duration, trim: o }),
2079
2079
  duration: n.duration
2080
2080
  };
2081
2081
  }, Ss = async (t) => {
2082
- const r = t.id, e = t.details, i = (await ys(e.src)).duration, a = ks(t.trim, { duration: i });
2082
+ const r = t.id, e = t.details, i = (await gs(e.src)).duration, o = ks(t.trim, { duration: i });
2083
2083
  return {
2084
2084
  id: r,
2085
2085
  name: t.name || "audio",
2086
2086
  type: "audio",
2087
- display: pt(t.display, { duration: i, trim: a }),
2088
- trim: a,
2087
+ display: pt(t.display, { duration: i, trim: o }),
2088
+ trim: o,
2089
2089
  playbackRate: t.playbackRate || 1,
2090
2090
  details: {
2091
2091
  src: e.src,
@@ -2100,7 +2100,7 @@ const _s = async (t, r) => {
2100
2100
  const e = t.id, n = {
2101
2101
  width: ((c = t.details) == null ? void 0 : c.width) || r.size.width,
2102
2102
  height: ((d = t.details) == null ? void 0 : d.height) || r.size.height
2103
- }, i = t.details, a = ht(r, n), u = pt(t.display);
2103
+ }, i = t.details, o = ht(r, n), u = pt(t.display);
2104
2104
  return {
2105
2105
  id: e,
2106
2106
  name: t.type,
@@ -2111,8 +2111,8 @@ const _s = async (t, r) => {
2111
2111
  // Default width
2112
2112
  height: (i == null ? void 0 : i.height) || n.height,
2113
2113
  // Default height
2114
- top: (i == null ? void 0 : i.top) || a.top,
2115
- left: (i == null ? void 0 : i.left) || a.left,
2114
+ top: (i == null ? void 0 : i.top) || o.top,
2115
+ left: (i == null ? void 0 : i.left) || o.left,
2116
2116
  border: i.border || "none",
2117
2117
  // Default border
2118
2118
  borderRadius: i.borderRadius || 0,
@@ -2138,7 +2138,7 @@ const _s = async (t, r) => {
2138
2138
  const e = t.id, n = {
2139
2139
  width: ((c = t.details) == null ? void 0 : c.width) || r.size.width,
2140
2140
  height: ((d = t.details) == null ? void 0 : d.height) || r.size.height
2141
- }, i = t.details, a = ht(r, n), u = pt(t.display);
2141
+ }, i = t.details, o = ht(r, n), u = pt(t.display);
2142
2142
  return {
2143
2143
  id: e,
2144
2144
  name: t.type,
@@ -2149,8 +2149,8 @@ const _s = async (t, r) => {
2149
2149
  // Default width
2150
2150
  height: (i == null ? void 0 : i.height) || n.height,
2151
2151
  // Default height
2152
- top: (i == null ? void 0 : i.top) || a.top,
2153
- left: (i == null ? void 0 : i.left) || a.left,
2152
+ top: (i == null ? void 0 : i.top) || o.top,
2153
+ left: (i == null ? void 0 : i.left) || o.left,
2154
2154
  border: i.border || "none",
2155
2155
  // Default border
2156
2156
  borderRadius: i.borderRadius || 0,
@@ -2177,7 +2177,7 @@ const _s = async (t, r) => {
2177
2177
  const e = t.id, n = {
2178
2178
  width: ((c = t.details) == null ? void 0 : c.width) || r.size.width,
2179
2179
  height: ((d = t.details) == null ? void 0 : d.height) || r.size.height
2180
- }, i = t.details, a = ht(r, n), u = pt(t.display);
2180
+ }, i = t.details, o = ht(r, n), u = pt(t.display);
2181
2181
  return {
2182
2182
  id: e,
2183
2183
  name: t.type,
@@ -2188,8 +2188,8 @@ const _s = async (t, r) => {
2188
2188
  // Default width
2189
2189
  height: (i == null ? void 0 : i.height) || n.height,
2190
2190
  // Default height
2191
- top: (i == null ? void 0 : i.top) || a.top,
2192
- left: (i == null ? void 0 : i.left) || a.left,
2191
+ top: (i == null ? void 0 : i.top) || o.top,
2192
+ left: (i == null ? void 0 : i.left) || o.left,
2193
2193
  radialBarColor: i.radialBarColor || "rgba(128, 128, 128,1)",
2194
2194
  border: i.border || "none",
2195
2195
  // Default border
@@ -2211,7 +2211,7 @@ const _s = async (t, r) => {
2211
2211
  const e = t.id, n = {
2212
2212
  width: ((c = t.details) == null ? void 0 : c.width) || r.size.width,
2213
2213
  height: ((d = t.details) == null ? void 0 : d.height) || r.size.height
2214
- }, i = t.details, a = ht(r, n), u = pt(t.display);
2214
+ }, i = t.details, o = ht(r, n), u = pt(t.display);
2215
2215
  return {
2216
2216
  id: e,
2217
2217
  name: t.type,
@@ -2222,8 +2222,8 @@ const _s = async (t, r) => {
2222
2222
  // Default width
2223
2223
  height: (i == null ? void 0 : i.height) || n.height,
2224
2224
  // Default height
2225
- top: (i == null ? void 0 : i.top) || a.top,
2226
- left: (i == null ? void 0 : i.left) || a.left,
2225
+ top: (i == null ? void 0 : i.top) || o.top,
2226
+ left: (i == null ? void 0 : i.left) || o.left,
2227
2227
  border: i.border || "none",
2228
2228
  // Default border
2229
2229
  borderRadius: i.borderRadius || 0,
@@ -2249,7 +2249,7 @@ const _s = async (t, r) => {
2249
2249
  const e = t.id, n = {
2250
2250
  width: ((u = t.details) == null ? void 0 : u.width) || r.size.width,
2251
2251
  height: ((c = t.details) == null ? void 0 : c.height) || r.size.height
2252
- }, i = t.details, a = ht(r, n);
2252
+ }, i = t.details, o = ht(r, n);
2253
2253
  return {
2254
2254
  id: e,
2255
2255
  name: t.type,
@@ -2263,8 +2263,8 @@ const _s = async (t, r) => {
2263
2263
  // Default width
2264
2264
  height: (i == null ? void 0 : i.height) || n.height,
2265
2265
  // Default height
2266
- top: (i == null ? void 0 : i.top) || a.top,
2267
- left: (i == null ? void 0 : i.left) || a.left,
2266
+ top: (i == null ? void 0 : i.top) || o.top,
2267
+ left: (i == null ? void 0 : i.left) || o.left,
2268
2268
  border: i.border || "none",
2269
2269
  // Default border
2270
2270
  borderRadius: i.borderRadius || 0,
@@ -2298,18 +2298,18 @@ const _s = async (t, r) => {
2298
2298
  metadata: {}
2299
2299
  };
2300
2300
  }, ws = async (t, r) => {
2301
- var y;
2301
+ var g;
2302
2302
  const e = t.trackItemIds, n = t.size || {
2303
2303
  width: t.details.width,
2304
2304
  height: t.details.height
2305
2305
  }, i = Math.min(
2306
2306
  r.size.width / n.width,
2307
2307
  r.size.height / n.height
2308
- ), a = ((y = t.details) == null ? void 0 : y.rotate) || 0, u = ht(r, n), c = t.display;
2308
+ ), o = ((g = t.details) == null ? void 0 : g.rotate) || 0, u = ht(r, n), c = t.display;
2309
2309
  let d = 1 / 0, p = 0;
2310
2310
  e.forEach((m) => {
2311
- const I = t.trackItemsMap[m];
2312
- I.display.from < d && (d = I.display.from), I.display.to > p && (p = I.display.to);
2311
+ const k = t.trackItemsMap[m];
2312
+ k.display.from < d && (d = k.display.from), k.display.to > p && (p = k.display.to);
2313
2313
  });
2314
2314
  const h = t.trim || t.display || { from: d, to: p };
2315
2315
  return {
@@ -2322,7 +2322,7 @@ const _s = async (t, r) => {
2322
2322
  top: t.details.top || u.top,
2323
2323
  left: t.details.left || u.left,
2324
2324
  scale: i,
2325
- rotate: a,
2325
+ rotate: o,
2326
2326
  background: t.details.background || "transparent"
2327
2327
  },
2328
2328
  trim: h,
@@ -2337,10 +2337,10 @@ const _s = async (t, r) => {
2337
2337
  }, i = Math.min(
2338
2338
  r.size.width / n.width,
2339
2339
  r.size.height / n.height
2340
- ), a = ((h = t.details) == null ? void 0 : h.rotate) || 0, u = ht(r, n), c = t.display;
2340
+ ), o = ((h = t.details) == null ? void 0 : h.rotate) || 0, u = ht(r, n), c = t.display;
2341
2341
  let d = 1 / 0, p = 0;
2342
- return e.forEach((y) => {
2343
- const m = t.trackItemsMap[y];
2342
+ return e.forEach((g) => {
2343
+ const m = t.trackItemsMap[g];
2344
2344
  m.display.from < d && (d = m.display.from), m.display.to > p && (p = m.display.to);
2345
2345
  }), {
2346
2346
  id: t.id,
@@ -2352,20 +2352,20 @@ const _s = async (t, r) => {
2352
2352
  top: t.details.top || u.top,
2353
2353
  left: t.details.left || u.left,
2354
2354
  scale: i,
2355
- rotate: a
2355
+ rotate: o
2356
2356
  },
2357
2357
  display: c || { from: d, to: p }
2358
2358
  };
2359
2359
  }, Ts = async (t, r) => {
2360
- const e = t.details, n = Ue(e.src), i = fetch(e.src), [a, u] = await Promise.all([
2360
+ const e = t.details, n = Ue(e.src), i = fetch(e.src), [o, u] = await Promise.all([
2361
2361
  n,
2362
2362
  i
2363
- ]), c = await u.text(), d = ht(r, a), { serializer: p, colors: h } = Zi(
2363
+ ]), c = await u.text(), d = ht(r, o), { serializer: p, colors: h } = Zi(
2364
2364
  qi(c),
2365
2365
  t.id,
2366
- Number(e.width || a.width),
2367
- Number(e.height || a.height)
2368
- ), y = t.details.colorMap || Object.fromEntries(h.map((m) => [m, m]));
2366
+ Number(e.width || o.width),
2367
+ Number(e.height || o.height)
2368
+ ), g = t.details.colorMap || Object.fromEntries(h.map((m) => [m, m]));
2369
2369
  return {
2370
2370
  id: t.id,
2371
2371
  name: "illustration",
@@ -2375,9 +2375,9 @@ const _s = async (t, r) => {
2375
2375
  details: {
2376
2376
  src: e.src || "",
2377
2377
  // Default source URL
2378
- width: e.width || a.width || 100,
2378
+ width: e.width || o.width || 100,
2379
2379
  // Default width
2380
- height: e.height || a.height || 100,
2380
+ height: e.height || o.height || 100,
2381
2381
  // Default height
2382
2382
  opacity: e.opacity ?? 100,
2383
2383
  // Default opacity
@@ -2401,12 +2401,12 @@ const _s = async (t, r) => {
2401
2401
  visibility: e.visibility || "visible",
2402
2402
  svgString: p,
2403
2403
  initialSvgString: C(p),
2404
- colorMap: y
2404
+ colorMap: g
2405
2405
  },
2406
2406
  metadata: t.metadata || {}
2407
2407
  };
2408
2408
  }, sa = async (t, r) => {
2409
- const e = t.details, n = Ue(e.src), [i] = await Promise.all([n]), a = ht(r, i);
2409
+ const e = t.details, n = Ue(e.src), [i] = await Promise.all([n]), o = ht(r, i);
2410
2410
  return {
2411
2411
  id: t.id,
2412
2412
  name: "shape",
@@ -2422,15 +2422,15 @@ const _s = async (t, r) => {
2422
2422
  // Default height
2423
2423
  opacity: e.opacity ?? 100,
2424
2424
  // Default opacity
2425
- transform: e.transform || a.transform,
2425
+ transform: e.transform || o.transform,
2426
2426
  // Default transform
2427
2427
  border: e.border || "none",
2428
2428
  // Default border
2429
2429
  borderRadius: e.borderRadius || 0,
2430
2430
  // Default border radius
2431
- top: e.top || a.top || "0px",
2431
+ top: e.top || o.top || "0px",
2432
2432
  // Default top
2433
- left: e.left || a.left || "0px",
2433
+ left: e.left || o.left || "0px",
2434
2434
  // Default left
2435
2435
  borderWidth: e.borderWidth ?? 0,
2436
2436
  // Default border width
@@ -2538,11 +2538,11 @@ const _s = async (t, r) => {
2538
2538
  url: e.details.fontUrl
2539
2539
  }
2540
2540
  ]);
2541
- const n = e.id, i = e.details, a = xs(i), u = i.height || gs(e.details.text, a), c = i.top != null && i.left != null ? {
2541
+ const n = e.id, i = e.details, o = xs(i), u = i.height || ys(e.details.text, o), c = i.top != null && i.left != null ? {
2542
2542
  top: `${i.top}px`,
2543
2543
  left: `${i.left}px`
2544
2544
  } : vs(r, {
2545
- width: a.width,
2545
+ width: o.width,
2546
2546
  height: u
2547
2547
  });
2548
2548
  return {
@@ -2552,14 +2552,14 @@ const _s = async (t, r) => {
2552
2552
  display: pt(e.display),
2553
2553
  details: {
2554
2554
  ...e.details,
2555
- ...a,
2555
+ ...o,
2556
2556
  text: i.text || "",
2557
2557
  // Default text content
2558
2558
  height: u,
2559
2559
  // Default height
2560
2560
  fontUrl: i.fontUrl,
2561
- top: a.top || c.top,
2562
- left: a.left || c.left,
2561
+ top: o.top || c.top,
2562
+ left: o.left || c.left,
2563
2563
  borderWidth: i.borderWidth || 0,
2564
2564
  borderColor: i.borderColor || "#000000",
2565
2565
  boxShadow: i.boxShadow || nr,
@@ -2581,12 +2581,12 @@ const _s = async (t, r) => {
2581
2581
  url: t.details.fontUrl
2582
2582
  }
2583
2583
  ]);
2584
- const e = t.id, n = t.details, i = xs(n), a = n.height || gs(t.details.text, i), u = n.top != null && n.left != null ? {
2584
+ const e = t.id, n = t.details, i = xs(n), o = n.height || ys(t.details.text, i), u = n.top != null && n.left != null ? {
2585
2585
  top: `${n.top}px`,
2586
2586
  left: `${n.left}px`
2587
2587
  } : vs(r, {
2588
2588
  width: i.width,
2589
- height: a
2589
+ height: o
2590
2590
  });
2591
2591
  return {
2592
2592
  id: e,
@@ -2598,7 +2598,7 @@ const _s = async (t, r) => {
2598
2598
  ...i,
2599
2599
  text: n.text || "",
2600
2600
  // Default text content
2601
- height: a,
2601
+ height: o,
2602
2602
  // Default height
2603
2603
  fontUrl: n.fontUrl,
2604
2604
  top: i.top || u.top,
@@ -2699,36 +2699,36 @@ async function oa(t, r) {
2699
2699
  const h = e[p];
2700
2700
  if (h.type === "text" || h.type === "caption") {
2701
2701
  if (h.details.fontUrl) {
2702
- const y = {
2702
+ const g = {
2703
2703
  fontFamily: h.details.fontFamily,
2704
2704
  url: h.details.fontUrl
2705
2705
  };
2706
- n.add(JSON.stringify(y));
2706
+ n.add(JSON.stringify(g));
2707
2707
  }
2708
2708
  (u = h.animations) != null && u.in && h.animations.in.composition.forEach(
2709
- (y) => {
2709
+ (g) => {
2710
2710
  var m;
2711
- (m = y.details) != null && m.fonts && y.details.fonts.forEach(
2712
- (I) => {
2713
- n.add(JSON.stringify(I));
2711
+ (m = g.details) != null && m.fonts && g.details.fonts.forEach(
2712
+ (k) => {
2713
+ n.add(JSON.stringify(k));
2714
2714
  }
2715
2715
  );
2716
2716
  }
2717
2717
  ), (c = h.animations) != null && c.loop && h.animations.loop.composition.forEach(
2718
- (y) => {
2718
+ (g) => {
2719
2719
  var m;
2720
- (m = y.details) != null && m.fonts && y.details.fonts.forEach(
2721
- (I) => {
2722
- n.add(JSON.stringify(I));
2720
+ (m = g.details) != null && m.fonts && g.details.fonts.forEach(
2721
+ (k) => {
2722
+ n.add(JSON.stringify(k));
2723
2723
  }
2724
2724
  );
2725
2725
  }
2726
2726
  ), (d = h.animations) != null && d.out && h.animations.out.composition.forEach(
2727
- (y) => {
2727
+ (g) => {
2728
2728
  var m;
2729
- (m = y.details) != null && m.fonts && y.details.fonts.forEach(
2730
- (I) => {
2731
- n.add(JSON.stringify(I));
2729
+ (m = g.details) != null && m.fonts && g.details.fonts.forEach(
2730
+ (k) => {
2731
+ n.add(JSON.stringify(k));
2732
2732
  }
2733
2733
  );
2734
2734
  }
@@ -2742,21 +2742,21 @@ async function oa(t, r) {
2742
2742
  Array.from(n).map((p) => JSON.parse(p))
2743
2743
  );
2744
2744
  for (const [p, h] of i) {
2745
- const y = await Ts(
2745
+ const g = await Ts(
2746
2746
  { ...h.trackItem, details: h.details },
2747
2747
  {
2748
2748
  size: { width: h.details.width, height: h.details.height }
2749
2749
  }
2750
2750
  ), m = Is(
2751
- y.details.svgString,
2751
+ g.details.svgString,
2752
2752
  h.details.colorMap
2753
2753
  );
2754
- y.details.svgString = m, e[p] = y;
2754
+ g.details.svgString = m, e[p] = g;
2755
2755
  }
2756
- const a = Y(e);
2756
+ const o = G(e);
2757
2757
  return {
2758
2758
  ...r,
2759
- duration: a
2759
+ duration: o
2760
2760
  };
2761
2761
  }
2762
2762
  function ca(t) {
@@ -2771,8 +2771,8 @@ function ca(t) {
2771
2771
  e.forEach((d) => {
2772
2772
  i.trackItemsMap[d] = r.trackItemsMap[d], n.push(r.tracks.find((p) => p.items.includes(d)));
2773
2773
  });
2774
- const a = /* @__PURE__ */ new Set();
2775
- n.filter((d) => a.has(d.id) ? !1 : (a.add(d.id), !0)), i.tracks = Array.from(a), i.activeIds.forEach((d) => {
2774
+ const o = /* @__PURE__ */ new Set();
2775
+ n.filter((d) => o.has(d.id) ? !1 : (o.add(d.id), !0)), i.tracks = Array.from(o), i.activeIds.forEach((d) => {
2776
2776
  if (i.trackItemsMap[d].type === "composition" || i.trackItemsMap[d].type === "template") {
2777
2777
  const p = r.structure.find(
2778
2778
  (h) => h.id === d
@@ -2791,7 +2791,7 @@ function ua(t, r) {
2791
2791
  const n = e.activeIds[0], i = C(e.trackItemsMap[n]);
2792
2792
  if (r >= i.display.to || r <= i.display.from)
2793
2793
  return {};
2794
- const a = Ie(), u = {
2794
+ const o = Ie(), u = {
2795
2795
  ...i,
2796
2796
  display: {
2797
2797
  from: i.display.from,
@@ -2799,7 +2799,7 @@ function ua(t, r) {
2799
2799
  }
2800
2800
  }, c = {
2801
2801
  ...i,
2802
- id: a,
2802
+ id: o,
2803
2803
  display: {
2804
2804
  from: r,
2805
2805
  to: i.display.to
@@ -2825,32 +2825,32 @@ function ua(t, r) {
2825
2825
  e.transitionIds = e.transitionIds.filter(
2826
2826
  (m) => m !== p.id
2827
2827
  );
2828
- const y = {};
2828
+ const g = {};
2829
2829
  e.transitionIds.forEach(
2830
- (m) => y[m] = e.transitionsMap[m]
2831
- ), e.transitionsMap = y;
2830
+ (m) => g[m] = e.transitionsMap[m]
2831
+ ), e.transitionsMap = g;
2832
2832
  }
2833
2833
  }
2834
2834
  if (d) {
2835
- const h = c.display.to - c.display.from, y = {};
2835
+ const h = c.display.to - c.display.from, g = {};
2836
2836
  d.duration / 2 > h ? (e.transitionIds = e.transitionIds.filter(
2837
2837
  (m) => m !== d.id
2838
2838
  ), e.transitionIds.forEach(
2839
- (m) => y[m] = e.transitionsMap[m]
2840
- ), e.transitionsMap = y) : (e.transitionIds = e.transitionIds.map((m) => e.transitionsMap[m].fromId === u.id ? m.replace(u.id, a) : m), Object.keys(e.transitionsMap).forEach((m) => {
2839
+ (m) => g[m] = e.transitionsMap[m]
2840
+ ), e.transitionsMap = g) : (e.transitionIds = e.transitionIds.map((m) => e.transitionsMap[m].fromId === u.id ? m.replace(u.id, o) : m), Object.keys(e.transitionsMap).forEach((m) => {
2841
2841
  if (e.transitionsMap[m].fromId === u.id) {
2842
- const k = m.replace(u.id, a);
2843
- y[k] = {
2842
+ const v = m.replace(u.id, o);
2843
+ g[v] = {
2844
2844
  ...e.transitionsMap[m],
2845
- id: k,
2846
- fromId: a
2845
+ id: v,
2846
+ fromId: o
2847
2847
  };
2848
2848
  } else
2849
- y[m] = e.transitionsMap[m];
2850
- }), e.transitionsMap = y);
2849
+ g[m] = e.transitionsMap[m];
2850
+ }), e.transitionsMap = g);
2851
2851
  }
2852
- return e.trackItemsMap[n] = u, e.trackItemsMap[a] = c, e.trackItemIds.push(a), e.tracks.forEach((h) => {
2853
- h.items.includes(n) && h.items.push(a);
2852
+ return e.trackItemsMap[n] = u, e.trackItemsMap[o] = c, e.trackItemIds.push(o), e.tracks.forEach((h) => {
2853
+ h.items.includes(n) && h.items.push(o);
2854
2854
  }), {
2855
2855
  tracks: e.tracks,
2856
2856
  trackItemIds: e.trackItemIds,
@@ -2878,11 +2878,11 @@ async function la(t, r) {
2878
2878
  ...n[c].metadata,
2879
2879
  ...d.metadata
2880
2880
  } : n[c].metadata = d.metadata), d.display || d.playbackRate) {
2881
- const p = d.playbackRate, h = n[c].playbackRate || 1, y = n[c].display, k = (y.to - y.from) * h / p, b = {
2882
- from: y.from,
2883
- to: y.from + k
2881
+ const p = d.playbackRate, h = n[c].playbackRate || 1, g = n[c].display, v = (g.to - g.from) * h / p, I = {
2882
+ from: g.from,
2883
+ to: g.from + v
2884
2884
  };
2885
- n[c].display = b, n[c].playbackRate = p;
2885
+ n[c].display = I, n[c].playbackRate = p;
2886
2886
  }
2887
2887
  d.animations && (n[c].animations = {
2888
2888
  ...n[c].animations,
@@ -2901,39 +2901,39 @@ async function la(t, r) {
2901
2901
  return d.display !== void 0 || d.playbackRate !== void 0;
2902
2902
  })) {
2903
2903
  const c = e.tracks.filter((h) => h.magnetic);
2904
- i.filter((h) => c.some((y) => y.items.includes(h))).length > 0 && Q(c, n, []);
2904
+ i.filter((h) => c.some((g) => g.items.includes(h))).length > 0 && nt(c, n, []);
2905
2905
  const p = [];
2906
2906
  for (const h of i) {
2907
- const y = r[h];
2908
- if (y.playbackRate === void 0 && y.display === void 0)
2907
+ const g = r[h];
2908
+ if (g.playbackRate === void 0 && g.display === void 0)
2909
2909
  continue;
2910
2910
  const m = n[h];
2911
2911
  if (!m) continue;
2912
- const I = e.tracks.find(
2913
- (v) => v.items.includes(h)
2912
+ const k = e.tracks.find(
2913
+ (b) => b.items.includes(h)
2914
2914
  );
2915
- if (!I || I.magnetic) continue;
2916
- const k = m.display;
2915
+ if (!k || k.magnetic) continue;
2916
+ const v = m.display;
2917
2917
  if (Object.values(
2918
2918
  e.transitionsMap
2919
2919
  ).filter(
2920
- (v) => v.fromId === h || v.toId === h
2921
- ).forEach((v) => {
2922
- const w = n[v.fromId], S = n[v.toId];
2920
+ (b) => b.fromId === h || b.toId === h
2921
+ ).forEach((b) => {
2922
+ const w = n[b.fromId], S = n[b.toId];
2923
2923
  if (!w || !S) {
2924
- p.push(v.id);
2924
+ p.push(b.id);
2925
2925
  return;
2926
2926
  }
2927
2927
  const E = w.display, T = S.display, M = E.to, L = T.from;
2928
- Math.abs(M - L) <= 1 || p.push(v.id);
2929
- }), I.items.map((v) => n[v]).filter((v) => v && v.id !== h).some((v) => {
2930
- const w = v.display.from, S = v.display.to, E = k.from;
2931
- return !(k.to <= w || E >= S);
2928
+ Math.abs(M - L) <= 1 || p.push(b.id);
2929
+ }), k.items.map((b) => n[b]).filter((b) => b && b.id !== h).some((b) => {
2930
+ const w = b.display.from, S = b.display.to, E = v.from;
2931
+ return !(v.to <= w || E >= S);
2932
2932
  })) {
2933
- const v = e.tracks.findIndex(
2934
- (E) => E.id === I.id
2933
+ const b = e.tracks.findIndex(
2934
+ (E) => E.id === k.id
2935
2935
  );
2936
- I.items = I.items.filter(
2936
+ k.items = k.items.filter(
2937
2937
  (E) => E !== h
2938
2938
  );
2939
2939
  const w = {
@@ -2943,7 +2943,7 @@ async function la(t, r) {
2943
2943
  items: [h],
2944
2944
  magnetic: !1,
2945
2945
  static: !1
2946
- }, S = Math.max(0, v - 1);
2946
+ }, S = Math.max(0, b - 1);
2947
2947
  e.tracks.splice(S, 0, w);
2948
2948
  }
2949
2949
  }
@@ -2953,7 +2953,7 @@ async function la(t, r) {
2953
2953
  delete e.transitionsMap[h];
2954
2954
  }));
2955
2955
  }
2956
- const u = Y(n);
2956
+ const u = G(n);
2957
2957
  return {
2958
2958
  trackItemsMap: { ...n },
2959
2959
  tracks: e.tracks,
@@ -2963,58 +2963,36 @@ async function la(t, r) {
2963
2963
  };
2964
2964
  }
2965
2965
  async function da(t, r) {
2966
- const e = C(t), n = Object.keys(r)[0], i = Object.values(r)[0], a = e.trackItemsMap[n], u = a.details;
2966
+ const e = C(t), n = Object.keys(r)[0], i = Object.values(r)[0], o = e.trackItemsMap[n], u = o.details;
2967
2967
  if (!i.details.src) return {};
2968
- if (a.type === "image") {
2969
- const p = await Ue(i.details.src), h = a.details.width || 0, y = a.details.height || 0;
2970
- let m = p.width, I = p.height;
2971
- const k = p.width / p.height;
2972
- h / y > k ? (m = h, I = h / k) : (I = y, m = y * k), u.crop = {
2968
+ if (o.type === "image") {
2969
+ const c = await Ue(i.details.src), d = o.details.width || 0, p = o.details.height || 0;
2970
+ let h = c.width, g = c.height;
2971
+ const m = c.width / c.height;
2972
+ d / p > m ? (h = d, g = d / m) : (g = p, h = p * m), u.crop = {
2973
2973
  x: 0,
2974
2974
  y: 0,
2975
2975
  height: u.height,
2976
2976
  width: u.width
2977
- }, i.details.width = m, i.details.height = I;
2978
- } else if (a.type === "video") {
2979
- const p = await zn(i.details.src), h = a.details.width || 0, y = a.details.height || 0;
2980
- let m = p.width, I = p.height;
2981
- const k = p.width / p.height;
2982
- h / y > k ? (m = h, I = h / k) : (I = y, m = y * k), u.crop = {
2977
+ }, i.details.width = h, i.details.height = g;
2978
+ } else if (o.type === "video") {
2979
+ const c = await zn(i.details.src), d = o.details.width || 0, p = o.details.height || 0;
2980
+ let h = c.width, g = c.height;
2981
+ const m = c.width / c.height;
2982
+ d / p > m ? (h = d, g = d / m) : (g = p, h = p * m), u.crop = {
2983
2983
  x: 0,
2984
2984
  y: 0,
2985
2985
  height: u.height,
2986
2986
  width: u.width
2987
- }, i.details.width = m, i.details.height = I, a.duration = p.duration, a.trim = {
2988
- from: 0,
2989
- to: p.duration
2990
- };
2991
- const b = a.playbackRate || 1, _ = p.duration / b, f = a.display.from + _;
2992
- a.trim = {
2993
- from: 0,
2994
- to: a.display.to - a.display.from
2995
- }, a.display = {
2996
- from: a.display.from,
2997
- to: (a.duration || 0) >= p.duration ? a.display.to : f
2998
- };
2987
+ }, i.details.width = h, i.details.height = g;
2999
2988
  }
3000
- i.details && (a.details = { ...u, ...i.details }, i.details = a.details), e.trackItemsMap[n] = {
2989
+ return i.details && (o.details = { ...u, ...i.details }, i.details = o.details), e.trackItemsMap[n] = {
3001
2990
  ...e.trackItemsMap[n],
3002
2991
  type: i.type
3003
- }, a.type === "video" && (e.trackItemsMap[n].display = a.display, e.trackItemsMap[n].duration = a.duration, e.trackItemsMap[n].trim = a.trim);
3004
- const c = e.tracks.find(
3005
- (p) => p.items.includes(n)
3006
- );
3007
- if (c && c.magnetic && a.type === "video") {
3008
- const p = e.tracks.filter((h) => h.magnetic);
3009
- Q(p, e.trackItemsMap, []);
3010
- }
3011
- const d = Y(e.trackItemsMap);
3012
- return {
2992
+ }, {
3013
2993
  trackItemsMap: {
3014
2994
  ...e.trackItemsMap
3015
- },
3016
- tracks: e.tracks,
3017
- duration: d
2995
+ }
3018
2996
  };
3019
2997
  }
3020
2998
  function fa(t, r) {
@@ -3034,7 +3012,7 @@ function pa(t, { idTrack: r, idItems: e }, n) {
3034
3012
  { display: { to: 0 } }
3035
3013
  ).display.to;
3036
3014
  e.forEach((c) => {
3037
- const d = t.find((y) => String(y.id) === String(c));
3015
+ const d = t.find((g) => String(g.id) === String(c));
3038
3016
  if (!d) return;
3039
3017
  const p = d.playbackRate || 1;
3040
3018
  let h;
@@ -3044,50 +3022,50 @@ function pa(t, { idTrack: r, idItems: e }, n) {
3044
3022
  async function ha(t, r, e = {}) {
3045
3023
  var m;
3046
3024
  const n = C(t), i = r.trackItems.map(
3047
- (I) => aa(I, {
3025
+ (k) => aa(k, {
3048
3026
  size: n.size
3049
3027
  })
3050
- ), a = await Promise.all(i);
3051
- (m = r.tracks) == null || m.forEach((I) => {
3028
+ ), o = await Promise.all(i);
3029
+ (m = r.tracks) == null || m.forEach((k) => {
3052
3030
  pa(
3053
- a,
3054
- { idTrack: I.id, idItems: I.items },
3031
+ o,
3032
+ { idTrack: k.id, idItems: k.items },
3055
3033
  n
3056
3034
  );
3057
3035
  });
3058
- const u = Cs(r.tracks, r.trackItems), c = [], d = a.map((I) => I.id);
3059
- r.trackItems.forEach((I) => {
3060
- if (I.type !== "template") return;
3036
+ const u = Cs(r.tracks, r.trackItems), c = [], d = o.map((k) => k.id);
3037
+ r.trackItems.forEach((k) => {
3038
+ if (k.type !== "template") return;
3061
3039
  n.trackItemsMap = {
3062
3040
  ...n.trackItemsMap,
3063
- ...I.trackItemsMap
3041
+ ...k.trackItemsMap
3064
3042
  }, n.transitionsMap = {
3065
3043
  ...n.transitionsMap,
3066
- ...I.transitionsMap
3044
+ ...k.transitionsMap
3067
3045
  };
3068
- const k = {
3069
- id: I.id,
3070
- items: I.trackItemIds,
3071
- transitions: I.transitionsIds || [],
3072
- tracks: I.tracks
3046
+ const v = {
3047
+ id: k.id,
3048
+ items: k.trackItemIds,
3049
+ transitions: k.transitionsIds || [],
3050
+ tracks: k.tracks
3073
3051
  };
3074
- c.push(k);
3052
+ c.push(v);
3075
3053
  });
3076
3054
  const p = [], h = {};
3077
- return a.forEach((I) => {
3078
- p.push(I.id), h[I.id] = I;
3079
- }), u.map((I) => Os(n.tracks, [I]) ? I : null).forEach((I, k) => {
3080
- if (I)
3081
- n.tracks.forEach((b) => {
3082
- b.id === I.id && (b.items = b.items.concat(I.items), b.magnetic && Q(
3083
- [b],
3055
+ return o.forEach((k) => {
3056
+ p.push(k.id), h[k.id] = k;
3057
+ }), u.map((k) => Os(n.tracks, [k]) ? k : null).forEach((k, v) => {
3058
+ if (k)
3059
+ n.tracks.forEach((I) => {
3060
+ I.id === k.id && (I.items = I.items.concat(k.items), I.magnetic && nt(
3061
+ [I],
3084
3062
  n.trackItemsMap,
3085
3063
  d
3086
3064
  ));
3087
3065
  });
3088
3066
  else {
3089
- const b = e.trackIndex || 0, _ = u[k], f = Math.min(
3090
- Math.max(b, 0),
3067
+ const I = e.trackIndex || 0, _ = u[v], f = Math.min(
3068
+ Math.max(I, 0),
3091
3069
  n.tracks.length
3092
3070
  );
3093
3071
  n.tracks.splice(f, 0, _);
@@ -3098,7 +3076,7 @@ async function ha(t, r, e = {}) {
3098
3076
  }, n.trackItemIds = [
3099
3077
  ...n.trackItemIds,
3100
3078
  ...p
3101
- ], n.structure = [...n.structure, ...c], n.duration = Y(n.trackItemsMap), {
3079
+ ], n.structure = [...n.structure, ...c], n.duration = G(n.trackItemsMap), {
3102
3080
  trackItemIds: n.trackItemIds,
3103
3081
  trackItemsMap: n.trackItemsMap,
3104
3082
  tracks: n.tracks,
@@ -3111,9 +3089,9 @@ async function ha(t, r, e = {}) {
3111
3089
  function St(t, r, e = {
3112
3090
  isNewTrack: !0
3113
3091
  }) {
3114
- const n = r.map((u) => u.id), i = [], a = {};
3092
+ const n = r.map((u) => u.id), i = [], o = {};
3115
3093
  if (r.forEach((u) => {
3116
- i.push(u.id), a[u.id] = u;
3094
+ i.push(u.id), o[u.id] = u;
3117
3095
  }), (e.targetTrackIndex !== void 0 || e.targetTrackId) && !e.isNewTrack) {
3118
3096
  const u = e.targetTrackIndex || 0, c = e.targetTrackId;
3119
3097
  let d = t.tracks[u];
@@ -3133,7 +3111,7 @@ function St(t, r, e = {
3133
3111
  }
3134
3112
  return t.trackItemsMap = {
3135
3113
  ...t.trackItemsMap,
3136
- ...a
3114
+ ...o
3137
3115
  }, t.trackItemIds = [
3138
3116
  ...t.trackItemIds,
3139
3117
  ...i
@@ -3146,36 +3124,36 @@ async function ma(t, r, e = {}) {
3146
3124
  scaleMode: e.scaleMode,
3147
3125
  scaleAspectRatio: e.scaleAspectRatio
3148
3126
  })
3149
- ], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e), d = c.tracks.filter((p) => p.magnetic);
3150
- return Q(d, c.trackItemsMap, u), c.duration = Y(c.trackItemsMap), {
3127
+ ], o = await Promise.all(i), u = o.map((p) => p.id), c = St(n, o, e), d = c.tracks.filter((p) => p.magnetic);
3128
+ return nt(d, c.trackItemsMap, u), c.duration = G(c.trackItemsMap), {
3151
3129
  trackItemIds: c.trackItemIds,
3152
3130
  trackItemsMap: c.trackItemsMap,
3153
3131
  tracks: c.tracks,
3154
3132
  duration: c.duration
3155
3133
  };
3156
3134
  }
3157
- async function ya(t, r, e = {}) {
3158
- const n = C(t), i = [Ss(r)], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e);
3159
- c.duration = Y(c.trackItemsMap);
3135
+ async function ga(t, r, e = {}) {
3136
+ const n = C(t), i = [Ss(r)], o = await Promise.all(i), u = o.map((p) => p.id), c = St(n, o, e);
3137
+ c.duration = G(c.trackItemsMap);
3160
3138
  const d = c.tracks.filter((p) => p.magnetic);
3161
- return Q(d, c.trackItemsMap, u), {
3139
+ return nt(d, c.trackItemsMap, u), {
3162
3140
  trackItemIds: c.trackItemIds,
3163
3141
  trackItemsMap: c.trackItemsMap,
3164
3142
  tracks: c.tracks,
3165
3143
  duration: c.duration
3166
3144
  };
3167
3145
  }
3168
- async function ga(t, r, e = {}) {
3146
+ async function ya(t, r, e = {}) {
3169
3147
  const n = C(t), i = [
3170
3148
  _s(r, {
3171
3149
  size: n.size,
3172
3150
  scaleMode: e.scaleMode,
3173
3151
  scaleAspectRatio: e.scaleAspectRatio
3174
3152
  })
3175
- ], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e);
3176
- c.duration = Y(c.trackItemsMap);
3153
+ ], o = await Promise.all(i), u = o.map((p) => p.id), c = St(n, o, e);
3154
+ c.duration = G(c.trackItemsMap);
3177
3155
  const d = c.tracks.filter((p) => p.magnetic);
3178
- return Q(d, c.trackItemsMap, u), {
3156
+ return nt(d, c.trackItemsMap, u), {
3179
3157
  trackItemIds: c.trackItemIds,
3180
3158
  trackItemsMap: c.trackItemsMap,
3181
3159
  tracks: c.tracks,
@@ -3187,10 +3165,10 @@ async function Ia(t, r, e = {}) {
3187
3165
  As(r, {
3188
3166
  size: e.size
3189
3167
  })
3190
- ], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e);
3191
- c.duration = Y(c.trackItemsMap);
3168
+ ], o = await Promise.all(i), u = o.map((p) => p.id), c = St(n, o, e);
3169
+ c.duration = G(c.trackItemsMap);
3192
3170
  const d = c.tracks.filter((p) => p.magnetic);
3193
- return Q(d, c.trackItemsMap, u), {
3171
+ return nt(d, c.trackItemsMap, u), {
3194
3172
  trackItemIds: c.trackItemIds,
3195
3173
  trackItemsMap: c.trackItemsMap,
3196
3174
  tracks: c.tracks,
@@ -3204,10 +3182,10 @@ async function ba(t, r, e = {}) {
3204
3182
  scaleMode: e.scaleMode,
3205
3183
  scaleAspectRatio: e.scaleAspectRatio
3206
3184
  })
3207
- ], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e);
3208
- c.duration = Y(c.trackItemsMap);
3185
+ ], o = await Promise.all(i), u = o.map((p) => p.id), c = St(n, o, e);
3186
+ c.duration = G(c.trackItemsMap);
3209
3187
  const d = c.tracks.filter((p) => p.magnetic);
3210
- return Q(d, c.trackItemsMap, u), {
3188
+ return nt(d, c.trackItemsMap, u), {
3211
3189
  trackItemIds: c.trackItemIds,
3212
3190
  trackItemsMap: c.trackItemsMap,
3213
3191
  tracks: c.tracks,
@@ -3221,10 +3199,10 @@ async function ka(t, r, e = {}) {
3221
3199
  scaleMode: e.scaleMode,
3222
3200
  scaleAspectRatio: e.scaleAspectRatio
3223
3201
  })
3224
- ], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e);
3225
- c.duration = Y(c.trackItemsMap);
3202
+ ], o = await Promise.all(i), u = o.map((p) => p.id), c = St(n, o, e);
3203
+ c.duration = G(c.trackItemsMap);
3226
3204
  const d = c.tracks.filter((p) => p.magnetic);
3227
- return Q(d, c.trackItemsMap, u), {
3205
+ return nt(d, c.trackItemsMap, u), {
3228
3206
  trackItemIds: c.trackItemIds,
3229
3207
  trackItemsMap: c.trackItemsMap,
3230
3208
  tracks: c.tracks,
@@ -3232,47 +3210,47 @@ async function ka(t, r, e = {}) {
3232
3210
  };
3233
3211
  }
3234
3212
  async function va(t, r, e = {}) {
3235
- const n = C(t), i = "composition", a = r.trackItemsMap, u = r.trackItemIds, c = r.tracks || [], d = r.trackItemDetailsMap, { details: p, ...h } = await na(r, {
3213
+ const n = C(t), i = "composition", o = r.trackItemsMap, u = r.trackItemIds, c = r.tracks || [], d = r.trackItemDetailsMap, { details: p, ...h } = await na(r, {
3236
3214
  size: n.size,
3237
3215
  scaleMode: e.scaleMode,
3238
3216
  scaleAspectRatio: e.scaleAspectRatio
3239
- }), y = {
3217
+ }), g = {
3240
3218
  id: h.id,
3241
3219
  items: u,
3242
3220
  transitions: [],
3243
3221
  tracks: c
3244
- }, I = [{
3222
+ }, k = [{
3245
3223
  ...h,
3246
3224
  type: i,
3247
3225
  details: p
3248
- }], k = St(n, I, e);
3249
- k.trackItemsMap = {
3250
- ...k.trackItemsMap,
3251
- ...a,
3226
+ }], v = St(n, k, e);
3227
+ v.trackItemsMap = {
3228
+ ...v.trackItemsMap,
3229
+ ...o,
3252
3230
  [h.id]: {
3253
3231
  ...h,
3254
3232
  type: i,
3255
3233
  details: p
3256
3234
  }
3257
- }, k.structure = [...k.structure, y], k.duration = Y(k.trackItemsMap);
3258
- const b = k.tracks.filter((_) => _.magnetic);
3259
- return Q(b, k.trackItemsMap, [h.id]), d && Object.keys(d).forEach((_) => {
3260
- k.trackItemsMap[_] = {
3261
- ...k.trackItemsMap[_],
3235
+ }, v.structure = [...v.structure, g], v.duration = G(v.trackItemsMap);
3236
+ const I = v.tracks.filter((_) => _.magnetic);
3237
+ return nt(I, v.trackItemsMap, [h.id]), d && Object.keys(d).forEach((_) => {
3238
+ v.trackItemsMap[_] = {
3239
+ ...v.trackItemsMap[_],
3262
3240
  details: {
3263
3241
  ...d[_].details
3264
3242
  }
3265
3243
  };
3266
3244
  }), {
3267
- trackItemIds: k.trackItemIds,
3268
- trackItemsMap: k.trackItemsMap,
3269
- tracks: k.tracks,
3270
- duration: k.duration,
3271
- structure: k.structure
3245
+ trackItemIds: v.trackItemIds,
3246
+ trackItemsMap: v.trackItemsMap,
3247
+ tracks: v.tracks,
3248
+ duration: v.duration,
3249
+ structure: v.structure
3272
3250
  };
3273
3251
  }
3274
- async function ye(t, r, e = {}, n) {
3275
- const i = C(t), a = (y) => y.display ? y.display : {
3252
+ async function ge(t, r, e = {}, n) {
3253
+ const i = C(t), o = (g) => g.display ? g.display : {
3276
3254
  from: 0,
3277
3255
  to: i.duration
3278
3256
  }, u = [];
@@ -3288,25 +3266,25 @@ async function ye(t, r, e = {}, n) {
3288
3266
  scaleMode: e.scaleMode,
3289
3267
  scaleAspectRatio: e.scaleAspectRatio
3290
3268
  })
3291
- ), n === "radial-audio-bars" && (r.display = a(r), u.push(
3269
+ ), n === "radial-audio-bars" && (r.display = o(r), u.push(
3292
3270
  ea(r, {
3293
3271
  size: i.size,
3294
3272
  scaleMode: e.scaleMode,
3295
3273
  scaleAspectRatio: e.scaleAspectRatio
3296
3274
  })
3297
- )), n === "lineal-audio-bars" && (r.display = a(r), u.push(
3275
+ )), n === "lineal-audio-bars" && (r.display = o(r), u.push(
3298
3276
  mn(r, {
3299
3277
  size: i.size,
3300
3278
  scaleMode: e.scaleMode,
3301
3279
  scaleAspectRatio: e.scaleAspectRatio
3302
3280
  })
3303
- )), n === "wave-audio-bars" && (r.display = a(r), u.push(
3281
+ )), n === "wave-audio-bars" && (r.display = o(r), u.push(
3304
3282
  mn(r, {
3305
3283
  size: i.size,
3306
3284
  scaleMode: e.scaleMode,
3307
3285
  scaleAspectRatio: e.scaleAspectRatio
3308
3286
  })
3309
- )), n === "hill-audio-bars" && (r.display = a(r), u.push(
3287
+ )), n === "hill-audio-bars" && (r.display = o(r), u.push(
3310
3288
  mn(r, {
3311
3289
  size: i.size,
3312
3290
  scaleMode: e.scaleMode,
@@ -3319,10 +3297,10 @@ async function ye(t, r, e = {}, n) {
3319
3297
  scaleAspectRatio: e.scaleAspectRatio
3320
3298
  })
3321
3299
  );
3322
- const c = await Promise.all(u), d = c.map((y) => y.id), p = St(i, c, e);
3323
- p.duration = Y(p.trackItemsMap);
3324
- const h = p.tracks.filter((y) => y.magnetic);
3325
- return Q(h, p.trackItemsMap, d), {
3300
+ const c = await Promise.all(u), d = c.map((g) => g.id), p = St(i, c, e);
3301
+ p.duration = G(p.trackItemsMap);
3302
+ const h = p.tracks.filter((g) => g.magnetic);
3303
+ return nt(h, p.trackItemsMap, d), {
3326
3304
  trackItemIds: p.trackItemIds,
3327
3305
  trackItemsMap: p.trackItemsMap,
3328
3306
  tracks: p.tracks,
@@ -3330,20 +3308,20 @@ async function ye(t, r, e = {}, n) {
3330
3308
  };
3331
3309
  }
3332
3310
  async function _a(t, r, e = {}) {
3333
- const n = C(t), i = "template", a = r.trackItemsMap, u = r.trackItemIds, c = r.transitionsMap, d = r.transitionIds || [], p = r.tracks || [], h = r.structure || [], { details: y, ...m } = await ws(r, {
3311
+ const n = C(t), i = "template", o = r.trackItemsMap, u = r.trackItemIds, c = r.transitionsMap, d = r.transitionIds || [], p = r.tracks || [], h = r.structure || [], { details: g, ...m } = await ws(r, {
3334
3312
  size: n.size,
3335
3313
  scaleMode: e.scaleMode,
3336
3314
  scaleAspectRatio: e.scaleAspectRatio
3337
- }), I = {
3315
+ }), k = {
3338
3316
  id: m.id,
3339
3317
  items: u,
3340
3318
  transitions: d,
3341
3319
  tracks: p
3342
- }, b = [{
3320
+ }, I = [{
3343
3321
  ...m,
3344
3322
  type: i,
3345
- details: y
3346
- }], _ = St(n, b, e);
3323
+ details: g
3324
+ }], _ = St(n, I, e);
3347
3325
  _.transitionIds = [
3348
3326
  ..._.transitionIds,
3349
3327
  ...d
@@ -3352,19 +3330,19 @@ async function _a(t, r, e = {}) {
3352
3330
  ...c
3353
3331
  }, _.trackItemsMap = {
3354
3332
  ..._.trackItemsMap,
3355
- ...a,
3333
+ ...o,
3356
3334
  [m.id]: {
3357
3335
  ...m,
3358
3336
  type: i,
3359
- details: y
3337
+ details: g
3360
3338
  }
3361
3339
  }, _.structure = [
3362
3340
  ..._.structure,
3363
- I,
3341
+ k,
3364
3342
  ...h
3365
- ], _.duration = Y(_.trackItemsMap);
3366
- const f = _.tracks.filter((v) => v.magnetic);
3367
- return Q(f, _.trackItemsMap, [m.id]), {
3343
+ ], _.duration = G(_.trackItemsMap);
3344
+ const f = _.tracks.filter((b) => b.magnetic);
3345
+ return nt(f, _.trackItemsMap, [m.id]), {
3368
3346
  trackItemIds: _.trackItemIds,
3369
3347
  trackItemsMap: _.trackItemsMap,
3370
3348
  tracks: _.tracks,
@@ -3375,29 +3353,29 @@ async function _a(t, r, e = {}) {
3375
3353
  }
3376
3354
  async function Sa(t, r, e = {}) {
3377
3355
  const n = C(t), i = r.trackItems.map(
3378
- (y) => Es(y, {
3356
+ (g) => Es(g, {
3379
3357
  size: e.size
3380
3358
  })
3381
- ), a = await Promise.all(i), u = Cs(r.tracks, r.trackItems), c = [], d = {};
3382
- if (a.forEach((y) => {
3383
- const { details: m, ...I } = y;
3384
- c.push(y.id), d[y.id] = I;
3359
+ ), o = await Promise.all(i), u = Cs(r.tracks, r.trackItems), c = [], d = {};
3360
+ if (o.forEach((g) => {
3361
+ const { details: m, ...k } = g;
3362
+ c.push(g.id), d[g.id] = k;
3385
3363
  }), Os(
3386
3364
  n.tracks,
3387
3365
  u
3388
3366
  ))
3389
- n.tracks.forEach((y) => {
3367
+ n.tracks.forEach((g) => {
3390
3368
  u.forEach((m) => {
3391
- y.id === m.id && (y.magnetic && Q(
3392
- [y],
3369
+ g.id === m.id && (g.magnetic && nt(
3370
+ [g],
3393
3371
  n.trackItemsMap,
3394
3372
  c
3395
- ), y.items.push(...c));
3373
+ ), g.items.push(...c));
3396
3374
  });
3397
3375
  });
3398
3376
  else {
3399
- const y = e.trackIndex || 0, m = Math.min(
3400
- Math.max(y, 0),
3377
+ const g = e.trackIndex || 0, m = Math.min(
3378
+ Math.max(g, 0),
3401
3379
  n.tracks.length
3402
3380
  );
3403
3381
  n.tracks.splice(m, 0, ...u);
@@ -3408,9 +3386,9 @@ async function Sa(t, r, e = {}) {
3408
3386
  }, n.trackItemIds = [
3409
3387
  ...n.trackItemIds,
3410
3388
  ...c
3411
- ], n.duration = Y(n.trackItemsMap);
3412
- const h = n.tracks.filter((y) => y.magnetic);
3413
- return Q(
3389
+ ], n.duration = G(n.trackItemsMap);
3390
+ const h = n.tracks.filter((g) => g.magnetic);
3391
+ return nt(
3414
3392
  h,
3415
3393
  n.trackItemsMap,
3416
3394
  c
@@ -3424,7 +3402,7 @@ async function Sa(t, r, e = {}) {
3424
3402
  async function wa(t, r) {
3425
3403
  const e = C(t), n = e.trackItemsMap[r.id], i = [];
3426
3404
  if (!n) return {};
3427
- let a = n.animations || {};
3405
+ let o = n.animations || {};
3428
3406
  return r.animations.loop ? r.animations.loop.composition.forEach(
3429
3407
  (u) => {
3430
3408
  var c;
@@ -3445,7 +3423,7 @@ async function wa(t, r) {
3445
3423
  var c;
3446
3424
  (c = u.details) != null && c.fonts && i.push(...u.details.fonts);
3447
3425
  }
3448
- ), i.length > 0 && await He(i), a.in && r.animations.in ? a.in = r.animations.in : a.out && r.animations.out ? a.out = r.animations.out : a.loop && r.animations.loop ? a.loop = r.animations.loop : !a.out && r.animations.out ? a.out = r.animations.out : !a.in && r.animations.in ? a.in = r.animations.in : !a.loop && r.animations.loop ? a.loop = r.animations.loop : a = r.animations, (r.animations.in || r.animations.out || r.animations.loop) && delete a.timed, r.animations.timed && (a.timed = r.animations.timed, delete a.in, delete a.out, delete a.loop), n.animations = a, {
3426
+ ), i.length > 0 && await He(i), 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, (r.animations.in || r.animations.out || r.animations.loop) && delete o.timed, r.animations.timed && (o.timed = r.animations.timed, delete o.in, delete o.out, delete o.loop), n.animations = o, {
3449
3427
  trackItemsMap: e.trackItemsMap
3450
3428
  };
3451
3429
  }
@@ -3456,10 +3434,10 @@ async function Ta(t, r, e = {}) {
3456
3434
  scaleMode: e.scaleMode,
3457
3435
  scaleAspectRatio: e.scaleAspectRatio
3458
3436
  })
3459
- ], a = await Promise.all(i), u = a.map((p) => p.id), c = St(n, a, e);
3460
- c.duration = Y(c.trackItemsMap);
3437
+ ], o = await Promise.all(i), u = o.map((p) => p.id), c = St(n, o, e);
3438
+ c.duration = G(c.trackItemsMap);
3461
3439
  const d = c.tracks.filter((p) => p.magnetic);
3462
- return Q(d, c.trackItemsMap, u), {
3440
+ return nt(d, c.trackItemsMap, u), {
3463
3441
  trackItemIds: c.trackItemIds,
3464
3442
  trackItemsMap: c.trackItemsMap,
3465
3443
  tracks: c.tracks,
@@ -3474,8 +3452,8 @@ function Ma(t) {
3474
3452
  ), n = Vt.pipe(
3475
3453
  qt(({ key: f }) => f.startsWith(H))
3476
3454
  ), i = Vt.pipe(
3477
- qt(({ key: f }) => f.startsWith(tt))
3478
- ), a = Vt.pipe(
3455
+ qt(({ key: f }) => f.startsWith(Q))
3456
+ ), o = Vt.pipe(
3479
3457
  qt(({ key: f }) => f.startsWith(Er))
3480
3458
  ), u = Vt.pipe(
3481
3459
  qt(({ key: f }) => f.startsWith(Le))
@@ -3484,17 +3462,17 @@ function Ma(t) {
3484
3462
  ), d = Vt.pipe(
3485
3463
  qt(({ key: f }) => f.startsWith(fs))
3486
3464
  ), p = r.subscribe(async (f) => {
3487
- var v;
3465
+ var b;
3488
3466
  if (f.key === Kn) {
3489
- const { actions: w } = (v = f.value) == null ? void 0 : v.payload;
3467
+ const { actions: w } = (b = f.value) == null ? void 0 : b.payload;
3490
3468
  w.forEach((S) => {
3491
3469
  Ws(S.type, S.payload && { payload: S.payload });
3492
3470
  });
3493
3471
  }
3494
3472
  }), h = e.subscribe(async (f) => {
3495
- var v, w;
3473
+ var b, w;
3496
3474
  if (f.key === ai) {
3497
- const S = (v = f.value) == null ? void 0 : v.payload, E = await oa(t.getState(), S);
3475
+ const S = (b = f.value) == null ? void 0 : b.payload, E = await oa(t.getState(), S);
3498
3476
  t.updateState(E, {
3499
3477
  kind: "design:load",
3500
3478
  updateHistory: !1
@@ -3512,13 +3490,13 @@ function Ma(t) {
3512
3490
  }
3513
3491
  );
3514
3492
  }
3515
- }), y = a.subscribe((f) => {
3493
+ }), g = o.subscribe((f) => {
3516
3494
  if (f.key === Fi) return t.undo();
3517
3495
  if (f.key === Ni) return t.redo();
3518
3496
  }), m = d.subscribe((f) => {
3519
- var v;
3497
+ var b;
3520
3498
  if (f.key === Li) {
3521
- const w = (v = f.value) == null ? void 0 : v.payload.scale;
3499
+ const w = (b = f.value) == null ? void 0 : b.payload.scale;
3522
3500
  t.updateState(
3523
3501
  {
3524
3502
  scale: w
@@ -3529,10 +3507,10 @@ function Ma(t) {
3529
3507
  }
3530
3508
  );
3531
3509
  }
3532
- }), I = i.subscribe(async (f) => {
3533
- var v, w, S, E;
3510
+ }), k = i.subscribe(async (f) => {
3511
+ var b, w, S, E;
3534
3512
  if (f.key === Ri) {
3535
- const T = ((v = f.value) == null ? void 0 : v.payload.trackItemIds) || [];
3513
+ const T = ((b = f.value) == null ? void 0 : b.payload.trackItemIds) || [];
3536
3514
  t.updateState(
3537
3515
  { activeIds: T },
3538
3516
  {
@@ -3562,110 +3540,110 @@ function Ma(t) {
3562
3540
  kind: "update:details"
3563
3541
  });
3564
3542
  }
3565
- }), k = n.subscribe(async (f) => {
3566
- var L, R, G, x, F, et, Qt, te, Se, we, Te, Me, z, Ee, Ae, st, ee, $, re, xe, it, ne, se, zt, $t, ie, Ft, ae, Nt, oe, Oe, Ce, wt, Lt, ce, ue, ut, Tt, Re, yt, Mt, Ht, rt, le, de, Pe, Ut, Et, fe, At, gt, at, xt, Wt, It, jt, bt, Bt, Yt;
3567
- const v = C(t.getState()), w = ((R = (L = f.value) == null ? void 0 : L.options) == null ? void 0 : R.isSelected) || !1, S = (x = (G = f.value) == null ? void 0 : G.options) == null ? void 0 : x.scaleMode, E = (et = (F = f.value) == null ? void 0 : F.options) == null ? void 0 : et.scaleAspectRatio, T = (te = (Qt = f.value) == null ? void 0 : Qt.options) == null ? void 0 : te.trackIndex;
3543
+ }), v = n.subscribe(async (f) => {
3544
+ var L, R, Y, x, F, tt, Qt, te, Se, we, Te, Me, z, Ee, Ae, st, ee, $, re, xe, it, ne, se, zt, $t, ie, Ft, ae, Nt, oe, Oe, Ce, wt, Lt, ce, ue, ut, Tt, Re, gt, Mt, Ht, et, le, de, Pe, Ut, Et, fe, At, yt, at, xt, Wt, It, jt, bt, Bt, Yt;
3545
+ const b = C(t.getState()), w = ((R = (L = f.value) == null ? void 0 : L.options) == null ? void 0 : R.isSelected) || !1, S = (x = (Y = f.value) == null ? void 0 : Y.options) == null ? void 0 : x.scaleMode, E = (tt = (F = f.value) == null ? void 0 : F.options) == null ? void 0 : tt.scaleAspectRatio, T = (te = (Qt = f.value) == null ? void 0 : Qt.options) == null ? void 0 : te.trackIndex;
3568
3546
  let M = {};
3569
- f.key === hi ? M = await wa(v, (Se = f.value) == null ? void 0 : Se.payload) : f.key === gi ? M = await ha(v, (we = f.value) == null ? void 0 : we.payload, {
3547
+ f.key === hi ? M = await wa(b, (Se = f.value) == null ? void 0 : Se.payload) : f.key === yi ? M = await ha(b, (we = f.value) == null ? void 0 : we.payload, {
3570
3548
  trackIndex: T
3571
- }) : f.key === mi ? M = await Sa(v, (Te = f.value) == null ? void 0 : Te.payload, {
3549
+ }) : f.key === mi ? M = await Sa(b, (Te = f.value) == null ? void 0 : Te.payload, {
3572
3550
  trackIndex: T
3573
- }) : f.key === ci ? M = await Ia(v, (Me = f.value) == null ? void 0 : Me.payload, {
3551
+ }) : f.key === ci ? M = await Ia(b, (Me = f.value) == null ? void 0 : Me.payload, {
3574
3552
  targetTrackIndex: T,
3575
3553
  targetTrackId: (z = f.value) == null ? void 0 : z.options.targetTrackId,
3576
- size: v.size,
3554
+ size: b.size,
3577
3555
  isNewTrack: (Ae = (Ee = f.value) == null ? void 0 : Ee.options) == null ? void 0 : Ae.isNewTrack
3578
- }) : f.key === yi ? M = await _a(v, (st = f.value) == null ? void 0 : st.payload, {
3556
+ }) : f.key === gi ? M = await _a(b, (st = f.value) == null ? void 0 : st.payload, {
3579
3557
  scaleMode: S,
3580
3558
  scaleAspectRatio: E,
3581
3559
  targetTrackIndex: T,
3582
3560
  targetTrackId: ($ = (ee = f.value) == null ? void 0 : ee.options) == null ? void 0 : $.targetTrackId
3583
- }) : f.key === fi ? M = await ka(v, (re = f.value) == null ? void 0 : re.payload, {
3561
+ }) : f.key === fi ? M = await ka(b, (re = f.value) == null ? void 0 : re.payload, {
3584
3562
  scaleMode: S,
3585
3563
  scaleAspectRatio: E,
3586
3564
  targetTrackIndex: T,
3587
3565
  targetTrackId: (xe = f.value) == null ? void 0 : xe.options.targetTrackId
3588
- }) : f.key === pi ? M = await ba(v, (it = f.value) == null ? void 0 : it.payload, {
3566
+ }) : f.key === pi ? M = await ba(b, (it = f.value) == null ? void 0 : it.payload, {
3589
3567
  scaleMode: S,
3590
3568
  scaleAspectRatio: E,
3591
3569
  targetTrackIndex: T,
3592
3570
  targetTrackId: (ne = f.value) == null ? void 0 : ne.options.targetTrackId
3593
- }) : f.key === Mi ? M = await Ta(v, (se = f.value) == null ? void 0 : se.payload, {
3571
+ }) : f.key === Mi ? M = await Ta(b, (se = f.value) == null ? void 0 : se.payload, {
3594
3572
  scaleMode: S,
3595
3573
  scaleAspectRatio: E,
3596
3574
  targetTrackIndex: T,
3597
3575
  targetTrackId: (zt = f.value) == null ? void 0 : zt.options.targetTrackId
3598
- }) : f.key === di ? M = await ma(v, ($t = f.value) == null ? void 0 : $t.payload, {
3576
+ }) : f.key === di ? M = await ma(b, ($t = f.value) == null ? void 0 : $t.payload, {
3599
3577
  scaleMode: S,
3600
3578
  scaleAspectRatio: E,
3601
3579
  targetTrackIndex: T,
3602
3580
  targetTrackId: (ie = f.value) == null ? void 0 : ie.options.targetTrackId,
3603
3581
  isNewTrack: (ae = (Ft = f.value) == null ? void 0 : Ft.options) == null ? void 0 : ae.isNewTrack
3604
- }) : f.key === li ? M = await ya(v, (Nt = f.value) == null ? void 0 : Nt.payload, {
3582
+ }) : f.key === li ? M = await ga(b, (Nt = f.value) == null ? void 0 : Nt.payload, {
3605
3583
  targetTrackIndex: T,
3606
3584
  targetTrackId: (oe = f.value) == null ? void 0 : oe.options.targetTrackId,
3607
3585
  isNewTrack: (Ce = (Oe = f.value) == null ? void 0 : Oe.options) == null ? void 0 : Ce.isNewTrack
3608
- }) : f.key === ui ? M = await ga(v, (wt = f.value) == null ? void 0 : wt.payload, {
3586
+ }) : f.key === ui ? M = await ya(b, (wt = f.value) == null ? void 0 : wt.payload, {
3609
3587
  scaleMode: S,
3610
3588
  scaleAspectRatio: E,
3611
3589
  targetTrackIndex: T,
3612
3590
  targetTrackId: (Lt = f.value) == null ? void 0 : Lt.options.targetTrackId,
3613
3591
  isNewTrack: (ue = (ce = f.value) == null ? void 0 : ce.options) == null ? void 0 : ue.isNewTrack
3614
- }) : f.key === Ii ? M = await va(v, (ut = f.value) == null ? void 0 : ut.payload, {
3592
+ }) : f.key === Ii ? M = await va(b, (ut = f.value) == null ? void 0 : ut.payload, {
3615
3593
  scaleMode: S,
3616
3594
  scaleAspectRatio: E,
3617
3595
  targetTrackIndex: T,
3618
3596
  targetTrackId: (Tt = f.value) == null ? void 0 : Tt.options.targetTrackId
3619
- }) : f.key === bi ? M = await ye(
3620
- v,
3597
+ }) : f.key === bi ? M = await ge(
3598
+ b,
3621
3599
  (Re = f.value) == null ? void 0 : Re.payload,
3622
3600
  {
3623
3601
  targetTrackIndex: T,
3624
- targetTrackId: (Mt = (yt = f.value) == null ? void 0 : yt.options) == null ? void 0 : Mt.targetTrackId
3602
+ targetTrackId: (Mt = (gt = f.value) == null ? void 0 : gt.options) == null ? void 0 : Mt.targetTrackId
3625
3603
  },
3626
3604
  "progress-bar"
3627
- ) : f.key === Si ? M = await ye(
3628
- v,
3605
+ ) : f.key === Si ? M = await ge(
3606
+ b,
3629
3607
  (Ht = f.value) == null ? void 0 : Ht.payload,
3630
3608
  {
3631
3609
  targetTrackIndex: T,
3632
- targetTrackId: (le = (rt = f.value) == null ? void 0 : rt.options) == null ? void 0 : le.targetTrackId
3610
+ targetTrackId: (le = (et = f.value) == null ? void 0 : et.options) == null ? void 0 : le.targetTrackId
3633
3611
  },
3634
3612
  "progress-square"
3635
- ) : f.key === ki ? M = await ye(
3636
- v,
3613
+ ) : f.key === ki ? M = await ge(
3614
+ b,
3637
3615
  (de = f.value) == null ? void 0 : de.payload,
3638
3616
  {
3639
3617
  targetTrackIndex: T,
3640
3618
  targetTrackId: (Ut = (Pe = f.value) == null ? void 0 : Pe.options) == null ? void 0 : Ut.targetTrackId
3641
3619
  },
3642
3620
  "progress-frame"
3643
- ) : f.key === vi ? M = await ye(
3644
- v,
3621
+ ) : f.key === vi ? M = await ge(
3622
+ b,
3645
3623
  (Et = f.value) == null ? void 0 : Et.payload,
3646
3624
  {
3647
3625
  targetTrackIndex: T,
3648
3626
  targetTrackId: (At = (fe = f.value) == null ? void 0 : fe.options) == null ? void 0 : At.targetTrackId
3649
3627
  },
3650
3628
  "radial-audio-bars"
3651
- ) : f.key === _i ? M = await ye(
3652
- v,
3653
- (gt = f.value) == null ? void 0 : gt.payload,
3629
+ ) : f.key === _i ? M = await ge(
3630
+ b,
3631
+ (yt = f.value) == null ? void 0 : yt.payload,
3654
3632
  {
3655
3633
  targetTrackIndex: T,
3656
3634
  targetTrackId: (xt = (at = f.value) == null ? void 0 : at.options) == null ? void 0 : xt.targetTrackId
3657
3635
  },
3658
3636
  "lineal-audio-bars"
3659
- ) : f.key === wi ? M = await ye(
3660
- v,
3637
+ ) : f.key === wi ? M = await ge(
3638
+ b,
3661
3639
  (Wt = f.value) == null ? void 0 : Wt.payload,
3662
3640
  {
3663
3641
  targetTrackIndex: T,
3664
3642
  targetTrackId: (jt = (It = f.value) == null ? void 0 : It.options) == null ? void 0 : jt.targetTrackId
3665
3643
  },
3666
3644
  "wave-audio-bars"
3667
- ) : f.key === Ti && (M = await ye(
3668
- v,
3645
+ ) : f.key === Ti && (M = await ge(
3646
+ b,
3669
3647
  (bt = f.value) == null ? void 0 : bt.payload,
3670
3648
  {
3671
3649
  targetTrackIndex: T,
@@ -3676,10 +3654,10 @@ function Ma(t) {
3676
3654
  updateHistory: !0,
3677
3655
  kind: "add"
3678
3656
  });
3679
- }), b = u.subscribe(async (f) => {
3680
- var v;
3657
+ }), I = u.subscribe(async (f) => {
3658
+ var b;
3681
3659
  if (f.key === Ci) {
3682
- const w = (v = f.value) == null ? void 0 : v.options.time, S = ua(t.getState(), w);
3660
+ const w = (b = f.value) == null ? void 0 : b.options.time, S = ua(t.getState(), w);
3683
3661
  Object.keys(S).length > 0 && t.updateState(S, {
3684
3662
  updateHistory: !0,
3685
3663
  kind: "update"
@@ -3693,11 +3671,11 @@ function Ma(t) {
3693
3671
  });
3694
3672
  }
3695
3673
  }), _ = c.subscribe(async (f) => {
3696
- var v, w, S;
3674
+ var b, w, S;
3697
3675
  if (f.key === Ei) {
3698
3676
  const E = await la(
3699
3677
  t.getState(),
3700
- (v = f.value) == null ? void 0 : v.payload
3678
+ (b = f.value) == null ? void 0 : b.payload
3701
3679
  );
3702
3680
  t.updateState(E, {
3703
3681
  updateHistory: !0,
@@ -3724,7 +3702,7 @@ function Ma(t) {
3724
3702
  });
3725
3703
  return {
3726
3704
  unsubscribe: () => {
3727
- k.unsubscribe(), b.unsubscribe(), _.unsubscribe(), y.unsubscribe(), I.unsubscribe(), h.unsubscribe(), m.unsubscribe(), p.unsubscribe();
3705
+ v.unsubscribe(), I.unsubscribe(), _.unsubscribe(), g.unsubscribe(), k.unsubscribe(), h.unsubscribe(), m.unsubscribe(), p.unsubscribe();
3728
3706
  }
3729
3707
  };
3730
3708
  }
@@ -3732,21 +3710,21 @@ const Ea = { Date: !0, RegExp: !0, String: !0, Number: !0 };
3732
3710
  function Rs(t, r, e = { cyclesFix: !0 }, n = []) {
3733
3711
  var c, d;
3734
3712
  let i = [];
3735
- const a = Array.isArray(t);
3713
+ const o = Array.isArray(t);
3736
3714
  for (const p in t) {
3737
- const h = t[p], y = a ? +p : p;
3715
+ const h = t[p], g = o ? +p : p;
3738
3716
  if (!(p in r)) {
3739
3717
  i.push({
3740
3718
  type: "REMOVE",
3741
- path: [y],
3719
+ path: [g],
3742
3720
  oldValue: t[p]
3743
3721
  });
3744
3722
  continue;
3745
3723
  }
3746
- const m = r[p], I = typeof h == "object" && typeof m == "object" && Array.isArray(h) === Array.isArray(m);
3747
- h && m && I && !Ea[(d = (c = Object.getPrototypeOf(h)) == null ? void 0 : c.constructor) == null ? void 0 : d.name] && (!e.cyclesFix || !n.includes(h)) ? i.push.apply(i, Rs(h, m, e, e.cyclesFix ? n.concat([h]) : []).map((k) => (k.path.unshift(y), k))) : h !== m && // treat NaN values as equivalent
3748
- !(Number.isNaN(h) && Number.isNaN(m)) && !(I && (isNaN(h) ? h + "" == m + "" : +h == +m)) && i.push({
3749
- path: [y],
3724
+ const m = r[p], k = typeof h == "object" && typeof m == "object" && Array.isArray(h) === Array.isArray(m);
3725
+ h && m && k && !Ea[(d = (c = Object.getPrototypeOf(h)) == null ? void 0 : c.constructor) == null ? void 0 : d.name] && (!e.cyclesFix || !n.includes(h)) ? i.push.apply(i, Rs(h, m, e, e.cyclesFix ? n.concat([h]) : []).map((v) => (v.path.unshift(g), v))) : h !== m && // treat NaN values as equivalent
3726
+ !(Number.isNaN(h) && Number.isNaN(m)) && !(k && (isNaN(h) ? h + "" == m + "" : +h == +m)) && i.push({
3727
+ path: [g],
3750
3728
  type: "CHANGE",
3751
3729
  value: m,
3752
3730
  oldValue: h
@@ -3831,7 +3809,7 @@ function ve(t) {
3831
3809
  function Qe(t, r) {
3832
3810
  return ve(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
3833
3811
  }
3834
- function yn(t, r) {
3812
+ function gn(t, r) {
3835
3813
  return ve(t) === 2 ? t.get(r) : t[r];
3836
3814
  }
3837
3815
  function zs(t, r, e) {
@@ -3847,7 +3825,7 @@ function sr(t) {
3847
3825
  function ir(t) {
3848
3826
  return t instanceof Set;
3849
3827
  }
3850
- function ge(t) {
3828
+ function ye(t) {
3851
3829
  return t.copy_ || t.base_;
3852
3830
  }
3853
3831
  function Tn(t, r) {
@@ -3862,8 +3840,8 @@ function Tn(t, r) {
3862
3840
  const n = Object.getOwnPropertyDescriptors(t);
3863
3841
  delete n[lt];
3864
3842
  let i = Reflect.ownKeys(n);
3865
- for (let a = 0; a < i.length; a++) {
3866
- const u = i[a], c = n[u];
3843
+ for (let o = 0; o < i.length; o++) {
3844
+ const u = i[o], c = n[u];
3867
3845
  c.writable === !1 && (c.writable = !0, c.configurable = !0), (c.get || c.set) && (n[u] = {
3868
3846
  configurable: !0,
3869
3847
  writable: !0,
@@ -3946,7 +3924,7 @@ function wr(t, r, e) {
3946
3924
  if (!n)
3947
3925
  return Ze(
3948
3926
  r,
3949
- (i, a) => ts(t, n, r, i, a, e)
3927
+ (i, o) => ts(t, n, r, i, o, e)
3950
3928
  ), r;
3951
3929
  if (n.scope_ !== t)
3952
3930
  return r;
@@ -3955,9 +3933,9 @@ function wr(t, r, e) {
3955
3933
  if (!n.finalized_) {
3956
3934
  n.finalized_ = !0, n.scope_.unfinalizedDrafts_--;
3957
3935
  const i = n.copy_;
3958
- let a = i, u = !1;
3959
- n.type_ === 3 && (a = new Set(i), i.clear(), u = !0), Ze(
3960
- a,
3936
+ let o = i, u = !1;
3937
+ n.type_ === 3 && (o = new Set(i), i.clear(), u = !0), Ze(
3938
+ o,
3961
3939
  (c, d) => ts(t, n, i, c, d, e, u)
3962
3940
  ), Tr(t, i, !1), e && t.patches_ && _e("Patches").generatePatches_(
3963
3941
  n,
@@ -3968,10 +3946,10 @@ function wr(t, r, e) {
3968
3946
  }
3969
3947
  return n.copy_;
3970
3948
  }
3971
- function ts(t, r, e, n, i, a, u) {
3949
+ function ts(t, r, e, n, i, o, u) {
3972
3950
  if (process.env.NODE_ENV !== "production" && i === e && B(5), ke(i)) {
3973
- const c = a && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
3974
- !Qe(r.assigned_, n) ? a.concat(n) : void 0, d = wr(t, i, c);
3951
+ const c = o && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
3952
+ !Qe(r.assigned_, n) ? o.concat(n) : void 0, d = wr(t, i, c);
3975
3953
  if (zs(e, n, d), ke(d))
3976
3954
  t.canAutoFreeze_ = !1;
3977
3955
  else
@@ -4010,34 +3988,34 @@ function Da(t, r) {
4010
3988
  revoke_: null,
4011
3989
  isManual_: !1
4012
3990
  };
4013
- let i = n, a = Nn;
4014
- e && (i = [n], a = er);
4015
- const { revoke: u, proxy: c } = Proxy.revocable(i, a);
3991
+ let i = n, o = Nn;
3992
+ e && (i = [n], o = er);
3993
+ const { revoke: u, proxy: c } = Proxy.revocable(i, o);
4016
3994
  return n.draft_ = c, n.revoke_ = u, c;
4017
3995
  }
4018
3996
  var Nn = {
4019
3997
  get(t, r) {
4020
3998
  if (r === lt)
4021
3999
  return t;
4022
- const e = ge(t);
4000
+ const e = ye(t);
4023
4001
  if (!Qe(e, r))
4024
4002
  return za(t, e, r);
4025
4003
  const n = e[r];
4026
- return t.finalized_ || !Jt(n) ? n : n === gn(t.base_, r) ? (In(t), t.copy_[r] = On(n, t)) : n;
4004
+ return t.finalized_ || !Jt(n) ? n : n === yn(t.base_, r) ? (In(t), t.copy_[r] = On(n, t)) : n;
4027
4005
  },
4028
4006
  has(t, r) {
4029
- return r in ge(t);
4007
+ return r in ye(t);
4030
4008
  },
4031
4009
  ownKeys(t) {
4032
- return Reflect.ownKeys(ge(t));
4010
+ return Reflect.ownKeys(ye(t));
4033
4011
  },
4034
4012
  set(t, r, e) {
4035
- const n = Fs(ge(t), r);
4013
+ const n = Fs(ye(t), r);
4036
4014
  if (n != null && n.set)
4037
4015
  return n.set.call(t.draft_, e), !0;
4038
4016
  if (!t.modified_) {
4039
- const i = gn(ge(t), r), a = i == null ? void 0 : i[lt];
4040
- if (a && a.base_ === e)
4017
+ const i = yn(ye(t), r), o = i == null ? void 0 : i[lt];
4018
+ if (o && o.base_ === e)
4041
4019
  return t.copy_[r] = e, t.assigned_[r] = !1, !0;
4042
4020
  if (xa(e, i) && (e !== void 0 || Qe(t.base_, r)))
4043
4021
  return !0;
@@ -4048,12 +4026,12 @@ var Nn = {
4048
4026
  Number.isNaN(e) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = e, t.assigned_[r] = !0), !0;
4049
4027
  },
4050
4028
  deleteProperty(t, r) {
4051
- return gn(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, In(t), xn(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
4029
+ return yn(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, In(t), xn(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
4052
4030
  },
4053
4031
  // Note: We never coerce `desc.value` into an Immer draft, because we can't make
4054
4032
  // the same guarantee in ES5 mode.
4055
4033
  getOwnPropertyDescriptor(t, r) {
4056
- const e = ge(t), n = Reflect.getOwnPropertyDescriptor(e, r);
4034
+ const e = ye(t), n = Reflect.getOwnPropertyDescriptor(e, r);
4057
4035
  return n && {
4058
4036
  writable: !0,
4059
4037
  configurable: t.type_ !== 1 || r !== "length",
@@ -4082,9 +4060,9 @@ er.deleteProperty = function(t, r) {
4082
4060
  er.set = function(t, r, e) {
4083
4061
  return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && B(14), Nn.set.call(this, t[0], r, e, t[0]);
4084
4062
  };
4085
- function gn(t, r) {
4063
+ function yn(t, r) {
4086
4064
  const e = t[lt];
4087
- return (e ? ge(e) : t)[r];
4065
+ return (e ? ye(e) : t)[r];
4088
4066
  }
4089
4067
  function za(t, r, e) {
4090
4068
  var i;
@@ -4119,28 +4097,28 @@ var $a = class {
4119
4097
  constructor(t) {
4120
4098
  this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, e, n) => {
4121
4099
  if (typeof r == "function" && typeof e != "function") {
4122
- const a = e;
4100
+ const o = e;
4123
4101
  e = r;
4124
4102
  const u = this;
4125
- return function(d = a, ...p) {
4103
+ return function(d = o, ...p) {
4126
4104
  return u.produce(d, (h) => e.call(this, h, ...p));
4127
4105
  };
4128
4106
  }
4129
4107
  typeof e != "function" && B(6), n !== void 0 && typeof n != "function" && B(7);
4130
4108
  let i;
4131
4109
  if (Jt(r)) {
4132
- const a = Zn(this), u = On(r, void 0);
4110
+ const o = Zn(this), u = On(r, void 0);
4133
4111
  let c = !0;
4134
4112
  try {
4135
4113
  i = e(u), c = !1;
4136
4114
  } finally {
4137
- c ? En(a) : An(a);
4115
+ c ? En(o) : An(o);
4138
4116
  }
4139
- return Jn(a, n), Qn(i, a);
4117
+ return Jn(o, n), Qn(i, o);
4140
4118
  } else if (!r || typeof r != "object") {
4141
4119
  if (i = e(r), i === void 0 && (i = r), i === $n && (i = void 0), this.autoFreeze_ && Fn(i, !0), n) {
4142
- const a = [], u = [];
4143
- _e("Patches").generateReplacementPatches_(r, i, a, u), n(a, u);
4120
+ const o = [], u = [];
4121
+ _e("Patches").generateReplacementPatches_(r, i, o, u), n(o, u);
4144
4122
  }
4145
4123
  return i;
4146
4124
  } else
@@ -4232,131 +4210,131 @@ function es() {
4232
4210
  "Patching reserved attributes like __proto__, prototype and constructor is not allowed"
4233
4211
  );
4234
4212
  const r = "replace", e = "add", n = "remove";
4235
- function i(m, I, k, b) {
4213
+ function i(m, k, v, I) {
4236
4214
  switch (m.type_) {
4237
4215
  case 0:
4238
4216
  case 2:
4239
4217
  return u(
4240
4218
  m,
4241
- I,
4242
4219
  k,
4243
- b
4220
+ v,
4221
+ I
4244
4222
  );
4245
4223
  case 1:
4246
- return a(m, I, k, b);
4224
+ return o(m, k, v, I);
4247
4225
  case 3:
4248
4226
  return c(
4249
4227
  m,
4250
- I,
4251
4228
  k,
4252
- b
4229
+ v,
4230
+ I
4253
4231
  );
4254
4232
  }
4255
4233
  }
4256
- function a(m, I, k, b) {
4257
- let { base_: _, assigned_: f } = m, v = m.copy_;
4258
- v.length < _.length && ([_, v] = [v, _], [k, b] = [b, k]);
4234
+ function o(m, k, v, I) {
4235
+ let { base_: _, assigned_: f } = m, b = m.copy_;
4236
+ b.length < _.length && ([_, b] = [b, _], [v, I] = [I, v]);
4259
4237
  for (let w = 0; w < _.length; w++)
4260
- if (f[w] && v[w] !== _[w]) {
4261
- const S = I.concat([w]);
4262
- k.push({
4238
+ if (f[w] && b[w] !== _[w]) {
4239
+ const S = k.concat([w]);
4240
+ v.push({
4263
4241
  op: r,
4264
4242
  path: S,
4265
4243
  // Need to maybe clone it, as it can in fact be the original value
4266
4244
  // due to the base/copy inversion at the start of this function
4267
- value: y(v[w])
4268
- }), b.push({
4245
+ value: g(b[w])
4246
+ }), I.push({
4269
4247
  op: r,
4270
4248
  path: S,
4271
- value: y(_[w])
4249
+ value: g(_[w])
4272
4250
  });
4273
4251
  }
4274
- for (let w = _.length; w < v.length; w++) {
4275
- const S = I.concat([w]);
4276
- k.push({
4252
+ for (let w = _.length; w < b.length; w++) {
4253
+ const S = k.concat([w]);
4254
+ v.push({
4277
4255
  op: e,
4278
4256
  path: S,
4279
4257
  // Need to maybe clone it, as it can in fact be the original value
4280
4258
  // due to the base/copy inversion at the start of this function
4281
- value: y(v[w])
4259
+ value: g(b[w])
4282
4260
  });
4283
4261
  }
4284
- for (let w = v.length - 1; _.length <= w; --w) {
4285
- const S = I.concat([w]);
4286
- b.push({
4262
+ for (let w = b.length - 1; _.length <= w; --w) {
4263
+ const S = k.concat([w]);
4264
+ I.push({
4287
4265
  op: n,
4288
4266
  path: S
4289
4267
  });
4290
4268
  }
4291
4269
  }
4292
- function u(m, I, k, b) {
4270
+ function u(m, k, v, I) {
4293
4271
  const { base_: _, copy_: f } = m;
4294
- Ze(m.assigned_, (v, w) => {
4295
- const S = yn(_, v), E = yn(f, v), T = w ? Qe(_, v) ? r : e : n;
4272
+ Ze(m.assigned_, (b, w) => {
4273
+ const S = gn(_, b), E = gn(f, b), T = w ? Qe(_, b) ? r : e : n;
4296
4274
  if (S === E && T === r)
4297
4275
  return;
4298
- const M = I.concat(v);
4299
- k.push(T === n ? { op: T, path: M } : { op: T, path: M, value: E }), b.push(
4300
- T === e ? { op: n, path: M } : T === n ? { op: e, path: M, value: y(S) } : { op: r, path: M, value: y(S) }
4276
+ const M = k.concat(b);
4277
+ v.push(T === n ? { op: T, path: M } : { op: T, path: M, value: E }), I.push(
4278
+ T === e ? { op: n, path: M } : T === n ? { op: e, path: M, value: g(S) } : { op: r, path: M, value: g(S) }
4301
4279
  );
4302
4280
  });
4303
4281
  }
4304
- function c(m, I, k, b) {
4305
- let { base_: _, copy_: f } = m, v = 0;
4282
+ function c(m, k, v, I) {
4283
+ let { base_: _, copy_: f } = m, b = 0;
4306
4284
  _.forEach((w) => {
4307
4285
  if (!f.has(w)) {
4308
- const S = I.concat([v]);
4309
- k.push({
4286
+ const S = k.concat([b]);
4287
+ v.push({
4310
4288
  op: n,
4311
4289
  path: S,
4312
4290
  value: w
4313
- }), b.unshift({
4291
+ }), I.unshift({
4314
4292
  op: e,
4315
4293
  path: S,
4316
4294
  value: w
4317
4295
  });
4318
4296
  }
4319
- v++;
4320
- }), v = 0, f.forEach((w) => {
4297
+ b++;
4298
+ }), b = 0, f.forEach((w) => {
4321
4299
  if (!_.has(w)) {
4322
- const S = I.concat([v]);
4323
- k.push({
4300
+ const S = k.concat([b]);
4301
+ v.push({
4324
4302
  op: e,
4325
4303
  path: S,
4326
4304
  value: w
4327
- }), b.unshift({
4305
+ }), I.unshift({
4328
4306
  op: n,
4329
4307
  path: S,
4330
4308
  value: w
4331
4309
  });
4332
4310
  }
4333
- v++;
4311
+ b++;
4334
4312
  });
4335
4313
  }
4336
- function d(m, I, k, b) {
4337
- k.push({
4314
+ function d(m, k, v, I) {
4315
+ v.push({
4338
4316
  op: r,
4339
4317
  path: [],
4340
- value: I === $n ? void 0 : I
4341
- }), b.push({
4318
+ value: k === $n ? void 0 : k
4319
+ }), I.push({
4342
4320
  op: r,
4343
4321
  path: [],
4344
4322
  value: m
4345
4323
  });
4346
4324
  }
4347
- function p(m, I) {
4348
- return I.forEach((k) => {
4349
- const { path: b, op: _ } = k;
4325
+ function p(m, k) {
4326
+ return k.forEach((v) => {
4327
+ const { path: I, op: _ } = v;
4350
4328
  let f = m;
4351
- for (let E = 0; E < b.length - 1; E++) {
4329
+ for (let E = 0; E < I.length - 1; E++) {
4352
4330
  const T = ve(f);
4353
- let M = b[E];
4354
- typeof M != "string" && typeof M != "number" && (M = "" + M), (T === 0 || T === 1) && (M === "__proto__" || M === "constructor") && B(19), typeof f == "function" && M === "prototype" && B(19), f = yn(f, M), typeof f != "object" && B(18, b.join("/"));
4331
+ let M = I[E];
4332
+ typeof M != "string" && typeof M != "number" && (M = "" + M), (T === 0 || T === 1) && (M === "__proto__" || M === "constructor") && B(19), typeof f == "function" && M === "prototype" && B(19), f = gn(f, M), typeof f != "object" && B(18, I.join("/"));
4355
4333
  }
4356
- const v = ve(f), w = h(k.value), S = b[b.length - 1];
4334
+ const b = ve(f), w = h(v.value), S = I[I.length - 1];
4357
4335
  switch (_) {
4358
4336
  case r:
4359
- switch (v) {
4337
+ switch (b) {
4360
4338
  case 2:
4361
4339
  return f.set(S, w);
4362
4340
  case 3:
@@ -4365,7 +4343,7 @@ function es() {
4365
4343
  return f[S] = w;
4366
4344
  }
4367
4345
  case e:
4368
- switch (v) {
4346
+ switch (b) {
4369
4347
  case 1:
4370
4348
  return S === "-" ? f.push(w) : f.splice(S, 0, w);
4371
4349
  case 2:
@@ -4376,13 +4354,13 @@ function es() {
4376
4354
  return f[S] = w;
4377
4355
  }
4378
4356
  case n:
4379
- switch (v) {
4357
+ switch (b) {
4380
4358
  case 1:
4381
4359
  return f.splice(S, 1);
4382
4360
  case 2:
4383
4361
  return f.delete(S);
4384
4362
  case 3:
4385
- return f.delete(k.value);
4363
+ return f.delete(v.value);
4386
4364
  default:
4387
4365
  return delete f[S];
4388
4366
  }
@@ -4398,16 +4376,16 @@ function es() {
4398
4376
  return m.map(h);
4399
4377
  if (sr(m))
4400
4378
  return new Map(
4401
- Array.from(m.entries()).map(([k, b]) => [k, h(b)])
4379
+ Array.from(m.entries()).map(([v, I]) => [v, h(I)])
4402
4380
  );
4403
4381
  if (ir(m))
4404
4382
  return new Set(Array.from(m).map(h));
4405
- const I = Object.create(be(m));
4406
- for (const k in m)
4407
- I[k] = h(m[k]);
4408
- return Qe(m, Je) && (I[Je] = m[Je]), I;
4383
+ const k = Object.create(be(m));
4384
+ for (const v in m)
4385
+ k[v] = h(m[v]);
4386
+ return Qe(m, Je) && (k[Je] = m[Je]), k;
4409
4387
  }
4410
- function y(m) {
4388
+ function g(m) {
4411
4389
  return ke(m) ? h(m) : m;
4412
4390
  }
4413
4391
  Ca("Patches", {
@@ -4451,9 +4429,9 @@ function qa(t, r) {
4451
4429
  }
4452
4430
  var Ln = Object.prototype, Ja = Ln.hasOwnProperty, Hn = Ln.toString, rs = Xa.Symbol, Za = Ln.propertyIsEnumerable, ns = rs ? rs.isConcatSpreadable : void 0, ss = Math.max;
4453
4431
  function Qa(t, r, e, n, i) {
4454
- var a = -1, u = t.length;
4455
- for (e || (e = no), i || (i = []); ++a < u; ) {
4456
- var c = t[a];
4432
+ var o = -1, u = t.length;
4433
+ for (e || (e = no), i || (i = []); ++o < u; ) {
4434
+ var c = t[o];
4457
4435
  e(c) ? qa(i, c) : i[i.length] = c;
4458
4436
  }
4459
4437
  return i;
@@ -4464,20 +4442,20 @@ function to(t, r) {
4464
4442
  });
4465
4443
  }
4466
4444
  function eo(t, r, e) {
4467
- for (var n = -1, i = r.length, a = {}; ++n < i; ) {
4445
+ for (var n = -1, i = r.length, o = {}; ++n < i; ) {
4468
4446
  var u = r[n], c = t[u];
4469
- e(c, u) && (a[u] = c);
4447
+ e(c, u) && (o[u] = c);
4470
4448
  }
4471
- return a;
4449
+ return o;
4472
4450
  }
4473
4451
  function ro(t, r) {
4474
4452
  return r = ss(r === void 0 ? t.length - 1 : r, 0), function() {
4475
- for (var e = arguments, n = -1, i = ss(e.length - r, 0), a = Array(i); ++n < i; )
4476
- a[n] = e[r + n];
4453
+ for (var e = arguments, n = -1, i = ss(e.length - r, 0), o = Array(i); ++n < i; )
4454
+ o[n] = e[r + n];
4477
4455
  n = -1;
4478
4456
  for (var u = Array(r + 1); ++n < r; )
4479
4457
  u[n] = e[n];
4480
- return u[r] = a, Ka(t, this, u);
4458
+ return u[r] = o, Ka(t, this, u);
4481
4459
  };
4482
4460
  }
4483
4461
  function no(t) {
@@ -4519,12 +4497,12 @@ function po(t) {
4519
4497
  var ho = ro(function(t, r) {
4520
4498
  return t == null ? {} : to(t, Va(Qa(r), so));
4521
4499
  }), mo = ho;
4522
- const is = /* @__PURE__ */ Cn(mo), yo = {
4500
+ const is = /* @__PURE__ */ Cn(mo), go = {
4523
4501
  width: 1080,
4524
4502
  height: 1920
4525
- }, go = 30, Io = {
4526
- size: yo,
4527
- fps: go,
4503
+ }, yo = 30, Io = {
4504
+ size: go,
4505
+ fps: yo,
4528
4506
  tracks: [],
4529
4507
  trackItemIds: [],
4530
4508
  trackItemsMap: {},
@@ -4586,8 +4564,8 @@ class Xo {
4586
4564
  this.destroyListeners();
4587
4565
  }
4588
4566
  updateHistory(r, e) {
4589
- const n = is(r, as), i = is(this.getState(), as), a = Rs(i, n);
4590
- a.length && (this.undos.push({ undos: a, type: e }), this.redos = []);
4567
+ const n = is(r, as), i = is(this.getState(), as), o = Rs(i, n);
4568
+ o.length && (this.undos.push({ undos: o, type: e }), this.redos = []);
4591
4569
  }
4592
4570
  getStateHistory() {
4593
4571
  return this.stateHistorySubject.getValue();
@@ -4641,8 +4619,8 @@ class Xo {
4641
4619
  return this.stateSubject.asObservable().subscribe((e) => {
4642
4620
  const n = Object.keys(e.trackItemsMap).filter(
4643
4621
  (i) => {
4644
- const a = this.prevState.trackItemsMap[i], u = e.trackItemsMap[i];
4645
- return a && u && !j(a.animations, u.animations);
4622
+ const o = this.prevState.trackItemsMap[i], u = e.trackItemsMap[i];
4623
+ return o && u && !j(o.animations, u.animations);
4646
4624
  }
4647
4625
  );
4648
4626
  r({ trackItemsMap: e.trackItemsMap, changedAnimationIds: n });
@@ -4651,12 +4629,12 @@ class Xo {
4651
4629
  subscribeToUpdateTrackItemTiming(r) {
4652
4630
  return this.stateSubject.asObservable().subscribe((e) => {
4653
4631
  if (!j(e.trackItemsMap, this.prevState.trackItemsMap)) {
4654
- const n = Object.keys(e.trackItemsMap).filter((a) => {
4655
- const u = this.prevState.trackItemsMap[a], c = e.trackItemsMap[a];
4632
+ const n = Object.keys(e.trackItemsMap).filter((o) => {
4633
+ const u = this.prevState.trackItemsMap[o], c = e.trackItemsMap[o];
4656
4634
  return u && c && !j(u.trim, c.trim);
4657
4635
  }), i = Object.keys(e.trackItemsMap).filter(
4658
- (a) => {
4659
- const u = this.prevState.trackItemsMap[a], c = e.trackItemsMap[a];
4636
+ (o) => {
4637
+ const u = this.prevState.trackItemsMap[o], c = e.trackItemsMap[o];
4660
4638
  return u && c && !j(u.display, c.display);
4661
4639
  }
4662
4640
  );
@@ -4671,8 +4649,8 @@ class Xo {
4671
4649
  subscribeToUpdateItemDetails(r) {
4672
4650
  return this.stateSubject.asObservable().subscribe((e) => {
4673
4651
  Object.keys(e.trackItemsMap).some((i) => {
4674
- const a = this.prevState.trackItemsMap[i], u = e.trackItemsMap[i];
4675
- return a && u && !j(a.details, u.details);
4652
+ const o = this.prevState.trackItemsMap[i], u = e.trackItemsMap[i];
4653
+ return o && u && !j(o.details, u.details);
4676
4654
  }) && r({ trackItemsMap: e.trackItemsMap });
4677
4655
  });
4678
4656
  }
@@ -4696,8 +4674,8 @@ class Xo {
4696
4674
  }
4697
4675
  subscribeToAddOrRemoveItems(r) {
4698
4676
  return this.stateSubject.asObservable().subscribe((e) => {
4699
- const n = [...e.trackItemIds].sort(), i = [...this.prevState.trackItemIds].sort(), a = [...e.transitionIds].sort(), u = [...this.prevState.transitionIds].sort();
4700
- (!j(n, i) || !j(a, u)) && r({ trackItemIds: e.trackItemIds });
4677
+ const n = [...e.trackItemIds].sort(), i = [...this.prevState.trackItemIds].sort(), o = [...e.transitionIds].sort(), u = [...this.prevState.transitionIds].sort();
4678
+ (!j(n, i) || !j(o, u)) && r({ trackItemIds: e.trackItemIds });
4701
4679
  });
4702
4680
  }
4703
4681
  // Selectively subscribe to activeIds changes
@@ -4708,8 +4686,8 @@ class Xo {
4708
4686
  }
4709
4687
  subscribeToTracks(r) {
4710
4688
  return this.stateSubject.asObservable().subscribe((e) => {
4711
- const n = e.tracks, a = this.prevState.tracks.map((c) => c.id), u = n.filter(
4712
- (c) => !a.includes(c.id)
4689
+ const n = e.tracks, o = this.prevState.tracks.map((c) => c.id), u = n.filter(
4690
+ (c) => !o.includes(c.id)
4713
4691
  );
4714
4692
  u.length && r({
4715
4693
  tracks: e.tracks,
@@ -4736,69 +4714,69 @@ class Xo {
4736
4714
  es();
4737
4715
  const {
4738
4716
  trackItemIds: i,
4739
- tracks: a,
4717
+ tracks: o,
4740
4718
  transitionIds: u,
4741
4719
  transitionsMap: c,
4742
4720
  trackItemsMap: d,
4743
4721
  structure: p
4744
4722
  } = this.getState(), h = C({
4745
4723
  trackItemIds: i,
4746
- tracks: a,
4724
+ tracks: o,
4747
4725
  transitionIds: u,
4748
4726
  transitionsMap: c,
4749
4727
  trackItemsMap: d,
4750
4728
  structure: p
4751
- }), y = [], m = [], I = [], k = [], b = [], _ = [];
4729
+ }), g = [], m = [], k = [], v = [], I = [], _ = [];
4752
4730
  e.forEach((x) => {
4753
4731
  let F;
4754
- const et = x.path.slice(1);
4732
+ const tt = x.path.slice(1);
4755
4733
  x.type === "CREATE" ? F = {
4756
- path: et,
4734
+ path: tt,
4757
4735
  op: "remove",
4758
4736
  value: x.value
4759
4737
  } : x.type === "CHANGE" ? F = {
4760
- path: et,
4738
+ path: tt,
4761
4739
  op: "replace",
4762
4740
  value: x.oldValue
4763
4741
  } : F = {
4764
- path: et,
4742
+ path: tt,
4765
4743
  op: "add",
4766
4744
  value: x.oldValue
4767
- }, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? m.push(F) : x.path.includes("trackItemsMap") ? b.push(F) : x.path.includes("transitionsMap") ? k.push(F) : x.path.includes("tracks") ? y.push(F) : x.path.includes("structure") && _.push(F);
4745
+ }, x.path.includes("trackItemIds") ? k.push(F) : x.path.includes("transitionIds") ? m.push(F) : x.path.includes("trackItemsMap") ? I.push(F) : x.path.includes("transitionsMap") ? v.push(F) : x.path.includes("tracks") ? g.push(F) : x.path.includes("structure") && _.push(F);
4768
4746
  });
4769
4747
  const f = this.applyPatch(
4770
4748
  h.tracks,
4771
- y
4772
- ), v = this.applyPatch(
4749
+ g
4750
+ ), b = this.applyPatch(
4773
4751
  h.transitionIds,
4774
4752
  m
4775
4753
  ), w = this.applyPatch(
4776
4754
  h.trackItemIds,
4777
- I
4755
+ k
4778
4756
  ), S = this.applyPatch(
4779
4757
  h.transitionsMap,
4780
- k
4758
+ v
4781
4759
  ), E = this.applyPatch(
4782
4760
  h.trackItemsMap,
4783
- b
4761
+ I
4784
4762
  ), T = this.applyPatch(
4785
4763
  h.structure,
4786
4764
  _
4787
4765
  ), M = C({
4788
4766
  tracks: f,
4789
- transitionIds: v,
4767
+ transitionIds: b,
4790
4768
  trackItemIds: w,
4791
4769
  transitionsMap: S,
4792
4770
  trackItemsMap: E,
4793
4771
  structure: T
4794
4772
  }), L = C(this.getState()), R = { ...L, ...M };
4795
4773
  this.prevState = L, this.redos.push({ redos: e, type: n });
4796
- const G = Y(R.trackItemsMap);
4797
- this.stateSubject.next({ ...R, duration: G }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 }), this.updateState(R, { updateHistory: !1 });
4774
+ const Y = G(R.trackItemsMap);
4775
+ this.stateSubject.next({ ...R, duration: Y }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 }), this.updateState(R, { updateHistory: !1 });
4798
4776
  }
4799
4777
  applyPatch(r, e) {
4800
- return e.reverse().reduce((n, i) => Na(n, (a) => {
4801
- La(a, [i]);
4778
+ return e.reverse().reduce((n, i) => Na(n, (o) => {
4779
+ La(o, [i]);
4802
4780
  }), r);
4803
4781
  }
4804
4782
  redo() {
@@ -4807,65 +4785,65 @@ class Xo {
4807
4785
  es();
4808
4786
  const {
4809
4787
  trackItemIds: i,
4810
- tracks: a,
4788
+ tracks: o,
4811
4789
  transitionIds: u,
4812
4790
  transitionsMap: c,
4813
4791
  trackItemsMap: d,
4814
4792
  structure: p
4815
4793
  } = this.getState(), h = C({
4816
4794
  trackItemIds: i,
4817
- tracks: a,
4795
+ tracks: o,
4818
4796
  transitionIds: u,
4819
4797
  transitionsMap: c,
4820
4798
  trackItemsMap: d,
4821
4799
  structure: p
4822
- }), y = [], m = [], I = [], k = [], b = [], _ = [];
4800
+ }), g = [], m = [], k = [], v = [], I = [], _ = [];
4823
4801
  e.forEach((x) => {
4824
4802
  let F;
4825
- const et = x.path.slice(1);
4803
+ const tt = x.path.slice(1);
4826
4804
  x.type === "CREATE" ? F = {
4827
- path: et,
4805
+ path: tt,
4828
4806
  op: "add",
4829
4807
  value: x.value
4830
4808
  } : x.type === "CHANGE" ? F = {
4831
- path: et,
4809
+ path: tt,
4832
4810
  op: "replace",
4833
4811
  value: x.value
4834
4812
  } : F = {
4835
- path: et,
4813
+ path: tt,
4836
4814
  op: "remove",
4837
4815
  value: x.oldValue
4838
- }, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? m.push(F) : x.path.includes("trackItemsMap") ? b.push(F) : x.path.includes("transitionsMap") ? k.push(F) : x.path.includes("structure") ? _.push(F) : y.push(F);
4816
+ }, x.path.includes("trackItemIds") ? k.push(F) : x.path.includes("transitionIds") ? m.push(F) : x.path.includes("trackItemsMap") ? I.push(F) : x.path.includes("transitionsMap") ? v.push(F) : x.path.includes("structure") ? _.push(F) : g.push(F);
4839
4817
  });
4840
4818
  const f = this.applyPatch(
4841
4819
  h.tracks,
4842
- y
4843
- ), v = this.applyPatch(
4820
+ g
4821
+ ), b = this.applyPatch(
4844
4822
  h.transitionIds,
4845
4823
  m
4846
4824
  ), w = this.applyPatch(
4847
4825
  h.trackItemIds,
4848
- I
4826
+ k
4849
4827
  ), S = this.applyPatch(
4850
4828
  h.transitionsMap,
4851
- k
4829
+ v
4852
4830
  ), E = this.applyPatch(
4853
4831
  h.trackItemsMap,
4854
- b
4832
+ I
4855
4833
  ), T = this.applyPatch(
4856
4834
  h.structure,
4857
4835
  _
4858
4836
  ), M = C({
4859
4837
  tracks: f,
4860
- transitionIds: v,
4838
+ transitionIds: b,
4861
4839
  trackItemIds: w,
4862
4840
  transitionsMap: S,
4863
4841
  trackItemsMap: E,
4864
4842
  structure: T
4865
4843
  }), L = C(this.getState()), R = { ...L, ...M };
4866
4844
  this.prevState = L, this.undos.push({ undos: e, type: n });
4867
- const G = Y(R.trackItemsMap);
4868
- this.stateSubject.next({ ...R, duration: G }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 }), this.updateState(R, { updateHistory: !1 });
4845
+ const Y = G(R.trackItemsMap);
4846
+ this.stateSubject.next({ ...R, duration: Y }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 }), this.updateState(R, { updateHistory: !1 });
4869
4847
  }
4870
4848
  toJSON() {
4871
4849
  const {
@@ -4873,7 +4851,7 @@ class Xo {
4873
4851
  tracks: e,
4874
4852
  size: n,
4875
4853
  trackItemIds: i,
4876
- transitionsMap: a,
4854
+ transitionsMap: o,
4877
4855
  trackItemsMap: u,
4878
4856
  transitionIds: c
4879
4857
  } = this.getState();
@@ -4882,7 +4860,7 @@ class Xo {
4882
4860
  tracks: e,
4883
4861
  size: n,
4884
4862
  trackItemIds: i,
4885
- transitionsMap: a,
4863
+ transitionsMap: o,
4886
4864
  trackItemsMap: u,
4887
4865
  transitionIds: c
4888
4866
  };
@@ -4902,7 +4880,7 @@ export {
4902
4880
  Ti as ADD_HILL_AUDIO_BARS,
4903
4881
  fi as ADD_ILLUSTRATION,
4904
4882
  di as ADD_IMAGE,
4905
- gi as ADD_ITEMS,
4883
+ yi as ADD_ITEMS,
4906
4884
  _i as ADD_LINEAL_AUDIO_BARS,
4907
4885
  Mo as ADD_MASK,
4908
4886
  To as ADD_PLACEHOLDER,
@@ -4914,7 +4892,7 @@ export {
4914
4892
  Mi as ADD_RECT,
4915
4893
  pi as ADD_SHAPE,
4916
4894
  vo as ADD_SUFFIX,
4917
- yi as ADD_TEMPLATE,
4895
+ gi as ADD_TEMPLATE,
4918
4896
  ci as ADD_TEXT,
4919
4897
  Eo as ADD_TRANSITION,
4920
4898
  ui as ADD_VIDEO,
@@ -4945,7 +4923,7 @@ export {
4945
4923
  $o as LAYER_LOCKED,
4946
4924
  No as LAYER_MOVE,
4947
4925
  jo as LAYER_PASTE,
4948
- tt as LAYER_PREFIX,
4926
+ Q as LAYER_PREFIX,
4949
4927
  Uo as LAYER_RENAME,
4950
4928
  $i as LAYER_REPLACE,
4951
4929
  Ri as LAYER_SELECT,