@vidispine/vdt-js 24.4.0-pre.2 → 25.3.0-pre.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +340 -333
- package/dist/index.umd.cjs +2 -2
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -5,16 +5,16 @@ const pt = (e, t) => t ? pt(t, e % t) : e, J = (e) => {
|
|
|
5
5
|
const { width: t, height: s } = e || {};
|
|
6
6
|
if (t === void 0 || s === void 0)
|
|
7
7
|
return;
|
|
8
|
-
const
|
|
9
|
-
let r = t /
|
|
10
|
-
return r > 21 && (
|
|
11
|
-
},
|
|
12
|
-
let
|
|
8
|
+
const n = pt(t, s);
|
|
9
|
+
let r = t / n, i = s / n;
|
|
10
|
+
return r > 21 && (i = 1, r = (t / s).toFixed(2)), [r, i].join(":");
|
|
11
|
+
}, M = (e) => Object.fromEntries((e == null ? void 0 : e.map(({ key: t, value: s }) => [t, s])) || []), Gt = (e, t, s) => {
|
|
12
|
+
let n;
|
|
13
13
|
return (r) => {
|
|
14
14
|
const o = () => {
|
|
15
|
-
|
|
16
|
-
}, a = s && !
|
|
17
|
-
clearTimeout(
|
|
15
|
+
n = null, s || e.apply(void 0, r);
|
|
16
|
+
}, a = s && !n;
|
|
17
|
+
clearTimeout(n), n = setTimeout(o, t), a && e.apply(void 0, r);
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
function zt() {
|
|
@@ -321,7 +321,7 @@ const os = {
|
|
|
321
321
|
const t = (s) => Kt(s) && s.value === void 0 && !!Object.entries(e);
|
|
322
322
|
return Array.isArray(e) ? e.every(It) : t(e);
|
|
323
323
|
}, Jt = (e, t) => e + (t.length > 1 ? "s" : ""), Ot = (e, t) => {
|
|
324
|
-
const s = e.filter((
|
|
324
|
+
const s = e.filter((n) => !t.includes(n));
|
|
325
325
|
if (s.length)
|
|
326
326
|
throw Error(
|
|
327
327
|
`Unsupported ${Jt("key", s)} (${s.join(", ")})`
|
|
@@ -344,8 +344,8 @@ const os = {
|
|
|
344
344
|
Ot(Object.keys(e), Ht);
|
|
345
345
|
const t = X(e == null ? void 0 : e.value);
|
|
346
346
|
if (t === void 0) {
|
|
347
|
-
const { value: s, ...
|
|
348
|
-
return
|
|
347
|
+
const { value: s, ...n } = e;
|
|
348
|
+
return n;
|
|
349
349
|
}
|
|
350
350
|
return {
|
|
351
351
|
...e,
|
|
@@ -359,43 +359,43 @@ const os = {
|
|
|
359
359
|
return { value: [...Array.isArray(t) ? t : [t]] };
|
|
360
360
|
}, Rt = (e) => {
|
|
361
361
|
const t = [], s = [];
|
|
362
|
-
let
|
|
363
|
-
return Object.entries(e || {}).forEach(([r,
|
|
362
|
+
let n = {};
|
|
363
|
+
return Object.entries(e || {}).forEach(([r, i]) => {
|
|
364
364
|
if (Yt.includes(r))
|
|
365
|
-
|
|
366
|
-
else if (At(
|
|
365
|
+
n = { ...n, [r]: i };
|
|
366
|
+
else if (At(i))
|
|
367
367
|
try {
|
|
368
|
-
s.push({ name: r, ...Qt(
|
|
368
|
+
s.push({ name: r, ...Qt(i) });
|
|
369
369
|
} catch (o) {
|
|
370
370
|
throw Error(o.message + (r ? ` for field "${r}"` : ""));
|
|
371
371
|
}
|
|
372
|
-
else if (It(
|
|
373
|
-
(Array.isArray(
|
|
372
|
+
else if (It(i))
|
|
373
|
+
(Array.isArray(i) ? i : [i]).forEach((o) => {
|
|
374
374
|
t.push({ name: r, ...Rt(o) });
|
|
375
375
|
});
|
|
376
376
|
else
|
|
377
377
|
throw Error(`Unhandled value for "${r}"`);
|
|
378
378
|
}), {
|
|
379
|
-
...
|
|
379
|
+
...n,
|
|
380
380
|
...t.length > 0 ? { group: t } : {},
|
|
381
381
|
...s.length > 0 ? { field: s } : {}
|
|
382
382
|
};
|
|
383
383
|
}, Zt = (e) => {
|
|
384
|
-
const { start: t = "-INF", end: s = "+INF", base:
|
|
384
|
+
const { start: t = "-INF", end: s = "+INF", base: n = void 0, ...r } = e, { group: i, field: o } = Rt(r);
|
|
385
385
|
return {
|
|
386
|
-
...
|
|
386
|
+
...i ? { group: i } : {},
|
|
387
387
|
...o ? { field: o } : {},
|
|
388
388
|
start: t.toString(),
|
|
389
389
|
end: s.toString(),
|
|
390
|
-
...
|
|
390
|
+
...n ? { base: n } : {}
|
|
391
391
|
};
|
|
392
392
|
}, ds = (e) => ({
|
|
393
393
|
timespan: (Array.isArray(e) ? e : [e || {}]).map((t) => Zt(t))
|
|
394
394
|
}), te = (e, t) => {
|
|
395
|
-
var r,
|
|
396
|
-
const [s] = ((r = e == null ? void 0 : e.start) == null ? void 0 : r.split("@")) || [], [
|
|
397
|
-
return Number(s) < Number(
|
|
398
|
-
},
|
|
395
|
+
var r, i;
|
|
396
|
+
const [s] = ((r = e == null ? void 0 : e.start) == null ? void 0 : r.split("@")) || [], [n] = ((i = t == null ? void 0 : t.start) == null ? void 0 : i.split("@")) || [];
|
|
397
|
+
return Number(s) < Number(n) ? -1 : Number(s) > Number(n) ? 1 : 0;
|
|
398
|
+
}, F = (e) => Array.isArray(e) ? e : e && [e] || [], at = (e) => Array.isArray(e) ? e.pop() : e, ee = (e) => (e == null ? void 0 : e.every((t) => typeof t == "string")) || !1, yt = {
|
|
399
399
|
includeValueAttributes: !1
|
|
400
400
|
};
|
|
401
401
|
function se(e, t) {
|
|
@@ -405,12 +405,12 @@ function se(e, t) {
|
|
|
405
405
|
};
|
|
406
406
|
if (s === !1)
|
|
407
407
|
return e == null ? void 0 : e.value;
|
|
408
|
-
const { value:
|
|
408
|
+
const { value: n, ...r } = e;
|
|
409
409
|
return { ...s === !0 && r || Array.isArray(s) && Object.fromEntries(
|
|
410
410
|
Object.entries(r).filter(
|
|
411
411
|
([o]) => s.includes(o)
|
|
412
412
|
)
|
|
413
|
-
) || {}, value:
|
|
413
|
+
) || {}, value: n };
|
|
414
414
|
}
|
|
415
415
|
const St = {
|
|
416
416
|
...yt,
|
|
@@ -418,21 +418,21 @@ const St = {
|
|
|
418
418
|
arrayOnSingleValue: !0
|
|
419
419
|
};
|
|
420
420
|
function re(e, t) {
|
|
421
|
-
const { joinValue: s, arrayOnSingleValue:
|
|
421
|
+
const { joinValue: s, arrayOnSingleValue: n, ...r } = {
|
|
422
422
|
...St,
|
|
423
423
|
...t || {}
|
|
424
|
-
},
|
|
425
|
-
return ee(
|
|
424
|
+
}, i = e == null ? void 0 : e.map((o) => se(o, r));
|
|
425
|
+
return ee(i) && s ? i == null ? void 0 : i.join(s) : n !== !0 && (i == null ? void 0 : i.length) <= 1 ? i == null ? void 0 : i[0] : i;
|
|
426
426
|
}
|
|
427
427
|
const vt = {
|
|
428
428
|
includeFieldAttributes: !1,
|
|
429
429
|
...St
|
|
430
|
-
},
|
|
431
|
-
const { includeFieldAttributes: s, ...
|
|
430
|
+
}, ne = (e, t) => {
|
|
431
|
+
const { includeFieldAttributes: s, ...n } = {
|
|
432
432
|
...vt,
|
|
433
433
|
...t || {}
|
|
434
|
-
}, { value: r, ...
|
|
435
|
-
Object.entries(
|
|
434
|
+
}, { value: r, ...i } = e, o = re(r, n), a = s === !0 && i || Array.isArray(s) && Object.fromEntries(
|
|
435
|
+
Object.entries(i).filter(
|
|
436
436
|
([c]) => s.includes(c)
|
|
437
437
|
)
|
|
438
438
|
) || {};
|
|
@@ -442,48 +442,48 @@ const vt = {
|
|
|
442
442
|
fieldAsList: !1,
|
|
443
443
|
arrayOnSingleField: !1,
|
|
444
444
|
overrideField: void 0
|
|
445
|
-
},
|
|
445
|
+
}, Dt = (e, t) => {
|
|
446
446
|
const s = {
|
|
447
447
|
...G,
|
|
448
448
|
...t || {}
|
|
449
|
-
}, { fieldAsList:
|
|
449
|
+
}, { fieldAsList: n, arrayOnSingleField: r, overrideField: i } = s, o = i === !0 && n === !1, a = {};
|
|
450
450
|
return e == null || e.forEach((c) => {
|
|
451
|
-
const { name: l } = c, u =
|
|
452
|
-
m ? o ? a[l] = u : a[l] = [
|
|
453
|
-
}),
|
|
454
|
-
},
|
|
451
|
+
const { name: l } = c, u = ne(c, s), f = r === !0 ? F(u) : u, m = a[l];
|
|
452
|
+
m ? o ? a[l] = u : a[l] = [F(m), F(u)].flat() : a[l] = f;
|
|
453
|
+
}), n === !0 ? Object.values(a).flat() : a;
|
|
454
|
+
}, Ft = {
|
|
455
455
|
...G,
|
|
456
456
|
includeGroupAttributes: !1,
|
|
457
457
|
groupAsList: !1,
|
|
458
458
|
arrayOnSingleGroup: !1,
|
|
459
459
|
overrideGroup: void 0
|
|
460
|
-
},
|
|
460
|
+
}, ie = (e, t) => {
|
|
461
461
|
const s = {
|
|
462
|
-
...
|
|
462
|
+
...Ft,
|
|
463
463
|
...t || {}
|
|
464
|
-
}, { includeGroupAttributes:
|
|
464
|
+
}, { includeGroupAttributes: n } = s, r = Object.fromEntries(
|
|
465
465
|
Object.entries(s).filter(
|
|
466
466
|
([f]) => Object.keys(G).includes(f)
|
|
467
467
|
)
|
|
468
|
-
), { field:
|
|
468
|
+
), { field: i, group: o, ...a } = e, c = i && Dt(i, r), l = o && Mt(o, s);
|
|
469
469
|
return {
|
|
470
|
-
...
|
|
470
|
+
...n === !0 && a || Array.isArray(n) && Object.fromEntries(
|
|
471
471
|
Object.entries(a).filter(
|
|
472
|
-
([f]) =>
|
|
472
|
+
([f]) => n.includes(f)
|
|
473
473
|
)
|
|
474
474
|
) || {},
|
|
475
475
|
...r != null && r.fieldAsList ? c && { field: c } || {} : c,
|
|
476
476
|
...s != null && s.groupAsList ? l && { group: l } || {} : l
|
|
477
477
|
};
|
|
478
|
-
}, Q =
|
|
479
|
-
const s = { ...Q, ...t || {} }, { groupAsList:
|
|
478
|
+
}, Q = Ft, Mt = (e, t) => {
|
|
479
|
+
const s = { ...Q, ...t || {} }, { groupAsList: n, arrayOnSingleGroup: r, overrideGroup: i } = s, o = i === !0 && n === !1, a = {};
|
|
480
480
|
return e == null || e.forEach((c) => {
|
|
481
|
-
const { name: l } = c, u =
|
|
481
|
+
const { name: l } = c, u = ie(c, s), f = r === !0 ? F(u) : u, m = a[l];
|
|
482
482
|
m ? o ? a[l] = u : a[l] = [
|
|
483
|
-
|
|
484
|
-
|
|
483
|
+
F(m),
|
|
484
|
+
F(u)
|
|
485
485
|
].flat() : a[l] = f;
|
|
486
|
-
}),
|
|
486
|
+
}), n ? Object.values(a).flat() : a;
|
|
487
487
|
}, Nt = {
|
|
488
488
|
...Q,
|
|
489
489
|
includeTimespanAttributes: !1,
|
|
@@ -496,21 +496,21 @@ const vt = {
|
|
|
496
496
|
const s = {
|
|
497
497
|
...Nt,
|
|
498
498
|
...t || {}
|
|
499
|
-
}, { includeTimespanAttributes:
|
|
499
|
+
}, { includeTimespanAttributes: n, arrayOnSingle: r, flat: i } = s, o = Object.fromEntries(
|
|
500
500
|
Object.entries(t).map(([d, h]) => {
|
|
501
501
|
if (Object.keys(Q).includes(d))
|
|
502
|
-
return ["arrayOnSingleGroup", "arrayOnSingleField", "arrayOnSingleValue"].includes(d) && (h !== void 0 ? h : r === !0) ? [d, !0] : ["overrideGroup", "overrideField"].includes(d) && (h !== void 0 ? h :
|
|
502
|
+
return ["arrayOnSingleGroup", "arrayOnSingleField", "arrayOnSingleValue"].includes(d) && (h !== void 0 ? h : r === !0) ? [d, !0] : ["overrideGroup", "overrideField"].includes(d) && (h !== void 0 ? h : i === !0) ? [d, !0] : [d, h];
|
|
503
503
|
}).filter((d) => !!d)
|
|
504
504
|
), a = Object.fromEntries(
|
|
505
505
|
Object.entries(t).map(([d, h]) => {
|
|
506
506
|
if (Object.keys(G).includes(d))
|
|
507
|
-
return ["arrayOnSingleField", "arrayOnSingleValue"].includes(d) && (h !== void 0 ? h : r === !0) ? [d, !0] : ["overrideField"].includes(d) && (h !== void 0 ? h :
|
|
507
|
+
return ["arrayOnSingleField", "arrayOnSingleValue"].includes(d) && (h !== void 0 ? h : r === !0) ? [d, !0] : ["overrideField"].includes(d) && (h !== void 0 ? h : i === !0) ? [d, !0] : [d, h];
|
|
508
508
|
}).filter((d) => !!d)
|
|
509
|
-
), { field: c, group: l, ...u } = e || {}, f = c &&
|
|
509
|
+
), { field: c, group: l, ...u } = e || {}, f = c && Dt(c, a), m = l && Mt(l, o);
|
|
510
510
|
return {
|
|
511
|
-
...
|
|
511
|
+
...n === !0 && u || Array.isArray(n) && Object.fromEntries(
|
|
512
512
|
Object.entries(u).filter(
|
|
513
|
-
([d]) =>
|
|
513
|
+
([d]) => n.includes(d)
|
|
514
514
|
)
|
|
515
515
|
) || {},
|
|
516
516
|
...a != null && a.fieldAsList ? { field: f } : f,
|
|
@@ -527,13 +527,13 @@ const vt = {
|
|
|
527
527
|
const s = {
|
|
528
528
|
...Z,
|
|
529
529
|
...t || {}
|
|
530
|
-
}, { timespanAsList:
|
|
531
|
-
|
|
532
|
-
const u = (a !== void 0 ? a === !0 : o === !0) &&
|
|
530
|
+
}, { timespanAsList: n, joinTimespan: r, sortTimespan: i, flat: o, flatTimespan: a, ...c } = s, l = { flat: o, ...c };
|
|
531
|
+
i && e.sort(te);
|
|
532
|
+
const u = (a !== void 0 ? a === !0 : o === !0) && n === !1, f = {};
|
|
533
533
|
return e == null || e.forEach((m) => {
|
|
534
534
|
const { start: p, end: d } = m, h = u ? "flat" : [p, d].join(r), g = ae(m, l), E = f[h];
|
|
535
|
-
E ? u ? p === "-INF" && d === "+INF" ? f[h] = { ...at(E), ...g } : f[h] = { ...g, ...at(E) } : f[h] = [...
|
|
536
|
-
}),
|
|
535
|
+
E ? u ? p === "-INF" && d === "+INF" ? f[h] = { ...at(E), ...g } : f[h] = { ...g, ...at(E) } : f[h] = [...F(E), g] : f[h] = g;
|
|
536
|
+
}), n === !0 ? Object.values(f) : u ? Object.values(f).pop() : f;
|
|
537
537
|
}, oe = {
|
|
538
538
|
...Z,
|
|
539
539
|
includeMetadataAttributes: !1,
|
|
@@ -543,22 +543,22 @@ function ce(e, t) {
|
|
|
543
543
|
const s = {
|
|
544
544
|
...oe,
|
|
545
545
|
...t || {}
|
|
546
|
-
}, { includeMetadataAttributes:
|
|
546
|
+
}, { includeMetadataAttributes: n, flat: r } = s, { timespan: i = [], ...o } = e || {}, a = Object.fromEntries(
|
|
547
547
|
Object.entries(s).map(([u, f]) => {
|
|
548
548
|
if (Object.keys(Z).includes(u))
|
|
549
549
|
return ["onlyGeneric", "overrideGroup", "overrideField"].includes(u) && (f !== void 0 ? f : r === !0) ? [u, !0] : [u, f];
|
|
550
550
|
}).filter((u) => !!u)
|
|
551
551
|
), c = Ct(
|
|
552
|
-
|
|
552
|
+
i,
|
|
553
553
|
a
|
|
554
554
|
);
|
|
555
555
|
return {
|
|
556
|
-
...
|
|
556
|
+
...n === !0 && {
|
|
557
557
|
...o,
|
|
558
558
|
...o.revision ? { revision: o.revision.split(",") } : {}
|
|
559
|
-
} || Array.isArray(
|
|
559
|
+
} || Array.isArray(n) && Object.fromEntries(
|
|
560
560
|
Object.entries(o).map(([u, f]) => {
|
|
561
|
-
if (
|
|
561
|
+
if (n.includes(u))
|
|
562
562
|
return [
|
|
563
563
|
u,
|
|
564
564
|
u === "revision" && typeof f == "string" ? f.split(",") : f
|
|
@@ -570,7 +570,7 @@ function ce(e, t) {
|
|
|
570
570
|
}
|
|
571
571
|
const ls = (e) => {
|
|
572
572
|
const { field: t = [] } = e || {};
|
|
573
|
-
return
|
|
573
|
+
return M(t);
|
|
574
574
|
}, tt = {
|
|
575
575
|
PAL: { denominator: 25, numerator: 1 },
|
|
576
576
|
NTSC: { denominator: 3e4, numerator: 1001 },
|
|
@@ -597,8 +597,8 @@ class R {
|
|
|
597
597
|
*/
|
|
598
598
|
constructor(t) {
|
|
599
599
|
this.numerator = 1, this.denominator = 1;
|
|
600
|
-
const { numerator: s = 1, denominator:
|
|
601
|
-
this.numerator = Number(s), this.denominator = Number(
|
|
600
|
+
const { numerator: s = 1, denominator: n = 1 } = t || {};
|
|
601
|
+
this.numerator = Number(s), this.denominator = Number(n);
|
|
602
602
|
}
|
|
603
603
|
/**
|
|
604
604
|
* Get TimeBase in a constant representation (e.g. "PAL") if possible, otherwise undefined
|
|
@@ -607,8 +607,8 @@ class R {
|
|
|
607
607
|
toConstant() {
|
|
608
608
|
let t;
|
|
609
609
|
return Object.entries(tt).find((s) => {
|
|
610
|
-
const [
|
|
611
|
-
return
|
|
610
|
+
const [n, r] = s, { numerator: i, denominator: o } = r;
|
|
611
|
+
return i === this.numerator && o === this.denominator ? (t = n, !0) : !1;
|
|
612
612
|
}), t;
|
|
613
613
|
}
|
|
614
614
|
/**
|
|
@@ -623,13 +623,13 @@ class R {
|
|
|
623
623
|
* @returns Text representation of the TimeBase
|
|
624
624
|
*/
|
|
625
625
|
toText(t) {
|
|
626
|
-
const { constant: s, fraction:
|
|
626
|
+
const { constant: s, fraction: n } = { ...ct.toText, ...t };
|
|
627
627
|
if (s) {
|
|
628
|
-
const
|
|
629
|
-
if (
|
|
630
|
-
return
|
|
628
|
+
const i = this.toConstant();
|
|
629
|
+
if (i)
|
|
630
|
+
return i;
|
|
631
631
|
}
|
|
632
|
-
return
|
|
632
|
+
return n || this.numerator > 1 ? [this.denominator, this.numerator].join(":") : String(this.denominator);
|
|
633
633
|
}
|
|
634
634
|
/**
|
|
635
635
|
* Output TimeBase as frame rate (by default max 16 decimal places)
|
|
@@ -647,8 +647,8 @@ class R {
|
|
|
647
647
|
const s = this.denominator / this.numerator;
|
|
648
648
|
if (Number.isInteger(s))
|
|
649
649
|
return s;
|
|
650
|
-
const { rounded:
|
|
651
|
-
return
|
|
650
|
+
const { rounded: n, fixed: r } = { ...ct.toRate, ...t || {} };
|
|
651
|
+
return n ? Math.round(s) : r === !0 || typeof r == "number" ? Number(s.toFixed(typeof r == "boolean" ? 2 : r)) : s;
|
|
652
652
|
}
|
|
653
653
|
/**
|
|
654
654
|
* Get TimeBase in a object representation
|
|
@@ -679,8 +679,8 @@ const et = (e) => {
|
|
|
679
679
|
if (typeof e == "number")
|
|
680
680
|
return new R({ denominator: e });
|
|
681
681
|
if (typeof e == "string" && e.includes(":")) {
|
|
682
|
-
const [s,
|
|
683
|
-
return new R({ denominator: s, numerator:
|
|
682
|
+
const [s, n] = e.split(":");
|
|
683
|
+
return new R({ denominator: s, numerator: n });
|
|
684
684
|
}
|
|
685
685
|
if (!["string", "number"].includes(typeof e) || Number.isNaN(Number(e)))
|
|
686
686
|
throw new Error(
|
|
@@ -693,16 +693,16 @@ const et = (e) => {
|
|
|
693
693
|
const t = e.toConstant();
|
|
694
694
|
return t === "59.94" && 4 || ["NTSC", "29.97"].includes(t) && 2 || void 0;
|
|
695
695
|
}, wt = (e) => st(e) > 0, ut = (e) => {
|
|
696
|
-
const { samples: t, timeBase: s } = e,
|
|
697
|
-
if (!
|
|
696
|
+
const { samples: t, timeBase: s } = e, n = st(s);
|
|
697
|
+
if (!n)
|
|
698
698
|
return 0;
|
|
699
|
-
const r = s.toRate({ rounded: !0 }),
|
|
699
|
+
const r = s.toRate({ rounded: !0 }), i = 60 * r, o = 60 * r - n, a = 10 * (i - n) + n, c = Math.floor((t + 1) / a), l = Math.max(
|
|
700
700
|
0,
|
|
701
|
-
(t + 1) % a -
|
|
701
|
+
(t + 1) % a - i
|
|
702
702
|
), u = Math.floor(
|
|
703
703
|
l / o
|
|
704
|
-
), m = l % o > 0 ?
|
|
705
|
-
return c * 9 *
|
|
704
|
+
), m = l % o > 0 ? n : 0;
|
|
705
|
+
return c * 9 * n + u * n + m;
|
|
706
706
|
}, V = {
|
|
707
707
|
conformTimeBase: {
|
|
708
708
|
dropFrame: void 0,
|
|
@@ -726,14 +726,14 @@ class S {
|
|
|
726
726
|
*/
|
|
727
727
|
constructor(t, s) {
|
|
728
728
|
this.samples = 0, this.timeBase = new R();
|
|
729
|
-
const { samples:
|
|
730
|
-
if (
|
|
731
|
-
if (typeof
|
|
732
|
-
this.samples =
|
|
733
|
-
else if (typeof
|
|
734
|
-
|
|
729
|
+
const { samples: n, timeBase: r } = t || {};
|
|
730
|
+
if (n !== void 0)
|
|
731
|
+
if (typeof n == "number")
|
|
732
|
+
this.samples = n;
|
|
733
|
+
else if (typeof n == "string")
|
|
734
|
+
n === "-INF" ? this.samples = -1 / 0 : n === "+INF" ? this.samples = 1 / 0 : this.samples = Number(n);
|
|
735
735
|
else
|
|
736
|
-
throw new Error(`samples is not number/string/-Inf/+Inf is: ${
|
|
736
|
+
throw new Error(`samples is not number/string/-Inf/+Inf is: ${n}`);
|
|
737
737
|
r !== void 0 && (r instanceof R ? this.timeBase = r : this.timeBase = $(r)), this.dropFrame = (s == null ? void 0 : s.dropFrame) ?? wt(this.timeBase), this.frameSeparator = (s == null ? void 0 : s.frameSeparator) ?? (this.dropFrame ? ";" : ":");
|
|
738
738
|
}
|
|
739
739
|
/**
|
|
@@ -754,11 +754,11 @@ class S {
|
|
|
754
754
|
add(t) {
|
|
755
755
|
if (!(t != null && t.timeBase) || (t == null ? void 0 : t.samples) === void 0)
|
|
756
756
|
throw Error("Invalid timeCodeType, cannot be added");
|
|
757
|
-
const { numerator: s, denominator:
|
|
757
|
+
const { numerator: s, denominator: n } = (t == null ? void 0 : t.timeBase) || {};
|
|
758
758
|
let r = t;
|
|
759
|
-
(s !== this.timeBase.numerator ||
|
|
760
|
-
const { samples:
|
|
761
|
-
return new S({ samples: this.samples +
|
|
759
|
+
(s !== this.timeBase.numerator || n !== this.timeBase.denominator) && (r = t.conformTimeBase(this.timeBase));
|
|
760
|
+
const { samples: i } = r;
|
|
761
|
+
return new S({ samples: this.samples + i, timeBase: this.timeBase });
|
|
762
762
|
}
|
|
763
763
|
/**
|
|
764
764
|
* Return this TimeCode subtracted with the supplied timeCodeType
|
|
@@ -778,11 +778,11 @@ class S {
|
|
|
778
778
|
subtract(t) {
|
|
779
779
|
if (!(t != null && t.timeBase) || (t == null ? void 0 : t.samples) === void 0)
|
|
780
780
|
throw Error("Invalid timeCodeType, cannot be subtracted");
|
|
781
|
-
const { timeBase: { numerator: s, denominator:
|
|
781
|
+
const { timeBase: { numerator: s, denominator: n } = {} } = t;
|
|
782
782
|
let r = t;
|
|
783
|
-
(s !== this.timeBase.numerator ||
|
|
784
|
-
const { samples:
|
|
785
|
-
return new S({ samples: this.samples -
|
|
783
|
+
(s !== this.timeBase.numerator || n !== this.timeBase.denominator) && (r = t.conformTimeBase(this.timeBase));
|
|
784
|
+
const { samples: i } = r;
|
|
785
|
+
return new S({ samples: this.samples - i, timeBase: this.timeBase });
|
|
786
786
|
}
|
|
787
787
|
/**
|
|
788
788
|
* Creates a new TimeCode instance with specified timeBase and samples adjusted to that.
|
|
@@ -797,7 +797,7 @@ class S {
|
|
|
797
797
|
* @returns A new TimeCode instance with the conformTo timeBase applied
|
|
798
798
|
*/
|
|
799
799
|
conformTimeBase(t, s) {
|
|
800
|
-
const
|
|
800
|
+
const n = t instanceof R ? t : $(t), r = (s == null ? void 0 : s.roundingMode) ?? "floor";
|
|
801
801
|
if (!["floor", "ceil", "round"].includes(r))
|
|
802
802
|
throw Error(
|
|
803
803
|
`Invalid mode selection "${r}". Has to be one of "${[
|
|
@@ -806,13 +806,13 @@ class S {
|
|
|
806
806
|
"round"
|
|
807
807
|
].join(", ")}"`
|
|
808
808
|
);
|
|
809
|
-
const
|
|
810
|
-
this.samples / (this.timeBase.toRate({ fixed: !1 }) /
|
|
809
|
+
const i = Math[r](
|
|
810
|
+
this.samples / (this.timeBase.toRate({ fixed: !1 }) / n.toRate({ fixed: !1 }))
|
|
811
811
|
), o = { ...V.conformTimeBase, ...s || {} };
|
|
812
812
|
return new S(
|
|
813
813
|
{
|
|
814
|
-
samples:
|
|
815
|
-
timeBase:
|
|
814
|
+
samples: i,
|
|
815
|
+
timeBase: n
|
|
816
816
|
},
|
|
817
817
|
o
|
|
818
818
|
);
|
|
@@ -830,7 +830,7 @@ class S {
|
|
|
830
830
|
*/
|
|
831
831
|
toText(t) {
|
|
832
832
|
let s = `${this.samples}`;
|
|
833
|
-
const
|
|
833
|
+
const n = { ...V.toText, ...t || {} }, r = this.timeBase.toText(n);
|
|
834
834
|
return (t != null && t.includeTimeBaseForSeconds || !["1", "1:1"].includes(r)) && (s = [this.samples, r].join("@")), s;
|
|
835
835
|
}
|
|
836
836
|
/**
|
|
@@ -852,11 +852,11 @@ class S {
|
|
|
852
852
|
const t = this.samples + (this.dropFrame ? ut(this) : 0);
|
|
853
853
|
let s = this.timeBase.toRate({ rounded: !0 });
|
|
854
854
|
["23.976", "23.98"].includes(this.timeBase.toConstant()) && (s = this.timeBase.toRate({ fixed: !0 }));
|
|
855
|
-
const
|
|
855
|
+
const n = Math.floor(t / (3600 * s)), r = Math.floor(t / (60 * s)) % 60, i = Math.floor(t / s) % 60, o = Math.floor(t % s);
|
|
856
856
|
return {
|
|
857
|
-
hours:
|
|
857
|
+
hours: n,
|
|
858
858
|
minutes: r,
|
|
859
|
-
seconds:
|
|
859
|
+
seconds: i,
|
|
860
860
|
frames: o
|
|
861
861
|
};
|
|
862
862
|
}
|
|
@@ -868,10 +868,10 @@ class S {
|
|
|
868
868
|
* @returns Time for the time code
|
|
869
869
|
*/
|
|
870
870
|
toTime() {
|
|
871
|
-
const t = this.samples + ut(this), { hours: s, minutes:
|
|
871
|
+
const t = this.samples + ut(this), { hours: s, minutes: n, seconds: r } = this.toUnits(), i = this.timeBase.toRate({ rounded: !0 }), o = t % i, a = Math.floor(1e3 * o / i), c = o / i;
|
|
872
872
|
return {
|
|
873
873
|
hours: s,
|
|
874
|
-
minutes:
|
|
874
|
+
minutes: n,
|
|
875
875
|
seconds: r,
|
|
876
876
|
milliseconds: a,
|
|
877
877
|
partialSeconds: c
|
|
@@ -883,7 +883,7 @@ class S {
|
|
|
883
883
|
* @returns Total seconds for the time code
|
|
884
884
|
*/
|
|
885
885
|
toSeconds(t) {
|
|
886
|
-
const { numerator: s, denominator:
|
|
886
|
+
const { numerator: s, denominator: n } = this.timeBase, r = +(this.samples * s / n);
|
|
887
887
|
return t != null && t.round ? Math.round(1e3 * r) / 1e3 : r;
|
|
888
888
|
}
|
|
889
889
|
/**
|
|
@@ -906,15 +906,15 @@ class S {
|
|
|
906
906
|
* @returns Duration representation of the TimeCode
|
|
907
907
|
*/
|
|
908
908
|
toDuration(t) {
|
|
909
|
-
const { format: s } = { ...V.toDuration, ...t || {} }, { hours:
|
|
910
|
-
let { minutes:
|
|
909
|
+
const { format: s } = { ...V.toDuration, ...t || {} }, { hours: n, ...r } = this.toTime();
|
|
910
|
+
let { minutes: i, seconds: o, milliseconds: a } = r;
|
|
911
911
|
if (s && typeof s != "string")
|
|
912
912
|
throw Error("format has to be a string");
|
|
913
913
|
const c = (m, p) => !s.includes(m) || !p.some((d) => s.includes(d) && s.lastIndexOf(m) > s.indexOf(d));
|
|
914
914
|
if (s && !(c("h", ["m", "s", "S"]) && c("m", ["s", "S"]) && c("s", ["S"])))
|
|
915
915
|
throw Error("format order is unsupported (has to be h, m, s then S)");
|
|
916
916
|
if (!s)
|
|
917
|
-
return `${
|
|
917
|
+
return `${n > 0 ? `${n}:${`${i}`.padStart(2, "0")}` : i}:${`${o}`.padStart(2, "0")}`;
|
|
918
918
|
const l = (m, p) => {
|
|
919
919
|
let d = m;
|
|
920
920
|
for (; p[d] === p[d + 1]; )
|
|
@@ -927,21 +927,21 @@ class S {
|
|
|
927
927
|
if (d[p - 1] === "h")
|
|
928
928
|
break;
|
|
929
929
|
const h = l(p, d);
|
|
930
|
-
f.push(`${
|
|
930
|
+
f.push(`${n}`.padStart(h, "0")), u.includes(d[p + h]) && f.push(":");
|
|
931
931
|
break;
|
|
932
932
|
}
|
|
933
933
|
case "m": {
|
|
934
934
|
if (d[p - 1] === "m")
|
|
935
935
|
break;
|
|
936
936
|
const h = l(p, d);
|
|
937
|
-
s.includes("h") || (
|
|
937
|
+
s.includes("h") || (i += n * 60), f.push(`${i}`.padStart(h, "0")), u.includes(d[p + h]) && f.push(":");
|
|
938
938
|
break;
|
|
939
939
|
}
|
|
940
940
|
case "s": {
|
|
941
941
|
if (d[p - 1] === "s")
|
|
942
942
|
break;
|
|
943
943
|
const h = l(p, d);
|
|
944
|
-
s.includes("m") || (o +=
|
|
944
|
+
s.includes("m") || (o += i * 60), f.push(`${o}`.padStart(h, "0")), u.includes(d[p + h]) && f.push(".");
|
|
945
945
|
break;
|
|
946
946
|
}
|
|
947
947
|
case "S": {
|
|
@@ -970,10 +970,10 @@ class S {
|
|
|
970
970
|
};
|
|
971
971
|
if (this.samples === -1 / 0)
|
|
972
972
|
return "00:00:00:00";
|
|
973
|
-
const { hours:
|
|
974
|
-
|
|
973
|
+
const { hours: n, minutes: r, seconds: i, frames: o } = this.toUnits(), a = s ? this.frameSeparator : ":", c = [
|
|
974
|
+
n.toFixed().padStart(2, "0"),
|
|
975
975
|
r.toFixed().padStart(2, "0"),
|
|
976
|
-
|
|
976
|
+
i.toFixed().padStart(2, "0")
|
|
977
977
|
].join(a), l = Math.max(2, `${this.timeBase.toRate({ rounded: !0 }) - 1}`.length);
|
|
978
978
|
return [c, `${o}`.padStart(l, "0")].join(this.frameSeparator);
|
|
979
979
|
}
|
|
@@ -998,12 +998,12 @@ class S {
|
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
1000
|
const ue = (e, t) => {
|
|
1001
|
-
let s = Math.abs(e),
|
|
1002
|
-
for (; s &&
|
|
1003
|
-
s >
|
|
1004
|
-
return s ||
|
|
1001
|
+
let s = Math.abs(e), n = Math.abs(t);
|
|
1002
|
+
for (; s && n && s !== n; )
|
|
1003
|
+
s > n ? [s, n] = [s - n, n] : [s, n] = [s, n - s];
|
|
1004
|
+
return s || n;
|
|
1005
1005
|
}, de = (e, t) => {
|
|
1006
|
-
const { timeBase: s, useGCD:
|
|
1006
|
+
const { timeBase: s, useGCD: n = !1, roundingMode: r, ...i } = t || {}, o = `${e}`.replace(/,/g, ".");
|
|
1007
1007
|
if (Number.isNaN(+o))
|
|
1008
1008
|
throw new Error(`seconds must be digits, is ${e}`);
|
|
1009
1009
|
let a = 1, c;
|
|
@@ -1013,45 +1013,45 @@ const ue = (e, t) => {
|
|
|
1013
1013
|
const [, u] = o.split("."), f = Math.min((u == null ? void 0 : u.length) ?? 0, 16);
|
|
1014
1014
|
a *= 10 ** f, c = Math.round(Number(o) * a);
|
|
1015
1015
|
}
|
|
1016
|
-
if (s === void 0 &&
|
|
1016
|
+
if (s === void 0 && n) {
|
|
1017
1017
|
const u = ue(a, c);
|
|
1018
1018
|
c /= u, a /= u;
|
|
1019
1019
|
}
|
|
1020
1020
|
const l = new S(
|
|
1021
1021
|
{ samples: c, timeBase: { denominator: a, numerator: 1 } },
|
|
1022
|
-
|
|
1022
|
+
i
|
|
1023
1023
|
);
|
|
1024
|
-
return s !== void 0 ? l.conformTimeBase(s, { ...
|
|
1025
|
-
}, le = ([e, t, s,
|
|
1026
|
-
const o =
|
|
1024
|
+
return s !== void 0 ? l.conformTimeBase(s, { ...i, roundingMode: r }) : l;
|
|
1025
|
+
}, le = ([e, t, s, n], r, i) => {
|
|
1026
|
+
const o = i.toRate({ rounded: !0 }), a = st(i);
|
|
1027
1027
|
if (r === 0 || !a)
|
|
1028
1028
|
return 0;
|
|
1029
1029
|
const c = t % 10 !== 0, l = c && s === 0, u = e * (3600 * o - 54 * a), f = t * 60 * o - (t - Math.ceil(t / 10)) * a, m = s * o - (c && s > 1 ? a : 0);
|
|
1030
|
-
if (l &&
|
|
1030
|
+
if (l && n < a)
|
|
1031
1031
|
throw new Error(
|
|
1032
|
-
`Frame does not exist for ${
|
|
1032
|
+
`Frame does not exist for ${i.toConstant() || i.toRate()} drop-frame`
|
|
1033
1033
|
);
|
|
1034
|
-
const p = l ?
|
|
1034
|
+
const p = l ? n - a : n, d = u + f + m + p;
|
|
1035
1035
|
return r - d;
|
|
1036
1036
|
}, H = (e, t, s) => {
|
|
1037
|
-
const [
|
|
1037
|
+
const [n, r, i, o] = e, a = t.toRate({ rounded: !0 }), c = n * 3600 * a + r * 60 * a + i * a + o;
|
|
1038
1038
|
return c - (s ? le(e, c, t) : 0);
|
|
1039
1039
|
}, fe = (e) => {
|
|
1040
1040
|
const [t] = (e == null ? void 0 : e.match(/[^0-9:\-_]/)) || [];
|
|
1041
1041
|
let s = [];
|
|
1042
1042
|
if (t) {
|
|
1043
|
-
const [r,
|
|
1044
|
-
s = [...r.split(":"),
|
|
1043
|
+
const [r, i] = e.split(t);
|
|
1044
|
+
s = [...r.split(":"), i];
|
|
1045
1045
|
} else
|
|
1046
1046
|
s = e.split(":");
|
|
1047
1047
|
if (s.length !== 4)
|
|
1048
1048
|
throw new Error('Invalid format, must be "##:##:##:##');
|
|
1049
1049
|
if (s.some((r) => Number.isNaN(r)))
|
|
1050
1050
|
throw new Error("Invalid format, values must be numbers");
|
|
1051
|
-
const
|
|
1051
|
+
const n = t || ":";
|
|
1052
1052
|
return {
|
|
1053
1053
|
smpteValues: s.map(Number),
|
|
1054
|
-
smpteFrameSeparator:
|
|
1054
|
+
smpteFrameSeparator: n
|
|
1055
1055
|
};
|
|
1056
1056
|
}, me = ["error", "add", "ignore"], he = {
|
|
1057
1057
|
exceedingMode: "error",
|
|
@@ -1059,35 +1059,35 @@ const ue = (e, t) => {
|
|
|
1059
1059
|
dropFrame: void 0,
|
|
1060
1060
|
frameSeparator: void 0
|
|
1061
1061
|
}, pe = (e, t) => {
|
|
1062
|
-
const { exceedingMode: s, timeBase:
|
|
1062
|
+
const { exceedingMode: s, timeBase: n, ...r } = { ...he, ...t };
|
|
1063
1063
|
if ([null, void 0].includes(e))
|
|
1064
1064
|
throw new Error("smpte cannot be undefined or null");
|
|
1065
1065
|
if (typeof e != "string")
|
|
1066
1066
|
throw new Error(`smpte must be a string, is ${JSON.stringify(e)}`);
|
|
1067
|
-
const { smpteValues:
|
|
1067
|
+
const { smpteValues: i, smpteFrameSeparator: o } = fe(e), a = $(n), c = {
|
|
1068
1068
|
...r,
|
|
1069
1069
|
frameSeparator: (r == null ? void 0 : r.frameSeparator) || o,
|
|
1070
1070
|
...(r == null ? void 0 : r.dropFrame) === void 0 ? {
|
|
1071
|
-
dropFrame:
|
|
1071
|
+
dropFrame: n !== void 0 ? wt(a) : [";", ","].includes(o)
|
|
1072
1072
|
} : {}
|
|
1073
1073
|
}, l = a.toRate({ rounded: !0 }), u = Math.max(0, l - 1);
|
|
1074
|
-
if (
|
|
1074
|
+
if (i.some((m) => m < 0))
|
|
1075
1075
|
throw new Error("Negative values are not supported");
|
|
1076
1076
|
let f;
|
|
1077
1077
|
switch (s) {
|
|
1078
1078
|
case "error": {
|
|
1079
|
-
const [m, p, d, h] =
|
|
1079
|
+
const [m, p, d, h] = i;
|
|
1080
1080
|
if (m >= 100 || p >= 60)
|
|
1081
1081
|
throw Error("Minutes has to be less than 60");
|
|
1082
1082
|
if (d >= 60)
|
|
1083
1083
|
throw Error("Seconds has to be less than 60");
|
|
1084
1084
|
if (h > u)
|
|
1085
1085
|
throw Error(`Frames has to be less or equal to ${u}`);
|
|
1086
|
-
f = H(
|
|
1086
|
+
f = H(i, a, c == null ? void 0 : c.dropFrame);
|
|
1087
1087
|
break;
|
|
1088
1088
|
}
|
|
1089
1089
|
case "ignore": {
|
|
1090
|
-
const [m, p, d, h] =
|
|
1090
|
+
const [m, p, d, h] = i, g = [
|
|
1091
1091
|
Math.min(100, m),
|
|
1092
1092
|
Math.min(59, p),
|
|
1093
1093
|
Math.min(59, d),
|
|
@@ -1101,7 +1101,7 @@ const ue = (e, t) => {
|
|
|
1101
1101
|
break;
|
|
1102
1102
|
}
|
|
1103
1103
|
case "add": {
|
|
1104
|
-
f = H(
|
|
1104
|
+
f = H(i, a, c == null ? void 0 : c.dropFrame);
|
|
1105
1105
|
break;
|
|
1106
1106
|
}
|
|
1107
1107
|
default:
|
|
@@ -1113,7 +1113,7 @@ const ue = (e, t) => {
|
|
|
1113
1113
|
dropFrame: void 0,
|
|
1114
1114
|
frameSeparator: void 0
|
|
1115
1115
|
}, U = (e, t) => {
|
|
1116
|
-
const { timeBase: s, ...
|
|
1116
|
+
const { timeBase: s, ...n } = { ..._e, ...t };
|
|
1117
1117
|
let r;
|
|
1118
1118
|
if (e === void 0)
|
|
1119
1119
|
r = { samples: 0 };
|
|
@@ -1126,8 +1126,8 @@ const ue = (e, t) => {
|
|
|
1126
1126
|
e === "-INF" ? r = { samples: -1 / 0 } : e === "+INF" ? r = { samples: 1 / 0 } : r = { samples: Number(e) };
|
|
1127
1127
|
if (Number.isNaN(r == null ? void 0 : r.samples) || r.timeBase && !(r.timeBase instanceof R))
|
|
1128
1128
|
throw new Error(`timeCodeText must be a number or sample@timeBase - is ${e}`);
|
|
1129
|
-
const
|
|
1130
|
-
return s ?
|
|
1129
|
+
const i = new S(r, n);
|
|
1130
|
+
return s ? i.conformTimeBase($(s), n) : i;
|
|
1131
1131
|
}, Te = {
|
|
1132
1132
|
dropFrame: void 0,
|
|
1133
1133
|
frameSeparator: void 0
|
|
@@ -1143,15 +1143,15 @@ const ue = (e, t) => {
|
|
|
1143
1143
|
if (typeof e == "string")
|
|
1144
1144
|
return U(e, t);
|
|
1145
1145
|
};
|
|
1146
|
-
function dt({ hours: e = 0, minutes: t = 0, seconds: s = 0, partialSeconds:
|
|
1147
|
-
const r = e.toFixed().padStart(2, "0"),
|
|
1148
|
-
return `${r}:${
|
|
1146
|
+
function dt({ hours: e = 0, minutes: t = 0, seconds: s = 0, partialSeconds: n = 0 }) {
|
|
1147
|
+
const r = e.toFixed().padStart(2, "0"), i = t.toFixed().padStart(2, "0"), o = s.toFixed().padStart(2, "0"), a = (n * 10).toFixed().padStart(3, "0");
|
|
1148
|
+
return `${r}:${i}:${o}.${a}`;
|
|
1149
1149
|
}
|
|
1150
1150
|
const Ae = {
|
|
1151
1151
|
subtitleGroup: "stl_subtitle",
|
|
1152
1152
|
subtitleField: "stl_text"
|
|
1153
1153
|
}, fs = (e, t) => {
|
|
1154
|
-
const { subtitleGroup: s, subtitleField:
|
|
1154
|
+
const { subtitleGroup: s, subtitleField: n } = { ...Ae, ...t || {} }, { timespan: r = [] } = e || {};
|
|
1155
1155
|
if (r.length === 0)
|
|
1156
1156
|
return "";
|
|
1157
1157
|
const o = Ct(r, {
|
|
@@ -1164,7 +1164,7 @@ const Ae = {
|
|
|
1164
1164
|
const {
|
|
1165
1165
|
start: c,
|
|
1166
1166
|
end: l,
|
|
1167
|
-
[s]: { [
|
|
1167
|
+
[s]: { [n]: u } = {}
|
|
1168
1168
|
} = (Array.isArray(a) ? a[0] : a) || {};
|
|
1169
1169
|
if (!u)
|
|
1170
1170
|
return "";
|
|
@@ -1178,29 +1178,29 @@ const Ae = {
|
|
|
1178
1178
|
${o.join(`
|
|
1179
1179
|
`)}`;
|
|
1180
1180
|
}, Ie = { count: !0, exclude: !0 }, ms = (e = [], t = {}) => {
|
|
1181
|
-
const s = { ...Ie, ...t }, { count:
|
|
1182
|
-
return e.map((
|
|
1183
|
-
field:
|
|
1184
|
-
name:
|
|
1185
|
-
count:
|
|
1186
|
-
...r === !0 ? { exclude: [
|
|
1187
|
-
} :
|
|
1188
|
-
}, hs = (e = []) => e == null ? void 0 : e.map(({ name: t, field: s, count:
|
|
1181
|
+
const s = { ...Ie, ...t }, { count: n, exclude: r } = s;
|
|
1182
|
+
return e.map((i) => typeof i == "string" ? {
|
|
1183
|
+
field: i,
|
|
1184
|
+
name: i,
|
|
1185
|
+
count: n,
|
|
1186
|
+
...r === !0 ? { exclude: [i] } : {}
|
|
1187
|
+
} : i);
|
|
1188
|
+
}, hs = (e = []) => e == null ? void 0 : e.map(({ name: t, field: s, count: n, range: r }) => ({
|
|
1189
1189
|
facetName: t,
|
|
1190
1190
|
fieldName: s,
|
|
1191
|
-
count:
|
|
1191
|
+
count: n == null ? void 0 : n.reduce((i, { fieldValue: o, value: a }) => ({ ...i, [o]: a }), {}),
|
|
1192
1192
|
...r ? {
|
|
1193
|
-
range: r.map(({ value:
|
|
1193
|
+
range: r.map(({ value: i, start: o, end: a }) => ({
|
|
1194
1194
|
start: Number.isNaN(+o) ? o : Number(o),
|
|
1195
1195
|
end: Number.isNaN(+a) ? a : Number(a),
|
|
1196
|
-
count: Number(
|
|
1196
|
+
count: Number(i) || 0
|
|
1197
1197
|
}))
|
|
1198
1198
|
} : {}
|
|
1199
1199
|
})), ps = (e = []) => {
|
|
1200
1200
|
const t = {};
|
|
1201
|
-
return e.forEach(({ name: s, field:
|
|
1202
|
-
t[s ||
|
|
1203
|
-
(
|
|
1201
|
+
return e.forEach(({ name: s, field: n, count: r }) => {
|
|
1202
|
+
t[s || n] = r.reduce(
|
|
1203
|
+
(i, { fieldValue: o, value: a }) => ({ ...i, [o]: a }),
|
|
1204
1204
|
{}
|
|
1205
1205
|
);
|
|
1206
1206
|
}), t;
|
|
@@ -1211,15 +1211,15 @@ ${o.join(`
|
|
|
1211
1211
|
}, Y = (e, t) => {
|
|
1212
1212
|
const {
|
|
1213
1213
|
arrayOnSingle: s = !0,
|
|
1214
|
-
joinValue:
|
|
1214
|
+
joinValue: n = void 0,
|
|
1215
1215
|
timespanAsList: r = !1
|
|
1216
|
-
} = { ...Bt, ...t || {} }, { field:
|
|
1217
|
-
return
|
|
1216
|
+
} = { ...Bt, ...t || {} }, { field: i = [], start: o, end: a } = e || {}, c = r ? { start: o, end: a } : {};
|
|
1217
|
+
return i.reduce((u, f) => {
|
|
1218
1218
|
const { name: m, value: p = [] } = f;
|
|
1219
1219
|
if (p.length === 0)
|
|
1220
1220
|
return u;
|
|
1221
1221
|
let d;
|
|
1222
|
-
return s === !1 && p.length === 1 ? [d] = p :
|
|
1222
|
+
return s === !1 && p.length === 1 ? [d] = p : n ? d = p.join(n) : d = p, { ...u, [m]: d };
|
|
1223
1223
|
}, c);
|
|
1224
1224
|
}, Oe = {
|
|
1225
1225
|
...Bt,
|
|
@@ -1230,20 +1230,20 @@ ${o.join(`
|
|
|
1230
1230
|
}, _s = (e = [], t) => {
|
|
1231
1231
|
const {
|
|
1232
1232
|
timespanAsList: s,
|
|
1233
|
-
joinTimespan:
|
|
1233
|
+
joinTimespan: n = "_",
|
|
1234
1234
|
flat: r,
|
|
1235
|
-
flatTimespan:
|
|
1235
|
+
flatTimespan: i,
|
|
1236
1236
|
...o
|
|
1237
1237
|
} = { ...Oe, ...t || {} };
|
|
1238
1238
|
return s === !0 ? e.map(
|
|
1239
1239
|
(a) => Y(a, { ...o, timespanAsList: s })
|
|
1240
|
-
) : r === !0 ||
|
|
1240
|
+
) : r === !0 || i === !0 ? e.reduce(
|
|
1241
1241
|
(a, c) => ({ ...a, ...Y(c, t) }),
|
|
1242
1242
|
{}
|
|
1243
1243
|
) : e.reduce(
|
|
1244
1244
|
(a, c) => ({
|
|
1245
1245
|
...a,
|
|
1246
|
-
[[c.start, c.end].join(
|
|
1246
|
+
[[c.start, c.end].join(n)]: Y(
|
|
1247
1247
|
c,
|
|
1248
1248
|
t
|
|
1249
1249
|
)
|
|
@@ -1251,11 +1251,11 @@ ${o.join(`
|
|
|
1251
1251
|
{}
|
|
1252
1252
|
);
|
|
1253
1253
|
}, be = (e, t) => {
|
|
1254
|
-
const s = j(t).toSeconds(), { thumbnails:
|
|
1254
|
+
const s = j(t).toSeconds(), { thumbnails: n = {} } = e || {}, { uri: r = [] } = n, i = r.map((a) => {
|
|
1255
1255
|
const c = a.split("/").pop().split("?").shift();
|
|
1256
1256
|
return U(c).toSeconds();
|
|
1257
|
-
}), o =
|
|
1258
|
-
(a, c, l) => Math.abs(c - s) < Math.abs(
|
|
1257
|
+
}), o = i.reduce(
|
|
1258
|
+
(a, c, l) => Math.abs(c - s) < Math.abs(i[a] - s) ? l : a,
|
|
1259
1259
|
0
|
|
1260
1260
|
);
|
|
1261
1261
|
return r[o];
|
|
@@ -1269,13 +1269,13 @@ ${o.join(`
|
|
|
1269
1269
|
end: t,
|
|
1270
1270
|
group: s = [{ id: "unknown", name: "unknown" }]
|
|
1271
1271
|
}) => {
|
|
1272
|
-
const [{ id:
|
|
1273
|
-
return { start: e, end: t, startSeconds:
|
|
1272
|
+
const [{ id: n, name: r }] = s, i = j(e).toSeconds(), o = j(t).toSeconds();
|
|
1273
|
+
return { start: e, end: t, startSeconds: i, endSeconds: o, group: { uuid: n, name: r } };
|
|
1274
1274
|
}, Ts = (e = {}, t) => {
|
|
1275
|
-
const { entry: s = [] } = e,
|
|
1275
|
+
const { entry: s = [] } = e, n = {
|
|
1276
1276
|
...Re,
|
|
1277
1277
|
...t || {}
|
|
1278
|
-
}, { includeGroupMetadata: r, flatEvents:
|
|
1278
|
+
}, { includeGroupMetadata: r, flatEvents: i, includeEntityType: o, includeNearestThumbnail: a } = n, c = s.map((l) => {
|
|
1279
1279
|
const { type: u, item: { metadata: f = {}, id: m, thumbnails: p = {} } = {}, timespan: d, item: h } = l;
|
|
1280
1280
|
let g = d.map(
|
|
1281
1281
|
(E) => ye(E)
|
|
@@ -1291,8 +1291,8 @@ ${o.join(`
|
|
|
1291
1291
|
const O = g.map((I) => {
|
|
1292
1292
|
const {
|
|
1293
1293
|
group: { uuid: b }
|
|
1294
|
-
} = I, [
|
|
1295
|
-
({ uuid: v }) => v ===
|
|
1294
|
+
} = I, [D] = b.split("/"), { field: N = [], group: C = [] } = A.find(
|
|
1295
|
+
({ uuid: v }) => v === D
|
|
1296
1296
|
);
|
|
1297
1297
|
return {
|
|
1298
1298
|
...I,
|
|
@@ -1319,7 +1319,7 @@ ${o.join(`
|
|
|
1319
1319
|
...o && u === "Collection" ? { collectionType: h } : {}
|
|
1320
1320
|
};
|
|
1321
1321
|
});
|
|
1322
|
-
return
|
|
1322
|
+
return i ? c.flatMap(
|
|
1323
1323
|
({ events: l, entityType: u, entityId: f, itemType: m, collectionType: p }) => l.map(
|
|
1324
1324
|
(d) => ({
|
|
1325
1325
|
...d,
|
|
@@ -1334,8 +1334,8 @@ ${o.join(`
|
|
|
1334
1334
|
if (e.startsWith("NOW")) {
|
|
1335
1335
|
if (e === "NOW")
|
|
1336
1336
|
return /* @__PURE__ */ new Date();
|
|
1337
|
-
const t = e[3], s = Number(e.match(/(\d+)/)[0]),
|
|
1338
|
-
switch (
|
|
1337
|
+
const t = e[3], s = Number(e.match(/(\d+)/)[0]), n = e.match(/(\d.*)/)[0].replace(/\d/g, ""), r = /* @__PURE__ */ new Date();
|
|
1338
|
+
switch (n) {
|
|
1339
1339
|
case "HOUR":
|
|
1340
1340
|
case "HOURS":
|
|
1341
1341
|
t === "+" && r.setHours(r.getHours() + s), t === "-" && r.setHours(r.getHours() - s);
|
|
@@ -1358,31 +1358,31 @@ ${o.join(`
|
|
|
1358
1358
|
return new Date(e);
|
|
1359
1359
|
}, z = (e) => {
|
|
1360
1360
|
const { property: t = [], ...s } = e || {};
|
|
1361
|
-
return { ...
|
|
1362
|
-
}, Se = (e) => z(e), ve = (e) => z(e),
|
|
1361
|
+
return { ...M(t), ...s };
|
|
1362
|
+
}, Se = (e) => z(e), ve = (e) => z(e), De = { kB: "kHz", B: "Hz", mB: "mHz" }, lt = { kB: "kbps", B: "bps", MB: "mbps" }, Fe = (e) => {
|
|
1363
1363
|
var g;
|
|
1364
1364
|
const {
|
|
1365
1365
|
timeBase: t,
|
|
1366
1366
|
channelCount: s,
|
|
1367
|
-
codec:
|
|
1367
|
+
codec: n,
|
|
1368
1368
|
mediaInfo: r,
|
|
1369
|
-
bitrate:
|
|
1369
|
+
bitrate: i,
|
|
1370
1370
|
metadata: o
|
|
1371
1371
|
} = e, a = Se(r), {
|
|
1372
1372
|
Format: c,
|
|
1373
1373
|
Resolution: l,
|
|
1374
1374
|
Bit_rate_mode: u
|
|
1375
|
-
} = a, f =
|
|
1375
|
+
} = a, f = M(o || []), m = t != null && t.denominator ? ((t == null ? void 0 : t.denominator) || 1) / ((t == null ? void 0 : t.numerator) || 1) : void 0, p = m !== void 0 ? w(m, {
|
|
1376
1376
|
base: 10,
|
|
1377
1377
|
round: 1,
|
|
1378
|
-
symbols:
|
|
1378
|
+
symbols: De
|
|
1379
1379
|
}) : void 0;
|
|
1380
1380
|
let d, h;
|
|
1381
|
-
return
|
|
1382
|
-
(g = w(
|
|
1381
|
+
return i !== void 0 && (d = w(i, { round: 2, symbols: lt }), h = Number(
|
|
1382
|
+
(g = w(i, { exponent: 1, symbols: lt }).split(" kbps")) == null ? void 0 : g[0]
|
|
1383
1383
|
)), {
|
|
1384
1384
|
audioFormat: c,
|
|
1385
|
-
audioCodec:
|
|
1385
|
+
audioCodec: n,
|
|
1386
1386
|
audioSamplerate: p,
|
|
1387
1387
|
audioSamplerateSamples: m,
|
|
1388
1388
|
audioBitDepth: l,
|
|
@@ -1420,25 +1420,25 @@ ${o.join(`
|
|
|
1420
1420
|
const {
|
|
1421
1421
|
uri: t = [],
|
|
1422
1422
|
size: s,
|
|
1423
|
-
hash:
|
|
1423
|
+
hash: n,
|
|
1424
1424
|
path: r,
|
|
1425
|
-
id:
|
|
1425
|
+
id: i,
|
|
1426
1426
|
storage: o
|
|
1427
1427
|
} = e, [a] = t, c = s !== void 0 ? w(s, { base: 2, standard: "jedec" }) : "", l = (r == null ? void 0 : r.split("/")) || [], u = l.pop() || "", f = l.map((m) => `${m}/`).join("") || void 0;
|
|
1428
1428
|
return {
|
|
1429
1429
|
uri: a,
|
|
1430
|
-
hash:
|
|
1430
|
+
hash: n,
|
|
1431
1431
|
fileSize: c,
|
|
1432
1432
|
fileSizeBytes: s,
|
|
1433
1433
|
path: r,
|
|
1434
1434
|
fileName: u,
|
|
1435
|
-
fileId:
|
|
1435
|
+
fileId: i,
|
|
1436
1436
|
storageId: o,
|
|
1437
1437
|
folderPath: f
|
|
1438
1438
|
};
|
|
1439
|
-
},
|
|
1440
|
-
const { file: t, mediaInfo: s, metadata:
|
|
1441
|
-
let o = { binaryMetadata: r, binaryMediaInfo:
|
|
1439
|
+
}, Me = (e = {}) => {
|
|
1440
|
+
const { file: t, mediaInfo: s, metadata: n = [] } = e, r = M(n), i = z(s);
|
|
1441
|
+
let o = { binaryMetadata: r, binaryMediaInfo: i };
|
|
1442
1442
|
if (t) {
|
|
1443
1443
|
const [a] = t, c = Pt(a);
|
|
1444
1444
|
o = {
|
|
@@ -1451,12 +1451,12 @@ ${o.join(`
|
|
|
1451
1451
|
const {
|
|
1452
1452
|
mediaInfo: t,
|
|
1453
1453
|
metadata: s,
|
|
1454
|
-
file:
|
|
1454
|
+
file: n,
|
|
1455
1455
|
duration: r,
|
|
1456
|
-
startTimestamp:
|
|
1456
|
+
startTimestamp: i,
|
|
1457
1457
|
startTimecode: o,
|
|
1458
1458
|
timeCodeTimeBase: a
|
|
1459
|
-
} = e, c =
|
|
1459
|
+
} = e, c = M(s || []), l = z(t);
|
|
1460
1460
|
let { Format: u } = l;
|
|
1461
1461
|
const {
|
|
1462
1462
|
Video_Format_List: f,
|
|
@@ -1479,11 +1479,11 @@ ${o.join(`
|
|
|
1479
1479
|
const h = L(r);
|
|
1480
1480
|
d.durationTimeCode = h.toObject(), d.duration = h.toDuration();
|
|
1481
1481
|
}
|
|
1482
|
-
if (
|
|
1482
|
+
if (i && (d.startTimestamp = L(i).toObject()), o !== void 0 && a && (d.startTimecode = L({
|
|
1483
1483
|
samples: o,
|
|
1484
1484
|
timeBase: a
|
|
1485
|
-
})),
|
|
1486
|
-
const [h] =
|
|
1485
|
+
})), n) {
|
|
1486
|
+
const [h] = n, g = Pt(h);
|
|
1487
1487
|
d = {
|
|
1488
1488
|
...d,
|
|
1489
1489
|
...g
|
|
@@ -1495,11 +1495,11 @@ ${o.join(`
|
|
|
1495
1495
|
const {
|
|
1496
1496
|
codec: t,
|
|
1497
1497
|
bitrate: s,
|
|
1498
|
-
fieldOrder:
|
|
1498
|
+
fieldOrder: n,
|
|
1499
1499
|
resolution: r,
|
|
1500
|
-
mediaInfo:
|
|
1500
|
+
mediaInfo: i,
|
|
1501
1501
|
metadata: o = []
|
|
1502
|
-
} = e, a = ve(
|
|
1502
|
+
} = e, a = ve(i), c = M(o), {
|
|
1503
1503
|
Format: l,
|
|
1504
1504
|
"Frame rate": u,
|
|
1505
1505
|
"Color space": f,
|
|
@@ -1517,12 +1517,12 @@ ${o.join(`
|
|
|
1517
1517
|
}));
|
|
1518
1518
|
let { "Frame count": E } = a;
|
|
1519
1519
|
if (E === void 0) {
|
|
1520
|
-
const { numberOfPackets:
|
|
1521
|
-
|
|
1520
|
+
const { numberOfPackets: it } = e;
|
|
1521
|
+
it !== void 0 && (E = it.toString());
|
|
1522
1522
|
}
|
|
1523
1523
|
let A, O, I;
|
|
1524
1524
|
E && d && (A = L({ samples: E, timeBase: d }), O = A.timeBase.toConstant() || A.timeBase.toRate(), I = A.toSmpte());
|
|
1525
|
-
const { height: b, width:
|
|
1525
|
+
const { height: b, width: D } = r || {}, N = J(r), C = `${D}x${b}`;
|
|
1526
1526
|
let v, B;
|
|
1527
1527
|
return s !== void 0 && (v = w(s, { round: 2, symbols: ft }), B = Number(
|
|
1528
1528
|
(k = w(s, { exponent: 2, symbols: ft }).split(" mbps")) == null ? void 0 : k[0]
|
|
@@ -1531,14 +1531,14 @@ ${o.join(`
|
|
|
1531
1531
|
dimension: C,
|
|
1532
1532
|
frameRate: O,
|
|
1533
1533
|
height: b,
|
|
1534
|
-
width:
|
|
1534
|
+
width: D,
|
|
1535
1535
|
timeBase: d,
|
|
1536
1536
|
timeCode: A,
|
|
1537
1537
|
videoCodec: t,
|
|
1538
1538
|
smpte: I,
|
|
1539
1539
|
videoBitrate: v,
|
|
1540
1540
|
videoBitrateMbps: B,
|
|
1541
|
-
fieldOrder:
|
|
1541
|
+
fieldOrder: n,
|
|
1542
1542
|
colorSpace: f,
|
|
1543
1543
|
chromaSubsampling: p,
|
|
1544
1544
|
aspectRatio: N,
|
|
@@ -1548,9 +1548,9 @@ ${o.join(`
|
|
|
1548
1548
|
};
|
|
1549
1549
|
}, rt = (e = {}, t = {}) => {
|
|
1550
1550
|
let s = {};
|
|
1551
|
-
const { priority:
|
|
1551
|
+
const { priority: n = ["container", "video", "audio", "binary"] } = t, {
|
|
1552
1552
|
containerComponent: r,
|
|
1553
|
-
videoComponent:
|
|
1553
|
+
videoComponent: i,
|
|
1554
1554
|
audioComponent: o,
|
|
1555
1555
|
binaryComponent: a,
|
|
1556
1556
|
mimeType: c = [],
|
|
@@ -1563,7 +1563,7 @@ ${o.join(`
|
|
|
1563
1563
|
m[p] ?? f[p]
|
|
1564
1564
|
])
|
|
1565
1565
|
);
|
|
1566
|
-
return
|
|
1566
|
+
return n.reverse().forEach((f) => {
|
|
1567
1567
|
switch (f) {
|
|
1568
1568
|
case "container":
|
|
1569
1569
|
r && (s = u(
|
|
@@ -1572,8 +1572,8 @@ ${o.join(`
|
|
|
1572
1572
|
));
|
|
1573
1573
|
break;
|
|
1574
1574
|
case "video":
|
|
1575
|
-
if (
|
|
1576
|
-
const [m] =
|
|
1575
|
+
if (i) {
|
|
1576
|
+
const [m] = i;
|
|
1577
1577
|
s = u(
|
|
1578
1578
|
s,
|
|
1579
1579
|
Ce(m)
|
|
@@ -1585,7 +1585,7 @@ ${o.join(`
|
|
|
1585
1585
|
const [m] = o;
|
|
1586
1586
|
s = u(
|
|
1587
1587
|
s,
|
|
1588
|
-
|
|
1588
|
+
Fe(m)
|
|
1589
1589
|
);
|
|
1590
1590
|
}
|
|
1591
1591
|
break;
|
|
@@ -1594,7 +1594,7 @@ ${o.join(`
|
|
|
1594
1594
|
const [m] = a;
|
|
1595
1595
|
s = u(
|
|
1596
1596
|
s,
|
|
1597
|
-
|
|
1597
|
+
Me(m)
|
|
1598
1598
|
);
|
|
1599
1599
|
}
|
|
1600
1600
|
break;
|
|
@@ -1655,9 +1655,9 @@ ${o.join(`
|
|
|
1655
1655
|
].reverse(), mt = ({ parsedShape: { tag: e } }, { parsedShape: { tag: t } }) => W.includes(e) || W.includes(t) ? W.indexOf(t) - W.indexOf(e) : e.toLowerCase().localeCompare(t.toLowerCase()), Is = (e, t) => {
|
|
1656
1656
|
const {
|
|
1657
1657
|
allowedMimeTypes: s = Le,
|
|
1658
|
-
allowedMethods:
|
|
1658
|
+
allowedMethods: n = xe,
|
|
1659
1659
|
sortPriority: r = mt,
|
|
1660
|
-
sourceKey:
|
|
1660
|
+
sourceKey: i = "src",
|
|
1661
1661
|
mimeTypeKey: o = "type",
|
|
1662
1662
|
shapeKey: a = "shape",
|
|
1663
1663
|
parsedShapeKey: c = "parsedShape"
|
|
@@ -1665,13 +1665,13 @@ ${o.join(`
|
|
|
1665
1665
|
let p, d;
|
|
1666
1666
|
const h = rt(m), { uri: g, mimeType: E, containerFormat: A, videoCodec: O } = h;
|
|
1667
1667
|
if (E && (p = E, (E === ke || E === We) && (A === $e || A === Ue) && O === Ge && (p = je)), g)
|
|
1668
|
-
if (
|
|
1668
|
+
if (n) {
|
|
1669
1669
|
const [I] = g.split("://");
|
|
1670
|
-
|
|
1670
|
+
n.includes(I) && (d = g);
|
|
1671
1671
|
} else
|
|
1672
1672
|
d = g;
|
|
1673
1673
|
return d && s.includes(p) && f.push({
|
|
1674
|
-
[
|
|
1674
|
+
[i]: d,
|
|
1675
1675
|
[o]: p,
|
|
1676
1676
|
[a]: m,
|
|
1677
1677
|
[c]: h
|
|
@@ -1679,12 +1679,12 @@ ${o.join(`
|
|
|
1679
1679
|
}, []);
|
|
1680
1680
|
return typeof r == "function" && u.sort(mt), u;
|
|
1681
1681
|
}, Os = (e) => {
|
|
1682
|
-
const t = rt(e), { mimeType: s, videoCodec:
|
|
1682
|
+
const t = rt(e), { mimeType: s, videoCodec: n, audioCodec: r } = t;
|
|
1683
1683
|
if (s) {
|
|
1684
1684
|
if (s.startsWith("audio/") && r !== void 0)
|
|
1685
1685
|
return y.AUDIO;
|
|
1686
1686
|
if (s.startsWith("video/")) {
|
|
1687
|
-
if (
|
|
1687
|
+
if (n !== void 0)
|
|
1688
1688
|
return y.VIDEO;
|
|
1689
1689
|
if (r !== void 0)
|
|
1690
1690
|
return y.AUDIO;
|
|
@@ -1722,17 +1722,17 @@ ${o.join(`
|
|
|
1722
1722
|
}) => $t(e[0], window.btoa(t), `.${s}`), bs = (e, t) => {
|
|
1723
1723
|
const {
|
|
1724
1724
|
allowedMimeTypes: s = qe,
|
|
1725
|
-
allowedMethods:
|
|
1725
|
+
allowedMethods: n = Xe,
|
|
1726
1726
|
streamingServers: r = []
|
|
1727
|
-
} = t || {}, { shape:
|
|
1727
|
+
} = t || {}, { shape: i = [] } = e || {}, { startTimeCode: o } = ce(e == null ? void 0 : e.metadata, {
|
|
1728
1728
|
flat: !0,
|
|
1729
1729
|
arrayOnSingleValue: !1
|
|
1730
1730
|
});
|
|
1731
|
-
return
|
|
1732
|
-
var
|
|
1731
|
+
return i.reduce((c, l) => {
|
|
1732
|
+
var D, N, C;
|
|
1733
1733
|
let u, f, m;
|
|
1734
1734
|
const p = rt(l), { uri: d, mimeType: h, containerFormat: g, videoCodec: E } = p;
|
|
1735
|
-
if (!(s != null && s.includes(h)) || !(
|
|
1735
|
+
if (!(s != null && s.includes(h)) || !(n != null && n.includes((D = d == null ? void 0 : d.split("://")) == null ? void 0 : D[0])))
|
|
1736
1736
|
return c;
|
|
1737
1737
|
if (m = p.tag, !m) {
|
|
1738
1738
|
const v = (C = (N = h == null ? void 0 : h.split) == null ? void 0 : N.call(h, "/")) == null ? void 0 : C.pop(), B = c.filter((k) => k.label === v).length;
|
|
@@ -1755,11 +1755,11 @@ ${o.join(`
|
|
|
1755
1755
|
const t = {}, { outputSetting: s = [] } = e || {};
|
|
1756
1756
|
if (s.length === 0)
|
|
1757
1757
|
return t;
|
|
1758
|
-
const
|
|
1759
|
-
if (r && (t.containerFormat = r.Container),
|
|
1760
|
-
const { CodecSettings: a = {} } =
|
|
1758
|
+
const n = JSON.parse(s[0]), { Settings: { ContainerSettings: r, VideoDescription: i, AudioDescriptions: o } = {} } = n;
|
|
1759
|
+
if (r && (t.containerFormat = r.Container), i) {
|
|
1760
|
+
const { CodecSettings: a = {} } = i, { Codec: c, ...l } = a;
|
|
1761
1761
|
t.videoFormat = c;
|
|
1762
|
-
const { Height: u, Width: f } =
|
|
1762
|
+
const { Height: u, Width: f } = i;
|
|
1763
1763
|
t.height = u, t.width = f, u && f && (t.dimension = `${f}x${u}`, t.aspectRatio = J({ height: u, width: f }));
|
|
1764
1764
|
const [m] = Object.values(l);
|
|
1765
1765
|
if (m) {
|
|
@@ -1776,16 +1776,16 @@ ${o.join(`
|
|
|
1776
1776
|
}
|
|
1777
1777
|
return t;
|
|
1778
1778
|
}, Rs = (e) => {
|
|
1779
|
-
const t = {}, { description: s, format:
|
|
1779
|
+
const t = {}, { description: s, format: n, audio: r, video: i, mediaconvert: o } = e || {};
|
|
1780
1780
|
if (o)
|
|
1781
1781
|
return { description: s, ...Ze(o) };
|
|
1782
|
-
if (t.description = s, t.containerFormat =
|
|
1783
|
-
if (t.videoFormat =
|
|
1784
|
-
const a = x(
|
|
1782
|
+
if (t.description = s, t.containerFormat = n, i) {
|
|
1783
|
+
if (t.videoFormat = i.codec, t.videoBitrate = i.bitrate, i.framerate) {
|
|
1784
|
+
const a = x(i.framerate);
|
|
1785
1785
|
t.timeBase = a, t.frameRate = a.toConstant() || a.toRate();
|
|
1786
1786
|
}
|
|
1787
|
-
if (
|
|
1788
|
-
const { height: a, width: c } =
|
|
1787
|
+
if (i.scaling) {
|
|
1788
|
+
const { height: a, width: c } = i.scaling;
|
|
1789
1789
|
t.height = a, t.width = c, a && c && (t.dimension = `${c}x${a}`, t.aspectRatio = J({ height: a, width: c }));
|
|
1790
1790
|
}
|
|
1791
1791
|
}
|
|
@@ -1800,15 +1800,15 @@ ${o.join(`
|
|
|
1800
1800
|
const {
|
|
1801
1801
|
name: t,
|
|
1802
1802
|
type: s,
|
|
1803
|
-
defaultValue:
|
|
1803
|
+
defaultValue: n,
|
|
1804
1804
|
stringRestriction: r,
|
|
1805
|
-
floatRestriction:
|
|
1805
|
+
floatRestriction: i,
|
|
1806
1806
|
integerRestriction: o,
|
|
1807
1807
|
longRestriction: a,
|
|
1808
1808
|
data: c,
|
|
1809
1809
|
values: l,
|
|
1810
1810
|
system: u
|
|
1811
|
-
} = e, { minLength: f, maxLength: m, pattern: p } = r || {}, { minInclusive: d, maxInclusive: h } =
|
|
1811
|
+
} = e, { minLength: f, maxLength: m, pattern: p } = r || {}, { minInclusive: d, maxInclusive: h } = i || o || a || {}, g = ((l == null ? void 0 : l.field) || []).map(({ key: I, value: b }) => ({
|
|
1812
1812
|
label: b ?? I,
|
|
1813
1813
|
value: I
|
|
1814
1814
|
})), A = ((I) => Object.fromEntries(Object.entries(I).filter(([, b]) => b !== void 0)))({
|
|
@@ -1817,11 +1817,11 @@ ${o.join(`
|
|
|
1817
1817
|
minLength: f,
|
|
1818
1818
|
maxLength: m,
|
|
1819
1819
|
pattern: p ? new RegExp(p) : void 0
|
|
1820
|
-
}), O =
|
|
1820
|
+
}), O = M(c);
|
|
1821
1821
|
return {
|
|
1822
1822
|
name: t,
|
|
1823
1823
|
type: s,
|
|
1824
|
-
defaultValue:
|
|
1824
|
+
defaultValue: n,
|
|
1825
1825
|
required: d !== void 0 || f !== void 0 && f > 0,
|
|
1826
1826
|
restrictions: A,
|
|
1827
1827
|
data: O,
|
|
@@ -1838,7 +1838,7 @@ ${o.join(`
|
|
|
1838
1838
|
"boolean",
|
|
1839
1839
|
"timeCode"
|
|
1840
1840
|
];
|
|
1841
|
-
class
|
|
1841
|
+
class nt {
|
|
1842
1842
|
// custom events model
|
|
1843
1843
|
constructor() {
|
|
1844
1844
|
this.events = {};
|
|
@@ -1850,8 +1850,8 @@ class it {
|
|
|
1850
1850
|
* @param callback function receiving state of chunk, transfer manager or chunked upload instance
|
|
1851
1851
|
*/
|
|
1852
1852
|
on(t, s) {
|
|
1853
|
-
const
|
|
1854
|
-
|
|
1853
|
+
const n = this.events[t] || [];
|
|
1854
|
+
n.push(s), this.events[t] = n;
|
|
1855
1855
|
}
|
|
1856
1856
|
/**
|
|
1857
1857
|
* Remove all callbacks for a specific event type
|
|
@@ -1868,10 +1868,10 @@ class it {
|
|
|
1868
1868
|
* @param data
|
|
1869
1869
|
* @returns
|
|
1870
1870
|
*/
|
|
1871
|
-
trigger(t, s,
|
|
1871
|
+
trigger(t, s, n) {
|
|
1872
1872
|
const r = this.events[t];
|
|
1873
|
-
!r || r.length < 1 || r.forEach((
|
|
1874
|
-
|
|
1873
|
+
!r || r.length < 1 || r.forEach((i) => {
|
|
1874
|
+
i(s, n);
|
|
1875
1875
|
});
|
|
1876
1876
|
}
|
|
1877
1877
|
}
|
|
@@ -1885,7 +1885,7 @@ class es {
|
|
|
1885
1885
|
completeTime: null,
|
|
1886
1886
|
response: null,
|
|
1887
1887
|
bytesTransferred: null
|
|
1888
|
-
}, this.eventBus = new
|
|
1888
|
+
}, this.eventBus = new nt();
|
|
1889
1889
|
}
|
|
1890
1890
|
/**
|
|
1891
1891
|
* Attempt to transfer chunk with some fault resilience.
|
|
@@ -1897,16 +1897,16 @@ class es {
|
|
|
1897
1897
|
*/
|
|
1898
1898
|
tryTransfer() {
|
|
1899
1899
|
return this.state.status = _.transferring, this.state.startTime = performance.now(), new Promise((t, s) => {
|
|
1900
|
-
const
|
|
1900
|
+
const n = () => {
|
|
1901
1901
|
this.transfer().then((r) => {
|
|
1902
1902
|
this.state.response = r, this.onComplete(), t(this);
|
|
1903
1903
|
}).catch(() => {
|
|
1904
1904
|
this.state.retries > 3 ? (this.state.status = _.failed, s(new Error(`Chunk ${this.start}-${this.end} failed`))) : this.state.status !== _.paused ? (this.state.retries += 1, this.tryTimeout = setTimeout(() => {
|
|
1905
|
-
|
|
1905
|
+
n();
|
|
1906
1906
|
}, 1e3)) : clearTimeout(this.tryTimeout);
|
|
1907
1907
|
});
|
|
1908
1908
|
};
|
|
1909
|
-
|
|
1909
|
+
n(), window.addEventListener(T.online, () => {
|
|
1910
1910
|
this.resume();
|
|
1911
1911
|
}), window.addEventListener(T.offline, () => {
|
|
1912
1912
|
this.pause();
|
|
@@ -1928,10 +1928,11 @@ class es {
|
|
|
1928
1928
|
[_.complete, _.offline].includes(this.state.status) || (this.state.bytesTransferred = s == null ? void 0 : s.loaded, this.eventBus.trigger(T.progress, this.state));
|
|
1929
1929
|
}
|
|
1930
1930
|
};
|
|
1931
|
-
return this.end - this.start !== this.fileSize && (t.headers = {
|
|
1931
|
+
return t = { ...t, ...this.api.props || {} }, this.end - this.start !== this.fileSize && (t.headers = {
|
|
1932
1932
|
index: this.start,
|
|
1933
|
-
size: this.fileSize
|
|
1934
|
-
|
|
1933
|
+
size: this.fileSize,
|
|
1934
|
+
...t.headers || {}
|
|
1935
|
+
}), this.transferPromise = this.api.method(t), this.state.status = _.transferring, this.transferPromise;
|
|
1935
1936
|
}
|
|
1936
1937
|
pause() {
|
|
1937
1938
|
this.state.status !== _.complete && (this.state.status = _.paused);
|
|
@@ -1955,7 +1956,7 @@ class es {
|
|
|
1955
1956
|
}
|
|
1956
1957
|
class ht {
|
|
1957
1958
|
constructor(t, s) {
|
|
1958
|
-
var
|
|
1959
|
+
var n, r, i, o, a, c;
|
|
1959
1960
|
if (this.DEFAULT_OPTIONS = Object.freeze({
|
|
1960
1961
|
targetRate: 4e6,
|
|
1961
1962
|
// 4mb sec,
|
|
@@ -1971,7 +1972,7 @@ class ht {
|
|
|
1971
1972
|
autoResume: !0,
|
|
1972
1973
|
// ChunkedTransferManager -> automatically resume transfers on network
|
|
1973
1974
|
api: void 0
|
|
1974
|
-
}), this.eventBus = new
|
|
1975
|
+
}), this.eventBus = new nt(), !s.api.method)
|
|
1975
1976
|
throw new Error("No api method specified");
|
|
1976
1977
|
this.options = {
|
|
1977
1978
|
...this.DEFAULT_OPTIONS,
|
|
@@ -1979,10 +1980,10 @@ class ht {
|
|
|
1979
1980
|
api: {
|
|
1980
1981
|
...s.api ?? {},
|
|
1981
1982
|
props: {
|
|
1982
|
-
...((
|
|
1983
|
+
...((n = s.api) == null ? void 0 : n.props) ?? {},
|
|
1983
1984
|
queryParams: {
|
|
1984
1985
|
transferId: zt(),
|
|
1985
|
-
...((
|
|
1986
|
+
...((i = (r = s.api) == null ? void 0 : r.props) == null ? void 0 : i.queryParams) ?? {}
|
|
1986
1987
|
}
|
|
1987
1988
|
}
|
|
1988
1989
|
}
|
|
@@ -2006,30 +2007,37 @@ class ht {
|
|
|
2006
2007
|
const { status: t } = this.state;
|
|
2007
2008
|
if (t !== _.complete)
|
|
2008
2009
|
if (t === _.idle || t === _.transferring) {
|
|
2009
|
-
this.state.
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2010
|
+
const s = this.state.chunks.length;
|
|
2011
|
+
let n = 0;
|
|
2012
|
+
const r = () => {
|
|
2013
|
+
for (; this.state.transferPromises.length < this.state.maxConcurrentTransfers && n < s; ) {
|
|
2014
|
+
const i = this.state.chunks[n];
|
|
2015
|
+
if (n += 1, i.state.status !== _.complete && i.state.status !== _.transferring) {
|
|
2016
|
+
this.state.status = _.transferring;
|
|
2017
|
+
const o = i.tryTransfer();
|
|
2018
|
+
this.state.transferPromises.push(o), o.then(() => {
|
|
2019
|
+
const a = this.state.transferPromises.indexOf(o);
|
|
2020
|
+
a !== -1 && this.state.transferPromises.splice(a, 1), this.state.status !== _.canceled && r();
|
|
2021
|
+
}).catch((a) => {
|
|
2022
|
+
const c = this.state.transferPromises.indexOf(o);
|
|
2023
|
+
c !== -1 && this.state.transferPromises.splice(c, 1), console.error(
|
|
2024
|
+
"Failed on this upload(), check connectivity and try to resume",
|
|
2025
|
+
a
|
|
2026
|
+
), this.state.status !== _.offline ? (this.state.status = _.failed, this.eventBus.trigger(T.failed, this.state, a), this.options.onFail && this.options.onFail(a)) : setTimeout(() => this.retry(), 5e3);
|
|
2027
|
+
});
|
|
2028
|
+
}
|
|
2029
|
+
}
|
|
2013
2030
|
};
|
|
2014
|
-
|
|
2015
|
-
i.state.status !== _.complete && i.state.status !== _.transferring && s() && (this.state.status = _.transferring, this.state.transferPromises.push(i.tryTransfer()));
|
|
2016
|
-
}), this.state.transferPromises.length > 0 && Promise.all(this.state.transferPromises).then(() => {
|
|
2017
|
-
this.upload();
|
|
2018
|
-
}).catch((i) => {
|
|
2019
|
-
console.error(
|
|
2020
|
-
"Failed on this upload() cycle, check connectivity and try to resume",
|
|
2021
|
-
i
|
|
2022
|
-
), this.state.status !== _.offline ? (this.state.status = _.failed, this.eventBus.trigger(T.failed, this.state, i), this.options.onFail && this.options.onFail(i)) : setTimeout(() => this.retry(), 5e3);
|
|
2023
|
-
}));
|
|
2031
|
+
r();
|
|
2024
2032
|
} else
|
|
2025
2033
|
this.retry();
|
|
2026
2034
|
}
|
|
2027
2035
|
// get all byte ranges for splitting in chunks
|
|
2028
2036
|
getByteRangesForChunks(t, s = this.options.chunkSize) {
|
|
2029
|
-
const
|
|
2037
|
+
const n = [], { minChunkSize: r } = this.options;
|
|
2030
2038
|
let o = s >= r ? s : r, a = Math.floor(t.size / o);
|
|
2031
2039
|
if (t.size - (t.size - t.size / a) >= r || (a -= 1, o = Math.floor(t.size / a)), a < 2 || t.size < this.options.minFileSize)
|
|
2032
|
-
|
|
2040
|
+
n.push({ start: 0, end: t.size });
|
|
2033
2041
|
else
|
|
2034
2042
|
for (let c = 0; c <= a; c += 1) {
|
|
2035
2043
|
const l = o * c;
|
|
@@ -2039,17 +2047,17 @@ class ht {
|
|
|
2039
2047
|
start: l,
|
|
2040
2048
|
end: u
|
|
2041
2049
|
};
|
|
2042
|
-
if (
|
|
2050
|
+
if (n.push(m), u === t.size)
|
|
2043
2051
|
break;
|
|
2044
2052
|
}
|
|
2045
|
-
return
|
|
2053
|
+
return n;
|
|
2046
2054
|
}
|
|
2047
2055
|
addChunksFromBlob(t) {
|
|
2048
|
-
this.getByteRangesForChunks(t).forEach((
|
|
2056
|
+
this.getByteRangesForChunks(t).forEach((n) => {
|
|
2049
2057
|
const r = new es({
|
|
2050
|
-
start:
|
|
2051
|
-
end:
|
|
2052
|
-
blobSlice: t.slice(
|
|
2058
|
+
start: n.start,
|
|
2059
|
+
end: n.end,
|
|
2060
|
+
blobSlice: t.slice(n.start, n.end),
|
|
2053
2061
|
fileSize: t.size,
|
|
2054
2062
|
api: this.options.api
|
|
2055
2063
|
});
|
|
@@ -2080,8 +2088,7 @@ class ht {
|
|
|
2080
2088
|
cancel() {
|
|
2081
2089
|
this.state.status = _.canceled, this.state.chunks.length > 0 && this.state.chunks.forEach((s) => {
|
|
2082
2090
|
s.cancel();
|
|
2083
|
-
})
|
|
2084
|
-
};
|
|
2091
|
+
});
|
|
2085
2092
|
const t = Promise.all(this.state.transferPromises);
|
|
2086
2093
|
return t.then(() => {
|
|
2087
2094
|
this.eventBus.trigger(T.removed, this.state);
|
|
@@ -2096,10 +2103,10 @@ class ht {
|
|
|
2096
2103
|
else if (s < 0.3)
|
|
2097
2104
|
this.state.maxConcurrentTransfers = 1;
|
|
2098
2105
|
else {
|
|
2099
|
-
const
|
|
2106
|
+
const n = this.options.maxConcurrentTransfers - 1;
|
|
2100
2107
|
this.state.maxConcurrentTransfers = Math.max(
|
|
2101
2108
|
this.options.maxConcurrentTransfers,
|
|
2102
|
-
Math.min(
|
|
2109
|
+
Math.min(n, this.options.maxConcurrentTransfers)
|
|
2103
2110
|
);
|
|
2104
2111
|
}
|
|
2105
2112
|
}
|
|
@@ -2125,16 +2132,16 @@ class ht {
|
|
|
2125
2132
|
getStats() {
|
|
2126
2133
|
const t = this.state.chunks.length, s = this.state.chunks.filter(
|
|
2127
2134
|
(l) => l.state.status === _.complete
|
|
2128
|
-
),
|
|
2135
|
+
), n = this.state.chunks.filter(
|
|
2129
2136
|
(l) => l.state.status === _.transferring
|
|
2130
2137
|
), r = s.length;
|
|
2131
|
-
let
|
|
2138
|
+
let i = 0, o = 0;
|
|
2132
2139
|
s.forEach((l) => {
|
|
2133
|
-
|
|
2134
|
-
}),
|
|
2140
|
+
i += l.transferRate, o += l.blobSlice.size;
|
|
2141
|
+
}), n.forEach((l) => {
|
|
2135
2142
|
o += l.state.bytesTransferred;
|
|
2136
2143
|
});
|
|
2137
|
-
const a =
|
|
2144
|
+
const a = i / r, c = {
|
|
2138
2145
|
totalChunks: t,
|
|
2139
2146
|
completedChunks: r,
|
|
2140
2147
|
totalBytes: this.state.blob.size,
|
|
@@ -2156,8 +2163,8 @@ class ht {
|
|
|
2156
2163
|
}
|
|
2157
2164
|
get finalResponse() {
|
|
2158
2165
|
const t = this.state.chunks.length - 1, s = !1;
|
|
2159
|
-
for (let
|
|
2160
|
-
const r = this.state.chunks[
|
|
2166
|
+
for (let n = t; n >= 0; n -= 1) {
|
|
2167
|
+
const r = this.state.chunks[n];
|
|
2161
2168
|
if (typeof r.state.response.data == "object")
|
|
2162
2169
|
return r.state.response;
|
|
2163
2170
|
}
|
|
@@ -2189,7 +2196,7 @@ class vs {
|
|
|
2189
2196
|
}), this.state = { ...this.initialState }, this.options = {
|
|
2190
2197
|
...rs,
|
|
2191
2198
|
...t
|
|
2192
|
-
}, this.events = new
|
|
2199
|
+
}, this.events = new nt(), this.bindNetworkEvents();
|
|
2193
2200
|
}
|
|
2194
2201
|
get transfers() {
|
|
2195
2202
|
return Object.values(this.state.transfers) || [];
|
|
@@ -2235,8 +2242,8 @@ class vs {
|
|
|
2235
2242
|
this.onProgress();
|
|
2236
2243
|
}), t.eventBus.on(T.complete, () => {
|
|
2237
2244
|
this.upload(), this.onProgress();
|
|
2238
|
-
}), t.eventBus.on(T.failed, (s,
|
|
2239
|
-
this.onFail(
|
|
2245
|
+
}), t.eventBus.on(T.failed, (s, n) => {
|
|
2246
|
+
this.onFail(n, s);
|
|
2240
2247
|
}), t.eventBus.on(T.retry, () => {
|
|
2241
2248
|
this.events.trigger(T.retry, this.state);
|
|
2242
2249
|
}), t.eventBus.on(T.paused, () => {
|
|
@@ -2245,12 +2252,12 @@ class vs {
|
|
|
2245
2252
|
}
|
|
2246
2253
|
// param can be file or a reference to transfer, or a transferId
|
|
2247
2254
|
removeChunkedUpload(t, s = !1) {
|
|
2248
|
-
const
|
|
2255
|
+
const n = (r) => r ? r.state.status === _.complete && !s ? (console.error(
|
|
2249
2256
|
"Can't cancel complete transfers, pass true as a second argument in .removeChunkedUpload() to force removal."
|
|
2250
|
-
), !1) : (Object.keys(this.state.transfers).forEach((
|
|
2251
|
-
r === this.state.transfers[
|
|
2257
|
+
), !1) : (Object.keys(this.state.transfers).forEach((i) => {
|
|
2258
|
+
r === this.state.transfers[i] && delete this.state.transfers[i];
|
|
2252
2259
|
}), this.events.trigger(T.removed, this.state), r.cancel(), !0) : (console.error("Could not find a matching transfer to cancel."), !1);
|
|
2253
|
-
t instanceof ht ?
|
|
2260
|
+
t instanceof ht ? n(t) : t instanceof File ? n(this.exists(t)) : typeof t == "string" ? n(this.transfers.find((r) => r.transferId === t)) : console.error(
|
|
2254
2261
|
"Invalid object to remove - has to be either ChunkedUpload, File or transferId"
|
|
2255
2262
|
);
|
|
2256
2263
|
}
|
|
@@ -2262,8 +2269,8 @@ class vs {
|
|
|
2262
2269
|
}
|
|
2263
2270
|
exists(t) {
|
|
2264
2271
|
let s;
|
|
2265
|
-
for (let
|
|
2266
|
-
const r = this.transfers[
|
|
2272
|
+
for (let n = 0; n < this.transfers.length; n += 1) {
|
|
2273
|
+
const r = this.transfers[n];
|
|
2267
2274
|
if (r.state.blob.name === t.name && r.state.blob.lastModified === t.lastModified && r.state.blob.size && t.size)
|
|
2268
2275
|
return s = r, s;
|
|
2269
2276
|
}
|
|
@@ -2278,8 +2285,8 @@ class vs {
|
|
|
2278
2285
|
if (!this.paused) {
|
|
2279
2286
|
this.events.trigger(T.pausing, this.state);
|
|
2280
2287
|
const s = [];
|
|
2281
|
-
this.transfers.forEach((
|
|
2282
|
-
s.push(
|
|
2288
|
+
this.transfers.forEach((n) => {
|
|
2289
|
+
s.push(n.pause());
|
|
2283
2290
|
}), t = Promise.all(s), t.then(() => {
|
|
2284
2291
|
this.events.trigger(T.paused, this.state);
|
|
2285
2292
|
});
|
|
@@ -2327,12 +2334,12 @@ class vs {
|
|
|
2327
2334
|
get fileList() {
|
|
2328
2335
|
const t = [];
|
|
2329
2336
|
return this.transfers.forEach((s) => {
|
|
2330
|
-
const
|
|
2337
|
+
const n = s.getStats(), { totalChunks: r, completedChunks: i } = n, o = {
|
|
2331
2338
|
name: s.state.blob.name,
|
|
2332
|
-
bytesDone:
|
|
2339
|
+
bytesDone: n.transferredBytes,
|
|
2333
2340
|
bytesTotal: s.state.blob.size,
|
|
2334
2341
|
totalChunks: r,
|
|
2335
|
-
completedChunks:
|
|
2342
|
+
completedChunks: i,
|
|
2336
2343
|
transfer: s
|
|
2337
2344
|
};
|
|
2338
2345
|
t.push(o);
|
|
@@ -2340,16 +2347,16 @@ class vs {
|
|
|
2340
2347
|
}
|
|
2341
2348
|
}
|
|
2342
2349
|
const Wt = (e, t, s = "") => {
|
|
2343
|
-
const
|
|
2350
|
+
const n = (a) => {
|
|
2344
2351
|
const c = a.startsWith("/") ? a.slice(1) : a, l = (c == null ? void 0 : c.search("/")) ?? -1;
|
|
2345
2352
|
return l === -1 ? [c] : [c.slice(0, l), c.slice(l + 1)];
|
|
2346
|
-
}, [r,
|
|
2347
|
-
return
|
|
2353
|
+
}, [r, i] = n(t), o = [s, r].filter(Boolean).join("/");
|
|
2354
|
+
return i ? {
|
|
2348
2355
|
[r]: {
|
|
2349
2356
|
file: new File([e], r, { ...e, type: "folder" }),
|
|
2350
2357
|
path: o,
|
|
2351
2358
|
progress: { totalBytes: e.size ?? 0, transferredBytes: 0 },
|
|
2352
|
-
files: Wt(e,
|
|
2359
|
+
files: Wt(e, i, o)
|
|
2353
2360
|
}
|
|
2354
2361
|
} : {
|
|
2355
2362
|
[r]: {
|
|
@@ -2358,12 +2365,12 @@ const Wt = (e, t, s = "") => {
|
|
|
2358
2365
|
progress: { totalBytes: e.size ?? 0, transferredBytes: 0 }
|
|
2359
2366
|
}
|
|
2360
2367
|
};
|
|
2361
|
-
},
|
|
2368
|
+
}, Ds = (e) => e.map((t) => Wt(t, t.path ?? t.webkitRelativePath)).reduce((t, s) => Ut(t, s), {});
|
|
2362
2369
|
export {
|
|
2363
2370
|
es as Chunk,
|
|
2364
2371
|
vs as ChunkedTransferManager,
|
|
2365
2372
|
ht as ChunkedUpload,
|
|
2366
|
-
|
|
2373
|
+
nt as ChunkedUploadEventBus,
|
|
2367
2374
|
P as DOCUMENT_TYPES,
|
|
2368
2375
|
T as EVENTS,
|
|
2369
2376
|
Ht as FIELD_ATTRIBUTE_KEYS,
|
|
@@ -2382,7 +2389,7 @@ export {
|
|
|
2382
2389
|
ms as createSearchFacetList,
|
|
2383
2390
|
$ as createTimeBase,
|
|
2384
2391
|
j as createTimeCode,
|
|
2385
|
-
|
|
2392
|
+
Ds as fileListToFileTree,
|
|
2386
2393
|
Is as filterShapeSource,
|
|
2387
2394
|
be as findNearestThumbnail,
|
|
2388
2395
|
et as formatTimeBaseText,
|
|
@@ -2395,18 +2402,18 @@ export {
|
|
|
2395
2402
|
As as getShapeDocumentType,
|
|
2396
2403
|
Os as getShapeMediaType,
|
|
2397
2404
|
fs as metadataTypeToWebVtt,
|
|
2398
|
-
|
|
2399
|
-
|
|
2405
|
+
Fe as parseAudioComponent,
|
|
2406
|
+
Me as parseBinaryComponent,
|
|
2400
2407
|
Ne as parseContainerComponent,
|
|
2401
2408
|
hs as parseFacetList,
|
|
2402
2409
|
ps as parseFacetType,
|
|
2403
2410
|
ys as parseFieldDefinitionList,
|
|
2404
|
-
|
|
2411
|
+
Dt as parseFieldList,
|
|
2405
2412
|
Pt as parseFileType,
|
|
2406
|
-
|
|
2413
|
+
Mt as parseGroupList,
|
|
2407
2414
|
Y as parseHighlightTimespan,
|
|
2408
2415
|
_s as parseHighlightTimespanList,
|
|
2409
|
-
|
|
2416
|
+
M as parseKeyValuePairType,
|
|
2410
2417
|
Ze as parseMediaConvertPreset,
|
|
2411
2418
|
ce as parseMetadataType,
|
|
2412
2419
|
gs as parseNowDate,
|