@designcombo/state 0.1.35 → 0.1.37

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
- var Ei = Object.defineProperty;
2
- var Si = (t, r, n) => r in t ? Ei(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
3
- var Nt = (t, r, n) => Si(t, typeof r != "symbol" ? r + "" : r, n);
4
- import { subject as ue, filter as le, DESIGN_PREFIX as Ti, ADD_PREFIX as wi, LAYER_PREFIX as ki, HISTORY_PREFIX as Ai, ACTIVE_PREFIX as Di, EDIT_PREFIX as Mi, DESIGN_LOAD as Oi, DESIGN_RESIZE as xi, HISTORY_UNDO as Pi, HISTORY_REDO as Ci, LAYER_DELETE as Ri, LAYER_CLONE as Li, ADD_CAPTION as Fi, ADD_TEXT as $i, ADD_TEMPLATE as Ni, ADD_IMAGE as Hi, ADD_AUDIO as ji, ADD_VIDEO as zi, ACTIVE_SPLIT as Ui, ACTIVE_CLONE as Gi, ACTIVE_PASTE as Yi, EDIT_OBJECT as Wi, REPLACE_MEDIA as Xi } from "@designcombo/events";
1
+ var Si = Object.defineProperty;
2
+ var Ei = (t, r, n) => r in t ? Si(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
3
+ var Ut = (t, r, n) => Ei(t, typeof r != "symbol" ? r + "" : r, n);
4
+ import { subject as de, filter as pe, DESIGN_PREFIX as Ti, ADD_PREFIX as wi, LAYER_PREFIX as ki, HISTORY_PREFIX as Ai, ACTIVE_PREFIX as Di, EDIT_PREFIX as Mi, DESIGN_LOAD as Oi, DESIGN_RESIZE as xi, HISTORY_UNDO as Pi, HISTORY_REDO as Ci, LAYER_DELETE as Ri, LAYER_CLONE as Li, ADD_CAPTION as Fi, ADD_TEXT as $i, ADD_TEMPLATE as Ni, ADD_IMAGE as Hi, ADD_AUDIO as zi, ADD_VIDEO as ji, ACTIVE_SPLIT as Ui, ACTIVE_CLONE as Gi, ACTIVE_PASTE as Yi, EDIT_OBJECT as Wi, REPLACE_MEDIA as Xi } from "@designcombo/events";
5
5
  var dn = function(t, r) {
6
6
  return dn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
7
7
  n.__proto__ = i;
@@ -9,7 +9,7 @@ var dn = function(t, r) {
9
9
  for (var s in i) Object.prototype.hasOwnProperty.call(i, s) && (n[s] = i[s]);
10
10
  }, dn(t, r);
11
11
  };
12
- function $e(t, r) {
12
+ function Ne(t, r) {
13
13
  if (typeof r != "function" && r !== null)
14
14
  throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
15
15
  dn(t, r);
@@ -34,8 +34,8 @@ function hn(t, r) {
34
34
  var i = n.call(t), s, c = [], d;
35
35
  try {
36
36
  for (; (r === void 0 || r-- > 0) && !(s = i.next()).done; ) c.push(s.value);
37
- } catch (y) {
38
- d = { error: y };
37
+ } catch (m) {
38
+ d = { error: m };
39
39
  } finally {
40
40
  try {
41
41
  s && !s.done && (n = i.return) && n.call(i);
@@ -50,7 +50,7 @@ function mn(t, r, n) {
50
50
  (c || !(i in r)) && (c || (c = Array.prototype.slice.call(r, 0, i)), c[i] = r[i]);
51
51
  return t.concat(c || Array.prototype.slice.call(r));
52
52
  }
53
- function kt(t) {
53
+ function Dt(t) {
54
54
  return typeof t == "function";
55
55
  }
56
56
  function Vn(t) {
@@ -86,15 +86,15 @@ var mr = function() {
86
86
  if (d)
87
87
  if (this._parentage = null, Array.isArray(d))
88
88
  try {
89
- for (var y = pn(d), w = y.next(); !w.done; w = y.next()) {
90
- var R = w.value;
89
+ for (var m = pn(d), T = m.next(); !T.done; T = m.next()) {
90
+ var R = T.value;
91
91
  R.remove(this);
92
92
  }
93
93
  } catch (p) {
94
94
  r = { error: p };
95
95
  } finally {
96
96
  try {
97
- w && !w.done && (n = y.return) && n.call(y);
97
+ T && !T.done && (n = m.return) && n.call(m);
98
98
  } finally {
99
99
  if (r) throw r.error;
100
100
  }
@@ -102,17 +102,17 @@ var mr = function() {
102
102
  else
103
103
  d.remove(this);
104
104
  var S = this.initialTeardown;
105
- if (kt(S))
105
+ if (Dt(S))
106
106
  try {
107
107
  S();
108
108
  } catch (p) {
109
109
  c = p instanceof on ? p.errors : [p];
110
110
  }
111
- var N = this._finalizers;
112
- if (N) {
111
+ var F = this._finalizers;
112
+ if (F) {
113
113
  this._finalizers = null;
114
114
  try {
115
- for (var _ = pn(N), f = _.next(); !f.done; f = _.next()) {
115
+ for (var _ = pn(F), f = _.next(); !f.done; f = _.next()) {
116
116
  var l = f.value;
117
117
  try {
118
118
  Cn(l);
@@ -164,10 +164,10 @@ var mr = function() {
164
164
  }(), t;
165
165
  }(), Jn = mr.EMPTY;
166
166
  function Zn(t) {
167
- return t instanceof mr || t && "closed" in t && kt(t.remove) && kt(t.add) && kt(t.unsubscribe);
167
+ return t instanceof mr || t && "closed" in t && Dt(t.remove) && Dt(t.add) && Dt(t.unsubscribe);
168
168
  }
169
169
  function Cn(t) {
170
- kt(t) ? t() : t.unsubscribe();
170
+ Dt(t) ? t() : t.unsubscribe();
171
171
  }
172
172
  var qn = {
173
173
  onUnhandledError: null,
@@ -198,7 +198,7 @@ function ur(t) {
198
198
  t();
199
199
  }
200
200
  var ti = function(t) {
201
- $e(r, t);
201
+ Ne(r, t);
202
202
  function r(n) {
203
203
  var i = t.call(this) || this;
204
204
  return i.isStopped = !1, n ? (i.destination = n, Zn(n) && n.add(i)) : i.destination = Zi, i;
@@ -264,23 +264,23 @@ var Vi = function() {
264
264
  }
265
265
  }, t;
266
266
  }(), _n = function(t) {
267
- $e(r, t);
267
+ Ne(r, t);
268
268
  function r(n, i, s) {
269
269
  var c = t.call(this) || this, d;
270
- if (kt(n) || !n)
270
+ if (Dt(n) || !n)
271
271
  d = {
272
272
  next: n ?? void 0,
273
273
  error: i ?? void 0,
274
274
  complete: s ?? void 0
275
275
  };
276
276
  else {
277
- var y;
278
- c && qn.useDeprecatedNextContext ? (y = Object.create(n), y.unsubscribe = function() {
277
+ var m;
278
+ c && qn.useDeprecatedNextContext ? (m = Object.create(n), m.unsubscribe = function() {
279
279
  return c.unsubscribe();
280
280
  }, d = {
281
- next: n.next && cn(n.next, y),
282
- error: n.error && cn(n.error, y),
283
- complete: n.complete && cn(n.complete, y)
281
+ next: n.next && cn(n.next, m),
282
+ error: n.error && cn(n.error, m),
283
+ complete: n.complete && cn(n.complete, m)
284
284
  }) : d = n;
285
285
  }
286
286
  return c.destination = new Vi(d), c;
@@ -321,8 +321,8 @@ var Ln = function() {
321
321
  }, t.prototype.subscribe = function(r, n, i) {
322
322
  var s = this, c = ra(r) ? r : new _n(r, n, i);
323
323
  return ur(function() {
324
- var d = s, y = d.operator, w = d.source;
325
- c.add(y ? y.call(c, w) : w ? s._subscribe(c) : s._trySubscribe(c));
324
+ var d = s, m = d.operator, T = d.source;
325
+ c.add(m ? m.call(c, T) : T ? s._subscribe(c) : s._trySubscribe(c));
326
326
  }), c;
327
327
  }, t.prototype._trySubscribe = function(r) {
328
328
  try {
@@ -334,11 +334,11 @@ var Ln = function() {
334
334
  var i = this;
335
335
  return n = Fn(n), new n(function(s, c) {
336
336
  var d = new _n({
337
- next: function(y) {
337
+ next: function(m) {
338
338
  try {
339
- r(y);
340
- } catch (w) {
341
- c(w), d.unsubscribe();
339
+ r(m);
340
+ } catch (T) {
341
+ c(T), d.unsubscribe();
342
342
  }
343
343
  },
344
344
  error: c,
@@ -376,7 +376,7 @@ function Fn(t) {
376
376
  return (r = t ?? qn.Promise) !== null && r !== void 0 ? r : Promise;
377
377
  }
378
378
  function ea(t) {
379
- return t && kt(t.next) && kt(t.error) && kt(t.complete);
379
+ return t && Dt(t.next) && Dt(t.error) && Dt(t.complete);
380
380
  }
381
381
  function ra(t) {
382
382
  return t && t instanceof ti || ea(t) && Zn(t);
@@ -386,7 +386,7 @@ var na = Vn(function(t) {
386
386
  t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
387
387
  };
388
388
  }), ei = function(t) {
389
- $e(r, t);
389
+ Ne(r, t);
390
390
  function r() {
391
391
  var n = t.call(this) || this;
392
392
  return n.closed = !1, n.currentObservers = null, n.observers = [], n.isStopped = !1, n.hasError = !1, n.thrownError = null, n;
@@ -404,15 +404,15 @@ var na = Vn(function(t) {
404
404
  if (i._throwIfClosed(), !i.isStopped) {
405
405
  i.currentObservers || (i.currentObservers = Array.from(i.observers));
406
406
  try {
407
- for (var d = pn(i.currentObservers), y = d.next(); !y.done; y = d.next()) {
408
- var w = y.value;
409
- w.next(n);
407
+ for (var d = pn(i.currentObservers), m = d.next(); !m.done; m = d.next()) {
408
+ var T = m.value;
409
+ T.next(n);
410
410
  }
411
411
  } catch (R) {
412
412
  s = { error: R };
413
413
  } finally {
414
414
  try {
415
- y && !y.done && (c = d.return) && c.call(d);
415
+ m && !m.done && (c = d.return) && c.call(d);
416
416
  } finally {
417
417
  if (s) throw s.error;
418
418
  }
@@ -451,9 +451,9 @@ var na = Vn(function(t) {
451
451
  }, r.prototype._subscribe = function(n) {
452
452
  return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
453
453
  }, r.prototype._innerSubscribe = function(n) {
454
- var i = this, s = this, c = s.hasError, d = s.isStopped, y = s.observers;
455
- return c || d ? Jn : (this.currentObservers = null, y.push(n), new mr(function() {
456
- i.currentObservers = null, yn(y, n);
454
+ var i = this, s = this, c = s.hasError, d = s.isStopped, m = s.observers;
455
+ return c || d ? Jn : (this.currentObservers = null, m.push(n), new mr(function() {
456
+ i.currentObservers = null, yn(m, n);
457
457
  }));
458
458
  }, r.prototype._checkFinalizedStatuses = function(n) {
459
459
  var i = this, s = i.hasError, c = i.thrownError, d = i.isStopped;
@@ -465,7 +465,7 @@ var na = Vn(function(t) {
465
465
  return new $n(n, i);
466
466
  }, r;
467
467
  }(Ln), $n = function(t) {
468
- $e(r, t);
468
+ Ne(r, t);
469
469
  function r(n, i) {
470
470
  var s = t.call(this) || this;
471
471
  return s.destination = n, s.source = i, s;
@@ -484,7 +484,7 @@ var na = Vn(function(t) {
484
484
  return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && s !== void 0 ? s : Jn;
485
485
  }, r;
486
486
  }(ei), Nn = function(t) {
487
- $e(r, t);
487
+ Ne(r, t);
488
488
  function r(n) {
489
489
  var i = t.call(this) || this;
490
490
  return i._value = n, i;
@@ -506,31 +506,31 @@ var na = Vn(function(t) {
506
506
  }, r.prototype.next = function(n) {
507
507
  t.prototype.next.call(this, this._value = n);
508
508
  }, r;
509
- }(ei), pt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
509
+ }(ei), mt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
510
510
  function wn(t) {
511
511
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
512
512
  }
513
513
  var lr = { exports: {} };
514
514
  lr.exports;
515
515
  (function(t, r) {
516
- var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, d = 9007199254740991, y = "[object Arguments]", w = "[object Array]", R = "[object AsyncFunction]", S = "[object Boolean]", N = "[object Date]", _ = "[object Error]", f = "[object Function]", l = "[object GeneratorFunction]", p = "[object Map]", I = "[object Number]", b = "[object Null]", g = "[object Object]", m = "[object Promise]", h = "[object Proxy]", T = "[object RegExp]", D = "[object Set]", k = "[object String]", x = "[object Symbol]", C = "[object Undefined]", P = "[object WeakMap]", A = "[object ArrayBuffer]", O = "[object DataView]", z = "[object Float32Array]", ot = "[object Float64Array]", Ot = "[object Int8Array]", Wt = "[object Int16Array]", Xt = "[object Int32Array]", Bt = "[object Uint8Array]", Kt = "[object Uint8ClampedArray]", H = "[object Uint16Array]", Vt = "[object Uint32Array]", Jt = /[\\^$.*+?()[\]{}|]/g, F = /^\[object .+?Constructor\]$/, G = /^(?:0|[1-9]\d*)$/, v = {};
517
- v[z] = v[ot] = v[Ot] = v[Wt] = v[Xt] = v[Bt] = v[Kt] = v[H] = v[Vt] = !0, v[y] = v[w] = v[A] = v[S] = v[O] = v[N] = v[_] = v[f] = v[p] = v[I] = v[g] = v[T] = v[D] = v[k] = v[P] = !1;
518
- var ct = typeof pt == "object" && pt && pt.Object === Object && pt, nt = typeof self == "object" && self && self.Object === Object && self, U = ct || nt || Function("return this")(), ft = r && !r.nodeType && r, K = ft && !0 && t && !t.nodeType && t, Y = K && K.exports === ft, ht = Y && ct.process, Zt = function() {
516
+ var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, d = 9007199254740991, m = "[object Arguments]", T = "[object Array]", R = "[object AsyncFunction]", S = "[object Boolean]", F = "[object Date]", _ = "[object Error]", f = "[object Function]", l = "[object GeneratorFunction]", p = "[object Map]", g = "[object Number]", I = "[object Null]", b = "[object Object]", y = "[object Promise]", h = "[object Proxy]", E = "[object RegExp]", A = "[object Set]", w = "[object String]", x = "[object Symbol]", C = "[object Undefined]", P = "[object WeakMap]", k = "[object ArrayBuffer]", M = "[object DataView]", j = "[object Float32Array]", ut = "[object Float64Array]", Pt = "[object Int8Array]", Vt = "[object Int16Array]", Jt = "[object Int32Array]", Zt = "[object Uint8Array]", qt = "[object Uint8ClampedArray]", N = "[object Uint16Array]", Qt = "[object Uint32Array]", te = /[\\^$.*+?()[\]{}|]/g, at = /^\[object .+?Constructor\]$/, Ct = /^(?:0|[1-9]\d*)$/, H = {};
517
+ H[j] = H[ut] = H[Pt] = H[Vt] = H[Jt] = H[Zt] = H[qt] = H[N] = H[Qt] = !0, H[m] = H[T] = H[k] = H[S] = H[M] = H[F] = H[_] = H[f] = H[p] = H[g] = H[b] = H[E] = H[A] = H[w] = H[P] = !1;
518
+ var U = typeof mt == "object" && mt && mt.Object === Object && mt, G = typeof self == "object" && self && self.Object === Object && self, O = U || G || Function("return this")(), lt = r && !r.nodeType && r, rt = lt && !0 && t && !t.nodeType && t, K = rt && rt.exports === lt, ft = K && U.process, V = function() {
519
519
  try {
520
- return ht && ht.binding && ht.binding("util");
520
+ return ft && ft.binding && ft.binding("util");
521
521
  } catch {
522
522
  }
523
- }(), pe = Zt && Zt.isTypedArray;
524
- function Ue(e, a) {
525
- for (var o = -1, u = e == null ? 0 : e.length, M = 0, E = []; ++o < u; ) {
523
+ }(), Y = V && V.isTypedArray;
524
+ function gt(e, a) {
525
+ for (var o = -1, u = e == null ? 0 : e.length, D = 0, v = []; ++o < u; ) {
526
526
  var $ = e[o];
527
- a($, o, e) && (E[M++] = $);
527
+ a($, o, e) && (v[D++] = $);
528
528
  }
529
- return E;
529
+ return v;
530
530
  }
531
- function he(e, a) {
532
- for (var o = -1, u = a.length, M = e.length; ++o < u; )
533
- e[M + o] = a[o];
531
+ function Rt(e, a) {
532
+ for (var o = -1, u = a.length, D = e.length; ++o < u; )
533
+ e[D + o] = a[o];
534
534
  return e;
535
535
  }
536
536
  function Ge(e, a) {
@@ -549,16 +549,16 @@ lr.exports;
549
549
  return e(a);
550
550
  };
551
551
  }
552
- function qt(e, a) {
552
+ function ee(e, a) {
553
553
  return e.has(a);
554
554
  }
555
- function me(e, a) {
555
+ function ye(e, a) {
556
556
  return e == null ? void 0 : e[a];
557
557
  }
558
558
  function Ye(e) {
559
559
  var a = -1, o = Array(e.size);
560
- return e.forEach(function(u, M) {
561
- o[++a] = [M, u];
560
+ return e.forEach(function(u, D) {
561
+ o[++a] = [D, u];
562
562
  }), o;
563
563
  }
564
564
  function We(e, a) {
@@ -566,19 +566,19 @@ lr.exports;
566
566
  return e(a(o));
567
567
  };
568
568
  }
569
- function It(e) {
569
+ function bt(e) {
570
570
  var a = -1, o = Array(e.size);
571
571
  return e.forEach(function(u) {
572
572
  o[++a] = u;
573
573
  }), o;
574
574
  }
575
- var Qt = Array.prototype, vr = Function.prototype, xt = Object.prototype, te = U["__core-js_shared__"], ye = vr.toString, dt = xt.hasOwnProperty, Xe = function() {
576
- var e = /[^.]+$/.exec(te && te.keys && te.keys.IE_PROTO || "");
575
+ var re = Array.prototype, vr = Function.prototype, Lt = Object.prototype, ne = O["__core-js_shared__"], _e = vr.toString, ht = Lt.hasOwnProperty, Xe = function() {
576
+ var e = /[^.]+$/.exec(ne && ne.keys && ne.keys.IE_PROTO || "");
577
577
  return e ? "Symbol(src)_1." + e : "";
578
- }(), Be = xt.toString, Er = RegExp(
579
- "^" + ye.call(dt).replace(Jt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
580
- ), _e = Y ? U.Buffer : void 0, ee = U.Symbol, Ke = U.Uint8Array, re = xt.propertyIsEnumerable, Pt = Qt.splice, mt = ee ? ee.toStringTag : void 0, ne = Object.getOwnPropertySymbols, Ie = _e ? _e.isBuffer : void 0, Ct = We(Object.keys, Object), ge = St(U, "DataView"), Rt = St(U, "Map"), be = St(U, "Promise"), ve = St(U, "Set"), Ee = St(U, "WeakMap"), At = St(Object, "create"), Ve = et(ge), Et = et(Rt), Sr = et(be), Tr = et(ve), wr = et(Ee), Je = ee ? ee.prototype : void 0, Se = Je ? Je.valueOf : void 0;
581
- function V(e) {
578
+ }(), Be = Lt.toString, Sr = RegExp(
579
+ "^" + _e.call(ht).replace(te, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
580
+ ), Ie = K ? O.Buffer : void 0, ie = O.Symbol, Ke = O.Uint8Array, ae = Lt.propertyIsEnumerable, Ft = re.splice, yt = ie ? ie.toStringTag : void 0, se = Object.getOwnPropertySymbols, ge = Ie ? Ie.isBuffer : void 0, $t = We(Object.keys, Object), be = wt(O, "DataView"), Nt = wt(O, "Map"), ve = wt(O, "Promise"), Se = wt(O, "Set"), Ee = wt(O, "WeakMap"), Mt = wt(Object, "create"), Ve = nt(be), Tt = nt(Nt), Er = nt(ve), Tr = nt(Se), wr = nt(Ee), Je = ie ? ie.prototype : void 0, Te = Je ? Je.valueOf : void 0;
581
+ function J(e) {
582
582
  var a = -1, o = e == null ? 0 : e.length;
583
583
  for (this.clear(); ++a < o; ) {
584
584
  var u = e[a];
@@ -586,7 +586,7 @@ lr.exports;
586
586
  }
587
587
  }
588
588
  function kr() {
589
- this.__data__ = At ? At(null) : {}, this.size = 0;
589
+ this.__data__ = Mt ? Mt(null) : {}, this.size = 0;
590
590
  }
591
591
  function Ar(e) {
592
592
  var a = this.has(e) && delete this.__data__[e];
@@ -594,22 +594,22 @@ lr.exports;
594
594
  }
595
595
  function Dr(e) {
596
596
  var a = this.__data__;
597
- if (At) {
597
+ if (Mt) {
598
598
  var o = a[e];
599
599
  return o === i ? void 0 : o;
600
600
  }
601
- return dt.call(a, e) ? a[e] : void 0;
601
+ return ht.call(a, e) ? a[e] : void 0;
602
602
  }
603
603
  function Mr(e) {
604
604
  var a = this.__data__;
605
- return At ? a[e] !== void 0 : dt.call(a, e);
605
+ return Mt ? a[e] !== void 0 : ht.call(a, e);
606
606
  }
607
607
  function Or(e, a) {
608
608
  var o = this.__data__;
609
- return this.size += this.has(e) ? 0 : 1, o[e] = At && a === void 0 ? i : a, this;
609
+ return this.size += this.has(e) ? 0 : 1, o[e] = Mt && a === void 0 ? i : a, this;
610
610
  }
611
- V.prototype.clear = kr, V.prototype.delete = Ar, V.prototype.get = Dr, V.prototype.has = Mr, V.prototype.set = Or;
612
- function Z(e) {
611
+ J.prototype.clear = kr, J.prototype.delete = Ar, J.prototype.get = Dr, J.prototype.has = Mr, J.prototype.set = Or;
612
+ function q(e) {
613
613
  var a = -1, o = e == null ? 0 : e.length;
614
614
  for (this.clear(); ++a < o; ) {
615
615
  var u = e[a];
@@ -620,25 +620,25 @@ lr.exports;
620
620
  this.__data__ = [], this.size = 0;
621
621
  }
622
622
  function Pr(e) {
623
- var a = this.__data__, o = se(a, e);
623
+ var a = this.__data__, o = ue(a, e);
624
624
  if (o < 0)
625
625
  return !1;
626
626
  var u = a.length - 1;
627
- return o == u ? a.pop() : Pt.call(a, o, 1), --this.size, !0;
627
+ return o == u ? a.pop() : Ft.call(a, o, 1), --this.size, !0;
628
628
  }
629
629
  function Cr(e) {
630
- var a = this.__data__, o = se(a, e);
630
+ var a = this.__data__, o = ue(a, e);
631
631
  return o < 0 ? void 0 : a[o][1];
632
632
  }
633
633
  function Rr(e) {
634
- return se(this.__data__, e) > -1;
634
+ return ue(this.__data__, e) > -1;
635
635
  }
636
636
  function Lr(e, a) {
637
- var o = this.__data__, u = se(o, e);
637
+ var o = this.__data__, u = ue(o, e);
638
638
  return u < 0 ? (++this.size, o.push([e, a])) : o[u][1] = a, this;
639
639
  }
640
- Z.prototype.clear = xr, Z.prototype.delete = Pr, Z.prototype.get = Cr, Z.prototype.has = Rr, Z.prototype.set = Lr;
641
- function it(e) {
640
+ q.prototype.clear = xr, q.prototype.delete = Pr, q.prototype.get = Cr, q.prototype.has = Rr, q.prototype.set = Lr;
641
+ function st(e) {
642
642
  var a = -1, o = e == null ? 0 : e.length;
643
643
  for (this.clear(); ++a < o; ) {
644
644
  var u = e[a];
@@ -647,46 +647,46 @@ lr.exports;
647
647
  }
648
648
  function Fr() {
649
649
  this.size = 0, this.__data__ = {
650
- hash: new V(),
651
- map: new (Rt || Z)(),
652
- string: new V()
650
+ hash: new J(),
651
+ map: new (Nt || q)(),
652
+ string: new J()
653
653
  };
654
654
  }
655
655
  function $r(e) {
656
- var a = yt(this, e).delete(e);
656
+ var a = _t(this, e).delete(e);
657
657
  return this.size -= a ? 1 : 0, a;
658
658
  }
659
659
  function Nr(e) {
660
- return yt(this, e).get(e);
660
+ return _t(this, e).get(e);
661
661
  }
662
662
  function Hr(e) {
663
- return yt(this, e).has(e);
663
+ return _t(this, e).has(e);
664
664
  }
665
- function jr(e, a) {
666
- var o = yt(this, e), u = o.size;
665
+ function zr(e, a) {
666
+ var o = _t(this, e), u = o.size;
667
667
  return o.set(e, a), this.size += o.size == u ? 0 : 1, this;
668
668
  }
669
- it.prototype.clear = Fr, it.prototype.delete = $r, it.prototype.get = Nr, it.prototype.has = Hr, it.prototype.set = jr;
670
- function ie(e) {
669
+ st.prototype.clear = Fr, st.prototype.delete = $r, st.prototype.get = Nr, st.prototype.has = Hr, st.prototype.set = zr;
670
+ function oe(e) {
671
671
  var a = -1, o = e == null ? 0 : e.length;
672
- for (this.__data__ = new it(); ++a < o; )
672
+ for (this.__data__ = new st(); ++a < o; )
673
673
  this.add(e[a]);
674
674
  }
675
675
  function Ze(e) {
676
676
  return this.__data__.set(e, i), this;
677
677
  }
678
- function ae(e) {
678
+ function ce(e) {
679
679
  return this.__data__.has(e);
680
680
  }
681
- ie.prototype.add = ie.prototype.push = Ze, ie.prototype.has = ae;
682
- function gt(e) {
683
- var a = this.__data__ = new Z(e);
681
+ oe.prototype.add = oe.prototype.push = Ze, oe.prototype.has = ce;
682
+ function vt(e) {
683
+ var a = this.__data__ = new q(e);
684
684
  this.size = a.size;
685
685
  }
686
- function Te() {
687
- this.__data__ = new Z(), this.size = 0;
686
+ function we() {
687
+ this.__data__ = new q(), this.size = 0;
688
688
  }
689
- function zr(e) {
689
+ function jr(e) {
690
690
  var a = this.__data__, o = a.delete(e);
691
691
  return this.size = a.size, o;
692
692
  }
@@ -698,225 +698,225 @@ lr.exports;
698
698
  }
699
699
  function Yr(e, a) {
700
700
  var o = this.__data__;
701
- if (o instanceof Z) {
701
+ if (o instanceof q) {
702
702
  var u = o.__data__;
703
- if (!Rt || u.length < n - 1)
703
+ if (!Nt || u.length < n - 1)
704
704
  return u.push([e, a]), this.size = ++o.size, this;
705
- o = this.__data__ = new it(u);
705
+ o = this.__data__ = new st(u);
706
706
  }
707
707
  return o.set(e, a), this.size = o.size, this;
708
708
  }
709
- gt.prototype.clear = Te, gt.prototype.delete = zr, gt.prototype.get = Ur, gt.prototype.has = Gr, gt.prototype.set = Yr;
709
+ vt.prototype.clear = we, vt.prototype.delete = jr, vt.prototype.get = Ur, vt.prototype.has = Gr, vt.prototype.set = Yr;
710
710
  function Wr(e, a) {
711
- var o = oe(e), u = !o && rr(e), M = !o && !u && ce(e), E = !o && !u && !M && ar(e), $ = o || u || M || E, L = $ ? gr(e.length, String) : [], W = L.length;
712
- for (var j in e)
713
- dt.call(e, j) && !($ && // Safari 9 has enumerable `arguments.length` in strict mode.
714
- (j == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
715
- M && (j == "offset" || j == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
716
- E && (j == "buffer" || j == "byteLength" || j == "byteOffset") || // Skip index properties.
717
- Qr(j, W))) && L.push(j);
711
+ var o = le(e), u = !o && rr(e), D = !o && !u && fe(e), v = !o && !u && !D && ar(e), $ = o || u || D || v, L = $ ? gr(e.length, String) : [], W = L.length;
712
+ for (var z in e)
713
+ ht.call(e, z) && !($ && // Safari 9 has enumerable `arguments.length` in strict mode.
714
+ (z == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
715
+ D && (z == "offset" || z == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
716
+ v && (z == "buffer" || z == "byteLength" || z == "byteOffset") || // Skip index properties.
717
+ Qr(z, W))) && L.push(z);
718
718
  return L;
719
719
  }
720
- function se(e, a) {
720
+ function ue(e, a) {
721
721
  for (var o = e.length; o--; )
722
722
  if (er(e[o][0], a))
723
723
  return o;
724
724
  return -1;
725
725
  }
726
- function we(e, a, o) {
726
+ function ke(e, a, o) {
727
727
  var u = a(e);
728
- return oe(e) ? u : he(u, o(e));
728
+ return le(e) ? u : Rt(u, o(e));
729
729
  }
730
- function Lt(e) {
731
- return e == null ? e === void 0 ? C : b : mt && mt in Object(e) ? Tt(e) : tr(e);
730
+ function Ht(e) {
731
+ return e == null ? e === void 0 ? C : I : yt && yt in Object(e) ? kt(e) : tr(e);
732
732
  }
733
733
  function qe(e) {
734
- return vt(e) && Lt(e) == y;
734
+ return Et(e) && Ht(e) == m;
735
735
  }
736
- function Qe(e, a, o, u, M) {
737
- return e === a ? !0 : e == null || a == null || !vt(e) && !vt(a) ? e !== e && a !== a : Xr(e, a, o, u, Qe, M);
736
+ function Qe(e, a, o, u, D) {
737
+ return e === a ? !0 : e == null || a == null || !Et(e) && !Et(a) ? e !== e && a !== a : Xr(e, a, o, u, Qe, D);
738
738
  }
739
- function Xr(e, a, o, u, M, E) {
740
- var $ = oe(e), L = oe(a), W = $ ? w : bt(e), j = L ? w : bt(a);
741
- W = W == y ? g : W, j = j == y ? g : j;
742
- var q = W == g, at = j == g, X = W == j;
743
- if (X && ce(e)) {
744
- if (!ce(a))
739
+ function Xr(e, a, o, u, D, v) {
740
+ var $ = le(e), L = le(a), W = $ ? T : St(e), z = L ? T : St(a);
741
+ W = W == m ? b : W, z = z == m ? b : z;
742
+ var Q = W == b, ot = z == b, X = W == z;
743
+ if (X && fe(e)) {
744
+ if (!fe(a))
745
745
  return !1;
746
- $ = !0, q = !1;
746
+ $ = !0, Q = !1;
747
747
  }
748
- if (X && !q)
749
- return E || (E = new gt()), $ || ar(e) ? ke(e, a, o, u, M, E) : Jr(e, a, W, o, u, M, E);
748
+ if (X && !Q)
749
+ return v || (v = new vt()), $ || ar(e) ? Ae(e, a, o, u, D, v) : Jr(e, a, W, o, u, D, v);
750
750
  if (!(o & s)) {
751
- var Q = q && dt.call(e, "__wrapped__"), J = at && dt.call(a, "__wrapped__");
752
- if (Q || J) {
753
- var Dt = Q ? e.value() : e, wt = J ? a.value() : a;
754
- return E || (E = new gt()), M(Dt, wt, o, u, E);
751
+ var tt = Q && ht.call(e, "__wrapped__"), Z = ot && ht.call(a, "__wrapped__");
752
+ if (tt || Z) {
753
+ var Ot = tt ? e.value() : e, At = Z ? a.value() : a;
754
+ return v || (v = new vt()), D(Ot, At, o, u, v);
755
755
  }
756
756
  }
757
- return X ? (E || (E = new gt()), Zr(e, a, o, u, M, E)) : !1;
757
+ return X ? (v || (v = new vt()), Zr(e, a, o, u, D, v)) : !1;
758
758
  }
759
759
  function Br(e) {
760
760
  if (!ir(e) || en(e))
761
761
  return !1;
762
- var a = nr(e) ? Er : F;
763
- return a.test(et(e));
762
+ var a = nr(e) ? Sr : at;
763
+ return a.test(nt(e));
764
764
  }
765
765
  function Kr(e) {
766
- return vt(e) && De(e.length) && !!v[Lt(e)];
766
+ return Et(e) && Me(e.length) && !!H[Ht(e)];
767
767
  }
768
768
  function Vr(e) {
769
769
  if (!rn(e))
770
- return Ct(e);
770
+ return $t(e);
771
771
  var a = [];
772
772
  for (var o in Object(e))
773
- dt.call(e, o) && o != "constructor" && a.push(o);
773
+ ht.call(e, o) && o != "constructor" && a.push(o);
774
774
  return a;
775
775
  }
776
- function ke(e, a, o, u, M, E) {
776
+ function Ae(e, a, o, u, D, v) {
777
777
  var $ = o & s, L = e.length, W = a.length;
778
778
  if (L != W && !($ && W > L))
779
779
  return !1;
780
- var j = E.get(e);
781
- if (j && E.get(a))
782
- return j == a;
783
- var q = -1, at = !0, X = o & c ? new ie() : void 0;
784
- for (E.set(e, a), E.set(a, e); ++q < L; ) {
785
- var Q = e[q], J = a[q];
780
+ var z = v.get(e);
781
+ if (z && v.get(a))
782
+ return z == a;
783
+ var Q = -1, ot = !0, X = o & c ? new oe() : void 0;
784
+ for (v.set(e, a), v.set(a, e); ++Q < L; ) {
785
+ var tt = e[Q], Z = a[Q];
786
786
  if (u)
787
- var Dt = $ ? u(J, Q, q, a, e, E) : u(Q, J, q, e, a, E);
788
- if (Dt !== void 0) {
789
- if (Dt)
787
+ var Ot = $ ? u(Z, tt, Q, a, e, v) : u(tt, Z, Q, e, a, v);
788
+ if (Ot !== void 0) {
789
+ if (Ot)
790
790
  continue;
791
- at = !1;
791
+ ot = !1;
792
792
  break;
793
793
  }
794
794
  if (X) {
795
- if (!Ge(a, function(wt, $t) {
796
- if (!qt(X, $t) && (Q === wt || M(Q, wt, o, u, E)))
797
- return X.push($t);
795
+ if (!Ge(a, function(At, jt) {
796
+ if (!ee(X, jt) && (tt === At || D(tt, At, o, u, v)))
797
+ return X.push(jt);
798
798
  })) {
799
- at = !1;
799
+ ot = !1;
800
800
  break;
801
801
  }
802
- } else if (!(Q === J || M(Q, J, o, u, E))) {
803
- at = !1;
802
+ } else if (!(tt === Z || D(tt, Z, o, u, v))) {
803
+ ot = !1;
804
804
  break;
805
805
  }
806
806
  }
807
- return E.delete(e), E.delete(a), at;
807
+ return v.delete(e), v.delete(a), ot;
808
808
  }
809
- function Jr(e, a, o, u, M, E, $) {
809
+ function Jr(e, a, o, u, D, v, $) {
810
810
  switch (o) {
811
- case O:
811
+ case M:
812
812
  if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
813
813
  return !1;
814
814
  e = e.buffer, a = a.buffer;
815
- case A:
816
- return !(e.byteLength != a.byteLength || !E(new Ke(e), new Ke(a)));
815
+ case k:
816
+ return !(e.byteLength != a.byteLength || !v(new Ke(e), new Ke(a)));
817
817
  case S:
818
- case N:
819
- case I:
818
+ case F:
819
+ case g:
820
820
  return er(+e, +a);
821
821
  case _:
822
822
  return e.name == a.name && e.message == a.message;
823
- case T:
824
- case k:
823
+ case E:
824
+ case w:
825
825
  return e == a + "";
826
826
  case p:
827
827
  var L = Ye;
828
- case D:
828
+ case A:
829
829
  var W = u & s;
830
- if (L || (L = It), e.size != a.size && !W)
830
+ if (L || (L = bt), e.size != a.size && !W)
831
831
  return !1;
832
- var j = $.get(e);
833
- if (j)
834
- return j == a;
832
+ var z = $.get(e);
833
+ if (z)
834
+ return z == a;
835
835
  u |= c, $.set(e, a);
836
- var q = ke(L(e), L(a), u, M, E, $);
837
- return $.delete(e), q;
836
+ var Q = Ae(L(e), L(a), u, D, v, $);
837
+ return $.delete(e), Q;
838
838
  case x:
839
- if (Se)
840
- return Se.call(e) == Se.call(a);
839
+ if (Te)
840
+ return Te.call(e) == Te.call(a);
841
841
  }
842
842
  return !1;
843
843
  }
844
- function Zr(e, a, o, u, M, E) {
845
- var $ = o & s, L = Ft(e), W = L.length, j = Ft(a), q = j.length;
846
- if (W != q && !$)
844
+ function Zr(e, a, o, u, D, v) {
845
+ var $ = o & s, L = zt(e), W = L.length, z = zt(a), Q = z.length;
846
+ if (W != Q && !$)
847
847
  return !1;
848
- for (var at = W; at--; ) {
849
- var X = L[at];
850
- if (!($ ? X in a : dt.call(a, X)))
848
+ for (var ot = W; ot--; ) {
849
+ var X = L[ot];
850
+ if (!($ ? X in a : ht.call(a, X)))
851
851
  return !1;
852
852
  }
853
- var Q = E.get(e);
854
- if (Q && E.get(a))
855
- return Q == a;
856
- var J = !0;
857
- E.set(e, a), E.set(a, e);
858
- for (var Dt = $; ++at < W; ) {
859
- X = L[at];
860
- var wt = e[X], $t = a[X];
853
+ var tt = v.get(e);
854
+ if (tt && v.get(a))
855
+ return tt == a;
856
+ var Z = !0;
857
+ v.set(e, a), v.set(a, e);
858
+ for (var Ot = $; ++ot < W; ) {
859
+ X = L[ot];
860
+ var At = e[X], jt = a[X];
861
861
  if (u)
862
- var Pn = $ ? u($t, wt, X, a, e, E) : u(wt, $t, X, e, a, E);
863
- if (!(Pn === void 0 ? wt === $t || M(wt, $t, o, u, E) : Pn)) {
864
- J = !1;
862
+ var Pn = $ ? u(jt, At, X, a, e, v) : u(At, jt, X, e, a, v);
863
+ if (!(Pn === void 0 ? At === jt || D(At, jt, o, u, v) : Pn)) {
864
+ Z = !1;
865
865
  break;
866
866
  }
867
- Dt || (Dt = X == "constructor");
867
+ Ot || (Ot = X == "constructor");
868
868
  }
869
- if (J && !Dt) {
869
+ if (Z && !Ot) {
870
870
  var sr = e.constructor, or = a.constructor;
871
- sr != or && "constructor" in e && "constructor" in a && !(typeof sr == "function" && sr instanceof sr && typeof or == "function" && or instanceof or) && (J = !1);
871
+ sr != or && "constructor" in e && "constructor" in a && !(typeof sr == "function" && sr instanceof sr && typeof or == "function" && or instanceof or) && (Z = !1);
872
872
  }
873
- return E.delete(e), E.delete(a), J;
873
+ return v.delete(e), v.delete(a), Z;
874
874
  }
875
- function Ft(e) {
876
- return we(e, Me, qr);
875
+ function zt(e) {
876
+ return ke(e, Oe, qr);
877
877
  }
878
- function yt(e, a) {
878
+ function _t(e, a) {
879
879
  var o = e.__data__;
880
880
  return tn(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
881
881
  }
882
- function St(e, a) {
883
- var o = me(e, a);
882
+ function wt(e, a) {
883
+ var o = ye(e, a);
884
884
  return Br(o) ? o : void 0;
885
885
  }
886
- function Tt(e) {
887
- var a = dt.call(e, mt), o = e[mt];
886
+ function kt(e) {
887
+ var a = ht.call(e, yt), o = e[yt];
888
888
  try {
889
- e[mt] = void 0;
889
+ e[yt] = void 0;
890
890
  var u = !0;
891
891
  } catch {
892
892
  }
893
- var M = Be.call(e);
894
- return u && (a ? e[mt] = o : delete e[mt]), M;
893
+ var D = Be.call(e);
894
+ return u && (a ? e[yt] = o : delete e[yt]), D;
895
895
  }
896
- var qr = ne ? function(e) {
897
- return e == null ? [] : (e = Object(e), Ue(ne(e), function(a) {
898
- return re.call(e, a);
896
+ var qr = se ? function(e) {
897
+ return e == null ? [] : (e = Object(e), gt(se(e), function(a) {
898
+ return ae.call(e, a);
899
899
  }));
900
- } : an, bt = Lt;
901
- (ge && bt(new ge(new ArrayBuffer(1))) != O || Rt && bt(new Rt()) != p || be && bt(be.resolve()) != m || ve && bt(new ve()) != D || Ee && bt(new Ee()) != P) && (bt = function(e) {
902
- var a = Lt(e), o = a == g ? e.constructor : void 0, u = o ? et(o) : "";
900
+ } : an, St = Ht;
901
+ (be && St(new be(new ArrayBuffer(1))) != M || Nt && St(new Nt()) != p || ve && St(ve.resolve()) != y || Se && St(new Se()) != A || Ee && St(new Ee()) != P) && (St = function(e) {
902
+ var a = Ht(e), o = a == b ? e.constructor : void 0, u = o ? nt(o) : "";
903
903
  if (u)
904
904
  switch (u) {
905
905
  case Ve:
906
- return O;
907
- case Et:
906
+ return M;
907
+ case Tt:
908
908
  return p;
909
- case Sr:
910
- return m;
909
+ case Er:
910
+ return y;
911
911
  case Tr:
912
- return D;
912
+ return A;
913
913
  case wr:
914
914
  return P;
915
915
  }
916
916
  return a;
917
917
  });
918
918
  function Qr(e, a) {
919
- return a = a ?? d, !!a && (typeof e == "number" || G.test(e)) && e > -1 && e % 1 == 0 && e < a;
919
+ return a = a ?? d, !!a && (typeof e == "number" || Ct.test(e)) && e > -1 && e % 1 == 0 && e < a;
920
920
  }
921
921
  function tn(e) {
922
922
  var a = typeof e;
@@ -926,16 +926,16 @@ lr.exports;
926
926
  return !!Xe && Xe in e;
927
927
  }
928
928
  function rn(e) {
929
- var a = e && e.constructor, o = typeof a == "function" && a.prototype || xt;
929
+ var a = e && e.constructor, o = typeof a == "function" && a.prototype || Lt;
930
930
  return e === o;
931
931
  }
932
932
  function tr(e) {
933
933
  return Be.call(e);
934
934
  }
935
- function et(e) {
935
+ function nt(e) {
936
936
  if (e != null) {
937
937
  try {
938
- return ye.call(e);
938
+ return _e.call(e);
939
939
  } catch {
940
940
  }
941
941
  try {
@@ -951,34 +951,34 @@ lr.exports;
951
951
  var rr = qe(/* @__PURE__ */ function() {
952
952
  return arguments;
953
953
  }()) ? qe : function(e) {
954
- return vt(e) && dt.call(e, "callee") && !re.call(e, "callee");
955
- }, oe = Array.isArray;
956
- function Ae(e) {
957
- return e != null && De(e.length) && !nr(e);
954
+ return Et(e) && ht.call(e, "callee") && !ae.call(e, "callee");
955
+ }, le = Array.isArray;
956
+ function De(e) {
957
+ return e != null && Me(e.length) && !nr(e);
958
958
  }
959
- var ce = Ie || sn;
959
+ var fe = ge || sn;
960
960
  function nn(e, a) {
961
961
  return Qe(e, a);
962
962
  }
963
963
  function nr(e) {
964
964
  if (!ir(e))
965
965
  return !1;
966
- var a = Lt(e);
966
+ var a = Ht(e);
967
967
  return a == f || a == l || a == R || a == h;
968
968
  }
969
- function De(e) {
969
+ function Me(e) {
970
970
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= d;
971
971
  }
972
972
  function ir(e) {
973
973
  var a = typeof e;
974
974
  return e != null && (a == "object" || a == "function");
975
975
  }
976
- function vt(e) {
976
+ function Et(e) {
977
977
  return e != null && typeof e == "object";
978
978
  }
979
- var ar = pe ? br(pe) : Kr;
980
- function Me(e) {
981
- return Ae(e) ? Wr(e) : Vr(e);
979
+ var ar = Y ? br(Y) : Kr;
980
+ function Oe(e) {
981
+ return De(e) ? Wr(e) : Vr(e);
982
982
  }
983
983
  function an() {
984
984
  return [];
@@ -989,43 +989,43 @@ lr.exports;
989
989
  t.exports = nn;
990
990
  })(lr, lr.exports);
991
991
  var ia = lr.exports;
992
- const rt = /* @__PURE__ */ wn(ia);
992
+ const it = /* @__PURE__ */ wn(ia);
993
993
  var fr = { exports: {} };
994
994
  fr.exports;
995
995
  (function(t, r) {
996
- var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", d = "[object Array]", y = "[object Boolean]", w = "[object Date]", R = "[object Error]", S = "[object Function]", N = "[object GeneratorFunction]", _ = "[object Map]", f = "[object Number]", l = "[object Object]", p = "[object Promise]", I = "[object RegExp]", b = "[object Set]", g = "[object String]", m = "[object Symbol]", h = "[object WeakMap]", T = "[object ArrayBuffer]", D = "[object DataView]", k = "[object Float32Array]", x = "[object Float64Array]", C = "[object Int8Array]", P = "[object Int16Array]", A = "[object Int32Array]", O = "[object Uint8Array]", z = "[object Uint8ClampedArray]", ot = "[object Uint16Array]", Ot = "[object Uint32Array]", Wt = /[\\^$.*+?()[\]{}|]/g, Xt = /\w*$/, Bt = /^\[object .+?Constructor\]$/, Kt = /^(?:0|[1-9]\d*)$/, H = {};
997
- H[c] = H[d] = H[T] = H[D] = H[y] = H[w] = H[k] = H[x] = H[C] = H[P] = H[A] = H[_] = H[f] = H[l] = H[I] = H[b] = H[g] = H[m] = H[O] = H[z] = H[ot] = H[Ot] = !0, H[R] = H[S] = H[h] = !1;
998
- var Vt = typeof pt == "object" && pt && pt.Object === Object && pt, Jt = typeof self == "object" && self && self.Object === Object && self, F = Vt || Jt || Function("return this")(), G = r && !r.nodeType && r, v = G && !0 && t && !t.nodeType && t, ct = v && v.exports === G;
999
- function nt(e, a) {
996
+ var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", d = "[object Array]", m = "[object Boolean]", T = "[object Date]", R = "[object Error]", S = "[object Function]", F = "[object GeneratorFunction]", _ = "[object Map]", f = "[object Number]", l = "[object Object]", p = "[object Promise]", g = "[object RegExp]", I = "[object Set]", b = "[object String]", y = "[object Symbol]", h = "[object WeakMap]", E = "[object ArrayBuffer]", A = "[object DataView]", w = "[object Float32Array]", x = "[object Float64Array]", C = "[object Int8Array]", P = "[object Int16Array]", k = "[object Int32Array]", M = "[object Uint8Array]", j = "[object Uint8ClampedArray]", ut = "[object Uint16Array]", Pt = "[object Uint32Array]", Vt = /[\\^$.*+?()[\]{}|]/g, Jt = /\w*$/, Zt = /^\[object .+?Constructor\]$/, qt = /^(?:0|[1-9]\d*)$/, N = {};
997
+ N[c] = N[d] = N[E] = N[A] = N[m] = N[T] = N[w] = N[x] = N[C] = N[P] = N[k] = N[_] = N[f] = N[l] = N[g] = N[I] = N[b] = N[y] = N[M] = N[j] = N[ut] = N[Pt] = !0, N[R] = N[S] = N[h] = !1;
998
+ var Qt = typeof mt == "object" && mt && mt.Object === Object && mt, te = typeof self == "object" && self && self.Object === Object && self, at = Qt || te || Function("return this")(), Ct = r && !r.nodeType && r, H = Ct && !0 && t && !t.nodeType && t, U = H && H.exports === Ct;
999
+ function G(e, a) {
1000
1000
  return e.set(a[0], a[1]), e;
1001
1001
  }
1002
- function U(e, a) {
1002
+ function O(e, a) {
1003
1003
  return e.add(a), e;
1004
1004
  }
1005
- function ft(e, a) {
1005
+ function lt(e, a) {
1006
1006
  for (var o = -1, u = e ? e.length : 0; ++o < u && a(e[o], o, e) !== !1; )
1007
1007
  ;
1008
1008
  return e;
1009
1009
  }
1010
- function K(e, a) {
1011
- for (var o = -1, u = a.length, M = e.length; ++o < u; )
1012
- e[M + o] = a[o];
1010
+ function rt(e, a) {
1011
+ for (var o = -1, u = a.length, D = e.length; ++o < u; )
1012
+ e[D + o] = a[o];
1013
1013
  return e;
1014
1014
  }
1015
- function Y(e, a, o, u) {
1016
- for (var M = -1, E = e ? e.length : 0; ++M < E; )
1017
- o = a(o, e[M], M, e);
1015
+ function K(e, a, o, u) {
1016
+ for (var D = -1, v = e ? e.length : 0; ++D < v; )
1017
+ o = a(o, e[D], D, e);
1018
1018
  return o;
1019
1019
  }
1020
- function ht(e, a) {
1020
+ function ft(e, a) {
1021
1021
  for (var o = -1, u = Array(e); ++o < e; )
1022
1022
  u[o] = a(o);
1023
1023
  return u;
1024
1024
  }
1025
- function Zt(e, a) {
1025
+ function V(e, a) {
1026
1026
  return e == null ? void 0 : e[a];
1027
1027
  }
1028
- function pe(e) {
1028
+ function Y(e) {
1029
1029
  var a = !1;
1030
1030
  if (e != null && typeof e.toString != "function")
1031
1031
  try {
@@ -1034,13 +1034,13 @@ fr.exports;
1034
1034
  }
1035
1035
  return a;
1036
1036
  }
1037
- function Ue(e) {
1037
+ function gt(e) {
1038
1038
  var a = -1, o = Array(e.size);
1039
- return e.forEach(function(u, M) {
1040
- o[++a] = [M, u];
1039
+ return e.forEach(function(u, D) {
1040
+ o[++a] = [D, u];
1041
1041
  }), o;
1042
1042
  }
1043
- function he(e, a) {
1043
+ function Rt(e, a) {
1044
1044
  return function(o) {
1045
1045
  return e(a(o));
1046
1046
  };
@@ -1051,43 +1051,43 @@ fr.exports;
1051
1051
  o[++a] = u;
1052
1052
  }), o;
1053
1053
  }
1054
- var gr = Array.prototype, br = Function.prototype, qt = Object.prototype, me = F["__core-js_shared__"], Ye = function() {
1055
- var e = /[^.]+$/.exec(me && me.keys && me.keys.IE_PROTO || "");
1054
+ var gr = Array.prototype, br = Function.prototype, ee = Object.prototype, ye = at["__core-js_shared__"], Ye = function() {
1055
+ var e = /[^.]+$/.exec(ye && ye.keys && ye.keys.IE_PROTO || "");
1056
1056
  return e ? "Symbol(src)_1." + e : "";
1057
- }(), We = br.toString, It = qt.hasOwnProperty, Qt = qt.toString, vr = RegExp(
1058
- "^" + We.call(It).replace(Wt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1059
- ), xt = ct ? F.Buffer : void 0, te = F.Symbol, ye = F.Uint8Array, dt = he(Object.getPrototypeOf, Object), Xe = Object.create, Be = qt.propertyIsEnumerable, Er = gr.splice, _e = Object.getOwnPropertySymbols, ee = xt ? xt.isBuffer : void 0, Ke = he(Object.keys, Object), re = yt(F, "DataView"), Pt = yt(F, "Map"), mt = yt(F, "Promise"), ne = yt(F, "Set"), Ie = yt(F, "WeakMap"), Ct = yt(Object, "create"), ge = et(re), Rt = et(Pt), be = et(mt), ve = et(ne), Ee = et(Ie), At = te ? te.prototype : void 0, Ve = At ? At.valueOf : void 0;
1060
- function Et(e) {
1057
+ }(), We = br.toString, bt = ee.hasOwnProperty, re = ee.toString, vr = RegExp(
1058
+ "^" + We.call(bt).replace(Vt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1059
+ ), Lt = U ? at.Buffer : void 0, ne = at.Symbol, _e = at.Uint8Array, ht = Rt(Object.getPrototypeOf, Object), Xe = Object.create, Be = ee.propertyIsEnumerable, Sr = gr.splice, Ie = Object.getOwnPropertySymbols, ie = Lt ? Lt.isBuffer : void 0, Ke = Rt(Object.keys, Object), ae = _t(at, "DataView"), Ft = _t(at, "Map"), yt = _t(at, "Promise"), se = _t(at, "Set"), ge = _t(at, "WeakMap"), $t = _t(Object, "create"), be = nt(ae), Nt = nt(Ft), ve = nt(yt), Se = nt(se), Ee = nt(ge), Mt = ne ? ne.prototype : void 0, Ve = Mt ? Mt.valueOf : void 0;
1060
+ function Tt(e) {
1061
1061
  var a = -1, o = e ? e.length : 0;
1062
1062
  for (this.clear(); ++a < o; ) {
1063
1063
  var u = e[a];
1064
1064
  this.set(u[0], u[1]);
1065
1065
  }
1066
1066
  }
1067
- function Sr() {
1068
- this.__data__ = Ct ? Ct(null) : {};
1067
+ function Er() {
1068
+ this.__data__ = $t ? $t(null) : {};
1069
1069
  }
1070
1070
  function Tr(e) {
1071
1071
  return this.has(e) && delete this.__data__[e];
1072
1072
  }
1073
1073
  function wr(e) {
1074
1074
  var a = this.__data__;
1075
- if (Ct) {
1075
+ if ($t) {
1076
1076
  var o = a[e];
1077
1077
  return o === i ? void 0 : o;
1078
1078
  }
1079
- return It.call(a, e) ? a[e] : void 0;
1079
+ return bt.call(a, e) ? a[e] : void 0;
1080
1080
  }
1081
1081
  function Je(e) {
1082
1082
  var a = this.__data__;
1083
- return Ct ? a[e] !== void 0 : It.call(a, e);
1083
+ return $t ? a[e] !== void 0 : bt.call(a, e);
1084
1084
  }
1085
- function Se(e, a) {
1085
+ function Te(e, a) {
1086
1086
  var o = this.__data__;
1087
- return o[e] = Ct && a === void 0 ? i : a, this;
1087
+ return o[e] = $t && a === void 0 ? i : a, this;
1088
1088
  }
1089
- Et.prototype.clear = Sr, Et.prototype.delete = Tr, Et.prototype.get = wr, Et.prototype.has = Je, Et.prototype.set = Se;
1090
- function V(e) {
1089
+ Tt.prototype.clear = Er, Tt.prototype.delete = Tr, Tt.prototype.get = wr, Tt.prototype.has = Je, Tt.prototype.set = Te;
1090
+ function J(e) {
1091
1091
  var a = -1, o = e ? e.length : 0;
1092
1092
  for (this.clear(); ++a < o; ) {
1093
1093
  var u = e[a];
@@ -1098,25 +1098,25 @@ fr.exports;
1098
1098
  this.__data__ = [];
1099
1099
  }
1100
1100
  function Ar(e) {
1101
- var a = this.__data__, o = ae(a, e);
1101
+ var a = this.__data__, o = ce(a, e);
1102
1102
  if (o < 0)
1103
1103
  return !1;
1104
1104
  var u = a.length - 1;
1105
- return o == u ? a.pop() : Er.call(a, o, 1), !0;
1105
+ return o == u ? a.pop() : Sr.call(a, o, 1), !0;
1106
1106
  }
1107
1107
  function Dr(e) {
1108
- var a = this.__data__, o = ae(a, e);
1108
+ var a = this.__data__, o = ce(a, e);
1109
1109
  return o < 0 ? void 0 : a[o][1];
1110
1110
  }
1111
1111
  function Mr(e) {
1112
- return ae(this.__data__, e) > -1;
1112
+ return ce(this.__data__, e) > -1;
1113
1113
  }
1114
1114
  function Or(e, a) {
1115
- var o = this.__data__, u = ae(o, e);
1115
+ var o = this.__data__, u = ce(o, e);
1116
1116
  return u < 0 ? o.push([e, a]) : o[u][1] = a, this;
1117
1117
  }
1118
- V.prototype.clear = kr, V.prototype.delete = Ar, V.prototype.get = Dr, V.prototype.has = Mr, V.prototype.set = Or;
1119
- function Z(e) {
1118
+ J.prototype.clear = kr, J.prototype.delete = Ar, J.prototype.get = Dr, J.prototype.has = Mr, J.prototype.set = Or;
1119
+ function q(e) {
1120
1120
  var a = -1, o = e ? e.length : 0;
1121
1121
  for (this.clear(); ++a < o; ) {
1122
1122
  var u = e[a];
@@ -1125,29 +1125,29 @@ fr.exports;
1125
1125
  }
1126
1126
  function xr() {
1127
1127
  this.__data__ = {
1128
- hash: new Et(),
1129
- map: new (Pt || V)(),
1130
- string: new Et()
1128
+ hash: new Tt(),
1129
+ map: new (Ft || J)(),
1130
+ string: new Tt()
1131
1131
  };
1132
1132
  }
1133
1133
  function Pr(e) {
1134
- return Ft(this, e).delete(e);
1134
+ return zt(this, e).delete(e);
1135
1135
  }
1136
1136
  function Cr(e) {
1137
- return Ft(this, e).get(e);
1137
+ return zt(this, e).get(e);
1138
1138
  }
1139
1139
  function Rr(e) {
1140
- return Ft(this, e).has(e);
1140
+ return zt(this, e).has(e);
1141
1141
  }
1142
1142
  function Lr(e, a) {
1143
- return Ft(this, e).set(e, a), this;
1143
+ return zt(this, e).set(e, a), this;
1144
1144
  }
1145
- Z.prototype.clear = xr, Z.prototype.delete = Pr, Z.prototype.get = Cr, Z.prototype.has = Rr, Z.prototype.set = Lr;
1146
- function it(e) {
1147
- this.__data__ = new V(e);
1145
+ q.prototype.clear = xr, q.prototype.delete = Pr, q.prototype.get = Cr, q.prototype.has = Rr, q.prototype.set = Lr;
1146
+ function st(e) {
1147
+ this.__data__ = new J(e);
1148
1148
  }
1149
1149
  function Fr() {
1150
- this.__data__ = new V();
1150
+ this.__data__ = new J();
1151
1151
  }
1152
1152
  function $r(e) {
1153
1153
  return this.__data__.delete(e);
@@ -1158,126 +1158,126 @@ fr.exports;
1158
1158
  function Hr(e) {
1159
1159
  return this.__data__.has(e);
1160
1160
  }
1161
- function jr(e, a) {
1161
+ function zr(e, a) {
1162
1162
  var o = this.__data__;
1163
- if (o instanceof V) {
1163
+ if (o instanceof J) {
1164
1164
  var u = o.__data__;
1165
- if (!Pt || u.length < n - 1)
1165
+ if (!Ft || u.length < n - 1)
1166
1166
  return u.push([e, a]), this;
1167
- o = this.__data__ = new Z(u);
1167
+ o = this.__data__ = new q(u);
1168
1168
  }
1169
1169
  return o.set(e, a), this;
1170
1170
  }
1171
- it.prototype.clear = Fr, it.prototype.delete = $r, it.prototype.get = Nr, it.prototype.has = Hr, it.prototype.set = jr;
1172
- function ie(e, a) {
1173
- var o = Ae(e) || oe(e) ? ht(e.length, String) : [], u = o.length, M = !!u;
1174
- for (var E in e)
1175
- It.call(e, E) && !(M && (E == "length" || tn(E, u))) && o.push(E);
1171
+ st.prototype.clear = Fr, st.prototype.delete = $r, st.prototype.get = Nr, st.prototype.has = Hr, st.prototype.set = zr;
1172
+ function oe(e, a) {
1173
+ var o = De(e) || le(e) ? ft(e.length, String) : [], u = o.length, D = !!u;
1174
+ for (var v in e)
1175
+ bt.call(e, v) && !(D && (v == "length" || tn(v, u))) && o.push(v);
1176
1176
  return o;
1177
1177
  }
1178
1178
  function Ze(e, a, o) {
1179
1179
  var u = e[a];
1180
- (!(It.call(e, a) && rr(u, o)) || o === void 0 && !(a in e)) && (e[a] = o);
1180
+ (!(bt.call(e, a) && rr(u, o)) || o === void 0 && !(a in e)) && (e[a] = o);
1181
1181
  }
1182
- function ae(e, a) {
1182
+ function ce(e, a) {
1183
1183
  for (var o = e.length; o--; )
1184
1184
  if (rr(e[o][0], a))
1185
1185
  return o;
1186
1186
  return -1;
1187
1187
  }
1188
- function gt(e, a) {
1189
- return e && ke(a, Me(a), e);
1188
+ function vt(e, a) {
1189
+ return e && Ae(a, Oe(a), e);
1190
1190
  }
1191
- function Te(e, a, o, u, M, E, $) {
1191
+ function we(e, a, o, u, D, v, $) {
1192
1192
  var L;
1193
- if (u && (L = E ? u(e, M, E, $) : u(e)), L !== void 0)
1193
+ if (u && (L = v ? u(e, D, v, $) : u(e)), L !== void 0)
1194
1194
  return L;
1195
- if (!vt(e))
1195
+ if (!Et(e))
1196
1196
  return e;
1197
- var W = Ae(e);
1197
+ var W = De(e);
1198
1198
  if (W) {
1199
1199
  if (L = qr(e), !a)
1200
1200
  return Vr(e, L);
1201
1201
  } else {
1202
- var j = Tt(e), q = j == S || j == N;
1202
+ var z = kt(e), Q = z == S || z == F;
1203
1203
  if (nr(e))
1204
- return se(e, a);
1205
- if (j == l || j == c || q && !E) {
1206
- if (pe(e))
1207
- return E ? e : {};
1208
- if (L = bt(q ? {} : e), !a)
1209
- return Jr(e, gt(L, e));
1204
+ return ue(e, a);
1205
+ if (z == l || z == c || Q && !v) {
1206
+ if (Y(e))
1207
+ return v ? e : {};
1208
+ if (L = St(Q ? {} : e), !a)
1209
+ return Jr(e, vt(L, e));
1210
1210
  } else {
1211
- if (!H[j])
1212
- return E ? e : {};
1213
- L = Qr(e, j, Te, a);
1211
+ if (!N[z])
1212
+ return v ? e : {};
1213
+ L = Qr(e, z, we, a);
1214
1214
  }
1215
1215
  }
1216
- $ || ($ = new it());
1217
- var at = $.get(e);
1218
- if (at)
1219
- return at;
1216
+ $ || ($ = new st());
1217
+ var ot = $.get(e);
1218
+ if (ot)
1219
+ return ot;
1220
1220
  if ($.set(e, L), !W)
1221
- var X = o ? Zr(e) : Me(e);
1222
- return ft(X || e, function(Q, J) {
1223
- X && (J = Q, Q = e[J]), Ze(L, J, Te(Q, a, o, u, J, e, $));
1221
+ var X = o ? Zr(e) : Oe(e);
1222
+ return lt(X || e, function(tt, Z) {
1223
+ X && (Z = tt, tt = e[Z]), Ze(L, Z, we(tt, a, o, u, Z, e, $));
1224
1224
  }), L;
1225
1225
  }
1226
- function zr(e) {
1227
- return vt(e) ? Xe(e) : {};
1226
+ function jr(e) {
1227
+ return Et(e) ? Xe(e) : {};
1228
1228
  }
1229
1229
  function Ur(e, a, o) {
1230
1230
  var u = a(e);
1231
- return Ae(e) ? u : K(u, o(e));
1231
+ return De(e) ? u : rt(u, o(e));
1232
1232
  }
1233
1233
  function Gr(e) {
1234
- return Qt.call(e);
1234
+ return re.call(e);
1235
1235
  }
1236
1236
  function Yr(e) {
1237
- if (!vt(e) || rn(e))
1237
+ if (!Et(e) || rn(e))
1238
1238
  return !1;
1239
- var a = De(e) || pe(e) ? vr : Bt;
1240
- return a.test(et(e));
1239
+ var a = Me(e) || Y(e) ? vr : Zt;
1240
+ return a.test(nt(e));
1241
1241
  }
1242
1242
  function Wr(e) {
1243
1243
  if (!tr(e))
1244
1244
  return Ke(e);
1245
1245
  var a = [];
1246
1246
  for (var o in Object(e))
1247
- It.call(e, o) && o != "constructor" && a.push(o);
1247
+ bt.call(e, o) && o != "constructor" && a.push(o);
1248
1248
  return a;
1249
1249
  }
1250
- function se(e, a) {
1250
+ function ue(e, a) {
1251
1251
  if (a)
1252
1252
  return e.slice();
1253
1253
  var o = new e.constructor(e.length);
1254
1254
  return e.copy(o), o;
1255
1255
  }
1256
- function we(e) {
1256
+ function ke(e) {
1257
1257
  var a = new e.constructor(e.byteLength);
1258
- return new ye(a).set(new ye(e)), a;
1258
+ return new _e(a).set(new _e(e)), a;
1259
1259
  }
1260
- function Lt(e, a) {
1261
- var o = a ? we(e.buffer) : e.buffer;
1260
+ function Ht(e, a) {
1261
+ var o = a ? ke(e.buffer) : e.buffer;
1262
1262
  return new e.constructor(o, e.byteOffset, e.byteLength);
1263
1263
  }
1264
1264
  function qe(e, a, o) {
1265
- var u = a ? o(Ue(e), !0) : Ue(e);
1266
- return Y(u, nt, new e.constructor());
1265
+ var u = a ? o(gt(e), !0) : gt(e);
1266
+ return K(u, G, new e.constructor());
1267
1267
  }
1268
1268
  function Qe(e) {
1269
- var a = new e.constructor(e.source, Xt.exec(e));
1269
+ var a = new e.constructor(e.source, Jt.exec(e));
1270
1270
  return a.lastIndex = e.lastIndex, a;
1271
1271
  }
1272
1272
  function Xr(e, a, o) {
1273
1273
  var u = a ? o(Ge(e), !0) : Ge(e);
1274
- return Y(u, U, new e.constructor());
1274
+ return K(u, O, new e.constructor());
1275
1275
  }
1276
1276
  function Br(e) {
1277
1277
  return Ve ? Object(Ve.call(e)) : {};
1278
1278
  }
1279
1279
  function Kr(e, a) {
1280
- var o = a ? we(e.buffer) : e.buffer;
1280
+ var o = a ? ke(e.buffer) : e.buffer;
1281
1281
  return new e.constructor(o, e.byteOffset, e.length);
1282
1282
  }
1283
1283
  function Vr(e, a) {
@@ -1286,41 +1286,41 @@ fr.exports;
1286
1286
  a[o] = e[o];
1287
1287
  return a;
1288
1288
  }
1289
- function ke(e, a, o, u) {
1289
+ function Ae(e, a, o, u) {
1290
1290
  o || (o = {});
1291
- for (var M = -1, E = a.length; ++M < E; ) {
1292
- var $ = a[M], L = void 0;
1291
+ for (var D = -1, v = a.length; ++D < v; ) {
1292
+ var $ = a[D], L = void 0;
1293
1293
  Ze(o, $, L === void 0 ? e[$] : L);
1294
1294
  }
1295
1295
  return o;
1296
1296
  }
1297
1297
  function Jr(e, a) {
1298
- return ke(e, St(e), a);
1298
+ return Ae(e, wt(e), a);
1299
1299
  }
1300
1300
  function Zr(e) {
1301
- return Ur(e, Me, St);
1301
+ return Ur(e, Oe, wt);
1302
1302
  }
1303
- function Ft(e, a) {
1303
+ function zt(e, a) {
1304
1304
  var o = e.__data__;
1305
1305
  return en(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
1306
1306
  }
1307
- function yt(e, a) {
1308
- var o = Zt(e, a);
1307
+ function _t(e, a) {
1308
+ var o = V(e, a);
1309
1309
  return Yr(o) ? o : void 0;
1310
1310
  }
1311
- var St = _e ? he(_e, Object) : an, Tt = Gr;
1312
- (re && Tt(new re(new ArrayBuffer(1))) != D || Pt && Tt(new Pt()) != _ || mt && Tt(mt.resolve()) != p || ne && Tt(new ne()) != b || Ie && Tt(new Ie()) != h) && (Tt = function(e) {
1313
- var a = Qt.call(e), o = a == l ? e.constructor : void 0, u = o ? et(o) : void 0;
1311
+ var wt = Ie ? Rt(Ie, Object) : an, kt = Gr;
1312
+ (ae && kt(new ae(new ArrayBuffer(1))) != A || Ft && kt(new Ft()) != _ || yt && kt(yt.resolve()) != p || se && kt(new se()) != I || ge && kt(new ge()) != h) && (kt = function(e) {
1313
+ var a = re.call(e), o = a == l ? e.constructor : void 0, u = o ? nt(o) : void 0;
1314
1314
  if (u)
1315
1315
  switch (u) {
1316
- case ge:
1317
- return D;
1318
- case Rt:
1319
- return _;
1320
1316
  case be:
1321
- return p;
1317
+ return A;
1318
+ case Nt:
1319
+ return _;
1322
1320
  case ve:
1323
- return b;
1321
+ return p;
1322
+ case Se:
1323
+ return I;
1324
1324
  case Ee:
1325
1325
  return h;
1326
1326
  }
@@ -1328,46 +1328,46 @@ fr.exports;
1328
1328
  });
1329
1329
  function qr(e) {
1330
1330
  var a = e.length, o = e.constructor(a);
1331
- return a && typeof e[0] == "string" && It.call(e, "index") && (o.index = e.index, o.input = e.input), o;
1331
+ return a && typeof e[0] == "string" && bt.call(e, "index") && (o.index = e.index, o.input = e.input), o;
1332
1332
  }
1333
- function bt(e) {
1334
- return typeof e.constructor == "function" && !tr(e) ? zr(dt(e)) : {};
1333
+ function St(e) {
1334
+ return typeof e.constructor == "function" && !tr(e) ? jr(ht(e)) : {};
1335
1335
  }
1336
1336
  function Qr(e, a, o, u) {
1337
- var M = e.constructor;
1337
+ var D = e.constructor;
1338
1338
  switch (a) {
1339
+ case E:
1340
+ return ke(e);
1341
+ case m:
1339
1342
  case T:
1340
- return we(e);
1341
- case y:
1343
+ return new D(+e);
1344
+ case A:
1345
+ return Ht(e, u);
1342
1346
  case w:
1343
- return new M(+e);
1344
- case D:
1345
- return Lt(e, u);
1346
- case k:
1347
1347
  case x:
1348
1348
  case C:
1349
1349
  case P:
1350
- case A:
1351
- case O:
1352
- case z:
1353
- case ot:
1354
- case Ot:
1350
+ case k:
1351
+ case M:
1352
+ case j:
1353
+ case ut:
1354
+ case Pt:
1355
1355
  return Kr(e, u);
1356
1356
  case _:
1357
1357
  return qe(e, u, o);
1358
1358
  case f:
1359
+ case b:
1360
+ return new D(e);
1359
1361
  case g:
1360
- return new M(e);
1361
- case I:
1362
1362
  return Qe(e);
1363
- case b:
1363
+ case I:
1364
1364
  return Xr(e, u, o);
1365
- case m:
1365
+ case y:
1366
1366
  return Br(e);
1367
1367
  }
1368
1368
  }
1369
1369
  function tn(e, a) {
1370
- return a = a ?? s, !!a && (typeof e == "number" || Kt.test(e)) && e > -1 && e % 1 == 0 && e < a;
1370
+ return a = a ?? s, !!a && (typeof e == "number" || qt.test(e)) && e > -1 && e % 1 == 0 && e < a;
1371
1371
  }
1372
1372
  function en(e) {
1373
1373
  var a = typeof e;
@@ -1377,10 +1377,10 @@ fr.exports;
1377
1377
  return !!Ye && Ye in e;
1378
1378
  }
1379
1379
  function tr(e) {
1380
- var a = e && e.constructor, o = typeof a == "function" && a.prototype || qt;
1380
+ var a = e && e.constructor, o = typeof a == "function" && a.prototype || ee;
1381
1381
  return e === o;
1382
1382
  }
1383
- function et(e) {
1383
+ function nt(e) {
1384
1384
  if (e != null) {
1385
1385
  try {
1386
1386
  return We.call(e);
@@ -1394,38 +1394,38 @@ fr.exports;
1394
1394
  return "";
1395
1395
  }
1396
1396
  function er(e) {
1397
- return Te(e, !0, !0);
1397
+ return we(e, !0, !0);
1398
1398
  }
1399
1399
  function rr(e, a) {
1400
1400
  return e === a || e !== e && a !== a;
1401
1401
  }
1402
- function oe(e) {
1403
- return nn(e) && It.call(e, "callee") && (!Be.call(e, "callee") || Qt.call(e) == c);
1402
+ function le(e) {
1403
+ return nn(e) && bt.call(e, "callee") && (!Be.call(e, "callee") || re.call(e) == c);
1404
1404
  }
1405
- var Ae = Array.isArray;
1406
- function ce(e) {
1407
- return e != null && ir(e.length) && !De(e);
1405
+ var De = Array.isArray;
1406
+ function fe(e) {
1407
+ return e != null && ir(e.length) && !Me(e);
1408
1408
  }
1409
1409
  function nn(e) {
1410
- return ar(e) && ce(e);
1410
+ return ar(e) && fe(e);
1411
1411
  }
1412
- var nr = ee || sn;
1413
- function De(e) {
1414
- var a = vt(e) ? Qt.call(e) : "";
1415
- return a == S || a == N;
1412
+ var nr = ie || sn;
1413
+ function Me(e) {
1414
+ var a = Et(e) ? re.call(e) : "";
1415
+ return a == S || a == F;
1416
1416
  }
1417
1417
  function ir(e) {
1418
1418
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= s;
1419
1419
  }
1420
- function vt(e) {
1420
+ function Et(e) {
1421
1421
  var a = typeof e;
1422
1422
  return !!e && (a == "object" || a == "function");
1423
1423
  }
1424
1424
  function ar(e) {
1425
1425
  return !!e && typeof e == "object";
1426
1426
  }
1427
- function Me(e) {
1428
- return ce(e) ? ie(e) : Wr(e);
1427
+ function Oe(e) {
1428
+ return fe(e) ? oe(e) : Wr(e);
1429
1429
  }
1430
1430
  function an() {
1431
1431
  return [];
@@ -1436,7 +1436,7 @@ fr.exports;
1436
1436
  t.exports = er;
1437
1437
  })(fr, fr.exports);
1438
1438
  var aa = fr.exports;
1439
- const tt = /* @__PURE__ */ wn(aa), ri = (t) => new Promise((r, n) => {
1439
+ const et = /* @__PURE__ */ wn(aa), ri = (t) => new Promise((r, n) => {
1440
1440
  const i = new Image();
1441
1441
  console.warn("update cdn config for cors?"), i.onload = () => {
1442
1442
  const s = i.width, c = i.height;
@@ -1477,15 +1477,15 @@ const tt = /* @__PURE__ */ wn(aa), ri = (t) => new Promise((r, n) => {
1477
1477
  }).catch((s) => i(s));
1478
1478
  });
1479
1479
  }, oa = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
1480
- let Oe = (t = 21) => {
1480
+ let xe = (t = 21) => {
1481
1481
  let r = "", n = crypto.getRandomValues(new Uint8Array(t));
1482
1482
  for (; t--; )
1483
1483
  r += oa[n[t] & 63];
1484
1484
  return r;
1485
1485
  };
1486
- function xe(t = 16) {
1486
+ function Pe(t = 16) {
1487
1487
  const r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n = r.charAt(Math.floor(Math.random() * r.length));
1488
- let i = Oe(t - 1);
1488
+ let i = xe(t - 1);
1489
1489
  return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
1490
1490
  }
1491
1491
  const yr = {
@@ -1493,7 +1493,7 @@ const yr = {
1493
1493
  x: 0,
1494
1494
  y: 0,
1495
1495
  blur: 0
1496
- }, Ne = (t, r) => {
1496
+ }, He = (t, r) => {
1497
1497
  let n = r != null && r.trim ? r.trim.to - r.trim.from : (r == null ? void 0 : r.duration) || 5e3;
1498
1498
  const i = {
1499
1499
  from: 0,
@@ -1581,7 +1581,7 @@ const si = async (t, r) => {
1581
1581
  name: "video",
1582
1582
  details: d,
1583
1583
  playbackRate: t.playbackRate || 1,
1584
- display: Ne(t.display, { duration: i.duration, trim: c }),
1584
+ display: He(t.display, { duration: i.duration, trim: c }),
1585
1585
  duration: i.duration
1586
1586
  };
1587
1587
  }, oi = async (t) => {
@@ -1590,7 +1590,7 @@ const si = async (t, r) => {
1590
1590
  id: r,
1591
1591
  name: "",
1592
1592
  type: "audio",
1593
- display: Ne(t.display, { duration: s, trim: c }),
1593
+ display: He(t.display, { duration: s, trim: c }),
1594
1594
  trim: c,
1595
1595
  playbackRate: t.playbackRate || 1,
1596
1596
  details: {
@@ -1602,20 +1602,21 @@ const si = async (t, r) => {
1602
1602
  duration: s
1603
1603
  };
1604
1604
  }, ca = async (t, r) => {
1605
- const n = t.trackItemIds, i = {
1605
+ var F, _, f;
1606
+ const n = t.trackItemIds, i = t.size || {
1606
1607
  width: t.details.width,
1607
1608
  height: t.details.height
1608
1609
  }, s = Math.min(
1609
1610
  r.size.width / i.width,
1610
1611
  r.size.height / i.height
1611
- ), c = t.details.rotate || 0, d = {
1612
- top: t.details.top || 0,
1613
- left: t.details.left || 0
1614
- }, y = t.display, w = t.trim || t.display;
1612
+ ), c = ((F = t.details) == null ? void 0 : F.rotate) || 0, d = {
1613
+ top: ((_ = t.details) == null ? void 0 : _.top) || 0,
1614
+ left: ((f = t.details) == null ? void 0 : f.left) || 0
1615
+ }, m = t.display, T = t.trim || t.display;
1615
1616
  let R = 1 / 0, S = 0;
1616
- return n.forEach((N) => {
1617
- const _ = t.trackItemsMap[N];
1618
- _.display.from < R && (R = _.display.from), _.display.to > S && (S = _.display.to);
1617
+ return n.forEach((l) => {
1618
+ const p = t.trackItemsMap[l];
1619
+ p.display.from < R && (R = p.display.from), p.display.to > S && (S = p.display.to);
1619
1620
  }), {
1620
1621
  id: t.id,
1621
1622
  details: {
@@ -1625,8 +1626,8 @@ const si = async (t, r) => {
1625
1626
  scale: s,
1626
1627
  rotate: c
1627
1628
  },
1628
- trim: w,
1629
- display: y || { from: R, to: S },
1629
+ trim: T,
1630
+ display: m || { from: R, to: S },
1630
1631
  activeEdit: !1
1631
1632
  };
1632
1633
  }, ci = async (t, r) => {
@@ -1635,7 +1636,7 @@ const si = async (t, r) => {
1635
1636
  id: t.id,
1636
1637
  type: "image",
1637
1638
  name: "image",
1638
- display: Ne(t.display),
1639
+ display: He(t.display),
1639
1640
  playbackRate: t.playbackRate || 1,
1640
1641
  details: {
1641
1642
  src: n.src || "",
@@ -1681,7 +1682,7 @@ const si = async (t, r) => {
1681
1682
  url: n.details.fontUrl
1682
1683
  }
1683
1684
  ]);
1684
- const i = n.id, s = n.details, c = fi(s), d = ii(n.details.text, c), y = _r(r, {
1685
+ const i = n.id, s = n.details, c = fi(s), d = ii(n.details.text, c), m = _r(r, {
1685
1686
  width: c.width,
1686
1687
  height: d
1687
1688
  });
@@ -1689,7 +1690,7 @@ const si = async (t, r) => {
1689
1690
  id: i,
1690
1691
  name: "caption",
1691
1692
  type: "caption",
1692
- display: Ne(n.display),
1693
+ display: He(n.display),
1693
1694
  details: {
1694
1695
  ...c,
1695
1696
  text: s.text || "",
@@ -1697,8 +1698,8 @@ const si = async (t, r) => {
1697
1698
  height: d,
1698
1699
  // Default height
1699
1700
  fontUrl: s.fontUrl,
1700
- top: c.top || y.top,
1701
- left: c.left || y.left,
1701
+ top: c.top || m.top,
1702
+ left: c.left || m.left,
1702
1703
  borderWidth: s.borderWidth || 0,
1703
1704
  borderColor: s.borderColor || "#000000",
1704
1705
  boxShadow: s.boxShadow || yr,
@@ -1721,7 +1722,7 @@ const si = async (t, r) => {
1721
1722
  id: n,
1722
1723
  name: "text",
1723
1724
  type: "text",
1724
- display: Ne(t.display),
1725
+ display: He(t.display),
1725
1726
  details: {
1726
1727
  ...s,
1727
1728
  text: i.text || "",
@@ -1778,7 +1779,9 @@ const si = async (t, r) => {
1778
1779
  top: t.top,
1779
1780
  left: t.left,
1780
1781
  textTransform: t.textTransform || "none",
1781
- transform: t.transform || "none"
1782
+ transform: t.transform || "none",
1783
+ skewX: t.skewX || 0,
1784
+ skewY: t.skewY || 0
1782
1785
  }), ua = async (t, r) => {
1783
1786
  switch (t.type) {
1784
1787
  case "video":
@@ -1801,7 +1804,7 @@ function la(t, r) {
1801
1804
  );
1802
1805
  }
1803
1806
  const fa = (t = [], r = []) => t.length === 0 ? r.map((i) => ({
1804
- id: xe(),
1807
+ id: Pe(),
1805
1808
  items: [i.id],
1806
1809
  type: i.type,
1807
1810
  accepts: ["text", "image", "video", "audio", "caption", "template"]
@@ -1812,7 +1815,7 @@ const fa = (t = [], r = []) => t.length === 0 ? r.map((i) => ({
1812
1815
  type: n.type || "text",
1813
1816
  magnetic: n.magnetic || !1,
1814
1817
  static: n.static || !1,
1815
- id: n.id || xe()
1818
+ id: n.id || Pe()
1816
1819
  }));
1817
1820
  function da(t, r) {
1818
1821
  return t.filter((i) => {
@@ -1822,7 +1825,7 @@ function da(t, r) {
1822
1825
  return i;
1823
1826
  });
1824
1827
  }
1825
- const jt = (t) => Object.keys(t).reduce((r, n) => {
1828
+ const Yt = (t) => Object.keys(t).reduce((r, n) => {
1826
1829
  const { display: i, playbackRate: s } = t[n];
1827
1830
  return Math.max(r, i.to / (s || 1));
1828
1831
  }, 0);
@@ -1832,18 +1835,18 @@ function In(t, r, n) {
1832
1835
  const pa = (t, r, n, i, s) => {
1833
1836
  if (i === void 0 && s === void 0)
1834
1837
  return { trackId: void 0, trackIndex: void 0 };
1835
- const c = s !== void 0 ? r[In(s, 0, r.length)] : r.find((w) => w.id === i);
1838
+ const c = s !== void 0 ? r[In(s, 0, r.length)] : r.find((T) => T.id === i);
1836
1839
  if (!c)
1837
1840
  return {
1838
1841
  trackId: void 0,
1839
1842
  trackIndex: s !== void 0 ? In(s, 0, r.length) : void 0
1840
1843
  };
1841
- const d = c.items.map((w) => n[w]), y = t.map((w) => n[w]);
1842
- for (const w of d) {
1843
- const R = w.display.from, S = w.display.to;
1844
- for (const N of y) {
1845
- const _ = N.display.from;
1846
- if (!(N.display.to <= R || _ >= S))
1844
+ const d = c.items.map((T) => n[T]), m = t.map((T) => n[T]);
1845
+ for (const T of d) {
1846
+ const R = T.display.from, S = T.display.to;
1847
+ for (const F of m) {
1848
+ const _ = F.display.from;
1849
+ if (!(F.display.to <= R || _ >= S))
1847
1850
  return {
1848
1851
  trackId: void 0,
1849
1852
  trackIndex: r.indexOf(c)
@@ -1856,108 +1859,126 @@ const pa = (t, r, n, i, s) => {
1856
1859
  };
1857
1860
  };
1858
1861
  function ha(t) {
1859
- const r = ue.pipe(
1860
- le(({ key: f }) => f.startsWith(Ti))
1861
- ), n = ue.pipe(
1862
- le(({ key: f }) => f.startsWith(wi))
1863
- ), i = ue.pipe(
1864
- le(({ key: f }) => f.startsWith(ki))
1865
- ), s = ue.pipe(
1866
- le(({ key: f }) => f.startsWith(Ai))
1867
- ), c = ue.pipe(
1868
- le(({ key: f }) => f.startsWith(Di))
1869
- ), d = ue.pipe(
1870
- le(({ key: f }) => f.startsWith(Mi))
1871
- ), y = r.subscribe(async (f) => {
1862
+ const r = de.pipe(
1863
+ pe(({ key: f }) => f.startsWith(Ti))
1864
+ ), n = de.pipe(
1865
+ pe(({ key: f }) => f.startsWith(wi))
1866
+ ), i = de.pipe(
1867
+ pe(({ key: f }) => f.startsWith(ki))
1868
+ ), s = de.pipe(
1869
+ pe(({ key: f }) => f.startsWith(Ai))
1870
+ ), c = de.pipe(
1871
+ pe(({ key: f }) => f.startsWith(Di))
1872
+ ), d = de.pipe(
1873
+ pe(({ key: f }) => f.startsWith(Mi))
1874
+ ), m = r.subscribe(async (f) => {
1872
1875
  var l, p;
1873
1876
  if (f.key === Oi) {
1874
- const I = (l = f.value) == null ? void 0 : l.payload, b = I.trackItemsMap, g = I.trackItemDetailsMap;
1877
+ const g = (l = f.value) == null ? void 0 : l.payload, I = g.trackItemsMap, b = g.trackItemDetailsMap;
1875
1878
  console.warn("IMPROVE FONTS LOADING");
1876
- for (const h in g)
1877
- if (g[h].type === "text" || g[h].type === "caption") {
1878
- const T = g[h].details;
1879
+ for (const h in b)
1880
+ if (b[h].type === "text" || b[h].type === "caption") {
1881
+ const E = b[h].details;
1879
1882
  await dr([
1880
1883
  {
1881
- fontFamily: T.fontFamily,
1882
- url: T.fontUrl
1884
+ fontFamily: E.fontFamily,
1885
+ url: E.fontUrl
1883
1886
  }
1884
1887
  ]);
1885
1888
  }
1886
- const m = jt(b);
1887
- t.updateState({
1888
- ...I,
1889
- duration: m
1890
- });
1889
+ const y = Yt(I);
1890
+ t.updateState(
1891
+ {
1892
+ ...g,
1893
+ duration: y
1894
+ },
1895
+ {
1896
+ kind: "design:load",
1897
+ updateHistory: !1
1898
+ }
1899
+ );
1891
1900
  }
1892
1901
  if (f.key === xi) {
1893
- const I = (p = f.value) == null ? void 0 : p.payload;
1894
- t.updateState({
1895
- size: I
1896
- });
1902
+ const g = (p = f.value) == null ? void 0 : p.payload;
1903
+ t.updateState(
1904
+ {
1905
+ size: g
1906
+ },
1907
+ {
1908
+ kind: "design:resize",
1909
+ updateHistory: !1
1910
+ }
1911
+ );
1897
1912
  }
1898
- }), w = s.subscribe((f) => {
1913
+ }), T = s.subscribe((f) => {
1899
1914
  if (f.key === Pi) return t.undo();
1900
1915
  if (f.key === Ci) return t.redo();
1901
1916
  }), R = i.subscribe((f) => {
1902
- var I, b, g, m;
1917
+ var g, I, b, y;
1903
1918
  const l = [], p = [];
1904
- if ((I = f.value) != null && I.payload.trackItemIds && (l.push((b = f.value) == null ? void 0 : b.payload.trackItemIds), t.updateState({ activeIds: l })), f.key === Ri) {
1905
- const h = (g = f.value) == null ? void 0 : g.payload.trackItemIds, T = tt(t.getState()), D = h && h.length ? h : T.activeIds, k = T.trackItemIds, x = T.trackItemDetailsMap, C = k.filter(
1906
- (ot) => !D.includes(ot)
1919
+ if ((g = f.value) != null && g.payload.trackItemIds && (l.push((I = f.value) == null ? void 0 : I.payload.trackItemIds), t.updateState(
1920
+ { activeIds: l },
1921
+ {
1922
+ kind: "update",
1923
+ updateHistory: !1
1924
+ }
1925
+ )), f.key === Ri) {
1926
+ const h = (b = f.value) == null ? void 0 : b.payload.trackItemIds, E = et(t.getState()), A = h && h.length ? h : E.activeIds, w = E.trackItemIds, x = E.trackItemDetailsMap, C = w.filter(
1927
+ (ut) => !A.includes(ut)
1907
1928
  ), P = Object.fromEntries(
1908
1929
  Object.entries(x).filter(
1909
- ([ot]) => !D.includes(ot)
1930
+ ([ut]) => !A.includes(ut)
1910
1931
  )
1911
- ), A = da(
1912
- T.tracks,
1913
- D
1914
- ), O = Object.fromEntries(
1915
- Object.entries(T.trackItemsMap).filter(
1916
- ([ot]) => !D.includes(ot)
1932
+ ), k = da(
1933
+ E.tracks,
1934
+ A
1935
+ ), M = Object.fromEntries(
1936
+ Object.entries(E.trackItemsMap).filter(
1937
+ ([ut]) => !A.includes(ut)
1917
1938
  )
1918
- ), z = jt(O);
1939
+ ), j = Yt(M);
1919
1940
  t.updateState(
1920
1941
  {
1921
1942
  trackItemIds: C,
1922
1943
  trackItemDetailsMap: P,
1923
1944
  activeIds: [],
1924
- trackItemsMap: O,
1925
- tracks: A,
1926
- duration: z
1945
+ trackItemsMap: M,
1946
+ tracks: k,
1947
+ duration: j
1927
1948
  },
1928
1949
  { updateHistory: !0, kind: "remove" }
1929
1950
  );
1930
1951
  }
1931
1952
  if (f.key === Li) {
1932
- const h = tt(t.getState()), T = ((m = f.value) == null ? void 0 : m.payload.trackItemIds) || h.activeIds;
1933
- if (T.length === 0) return;
1934
- T.forEach((k) => {
1935
- const x = h.trackItemsMap[k], C = h.trackItemDetailsMap[k], P = xe();
1953
+ const h = et(t.getState()), E = ((y = f.value) == null ? void 0 : y.payload.trackItemIds) || h.activeIds;
1954
+ if (E.length === 0) return;
1955
+ E.forEach((w) => {
1956
+ const x = h.trackItemsMap[w], C = h.trackItemDetailsMap[w], P = Pe();
1936
1957
  p.push(P), h.trackItemsMap = {
1937
1958
  ...h.trackItemsMap,
1938
- [P]: { ...tt(x), id: P }
1959
+ [P]: { ...et(x), id: P }
1939
1960
  }, h.trackItemDetailsMap = {
1940
1961
  ...h.trackItemDetailsMap,
1941
1962
  [P]: {
1942
- ...tt(C)
1963
+ ...et(C)
1943
1964
  }
1944
1965
  }, h.trackItemIds.push(P);
1945
1966
  });
1946
- const D = [];
1947
- h.tracks.forEach((k) => {
1967
+ const A = [];
1968
+ h.tracks.forEach((w) => {
1948
1969
  const x = {
1949
- ...k,
1970
+ ...w,
1950
1971
  items: [],
1951
- id: Oe()
1972
+ id: xe()
1952
1973
  };
1953
- k.items.forEach((C) => {
1954
- if (T.includes(C)) {
1955
- const P = T.indexOf(C);
1974
+ w.items.forEach((C) => {
1975
+ if (E.includes(C)) {
1976
+ const P = E.indexOf(C);
1956
1977
  x.items.push(p[P]);
1957
1978
  }
1958
- }), D.push(x);
1959
- }), D.forEach((k) => {
1960
- k.items.length !== 0 && h.tracks.unshift(k);
1979
+ }), A.push(x);
1980
+ }), A.forEach((w) => {
1981
+ w.items.length !== 0 && h.tracks.unshift(w);
1961
1982
  }), t.updateState(
1962
1983
  {
1963
1984
  trackItemDetailsMap: h.trackItemDetailsMap,
@@ -1972,50 +1993,50 @@ function ha(t) {
1972
1993
  );
1973
1994
  }
1974
1995
  }), S = n.subscribe(async (f) => {
1975
- var h, T, D, k, x, C, P, A, O, z, ot, Ot, Wt, Xt, Bt, Kt, H, Vt, Jt;
1976
- const l = tt(t.getState());
1977
- let p = [], I = "text";
1978
- const b = (T = (h = f.value) == null ? void 0 : h.options) == null ? void 0 : T.trackId;
1979
- let g = (k = (D = f.value) == null ? void 0 : D.options) == null ? void 0 : k.trackIndex;
1996
+ var E, A, w, x, C, P, k, M, j, ut, Pt, Vt, Jt, Zt, qt, N, Qt, te, at, Ct, H;
1997
+ const l = et(t.getState()), p = ((A = (E = f.value) == null ? void 0 : E.options) == null ? void 0 : A.isSelected) || !1;
1998
+ let g = [], I = "text";
1999
+ const b = (x = (w = f.value) == null ? void 0 : w.options) == null ? void 0 : x.trackId;
2000
+ let y = (P = (C = f.value) == null ? void 0 : C.options) == null ? void 0 : P.trackIndex;
1980
2001
  if (f.key === us) {
1981
- const F = (x = f.value) == null ? void 0 : x.payload, G = F.trackItems.map(
2002
+ const U = (k = f.value) == null ? void 0 : k.payload, G = U.trackItems.map(
1982
2003
  (Y) => ua(Y, {
1983
2004
  size: l.size
1984
2005
  })
1985
- ), v = await Promise.all(G), ct = fa(F.tracks, F.trackItems), nt = [], U = {}, ft = {};
1986
- if (v.forEach((Y) => {
1987
- const { details: ht, ...Zt } = Y;
1988
- nt.push(Y.id), U[Y.id] = {
2006
+ ), O = await Promise.all(G), lt = fa(U.tracks, U.trackItems), rt = [], K = {}, ft = {};
2007
+ if (O.forEach((Y) => {
2008
+ const { details: gt, ...Rt } = Y;
2009
+ rt.push(Y.id), K[Y.id] = {
1989
2010
  type: Y.type,
1990
- details: ht
1991
- }, ft[Y.id] = Zt;
2011
+ details: gt
2012
+ }, ft[Y.id] = Rt;
1992
2013
  }), la(
1993
2014
  l.tracks,
1994
- ct
2015
+ lt
1995
2016
  ))
1996
2017
  l.tracks.forEach((Y) => {
1997
- ct.forEach((ht) => {
1998
- Y.id === ht.id && Y.items.push(...nt);
2018
+ lt.forEach((gt) => {
2019
+ Y.id === gt.id && Y.items.push(...rt);
1999
2020
  });
2000
2021
  });
2001
2022
  else {
2002
- const Y = ((P = (C = f.value) == null ? void 0 : C.options) == null ? void 0 : P.trackIndex) || 0, ht = In(
2023
+ const Y = ((j = (M = f.value) == null ? void 0 : M.options) == null ? void 0 : j.trackIndex) || 0, gt = In(
2003
2024
  Y,
2004
2025
  0,
2005
2026
  l.tracks.length
2006
2027
  );
2007
- l.tracks.splice(ht, 0, ...ct);
2028
+ l.tracks.splice(gt, 0, ...lt);
2008
2029
  }
2009
2030
  l.trackItemDetailsMap = {
2010
2031
  ...l.trackItemDetailsMap,
2011
- ...U
2032
+ ...K
2012
2033
  }, l.trackItemsMap = {
2013
2034
  ...l.trackItemsMap,
2014
2035
  ...ft
2015
2036
  }, l.trackItemIds = [
2016
2037
  ...l.trackItemIds,
2017
- ...nt
2018
- ], l.duration = jt(l.trackItemsMap), t.updateState(
2038
+ ...rt
2039
+ ], l.duration = Yt(l.trackItemsMap), t.updateState(
2019
2040
  {
2020
2041
  trackItemIds: l.trackItemIds,
2021
2042
  trackItemDetailsMap: l.trackItemDetailsMap,
@@ -2032,110 +2053,110 @@ function ha(t) {
2032
2053
  }
2033
2054
  if (f.key === Fi) {
2034
2055
  I = "caption";
2035
- const F = (A = f.value) == null ? void 0 : A.payload, G = [];
2036
- for (const nt of F) {
2037
- const U = ui(nt, {
2056
+ const U = (ut = f.value) == null ? void 0 : ut.payload, G = [];
2057
+ for (const rt of U) {
2058
+ const K = ui(rt, {
2038
2059
  size: l.size
2039
2060
  });
2040
- G.push(U);
2061
+ G.push(K);
2041
2062
  }
2042
- const v = await Promise.all(G), ct = [];
2043
- for (const nt of v) {
2044
- const U = nt.id;
2045
- ct.push(U);
2046
- const { details: ft, ...K } = nt;
2047
- l.trackItemDetailsMap[U] = {
2063
+ const O = await Promise.all(G), lt = [];
2064
+ for (const rt of O) {
2065
+ const K = rt.id;
2066
+ lt.push(K);
2067
+ const { details: ft, ...V } = rt;
2068
+ l.trackItemDetailsMap[K] = {
2048
2069
  type: I,
2049
2070
  details: ft
2050
- }, l.trackItemsMap[U] = K, l.trackItemIds.push(U);
2071
+ }, l.trackItemsMap[K] = V, l.trackItemIds.push(K);
2051
2072
  }
2052
- p = ct;
2073
+ g = lt;
2053
2074
  }
2054
2075
  if (f.key === $i) {
2055
2076
  I = "text";
2056
- const F = await li((O = f.value) == null ? void 0 : O.payload, {
2077
+ const U = await li((Pt = f.value) == null ? void 0 : Pt.payload, {
2057
2078
  size: l.size
2058
- }), { details: G, ...v } = F;
2059
- l.trackItemDetailsMap[v.id] = {
2079
+ }), { details: G, ...O } = U;
2080
+ l.trackItemDetailsMap[O.id] = {
2060
2081
  type: I,
2061
2082
  details: G
2062
- }, l.trackItemsMap[v.id] = v, l.trackItemIds.push(v.id), p = [v.id];
2083
+ }, l.trackItemsMap[O.id] = O, l.trackItemIds.push(O.id), g = [O.id];
2063
2084
  }
2064
2085
  if (f.key === Ni) {
2065
2086
  I = "template";
2066
- const F = (z = f.value) == null ? void 0 : z.payload.trackItemsMap, G = (ot = f.value) == null ? void 0 : ot.payload.trackItemDetailsMap, v = (Ot = f.value) == null ? void 0 : Ot.payload.transitionsMap, ct = ((Wt = f.value) == null ? void 0 : Wt.payload.transitionIds) || [], nt = (Xt = f.value) == null ? void 0 : Xt.payload.trackItemIds, U = ((Bt = f.value) == null ? void 0 : Bt.payload.tracks) || [], { details: ft, ...K } = await ca((Kt = f.value) == null ? void 0 : Kt.payload, {
2087
+ const U = (Vt = f.value) == null ? void 0 : Vt.payload.trackItemsMap, G = (Jt = f.value) == null ? void 0 : Jt.payload.trackItemDetailsMap, O = (Zt = f.value) == null ? void 0 : Zt.payload.transitionsMap, lt = ((qt = f.value) == null ? void 0 : qt.payload.transitionIds) || [], rt = (N = f.value) == null ? void 0 : N.payload.trackItemIds, K = ((Qt = f.value) == null ? void 0 : Qt.payload.tracks) || [], { details: ft, ...V } = await ca((te = f.value) == null ? void 0 : te.payload, {
2067
2088
  size: l.size
2068
2089
  }), Y = {
2069
- id: K.id,
2070
- items: nt,
2071
- transitions: ct,
2072
- tracks: U
2090
+ id: V.id,
2091
+ items: rt,
2092
+ transitions: lt,
2093
+ tracks: K
2073
2094
  };
2074
- l.trackItemDetailsMap[K.id] = {
2095
+ l.trackItemDetailsMap[V.id] = {
2075
2096
  type: I,
2076
2097
  details: ft
2077
- }, l.trackItemsMap[K.id] = K, l.trackItemIds.push(K.id), p = [K.id], l.trackItemsMap = {
2098
+ }, l.trackItemsMap[V.id] = V, l.trackItemIds.push(V.id), g = [V.id], l.trackItemsMap = {
2078
2099
  ...l.trackItemsMap,
2079
- ...F,
2080
- [K.id]: {
2100
+ ...U,
2101
+ [V.id]: {
2081
2102
  type: "template",
2082
- ...K
2103
+ ...V
2083
2104
  }
2084
2105
  }, l.trackItemDetailsMap = {
2085
2106
  ...l.trackItemDetailsMap,
2086
2107
  ...G,
2087
- [K.id]: {
2108
+ [V.id]: {
2088
2109
  type: "template",
2089
2110
  details: ft
2090
2111
  }
2091
2112
  }, l.transitionsMap = {
2092
2113
  ...l.transitionsMap,
2093
- ...v
2114
+ ...O
2094
2115
  }, l.structure = [...l.structure, Y];
2095
2116
  }
2096
2117
  if (f.key === Hi) {
2097
2118
  I = "image";
2098
- const F = await ci((H = f.value) == null ? void 0 : H.payload, {
2119
+ const U = await ci((at = f.value) == null ? void 0 : at.payload, {
2099
2120
  size: l.size
2100
- }), { details: G, ...v } = F;
2101
- l.trackItemDetailsMap[v.id] = {
2121
+ }), { details: G, ...O } = U;
2122
+ l.trackItemDetailsMap[O.id] = {
2102
2123
  type: I,
2103
2124
  details: G
2104
- }, l.trackItemsMap[v.id] = v, l.trackItemIds.push(v.id), p = [v.id];
2125
+ }, l.trackItemsMap[O.id] = O, l.trackItemIds.push(O.id), g = [O.id];
2105
2126
  }
2106
- if (f.key === ji) {
2127
+ if (f.key === zi) {
2107
2128
  I = "audio";
2108
- const F = await oi((Vt = f.value) == null ? void 0 : Vt.payload), { details: G, ...v } = F;
2109
- l.trackItemDetailsMap[v.id] = {
2129
+ const U = await oi((Ct = f.value) == null ? void 0 : Ct.payload), { details: G, ...O } = U;
2130
+ l.trackItemDetailsMap[O.id] = {
2110
2131
  type: I,
2111
2132
  details: G
2112
- }, l.trackItemsMap[v.id] = v, l.trackItemIds.push(v.id), p = [v.id];
2133
+ }, l.trackItemsMap[O.id] = O, l.trackItemIds.push(O.id), g = [O.id];
2113
2134
  }
2114
- if (f.key === zi) {
2135
+ if (f.key === ji) {
2115
2136
  I = "video";
2116
- const F = await si((Jt = f.value) == null ? void 0 : Jt.payload, {
2137
+ const U = await si((H = f.value) == null ? void 0 : H.payload, {
2117
2138
  size: l.size
2118
- }), { details: G, ...v } = F;
2119
- l.trackItemDetailsMap[v.id] = {
2139
+ }), { details: G, ...O } = U;
2140
+ l.trackItemDetailsMap[O.id] = {
2120
2141
  type: I,
2121
2142
  details: G
2122
- }, l.trackItemsMap[v.id] = v, l.trackItemIds.push(v.id), p = [v.id];
2143
+ }, l.trackItemsMap[O.id] = O, l.trackItemIds.push(O.id), g = [O.id];
2123
2144
  }
2124
- const m = pa(
2125
- p,
2145
+ const h = pa(
2146
+ g,
2126
2147
  l.tracks,
2127
2148
  l.trackItemsMap,
2128
2149
  b,
2129
- g
2150
+ y
2130
2151
  );
2131
- if (m.trackId) {
2132
- const F = l.tracks.find(
2133
- (G) => G.id === m.trackId
2152
+ if (h.trackId) {
2153
+ const U = l.tracks.find(
2154
+ (G) => G.id === h.trackId
2134
2155
  );
2135
- F && F.items.push(...p);
2136
- } else if (m.trackIndex !== void 0) {
2137
- const F = {
2138
- id: Oe(),
2156
+ U && U.items.push(...g);
2157
+ } else if (h.trackIndex !== void 0) {
2158
+ const U = {
2159
+ id: xe(),
2139
2160
  accepts: [
2140
2161
  "text",
2141
2162
  "audio",
@@ -2146,14 +2167,14 @@ function ha(t) {
2146
2167
  "template"
2147
2168
  ],
2148
2169
  type: I,
2149
- items: p,
2170
+ items: g,
2150
2171
  magnetic: !1,
2151
2172
  static: !1
2152
2173
  };
2153
- l.tracks.splice(m.trackIndex, 0, F);
2174
+ l.tracks.splice(h.trackIndex, 0, U);
2154
2175
  } else
2155
2176
  l.tracks.unshift({
2156
- id: Oe(),
2177
+ id: xe(),
2157
2178
  accepts: [
2158
2179
  "text",
2159
2180
  "audio",
@@ -2164,12 +2185,13 @@ function ha(t) {
2164
2185
  "template"
2165
2186
  ],
2166
2187
  type: I,
2167
- items: p,
2188
+ items: g,
2168
2189
  magnetic: !1,
2169
2190
  static: !1
2170
2191
  });
2171
- l.duration = jt(l.trackItemsMap), t.updateState(
2192
+ p && (l.activeIds = g), l.duration = Yt(l.trackItemsMap), t.updateState(
2172
2193
  {
2194
+ activeIds: l.activeIds,
2173
2195
  trackItemIds: l.trackItemIds,
2174
2196
  trackItemDetailsMap: l.trackItemDetailsMap,
2175
2197
  trackItemsMap: l.trackItemsMap,
@@ -2183,28 +2205,28 @@ function ha(t) {
2183
2205
  kind: "add"
2184
2206
  }
2185
2207
  );
2186
- }), N = c.subscribe(async (f) => {
2208
+ }), F = c.subscribe(async (f) => {
2187
2209
  var l;
2188
2210
  if (f.key === Ui) {
2189
- const p = tt(t.getState()), I = (l = f.value) == null ? void 0 : l.options.time;
2211
+ const p = et(t.getState()), g = (l = f.value) == null ? void 0 : l.options.time;
2190
2212
  if (p.activeIds.length === 1) {
2191
- const b = p.activeIds[0], g = p.trackItemsMap[b];
2192
- if (I >= g.display.to || I <= g.display.from)
2213
+ const I = p.activeIds[0], b = p.trackItemsMap[I];
2214
+ if (g >= b.display.to || g <= b.display.from)
2193
2215
  return;
2194
- const m = p.trackItemDetailsMap[b], h = xe(), T = {
2195
- ...g,
2216
+ const y = p.trackItemDetailsMap[I], h = Pe(), E = {
2217
+ ...b,
2196
2218
  id: h,
2197
2219
  display: {
2198
- from: I,
2199
- to: g.display.to
2220
+ from: g,
2221
+ to: b.display.to
2200
2222
  },
2201
2223
  trim: {
2202
- from: I,
2203
- to: g.display.to
2224
+ from: g,
2225
+ to: b.display.to
2204
2226
  }
2205
2227
  };
2206
- p.trackItemsMap[b].display.to = I, p.trackItemsMap[h] = T, p.trackItemIds.push(h), p.trackItemDetailsMap[h] = m, p.tracks.forEach((D) => {
2207
- D.items.includes(b) && D.items.push(h);
2228
+ p.trackItemsMap[I].display.to = g, p.trackItemsMap[h] = E, p.trackItemIds.push(h), p.trackItemDetailsMap[h] = y, p.tracks.forEach((A) => {
2229
+ A.items.includes(I) && A.items.push(h);
2208
2230
  }), t.updateState(
2209
2231
  {
2210
2232
  trackItemDetailsMap: p.trackItemDetailsMap,
@@ -2221,27 +2243,27 @@ function ha(t) {
2221
2243
  return;
2222
2244
  }
2223
2245
  if (f.key === Gi) {
2224
- const p = tt(t.getState());
2246
+ const p = et(t.getState());
2225
2247
  if (p.activeIds.length) {
2226
- const I = p.activeIds, b = [], g = {
2227
- activeIds: I,
2248
+ const g = p.activeIds, I = [], b = {
2249
+ activeIds: g,
2228
2250
  trackItemDetailsMap: {},
2229
2251
  trackItemsMap: {},
2230
2252
  tracks: []
2231
2253
  };
2232
- I.forEach((h) => {
2233
- g.trackItemDetailsMap[h] = p.trackItemDetailsMap[h], g.trackItemsMap[h] = p.trackItemsMap[h], b.push(
2234
- p.tracks.find((T) => T.items.includes(h))
2254
+ g.forEach((h) => {
2255
+ b.trackItemDetailsMap[h] = p.trackItemDetailsMap[h], b.trackItemsMap[h] = p.trackItemsMap[h], I.push(
2256
+ p.tracks.find((E) => E.items.includes(h))
2235
2257
  );
2236
2258
  });
2237
- const m = /* @__PURE__ */ new Set();
2238
- b.filter((h) => m.has(h.id) ? !1 : (m.add(h), !0)), g.tracks = Array.from(m.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(g));
2259
+ const y = /* @__PURE__ */ new Set();
2260
+ I.filter((h) => y.has(h.id) ? !1 : (y.add(h), !0)), b.tracks = Array.from(y.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(b));
2239
2261
  }
2240
2262
  }
2241
2263
  if (f.key === Yi) {
2242
2264
  const p = localStorage.getItem("DesignComboTemp");
2243
2265
  if (!p) return;
2244
- const I = tt(t.getState()), b = JSON.parse(p), g = {}, m = b.trackItemsMap, h = b.trackItemDetailsMap, T = b.tracks, D = [], k = b.activeIds.map(async (x) => {
2266
+ const g = et(t.getState()), I = JSON.parse(p), b = {}, y = I.trackItemsMap, h = I.trackItemDetailsMap, E = I.tracks, A = [], w = I.activeIds.map(async (x) => {
2245
2267
  const C = h[x];
2246
2268
  (C.type === "caption" || C.type === "text") && C.details.fontUrl && await dr([
2247
2269
  {
@@ -2249,25 +2271,25 @@ function ha(t) {
2249
2271
  url: C.details.fontUrl
2250
2272
  }
2251
2273
  ]);
2252
- const P = xe();
2253
- return g[x] = P, I.trackItemsMap[P] = {
2254
- ...m[x],
2274
+ const P = Pe();
2275
+ return b[x] = P, g.trackItemsMap[P] = {
2276
+ ...y[x],
2255
2277
  id: P
2256
- }, I.trackItemDetailsMap[P] = C, I.trackItemIds.push(P), !0;
2278
+ }, g.trackItemDetailsMap[P] = C, g.trackItemIds.push(P), !0;
2257
2279
  });
2258
- await Promise.all(k), T.forEach((x) => {
2259
- const C = x.items.map((A) => g[A]), P = {
2280
+ await Promise.all(w), E.forEach((x) => {
2281
+ const C = x.items.map((k) => b[k]), P = {
2260
2282
  ...x,
2261
2283
  items: C,
2262
- id: Oe()
2284
+ id: xe()
2263
2285
  };
2264
- D.push(P);
2265
- }), I.tracks = [...I.tracks, ...D], t.updateState(
2286
+ A.push(P);
2287
+ }), g.tracks = [...g.tracks, ...A], t.updateState(
2266
2288
  {
2267
- trackItemDetailsMap: I.trackItemDetailsMap,
2268
- tracks: I.tracks,
2269
- trackItemIds: I.trackItemIds,
2270
- trackItemsMap: I.trackItemsMap
2289
+ trackItemDetailsMap: g.trackItemDetailsMap,
2290
+ tracks: g.tracks,
2291
+ trackItemIds: g.trackItemIds,
2292
+ trackItemsMap: g.trackItemsMap
2271
2293
  },
2272
2294
  {
2273
2295
  updateHistory: !0,
@@ -2276,24 +2298,24 @@ function ha(t) {
2276
2298
  );
2277
2299
  }
2278
2300
  }), _ = d.subscribe(async (f) => {
2279
- var l, p, I;
2301
+ var l, p, g;
2280
2302
  if (f.key === Wi) {
2281
- const b = tt(t.getState()), g = b.trackItemDetailsMap, m = b.trackItemsMap, h = Object.keys((l = f.value) == null ? void 0 : l.payload);
2303
+ const I = et(t.getState()), b = I.trackItemDetailsMap, y = I.trackItemsMap, h = Object.keys((l = f.value) == null ? void 0 : l.payload);
2282
2304
  if (!h.length) return;
2283
- const T = (p = f.value) == null ? void 0 : p.payload;
2284
- h.forEach((k) => {
2285
- const x = T[k];
2286
- x.details ? g[k].details = {
2287
- ...g[k].details,
2305
+ const E = (p = f.value) == null ? void 0 : p.payload;
2306
+ h.forEach((w) => {
2307
+ const x = E[w];
2308
+ x.details ? b[w].details = {
2309
+ ...b[w].details,
2288
2310
  ...x.details
2289
- } : T[k].playbackRate && (m[k].playbackRate = T[k].playbackRate);
2311
+ } : E[w].playbackRate && (y[w].playbackRate = E[w].playbackRate);
2290
2312
  });
2291
- const D = jt(m);
2313
+ const A = Yt(y);
2292
2314
  t.updateState(
2293
2315
  {
2294
- trackItemDetailsMap: { ...g },
2295
- trackItemsMap: { ...m },
2296
- duration: D
2316
+ trackItemDetailsMap: { ...b },
2317
+ trackItemsMap: { ...y },
2318
+ duration: A
2297
2319
  },
2298
2320
  {
2299
2321
  updateHistory: !0,
@@ -2302,27 +2324,27 @@ function ha(t) {
2302
2324
  );
2303
2325
  }
2304
2326
  if (f.key === Xi) {
2305
- const b = (I = f.value) == null ? void 0 : I.payload, g = Object.keys(b)[0], m = Object.values(b)[0], h = tt(t.getState()), T = h.trackItemDetailsMap[g];
2306
- if (m.details) {
2307
- if (m.type === "image" && m.details.src) {
2308
- const x = await ri(m.details.src), C = T.details.width || 0, P = T.details.height || 0;
2309
- let A = x.width, O = x.height;
2310
- const z = x.width / x.height;
2311
- C / P > z ? (A = C, O = C / z) : (O = P, A = P * z), m.details.mediaWidth = A, m.details.mediaHeight = O;
2327
+ const I = (g = f.value) == null ? void 0 : g.payload, b = Object.keys(I)[0], y = Object.values(I)[0], h = et(t.getState()), E = h.trackItemDetailsMap[b];
2328
+ if (y.details) {
2329
+ if (y.type === "image" && y.details.src) {
2330
+ const x = await ri(y.details.src), C = E.details.width || 0, P = E.details.height || 0;
2331
+ let k = x.width, M = x.height;
2332
+ const j = x.width / x.height;
2333
+ C / P > j ? (k = C, M = C / j) : (M = P, k = P * j), y.details.mediaWidth = k, y.details.mediaHeight = M;
2312
2334
  }
2313
- if (m.type === "video" && m.details.src) {
2314
- const x = await ni(m.details.src), C = T.details.width || 0, P = T.details.height || 0;
2315
- let A = x.width, O = x.height;
2316
- const z = x.width / x.height;
2317
- C / P > z ? (A = C, O = C / z) : (O = P, A = P * z), m.details.mediaWidth = A, m.details.mediaHeight = O;
2335
+ if (y.type === "video" && y.details.src) {
2336
+ const x = await ni(y.details.src), C = E.details.width || 0, P = E.details.height || 0;
2337
+ let k = x.width, M = x.height;
2338
+ const j = x.width / x.height;
2339
+ C / P > j ? (k = C, M = C / j) : (M = P, k = P * j), y.details.mediaWidth = k, y.details.mediaHeight = M;
2318
2340
  }
2319
- const k = T.details;
2320
- T.details = { ...k, ...m.details }, m.details = T.details;
2341
+ const w = E.details;
2342
+ E.details = { ...w, ...y.details }, y.details = E.details;
2321
2343
  }
2322
- const D = { ...T, ...m };
2323
- h.trackItemDetailsMap[g] = D, h.trackItemsMap[g] = {
2324
- ...h.trackItemsMap[g],
2325
- type: m.type
2344
+ const A = { ...E, ...y };
2345
+ h.trackItemDetailsMap[b] = A, h.trackItemsMap[b] = {
2346
+ ...h.trackItemsMap[b],
2347
+ type: y.type
2326
2348
  }, t.updateState(
2327
2349
  {
2328
2350
  trackItemDetailsMap: {
@@ -2341,32 +2363,32 @@ function ha(t) {
2341
2363
  });
2342
2364
  return {
2343
2365
  unsubscribe: () => {
2344
- S.unsubscribe(), N.unsubscribe(), _.unsubscribe(), w.unsubscribe(), R.unsubscribe(), y.unsubscribe();
2366
+ S.unsubscribe(), F.unsubscribe(), _.unsubscribe(), T.unsubscribe(), R.unsubscribe(), m.unsubscribe();
2345
2367
  }
2346
2368
  };
2347
2369
  }
2348
2370
  const ma = { Date: !0, RegExp: !0, String: !0, Number: !0 };
2349
2371
  function di(t, r, n = { cyclesFix: !0 }, i = []) {
2350
- var y, w;
2372
+ var m, T;
2351
2373
  let s = [];
2352
2374
  const c = Array.isArray(t);
2353
2375
  for (const R in t) {
2354
- const S = t[R], N = c ? +R : R;
2376
+ const S = t[R], F = c ? +R : R;
2355
2377
  if (!(R in r)) {
2356
2378
  s.push({
2357
2379
  type: "REMOVE",
2358
- path: [N],
2380
+ path: [F],
2359
2381
  oldValue: t[R]
2360
2382
  });
2361
2383
  continue;
2362
2384
  }
2363
2385
  const _ = r[R], f = typeof S == "object" && typeof _ == "object" && Array.isArray(S) === Array.isArray(_);
2364
- if (S && _ && f && !ma[(w = (y = Object.getPrototypeOf(S)) == null ? void 0 : y.constructor) == null ? void 0 : w.name] && (!n.cyclesFix || !i.includes(S))) {
2386
+ if (S && _ && f && !ma[(T = (m = Object.getPrototypeOf(S)) == null ? void 0 : m.constructor) == null ? void 0 : T.name] && (!n.cyclesFix || !i.includes(S))) {
2365
2387
  const l = di(S, _, n, n.cyclesFix ? i.concat([S]) : []);
2366
- s.push.apply(s, l.map((p) => (p.path.unshift(N), p)));
2388
+ s.push.apply(s, l.map((p) => (p.path.unshift(F), p)));
2367
2389
  } else S !== _ && // treat NaN values as equivalent
2368
2390
  !(Number.isNaN(S) && Number.isNaN(_)) && !(f && (isNaN(S) ? S + "" == _ + "" : +S == +_)) && s.push({
2369
- path: [N],
2391
+ path: [F],
2370
2392
  type: "CHANGE",
2371
2393
  value: _,
2372
2394
  oldValue: S
@@ -2381,7 +2403,7 @@ function di(t, r, n = { cyclesFix: !0 }, i = []) {
2381
2403
  });
2382
2404
  return s;
2383
2405
  }
2384
- var kn = Symbol.for("immer-nothing"), Pe = Symbol.for("immer-draftable"), ut = Symbol.for("immer-state"), pi = process.env.NODE_ENV !== "production" ? [
2406
+ var kn = Symbol.for("immer-nothing"), Ce = Symbol.for("immer-draftable"), dt = Symbol.for("immer-state"), pi = process.env.NODE_ENV !== "production" ? [
2385
2407
  // All error codes, starting by 0:
2386
2408
  function(t) {
2387
2409
  return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
@@ -2421,57 +2443,57 @@ function B(t, ...r) {
2421
2443
  `[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
2422
2444
  );
2423
2445
  }
2424
- var zt = Object.getPrototypeOf;
2425
- function Ut(t) {
2426
- return !!t && !!t[ut];
2446
+ var Wt = Object.getPrototypeOf;
2447
+ function Xt(t) {
2448
+ return !!t && !!t[dt];
2427
2449
  }
2428
- function Mt(t) {
2450
+ function xt(t) {
2429
2451
  var r;
2430
- return t ? hi(t) || Array.isArray(t) || !!t[Pe] || !!((r = t.constructor) != null && r[Pe]) || He(t) || je(t) : !1;
2452
+ return t ? hi(t) || Array.isArray(t) || !!t[Ce] || !!((r = t.constructor) != null && r[Ce]) || ze(t) || je(t) : !1;
2431
2453
  }
2432
2454
  var ya = Object.prototype.constructor.toString();
2433
2455
  function hi(t) {
2434
2456
  if (!t || typeof t != "object")
2435
2457
  return !1;
2436
- const r = zt(t);
2458
+ const r = Wt(t);
2437
2459
  if (r === null)
2438
2460
  return !0;
2439
2461
  const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
2440
2462
  return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === ya;
2441
2463
  }
2442
- function Ce(t, r) {
2443
- Gt(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
2464
+ function Re(t, r) {
2465
+ Bt(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
2444
2466
  r(n, t[n], t);
2445
2467
  }) : t.forEach((n, i) => r(i, n, t));
2446
2468
  }
2447
- function Gt(t) {
2448
- const r = t[ut];
2449
- return r ? r.type_ : Array.isArray(t) ? 1 : He(t) ? 2 : je(t) ? 3 : 0;
2469
+ function Bt(t) {
2470
+ const r = t[dt];
2471
+ return r ? r.type_ : Array.isArray(t) ? 1 : ze(t) ? 2 : je(t) ? 3 : 0;
2450
2472
  }
2451
- function Re(t, r) {
2452
- return Gt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
2473
+ function Le(t, r) {
2474
+ return Bt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
2453
2475
  }
2454
2476
  function un(t, r) {
2455
- return Gt(t) === 2 ? t.get(r) : t[r];
2477
+ return Bt(t) === 2 ? t.get(r) : t[r];
2456
2478
  }
2457
2479
  function mi(t, r, n) {
2458
- const i = Gt(t);
2480
+ const i = Bt(t);
2459
2481
  i === 2 ? t.set(r, n) : i === 3 ? t.add(n) : t[r] = n;
2460
2482
  }
2461
2483
  function _a(t, r) {
2462
2484
  return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
2463
2485
  }
2464
- function He(t) {
2486
+ function ze(t) {
2465
2487
  return t instanceof Map;
2466
2488
  }
2467
2489
  function je(t) {
2468
2490
  return t instanceof Set;
2469
2491
  }
2470
- function Ht(t) {
2492
+ function Gt(t) {
2471
2493
  return t.copy_ || t.base_;
2472
2494
  }
2473
2495
  function gn(t, r) {
2474
- if (He(t))
2496
+ if (ze(t))
2475
2497
  return new Map(t);
2476
2498
  if (je(t))
2477
2499
  return new Set(t);
@@ -2480,21 +2502,21 @@ function gn(t, r) {
2480
2502
  const n = hi(t);
2481
2503
  if (r === !0 || r === "class_only" && !n) {
2482
2504
  const i = Object.getOwnPropertyDescriptors(t);
2483
- delete i[ut];
2505
+ delete i[dt];
2484
2506
  let s = Reflect.ownKeys(i);
2485
2507
  for (let c = 0; c < s.length; c++) {
2486
- const d = s[c], y = i[d];
2487
- y.writable === !1 && (y.writable = !0, y.configurable = !0), (y.get || y.set) && (i[d] = {
2508
+ const d = s[c], m = i[d];
2509
+ m.writable === !1 && (m.writable = !0, m.configurable = !0), (m.get || m.set) && (i[d] = {
2488
2510
  configurable: !0,
2489
2511
  writable: !0,
2490
2512
  // could live with !!desc.set as well here...
2491
- enumerable: y.enumerable,
2513
+ enumerable: m.enumerable,
2492
2514
  value: t[d]
2493
2515
  });
2494
2516
  }
2495
- return Object.create(zt(t), i);
2517
+ return Object.create(Wt(t), i);
2496
2518
  } else {
2497
- const i = zt(t);
2519
+ const i = Wt(t);
2498
2520
  if (i !== null && n)
2499
2521
  return { ...t };
2500
2522
  const s = Object.create(i);
@@ -2502,7 +2524,7 @@ function gn(t, r) {
2502
2524
  }
2503
2525
  }
2504
2526
  function An(t, r = !1) {
2505
- return Ir(t) || Ut(t) || !Mt(t) || (Gt(t) > 1 && (t.set = t.add = t.clear = t.delete = Ia), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => An(i, !0))), t;
2527
+ return Ir(t) || Xt(t) || !xt(t) || (Bt(t) > 1 && (t.set = t.add = t.clear = t.delete = Ia), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => An(i, !0))), t;
2506
2528
  }
2507
2529
  function Ia() {
2508
2530
  B(2);
@@ -2511,16 +2533,16 @@ function Ir(t) {
2511
2533
  return Object.isFrozen(t);
2512
2534
  }
2513
2535
  var bn = {};
2514
- function Yt(t) {
2536
+ function Kt(t) {
2515
2537
  const r = bn[t];
2516
2538
  return r || B(0, t), r;
2517
2539
  }
2518
2540
  function ga(t, r) {
2519
2541
  bn[t] || (bn[t] = r);
2520
2542
  }
2521
- var Le;
2543
+ var Fe;
2522
2544
  function yi() {
2523
- return Le;
2545
+ return Fe;
2524
2546
  }
2525
2547
  function ba(t, r) {
2526
2548
  return {
@@ -2534,26 +2556,26 @@ function ba(t, r) {
2534
2556
  };
2535
2557
  }
2536
2558
  function Hn(t, r) {
2537
- r && (Yt("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
2559
+ r && (Kt("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
2538
2560
  }
2539
2561
  function vn(t) {
2540
- En(t), t.drafts_.forEach(va), t.drafts_ = null;
2562
+ Sn(t), t.drafts_.forEach(va), t.drafts_ = null;
2541
2563
  }
2542
- function En(t) {
2543
- t === Le && (Le = t.parent_);
2564
+ function Sn(t) {
2565
+ t === Fe && (Fe = t.parent_);
2544
2566
  }
2545
- function jn(t) {
2546
- return Le = ba(Le, t);
2567
+ function zn(t) {
2568
+ return Fe = ba(Fe, t);
2547
2569
  }
2548
2570
  function va(t) {
2549
- const r = t[ut];
2571
+ const r = t[dt];
2550
2572
  r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
2551
2573
  }
2552
- function zn(t, r) {
2574
+ function jn(t, r) {
2553
2575
  r.unfinalizedDrafts_ = r.drafts_.length;
2554
2576
  const n = r.drafts_[0];
2555
- return t !== void 0 && t !== n ? (n[ut].modified_ && (vn(r), B(4)), Mt(t) && (t = pr(r, t), r.parent_ || hr(r, t)), r.patches_ && Yt("Patches").generateReplacementPatches_(
2556
- n[ut].base_,
2577
+ return t !== void 0 && t !== n ? (n[dt].modified_ && (vn(r), B(4)), xt(t) && (t = pr(r, t), r.parent_ || hr(r, t)), r.patches_ && Kt("Patches").generateReplacementPatches_(
2578
+ n[dt].base_,
2557
2579
  t,
2558
2580
  r.patches_,
2559
2581
  r.inversePatches_
@@ -2562,9 +2584,9 @@ function zn(t, r) {
2562
2584
  function pr(t, r, n) {
2563
2585
  if (Ir(r))
2564
2586
  return r;
2565
- const i = r[ut];
2587
+ const i = r[dt];
2566
2588
  if (!i)
2567
- return Ce(
2589
+ return Re(
2568
2590
  r,
2569
2591
  (s, c) => Un(t, i, r, s, c, n)
2570
2592
  ), r;
@@ -2576,10 +2598,10 @@ function pr(t, r, n) {
2576
2598
  i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
2577
2599
  const s = i.copy_;
2578
2600
  let c = s, d = !1;
2579
- i.type_ === 3 && (c = new Set(s), s.clear(), d = !0), Ce(
2601
+ i.type_ === 3 && (c = new Set(s), s.clear(), d = !0), Re(
2580
2602
  c,
2581
- (y, w) => Un(t, i, s, y, w, n, d)
2582
- ), hr(t, s, !1), n && t.patches_ && Yt("Patches").generatePatches_(
2603
+ (m, T) => Un(t, i, s, m, T, n, d)
2604
+ ), hr(t, s, !1), n && t.patches_ && Kt("Patches").generatePatches_(
2583
2605
  i,
2584
2606
  n,
2585
2607
  t.patches_,
@@ -2589,15 +2611,15 @@ function pr(t, r, n) {
2589
2611
  return i.copy_;
2590
2612
  }
2591
2613
  function Un(t, r, n, i, s, c, d) {
2592
- if (process.env.NODE_ENV !== "production" && s === n && B(5), Ut(s)) {
2593
- const y = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
2594
- !Re(r.assigned_, i) ? c.concat(i) : void 0, w = pr(t, s, y);
2595
- if (mi(n, i, w), Ut(w))
2614
+ if (process.env.NODE_ENV !== "production" && s === n && B(5), Xt(s)) {
2615
+ const m = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
2616
+ !Le(r.assigned_, i) ? c.concat(i) : void 0, T = pr(t, s, m);
2617
+ if (mi(n, i, T), Xt(T))
2596
2618
  t.canAutoFreeze_ = !1;
2597
2619
  else
2598
2620
  return;
2599
2621
  } else d && n.add(s);
2600
- if (Mt(s) && !Ir(s)) {
2622
+ if (xt(s) && !Ir(s)) {
2601
2623
  if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
2602
2624
  return;
2603
2625
  pr(t, s), (!r || !r.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(n, i) && hr(t, s);
@@ -2606,7 +2628,7 @@ function Un(t, r, n, i, s, c, d) {
2606
2628
  function hr(t, r, n = !1) {
2607
2629
  !t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && An(r, n);
2608
2630
  }
2609
- function Ea(t, r) {
2631
+ function Sa(t, r) {
2610
2632
  const n = Array.isArray(t), i = {
2611
2633
  type_: n ? 1 : 0,
2612
2634
  // Track which produce call this is associated with.
@@ -2631,49 +2653,49 @@ function Ea(t, r) {
2631
2653
  isManual_: !1
2632
2654
  };
2633
2655
  let s = i, c = Dn;
2634
- n && (s = [i], c = Fe);
2635
- const { revoke: d, proxy: y } = Proxy.revocable(s, c);
2636
- return i.draft_ = y, i.revoke_ = d, y;
2656
+ n && (s = [i], c = $e);
2657
+ const { revoke: d, proxy: m } = Proxy.revocable(s, c);
2658
+ return i.draft_ = m, i.revoke_ = d, m;
2637
2659
  }
2638
2660
  var Dn = {
2639
2661
  get(t, r) {
2640
- if (r === ut)
2662
+ if (r === dt)
2641
2663
  return t;
2642
- const n = Ht(t);
2643
- if (!Re(n, r))
2644
- return Sa(t, n, r);
2664
+ const n = Gt(t);
2665
+ if (!Le(n, r))
2666
+ return Ea(t, n, r);
2645
2667
  const i = n[r];
2646
- return t.finalized_ || !Mt(i) ? i : i === ln(t.base_, r) ? (fn(t), t.copy_[r] = Tn(i, t)) : i;
2668
+ return t.finalized_ || !xt(i) ? i : i === ln(t.base_, r) ? (fn(t), t.copy_[r] = Tn(i, t)) : i;
2647
2669
  },
2648
2670
  has(t, r) {
2649
- return r in Ht(t);
2671
+ return r in Gt(t);
2650
2672
  },
2651
2673
  ownKeys(t) {
2652
- return Reflect.ownKeys(Ht(t));
2674
+ return Reflect.ownKeys(Gt(t));
2653
2675
  },
2654
2676
  set(t, r, n) {
2655
- const i = _i(Ht(t), r);
2677
+ const i = _i(Gt(t), r);
2656
2678
  if (i != null && i.set)
2657
2679
  return i.set.call(t.draft_, n), !0;
2658
2680
  if (!t.modified_) {
2659
- const s = ln(Ht(t), r), c = s == null ? void 0 : s[ut];
2681
+ const s = ln(Gt(t), r), c = s == null ? void 0 : s[dt];
2660
2682
  if (c && c.base_ === n)
2661
2683
  return t.copy_[r] = n, t.assigned_[r] = !1, !0;
2662
- if (_a(n, s) && (n !== void 0 || Re(t.base_, r)))
2684
+ if (_a(n, s) && (n !== void 0 || Le(t.base_, r)))
2663
2685
  return !0;
2664
- fn(t), Sn(t);
2686
+ fn(t), En(t);
2665
2687
  }
2666
2688
  return t.copy_[r] === n && // special case: handle new props with value 'undefined'
2667
2689
  (n !== void 0 || r in t.copy_) || // special case: NaN
2668
2690
  Number.isNaN(n) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = n, t.assigned_[r] = !0), !0;
2669
2691
  },
2670
2692
  deleteProperty(t, r) {
2671
- return ln(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, fn(t), Sn(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
2693
+ return ln(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, fn(t), En(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
2672
2694
  },
2673
2695
  // Note: We never coerce `desc.value` into an Immer draft, because we can't make
2674
2696
  // the same guarantee in ES5 mode.
2675
2697
  getOwnPropertyDescriptor(t, r) {
2676
- const n = Ht(t), i = Reflect.getOwnPropertyDescriptor(n, r);
2698
+ const n = Gt(t), i = Reflect.getOwnPropertyDescriptor(n, r);
2677
2699
  return i && {
2678
2700
  writable: !0,
2679
2701
  configurable: t.type_ !== 1 || r !== "length",
@@ -2685,28 +2707,28 @@ var Dn = {
2685
2707
  B(11);
2686
2708
  },
2687
2709
  getPrototypeOf(t) {
2688
- return zt(t.base_);
2710
+ return Wt(t.base_);
2689
2711
  },
2690
2712
  setPrototypeOf() {
2691
2713
  B(12);
2692
2714
  }
2693
- }, Fe = {};
2694
- Ce(Dn, (t, r) => {
2695
- Fe[t] = function() {
2715
+ }, $e = {};
2716
+ Re(Dn, (t, r) => {
2717
+ $e[t] = function() {
2696
2718
  return arguments[0] = arguments[0][0], r.apply(this, arguments);
2697
2719
  };
2698
2720
  });
2699
- Fe.deleteProperty = function(t, r) {
2700
- return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && B(13), Fe.set.call(this, t, r, void 0);
2721
+ $e.deleteProperty = function(t, r) {
2722
+ return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && B(13), $e.set.call(this, t, r, void 0);
2701
2723
  };
2702
- Fe.set = function(t, r, n) {
2724
+ $e.set = function(t, r, n) {
2703
2725
  return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && B(14), Dn.set.call(this, t[0], r, n, t[0]);
2704
2726
  };
2705
2727
  function ln(t, r) {
2706
- const n = t[ut];
2707
- return (n ? Ht(n) : t)[r];
2728
+ const n = t[dt];
2729
+ return (n ? Gt(n) : t)[r];
2708
2730
  }
2709
- function Sa(t, r, n) {
2731
+ function Ea(t, r, n) {
2710
2732
  var s;
2711
2733
  const i = _i(r, n);
2712
2734
  return i ? "value" in i ? i.value : (
@@ -2718,16 +2740,16 @@ function Sa(t, r, n) {
2718
2740
  function _i(t, r) {
2719
2741
  if (!(r in t))
2720
2742
  return;
2721
- let n = zt(t);
2743
+ let n = Wt(t);
2722
2744
  for (; n; ) {
2723
2745
  const i = Object.getOwnPropertyDescriptor(n, r);
2724
2746
  if (i)
2725
2747
  return i;
2726
- n = zt(n);
2748
+ n = Wt(n);
2727
2749
  }
2728
2750
  }
2729
- function Sn(t) {
2730
- t.modified_ || (t.modified_ = !0, t.parent_ && Sn(t.parent_));
2751
+ function En(t) {
2752
+ t.modified_ || (t.modified_ = !0, t.parent_ && En(t.parent_));
2731
2753
  }
2732
2754
  function fn(t) {
2733
2755
  t.copy_ || (t.copy_ = gn(
@@ -2742,48 +2764,48 @@ var Ta = class {
2742
2764
  const c = n;
2743
2765
  n = r;
2744
2766
  const d = this;
2745
- return function(w = c, ...R) {
2746
- return d.produce(w, (S) => n.call(this, S, ...R));
2767
+ return function(T = c, ...R) {
2768
+ return d.produce(T, (S) => n.call(this, S, ...R));
2747
2769
  };
2748
2770
  }
2749
2771
  typeof n != "function" && B(6), i !== void 0 && typeof i != "function" && B(7);
2750
2772
  let s;
2751
- if (Mt(r)) {
2752
- const c = jn(this), d = Tn(r, void 0);
2753
- let y = !0;
2773
+ if (xt(r)) {
2774
+ const c = zn(this), d = Tn(r, void 0);
2775
+ let m = !0;
2754
2776
  try {
2755
- s = n(d), y = !1;
2777
+ s = n(d), m = !1;
2756
2778
  } finally {
2757
- y ? vn(c) : En(c);
2779
+ m ? vn(c) : Sn(c);
2758
2780
  }
2759
- return Hn(c, i), zn(s, c);
2781
+ return Hn(c, i), jn(s, c);
2760
2782
  } else if (!r || typeof r != "object") {
2761
2783
  if (s = n(r), s === void 0 && (s = r), s === kn && (s = void 0), this.autoFreeze_ && An(s, !0), i) {
2762
2784
  const c = [], d = [];
2763
- Yt("Patches").generateReplacementPatches_(r, s, c, d), i(c, d);
2785
+ Kt("Patches").generateReplacementPatches_(r, s, c, d), i(c, d);
2764
2786
  }
2765
2787
  return s;
2766
2788
  } else
2767
2789
  B(1, r);
2768
2790
  }, this.produceWithPatches = (r, n) => {
2769
2791
  if (typeof r == "function")
2770
- return (d, ...y) => this.produceWithPatches(d, (w) => r(w, ...y));
2792
+ return (d, ...m) => this.produceWithPatches(d, (T) => r(T, ...m));
2771
2793
  let i, s;
2772
- return [this.produce(r, n, (d, y) => {
2773
- i = d, s = y;
2794
+ return [this.produce(r, n, (d, m) => {
2795
+ i = d, s = m;
2774
2796
  }), i, s];
2775
2797
  }, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
2776
2798
  }
2777
2799
  createDraft(t) {
2778
- Mt(t) || B(8), Ut(t) && (t = wa(t));
2779
- const r = jn(this), n = Tn(t, void 0);
2780
- return n[ut].isManual_ = !0, En(r), n;
2800
+ xt(t) || B(8), Xt(t) && (t = wa(t));
2801
+ const r = zn(this), n = Tn(t, void 0);
2802
+ return n[dt].isManual_ = !0, Sn(r), n;
2781
2803
  }
2782
2804
  finishDraft(t, r) {
2783
- const n = t && t[ut];
2805
+ const n = t && t[dt];
2784
2806
  (!n || !n.isManual_) && B(9);
2785
2807
  const { scope_: i } = n;
2786
- return Hn(i, r), zn(void 0, i);
2808
+ return Hn(i, r), jn(void 0, i);
2787
2809
  }
2788
2810
  /**
2789
2811
  * Pass true to automatically freeze all copies created by Immer.
@@ -2811,24 +2833,24 @@ var Ta = class {
2811
2833
  }
2812
2834
  }
2813
2835
  n > -1 && (r = r.slice(n + 1));
2814
- const i = Yt("Patches").applyPatches_;
2815
- return Ut(t) ? i(t, r) : this.produce(
2836
+ const i = Kt("Patches").applyPatches_;
2837
+ return Xt(t) ? i(t, r) : this.produce(
2816
2838
  t,
2817
2839
  (s) => i(s, r)
2818
2840
  );
2819
2841
  }
2820
2842
  };
2821
2843
  function Tn(t, r) {
2822
- const n = He(t) ? Yt("MapSet").proxyMap_(t, r) : je(t) ? Yt("MapSet").proxySet_(t, r) : Ea(t, r);
2844
+ const n = ze(t) ? Kt("MapSet").proxyMap_(t, r) : je(t) ? Kt("MapSet").proxySet_(t, r) : Sa(t, r);
2823
2845
  return (r ? r.scope_ : yi()).drafts_.push(n), n;
2824
2846
  }
2825
2847
  function wa(t) {
2826
- return Ut(t) || B(10, t), Ii(t);
2848
+ return Xt(t) || B(10, t), Ii(t);
2827
2849
  }
2828
2850
  function Ii(t) {
2829
- if (!Mt(t) || Ir(t))
2851
+ if (!xt(t) || Ir(t))
2830
2852
  return t;
2831
- const r = t[ut];
2853
+ const r = t[dt];
2832
2854
  let n;
2833
2855
  if (r) {
2834
2856
  if (!r.modified_)
@@ -2836,7 +2858,7 @@ function Ii(t) {
2836
2858
  r.finalized_ = !0, n = gn(t, r.scope_.immer_.useStrictShallowCopy_);
2837
2859
  } else
2838
2860
  n = gn(t, !0);
2839
- return Ce(n, (i, s) => {
2861
+ return Re(n, (i, s) => {
2840
2862
  mi(n, i, Ii(s));
2841
2863
  }), r && (r.finalized_ = !1), n;
2842
2864
  }
@@ -2865,7 +2887,7 @@ function Gn() {
2865
2887
  case 1:
2866
2888
  return c(_, f, l, p);
2867
2889
  case 3:
2868
- return y(
2890
+ return m(
2869
2891
  _,
2870
2892
  f,
2871
2893
  l,
@@ -2874,35 +2896,35 @@ function Gn() {
2874
2896
  }
2875
2897
  }
2876
2898
  function c(_, f, l, p) {
2877
- let { base_: I, assigned_: b } = _, g = _.copy_;
2878
- g.length < I.length && ([I, g] = [g, I], [l, p] = [p, l]);
2879
- for (let m = 0; m < I.length; m++)
2880
- if (b[m] && g[m] !== I[m]) {
2881
- const h = f.concat([m]);
2899
+ let { base_: g, assigned_: I } = _, b = _.copy_;
2900
+ b.length < g.length && ([g, b] = [b, g], [l, p] = [p, l]);
2901
+ for (let y = 0; y < g.length; y++)
2902
+ if (I[y] && b[y] !== g[y]) {
2903
+ const h = f.concat([y]);
2882
2904
  l.push({
2883
2905
  op: r,
2884
2906
  path: h,
2885
2907
  // Need to maybe clone it, as it can in fact be the original value
2886
2908
  // due to the base/copy inversion at the start of this function
2887
- value: N(g[m])
2909
+ value: F(b[y])
2888
2910
  }), p.push({
2889
2911
  op: r,
2890
2912
  path: h,
2891
- value: N(I[m])
2913
+ value: F(g[y])
2892
2914
  });
2893
2915
  }
2894
- for (let m = I.length; m < g.length; m++) {
2895
- const h = f.concat([m]);
2916
+ for (let y = g.length; y < b.length; y++) {
2917
+ const h = f.concat([y]);
2896
2918
  l.push({
2897
2919
  op: n,
2898
2920
  path: h,
2899
2921
  // Need to maybe clone it, as it can in fact be the original value
2900
2922
  // due to the base/copy inversion at the start of this function
2901
- value: N(g[m])
2923
+ value: F(b[y])
2902
2924
  });
2903
2925
  }
2904
- for (let m = g.length - 1; I.length <= m; --m) {
2905
- const h = f.concat([m]);
2926
+ for (let y = b.length - 1; g.length <= y; --y) {
2927
+ const h = f.concat([y]);
2906
2928
  p.push({
2907
2929
  op: i,
2908
2930
  path: h
@@ -2910,50 +2932,50 @@ function Gn() {
2910
2932
  }
2911
2933
  }
2912
2934
  function d(_, f, l, p) {
2913
- const { base_: I, copy_: b } = _;
2914
- Ce(_.assigned_, (g, m) => {
2915
- const h = un(I, g), T = un(b, g), D = m ? Re(I, g) ? r : n : i;
2916
- if (h === T && D === r)
2935
+ const { base_: g, copy_: I } = _;
2936
+ Re(_.assigned_, (b, y) => {
2937
+ const h = un(g, b), E = un(I, b), A = y ? Le(g, b) ? r : n : i;
2938
+ if (h === E && A === r)
2917
2939
  return;
2918
- const k = f.concat(g);
2919
- l.push(D === i ? { op: D, path: k } : { op: D, path: k, value: T }), p.push(
2920
- D === n ? { op: i, path: k } : D === i ? { op: n, path: k, value: N(h) } : { op: r, path: k, value: N(h) }
2940
+ const w = f.concat(b);
2941
+ l.push(A === i ? { op: A, path: w } : { op: A, path: w, value: E }), p.push(
2942
+ A === n ? { op: i, path: w } : A === i ? { op: n, path: w, value: F(h) } : { op: r, path: w, value: F(h) }
2921
2943
  );
2922
2944
  });
2923
2945
  }
2924
- function y(_, f, l, p) {
2925
- let { base_: I, copy_: b } = _, g = 0;
2926
- I.forEach((m) => {
2927
- if (!b.has(m)) {
2928
- const h = f.concat([g]);
2946
+ function m(_, f, l, p) {
2947
+ let { base_: g, copy_: I } = _, b = 0;
2948
+ g.forEach((y) => {
2949
+ if (!I.has(y)) {
2950
+ const h = f.concat([b]);
2929
2951
  l.push({
2930
2952
  op: i,
2931
2953
  path: h,
2932
- value: m
2954
+ value: y
2933
2955
  }), p.unshift({
2934
2956
  op: n,
2935
2957
  path: h,
2936
- value: m
2958
+ value: y
2937
2959
  });
2938
2960
  }
2939
- g++;
2940
- }), g = 0, b.forEach((m) => {
2941
- if (!I.has(m)) {
2942
- const h = f.concat([g]);
2961
+ b++;
2962
+ }), b = 0, I.forEach((y) => {
2963
+ if (!g.has(y)) {
2964
+ const h = f.concat([b]);
2943
2965
  l.push({
2944
2966
  op: n,
2945
2967
  path: h,
2946
- value: m
2968
+ value: y
2947
2969
  }), p.unshift({
2948
2970
  op: i,
2949
2971
  path: h,
2950
- value: m
2972
+ value: y
2951
2973
  });
2952
2974
  }
2953
- g++;
2975
+ b++;
2954
2976
  });
2955
2977
  }
2956
- function w(_, f, l, p) {
2978
+ function T(_, f, l, p) {
2957
2979
  l.push({
2958
2980
  op: r,
2959
2981
  path: [],
@@ -2966,86 +2988,86 @@ function Gn() {
2966
2988
  }
2967
2989
  function R(_, f) {
2968
2990
  return f.forEach((l) => {
2969
- const { path: p, op: I } = l;
2970
- let b = _;
2971
- for (let T = 0; T < p.length - 1; T++) {
2972
- const D = Gt(b);
2973
- let k = p[T];
2974
- typeof k != "string" && typeof k != "number" && (k = "" + k), (D === 0 || D === 1) && (k === "__proto__" || k === "constructor") && B(19), typeof b == "function" && k === "prototype" && B(19), b = un(b, k), typeof b != "object" && B(18, p.join("/"));
2991
+ const { path: p, op: g } = l;
2992
+ let I = _;
2993
+ for (let E = 0; E < p.length - 1; E++) {
2994
+ const A = Bt(I);
2995
+ let w = p[E];
2996
+ typeof w != "string" && typeof w != "number" && (w = "" + w), (A === 0 || A === 1) && (w === "__proto__" || w === "constructor") && B(19), typeof I == "function" && w === "prototype" && B(19), I = un(I, w), typeof I != "object" && B(18, p.join("/"));
2975
2997
  }
2976
- const g = Gt(b), m = S(l.value), h = p[p.length - 1];
2977
- switch (I) {
2998
+ const b = Bt(I), y = S(l.value), h = p[p.length - 1];
2999
+ switch (g) {
2978
3000
  case r:
2979
- switch (g) {
3001
+ switch (b) {
2980
3002
  case 2:
2981
- return b.set(h, m);
3003
+ return I.set(h, y);
2982
3004
  case 3:
2983
3005
  B(16);
2984
3006
  default:
2985
- return b[h] = m;
3007
+ return I[h] = y;
2986
3008
  }
2987
3009
  case n:
2988
- switch (g) {
3010
+ switch (b) {
2989
3011
  case 1:
2990
- return h === "-" ? b.push(m) : b.splice(h, 0, m);
3012
+ return h === "-" ? I.push(y) : I.splice(h, 0, y);
2991
3013
  case 2:
2992
- return b.set(h, m);
3014
+ return I.set(h, y);
2993
3015
  case 3:
2994
- return b.add(m);
3016
+ return I.add(y);
2995
3017
  default:
2996
- return b[h] = m;
3018
+ return I[h] = y;
2997
3019
  }
2998
3020
  case i:
2999
- switch (g) {
3021
+ switch (b) {
3000
3022
  case 1:
3001
- return b.splice(h, 1);
3023
+ return I.splice(h, 1);
3002
3024
  case 2:
3003
- return b.delete(h);
3025
+ return I.delete(h);
3004
3026
  case 3:
3005
- return b.delete(l.value);
3027
+ return I.delete(l.value);
3006
3028
  default:
3007
- return delete b[h];
3029
+ return delete I[h];
3008
3030
  }
3009
3031
  default:
3010
- B(17, I);
3032
+ B(17, g);
3011
3033
  }
3012
3034
  }), _;
3013
3035
  }
3014
3036
  function S(_) {
3015
- if (!Mt(_))
3037
+ if (!xt(_))
3016
3038
  return _;
3017
3039
  if (Array.isArray(_))
3018
3040
  return _.map(S);
3019
- if (He(_))
3041
+ if (ze(_))
3020
3042
  return new Map(
3021
3043
  Array.from(_.entries()).map(([l, p]) => [l, S(p)])
3022
3044
  );
3023
3045
  if (je(_))
3024
3046
  return new Set(Array.from(_).map(S));
3025
- const f = Object.create(zt(_));
3047
+ const f = Object.create(Wt(_));
3026
3048
  for (const l in _)
3027
3049
  f[l] = S(_[l]);
3028
- return Re(_, Pe) && (f[Pe] = _[Pe]), f;
3050
+ return Le(_, Ce) && (f[Ce] = _[Ce]), f;
3029
3051
  }
3030
- function N(_) {
3031
- return Ut(_) ? S(_) : _;
3052
+ function F(_) {
3053
+ return Xt(_) ? S(_) : _;
3032
3054
  }
3033
3055
  ga("Patches", {
3034
3056
  applyPatches_: R,
3035
3057
  generatePatches_: s,
3036
- generateReplacementPatches_: w
3058
+ generateReplacementPatches_: T
3037
3059
  });
3038
3060
  }
3039
- var lt = new Ta(), ka = lt.produce;
3040
- lt.produceWithPatches.bind(
3041
- lt
3061
+ var pt = new Ta(), ka = pt.produce;
3062
+ pt.produceWithPatches.bind(
3063
+ pt
3042
3064
  );
3043
- lt.setAutoFreeze.bind(lt);
3044
- lt.setUseStrictShallowCopy.bind(lt);
3045
- var Aa = lt.applyPatches.bind(lt);
3046
- lt.createDraft.bind(lt);
3047
- lt.finishDraft.bind(lt);
3048
- var Da = 1 / 0, Ma = 9007199254740991, Oa = "[object Arguments]", xa = "[object Function]", Pa = "[object GeneratorFunction]", Ca = "[object Symbol]", Ra = typeof pt == "object" && pt && pt.Object === Object && pt, La = typeof self == "object" && self && self.Object === Object && self, Fa = Ra || La || Function("return this")();
3065
+ pt.setAutoFreeze.bind(pt);
3066
+ pt.setUseStrictShallowCopy.bind(pt);
3067
+ var Aa = pt.applyPatches.bind(pt);
3068
+ pt.createDraft.bind(pt);
3069
+ pt.finishDraft.bind(pt);
3070
+ var Da = 1 / 0, Ma = 9007199254740991, Oa = "[object Arguments]", xa = "[object Function]", Pa = "[object GeneratorFunction]", Ca = "[object Symbol]", Ra = typeof mt == "object" && mt && mt.Object === Object && mt, La = typeof self == "object" && self && self.Object === Object && self, Fa = Ra || La || Function("return this")();
3049
3071
  function $a(t, r, n) {
3050
3072
  switch (n.length) {
3051
3073
  case 0:
@@ -3069,12 +3091,12 @@ function Ha(t, r) {
3069
3091
  t[s + n] = r[n];
3070
3092
  return t;
3071
3093
  }
3072
- var Mn = Object.prototype, ja = Mn.hasOwnProperty, On = Mn.toString, Yn = Fa.Symbol, za = Mn.propertyIsEnumerable, Wn = Yn ? Yn.isConcatSpreadable : void 0, Xn = Math.max;
3094
+ var Mn = Object.prototype, za = Mn.hasOwnProperty, On = Mn.toString, Yn = Fa.Symbol, ja = Mn.propertyIsEnumerable, Wn = Yn ? Yn.isConcatSpreadable : void 0, Xn = Math.max;
3073
3095
  function Ua(t, r, n, i, s) {
3074
3096
  var c = -1, d = t.length;
3075
3097
  for (n || (n = Xa), s || (s = []); ++c < d; ) {
3076
- var y = t[c];
3077
- n(y) ? Ha(s, y) : s[s.length] = y;
3098
+ var m = t[c];
3099
+ n(m) ? Ha(s, m) : s[s.length] = m;
3078
3100
  }
3079
3101
  return s;
3080
3102
  }
@@ -3085,8 +3107,8 @@ function Ga(t, r) {
3085
3107
  }
3086
3108
  function Ya(t, r, n) {
3087
3109
  for (var i = -1, s = r.length, c = {}; ++i < s; ) {
3088
- var d = r[i], y = t[d];
3089
- n(y, d) && (c[d] = y);
3110
+ var d = r[i], m = t[d];
3111
+ n(m, d) && (c[d] = m);
3090
3112
  }
3091
3113
  return c;
3092
3114
  }
@@ -3110,7 +3132,7 @@ function Ba(t) {
3110
3132
  return r == "0" && 1 / t == -Da ? "-0" : r;
3111
3133
  }
3112
3134
  function Ka(t) {
3113
- return Za(t) && ja.call(t, "callee") && (!za.call(t, "callee") || On.call(t) == Oa);
3135
+ return Za(t) && za.call(t, "callee") && (!ja.call(t, "callee") || On.call(t) == Oa);
3114
3136
  }
3115
3137
  var Va = Array.isArray;
3116
3138
  function Ja(t) {
@@ -3169,12 +3191,12 @@ const Bn = /* @__PURE__ */ wn(ns), is = {
3169
3191
  ];
3170
3192
  class hs {
3171
3193
  constructor(r) {
3172
- Nt(this, "stateSubject");
3173
- Nt(this, "stateHistorySubject");
3174
- Nt(this, "prevState");
3175
- Nt(this, "undos", []);
3176
- Nt(this, "redos", []);
3177
- Nt(this, "listener");
3194
+ Ut(this, "stateSubject");
3195
+ Ut(this, "stateHistorySubject");
3196
+ Ut(this, "prevState");
3197
+ Ut(this, "undos", []);
3198
+ Ut(this, "redos", []);
3199
+ Ut(this, "listener");
3178
3200
  const n = r || as;
3179
3201
  this.stateSubject = new Nn(n), this.stateHistorySubject = new Nn({
3180
3202
  handleRedo: !1,
@@ -3214,28 +3236,28 @@ class hs {
3214
3236
  ...i,
3215
3237
  ...r
3216
3238
  };
3217
- rt(i, s) || (n.updateHistory && this.updateHistory(s, n.kind), this.prevState = i, this.stateSubject.next(s));
3239
+ it(i, s) || (n.updateHistory && this.updateHistory(s, n.kind), this.prevState = i, this.stateSubject.next(s));
3218
3240
  }
3219
3241
  // emit changes for design size
3220
3242
  subscribeToSize(r) {
3221
3243
  return this.stateSubject.asObservable().subscribe((n) => {
3222
- rt(n.size, this.prevState.size) || r({ size: n.size });
3244
+ it(n.size, this.prevState.size) || r({ size: n.size });
3223
3245
  });
3224
3246
  }
3225
3247
  // Selectively subscribe to scale changes
3226
3248
  subscribeToScale(r) {
3227
3249
  return this.stateSubject.asObservable().subscribe((n) => {
3228
- rt(n.scale, this.prevState.scale) || r({ scale: n.scale });
3250
+ it(n.scale, this.prevState.scale) || r({ scale: n.scale });
3229
3251
  });
3230
3252
  }
3231
3253
  subscribeToUpdateTrackItem(r) {
3232
3254
  return this.stateSubject.asObservable().subscribe((n) => {
3233
- rt(n.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: n.trackItemsMap });
3255
+ it(n.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: n.trackItemsMap });
3234
3256
  });
3235
3257
  }
3236
3258
  subscribeToUpdateItemDetails(r) {
3237
3259
  return this.stateSubject.asObservable().subscribe((n) => {
3238
- rt(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
3260
+ it(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
3239
3261
  });
3240
3262
  }
3241
3263
  // Selectively subscribe to duration changes
@@ -3258,22 +3280,22 @@ class hs {
3258
3280
  }
3259
3281
  subscribeToAddOrRemoveItems(r) {
3260
3282
  return this.stateSubject.asObservable().subscribe((n) => {
3261
- (!rt(n.trackItemIds, this.prevState.trackItemIds) || !rt(n.tracks, this.prevState.tracks)) && r({ trackItemIds: n.trackItemIds });
3283
+ (!it(n.trackItemIds, this.prevState.trackItemIds) || !it(n.tracks, this.prevState.tracks)) && r({ trackItemIds: n.trackItemIds });
3262
3284
  });
3263
3285
  }
3264
3286
  // Selectively subscribe to activeIds changes
3265
3287
  subscribeToActiveIds(r) {
3266
3288
  return this.stateSubject.asObservable().subscribe((n) => {
3267
- rt(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
3289
+ it(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
3268
3290
  });
3269
3291
  }
3270
3292
  // Selectively subscribe to multiple track-related properties
3271
3293
  subscribeToTracks(r) {
3272
3294
  return this.stateSubject.asObservable().subscribe((n) => {
3273
- (!rt(n.tracks, this.prevState.tracks) || !rt(n.trackItemIds, this.prevState.trackItemIds) || !rt(n.trackItemsMap, this.prevState.trackItemsMap) || !rt(n.transitionIds, this.prevState.transitionIds) || !rt(n.transitionsMap, this.prevState.transitionsMap) || !rt(
3295
+ (!it(n.tracks, this.prevState.tracks) || !it(n.trackItemIds, this.prevState.trackItemIds) || !it(n.trackItemsMap, this.prevState.trackItemsMap) || !it(n.transitionIds, this.prevState.transitionIds) || !it(n.transitionsMap, this.prevState.transitionsMap) || !it(
3274
3296
  n.trackItemDetailsMap,
3275
3297
  this.prevState.trackItemDetailsMap
3276
- ) || !rt(n.structure, this.prevState.structure)) && r({
3298
+ ) || !it(n.structure, this.prevState.structure)) && r({
3277
3299
  tracks: n.tracks,
3278
3300
  trackItemIds: n.trackItemIds,
3279
3301
  trackItemsMap: n.trackItemsMap,
@@ -3292,62 +3314,62 @@ class hs {
3292
3314
  trackItemDetailsMap: s,
3293
3315
  trackItemIds: c,
3294
3316
  tracks: d,
3295
- transitionIds: y,
3296
- transitionsMap: w,
3317
+ transitionIds: m,
3318
+ transitionsMap: T,
3297
3319
  trackItemsMap: R
3298
- } = this.getState(), S = tt({
3320
+ } = this.getState(), S = et({
3299
3321
  trackItemDetailsMap: s,
3300
3322
  trackItemIds: c,
3301
3323
  tracks: d,
3302
- transitionIds: y,
3303
- transitionsMap: w,
3324
+ transitionIds: m,
3325
+ transitionsMap: T,
3304
3326
  trackItemsMap: R
3305
- }), N = [], _ = [], f = [], l = [], p = [], I = [];
3306
- n.forEach((A) => {
3307
- let O;
3308
- const z = A.path.slice(1);
3309
- A.type === "CREATE" ? O = {
3310
- path: z,
3327
+ }), F = [], _ = [], f = [], l = [], p = [], g = [];
3328
+ n.forEach((k) => {
3329
+ let M;
3330
+ const j = k.path.slice(1);
3331
+ k.type === "CREATE" ? M = {
3332
+ path: j,
3311
3333
  op: "remove",
3312
- value: A.value
3313
- } : A.type === "CHANGE" ? O = {
3314
- path: z,
3334
+ value: k.value
3335
+ } : k.type === "CHANGE" ? M = {
3336
+ path: j,
3315
3337
  op: "replace",
3316
- value: A.oldValue
3317
- } : O = {
3318
- path: z,
3338
+ value: k.oldValue
3339
+ } : M = {
3340
+ path: j,
3319
3341
  op: "add",
3320
- value: A.oldValue
3321
- }, A.path.includes("trackItemIds") ? f.push(O) : A.path.includes("transitionIds") ? _.push(O) : A.path.includes("trackItemsMap") ? p.push(O) : A.path.includes("transitionsMap") ? l.push(O) : A.path.includes("tracks") ? N.push(O) : A.path.includes("trackItemDetailsMap") && I.push(O);
3342
+ value: k.oldValue
3343
+ }, k.path.includes("trackItemIds") ? f.push(M) : k.path.includes("transitionIds") ? _.push(M) : k.path.includes("trackItemsMap") ? p.push(M) : k.path.includes("transitionsMap") ? l.push(M) : k.path.includes("tracks") ? F.push(M) : k.path.includes("trackItemDetailsMap") && g.push(M);
3322
3344
  });
3323
- const b = this.applyPatch(
3345
+ const I = this.applyPatch(
3324
3346
  S.tracks,
3325
- N
3326
- ), g = this.applyPatch(
3347
+ F
3348
+ ), b = this.applyPatch(
3327
3349
  S.transitionIds,
3328
3350
  _
3329
- ), m = this.applyPatch(
3351
+ ), y = this.applyPatch(
3330
3352
  S.trackItemIds,
3331
3353
  f
3332
3354
  ), h = this.applyPatch(
3333
3355
  S.transitionsMap,
3334
3356
  l
3335
- ), T = this.applyPatch(
3357
+ ), E = this.applyPatch(
3336
3358
  S.trackItemsMap,
3337
3359
  p
3338
- ), D = this.applyPatch(
3360
+ ), A = this.applyPatch(
3339
3361
  S.trackItemDetailsMap,
3340
- I
3341
- ), k = tt({
3342
- tracks: b,
3343
- transitionIds: g,
3344
- trackItemIds: m,
3362
+ g
3363
+ ), w = et({
3364
+ tracks: I,
3365
+ transitionIds: b,
3366
+ trackItemIds: y,
3345
3367
  transitionsMap: h,
3346
- trackItemsMap: T,
3347
- trackItemDetailsMap: D
3348
- }), x = tt(this.getState()), C = { ...x, ...k };
3368
+ trackItemsMap: E,
3369
+ trackItemDetailsMap: A
3370
+ }), x = et(this.getState()), C = { ...x, ...w };
3349
3371
  this.prevState = x, this.redos.push({ redos: n, type: i });
3350
- const P = jt(C.trackItemsMap);
3372
+ const P = Yt(C.trackItemsMap);
3351
3373
  this.stateSubject.next({ ...C, duration: P }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
3352
3374
  }
3353
3375
  applyPatch(r, n) {
@@ -3363,86 +3385,86 @@ class hs {
3363
3385
  trackItemDetailsMap: s,
3364
3386
  trackItemIds: c,
3365
3387
  tracks: d,
3366
- transitionIds: y,
3367
- transitionsMap: w,
3388
+ transitionIds: m,
3389
+ transitionsMap: T,
3368
3390
  trackItemsMap: R
3369
- } = this.getState(), S = tt({
3391
+ } = this.getState(), S = et({
3370
3392
  trackItemDetailsMap: s,
3371
3393
  trackItemIds: c,
3372
3394
  tracks: d,
3373
- transitionIds: y,
3374
- transitionsMap: w,
3395
+ transitionIds: m,
3396
+ transitionsMap: T,
3375
3397
  trackItemsMap: R
3376
- }), N = [], _ = [], f = [], l = [], p = [], I = [];
3377
- n.forEach((A) => {
3378
- let O;
3379
- const z = A.path.slice(1);
3380
- A.type === "CREATE" ? O = {
3381
- path: z,
3398
+ }), F = [], _ = [], f = [], l = [], p = [], g = [];
3399
+ n.forEach((k) => {
3400
+ let M;
3401
+ const j = k.path.slice(1);
3402
+ k.type === "CREATE" ? M = {
3403
+ path: j,
3382
3404
  op: "add",
3383
- value: A.value
3384
- } : A.type === "CHANGE" ? O = {
3385
- path: z,
3405
+ value: k.value
3406
+ } : k.type === "CHANGE" ? M = {
3407
+ path: j,
3386
3408
  op: "replace",
3387
- value: A.value
3388
- } : O = {
3389
- path: z,
3409
+ value: k.value
3410
+ } : M = {
3411
+ path: j,
3390
3412
  op: "remove",
3391
- value: A.oldValue
3392
- }, A.path.includes("trackItemIds") ? f.push(O) : A.path.includes("transitionIds") ? _.push(O) : A.path.includes("trackItemsMap") ? p.push(O) : A.path.includes("transitionsMap") ? l.push(O) : A.path.includes("trackItemDetailsMap") ? I.push(O) : N.push(O);
3413
+ value: k.oldValue
3414
+ }, k.path.includes("trackItemIds") ? f.push(M) : k.path.includes("transitionIds") ? _.push(M) : k.path.includes("trackItemsMap") ? p.push(M) : k.path.includes("transitionsMap") ? l.push(M) : k.path.includes("trackItemDetailsMap") ? g.push(M) : F.push(M);
3393
3415
  });
3394
- const b = this.applyPatch(
3416
+ const I = this.applyPatch(
3395
3417
  S.tracks,
3396
- N
3397
- ), g = this.applyPatch(
3418
+ F
3419
+ ), b = this.applyPatch(
3398
3420
  S.transitionIds,
3399
3421
  _
3400
- ), m = this.applyPatch(
3422
+ ), y = this.applyPatch(
3401
3423
  S.trackItemIds,
3402
3424
  f
3403
3425
  ), h = this.applyPatch(
3404
3426
  S.transitionsMap,
3405
3427
  l
3406
- ), T = this.applyPatch(
3428
+ ), E = this.applyPatch(
3407
3429
  S.trackItemsMap,
3408
3430
  p
3409
- ), D = this.applyPatch(
3431
+ ), A = this.applyPatch(
3410
3432
  S.trackItemDetailsMap,
3411
- I
3412
- ), k = tt({
3413
- tracks: b,
3414
- transitionIds: g,
3415
- trackItemIds: m,
3433
+ g
3434
+ ), w = et({
3435
+ tracks: I,
3436
+ transitionIds: b,
3437
+ trackItemIds: y,
3416
3438
  transitionsMap: h,
3417
- trackItemsMap: T,
3418
- trackItemDetailsMap: D
3419
- }), x = tt(this.getState()), C = { ...x, ...k };
3439
+ trackItemsMap: E,
3440
+ trackItemDetailsMap: A
3441
+ }), x = et(this.getState()), C = { ...x, ...w };
3420
3442
  this.prevState = x, this.undos.push({ undos: n, type: i });
3421
- const P = jt(C.trackItemsMap);
3443
+ const P = Yt(C.trackItemsMap);
3422
3444
  this.stateSubject.next({ ...C, duration: P }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
3423
3445
  }
3424
3446
  }
3425
- const ms = "add", ss = "track", os = "trackItems", ys = `${ss}:changed`, _s = `${os}:changed`, cs = "state", Is = `${cs}:changed`, bi = "design", gs = `${bi}:load`, bs = `${bi}:resize`, _t = "add", vs = `${_t}:text`, Es = `${_t}:video`, Ss = `${_t}:audio`, Ts = `${_t}:placeholder`, ws = `${_t}:image`, ks = `${_t}:mask`, us = `${_t}:items`, As = `${_t}:transition`, Ds = `${_t}:animation`, Ms = `${_t}:caption`, Os = `${_t}:template`, fe = "edit", xs = `${fe}:object`, Ps = `${fe}:text`, Cs = `${fe}:shape`, Rs = `${fe}:templateItem`, Ls = `${fe}:closeTemplate`, Fs = `${fe}:deleteTemplateItem`, $s = "enterEditMode", de = "player", Ns = `${de}:play`, Hs = `${de}:pause`, js = `${de}:seek`, zs = `${de}:seekTo`, Us = `${de}:seekBy`, Gs = `${de}:togglePlay`, ze = "active", Ys = `${ze}:set`, Ws = `${ze}:delete`, Xs = `${ze}:paste`, Bs = `${ze}:clone`, Ks = `${ze}:split`, st = "layer", Vs = `${st}:locked`, Js = `${st}:hidden`, Zs = `${st}:move`, qs = `${st}:select`, Qs = `${st}:selection`, to = `${st}:sendTo`, eo = `${st}:rename`, ro = `${st}:editingName`, no = `${st}:copy`, io = `${st}:paste`, ao = `${st}:clone`, so = `${st}:split`, oo = `${st}:cut`, co = `${st}:delete`, xn = "history", uo = `${xn}:undo`, lo = `${xn}:redo`, fo = `${xn}:reset`, ls = "scale", po = `${ls}:changed`, vi = "drag", ho = `${vi}:start`, mo = `${vi}:end`, fs = "timeline", yo = `${fs}:boundingChanged`;
3447
+ const ms = "add", ss = "track", os = "trackItems", ys = `${ss}:changed`, _s = `${os}:changed`, cs = "state", Is = `${cs}:changed`, bi = "design", gs = `${bi}:load`, bs = `${bi}:resize`, It = "add", vs = `${It}:text`, Ss = `${It}:video`, Es = `${It}:audio`, Ts = `${It}:placeholder`, ws = `${It}:image`, ks = `${It}:mask`, us = `${It}:items`, As = `${It}:transition`, Ds = `${It}:animation`, Ms = `${It}:caption`, Os = `${It}:template`, he = "edit", xs = `${he}:object`, Ps = `${he}:text`, Cs = `${he}:shape`, Rs = `${he}:templateItem`, Ls = `${he}:closeTemplate`, Fs = `${he}:deleteTemplateItem`, $s = "enterEditMode", me = "player", Ns = `${me}:play`, Hs = `${me}:pause`, zs = `${me}:seek`, js = `${me}:seekTo`, Us = `${me}:seekBy`, Gs = `${me}:togglePlay`, Ue = "active", Ys = `${Ue}:set`, Ws = `${Ue}:delete`, Xs = `${Ue}:paste`, Bs = `${Ue}:clone`, Ks = `${Ue}:split`, ct = "layer", Vs = `${ct}:locked`, Js = `${ct}:hidden`, Zs = `${ct}:move`, qs = `${ct}:select`, Qs = `${ct}:selection`, to = `${ct}:sendTo`, eo = `${ct}:rename`, ro = `${ct}:editingName`, no = `${ct}:copy`, io = `${ct}:paste`, ao = `${ct}:clone`, so = `${ct}:split`, oo = `${ct}:cut`, co = `${ct}:delete`, xn = "history", uo = `${xn}:undo`, lo = `${xn}:redo`, fo = `${xn}:reset`, ls = "scale", po = `${ls}:changed`, vi = "drag", ho = `${vi}:start`, mo = `${vi}:end`, fs = "timeline", yo = `${fs}:boundingChanged`;
3426
3448
  export {
3427
3449
  Bs as ACTIVE_CLONE,
3428
3450
  Ws as ACTIVE_DELETE,
3429
3451
  Xs as ACTIVE_PASTE,
3430
- ze as ACTIVE_PREFIX,
3452
+ Ue as ACTIVE_PREFIX,
3431
3453
  Ys as ACTIVE_SET,
3432
3454
  Ks as ACTIVE_SPLIT,
3433
3455
  Ds as ADD_ANIMATION,
3434
- Ss as ADD_AUDIO,
3456
+ Es as ADD_AUDIO,
3435
3457
  Ms as ADD_CAPTION,
3436
3458
  ws as ADD_IMAGE,
3437
3459
  us as ADD_ITEMS,
3438
3460
  ks as ADD_MASK,
3439
3461
  Ts as ADD_PLACEHOLDER,
3440
- _t as ADD_PREFIX,
3462
+ It as ADD_PREFIX,
3441
3463
  ms as ADD_SUFFIX,
3442
3464
  Os as ADD_TEMPLATE,
3443
3465
  vs as ADD_TEXT,
3444
3466
  As as ADD_TRANSITION,
3445
- Es as ADD_VIDEO,
3467
+ Ss as ADD_VIDEO,
3446
3468
  Ls as CLOSE_EDIT_TEMPLATE,
3447
3469
  Fs as DELETE_TEMPLATE_ITEM,
3448
3470
  gs as DESIGN_LOAD,
@@ -3452,7 +3474,7 @@ export {
3452
3474
  vi as DRAG_PREFIX,
3453
3475
  ho as DRAG_START,
3454
3476
  xs as EDIT_OBJECT,
3455
- fe as EDIT_PREFIX,
3477
+ he as EDIT_PREFIX,
3456
3478
  Cs as EDIT_SHAPE,
3457
3479
  Rs as EDIT_TEMPLATE_ITEM,
3458
3480
  Ps as EDIT_TEXT,
@@ -3470,7 +3492,7 @@ export {
3470
3492
  Vs as LAYER_LOCKED,
3471
3493
  Zs as LAYER_MOVE,
3472
3494
  io as LAYER_PASTE,
3473
- st as LAYER_PREFIX,
3495
+ ct as LAYER_PREFIX,
3474
3496
  eo as LAYER_RENAME,
3475
3497
  qs as LAYER_SELECT,
3476
3498
  Qs as LAYER_SELECTION,
@@ -3478,10 +3500,10 @@ export {
3478
3500
  so as LAYER_SPLIT,
3479
3501
  Hs as PLAYER_PAUSE,
3480
3502
  Ns as PLAYER_PLAY,
3481
- de as PLAYER_PREFIX,
3482
- js as PLAYER_SEEK,
3503
+ me as PLAYER_PREFIX,
3504
+ zs as PLAYER_SEEK,
3483
3505
  Us as PLAYER_SEEK_BY,
3484
- zs as PLAYER_SEEK_TO,
3506
+ js as PLAYER_SEEK_TO,
3485
3507
  Gs as PLAYER_TOGGLE_PLAY,
3486
3508
  Is as STATE_CHANGED,
3487
3509
  cs as STATE_PREFIX,