@designcombo/state 0.1.12 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.es.js CHANGED
@@ -87,8 +87,8 @@ var tr = function() {
87
87
  if (this._parentage = null, Array.isArray(f))
88
88
  try {
89
89
  for (var d = sn(f), E = d.next(); !E.done; E = d.next()) {
90
- var R = E.value;
91
- R.remove(this);
90
+ var j = E.value;
91
+ j.remove(this);
92
92
  }
93
93
  } catch (l) {
94
94
  r = { error: l };
@@ -112,7 +112,7 @@ var tr = function() {
112
112
  if (N) {
113
113
  this._finalizers = null;
114
114
  try {
115
- for (var y = sn(N), p = y.next(); !p.done; p = y.next()) {
115
+ for (var m = sn(N), p = m.next(); !p.done; p = m.next()) {
116
116
  var h = p.value;
117
117
  try {
118
118
  kn(h);
@@ -124,7 +124,7 @@ var tr = function() {
124
124
  i = { error: l };
125
125
  } finally {
126
126
  try {
127
- p && !p.done && (o = y.return) && o.call(y);
127
+ p && !p.done && (o = m.return) && o.call(m);
128
128
  } finally {
129
129
  if (i) throw i.error;
130
130
  }
@@ -408,8 +408,8 @@ var zi = Gn(function(t) {
408
408
  var E = d.value;
409
409
  E.next(n);
410
410
  }
411
- } catch (R) {
412
- o = { error: R };
411
+ } catch (j) {
412
+ o = { error: j };
413
413
  } finally {
414
414
  try {
415
415
  d && !d.done && (c = f.return) && c.call(f);
@@ -513,8 +513,8 @@ function gn(t) {
513
513
  var Xe = { exports: {} };
514
514
  Xe.exports;
515
515
  (function(t, r) {
516
- var n = 200, i = "__lodash_hash_undefined__", o = 1, c = 2, f = 9007199254740991, d = "[object Arguments]", E = "[object Array]", R = "[object AsyncFunction]", S = "[object Boolean]", N = "[object Date]", y = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", l = "[object Map]", g = "[object Number]", v = "[object Null]", _ = "[object Object]", m = "[object Promise]", b = "[object Proxy]", x = "[object RegExp]", O = "[object Set]", A = "[object String]", C = "[object Symbol]", w = "[object Undefined]", T = "[object WeakMap]", M = "[object ArrayBuffer]", F = "[object DataView]", Dt = "[object Float32Array]", Ct = "[object Float64Array]", Ie = "[object Int8Array]", ir = "[object Int16Array]", ar = "[object Int32Array]", sr = "[object Uint8Array]", or = "[object Uint8ClampedArray]", z = "[object Uint16Array]", cr = "[object Uint32Array]", ur = /[\\^$.*+?()[\]{}|]/g, rt = /^\[object .+?Constructor\]$/, Se = /^(?:0|[1-9]\d*)$/, H = {};
517
- H[Dt] = H[Ct] = H[Ie] = H[ir] = H[ar] = H[sr] = H[or] = H[z] = H[cr] = !0, H[d] = H[E] = H[M] = H[S] = H[F] = H[N] = H[y] = H[p] = H[l] = H[g] = H[_] = H[x] = H[O] = H[A] = H[T] = !1;
516
+ var n = 200, i = "__lodash_hash_undefined__", o = 1, c = 2, f = 9007199254740991, d = "[object Arguments]", E = "[object Array]", j = "[object AsyncFunction]", S = "[object Boolean]", N = "[object Date]", m = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", l = "[object Map]", g = "[object Number]", v = "[object Null]", _ = "[object Object]", b = "[object Promise]", y = "[object Proxy]", R = "[object RegExp]", A = "[object Set]", O = "[object String]", D = "[object Symbol]", w = "[object Undefined]", T = "[object WeakMap]", x = "[object ArrayBuffer]", F = "[object DataView]", Dt = "[object Float32Array]", Ct = "[object Float64Array]", Ie = "[object Int8Array]", ir = "[object Int16Array]", ar = "[object Int32Array]", sr = "[object Uint8Array]", or = "[object Uint8ClampedArray]", z = "[object Uint16Array]", cr = "[object Uint32Array]", ur = /[\\^$.*+?()[\]{}|]/g, rt = /^\[object .+?Constructor\]$/, Se = /^(?:0|[1-9]\d*)$/, H = {};
517
+ H[Dt] = H[Ct] = H[Ie] = H[ir] = H[ar] = H[sr] = H[or] = H[z] = H[cr] = !0, H[d] = H[E] = H[x] = H[S] = H[F] = H[N] = H[m] = H[p] = H[l] = H[g] = H[_] = H[R] = H[A] = H[O] = H[T] = !1;
518
518
  var we = typeof et == "object" && et && et.Object === Object && et, lr = typeof self == "object" && self && self.Object === Object && self, nt = we || lr || Function("return this")(), Te = r && !r.nodeType && r, ke = Te && !0 && t && !t.nodeType && t, Yt = ke && ke.exports === Te, Vt = Yt && we.process, Ae = function() {
519
519
  try {
520
520
  return Vt && Vt.binding && Vt.binding("util");
@@ -523,8 +523,8 @@ Xe.exports;
523
523
  }(), Xt = Ae && Ae.isTypedArray;
524
524
  function Ee(e, a) {
525
525
  for (var s = -1, u = e == null ? 0 : e.length, k = 0, I = []; ++s < u; ) {
526
- var D = e[s];
527
- a(D, s, e) && (I[k++] = D);
526
+ var P = e[s];
527
+ a(P, s, e) && (I[k++] = P);
528
528
  }
529
529
  return I;
530
530
  }
@@ -708,14 +708,14 @@ Xe.exports;
708
708
  }
709
709
  ct.prototype.clear = se, ct.prototype.delete = Cr, ct.prototype.get = jr, ct.prototype.has = Rr, ct.prototype.set = Fr;
710
710
  function zr(e, a) {
711
- var s = Wt(e), u = !s && Le(e), k = !s && !u && Bt(e), I = !s && !u && !k && Be(e), D = s || u || k || I, P = D ? fr(e.length, String) : [], U = P.length;
712
- for (var j in e)
713
- Q.call(e, j) && !(D && // Safari 9 has enumerable `arguments.length` in strict mode.
714
- (j == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
715
- k && (j == "offset" || j == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
716
- I && (j == "buffer" || j == "byteLength" || j == "byteOffset") || // Skip index properties.
717
- $r(j, U))) && P.push(j);
718
- return P;
711
+ var s = Wt(e), u = !s && Le(e), k = !s && !u && Bt(e), I = !s && !u && !k && Be(e), P = s || u || k || I, M = P ? fr(e.length, String) : [], U = M.length;
712
+ for (var C in e)
713
+ Q.call(e, C) && !(P && // Safari 9 has enumerable `arguments.length` in strict mode.
714
+ (C == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
715
+ k && (C == "offset" || C == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
716
+ I && (C == "buffer" || C == "byteLength" || C == "byteOffset") || // Skip index properties.
717
+ $r(C, U))) && M.push(C);
718
+ return M;
719
719
  }
720
720
  function Gt(e, a) {
721
721
  for (var s = e.length; s--; )
@@ -737,16 +737,16 @@ Xe.exports;
737
737
  return e === a ? !0 : e == null || a == null || !lt(e) && !lt(a) ? e !== e && a !== a : Hr(e, a, s, u, He, k);
738
738
  }
739
739
  function Hr(e, a, s, u, k, I) {
740
- var D = Wt(e), P = Wt(a), U = D ? E : ut(e), j = P ? E : ut(a);
741
- U = U == d ? _ : U, j = j == d ? _ : j;
742
- var K = U == _, q = j == _, L = U == j;
740
+ var P = Wt(e), M = Wt(a), U = P ? E : ut(e), C = M ? E : ut(a);
741
+ U = U == d ? _ : U, C = C == d ? _ : C;
742
+ var K = U == _, q = C == _, L = U == C;
743
743
  if (L && Bt(e)) {
744
744
  if (!Bt(a))
745
745
  return !1;
746
- D = !0, K = !1;
746
+ P = !0, K = !1;
747
747
  }
748
748
  if (L && !K)
749
- return I || (I = new ct()), D || Be(e) ? ce(e, a, s, u, k, I) : Gr(e, a, U, s, u, k, I);
749
+ return I || (I = new ct()), P || Be(e) ? ce(e, a, s, u, k, I) : Gr(e, a, U, s, u, k, I);
750
750
  if (!(s & o)) {
751
751
  var Y = K && Q.call(e, "__wrapped__"), B = q && Q.call(a, "__wrapped__");
752
752
  if (Y || B) {
@@ -774,17 +774,17 @@ Xe.exports;
774
774
  return a;
775
775
  }
776
776
  function ce(e, a, s, u, k, I) {
777
- var D = s & o, P = e.length, U = a.length;
778
- if (P != U && !(D && U > P))
777
+ var P = s & o, M = e.length, U = a.length;
778
+ if (M != U && !(P && U > M))
779
779
  return !1;
780
- var j = I.get(e);
781
- if (j && I.get(a))
782
- return j == a;
780
+ var C = I.get(e);
781
+ if (C && I.get(a))
782
+ return C == a;
783
783
  var K = -1, q = !0, L = s & c ? new Ut() : void 0;
784
- for (I.set(e, a), I.set(a, e); ++K < P; ) {
784
+ for (I.set(e, a), I.set(a, e); ++K < M; ) {
785
785
  var Y = e[K], B = a[K];
786
786
  if (u)
787
- var bt = D ? u(B, Y, K, a, e, I) : u(Y, B, K, e, a, I);
787
+ var bt = P ? u(B, Y, K, a, e, I) : u(Y, B, K, e, a, I);
788
788
  if (bt !== void 0) {
789
789
  if (bt)
790
790
  continue;
@@ -806,48 +806,48 @@ Xe.exports;
806
806
  }
807
807
  return I.delete(e), I.delete(a), q;
808
808
  }
809
- function Gr(e, a, s, u, k, I, D) {
809
+ function Gr(e, a, s, u, k, I, P) {
810
810
  switch (s) {
811
811
  case F:
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 M:
815
+ case x:
816
816
  return !(e.byteLength != a.byteLength || !I(new Ce(e), new Ce(a)));
817
817
  case S:
818
818
  case N:
819
819
  case g:
820
820
  return Ue(+e, +a);
821
- case y:
821
+ case m:
822
822
  return e.name == a.name && e.message == a.message;
823
- case x:
824
- case A:
823
+ case R:
824
+ case O:
825
825
  return e == a + "";
826
826
  case l:
827
- var P = xe;
828
- case O:
827
+ var M = xe;
828
+ case A:
829
829
  var U = u & o;
830
- if (P || (P = ot), e.size != a.size && !U)
830
+ if (M || (M = ot), e.size != a.size && !U)
831
831
  return !1;
832
- var j = D.get(e);
833
- if (j)
834
- return j == a;
835
- u |= c, D.set(e, a);
836
- var K = ce(P(e), P(a), u, k, I, D);
837
- return D.delete(e), K;
838
- case C:
832
+ var C = P.get(e);
833
+ if (C)
834
+ return C == a;
835
+ u |= c, P.set(e, a);
836
+ var K = ce(M(e), M(a), u, k, I, P);
837
+ return P.delete(e), K;
838
+ case D:
839
839
  if (ae)
840
840
  return ae.call(e) == ae.call(a);
841
841
  }
842
842
  return !1;
843
843
  }
844
844
  function Wr(e, a, s, u, k, I) {
845
- var D = s & o, P = Tt(e), U = P.length, j = Tt(a), K = j.length;
846
- if (U != K && !D)
845
+ var P = s & o, M = Tt(e), U = M.length, C = Tt(a), K = C.length;
846
+ if (U != K && !P)
847
847
  return !1;
848
848
  for (var q = U; q--; ) {
849
- var L = P[q];
850
- if (!(D ? L in a : Q.call(a, L)))
849
+ var L = M[q];
850
+ if (!(P ? L in a : Q.call(a, L)))
851
851
  return !1;
852
852
  }
853
853
  var Y = I.get(e);
@@ -855,11 +855,11 @@ Xe.exports;
855
855
  return Y == a;
856
856
  var B = !0;
857
857
  I.set(e, a), I.set(a, e);
858
- for (var bt = D; ++q < U; ) {
859
- L = P[q];
858
+ for (var bt = P; ++q < U; ) {
859
+ L = M[q];
860
860
  var ht = e[L], kt = a[L];
861
861
  if (u)
862
- var Tn = D ? u(kt, ht, L, a, e, I) : u(ht, kt, L, e, a, I);
862
+ var Tn = P ? u(kt, ht, L, a, e, I) : u(ht, kt, L, e, a, I);
863
863
  if (!(Tn === void 0 ? ht === kt || k(ht, kt, s, u, I) : Tn)) {
864
864
  B = !1;
865
865
  break;
@@ -898,7 +898,7 @@ Xe.exports;
898
898
  return Ht.call(e, a);
899
899
  }));
900
900
  } : qr, ut = wt;
901
- (ee && ut(new ee(new ArrayBuffer(1))) != F || St && ut(new St()) != l || re && ut(re.resolve()) != m || ne && ut(new ne()) != O || ie && ut(new ie()) != T) && (ut = function(e) {
901
+ (ee && ut(new ee(new ArrayBuffer(1))) != F || St && ut(new St()) != l || re && ut(re.resolve()) != b || ne && ut(new ne()) != A || ie && ut(new ie()) != T) && (ut = function(e) {
902
902
  var a = wt(e), s = a == _ ? e.constructor : void 0, u = s ? V(s) : "";
903
903
  if (u)
904
904
  switch (u) {
@@ -907,9 +907,9 @@ Xe.exports;
907
907
  case ft:
908
908
  return l;
909
909
  case yr:
910
- return m;
910
+ return b;
911
911
  case mr:
912
- return O;
912
+ return A;
913
913
  case br:
914
914
  return T;
915
915
  }
@@ -964,7 +964,7 @@ Xe.exports;
964
964
  if (!We(e))
965
965
  return !1;
966
966
  var a = wt(e);
967
- return a == p || a == h || a == R || a == b;
967
+ return a == p || a == h || a == j || a == y;
968
968
  }
969
969
  function le(e) {
970
970
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= f;
@@ -993,8 +993,8 @@ const st = /* @__PURE__ */ gn(Hi);
993
993
  var qe = { exports: {} };
994
994
  qe.exports;
995
995
  (function(t, r) {
996
- var n = 200, i = "__lodash_hash_undefined__", o = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]", E = "[object Date]", R = "[object Error]", S = "[object Function]", N = "[object GeneratorFunction]", y = "[object Map]", p = "[object Number]", h = "[object Object]", l = "[object Promise]", g = "[object RegExp]", v = "[object Set]", _ = "[object String]", m = "[object Symbol]", b = "[object WeakMap]", x = "[object ArrayBuffer]", O = "[object DataView]", A = "[object Float32Array]", C = "[object Float64Array]", w = "[object Int8Array]", T = "[object Int16Array]", M = "[object Int32Array]", F = "[object Uint8Array]", Dt = "[object Uint8ClampedArray]", Ct = "[object Uint16Array]", Ie = "[object Uint32Array]", ir = /[\\^$.*+?()[\]{}|]/g, ar = /\w*$/, sr = /^\[object .+?Constructor\]$/, or = /^(?:0|[1-9]\d*)$/, z = {};
997
- z[c] = z[f] = z[x] = z[O] = z[d] = z[E] = z[A] = z[C] = z[w] = z[T] = z[M] = z[y] = z[p] = z[h] = z[g] = z[v] = z[_] = z[m] = z[F] = z[Dt] = z[Ct] = z[Ie] = !0, z[R] = z[S] = z[b] = !1;
996
+ var n = 200, i = "__lodash_hash_undefined__", o = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]", E = "[object Date]", j = "[object Error]", S = "[object Function]", N = "[object GeneratorFunction]", m = "[object Map]", p = "[object Number]", h = "[object Object]", l = "[object Promise]", g = "[object RegExp]", v = "[object Set]", _ = "[object String]", b = "[object Symbol]", y = "[object WeakMap]", R = "[object ArrayBuffer]", A = "[object DataView]", O = "[object Float32Array]", D = "[object Float64Array]", w = "[object Int8Array]", T = "[object Int16Array]", x = "[object Int32Array]", F = "[object Uint8Array]", Dt = "[object Uint8ClampedArray]", Ct = "[object Uint16Array]", Ie = "[object Uint32Array]", ir = /[\\^$.*+?()[\]{}|]/g, ar = /\w*$/, sr = /^\[object .+?Constructor\]$/, or = /^(?:0|[1-9]\d*)$/, z = {};
997
+ z[c] = z[f] = z[R] = z[A] = z[d] = z[E] = z[O] = z[D] = z[w] = z[T] = z[x] = z[m] = z[p] = z[h] = z[g] = z[v] = z[_] = z[b] = z[F] = z[Dt] = z[Ct] = z[Ie] = !0, z[j] = z[S] = z[y] = !1;
998
998
  var cr = typeof et == "object" && et && et.Object === Object && et, ur = typeof self == "object" && self && self.Object === Object && self, rt = cr || ur || Function("return this")(), Se = r && !r.nodeType && r, H = Se && !0 && t && !t.nodeType && t, we = H && H.exports === Se;
999
999
  function lr(e, a) {
1000
1000
  return e.set(a[0], a[1]), e;
@@ -1188,40 +1188,40 @@ qe.exports;
1188
1188
  function ct(e, a) {
1189
1189
  return e && ce(a, fe(a), e);
1190
1190
  }
1191
- function se(e, a, s, u, k, I, D) {
1192
- var P;
1193
- if (u && (P = I ? u(e, k, I, D) : u(e)), P !== void 0)
1194
- return P;
1191
+ function se(e, a, s, u, k, I, P) {
1192
+ var M;
1193
+ if (u && (M = I ? u(e, k, I, P) : u(e)), M !== void 0)
1194
+ return M;
1195
1195
  if (!lt(e))
1196
1196
  return e;
1197
1197
  var U = ue(e);
1198
1198
  if (U) {
1199
- if (P = Br(e), !a)
1200
- return Lr(e, P);
1199
+ if (M = Br(e), !a)
1200
+ return Lr(e, M);
1201
1201
  } else {
1202
- var j = dt(e), K = j == S || j == N;
1202
+ var C = dt(e), K = C == S || C == N;
1203
1203
  if (Ge(e))
1204
1204
  return Gt(e, a);
1205
- if (j == h || j == c || K && !I) {
1205
+ if (C == h || C == c || K && !I) {
1206
1206
  if (Xt(e))
1207
1207
  return I ? e : {};
1208
- if (P = ut(K ? {} : e), !a)
1209
- return Gr(e, ct(P, e));
1208
+ if (M = ut(K ? {} : e), !a)
1209
+ return Gr(e, ct(M, e));
1210
1210
  } else {
1211
- if (!z[j])
1211
+ if (!z[C])
1212
1212
  return I ? e : {};
1213
- P = $r(e, j, se, a);
1213
+ M = $r(e, C, se, a);
1214
1214
  }
1215
1215
  }
1216
- D || (D = new X());
1217
- var q = D.get(e);
1216
+ P || (P = new X());
1217
+ var q = P.get(e);
1218
1218
  if (q)
1219
1219
  return q;
1220
- if (D.set(e, P), !U)
1220
+ if (P.set(e, M), !U)
1221
1221
  var L = s ? Wr(e) : fe(e);
1222
1222
  return Te(L || e, function(Y, B) {
1223
- L && (B = Y, Y = e[B]), Fe(P, B, se(Y, a, s, u, B, e, D));
1224
- }), P;
1223
+ L && (B = Y, Y = e[B]), Fe(M, B, se(Y, a, s, u, B, e, P));
1224
+ }), M;
1225
1225
  }
1226
1226
  function Cr(e) {
1227
1227
  return lt(e) ? Pe(e) : {};
@@ -1289,8 +1289,8 @@ qe.exports;
1289
1289
  function ce(e, a, s, u) {
1290
1290
  s || (s = {});
1291
1291
  for (var k = -1, I = a.length; ++k < I; ) {
1292
- var D = a[k], P = void 0;
1293
- Fe(s, D, P === void 0 ? e[D] : P);
1292
+ var P = a[k], M = void 0;
1293
+ Fe(s, P, M === void 0 ? e[P] : M);
1294
1294
  }
1295
1295
  return s;
1296
1296
  }
@@ -1309,20 +1309,20 @@ qe.exports;
1309
1309
  return Fr(s) ? s : void 0;
1310
1310
  }
1311
1311
  var pt = Qt ? qt(Qt, Object) : qr, dt = Rr;
1312
- (Ht && dt(new Ht(new ArrayBuffer(1))) != O || vt && dt(new vt()) != y || it && dt(it.resolve()) != l || Nt && dt(new Nt()) != v || te && dt(new te()) != b) && (dt = function(e) {
1312
+ (Ht && dt(new Ht(new ArrayBuffer(1))) != A || vt && dt(new vt()) != m || it && dt(it.resolve()) != l || Nt && dt(new Nt()) != v || te && dt(new te()) != y) && (dt = function(e) {
1313
1313
  var a = Rt.call(e), s = a == h ? e.constructor : void 0, u = s ? V(s) : void 0;
1314
1314
  if (u)
1315
1315
  switch (u) {
1316
1316
  case ee:
1317
- return O;
1317
+ return A;
1318
1318
  case St:
1319
- return y;
1319
+ return m;
1320
1320
  case re:
1321
1321
  return l;
1322
1322
  case ne:
1323
1323
  return v;
1324
1324
  case ie:
1325
- return b;
1325
+ return y;
1326
1326
  }
1327
1327
  return a;
1328
1328
  });
@@ -1336,24 +1336,24 @@ qe.exports;
1336
1336
  function $r(e, a, s, u) {
1337
1337
  var k = e.constructor;
1338
1338
  switch (a) {
1339
- case x:
1339
+ case R:
1340
1340
  return oe(e);
1341
1341
  case d:
1342
1342
  case E:
1343
1343
  return new k(+e);
1344
- case O:
1345
- return wt(e, u);
1346
1344
  case A:
1347
- case C:
1345
+ return wt(e, u);
1346
+ case O:
1347
+ case D:
1348
1348
  case w:
1349
1349
  case T:
1350
- case M:
1350
+ case x:
1351
1351
  case F:
1352
1352
  case Dt:
1353
1353
  case Ct:
1354
1354
  case Ie:
1355
1355
  return Ur(e, u);
1356
- case y:
1356
+ case m:
1357
1357
  return ze(e, u, s);
1358
1358
  case p:
1359
1359
  case _:
@@ -1362,7 +1362,7 @@ qe.exports;
1362
1362
  return He(e);
1363
1363
  case v:
1364
1364
  return Hr(e, u, s);
1365
- case m:
1365
+ case b:
1366
1366
  return Nr(e);
1367
1367
  }
1368
1368
  }
@@ -1641,7 +1641,6 @@ const Wi = async (t, r) => {
1641
1641
  name: "caption",
1642
1642
  type: "caption",
1643
1643
  display: ge(t.display),
1644
- playbackRate: t.playbackRate || 1,
1645
1644
  details: {
1646
1645
  ...o,
1647
1646
  text: i.text || "",
@@ -1673,7 +1672,6 @@ const Wi = async (t, r) => {
1673
1672
  name: "text",
1674
1673
  type: "text",
1675
1674
  display: ge(t.display),
1676
- playbackRate: t.playbackRate || 1,
1677
1675
  details: {
1678
1676
  ...o,
1679
1677
  text: i.text || "",
@@ -1749,8 +1747,8 @@ function Pn(t = 16) {
1749
1747
  return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
1750
1748
  }
1751
1749
  const tn = (t) => Object.keys(t).reduce((r, n) => {
1752
- const { display: i } = t[n];
1753
- return Math.max(r, i.to);
1750
+ const { display: i, playbackRate: o } = t[n];
1751
+ return Math.max(r, i.to / (o || 1));
1754
1752
  }, 0);
1755
1753
  function qi(t) {
1756
1754
  const r = $t.pipe(
@@ -1768,12 +1766,12 @@ function qi(t) {
1768
1766
  ), d = r.subscribe(async (p) => {
1769
1767
  var h;
1770
1768
  if (p.key === hi) {
1771
- const l = (h = p.value) == null ? void 0 : h.payload, g = l.trackItemIds, v = l.trackItemDetailsMap, _ = g.map(async (m) => {
1772
- const b = v[m];
1773
- return (b.type === "caption" || b.type === "text") && await Je([
1769
+ const l = (h = p.value) == null ? void 0 : h.payload, g = l.trackItemIds, v = l.trackItemDetailsMap, _ = g.map(async (b) => {
1770
+ const y = v[b];
1771
+ return (y.type === "caption" || y.type === "text") && await Je([
1774
1772
  {
1775
- fontFamily: b.details.fontFamily,
1776
- url: b.details.fontUrl
1773
+ fontFamily: y.details.fontFamily,
1774
+ url: y.details.fontUrl
1777
1775
  }
1778
1776
  ]), !0;
1779
1777
  });
@@ -1784,56 +1782,56 @@ function qi(t) {
1784
1782
  }), E = o.subscribe((p) => {
1785
1783
  if (p.key === yi) return t.undo();
1786
1784
  if (p.key === mi) return t.redo();
1787
- }), R = i.subscribe((p) => {
1785
+ }), j = i.subscribe((p) => {
1788
1786
  var l, g, v;
1789
1787
  const h = [];
1790
1788
  if ((l = p.value) != null && l.payload.trackItemIds && (h.push((g = p.value) == null ? void 0 : g.payload.trackItemIds), t.updateState({ activeIds: h })), p.key === bi) {
1791
- const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds, m = tt(t.getState()), b = _ && _.length ? _ : m.activeIds, x = m.trackItemIds, O = m.trackItemDetailsMap, A = x.filter(
1792
- (F) => !b.includes(F)
1793
- ), C = Object.fromEntries(
1794
- Object.entries(O).filter(
1795
- ([F]) => !b.includes(F)
1789
+ const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds, b = tt(t.getState()), y = _ && _.length ? _ : b.activeIds, R = b.trackItemIds, A = b.trackItemDetailsMap, O = R.filter(
1790
+ (F) => !y.includes(F)
1791
+ ), D = Object.fromEntries(
1792
+ Object.entries(A).filter(
1793
+ ([F]) => !y.includes(F)
1796
1794
  )
1797
1795
  ), w = Xi(
1798
- m.tracks,
1799
- b
1796
+ b.tracks,
1797
+ y
1800
1798
  ), T = Object.fromEntries(
1801
- Object.entries(m.trackItemsMap).filter(
1802
- ([F]) => !b.includes(F)
1799
+ Object.entries(b.trackItemsMap).filter(
1800
+ ([F]) => !y.includes(F)
1803
1801
  )
1804
- ), M = tn(m.trackItemsMap);
1802
+ ), x = tn(b.trackItemsMap);
1805
1803
  t.updateState(
1806
1804
  {
1807
- trackItemIds: A,
1808
- trackItemDetailsMap: C,
1805
+ trackItemIds: O,
1806
+ trackItemDetailsMap: D,
1809
1807
  activeIds: [],
1810
1808
  trackItemsMap: T,
1811
1809
  tracks: w,
1812
- duration: M
1810
+ duration: x
1813
1811
  },
1814
1812
  { updateHistory: !0, kind: "remove" }
1815
1813
  );
1816
1814
  }
1817
1815
  }), S = n.subscribe(async (p) => {
1818
- var _, m, b, x, O;
1816
+ var _, b, y, R, A;
1819
1817
  const h = tt(t.getState());
1820
1818
  let l = [], g = "text";
1821
1819
  if (p.key === gi) {
1822
- const A = (_ = p.value) == null ? void 0 : _.payload, C = [];
1823
- for (const M of A) {
1824
- const F = Ki(M, {
1820
+ const O = (_ = p.value) == null ? void 0 : _.payload, D = [];
1821
+ for (const x of O) {
1822
+ const F = Ki(x, {
1825
1823
  size: {
1826
1824
  width: 1080,
1827
1825
  height: 1920
1828
1826
  }
1829
1827
  });
1830
- C.push(F);
1828
+ D.push(F);
1831
1829
  }
1832
- const w = await Promise.all(C), T = [];
1833
- for (const M of w) {
1834
- const F = M.id;
1830
+ const w = await Promise.all(D), T = [];
1831
+ for (const x of w) {
1832
+ const F = x.id;
1835
1833
  T.push(F);
1836
- const { details: Dt, ...Ct } = M;
1834
+ const { details: Dt, ...Ct } = x;
1837
1835
  h.trackItemDetailsMap[F] = {
1838
1836
  type: g,
1839
1837
  details: Dt
@@ -1843,49 +1841,49 @@ function qi(t) {
1843
1841
  }
1844
1842
  if (p.key === _i) {
1845
1843
  g = "text";
1846
- const A = await Yi((m = p.value) == null ? void 0 : m.payload, {
1844
+ const O = await Yi((b = p.value) == null ? void 0 : b.payload, {
1847
1845
  size: {
1848
1846
  width: 1080,
1849
1847
  height: 1920
1850
1848
  }
1851
- }), { details: C, ...w } = A;
1849
+ }), { details: D, ...w } = O;
1852
1850
  h.trackItemDetailsMap[w.id] = {
1853
1851
  type: g,
1854
- details: C
1852
+ details: D
1855
1853
  }, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
1856
1854
  }
1857
1855
  if (p.key === vi) {
1858
1856
  g = "image";
1859
- const A = await $i((b = p.value) == null ? void 0 : b.payload, {
1857
+ const O = await $i((y = p.value) == null ? void 0 : y.payload, {
1860
1858
  size: {
1861
1859
  width: 1080,
1862
1860
  height: 1920
1863
1861
  }
1864
- }), { details: C, ...w } = A;
1862
+ }), { details: D, ...w } = O;
1865
1863
  h.trackItemDetailsMap[w.id] = {
1866
1864
  type: g,
1867
- details: C
1865
+ details: D
1868
1866
  }, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
1869
1867
  }
1870
1868
  if (p.key === Ii) {
1871
1869
  g = "audio";
1872
- const A = await Bi((x = p.value) == null ? void 0 : x.payload), { details: C, ...w } = A;
1870
+ const O = await Bi((R = p.value) == null ? void 0 : R.payload), { details: D, ...w } = O;
1873
1871
  h.trackItemDetailsMap[w.id] = {
1874
1872
  type: g,
1875
- details: C
1873
+ details: D
1876
1874
  }, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
1877
1875
  }
1878
1876
  if (p.key === Si) {
1879
1877
  g = "video";
1880
- const A = await Wi((O = p.value) == null ? void 0 : O.payload, {
1878
+ const O = await Wi((A = p.value) == null ? void 0 : A.payload, {
1881
1879
  size: {
1882
1880
  width: 1080,
1883
1881
  height: 1920
1884
1882
  }
1885
- }), { details: C, ...w } = A;
1883
+ }), { details: D, ...w } = O;
1886
1884
  h.trackItemDetailsMap[w.id] = {
1887
1885
  type: g,
1888
- details: C
1886
+ details: D
1889
1887
  }, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
1890
1888
  }
1891
1889
  h.tracks.unshift({
@@ -1918,9 +1916,9 @@ function qi(t) {
1918
1916
  const v = l.activeIds[0], _ = l.trackItemsMap[v];
1919
1917
  if (g >= _.display.to || g <= _.display.from)
1920
1918
  return;
1921
- const m = l.trackItemDetailsMap[v], b = Pn(), x = {
1919
+ const b = l.trackItemDetailsMap[v], y = Pn(), R = {
1922
1920
  ..._,
1923
- id: b,
1921
+ id: y,
1924
1922
  display: {
1925
1923
  from: g,
1926
1924
  to: _.display.to
@@ -1930,8 +1928,8 @@ function qi(t) {
1930
1928
  to: _.display.to
1931
1929
  }
1932
1930
  };
1933
- l.trackItemsMap[v].display.to = g, l.trackItemsMap[b] = x, l.trackItemIds.push(b), l.trackItemDetailsMap[b] = m, l.tracks.forEach((O) => {
1934
- O.items.includes(v) && O.items.push(b);
1931
+ l.trackItemsMap[v].display.to = g, l.trackItemsMap[y] = R, l.trackItemIds.push(y), l.trackItemDetailsMap[y] = b, l.tracks.forEach((A) => {
1932
+ A.items.includes(v) && A.items.push(y);
1935
1933
  }), t.updateState(
1936
1934
  {
1937
1935
  trackItemDetailsMap: l.trackItemDetailsMap,
@@ -1956,20 +1954,20 @@ function qi(t) {
1956
1954
  trackItemsMap: {},
1957
1955
  tracks: []
1958
1956
  };
1959
- g.forEach((b) => {
1960
- _.trackItemDetailsMap[b] = l.trackItemDetailsMap[b], _.trackItemsMap[b] = l.trackItemsMap[b], v.push(
1961
- l.tracks.find((x) => x.items.includes(b))
1957
+ g.forEach((y) => {
1958
+ _.trackItemDetailsMap[y] = l.trackItemDetailsMap[y], _.trackItemsMap[y] = l.trackItemsMap[y], v.push(
1959
+ l.tracks.find((R) => R.items.includes(y))
1962
1960
  );
1963
1961
  });
1964
- const m = /* @__PURE__ */ new Set();
1965
- v.filter((b) => m.has(b.id) ? !1 : (m.add(b), !0)), _.tracks = Array.from(m.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
1962
+ const b = /* @__PURE__ */ new Set();
1963
+ v.filter((y) => b.has(y.id) ? !1 : (b.add(y), !0)), _.tracks = Array.from(b.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
1966
1964
  }
1967
1965
  }
1968
1966
  if (p.key === ki) {
1969
1967
  const l = localStorage.getItem("DesignComboTemp");
1970
1968
  if (!l) return;
1971
- const g = tt(t.getState()), v = JSON.parse(l), _ = {}, m = v.trackItemsMap, b = v.trackItemDetailsMap, x = v.tracks, O = [], A = v.activeIds.map(async (C) => {
1972
- const w = b[C];
1969
+ const g = tt(t.getState()), v = JSON.parse(l), _ = {}, b = v.trackItemsMap, y = v.trackItemDetailsMap, R = v.tracks, A = [], O = v.activeIds.map(async (D) => {
1970
+ const w = y[D];
1973
1971
  (w.type === "caption" || w.type === "text") && await Je([
1974
1972
  {
1975
1973
  fontFamily: w.details.fontFamily,
@@ -1977,19 +1975,19 @@ function qi(t) {
1977
1975
  }
1978
1976
  ]);
1979
1977
  const T = Pn();
1980
- return _[C] = T, g.trackItemsMap[T] = {
1981
- ...m[C],
1978
+ return _[D] = T, g.trackItemsMap[T] = {
1979
+ ...b[D],
1982
1980
  id: T
1983
1981
  }, g.trackItemDetailsMap[T] = w, g.trackItemIds.push(T), !0;
1984
1982
  });
1985
- await Promise.all(A), x.forEach((C) => {
1986
- const w = C.items.map((M) => _[M]), T = {
1987
- ...C,
1983
+ await Promise.all(O), R.forEach((D) => {
1984
+ const w = D.items.map((x) => _[x]), T = {
1985
+ ...D,
1988
1986
  items: w,
1989
1987
  id: fn()
1990
1988
  };
1991
- O.push(T);
1992
- }), g.tracks = [...g.tracks, ...O], t.updateState(
1989
+ A.push(T);
1990
+ }), g.tracks = [...g.tracks, ...A], t.updateState(
1993
1991
  {
1994
1992
  trackItemDetailsMap: g.trackItemDetailsMap,
1995
1993
  tracks: g.tracks,
@@ -2002,48 +2000,35 @@ function qi(t) {
2002
2000
  }
2003
2001
  );
2004
2002
  }
2005
- }), y = f.subscribe((p) => {
2003
+ }), m = f.subscribe((p) => {
2006
2004
  var h, l;
2007
2005
  if (p.key === Ai) {
2008
- const g = tt(t.getState()), v = g.trackItemDetailsMap, _ = g.trackItemsMap, m = Object.keys((h = p.value) == null ? void 0 : h.payload);
2009
- if (!m.length) return;
2010
- const b = (l = p.value) == null ? void 0 : l.payload;
2011
- if (m.length === 1) {
2012
- const x = m[0], O = b[x];
2013
- if (!O.playbackRate) return;
2014
- _[x].playbackRate = O.playbackRate;
2015
- const A = tn(_);
2016
- t.updateState(
2017
- {
2018
- trackItemsMap: { ..._ },
2019
- duration: A
2020
- },
2021
- {
2022
- updateHistory: !0,
2023
- kind: "update:details"
2024
- }
2025
- );
2026
- } else
2027
- m.forEach((x) => {
2028
- b[x].details && (v[x].details = {
2029
- ...v[x].details,
2030
- ...b[x].details
2031
- });
2032
- }), t.updateState(
2033
- {
2034
- trackItemDetailsMap: { ...v },
2035
- trackItemsMap: { ..._ }
2036
- },
2037
- {
2038
- updateHistory: !0,
2039
- kind: "update:details"
2040
- }
2041
- );
2006
+ const g = tt(t.getState()), v = g.trackItemDetailsMap, _ = g.trackItemsMap, b = Object.keys((h = p.value) == null ? void 0 : h.payload);
2007
+ if (!b.length) return;
2008
+ const y = (l = p.value) == null ? void 0 : l.payload;
2009
+ b.forEach((A) => {
2010
+ y[A].details ? v[A].details = {
2011
+ ...v[A].details,
2012
+ ...y[A].details
2013
+ } : y[A].playbackRate && (_[A].playbackRate = y[A].playbackRate);
2014
+ });
2015
+ const R = tn(_);
2016
+ t.updateState(
2017
+ {
2018
+ trackItemDetailsMap: { ...v },
2019
+ trackItemsMap: { ..._ },
2020
+ duration: R
2021
+ },
2022
+ {
2023
+ updateHistory: !0,
2024
+ kind: "update:details"
2025
+ }
2026
+ );
2042
2027
  }
2043
2028
  });
2044
2029
  return {
2045
2030
  unsubscribe: () => {
2046
- S.unsubscribe(), N.unsubscribe(), y.unsubscribe(), E.unsubscribe(), R.unsubscribe(), d.unsubscribe();
2031
+ S.unsubscribe(), N.unsubscribe(), m.unsubscribe(), E.unsubscribe(), j.unsubscribe(), d.unsubscribe();
2047
2032
  }
2048
2033
  };
2049
2034
  }
@@ -2052,34 +2037,34 @@ function Zn(t, r, n = { cyclesFix: !0 }, i = []) {
2052
2037
  var d, E;
2053
2038
  let o = [];
2054
2039
  const c = Array.isArray(t);
2055
- for (const R in t) {
2056
- const S = t[R], N = c ? +R : R;
2057
- if (!(R in r)) {
2040
+ for (const j in t) {
2041
+ const S = t[j], N = c ? +j : j;
2042
+ if (!(j in r)) {
2058
2043
  o.push({
2059
2044
  type: "REMOVE",
2060
2045
  path: [N],
2061
- oldValue: t[R]
2046
+ oldValue: t[j]
2062
2047
  });
2063
2048
  continue;
2064
2049
  }
2065
- const y = r[R], p = typeof S == "object" && typeof y == "object" && Array.isArray(S) === Array.isArray(y);
2066
- if (S && y && p && !Ji[(E = (d = Object.getPrototypeOf(S)) == null ? void 0 : d.constructor) == null ? void 0 : E.name] && (!n.cyclesFix || !i.includes(S))) {
2067
- const h = Zn(S, y, n, n.cyclesFix ? i.concat([S]) : []);
2050
+ const m = r[j], p = typeof S == "object" && typeof m == "object" && Array.isArray(S) === Array.isArray(m);
2051
+ if (S && m && p && !Ji[(E = (d = Object.getPrototypeOf(S)) == null ? void 0 : d.constructor) == null ? void 0 : E.name] && (!n.cyclesFix || !i.includes(S))) {
2052
+ const h = Zn(S, m, n, n.cyclesFix ? i.concat([S]) : []);
2068
2053
  o.push.apply(o, h.map((l) => (l.path.unshift(N), l)));
2069
- } else S !== y && // treat NaN values as equivalent
2070
- !(Number.isNaN(S) && Number.isNaN(y)) && !(p && (isNaN(S) ? S + "" == y + "" : +S == +y)) && o.push({
2054
+ } else S !== m && // treat NaN values as equivalent
2055
+ !(Number.isNaN(S) && Number.isNaN(m)) && !(p && (isNaN(S) ? S + "" == m + "" : +S == +m)) && o.push({
2071
2056
  path: [N],
2072
2057
  type: "CHANGE",
2073
- value: y,
2058
+ value: m,
2074
2059
  oldValue: S
2075
2060
  });
2076
2061
  }
2077
2062
  const f = Array.isArray(r);
2078
- for (const R in r)
2079
- R in t || o.push({
2063
+ for (const j in r)
2064
+ j in t || o.push({
2080
2065
  type: "CREATE",
2081
- path: [f ? +R : R],
2082
- value: r[R]
2066
+ path: [f ? +j : j],
2067
+ value: r[j]
2083
2068
  });
2084
2069
  return o;
2085
2070
  }
@@ -2444,8 +2429,8 @@ var sa = class {
2444
2429
  const c = n;
2445
2430
  n = r;
2446
2431
  const f = this;
2447
- return function(E = c, ...R) {
2448
- return f.produce(E, (S) => n.call(this, S, ...R));
2432
+ return function(E = c, ...j) {
2433
+ return f.produce(E, (S) => n.call(this, S, ...j));
2449
2434
  };
2450
2435
  }
2451
2436
  typeof n != "function" && G(6), i !== void 0 && typeof i != "function" && G(7);
@@ -2545,117 +2530,117 @@ function ii(t) {
2545
2530
  function Fn() {
2546
2531
  process.env.NODE_ENV !== "production" && Qn.push(
2547
2532
  'Sets cannot have "replace" patches.',
2548
- function(y) {
2549
- return "Unsupported patch operation: " + y;
2533
+ function(m) {
2534
+ return "Unsupported patch operation: " + m;
2550
2535
  },
2551
- function(y) {
2552
- return "Cannot apply patch, path doesn't resolve: " + y;
2536
+ function(m) {
2537
+ return "Cannot apply patch, path doesn't resolve: " + m;
2553
2538
  },
2554
2539
  "Patching reserved attributes like __proto__, prototype and constructor is not allowed"
2555
2540
  );
2556
2541
  const r = "replace", n = "add", i = "remove";
2557
- function o(y, p, h, l) {
2558
- switch (y.type_) {
2542
+ function o(m, p, h, l) {
2543
+ switch (m.type_) {
2559
2544
  case 0:
2560
2545
  case 2:
2561
2546
  return f(
2562
- y,
2547
+ m,
2563
2548
  p,
2564
2549
  h,
2565
2550
  l
2566
2551
  );
2567
2552
  case 1:
2568
- return c(y, p, h, l);
2553
+ return c(m, p, h, l);
2569
2554
  case 3:
2570
2555
  return d(
2571
- y,
2556
+ m,
2572
2557
  p,
2573
2558
  h,
2574
2559
  l
2575
2560
  );
2576
2561
  }
2577
2562
  }
2578
- function c(y, p, h, l) {
2579
- let { base_: g, assigned_: v } = y, _ = y.copy_;
2563
+ function c(m, p, h, l) {
2564
+ let { base_: g, assigned_: v } = m, _ = m.copy_;
2580
2565
  _.length < g.length && ([g, _] = [_, g], [h, l] = [l, h]);
2581
- for (let m = 0; m < g.length; m++)
2582
- if (v[m] && _[m] !== g[m]) {
2583
- const b = p.concat([m]);
2566
+ for (let b = 0; b < g.length; b++)
2567
+ if (v[b] && _[b] !== g[b]) {
2568
+ const y = p.concat([b]);
2584
2569
  h.push({
2585
2570
  op: r,
2586
- path: b,
2571
+ path: y,
2587
2572
  // Need to maybe clone it, as it can in fact be the original value
2588
2573
  // due to the base/copy inversion at the start of this function
2589
- value: N(_[m])
2574
+ value: N(_[b])
2590
2575
  }), l.push({
2591
2576
  op: r,
2592
- path: b,
2593
- value: N(g[m])
2577
+ path: y,
2578
+ value: N(g[b])
2594
2579
  });
2595
2580
  }
2596
- for (let m = g.length; m < _.length; m++) {
2597
- const b = p.concat([m]);
2581
+ for (let b = g.length; b < _.length; b++) {
2582
+ const y = p.concat([b]);
2598
2583
  h.push({
2599
2584
  op: n,
2600
- path: b,
2585
+ path: y,
2601
2586
  // Need to maybe clone it, as it can in fact be the original value
2602
2587
  // due to the base/copy inversion at the start of this function
2603
- value: N(_[m])
2588
+ value: N(_[b])
2604
2589
  });
2605
2590
  }
2606
- for (let m = _.length - 1; g.length <= m; --m) {
2607
- const b = p.concat([m]);
2591
+ for (let b = _.length - 1; g.length <= b; --b) {
2592
+ const y = p.concat([b]);
2608
2593
  l.push({
2609
2594
  op: i,
2610
- path: b
2595
+ path: y
2611
2596
  });
2612
2597
  }
2613
2598
  }
2614
- function f(y, p, h, l) {
2615
- const { base_: g, copy_: v } = y;
2616
- de(y.assigned_, (_, m) => {
2617
- const b = en(g, _), x = en(v, _), O = m ? he(g, _) ? r : n : i;
2618
- if (b === x && O === r)
2599
+ function f(m, p, h, l) {
2600
+ const { base_: g, copy_: v } = m;
2601
+ de(m.assigned_, (_, b) => {
2602
+ const y = en(g, _), R = en(v, _), A = b ? he(g, _) ? r : n : i;
2603
+ if (y === R && A === r)
2619
2604
  return;
2620
- const A = p.concat(_);
2621
- h.push(O === i ? { op: O, path: A } : { op: O, path: A, value: x }), l.push(
2622
- O === n ? { op: i, path: A } : O === i ? { op: n, path: A, value: N(b) } : { op: r, path: A, value: N(b) }
2605
+ const O = p.concat(_);
2606
+ h.push(A === i ? { op: A, path: O } : { op: A, path: O, value: R }), l.push(
2607
+ A === n ? { op: i, path: O } : A === i ? { op: n, path: O, value: N(y) } : { op: r, path: O, value: N(y) }
2623
2608
  );
2624
2609
  });
2625
2610
  }
2626
- function d(y, p, h, l) {
2627
- let { base_: g, copy_: v } = y, _ = 0;
2628
- g.forEach((m) => {
2629
- if (!v.has(m)) {
2630
- const b = p.concat([_]);
2611
+ function d(m, p, h, l) {
2612
+ let { base_: g, copy_: v } = m, _ = 0;
2613
+ g.forEach((b) => {
2614
+ if (!v.has(b)) {
2615
+ const y = p.concat([_]);
2631
2616
  h.push({
2632
2617
  op: i,
2633
- path: b,
2634
- value: m
2618
+ path: y,
2619
+ value: b
2635
2620
  }), l.unshift({
2636
2621
  op: n,
2637
- path: b,
2638
- value: m
2622
+ path: y,
2623
+ value: b
2639
2624
  });
2640
2625
  }
2641
2626
  _++;
2642
- }), _ = 0, v.forEach((m) => {
2643
- if (!g.has(m)) {
2644
- const b = p.concat([_]);
2627
+ }), _ = 0, v.forEach((b) => {
2628
+ if (!g.has(b)) {
2629
+ const y = p.concat([_]);
2645
2630
  h.push({
2646
2631
  op: n,
2647
- path: b,
2648
- value: m
2632
+ path: y,
2633
+ value: b
2649
2634
  }), l.unshift({
2650
2635
  op: i,
2651
- path: b,
2652
- value: m
2636
+ path: y,
2637
+ value: b
2653
2638
  });
2654
2639
  }
2655
2640
  _++;
2656
2641
  });
2657
2642
  }
2658
- function E(y, p, h, l) {
2643
+ function E(m, p, h, l) {
2659
2644
  h.push({
2660
2645
  op: r,
2661
2646
  path: [],
@@ -2663,77 +2648,77 @@ function Fn() {
2663
2648
  }), l.push({
2664
2649
  op: r,
2665
2650
  path: [],
2666
- value: y
2651
+ value: m
2667
2652
  });
2668
2653
  }
2669
- function R(y, p) {
2654
+ function j(m, p) {
2670
2655
  return p.forEach((h) => {
2671
2656
  const { path: l, op: g } = h;
2672
- let v = y;
2673
- for (let x = 0; x < l.length - 1; x++) {
2674
- const O = Mt(v);
2675
- let A = l[x];
2676
- typeof A != "string" && typeof A != "number" && (A = "" + A), (O === 0 || O === 1) && (A === "__proto__" || A === "constructor") && G(19), typeof v == "function" && A === "prototype" && G(19), v = en(v, A), typeof v != "object" && G(18, l.join("/"));
2657
+ let v = m;
2658
+ for (let R = 0; R < l.length - 1; R++) {
2659
+ const A = Mt(v);
2660
+ let O = l[R];
2661
+ typeof O != "string" && typeof O != "number" && (O = "" + O), (A === 0 || A === 1) && (O === "__proto__" || O === "constructor") && G(19), typeof v == "function" && O === "prototype" && G(19), v = en(v, O), typeof v != "object" && G(18, l.join("/"));
2677
2662
  }
2678
- const _ = Mt(v), m = S(h.value), b = l[l.length - 1];
2663
+ const _ = Mt(v), b = S(h.value), y = l[l.length - 1];
2679
2664
  switch (g) {
2680
2665
  case r:
2681
2666
  switch (_) {
2682
2667
  case 2:
2683
- return v.set(b, m);
2668
+ return v.set(y, b);
2684
2669
  case 3:
2685
2670
  G(16);
2686
2671
  default:
2687
- return v[b] = m;
2672
+ return v[y] = b;
2688
2673
  }
2689
2674
  case n:
2690
2675
  switch (_) {
2691
2676
  case 1:
2692
- return b === "-" ? v.push(m) : v.splice(b, 0, m);
2677
+ return y === "-" ? v.push(b) : v.splice(y, 0, b);
2693
2678
  case 2:
2694
- return v.set(b, m);
2679
+ return v.set(y, b);
2695
2680
  case 3:
2696
- return v.add(m);
2681
+ return v.add(b);
2697
2682
  default:
2698
- return v[b] = m;
2683
+ return v[y] = b;
2699
2684
  }
2700
2685
  case i:
2701
2686
  switch (_) {
2702
2687
  case 1:
2703
- return v.splice(b, 1);
2688
+ return v.splice(y, 1);
2704
2689
  case 2:
2705
- return v.delete(b);
2690
+ return v.delete(y);
2706
2691
  case 3:
2707
2692
  return v.delete(h.value);
2708
2693
  default:
2709
- return delete v[b];
2694
+ return delete v[y];
2710
2695
  }
2711
2696
  default:
2712
2697
  G(17, g);
2713
2698
  }
2714
- }), y;
2715
- }
2716
- function S(y) {
2717
- if (!gt(y))
2718
- return y;
2719
- if (Array.isArray(y))
2720
- return y.map(S);
2721
- if (_e(y))
2699
+ }), m;
2700
+ }
2701
+ function S(m) {
2702
+ if (!gt(m))
2703
+ return m;
2704
+ if (Array.isArray(m))
2705
+ return m.map(S);
2706
+ if (_e(m))
2722
2707
  return new Map(
2723
- Array.from(y.entries()).map(([h, l]) => [h, S(l)])
2708
+ Array.from(m.entries()).map(([h, l]) => [h, S(l)])
2724
2709
  );
2725
- if (ve(y))
2726
- return new Set(Array.from(y).map(S));
2727
- const p = Object.create(Ot(y));
2728
- for (const h in y)
2729
- p[h] = S(y[h]);
2730
- return he(y, pe) && (p[pe] = y[pe]), p;
2710
+ if (ve(m))
2711
+ return new Set(Array.from(m).map(S));
2712
+ const p = Object.create(Ot(m));
2713
+ for (const h in m)
2714
+ p[h] = S(m[h]);
2715
+ return he(m, pe) && (p[pe] = m[pe]), p;
2731
2716
  }
2732
- function N(y) {
2733
- return xt(y) ? S(y) : y;
2717
+ function N(m) {
2718
+ return xt(m) ? S(m) : m;
2734
2719
  }
2735
2720
  ea("Patches", {
2736
- applyPatches_: R,
2721
+ applyPatches_: j,
2737
2722
  generatePatches_: o,
2738
2723
  generateReplacementPatches_: E
2739
2724
  });
@@ -2980,59 +2965,59 @@ class Wa {
2980
2965
  tracks: f,
2981
2966
  transitionIds: d,
2982
2967
  transitionsMap: E,
2983
- trackItemsMap: R
2968
+ trackItemsMap: j
2984
2969
  } = this.getState(), S = tt({
2985
2970
  trackItemDetailsMap: o,
2986
2971
  trackItemIds: c,
2987
2972
  tracks: f,
2988
2973
  transitionIds: d,
2989
2974
  transitionsMap: E,
2990
- trackItemsMap: R
2991
- }), N = [], y = [], p = [], h = [], l = [], g = [];
2975
+ trackItemsMap: j
2976
+ }), N = [], m = [], p = [], h = [], l = [], g = [];
2992
2977
  n.forEach((T) => {
2993
- let M;
2978
+ let x;
2994
2979
  const F = T.path.slice(1);
2995
- T.type === "CREATE" ? M = {
2980
+ T.type === "CREATE" ? x = {
2996
2981
  path: F,
2997
2982
  op: "remove",
2998
2983
  value: T.value
2999
- } : T.type === "CHANGE" ? M = {
2984
+ } : T.type === "CHANGE" ? x = {
3000
2985
  path: F,
3001
2986
  op: "replace",
3002
2987
  value: T.oldValue
3003
- } : M = {
2988
+ } : x = {
3004
2989
  path: F,
3005
2990
  op: "add",
3006
2991
  value: T.oldValue
3007
- }, T.path.includes("trackItemIds") ? p.push(M) : T.path.includes("transitionIds") ? y.push(M) : T.path.includes("trackItemsMap") ? l.push(M) : T.path.includes("transitionsMap") ? h.push(M) : T.path.includes("tracks") ? N.push(M) : T.path.includes("trackItemDetailsMap") && g.push(M);
2992
+ }, T.path.includes("trackItemIds") ? p.push(x) : T.path.includes("transitionIds") ? m.push(x) : T.path.includes("trackItemsMap") ? l.push(x) : T.path.includes("transitionsMap") ? h.push(x) : T.path.includes("tracks") ? N.push(x) : T.path.includes("trackItemDetailsMap") && g.push(x);
3008
2993
  });
3009
2994
  const v = this.applyPatch(
3010
2995
  S.tracks,
3011
2996
  N
3012
2997
  ), _ = this.applyPatch(
3013
2998
  S.transitionIds,
3014
- y
3015
- ), m = this.applyPatch(
2999
+ m
3000
+ ), b = this.applyPatch(
3016
3001
  S.trackItemIds,
3017
3002
  p
3018
- ), b = this.applyPatch(
3003
+ ), y = this.applyPatch(
3019
3004
  S.transitionsMap,
3020
3005
  h
3021
- ), x = this.applyPatch(
3006
+ ), R = this.applyPatch(
3022
3007
  S.trackItemsMap,
3023
3008
  l
3024
- ), O = this.applyPatch(
3009
+ ), A = this.applyPatch(
3025
3010
  S.trackItemDetailsMap,
3026
3011
  g
3027
- ), A = tt({
3012
+ ), O = tt({
3028
3013
  tracks: v,
3029
3014
  transitionIds: _,
3030
- trackItemIds: m,
3031
- transitionsMap: b,
3032
- trackItemsMap: x,
3033
- trackItemDetailsMap: O
3034
- }), C = tt(this.getState()), w = { ...C, ...A };
3035
- this.prevState = C, this.redos.push({ redos: n, type: i }), this.stateSubject.next(w), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
3015
+ trackItemIds: b,
3016
+ transitionsMap: y,
3017
+ trackItemsMap: R,
3018
+ trackItemDetailsMap: A
3019
+ }), D = tt(this.getState()), w = { ...D, ...O };
3020
+ this.prevState = D, this.redos.push({ redos: n, type: i }), this.stateSubject.next(w), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
3036
3021
  }
3037
3022
  applyPatch(r, n) {
3038
3023
  return n.reverse().reduce((i, o) => ca(i, (c) => {
@@ -3049,59 +3034,59 @@ class Wa {
3049
3034
  tracks: f,
3050
3035
  transitionIds: d,
3051
3036
  transitionsMap: E,
3052
- trackItemsMap: R
3037
+ trackItemsMap: j
3053
3038
  } = this.getState(), S = tt({
3054
3039
  trackItemDetailsMap: o,
3055
3040
  trackItemIds: c,
3056
3041
  tracks: f,
3057
3042
  transitionIds: d,
3058
3043
  transitionsMap: E,
3059
- trackItemsMap: R
3060
- }), N = [], y = [], p = [], h = [], l = [], g = [];
3044
+ trackItemsMap: j
3045
+ }), N = [], m = [], p = [], h = [], l = [], g = [];
3061
3046
  n.forEach((T) => {
3062
- let M;
3047
+ let x;
3063
3048
  const F = T.path.slice(1);
3064
- T.type === "CREATE" ? M = {
3049
+ T.type === "CREATE" ? x = {
3065
3050
  path: F,
3066
3051
  op: "add",
3067
3052
  value: T.value
3068
- } : T.type === "CHANGE" ? M = {
3053
+ } : T.type === "CHANGE" ? x = {
3069
3054
  path: F,
3070
3055
  op: "replace",
3071
3056
  value: T.value
3072
- } : M = {
3057
+ } : x = {
3073
3058
  path: F,
3074
3059
  op: "remove",
3075
3060
  value: T.oldValue
3076
- }, T.path.includes("trackItemIds") ? p.push(M) : T.path.includes("transitionIds") ? y.push(M) : T.path.includes("trackItemsMap") ? l.push(M) : T.path.includes("transitionsMap") ? h.push(M) : T.path.includes("trackItemDetailsMap") ? g.push(M) : N.push(M);
3061
+ }, T.path.includes("trackItemIds") ? p.push(x) : T.path.includes("transitionIds") ? m.push(x) : T.path.includes("trackItemsMap") ? l.push(x) : T.path.includes("transitionsMap") ? h.push(x) : T.path.includes("trackItemDetailsMap") ? g.push(x) : N.push(x);
3077
3062
  });
3078
3063
  const v = this.applyPatch(
3079
3064
  S.tracks,
3080
3065
  N
3081
3066
  ), _ = this.applyPatch(
3082
3067
  S.transitionIds,
3083
- y
3084
- ), m = this.applyPatch(
3068
+ m
3069
+ ), b = this.applyPatch(
3085
3070
  S.trackItemIds,
3086
3071
  p
3087
- ), b = this.applyPatch(
3072
+ ), y = this.applyPatch(
3088
3073
  S.transitionsMap,
3089
3074
  h
3090
- ), x = this.applyPatch(
3075
+ ), R = this.applyPatch(
3091
3076
  S.trackItemsMap,
3092
3077
  l
3093
- ), O = this.applyPatch(
3078
+ ), A = this.applyPatch(
3094
3079
  S.trackItemDetailsMap,
3095
3080
  g
3096
- ), A = tt({
3081
+ ), O = tt({
3097
3082
  tracks: v,
3098
3083
  transitionIds: _,
3099
- trackItemIds: m,
3100
- transitionsMap: b,
3101
- trackItemsMap: x,
3102
- trackItemDetailsMap: O
3103
- }), C = tt(this.getState()), w = { ...C, ...A };
3104
- this.prevState = C, this.undos.push({ undos: n, type: i }), this.stateSubject.next(w), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
3084
+ trackItemIds: b,
3085
+ transitionsMap: y,
3086
+ trackItemsMap: R,
3087
+ trackItemDetailsMap: A
3088
+ }), D = tt(this.getState()), w = { ...D, ...O };
3089
+ this.prevState = D, this.undos.push({ undos: n, type: i }), this.stateSubject.next(w), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
3105
3090
  }
3106
3091
  }
3107
3092
  export {