@cliquify.me/state 4.0.18 → 4.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +326 -320
- package/dist/index.umd.js +1 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -101,10 +101,10 @@ var Ar = function() {
|
|
|
101
101
|
}
|
|
102
102
|
else
|
|
103
103
|
c.remove(this);
|
|
104
|
-
var
|
|
105
|
-
if (Ct(
|
|
104
|
+
var m = this.initialTeardown;
|
|
105
|
+
if (Ct(m))
|
|
106
106
|
try {
|
|
107
|
-
|
|
107
|
+
m();
|
|
108
108
|
} catch (k) {
|
|
109
109
|
o = k instanceof pn ? k.errors : [k];
|
|
110
110
|
}
|
|
@@ -112,10 +112,10 @@ var Ar = function() {
|
|
|
112
112
|
if (b) {
|
|
113
113
|
this._finalizers = null;
|
|
114
114
|
try {
|
|
115
|
-
for (var
|
|
116
|
-
var
|
|
115
|
+
for (var h = kn(b), I = h.next(); !I.done; I = h.next()) {
|
|
116
|
+
var v = I.value;
|
|
117
117
|
try {
|
|
118
|
-
Un(
|
|
118
|
+
Un(v);
|
|
119
119
|
} catch (k) {
|
|
120
120
|
o = o ?? [], k instanceof pn ? o = _n(_n([], vn(o)), vn(k.errors)) : o.push(k);
|
|
121
121
|
}
|
|
@@ -124,7 +124,7 @@ var Ar = function() {
|
|
|
124
124
|
n = { error: k };
|
|
125
125
|
} finally {
|
|
126
126
|
try {
|
|
127
|
-
I && !I.done && (i =
|
|
127
|
+
I && !I.done && (i = h.return) && i.call(h);
|
|
128
128
|
} finally {
|
|
129
129
|
if (n) throw n.error;
|
|
130
130
|
}
|
|
@@ -492,8 +492,8 @@ function Cn(t) {
|
|
|
492
492
|
var vr = { exports: {} };
|
|
493
493
|
vr.exports;
|
|
494
494
|
(function(t, r) {
|
|
495
|
-
var e = 200, n = "__lodash_hash_undefined__", i = 1, o = 2, c = 9007199254740991, u = "[object Arguments]", d = "[object Array]", p = "[object AsyncFunction]",
|
|
496
|
-
$[tt] = $[Xt] = $[Kt] = $[Ie] = $[be] = $[ke] = $[ve] = $[z] = $[_e] = !0, $[u] = $[d] = $[x] = $[
|
|
495
|
+
var e = 200, n = "__lodash_hash_undefined__", i = 1, o = 2, c = 9007199254740991, u = "[object Arguments]", d = "[object Array]", p = "[object AsyncFunction]", m = "[object Boolean]", b = "[object Date]", h = "[object Error]", I = "[object Function]", v = "[object GeneratorFunction]", k = "[object Map]", w = "[object Number]", f = "[object Null]", y = "[object Object]", _ = "[object Promise]", S = "[object Proxy]", A = "[object RegExp]", E = "[object Set]", T = "[object String]", H = "[object Symbol]", R = "[object Undefined]", V = "[object WeakMap]", x = "[object ArrayBuffer]", F = "[object DataView]", tt = "[object Float32Array]", Xt = "[object Float64Array]", Kt = "[object Int8Array]", Ie = "[object Int16Array]", be = "[object Int32Array]", ke = "[object Uint8Array]", ve = "[object Uint8ClampedArray]", z = "[object Uint16Array]", _e = "[object Uint32Array]", Se = /[\\^$.*+?()[\]{}|]/g, st = /^\[object .+?Constructor\]$/, Vt = /^(?:0|[1-9]\d*)$/, $ = {};
|
|
496
|
+
$[tt] = $[Xt] = $[Kt] = $[Ie] = $[be] = $[ke] = $[ve] = $[z] = $[_e] = !0, $[u] = $[d] = $[x] = $[m] = $[F] = $[b] = $[h] = $[I] = $[k] = $[w] = $[y] = $[A] = $[E] = $[T] = $[V] = !1;
|
|
497
497
|
var qt = typeof dt == "object" && dt && dt.Object === Object && dt, we = typeof self == "object" && self && self.Object === Object && self, it = qt || we || Function("return this")(), Jt = r && !r.nodeType && r, Zt = Jt && !0 && t && !t.nodeType && t, Rt = Zt && Zt.exports === Jt, Pt = Rt && qt.process, Qt = function() {
|
|
498
498
|
try {
|
|
499
499
|
return Pt && Pt.binding && Pt.binding("util");
|
|
@@ -793,11 +793,11 @@ vr.exports;
|
|
|
793
793
|
s = s.buffer, a = a.buffer;
|
|
794
794
|
case x:
|
|
795
795
|
return !(s.byteLength != a.byteLength || !M(new ae(s), new ae(a)));
|
|
796
|
-
case
|
|
796
|
+
case m:
|
|
797
797
|
case b:
|
|
798
798
|
case w:
|
|
799
799
|
return fr(+s, +a);
|
|
800
|
-
case
|
|
800
|
+
case h:
|
|
801
801
|
return s.name == a.name && s.message == a.message;
|
|
802
802
|
case A:
|
|
803
803
|
case T:
|
|
@@ -877,7 +877,7 @@ vr.exports;
|
|
|
877
877
|
return At.call(s, a);
|
|
878
878
|
}));
|
|
879
879
|
} : dn, bt = ue;
|
|
880
|
-
(Le && bt(new Le(new ArrayBuffer(1))) != F || ce && bt(new ce()) != k || Ne && bt(Ne.resolve()) !=
|
|
880
|
+
(Le && bt(new Le(new ArrayBuffer(1))) != F || ce && bt(new ce()) != k || Ne && bt(Ne.resolve()) != _ || He && bt(new He()) != E || Ue && bt(new Ue()) != V) && (bt = function(s) {
|
|
881
881
|
var a = ue(s), l = a == y ? s.constructor : void 0, g = l ? rt(l) : "";
|
|
882
882
|
if (g)
|
|
883
883
|
switch (g) {
|
|
@@ -886,7 +886,7 @@ vr.exports;
|
|
|
886
886
|
case Et:
|
|
887
887
|
return k;
|
|
888
888
|
case xr:
|
|
889
|
-
return
|
|
889
|
+
return _;
|
|
890
890
|
case Or:
|
|
891
891
|
return E;
|
|
892
892
|
case Cr:
|
|
@@ -943,7 +943,7 @@ vr.exports;
|
|
|
943
943
|
if (!mr(s))
|
|
944
944
|
return !1;
|
|
945
945
|
var a = ue(s);
|
|
946
|
-
return a == I || a ==
|
|
946
|
+
return a == I || a == v || a == p || a == S;
|
|
947
947
|
}
|
|
948
948
|
function Xe(s) {
|
|
949
949
|
return typeof s == "number" && s > -1 && s % 1 == 0 && s <= c;
|
|
@@ -972,8 +972,8 @@ const W = /* @__PURE__ */ Cn(Zs), Io = "add", Qs = "track", ti = "trackItems", b
|
|
|
972
972
|
var _r = { exports: {} };
|
|
973
973
|
_r.exports;
|
|
974
974
|
(function(t, r) {
|
|
975
|
-
var e = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, o = "[object Arguments]", c = "[object Array]", u = "[object Boolean]", d = "[object Date]", p = "[object Error]",
|
|
976
|
-
z[o] = z[c] = z[A] = z[E] = z[u] = z[d] = z[T] = z[H] = z[R] = z[V] = z[x] = z[
|
|
975
|
+
var e = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, o = "[object Arguments]", c = "[object Array]", u = "[object Boolean]", d = "[object Date]", p = "[object Error]", m = "[object Function]", b = "[object GeneratorFunction]", h = "[object Map]", I = "[object Number]", v = "[object Object]", k = "[object Promise]", w = "[object RegExp]", f = "[object Set]", y = "[object String]", _ = "[object Symbol]", S = "[object WeakMap]", A = "[object ArrayBuffer]", E = "[object DataView]", T = "[object Float32Array]", H = "[object Float64Array]", R = "[object Int8Array]", V = "[object Int16Array]", x = "[object Int32Array]", F = "[object Uint8Array]", tt = "[object Uint8ClampedArray]", Xt = "[object Uint16Array]", Kt = "[object Uint32Array]", Ie = /[\\^$.*+?()[\]{}|]/g, be = /\w*$/, ke = /^\[object .+?Constructor\]$/, ve = /^(?:0|[1-9]\d*)$/, z = {};
|
|
976
|
+
z[o] = z[c] = z[A] = z[E] = z[u] = z[d] = z[T] = z[H] = z[R] = z[V] = z[x] = z[h] = z[I] = z[v] = z[w] = z[f] = z[y] = z[_] = z[F] = z[tt] = z[Xt] = z[Kt] = !0, z[p] = z[m] = z[S] = !1;
|
|
977
977
|
var _e = typeof dt == "object" && dt && dt.Object === Object && dt, Se = typeof self == "object" && self && self.Object === Object && self, st = _e || Se || Function("return this")(), Vt = r && !r.nodeType && r, $ = Vt && !0 && t && !t.nodeType && t, qt = $ && $.exports === Vt;
|
|
978
978
|
function we(s, a) {
|
|
979
979
|
return s.set(a[0], a[1]), s;
|
|
@@ -1178,10 +1178,10 @@ _r.exports;
|
|
|
1178
1178
|
if (P = sn(s), !a)
|
|
1179
1179
|
return en(s, P);
|
|
1180
1180
|
} else {
|
|
1181
|
-
var L = xt(s), J = L ==
|
|
1181
|
+
var L = xt(s), J = L == m || L == b;
|
|
1182
1182
|
if (hr(s))
|
|
1183
1183
|
return Re(s, a);
|
|
1184
|
-
if (L ==
|
|
1184
|
+
if (L == v || L == o || J && !M) {
|
|
1185
1185
|
if (Dt(s))
|
|
1186
1186
|
return M ? s : {};
|
|
1187
1187
|
if (P = bt(J ? {} : s), !a)
|
|
@@ -1288,14 +1288,14 @@ _r.exports;
|
|
|
1288
1288
|
return qr(l) ? l : void 0;
|
|
1289
1289
|
}
|
|
1290
1290
|
var Mt = Lt ? zt(Lt, Object) : dn, xt = Vr;
|
|
1291
|
-
(At && xt(new At(new ArrayBuffer(1))) != E || yt && xt(new yt()) !=
|
|
1292
|
-
var a = St.call(s), l = a ==
|
|
1291
|
+
(At && xt(new At(new ArrayBuffer(1))) != E || yt && xt(new yt()) != h || ht && xt(ht.resolve()) != k || xe && xt(new xe()) != f || Fe && xt(new Fe()) != S) && (xt = function(s) {
|
|
1292
|
+
var a = St.call(s), l = a == v ? s.constructor : void 0, g = l ? rt(l) : void 0;
|
|
1293
1293
|
if (g)
|
|
1294
1294
|
switch (g) {
|
|
1295
1295
|
case Le:
|
|
1296
1296
|
return E;
|
|
1297
1297
|
case ce:
|
|
1298
|
-
return
|
|
1298
|
+
return h;
|
|
1299
1299
|
case Ne:
|
|
1300
1300
|
return k;
|
|
1301
1301
|
case He:
|
|
@@ -1332,7 +1332,7 @@ _r.exports;
|
|
|
1332
1332
|
case Xt:
|
|
1333
1333
|
case Kt:
|
|
1334
1334
|
return tn(s, g);
|
|
1335
|
-
case
|
|
1335
|
+
case h:
|
|
1336
1336
|
return ur(s, g, l);
|
|
1337
1337
|
case I:
|
|
1338
1338
|
case y:
|
|
@@ -1341,7 +1341,7 @@ _r.exports;
|
|
|
1341
1341
|
return lr(s);
|
|
1342
1342
|
case f:
|
|
1343
1343
|
return Zr(s, g, l);
|
|
1344
|
-
case
|
|
1344
|
+
case _:
|
|
1345
1345
|
return Qr(s);
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
@@ -1391,7 +1391,7 @@ _r.exports;
|
|
|
1391
1391
|
var hr = Tt || fn;
|
|
1392
1392
|
function Xe(s) {
|
|
1393
1393
|
var a = kt(s) ? St.call(s) : "";
|
|
1394
|
-
return a ==
|
|
1394
|
+
return a == m || a == b;
|
|
1395
1395
|
}
|
|
1396
1396
|
function mr(s) {
|
|
1397
1397
|
return typeof s == "number" && s > -1 && s % 1 == 0 && s <= i;
|
|
@@ -1435,37 +1435,37 @@ function nt(t, r, e) {
|
|
|
1435
1435
|
), c = i.filter(
|
|
1436
1436
|
(I) => !e.includes(I.id)
|
|
1437
1437
|
).sort(
|
|
1438
|
-
(I,
|
|
1438
|
+
(I, v) => I.display.from - v.display.from
|
|
1439
1439
|
), u = i.sort(
|
|
1440
|
-
(I,
|
|
1440
|
+
(I, v) => I.display.from - v.display.from
|
|
1441
1441
|
), d = c[c.length - 1];
|
|
1442
1442
|
let p = (d == null ? void 0 : d.display.to) || 0;
|
|
1443
1443
|
u.forEach((I) => {
|
|
1444
1444
|
if (e.includes(I.id)) {
|
|
1445
|
-
const
|
|
1445
|
+
const v = I.display.to - I.display.from;
|
|
1446
1446
|
I.display = {
|
|
1447
1447
|
from: p,
|
|
1448
|
-
to: p +
|
|
1449
|
-
}, p = p +
|
|
1448
|
+
to: p + v
|
|
1449
|
+
}, p = p + v;
|
|
1450
1450
|
}
|
|
1451
1451
|
});
|
|
1452
1452
|
const b = i.sort(
|
|
1453
|
-
(I,
|
|
1453
|
+
(I, v) => I.display.from - v.display.from
|
|
1454
1454
|
).map((I) => I.id);
|
|
1455
|
-
let
|
|
1455
|
+
let h = 0;
|
|
1456
1456
|
b.forEach((I) => {
|
|
1457
|
-
const
|
|
1457
|
+
const v = [];
|
|
1458
1458
|
let k = 0;
|
|
1459
|
-
if (
|
|
1459
|
+
if (v.forEach((w) => {
|
|
1460
1460
|
w.forEach((f) => {
|
|
1461
1461
|
f.type === "transition" && (k += f.duration);
|
|
1462
1462
|
});
|
|
1463
1463
|
}), r[I]) {
|
|
1464
1464
|
const w = r[I].display.to - r[I].display.from;
|
|
1465
1465
|
r[I].display = {
|
|
1466
|
-
from:
|
|
1467
|
-
to:
|
|
1468
|
-
},
|
|
1466
|
+
from: h - k,
|
|
1467
|
+
to: h + w - k
|
|
1468
|
+
}, h += w;
|
|
1469
1469
|
}
|
|
1470
1470
|
});
|
|
1471
1471
|
});
|
|
@@ -1480,28 +1480,28 @@ function Ni(t, r, e) {
|
|
|
1480
1480
|
function Hi(t, r) {
|
|
1481
1481
|
const e = C(t), n = r && r.length ? r : e.activeIds, i = n.map((y) => e.trackItemsMap[y]).filter((y) => !!y).map((y) => y.id), o = e.transitionIds.filter(
|
|
1482
1482
|
(y) => {
|
|
1483
|
-
const
|
|
1484
|
-
return i.includes(
|
|
1483
|
+
const _ = e.transitionsMap[y];
|
|
1484
|
+
return i.includes(_.fromId) || i.includes(_.toId);
|
|
1485
1485
|
}
|
|
1486
1486
|
);
|
|
1487
1487
|
i.push(...o);
|
|
1488
|
-
const c = {}, u = e.trackItemIds, d = e.transitionIds, p = C(e.tracks),
|
|
1488
|
+
const c = {}, u = e.trackItemIds, d = e.transitionIds, p = C(e.tracks), m = C(e.structure);
|
|
1489
1489
|
i.forEach((y) => {
|
|
1490
1490
|
var S;
|
|
1491
|
-
const
|
|
1492
|
-
if (
|
|
1491
|
+
const _ = e.trackItemsMap[y] || e.transitionsMap[y];
|
|
1492
|
+
if (_.type === "template" || _.type === "composition") {
|
|
1493
1493
|
const A = (S = e.structure.find(
|
|
1494
|
-
(T) => T.id ===
|
|
1494
|
+
(T) => T.id === _.id
|
|
1495
1495
|
)) == null ? void 0 : S.items;
|
|
1496
1496
|
i.push(...A);
|
|
1497
|
-
const E =
|
|
1498
|
-
(T) => T.id ===
|
|
1497
|
+
const E = m.findIndex(
|
|
1498
|
+
(T) => T.id === _.id
|
|
1499
1499
|
);
|
|
1500
|
-
|
|
1500
|
+
m.splice(E, 1);
|
|
1501
1501
|
}
|
|
1502
1502
|
}), i.forEach((y) => {
|
|
1503
|
-
|
|
1504
|
-
|
|
1503
|
+
m.forEach((_) => {
|
|
1504
|
+
_.items.includes(y) && (_.items = _.items.filter((S) => S !== y));
|
|
1505
1505
|
});
|
|
1506
1506
|
});
|
|
1507
1507
|
const b = u.filter(
|
|
@@ -1510,7 +1510,7 @@ function Hi(t, r) {
|
|
|
1510
1510
|
d.forEach((y) => {
|
|
1511
1511
|
n.includes(y) && n.length === 1 && (c[y] = C(e.transitionsMap[y]));
|
|
1512
1512
|
});
|
|
1513
|
-
const
|
|
1513
|
+
const h = d.filter(
|
|
1514
1514
|
(y) => !i.includes(y) && !n.includes(y)
|
|
1515
1515
|
), I = Object.fromEntries(
|
|
1516
1516
|
Object.entries(e.transitionsMap).filter(
|
|
@@ -1520,7 +1520,7 @@ function Hi(t, r) {
|
|
|
1520
1520
|
Object.keys(I).forEach((y) => {
|
|
1521
1521
|
n.includes(y) && (I[y].kind = "none");
|
|
1522
1522
|
});
|
|
1523
|
-
const
|
|
1523
|
+
const v = Li(
|
|
1524
1524
|
e.tracks,
|
|
1525
1525
|
i
|
|
1526
1526
|
), k = Object.fromEntries(
|
|
@@ -1533,17 +1533,17 @@ function Hi(t, r) {
|
|
|
1533
1533
|
return Object.keys(c).forEach((y) => {
|
|
1534
1534
|
Ni(
|
|
1535
1535
|
c[y],
|
|
1536
|
-
|
|
1536
|
+
v,
|
|
1537
1537
|
k
|
|
1538
1538
|
);
|
|
1539
1539
|
}), {
|
|
1540
1540
|
trackItemIds: b,
|
|
1541
1541
|
activeIds: [],
|
|
1542
1542
|
trackItemsMap: k,
|
|
1543
|
-
tracks:
|
|
1543
|
+
tracks: v,
|
|
1544
1544
|
duration: f,
|
|
1545
|
-
structure:
|
|
1546
|
-
transitionIds:
|
|
1545
|
+
structure: m,
|
|
1546
|
+
transitionIds: h,
|
|
1547
1547
|
transitionsMap: I
|
|
1548
1548
|
};
|
|
1549
1549
|
}
|
|
@@ -1573,24 +1573,24 @@ async function ji(t) {
|
|
|
1573
1573
|
let r = localStorage.getItem("DesignComboTemp");
|
|
1574
1574
|
if (!r) return {};
|
|
1575
1575
|
const e = C(t), i = C(JSON.parse(r)).activeIds, o = i.map(() => Bt());
|
|
1576
|
-
i.forEach((p,
|
|
1577
|
-
r = r == null ? void 0 : r.split(p).join(o[
|
|
1576
|
+
i.forEach((p, m) => {
|
|
1577
|
+
r = r == null ? void 0 : r.split(p).join(o[m]);
|
|
1578
1578
|
});
|
|
1579
1579
|
const u = JSON.parse(r).trackItemsMap, d = [];
|
|
1580
1580
|
return o.forEach((p) => {
|
|
1581
|
-
const
|
|
1582
|
-
e.trackItemsMap[p] =
|
|
1581
|
+
const m = u[p];
|
|
1582
|
+
e.trackItemsMap[p] = m, e.trackItemIds.push(p);
|
|
1583
1583
|
const b = {
|
|
1584
1584
|
id: Bt(),
|
|
1585
|
-
type:
|
|
1585
|
+
type: m.type,
|
|
1586
1586
|
items: [p],
|
|
1587
1587
|
magnetic: !1,
|
|
1588
1588
|
static: !1
|
|
1589
1589
|
};
|
|
1590
|
-
d.push(b), (
|
|
1590
|
+
d.push(b), (m.type === "text" || m.type === "caption") && rr([
|
|
1591
1591
|
{
|
|
1592
|
-
fontFamily:
|
|
1593
|
-
url:
|
|
1592
|
+
fontFamily: m.details.fontFamily,
|
|
1593
|
+
url: m.details.fontUrl
|
|
1594
1594
|
}
|
|
1595
1595
|
]);
|
|
1596
1596
|
}), e.tracks = [...d, ...e.tracks], e.duration = Y(e.trackItemsMap), {
|
|
@@ -1695,14 +1695,14 @@ async function Gi(t, r) {
|
|
|
1695
1695
|
const e = { ...t }, n = Object.keys(r)[0], i = Object.values(r)[0], o = e.trackItemsMap[n], c = { ...e.trackItemsMap[n] }, u = o.details;
|
|
1696
1696
|
if (!i.details.src) return {};
|
|
1697
1697
|
if (o.type === "image") {
|
|
1698
|
-
const d = await $e(i.details.src), { crop: p, newHeight:
|
|
1699
|
-
i.details.crop = p, i.details.height =
|
|
1698
|
+
const d = await $e(i.details.src), { crop: p, newHeight: m, newWidth: b } = Kn(o, d);
|
|
1699
|
+
i.details.crop = p, i.details.height = m, i.details.width = b;
|
|
1700
1700
|
} else if (o.type === "video") {
|
|
1701
|
-
const d = await Dn(i.details.src), p = e.trackItemsMap[n], { display:
|
|
1702
|
-
i.details.crop = I, i.details.height =
|
|
1701
|
+
const d = await Dn(i.details.src), p = e.trackItemsMap[n], { display: m, duration: b, trim: h } = Vn(p, d), { crop: I, newHeight: v, newWidth: k } = Kn(o, d);
|
|
1702
|
+
i.details.crop = I, i.details.height = v, i.details.width = k, c.display = m, c.duration = b, c.trim = h;
|
|
1703
1703
|
} else if (o.type === "audio") {
|
|
1704
|
-
const d = await ps(i.details.src), p = e.trackItemsMap[n], { display:
|
|
1705
|
-
c.display =
|
|
1704
|
+
const d = await ps(i.details.src), p = e.trackItemsMap[n], { display: m, duration: b, trim: h } = Vn(p, d);
|
|
1705
|
+
c.display = m, c.duration = b, c.trim = h;
|
|
1706
1706
|
}
|
|
1707
1707
|
return o.details = { ...u, ...i.details }, e.trackItemsMap[n] = { ...c }, {
|
|
1708
1708
|
trackItemsMap: {
|
|
@@ -1721,7 +1721,7 @@ function Xi(t, r) {
|
|
|
1721
1721
|
id: d
|
|
1722
1722
|
}, e.trackItemIds.push(d);
|
|
1723
1723
|
const p = e.tracks.find(
|
|
1724
|
-
(
|
|
1724
|
+
(m) => m.items.includes(c)
|
|
1725
1725
|
);
|
|
1726
1726
|
n[p.id] ? n[p.id].items.push(d) : n[p.id] = {
|
|
1727
1727
|
...p,
|
|
@@ -1812,8 +1812,8 @@ function qi(t, r, e = 300, n = 300) {
|
|
|
1812
1812
|
Object.assign(p, f);
|
|
1813
1813
|
const y = w.replace(/\.(st[\w-]+)/g, `.${r}-$1`).replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`);
|
|
1814
1814
|
k.textContent = y;
|
|
1815
|
-
const
|
|
1816
|
-
|
|
1815
|
+
const _ = Array.from(c.querySelectorAll("*")), S = /* @__PURE__ */ new Set();
|
|
1816
|
+
_.forEach((A) => {
|
|
1817
1817
|
if (hn(A)) return;
|
|
1818
1818
|
["fill", "stroke", "stop-color"].forEach((H) => {
|
|
1819
1819
|
const R = A.getAttribute(H);
|
|
@@ -1844,30 +1844,30 @@ function qi(t, r, e = 300, n = 300) {
|
|
|
1844
1844
|
Ve(A) && i.push(A);
|
|
1845
1845
|
});
|
|
1846
1846
|
});
|
|
1847
|
-
const
|
|
1848
|
-
return
|
|
1847
|
+
const m = Array.from(c.querySelectorAll("*")), b = /* @__PURE__ */ new Set();
|
|
1848
|
+
return m.forEach((k) => {
|
|
1849
1849
|
if (hn(k)) return;
|
|
1850
1850
|
const w = k.getAttribute("class");
|
|
1851
1851
|
if (w) {
|
|
1852
|
-
const y = w.split(" ").map((
|
|
1853
|
-
k.setAttribute("class", y), y.split(" ").forEach((
|
|
1854
|
-
const S = p[
|
|
1852
|
+
const y = w.split(" ").map((_) => `${r}-${_}`).join(" ");
|
|
1853
|
+
k.setAttribute("class", y), y.split(" ").forEach((_) => {
|
|
1854
|
+
const S = p[_];
|
|
1855
1855
|
S != null && S.fill && !["none", "transparent"].includes(S.fill) && b.add(K(S.fill)), S != null && S.stroke && !["none", "transparent"].includes(S.stroke) && b.add(K(S.stroke));
|
|
1856
1856
|
});
|
|
1857
1857
|
}
|
|
1858
1858
|
["fill", "stroke", "stop-color"].forEach((y) => {
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1859
|
+
const _ = k.getAttribute(y);
|
|
1860
|
+
_ && !["none", "transparent"].includes(_) && b.add(K(_));
|
|
1861
1861
|
});
|
|
1862
1862
|
const f = k.getAttribute("style");
|
|
1863
1863
|
if (f) {
|
|
1864
|
-
const y = /fill\s*:\s*([^;]+);?/.exec(f),
|
|
1864
|
+
const y = /fill\s*:\s*([^;]+);?/.exec(f), _ = /stroke\s*:\s*([^;]+);?/.exec(f), S = /stop-color\s*:\s*([^;]+);?/.exec(f);
|
|
1865
1865
|
if (y) {
|
|
1866
1866
|
const A = y[1].trim();
|
|
1867
1867
|
A && !["none", "transparent"].includes(A) && b.add(K(A));
|
|
1868
1868
|
}
|
|
1869
|
-
if (
|
|
1870
|
-
const A =
|
|
1869
|
+
if (_) {
|
|
1870
|
+
const A = _[1].trim();
|
|
1871
1871
|
A && !["none", "transparent"].includes(A) && b.add(K(A));
|
|
1872
1872
|
}
|
|
1873
1873
|
if (S) {
|
|
@@ -2252,11 +2252,11 @@ const bs = async (t, r) => {
|
|
|
2252
2252
|
r.size.height / n.height
|
|
2253
2253
|
), o = ((b = t.details) == null ? void 0 : b.rotate) || 0, c = pt(r, n), u = t.display;
|
|
2254
2254
|
let d = 1 / 0, p = 0;
|
|
2255
|
-
e.forEach((
|
|
2256
|
-
const I = t.trackItemsMap[
|
|
2255
|
+
e.forEach((h) => {
|
|
2256
|
+
const I = t.trackItemsMap[h];
|
|
2257
2257
|
I.display.from < d && (d = I.display.from), I.display.to > p && (p = I.display.to);
|
|
2258
2258
|
});
|
|
2259
|
-
const
|
|
2259
|
+
const m = t.trim || t.display || { from: d, to: p };
|
|
2260
2260
|
return {
|
|
2261
2261
|
id: t.id,
|
|
2262
2262
|
type: "template",
|
|
@@ -2270,23 +2270,23 @@ const bs = async (t, r) => {
|
|
|
2270
2270
|
rotate: o,
|
|
2271
2271
|
background: t.details.background || "transparent"
|
|
2272
2272
|
},
|
|
2273
|
-
trim:
|
|
2273
|
+
trim: m,
|
|
2274
2274
|
display: u || { from: d, to: p },
|
|
2275
2275
|
activeEdit: !1
|
|
2276
2276
|
};
|
|
2277
2277
|
}, ea = async (t, r) => {
|
|
2278
|
-
var
|
|
2278
|
+
var m;
|
|
2279
2279
|
const e = t.trackItemIds, n = t.size || {
|
|
2280
2280
|
width: t.details.width,
|
|
2281
2281
|
height: t.details.height
|
|
2282
2282
|
}, i = Math.min(
|
|
2283
2283
|
r.size.width / n.width,
|
|
2284
2284
|
r.size.height / n.height
|
|
2285
|
-
), o = ((
|
|
2285
|
+
), o = ((m = t.details) == null ? void 0 : m.rotate) || 0, c = pt(r, n), u = t.display;
|
|
2286
2286
|
let d = 1 / 0, p = 0;
|
|
2287
2287
|
return e.forEach((b) => {
|
|
2288
|
-
const
|
|
2289
|
-
|
|
2288
|
+
const h = t.trackItemsMap[b];
|
|
2289
|
+
h.display.from < d && (d = h.display.from), h.display.to > p && (p = h.display.to);
|
|
2290
2290
|
}), {
|
|
2291
2291
|
id: t.id,
|
|
2292
2292
|
type: "composition",
|
|
@@ -2305,12 +2305,12 @@ const bs = async (t, r) => {
|
|
|
2305
2305
|
const e = t.details, n = $e(e.src), i = fetch(e.src), [o, c] = await Promise.all([
|
|
2306
2306
|
n,
|
|
2307
2307
|
i
|
|
2308
|
-
]), u = await c.text(), d = pt(r, o), { serializer: p, colors:
|
|
2308
|
+
]), u = await c.text(), d = pt(r, o), { serializer: p, colors: m } = qi(
|
|
2309
2309
|
Ki(u),
|
|
2310
2310
|
t.id,
|
|
2311
2311
|
Number(e.width || o.width),
|
|
2312
2312
|
Number(e.height || o.height)
|
|
2313
|
-
), b = t.details.colorMap || Object.fromEntries(
|
|
2313
|
+
), b = t.details.colorMap || Object.fromEntries(m.map((h) => [h, h]));
|
|
2314
2314
|
return {
|
|
2315
2315
|
id: t.id,
|
|
2316
2316
|
name: "illustration",
|
|
@@ -2637,62 +2637,62 @@ async function ia(t, r) {
|
|
|
2637
2637
|
var c, u, d;
|
|
2638
2638
|
const e = r.trackItemsMap, n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
|
|
2639
2639
|
for (const p in e) {
|
|
2640
|
-
const
|
|
2641
|
-
if (
|
|
2642
|
-
if (
|
|
2640
|
+
const m = e[p];
|
|
2641
|
+
if (m.type === "text" || m.type === "caption") {
|
|
2642
|
+
if (m.details.fontUrl) {
|
|
2643
2643
|
const b = {
|
|
2644
|
-
fontFamily:
|
|
2645
|
-
url:
|
|
2644
|
+
fontFamily: m.details.fontFamily,
|
|
2645
|
+
url: m.details.fontUrl
|
|
2646
2646
|
};
|
|
2647
2647
|
n.add(JSON.stringify(b));
|
|
2648
2648
|
}
|
|
2649
|
-
(c =
|
|
2649
|
+
(c = m.animations) != null && c.in && m.animations.in.composition.forEach(
|
|
2650
2650
|
(b) => {
|
|
2651
|
-
var
|
|
2652
|
-
(
|
|
2651
|
+
var h;
|
|
2652
|
+
(h = b.details) != null && h.fonts && b.details.fonts.forEach(
|
|
2653
2653
|
(I) => {
|
|
2654
2654
|
n.add(JSON.stringify(I));
|
|
2655
2655
|
}
|
|
2656
2656
|
);
|
|
2657
2657
|
}
|
|
2658
|
-
), (u =
|
|
2658
|
+
), (u = m.animations) != null && u.loop && m.animations.loop.composition.forEach(
|
|
2659
2659
|
(b) => {
|
|
2660
|
-
var
|
|
2661
|
-
(
|
|
2660
|
+
var h;
|
|
2661
|
+
(h = b.details) != null && h.fonts && b.details.fonts.forEach(
|
|
2662
2662
|
(I) => {
|
|
2663
2663
|
n.add(JSON.stringify(I));
|
|
2664
2664
|
}
|
|
2665
2665
|
);
|
|
2666
2666
|
}
|
|
2667
|
-
), (d =
|
|
2667
|
+
), (d = m.animations) != null && d.out && m.animations.out.composition.forEach(
|
|
2668
2668
|
(b) => {
|
|
2669
|
-
var
|
|
2670
|
-
(
|
|
2669
|
+
var h;
|
|
2670
|
+
(h = b.details) != null && h.fonts && b.details.fonts.forEach(
|
|
2671
2671
|
(I) => {
|
|
2672
2672
|
n.add(JSON.stringify(I));
|
|
2673
2673
|
}
|
|
2674
2674
|
);
|
|
2675
2675
|
}
|
|
2676
2676
|
);
|
|
2677
|
-
} else
|
|
2678
|
-
trackItem:
|
|
2679
|
-
details:
|
|
2677
|
+
} else m.type === "illustration" && i.set(p, {
|
|
2678
|
+
trackItem: m,
|
|
2679
|
+
details: m.details
|
|
2680
2680
|
});
|
|
2681
2681
|
}
|
|
2682
2682
|
n.size > 0 && await rr(
|
|
2683
2683
|
Array.from(n).map((p) => JSON.parse(p))
|
|
2684
2684
|
);
|
|
2685
|
-
for (const [p,
|
|
2685
|
+
for (const [p, m] of i) {
|
|
2686
2686
|
const b = await _s(
|
|
2687
|
-
{ ...
|
|
2687
|
+
{ ...m.trackItem, details: m.details },
|
|
2688
2688
|
{
|
|
2689
|
-
size: { width:
|
|
2689
|
+
size: { width: m.details.width, height: m.details.height }
|
|
2690
2690
|
}
|
|
2691
|
-
),
|
|
2691
|
+
), h = ms(
|
|
2692
2692
|
b.details.svgString,
|
|
2693
|
-
|
|
2693
|
+
m.details.colorMap
|
|
2694
2694
|
);
|
|
2695
|
-
b.details.svgString =
|
|
2695
|
+
b.details.svgString = h, e[p] = b;
|
|
2696
2696
|
}
|
|
2697
2697
|
const o = Y(e);
|
|
2698
2698
|
return {
|
|
@@ -2739,52 +2739,52 @@ function oa(t, r) {
|
|
|
2739
2739
|
to: i.display.to
|
|
2740
2740
|
}
|
|
2741
2741
|
}, d = Object.values(e.transitionsMap).find(
|
|
2742
|
-
(
|
|
2742
|
+
(m) => m.fromId === i.id && m.kind !== "none"
|
|
2743
2743
|
), p = Object.values(e.transitionsMap).find(
|
|
2744
|
-
(
|
|
2744
|
+
(m) => m.toId === i.id && m.kind !== "none"
|
|
2745
2745
|
);
|
|
2746
2746
|
if (i.type === "video" || i.type === "audio") {
|
|
2747
|
-
const
|
|
2747
|
+
const m = r - c.display.from;
|
|
2748
2748
|
c.trim = {
|
|
2749
2749
|
from: i.trim.from,
|
|
2750
|
-
to: i.trim.from +
|
|
2750
|
+
to: i.trim.from + m
|
|
2751
2751
|
}, u.trim = {
|
|
2752
|
-
from: i.trim.from +
|
|
2752
|
+
from: i.trim.from + m,
|
|
2753
2753
|
to: i.trim.to
|
|
2754
2754
|
};
|
|
2755
2755
|
}
|
|
2756
2756
|
if (p) {
|
|
2757
|
-
const
|
|
2758
|
-
if (p.duration / 2 >
|
|
2757
|
+
const m = c.display.to - c.display.from;
|
|
2758
|
+
if (p.duration / 2 > m) {
|
|
2759
2759
|
e.transitionIds = e.transitionIds.filter(
|
|
2760
|
-
(
|
|
2760
|
+
(h) => h !== p.id
|
|
2761
2761
|
);
|
|
2762
2762
|
const b = {};
|
|
2763
2763
|
e.transitionIds.forEach(
|
|
2764
|
-
(
|
|
2764
|
+
(h) => b[h] = e.transitionsMap[h]
|
|
2765
2765
|
), e.transitionsMap = b;
|
|
2766
2766
|
}
|
|
2767
2767
|
}
|
|
2768
2768
|
if (d) {
|
|
2769
|
-
const
|
|
2770
|
-
d.duration / 2 >
|
|
2771
|
-
(
|
|
2769
|
+
const m = u.display.to - u.display.from, b = {};
|
|
2770
|
+
d.duration / 2 > m ? (e.transitionIds = e.transitionIds.filter(
|
|
2771
|
+
(h) => h !== d.id
|
|
2772
2772
|
), e.transitionIds.forEach(
|
|
2773
|
-
(
|
|
2774
|
-
), e.transitionsMap = b) : (e.transitionIds = e.transitionIds.map((
|
|
2775
|
-
if (e.transitionsMap[
|
|
2776
|
-
const
|
|
2777
|
-
b[
|
|
2778
|
-
...e.transitionsMap[
|
|
2779
|
-
id:
|
|
2773
|
+
(h) => b[h] = e.transitionsMap[h]
|
|
2774
|
+
), e.transitionsMap = b) : (e.transitionIds = e.transitionIds.map((h) => e.transitionsMap[h].fromId === c.id ? h.replace(c.id, o) : h), Object.keys(e.transitionsMap).forEach((h) => {
|
|
2775
|
+
if (e.transitionsMap[h].fromId === c.id) {
|
|
2776
|
+
const v = h.replace(c.id, o);
|
|
2777
|
+
b[v] = {
|
|
2778
|
+
...e.transitionsMap[h],
|
|
2779
|
+
id: v,
|
|
2780
2780
|
fromId: o
|
|
2781
2781
|
};
|
|
2782
2782
|
} else
|
|
2783
|
-
b[
|
|
2783
|
+
b[h] = e.transitionsMap[h];
|
|
2784
2784
|
}), e.transitionsMap = b);
|
|
2785
2785
|
}
|
|
2786
|
-
return e.trackItemsMap[n] = c, e.trackItemsMap[o] = u, e.trackItemIds.push(o), e.tracks.forEach((
|
|
2787
|
-
|
|
2786
|
+
return e.trackItemsMap[n] = c, e.trackItemsMap[o] = u, e.trackItemIds.push(o), e.tracks.forEach((m) => {
|
|
2787
|
+
m.items.includes(n) && m.items.push(o);
|
|
2788
2788
|
}), {
|
|
2789
2789
|
tracks: e.tracks,
|
|
2790
2790
|
trackItemIds: e.trackItemIds,
|
|
@@ -2812,11 +2812,11 @@ async function ca(t, r) {
|
|
|
2812
2812
|
...n[c].metadata,
|
|
2813
2813
|
...u.metadata
|
|
2814
2814
|
} : n[c].metadata = u.metadata), u.display || u.playbackRate) {
|
|
2815
|
-
const d = u.playbackRate, p = n[c].playbackRate || 1,
|
|
2816
|
-
from:
|
|
2817
|
-
to:
|
|
2815
|
+
const d = u.playbackRate, p = n[c].playbackRate || 1, m = n[c].display, I = (m.to - m.from) * p / d, v = {
|
|
2816
|
+
from: m.from,
|
|
2817
|
+
to: m.from + I
|
|
2818
2818
|
};
|
|
2819
|
-
n[c].display =
|
|
2819
|
+
n[c].display = v, n[c].playbackRate = d;
|
|
2820
2820
|
}
|
|
2821
2821
|
u.animations && (n[c].animations = {
|
|
2822
2822
|
...n[c].animations,
|
|
@@ -2841,24 +2841,24 @@ async function ua(t, r) {
|
|
|
2841
2841
|
if (!i.details.src) return {};
|
|
2842
2842
|
if (o.type === "image") {
|
|
2843
2843
|
const u = await $e(i.details.src), d = o.details.width || 0, p = o.details.height || 0;
|
|
2844
|
-
let
|
|
2845
|
-
const
|
|
2846
|
-
d / p >
|
|
2844
|
+
let m = u.width, b = u.height;
|
|
2845
|
+
const h = u.width / u.height;
|
|
2846
|
+
d / p > h ? (m = d, b = d / h) : (b = p, m = p * h), c.crop = {
|
|
2847
2847
|
x: 0,
|
|
2848
2848
|
y: 0,
|
|
2849
2849
|
height: c.height,
|
|
2850
2850
|
width: c.width
|
|
2851
|
-
}, i.details.width =
|
|
2851
|
+
}, i.details.width = m, i.details.height = b;
|
|
2852
2852
|
} else if (o.type === "video") {
|
|
2853
2853
|
const u = await Dn(i.details.src), d = o.details.width || 0, p = o.details.height || 0;
|
|
2854
|
-
let
|
|
2855
|
-
const
|
|
2856
|
-
d / p >
|
|
2854
|
+
let m = u.width, b = u.height;
|
|
2855
|
+
const h = u.width / u.height;
|
|
2856
|
+
d / p > h ? (m = d, b = d / h) : (b = p, m = p * h), c.crop = {
|
|
2857
2857
|
x: 0,
|
|
2858
2858
|
y: 0,
|
|
2859
2859
|
height: c.height,
|
|
2860
2860
|
width: c.width
|
|
2861
|
-
}, i.details.width =
|
|
2861
|
+
}, i.details.width = m, i.details.height = b;
|
|
2862
2862
|
}
|
|
2863
2863
|
return i.details && (o.details = { ...c, ...i.details }, i.details = o.details), e.trackItemsMap[n] = {
|
|
2864
2864
|
...e.trackItemsMap[n],
|
|
@@ -2890,24 +2890,24 @@ async function da(t, r, e = {}) {
|
|
|
2890
2890
|
...n.transitionsMap,
|
|
2891
2891
|
...I.transitionsMap
|
|
2892
2892
|
};
|
|
2893
|
-
const
|
|
2893
|
+
const v = {
|
|
2894
2894
|
id: I.id,
|
|
2895
2895
|
items: I.trackItemIds,
|
|
2896
2896
|
transitions: I.transitionsIds || [],
|
|
2897
2897
|
tracks: I.tracks
|
|
2898
2898
|
};
|
|
2899
|
-
u.push(
|
|
2899
|
+
u.push(v);
|
|
2900
2900
|
});
|
|
2901
|
-
const p = [],
|
|
2901
|
+
const p = [], m = {};
|
|
2902
2902
|
if (o.forEach((I) => {
|
|
2903
|
-
p.push(I.id),
|
|
2903
|
+
p.push(I.id), m[I.id] = I;
|
|
2904
2904
|
}), Es(
|
|
2905
2905
|
n.tracks,
|
|
2906
2906
|
c
|
|
2907
2907
|
))
|
|
2908
2908
|
n.tracks.forEach((I) => {
|
|
2909
|
-
c.forEach((
|
|
2910
|
-
I.id ===
|
|
2909
|
+
c.forEach((v) => {
|
|
2910
|
+
I.id === v.id && (I.magnetic && nt(
|
|
2911
2911
|
[I],
|
|
2912
2912
|
n.trackItemsMap,
|
|
2913
2913
|
d
|
|
@@ -2915,21 +2915,21 @@ async function da(t, r, e = {}) {
|
|
|
2915
2915
|
});
|
|
2916
2916
|
});
|
|
2917
2917
|
else {
|
|
2918
|
-
const I = e.trackIndex || 0,
|
|
2918
|
+
const I = e.trackIndex || 0, v = Math.min(
|
|
2919
2919
|
Math.max(I, 0),
|
|
2920
2920
|
n.tracks.length
|
|
2921
2921
|
);
|
|
2922
|
-
n.tracks.splice(
|
|
2922
|
+
n.tracks.splice(v, 0, ...c);
|
|
2923
2923
|
}
|
|
2924
2924
|
n.trackItemsMap = {
|
|
2925
2925
|
...n.trackItemsMap,
|
|
2926
|
-
...
|
|
2926
|
+
...m
|
|
2927
2927
|
}, n.trackItemIds = [
|
|
2928
2928
|
...n.trackItemIds,
|
|
2929
2929
|
...p
|
|
2930
2930
|
], n.structure = [...n.structure, ...u];
|
|
2931
|
-
const
|
|
2932
|
-
return nt(
|
|
2931
|
+
const h = n.tracks.filter((I) => I.magnetic);
|
|
2932
|
+
return nt(h, n.trackItemsMap, d), n.duration = Y(n.trackItemsMap), {
|
|
2933
2933
|
trackItemIds: n.trackItemIds,
|
|
2934
2934
|
trackItemsMap: n.trackItemsMap,
|
|
2935
2935
|
tracks: n.tracks,
|
|
@@ -3061,43 +3061,43 @@ async function ya(t, r, e = {}) {
|
|
|
3061
3061
|
};
|
|
3062
3062
|
}
|
|
3063
3063
|
async function Ia(t, r, e = {}) {
|
|
3064
|
-
const n = C(t), i = "composition", o = r.trackItemsMap, c = r.trackItemIds, u = r.tracks || [], d = r.trackItemDetailsMap, { details: p, ...
|
|
3064
|
+
const n = C(t), i = "composition", o = r.trackItemsMap, c = r.trackItemIds, u = r.tracks || [], d = r.trackItemDetailsMap, { details: p, ...m } = await ea(r, {
|
|
3065
3065
|
size: n.size,
|
|
3066
3066
|
scaleMode: e.scaleMode,
|
|
3067
3067
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3068
3068
|
}), b = {
|
|
3069
|
-
id:
|
|
3069
|
+
id: m.id,
|
|
3070
3070
|
items: c,
|
|
3071
3071
|
transitions: [],
|
|
3072
3072
|
tracks: u
|
|
3073
3073
|
}, I = [{
|
|
3074
|
-
...
|
|
3074
|
+
...m,
|
|
3075
3075
|
type: i,
|
|
3076
3076
|
details: p
|
|
3077
|
-
}],
|
|
3078
|
-
|
|
3079
|
-
...
|
|
3077
|
+
}], v = vt(n, I, e);
|
|
3078
|
+
v.trackItemsMap = {
|
|
3079
|
+
...v.trackItemsMap,
|
|
3080
3080
|
...o,
|
|
3081
|
-
[
|
|
3082
|
-
...
|
|
3081
|
+
[m.id]: {
|
|
3082
|
+
...m,
|
|
3083
3083
|
type: i,
|
|
3084
3084
|
details: p
|
|
3085
3085
|
}
|
|
3086
|
-
},
|
|
3087
|
-
const k =
|
|
3088
|
-
return nt(k,
|
|
3089
|
-
|
|
3090
|
-
...
|
|
3086
|
+
}, v.structure = [...v.structure, b], v.duration = Y(v.trackItemsMap);
|
|
3087
|
+
const k = v.tracks.filter((w) => w.magnetic);
|
|
3088
|
+
return nt(k, v.trackItemsMap, [m.id]), d && Object.keys(d).forEach((w) => {
|
|
3089
|
+
v.trackItemsMap[w] = {
|
|
3090
|
+
...v.trackItemsMap[w],
|
|
3091
3091
|
details: {
|
|
3092
3092
|
...d[w].details
|
|
3093
3093
|
}
|
|
3094
3094
|
};
|
|
3095
3095
|
}), {
|
|
3096
|
-
trackItemIds:
|
|
3097
|
-
trackItemsMap:
|
|
3098
|
-
tracks:
|
|
3099
|
-
duration:
|
|
3100
|
-
structure:
|
|
3096
|
+
trackItemIds: v.trackItemIds,
|
|
3097
|
+
trackItemsMap: v.trackItemsMap,
|
|
3098
|
+
tracks: v.tracks,
|
|
3099
|
+
duration: v.duration,
|
|
3100
|
+
structure: v.structure
|
|
3101
3101
|
};
|
|
3102
3102
|
}
|
|
3103
3103
|
async function fe(t, r, e = {}, n) {
|
|
@@ -3150,8 +3150,8 @@ async function fe(t, r, e = {}, n) {
|
|
|
3150
3150
|
);
|
|
3151
3151
|
const u = await Promise.all(c), d = u.map((b) => b.id), p = vt(i, u, e);
|
|
3152
3152
|
p.duration = Y(p.trackItemsMap);
|
|
3153
|
-
const
|
|
3154
|
-
return nt(
|
|
3153
|
+
const m = p.tracks.filter((b) => b.magnetic);
|
|
3154
|
+
return nt(m, p.trackItemsMap, d), {
|
|
3155
3155
|
trackItemIds: p.trackItemIds,
|
|
3156
3156
|
trackItemsMap: p.trackItemsMap,
|
|
3157
3157
|
tracks: p.tracks,
|
|
@@ -3159,17 +3159,17 @@ async function fe(t, r, e = {}, n) {
|
|
|
3159
3159
|
};
|
|
3160
3160
|
}
|
|
3161
3161
|
async function ba(t, r, e = {}) {
|
|
3162
|
-
const n = C(t), i = "template", o = r.trackItemsMap, c = r.trackItemIds, u = r.transitionsMap, d = r.transitionIds || [], p = r.tracks || [],
|
|
3162
|
+
const n = C(t), i = "template", o = r.trackItemsMap, c = r.trackItemIds, u = r.transitionsMap, d = r.transitionIds || [], p = r.tracks || [], m = r.structure || [], { details: b, ...h } = await vs(r, {
|
|
3163
3163
|
size: n.size,
|
|
3164
3164
|
scaleMode: e.scaleMode,
|
|
3165
3165
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3166
3166
|
}), I = {
|
|
3167
|
-
id:
|
|
3167
|
+
id: h.id,
|
|
3168
3168
|
items: c,
|
|
3169
3169
|
transitions: d,
|
|
3170
3170
|
tracks: p
|
|
3171
3171
|
}, k = [{
|
|
3172
|
-
...
|
|
3172
|
+
...h,
|
|
3173
3173
|
type: i,
|
|
3174
3174
|
details: b
|
|
3175
3175
|
}], w = vt(n, k, e);
|
|
@@ -3182,18 +3182,18 @@ async function ba(t, r, e = {}) {
|
|
|
3182
3182
|
}, w.trackItemsMap = {
|
|
3183
3183
|
...w.trackItemsMap,
|
|
3184
3184
|
...o,
|
|
3185
|
-
[
|
|
3186
|
-
...
|
|
3185
|
+
[h.id]: {
|
|
3186
|
+
...h,
|
|
3187
3187
|
type: i,
|
|
3188
3188
|
details: b
|
|
3189
3189
|
}
|
|
3190
3190
|
}, w.structure = [
|
|
3191
3191
|
...w.structure,
|
|
3192
3192
|
I,
|
|
3193
|
-
...
|
|
3193
|
+
...m
|
|
3194
3194
|
], w.duration = Y(w.trackItemsMap);
|
|
3195
3195
|
const f = w.tracks.filter((y) => y.magnetic);
|
|
3196
|
-
return nt(f, w.trackItemsMap, [
|
|
3196
|
+
return nt(f, w.trackItemsMap, [h.id]), {
|
|
3197
3197
|
trackItemIds: w.trackItemIds,
|
|
3198
3198
|
trackItemsMap: w.trackItemsMap,
|
|
3199
3199
|
tracks: w.tracks,
|
|
@@ -3216,15 +3216,21 @@ async function ka(t, r, e = {}) {
|
|
|
3216
3216
|
o
|
|
3217
3217
|
), u = [], d = {};
|
|
3218
3218
|
if (o.forEach((b) => {
|
|
3219
|
-
const { details:
|
|
3220
|
-
u.push(b.id), d[b.id] =
|
|
3219
|
+
const { details: h, metadata: I, ...v } = b;
|
|
3220
|
+
u.push(b.id), d[b.id] = {
|
|
3221
|
+
...v,
|
|
3222
|
+
details: {
|
|
3223
|
+
...h,
|
|
3224
|
+
...I
|
|
3225
|
+
}
|
|
3226
|
+
};
|
|
3221
3227
|
}), Es(
|
|
3222
3228
|
n.tracks,
|
|
3223
3229
|
c
|
|
3224
3230
|
))
|
|
3225
3231
|
n.tracks.forEach((b) => {
|
|
3226
|
-
c.forEach((
|
|
3227
|
-
b.id ===
|
|
3232
|
+
c.forEach((h) => {
|
|
3233
|
+
b.id === h.id && (b.magnetic && nt(
|
|
3228
3234
|
[b],
|
|
3229
3235
|
n.trackItemsMap,
|
|
3230
3236
|
u
|
|
@@ -3232,11 +3238,11 @@ async function ka(t, r, e = {}) {
|
|
|
3232
3238
|
});
|
|
3233
3239
|
});
|
|
3234
3240
|
else {
|
|
3235
|
-
const b = e.trackIndex || 0,
|
|
3241
|
+
const b = e.trackIndex || 0, h = Math.min(
|
|
3236
3242
|
Math.max(b, 0),
|
|
3237
3243
|
n.tracks.length
|
|
3238
3244
|
);
|
|
3239
|
-
n.tracks.splice(
|
|
3245
|
+
n.tracks.splice(h, 0, ...c);
|
|
3240
3246
|
}
|
|
3241
3247
|
n.trackItemsMap = {
|
|
3242
3248
|
...n.trackItemsMap,
|
|
@@ -3245,9 +3251,9 @@ async function ka(t, r, e = {}) {
|
|
|
3245
3251
|
...n.trackItemIds,
|
|
3246
3252
|
...u
|
|
3247
3253
|
], n.duration = Y(n.trackItemsMap);
|
|
3248
|
-
const
|
|
3254
|
+
const m = n.tracks.filter((b) => b.magnetic);
|
|
3249
3255
|
return nt(
|
|
3250
|
-
|
|
3256
|
+
m,
|
|
3251
3257
|
n.trackItemsMap,
|
|
3252
3258
|
u
|
|
3253
3259
|
), {
|
|
@@ -3317,13 +3323,13 @@ function Sa(t) {
|
|
|
3317
3323
|
), p = r.subscribe(async (f) => {
|
|
3318
3324
|
var y;
|
|
3319
3325
|
if (f.key === Xn) {
|
|
3320
|
-
const { actions:
|
|
3321
|
-
|
|
3326
|
+
const { actions: _ } = (y = f.value) == null ? void 0 : y.payload;
|
|
3327
|
+
_.forEach((S) => {
|
|
3322
3328
|
Ns(S.type, S.payload && { payload: S.payload });
|
|
3323
3329
|
});
|
|
3324
3330
|
}
|
|
3325
|
-
}),
|
|
3326
|
-
var y,
|
|
3331
|
+
}), m = e.subscribe(async (f) => {
|
|
3332
|
+
var y, _;
|
|
3327
3333
|
if (f.key === ni) {
|
|
3328
3334
|
const S = (y = f.value) == null ? void 0 : y.payload, A = await ia(t.getState(), S);
|
|
3329
3335
|
t.updateState(A, {
|
|
@@ -3332,7 +3338,7 @@ function Sa(t) {
|
|
|
3332
3338
|
});
|
|
3333
3339
|
}
|
|
3334
3340
|
if (f.key === si) {
|
|
3335
|
-
const S = (
|
|
3341
|
+
const S = (_ = f.value) == null ? void 0 : _.payload;
|
|
3336
3342
|
t.updateState(
|
|
3337
3343
|
{
|
|
3338
3344
|
size: S
|
|
@@ -3346,13 +3352,13 @@ function Sa(t) {
|
|
|
3346
3352
|
}), b = o.subscribe((f) => {
|
|
3347
3353
|
if (f.key === Di) return t.undo();
|
|
3348
3354
|
if (f.key === zi) return t.redo();
|
|
3349
|
-
}),
|
|
3355
|
+
}), h = d.subscribe((f) => {
|
|
3350
3356
|
var y;
|
|
3351
3357
|
if (f.key === $i) {
|
|
3352
|
-
const
|
|
3358
|
+
const _ = (y = f.value) == null ? void 0 : y.payload.scale;
|
|
3353
3359
|
t.updateState(
|
|
3354
3360
|
{
|
|
3355
|
-
scale:
|
|
3361
|
+
scale: _
|
|
3356
3362
|
},
|
|
3357
3363
|
{
|
|
3358
3364
|
kind: "update",
|
|
@@ -3361,7 +3367,7 @@ function Sa(t) {
|
|
|
3361
3367
|
);
|
|
3362
3368
|
}
|
|
3363
3369
|
}), I = i.subscribe(async (f) => {
|
|
3364
|
-
var y,
|
|
3370
|
+
var y, _, S, A;
|
|
3365
3371
|
if (f.key === xi) {
|
|
3366
3372
|
const E = ((y = f.value) == null ? void 0 : y.payload.trackItemIds) || [];
|
|
3367
3373
|
t.updateState(
|
|
@@ -3373,7 +3379,7 @@ function Sa(t) {
|
|
|
3373
3379
|
);
|
|
3374
3380
|
}
|
|
3375
3381
|
if (f.key === Oi && aa(t.getState()), f.key === Ri) {
|
|
3376
|
-
const E = (
|
|
3382
|
+
const E = (_ = f.value) == null ? void 0 : _.payload.trackItemIds, T = Hi(t.getState(), E);
|
|
3377
3383
|
t.updateState(T, { updateHistory: !0, kind: "remove" });
|
|
3378
3384
|
}
|
|
3379
3385
|
if (f.key === Ci) {
|
|
@@ -3393,9 +3399,9 @@ function Sa(t) {
|
|
|
3393
3399
|
kind: "update:details"
|
|
3394
3400
|
});
|
|
3395
3401
|
}
|
|
3396
|
-
}),
|
|
3402
|
+
}), v = n.subscribe(async (f) => {
|
|
3397
3403
|
var H, R, V, x, F, tt, Xt, Kt, Ie, be, ke, ve, z, _e, Se, st, Vt, $, qt, we, it, Jt, Zt, Rt, Pt, Qt, Dt, te, zt, ee, Te, Ae, _t, $t, re, ne, ct, St, Ee, gt, wt, Ft, et, se, ie, Me, Lt, Tt, ae, At, yt;
|
|
3398
|
-
const y = C(t.getState()),
|
|
3404
|
+
const y = C(t.getState()), _ = ((R = (H = f.value) == null ? void 0 : H.options) == null ? void 0 : R.isSelected) || !1, S = (x = (V = f.value) == null ? void 0 : V.options) == null ? void 0 : x.scaleMode, A = (tt = (F = f.value) == null ? void 0 : F.options) == null ? void 0 : tt.scaleAspectRatio, E = (Kt = (Xt = f.value) == null ? void 0 : Xt.options) == null ? void 0 : Kt.trackIndex;
|
|
3399
3405
|
let T = {};
|
|
3400
3406
|
f.key === di ? T = await va(y, (Ie = f.value) == null ? void 0 : Ie.payload) : f.key === hi ? T = await da(y, (be = f.value) == null ? void 0 : be.payload, {
|
|
3401
3407
|
trackIndex: E
|
|
@@ -3499,28 +3505,28 @@ function Sa(t) {
|
|
|
3499
3505
|
targetTrackId: (yt = (At = f.value) == null ? void 0 : At.options) == null ? void 0 : yt.targetTrackId
|
|
3500
3506
|
},
|
|
3501
3507
|
"hill-audio-bars"
|
|
3502
|
-
)),
|
|
3508
|
+
)), _ && T.trackItemIds && (T.activeIds = T.trackItemIds), t.updateState(T, {
|
|
3503
3509
|
updateHistory: !0,
|
|
3504
3510
|
kind: "add"
|
|
3505
3511
|
});
|
|
3506
3512
|
}), k = c.subscribe(async (f) => {
|
|
3507
3513
|
var y;
|
|
3508
3514
|
if (f.key === Mi) {
|
|
3509
|
-
const
|
|
3515
|
+
const _ = (y = f.value) == null ? void 0 : y.options.time, S = oa(t.getState(), _);
|
|
3510
3516
|
Object.keys(S).length > 0 && t.updateState(S, {
|
|
3511
3517
|
updateHistory: !0,
|
|
3512
3518
|
kind: "update"
|
|
3513
3519
|
});
|
|
3514
3520
|
}
|
|
3515
3521
|
if (f.key === Ei) {
|
|
3516
|
-
const
|
|
3517
|
-
t.updateState(
|
|
3522
|
+
const _ = await ji(t.getState());
|
|
3523
|
+
t.updateState(_, {
|
|
3518
3524
|
updateHistory: !0,
|
|
3519
3525
|
kind: "update"
|
|
3520
3526
|
});
|
|
3521
3527
|
}
|
|
3522
3528
|
}), w = u.subscribe(async (f) => {
|
|
3523
|
-
var y,
|
|
3529
|
+
var y, _, S;
|
|
3524
3530
|
if (f.key === wi) {
|
|
3525
3531
|
const A = await ca(
|
|
3526
3532
|
t.getState(),
|
|
@@ -3534,7 +3540,7 @@ function Sa(t) {
|
|
|
3534
3540
|
if (f.key === Ti) {
|
|
3535
3541
|
const A = await ua(
|
|
3536
3542
|
t.getState(),
|
|
3537
|
-
(
|
|
3543
|
+
(_ = f.value) == null ? void 0 : _.payload
|
|
3538
3544
|
);
|
|
3539
3545
|
t.updateState(A, {
|
|
3540
3546
|
updateHistory: !0,
|
|
@@ -3551,7 +3557,7 @@ function Sa(t) {
|
|
|
3551
3557
|
});
|
|
3552
3558
|
return {
|
|
3553
3559
|
unsubscribe: () => {
|
|
3554
|
-
|
|
3560
|
+
v.unsubscribe(), k.unsubscribe(), w.unsubscribe(), b.unsubscribe(), I.unsubscribe(), m.unsubscribe(), h.unsubscribe(), p.unsubscribe();
|
|
3555
3561
|
}
|
|
3556
3562
|
};
|
|
3557
3563
|
}
|
|
@@ -3561,7 +3567,7 @@ function xs(t, r, e = { cyclesFix: !0 }, n = []) {
|
|
|
3561
3567
|
let i = [];
|
|
3562
3568
|
const o = Array.isArray(t);
|
|
3563
3569
|
for (const p in t) {
|
|
3564
|
-
const
|
|
3570
|
+
const m = t[p], b = o ? +p : p;
|
|
3565
3571
|
if (!(p in r)) {
|
|
3566
3572
|
i.push({
|
|
3567
3573
|
type: "REMOVE",
|
|
@@ -3570,13 +3576,13 @@ function xs(t, r, e = { cyclesFix: !0 }, n = []) {
|
|
|
3570
3576
|
});
|
|
3571
3577
|
continue;
|
|
3572
3578
|
}
|
|
3573
|
-
const
|
|
3574
|
-
|
|
3575
|
-
!(Number.isNaN(
|
|
3579
|
+
const h = r[p], I = typeof m == "object" && typeof h == "object" && Array.isArray(m) === Array.isArray(h);
|
|
3580
|
+
m && h && I && !wa[(d = (u = Object.getPrototypeOf(m)) == null ? void 0 : u.constructor) == null ? void 0 : d.name] && (!e.cyclesFix || !n.includes(m)) ? i.push.apply(i, xs(m, h, e, e.cyclesFix ? n.concat([m]) : []).map((v) => (v.path.unshift(b), v))) : m !== h && // treat NaN values as equivalent
|
|
3581
|
+
!(Number.isNaN(m) && Number.isNaN(h)) && !(I && (isNaN(m) ? m + "" == h + "" : +m == +h)) && i.push({
|
|
3576
3582
|
path: [b],
|
|
3577
3583
|
type: "CHANGE",
|
|
3578
|
-
value:
|
|
3579
|
-
oldValue:
|
|
3584
|
+
value: h,
|
|
3585
|
+
oldValue: m
|
|
3580
3586
|
});
|
|
3581
3587
|
}
|
|
3582
3588
|
const c = Array.isArray(r);
|
|
@@ -3950,7 +3956,7 @@ var Pa = class {
|
|
|
3950
3956
|
e = r;
|
|
3951
3957
|
const c = this;
|
|
3952
3958
|
return function(d = o, ...p) {
|
|
3953
|
-
return c.produce(d, (
|
|
3959
|
+
return c.produce(d, (m) => e.call(this, m, ...p));
|
|
3954
3960
|
};
|
|
3955
3961
|
}
|
|
3956
3962
|
typeof e != "function" && B(6), n !== void 0 && typeof n != "function" && B(7);
|
|
@@ -4050,157 +4056,157 @@ function zs(t) {
|
|
|
4050
4056
|
function ts() {
|
|
4051
4057
|
process.env.NODE_ENV !== "production" && Os.push(
|
|
4052
4058
|
'Sets cannot have "replace" patches.',
|
|
4053
|
-
function(
|
|
4054
|
-
return "Unsupported patch operation: " +
|
|
4059
|
+
function(h) {
|
|
4060
|
+
return "Unsupported patch operation: " + h;
|
|
4055
4061
|
},
|
|
4056
|
-
function(
|
|
4057
|
-
return "Cannot apply patch, path doesn't resolve: " +
|
|
4062
|
+
function(h) {
|
|
4063
|
+
return "Cannot apply patch, path doesn't resolve: " + h;
|
|
4058
4064
|
},
|
|
4059
4065
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
|
4060
4066
|
);
|
|
4061
4067
|
const r = "replace", e = "add", n = "remove";
|
|
4062
|
-
function i(
|
|
4063
|
-
switch (
|
|
4068
|
+
function i(h, I, v, k) {
|
|
4069
|
+
switch (h.type_) {
|
|
4064
4070
|
case 0:
|
|
4065
4071
|
case 2:
|
|
4066
4072
|
return c(
|
|
4067
|
-
|
|
4073
|
+
h,
|
|
4068
4074
|
I,
|
|
4069
|
-
|
|
4075
|
+
v,
|
|
4070
4076
|
k
|
|
4071
4077
|
);
|
|
4072
4078
|
case 1:
|
|
4073
|
-
return o(
|
|
4079
|
+
return o(h, I, v, k);
|
|
4074
4080
|
case 3:
|
|
4075
4081
|
return u(
|
|
4076
|
-
|
|
4082
|
+
h,
|
|
4077
4083
|
I,
|
|
4078
|
-
|
|
4084
|
+
v,
|
|
4079
4085
|
k
|
|
4080
4086
|
);
|
|
4081
4087
|
}
|
|
4082
4088
|
}
|
|
4083
|
-
function o(
|
|
4084
|
-
let { base_: w, assigned_: f } =
|
|
4085
|
-
y.length < w.length && ([w, y] = [y, w], [
|
|
4086
|
-
for (let
|
|
4087
|
-
if (f[
|
|
4088
|
-
const S = I.concat([
|
|
4089
|
-
|
|
4089
|
+
function o(h, I, v, k) {
|
|
4090
|
+
let { base_: w, assigned_: f } = h, y = h.copy_;
|
|
4091
|
+
y.length < w.length && ([w, y] = [y, w], [v, k] = [k, v]);
|
|
4092
|
+
for (let _ = 0; _ < w.length; _++)
|
|
4093
|
+
if (f[_] && y[_] !== w[_]) {
|
|
4094
|
+
const S = I.concat([_]);
|
|
4095
|
+
v.push({
|
|
4090
4096
|
op: r,
|
|
4091
4097
|
path: S,
|
|
4092
4098
|
// Need to maybe clone it, as it can in fact be the original value
|
|
4093
4099
|
// due to the base/copy inversion at the start of this function
|
|
4094
|
-
value: b(y[
|
|
4100
|
+
value: b(y[_])
|
|
4095
4101
|
}), k.push({
|
|
4096
4102
|
op: r,
|
|
4097
4103
|
path: S,
|
|
4098
|
-
value: b(w[
|
|
4104
|
+
value: b(w[_])
|
|
4099
4105
|
});
|
|
4100
4106
|
}
|
|
4101
|
-
for (let
|
|
4102
|
-
const S = I.concat([
|
|
4103
|
-
|
|
4107
|
+
for (let _ = w.length; _ < y.length; _++) {
|
|
4108
|
+
const S = I.concat([_]);
|
|
4109
|
+
v.push({
|
|
4104
4110
|
op: e,
|
|
4105
4111
|
path: S,
|
|
4106
4112
|
// Need to maybe clone it, as it can in fact be the original value
|
|
4107
4113
|
// due to the base/copy inversion at the start of this function
|
|
4108
|
-
value: b(y[
|
|
4114
|
+
value: b(y[_])
|
|
4109
4115
|
});
|
|
4110
4116
|
}
|
|
4111
|
-
for (let
|
|
4112
|
-
const S = I.concat([
|
|
4117
|
+
for (let _ = y.length - 1; w.length <= _; --_) {
|
|
4118
|
+
const S = I.concat([_]);
|
|
4113
4119
|
k.push({
|
|
4114
4120
|
op: n,
|
|
4115
4121
|
path: S
|
|
4116
4122
|
});
|
|
4117
4123
|
}
|
|
4118
4124
|
}
|
|
4119
|
-
function c(
|
|
4120
|
-
const { base_: w, copy_: f } =
|
|
4121
|
-
Je(
|
|
4122
|
-
const S = gn(w, y), A = gn(f, y), E =
|
|
4125
|
+
function c(h, I, v, k) {
|
|
4126
|
+
const { base_: w, copy_: f } = h;
|
|
4127
|
+
Je(h.assigned_, (y, _) => {
|
|
4128
|
+
const S = gn(w, y), A = gn(f, y), E = _ ? Ze(w, y) ? r : e : n;
|
|
4123
4129
|
if (S === A && E === r)
|
|
4124
4130
|
return;
|
|
4125
4131
|
const T = I.concat(y);
|
|
4126
|
-
|
|
4132
|
+
v.push(E === n ? { op: E, path: T } : { op: E, path: T, value: A }), k.push(
|
|
4127
4133
|
E === e ? { op: n, path: T } : E === n ? { op: e, path: T, value: b(S) } : { op: r, path: T, value: b(S) }
|
|
4128
4134
|
);
|
|
4129
4135
|
});
|
|
4130
4136
|
}
|
|
4131
|
-
function u(
|
|
4132
|
-
let { base_: w, copy_: f } =
|
|
4133
|
-
w.forEach((
|
|
4134
|
-
if (!f.has(
|
|
4137
|
+
function u(h, I, v, k) {
|
|
4138
|
+
let { base_: w, copy_: f } = h, y = 0;
|
|
4139
|
+
w.forEach((_) => {
|
|
4140
|
+
if (!f.has(_)) {
|
|
4135
4141
|
const S = I.concat([y]);
|
|
4136
|
-
|
|
4142
|
+
v.push({
|
|
4137
4143
|
op: n,
|
|
4138
4144
|
path: S,
|
|
4139
|
-
value:
|
|
4145
|
+
value: _
|
|
4140
4146
|
}), k.unshift({
|
|
4141
4147
|
op: e,
|
|
4142
4148
|
path: S,
|
|
4143
|
-
value:
|
|
4149
|
+
value: _
|
|
4144
4150
|
});
|
|
4145
4151
|
}
|
|
4146
4152
|
y++;
|
|
4147
|
-
}), y = 0, f.forEach((
|
|
4148
|
-
if (!w.has(
|
|
4153
|
+
}), y = 0, f.forEach((_) => {
|
|
4154
|
+
if (!w.has(_)) {
|
|
4149
4155
|
const S = I.concat([y]);
|
|
4150
|
-
|
|
4156
|
+
v.push({
|
|
4151
4157
|
op: e,
|
|
4152
4158
|
path: S,
|
|
4153
|
-
value:
|
|
4159
|
+
value: _
|
|
4154
4160
|
}), k.unshift({
|
|
4155
4161
|
op: n,
|
|
4156
4162
|
path: S,
|
|
4157
|
-
value:
|
|
4163
|
+
value: _
|
|
4158
4164
|
});
|
|
4159
4165
|
}
|
|
4160
4166
|
y++;
|
|
4161
4167
|
});
|
|
4162
4168
|
}
|
|
4163
|
-
function d(
|
|
4164
|
-
|
|
4169
|
+
function d(h, I, v, k) {
|
|
4170
|
+
v.push({
|
|
4165
4171
|
op: r,
|
|
4166
4172
|
path: [],
|
|
4167
4173
|
value: I === zn ? void 0 : I
|
|
4168
4174
|
}), k.push({
|
|
4169
4175
|
op: r,
|
|
4170
4176
|
path: [],
|
|
4171
|
-
value:
|
|
4177
|
+
value: h
|
|
4172
4178
|
});
|
|
4173
4179
|
}
|
|
4174
|
-
function p(
|
|
4175
|
-
return I.forEach((
|
|
4176
|
-
const { path: k, op: w } =
|
|
4177
|
-
let f =
|
|
4180
|
+
function p(h, I) {
|
|
4181
|
+
return I.forEach((v) => {
|
|
4182
|
+
const { path: k, op: w } = v;
|
|
4183
|
+
let f = h;
|
|
4178
4184
|
for (let A = 0; A < k.length - 1; A++) {
|
|
4179
4185
|
const E = ge(f);
|
|
4180
4186
|
let T = k[A];
|
|
4181
4187
|
typeof T != "string" && typeof T != "number" && (T = "" + T), (E === 0 || E === 1) && (T === "__proto__" || T === "constructor") && B(19), typeof f == "function" && T === "prototype" && B(19), f = gn(f, T), typeof f != "object" && B(18, k.join("/"));
|
|
4182
4188
|
}
|
|
4183
|
-
const y = ge(f),
|
|
4189
|
+
const y = ge(f), _ = m(v.value), S = k[k.length - 1];
|
|
4184
4190
|
switch (w) {
|
|
4185
4191
|
case r:
|
|
4186
4192
|
switch (y) {
|
|
4187
4193
|
case 2:
|
|
4188
|
-
return f.set(S,
|
|
4194
|
+
return f.set(S, _);
|
|
4189
4195
|
case 3:
|
|
4190
4196
|
B(16);
|
|
4191
4197
|
default:
|
|
4192
|
-
return f[S] =
|
|
4198
|
+
return f[S] = _;
|
|
4193
4199
|
}
|
|
4194
4200
|
case e:
|
|
4195
4201
|
switch (y) {
|
|
4196
4202
|
case 1:
|
|
4197
|
-
return S === "-" ? f.push(
|
|
4203
|
+
return S === "-" ? f.push(_) : f.splice(S, 0, _);
|
|
4198
4204
|
case 2:
|
|
4199
|
-
return f.set(S,
|
|
4205
|
+
return f.set(S, _);
|
|
4200
4206
|
case 3:
|
|
4201
|
-
return f.add(
|
|
4207
|
+
return f.add(_);
|
|
4202
4208
|
default:
|
|
4203
|
-
return f[S] =
|
|
4209
|
+
return f[S] = _;
|
|
4204
4210
|
}
|
|
4205
4211
|
case n:
|
|
4206
4212
|
switch (y) {
|
|
@@ -4209,33 +4215,33 @@ function ts() {
|
|
|
4209
4215
|
case 2:
|
|
4210
4216
|
return f.delete(S);
|
|
4211
4217
|
case 3:
|
|
4212
|
-
return f.delete(
|
|
4218
|
+
return f.delete(v.value);
|
|
4213
4219
|
default:
|
|
4214
4220
|
return delete f[S];
|
|
4215
4221
|
}
|
|
4216
4222
|
default:
|
|
4217
4223
|
B(17, w);
|
|
4218
4224
|
}
|
|
4219
|
-
}),
|
|
4220
|
-
}
|
|
4221
|
-
function h
|
|
4222
|
-
if (!Yt(
|
|
4223
|
-
return
|
|
4224
|
-
if (Array.isArray(
|
|
4225
|
-
return
|
|
4226
|
-
if (sr(
|
|
4225
|
+
}), h;
|
|
4226
|
+
}
|
|
4227
|
+
function m(h) {
|
|
4228
|
+
if (!Yt(h))
|
|
4229
|
+
return h;
|
|
4230
|
+
if (Array.isArray(h))
|
|
4231
|
+
return h.map(m);
|
|
4232
|
+
if (sr(h))
|
|
4227
4233
|
return new Map(
|
|
4228
|
-
Array.from(
|
|
4234
|
+
Array.from(h.entries()).map(([v, k]) => [v, m(k)])
|
|
4229
4235
|
);
|
|
4230
|
-
if (ir(
|
|
4231
|
-
return new Set(Array.from(
|
|
4232
|
-
const I = Object.create(he(
|
|
4233
|
-
for (const
|
|
4234
|
-
I[
|
|
4235
|
-
return Ze(
|
|
4236
|
+
if (ir(h))
|
|
4237
|
+
return new Set(Array.from(h).map(m));
|
|
4238
|
+
const I = Object.create(he(h));
|
|
4239
|
+
for (const v in h)
|
|
4240
|
+
I[v] = m(h[v]);
|
|
4241
|
+
return Ze(h, qe) && (I[qe] = h[qe]), I;
|
|
4236
4242
|
}
|
|
4237
|
-
function b(
|
|
4238
|
-
return me(
|
|
4243
|
+
function b(h) {
|
|
4244
|
+
return me(h) ? m(h) : h;
|
|
4239
4245
|
}
|
|
4240
4246
|
Ma("Patches", {
|
|
4241
4247
|
applyPatches_: p,
|
|
@@ -4568,14 +4574,14 @@ class Bo {
|
|
|
4568
4574
|
transitionsMap: u,
|
|
4569
4575
|
trackItemsMap: d,
|
|
4570
4576
|
structure: p
|
|
4571
|
-
} = this.getState(),
|
|
4577
|
+
} = this.getState(), m = C({
|
|
4572
4578
|
trackItemIds: i,
|
|
4573
4579
|
tracks: o,
|
|
4574
4580
|
transitionIds: c,
|
|
4575
4581
|
transitionsMap: u,
|
|
4576
4582
|
trackItemsMap: d,
|
|
4577
4583
|
structure: p
|
|
4578
|
-
}), b = [],
|
|
4584
|
+
}), b = [], h = [], I = [], v = [], k = [], w = [];
|
|
4579
4585
|
e.forEach((x) => {
|
|
4580
4586
|
let F;
|
|
4581
4587
|
const tt = x.path.slice(1);
|
|
@@ -4591,30 +4597,30 @@ class Bo {
|
|
|
4591
4597
|
path: tt,
|
|
4592
4598
|
op: "add",
|
|
4593
4599
|
value: x.oldValue
|
|
4594
|
-
}, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ?
|
|
4600
|
+
}, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? h.push(F) : x.path.includes("trackItemsMap") ? k.push(F) : x.path.includes("transitionsMap") ? v.push(F) : x.path.includes("tracks") ? b.push(F) : x.path.includes("structure") && w.push(F);
|
|
4595
4601
|
});
|
|
4596
4602
|
const f = this.applyPatch(
|
|
4597
|
-
|
|
4603
|
+
m.tracks,
|
|
4598
4604
|
b
|
|
4599
4605
|
), y = this.applyPatch(
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
),
|
|
4603
|
-
|
|
4606
|
+
m.transitionIds,
|
|
4607
|
+
h
|
|
4608
|
+
), _ = this.applyPatch(
|
|
4609
|
+
m.trackItemIds,
|
|
4604
4610
|
I
|
|
4605
4611
|
), S = this.applyPatch(
|
|
4606
|
-
|
|
4607
|
-
|
|
4612
|
+
m.transitionsMap,
|
|
4613
|
+
v
|
|
4608
4614
|
), A = this.applyPatch(
|
|
4609
|
-
|
|
4615
|
+
m.trackItemsMap,
|
|
4610
4616
|
k
|
|
4611
4617
|
), E = this.applyPatch(
|
|
4612
|
-
|
|
4618
|
+
m.structure,
|
|
4613
4619
|
w
|
|
4614
4620
|
), T = C({
|
|
4615
4621
|
tracks: f,
|
|
4616
4622
|
transitionIds: y,
|
|
4617
|
-
trackItemIds:
|
|
4623
|
+
trackItemIds: _,
|
|
4618
4624
|
transitionsMap: S,
|
|
4619
4625
|
trackItemsMap: A,
|
|
4620
4626
|
structure: E
|
|
@@ -4639,14 +4645,14 @@ class Bo {
|
|
|
4639
4645
|
transitionsMap: u,
|
|
4640
4646
|
trackItemsMap: d,
|
|
4641
4647
|
structure: p
|
|
4642
|
-
} = this.getState(),
|
|
4648
|
+
} = this.getState(), m = C({
|
|
4643
4649
|
trackItemIds: i,
|
|
4644
4650
|
tracks: o,
|
|
4645
4651
|
transitionIds: c,
|
|
4646
4652
|
transitionsMap: u,
|
|
4647
4653
|
trackItemsMap: d,
|
|
4648
4654
|
structure: p
|
|
4649
|
-
}), b = [],
|
|
4655
|
+
}), b = [], h = [], I = [], v = [], k = [], w = [];
|
|
4650
4656
|
e.forEach((x) => {
|
|
4651
4657
|
let F;
|
|
4652
4658
|
const tt = x.path.slice(1);
|
|
@@ -4662,30 +4668,30 @@ class Bo {
|
|
|
4662
4668
|
path: tt,
|
|
4663
4669
|
op: "remove",
|
|
4664
4670
|
value: x.oldValue
|
|
4665
|
-
}, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ?
|
|
4671
|
+
}, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? h.push(F) : x.path.includes("trackItemsMap") ? k.push(F) : x.path.includes("transitionsMap") ? v.push(F) : x.path.includes("structure") ? w.push(F) : b.push(F);
|
|
4666
4672
|
});
|
|
4667
4673
|
const f = this.applyPatch(
|
|
4668
|
-
|
|
4674
|
+
m.tracks,
|
|
4669
4675
|
b
|
|
4670
4676
|
), y = this.applyPatch(
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
),
|
|
4674
|
-
|
|
4677
|
+
m.transitionIds,
|
|
4678
|
+
h
|
|
4679
|
+
), _ = this.applyPatch(
|
|
4680
|
+
m.trackItemIds,
|
|
4675
4681
|
I
|
|
4676
4682
|
), S = this.applyPatch(
|
|
4677
|
-
|
|
4678
|
-
|
|
4683
|
+
m.transitionsMap,
|
|
4684
|
+
v
|
|
4679
4685
|
), A = this.applyPatch(
|
|
4680
|
-
|
|
4686
|
+
m.trackItemsMap,
|
|
4681
4687
|
k
|
|
4682
4688
|
), E = this.applyPatch(
|
|
4683
|
-
|
|
4689
|
+
m.structure,
|
|
4684
4690
|
w
|
|
4685
4691
|
), T = C({
|
|
4686
4692
|
tracks: f,
|
|
4687
4693
|
transitionIds: y,
|
|
4688
|
-
trackItemIds:
|
|
4694
|
+
trackItemIds: _,
|
|
4689
4695
|
transitionsMap: S,
|
|
4690
4696
|
trackItemsMap: A,
|
|
4691
4697
|
structure: E
|