@pixerate/editor 0.231.1 → 0.232.0
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/animation-editor/index.cjs +25 -25
- package/dist/animation-editor/index.js +1 -1
- package/dist/canvas/index.cjs +7 -7
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-OPSK22DL.cjs → chunk-2K5TELHV.cjs} +19 -2
- package/dist/{chunk-CSM5T6SE.js → chunk-6QLTUGMO.js} +1 -1
- package/dist/{chunk-5T3H7CGG.cjs → chunk-A653N65Q.cjs} +7 -7
- package/dist/{chunk-SBPGIZQN.js → chunk-MUSZYMBX.js} +1 -1
- package/dist/{chunk-TCZ2J7PR.js → chunk-PQYDJ2AV.js} +18 -1
- package/dist/{chunk-C73U5UI3.cjs → chunk-RG4O6K2A.cjs} +14 -14
- package/dist/effects/conformance.d.cts +4 -1
- package/dist/effects/conformance.d.ts +4 -1
- package/dist/effects/errors.d.cts +6 -1
- package/dist/effects/errors.d.ts +6 -1
- package/dist/effects/fake-templates.d.cts +17 -0
- package/dist/effects/fake-templates.d.ts +17 -0
- package/dist/effects/fake.d.cts +6 -1
- package/dist/effects/fake.d.ts +6 -1
- package/dist/effects/index.cjs +537 -74
- package/dist/effects/index.d.cts +1 -0
- package/dist/effects/index.d.ts +1 -0
- package/dist/effects/index.js +466 -3
- package/dist/effects/templates.d.cts +56 -0
- package/dist/effects/templates.d.ts +56 -0
- package/dist/effects/types.d.cts +212 -0
- package/dist/effects/types.d.ts +212 -0
- package/dist/image-editor/index.cjs +13 -13
- package/dist/image-editor/index.js +1 -1
- package/dist/paint-editor/index.cjs +7 -7
- package/dist/paint-editor/index.js +2 -2
- package/dist/vector/index.cjs +6 -6
- package/dist/vector/index.js +1 -1
- package/dist/video-editor/index.cjs +329 -329
- package/dist/video-editor/index.js +3 -3
- package/package.json +1 -1
- package/skills/pixerate-animation-editor/SKILL.md +37 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkRG4O6K2Acjs = require('../chunk-RG4O6K2A.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -149,7 +149,7 @@ var _chunkC73U5UI3cjs = require('../chunk-C73U5UI3.cjs');
|
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
|
|
152
|
-
var
|
|
152
|
+
var _chunkA653N65Qcjs = require('../chunk-A653N65Q.cjs');
|
|
153
153
|
require('../chunk-PY4GWSE2.cjs');
|
|
154
154
|
|
|
155
155
|
|
|
@@ -163,7 +163,7 @@ var _chunkERJA5CGTcjs = require('../chunk-ERJA5CGT.cjs');
|
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
var
|
|
166
|
+
var _chunk2K5TELHVcjs = require('../chunk-2K5TELHV.cjs');
|
|
167
167
|
require('../chunk-WOFXZ3XU.cjs');
|
|
168
168
|
|
|
169
169
|
|
|
@@ -222,7 +222,7 @@ function parseVideoEase(v, path) {
|
|
|
222
222
|
if (v[0] < 0 || v[0] > 1 || v[2] < 0 || v[2] > 1) fail(path, "must have x1 and x2 between 0 and 1");
|
|
223
223
|
return [v[0], v[1], v[2], v[3]];
|
|
224
224
|
}
|
|
225
|
-
return oneOf(v,
|
|
225
|
+
return oneOf(v, _chunkA653N65Qcjs.VIDEO_EASE_NAMES, path);
|
|
226
226
|
}
|
|
227
227
|
function parseVideoKeyframes(v, path, { min, max } = {}) {
|
|
228
228
|
if (!isObject(v)) return fail(path, "must be a number or keyframes { keys: [{ t, v, ease }] }");
|
|
@@ -264,7 +264,7 @@ function parseVideoTimeRemap(v, speed, path) {
|
|
|
264
264
|
if (speed !== void 0 && speed !== 1) fail(path, 'cannot be used with a speed; a ramp sets the speed itself (remove "speed")');
|
|
265
265
|
for (let i = 1; i < remap.keys.length; i++) if (remap.keys[i].t === remap.keys[i - 1].t) fail(`${path}.keys[${i}].t`, `must be later than the key before (${remap.keys[i - 1].t} ms); a speed ramp has one key per time`);
|
|
266
266
|
try {
|
|
267
|
-
|
|
267
|
+
_chunkA653N65Qcjs.checkVideoTimeRemap.call(void 0, remap, path);
|
|
268
268
|
} catch (e) {
|
|
269
269
|
throw new Error(e.message.replace(/\.?$/, "."));
|
|
270
270
|
}
|
|
@@ -274,17 +274,17 @@ function parseVideoClipAnimation(v, path) {
|
|
|
274
274
|
if (v === void 0) return void 0;
|
|
275
275
|
if (!isObject(v)) return fail(path, "must be an object { effect, duration }");
|
|
276
276
|
return compact({
|
|
277
|
-
effect: oneOf(v.effect,
|
|
277
|
+
effect: oneOf(v.effect, _chunkA653N65Qcjs.VIDEO_CLIP_ANIMATION_EFFECTS, `${path}.effect`, false),
|
|
278
278
|
duration: num(v.duration, `${path}.duration`, { optional: true, positive: true })
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
281
|
function parseVideoGrade(v, path) {
|
|
282
282
|
if (v === void 0) return void 0;
|
|
283
283
|
if (!isObject(v)) return fail(path, "must be an object such as { exposure, contrast, saturation }");
|
|
284
|
-
const known = /* @__PURE__ */ new Set([...
|
|
284
|
+
const known = /* @__PURE__ */ new Set([..._chunkA653N65Qcjs.VIDEO_GRADE_CONTROLS.map((c) => c.key), "lut"]);
|
|
285
285
|
const unknown = Object.keys(v).find((k) => !known.has(k));
|
|
286
286
|
if (unknown) fail(`${path}.${unknown}`, `is not a grade setting; use ${[...known].join(", ")}`);
|
|
287
|
-
return compact({ ...Object.fromEntries(
|
|
287
|
+
return compact({ ...Object.fromEntries(_chunkA653N65Qcjs.VIDEO_GRADE_CONTROLS.map((c) => [c.key, num(v[c.key], `${path}.${c.key}`, { optional: true, min: c.min, max: c.max })])), lut: parseVideoGradeLut(v.lut, `${path}.lut`) });
|
|
288
288
|
}
|
|
289
289
|
function parseVideoGradeLut(v, path) {
|
|
290
290
|
if (v === void 0) return void 0;
|
|
@@ -299,7 +299,7 @@ function parseVideoClipMask(v, path) {
|
|
|
299
299
|
if (!isObject(v)) return fail(path, 'must be an object such as { shape: "ellipse", x: 0.5, y: 0.5, width: 0.4, height: 0.6, feather: 20 }');
|
|
300
300
|
const unknown = Object.keys(v).find((k) => !MASK_KEYS.includes(k));
|
|
301
301
|
if (unknown) fail(`${path}.${unknown}`, `is not a mask setting; use ${MASK_KEYS.join(", ")}`);
|
|
302
|
-
const shape = oneOf(v.shape,
|
|
302
|
+
const shape = oneOf(v.shape, _chunkA653N65Qcjs.VIDEO_MASK_SHAPES, `${path}.shape`, false);
|
|
303
303
|
let points;
|
|
304
304
|
if (v.points !== void 0) {
|
|
305
305
|
if (shape !== "polygon") fail(`${path}.points`, "is only for polygon masks");
|
|
@@ -325,15 +325,15 @@ function parseVideoClipMask(v, path) {
|
|
|
325
325
|
function parseVideoTransition(v, path) {
|
|
326
326
|
if (v === void 0) return void 0;
|
|
327
327
|
if (!isObject(v)) return fail(path, "must be an object { type, duration }");
|
|
328
|
-
const type = oneOf(v.type,
|
|
328
|
+
const type = oneOf(v.type, _chunkA653N65Qcjs.VIDEO_TRANSITION_TYPES, `${path}.type`, false);
|
|
329
329
|
if (type === "effect" && v.effect === void 0) fail(`${path}.effect`, 'is required for an effect transition: { effect: "<effect id>", values }');
|
|
330
330
|
if (type !== "effect" && v.effect !== void 0) fail(`${path}.effect`, 'is only for transitions of type "effect"');
|
|
331
331
|
return compact({
|
|
332
332
|
type,
|
|
333
333
|
duration: num(v.duration, `${path}.duration`, { positive: true }),
|
|
334
334
|
color: str(v.color, `${path}.color`, true),
|
|
335
|
-
direction: oneOf(v.direction,
|
|
336
|
-
audioCurve: oneOf(v.audioCurve,
|
|
335
|
+
direction: oneOf(v.direction, _chunkA653N65Qcjs.VIDEO_WIPE_DIRECTIONS, `${path}.direction`),
|
|
336
|
+
audioCurve: oneOf(v.audioCurve, _chunkA653N65Qcjs.VIDEO_FADE_CURVES, `${path}.audioCurve`),
|
|
337
337
|
effect: v.effect === void 0 ? void 0 : parseVideoEffectRef(v.effect, `${path}.effect`, false)
|
|
338
338
|
});
|
|
339
339
|
}
|
|
@@ -462,7 +462,7 @@ function parseVideoClipCamera(v, path) {
|
|
|
462
462
|
}
|
|
463
463
|
function parseVideoClip(v, path = "clip") {
|
|
464
464
|
if (!isObject(v)) return fail(path, "must be an object");
|
|
465
|
-
const type = oneOf(_nullishCoalesce(v.type, () => ( "media")),
|
|
465
|
+
const type = oneOf(_nullishCoalesce(v.type, () => ( "media")), _chunkA653N65Qcjs.VIDEO_CLIP_TYPES, `${path}.type`, false);
|
|
466
466
|
const base = {
|
|
467
467
|
id: str(v.id, `${path}.id`),
|
|
468
468
|
name: str(v.name, `${path}.name`, true),
|
|
@@ -470,8 +470,8 @@ function parseVideoClip(v, path = "clip") {
|
|
|
470
470
|
duration: num(v.duration, `${path}.duration`, { positive: true }),
|
|
471
471
|
opacity: parseVideoAnimatable(v.opacity, `${path}.opacity`, { optional: true, min: 0, max: 1 }),
|
|
472
472
|
transform: parseVideoTransform(v.transform, `${path}.transform`),
|
|
473
|
-
fit: oneOf(v.fit,
|
|
474
|
-
blend: oneOf(v.blend,
|
|
473
|
+
fit: oneOf(v.fit, _chunkA653N65Qcjs.VIDEO_FITS, `${path}.fit`),
|
|
474
|
+
blend: oneOf(v.blend, _chunkA653N65Qcjs.VIDEO_BLEND_MODES, `${path}.blend`),
|
|
475
475
|
grade: parseVideoGrade(v.grade, `${path}.grade`),
|
|
476
476
|
animateIn: parseVideoClipAnimation(v.animateIn, `${path}.animateIn`),
|
|
477
477
|
animateOut: parseVideoClipAnimation(v.animateOut, `${path}.animateOut`),
|
|
@@ -492,8 +492,8 @@ function parseVideoClip(v, path = "clip") {
|
|
|
492
492
|
volume: parseVideoAnimatable(v.volume, `${path}.volume`, { optional: true, min: 0, max: 4 }),
|
|
493
493
|
muted: bool(v.muted, `${path}.muted`),
|
|
494
494
|
timeRemap: parseVideoTimeRemap(v.timeRemap, v.speed, `${path}.timeRemap`),
|
|
495
|
-
fadeInCurve: oneOf(v.fadeInCurve,
|
|
496
|
-
fadeOutCurve: oneOf(v.fadeOutCurve,
|
|
495
|
+
fadeInCurve: oneOf(v.fadeInCurve, _chunkA653N65Qcjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
|
|
496
|
+
fadeOutCurve: oneOf(v.fadeOutCurve, _chunkA653N65Qcjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
|
|
497
497
|
});
|
|
498
498
|
if (type === "sequence") {
|
|
499
499
|
for (const key of ["speed", "timeRemap"])
|
|
@@ -505,8 +505,8 @@ function parseVideoClip(v, path = "clip") {
|
|
|
505
505
|
in: num(v.in, `${path}.in`, { optional: true, min: 0 }),
|
|
506
506
|
volume: parseVideoAnimatable(v.volume, `${path}.volume`, { optional: true, min: 0, max: 4 }),
|
|
507
507
|
muted: bool(v.muted, `${path}.muted`),
|
|
508
|
-
fadeInCurve: oneOf(v.fadeInCurve,
|
|
509
|
-
fadeOutCurve: oneOf(v.fadeOutCurve,
|
|
508
|
+
fadeInCurve: oneOf(v.fadeInCurve, _chunkA653N65Qcjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
|
|
509
|
+
fadeOutCurve: oneOf(v.fadeOutCurve, _chunkA653N65Qcjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
|
|
510
510
|
});
|
|
511
511
|
}
|
|
512
512
|
if (type === "text")
|
|
@@ -521,7 +521,7 @@ function parseVideoClip(v, path = "clip") {
|
|
|
521
521
|
background: str(v.background, `${path}.background`, true)
|
|
522
522
|
});
|
|
523
523
|
if (type === "adjustment") {
|
|
524
|
-
const scope = oneOf(v.scope,
|
|
524
|
+
const scope = oneOf(v.scope, _chunkA653N65Qcjs.VIDEO_ADJUSTMENT_SCOPES, `${path}.scope`);
|
|
525
525
|
const targetTrack = str(v.targetTrack, `${path}.targetTrack`, true);
|
|
526
526
|
if (scope === "track" && !targetTrack) fail(`${path}.targetTrack`, 'is required when scope is "track": the id of the track whose pictures the adjustment changes');
|
|
527
527
|
if (targetTrack !== void 0 && scope !== "track") fail(`${path}.targetTrack`, 'is only for scope "track"');
|
|
@@ -624,9 +624,9 @@ function createVideoProject(options = {}) {
|
|
|
624
624
|
// src/video-editor/check.ts
|
|
625
625
|
function videoClipKeyframes(clip) {
|
|
626
626
|
const out = [
|
|
627
|
-
{ property: "opacity", keys:
|
|
628
|
-
{ property: "volume", keys: clip.type === "media" || clip.type === "sequence" ?
|
|
629
|
-
...
|
|
627
|
+
{ property: "opacity", keys: _chunkA653N65Qcjs.videoKeysOf.call(void 0, clip.opacity) },
|
|
628
|
+
{ property: "volume", keys: clip.type === "media" || clip.type === "sequence" ? _chunkA653N65Qcjs.videoKeysOf.call(void 0, clip.volume) : [] },
|
|
629
|
+
..._chunkA653N65Qcjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => ({ property: p, keys: _chunkA653N65Qcjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _2 => _2.transform, 'optionalAccess', _3 => _3[p]])) }))
|
|
630
630
|
];
|
|
631
631
|
return out.filter((o) => o.keys.length);
|
|
632
632
|
}
|
|
@@ -655,8 +655,8 @@ var VIDEO_ISSUE_CODES = [
|
|
|
655
655
|
var videoIssueKey = (i) => [i.code, _nullishCoalesce(i.sequence, () => ( "")), _nullishCoalesce(i.track, () => ( "")), _nullishCoalesce(i.clip, () => ( "")), _nullishCoalesce(i.asset, () => ( "")), _nullishCoalesce(i.marker, () => ( ""))].join("|");
|
|
656
656
|
function checkVideoProject(project) {
|
|
657
657
|
const issues = [];
|
|
658
|
-
const assets =
|
|
659
|
-
const sequences =
|
|
658
|
+
const assets = _chunkA653N65Qcjs.videoAssetMap.call(void 0, project);
|
|
659
|
+
const sequences = _chunkA653N65Qcjs.videoSequenceMap.call(void 0, project);
|
|
660
660
|
const used = /* @__PURE__ */ new Set();
|
|
661
661
|
const usedSequences = /* @__PURE__ */ new Set();
|
|
662
662
|
const cycles = /* @__PURE__ */ new Map();
|
|
@@ -664,7 +664,7 @@ function checkVideoProject(project) {
|
|
|
664
664
|
if ((asset.kind === "video" || asset.kind === "audio") && asset.duration === void 0)
|
|
665
665
|
issues.push({ code: "unknown-duration", severity: "warning", asset: asset.id, message: `Asset "${asset.id}" has no duration, so clips of it cannot be checked against its length; set "duration" in ms.` });
|
|
666
666
|
const checkTrack = (track, sequence) => {
|
|
667
|
-
const clips =
|
|
667
|
+
const clips = _chunkA653N65Qcjs.sortedVideoClips.call(void 0, track);
|
|
668
668
|
const where = sequence ? ` in sequence "${sequence}"` : "";
|
|
669
669
|
for (let i = 0; i < clips.length; i++) {
|
|
670
670
|
const clip = clips[i];
|
|
@@ -674,13 +674,13 @@ function checkVideoProject(project) {
|
|
|
674
674
|
const seq = sequences.get(clip.sequence);
|
|
675
675
|
if (!seq) issues.push({ code: "missing-sequence", severity: "error", ...at, message: `Compound clip "${clip.id}" plays sequence "${clip.sequence}", which is not in the project; add the sequence or delete the clip.` });
|
|
676
676
|
else {
|
|
677
|
-
if (!cycles.has(seq.id)) cycles.set(seq.id,
|
|
677
|
+
if (!cycles.has(seq.id)) cycles.set(seq.id, _chunkA653N65Qcjs.findVideoSequenceCycle.call(void 0, project, seq.id));
|
|
678
678
|
const cycle = cycles.get(seq.id);
|
|
679
679
|
if (cycle) issues.push({ code: "sequence-cycle", severity: "error", ...at, message: `Compound clip "${clip.id}" plays sequence "${seq.id}", which contains itself (${cycle.join(" \u2192 ")}), so it is left out of the picture and sound; remove the compound clip that closes the loop.` });
|
|
680
|
-
const length =
|
|
681
|
-
const range =
|
|
682
|
-
if (range.out > length +
|
|
683
|
-
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Compound clip "${clip.id}" plays to ${
|
|
680
|
+
const length = _chunkA653N65Qcjs.videoSequenceDuration.call(void 0, seq);
|
|
681
|
+
const range = _chunkA653N65Qcjs.videoClipSourceRange.call(void 0, clip);
|
|
682
|
+
if (range.out > length + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON)
|
|
683
|
+
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Compound clip "${clip.id}" plays to ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, range.out)} of sequence "${seq.id}", which is only ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, length)} long; shorten the clip or move its in point.` });
|
|
684
684
|
}
|
|
685
685
|
} else if (clip.type === "media") {
|
|
686
686
|
used.add(clip.asset);
|
|
@@ -689,32 +689,32 @@ function checkVideoProject(project) {
|
|
|
689
689
|
else {
|
|
690
690
|
if (track.kind === "audio" && asset.kind === "image") issues.push({ code: "wrong-track", severity: "error", ...at, message: `Clip "${clip.id}" is an image on audio track "${track.id}"; move it to a video track.` });
|
|
691
691
|
if (track.kind === "video" && asset.kind === "audio") issues.push({ code: "wrong-track", severity: "error", ...at, message: `Clip "${clip.id}" is audio on video track "${track.id}"; move it to an audio track.` });
|
|
692
|
-
const range =
|
|
693
|
-
if (asset.duration !== void 0 && range.out > asset.duration +
|
|
694
|
-
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Clip "${clip.id}" plays to ${
|
|
692
|
+
const range = _chunkA653N65Qcjs.videoClipSourceRange.call(void 0, clip);
|
|
693
|
+
if (asset.duration !== void 0 && range.out > asset.duration + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON)
|
|
694
|
+
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Clip "${clip.id}" plays to ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, range.out)} of "${asset.id}", which is only ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, asset.duration)} long; shorten the clip or move its in point.` });
|
|
695
695
|
}
|
|
696
696
|
} else if (track.kind === "audio") issues.push({ code: "wrong-track", severity: "error", ...at, message: `Clip "${clip.id}" is a ${clip.type} clip on audio track "${track.id}"; move it to a video track.` });
|
|
697
697
|
if (clip.type === "adjustment" && (_nullishCoalesce(clip.scope, () => ( "underneath"))) === "track" && !(sequence ? _nullishCoalesce(_optionalChain([sequences, 'access', _4 => _4.get, 'call', _5 => _5(sequence), 'optionalAccess', _6 => _6.tracks]), () => ( [])) : project.tracks).some((t) => t.id === clip.targetTrack))
|
|
698
698
|
issues.push({ code: "missing-target-track", severity: "warning", ...at, message: `Adjustment clip "${clip.id}" changes track "${clip.targetTrack}", which is not ${sequence ? `in sequence "${sequence}"` : "in the project"}, so it changes nothing; set its targetTrack to a track beside it or change its scope.` });
|
|
699
699
|
const next = clips[i + 1];
|
|
700
|
-
if (next && next.start <
|
|
701
|
-
issues.push({ code: "overlap", severity: "error", ...at, message: `Clips "${clip.id}" and "${next.id}" overlap on track "${track.id}"${where} from ${
|
|
702
|
-
if ((_nullishCoalesce(clip.fadeIn, () => ( 0))) + (_nullishCoalesce(clip.fadeOut, () => ( 0))) > clip.duration +
|
|
700
|
+
if (next && next.start < _chunkA653N65Qcjs.videoClipEnd.call(void 0, clip) - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON)
|
|
701
|
+
issues.push({ code: "overlap", severity: "error", ...at, message: `Clips "${clip.id}" and "${next.id}" overlap on track "${track.id}"${where} from ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, next.start)}; move one of them.` });
|
|
702
|
+
if ((_nullishCoalesce(clip.fadeIn, () => ( 0))) + (_nullishCoalesce(clip.fadeOut, () => ( 0))) > clip.duration + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON)
|
|
703
703
|
issues.push({ code: "fades-too-long", severity: "warning", ...at, message: `Clip "${clip.id}"'s fades (${_nullishCoalesce(clip.fadeIn, () => ( 0))} + ${_nullishCoalesce(clip.fadeOut, () => ( 0))} ms) are longer than the clip (${clip.duration} ms); shorten them.` });
|
|
704
|
-
const anim = (clip.animateIn ? _nullishCoalesce(clip.animateIn.duration, () => (
|
|
705
|
-
if (anim > clip.duration +
|
|
704
|
+
const anim = (clip.animateIn ? _nullishCoalesce(clip.animateIn.duration, () => ( _chunkA653N65Qcjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0) + (clip.animateOut ? _nullishCoalesce(clip.animateOut.duration, () => ( _chunkA653N65Qcjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0);
|
|
705
|
+
if (anim > clip.duration + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON)
|
|
706
706
|
issues.push({ code: "animations-too-long", severity: "warning", ...at, message: `Clip "${clip.id}"'s entrance and exit (${anim} ms together) are longer than the clip (${clip.duration} ms), so both are shortened; give them shorter durations.` });
|
|
707
707
|
for (const which of ["animateIn", "animateOut"]) {
|
|
708
708
|
const a = clip[which];
|
|
709
709
|
if (!a) continue;
|
|
710
|
-
const keyed =
|
|
710
|
+
const keyed = _chunkA653N65Qcjs.videoClipAnimationProperties.call(void 0, a).filter((p) => _chunkA653N65Qcjs.videoKeysOf.call(void 0, p === "opacity" ? clip.opacity : _optionalChain([clip, 'access', _7 => _7.transform, 'optionalAccess', _8 => _8[p]])).length);
|
|
711
711
|
if (keyed.length)
|
|
712
712
|
issues.push({ code: "animation-keyed", severity: "note", ...at, message: `Clip "${clip.id}"'s ${a.effect} ${which === "animateIn" ? "entrance" : "exit"} leaves ${keyed.join(", ")} alone, because the clip keys ${keyed.length > 1 ? "them" : "it"} itself; remove those keyframes or the animation.` });
|
|
713
713
|
}
|
|
714
714
|
if (clip.camera) {
|
|
715
|
-
const last = Math.max(0, ...
|
|
715
|
+
const last = Math.max(0, ..._chunkA653N65Qcjs.VIDEO_TRANSFORM_PROPERTIES.flatMap((p) => _chunkA653N65Qcjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _9 => _9.transform, 'optionalAccess', _10 => _10[p]])).map((k) => k.t)));
|
|
716
716
|
const frame = 1e3 / (project.fps || 30);
|
|
717
|
-
if (last > 0 && Math.abs(last - clip.duration) > frame +
|
|
717
|
+
if (last > 0 && Math.abs(last - clip.duration) > frame + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON)
|
|
718
718
|
issues.push({
|
|
719
719
|
code: "camera-stale",
|
|
720
720
|
severity: "warning",
|
|
@@ -723,7 +723,7 @@ function checkVideoProject(project) {
|
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
725
|
for (const { property, keys } of videoClipKeyframes(clip)) {
|
|
726
|
-
const outside = keys.filter((k) => k.t < -
|
|
726
|
+
const outside = keys.filter((k) => k.t < -_chunkA653N65Qcjs.VIDEO_TIME_EPSILON || k.t > clip.duration + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON);
|
|
727
727
|
if (outside.length)
|
|
728
728
|
issues.push({
|
|
729
729
|
code: "keyframes-outside-clip",
|
|
@@ -734,20 +734,20 @@ function checkVideoProject(project) {
|
|
|
734
734
|
}
|
|
735
735
|
if (clip.transition) {
|
|
736
736
|
const d = clip.transition.duration;
|
|
737
|
-
const before =
|
|
737
|
+
const before = _chunkA653N65Qcjs.videoClipBefore.call(void 0, track, clip);
|
|
738
738
|
if (!before) {
|
|
739
739
|
issues.push({ code: "transition-without-cut", severity: "warning", ...at, message: `Clip "${clip.id}" has a transition but no clip ends where it starts on track "${track.id}", so it plays as nothing; butt a clip up against it or remove the transition.` });
|
|
740
740
|
continue;
|
|
741
741
|
}
|
|
742
|
-
if (d > clip.duration +
|
|
742
|
+
if (d > clip.duration + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON || d > before.duration + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) {
|
|
743
743
|
issues.push({ code: "transition-too-long", severity: "error", ...at, message: `The ${d} ms transition into "${clip.id}" is longer than "${clip.id}" (${clip.duration} ms) or "${before.id}" (${before.duration} ms); make it at most ${Math.min(clip.duration, before.duration)} ms.` });
|
|
744
744
|
continue;
|
|
745
745
|
}
|
|
746
746
|
if (clip.transition.type === "dip") continue;
|
|
747
|
-
const outgoing =
|
|
748
|
-
const incoming =
|
|
747
|
+
const outgoing = _chunkA653N65Qcjs.videoClipHandles.call(void 0, before, assets, sequences).after;
|
|
748
|
+
const incoming = _chunkA653N65Qcjs.videoClipHandles.call(void 0, clip, assets, sequences).before;
|
|
749
749
|
const half = d / 2;
|
|
750
|
-
if (outgoing < half -
|
|
750
|
+
if (outgoing < half - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON || incoming < half - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) {
|
|
751
751
|
const fits = 2 * Math.min(outgoing, incoming);
|
|
752
752
|
issues.push({
|
|
753
753
|
code: "transition-handles",
|
|
@@ -764,9 +764,9 @@ function checkVideoProject(project) {
|
|
|
764
764
|
for (const sequence of _nullishCoalesce(project.sequences, () => ( [])))
|
|
765
765
|
if (!usedSequences.has(sequence.id)) issues.push({ code: "unused-sequence", severity: "note", sequence: sequence.id, message: `Sequence "${sequence.id}" is not played by any compound clip.` });
|
|
766
766
|
for (const asset of project.assets) if (!used.has(asset.id)) issues.push({ code: "unused-asset", severity: "note", asset: asset.id, message: `Asset "${asset.id}" is not used by any clip.` });
|
|
767
|
-
const end =
|
|
767
|
+
const end = _chunkA653N65Qcjs.videoProjectDuration.call(void 0, project);
|
|
768
768
|
for (const marker of _nullishCoalesce(project.markers, () => ( [])))
|
|
769
|
-
if (marker.time > end +
|
|
769
|
+
if (marker.time > end + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) issues.push({ code: "marker-past-end", severity: "note", marker: marker.id, message: `Marker "${marker.id}" at ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, marker.time)} is past the end (${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, end)}).` });
|
|
770
770
|
if (!project.tracks.some((t) => t.clips.length)) issues.push({ code: "empty", severity: "note", message: "The project has no clips yet; add assets and then clips." });
|
|
771
771
|
const rank = { error: 0, warning: 1, note: 2 };
|
|
772
772
|
return issues.sort((a, b) => rank[a.severity] - rank[b.severity]);
|
|
@@ -820,7 +820,7 @@ function mergeSpans(spans) {
|
|
|
820
820
|
const out = [];
|
|
821
821
|
for (const [from, to] of [...spans].sort((a, b) => a[0] - b[0])) {
|
|
822
822
|
const last = out[out.length - 1];
|
|
823
|
-
if (last && from <= last[1] +
|
|
823
|
+
if (last && from <= last[1] + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) last[1] = Math.max(last[1], to);
|
|
824
824
|
else out.push([from, to]);
|
|
825
825
|
}
|
|
826
826
|
return out;
|
|
@@ -834,13 +834,13 @@ function clipAnimatables(clip) {
|
|
|
834
834
|
// A speed ramp is keys in clip time too, so trims and splits keep it on the same frames of source.
|
|
835
835
|
{ get: () => c.timeRemap, set: (v) => c.timeRemap = v }
|
|
836
836
|
];
|
|
837
|
-
for (const p of
|
|
837
|
+
for (const p of _chunkA653N65Qcjs.VIDEO_TRANSFORM_PROPERTIES) out.push({ get: () => _optionalChain([c, 'access', _11 => _11.transform, 'optionalAccess', _12 => _12[p]]), set: (v) => c.transform && (c.transform[p] = v) });
|
|
838
838
|
return out;
|
|
839
839
|
}
|
|
840
840
|
function retimeClipKeys(clip, fn) {
|
|
841
841
|
for (const a of clipAnimatables(clip)) {
|
|
842
842
|
const v = a.get();
|
|
843
|
-
if (
|
|
843
|
+
if (_chunkA653N65Qcjs.isVideoKeyframes.call(void 0, v)) a.set(fn(v));
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
846
|
var OPTIONAL_CLIP_FIELDS = ["name", "effects", "mask", "camera", "scope", "targetTrack", "values", "provider", "opacity", "transform", "fit", "blend", "grade", "animateIn", "animateOut", "fadeIn", "fadeOut", "fadeInCurve", "fadeOutCurve", "transition", "in", "speed", "timeRemap", "volume", "muted", "color", "fontSize", "fontFamily", "fontWeight", "background"];
|
|
@@ -857,8 +857,8 @@ var Editor = (_class = class {
|
|
|
857
857
|
return t;
|
|
858
858
|
}
|
|
859
859
|
clip(id) {
|
|
860
|
-
const at =
|
|
861
|
-
const nested = at ? null :
|
|
860
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, this.p, id);
|
|
861
|
+
const nested = at ? null : _chunkA653N65Qcjs.findVideoSequenceClip.call(void 0, this.p, id);
|
|
862
862
|
if (nested) refuse(`Clip "${id}" is inside sequence "${nested.sequence.id}", and clips inside sequences cannot be edited yet; edit the compound clip that plays the sequence instead (list_video_sequences shows which).`);
|
|
863
863
|
if (!at) {
|
|
864
864
|
const ids = this.p.tracks.flatMap((t) => t.clips.map((c) => c.id));
|
|
@@ -875,16 +875,16 @@ var Editor = (_class = class {
|
|
|
875
875
|
return a;
|
|
876
876
|
}
|
|
877
877
|
fits(track, start, duration, ignore, what) {
|
|
878
|
-
const hit =
|
|
878
|
+
const hit = _chunkA653N65Qcjs.videoOverlap.call(void 0, track, start, start + duration, ignore);
|
|
879
879
|
if (hit) {
|
|
880
|
-
const free =
|
|
881
|
-
refuse(`${what} at ${
|
|
880
|
+
const free = _chunkA653N65Qcjs.nextFreeVideoSlot.call(void 0, track, start, duration, ignore);
|
|
881
|
+
refuse(`${what} at ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, start)}\u2013${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, start + duration)} would overlap clip "${hit.id}" (${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, _chunkA653N65Qcjs.videoClipEnd.call(void 0, hit))}) on track "${track.id}"; the next free place is ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, free)}, or use mode "insert" to push later clips along or "overwrite" to replace what is there.`);
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
884
|
/** An adjustment clip's target track must exist. */
|
|
885
885
|
adjustmentTarget(clip) {
|
|
886
886
|
if (clip.type !== "adjustment" || clip.targetTrack === void 0) return;
|
|
887
|
-
const ids =
|
|
887
|
+
const ids = _chunkA653N65Qcjs.allVideoTracks.call(void 0, this.p).map(({ track }) => track.id);
|
|
888
888
|
if (!ids.includes(clip.targetTrack)) refuse(`Adjustment clip "${clip.id}" targets track ${_chunkERJA5CGTcjs.namedWithSuggestion.call(void 0, clip.targetTrack, ids)}, which does not exist; the tracks are ${ids.map((t) => `"${t}"`).join(", ")}.`);
|
|
889
889
|
}
|
|
890
890
|
kindFits(track, clip) {
|
|
@@ -900,14 +900,14 @@ var Editor = (_class = class {
|
|
|
900
900
|
/** Moves every clip on `track` starting at or after `from` by `delta`. */
|
|
901
901
|
shift(track, from, delta, except = /* @__PURE__ */ new Set()) {
|
|
902
902
|
if (!delta) return;
|
|
903
|
-
for (const c of track.clips) if (!except.has(c.id) && c.start >= from -
|
|
903
|
+
for (const c of track.clips) if (!except.has(c.id) && c.start >= from - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) c.start = Math.max(0, c.start + delta);
|
|
904
904
|
track.clips.sort((a, b) => a.start - b.start);
|
|
905
905
|
}
|
|
906
906
|
get frame() {
|
|
907
907
|
return 1e3 / this.p.fps;
|
|
908
908
|
}
|
|
909
909
|
ids() {
|
|
910
|
-
return
|
|
910
|
+
return _chunkA653N65Qcjs.allVideoClipIds.call(void 0, this.p);
|
|
911
911
|
}
|
|
912
912
|
/**
|
|
913
913
|
* The tracks a ripple on `sources` moves, top to bottom: the sources, and every unlocked
|
|
@@ -915,8 +915,8 @@ var Editor = (_class = class {
|
|
|
915
915
|
*/
|
|
916
916
|
rippleTracks(sources) {
|
|
917
917
|
const set = new Set(sources);
|
|
918
|
-
if ([...set].some(
|
|
919
|
-
for (const t of this.p.tracks) if (
|
|
918
|
+
if ([...set].some(_chunkA653N65Qcjs.videoTrackSyncLocked)) {
|
|
919
|
+
for (const t of this.p.tracks) if (_chunkA653N65Qcjs.videoTrackSyncLocked.call(void 0, t) && !t.locked) set.add(t);
|
|
920
920
|
}
|
|
921
921
|
return this.p.tracks.filter((t) => set.has(t));
|
|
922
922
|
}
|
|
@@ -933,7 +933,7 @@ var Editor = (_class = class {
|
|
|
933
933
|
return open;
|
|
934
934
|
}
|
|
935
935
|
range(from, to) {
|
|
936
|
-
if (!(to - from >
|
|
936
|
+
if (!(to - from > _chunkA653N65Qcjs.VIDEO_TIME_EPSILON)) refuse(`"to" (${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, to)}) must be after "from" (${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, from)}).`);
|
|
937
937
|
}
|
|
938
938
|
/** Moves a media or compound clip's in point by `delta` of timeline time (stills, titles and colours have none). */
|
|
939
939
|
moveIn(clip, delta) {
|
|
@@ -942,18 +942,18 @@ var Editor = (_class = class {
|
|
|
942
942
|
if (clip.in < 1e-9) delete clip.in;
|
|
943
943
|
return;
|
|
944
944
|
}
|
|
945
|
-
if (clip.type !== "media" || _optionalChain([
|
|
946
|
-
clip.in = Math.max(0, (_nullishCoalesce(clip.in, () => ( 0))) + delta *
|
|
945
|
+
if (clip.type !== "media" || _optionalChain([_chunkA653N65Qcjs.videoAssetMap.call(void 0, this.p), 'access', _14 => _14.get, 'call', _15 => _15(clip.asset), 'optionalAccess', _16 => _16.kind]) === "image") return;
|
|
946
|
+
clip.in = Math.max(0, (_nullishCoalesce(clip.in, () => ( 0))) + delta * _chunkA653N65Qcjs.videoClipSpeed.call(void 0, clip));
|
|
947
947
|
if (clip.in < 1e-9) delete clip.in;
|
|
948
948
|
}
|
|
949
949
|
/** Moves a clip's head `delta` later in time (start, in point and keys); the caller sets start and duration. */
|
|
950
950
|
trimHead(clip, delta) {
|
|
951
951
|
if (!isRamped(clip)) this.moveIn(clip, delta);
|
|
952
|
-
retimeClipKeys(clip, (v) =>
|
|
952
|
+
retimeClipKeys(clip, (v) => _chunkA653N65Qcjs.retimeVideoAnimatable.call(void 0, v, -delta));
|
|
953
953
|
}
|
|
954
954
|
/** Cuts `clip` at `at` (inside it): the left part keeps the id, the right part is returned. */
|
|
955
955
|
cut(track, clip, at, id) {
|
|
956
|
-
const end =
|
|
956
|
+
const end = _chunkA653N65Qcjs.videoClipEnd.call(void 0, clip);
|
|
957
957
|
const right = { ...structuredClone(clip), id: _nullishCoalesce(id, () => ( freshId(`${clip.id}-`, this.ids()))), start: at, duration: end - at };
|
|
958
958
|
delete right.transition;
|
|
959
959
|
delete right.fadeIn;
|
|
@@ -961,9 +961,9 @@ var Editor = (_class = class {
|
|
|
961
961
|
delete right.animateIn;
|
|
962
962
|
const leftValues = clipAnimatables(clip);
|
|
963
963
|
clipAnimatables(right).forEach((r, i) => {
|
|
964
|
-
const [l, rr] =
|
|
965
|
-
if (
|
|
966
|
-
if (
|
|
964
|
+
const [l, rr] = _chunkA653N65Qcjs.splitVideoAnimatable.call(void 0, leftValues[i].get(), at - clip.start);
|
|
965
|
+
if (_chunkA653N65Qcjs.isVideoKeyframes.call(void 0, l)) leftValues[i].set(l);
|
|
966
|
+
if (_chunkA653N65Qcjs.isVideoKeyframes.call(void 0, rr)) r.set(rr);
|
|
967
967
|
});
|
|
968
968
|
if (!isRamped(right)) this.moveIn(right, at - clip.start);
|
|
969
969
|
clip.duration = at - clip.start;
|
|
@@ -977,7 +977,7 @@ var Editor = (_class = class {
|
|
|
977
977
|
/** Cuts every clip on `tracks` that runs across `at`; returns the new right-hand parts. */
|
|
978
978
|
cutAcross(tracks, at) {
|
|
979
979
|
const made = [];
|
|
980
|
-
for (const t of tracks) for (const c of [...t.clips]) if (c.start < at -
|
|
980
|
+
for (const t of tracks) for (const c of [...t.clips]) if (c.start < at - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON && _chunkA653N65Qcjs.videoClipEnd.call(void 0, c) > at + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) made.push(this.cut(t, c, at));
|
|
981
981
|
return made;
|
|
982
982
|
}
|
|
983
983
|
/**
|
|
@@ -995,10 +995,10 @@ var Editor = (_class = class {
|
|
|
995
995
|
*/
|
|
996
996
|
close(tracks, from, to) {
|
|
997
997
|
for (const t of tracks) {
|
|
998
|
-
const hit =
|
|
998
|
+
const hit = _chunkA653N65Qcjs.videoOverlap.call(void 0, t, from, to);
|
|
999
999
|
if (hit)
|
|
1000
1000
|
refuse(
|
|
1001
|
-
`Rippling out ${
|
|
1001
|
+
`Rippling out ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, from)}\u2013${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, to)} would pull track "${t.id}" out of sync: clip "${hit.id}" (${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, _chunkA653N65Qcjs.videoClipEnd.call(void 0, hit))}) is in that stretch. Extract the range across "${t.id}" too (extract_range with its id in "tracks"), turn its sync lock off (update_track with syncLocked false) or lock it, or lift instead of rippling.`
|
|
1002
1002
|
);
|
|
1003
1003
|
}
|
|
1004
1004
|
for (const t of tracks) this.shift(t, to, from - to);
|
|
@@ -1010,10 +1010,10 @@ var Editor = (_class = class {
|
|
|
1010
1010
|
clear(track, from, to, report) {
|
|
1011
1011
|
for (const c of [...track.clips]) {
|
|
1012
1012
|
const start = c.start;
|
|
1013
|
-
const end =
|
|
1014
|
-
if (end <= from +
|
|
1015
|
-
const coversHead = start >= from -
|
|
1016
|
-
const coversTail = end <= to +
|
|
1013
|
+
const end = _chunkA653N65Qcjs.videoClipEnd.call(void 0, c);
|
|
1014
|
+
if (end <= from + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON || start >= to - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) continue;
|
|
1015
|
+
const coversHead = start >= from - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON;
|
|
1016
|
+
const coversTail = end <= to + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON;
|
|
1017
1017
|
if (coversHead && coversTail) {
|
|
1018
1018
|
track.clips = track.clips.filter((x) => x !== c);
|
|
1019
1019
|
report.removed.push(c.id);
|
|
@@ -1036,8 +1036,8 @@ var Editor = (_class = class {
|
|
|
1036
1036
|
/** Clamps a slip, roll or slide to `[lo, hi]`, refusing when it cannot move that way at all. */
|
|
1037
1037
|
clamp(delta, lo, hi, why) {
|
|
1038
1038
|
const applied = Math.min(Math.max(delta, Math.min(0, lo)), Math.max(0, hi));
|
|
1039
|
-
if (Math.abs(delta) >
|
|
1040
|
-
return Math.abs(applied) <=
|
|
1039
|
+
if (Math.abs(delta) > _chunkA653N65Qcjs.VIDEO_TIME_EPSILON && Math.abs(applied) <= _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) refuse(why());
|
|
1040
|
+
return Math.abs(applied) <= _chunkA653N65Qcjs.VIDEO_TIME_EPSILON ? 0 : applied;
|
|
1041
1041
|
}
|
|
1042
1042
|
/** Places a clip on a track by `mode`, returning what it cut, trimmed, removed and rippled. */
|
|
1043
1043
|
place(track, clip, mode, outcome) {
|
|
@@ -1047,14 +1047,14 @@ var Editor = (_class = class {
|
|
|
1047
1047
|
outcome.rippled = tracks.map((t) => t.id);
|
|
1048
1048
|
} else if (mode === "overwrite") {
|
|
1049
1049
|
const report = { removed: [], trimmed: [], created: [] };
|
|
1050
|
-
this.clear(track, clip.start,
|
|
1050
|
+
this.clear(track, clip.start, _chunkA653N65Qcjs.videoClipEnd.call(void 0, clip), report);
|
|
1051
1051
|
Object.assign(outcome, report);
|
|
1052
1052
|
} else this.fits(track, clip.start, clip.duration, /* @__PURE__ */ new Set([clip.id]), `Clip "${clip.id}"`);
|
|
1053
1053
|
track.clips.push(clip);
|
|
1054
1054
|
track.clips.sort((a, b) => a.start - b.start);
|
|
1055
1055
|
}
|
|
1056
1056
|
placement(mode, ripple) {
|
|
1057
|
-
if (mode !== void 0 && !
|
|
1057
|
+
if (mode !== void 0 && !_chunkA653N65Qcjs.VIDEO_PLACEMENT_MODES.includes(mode)) refuse(`"mode" must be ${_chunkA653N65Qcjs.VIDEO_PLACEMENT_MODES.map((m) => `"${m}"`).join(", ")}.`);
|
|
1058
1058
|
if (ripple && mode !== void 0 && mode !== "insert") refuse(`"ripple" means mode "insert", so it cannot go with mode "${mode}"; pass one or the other.`);
|
|
1059
1059
|
return _nullishCoalesce(mode, () => ( (ripple ? "insert" : "refuse")));
|
|
1060
1060
|
}
|
|
@@ -1091,7 +1091,7 @@ var Editor = (_class = class {
|
|
|
1091
1091
|
}
|
|
1092
1092
|
case "remove_asset": {
|
|
1093
1093
|
const asset = this.asset(e.asset);
|
|
1094
|
-
const users =
|
|
1094
|
+
const users = _chunkA653N65Qcjs.allVideoTracks.call(void 0, this.p).flatMap(({ track: t }) => t.clips.filter((c) => c.type === "media" && c.asset === asset.id).map((c) => c.id));
|
|
1095
1095
|
if (users.length) refuse(`Asset "${asset.id}" is used by clip${users.length > 1 ? "s" : ""} ${users.map((u) => `"${u}"`).join(", ")}; delete ${users.length > 1 ? "them" : "it"} first.`);
|
|
1096
1096
|
this.p.assets = this.p.assets.filter((a) => a !== asset);
|
|
1097
1097
|
return this.outcomes.push({ op: e.op, asset: asset.id });
|
|
@@ -1144,12 +1144,12 @@ var Editor = (_class = class {
|
|
|
1144
1144
|
else draft.duration = (asset.duration - (_nullishCoalesce(draft.in, () => ( 0)))) / (_nullishCoalesce(draft.speed, () => ( 1)));
|
|
1145
1145
|
if (!(draft.duration > 0)) refuse(`"in" (${draft.in} ms) is at or past the end of "${asset.id}" (${asset.duration} ms).`);
|
|
1146
1146
|
} else if (draft.type === "sequence") {
|
|
1147
|
-
const length =
|
|
1147
|
+
const length = _chunkA653N65Qcjs.videoSequenceDuration.call(void 0, _chunkA653N65Qcjs.videoSequenceMap.call(void 0, this.p).get(draft.sequence)) - (_nullishCoalesce(draft.in, () => ( 0)));
|
|
1148
1148
|
if (!(length > 0)) refuse(`"in" (${_nullishCoalesce(draft.in, () => ( 0))} ms) is at or past the end of sequence "${draft.sequence}".`);
|
|
1149
1149
|
draft.duration = length;
|
|
1150
1150
|
} else draft.duration = VIDEO_DEFAULT_TITLE_DURATION;
|
|
1151
1151
|
}
|
|
1152
|
-
const end =
|
|
1152
|
+
const end = _chunkA653N65Qcjs.sortedVideoClips.call(void 0, track).reduce((m, c) => Math.max(m, _chunkA653N65Qcjs.videoClipEnd.call(void 0, c)), 0);
|
|
1153
1153
|
draft.start ??= end;
|
|
1154
1154
|
const clip = parseVideoClip(draft, "clip");
|
|
1155
1155
|
this.adjustmentTarget(clip);
|
|
@@ -1175,20 +1175,20 @@ var Editor = (_class = class {
|
|
|
1175
1175
|
case "trim_clip": {
|
|
1176
1176
|
const { track, clip } = this.clip(e.clip);
|
|
1177
1177
|
this.unlocked(track);
|
|
1178
|
-
const speed =
|
|
1179
|
-
const end =
|
|
1178
|
+
const speed = _chunkA653N65Qcjs.videoClipSpeed.call(void 0, clip);
|
|
1179
|
+
const end = _chunkA653N65Qcjs.videoClipEnd.call(void 0, clip);
|
|
1180
1180
|
const minimum = 1e3 / this.p.fps;
|
|
1181
|
-
const assets =
|
|
1181
|
+
const assets = _chunkA653N65Qcjs.videoAssetMap.call(void 0, this.p);
|
|
1182
1182
|
if (e.edge === "start") {
|
|
1183
1183
|
const delta = e.to - clip.start;
|
|
1184
|
-
if (clip.duration - delta < minimum -
|
|
1184
|
+
if (clip.duration - delta < minimum - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) refuse(`Trimming the start to ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it ends at ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, end)}.`);
|
|
1185
1185
|
if (clip.type === "media" && !isRamped(clip) || clip.type === "sequence") {
|
|
1186
1186
|
const sourceIn = (_nullishCoalesce(clip.in, () => ( 0))) + delta * speed;
|
|
1187
|
-
if (sourceIn < -
|
|
1187
|
+
if (sourceIn < -_chunkA653N65Qcjs.VIDEO_TIME_EPSILON) refuse(`"${clip.id}" starts ${Math.round((_nullishCoalesce(clip.in, () => ( 0))) / speed)} ms into its source, so its start can move at most that far earlier (to ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, clip.start - (_nullishCoalesce(clip.in, () => ( 0))) / speed)}).`);
|
|
1188
1188
|
clip.in = Math.max(0, sourceIn);
|
|
1189
1189
|
if (clip.in === 0) delete clip.in;
|
|
1190
1190
|
}
|
|
1191
|
-
retimeClipKeys(clip, (v) =>
|
|
1191
|
+
retimeClipKeys(clip, (v) => _chunkA653N65Qcjs.retimeVideoAnimatable.call(void 0, v, -delta));
|
|
1192
1192
|
if (e.ripple) {
|
|
1193
1193
|
const tracks = this.rippleTracks([track]);
|
|
1194
1194
|
if (delta > 0) {
|
|
@@ -1209,17 +1209,17 @@ var Editor = (_class = class {
|
|
|
1209
1209
|
}
|
|
1210
1210
|
} else {
|
|
1211
1211
|
const duration = e.to - clip.start;
|
|
1212
|
-
if (duration < minimum -
|
|
1212
|
+
if (duration < minimum - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) refuse(`Trimming the end to ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it starts at ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, clip.start)}.`);
|
|
1213
1213
|
if (clip.type === "media" && !isRamped(clip)) {
|
|
1214
1214
|
const asset = assets.get(clip.asset);
|
|
1215
1215
|
const out = (_nullishCoalesce(clip.in, () => ( 0))) + duration * speed;
|
|
1216
|
-
if (_optionalChain([asset, 'optionalAccess', _17 => _17.duration]) !== void 0 && out > asset.duration +
|
|
1217
|
-
refuse(`"${clip.id}" can end at most at ${
|
|
1216
|
+
if (_optionalChain([asset, 'optionalAccess', _17 => _17.duration]) !== void 0 && out > asset.duration + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON)
|
|
1217
|
+
refuse(`"${clip.id}" can end at most at ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, clip.start + (asset.duration - (_nullishCoalesce(clip.in, () => ( 0)))) / speed)}, where "${asset.id}" runs out.`);
|
|
1218
1218
|
}
|
|
1219
1219
|
if (clip.type === "sequence") {
|
|
1220
|
-
const seq =
|
|
1221
|
-
const length = seq ?
|
|
1222
|
-
if ((_nullishCoalesce(clip.in, () => ( 0))) + duration > length +
|
|
1220
|
+
const seq = _chunkA653N65Qcjs.videoSequenceMap.call(void 0, this.p).get(clip.sequence);
|
|
1221
|
+
const length = seq ? _chunkA653N65Qcjs.videoSequenceDuration.call(void 0, seq) : Infinity;
|
|
1222
|
+
if ((_nullishCoalesce(clip.in, () => ( 0))) + duration > length + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) refuse(`"${clip.id}" can end at most at ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, clip.start + length - (_nullishCoalesce(clip.in, () => ( 0))))}, where sequence "${clip.sequence}" ends.`);
|
|
1223
1223
|
}
|
|
1224
1224
|
if (e.ripple) {
|
|
1225
1225
|
const tracks = this.rippleTracks([track]);
|
|
@@ -1241,9 +1241,9 @@ var Editor = (_class = class {
|
|
|
1241
1241
|
case "split_clip": {
|
|
1242
1242
|
const { track, clip } = this.clip(e.clip);
|
|
1243
1243
|
this.unlocked(track);
|
|
1244
|
-
const end =
|
|
1244
|
+
const end = _chunkA653N65Qcjs.videoClipEnd.call(void 0, clip);
|
|
1245
1245
|
const minimum = 1e3 / this.p.fps;
|
|
1246
|
-
if (e.at < clip.start + minimum -
|
|
1246
|
+
if (e.at < clip.start + minimum - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON || e.at > end - minimum + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) refuse(`${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, e.at)} is not inside "${clip.id}" (${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, clip.start)}\u2013${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, end)}), at least a frame from either end.`);
|
|
1247
1247
|
if (e.id !== void 0 && this.ids().includes(e.id)) refuse(`There is already a clip "${e.id}".`);
|
|
1248
1248
|
const right = this.cut(track, clip, e.at, e.id);
|
|
1249
1249
|
return this.outcomes.push({ op: e.op, clips: [clip.id, right.id], clip: right.id, track: track.id });
|
|
@@ -1254,12 +1254,12 @@ var Editor = (_class = class {
|
|
|
1254
1254
|
for (const track of new Set(found.map((f) => f.track))) track.clips = track.clips.filter((c) => !found.some((f) => f.clip === c));
|
|
1255
1255
|
if (!e.ripple) return this.outcomes.push({ op: e.op, clips: found.map((f) => f.clip.id) });
|
|
1256
1256
|
const rippled = /* @__PURE__ */ new Set();
|
|
1257
|
-
const groups = [...new Set(found.map((f) => f.track))].filter((t) => !
|
|
1258
|
-
if (found.some((f) =>
|
|
1257
|
+
const groups = [...new Set(found.map((f) => f.track))].filter((t) => !_chunkA653N65Qcjs.videoTrackSyncLocked.call(void 0, t)).map((t) => [t]);
|
|
1258
|
+
if (found.some((f) => _chunkA653N65Qcjs.videoTrackSyncLocked.call(void 0, f.track))) groups.push(found.filter((f) => _chunkA653N65Qcjs.videoTrackSyncLocked.call(void 0, f.track)).map((f) => f.track));
|
|
1259
1259
|
for (const sources of groups) {
|
|
1260
1260
|
const tracks = this.rippleTracks(sources);
|
|
1261
1261
|
tracks.forEach((t) => rippled.add(t));
|
|
1262
|
-
const spans = mergeSpans(found.filter((f) => sources.includes(f.track)).map((f) => [f.clip.start,
|
|
1262
|
+
const spans = mergeSpans(found.filter((f) => sources.includes(f.track)).map((f) => [f.clip.start, _chunkA653N65Qcjs.videoClipEnd.call(void 0, f.clip)]));
|
|
1263
1263
|
for (const [from, to] of spans.reverse()) this.close(tracks, from, to);
|
|
1264
1264
|
}
|
|
1265
1265
|
return this.outcomes.push({ op: e.op, clips: found.map((f) => f.clip.id), rippled: this.p.tracks.filter((t) => rippled.has(t)).map((t) => t.id) });
|
|
@@ -1275,7 +1275,7 @@ var Editor = (_class = class {
|
|
|
1275
1275
|
if ("timeRemap" in set) refuse("Set a speed ramp with set_time_remap, which checks it against the media and moves later clips if asked.");
|
|
1276
1276
|
let stretch = 1;
|
|
1277
1277
|
if (at.clip.type === "media" && !("duration" in set)) {
|
|
1278
|
-
const was =
|
|
1278
|
+
const was = _chunkA653N65Qcjs.videoClipSpeed.call(void 0, at.clip);
|
|
1279
1279
|
const now = "speed" in set ? set.speed : _optionalChain([e, 'access', _18 => _18.remove, 'optionalAccess', _19 => _19.includes, 'call', _20 => _20("speed")]) ? 1 : was;
|
|
1280
1280
|
if (now !== was) {
|
|
1281
1281
|
set.duration = at.clip.duration * was / now;
|
|
@@ -1283,7 +1283,7 @@ var Editor = (_class = class {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
1285
|
const next = { ...structuredClone(at.clip), ...set };
|
|
1286
|
-
if (stretch !== 1) retimeClipKeys(next, (v) =>
|
|
1286
|
+
if (stretch !== 1) retimeClipKeys(next, (v) => _chunkA653N65Qcjs.retimeVideoAnimatable.call(void 0, v, 0, stretch));
|
|
1287
1287
|
for (const k of _nullishCoalesce(e.remove, () => ( []))) delete next[k];
|
|
1288
1288
|
const clip = parseVideoClip(next, "set");
|
|
1289
1289
|
this.adjustmentTarget(clip);
|
|
@@ -1297,17 +1297,17 @@ var Editor = (_class = class {
|
|
|
1297
1297
|
const { track, clip } = this.clip(e.clip);
|
|
1298
1298
|
this.unlocked(track);
|
|
1299
1299
|
if (clip.type === "sequence") refuse(`Clip "${clip.id}" is a compound clip, which plays its sequence at normal speed; ramp the clips inside the sequence instead.`);
|
|
1300
|
-
if (clip.type !== "media") refuse(`Clip "${clip.id}" is a ${
|
|
1300
|
+
if (clip.type !== "media") refuse(`Clip "${clip.id}" is a ${_chunkA653N65Qcjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to ramp; only video and audio clips change speed.`);
|
|
1301
1301
|
const asset = this.asset(clip.asset);
|
|
1302
1302
|
if (asset.kind === "image") refuse(`Clip "${clip.id}" is a still ("${asset.id}"), so it has no motion to ramp.`);
|
|
1303
1303
|
const media = clip;
|
|
1304
|
-
const end =
|
|
1304
|
+
const end = _chunkA653N65Qcjs.videoClipEnd.call(void 0, media);
|
|
1305
1305
|
const duration = _nullishCoalesce(e.duration, () => ( media.duration));
|
|
1306
|
-
if (!(duration >= 1e3 / this.p.fps -
|
|
1306
|
+
if (!(duration >= 1e3 / this.p.fps - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON)) refuse(`"duration" must be at least a frame (${Math.ceil(1e3 / this.p.fps)} ms).`);
|
|
1307
1307
|
if (e.keys === null) {
|
|
1308
1308
|
if (!media.timeRemap) refuse(`Clip "${clip.id}" has no speed ramp to remove.`);
|
|
1309
1309
|
const from = (_nullishCoalesce(media.in, () => ( 0))) + media.timeRemap.keys[0].v;
|
|
1310
|
-
if (asset.duration !== void 0 && from + duration > asset.duration +
|
|
1310
|
+
if (asset.duration !== void 0 && from + duration > asset.duration + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON)
|
|
1311
1311
|
refuse(`At normal speed from ${Math.round(from)} ms, "${clip.id}" would run past the end of "${asset.id}" (${asset.duration} ms); give a duration of at most ${Math.floor(asset.duration - from)} ms.`);
|
|
1312
1312
|
delete media.timeRemap;
|
|
1313
1313
|
media.in = from;
|
|
@@ -1315,17 +1315,17 @@ var Editor = (_class = class {
|
|
|
1315
1315
|
} else {
|
|
1316
1316
|
if (!Array.isArray(e.keys) || !e.keys.length) refuse('"keys" must be a list of at least one { t, v, ease } (or null to remove the ramp).');
|
|
1317
1317
|
const remap = parseVideoTimeRemap({ keys: e.keys }, void 0, "keys");
|
|
1318
|
-
remap.keys =
|
|
1319
|
-
|
|
1320
|
-
const span =
|
|
1321
|
-
if (asset.duration !== void 0 && (_nullishCoalesce(media.in, () => ( 0))) + span.to > asset.duration +
|
|
1318
|
+
remap.keys = _chunkA653N65Qcjs.sortVideoKeys.call(void 0, remap.keys, { jumps: false });
|
|
1319
|
+
_chunkA653N65Qcjs.checkVideoTimeRemap.call(void 0, remap, "keys");
|
|
1320
|
+
const span = _chunkA653N65Qcjs.videoTimeRemapSpan.call(void 0, remap);
|
|
1321
|
+
if (asset.duration !== void 0 && (_nullishCoalesce(media.in, () => ( 0))) + span.to > asset.duration + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON)
|
|
1322
1322
|
refuse(`The ramp plays ${Math.round(span.to)} ms of source from the in point (${_nullishCoalesce(media.in, () => ( 0))} ms), past the end of "${asset.id}" (${asset.duration} ms); it can use at most ${Math.floor(asset.duration - (_nullishCoalesce(media.in, () => ( 0))))} ms.`);
|
|
1323
1323
|
media.timeRemap = remap;
|
|
1324
1324
|
delete media.speed;
|
|
1325
1325
|
}
|
|
1326
1326
|
const newEnd = media.start + duration;
|
|
1327
1327
|
const outcome = { op: e.op, clip: clip.id, track: track.id };
|
|
1328
|
-
if (Math.abs(newEnd - end) >
|
|
1328
|
+
if (Math.abs(newEnd - end) > _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) {
|
|
1329
1329
|
if (e.ripple) {
|
|
1330
1330
|
const tracks = this.rippleTracks([track]);
|
|
1331
1331
|
if (newEnd < end) {
|
|
@@ -1354,11 +1354,11 @@ var Editor = (_class = class {
|
|
|
1354
1354
|
case "slip_clip": {
|
|
1355
1355
|
const { track, clip } = this.clip(e.clip);
|
|
1356
1356
|
this.unlocked(track);
|
|
1357
|
-
if (clip.type !== "media" && clip.type !== "sequence") refuse(`Clip "${clip.id}" is a ${
|
|
1357
|
+
if (clip.type !== "media" && clip.type !== "sequence") refuse(`Clip "${clip.id}" is a ${_chunkA653N65Qcjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to slip; only video, audio and compound clips slip.`);
|
|
1358
1358
|
const source = clip.type === "sequence" ? `sequence "${clip.sequence}"` : `"${this.asset(clip.asset).id}"`;
|
|
1359
1359
|
if (clip.type === "media" && this.asset(clip.asset).kind === "image") refuse(`Clip "${clip.id}" is a still ("${clip.asset}"), so it has no source to slip; only video and audio clips slip.`);
|
|
1360
|
-
const handles =
|
|
1361
|
-
const { lead, tail } =
|
|
1360
|
+
const handles = _chunkA653N65Qcjs.videoClipHandles.call(void 0, clip, _chunkA653N65Qcjs.videoAssetMap.call(void 0, this.p), _chunkA653N65Qcjs.videoSequenceMap.call(void 0, this.p));
|
|
1361
|
+
const { lead, tail } = _chunkA653N65Qcjs.videoClipOverhang.call(void 0, track, clip);
|
|
1362
1362
|
const delta = this.clamp(
|
|
1363
1363
|
e.delta,
|
|
1364
1364
|
lead - handles.before,
|
|
@@ -1376,13 +1376,13 @@ var Editor = (_class = class {
|
|
|
1376
1376
|
this.unlocked(track);
|
|
1377
1377
|
const L = left.clip;
|
|
1378
1378
|
const R = right.clip;
|
|
1379
|
-
if (Math.abs(
|
|
1380
|
-
if (Math.abs(
|
|
1381
|
-
refuse(`"${L.id}" ends at ${
|
|
1379
|
+
if (Math.abs(_chunkA653N65Qcjs.videoClipEnd.call(void 0, L) - R.start) > _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) {
|
|
1380
|
+
if (Math.abs(_chunkA653N65Qcjs.videoClipEnd.call(void 0, R) - L.start) <= _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) refuse(`"${R.id}" comes before "${L.id}"; pass left "${R.id}" and right "${L.id}".`);
|
|
1381
|
+
refuse(`"${L.id}" ends at ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, _chunkA653N65Qcjs.videoClipEnd.call(void 0, L))} but "${R.id}" starts at ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, R.start)}; a roll needs two clips that meet at a cut (use trim_clip to move one edge).`);
|
|
1382
1382
|
}
|
|
1383
|
-
const assets =
|
|
1384
|
-
const lo = Math.max(-(L.duration - this.frame), -(
|
|
1385
|
-
const hi = Math.min(R.duration - this.frame,
|
|
1383
|
+
const assets = _chunkA653N65Qcjs.videoAssetMap.call(void 0, this.p);
|
|
1384
|
+
const lo = Math.max(-(L.duration - this.frame), -(_chunkA653N65Qcjs.videoClipHandles.call(void 0, R, assets, _chunkA653N65Qcjs.videoSequenceMap.call(void 0, this.p)).before - _chunkA653N65Qcjs.videoClipOverhang.call(void 0, track, R).lead));
|
|
1385
|
+
const hi = Math.min(R.duration - this.frame, _chunkA653N65Qcjs.videoClipHandles.call(void 0, L, assets, _chunkA653N65Qcjs.videoSequenceMap.call(void 0, this.p)).after - _chunkA653N65Qcjs.videoClipOverhang.call(void 0, track, L).tail);
|
|
1386
1386
|
const delta = this.clamp(
|
|
1387
1387
|
e.delta,
|
|
1388
1388
|
lo,
|
|
@@ -1398,18 +1398,18 @@ var Editor = (_class = class {
|
|
|
1398
1398
|
case "slide_clip": {
|
|
1399
1399
|
const { track, clip } = this.clip(e.clip);
|
|
1400
1400
|
this.unlocked(track);
|
|
1401
|
-
const before =
|
|
1402
|
-
const after =
|
|
1401
|
+
const before = _chunkA653N65Qcjs.videoClipBefore.call(void 0, track, clip);
|
|
1402
|
+
const after = _chunkA653N65Qcjs.videoClipAfter.call(void 0, track, clip);
|
|
1403
1403
|
if (!before && !after) refuse(`"${clip.id}" has no clip right before or after it on track "${track.id}", so there is nothing to slide against; use move_clip.`);
|
|
1404
|
-
const assets =
|
|
1405
|
-
const end =
|
|
1404
|
+
const assets = _chunkA653N65Qcjs.videoAssetMap.call(void 0, this.p);
|
|
1405
|
+
const end = _chunkA653N65Qcjs.videoClipEnd.call(void 0, clip);
|
|
1406
1406
|
const others = track.clips.filter((c) => c !== clip);
|
|
1407
1407
|
const room = {
|
|
1408
|
-
earlier: before ? before.duration - this.frame : clip.start - others.filter((c) =>
|
|
1409
|
-
later: after ? after.duration - this.frame : others.filter((c) => c.start >= end -
|
|
1408
|
+
earlier: before ? before.duration - this.frame : clip.start - others.filter((c) => _chunkA653N65Qcjs.videoClipEnd.call(void 0, c) <= clip.start + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.max(m, _chunkA653N65Qcjs.videoClipEnd.call(void 0, c)), 0),
|
|
1409
|
+
later: after ? after.duration - this.frame : others.filter((c) => c.start >= end - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.min(m, c.start - end), Infinity)
|
|
1410
1410
|
};
|
|
1411
|
-
const lo = -Math.min(room.earlier, after ?
|
|
1412
|
-
const hi = Math.min(room.later, before ?
|
|
1411
|
+
const lo = -Math.min(room.earlier, after ? _chunkA653N65Qcjs.videoClipHandles.call(void 0, after, assets, _chunkA653N65Qcjs.videoSequenceMap.call(void 0, this.p)).before - _chunkA653N65Qcjs.videoClipOverhang.call(void 0, track, after).lead : Infinity);
|
|
1412
|
+
const hi = Math.min(room.later, before ? _chunkA653N65Qcjs.videoClipHandles.call(void 0, before, assets, _chunkA653N65Qcjs.videoSequenceMap.call(void 0, this.p)).after - _chunkA653N65Qcjs.videoClipOverhang.call(void 0, track, before).tail : Infinity);
|
|
1413
1413
|
const delta = this.clamp(
|
|
1414
1414
|
e.delta,
|
|
1415
1415
|
lo,
|
|
@@ -1442,29 +1442,29 @@ var Editor = (_class = class {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
case "split_at": {
|
|
1444
1444
|
const tracks = this.rangeTracks(e.tracks);
|
|
1445
|
-
const lefts = tracks.flatMap((t) => t.clips.filter((c) => c.start < e.at -
|
|
1446
|
-
if (!lefts.length) refuse(`No clip runs across ${
|
|
1445
|
+
const lefts = tracks.flatMap((t) => t.clips.filter((c) => c.start < e.at - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON && _chunkA653N65Qcjs.videoClipEnd.call(void 0, c) > e.at + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON).map((c) => c.id));
|
|
1446
|
+
if (!lefts.length) refuse(`No clip runs across ${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, e.at)} on ${e.tracks ? `track${tracks.length > 1 ? "s" : ""} ${tracks.map((t) => `"${t.id}"`).join(", ")}` : "the unlocked tracks"}, so there is nothing to split there.`);
|
|
1447
1447
|
const created = this.cutAcross(tracks, e.at).map((c) => c.id);
|
|
1448
1448
|
return this.outcomes.push({ op: e.op, clips: lefts, created });
|
|
1449
1449
|
}
|
|
1450
1450
|
case "set_keyframes": {
|
|
1451
1451
|
const { track, clip } = this.clip(e.clip);
|
|
1452
1452
|
this.unlocked(track);
|
|
1453
|
-
if (!
|
|
1453
|
+
if (!_chunkA653N65Qcjs.VIDEO_KEYFRAME_PROPERTIES.includes(e.property)) refuse(`"${e.property}" cannot be keyframed; use one of ${_chunkA653N65Qcjs.VIDEO_KEYFRAME_PROPERTIES.join(", ")}.`);
|
|
1454
1454
|
if (e.property === "volume" && clip.type !== "media" && clip.type !== "sequence") refuse(`Clip "${clip.id}" is a ${clip.type} clip and has no volume; volume keys go on media and compound clips.`);
|
|
1455
|
-
const limits =
|
|
1456
|
-
const transform =
|
|
1455
|
+
const limits = _chunkA653N65Qcjs.VIDEO_KEYFRAME_LIMITS[e.property];
|
|
1456
|
+
const transform = _chunkA653N65Qcjs.VIDEO_TRANSFORM_PROPERTIES.includes(e.property);
|
|
1457
1457
|
const c = clip;
|
|
1458
1458
|
const current = transform ? _optionalChain([c, 'access', _23 => _23.transform, 'optionalAccess', _24 => _24[e.property]]) : c[e.property];
|
|
1459
1459
|
let value;
|
|
1460
1460
|
if (e.keys === null) {
|
|
1461
|
-
const v =
|
|
1462
|
-
value =
|
|
1461
|
+
const v = _chunkA653N65Qcjs.videoValueAt.call(void 0, current, 0, limits.default);
|
|
1462
|
+
value = _chunkA653N65Qcjs.isVideoKeyframes.call(void 0, current) ? v === limits.default ? void 0 : v : current;
|
|
1463
1463
|
} else {
|
|
1464
1464
|
if (!Array.isArray(e.keys) || !e.keys.length) refuse('"keys" must list at least one key { t, v }; pass null to remove the keyframes.');
|
|
1465
1465
|
let sorted = [];
|
|
1466
1466
|
try {
|
|
1467
|
-
sorted =
|
|
1467
|
+
sorted = _chunkA653N65Qcjs.sortVideoKeys.call(void 0, e.keys);
|
|
1468
1468
|
} catch (error) {
|
|
1469
1469
|
refuse(error.message);
|
|
1470
1470
|
}
|
|
@@ -1483,12 +1483,12 @@ var Editor = (_class = class {
|
|
|
1483
1483
|
this.unlocked(track);
|
|
1484
1484
|
let at = 0;
|
|
1485
1485
|
const moved = [];
|
|
1486
|
-
for (const clip of
|
|
1487
|
-
if (clip.start >= (_nullishCoalesce(e.from, () => ( 0))) -
|
|
1486
|
+
for (const clip of _chunkA653N65Qcjs.sortedVideoClips.call(void 0, track)) {
|
|
1487
|
+
if (clip.start >= (_nullishCoalesce(e.from, () => ( 0))) - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON && clip.start > at + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) {
|
|
1488
1488
|
clip.start = Math.max(at, _nullishCoalesce(e.from, () => ( 0)));
|
|
1489
1489
|
moved.push(clip.id);
|
|
1490
1490
|
}
|
|
1491
|
-
at = Math.max(at,
|
|
1491
|
+
at = Math.max(at, _chunkA653N65Qcjs.videoClipEnd.call(void 0, clip));
|
|
1492
1492
|
}
|
|
1493
1493
|
return this.outcomes.push({ op: e.op, track: track.id, clips: moved });
|
|
1494
1494
|
}
|
|
@@ -1618,7 +1618,7 @@ function videoTranscriptTrack(project, track) {
|
|
|
1618
1618
|
if (!project.tracks.some((t) => t.id === track)) throw new Error(`There is no track "${track}"; the tracks are ${project.tracks.map((t) => `"${t.id}"`).join(", ")}.`);
|
|
1619
1619
|
return track;
|
|
1620
1620
|
}
|
|
1621
|
-
const assets =
|
|
1621
|
+
const assets = _chunkA653N65Qcjs.videoAssetMap.call(void 0, project);
|
|
1622
1622
|
const transcribed = (t) => t.clips.some((c) => c.type === "media" && _optionalChain([assets, 'access', _26 => _26.get, 'call', _27 => _27(c.asset), 'optionalAccess', _28 => _28.transcript, 'optionalAccess', _29 => _29.length]));
|
|
1623
1623
|
return _nullishCoalesce(_optionalChain([(_nullishCoalesce(project.tracks.find((t) => t.kind === "audio" && transcribed(t)), () => ( project.tracks.find(transcribed)))), 'optionalAccess', _30 => _30.id]), () => ( null));
|
|
1624
1624
|
}
|
|
@@ -1626,16 +1626,16 @@ function videoTimelineTranscript(project, options = {}) {
|
|
|
1626
1626
|
const id = videoTranscriptTrack(project, options.track);
|
|
1627
1627
|
if (!id) return [];
|
|
1628
1628
|
const track = project.tracks.find((t) => t.id === id);
|
|
1629
|
-
const assets =
|
|
1629
|
+
const assets = _chunkA653N65Qcjs.videoAssetMap.call(void 0, project);
|
|
1630
1630
|
const out = [];
|
|
1631
|
-
for (const clip of
|
|
1631
|
+
for (const clip of _chunkA653N65Qcjs.sortedVideoClips.call(void 0, track)) {
|
|
1632
1632
|
if (clip.type !== "media") continue;
|
|
1633
1633
|
const words = _optionalChain([assets, 'access', _31 => _31.get, 'call', _32 => _32(clip.asset), 'optionalAccess', _33 => _33.transcript]);
|
|
1634
1634
|
if (!_optionalChain([words, 'optionalAccess', _34 => _34.length])) continue;
|
|
1635
|
-
const speed =
|
|
1635
|
+
const speed = _chunkA653N65Qcjs.videoClipSpeed.call(void 0, clip);
|
|
1636
1636
|
const from = _nullishCoalesce(clip.in, () => ( 0));
|
|
1637
1637
|
const to = from + clip.duration * speed;
|
|
1638
|
-
const toTimeline = (s) => Math.min(
|
|
1638
|
+
const toTimeline = (s) => Math.min(_chunkA653N65Qcjs.videoClipEnd.call(void 0, clip), Math.max(clip.start, clip.start + (s - from) / speed));
|
|
1639
1639
|
words.forEach((w, index) => {
|
|
1640
1640
|
const mid = (w.start + w.end) / 2;
|
|
1641
1641
|
if (mid < from || mid >= to) return;
|
|
@@ -1680,19 +1680,19 @@ function findVideoTranscriptPauses(words, options = {}) {
|
|
|
1680
1680
|
let to = b.start - keep;
|
|
1681
1681
|
if (options.fps) {
|
|
1682
1682
|
const f = 1e3 / options.fps;
|
|
1683
|
-
from =
|
|
1684
|
-
to =
|
|
1683
|
+
from = _chunkA653N65Qcjs.snapToVideoFrame.call(void 0, Math.ceil(from / f - 1e-9) * f, options.fps);
|
|
1684
|
+
to = _chunkA653N65Qcjs.snapToVideoFrame.call(void 0, Math.floor(to / f + 1e-9) * f, options.fps);
|
|
1685
1685
|
}
|
|
1686
|
-
if (to - from >
|
|
1686
|
+
if (to - from > _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) out.push({ from, to, text: `(pause after "${a.word}")` });
|
|
1687
1687
|
}
|
|
1688
1688
|
return out;
|
|
1689
1689
|
}
|
|
1690
1690
|
function mergeVideoRanges(ranges) {
|
|
1691
|
-
const sorted = ranges.filter((r) => r.to - r.from >
|
|
1691
|
+
const sorted = ranges.filter((r) => r.to - r.from > _chunkA653N65Qcjs.VIDEO_TIME_EPSILON).map((r) => ({ from: r.from, to: r.to })).sort((a, b) => a.from - b.from);
|
|
1692
1692
|
const out = [];
|
|
1693
1693
|
for (const r of sorted) {
|
|
1694
1694
|
const last = out[out.length - 1];
|
|
1695
|
-
if (last && r.from <= last.to +
|
|
1695
|
+
if (last && r.from <= last.to + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) last.to = Math.max(last.to, r.to);
|
|
1696
1696
|
else out.push(r);
|
|
1697
1697
|
}
|
|
1698
1698
|
return out;
|
|
@@ -1738,7 +1738,7 @@ function findVideoRepetitions(words, options = {}) {
|
|
|
1738
1738
|
var VIDEO_DISFLUENCY_KINDS = ["filler", "pause", "repetition"];
|
|
1739
1739
|
function detectVideoDisfluencies(words, options = {}) {
|
|
1740
1740
|
const kinds = new Set(_nullishCoalesce(options.kinds, () => ( VIDEO_DISFLUENCY_KINDS)));
|
|
1741
|
-
const startIndex = (time) => Math.max(0, words.findIndex((w) => w.start >= time -
|
|
1741
|
+
const startIndex = (time) => Math.max(0, words.findIndex((w) => w.start >= time - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON));
|
|
1742
1742
|
const out = [];
|
|
1743
1743
|
if (kinds.has("filler"))
|
|
1744
1744
|
for (const r of findVideoFillers(words, options.fillers)) {
|
|
@@ -1752,13 +1752,13 @@ function detectVideoDisfluencies(words, options = {}) {
|
|
|
1752
1752
|
}
|
|
1753
1753
|
if (kinds.has("pause"))
|
|
1754
1754
|
for (const r of findVideoTranscriptPauses(words, options.pauses)) {
|
|
1755
|
-
const after = words.findIndex((w) => w.start >= r.to -
|
|
1755
|
+
const after = words.findIndex((w) => w.start >= r.to - _chunkA653N65Qcjs.VIDEO_TIME_EPSILON);
|
|
1756
1756
|
out.push({ ...r, kind: "pause", words: [Math.max(0, after - 1), Math.max(0, after)] });
|
|
1757
1757
|
}
|
|
1758
1758
|
return out.sort((a, b) => a.from - b.from || a.to - b.to);
|
|
1759
1759
|
}
|
|
1760
1760
|
function videoCutsWithMargin(ranges, keep) {
|
|
1761
|
-
return ranges.map((r) => ({ ...r, from: r.from + keep, to: r.to - keep })).filter((r) => r.to - r.from >
|
|
1761
|
+
return ranges.map((r) => ({ ...r, from: r.from + keep, to: r.to - keep })).filter((r) => r.to - r.from > _chunkA653N65Qcjs.VIDEO_TIME_EPSILON);
|
|
1762
1762
|
}
|
|
1763
1763
|
|
|
1764
1764
|
// src/video-editor/mix.ts
|
|
@@ -1864,7 +1864,7 @@ function videoDuckingKeys(clip, speech, options = {}) {
|
|
|
1864
1864
|
const gap = Math.max(_nullishCoalesce(options.mergeGap, () => ( 600)), attack + release);
|
|
1865
1865
|
const base = _nullishCoalesce(options.base, () => ( 1));
|
|
1866
1866
|
const low = Math.round(base * 10 ** (duckDb / 20) * 1e4) / 1e4;
|
|
1867
|
-
const end =
|
|
1867
|
+
const end = _chunkA653N65Qcjs.videoClipEnd.call(void 0, clip);
|
|
1868
1868
|
const ranges = [];
|
|
1869
1869
|
for (const r of mergeVideoRanges(speech)) {
|
|
1870
1870
|
if (r.to <= clip.start - release || r.from >= end + attack) continue;
|
|
@@ -2069,7 +2069,7 @@ function videoClipWaveform(clip, peaks, columns) {
|
|
|
2069
2069
|
const step = clip.duration / Math.max(1, n);
|
|
2070
2070
|
for (let c = 0; c < n; c++) {
|
|
2071
2071
|
const { min, max } = videoAudioPeakRange(peaks, start + c * step * speed, start + (c + 1) * step * speed);
|
|
2072
|
-
const gain =
|
|
2072
|
+
const gain = _chunkA653N65Qcjs.videoClipSoundGain.call(void 0, clip, (c + 0.5) * step);
|
|
2073
2073
|
out[2 * c] = min * gain;
|
|
2074
2074
|
out[2 * c + 1] = max * gain;
|
|
2075
2075
|
}
|
|
@@ -2200,7 +2200,7 @@ var VideoAudioPeaksCache = (_class2 = class {
|
|
|
2200
2200
|
// src/video-editor/plan.ts
|
|
2201
2201
|
function clipIndex(project) {
|
|
2202
2202
|
const out = /* @__PURE__ */ new Map();
|
|
2203
|
-
for (const { track } of
|
|
2203
|
+
for (const { track } of _chunkA653N65Qcjs.allVideoTracks.call(void 0, project)) for (const c of track.clips) out.set(c.id, c);
|
|
2204
2204
|
return out;
|
|
2205
2205
|
}
|
|
2206
2206
|
function diffVideoProjects(before, after) {
|
|
@@ -2209,8 +2209,8 @@ function diffVideoProjects(before, after) {
|
|
|
2209
2209
|
const clipsAdded = [...b.keys()].filter((id) => !a.has(id));
|
|
2210
2210
|
const clipsRemoved = [...a.keys()].filter((id) => !b.has(id));
|
|
2211
2211
|
const clipsChanged = [...b.keys()].filter((id) => a.has(id) && JSON.stringify(a.get(id)) !== JSON.stringify(b.get(id)));
|
|
2212
|
-
const durationBefore =
|
|
2213
|
-
const durationAfter =
|
|
2212
|
+
const durationBefore = _chunkA653N65Qcjs.videoProjectDuration.call(void 0, before);
|
|
2213
|
+
const durationAfter = _chunkA653N65Qcjs.videoProjectDuration.call(void 0, after);
|
|
2214
2214
|
return { durationBefore, durationAfter, durationDelta: durationAfter - durationBefore, clipsAdded, clipsRemoved, clipsChanged };
|
|
2215
2215
|
}
|
|
2216
2216
|
function planVideoEdits(project, input) {
|
|
@@ -2637,10 +2637,10 @@ function videoTransformOfView(view, base, stage) {
|
|
|
2637
2637
|
function videoCameraBase(clip) {
|
|
2638
2638
|
if (clip.camera) return clip.camera.base;
|
|
2639
2639
|
const t = _nullishCoalesce(clip.transform, () => ( {}));
|
|
2640
|
-
const keyed =
|
|
2640
|
+
const keyed = _chunkA653N65Qcjs.VIDEO_TRANSFORM_PROPERTIES.filter((p) => _chunkA653N65Qcjs.isVideoKeyframes.call(void 0, t[p]));
|
|
2641
2641
|
if (keyed.length)
|
|
2642
2642
|
throw new Error(`Clip "${clip.id}" keys its ${keyed.join(", ")}, which a camera move would replace; remove those keyframes first (set_video_keyframes with keys null).`);
|
|
2643
|
-
return Object.fromEntries(
|
|
2643
|
+
return Object.fromEntries(_chunkA653N65Qcjs.VIDEO_TRANSFORM_PROPERTIES.flatMap((p) => typeof t[p] === "number" ? [[p, t[p]]] : []));
|
|
2644
2644
|
}
|
|
2645
2645
|
async function bakeVideoClipCamera(clip, camera, project, provider) {
|
|
2646
2646
|
const stage = { width: project.width, height: project.height };
|
|
@@ -2651,22 +2651,22 @@ async function bakeVideoClipCamera(clip, camera, project, provider) {
|
|
|
2651
2651
|
const windows = {};
|
|
2652
2652
|
let keys = [];
|
|
2653
2653
|
let inMs = 0;
|
|
2654
|
-
const moveIn =
|
|
2654
|
+
const moveIn = _chunk2K5TELHVcjs.cameraMoveParts.call(void 0, camera.in);
|
|
2655
2655
|
if (moveIn) {
|
|
2656
|
-
const { description } = await
|
|
2656
|
+
const { description } = await _chunk2K5TELHVcjs.resolveCameraMoveSpec.call(void 0, provider, moveIn, "transition");
|
|
2657
2657
|
inMs = _nullishCoalesce(moveIn.ms, () => ( description.camera.durationMs));
|
|
2658
2658
|
if (inMs > clip.duration) throw new Error(`The move into clip "${clip.id}" takes ${inMs} ms, longer than the clip (${clip.duration} ms); give a shorter "ms" or lengthen the clip.`);
|
|
2659
|
-
const sample = await
|
|
2659
|
+
const sample = await _chunk2K5TELHVcjs.sampleEffectCameraMove.call(void 0, provider, moveIn.move, { from: videoCameraView(camera.from, stage), to, ms: inMs, stage, fps, values: moveIn.values });
|
|
2660
2660
|
keys.push(...sample.keys);
|
|
2661
2661
|
if (sample.cut !== void 0) cuts.push(sample.cut);
|
|
2662
2662
|
windows.in = { start: 0, end: inMs };
|
|
2663
2663
|
}
|
|
2664
|
-
const moveDuring =
|
|
2664
|
+
const moveDuring = _chunk2K5TELHVcjs.cameraMoveParts.call(void 0, camera.during);
|
|
2665
2665
|
const holdMs = clip.duration - inMs;
|
|
2666
2666
|
if (moveDuring && holdMs > 0) {
|
|
2667
|
-
await
|
|
2667
|
+
await _chunk2K5TELHVcjs.resolveCameraMoveSpec.call(void 0, provider, moveDuring, "hold");
|
|
2668
2668
|
const at = keys.length ? keys[keys.length - 1].view : to;
|
|
2669
|
-
const sample = await
|
|
2669
|
+
const sample = await _chunk2K5TELHVcjs.sampleEffectCameraMove.call(void 0, provider, moveDuring.move, { from: at, to: at, ms: holdMs, stage, fps, values: moveDuring.values });
|
|
2670
2670
|
const shifted = sample.keys.map((k) => ({ t: k.t + inMs, view: k.view }));
|
|
2671
2671
|
if (keys.length && shifted.length && sameView(keys[keys.length - 1].view, shifted[0].view)) shifted.shift();
|
|
2672
2672
|
keys.push(...shifted);
|
|
@@ -2679,7 +2679,7 @@ async function bakeVideoClipCamera(clip, camera, project, provider) {
|
|
|
2679
2679
|
const base = videoCameraBase(clip);
|
|
2680
2680
|
const transforms = keys.map((k) => ({ t: Math.round(k.t * 1e3) / 1e3, value: videoTransformOfView(k.view, base, stage) }));
|
|
2681
2681
|
const transform = {};
|
|
2682
|
-
for (const p of
|
|
2682
|
+
for (const p of _chunkA653N65Qcjs.VIDEO_TRANSFORM_PROPERTIES) {
|
|
2683
2683
|
const out = [];
|
|
2684
2684
|
for (const { t, value } of transforms) {
|
|
2685
2685
|
const last = out[out.length - 1];
|
|
@@ -2693,7 +2693,7 @@ async function bakeVideoClipCamera(clip, camera, project, provider) {
|
|
|
2693
2693
|
}
|
|
2694
2694
|
var sameView = (a, b) => ["zoom", "scrollX", "scrollY", "tilt", "turn", "roll", "blur"].every((k) => Math.abs((_nullishCoalesce(a[k], () => ( 0))) - (_nullishCoalesce(b[k], () => ( 0)))) < 1e-9);
|
|
2695
2695
|
function videoClipCameraMove(clip, role) {
|
|
2696
|
-
return
|
|
2696
|
+
return _chunk2K5TELHVcjs.cameraMoveParts.call(void 0, _optionalChain([clip, 'optionalAccess', _45 => _45.camera, 'optionalAccess', _46 => _46[role === "transition" ? "in" : "during"]]));
|
|
2697
2697
|
}
|
|
2698
2698
|
|
|
2699
2699
|
// src/video-editor/transcript-controller.ts
|
|
@@ -2922,7 +2922,7 @@ function videoProxyFfmpeg(asset, options = {}) {
|
|
|
2922
2922
|
output
|
|
2923
2923
|
];
|
|
2924
2924
|
const proxy = { scale, src: output, ...asset.width && asset.height ? { width: Math.trunc(asset.width * scale / 2) * 2, height: Math.trunc(asset.height * scale / 2) * 2 } : {} };
|
|
2925
|
-
return { asset: asset.id, args, command: ["ffmpeg", ...args].map(
|
|
2925
|
+
return { asset: asset.id, args, command: ["ffmpeg", ...args].map(_chunkA653N65Qcjs.videoShellQuote).join(" "), proxy };
|
|
2926
2926
|
}
|
|
2927
2927
|
function videoProxyPlan(project, options = {}) {
|
|
2928
2928
|
const scale = _nullishCoalesce(options.scale, () => ( 0.5));
|
|
@@ -2948,7 +2948,7 @@ var videoSourceFrameTime = (frame, fps) => (frame + 0.5) * 1e3 / fps;
|
|
|
2948
2948
|
var videoFrameCacheKey = (src, frame) => `${frame}@${src}`;
|
|
2949
2949
|
function videoFrameRequestsAt(project, time, srcFor = (l) => l.src) {
|
|
2950
2950
|
const out = [];
|
|
2951
|
-
for (const layer of
|
|
2951
|
+
for (const layer of _chunkA653N65Qcjs.videoFrameLeafLayers.call(void 0, _chunkA653N65Qcjs.videoFrameAt.call(void 0, project, time).layers)) {
|
|
2952
2952
|
if (layer.type !== "media" || layer.assetKind !== "video") continue;
|
|
2953
2953
|
const src = srcFor(layer);
|
|
2954
2954
|
if (!src) continue;
|
|
@@ -3289,7 +3289,7 @@ var VideoPreviewEngine = (_class6 = class {
|
|
|
3289
3289
|
if (this.destroyed) return;
|
|
3290
3290
|
const state = this.source.getState();
|
|
3291
3291
|
const { project, time, playing } = state;
|
|
3292
|
-
const frame =
|
|
3292
|
+
const frame = _chunkA653N65Qcjs.videoFrameAt.call(void 0, project, time);
|
|
3293
3293
|
const scale = resolveVideoPreviewScale(_nullishCoalesce(this.options.previewScale, () => ( state.previewScale)), this.resolutionFor(project.width));
|
|
3294
3294
|
const assets = new Map(project.assets.map((a) => [a.id, a]));
|
|
3295
3295
|
this.srcFor = (layer) => videoPreviewSrc(assets.get(_nullishCoalesce(layer.asset, () => ( ""))), scale, layer.src);
|
|
@@ -3319,7 +3319,7 @@ var VideoPreviewEngine = (_class6 = class {
|
|
|
3319
3319
|
}
|
|
3320
3320
|
};
|
|
3321
3321
|
const sounding = new Map(frame.audio.map((a) => [a.clip, a]));
|
|
3322
|
-
for (const layer of
|
|
3322
|
+
for (const layer of _chunkA653N65Qcjs.videoFrameLeafLayers.call(void 0, frame.layers)) {
|
|
3323
3323
|
if (layer.type !== "media" || layer.assetKind !== "video" || !layer.src) continue;
|
|
3324
3324
|
const sound = sounding.get(layer.clip);
|
|
3325
3325
|
sync(layer.clip, this.srcFor(layer), "video", _nullishCoalesce(layer.sourceTime, () => ( 0)), _nullishCoalesce(_optionalChain([sound, 'optionalAccess', _93 => _93.speed]), () => ( 1)), sound ? sound.gain : null);
|
|
@@ -3331,9 +3331,9 @@ var VideoPreviewEngine = (_class6 = class {
|
|
|
3331
3331
|
}
|
|
3332
3332
|
/** With effects, the frame is drawn at the start of its frame, so effect pictures are cached once per frame. */
|
|
3333
3333
|
drawable(project, frame) {
|
|
3334
|
-
if (!_optionalChain([this, 'access', _94 => _94.effects, 'optionalAccess', _95 => _95.available]) || !
|
|
3335
|
-
const at =
|
|
3336
|
-
return at === frame.time ? frame : { ...
|
|
3334
|
+
if (!_optionalChain([this, 'access', _94 => _94.effects, 'optionalAccess', _95 => _95.available]) || !_chunkA653N65Qcjs.videoLayersUseEffects.call(void 0, frame.layers)) return frame;
|
|
3335
|
+
const at = _chunkA653N65Qcjs.videoEffectFrameTime.call(void 0, frame.time, project.fps);
|
|
3336
|
+
return at === frame.time ? frame : { ..._chunkA653N65Qcjs.videoFrameAt.call(void 0, project, at), time: frame.time };
|
|
3337
3337
|
}
|
|
3338
3338
|
redraw() {
|
|
3339
3339
|
if (this.scheduled || this.destroyed) return;
|
|
@@ -3342,7 +3342,7 @@ var VideoPreviewEngine = (_class6 = class {
|
|
|
3342
3342
|
this.scheduled = false;
|
|
3343
3343
|
if (this.destroyed) return;
|
|
3344
3344
|
const { project, time } = this.source.getState();
|
|
3345
|
-
this.draw(this.drawable(project,
|
|
3345
|
+
this.draw(this.drawable(project, _chunkA653N65Qcjs.videoFrameAt.call(void 0, project, time)));
|
|
3346
3346
|
});
|
|
3347
3347
|
}
|
|
3348
3348
|
__init40() {this.sourceFor = (layer) => {
|
|
@@ -3385,7 +3385,7 @@ var VideoPreviewEngine = (_class6 = class {
|
|
|
3385
3385
|
if (!source) this.complete = false;
|
|
3386
3386
|
return source;
|
|
3387
3387
|
};
|
|
3388
|
-
|
|
3388
|
+
_chunkA653N65Qcjs.drawVideoFrame.call(void 0, this.ctx, frame, sourceFor, resolution, {
|
|
3389
3389
|
defineSvgFilter: this.defineSvgFilter,
|
|
3390
3390
|
lutFor: this.lutFor,
|
|
3391
3391
|
scratch: this.scratch,
|
|
@@ -3489,17 +3489,17 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3489
3489
|
constructor(options = {}) {;_class7.prototype.__init44.call(this);_class7.prototype.__init45.call(this);_class7.prototype.__init46.call(this);_class7.prototype.__init47.call(this);_class7.prototype.__init48.call(this);_class7.prototype.__init49.call(this);_class7.prototype.__init50.call(this);_class7.prototype.__init51.call(this);_class7.prototype.__init52.call(this);_class7.prototype.__init53.call(this);_class7.prototype.__init54.call(this);_class7.prototype.__init55.call(this);
|
|
3490
3490
|
this.history = _nullishCoalesce(options.history, () => ( new (0, _chunkFJ2MSI43cjs.HistoryManager)()));
|
|
3491
3491
|
this.audioPeaks = options.audioPeaks instanceof VideoAudioPeaksCache ? options.audioPeaks : new VideoAudioPeaksCache(options.audioPeaks);
|
|
3492
|
-
this.luts = options.luts instanceof
|
|
3492
|
+
this.luts = options.luts instanceof _chunkA653N65Qcjs.VideoLutCache ? options.luts : new (0, _chunkA653N65Qcjs.VideoLutCache)(options.luts);
|
|
3493
3493
|
this.frameCache = _nullishCoalesce(options.frameCache, () => ( null));
|
|
3494
|
-
this.effects = new (0,
|
|
3494
|
+
this.effects = new (0, _chunk2K5TELHVcjs.EffectsSlot)();
|
|
3495
3495
|
if (options.effects) this.effects.set(options.effects);
|
|
3496
|
-
this.effectsEngine = new (0,
|
|
3496
|
+
this.effectsEngine = new (0, _chunkA653N65Qcjs.VideoEffectsEngine)({ slot: this.effects });
|
|
3497
3497
|
this.project = options.project ? parseVideoProject(options.project) : createVideoProject();
|
|
3498
3498
|
this.issues = checkVideoProject(this.project);
|
|
3499
3499
|
this.readOnly = _nullishCoalesce(options.readOnly, () => ( false));
|
|
3500
3500
|
this.previewScale = checkPreviewScale(_nullishCoalesce(options.previewScale, () => ( "auto")));
|
|
3501
3501
|
this.onChange = options.onChange;
|
|
3502
|
-
this.player = new (0, _chunkM5GLQQWGcjs.AnimationPlayer)({ clock: options.clock, duration: () =>
|
|
3502
|
+
this.player = new (0, _chunkM5GLQQWGcjs.AnimationPlayer)({ clock: options.clock, duration: () => _chunkA653N65Qcjs.videoProjectDuration.call(void 0, this.project), loop: "none" });
|
|
3503
3503
|
this.state = this.computeState();
|
|
3504
3504
|
this.connect();
|
|
3505
3505
|
}
|
|
@@ -3536,12 +3536,12 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3536
3536
|
const h = this.history.getState();
|
|
3537
3537
|
return {
|
|
3538
3538
|
project: this.project,
|
|
3539
|
-
duration:
|
|
3539
|
+
duration: _chunkA653N65Qcjs.videoProjectDuration.call(void 0, this.project),
|
|
3540
3540
|
time: p.time,
|
|
3541
3541
|
playing: p.playing,
|
|
3542
3542
|
loop: p.loop,
|
|
3543
3543
|
selection: this.selection,
|
|
3544
|
-
current:
|
|
3544
|
+
current: _chunkA653N65Qcjs.videoClipsAt.call(void 0, this.project, p.time).map((c) => c.clip.id),
|
|
3545
3545
|
issues: this.issues,
|
|
3546
3546
|
readOnly: this.readOnly,
|
|
3547
3547
|
error: this.error,
|
|
@@ -3574,7 +3574,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3574
3574
|
this.issues = checkVideoProject(project);
|
|
3575
3575
|
const ids = new Set(project.tracks.flatMap((t) => t.clips.map((c) => c.id)));
|
|
3576
3576
|
if (this.selection.some((id) => !ids.has(id))) this.selection = this.selection.filter((id) => ids.has(id));
|
|
3577
|
-
this.player.setDuration(() =>
|
|
3577
|
+
this.player.setDuration(() => _chunkA653N65Qcjs.videoProjectDuration.call(void 0, this.project));
|
|
3578
3578
|
} finally {
|
|
3579
3579
|
this.applying = false;
|
|
3580
3580
|
}
|
|
@@ -3736,7 +3736,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3736
3736
|
}
|
|
3737
3737
|
/** Selects clips (unknown ids are dropped). `add` toggles them into the current selection. */
|
|
3738
3738
|
select(clips, options = {}) {
|
|
3739
|
-
const known = _nullishCoalesce(_optionalChain([clips, 'optionalAccess', _111 => _111.filter, 'call', _112 => _112((id) =>
|
|
3739
|
+
const known = _nullishCoalesce(_optionalChain([clips, 'optionalAccess', _111 => _111.filter, 'call', _112 => _112((id) => _chunkA653N65Qcjs.findVideoClip.call(void 0, this.project, id))]), () => ( []));
|
|
3740
3740
|
let next;
|
|
3741
3741
|
if (options.add) {
|
|
3742
3742
|
next = [...this.selection];
|
|
@@ -3763,7 +3763,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3763
3763
|
step(frames) {
|
|
3764
3764
|
this.player.pause();
|
|
3765
3765
|
const fps = this.project.fps;
|
|
3766
|
-
this.player.seek(Math.max(0,
|
|
3766
|
+
this.player.seek(Math.max(0, _chunkA653N65Qcjs.snapToVideoFrame.call(void 0, this.player.currentTime, fps) + frames * 1e3 / fps));
|
|
3767
3767
|
}
|
|
3768
3768
|
setLoop(loop) {
|
|
3769
3769
|
this.player.setLoop(loop);
|
|
@@ -3780,14 +3780,14 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3780
3780
|
*/
|
|
3781
3781
|
snap(time, options = {}) {
|
|
3782
3782
|
const threshold = _nullishCoalesce(options.threshold, () => ( 8 * 1e3 / this.project.fps));
|
|
3783
|
-
const points =
|
|
3784
|
-
const hit =
|
|
3785
|
-
return hit.snapped !== null ? hit : { time: Math.max(0,
|
|
3783
|
+
const points = _chunkA653N65Qcjs.videoSnapPoints.call(void 0, this.project, { exclude: options.exclude, playhead: options.playhead === false ? void 0 : this.player.currentTime });
|
|
3784
|
+
const hit = _chunkA653N65Qcjs.snapVideoTime.call(void 0, time, points, threshold);
|
|
3785
|
+
return hit.snapped !== null ? hit : { time: Math.max(0, _chunkA653N65Qcjs.snapToVideoFrame.call(void 0, time, this.project.fps)), snapped: null };
|
|
3786
3786
|
}
|
|
3787
3787
|
/** Splits the selected clips (or every clip) under the playhead there, as one undo step. */
|
|
3788
3788
|
splitAtPlayhead() {
|
|
3789
|
-
const t =
|
|
3790
|
-
const under =
|
|
3789
|
+
const t = _chunkA653N65Qcjs.snapToVideoFrame.call(void 0, this.player.currentTime, this.project.fps);
|
|
3790
|
+
const under = _chunkA653N65Qcjs.videoClipsAt.call(void 0, this.project, t).filter(({ clip }) => t > clip.start && t < _chunkA653N65Qcjs.videoClipEnd.call(void 0, clip));
|
|
3791
3791
|
const chosen = this.selection.length ? under.filter(({ clip }) => this.selection.includes(clip.id)) : under;
|
|
3792
3792
|
if (!chosen.length) return this.refuse("No clip is under the playhead to split.");
|
|
3793
3793
|
return this.apply(chosen.map(({ clip }) => ({ op: "split_clip", clip: clip.id, at: t })), "Split");
|
|
@@ -3815,7 +3815,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3815
3815
|
/** The provider's description of an effect, checked for `place` (rejects without a provider or for an unknown id). */
|
|
3816
3816
|
async describeEffect(effect, place) {
|
|
3817
3817
|
const d = await this.effects.require().describe(effect);
|
|
3818
|
-
if (place)
|
|
3818
|
+
if (place) _chunkA653N65Qcjs.checkVideoEffectPlace.call(void 0, d, place);
|
|
3819
3819
|
return d;
|
|
3820
3820
|
}
|
|
3821
3821
|
refused(message) {
|
|
@@ -3828,7 +3828,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3828
3828
|
try {
|
|
3829
3829
|
plan = await run();
|
|
3830
3830
|
} catch (error) {
|
|
3831
|
-
if (
|
|
3831
|
+
if (_chunk2K5TELHVcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
|
|
3832
3832
|
throw error;
|
|
3833
3833
|
}
|
|
3834
3834
|
const result = this.apply(plan.edit, plan.label, { merge });
|
|
@@ -3836,7 +3836,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3836
3836
|
return { ...result, clip: plan.clip, ...plan.effect ? { effect: plan.effect() } : {} };
|
|
3837
3837
|
}
|
|
3838
3838
|
clipOrThrow(id) {
|
|
3839
|
-
const at =
|
|
3839
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, this.project, id);
|
|
3840
3840
|
if (!at) throw new Error(`There is no clip "${id}"; list_applied_effects or get_video_project lists the clips.`);
|
|
3841
3841
|
return at.clip;
|
|
3842
3842
|
}
|
|
@@ -3849,7 +3849,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3849
3849
|
return this.effectEdit(async () => {
|
|
3850
3850
|
const current = this.clipOrThrow(clip);
|
|
3851
3851
|
const d = await this.describeEffect(effect, "clip");
|
|
3852
|
-
const values =
|
|
3852
|
+
const values = _chunkA653N65Qcjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
|
|
3853
3853
|
const stack = [..._nullishCoalesce(current.effects, () => ( []))];
|
|
3854
3854
|
const taken = new Set(stack.map((e) => e.id));
|
|
3855
3855
|
let n = 1;
|
|
@@ -3885,7 +3885,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3885
3885
|
if (!(k in d.controls.properties)) throw new Error(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
|
|
3886
3886
|
base[k] = d.defaults[k];
|
|
3887
3887
|
}
|
|
3888
|
-
next.values =
|
|
3888
|
+
next.values = _chunkA653N65Qcjs.checkVideoEffectValues.call(void 0, d, given, { base, keyframes: true });
|
|
3889
3889
|
}
|
|
3890
3890
|
if (changes.enabled !== void 0) {
|
|
3891
3891
|
if (changes.enabled) delete next.enabled;
|
|
@@ -3906,7 +3906,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3906
3906
|
return (await provider.list({ kind: "camera" })).filter((e) => e.kind === "camera" && e.camera && (!role || e.camera.role === role));
|
|
3907
3907
|
}
|
|
3908
3908
|
cameraClip(id) {
|
|
3909
|
-
const at =
|
|
3909
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, this.project, id);
|
|
3910
3910
|
if (!at) {
|
|
3911
3911
|
const ids = this.project.tracks.flatMap((t) => t.clips.map((c) => c.id));
|
|
3912
3912
|
throw new Error(`There is no clip "${id}"; the clips are ${ids.map((c) => `"${c}"`).join(", ") || "none"} (get_video_project lists them).`);
|
|
@@ -3927,7 +3927,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3927
3927
|
const bake = await bakeVideoClipCamera(clip, camera, this.project, this.effects.require());
|
|
3928
3928
|
const r = this.apply({ op: "update_clip", clip: clipId, set: { camera, transform: bake.transform } }, label, { merge });
|
|
3929
3929
|
if (!r.ok) return r;
|
|
3930
|
-
const keys = Object.fromEntries(
|
|
3930
|
+
const keys = Object.fromEntries(_chunkA653N65Qcjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => [p, _chunkA653N65Qcjs.videoKeysOf.call(void 0, bake.transform[p]).length]));
|
|
3931
3931
|
return { ok: true, clip: clipId, camera, keys, cuts: bake.cuts, windows: bake.windows, notes: bake.notes };
|
|
3932
3932
|
}
|
|
3933
3933
|
/**
|
|
@@ -3942,10 +3942,10 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3942
3942
|
if (reason) return this.refused(reason);
|
|
3943
3943
|
try {
|
|
3944
3944
|
const current = this.cameraClip(clip);
|
|
3945
|
-
const { spec: parts, description } = await
|
|
3945
|
+
const { spec: parts, description } = await _chunk2K5TELHVcjs.resolveCameraMoveSpec.call(void 0, this.effects.require(), spec, role);
|
|
3946
3946
|
const move = role === "transition" && parts.ms === void 0 ? { ...parts, ms: description.camera.durationMs } : parts;
|
|
3947
3947
|
const simple = move.ms === void 0 && move.preset === void 0 && move.values === void 0;
|
|
3948
|
-
const camera = { ..._nullishCoalesce(current.camera, () => ( { base: videoCameraBase(current) })), [
|
|
3948
|
+
const camera = { ..._nullishCoalesce(current.camera, () => ( { base: videoCameraBase(current) })), [_chunk2K5TELHVcjs.cameraMoveField.call(void 0, role)]: simple ? move.move : move };
|
|
3949
3949
|
for (const key of ["from", "framing"]) {
|
|
3950
3950
|
if (options[key] === null) delete camera[key];
|
|
3951
3951
|
else if (options[key] !== void 0) camera[key] = options[key];
|
|
@@ -3953,7 +3953,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3953
3953
|
if (camera.from && !camera.in) throw new Error('"from" is where a move in starts; set a transition move too, or leave "from" out.');
|
|
3954
3954
|
return await this.cameraEdit(clip, camera, `${role === "hold" ? "Hold move" : "Camera move"} ${description.name}`, options.merge);
|
|
3955
3955
|
} catch (error) {
|
|
3956
|
-
if (
|
|
3956
|
+
if (_chunk2K5TELHVcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
|
|
3957
3957
|
throw error;
|
|
3958
3958
|
}
|
|
3959
3959
|
}
|
|
@@ -3966,7 +3966,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3966
3966
|
if (reason) return this.refused(reason);
|
|
3967
3967
|
try {
|
|
3968
3968
|
const current = this.cameraClip(clip);
|
|
3969
|
-
const field =
|
|
3969
|
+
const field = _chunk2K5TELHVcjs.cameraMoveField.call(void 0, role);
|
|
3970
3970
|
const other = field === "in" ? "during" : "in";
|
|
3971
3971
|
if (_optionalChain([current, 'access', _115 => _115.camera, 'optionalAccess', _116 => _116[field]]) === void 0)
|
|
3972
3972
|
throw new Error(`Clip "${clip}" has no camera "${field}" move to clear${_optionalChain([current, 'access', _117 => _117.camera, 'optionalAccess', _118 => _118[other]]) !== void 0 ? `; it has a "${other}" move (role ${role === "hold" ? "transition" : "hold"})` : ""}.`);
|
|
@@ -3976,7 +3976,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3976
3976
|
const left = camera.in !== void 0 || camera.during !== void 0;
|
|
3977
3977
|
return await this.cameraEdit(clip, left ? camera : null, role === "hold" ? "Clear hold move" : "Clear camera move");
|
|
3978
3978
|
} catch (error) {
|
|
3979
|
-
if (
|
|
3979
|
+
if (_chunk2K5TELHVcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
|
|
3980
3980
|
throw error;
|
|
3981
3981
|
}
|
|
3982
3982
|
}
|
|
@@ -3984,7 +3984,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
3984
3984
|
removeClipEffect(clip, instance) {
|
|
3985
3985
|
const reason = this.readOnlyReason();
|
|
3986
3986
|
if (reason) return this.refused(reason);
|
|
3987
|
-
const at =
|
|
3987
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, this.project, clip);
|
|
3988
3988
|
if (!at) return this.refused(`There is no clip "${clip}".`);
|
|
3989
3989
|
const stack = _nullishCoalesce(at.clip.effects, () => ( []));
|
|
3990
3990
|
const was = stack.find((e) => e.id === instance);
|
|
@@ -4001,7 +4001,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
4001
4001
|
return this.effectEdit(async () => {
|
|
4002
4002
|
this.clipOrThrow(clip);
|
|
4003
4003
|
const d = await this.describeEffect(effect, "transition");
|
|
4004
|
-
const values =
|
|
4004
|
+
const values = _chunkA653N65Qcjs.checkVideoEffectValues.call(void 0, d, options.values);
|
|
4005
4005
|
const duration = _nullishCoalesce(_nullishCoalesce(options.duration, () => ( d.duration)), () => ( 1e3));
|
|
4006
4006
|
return { edit: { op: "set_transition", clip, transition: { type: "effect", duration, effect: { effect: d.id, provider: this.effects.require().id, name: d.name, values } } }, label: `Transition ${d.name}`, clip };
|
|
4007
4007
|
});
|
|
@@ -4014,7 +4014,7 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
4014
4014
|
addEffectClip(track, effect, options = {}) {
|
|
4015
4015
|
return this.effectEdit(async () => {
|
|
4016
4016
|
const d = await this.describeEffect(effect, "generator");
|
|
4017
|
-
const values =
|
|
4017
|
+
const values = _chunkA653N65Qcjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
|
|
4018
4018
|
const duration = _nullishCoalesce(_nullishCoalesce(options.duration, () => ( d.duration)), () => ( 5e3));
|
|
4019
4019
|
const label = `Add ${d.name}`;
|
|
4020
4020
|
const clipId = _nullishCoalesce(options.id, () => ( ""));
|
|
@@ -4036,42 +4036,42 @@ var VideoEditorController = (_class7 = class _VideoEditorController {
|
|
|
4036
4036
|
if (part === "generator") {
|
|
4037
4037
|
if (current.type !== "effect") throw new Error(`Clip "${clip}" is not an effect clip.`);
|
|
4038
4038
|
const d2 = await this.describeEffect(current.effect);
|
|
4039
|
-
return { edit: { op: "update_clip", clip, set: { values:
|
|
4039
|
+
return { edit: { op: "update_clip", clip, set: { values: _chunkA653N65Qcjs.checkVideoEffectValues.call(void 0, d2, values, { base: _nullishCoalesce(current.values, () => ( {})), keyframes: true }) } }, label: `Change ${_nullishCoalesce(current.name, () => ( d2.name))}`, clip };
|
|
4040
4040
|
}
|
|
4041
4041
|
const t = current.transition;
|
|
4042
4042
|
if (_optionalChain([t, 'optionalAccess', _122 => _122.type]) !== "effect" || !t.effect) throw new Error(`Clip "${clip}" has no effect transition.`);
|
|
4043
4043
|
const d = await this.describeEffect(t.effect.effect);
|
|
4044
|
-
const merged =
|
|
4044
|
+
const merged = _chunkA653N65Qcjs.checkVideoEffectValues.call(void 0, d, values, { base: _nullishCoalesce(t.effect.values, () => ( {})) });
|
|
4045
4045
|
return { edit: { op: "set_transition", clip, transition: { ...t, effect: { ...t.effect, values: merged } } }, label: `Change transition ${d.name}`, clip };
|
|
4046
4046
|
}, options.merge);
|
|
4047
4047
|
}
|
|
4048
4048
|
/** Keys for one numeric control of a clip effect (clip-relative ms), or `null` to stop animating it (keeping its value at the clip's start). */
|
|
4049
4049
|
setClipEffectKeyframes(clip, instance, control, keys) {
|
|
4050
|
-
const current = _optionalChain([
|
|
4050
|
+
const current = _optionalChain([_chunkA653N65Qcjs.findVideoClip.call(void 0, this.project, clip), 'optionalAccess', _123 => _123.clip]);
|
|
4051
4051
|
const was = _optionalChain([current, 'optionalAccess', _124 => _124.effects, 'optionalAccess', _125 => _125.find, 'call', _126 => _126((e) => e.id === instance)]);
|
|
4052
4052
|
const value = _optionalChain([was, 'optionalAccess', _127 => _127.values, 'optionalAccess', _128 => _128[control]]);
|
|
4053
|
-
const plain = keys === null ?
|
|
4053
|
+
const plain = keys === null ? _chunkA653N65Qcjs.isVideoKeyframes.call(void 0, value) ? _optionalChain([value, 'access', _129 => _129.keys, 'access', _130 => _130[0], 'optionalAccess', _131 => _131.v]) : value : { keys: [...keys].sort((a, b) => a.t - b.t) };
|
|
4054
4054
|
return this.updateClipEffect(clip, instance, { values: { [control]: _nullishCoalesce(plain, () => ( null)) } });
|
|
4055
4055
|
}
|
|
4056
4056
|
/** What plays at `time` (default: the playhead). */
|
|
4057
4057
|
frame(time = this.player.currentTime) {
|
|
4058
|
-
return
|
|
4058
|
+
return _chunkA653N65Qcjs.videoFrameAt.call(void 0, this.project, time);
|
|
4059
4059
|
}
|
|
4060
4060
|
/** The frame at `time` (default: the playhead) as SVG. */
|
|
4061
4061
|
toSvg(time = this.player.currentTime, options = {}) {
|
|
4062
|
-
return
|
|
4062
|
+
return _chunkA653N65Qcjs.videoProjectSvg.call(void 0, this.project, time, { lutFor: (src) => this.luts.peek(src), ...options });
|
|
4063
4063
|
}
|
|
4064
4064
|
/** The project as an ffmpeg command. */
|
|
4065
4065
|
toFfmpeg(options = {}) {
|
|
4066
|
-
return
|
|
4066
|
+
return _chunkA653N65Qcjs.toVideoFfmpeg.call(void 0, this.project, options);
|
|
4067
4067
|
}
|
|
4068
4068
|
/** The ffmpeg command that measures the mix's loudness (see `toVideoLoudnessMeasure`). */
|
|
4069
4069
|
toLoudnessMeasure(options = {}) {
|
|
4070
|
-
return
|
|
4070
|
+
return _chunkA653N65Qcjs.toVideoLoudnessMeasure.call(void 0, this.project, options);
|
|
4071
4071
|
}
|
|
4072
4072
|
/** One track as a CMX 3600 EDL. */
|
|
4073
4073
|
toEdl(options = {}) {
|
|
4074
|
-
return
|
|
4074
|
+
return _chunkA653N65Qcjs.toVideoEdl.call(void 0, this.project, options);
|
|
4075
4075
|
}
|
|
4076
4076
|
}, _class7.__initStatic(), _class7);
|
|
4077
4077
|
function checkPreviewScale(scale) {
|
|
@@ -4139,12 +4139,12 @@ function videoRulerTicks(duration, pxPerSecond, fps) {
|
|
|
4139
4139
|
const ticks = [];
|
|
4140
4140
|
for (let t = 0; t <= duration + 1e-6; t += step) {
|
|
4141
4141
|
const isMajor = Math.abs(t / major - Math.round(t / major)) < 1e-9;
|
|
4142
|
-
ticks.push({ time: t, x: t * pxPerMs, major: isMajor, ...isMajor ? { label:
|
|
4142
|
+
ticks.push({ time: t, x: t * pxPerMs, major: isMajor, ...isMajor ? { label: _chunkA653N65Qcjs.formatVideoTimecode.call(void 0, t, fps).replace(/^00:/, "") } : {} });
|
|
4143
4143
|
}
|
|
4144
4144
|
return ticks;
|
|
4145
4145
|
}
|
|
4146
4146
|
function videoClipShowsWaveform(clip, asset, mode = "audio") {
|
|
4147
|
-
if (clip.type !== "media" || mode === "none" || !
|
|
4147
|
+
if (clip.type !== "media" || mode === "none" || !_chunkA653N65Qcjs.videoAssetHasSound.call(void 0, asset)) return false;
|
|
4148
4148
|
return mode === "all" || asset.kind === "audio";
|
|
4149
4149
|
}
|
|
4150
4150
|
var VIDEO_CLIP_ANIMATION_LABELS = {
|
|
@@ -4205,11 +4205,11 @@ function videoClipLabel(clip, asset, sequence) {
|
|
|
4205
4205
|
if (clip.type === "effect") return `Effect: ${clip.effect}`;
|
|
4206
4206
|
if (clip.type === "adjustment") return `Adjustment${clip.scope === "all" ? " (all tracks)" : clip.scope === "track" ? ` (${clip.targetTrack})` : ""}`;
|
|
4207
4207
|
const base = _nullishCoalesce(_nullishCoalesce(_optionalChain([asset, 'optionalAccess', _134 => _134.name]), () => ( _optionalChain([asset, 'optionalAccess', _135 => _135.src, 'access', _136 => _136.replace, 'call', _137 => _137(/^.*[\\/]/, "")]))), () => ( clip.asset));
|
|
4208
|
-
const speed =
|
|
4208
|
+
const speed = _chunkA653N65Qcjs.videoClipSpeed.call(void 0, clip);
|
|
4209
4209
|
return speed !== 1 ? `${base} (${Math.round(speed * 100)}%)` : base;
|
|
4210
4210
|
}
|
|
4211
4211
|
function planVideoClipDrag(project, input) {
|
|
4212
|
-
const at =
|
|
4212
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, project, input.clip);
|
|
4213
4213
|
if (!at) return null;
|
|
4214
4214
|
const { clip, track } = at;
|
|
4215
4215
|
const snap = _nullishCoalesce(input.snap, () => ( ((t) => t)));
|
|
@@ -4226,17 +4226,17 @@ function planVideoClipDrag(project, input) {
|
|
|
4226
4226
|
}
|
|
4227
4227
|
const minimum = 1e3 / project.fps;
|
|
4228
4228
|
if (input.mode === "trim-start") {
|
|
4229
|
-
const to2 = Math.min(snap(Math.max(0, clip.start + input.delta)),
|
|
4229
|
+
const to2 = Math.min(snap(Math.max(0, clip.start + input.delta)), _chunkA653N65Qcjs.videoClipEnd.call(void 0, clip) - minimum);
|
|
4230
4230
|
const changed2 = Math.abs(to2 - clip.start) > 1e-6;
|
|
4231
|
-
const plan = input.ripple ? { start: clip.start, duration: clip.duration - (to2 - clip.start) } : { start: to2, duration:
|
|
4231
|
+
const plan = input.ripple ? { start: clip.start, duration: clip.duration - (to2 - clip.start) } : { start: to2, duration: _chunkA653N65Qcjs.videoClipEnd.call(void 0, clip) - to2 };
|
|
4232
4232
|
return { ...plan, track: track.id, edit: changed2 ? { op: "trim_clip", clip: clip.id, edge: "start", to: to2, ...input.ripple ? { ripple: true } : {} } : null };
|
|
4233
4233
|
}
|
|
4234
|
-
const to = Math.max(snap(
|
|
4235
|
-
const changed = Math.abs(to -
|
|
4234
|
+
const to = Math.max(snap(_chunkA653N65Qcjs.videoClipEnd.call(void 0, clip) + input.delta), clip.start + minimum);
|
|
4235
|
+
const changed = Math.abs(to - _chunkA653N65Qcjs.videoClipEnd.call(void 0, clip)) > 1e-6;
|
|
4236
4236
|
return { start: clip.start, duration: to - clip.start, track: track.id, edit: changed ? { op: "trim_clip", clip: clip.id, edge: "end", to, ...input.ripple ? { ripple: true } : {} } : null };
|
|
4237
4237
|
}
|
|
4238
4238
|
function videoDropTracks(project, clipId) {
|
|
4239
|
-
const at =
|
|
4239
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, project, clipId);
|
|
4240
4240
|
if (!at) return [];
|
|
4241
4241
|
return project.tracks.filter((t) => t.kind === at.track.kind && !t.locked).map((t) => t.id);
|
|
4242
4242
|
}
|
|
@@ -4245,7 +4245,7 @@ function videoDragLabel(edit) {
|
|
|
4245
4245
|
return edit.op === "trim_clip" && edit.ripple ? "Ripple trim" : "Trim clip";
|
|
4246
4246
|
}
|
|
4247
4247
|
function videoAssetDropEdit(project, assetId, options = {}) {
|
|
4248
|
-
const asset =
|
|
4248
|
+
const asset = _chunkA653N65Qcjs.videoAssetMap.call(void 0, project).get(assetId);
|
|
4249
4249
|
if (!asset) return null;
|
|
4250
4250
|
const kind = asset.kind === "audio" ? "audio" : "video";
|
|
4251
4251
|
const track = _nullishCoalesce(options.track, () => ( _optionalChain([project, 'access', _138 => _138.tracks, 'access', _139 => _139.find, 'call', _140 => _140((t) => t.kind === kind && !t.locked), 'optionalAccess', _141 => _141.id])));
|
|
@@ -4297,25 +4297,25 @@ var KEY_LABELS = {
|
|
|
4297
4297
|
scale: { label: "Scale", step: 0.05 },
|
|
4298
4298
|
rotation: { label: "Rotation", step: 1 }
|
|
4299
4299
|
};
|
|
4300
|
-
var animatableOf = (clip, property) =>
|
|
4300
|
+
var animatableOf = (clip, property) => _chunkA653N65Qcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([clip, 'access', _142 => _142.transform, 'optionalAccess', _143 => _143[property]]) : property === "volume" ? clip.type === "media" || clip.type === "sequence" ? clip.volume : void 0 : clip.opacity;
|
|
4301
4301
|
var playheadInClip = (clip, time) => Math.round(Math.min(clip.duration, Math.max(0, time - clip.start)));
|
|
4302
4302
|
function videoKeyframeRows(project, clipId, time) {
|
|
4303
|
-
const at =
|
|
4303
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, project, clipId);
|
|
4304
4304
|
if (!at) return [];
|
|
4305
4305
|
const { clip } = at;
|
|
4306
|
-
const asset = clip.type === "media" ?
|
|
4306
|
+
const asset = clip.type === "media" ? _chunkA653N65Qcjs.videoAssetMap.call(void 0, project).get(clip.asset) : void 0;
|
|
4307
4307
|
const visual = !(_optionalChain([asset, 'optionalAccess', _144 => _144.kind]) === "audio" || at.track.kind === "audio");
|
|
4308
|
-
const audible = clip.type === "media" &&
|
|
4309
|
-
const properties = [...visual ? ["opacity"] : [], ...audible ? ["volume"] : [], ...visual ?
|
|
4308
|
+
const audible = clip.type === "media" && _chunkA653N65Qcjs.videoAssetHasSound.call(void 0, asset) || clip.type === "sequence";
|
|
4309
|
+
const properties = [...visual ? ["opacity"] : [], ...audible ? ["volume"] : [], ...visual ? _chunkA653N65Qcjs.VIDEO_TRANSFORM_PROPERTIES : []];
|
|
4310
4310
|
const clipTime = playheadInClip(clip, time);
|
|
4311
4311
|
return properties.map((property) => {
|
|
4312
4312
|
const prop = animatableOf(clip, property);
|
|
4313
|
-
const keys =
|
|
4314
|
-
const limits =
|
|
4313
|
+
const keys = _chunkA653N65Qcjs.isVideoKeyframes.call(void 0, prop) ? prop.keys : [];
|
|
4314
|
+
const limits = _chunkA653N65Qcjs.VIDEO_KEYFRAME_LIMITS[property];
|
|
4315
4315
|
return {
|
|
4316
4316
|
property,
|
|
4317
4317
|
...KEY_LABELS[property],
|
|
4318
|
-
value: Math.round(
|
|
4318
|
+
value: Math.round(_chunkA653N65Qcjs.videoValueAt.call(void 0, prop, clipTime, limits.default) * 1e3) / 1e3,
|
|
4319
4319
|
keyed: keys.length > 0,
|
|
4320
4320
|
keys: keys.length,
|
|
4321
4321
|
onKey: keys.some((k) => Math.abs(k.t - clipTime) < 0.5),
|
|
@@ -4326,44 +4326,44 @@ function videoKeyframeRows(project, clipId, time) {
|
|
|
4326
4326
|
});
|
|
4327
4327
|
}
|
|
4328
4328
|
function plainValueEdit(clip, property, value) {
|
|
4329
|
-
if (!
|
|
4329
|
+
if (!_chunkA653N65Qcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property))
|
|
4330
4330
|
return value === void 0 ? { op: "update_clip", clip: clip.id, remove: [property] } : { op: "update_clip", clip: clip.id, set: { [property]: value } };
|
|
4331
4331
|
const transform = { ...clip.transform, [property]: value };
|
|
4332
4332
|
if (value === void 0) delete transform[property];
|
|
4333
4333
|
return Object.keys(transform).length ? { op: "update_clip", clip: clip.id, set: { transform } } : { op: "update_clip", clip: clip.id, remove: ["transform"] };
|
|
4334
4334
|
}
|
|
4335
4335
|
function videoKeyframeValueEdit(project, clipId, property, time, value) {
|
|
4336
|
-
const at =
|
|
4336
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, project, clipId);
|
|
4337
4337
|
if (!at) return null;
|
|
4338
4338
|
const prop = animatableOf(at.clip, property);
|
|
4339
|
-
if (!
|
|
4339
|
+
if (!_chunkA653N65Qcjs.isVideoKeyframes.call(void 0, prop)) return plainValueEdit(at.clip, property, value);
|
|
4340
4340
|
if (value === void 0) return null;
|
|
4341
|
-
return { op: "set_keyframes", clip: clipId, property, keys:
|
|
4341
|
+
return { op: "set_keyframes", clip: clipId, property, keys: _chunkA653N65Qcjs.setVideoKey.call(void 0, prop, { t: playheadInClip(at.clip, time), v: value }, _chunkA653N65Qcjs.VIDEO_KEYFRAME_LIMITS[property].default).keys };
|
|
4342
4342
|
}
|
|
4343
4343
|
function videoKeyframeToggleEdit(project, clipId, property, time) {
|
|
4344
|
-
const at =
|
|
4344
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, project, clipId);
|
|
4345
4345
|
if (!at) return null;
|
|
4346
4346
|
const prop = animatableOf(at.clip, property);
|
|
4347
4347
|
const t = playheadInClip(at.clip, time);
|
|
4348
|
-
const fallback =
|
|
4349
|
-
if (
|
|
4348
|
+
const fallback = _chunkA653N65Qcjs.VIDEO_KEYFRAME_LIMITS[property].default;
|
|
4349
|
+
if (_chunkA653N65Qcjs.isVideoKeyframes.call(void 0, prop)) {
|
|
4350
4350
|
const key = prop.keys.find((k) => Math.abs(k.t - t) < 0.5);
|
|
4351
4351
|
if (key) {
|
|
4352
|
-
const rest =
|
|
4353
|
-
return
|
|
4352
|
+
const rest = _chunkA653N65Qcjs.removeVideoKey.call(void 0, prop, key.t);
|
|
4353
|
+
return _chunkA653N65Qcjs.isVideoKeyframes.call(void 0, rest) ? { op: "set_keyframes", clip: clipId, property, keys: rest.keys } : plainValueEdit(at.clip, property, rest === fallback ? void 0 : rest);
|
|
4354
4354
|
}
|
|
4355
4355
|
}
|
|
4356
|
-
const v =
|
|
4357
|
-
return { op: "set_keyframes", clip: clipId, property, keys:
|
|
4356
|
+
const v = _chunkA653N65Qcjs.videoValueAt.call(void 0, prop, t, fallback);
|
|
4357
|
+
return { op: "set_keyframes", clip: clipId, property, keys: _chunkA653N65Qcjs.isVideoKeyframes.call(void 0, prop) ? _chunkA653N65Qcjs.setVideoKey.call(void 0, prop, { t, v }, fallback).keys : [{ t, v }] };
|
|
4358
4358
|
}
|
|
4359
4359
|
function videoLutEdits(project, clips, lut) {
|
|
4360
4360
|
const edits = [];
|
|
4361
4361
|
for (const id of clips) {
|
|
4362
|
-
const at =
|
|
4362
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, project, id);
|
|
4363
4363
|
if (!at) continue;
|
|
4364
4364
|
const { lut: current, ...rest } = _nullishCoalesce(at.clip.grade, () => ( {}));
|
|
4365
4365
|
if (!lut && !current) continue;
|
|
4366
|
-
const grade =
|
|
4366
|
+
const grade = _chunkA653N65Qcjs.normalizeVideoGrade.call(void 0, lut ? { ...rest, lut } : rest);
|
|
4367
4367
|
edits.push(grade ? { op: "update_clip", clip: id, set: { grade } } : { op: "update_clip", clip: id, remove: ["grade"] });
|
|
4368
4368
|
}
|
|
4369
4369
|
return edits;
|
|
@@ -4384,7 +4384,7 @@ function videoAddAdjustmentEdits(project, time, options = {}) {
|
|
|
4384
4384
|
const duration = _nullishCoalesce(options.duration, () => ( 3e3));
|
|
4385
4385
|
const start = Math.max(0, time);
|
|
4386
4386
|
const top = project.tracks[0];
|
|
4387
|
-
const free = top && top.kind === "video" && !top.locked && !top.clips.some((c) => c.start < start + duration &&
|
|
4387
|
+
const free = top && top.kind === "video" && !top.locked && !top.clips.some((c) => c.start < start + duration && _chunkA653N65Qcjs.videoClipEnd.call(void 0, c) > start);
|
|
4388
4388
|
const edits = [];
|
|
4389
4389
|
let track = _optionalChain([top, 'optionalAccess', _145 => _145.id]);
|
|
4390
4390
|
if (!free) {
|
|
@@ -4403,7 +4403,7 @@ function videoMaskEdit(clip, mask) {
|
|
|
4403
4403
|
function videoSkinProtectionEdits(project, clips, amount) {
|
|
4404
4404
|
const edits = [];
|
|
4405
4405
|
for (const id of clips) {
|
|
4406
|
-
const clip = _optionalChain([
|
|
4406
|
+
const clip = _optionalChain([_chunkA653N65Qcjs.findVideoClip.call(void 0, project, id), 'optionalAccess', _146 => _146.clip]);
|
|
4407
4407
|
const lut = _optionalChain([clip, 'optionalAccess', _147 => _147.grade, 'optionalAccess', _148 => _148.lut]);
|
|
4408
4408
|
if (!clip || !lut) continue;
|
|
4409
4409
|
const { preserveSkinTones: _p, ...rest } = lut;
|
|
@@ -4437,7 +4437,7 @@ var RIPPLE = {
|
|
|
4437
4437
|
};
|
|
4438
4438
|
var MODE = {
|
|
4439
4439
|
type: "string",
|
|
4440
|
-
enum: [...
|
|
4440
|
+
enum: [..._chunkA653N65Qcjs.VIDEO_PLACEMENT_MODES],
|
|
4441
4441
|
description: 'What to do with clips already where it lands: "refuse" (default) fails with the next free place; "overwrite" cuts, trims or removes what is underneath on that track; "insert" cuts everything across the start and pushes later material along by its length on this track and every sync-locked track.'
|
|
4442
4442
|
};
|
|
4443
4443
|
var DELTA = (what) => ({ type: "number", description: `${what}, in milliseconds of timeline time: positive is later, negative earlier. It is clamped to what the media and neighbours allow; the result says how far it went.` });
|
|
@@ -4454,11 +4454,11 @@ var TRANSFORM = object(
|
|
|
4454
4454
|
);
|
|
4455
4455
|
var TRANSITION = object(
|
|
4456
4456
|
{
|
|
4457
|
-
type: { type: "string", enum:
|
|
4457
|
+
type: { type: "string", enum: _chunkA653N65Qcjs.VIDEO_TRANSITION_TYPES.filter((t) => t !== "effect"), description: "crossfade (this clip fades up over the one before), dip (down into a colour and up out of it), wipe (an edge travels across revealing this clip), push (this clip slides in and pushes the one before out), slide (this clip slides in over the one before) or iris (a circle opens from the centre). For a transition effect from the effects provider use set_video_effect_transition." },
|
|
4458
4458
|
duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms, centred on the cut. Every type but dip needs half of it in media past the cut on both sides (handles); a dip needs none." },
|
|
4459
4459
|
color: COLOR("For dip: the colour passed through (default black)"),
|
|
4460
|
-
direction: { type: "string", enum: [...
|
|
4461
|
-
audioCurve: { type: "string", enum: [...
|
|
4460
|
+
direction: { type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_WIPE_DIRECTIONS], description: "For wipe, push and slide: the way the edge or picture travels (default right, coming in from the left)." },
|
|
4461
|
+
audioCurve: { type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fades through it: default equal-power for every type but dip (steady loudness while the two sounds overlap), linear for dip; or s-curve, exponential, logarithmic." }
|
|
4462
4462
|
},
|
|
4463
4463
|
["type", "duration"],
|
|
4464
4464
|
"A transition from the clip that ends where this one starts on the same track."
|
|
@@ -4468,7 +4468,7 @@ var LUT_STRENGTH = { type: "number", minimum: 0, maximum: 1, description: "How m
|
|
|
4468
4468
|
var SKIN = { type: "number", minimum: 0, maximum: 1, description: "How much of the LUT's change to hold back on skin tones, 0 (none, the default) to 1 (skin keeps its colour); 0.5-0.8 keeps faces natural under a heavy look. Applied in the preview and frame renders; ffmpeg's lut3d cannot, so the export notes it." };
|
|
4469
4469
|
var GRADE = object(
|
|
4470
4470
|
{
|
|
4471
|
-
...Object.fromEntries(
|
|
4471
|
+
...Object.fromEntries(_chunkA653N65Qcjs.VIDEO_GRADE_CONTROLS.map((c) => [c.key, { type: "number", minimum: c.min, maximum: c.max, description: c.description }])),
|
|
4472
4472
|
lut: object({ src: LUT_SRC, strength: LUT_STRENGTH, name: { type: "string", minLength: 1, description: "A label for the look." }, preserveSkinTones: SKIN }, ["src"], "A 3D LUT applied after the other settings (set_video_lut checks the file first).")
|
|
4473
4473
|
},
|
|
4474
4474
|
[],
|
|
@@ -4476,7 +4476,7 @@ var GRADE = object(
|
|
|
4476
4476
|
);
|
|
4477
4477
|
var ANIMATION = (when) => object(
|
|
4478
4478
|
{
|
|
4479
|
-
effect: { type: "string", enum: [...
|
|
4479
|
+
effect: { type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_CLIP_ANIMATION_EFFECTS], description: "fade; rise (up into place) or drop (down into place); slide-left / slide-right (moving that way); zoom (grows into place); pop (grows past its size and settles). Each also fades; an exit plays the movement backwards." },
|
|
4480
4480
|
duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms (default 500)." }
|
|
4481
4481
|
},
|
|
4482
4482
|
["effect"],
|
|
@@ -4486,11 +4486,11 @@ var CLIP_COMMON = {
|
|
|
4486
4486
|
name: { type: "string", description: "A label for the clip." },
|
|
4487
4487
|
opacity: { type: "number", minimum: 0, maximum: 1, description: "Opacity 0\u20131 (default 1). A number replaces any keyframes; set_video_keyframes animates it." },
|
|
4488
4488
|
transform: TRANSFORM,
|
|
4489
|
-
fit: { type: "string", enum: [...
|
|
4489
|
+
fit: { type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_FITS], description: "How the picture fits the frame before the transform, as CSS object-fit (default contain for media, fill for colours)." },
|
|
4490
4490
|
grade: GRADE,
|
|
4491
4491
|
animateIn: ANIMATION("How the picture enters, from the clip's start (on top of any fade in). Titles usually rise, pop or fade in."),
|
|
4492
4492
|
animateOut: ANIMATION("How the picture leaves, ending at the clip's end."),
|
|
4493
|
-
blend: { type: "string", enum: [...
|
|
4493
|
+
blend: { type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_BLEND_MODES], description: "How the picture mixes with what is beneath it, as CSS mix-blend-mode (default normal): multiply darkens (shadows, textures), screen and add lighten (light leaks, flares, glows), overlay and soft-light add contrast, difference and exclusion invert." },
|
|
4494
4494
|
fadeIn: MS("Fade up from nothing (picture and sound) over this long"),
|
|
4495
4495
|
fadeOut: MS("Fade down to nothing over this long")
|
|
4496
4496
|
};
|
|
@@ -4499,8 +4499,8 @@ var MEDIA_FIELDS = {
|
|
|
4499
4499
|
speed: { type: "number", minimum: 0.05, maximum: 20, description: "Playback speed (default 1). Changing it keeps the stretch of source, so the clip gets shorter or longer." },
|
|
4500
4500
|
volume: { type: "number", minimum: 0, maximum: 4, description: "Gain (1 = unchanged, default 1). A number replaces any keyframes; set_video_keyframes animates it." },
|
|
4501
4501
|
muted: { type: "boolean", description: "Silence this clip (default false)." },
|
|
4502
|
-
fadeInCurve: { type: "string", enum: [...
|
|
4503
|
-
fadeOutCurve: { type: "string", enum: [...
|
|
4502
|
+
fadeInCurve: { type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fade in (default linear; the picture always fades linearly): linear, equal-power (steady loudness, best for crossfades), s-curve (gentle at both ends), exponential (slow start, natural from silence) or logarithmic (fast start)." },
|
|
4503
|
+
fadeOutCurve: { type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fade out (default linear), the same choices as fadeInCurve; exponential sounds natural fading to silence." }
|
|
4504
4504
|
};
|
|
4505
4505
|
var TEXT_FIELDS = {
|
|
4506
4506
|
text: { type: "string", minLength: 1, description: `The title's text ("\\n" breaks lines).` },
|
|
@@ -4549,7 +4549,7 @@ var ASSET_FIELDS = {
|
|
|
4549
4549
|
};
|
|
4550
4550
|
var KEY_PROPERTY = {
|
|
4551
4551
|
type: "string",
|
|
4552
|
-
enum: [...
|
|
4552
|
+
enum: [..._chunkA653N65Qcjs.VIDEO_KEYFRAME_PROPERTIES],
|
|
4553
4553
|
description: "Which property: opacity (0\u20131), volume (media only, 0\u20134 gain), x / y (pixels from the frame's centre, right / down), scale (1 = fitted size) or rotation (degrees clockwise)."
|
|
4554
4554
|
};
|
|
4555
4555
|
var KEYS = {
|
|
@@ -4564,7 +4564,7 @@ var KEYS = {
|
|
|
4564
4564
|
ease: {
|
|
4565
4565
|
description: "How the value moves from this key to the next (default linear): linear, hold (stays, then jumps at the next key), ease-in, ease-out, ease-in-out, or CSS cubic-bezier points [x1, y1, x2, y2] with x1 and x2 in 0\u20131.",
|
|
4566
4566
|
anyOf: [
|
|
4567
|
-
{ type: "string", enum: [...
|
|
4567
|
+
{ type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_EASE_NAMES] },
|
|
4568
4568
|
{ type: "array", items: { type: "number" }, minItems: 4, maxItems: 4 }
|
|
4569
4569
|
]
|
|
4570
4570
|
}
|
|
@@ -4593,19 +4593,19 @@ var describeVideoTracks = (tracks) => tracks.map((t, index) => ({
|
|
|
4593
4593
|
...t.locked ? { locked: true } : {},
|
|
4594
4594
|
...t.syncLocked === false ? { syncLocked: false } : {},
|
|
4595
4595
|
...t.volume !== void 0 ? { volume: t.volume } : {},
|
|
4596
|
-
clips:
|
|
4596
|
+
clips: _chunkA653N65Qcjs.sortedVideoClips.call(void 0, t).map((c) => ({ ...c, end: _chunkA653N65Qcjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkA653N65Qcjs.videoClipSourceRange.call(void 0, c) } : {} }))
|
|
4597
4597
|
}));
|
|
4598
|
-
var videoSequenceUsers = (project, id) =>
|
|
4599
|
-
({ sequence, track }) => track.clips.flatMap((c) => c.type === "sequence" && c.sequence === id ? [{ clip: c.id, ...sequence ? { inSequence: sequence } : {}, track: track.id, start: c.start, end:
|
|
4598
|
+
var videoSequenceUsers = (project, id) => _chunkA653N65Qcjs.allVideoTracks.call(void 0, project).flatMap(
|
|
4599
|
+
({ sequence, track }) => track.clips.flatMap((c) => c.type === "sequence" && c.sequence === id ? [{ clip: c.id, ...sequence ? { inSequence: sequence } : {}, track: track.id, start: c.start, end: _chunkA653N65Qcjs.videoClipEnd.call(void 0, c), source: _chunkA653N65Qcjs.videoClipSourceRange.call(void 0, c) }] : [])
|
|
4600
4600
|
);
|
|
4601
4601
|
function describeVideoSequence(project, sequence, tracks = true) {
|
|
4602
|
-
const cycle =
|
|
4602
|
+
const cycle = _chunkA653N65Qcjs.findVideoSequenceCycle.call(void 0, project, sequence.id);
|
|
4603
4603
|
return {
|
|
4604
4604
|
id: sequence.id,
|
|
4605
4605
|
...sequence.name ? { name: sequence.name } : {},
|
|
4606
|
-
duration:
|
|
4606
|
+
duration: _chunkA653N65Qcjs.videoSequenceDuration.call(void 0, sequence),
|
|
4607
4607
|
clipCount: sequence.tracks.reduce((n, t) => n + t.clips.length, 0),
|
|
4608
|
-
nests:
|
|
4608
|
+
nests: _chunkA653N65Qcjs.videoSequenceChildren.call(void 0, sequence),
|
|
4609
4609
|
usedBy: videoSequenceUsers(project, sequence.id),
|
|
4610
4610
|
...cycle ? { cycle } : {},
|
|
4611
4611
|
...tracks ? { tracks: describeVideoTracks(sequence.tracks) } : { trackCount: sequence.tracks.length }
|
|
@@ -4617,7 +4617,7 @@ function describeVideoProject(project) {
|
|
|
4617
4617
|
width: project.width,
|
|
4618
4618
|
height: project.height,
|
|
4619
4619
|
fps: project.fps,
|
|
4620
|
-
duration:
|
|
4620
|
+
duration: _chunkA653N65Qcjs.videoProjectDuration.call(void 0, project),
|
|
4621
4621
|
...project.background ? { background: project.background } : {},
|
|
4622
4622
|
assets: project.assets.map(videoAssetOut),
|
|
4623
4623
|
tracks: describeVideoTracks(project.tracks),
|
|
@@ -4634,7 +4634,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4634
4634
|
const project = () => controller.getProject();
|
|
4635
4635
|
const outcome = (result, extra = {}) => {
|
|
4636
4636
|
if (!result.ok) throw new Error(result.error);
|
|
4637
|
-
return { ...extra, duration:
|
|
4637
|
+
return { ...extra, duration: _chunkA653N65Qcjs.videoProjectDuration.call(void 0, result.project), issues: issueSummary(result.issues) };
|
|
4638
4638
|
};
|
|
4639
4639
|
const apply = (edits, label, extra) => {
|
|
4640
4640
|
const result = controller.apply(edits, label);
|
|
@@ -4643,7 +4643,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4643
4643
|
const clipOut = (p, id) => {
|
|
4644
4644
|
for (const t of p.tracks) {
|
|
4645
4645
|
const c = t.clips.find((x) => x.id === id);
|
|
4646
|
-
if (c) return { track: t.id, ...c, end:
|
|
4646
|
+
if (c) return { track: t.id, ...c, end: _chunkA653N65Qcjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkA653N65Qcjs.videoClipSourceRange.call(void 0, c) } : {} };
|
|
4647
4647
|
}
|
|
4648
4648
|
return null;
|
|
4649
4649
|
};
|
|
@@ -4655,7 +4655,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4655
4655
|
});
|
|
4656
4656
|
const keysOut = (p, clip, property) => {
|
|
4657
4657
|
const c = clipOut(p, clip);
|
|
4658
|
-
const value =
|
|
4658
|
+
const value = _chunkA653N65Qcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([c, 'optionalAccess', _157 => _157.transform, 'optionalAccess', _158 => _158[property]]) : _optionalChain([c, 'optionalAccess', _159 => _159[property]]);
|
|
4659
4659
|
return typeof value === "object" ? { keys: value.keys } : { keys: [], value: _nullishCoalesce(value, () => ( null)) };
|
|
4660
4660
|
};
|
|
4661
4661
|
const getProject = {
|
|
@@ -4677,8 +4677,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4677
4677
|
inputSchema: object({ time: MS("Time from the start (default: the playhead)") }),
|
|
4678
4678
|
annotations: { title: "What plays at a moment", ...READ },
|
|
4679
4679
|
handler: ({ time }) => {
|
|
4680
|
-
const frame =
|
|
4681
|
-
return { ...frame, timecode:
|
|
4680
|
+
const frame = _chunkA653N65Qcjs.videoFrameAt.call(void 0, project(), _nullishCoalesce(time, () => ( controller.getState().time)));
|
|
4681
|
+
return { ...frame, timecode: _chunkA653N65Qcjs.formatVideoTimecode.call(void 0, frame.time, project().fps) };
|
|
4682
4682
|
}
|
|
4683
4683
|
};
|
|
4684
4684
|
const listSequences = {
|
|
@@ -4706,7 +4706,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4706
4706
|
annotations: { title: "Find gaps", ...READ },
|
|
4707
4707
|
handler: ({ track }) => {
|
|
4708
4708
|
if (track !== void 0 && !project().tracks.some((t) => t.id === track)) throw new Error(`There is no track "${track}"; the tracks are ${project().tracks.map((t) => `"${t.id}"`).join(", ")}.`);
|
|
4709
|
-
return { gaps:
|
|
4709
|
+
return { gaps: _chunkA653N65Qcjs.findVideoGaps.call(void 0, project(), track) };
|
|
4710
4710
|
}
|
|
4711
4711
|
};
|
|
4712
4712
|
const checkProject = {
|
|
@@ -4736,7 +4736,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4736
4736
|
const lutSrcs = [...new Set(p.tracks.flatMap((t) => t.clips.map((c) => _optionalChain([c, 'access', _160 => _160.grade, 'optionalAccess', _161 => _161.lut, 'optionalAccess', _162 => _162.src])).filter((x) => !!x)))];
|
|
4737
4737
|
const missing = (await Promise.all(lutSrcs.map((src) => controller.luts.load(src).then(() => null, (e) => e.message)))).filter((m) => !!m);
|
|
4738
4738
|
const svgOptions = { lutFor: (src) => controller.luts.peek(src), ...columns ? { columns } : {} };
|
|
4739
|
-
const svg = times ?
|
|
4739
|
+
const svg = times ? _chunkA653N65Qcjs.videoContactSheetSvg.call(void 0, p, times, svgOptions) : _chunkA653N65Qcjs.videoProjectSvg.call(void 0, p, _nullishCoalesce(time, () => ( controller.getState().time)), svgOptions);
|
|
4740
4740
|
const notes = [...missing.map((m) => `${m}; that LUT is left out of the picture.`), ...lutSrcs.length > missing.length ? ["LUTs are drawn approximately in SVG (curves and a colour matrix); the preview and export apply them exactly."] : []];
|
|
4741
4741
|
if (format === "png") {
|
|
4742
4742
|
if (!options.rasterize) throw new Error('This host cannot make PNG images; call render_video_frame with format "svg".');
|
|
@@ -4826,7 +4826,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4826
4826
|
if (play === true) controller.play();
|
|
4827
4827
|
if (play === false) controller.pause();
|
|
4828
4828
|
const state = controller.getState();
|
|
4829
|
-
return { time: state.time, timecode:
|
|
4829
|
+
return { time: state.time, timecode: _chunkA653N65Qcjs.formatVideoTimecode.call(void 0, state.time, p.fps), playing: state.playing, clips: state.current };
|
|
4830
4830
|
}
|
|
4831
4831
|
};
|
|
4832
4832
|
const setSettings = {
|
|
@@ -4952,7 +4952,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4952
4952
|
inputSchema: object(
|
|
4953
4953
|
{
|
|
4954
4954
|
clip: CLIP_ID,
|
|
4955
|
-
set: object({ ...CLIP_COMMON, ...MEDIA_FIELDS, asset: { ...ASSET_ID, description: "For media: play another asset (same in point)." }, ...TEXT_FIELDS, color: COLOR("Text colour, or a colour clip's fill"), scope: { type: "string", enum: [...
|
|
4955
|
+
set: object({ ...CLIP_COMMON, ...MEDIA_FIELDS, asset: { ...ASSET_ID, description: "For media: play another asset (same in point)." }, ...TEXT_FIELDS, color: COLOR("Text colour, or a colour clip's fill"), scope: { type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_ADJUSTMENT_SCOPES], description: "For adjustment clips: which pictures it changes, underneath (default), all or track." }, targetTrack: { ...TRACK_ID, description: 'For adjustment clips with scope "track": the track whose pictures it changes.' } }, [], "Fields to replace (only those that fit the clip's type)."),
|
|
4956
4956
|
remove: { type: "array", items: { type: "string", enum: ["name", "opacity", "transform", "fit", "blend", "grade", "animateIn", "animateOut", "fadeIn", "fadeOut", "fadeInCurve", "fadeOutCurve", "in", "speed", "volume", "muted", "fontSize", "fontFamily", "fontWeight", "background", "scope", "targetTrack"] }, description: 'Fields to reset to their defaults (an adjustment clip going from scope "track" to another scope must also remove targetTrack).' }
|
|
4957
4957
|
},
|
|
4958
4958
|
["clip"]
|
|
@@ -4971,7 +4971,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4971
4971
|
const gradeTargets = (ids) => {
|
|
4972
4972
|
const p = project();
|
|
4973
4973
|
for (const id of ids) {
|
|
4974
|
-
const at =
|
|
4974
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, p, id);
|
|
4975
4975
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
4976
4976
|
const { clip } = at;
|
|
4977
4977
|
if (at.track.kind !== "video" || clip.type === "media" && _optionalChain([p, 'access', _163 => _163.assets, 'access', _164 => _164.find, 'call', _165 => _165((a) => a.id === clip.asset), 'optionalAccess', _166 => _166.kind]) === "audio")
|
|
@@ -4985,7 +4985,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4985
4985
|
inputSchema: object(
|
|
4986
4986
|
{
|
|
4987
4987
|
clips: { type: "array", items: CLIP_ID, minItems: 1, description: "Clips on video tracks to grade." },
|
|
4988
|
-
preset: { type: "string", enum: [...
|
|
4988
|
+
preset: { type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_GRADE_PRESET_NAMES], description: "The look." },
|
|
4989
4989
|
amount: { type: "number", minimum: 0, maximum: 1, description: "Strength, 0 (none) to 1 (full, the default); 0.5 is a subtler version." }
|
|
4990
4990
|
},
|
|
4991
4991
|
["clips", "preset"]
|
|
@@ -4994,10 +4994,10 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4994
4994
|
handler: ({ clips, preset, amount }) => {
|
|
4995
4995
|
gradeTargets(clips);
|
|
4996
4996
|
const edits = clips.map((clip) => {
|
|
4997
|
-
const grade =
|
|
4997
|
+
const grade = _chunkA653N65Qcjs.videoGradeLook.call(void 0, _chunkA653N65Qcjs.findVideoClip.call(void 0, project(), clip).clip.grade, preset, _nullishCoalesce(amount, () => ( 1)));
|
|
4998
4998
|
return grade ? { op: "update_clip", clip, set: { grade } } : { op: "update_clip", clip, remove: ["grade"] };
|
|
4999
4999
|
});
|
|
5000
|
-
return apply(edits, `Apply ${preset} look`, (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([
|
|
5000
|
+
return apply(edits, `Apply ${preset} look`, (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkA653N65Qcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _167 => _167.clip, 'access', _168 => _168.grade]), () => ( null)) })) }));
|
|
5001
5001
|
}
|
|
5002
5002
|
};
|
|
5003
5003
|
const copyGrade = {
|
|
@@ -5008,7 +5008,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5008
5008
|
annotations: { title: "Copy a colour grade", ...WRITE_IDEMPOTENT },
|
|
5009
5009
|
handler: ({ from, to }) => {
|
|
5010
5010
|
gradeTargets([from, ...to]);
|
|
5011
|
-
const grade =
|
|
5011
|
+
const grade = _chunkA653N65Qcjs.findVideoClip.call(void 0, project(), from).clip.grade;
|
|
5012
5012
|
const edits = to.map((clip) => grade ? { op: "update_clip", clip, set: { grade: { ...grade } } } : { op: "update_clip", clip, remove: ["grade"] });
|
|
5013
5013
|
return apply(edits, "Copy grade", () => ({ grade: _nullishCoalesce(grade, () => ( null)), clips: to }));
|
|
5014
5014
|
}
|
|
@@ -5034,7 +5034,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5034
5034
|
const lut = await controller.luts.load(src);
|
|
5035
5035
|
const label = _nullishCoalesce(name, () => ( lut.title));
|
|
5036
5036
|
const setting = { src, ...strength !== void 0 && strength !== 1 ? { strength } : {}, ...label ? { name: label } : {}, ...preserve_skin_tones ? { preserveSkinTones: preserve_skin_tones } : {} };
|
|
5037
|
-
return apply(videoLutEdits(project(), clips, setting), "Apply LUT", (r) => ({ lut: { src, ...lut.title ? { title: lut.title } : {}, size: lut.size }, clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([
|
|
5037
|
+
return apply(videoLutEdits(project(), clips, setting), "Apply LUT", (r) => ({ lut: { src, ...lut.title ? { title: lut.title } : {}, size: lut.size }, clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkA653N65Qcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _169 => _169.clip, 'access', _170 => _170.grade]), () => ( null)) })) }));
|
|
5038
5038
|
}
|
|
5039
5039
|
};
|
|
5040
5040
|
const removeLut = {
|
|
@@ -5046,9 +5046,9 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5046
5046
|
handler: ({ clips }) => {
|
|
5047
5047
|
gradeTargets(clips);
|
|
5048
5048
|
const p = project();
|
|
5049
|
-
const withLut = clips.filter((id) => _optionalChain([
|
|
5049
|
+
const withLut = clips.filter((id) => _optionalChain([_chunkA653N65Qcjs.findVideoClip.call(void 0, p, id), 'access', _171 => _171.clip, 'access', _172 => _172.grade, 'optionalAccess', _173 => _173.lut]));
|
|
5050
5050
|
if (!withLut.length) throw new Error(`None of ${clips.map((c) => `"${c}"`).join(", ")} has a LUT; get_video_project shows each clip's grade.`);
|
|
5051
|
-
return apply(videoLutEdits(p, withLut, null), "Remove LUT", (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([
|
|
5051
|
+
return apply(videoLutEdits(p, withLut, null), "Remove LUT", (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkA653N65Qcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _174 => _174.clip, 'access', _175 => _175.grade]), () => ( null)) })) }));
|
|
5052
5052
|
}
|
|
5053
5053
|
};
|
|
5054
5054
|
const PROXY_SCALE = { type: "number", exclusiveMinimum: 0, exclusiveMaximum: 1, description: "Proxy size as a fraction of the original: 0.5 (half width and height, the default) or 0.25 for very large footage." };
|
|
@@ -5157,7 +5157,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5157
5157
|
approximate: parsed.approximate,
|
|
5158
5158
|
first: list[0],
|
|
5159
5159
|
last: list[list.length - 1],
|
|
5160
|
-
...a.duration !== void 0 && list[list.length - 1].end > a.duration +
|
|
5160
|
+
...a.duration !== void 0 && list[list.length - 1].end > a.duration + _chunkA653N65Qcjs.VIDEO_TIME_EPSILON ? { warning: `The transcript runs to ${list[list.length - 1].end} ms, past the asset's ${a.duration} ms: is it for this asset?` } : {}
|
|
5161
5161
|
}));
|
|
5162
5162
|
}
|
|
5163
5163
|
};
|
|
@@ -5228,22 +5228,22 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5228
5228
|
const bad = ranges.findIndex((r) => !(r.to > r.from));
|
|
5229
5229
|
if (bad >= 0) throw new Error(`Range ${bad + 1} is empty or backwards (${ranges[bad].from}\u2013${ranges[bad].to} ms); "to" must be after "from".`);
|
|
5230
5230
|
const merged = mergeVideoRanges(ranges);
|
|
5231
|
-
const before =
|
|
5232
|
-
return apply(videoRemoveRangesEdits(merged, tracks), merged.length > 1 ? `Cut ${merged.length} stretches` : "Cut stretch", (r) => ({ removed: merged.length, time: round(before -
|
|
5231
|
+
const before = _chunkA653N65Qcjs.videoProjectDuration.call(void 0, project());
|
|
5232
|
+
return apply(videoRemoveRangesEdits(merged, tracks), merged.length > 1 ? `Cut ${merged.length} stretches` : "Cut stretch", (r) => ({ removed: merged.length, time: round(before - _chunkA653N65Qcjs.videoProjectDuration.call(void 0, r.project)), duration: _chunkA653N65Qcjs.videoProjectDuration.call(void 0, r.project) }));
|
|
5233
5233
|
}
|
|
5234
5234
|
};
|
|
5235
5235
|
const rampTarget = (id) => {
|
|
5236
|
-
const at =
|
|
5236
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, project(), id);
|
|
5237
5237
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
5238
5238
|
const { clip } = at;
|
|
5239
5239
|
if (clip.type === "sequence") throw new Error(`Clip "${id}" is a compound clip, which plays its sequence at normal speed; change the speed of the clips inside the sequence instead.`);
|
|
5240
|
-
if (clip.type !== "media") throw new Error(`Clip "${id}" is a ${
|
|
5240
|
+
if (clip.type !== "media") throw new Error(`Clip "${id}" is a ${_chunkA653N65Qcjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to change the speed of; use a video or audio clip.`);
|
|
5241
5241
|
if (_optionalChain([project, 'call', _180 => _180(), 'access', _181 => _181.assets, 'access', _182 => _182.find, 'call', _183 => _183((a) => a.id === clip.asset), 'optionalAccess', _184 => _184.kind]) === "image") throw new Error(`Clip "${id}" is a still, so it has no motion to change the speed of.`);
|
|
5242
5242
|
return clip;
|
|
5243
5243
|
};
|
|
5244
5244
|
const rampOut = (r, id) => {
|
|
5245
5245
|
const outcome2 = r.outcomes[r.outcomes.length - 1];
|
|
5246
|
-
return { clip: clipOut(r.project, id), ...outcome2.rippled ? { rippled: outcome2.rippled } : {}, duration:
|
|
5246
|
+
return { clip: clipOut(r.project, id), ...outcome2.rippled ? { rippled: outcome2.rippled } : {}, duration: _chunkA653N65Qcjs.videoProjectDuration.call(void 0, r.project) };
|
|
5247
5247
|
};
|
|
5248
5248
|
const RIPPLE_RAMP = { type: "boolean", description: "Move later material on every sync-locked track by the change in length (default true); false refuses if the clip would overlap the next one." };
|
|
5249
5249
|
const setSpeedRamp = {
|
|
@@ -5274,8 +5274,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5274
5274
|
),
|
|
5275
5275
|
annotations: { title: "Ramp the speed", ...WRITE_IDEMPOTENT },
|
|
5276
5276
|
handler: ({ clip, segments, ripple }) => {
|
|
5277
|
-
const edit =
|
|
5278
|
-
return apply(edit, "Speed ramp", (r) => ({ ...rampOut(r, clip), source: Math.round(
|
|
5277
|
+
const edit = _chunkA653N65Qcjs.videoSpeedRampEdit.call(void 0, rampTarget(clip), segments, _nullishCoalesce(ripple, () => ( true)));
|
|
5278
|
+
return apply(edit, "Speed ramp", (r) => ({ ...rampOut(r, clip), source: Math.round(_chunkA653N65Qcjs.videoSpeedRampKeys.call(void 0, segments).source) }));
|
|
5279
5279
|
}
|
|
5280
5280
|
};
|
|
5281
5281
|
const addFreeze = {
|
|
@@ -5295,8 +5295,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5295
5295
|
handler: ({ clip, at, duration, ripple }) => {
|
|
5296
5296
|
const c = rampTarget(clip);
|
|
5297
5297
|
const t = at - c.start;
|
|
5298
|
-
if (t < 0 || t > c.duration) throw new Error(`${
|
|
5299
|
-
return apply(
|
|
5298
|
+
if (t < 0 || t > c.duration) throw new Error(`${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, at)} is outside clip "${clip}" (${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, c.start)}\u2013${_chunkA653N65Qcjs.formatVideoSeconds.call(void 0, _chunkA653N65Qcjs.videoClipEnd.call(void 0, c))}); pick a time inside it.`);
|
|
5299
|
+
return apply(_chunkA653N65Qcjs.videoFreezeFrameEdit.call(void 0, c, t, duration, _nullishCoalesce(ripple, () => ( true))), "Freeze frame", (r) => rampOut(r, clip));
|
|
5300
5300
|
}
|
|
5301
5301
|
};
|
|
5302
5302
|
const removeRamp = {
|
|
@@ -5469,7 +5469,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5469
5469
|
let from;
|
|
5470
5470
|
let to;
|
|
5471
5471
|
if (args.clip !== void 0) {
|
|
5472
|
-
const found =
|
|
5472
|
+
const found = _chunkA653N65Qcjs.findVideoClip.call(void 0, p, args.clip);
|
|
5473
5473
|
if (!found) throw new Error(`There is no clip "${args.clip}"; get_video_project lists the clips.`);
|
|
5474
5474
|
const c = found.clip;
|
|
5475
5475
|
if (c.type === "sequence") throw new Error(`Clip "${c.id}" is a compound clip; its sound is the mix of its sequence "${c.sequence}", so read the levels of the media in it (list_video_sequences lists its clips and assets).`);
|
|
@@ -5479,7 +5479,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5479
5479
|
toSource = (t) => (_nullishCoalesce(c.in, () => ( 0))) + (t - c.start) * speed;
|
|
5480
5480
|
toOut = (s) => c.start + (s - (_nullishCoalesce(c.in, () => ( 0)))) / speed;
|
|
5481
5481
|
from = Math.max(c.start, _nullishCoalesce(args.from, () => ( c.start)));
|
|
5482
|
-
to = Math.min(
|
|
5482
|
+
to = Math.min(_chunkA653N65Qcjs.videoClipEnd.call(void 0, c), _nullishCoalesce(args.to, () => ( _chunkA653N65Qcjs.videoClipEnd.call(void 0, c))));
|
|
5483
5483
|
} else {
|
|
5484
5484
|
asset = p.assets.find((a) => a.id === args.asset);
|
|
5485
5485
|
if (!asset) throw new Error(`There is no asset "${args.asset}"; the assets are ${p.assets.map((a) => `"${a.id}"`).join(", ") || "none"}.`);
|
|
@@ -5560,15 +5560,15 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5560
5560
|
annotations: { title: "Measure a frame with scopes", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
5561
5561
|
handler: async ({ time, bins, columns }) => {
|
|
5562
5562
|
const p = project();
|
|
5563
|
-
const end =
|
|
5563
|
+
const end = _chunkA653N65Qcjs.videoProjectDuration.call(void 0, p);
|
|
5564
5564
|
const t = _nullishCoalesce(time, () => ( controller.getState().time));
|
|
5565
5565
|
if (time !== void 0 && time > end) throw new Error(`Time ${time} ms is past the end of the project (${end} ms).`);
|
|
5566
5566
|
const pixels = await pixelsAt(t);
|
|
5567
|
-
return { time: t, timecode:
|
|
5567
|
+
return { time: t, timecode: _chunkA653N65Qcjs.formatVideoTimecode.call(void 0, t, p.fps), width: pixels.width, height: pixels.height, ...summarizeVideoScopes(pixels, { bins, columns }) };
|
|
5568
5568
|
}
|
|
5569
5569
|
};
|
|
5570
5570
|
const MASK_FIELDS = {
|
|
5571
|
-
shape: { type: "string", enum: [...
|
|
5571
|
+
shape: { type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_MASK_SHAPES], description: "rectangle (with corner_radius), ellipse, linear (a straight split: the side above the line at rotation 0 shows) or polygon (points)." },
|
|
5572
5572
|
x: { type: "number", description: "Centre across the clip's picture, 0 (left edge) to 1 (right edge); default 0.5." },
|
|
5573
5573
|
y: { type: "number", description: "Centre down the clip's picture, 0 (top) to 1 (bottom); default 0.5." },
|
|
5574
5574
|
width: { type: "number", minimum: 0, description: "Width as a fraction of the picture's width (default 0.5). Unused by linear." },
|
|
@@ -5588,10 +5588,10 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5588
5588
|
track: { ...TRACK_ID, description: 'A video track to put it on; tracks below it are "underneath".' },
|
|
5589
5589
|
start: MS("Where it starts on the timeline (default: the end of the track)"),
|
|
5590
5590
|
duration: { type: "number", exclusiveMinimum: 0, description: "How long it lasts, in ms (default 3000)." },
|
|
5591
|
-
scope: { type: "string", enum: [...
|
|
5591
|
+
scope: { type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_ADJUSTMENT_SCOPES], description: "Which pictures it changes: underneath (default), all or track." },
|
|
5592
5592
|
target_track: { ...TRACK_ID, description: 'For scope "track" (required then): the track whose pictures it changes.' },
|
|
5593
5593
|
grade: GRADE,
|
|
5594
|
-
preset: { type: "string", enum: [...
|
|
5594
|
+
preset: { type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_GRADE_PRESET_NAMES], description: "A named look to start from (grade settings given override it)." },
|
|
5595
5595
|
amount: { type: "number", minimum: 0, maximum: 1, description: "Strength of the preset, 0\u20131 (default 1)." },
|
|
5596
5596
|
name: { type: "string", minLength: 1, description: 'A label for the clip (e.g. "Night look").' },
|
|
5597
5597
|
id: { type: "string", minLength: 1, description: 'Your own id for the clip (default: a fresh one such as "c7").' },
|
|
@@ -5605,13 +5605,13 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5605
5605
|
if (t && t.kind !== "video") throw new Error(`Track "${track}" is an audio track; adjustment clips change pictures, so put it on a video track.`);
|
|
5606
5606
|
if (scope === "track" && !target_track) throw new Error('Scope "track" needs target_track: the id of the track whose pictures it changes.');
|
|
5607
5607
|
if (target_track !== void 0 && scope !== "track") throw new Error('target_track is only for scope "track"; leave it out or set scope to "track".');
|
|
5608
|
-
const look = { ...preset ?
|
|
5608
|
+
const look = { ...preset ? _chunkA653N65Qcjs.videoGradePreset.call(void 0, preset, _nullishCoalesce(amount, () => ( 1))) : {}, ..._nullishCoalesce(grade, () => ( {})) };
|
|
5609
5609
|
const clip = { type: "adjustment", ...id ? { id } : {}, ...name ? { name } : {}, ...start !== void 0 ? { start } : {}, duration: _nullishCoalesce(duration, () => ( 3e3)), ...scope ? { scope } : {}, ...target_track ? { targetTrack: target_track } : {}, ...Object.keys(look).length ? { grade: look } : {} };
|
|
5610
5610
|
return apply({ op: "add_clip", track, clip, mode }, "Add adjustment clip", (r) => ({ clip: clipOut(r.project, r.outcomes[0].clip), ...placed(r.outcomes[0]), ...Object.keys(look).length ? {} : { hint: "It changes nothing yet: give it a grade (update_video_clip), effects (apply_effect) or a mask." } }));
|
|
5611
5611
|
}
|
|
5612
5612
|
};
|
|
5613
5613
|
const maskTarget = (id) => {
|
|
5614
|
-
const at =
|
|
5614
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, project(), id);
|
|
5615
5615
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
5616
5616
|
if (at.track.kind !== "video") throw new Error(`Clip "${id}" is on audio track "${at.track.id}"; masks cut pictures, so pass a clip on a video track.`);
|
|
5617
5617
|
return at;
|
|
@@ -5653,13 +5653,13 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5653
5653
|
gradeTargets(clips);
|
|
5654
5654
|
const edits = [];
|
|
5655
5655
|
for (const id of clips) {
|
|
5656
|
-
const clip =
|
|
5656
|
+
const clip = _chunkA653N65Qcjs.findVideoClip.call(void 0, project(), id).clip;
|
|
5657
5657
|
const lut = _optionalChain([clip, 'access', _185 => _185.grade, 'optionalAccess', _186 => _186.lut]);
|
|
5658
5658
|
if (!lut) throw new Error(`Clip "${id}" has no LUT to protect skin from; add one with set_video_lut first.`);
|
|
5659
5659
|
const { preserveSkinTones: _p, ...rest } = lut;
|
|
5660
5660
|
edits.push({ op: "update_clip", clip: id, set: { grade: { ...clip.grade, lut: amount > 0 ? { ...rest, preserveSkinTones: amount } : rest } } });
|
|
5661
5661
|
}
|
|
5662
|
-
return apply(edits, amount > 0 ? "Protect skin tones" : "Stop protecting skin tones", (r) => ({ clips: clips.map((id) => ({ id, lut: _nullishCoalesce(_optionalChain([
|
|
5662
|
+
return apply(edits, amount > 0 ? "Protect skin tones" : "Stop protecting skin tones", (r) => ({ clips: clips.map((id) => ({ id, lut: _nullishCoalesce(_optionalChain([_chunkA653N65Qcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _187 => _187.clip, 'access', _188 => _188.grade, 'optionalAccess', _189 => _189.lut]), () => ( null)) })) }));
|
|
5663
5663
|
}
|
|
5664
5664
|
};
|
|
5665
5665
|
const planOut = (plan) => ({
|
|
@@ -5712,7 +5712,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5712
5712
|
handler: ({ plan }) => {
|
|
5713
5713
|
const r = controller.applyPlan(plan);
|
|
5714
5714
|
if (!r.ok) throw new Error(r.error);
|
|
5715
|
-
return { plan: r.plan.id, title: r.plan.title, stale: r.stale, outcomes: r.outcomes, duration:
|
|
5715
|
+
return { plan: r.plan.id, title: r.plan.title, stale: r.stale, outcomes: r.outcomes, duration: _chunkA653N65Qcjs.videoProjectDuration.call(void 0, r.project), issues: issueSummary(r.issues) };
|
|
5716
5716
|
}
|
|
5717
5717
|
};
|
|
5718
5718
|
const discardPlan = {
|
|
@@ -5800,7 +5800,7 @@ function videoCameraMoveTools(controller, ctx) {
|
|
|
5800
5800
|
clip: { type: "string", minLength: 1, description: "A clip id with a picture, from get_video_project." },
|
|
5801
5801
|
role: ROLE,
|
|
5802
5802
|
move: { type: "string", minLength: 1, description: "A camera move id of that role from list_video_camera_moves." },
|
|
5803
|
-
ms: { type: "number", minimum: 0, maximum:
|
|
5803
|
+
ms: { type: "number", minimum: 0, maximum: _chunk2K5TELHVcjs.CAMERA_MOVE_MAX_MS, description: `How long a transition takes, ms (default the move's durationMs; at most the clip's length). Not for a hold, which plays across the rest of the clip.` },
|
|
5804
5804
|
preset: { type: "string", minLength: 1, description: "A preset of the move by name, from describe_effect." },
|
|
5805
5805
|
values: ctx.valuesSchema("Control values over the move's defaults (and the preset's), from describe_effect"),
|
|
5806
5806
|
from: FRAMING("Where a transition starts."),
|
|
@@ -5850,7 +5850,7 @@ var KEYS2 = {
|
|
|
5850
5850
|
properties: {
|
|
5851
5851
|
t: { type: "number", description: "Clip-relative time in ms (0 = the clip's start)." },
|
|
5852
5852
|
v: { type: "number", description: "The control's value at t, within its range from describe_effect." },
|
|
5853
|
-
ease: { anyOf: [{ type: "string", enum: [...
|
|
5853
|
+
ease: { anyOf: [{ type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_EASE_NAMES] }, { type: "array", items: { type: "number" }, minItems: 4, maxItems: 4 }], description: "How the value moves to the next key: linear (default), hold, ease-in, ease-out, ease-in-out, or CSS cubic-bezier [x1, y1, x2, y2]." }
|
|
5854
5854
|
},
|
|
5855
5855
|
required: ["t", "v"],
|
|
5856
5856
|
additionalProperties: false
|
|
@@ -5864,7 +5864,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
5864
5864
|
return controller.readOnlyReason();
|
|
5865
5865
|
};
|
|
5866
5866
|
const clipOf = (id) => {
|
|
5867
|
-
const at =
|
|
5867
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, controller.getProject(), id);
|
|
5868
5868
|
if (!at) {
|
|
5869
5869
|
const ids = controller.getProject().tracks.flatMap((t) => t.clips.map((c) => c.id));
|
|
5870
5870
|
throw new Error(`There is no clip "${id}"; the clips are ${ids.map((c) => `"${c}"`).join(", ") || "none"} (get_video_project lists them).`);
|
|
@@ -5877,7 +5877,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
5877
5877
|
const effect = _nullishCoalesce(effects.find((e) => e.id === (_nullishCoalesce(instance, () => ( _optionalChain([r, 'access', _194 => _194.effect, 'optionalAccess', _195 => _195.id]))))), () => ( (r.effect ? { id: r.effect.id, effect: r.effect.effect, role: "clip effect", enabled: r.effect.enabled !== false, values: _nullishCoalesce(r.effect.values, () => ( {})) } : effects[0])));
|
|
5878
5878
|
return { target, effect, effects, ...extra };
|
|
5879
5879
|
};
|
|
5880
|
-
return withVideoPlayback(
|
|
5880
|
+
return withVideoPlayback(_chunk2K5TELHVcjs.createEffectToolProvider.call(void 0, {
|
|
5881
5881
|
id: _nullishCoalesce(options.id, () => ( "video-effects")),
|
|
5882
5882
|
namespace: options.namespace,
|
|
5883
5883
|
title: "Video effects",
|
|
@@ -5936,7 +5936,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
5936
5936
|
duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms (default: the effect's own length, else 5000)." },
|
|
5937
5937
|
values: ctx.valuesSchema("Control values over the effect's defaults", true),
|
|
5938
5938
|
name: { type: "string", minLength: 1, description: "A label for the clip (default: the effect's name)." },
|
|
5939
|
-
mode: { type: "string", enum: [...
|
|
5939
|
+
mode: { type: "string", enum: [..._chunkA653N65Qcjs.VIDEO_PLACEMENT_MODES], description: "What to do with clips already there: refuse (default), overwrite or insert." }
|
|
5940
5940
|
},
|
|
5941
5941
|
required: ["track", "effect"],
|
|
5942
5942
|
additionalProperties: false
|
|
@@ -5996,7 +5996,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
5996
5996
|
const clip = clipOf(args.clip);
|
|
5997
5997
|
if (clip.type !== "effect") throw new Error(`Clip "${args.clip}" is not an effect clip; give the id of one of its effects (list_applied_effects).`);
|
|
5998
5998
|
const was = _optionalChain([clip, 'access', _196 => _196.values, 'optionalAccess', _197 => _197[args.control]]);
|
|
5999
|
-
const plain = keys === null ?
|
|
5999
|
+
const plain = keys === null ? _chunkA653N65Qcjs.isVideoKeyframes.call(void 0, was) ? _optionalChain([was, 'access', _198 => _198.keys, 'access', _199 => _199[0], 'optionalAccess', _200 => _200.v]) : was : { keys: [...keys].sort((a, b) => a.t - b.t) };
|
|
6000
6000
|
if (plain === void 0) throw new Error(`"${args.control}" has no value to keep; give keys instead.`);
|
|
6001
6001
|
r = await controller.updateEffectValues(args.clip, "generator", { [args.control]: plain });
|
|
6002
6002
|
} else r = await controller.setClipEffectKeyframes(args.clip, args.effect, args.control, keys);
|
|
@@ -6074,7 +6074,7 @@ function createVideoDialogueToolProvider(controller, options = {}) {
|
|
|
6074
6074
|
const r = controller.proposePlan({ title, description: "Cuts fillers, long pauses and stutters found in the transcript, closing up every sync-locked track.", edits: videoRemoveRangesEdits(cuts), ranges: cuts.map((d) => ({ from: d.from, to: d.to, text: d.text, reason: d.kind })), source: "plan_video_dialogue_cleanup" });
|
|
6075
6075
|
if (!r.ok) throw new Error(r.error);
|
|
6076
6076
|
const p = r.plan;
|
|
6077
|
-
return { plan: { id: p.id, title: p.title, summary: p.summary, text: describeVideoEditPlan(p), cuts: cuts.length }, durationNow:
|
|
6077
|
+
return { plan: { id: p.id, title: p.title, summary: p.summary, text: describeVideoEditPlan(p), cuts: cuts.length }, durationNow: _chunkA653N65Qcjs.videoProjectDuration.call(void 0, controller.getProject()), hint: `Nothing changed yet. Show the user the plan, then call apply_video_edit_plan with plan "${p.id}" (or discard_video_edit_plan).` };
|
|
6078
6078
|
}
|
|
6079
6079
|
};
|
|
6080
6080
|
return withVideoPlayback(
|
|
@@ -6121,7 +6121,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6121
6121
|
};
|
|
6122
6122
|
const project = () => controller.getProject();
|
|
6123
6123
|
const soundClip = (p, id) => {
|
|
6124
|
-
const at =
|
|
6124
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, p, id);
|
|
6125
6125
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
6126
6126
|
const c = at.clip;
|
|
6127
6127
|
if (c.type !== "media") throw new Error(`Clip "${id}" is a ${c.type} clip and has no sound of its own; pass a video or audio clip.`);
|
|
@@ -6137,8 +6137,8 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6137
6137
|
const { clip, asset: asset2 } = soundClip(p, args.clip);
|
|
6138
6138
|
const speed = _nullishCoalesce(clip.speed, () => ( 1));
|
|
6139
6139
|
const from2 = Math.max(clip.start, _nullishCoalesce(args.from, () => ( clip.start)));
|
|
6140
|
-
const to2 = Math.min(
|
|
6141
|
-
if (!(to2 > from2)) throw new Error(`The stretch is empty (${from2}\u2013${to2} ms); "from" and "to" must be inside the clip (${clip.start}\u2013${
|
|
6140
|
+
const to2 = Math.min(_chunkA653N65Qcjs.videoClipEnd.call(void 0, clip), _nullishCoalesce(args.to, () => ( _chunkA653N65Qcjs.videoClipEnd.call(void 0, clip))));
|
|
6141
|
+
if (!(to2 > from2)) throw new Error(`The stretch is empty (${from2}\u2013${to2} ms); "from" and "to" must be inside the clip (${clip.start}\u2013${_chunkA653N65Qcjs.videoClipEnd.call(void 0, clip)} ms) with "to" after "from".`);
|
|
6142
6142
|
return { asset: asset2, from: (_nullishCoalesce(clip.in, () => ( 0))) + (from2 - clip.start) * speed, to: (_nullishCoalesce(clip.in, () => ( 0))) + (to2 - clip.start) * speed, out: (s) => clip.start + (s - (_nullishCoalesce(clip.in, () => ( 0)))) / speed };
|
|
6143
6143
|
}
|
|
6144
6144
|
const asset = p.assets.find((a) => a.id === args.asset);
|
|
@@ -6180,7 +6180,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6180
6180
|
handler: async ({ clips, target, ceiling, replace }) => {
|
|
6181
6181
|
const p = project();
|
|
6182
6182
|
const targets = clips.map((id) => soundClip(p, id));
|
|
6183
|
-
for (const t of targets) if (
|
|
6183
|
+
for (const t of targets) if (_chunkA653N65Qcjs.isVideoKeyframes.call(void 0, t.clip.volume) && !replace) throw new Error(`Clip "${t.clip.id}" has volume keyframes, which a constant gain would replace; pass replace: true, or remove them first.`);
|
|
6184
6184
|
const results = [];
|
|
6185
6185
|
const edits = [];
|
|
6186
6186
|
for (const { clip, asset } of targets) {
|
|
@@ -6225,7 +6225,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6225
6225
|
handler: async (args) => {
|
|
6226
6226
|
const p = project();
|
|
6227
6227
|
const music = args.music.map((id) => soundClip(p, id));
|
|
6228
|
-
for (const m of music) if (
|
|
6228
|
+
for (const m of music) if (_chunkA653N65Qcjs.isVideoKeyframes.call(void 0, m.clip.volume) && !args.replace) throw new Error(`Music clip "${m.clip.id}" already has volume keyframes; pass replace: true to replace them, or remove them first.`);
|
|
6229
6229
|
const transcriptTrack = videoTranscriptTrack(p, args.dialogue_track);
|
|
6230
6230
|
const mode = _nullishCoalesce(args.speech, () => ( (transcriptTrack && videoTimelineTranscript(p, { track: transcriptTrack }).length ? "transcript" : "audio")));
|
|
6231
6231
|
let ranges = [];
|
|
@@ -6238,7 +6238,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6238
6238
|
const track = p.tracks.find((t) => t.id === args.dialogue_track);
|
|
6239
6239
|
if (!track) throw new Error(`There is no track "${args.dialogue_track}".`);
|
|
6240
6240
|
const musicIds = new Set(music.map((m) => m.clip.id));
|
|
6241
|
-
for (const c of
|
|
6241
|
+
for (const c of _chunkA653N65Qcjs.sortedVideoClips.call(void 0, track)) {
|
|
6242
6242
|
if (c.type !== "media" || musicIds.has(c.id)) continue;
|
|
6243
6243
|
const asset = p.assets.find((a) => a.id === c.asset);
|
|
6244
6244
|
if (!asset || asset.kind === "image" || asset.hasAudio === false) continue;
|
|
@@ -6249,10 +6249,10 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6249
6249
|
let at = c.start;
|
|
6250
6250
|
for (const s of silences) {
|
|
6251
6251
|
const a = c.start + (s.start - src0) / speed;
|
|
6252
|
-
if (a - at >
|
|
6252
|
+
if (a - at > _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: a });
|
|
6253
6253
|
at = c.start + (s.end - src0) / speed;
|
|
6254
6254
|
}
|
|
6255
|
-
if (
|
|
6255
|
+
if (_chunkA653N65Qcjs.videoClipEnd.call(void 0, c) - at > _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: _chunkA653N65Qcjs.videoClipEnd.call(void 0, c) });
|
|
6256
6256
|
}
|
|
6257
6257
|
if (!ranges.length) throw new Error(`Track "${args.dialogue_track}" has no sound above -40 dBFS, so there is no speech to duck under.`);
|
|
6258
6258
|
}
|
|
@@ -6315,7 +6315,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6315
6315
|
if (!beats.length) throw new Error(`No beats were found in "${args.music}"; try a lower sensitivity, or pass beats.`);
|
|
6316
6316
|
} else beats = [...args.beats].sort((a, b) => a - b);
|
|
6317
6317
|
const tolerance = _nullishCoalesce(args.tolerance, () => ( 150));
|
|
6318
|
-
const clips =
|
|
6318
|
+
const clips = _chunkA653N65Qcjs.sortedVideoClips.call(void 0, track);
|
|
6319
6319
|
const edits = [];
|
|
6320
6320
|
const ranges = [];
|
|
6321
6321
|
const skipped = [];
|
|
@@ -6323,8 +6323,8 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6323
6323
|
for (let i = 0; i + 1 < clips.length; i++) {
|
|
6324
6324
|
const left = clips[i];
|
|
6325
6325
|
const right = clips[i + 1];
|
|
6326
|
-
const cut =
|
|
6327
|
-
if (Math.abs(right.start - cut) >
|
|
6326
|
+
const cut = _chunkA653N65Qcjs.videoClipEnd.call(void 0, left);
|
|
6327
|
+
if (Math.abs(right.start - cut) > _chunkA653N65Qcjs.VIDEO_TIME_EPSILON) continue;
|
|
6328
6328
|
const beat = nearestVideoBeat(beats, cut, tolerance);
|
|
6329
6329
|
if (beat === null) {
|
|
6330
6330
|
skipped.push({ cut: round4(cut), reason: `no beat within ${tolerance} ms` });
|
|
@@ -6399,7 +6399,7 @@ function videoClipEffectDocument(clip, instance, providerId) {
|
|
|
6399
6399
|
const values = {};
|
|
6400
6400
|
const tracks = {};
|
|
6401
6401
|
for (const [control, v] of Object.entries(_nullishCoalesce(effect.values, () => ( {})))) {
|
|
6402
|
-
if (
|
|
6402
|
+
if (_chunkA653N65Qcjs.isVideoKeyframes.call(void 0, v)) {
|
|
6403
6403
|
values[control] = v.keys[0].v;
|
|
6404
6404
|
tracks[control] = v.keys.map((k) => ({ time: k.t, value: k.v, ...k.ease && k.ease !== "linear" ? { easing: videoEaseToAnimationEasing(k.ease) } : {} }));
|
|
6405
6405
|
} else values[control] = v;
|
|
@@ -6440,10 +6440,10 @@ function videoEffectValuesFromDocument(doc) {
|
|
|
6440
6440
|
async function openVideoClipEffectAuthoring(controller, clip, instance, options = {}) {
|
|
6441
6441
|
const provider = controller.effectsProvider;
|
|
6442
6442
|
if (!provider) throw new Error("No effects provider is registered, so the effect cannot be opened for authoring; register one with setEffectsProvider.");
|
|
6443
|
-
const at =
|
|
6443
|
+
const at = _chunkA653N65Qcjs.findVideoClip.call(void 0, controller.getProject(), clip);
|
|
6444
6444
|
if (!at) throw new Error(`There is no clip "${clip}".`);
|
|
6445
6445
|
const doc = videoClipEffectDocument(at.clip, instance, provider.id);
|
|
6446
|
-
const session = await
|
|
6446
|
+
const session = await _chunkRG4O6K2Acjs.createEffectAuthoringSession.call(void 0, { document: doc }, { ...options, provider });
|
|
6447
6447
|
return {
|
|
6448
6448
|
clip,
|
|
6449
6449
|
instance,
|
|
@@ -6792,4 +6792,4 @@ function createVideoEditorDocument(controller) {
|
|
|
6792
6792
|
|
|
6793
6793
|
|
|
6794
6794
|
|
|
6795
|
-
exports.TranscriptVideoController = TranscriptVideoController; exports.VIDEO_ADJUSTMENT_SCOPES = _chunk5T3H7CGGcjs.VIDEO_ADJUSTMENT_SCOPES; exports.VIDEO_ADJUSTMENT_SCOPE_LABELS = VIDEO_ADJUSTMENT_SCOPE_LABELS; exports.VIDEO_BLEND_MODES = _chunk5T3H7CGGcjs.VIDEO_BLEND_MODES; exports.VIDEO_BLEND_MODE_LABELS = VIDEO_BLEND_MODE_LABELS; exports.VIDEO_CLIP_ANIMATION_DURATION = _chunk5T3H7CGGcjs.VIDEO_CLIP_ANIMATION_DURATION; exports.VIDEO_CLIP_ANIMATION_EFFECTS = _chunk5T3H7CGGcjs.VIDEO_CLIP_ANIMATION_EFFECTS; exports.VIDEO_CLIP_ANIMATION_LABELS = VIDEO_CLIP_ANIMATION_LABELS; exports.VIDEO_CLIP_TYPES = _chunk5T3H7CGGcjs.VIDEO_CLIP_TYPES; exports.VIDEO_DEFAULT_FILLERS = VIDEO_DEFAULT_FILLERS; exports.VIDEO_DEFAULT_STILL_DURATION = VIDEO_DEFAULT_STILL_DURATION; exports.VIDEO_DEFAULT_TITLE_DURATION = VIDEO_DEFAULT_TITLE_DURATION; exports.VIDEO_DISFLUENCY_KINDS = VIDEO_DISFLUENCY_KINDS; exports.VIDEO_EASE_NAMES = _chunk5T3H7CGGcjs.VIDEO_EASE_NAMES; exports.VIDEO_EDIT_OPS = VIDEO_EDIT_OPS; exports.VIDEO_EFFECT_PLACES = _chunk5T3H7CGGcjs.VIDEO_EFFECT_PLACES; exports.VIDEO_FADE_CURVES = _chunk5T3H7CGGcjs.VIDEO_FADE_CURVES; exports.VIDEO_FADE_CURVE_LABELS = VIDEO_FADE_CURVE_LABELS; exports.VIDEO_FITS = _chunk5T3H7CGGcjs.VIDEO_FITS; exports.VIDEO_GRADE_CONTROLS = _chunk5T3H7CGGcjs.VIDEO_GRADE_CONTROLS; exports.VIDEO_GRADE_PRESETS = _chunk5T3H7CGGcjs.VIDEO_GRADE_PRESETS; exports.VIDEO_GRADE_PRESET_NAMES = _chunk5T3H7CGGcjs.VIDEO_GRADE_PRESET_NAMES; exports.VIDEO_ISSUE_CODES = VIDEO_ISSUE_CODES; exports.VIDEO_KEYFRAME_LIMITS = _chunk5T3H7CGGcjs.VIDEO_KEYFRAME_LIMITS; exports.VIDEO_KEYFRAME_PROPERTIES = _chunk5T3H7CGGcjs.VIDEO_KEYFRAME_PROPERTIES; exports.VIDEO_LOUDNESS_HOP = VIDEO_LOUDNESS_HOP; exports.VIDEO_LUT_MAX_SIZE = _chunk5T3H7CGGcjs.VIDEO_LUT_MAX_SIZE; exports.VIDEO_MASK_DEFAULTS = _chunk5T3H7CGGcjs.VIDEO_MASK_DEFAULTS; exports.VIDEO_MASK_SHAPES = _chunk5T3H7CGGcjs.VIDEO_MASK_SHAPES; exports.VIDEO_MASK_SHAPE_LABELS = VIDEO_MASK_SHAPE_LABELS; exports.VIDEO_PEAK_BLOCK = VIDEO_PEAK_BLOCK; exports.VIDEO_PLACEMENT_MODES = _chunk5T3H7CGGcjs.VIDEO_PLACEMENT_MODES; exports.VIDEO_PREVIEW_SCALE_OPTIONS = VIDEO_PREVIEW_SCALE_OPTIONS; exports.VIDEO_PROXY_SCALES = VIDEO_PROXY_SCALES; exports.VIDEO_SCOPE_KINDS = VIDEO_SCOPE_KINDS; exports.VIDEO_TIME_EPSILON = _chunk5T3H7CGGcjs.VIDEO_TIME_EPSILON; exports.VIDEO_TRANSFORM_PROPERTIES = _chunk5T3H7CGGcjs.VIDEO_TRANSFORM_PROPERTIES; exports.VIDEO_TRANSITION_LABELS = VIDEO_TRANSITION_LABELS; exports.VIDEO_TRANSITION_TYPES = _chunk5T3H7CGGcjs.VIDEO_TRANSITION_TYPES; exports.VIDEO_VECTORSCOPE_TARGETS = VIDEO_VECTORSCOPE_TARGETS; exports.VIDEO_WIPE_DIRECTIONS = _chunk5T3H7CGGcjs.VIDEO_WIPE_DIRECTIONS; exports.VideoAudioPeaksCache = VideoAudioPeaksCache; exports.VideoEditorController = VideoEditorController; exports.VideoEffectsEngine = _chunk5T3H7CGGcjs.VideoEffectsEngine; exports.VideoFrameCache = VideoFrameCache; exports.VideoLutCache = _chunk5T3H7CGGcjs.VideoLutCache; exports.VideoPreviewEngine = VideoPreviewEngine; exports.VideoPreviewPixels = VideoPreviewPixels; exports.allVideoClipIds = _chunk5T3H7CGGcjs.allVideoClipIds; exports.allVideoTracks = _chunk5T3H7CGGcjs.allVideoTracks; exports.animationEasingToVideoEase = animationEasingToVideoEase; exports.applyVideoEdits = applyVideoEdits; exports.applyVideoGrade = _chunk5T3H7CGGcjs.applyVideoGrade; exports.applyVideoLut = _chunk5T3H7CGGcjs.applyVideoLut; exports.applyVideoLutToPixels = _chunk5T3H7CGGcjs.applyVideoLutToPixels; exports.bakeVideoClipCamera = bakeVideoClipCamera; exports.buildVideoAudioPeaks = buildVideoAudioPeaks; exports.checkVideoEffectPlace = _chunk5T3H7CGGcjs.checkVideoEffectPlace; exports.checkVideoEffectValues = _chunk5T3H7CGGcjs.checkVideoEffectValues; exports.checkVideoProject = checkVideoProject; exports.checkVideoTimeRemap = _chunk5T3H7CGGcjs.checkVideoTimeRemap; exports.createVideoDialogueToolProvider = createVideoDialogueToolProvider; exports.createVideoEditorDocument = createVideoEditorDocument; exports.createVideoEditorToolProvider = createVideoEditorToolProvider; exports.createVideoEffectsToolProvider = createVideoEffectsToolProvider; exports.createVideoElementDecoder = createVideoElementDecoder; exports.createVideoMusicToolProvider = createVideoMusicToolProvider; exports.createVideoProject = createVideoProject; exports.decodeVideoAudioPeaks = decodeVideoAudioPeaks; exports.describeVideoEditPlan = describeVideoEditPlan; exports.describeVideoProject = describeVideoProject; exports.describeVideoSequence = describeVideoSequence; exports.detectVideoDisfluencies = detectVideoDisfluencies; exports.diffVideoProjects = diffVideoProjects; exports.drawVideoFrame = _chunk5T3H7CGGcjs.drawVideoFrame; exports.ffmpegFilterValue = _chunk5T3H7CGGcjs.ffmpegFilterValue; exports.findVideoAudioBeats = findVideoAudioBeats; exports.findVideoAudioSilences = findVideoAudioSilences; exports.findVideoClip = _chunk5T3H7CGGcjs.findVideoClip; exports.findVideoFillers = findVideoFillers; exports.findVideoGaps = _chunk5T3H7CGGcjs.findVideoGaps; exports.findVideoRepetitions = findVideoRepetitions; exports.findVideoSequenceClip = _chunk5T3H7CGGcjs.findVideoSequenceClip; exports.findVideoSequenceCycle = _chunk5T3H7CGGcjs.findVideoSequenceCycle; exports.findVideoTranscriptPauses = findVideoTranscriptPauses; exports.findVideoTranscriptText = findVideoTranscriptText; exports.formatVideoSeconds = _chunk5T3H7CGGcjs.formatVideoSeconds; exports.formatVideoTimecode = _chunk5T3H7CGGcjs.formatVideoTimecode; exports.formatVideoTimecodeFrames = _chunk5T3H7CGGcjs.formatVideoTimecodeFrames; exports.isVideoDropFrameRate = _chunk5T3H7CGGcjs.isVideoDropFrameRate; exports.isVideoKeyframes = _chunk5T3H7CGGcjs.isVideoKeyframes; exports.measureVideoLoudness = measureVideoLoudness; exports.mergeVideoRanges = mergeVideoRanges; exports.mixEffectPixels = _chunk5T3H7CGGcjs.mixEffectPixels; exports.nearestVideoBeat = nearestVideoBeat; exports.nextFreeVideoSlot = _chunk5T3H7CGGcjs.nextFreeVideoSlot; exports.normalizeVideoClipMask = _chunk5T3H7CGGcjs.normalizeVideoClipMask; exports.normalizeVideoGrade = _chunk5T3H7CGGcjs.normalizeVideoGrade; exports.normalizeVideoGradeLut = _chunk5T3H7CGGcjs.normalizeVideoGradeLut; exports.normalizeVideoWord = normalizeVideoWord; exports.openVideoClipEffectAuthoring = openVideoClipEffectAuthoring; exports.overEffectPixels = _chunk5T3H7CGGcjs.overEffectPixels; exports.parseVideoAnimatable = parseVideoAnimatable; exports.parseVideoAsset = parseVideoAsset; exports.parseVideoAssetProxies = parseVideoAssetProxies; exports.parseVideoClip = parseVideoClip; exports.parseVideoClipAnimation = parseVideoClipAnimation; exports.parseVideoClipCamera = parseVideoClipCamera; exports.parseVideoClipEffects = parseVideoClipEffects; exports.parseVideoClipMask = parseVideoClipMask; exports.parseVideoCubeLut = _chunk5T3H7CGGcjs.parseVideoCubeLut; exports.parseVideoEffectRef = parseVideoEffectRef; exports.parseVideoEffectValues = parseVideoEffectValues; exports.parseVideoGrade = parseVideoGrade; exports.parseVideoGradeLut = parseVideoGradeLut; exports.parseVideoKeyframes = parseVideoKeyframes; exports.parseVideoLoudnessMeasurement = _chunk5T3H7CGGcjs.parseVideoLoudnessMeasurement; exports.parseVideoMarker = parseVideoMarker; exports.parseVideoPreviewScale = parseVideoPreviewScale; exports.parseVideoProject = parseVideoProject; exports.parseVideoSequence = parseVideoSequence; exports.parseVideoTimeRef = parseVideoTimeRef; exports.parseVideoTimeRemap = parseVideoTimeRemap; exports.parseVideoTrack = parseVideoTrack; exports.parseVideoTranscript = parseVideoTranscript; exports.parseVideoTranscriptWords = parseVideoTranscriptWords; exports.parseVideoTransform = parseVideoTransform; exports.parseVideoTransition = parseVideoTransition; exports.placeVideoRect = _chunk5T3H7CGGcjs.placeVideoRect; exports.planVideoClipDrag = planVideoClipDrag; exports.planVideoEdits = planVideoEdits; exports.planVideoPrefetch = planVideoPrefetch; exports.planVideoToolPlayback = planVideoToolPlayback; exports.probeVideoMedia = probeVideoMedia; exports.readVideoScopesPanel = readVideoScopesPanel; exports.removeVideoKey = _chunk5T3H7CGGcjs.removeVideoKey; exports.renderVideoFrameExact = _chunk5T3H7CGGcjs.renderVideoFrameExact; exports.resolveVideoPreviewScale = resolveVideoPreviewScale; exports.retimeVideoAnimatable = _chunk5T3H7CGGcjs.retimeVideoAnimatable; exports.setVideoKey = _chunk5T3H7CGGcjs.setVideoKey; exports.snapToVideoFrame = _chunk5T3H7CGGcjs.snapToVideoFrame; exports.snapVideoTime = _chunk5T3H7CGGcjs.snapVideoTime; exports.sortVideoKeys = _chunk5T3H7CGGcjs.sortVideoKeys; exports.sortedVideoClips = _chunk5T3H7CGGcjs.sortedVideoClips; exports.splitVideoAnimatable = _chunk5T3H7CGGcjs.splitVideoAnimatable; exports.summarizeVideoScopes = summarizeVideoScopes; exports.toVideoEdl = _chunk5T3H7CGGcjs.toVideoEdl; exports.toVideoFfmpeg = _chunk5T3H7CGGcjs.toVideoFfmpeg; exports.toVideoLoudnessMeasure = _chunk5T3H7CGGcjs.toVideoLoudnessMeasure; exports.videoAddAdjustmentEdits = videoAddAdjustmentEdits; exports.videoAssetDropEdit = videoAssetDropEdit; exports.videoAssetHasSound = _chunk5T3H7CGGcjs.videoAssetHasSound; exports.videoAssetKindOf = videoAssetKindOf; exports.videoAssetMap = _chunk5T3H7CGGcjs.videoAssetMap; exports.videoAssetProxy = videoAssetProxy; exports.videoAudioLevels = videoAudioLevels; exports.videoAudioLoudness = videoAudioLoudness; exports.videoAudioPeakRange = videoAudioPeakRange; exports.videoAudioPeakSpans = videoAudioPeakSpans; exports.videoAudioPeaksDuration = videoAudioPeaksDuration; exports.videoAuthorableEffects = videoAuthorableEffects; exports.videoCacheEvictions = videoCacheEvictions; exports.videoCameraBase = videoCameraBase; exports.videoCameraMoveTools = videoCameraMoveTools; exports.videoCameraView = videoCameraView; exports.videoChroma = videoChroma; exports.videoClipAfter = _chunk5T3H7CGGcjs.videoClipAfter; exports.videoClipAnimated = _chunk5T3H7CGGcjs.videoClipAnimated; exports.videoClipAnimationProperties = _chunk5T3H7CGGcjs.videoClipAnimationProperties; exports.videoClipAnimationSpans = _chunk5T3H7CGGcjs.videoClipAnimationSpans; exports.videoClipAppliedEffects = videoClipAppliedEffects; exports.videoClipBefore = _chunk5T3H7CGGcjs.videoClipBefore; exports.videoClipCameraMove = videoClipCameraMove; exports.videoClipEffectDocument = videoClipEffectDocument; exports.videoClipEffectUses = _chunk5T3H7CGGcjs.videoClipEffectUses; exports.videoClipEnd = _chunk5T3H7CGGcjs.videoClipEnd; exports.videoClipHandles = _chunk5T3H7CGGcjs.videoClipHandles; exports.videoClipHeading = videoClipHeading; exports.videoClipKeyframes = videoClipKeyframes; exports.videoClipLabel = videoClipLabel; exports.videoClipOverhang = _chunk5T3H7CGGcjs.videoClipOverhang; exports.videoClipShowsWaveform = videoClipShowsWaveform; exports.videoClipSoundGain = _chunk5T3H7CGGcjs.videoClipSoundGain; exports.videoClipSourceRange = _chunk5T3H7CGGcjs.videoClipSourceRange; exports.videoClipSourceTime = _chunk5T3H7CGGcjs.videoClipSourceTime; exports.videoClipSpeed = _chunk5T3H7CGGcjs.videoClipSpeed; exports.videoClipSpeedAt = _chunk5T3H7CGGcjs.videoClipSpeedAt; exports.videoClipTint = videoClipTint; exports.videoClipTypeLabel = _chunk5T3H7CGGcjs.videoClipTypeLabel; exports.videoClipWaveform = videoClipWaveform; exports.videoClipWaveformPath = videoClipWaveformPath; exports.videoClipsAt = _chunk5T3H7CGGcjs.videoClipsAt; exports.videoContactSheetSvg = _chunk5T3H7CGGcjs.videoContactSheetSvg; exports.videoCutsWithMargin = videoCutsWithMargin; exports.videoDragLabel = videoDragLabel; exports.videoDropTracks = videoDropTracks; exports.videoDuckingKeys = videoDuckingKeys; exports.videoEaseBezier = _chunk5T3H7CGGcjs.videoEaseBezier; exports.videoEaseProgress = _chunk5T3H7CGGcjs.videoEaseProgress; exports.videoEaseToAnimationEasing = videoEaseToAnimationEasing; exports.videoEffectFrameTime = _chunk5T3H7CGGcjs.videoEffectFrameTime; exports.videoEffectLayerKey = _chunk5T3H7CGGcjs.videoEffectLayerKey; exports.videoEffectValuesAt = _chunk5T3H7CGGcjs.videoEffectValuesAt; exports.videoEffectValuesFromDocument = videoEffectValuesFromDocument; exports.videoExposureNotes = videoExposureNotes; exports.videoExposureStats = videoExposureStats; exports.videoFadeCurveGain = _chunk5T3H7CGGcjs.videoFadeCurveGain; exports.videoFfmpegUnsupportedEffects = _chunk5T3H7CGGcjs.videoFfmpegUnsupportedEffects; exports.videoFfmpegUnsupportedFeatures = _chunk5T3H7CGGcjs.videoFfmpegUnsupportedFeatures; exports.videoFrameAt = _chunk5T3H7CGGcjs.videoFrameAt; exports.videoFrameCacheKey = videoFrameCacheKey; exports.videoFrameDuration = _chunk5T3H7CGGcjs.videoFrameDuration; exports.videoFrameLeafLayers = _chunk5T3H7CGGcjs.videoFrameLeafLayers; exports.videoFrameRequestsAt = videoFrameRequestsAt; exports.videoFrameToSvg = _chunk5T3H7CGGcjs.videoFrameToSvg; exports.videoFrames = _chunk5T3H7CGGcjs.videoFrames; exports.videoFreezeFrameEdit = _chunk5T3H7CGGcjs.videoFreezeFrameEdit; exports.videoGradeCssFilter = _chunk5T3H7CGGcjs.videoGradeCssFilter; exports.videoGradeFfmpegFilters = _chunk5T3H7CGGcjs.videoGradeFfmpegFilters; exports.videoGradeGainsFilterId = _chunk5T3H7CGGcjs.videoGradeGainsFilterId; exports.videoGradeLook = _chunk5T3H7CGGcjs.videoGradeLook; exports.videoGradePreset = _chunk5T3H7CGGcjs.videoGradePreset; exports.videoGradeStepMatrix = _chunk5T3H7CGGcjs.videoGradeStepMatrix; exports.videoGradeStepSvgValues = _chunk5T3H7CGGcjs.videoGradeStepSvgValues; exports.videoGradeSteps = _chunk5T3H7CGGcjs.videoGradeSteps; exports.videoGradeSvgDefs = _chunk5T3H7CGGcjs.videoGradeSvgDefs; exports.videoGradeSvgFilter = _chunk5T3H7CGGcjs.videoGradeSvgFilter; exports.videoHistogram = videoHistogram; exports.videoHistogramImage = videoHistogramImage; exports.videoHourFrames = _chunk5T3H7CGGcjs.videoHourFrames; exports.videoIrisRadius = _chunk5T3H7CGGcjs.videoIrisRadius; exports.videoIssueKey = videoIssueKey; exports.videoKeyTimesProblem = _chunk5T3H7CGGcjs.videoKeyTimesProblem; exports.videoKeyframeBreakpoints = _chunk5T3H7CGGcjs.videoKeyframeBreakpoints; exports.videoKeyframeFfmpegExpr = _chunk5T3H7CGGcjs.videoKeyframeFfmpegExpr; exports.videoKeyframeRows = videoKeyframeRows; exports.videoKeyframeToggleEdit = videoKeyframeToggleEdit; exports.videoKeyframeValueEdit = videoKeyframeValueEdit; exports.videoKeysOf = _chunk5T3H7CGGcjs.videoKeysOf; exports.videoLayerMask = _chunk5T3H7CGGcjs.videoLayerMask; exports.videoLayersUseEffects = _chunk5T3H7CGGcjs.videoLayersUseEffects; exports.videoLayersWithoutTransitionEffects = _chunk5T3H7CGGcjs.videoLayersWithoutTransitionEffects; exports.videoLoudnessEnergy = videoLoudnessEnergy; exports.videoLoudnessGain = videoLoudnessGain; exports.videoLoudnessOf = videoLoudnessOf; exports.videoLuma = videoLuma; exports.videoLumaWaveform = videoLumaWaveform; exports.videoLutEdits = videoLutEdits; exports.videoLutFromFunction = _chunk5T3H7CGGcjs.videoLutFromFunction; exports.videoLutSvgApproximation = _chunk5T3H7CGGcjs.videoLutSvgApproximation; exports.videoLutSvgPrimitives = _chunk5T3H7CGGcjs.videoLutSvgPrimitives; exports.videoLutToCube = _chunk5T3H7CGGcjs.videoLutToCube; exports.videoMaskContains = _chunk5T3H7CGGcjs.videoMaskContains; exports.videoMaskEdit = videoMaskEdit; exports.videoMaskPolygon = _chunk5T3H7CGGcjs.videoMaskPolygon; exports.videoMaskSvgPath = _chunk5T3H7CGGcjs.videoMaskSvgPath; exports.videoOverlap = _chunk5T3H7CGGcjs.videoOverlap; exports.videoPeakDb = videoPeakDb; exports.videoPreviewSrc = videoPreviewSrc; exports.videoProjectDuration = _chunk5T3H7CGGcjs.videoProjectDuration; exports.videoProjectEffects = _chunk5T3H7CGGcjs.videoProjectEffects; exports.videoProjectHasProxies = videoProjectHasProxies; exports.videoProjectSvg = _chunk5T3H7CGGcjs.videoProjectSvg; exports.videoProxyFfmpeg = videoProxyFfmpeg; exports.videoProxyName = videoProxyName; exports.videoProxyPlan = videoProxyPlan; exports.videoRemoveRangesEdits = videoRemoveRangesEdits; exports.videoRulerTicks = videoRulerTicks; exports.videoScopeImage = videoScopeImage; exports.videoSequenceChildren = _chunk5T3H7CGGcjs.videoSequenceChildren; exports.videoSequenceDuration = _chunk5T3H7CGGcjs.videoSequenceDuration; exports.videoSequenceMap = _chunk5T3H7CGGcjs.videoSequenceMap; exports.videoShellQuote = _chunk5T3H7CGGcjs.videoShellQuote; exports.videoSkinProtectionEdits = videoSkinProtectionEdits; exports.videoSkinToneWeight = _chunk5T3H7CGGcjs.videoSkinToneWeight; exports.videoSlowMotionRamp = _chunk5T3H7CGGcjs.videoSlowMotionRamp; exports.videoSnapPoints = _chunk5T3H7CGGcjs.videoSnapPoints; exports.videoSourceFrame = videoSourceFrame; exports.videoSourceFrameTime = videoSourceFrameTime; exports.videoSpeechRanges = videoSpeechRanges; exports.videoSpeedRampEdit = _chunk5T3H7CGGcjs.videoSpeedRampEdit; exports.videoSpeedRampKeys = _chunk5T3H7CGGcjs.videoSpeedRampKeys; exports.videoTextStyle = _chunk5T3H7CGGcjs.videoTextStyle; exports.videoTimeRef = videoTimeRef; exports.videoTimeRemapBreakpoints = _chunk5T3H7CGGcjs.videoTimeRemapBreakpoints; exports.videoTimeRemapSpan = _chunk5T3H7CGGcjs.videoTimeRemapSpan; exports.videoTimecodeFrames = _chunk5T3H7CGGcjs.videoTimecodeFrames; exports.videoTimelineTranscript = videoTimelineTranscript; exports.videoTitleFrame = _chunk5T3H7CGGcjs.videoTitleFrame; exports.videoTrackSyncLocked = _chunk5T3H7CGGcjs.videoTrackSyncLocked; exports.videoTranscriptEdit = videoTranscriptEdit; exports.videoTranscriptTrack = videoTranscriptTrack; exports.videoTransformAt = _chunk5T3H7CGGcjs.videoTransformAt; exports.videoTransformOfView = videoTransformOfView; exports.videoTransitionAudioCurve = _chunk5T3H7CGGcjs.videoTransitionAudioCurve; exports.videoTransitionEase = _chunk5T3H7CGGcjs.videoTransitionEase; exports.videoTransitionHasDirection = videoTransitionHasDirection; exports.videoValueAt = _chunk5T3H7CGGcjs.videoValueAt; exports.videoVectorscope = videoVectorscope; exports.videoVectorscopeAngle = videoVectorscopeAngle; exports.videoVectorscopeImage = videoVectorscopeImage; exports.videoVectorscopePoint = videoVectorscopePoint; exports.videoWaveformImage = videoWaveformImage; exports.videoWaveformPath = videoWaveformPath; exports.videoWipeRect = _chunk5T3H7CGGcjs.videoWipeRect; exports.videoWordAt = videoWordAt; exports.videoWordsRange = videoWordsRange; exports.withVideoPlayback = withVideoPlayback;
|
|
6795
|
+
exports.TranscriptVideoController = TranscriptVideoController; exports.VIDEO_ADJUSTMENT_SCOPES = _chunkA653N65Qcjs.VIDEO_ADJUSTMENT_SCOPES; exports.VIDEO_ADJUSTMENT_SCOPE_LABELS = VIDEO_ADJUSTMENT_SCOPE_LABELS; exports.VIDEO_BLEND_MODES = _chunkA653N65Qcjs.VIDEO_BLEND_MODES; exports.VIDEO_BLEND_MODE_LABELS = VIDEO_BLEND_MODE_LABELS; exports.VIDEO_CLIP_ANIMATION_DURATION = _chunkA653N65Qcjs.VIDEO_CLIP_ANIMATION_DURATION; exports.VIDEO_CLIP_ANIMATION_EFFECTS = _chunkA653N65Qcjs.VIDEO_CLIP_ANIMATION_EFFECTS; exports.VIDEO_CLIP_ANIMATION_LABELS = VIDEO_CLIP_ANIMATION_LABELS; exports.VIDEO_CLIP_TYPES = _chunkA653N65Qcjs.VIDEO_CLIP_TYPES; exports.VIDEO_DEFAULT_FILLERS = VIDEO_DEFAULT_FILLERS; exports.VIDEO_DEFAULT_STILL_DURATION = VIDEO_DEFAULT_STILL_DURATION; exports.VIDEO_DEFAULT_TITLE_DURATION = VIDEO_DEFAULT_TITLE_DURATION; exports.VIDEO_DISFLUENCY_KINDS = VIDEO_DISFLUENCY_KINDS; exports.VIDEO_EASE_NAMES = _chunkA653N65Qcjs.VIDEO_EASE_NAMES; exports.VIDEO_EDIT_OPS = VIDEO_EDIT_OPS; exports.VIDEO_EFFECT_PLACES = _chunkA653N65Qcjs.VIDEO_EFFECT_PLACES; exports.VIDEO_FADE_CURVES = _chunkA653N65Qcjs.VIDEO_FADE_CURVES; exports.VIDEO_FADE_CURVE_LABELS = VIDEO_FADE_CURVE_LABELS; exports.VIDEO_FITS = _chunkA653N65Qcjs.VIDEO_FITS; exports.VIDEO_GRADE_CONTROLS = _chunkA653N65Qcjs.VIDEO_GRADE_CONTROLS; exports.VIDEO_GRADE_PRESETS = _chunkA653N65Qcjs.VIDEO_GRADE_PRESETS; exports.VIDEO_GRADE_PRESET_NAMES = _chunkA653N65Qcjs.VIDEO_GRADE_PRESET_NAMES; exports.VIDEO_ISSUE_CODES = VIDEO_ISSUE_CODES; exports.VIDEO_KEYFRAME_LIMITS = _chunkA653N65Qcjs.VIDEO_KEYFRAME_LIMITS; exports.VIDEO_KEYFRAME_PROPERTIES = _chunkA653N65Qcjs.VIDEO_KEYFRAME_PROPERTIES; exports.VIDEO_LOUDNESS_HOP = VIDEO_LOUDNESS_HOP; exports.VIDEO_LUT_MAX_SIZE = _chunkA653N65Qcjs.VIDEO_LUT_MAX_SIZE; exports.VIDEO_MASK_DEFAULTS = _chunkA653N65Qcjs.VIDEO_MASK_DEFAULTS; exports.VIDEO_MASK_SHAPES = _chunkA653N65Qcjs.VIDEO_MASK_SHAPES; exports.VIDEO_MASK_SHAPE_LABELS = VIDEO_MASK_SHAPE_LABELS; exports.VIDEO_PEAK_BLOCK = VIDEO_PEAK_BLOCK; exports.VIDEO_PLACEMENT_MODES = _chunkA653N65Qcjs.VIDEO_PLACEMENT_MODES; exports.VIDEO_PREVIEW_SCALE_OPTIONS = VIDEO_PREVIEW_SCALE_OPTIONS; exports.VIDEO_PROXY_SCALES = VIDEO_PROXY_SCALES; exports.VIDEO_SCOPE_KINDS = VIDEO_SCOPE_KINDS; exports.VIDEO_TIME_EPSILON = _chunkA653N65Qcjs.VIDEO_TIME_EPSILON; exports.VIDEO_TRANSFORM_PROPERTIES = _chunkA653N65Qcjs.VIDEO_TRANSFORM_PROPERTIES; exports.VIDEO_TRANSITION_LABELS = VIDEO_TRANSITION_LABELS; exports.VIDEO_TRANSITION_TYPES = _chunkA653N65Qcjs.VIDEO_TRANSITION_TYPES; exports.VIDEO_VECTORSCOPE_TARGETS = VIDEO_VECTORSCOPE_TARGETS; exports.VIDEO_WIPE_DIRECTIONS = _chunkA653N65Qcjs.VIDEO_WIPE_DIRECTIONS; exports.VideoAudioPeaksCache = VideoAudioPeaksCache; exports.VideoEditorController = VideoEditorController; exports.VideoEffectsEngine = _chunkA653N65Qcjs.VideoEffectsEngine; exports.VideoFrameCache = VideoFrameCache; exports.VideoLutCache = _chunkA653N65Qcjs.VideoLutCache; exports.VideoPreviewEngine = VideoPreviewEngine; exports.VideoPreviewPixels = VideoPreviewPixels; exports.allVideoClipIds = _chunkA653N65Qcjs.allVideoClipIds; exports.allVideoTracks = _chunkA653N65Qcjs.allVideoTracks; exports.animationEasingToVideoEase = animationEasingToVideoEase; exports.applyVideoEdits = applyVideoEdits; exports.applyVideoGrade = _chunkA653N65Qcjs.applyVideoGrade; exports.applyVideoLut = _chunkA653N65Qcjs.applyVideoLut; exports.applyVideoLutToPixels = _chunkA653N65Qcjs.applyVideoLutToPixels; exports.bakeVideoClipCamera = bakeVideoClipCamera; exports.buildVideoAudioPeaks = buildVideoAudioPeaks; exports.checkVideoEffectPlace = _chunkA653N65Qcjs.checkVideoEffectPlace; exports.checkVideoEffectValues = _chunkA653N65Qcjs.checkVideoEffectValues; exports.checkVideoProject = checkVideoProject; exports.checkVideoTimeRemap = _chunkA653N65Qcjs.checkVideoTimeRemap; exports.createVideoDialogueToolProvider = createVideoDialogueToolProvider; exports.createVideoEditorDocument = createVideoEditorDocument; exports.createVideoEditorToolProvider = createVideoEditorToolProvider; exports.createVideoEffectsToolProvider = createVideoEffectsToolProvider; exports.createVideoElementDecoder = createVideoElementDecoder; exports.createVideoMusicToolProvider = createVideoMusicToolProvider; exports.createVideoProject = createVideoProject; exports.decodeVideoAudioPeaks = decodeVideoAudioPeaks; exports.describeVideoEditPlan = describeVideoEditPlan; exports.describeVideoProject = describeVideoProject; exports.describeVideoSequence = describeVideoSequence; exports.detectVideoDisfluencies = detectVideoDisfluencies; exports.diffVideoProjects = diffVideoProjects; exports.drawVideoFrame = _chunkA653N65Qcjs.drawVideoFrame; exports.ffmpegFilterValue = _chunkA653N65Qcjs.ffmpegFilterValue; exports.findVideoAudioBeats = findVideoAudioBeats; exports.findVideoAudioSilences = findVideoAudioSilences; exports.findVideoClip = _chunkA653N65Qcjs.findVideoClip; exports.findVideoFillers = findVideoFillers; exports.findVideoGaps = _chunkA653N65Qcjs.findVideoGaps; exports.findVideoRepetitions = findVideoRepetitions; exports.findVideoSequenceClip = _chunkA653N65Qcjs.findVideoSequenceClip; exports.findVideoSequenceCycle = _chunkA653N65Qcjs.findVideoSequenceCycle; exports.findVideoTranscriptPauses = findVideoTranscriptPauses; exports.findVideoTranscriptText = findVideoTranscriptText; exports.formatVideoSeconds = _chunkA653N65Qcjs.formatVideoSeconds; exports.formatVideoTimecode = _chunkA653N65Qcjs.formatVideoTimecode; exports.formatVideoTimecodeFrames = _chunkA653N65Qcjs.formatVideoTimecodeFrames; exports.isVideoDropFrameRate = _chunkA653N65Qcjs.isVideoDropFrameRate; exports.isVideoKeyframes = _chunkA653N65Qcjs.isVideoKeyframes; exports.measureVideoLoudness = measureVideoLoudness; exports.mergeVideoRanges = mergeVideoRanges; exports.mixEffectPixels = _chunkA653N65Qcjs.mixEffectPixels; exports.nearestVideoBeat = nearestVideoBeat; exports.nextFreeVideoSlot = _chunkA653N65Qcjs.nextFreeVideoSlot; exports.normalizeVideoClipMask = _chunkA653N65Qcjs.normalizeVideoClipMask; exports.normalizeVideoGrade = _chunkA653N65Qcjs.normalizeVideoGrade; exports.normalizeVideoGradeLut = _chunkA653N65Qcjs.normalizeVideoGradeLut; exports.normalizeVideoWord = normalizeVideoWord; exports.openVideoClipEffectAuthoring = openVideoClipEffectAuthoring; exports.overEffectPixels = _chunkA653N65Qcjs.overEffectPixels; exports.parseVideoAnimatable = parseVideoAnimatable; exports.parseVideoAsset = parseVideoAsset; exports.parseVideoAssetProxies = parseVideoAssetProxies; exports.parseVideoClip = parseVideoClip; exports.parseVideoClipAnimation = parseVideoClipAnimation; exports.parseVideoClipCamera = parseVideoClipCamera; exports.parseVideoClipEffects = parseVideoClipEffects; exports.parseVideoClipMask = parseVideoClipMask; exports.parseVideoCubeLut = _chunkA653N65Qcjs.parseVideoCubeLut; exports.parseVideoEffectRef = parseVideoEffectRef; exports.parseVideoEffectValues = parseVideoEffectValues; exports.parseVideoGrade = parseVideoGrade; exports.parseVideoGradeLut = parseVideoGradeLut; exports.parseVideoKeyframes = parseVideoKeyframes; exports.parseVideoLoudnessMeasurement = _chunkA653N65Qcjs.parseVideoLoudnessMeasurement; exports.parseVideoMarker = parseVideoMarker; exports.parseVideoPreviewScale = parseVideoPreviewScale; exports.parseVideoProject = parseVideoProject; exports.parseVideoSequence = parseVideoSequence; exports.parseVideoTimeRef = parseVideoTimeRef; exports.parseVideoTimeRemap = parseVideoTimeRemap; exports.parseVideoTrack = parseVideoTrack; exports.parseVideoTranscript = parseVideoTranscript; exports.parseVideoTranscriptWords = parseVideoTranscriptWords; exports.parseVideoTransform = parseVideoTransform; exports.parseVideoTransition = parseVideoTransition; exports.placeVideoRect = _chunkA653N65Qcjs.placeVideoRect; exports.planVideoClipDrag = planVideoClipDrag; exports.planVideoEdits = planVideoEdits; exports.planVideoPrefetch = planVideoPrefetch; exports.planVideoToolPlayback = planVideoToolPlayback; exports.probeVideoMedia = probeVideoMedia; exports.readVideoScopesPanel = readVideoScopesPanel; exports.removeVideoKey = _chunkA653N65Qcjs.removeVideoKey; exports.renderVideoFrameExact = _chunkA653N65Qcjs.renderVideoFrameExact; exports.resolveVideoPreviewScale = resolveVideoPreviewScale; exports.retimeVideoAnimatable = _chunkA653N65Qcjs.retimeVideoAnimatable; exports.setVideoKey = _chunkA653N65Qcjs.setVideoKey; exports.snapToVideoFrame = _chunkA653N65Qcjs.snapToVideoFrame; exports.snapVideoTime = _chunkA653N65Qcjs.snapVideoTime; exports.sortVideoKeys = _chunkA653N65Qcjs.sortVideoKeys; exports.sortedVideoClips = _chunkA653N65Qcjs.sortedVideoClips; exports.splitVideoAnimatable = _chunkA653N65Qcjs.splitVideoAnimatable; exports.summarizeVideoScopes = summarizeVideoScopes; exports.toVideoEdl = _chunkA653N65Qcjs.toVideoEdl; exports.toVideoFfmpeg = _chunkA653N65Qcjs.toVideoFfmpeg; exports.toVideoLoudnessMeasure = _chunkA653N65Qcjs.toVideoLoudnessMeasure; exports.videoAddAdjustmentEdits = videoAddAdjustmentEdits; exports.videoAssetDropEdit = videoAssetDropEdit; exports.videoAssetHasSound = _chunkA653N65Qcjs.videoAssetHasSound; exports.videoAssetKindOf = videoAssetKindOf; exports.videoAssetMap = _chunkA653N65Qcjs.videoAssetMap; exports.videoAssetProxy = videoAssetProxy; exports.videoAudioLevels = videoAudioLevels; exports.videoAudioLoudness = videoAudioLoudness; exports.videoAudioPeakRange = videoAudioPeakRange; exports.videoAudioPeakSpans = videoAudioPeakSpans; exports.videoAudioPeaksDuration = videoAudioPeaksDuration; exports.videoAuthorableEffects = videoAuthorableEffects; exports.videoCacheEvictions = videoCacheEvictions; exports.videoCameraBase = videoCameraBase; exports.videoCameraMoveTools = videoCameraMoveTools; exports.videoCameraView = videoCameraView; exports.videoChroma = videoChroma; exports.videoClipAfter = _chunkA653N65Qcjs.videoClipAfter; exports.videoClipAnimated = _chunkA653N65Qcjs.videoClipAnimated; exports.videoClipAnimationProperties = _chunkA653N65Qcjs.videoClipAnimationProperties; exports.videoClipAnimationSpans = _chunkA653N65Qcjs.videoClipAnimationSpans; exports.videoClipAppliedEffects = videoClipAppliedEffects; exports.videoClipBefore = _chunkA653N65Qcjs.videoClipBefore; exports.videoClipCameraMove = videoClipCameraMove; exports.videoClipEffectDocument = videoClipEffectDocument; exports.videoClipEffectUses = _chunkA653N65Qcjs.videoClipEffectUses; exports.videoClipEnd = _chunkA653N65Qcjs.videoClipEnd; exports.videoClipHandles = _chunkA653N65Qcjs.videoClipHandles; exports.videoClipHeading = videoClipHeading; exports.videoClipKeyframes = videoClipKeyframes; exports.videoClipLabel = videoClipLabel; exports.videoClipOverhang = _chunkA653N65Qcjs.videoClipOverhang; exports.videoClipShowsWaveform = videoClipShowsWaveform; exports.videoClipSoundGain = _chunkA653N65Qcjs.videoClipSoundGain; exports.videoClipSourceRange = _chunkA653N65Qcjs.videoClipSourceRange; exports.videoClipSourceTime = _chunkA653N65Qcjs.videoClipSourceTime; exports.videoClipSpeed = _chunkA653N65Qcjs.videoClipSpeed; exports.videoClipSpeedAt = _chunkA653N65Qcjs.videoClipSpeedAt; exports.videoClipTint = videoClipTint; exports.videoClipTypeLabel = _chunkA653N65Qcjs.videoClipTypeLabel; exports.videoClipWaveform = videoClipWaveform; exports.videoClipWaveformPath = videoClipWaveformPath; exports.videoClipsAt = _chunkA653N65Qcjs.videoClipsAt; exports.videoContactSheetSvg = _chunkA653N65Qcjs.videoContactSheetSvg; exports.videoCutsWithMargin = videoCutsWithMargin; exports.videoDragLabel = videoDragLabel; exports.videoDropTracks = videoDropTracks; exports.videoDuckingKeys = videoDuckingKeys; exports.videoEaseBezier = _chunkA653N65Qcjs.videoEaseBezier; exports.videoEaseProgress = _chunkA653N65Qcjs.videoEaseProgress; exports.videoEaseToAnimationEasing = videoEaseToAnimationEasing; exports.videoEffectFrameTime = _chunkA653N65Qcjs.videoEffectFrameTime; exports.videoEffectLayerKey = _chunkA653N65Qcjs.videoEffectLayerKey; exports.videoEffectValuesAt = _chunkA653N65Qcjs.videoEffectValuesAt; exports.videoEffectValuesFromDocument = videoEffectValuesFromDocument; exports.videoExposureNotes = videoExposureNotes; exports.videoExposureStats = videoExposureStats; exports.videoFadeCurveGain = _chunkA653N65Qcjs.videoFadeCurveGain; exports.videoFfmpegUnsupportedEffects = _chunkA653N65Qcjs.videoFfmpegUnsupportedEffects; exports.videoFfmpegUnsupportedFeatures = _chunkA653N65Qcjs.videoFfmpegUnsupportedFeatures; exports.videoFrameAt = _chunkA653N65Qcjs.videoFrameAt; exports.videoFrameCacheKey = videoFrameCacheKey; exports.videoFrameDuration = _chunkA653N65Qcjs.videoFrameDuration; exports.videoFrameLeafLayers = _chunkA653N65Qcjs.videoFrameLeafLayers; exports.videoFrameRequestsAt = videoFrameRequestsAt; exports.videoFrameToSvg = _chunkA653N65Qcjs.videoFrameToSvg; exports.videoFrames = _chunkA653N65Qcjs.videoFrames; exports.videoFreezeFrameEdit = _chunkA653N65Qcjs.videoFreezeFrameEdit; exports.videoGradeCssFilter = _chunkA653N65Qcjs.videoGradeCssFilter; exports.videoGradeFfmpegFilters = _chunkA653N65Qcjs.videoGradeFfmpegFilters; exports.videoGradeGainsFilterId = _chunkA653N65Qcjs.videoGradeGainsFilterId; exports.videoGradeLook = _chunkA653N65Qcjs.videoGradeLook; exports.videoGradePreset = _chunkA653N65Qcjs.videoGradePreset; exports.videoGradeStepMatrix = _chunkA653N65Qcjs.videoGradeStepMatrix; exports.videoGradeStepSvgValues = _chunkA653N65Qcjs.videoGradeStepSvgValues; exports.videoGradeSteps = _chunkA653N65Qcjs.videoGradeSteps; exports.videoGradeSvgDefs = _chunkA653N65Qcjs.videoGradeSvgDefs; exports.videoGradeSvgFilter = _chunkA653N65Qcjs.videoGradeSvgFilter; exports.videoHistogram = videoHistogram; exports.videoHistogramImage = videoHistogramImage; exports.videoHourFrames = _chunkA653N65Qcjs.videoHourFrames; exports.videoIrisRadius = _chunkA653N65Qcjs.videoIrisRadius; exports.videoIssueKey = videoIssueKey; exports.videoKeyTimesProblem = _chunkA653N65Qcjs.videoKeyTimesProblem; exports.videoKeyframeBreakpoints = _chunkA653N65Qcjs.videoKeyframeBreakpoints; exports.videoKeyframeFfmpegExpr = _chunkA653N65Qcjs.videoKeyframeFfmpegExpr; exports.videoKeyframeRows = videoKeyframeRows; exports.videoKeyframeToggleEdit = videoKeyframeToggleEdit; exports.videoKeyframeValueEdit = videoKeyframeValueEdit; exports.videoKeysOf = _chunkA653N65Qcjs.videoKeysOf; exports.videoLayerMask = _chunkA653N65Qcjs.videoLayerMask; exports.videoLayersUseEffects = _chunkA653N65Qcjs.videoLayersUseEffects; exports.videoLayersWithoutTransitionEffects = _chunkA653N65Qcjs.videoLayersWithoutTransitionEffects; exports.videoLoudnessEnergy = videoLoudnessEnergy; exports.videoLoudnessGain = videoLoudnessGain; exports.videoLoudnessOf = videoLoudnessOf; exports.videoLuma = videoLuma; exports.videoLumaWaveform = videoLumaWaveform; exports.videoLutEdits = videoLutEdits; exports.videoLutFromFunction = _chunkA653N65Qcjs.videoLutFromFunction; exports.videoLutSvgApproximation = _chunkA653N65Qcjs.videoLutSvgApproximation; exports.videoLutSvgPrimitives = _chunkA653N65Qcjs.videoLutSvgPrimitives; exports.videoLutToCube = _chunkA653N65Qcjs.videoLutToCube; exports.videoMaskContains = _chunkA653N65Qcjs.videoMaskContains; exports.videoMaskEdit = videoMaskEdit; exports.videoMaskPolygon = _chunkA653N65Qcjs.videoMaskPolygon; exports.videoMaskSvgPath = _chunkA653N65Qcjs.videoMaskSvgPath; exports.videoOverlap = _chunkA653N65Qcjs.videoOverlap; exports.videoPeakDb = videoPeakDb; exports.videoPreviewSrc = videoPreviewSrc; exports.videoProjectDuration = _chunkA653N65Qcjs.videoProjectDuration; exports.videoProjectEffects = _chunkA653N65Qcjs.videoProjectEffects; exports.videoProjectHasProxies = videoProjectHasProxies; exports.videoProjectSvg = _chunkA653N65Qcjs.videoProjectSvg; exports.videoProxyFfmpeg = videoProxyFfmpeg; exports.videoProxyName = videoProxyName; exports.videoProxyPlan = videoProxyPlan; exports.videoRemoveRangesEdits = videoRemoveRangesEdits; exports.videoRulerTicks = videoRulerTicks; exports.videoScopeImage = videoScopeImage; exports.videoSequenceChildren = _chunkA653N65Qcjs.videoSequenceChildren; exports.videoSequenceDuration = _chunkA653N65Qcjs.videoSequenceDuration; exports.videoSequenceMap = _chunkA653N65Qcjs.videoSequenceMap; exports.videoShellQuote = _chunkA653N65Qcjs.videoShellQuote; exports.videoSkinProtectionEdits = videoSkinProtectionEdits; exports.videoSkinToneWeight = _chunkA653N65Qcjs.videoSkinToneWeight; exports.videoSlowMotionRamp = _chunkA653N65Qcjs.videoSlowMotionRamp; exports.videoSnapPoints = _chunkA653N65Qcjs.videoSnapPoints; exports.videoSourceFrame = videoSourceFrame; exports.videoSourceFrameTime = videoSourceFrameTime; exports.videoSpeechRanges = videoSpeechRanges; exports.videoSpeedRampEdit = _chunkA653N65Qcjs.videoSpeedRampEdit; exports.videoSpeedRampKeys = _chunkA653N65Qcjs.videoSpeedRampKeys; exports.videoTextStyle = _chunkA653N65Qcjs.videoTextStyle; exports.videoTimeRef = videoTimeRef; exports.videoTimeRemapBreakpoints = _chunkA653N65Qcjs.videoTimeRemapBreakpoints; exports.videoTimeRemapSpan = _chunkA653N65Qcjs.videoTimeRemapSpan; exports.videoTimecodeFrames = _chunkA653N65Qcjs.videoTimecodeFrames; exports.videoTimelineTranscript = videoTimelineTranscript; exports.videoTitleFrame = _chunkA653N65Qcjs.videoTitleFrame; exports.videoTrackSyncLocked = _chunkA653N65Qcjs.videoTrackSyncLocked; exports.videoTranscriptEdit = videoTranscriptEdit; exports.videoTranscriptTrack = videoTranscriptTrack; exports.videoTransformAt = _chunkA653N65Qcjs.videoTransformAt; exports.videoTransformOfView = videoTransformOfView; exports.videoTransitionAudioCurve = _chunkA653N65Qcjs.videoTransitionAudioCurve; exports.videoTransitionEase = _chunkA653N65Qcjs.videoTransitionEase; exports.videoTransitionHasDirection = videoTransitionHasDirection; exports.videoValueAt = _chunkA653N65Qcjs.videoValueAt; exports.videoVectorscope = videoVectorscope; exports.videoVectorscopeAngle = videoVectorscopeAngle; exports.videoVectorscopeImage = videoVectorscopeImage; exports.videoVectorscopePoint = videoVectorscopePoint; exports.videoWaveformImage = videoWaveformImage; exports.videoWaveformPath = videoWaveformPath; exports.videoWipeRect = _chunkA653N65Qcjs.videoWipeRect; exports.videoWordAt = videoWordAt; exports.videoWordsRange = videoWordsRange; exports.withVideoPlayback = withVideoPlayback;
|