@pixerate/editor 0.139.1 → 0.140.1
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/README.md +25 -4
- package/dist/agent/formatTools.d.cts +15 -0
- package/dist/agent/formatTools.d.ts +15 -0
- package/dist/agent/index.cjs +408 -49
- package/dist/agent/index.js +375 -16
- package/dist/agent/providers.d.cts +5 -3
- package/dist/agent/providers.d.ts +5 -3
- package/dist/animation-editor/effect-tools.d.cts +1 -1
- package/dist/animation-editor/effect-tools.d.ts +1 -1
- package/dist/animation-editor/index.cjs +250 -116
- package/dist/animation-editor/index.js +228 -94
- package/dist/animation-editor/instructions.d.cts +1 -1
- package/dist/animation-editor/instructions.d.ts +1 -1
- package/dist/animation-editor/parse.d.cts +3 -1
- package/dist/animation-editor/parse.d.ts +3 -1
- package/dist/animation-editor/tools.d.cts +8 -3
- package/dist/animation-editor/tools.d.ts +8 -3
- package/dist/bridge/cli.cjs +4 -3
- package/dist/bridge/cli.js +3 -2
- package/dist/bridge/index.cjs +8 -3
- package/dist/bridge/index.d.cts +7 -0
- package/dist/bridge/index.d.ts +7 -0
- package/dist/bridge/index.js +9 -4
- package/dist/bridge/skills.d.cts +9 -0
- package/dist/bridge/skills.d.ts +9 -0
- package/dist/canvas/effect-tools.d.cts +1 -1
- package/dist/canvas/effect-tools.d.ts +1 -1
- package/dist/canvas/index.cjs +22 -17
- package/dist/canvas/index.js +8 -3
- package/dist/chart/file-tools.d.cts +1 -1
- package/dist/chart/file-tools.d.ts +1 -1
- package/dist/chart/index.cjs +7 -1
- package/dist/chart/index.js +7 -1
- package/dist/chart/tools.d.cts +1 -1
- package/dist/chart/tools.d.ts +1 -1
- package/dist/chunk-2BSBFBOA.cjs +46 -0
- package/dist/{chunk-SWZTQWY7.js → chunk-2INPJDNY.js} +1 -1
- package/dist/{chunk-CCKP4XAN.cjs → chunk-34RQAGWI.cjs} +27 -7
- package/dist/{chunk-HXCBQ7A6.cjs → chunk-3AJMR7EG.cjs} +7 -4
- package/dist/{chunk-BKMU3V6K.js → chunk-5ED73EC6.js} +8 -1
- package/dist/{chunk-NKBUVQJW.cjs → chunk-5WOY52O6.cjs} +15 -15
- package/dist/{chunk-VRIR53SW.js → chunk-6GAYGQDC.js} +10 -8
- package/dist/{chunk-HZZXBTLB.js → chunk-6IN474P4.js} +25 -5
- package/dist/{chunk-KHMVB3SJ.js → chunk-7KWJEYIK.js} +4 -1
- package/dist/{chunk-R47NQICB.cjs → chunk-AGCD3EHB.cjs} +47 -10
- package/dist/{chunk-6I63VZ45.js → chunk-CXXKJBQZ.js} +5 -1
- package/dist/{chunk-6NXVDJDR.cjs → chunk-G43MNQ4C.cjs} +5 -5
- package/dist/chunk-HDK3T2QS.cjs +1159 -0
- package/dist/chunk-HF5QZS7Z.js +46 -0
- package/dist/{chunk-S7I3RI5Z.cjs → chunk-HMGWFXEC.cjs} +27 -24
- package/dist/{chunk-6NCBFBXA.js → chunk-IQ6KKXOU.js} +1 -1
- package/dist/{chunk-T6Y5FV7G.cjs → chunk-L434J57V.cjs} +10 -8
- package/dist/{chunk-UCRL6JEV.cjs → chunk-L5OWG2NA.cjs} +8 -3
- package/dist/{chunk-CZRWP6IW.cjs → chunk-N2FGYZ4Q.cjs} +8 -1
- package/dist/{chunk-GUPQ5BNA.cjs → chunk-PUR6BZFA.cjs} +112 -111
- package/dist/chunk-RB62U6MS.js +1159 -0
- package/dist/{chunk-3V746PF4.cjs → chunk-RUZQMYXH.cjs} +4 -1
- package/dist/{chunk-HGHXGCKG.cjs → chunk-SVFEVKLF.cjs} +1 -1
- package/dist/{chunk-PCNCT4ZY.js → chunk-UMS6YFA6.js} +40 -3
- package/dist/{chunk-4LGWAJDI.js → chunk-V5OOP74P.js} +5 -2
- package/dist/{chunk-BWT4IWLK.cjs → chunk-VKF3PWKR.cjs} +7 -7
- package/dist/{chunk-PQMADRCI.js → chunk-WBJ6BG4R.js} +23 -22
- package/dist/{chunk-WIYAOZZU.js → chunk-WHKNYFM2.js} +7 -2
- package/dist/{chunk-TBSPPVTT.js → chunk-XCK7QK5D.js} +1 -1
- package/dist/{chunk-F652BKMS.cjs → chunk-YN6JKAUE.cjs} +6 -2
- package/dist/{chunk-YTGF4TJR.js → chunk-ZLZKGHSZ.js} +5 -2
- package/dist/{chunk-USU2FL3N.js → chunk-ZNHB5RG6.js} +1 -1
- package/dist/commands/agentTools.d.cts +1 -1
- package/dist/commands/agentTools.d.ts +1 -1
- package/dist/commands/index.cjs +3 -0
- package/dist/commands/index.js +3 -0
- package/dist/compare/index.cjs +4 -3
- package/dist/compare/index.js +3 -2
- package/dist/diagram/index.cjs +3 -0
- package/dist/diagram/index.js +3 -0
- package/dist/diagram/tools.d.cts +1 -1
- package/dist/diagram/tools.d.ts +1 -1
- package/dist/effects/index.cjs +32 -32
- package/dist/effects/index.js +1 -1
- package/dist/effects/tools.d.cts +5 -1
- package/dist/effects/tools.d.ts +5 -1
- package/dist/export/index.cjs +4 -3
- package/dist/export/index.js +3 -2
- package/dist/extensions/index.cjs +11 -8
- package/dist/extensions/index.d.cts +1 -0
- package/dist/extensions/index.d.ts +1 -0
- package/dist/extensions/index.js +10 -7
- package/dist/extensions/safe-merge-attributes.d.cts +10 -0
- package/dist/extensions/safe-merge-attributes.d.ts +10 -0
- package/dist/generation/index.cjs +7 -1
- package/dist/generation/index.js +7 -1
- package/dist/image-editor/index.cjs +25 -18
- package/dist/image-editor/index.js +10 -3
- package/dist/image-editor/provider-effect-tools.d.cts +1 -1
- package/dist/image-editor/provider-effect-tools.d.ts +1 -1
- package/dist/image-editor/tools.d.cts +1 -1
- package/dist/image-editor/tools.d.ts +1 -1
- package/dist/index.cjs +42 -29
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +22 -9
- package/dist/paint-editor/effect-tools.d.cts +1 -1
- package/dist/paint-editor/effect-tools.d.ts +1 -1
- package/dist/paint-editor/index.cjs +18 -8
- package/dist/paint-editor/index.js +13 -3
- package/dist/paint-editor/tools.d.cts +1 -1
- package/dist/paint-editor/tools.d.ts +1 -1
- package/dist/persistence/index.cjs +3 -2
- package/dist/persistence/index.js +2 -1
- package/dist/serializers/index.cjs +5 -4
- package/dist/serializers/index.js +4 -3
- package/dist/tools/bridge-client.d.cts +3 -3
- package/dist/tools/bridge-client.d.ts +3 -3
- package/dist/tools/capture.d.cts +5 -1
- package/dist/tools/capture.d.ts +5 -1
- package/dist/tools/definitions.d.cts +2 -2
- package/dist/tools/definitions.d.ts +2 -2
- package/dist/tools/index.cjs +39 -5
- package/dist/tools/index.d.cts +4 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.js +39 -5
- package/dist/tools/mcp-server.d.cts +24 -6
- package/dist/tools/mcp-server.d.ts +24 -6
- package/dist/tools/registry.d.cts +81 -6
- package/dist/tools/registry.d.ts +81 -6
- package/dist/tools/safe-json.d.cts +27 -0
- package/dist/tools/safe-json.d.ts +27 -0
- package/dist/tools/search.d.cts +30 -0
- package/dist/tools/search.d.ts +30 -0
- package/dist/tools/skills.d.cts +26 -0
- package/dist/tools/skills.d.ts +26 -0
- package/dist/tools/view.d.cts +95 -0
- package/dist/tools/view.d.ts +95 -0
- package/dist/vector/effect-tools.d.cts +1 -1
- package/dist/vector/effect-tools.d.ts +1 -1
- package/dist/vector/index.cjs +13 -7
- package/dist/vector/index.js +8 -2
- package/dist/video-editor/effect-tools.d.cts +1 -1
- package/dist/video-editor/effect-tools.d.ts +1 -1
- package/dist/video-editor/index.cjs +275 -269
- package/dist/video-editor/index.js +8 -2
- package/dist/video-editor/tools.d.cts +1 -1
- package/dist/video-editor/tools.d.ts +1 -1
- package/package.json +31 -29
- package/skills/README.md +8 -3
- package/skills/pixerate-agent-tools/SKILL.md +33 -7
- package/skills/pixerate-animation-editor/SKILL.md +7 -0
- package/skills/pixerate-rich-text/SKILL.md +18 -4
- package/dist/chunk-5RRYDFU2.js +0 -466
- package/dist/chunk-SPVIXXIB.cjs +0 -466
- /package/dist/{chunk-SMJK5HBJ.js → chunk-K73HMKQP.js} +0 -0
- /package/dist/{chunk-DDF6WQ62.cjs → chunk-LACYURUW.cjs} +0 -0
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
var
|
|
137
|
+
var _chunkVKF3PWKRcjs = require('../chunk-VKF3PWKR.cjs');
|
|
138
138
|
require('../chunk-PY4GWSE2.cjs');
|
|
139
139
|
|
|
140
140
|
|
|
@@ -143,7 +143,7 @@ var _chunkEBDZWIOPcjs = require('../chunk-EBDZWIOP.cjs');
|
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
|
|
146
|
-
var
|
|
146
|
+
var _chunkRUZQMYXHcjs = require('../chunk-RUZQMYXH.cjs');
|
|
147
147
|
require('../chunk-WOFXZ3XU.cjs');
|
|
148
148
|
|
|
149
149
|
|
|
@@ -191,7 +191,7 @@ function parseVideoEase(v, path) {
|
|
|
191
191
|
if (v[0] < 0 || v[0] > 1 || v[2] < 0 || v[2] > 1) fail(path, "must have x1 and x2 between 0 and 1");
|
|
192
192
|
return [v[0], v[1], v[2], v[3]];
|
|
193
193
|
}
|
|
194
|
-
return oneOf(v,
|
|
194
|
+
return oneOf(v, _chunkVKF3PWKRcjs.VIDEO_EASE_NAMES, path);
|
|
195
195
|
}
|
|
196
196
|
function parseVideoKeyframes(v, path, { min, max } = {}) {
|
|
197
197
|
if (!isObject(v)) return fail(path, "must be a number or keyframes { keys: [{ t, v, ease }] }");
|
|
@@ -229,7 +229,7 @@ function parseVideoTimeRemap(v, speed, path) {
|
|
|
229
229
|
if (typeof remap === "number" || remap === void 0) return fail(path, "must be keyframes { keys: [{ t, v, ease }] } (v: ms of source after the in point)");
|
|
230
230
|
if (speed !== void 0 && speed !== 1) fail(path, 'cannot be used with a speed; a ramp sets the speed itself (remove "speed")');
|
|
231
231
|
try {
|
|
232
|
-
|
|
232
|
+
_chunkVKF3PWKRcjs.checkVideoTimeRemap.call(void 0, remap, path);
|
|
233
233
|
} catch (e) {
|
|
234
234
|
throw new Error(e.message.replace(/\.?$/, "."));
|
|
235
235
|
}
|
|
@@ -239,17 +239,17 @@ function parseVideoClipAnimation(v, path) {
|
|
|
239
239
|
if (v === void 0) return void 0;
|
|
240
240
|
if (!isObject(v)) return fail(path, "must be an object { effect, duration }");
|
|
241
241
|
return compact({
|
|
242
|
-
effect: oneOf(v.effect,
|
|
242
|
+
effect: oneOf(v.effect, _chunkVKF3PWKRcjs.VIDEO_CLIP_ANIMATION_EFFECTS, `${path}.effect`, false),
|
|
243
243
|
duration: num(v.duration, `${path}.duration`, { optional: true, positive: true })
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
function parseVideoGrade(v, path) {
|
|
247
247
|
if (v === void 0) return void 0;
|
|
248
248
|
if (!isObject(v)) return fail(path, "must be an object such as { exposure, contrast, saturation }");
|
|
249
|
-
const known = /* @__PURE__ */ new Set([...
|
|
249
|
+
const known = /* @__PURE__ */ new Set([..._chunkVKF3PWKRcjs.VIDEO_GRADE_CONTROLS.map((c) => c.key), "lut"]);
|
|
250
250
|
const unknown = Object.keys(v).find((k) => !known.has(k));
|
|
251
251
|
if (unknown) fail(`${path}.${unknown}`, `is not a grade setting; use ${[...known].join(", ")}`);
|
|
252
|
-
return compact({ ...Object.fromEntries(
|
|
252
|
+
return compact({ ...Object.fromEntries(_chunkVKF3PWKRcjs.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`) });
|
|
253
253
|
}
|
|
254
254
|
function parseVideoGradeLut(v, path) {
|
|
255
255
|
if (v === void 0) return void 0;
|
|
@@ -261,15 +261,15 @@ function parseVideoGradeLut(v, path) {
|
|
|
261
261
|
function parseVideoTransition(v, path) {
|
|
262
262
|
if (v === void 0) return void 0;
|
|
263
263
|
if (!isObject(v)) return fail(path, "must be an object { type, duration }");
|
|
264
|
-
const type = oneOf(v.type,
|
|
264
|
+
const type = oneOf(v.type, _chunkVKF3PWKRcjs.VIDEO_TRANSITION_TYPES, `${path}.type`, false);
|
|
265
265
|
if (type === "effect" && v.effect === void 0) fail(`${path}.effect`, 'is required for an effect transition: { effect: "<effect id>", values }');
|
|
266
266
|
if (type !== "effect" && v.effect !== void 0) fail(`${path}.effect`, 'is only for transitions of type "effect"');
|
|
267
267
|
return compact({
|
|
268
268
|
type,
|
|
269
269
|
duration: num(v.duration, `${path}.duration`, { positive: true }),
|
|
270
270
|
color: str(v.color, `${path}.color`, true),
|
|
271
|
-
direction: oneOf(v.direction,
|
|
272
|
-
audioCurve: oneOf(v.audioCurve,
|
|
271
|
+
direction: oneOf(v.direction, _chunkVKF3PWKRcjs.VIDEO_WIPE_DIRECTIONS, `${path}.direction`),
|
|
272
|
+
audioCurve: oneOf(v.audioCurve, _chunkVKF3PWKRcjs.VIDEO_FADE_CURVES, `${path}.audioCurve`),
|
|
273
273
|
effect: v.effect === void 0 ? void 0 : parseVideoEffectRef(v.effect, `${path}.effect`, false)
|
|
274
274
|
});
|
|
275
275
|
}
|
|
@@ -362,7 +362,7 @@ function parseVideoAssetProxies(v, path) {
|
|
|
362
362
|
}
|
|
363
363
|
function parseVideoClip(v, path = "clip") {
|
|
364
364
|
if (!isObject(v)) return fail(path, "must be an object");
|
|
365
|
-
const type = oneOf(_nullishCoalesce(v.type, () => ( "media")),
|
|
365
|
+
const type = oneOf(_nullishCoalesce(v.type, () => ( "media")), _chunkVKF3PWKRcjs.VIDEO_CLIP_TYPES, `${path}.type`, false);
|
|
366
366
|
const base = {
|
|
367
367
|
id: str(v.id, `${path}.id`),
|
|
368
368
|
name: str(v.name, `${path}.name`, true),
|
|
@@ -370,8 +370,8 @@ function parseVideoClip(v, path = "clip") {
|
|
|
370
370
|
duration: num(v.duration, `${path}.duration`, { positive: true }),
|
|
371
371
|
opacity: parseVideoAnimatable(v.opacity, `${path}.opacity`, { optional: true, min: 0, max: 1 }),
|
|
372
372
|
transform: parseVideoTransform(v.transform, `${path}.transform`),
|
|
373
|
-
fit: oneOf(v.fit,
|
|
374
|
-
blend: oneOf(v.blend,
|
|
373
|
+
fit: oneOf(v.fit, _chunkVKF3PWKRcjs.VIDEO_FITS, `${path}.fit`),
|
|
374
|
+
blend: oneOf(v.blend, _chunkVKF3PWKRcjs.VIDEO_BLEND_MODES, `${path}.blend`),
|
|
375
375
|
grade: parseVideoGrade(v.grade, `${path}.grade`),
|
|
376
376
|
animateIn: parseVideoClipAnimation(v.animateIn, `${path}.animateIn`),
|
|
377
377
|
animateOut: parseVideoClipAnimation(v.animateOut, `${path}.animateOut`),
|
|
@@ -390,8 +390,8 @@ function parseVideoClip(v, path = "clip") {
|
|
|
390
390
|
volume: parseVideoAnimatable(v.volume, `${path}.volume`, { optional: true, min: 0, max: 4 }),
|
|
391
391
|
muted: bool(v.muted, `${path}.muted`),
|
|
392
392
|
timeRemap: parseVideoTimeRemap(v.timeRemap, v.speed, `${path}.timeRemap`),
|
|
393
|
-
fadeInCurve: oneOf(v.fadeInCurve,
|
|
394
|
-
fadeOutCurve: oneOf(v.fadeOutCurve,
|
|
393
|
+
fadeInCurve: oneOf(v.fadeInCurve, _chunkVKF3PWKRcjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
|
|
394
|
+
fadeOutCurve: oneOf(v.fadeOutCurve, _chunkVKF3PWKRcjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
|
|
395
395
|
});
|
|
396
396
|
if (type === "sequence") {
|
|
397
397
|
for (const key of ["speed", "timeRemap"])
|
|
@@ -403,8 +403,8 @@ function parseVideoClip(v, path = "clip") {
|
|
|
403
403
|
in: num(v.in, `${path}.in`, { optional: true, min: 0 }),
|
|
404
404
|
volume: parseVideoAnimatable(v.volume, `${path}.volume`, { optional: true, min: 0, max: 4 }),
|
|
405
405
|
muted: bool(v.muted, `${path}.muted`),
|
|
406
|
-
fadeInCurve: oneOf(v.fadeInCurve,
|
|
407
|
-
fadeOutCurve: oneOf(v.fadeOutCurve,
|
|
406
|
+
fadeInCurve: oneOf(v.fadeInCurve, _chunkVKF3PWKRcjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
|
|
407
|
+
fadeOutCurve: oneOf(v.fadeOutCurve, _chunkVKF3PWKRcjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
410
|
if (type === "text")
|
|
@@ -515,9 +515,9 @@ function createVideoProject(options = {}) {
|
|
|
515
515
|
// src/video-editor/check.ts
|
|
516
516
|
function videoClipKeyframes(clip) {
|
|
517
517
|
const out = [
|
|
518
|
-
{ property: "opacity", keys:
|
|
519
|
-
{ property: "volume", keys: clip.type === "media" || clip.type === "sequence" ?
|
|
520
|
-
...
|
|
518
|
+
{ property: "opacity", keys: _chunkVKF3PWKRcjs.videoKeysOf.call(void 0, clip.opacity) },
|
|
519
|
+
{ property: "volume", keys: clip.type === "media" || clip.type === "sequence" ? _chunkVKF3PWKRcjs.videoKeysOf.call(void 0, clip.volume) : [] },
|
|
520
|
+
..._chunkVKF3PWKRcjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => ({ property: p, keys: _chunkVKF3PWKRcjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _2 => _2.transform, 'optionalAccess', _3 => _3[p]])) }))
|
|
521
521
|
];
|
|
522
522
|
return out.filter((o) => o.keys.length);
|
|
523
523
|
}
|
|
@@ -544,8 +544,8 @@ var VIDEO_ISSUE_CODES = [
|
|
|
544
544
|
var videoIssueKey = (i) => [i.code, _nullishCoalesce(i.sequence, () => ( "")), _nullishCoalesce(i.track, () => ( "")), _nullishCoalesce(i.clip, () => ( "")), _nullishCoalesce(i.asset, () => ( "")), _nullishCoalesce(i.marker, () => ( ""))].join("|");
|
|
545
545
|
function checkVideoProject(project) {
|
|
546
546
|
const issues = [];
|
|
547
|
-
const assets =
|
|
548
|
-
const sequences =
|
|
547
|
+
const assets = _chunkVKF3PWKRcjs.videoAssetMap.call(void 0, project);
|
|
548
|
+
const sequences = _chunkVKF3PWKRcjs.videoSequenceMap.call(void 0, project);
|
|
549
549
|
const used = /* @__PURE__ */ new Set();
|
|
550
550
|
const usedSequences = /* @__PURE__ */ new Set();
|
|
551
551
|
const cycles = /* @__PURE__ */ new Map();
|
|
@@ -553,7 +553,7 @@ function checkVideoProject(project) {
|
|
|
553
553
|
if ((asset.kind === "video" || asset.kind === "audio") && asset.duration === void 0)
|
|
554
554
|
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.` });
|
|
555
555
|
const checkTrack = (track, sequence) => {
|
|
556
|
-
const clips =
|
|
556
|
+
const clips = _chunkVKF3PWKRcjs.sortedVideoClips.call(void 0, track);
|
|
557
557
|
const where = sequence ? ` in sequence "${sequence}"` : "";
|
|
558
558
|
for (let i = 0; i < clips.length; i++) {
|
|
559
559
|
const clip = clips[i];
|
|
@@ -563,13 +563,13 @@ function checkVideoProject(project) {
|
|
|
563
563
|
const seq = sequences.get(clip.sequence);
|
|
564
564
|
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.` });
|
|
565
565
|
else {
|
|
566
|
-
if (!cycles.has(seq.id)) cycles.set(seq.id,
|
|
566
|
+
if (!cycles.has(seq.id)) cycles.set(seq.id, _chunkVKF3PWKRcjs.findVideoSequenceCycle.call(void 0, project, seq.id));
|
|
567
567
|
const cycle = cycles.get(seq.id);
|
|
568
568
|
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.` });
|
|
569
|
-
const length =
|
|
570
|
-
const range =
|
|
571
|
-
if (range.out > length +
|
|
572
|
-
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Compound clip "${clip.id}" plays to ${
|
|
569
|
+
const length = _chunkVKF3PWKRcjs.videoSequenceDuration.call(void 0, seq);
|
|
570
|
+
const range = _chunkVKF3PWKRcjs.videoClipSourceRange.call(void 0, clip);
|
|
571
|
+
if (range.out > length + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON)
|
|
572
|
+
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Compound clip "${clip.id}" plays to ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, range.out)} of sequence "${seq.id}", which is only ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, length)} long; shorten the clip or move its in point.` });
|
|
573
573
|
}
|
|
574
574
|
} else if (clip.type === "media") {
|
|
575
575
|
used.add(clip.asset);
|
|
@@ -578,28 +578,28 @@ function checkVideoProject(project) {
|
|
|
578
578
|
else {
|
|
579
579
|
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.` });
|
|
580
580
|
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.` });
|
|
581
|
-
const range =
|
|
582
|
-
if (asset.duration !== void 0 && range.out > asset.duration +
|
|
583
|
-
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Clip "${clip.id}" plays to ${
|
|
581
|
+
const range = _chunkVKF3PWKRcjs.videoClipSourceRange.call(void 0, clip);
|
|
582
|
+
if (asset.duration !== void 0 && range.out > asset.duration + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON)
|
|
583
|
+
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Clip "${clip.id}" plays to ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, range.out)} of "${asset.id}", which is only ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, asset.duration)} long; shorten the clip or move its in point.` });
|
|
584
584
|
}
|
|
585
585
|
} 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.` });
|
|
586
586
|
const next = clips[i + 1];
|
|
587
|
-
if (next && next.start <
|
|
588
|
-
issues.push({ code: "overlap", severity: "error", ...at, message: `Clips "${clip.id}" and "${next.id}" overlap on track "${track.id}"${where} from ${
|
|
589
|
-
if ((_nullishCoalesce(clip.fadeIn, () => ( 0))) + (_nullishCoalesce(clip.fadeOut, () => ( 0))) > clip.duration +
|
|
587
|
+
if (next && next.start < _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, clip) - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON)
|
|
588
|
+
issues.push({ code: "overlap", severity: "error", ...at, message: `Clips "${clip.id}" and "${next.id}" overlap on track "${track.id}"${where} from ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, next.start)}; move one of them.` });
|
|
589
|
+
if ((_nullishCoalesce(clip.fadeIn, () => ( 0))) + (_nullishCoalesce(clip.fadeOut, () => ( 0))) > clip.duration + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON)
|
|
590
590
|
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.` });
|
|
591
|
-
const anim = (clip.animateIn ? _nullishCoalesce(clip.animateIn.duration, () => (
|
|
592
|
-
if (anim > clip.duration +
|
|
591
|
+
const anim = (clip.animateIn ? _nullishCoalesce(clip.animateIn.duration, () => ( _chunkVKF3PWKRcjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0) + (clip.animateOut ? _nullishCoalesce(clip.animateOut.duration, () => ( _chunkVKF3PWKRcjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0);
|
|
592
|
+
if (anim > clip.duration + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON)
|
|
593
593
|
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.` });
|
|
594
594
|
for (const which of ["animateIn", "animateOut"]) {
|
|
595
595
|
const a = clip[which];
|
|
596
596
|
if (!a) continue;
|
|
597
|
-
const keyed =
|
|
597
|
+
const keyed = _chunkVKF3PWKRcjs.videoClipAnimationProperties.call(void 0, a).filter((p) => _chunkVKF3PWKRcjs.videoKeysOf.call(void 0, p === "opacity" ? clip.opacity : _optionalChain([clip, 'access', _4 => _4.transform, 'optionalAccess', _5 => _5[p]])).length);
|
|
598
598
|
if (keyed.length)
|
|
599
599
|
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.` });
|
|
600
600
|
}
|
|
601
601
|
for (const { property, keys } of videoClipKeyframes(clip)) {
|
|
602
|
-
const outside = keys.filter((k) => k.t < -
|
|
602
|
+
const outside = keys.filter((k) => k.t < -_chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON || k.t > clip.duration + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON);
|
|
603
603
|
if (outside.length)
|
|
604
604
|
issues.push({
|
|
605
605
|
code: "keyframes-outside-clip",
|
|
@@ -610,20 +610,20 @@ function checkVideoProject(project) {
|
|
|
610
610
|
}
|
|
611
611
|
if (clip.transition) {
|
|
612
612
|
const d = clip.transition.duration;
|
|
613
|
-
const before =
|
|
613
|
+
const before = _chunkVKF3PWKRcjs.videoClipBefore.call(void 0, track, clip);
|
|
614
614
|
if (!before) {
|
|
615
615
|
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.` });
|
|
616
616
|
continue;
|
|
617
617
|
}
|
|
618
|
-
if (d > clip.duration +
|
|
618
|
+
if (d > clip.duration + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON || d > before.duration + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) {
|
|
619
619
|
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.` });
|
|
620
620
|
continue;
|
|
621
621
|
}
|
|
622
622
|
if (clip.transition.type === "dip") continue;
|
|
623
|
-
const outgoing =
|
|
624
|
-
const incoming =
|
|
623
|
+
const outgoing = _chunkVKF3PWKRcjs.videoClipHandles.call(void 0, before, assets, sequences).after;
|
|
624
|
+
const incoming = _chunkVKF3PWKRcjs.videoClipHandles.call(void 0, clip, assets, sequences).before;
|
|
625
625
|
const half = d / 2;
|
|
626
|
-
if (outgoing < half -
|
|
626
|
+
if (outgoing < half - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON || incoming < half - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) {
|
|
627
627
|
const fits = 2 * Math.min(outgoing, incoming);
|
|
628
628
|
issues.push({
|
|
629
629
|
code: "transition-handles",
|
|
@@ -640,9 +640,9 @@ function checkVideoProject(project) {
|
|
|
640
640
|
for (const sequence of _nullishCoalesce(project.sequences, () => ( [])))
|
|
641
641
|
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.` });
|
|
642
642
|
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.` });
|
|
643
|
-
const end =
|
|
643
|
+
const end = _chunkVKF3PWKRcjs.videoProjectDuration.call(void 0, project);
|
|
644
644
|
for (const marker of _nullishCoalesce(project.markers, () => ( [])))
|
|
645
|
-
if (marker.time > end +
|
|
645
|
+
if (marker.time > end + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) issues.push({ code: "marker-past-end", severity: "note", marker: marker.id, message: `Marker "${marker.id}" at ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, marker.time)} is past the end (${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, end)}).` });
|
|
646
646
|
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." });
|
|
647
647
|
const rank = { error: 0, warning: 1, note: 2 };
|
|
648
648
|
return issues.sort((a, b) => rank[a.severity] - rank[b.severity]);
|
|
@@ -696,7 +696,7 @@ function mergeSpans(spans) {
|
|
|
696
696
|
const out = [];
|
|
697
697
|
for (const [from, to] of [...spans].sort((a, b) => a[0] - b[0])) {
|
|
698
698
|
const last = out[out.length - 1];
|
|
699
|
-
if (last && from <= last[1] +
|
|
699
|
+
if (last && from <= last[1] + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) last[1] = Math.max(last[1], to);
|
|
700
700
|
else out.push([from, to]);
|
|
701
701
|
}
|
|
702
702
|
return out;
|
|
@@ -710,13 +710,13 @@ function clipAnimatables(clip) {
|
|
|
710
710
|
// A speed ramp is keys in clip time too, so trims and splits keep it on the same frames of source.
|
|
711
711
|
{ get: () => c.timeRemap, set: (v) => c.timeRemap = v }
|
|
712
712
|
];
|
|
713
|
-
for (const p of
|
|
713
|
+
for (const p of _chunkVKF3PWKRcjs.VIDEO_TRANSFORM_PROPERTIES) out.push({ get: () => _optionalChain([c, 'access', _6 => _6.transform, 'optionalAccess', _7 => _7[p]]), set: (v) => c.transform && (c.transform[p] = v) });
|
|
714
714
|
return out;
|
|
715
715
|
}
|
|
716
716
|
function retimeClipKeys(clip, fn) {
|
|
717
717
|
for (const a of clipAnimatables(clip)) {
|
|
718
718
|
const v = a.get();
|
|
719
|
-
if (
|
|
719
|
+
if (_chunkVKF3PWKRcjs.isVideoKeyframes.call(void 0, v)) a.set(fn(v));
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
722
|
var OPTIONAL_CLIP_FIELDS = ["name", "effects", "values", "provider", "opacity", "transform", "fit", "blend", "grade", "animateIn", "animateOut", "fadeIn", "fadeOut", "fadeInCurve", "fadeOutCurve", "transition", "in", "speed", "timeRemap", "volume", "muted", "color", "fontSize", "fontFamily", "fontWeight", "background"];
|
|
@@ -733,8 +733,8 @@ var Editor = (_class = class {
|
|
|
733
733
|
return t;
|
|
734
734
|
}
|
|
735
735
|
clip(id) {
|
|
736
|
-
const at =
|
|
737
|
-
const nested = at ? null :
|
|
736
|
+
const at = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, this.p, id);
|
|
737
|
+
const nested = at ? null : _chunkVKF3PWKRcjs.findVideoSequenceClip.call(void 0, this.p, id);
|
|
738
738
|
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).`);
|
|
739
739
|
if (!at) {
|
|
740
740
|
const ids = this.p.tracks.flatMap((t) => t.clips.map((c) => c.id));
|
|
@@ -751,10 +751,10 @@ var Editor = (_class = class {
|
|
|
751
751
|
return a;
|
|
752
752
|
}
|
|
753
753
|
fits(track, start, duration, ignore, what) {
|
|
754
|
-
const hit =
|
|
754
|
+
const hit = _chunkVKF3PWKRcjs.videoOverlap.call(void 0, track, start, start + duration, ignore);
|
|
755
755
|
if (hit) {
|
|
756
|
-
const free =
|
|
757
|
-
refuse(`${what} at ${
|
|
756
|
+
const free = _chunkVKF3PWKRcjs.nextFreeVideoSlot.call(void 0, track, start, duration, ignore);
|
|
757
|
+
refuse(`${what} at ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, start)}\u2013${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, start + duration)} would overlap clip "${hit.id}" (${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, hit))}) on track "${track.id}"; the next free place is ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, free)}, or use mode "insert" to push later clips along or "overwrite" to replace what is there.`);
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
760
|
kindFits(track, clip) {
|
|
@@ -770,14 +770,14 @@ var Editor = (_class = class {
|
|
|
770
770
|
/** Moves every clip on `track` starting at or after `from` by `delta`. */
|
|
771
771
|
shift(track, from, delta, except = /* @__PURE__ */ new Set()) {
|
|
772
772
|
if (!delta) return;
|
|
773
|
-
for (const c of track.clips) if (!except.has(c.id) && c.start >= from -
|
|
773
|
+
for (const c of track.clips) if (!except.has(c.id) && c.start >= from - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) c.start = Math.max(0, c.start + delta);
|
|
774
774
|
track.clips.sort((a, b) => a.start - b.start);
|
|
775
775
|
}
|
|
776
776
|
get frame() {
|
|
777
777
|
return 1e3 / this.p.fps;
|
|
778
778
|
}
|
|
779
779
|
ids() {
|
|
780
|
-
return
|
|
780
|
+
return _chunkVKF3PWKRcjs.allVideoClipIds.call(void 0, this.p);
|
|
781
781
|
}
|
|
782
782
|
/**
|
|
783
783
|
* The tracks a ripple on `sources` moves, top to bottom: the sources, and every unlocked
|
|
@@ -785,8 +785,8 @@ var Editor = (_class = class {
|
|
|
785
785
|
*/
|
|
786
786
|
rippleTracks(sources) {
|
|
787
787
|
const set = new Set(sources);
|
|
788
|
-
if ([...set].some(
|
|
789
|
-
for (const t of this.p.tracks) if (
|
|
788
|
+
if ([...set].some(_chunkVKF3PWKRcjs.videoTrackSyncLocked)) {
|
|
789
|
+
for (const t of this.p.tracks) if (_chunkVKF3PWKRcjs.videoTrackSyncLocked.call(void 0, t) && !t.locked) set.add(t);
|
|
790
790
|
}
|
|
791
791
|
return this.p.tracks.filter((t) => set.has(t));
|
|
792
792
|
}
|
|
@@ -803,7 +803,7 @@ var Editor = (_class = class {
|
|
|
803
803
|
return open;
|
|
804
804
|
}
|
|
805
805
|
range(from, to) {
|
|
806
|
-
if (!(to - from >
|
|
806
|
+
if (!(to - from > _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON)) refuse(`"to" (${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, to)}) must be after "from" (${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, from)}).`);
|
|
807
807
|
}
|
|
808
808
|
/** Moves a media or compound clip's in point by `delta` of timeline time (stills, titles and colours have none). */
|
|
809
809
|
moveIn(clip, delta) {
|
|
@@ -812,18 +812,18 @@ var Editor = (_class = class {
|
|
|
812
812
|
if (clip.in < 1e-9) delete clip.in;
|
|
813
813
|
return;
|
|
814
814
|
}
|
|
815
|
-
if (clip.type !== "media" || _optionalChain([
|
|
816
|
-
clip.in = Math.max(0, (_nullishCoalesce(clip.in, () => ( 0))) + delta *
|
|
815
|
+
if (clip.type !== "media" || _optionalChain([_chunkVKF3PWKRcjs.videoAssetMap.call(void 0, this.p), 'access', _9 => _9.get, 'call', _10 => _10(clip.asset), 'optionalAccess', _11 => _11.kind]) === "image") return;
|
|
816
|
+
clip.in = Math.max(0, (_nullishCoalesce(clip.in, () => ( 0))) + delta * _chunkVKF3PWKRcjs.videoClipSpeed.call(void 0, clip));
|
|
817
817
|
if (clip.in < 1e-9) delete clip.in;
|
|
818
818
|
}
|
|
819
819
|
/** Moves a clip's head `delta` later in time (start, in point and keys); the caller sets start and duration. */
|
|
820
820
|
trimHead(clip, delta) {
|
|
821
821
|
if (!isRamped(clip)) this.moveIn(clip, delta);
|
|
822
|
-
retimeClipKeys(clip, (v) =>
|
|
822
|
+
retimeClipKeys(clip, (v) => _chunkVKF3PWKRcjs.retimeVideoAnimatable.call(void 0, v, -delta));
|
|
823
823
|
}
|
|
824
824
|
/** Cuts `clip` at `at` (inside it): the left part keeps the id, the right part is returned. */
|
|
825
825
|
cut(track, clip, at, id) {
|
|
826
|
-
const end =
|
|
826
|
+
const end = _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, clip);
|
|
827
827
|
const right = { ...structuredClone(clip), id: _nullishCoalesce(id, () => ( freshId(`${clip.id}-`, this.ids()))), start: at, duration: end - at };
|
|
828
828
|
delete right.transition;
|
|
829
829
|
delete right.fadeIn;
|
|
@@ -831,9 +831,9 @@ var Editor = (_class = class {
|
|
|
831
831
|
delete right.animateIn;
|
|
832
832
|
const leftValues = clipAnimatables(clip);
|
|
833
833
|
clipAnimatables(right).forEach((r, i) => {
|
|
834
|
-
const [l, rr] =
|
|
835
|
-
if (
|
|
836
|
-
if (
|
|
834
|
+
const [l, rr] = _chunkVKF3PWKRcjs.splitVideoAnimatable.call(void 0, leftValues[i].get(), at - clip.start);
|
|
835
|
+
if (_chunkVKF3PWKRcjs.isVideoKeyframes.call(void 0, l)) leftValues[i].set(l);
|
|
836
|
+
if (_chunkVKF3PWKRcjs.isVideoKeyframes.call(void 0, rr)) r.set(rr);
|
|
837
837
|
});
|
|
838
838
|
if (!isRamped(right)) this.moveIn(right, at - clip.start);
|
|
839
839
|
clip.duration = at - clip.start;
|
|
@@ -847,7 +847,7 @@ var Editor = (_class = class {
|
|
|
847
847
|
/** Cuts every clip on `tracks` that runs across `at`; returns the new right-hand parts. */
|
|
848
848
|
cutAcross(tracks, at) {
|
|
849
849
|
const made = [];
|
|
850
|
-
for (const t of tracks) for (const c of [...t.clips]) if (c.start < at -
|
|
850
|
+
for (const t of tracks) for (const c of [...t.clips]) if (c.start < at - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON && _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, c) > at + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) made.push(this.cut(t, c, at));
|
|
851
851
|
return made;
|
|
852
852
|
}
|
|
853
853
|
/**
|
|
@@ -865,10 +865,10 @@ var Editor = (_class = class {
|
|
|
865
865
|
*/
|
|
866
866
|
close(tracks, from, to) {
|
|
867
867
|
for (const t of tracks) {
|
|
868
|
-
const hit =
|
|
868
|
+
const hit = _chunkVKF3PWKRcjs.videoOverlap.call(void 0, t, from, to);
|
|
869
869
|
if (hit)
|
|
870
870
|
refuse(
|
|
871
|
-
`Rippling out ${
|
|
871
|
+
`Rippling out ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, from)}\u2013${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, to)} would pull track "${t.id}" out of sync: clip "${hit.id}" (${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, _chunkVKF3PWKRcjs.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.`
|
|
872
872
|
);
|
|
873
873
|
}
|
|
874
874
|
for (const t of tracks) this.shift(t, to, from - to);
|
|
@@ -880,10 +880,10 @@ var Editor = (_class = class {
|
|
|
880
880
|
clear(track, from, to, report) {
|
|
881
881
|
for (const c of [...track.clips]) {
|
|
882
882
|
const start = c.start;
|
|
883
|
-
const end =
|
|
884
|
-
if (end <= from +
|
|
885
|
-
const coversHead = start >= from -
|
|
886
|
-
const coversTail = end <= to +
|
|
883
|
+
const end = _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, c);
|
|
884
|
+
if (end <= from + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON || start >= to - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) continue;
|
|
885
|
+
const coversHead = start >= from - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON;
|
|
886
|
+
const coversTail = end <= to + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON;
|
|
887
887
|
if (coversHead && coversTail) {
|
|
888
888
|
track.clips = track.clips.filter((x) => x !== c);
|
|
889
889
|
report.removed.push(c.id);
|
|
@@ -906,8 +906,8 @@ var Editor = (_class = class {
|
|
|
906
906
|
/** Clamps a slip, roll or slide to `[lo, hi]`, refusing when it cannot move that way at all. */
|
|
907
907
|
clamp(delta, lo, hi, why) {
|
|
908
908
|
const applied = Math.min(Math.max(delta, Math.min(0, lo)), Math.max(0, hi));
|
|
909
|
-
if (Math.abs(delta) >
|
|
910
|
-
return Math.abs(applied) <=
|
|
909
|
+
if (Math.abs(delta) > _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON && Math.abs(applied) <= _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) refuse(why());
|
|
910
|
+
return Math.abs(applied) <= _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON ? 0 : applied;
|
|
911
911
|
}
|
|
912
912
|
/** Places a clip on a track by `mode`, returning what it cut, trimmed, removed and rippled. */
|
|
913
913
|
place(track, clip, mode, outcome) {
|
|
@@ -917,14 +917,14 @@ var Editor = (_class = class {
|
|
|
917
917
|
outcome.rippled = tracks.map((t) => t.id);
|
|
918
918
|
} else if (mode === "overwrite") {
|
|
919
919
|
const report = { removed: [], trimmed: [], created: [] };
|
|
920
|
-
this.clear(track, clip.start,
|
|
920
|
+
this.clear(track, clip.start, _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, clip), report);
|
|
921
921
|
Object.assign(outcome, report);
|
|
922
922
|
} else this.fits(track, clip.start, clip.duration, /* @__PURE__ */ new Set([clip.id]), `Clip "${clip.id}"`);
|
|
923
923
|
track.clips.push(clip);
|
|
924
924
|
track.clips.sort((a, b) => a.start - b.start);
|
|
925
925
|
}
|
|
926
926
|
placement(mode, ripple) {
|
|
927
|
-
if (mode !== void 0 && !
|
|
927
|
+
if (mode !== void 0 && !_chunkVKF3PWKRcjs.VIDEO_PLACEMENT_MODES.includes(mode)) refuse(`"mode" must be ${_chunkVKF3PWKRcjs.VIDEO_PLACEMENT_MODES.map((m) => `"${m}"`).join(", ")}.`);
|
|
928
928
|
if (ripple && mode !== void 0 && mode !== "insert") refuse(`"ripple" means mode "insert", so it cannot go with mode "${mode}"; pass one or the other.`);
|
|
929
929
|
return _nullishCoalesce(mode, () => ( (ripple ? "insert" : "refuse")));
|
|
930
930
|
}
|
|
@@ -961,7 +961,7 @@ var Editor = (_class = class {
|
|
|
961
961
|
}
|
|
962
962
|
case "remove_asset": {
|
|
963
963
|
const asset = this.asset(e.asset);
|
|
964
|
-
const users =
|
|
964
|
+
const users = _chunkVKF3PWKRcjs.allVideoTracks.call(void 0, this.p).flatMap(({ track: t }) => t.clips.filter((c) => c.type === "media" && c.asset === asset.id).map((c) => c.id));
|
|
965
965
|
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.`);
|
|
966
966
|
this.p.assets = this.p.assets.filter((a) => a !== asset);
|
|
967
967
|
return this.outcomes.push({ op: e.op, asset: asset.id });
|
|
@@ -1014,12 +1014,12 @@ var Editor = (_class = class {
|
|
|
1014
1014
|
else draft.duration = (asset.duration - (_nullishCoalesce(draft.in, () => ( 0)))) / (_nullishCoalesce(draft.speed, () => ( 1)));
|
|
1015
1015
|
if (!(draft.duration > 0)) refuse(`"in" (${draft.in} ms) is at or past the end of "${asset.id}" (${asset.duration} ms).`);
|
|
1016
1016
|
} else if (draft.type === "sequence") {
|
|
1017
|
-
const length =
|
|
1017
|
+
const length = _chunkVKF3PWKRcjs.videoSequenceDuration.call(void 0, _chunkVKF3PWKRcjs.videoSequenceMap.call(void 0, this.p).get(draft.sequence)) - (_nullishCoalesce(draft.in, () => ( 0)));
|
|
1018
1018
|
if (!(length > 0)) refuse(`"in" (${_nullishCoalesce(draft.in, () => ( 0))} ms) is at or past the end of sequence "${draft.sequence}".`);
|
|
1019
1019
|
draft.duration = length;
|
|
1020
1020
|
} else draft.duration = VIDEO_DEFAULT_TITLE_DURATION;
|
|
1021
1021
|
}
|
|
1022
|
-
const end =
|
|
1022
|
+
const end = _chunkVKF3PWKRcjs.sortedVideoClips.call(void 0, track).reduce((m, c) => Math.max(m, _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, c)), 0);
|
|
1023
1023
|
draft.start ??= end;
|
|
1024
1024
|
const clip = parseVideoClip(draft, "clip");
|
|
1025
1025
|
const outcome = { op: e.op, clip: clip.id, track: track.id };
|
|
@@ -1044,20 +1044,20 @@ var Editor = (_class = class {
|
|
|
1044
1044
|
case "trim_clip": {
|
|
1045
1045
|
const { track, clip } = this.clip(e.clip);
|
|
1046
1046
|
this.unlocked(track);
|
|
1047
|
-
const speed =
|
|
1048
|
-
const end =
|
|
1047
|
+
const speed = _chunkVKF3PWKRcjs.videoClipSpeed.call(void 0, clip);
|
|
1048
|
+
const end = _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, clip);
|
|
1049
1049
|
const minimum = 1e3 / this.p.fps;
|
|
1050
|
-
const assets =
|
|
1050
|
+
const assets = _chunkVKF3PWKRcjs.videoAssetMap.call(void 0, this.p);
|
|
1051
1051
|
if (e.edge === "start") {
|
|
1052
1052
|
const delta = e.to - clip.start;
|
|
1053
|
-
if (clip.duration - delta < minimum -
|
|
1053
|
+
if (clip.duration - delta < minimum - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) refuse(`Trimming the start to ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it ends at ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, end)}.`);
|
|
1054
1054
|
if (clip.type === "media" && !isRamped(clip) || clip.type === "sequence") {
|
|
1055
1055
|
const sourceIn = (_nullishCoalesce(clip.in, () => ( 0))) + delta * speed;
|
|
1056
|
-
if (sourceIn < -
|
|
1056
|
+
if (sourceIn < -_chunkVKF3PWKRcjs.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 ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, clip.start - (_nullishCoalesce(clip.in, () => ( 0))) / speed)}).`);
|
|
1057
1057
|
clip.in = Math.max(0, sourceIn);
|
|
1058
1058
|
if (clip.in === 0) delete clip.in;
|
|
1059
1059
|
}
|
|
1060
|
-
retimeClipKeys(clip, (v) =>
|
|
1060
|
+
retimeClipKeys(clip, (v) => _chunkVKF3PWKRcjs.retimeVideoAnimatable.call(void 0, v, -delta));
|
|
1061
1061
|
if (e.ripple) {
|
|
1062
1062
|
const tracks = this.rippleTracks([track]);
|
|
1063
1063
|
if (delta > 0) {
|
|
@@ -1078,17 +1078,17 @@ var Editor = (_class = class {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
} else {
|
|
1080
1080
|
const duration = e.to - clip.start;
|
|
1081
|
-
if (duration < minimum -
|
|
1081
|
+
if (duration < minimum - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) refuse(`Trimming the end to ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it starts at ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, clip.start)}.`);
|
|
1082
1082
|
if (clip.type === "media" && !isRamped(clip)) {
|
|
1083
1083
|
const asset = assets.get(clip.asset);
|
|
1084
1084
|
const out = (_nullishCoalesce(clip.in, () => ( 0))) + duration * speed;
|
|
1085
|
-
if (_optionalChain([asset, 'optionalAccess', _12 => _12.duration]) !== void 0 && out > asset.duration +
|
|
1086
|
-
refuse(`"${clip.id}" can end at most at ${
|
|
1085
|
+
if (_optionalChain([asset, 'optionalAccess', _12 => _12.duration]) !== void 0 && out > asset.duration + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON)
|
|
1086
|
+
refuse(`"${clip.id}" can end at most at ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, clip.start + (asset.duration - (_nullishCoalesce(clip.in, () => ( 0)))) / speed)}, where "${asset.id}" runs out.`);
|
|
1087
1087
|
}
|
|
1088
1088
|
if (clip.type === "sequence") {
|
|
1089
|
-
const seq =
|
|
1090
|
-
const length = seq ?
|
|
1091
|
-
if ((_nullishCoalesce(clip.in, () => ( 0))) + duration > length +
|
|
1089
|
+
const seq = _chunkVKF3PWKRcjs.videoSequenceMap.call(void 0, this.p).get(clip.sequence);
|
|
1090
|
+
const length = seq ? _chunkVKF3PWKRcjs.videoSequenceDuration.call(void 0, seq) : Infinity;
|
|
1091
|
+
if ((_nullishCoalesce(clip.in, () => ( 0))) + duration > length + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) refuse(`"${clip.id}" can end at most at ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, clip.start + length - (_nullishCoalesce(clip.in, () => ( 0))))}, where sequence "${clip.sequence}" ends.`);
|
|
1092
1092
|
}
|
|
1093
1093
|
if (e.ripple) {
|
|
1094
1094
|
const tracks = this.rippleTracks([track]);
|
|
@@ -1110,9 +1110,9 @@ var Editor = (_class = class {
|
|
|
1110
1110
|
case "split_clip": {
|
|
1111
1111
|
const { track, clip } = this.clip(e.clip);
|
|
1112
1112
|
this.unlocked(track);
|
|
1113
|
-
const end =
|
|
1113
|
+
const end = _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, clip);
|
|
1114
1114
|
const minimum = 1e3 / this.p.fps;
|
|
1115
|
-
if (e.at < clip.start + minimum -
|
|
1115
|
+
if (e.at < clip.start + minimum - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON || e.at > end - minimum + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) refuse(`${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, e.at)} is not inside "${clip.id}" (${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, clip.start)}\u2013${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, end)}), at least a frame from either end.`);
|
|
1116
1116
|
if (e.id !== void 0 && this.ids().includes(e.id)) refuse(`There is already a clip "${e.id}".`);
|
|
1117
1117
|
const right = this.cut(track, clip, e.at, e.id);
|
|
1118
1118
|
return this.outcomes.push({ op: e.op, clips: [clip.id, right.id], clip: right.id, track: track.id });
|
|
@@ -1123,12 +1123,12 @@ var Editor = (_class = class {
|
|
|
1123
1123
|
for (const track of new Set(found.map((f) => f.track))) track.clips = track.clips.filter((c) => !found.some((f) => f.clip === c));
|
|
1124
1124
|
if (!e.ripple) return this.outcomes.push({ op: e.op, clips: found.map((f) => f.clip.id) });
|
|
1125
1125
|
const rippled = /* @__PURE__ */ new Set();
|
|
1126
|
-
const groups = [...new Set(found.map((f) => f.track))].filter((t) => !
|
|
1127
|
-
if (found.some((f) =>
|
|
1126
|
+
const groups = [...new Set(found.map((f) => f.track))].filter((t) => !_chunkVKF3PWKRcjs.videoTrackSyncLocked.call(void 0, t)).map((t) => [t]);
|
|
1127
|
+
if (found.some((f) => _chunkVKF3PWKRcjs.videoTrackSyncLocked.call(void 0, f.track))) groups.push(found.filter((f) => _chunkVKF3PWKRcjs.videoTrackSyncLocked.call(void 0, f.track)).map((f) => f.track));
|
|
1128
1128
|
for (const sources of groups) {
|
|
1129
1129
|
const tracks = this.rippleTracks(sources);
|
|
1130
1130
|
tracks.forEach((t) => rippled.add(t));
|
|
1131
|
-
const spans = mergeSpans(found.filter((f) => sources.includes(f.track)).map((f) => [f.clip.start,
|
|
1131
|
+
const spans = mergeSpans(found.filter((f) => sources.includes(f.track)).map((f) => [f.clip.start, _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, f.clip)]));
|
|
1132
1132
|
for (const [from, to] of spans.reverse()) this.close(tracks, from, to);
|
|
1133
1133
|
}
|
|
1134
1134
|
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) });
|
|
@@ -1144,7 +1144,7 @@ var Editor = (_class = class {
|
|
|
1144
1144
|
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.");
|
|
1145
1145
|
let stretch = 1;
|
|
1146
1146
|
if (at.clip.type === "media" && !("duration" in set)) {
|
|
1147
|
-
const was =
|
|
1147
|
+
const was = _chunkVKF3PWKRcjs.videoClipSpeed.call(void 0, at.clip);
|
|
1148
1148
|
const now = "speed" in set ? set.speed : _optionalChain([e, 'access', _13 => _13.remove, 'optionalAccess', _14 => _14.includes, 'call', _15 => _15("speed")]) ? 1 : was;
|
|
1149
1149
|
if (now !== was) {
|
|
1150
1150
|
set.duration = at.clip.duration * was / now;
|
|
@@ -1152,7 +1152,7 @@ var Editor = (_class = class {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
1154
|
const next = { ...structuredClone(at.clip), ...set };
|
|
1155
|
-
if (stretch !== 1) retimeClipKeys(next, (v) =>
|
|
1155
|
+
if (stretch !== 1) retimeClipKeys(next, (v) => _chunkVKF3PWKRcjs.retimeVideoAnimatable.call(void 0, v, 0, stretch));
|
|
1156
1156
|
for (const k of _nullishCoalesce(e.remove, () => ( []))) delete next[k];
|
|
1157
1157
|
const clip = parseVideoClip(next, "set");
|
|
1158
1158
|
if (clip.type === "media" && clip.asset !== at.clip.asset) this.kindFits(at.track, clip);
|
|
@@ -1169,13 +1169,13 @@ var Editor = (_class = class {
|
|
|
1169
1169
|
const asset = this.asset(clip.asset);
|
|
1170
1170
|
if (asset.kind === "image") refuse(`Clip "${clip.id}" is a still ("${asset.id}"), so it has no motion to ramp.`);
|
|
1171
1171
|
const media = clip;
|
|
1172
|
-
const end =
|
|
1172
|
+
const end = _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, media);
|
|
1173
1173
|
const duration = _nullishCoalesce(e.duration, () => ( media.duration));
|
|
1174
|
-
if (!(duration >= 1e3 / this.p.fps -
|
|
1174
|
+
if (!(duration >= 1e3 / this.p.fps - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON)) refuse(`"duration" must be at least a frame (${Math.ceil(1e3 / this.p.fps)} ms).`);
|
|
1175
1175
|
if (e.keys === null) {
|
|
1176
1176
|
if (!media.timeRemap) refuse(`Clip "${clip.id}" has no speed ramp to remove.`);
|
|
1177
1177
|
const from = (_nullishCoalesce(media.in, () => ( 0))) + media.timeRemap.keys[0].v;
|
|
1178
|
-
if (asset.duration !== void 0 && from + duration > asset.duration +
|
|
1178
|
+
if (asset.duration !== void 0 && from + duration > asset.duration + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON)
|
|
1179
1179
|
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.`);
|
|
1180
1180
|
delete media.timeRemap;
|
|
1181
1181
|
media.in = from;
|
|
@@ -1183,17 +1183,17 @@ var Editor = (_class = class {
|
|
|
1183
1183
|
} else {
|
|
1184
1184
|
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).');
|
|
1185
1185
|
const remap = parseVideoTimeRemap({ keys: e.keys }, void 0, "keys");
|
|
1186
|
-
remap.keys =
|
|
1187
|
-
|
|
1188
|
-
const span =
|
|
1189
|
-
if (asset.duration !== void 0 && (_nullishCoalesce(media.in, () => ( 0))) + span.to > asset.duration +
|
|
1186
|
+
remap.keys = _chunkVKF3PWKRcjs.sortVideoKeys.call(void 0, remap.keys);
|
|
1187
|
+
_chunkVKF3PWKRcjs.checkVideoTimeRemap.call(void 0, remap, "keys");
|
|
1188
|
+
const span = _chunkVKF3PWKRcjs.videoTimeRemapSpan.call(void 0, remap);
|
|
1189
|
+
if (asset.duration !== void 0 && (_nullishCoalesce(media.in, () => ( 0))) + span.to > asset.duration + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON)
|
|
1190
1190
|
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.`);
|
|
1191
1191
|
media.timeRemap = remap;
|
|
1192
1192
|
delete media.speed;
|
|
1193
1193
|
}
|
|
1194
1194
|
const newEnd = media.start + duration;
|
|
1195
1195
|
const outcome = { op: e.op, clip: clip.id, track: track.id };
|
|
1196
|
-
if (Math.abs(newEnd - end) >
|
|
1196
|
+
if (Math.abs(newEnd - end) > _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) {
|
|
1197
1197
|
if (e.ripple) {
|
|
1198
1198
|
const tracks = this.rippleTracks([track]);
|
|
1199
1199
|
if (newEnd < end) {
|
|
@@ -1225,8 +1225,8 @@ var Editor = (_class = class {
|
|
|
1225
1225
|
if (clip.type !== "media" && clip.type !== "sequence") refuse(`Clip "${clip.id}" is a ${clip.type === "text" ? "title" : clip.type === "effect" ? "effect clip" : "colour"}, so it has no source to slip; only video, audio and compound clips slip.`);
|
|
1226
1226
|
const source = clip.type === "sequence" ? `sequence "${clip.sequence}"` : `"${this.asset(clip.asset).id}"`;
|
|
1227
1227
|
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.`);
|
|
1228
|
-
const handles =
|
|
1229
|
-
const { lead, tail } =
|
|
1228
|
+
const handles = _chunkVKF3PWKRcjs.videoClipHandles.call(void 0, clip, _chunkVKF3PWKRcjs.videoAssetMap.call(void 0, this.p), _chunkVKF3PWKRcjs.videoSequenceMap.call(void 0, this.p));
|
|
1229
|
+
const { lead, tail } = _chunkVKF3PWKRcjs.videoClipOverhang.call(void 0, track, clip);
|
|
1230
1230
|
const delta = this.clamp(
|
|
1231
1231
|
e.delta,
|
|
1232
1232
|
lead - handles.before,
|
|
@@ -1244,13 +1244,13 @@ var Editor = (_class = class {
|
|
|
1244
1244
|
this.unlocked(track);
|
|
1245
1245
|
const L = left.clip;
|
|
1246
1246
|
const R = right.clip;
|
|
1247
|
-
if (Math.abs(
|
|
1248
|
-
if (Math.abs(
|
|
1249
|
-
refuse(`"${L.id}" ends at ${
|
|
1247
|
+
if (Math.abs(_chunkVKF3PWKRcjs.videoClipEnd.call(void 0, L) - R.start) > _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) {
|
|
1248
|
+
if (Math.abs(_chunkVKF3PWKRcjs.videoClipEnd.call(void 0, R) - L.start) <= _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) refuse(`"${R.id}" comes before "${L.id}"; pass left "${R.id}" and right "${L.id}".`);
|
|
1249
|
+
refuse(`"${L.id}" ends at ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, L))} but "${R.id}" starts at ${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, R.start)}; a roll needs two clips that meet at a cut (use trim_clip to move one edge).`);
|
|
1250
1250
|
}
|
|
1251
|
-
const assets =
|
|
1252
|
-
const lo = Math.max(-(L.duration - this.frame), -(
|
|
1253
|
-
const hi = Math.min(R.duration - this.frame,
|
|
1251
|
+
const assets = _chunkVKF3PWKRcjs.videoAssetMap.call(void 0, this.p);
|
|
1252
|
+
const lo = Math.max(-(L.duration - this.frame), -(_chunkVKF3PWKRcjs.videoClipHandles.call(void 0, R, assets, _chunkVKF3PWKRcjs.videoSequenceMap.call(void 0, this.p)).before - _chunkVKF3PWKRcjs.videoClipOverhang.call(void 0, track, R).lead));
|
|
1253
|
+
const hi = Math.min(R.duration - this.frame, _chunkVKF3PWKRcjs.videoClipHandles.call(void 0, L, assets, _chunkVKF3PWKRcjs.videoSequenceMap.call(void 0, this.p)).after - _chunkVKF3PWKRcjs.videoClipOverhang.call(void 0, track, L).tail);
|
|
1254
1254
|
const delta = this.clamp(
|
|
1255
1255
|
e.delta,
|
|
1256
1256
|
lo,
|
|
@@ -1266,18 +1266,18 @@ var Editor = (_class = class {
|
|
|
1266
1266
|
case "slide_clip": {
|
|
1267
1267
|
const { track, clip } = this.clip(e.clip);
|
|
1268
1268
|
this.unlocked(track);
|
|
1269
|
-
const before =
|
|
1270
|
-
const after =
|
|
1269
|
+
const before = _chunkVKF3PWKRcjs.videoClipBefore.call(void 0, track, clip);
|
|
1270
|
+
const after = _chunkVKF3PWKRcjs.videoClipAfter.call(void 0, track, clip);
|
|
1271
1271
|
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.`);
|
|
1272
|
-
const assets =
|
|
1273
|
-
const end =
|
|
1272
|
+
const assets = _chunkVKF3PWKRcjs.videoAssetMap.call(void 0, this.p);
|
|
1273
|
+
const end = _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, clip);
|
|
1274
1274
|
const others = track.clips.filter((c) => c !== clip);
|
|
1275
1275
|
const room = {
|
|
1276
|
-
earlier: before ? before.duration - this.frame : clip.start - others.filter((c) =>
|
|
1277
|
-
later: after ? after.duration - this.frame : others.filter((c) => c.start >= end -
|
|
1276
|
+
earlier: before ? before.duration - this.frame : clip.start - others.filter((c) => _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, c) <= clip.start + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.max(m, _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, c)), 0),
|
|
1277
|
+
later: after ? after.duration - this.frame : others.filter((c) => c.start >= end - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.min(m, c.start - end), Infinity)
|
|
1278
1278
|
};
|
|
1279
|
-
const lo = -Math.min(room.earlier, after ?
|
|
1280
|
-
const hi = Math.min(room.later, before ?
|
|
1279
|
+
const lo = -Math.min(room.earlier, after ? _chunkVKF3PWKRcjs.videoClipHandles.call(void 0, after, assets, _chunkVKF3PWKRcjs.videoSequenceMap.call(void 0, this.p)).before - _chunkVKF3PWKRcjs.videoClipOverhang.call(void 0, track, after).lead : Infinity);
|
|
1280
|
+
const hi = Math.min(room.later, before ? _chunkVKF3PWKRcjs.videoClipHandles.call(void 0, before, assets, _chunkVKF3PWKRcjs.videoSequenceMap.call(void 0, this.p)).after - _chunkVKF3PWKRcjs.videoClipOverhang.call(void 0, track, before).tail : Infinity);
|
|
1281
1281
|
const delta = this.clamp(
|
|
1282
1282
|
e.delta,
|
|
1283
1283
|
lo,
|
|
@@ -1310,29 +1310,29 @@ var Editor = (_class = class {
|
|
|
1310
1310
|
}
|
|
1311
1311
|
case "split_at": {
|
|
1312
1312
|
const tracks = this.rangeTracks(e.tracks);
|
|
1313
|
-
const lefts = tracks.flatMap((t) => t.clips.filter((c) => c.start < e.at -
|
|
1314
|
-
if (!lefts.length) refuse(`No clip runs across ${
|
|
1313
|
+
const lefts = tracks.flatMap((t) => t.clips.filter((c) => c.start < e.at - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON && _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, c) > e.at + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON).map((c) => c.id));
|
|
1314
|
+
if (!lefts.length) refuse(`No clip runs across ${_chunkVKF3PWKRcjs.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.`);
|
|
1315
1315
|
const created = this.cutAcross(tracks, e.at).map((c) => c.id);
|
|
1316
1316
|
return this.outcomes.push({ op: e.op, clips: lefts, created });
|
|
1317
1317
|
}
|
|
1318
1318
|
case "set_keyframes": {
|
|
1319
1319
|
const { track, clip } = this.clip(e.clip);
|
|
1320
1320
|
this.unlocked(track);
|
|
1321
|
-
if (!
|
|
1321
|
+
if (!_chunkVKF3PWKRcjs.VIDEO_KEYFRAME_PROPERTIES.includes(e.property)) refuse(`"${e.property}" cannot be keyframed; use one of ${_chunkVKF3PWKRcjs.VIDEO_KEYFRAME_PROPERTIES.join(", ")}.`);
|
|
1322
1322
|
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.`);
|
|
1323
|
-
const limits =
|
|
1324
|
-
const transform =
|
|
1323
|
+
const limits = _chunkVKF3PWKRcjs.VIDEO_KEYFRAME_LIMITS[e.property];
|
|
1324
|
+
const transform = _chunkVKF3PWKRcjs.VIDEO_TRANSFORM_PROPERTIES.includes(e.property);
|
|
1325
1325
|
const c = clip;
|
|
1326
1326
|
const current = transform ? _optionalChain([c, 'access', _18 => _18.transform, 'optionalAccess', _19 => _19[e.property]]) : c[e.property];
|
|
1327
1327
|
let value;
|
|
1328
1328
|
if (e.keys === null) {
|
|
1329
|
-
const v =
|
|
1330
|
-
value =
|
|
1329
|
+
const v = _chunkVKF3PWKRcjs.videoValueAt.call(void 0, current, 0, limits.default);
|
|
1330
|
+
value = _chunkVKF3PWKRcjs.isVideoKeyframes.call(void 0, current) ? v === limits.default ? void 0 : v : current;
|
|
1331
1331
|
} else {
|
|
1332
1332
|
if (!Array.isArray(e.keys) || !e.keys.length) refuse('"keys" must list at least one key { t, v }; pass null to remove the keyframes.');
|
|
1333
1333
|
let sorted = [];
|
|
1334
1334
|
try {
|
|
1335
|
-
sorted =
|
|
1335
|
+
sorted = _chunkVKF3PWKRcjs.sortVideoKeys.call(void 0, e.keys);
|
|
1336
1336
|
} catch (error) {
|
|
1337
1337
|
refuse(error.message);
|
|
1338
1338
|
}
|
|
@@ -1351,12 +1351,12 @@ var Editor = (_class = class {
|
|
|
1351
1351
|
this.unlocked(track);
|
|
1352
1352
|
let at = 0;
|
|
1353
1353
|
const moved = [];
|
|
1354
|
-
for (const clip of
|
|
1355
|
-
if (clip.start >= (_nullishCoalesce(e.from, () => ( 0))) -
|
|
1354
|
+
for (const clip of _chunkVKF3PWKRcjs.sortedVideoClips.call(void 0, track)) {
|
|
1355
|
+
if (clip.start >= (_nullishCoalesce(e.from, () => ( 0))) - _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON && clip.start > at + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) {
|
|
1356
1356
|
clip.start = Math.max(at, _nullishCoalesce(e.from, () => ( 0)));
|
|
1357
1357
|
moved.push(clip.id);
|
|
1358
1358
|
}
|
|
1359
|
-
at = Math.max(at,
|
|
1359
|
+
at = Math.max(at, _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, clip));
|
|
1360
1360
|
}
|
|
1361
1361
|
return this.outcomes.push({ op: e.op, track: track.id, clips: moved });
|
|
1362
1362
|
}
|
|
@@ -1511,7 +1511,7 @@ function videoClipWaveform(clip, peaks, columns) {
|
|
|
1511
1511
|
const step = clip.duration / Math.max(1, n);
|
|
1512
1512
|
for (let c = 0; c < n; c++) {
|
|
1513
1513
|
const { min, max } = videoAudioPeakRange(peaks, start + c * step * speed, start + (c + 1) * step * speed);
|
|
1514
|
-
const gain =
|
|
1514
|
+
const gain = _chunkVKF3PWKRcjs.videoClipSoundGain.call(void 0, clip, (c + 0.5) * step);
|
|
1515
1515
|
out[2 * c] = min * gain;
|
|
1516
1516
|
out[2 * c + 1] = max * gain;
|
|
1517
1517
|
}
|
|
@@ -2076,7 +2076,7 @@ function videoTranscriptTrack(project, track) {
|
|
|
2076
2076
|
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(", ")}.`);
|
|
2077
2077
|
return track;
|
|
2078
2078
|
}
|
|
2079
|
-
const assets =
|
|
2079
|
+
const assets = _chunkVKF3PWKRcjs.videoAssetMap.call(void 0, project);
|
|
2080
2080
|
const transcribed = (t) => t.clips.some((c) => c.type === "media" && _optionalChain([assets, 'access', _21 => _21.get, 'call', _22 => _22(c.asset), 'optionalAccess', _23 => _23.transcript, 'optionalAccess', _24 => _24.length]));
|
|
2081
2081
|
return _nullishCoalesce(_optionalChain([(_nullishCoalesce(project.tracks.find((t) => t.kind === "audio" && transcribed(t)), () => ( project.tracks.find(transcribed)))), 'optionalAccess', _25 => _25.id]), () => ( null));
|
|
2082
2082
|
}
|
|
@@ -2084,16 +2084,16 @@ function videoTimelineTranscript(project, options = {}) {
|
|
|
2084
2084
|
const id = videoTranscriptTrack(project, options.track);
|
|
2085
2085
|
if (!id) return [];
|
|
2086
2086
|
const track = project.tracks.find((t) => t.id === id);
|
|
2087
|
-
const assets =
|
|
2087
|
+
const assets = _chunkVKF3PWKRcjs.videoAssetMap.call(void 0, project);
|
|
2088
2088
|
const out = [];
|
|
2089
|
-
for (const clip of
|
|
2089
|
+
for (const clip of _chunkVKF3PWKRcjs.sortedVideoClips.call(void 0, track)) {
|
|
2090
2090
|
if (clip.type !== "media") continue;
|
|
2091
2091
|
const words = _optionalChain([assets, 'access', _26 => _26.get, 'call', _27 => _27(clip.asset), 'optionalAccess', _28 => _28.transcript]);
|
|
2092
2092
|
if (!_optionalChain([words, 'optionalAccess', _29 => _29.length])) continue;
|
|
2093
|
-
const speed =
|
|
2093
|
+
const speed = _chunkVKF3PWKRcjs.videoClipSpeed.call(void 0, clip);
|
|
2094
2094
|
const from = _nullishCoalesce(clip.in, () => ( 0));
|
|
2095
2095
|
const to = from + clip.duration * speed;
|
|
2096
|
-
const toTimeline = (s) => Math.min(
|
|
2096
|
+
const toTimeline = (s) => Math.min(_chunkVKF3PWKRcjs.videoClipEnd.call(void 0, clip), Math.max(clip.start, clip.start + (s - from) / speed));
|
|
2097
2097
|
words.forEach((w, index) => {
|
|
2098
2098
|
const mid = (w.start + w.end) / 2;
|
|
2099
2099
|
if (mid < from || mid >= to) return;
|
|
@@ -2138,19 +2138,19 @@ function findVideoTranscriptPauses(words, options = {}) {
|
|
|
2138
2138
|
let to = b.start - keep;
|
|
2139
2139
|
if (options.fps) {
|
|
2140
2140
|
const f = 1e3 / options.fps;
|
|
2141
|
-
from =
|
|
2142
|
-
to =
|
|
2141
|
+
from = _chunkVKF3PWKRcjs.snapToVideoFrame.call(void 0, Math.ceil(from / f - 1e-9) * f, options.fps);
|
|
2142
|
+
to = _chunkVKF3PWKRcjs.snapToVideoFrame.call(void 0, Math.floor(to / f + 1e-9) * f, options.fps);
|
|
2143
2143
|
}
|
|
2144
|
-
if (to - from >
|
|
2144
|
+
if (to - from > _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) out.push({ from, to, text: `(pause after "${a.word}")` });
|
|
2145
2145
|
}
|
|
2146
2146
|
return out;
|
|
2147
2147
|
}
|
|
2148
2148
|
function mergeVideoRanges(ranges) {
|
|
2149
|
-
const sorted = ranges.filter((r) => r.to - r.from >
|
|
2149
|
+
const sorted = ranges.filter((r) => r.to - r.from > _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON).map((r) => ({ from: r.from, to: r.to })).sort((a, b) => a.from - b.from);
|
|
2150
2150
|
const out = [];
|
|
2151
2151
|
for (const r of sorted) {
|
|
2152
2152
|
const last = out[out.length - 1];
|
|
2153
|
-
if (last && r.from <= last.to +
|
|
2153
|
+
if (last && r.from <= last.to + _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON) last.to = Math.max(last.to, r.to);
|
|
2154
2154
|
else out.push(r);
|
|
2155
2155
|
}
|
|
2156
2156
|
return out;
|
|
@@ -2234,7 +2234,7 @@ function videoProxyFfmpeg(asset, options = {}) {
|
|
|
2234
2234
|
output
|
|
2235
2235
|
];
|
|
2236
2236
|
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 } : {} };
|
|
2237
|
-
return { asset: asset.id, args, command: ["ffmpeg", ...args].map(
|
|
2237
|
+
return { asset: asset.id, args, command: ["ffmpeg", ...args].map(_chunkVKF3PWKRcjs.videoShellQuote).join(" "), proxy };
|
|
2238
2238
|
}
|
|
2239
2239
|
function videoProxyPlan(project, options = {}) {
|
|
2240
2240
|
const scale = _nullishCoalesce(options.scale, () => ( 0.5));
|
|
@@ -2260,7 +2260,7 @@ var videoSourceFrameTime = (frame, fps) => (frame + 0.5) * 1e3 / fps;
|
|
|
2260
2260
|
var videoFrameCacheKey = (src, frame) => `${frame}@${src}`;
|
|
2261
2261
|
function videoFrameRequestsAt(project, time, srcFor = (l) => l.src) {
|
|
2262
2262
|
const out = [];
|
|
2263
|
-
for (const layer of
|
|
2263
|
+
for (const layer of _chunkVKF3PWKRcjs.videoFrameLeafLayers.call(void 0, _chunkVKF3PWKRcjs.videoFrameAt.call(void 0, project, time).layers)) {
|
|
2264
2264
|
if (layer.type !== "media" || layer.assetKind !== "video") continue;
|
|
2265
2265
|
const src = srcFor(layer);
|
|
2266
2266
|
if (!src) continue;
|
|
@@ -2601,7 +2601,7 @@ var VideoPreviewEngine = (_class5 = class {
|
|
|
2601
2601
|
if (this.destroyed) return;
|
|
2602
2602
|
const state = this.source.getState();
|
|
2603
2603
|
const { project, time, playing } = state;
|
|
2604
|
-
const frame =
|
|
2604
|
+
const frame = _chunkVKF3PWKRcjs.videoFrameAt.call(void 0, project, time);
|
|
2605
2605
|
const scale = resolveVideoPreviewScale(_nullishCoalesce(this.options.previewScale, () => ( state.previewScale)), this.resolutionFor(project.width));
|
|
2606
2606
|
const assets = new Map(project.assets.map((a) => [a.id, a]));
|
|
2607
2607
|
this.srcFor = (layer) => videoPreviewSrc(assets.get(_nullishCoalesce(layer.asset, () => ( ""))), scale, layer.src);
|
|
@@ -2631,7 +2631,7 @@ var VideoPreviewEngine = (_class5 = class {
|
|
|
2631
2631
|
}
|
|
2632
2632
|
};
|
|
2633
2633
|
const sounding = new Map(frame.audio.map((a) => [a.clip, a]));
|
|
2634
|
-
for (const layer of
|
|
2634
|
+
for (const layer of _chunkVKF3PWKRcjs.videoFrameLeafLayers.call(void 0, frame.layers)) {
|
|
2635
2635
|
if (layer.type !== "media" || layer.assetKind !== "video" || !layer.src) continue;
|
|
2636
2636
|
const sound = sounding.get(layer.clip);
|
|
2637
2637
|
sync(layer.clip, this.srcFor(layer), "video", _nullishCoalesce(layer.sourceTime, () => ( 0)), _nullishCoalesce(_optionalChain([sound, 'optionalAccess', _71 => _71.speed]), () => ( 1)), sound ? sound.gain : null);
|
|
@@ -2643,9 +2643,9 @@ var VideoPreviewEngine = (_class5 = class {
|
|
|
2643
2643
|
}
|
|
2644
2644
|
/** With effects, the frame is drawn at the start of its frame, so effect pictures are cached once per frame. */
|
|
2645
2645
|
drawable(project, frame) {
|
|
2646
|
-
if (!_optionalChain([this, 'access', _72 => _72.effects, 'optionalAccess', _73 => _73.available]) || !
|
|
2647
|
-
const at =
|
|
2648
|
-
return at === frame.time ? frame : { ...
|
|
2646
|
+
if (!_optionalChain([this, 'access', _72 => _72.effects, 'optionalAccess', _73 => _73.available]) || !_chunkVKF3PWKRcjs.videoLayersUseEffects.call(void 0, frame.layers)) return frame;
|
|
2647
|
+
const at = _chunkVKF3PWKRcjs.videoEffectFrameTime.call(void 0, frame.time, project.fps);
|
|
2648
|
+
return at === frame.time ? frame : { ..._chunkVKF3PWKRcjs.videoFrameAt.call(void 0, project, at), time: frame.time };
|
|
2649
2649
|
}
|
|
2650
2650
|
redraw() {
|
|
2651
2651
|
if (this.scheduled || this.destroyed) return;
|
|
@@ -2654,7 +2654,7 @@ var VideoPreviewEngine = (_class5 = class {
|
|
|
2654
2654
|
this.scheduled = false;
|
|
2655
2655
|
if (this.destroyed) return;
|
|
2656
2656
|
const { project, time } = this.source.getState();
|
|
2657
|
-
this.draw(this.drawable(project,
|
|
2657
|
+
this.draw(this.drawable(project, _chunkVKF3PWKRcjs.videoFrameAt.call(void 0, project, time)));
|
|
2658
2658
|
});
|
|
2659
2659
|
}
|
|
2660
2660
|
__init33() {this.sourceFor = (layer) => {
|
|
@@ -2697,7 +2697,7 @@ var VideoPreviewEngine = (_class5 = class {
|
|
|
2697
2697
|
if (!source) this.complete = false;
|
|
2698
2698
|
return source;
|
|
2699
2699
|
};
|
|
2700
|
-
|
|
2700
|
+
_chunkVKF3PWKRcjs.drawVideoFrame.call(void 0, this.ctx, frame, sourceFor, resolution, {
|
|
2701
2701
|
defineSvgFilter: this.defineSvgFilter,
|
|
2702
2702
|
lutFor: this.lutFor,
|
|
2703
2703
|
scratch: this.scratch,
|
|
@@ -2797,17 +2797,17 @@ var VideoEditorController = (_class6 = class {
|
|
|
2797
2797
|
constructor(options = {}) {;_class6.prototype.__init37.call(this);_class6.prototype.__init38.call(this);_class6.prototype.__init39.call(this);_class6.prototype.__init40.call(this);_class6.prototype.__init41.call(this);_class6.prototype.__init42.call(this);_class6.prototype.__init43.call(this);_class6.prototype.__init44.call(this);_class6.prototype.__init45.call(this);
|
|
2798
2798
|
this.history = _nullishCoalesce(options.history, () => ( new (0, _chunkFJ2MSI43cjs.HistoryManager)()));
|
|
2799
2799
|
this.audioPeaks = options.audioPeaks instanceof VideoAudioPeaksCache ? options.audioPeaks : new VideoAudioPeaksCache(options.audioPeaks);
|
|
2800
|
-
this.luts = options.luts instanceof
|
|
2800
|
+
this.luts = options.luts instanceof _chunkVKF3PWKRcjs.VideoLutCache ? options.luts : new (0, _chunkVKF3PWKRcjs.VideoLutCache)(options.luts);
|
|
2801
2801
|
this.frameCache = _nullishCoalesce(options.frameCache, () => ( null));
|
|
2802
|
-
this.effects = new (0,
|
|
2802
|
+
this.effects = new (0, _chunkRUZQMYXHcjs.EffectsSlot)();
|
|
2803
2803
|
if (options.effects) this.effects.set(options.effects);
|
|
2804
|
-
this.effectsEngine = new (0,
|
|
2804
|
+
this.effectsEngine = new (0, _chunkVKF3PWKRcjs.VideoEffectsEngine)({ slot: this.effects });
|
|
2805
2805
|
this.project = options.project ? parseVideoProject(options.project) : createVideoProject();
|
|
2806
2806
|
this.issues = checkVideoProject(this.project);
|
|
2807
2807
|
this.readOnly = _nullishCoalesce(options.readOnly, () => ( false));
|
|
2808
2808
|
this.previewScale = checkPreviewScale(_nullishCoalesce(options.previewScale, () => ( "auto")));
|
|
2809
2809
|
this.onChange = options.onChange;
|
|
2810
|
-
this.player = new (0, _chunkSVR5FR7Bcjs.AnimationPlayer)({ clock: options.clock, duration: () =>
|
|
2810
|
+
this.player = new (0, _chunkSVR5FR7Bcjs.AnimationPlayer)({ clock: options.clock, duration: () => _chunkVKF3PWKRcjs.videoProjectDuration.call(void 0, this.project), loop: "none" });
|
|
2811
2811
|
this.state = this.computeState();
|
|
2812
2812
|
this.connect();
|
|
2813
2813
|
}
|
|
@@ -2844,12 +2844,12 @@ var VideoEditorController = (_class6 = class {
|
|
|
2844
2844
|
const h = this.history.getState();
|
|
2845
2845
|
return {
|
|
2846
2846
|
project: this.project,
|
|
2847
|
-
duration:
|
|
2847
|
+
duration: _chunkVKF3PWKRcjs.videoProjectDuration.call(void 0, this.project),
|
|
2848
2848
|
time: p.time,
|
|
2849
2849
|
playing: p.playing,
|
|
2850
2850
|
loop: p.loop,
|
|
2851
2851
|
selection: this.selection,
|
|
2852
|
-
current:
|
|
2852
|
+
current: _chunkVKF3PWKRcjs.videoClipsAt.call(void 0, this.project, p.time).map((c) => c.clip.id),
|
|
2853
2853
|
issues: this.issues,
|
|
2854
2854
|
readOnly: this.readOnly,
|
|
2855
2855
|
error: this.error,
|
|
@@ -2881,7 +2881,7 @@ var VideoEditorController = (_class6 = class {
|
|
|
2881
2881
|
this.issues = checkVideoProject(project);
|
|
2882
2882
|
const ids = new Set(project.tracks.flatMap((t) => t.clips.map((c) => c.id)));
|
|
2883
2883
|
if (this.selection.some((id) => !ids.has(id))) this.selection = this.selection.filter((id) => ids.has(id));
|
|
2884
|
-
this.player.setDuration(() =>
|
|
2884
|
+
this.player.setDuration(() => _chunkVKF3PWKRcjs.videoProjectDuration.call(void 0, this.project));
|
|
2885
2885
|
} finally {
|
|
2886
2886
|
this.applying = false;
|
|
2887
2887
|
}
|
|
@@ -2963,7 +2963,7 @@ var VideoEditorController = (_class6 = class {
|
|
|
2963
2963
|
}
|
|
2964
2964
|
/** Selects clips (unknown ids are dropped). `add` toggles them into the current selection. */
|
|
2965
2965
|
select(clips, options = {}) {
|
|
2966
|
-
const known = _nullishCoalesce(_optionalChain([clips, 'optionalAccess', _89 => _89.filter, 'call', _90 => _90((id) =>
|
|
2966
|
+
const known = _nullishCoalesce(_optionalChain([clips, 'optionalAccess', _89 => _89.filter, 'call', _90 => _90((id) => _chunkVKF3PWKRcjs.findVideoClip.call(void 0, this.project, id))]), () => ( []));
|
|
2967
2967
|
let next;
|
|
2968
2968
|
if (options.add) {
|
|
2969
2969
|
next = [...this.selection];
|
|
@@ -2990,7 +2990,7 @@ var VideoEditorController = (_class6 = class {
|
|
|
2990
2990
|
step(frames) {
|
|
2991
2991
|
this.player.pause();
|
|
2992
2992
|
const fps = this.project.fps;
|
|
2993
|
-
this.player.seek(Math.max(0,
|
|
2993
|
+
this.player.seek(Math.max(0, _chunkVKF3PWKRcjs.snapToVideoFrame.call(void 0, this.player.currentTime, fps) + frames * 1e3 / fps));
|
|
2994
2994
|
}
|
|
2995
2995
|
setLoop(loop) {
|
|
2996
2996
|
this.player.setLoop(loop);
|
|
@@ -3007,14 +3007,14 @@ var VideoEditorController = (_class6 = class {
|
|
|
3007
3007
|
*/
|
|
3008
3008
|
snap(time, options = {}) {
|
|
3009
3009
|
const threshold = _nullishCoalesce(options.threshold, () => ( 8 * 1e3 / this.project.fps));
|
|
3010
|
-
const points =
|
|
3011
|
-
const hit =
|
|
3012
|
-
return hit.snapped !== null ? hit : { time: Math.max(0,
|
|
3010
|
+
const points = _chunkVKF3PWKRcjs.videoSnapPoints.call(void 0, this.project, { exclude: options.exclude, playhead: options.playhead === false ? void 0 : this.player.currentTime });
|
|
3011
|
+
const hit = _chunkVKF3PWKRcjs.snapVideoTime.call(void 0, time, points, threshold);
|
|
3012
|
+
return hit.snapped !== null ? hit : { time: Math.max(0, _chunkVKF3PWKRcjs.snapToVideoFrame.call(void 0, time, this.project.fps)), snapped: null };
|
|
3013
3013
|
}
|
|
3014
3014
|
/** Splits the selected clips (or every clip) under the playhead there, as one undo step. */
|
|
3015
3015
|
splitAtPlayhead() {
|
|
3016
|
-
const t =
|
|
3017
|
-
const under =
|
|
3016
|
+
const t = _chunkVKF3PWKRcjs.snapToVideoFrame.call(void 0, this.player.currentTime, this.project.fps);
|
|
3017
|
+
const under = _chunkVKF3PWKRcjs.videoClipsAt.call(void 0, this.project, t).filter(({ clip }) => t > clip.start && t < _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, clip));
|
|
3018
3018
|
const chosen = this.selection.length ? under.filter(({ clip }) => this.selection.includes(clip.id)) : under;
|
|
3019
3019
|
if (!chosen.length) return this.refuse("No clip is under the playhead to split.");
|
|
3020
3020
|
return this.apply(chosen.map(({ clip }) => ({ op: "split_clip", clip: clip.id, at: t })), "Split");
|
|
@@ -3042,7 +3042,7 @@ var VideoEditorController = (_class6 = class {
|
|
|
3042
3042
|
/** The provider's description of an effect, checked for `place` (rejects without a provider or for an unknown id). */
|
|
3043
3043
|
async describeEffect(effect, place) {
|
|
3044
3044
|
const d = await this.effects.require().describe(effect);
|
|
3045
|
-
if (place)
|
|
3045
|
+
if (place) _chunkVKF3PWKRcjs.checkVideoEffectPlace.call(void 0, d, place);
|
|
3046
3046
|
return d;
|
|
3047
3047
|
}
|
|
3048
3048
|
refused(message) {
|
|
@@ -3055,7 +3055,7 @@ var VideoEditorController = (_class6 = class {
|
|
|
3055
3055
|
try {
|
|
3056
3056
|
plan = await run();
|
|
3057
3057
|
} catch (error) {
|
|
3058
|
-
if (
|
|
3058
|
+
if (_chunkRUZQMYXHcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
|
|
3059
3059
|
throw error;
|
|
3060
3060
|
}
|
|
3061
3061
|
const result = this.apply(plan.edit, plan.label, { merge });
|
|
@@ -3063,7 +3063,7 @@ var VideoEditorController = (_class6 = class {
|
|
|
3063
3063
|
return { ...result, clip: plan.clip, ...plan.effect ? { effect: plan.effect() } : {} };
|
|
3064
3064
|
}
|
|
3065
3065
|
clipOrThrow(id) {
|
|
3066
|
-
const at =
|
|
3066
|
+
const at = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, this.project, id);
|
|
3067
3067
|
if (!at) throw new Error(`There is no clip "${id}"; list_applied_effects or get_video_project lists the clips.`);
|
|
3068
3068
|
return at.clip;
|
|
3069
3069
|
}
|
|
@@ -3076,7 +3076,7 @@ var VideoEditorController = (_class6 = class {
|
|
|
3076
3076
|
return this.effectEdit(async () => {
|
|
3077
3077
|
const current = this.clipOrThrow(clip);
|
|
3078
3078
|
const d = await this.describeEffect(effect, "clip");
|
|
3079
|
-
const values =
|
|
3079
|
+
const values = _chunkVKF3PWKRcjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
|
|
3080
3080
|
const stack = [..._nullishCoalesce(current.effects, () => ( []))];
|
|
3081
3081
|
const taken = new Set(stack.map((e) => e.id));
|
|
3082
3082
|
let n = 1;
|
|
@@ -3112,7 +3112,7 @@ var VideoEditorController = (_class6 = class {
|
|
|
3112
3112
|
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(", ")}.`);
|
|
3113
3113
|
base[k] = d.defaults[k];
|
|
3114
3114
|
}
|
|
3115
|
-
next.values =
|
|
3115
|
+
next.values = _chunkVKF3PWKRcjs.checkVideoEffectValues.call(void 0, d, given, { base, keyframes: true });
|
|
3116
3116
|
}
|
|
3117
3117
|
if (changes.enabled !== void 0) {
|
|
3118
3118
|
if (changes.enabled) delete next.enabled;
|
|
@@ -3130,7 +3130,7 @@ var VideoEditorController = (_class6 = class {
|
|
|
3130
3130
|
removeClipEffect(clip, instance) {
|
|
3131
3131
|
const reason = this.readOnlyReason();
|
|
3132
3132
|
if (reason) return this.refused(reason);
|
|
3133
|
-
const at =
|
|
3133
|
+
const at = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, this.project, clip);
|
|
3134
3134
|
if (!at) return this.refused(`There is no clip "${clip}".`);
|
|
3135
3135
|
const stack = _nullishCoalesce(at.clip.effects, () => ( []));
|
|
3136
3136
|
const was = stack.find((e) => e.id === instance);
|
|
@@ -3147,7 +3147,7 @@ var VideoEditorController = (_class6 = class {
|
|
|
3147
3147
|
return this.effectEdit(async () => {
|
|
3148
3148
|
this.clipOrThrow(clip);
|
|
3149
3149
|
const d = await this.describeEffect(effect, "transition");
|
|
3150
|
-
const values =
|
|
3150
|
+
const values = _chunkVKF3PWKRcjs.checkVideoEffectValues.call(void 0, d, options.values);
|
|
3151
3151
|
const duration = _nullishCoalesce(_nullishCoalesce(options.duration, () => ( d.duration)), () => ( 1e3));
|
|
3152
3152
|
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 };
|
|
3153
3153
|
});
|
|
@@ -3160,7 +3160,7 @@ var VideoEditorController = (_class6 = class {
|
|
|
3160
3160
|
addEffectClip(track, effect, options = {}) {
|
|
3161
3161
|
return this.effectEdit(async () => {
|
|
3162
3162
|
const d = await this.describeEffect(effect, "generator");
|
|
3163
|
-
const values =
|
|
3163
|
+
const values = _chunkVKF3PWKRcjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
|
|
3164
3164
|
const duration = _nullishCoalesce(_nullishCoalesce(options.duration, () => ( d.duration)), () => ( 5e3));
|
|
3165
3165
|
const label = `Add ${d.name}`;
|
|
3166
3166
|
const clipId = _nullishCoalesce(options.id, () => ( ""));
|
|
@@ -3182,42 +3182,42 @@ var VideoEditorController = (_class6 = class {
|
|
|
3182
3182
|
if (part === "generator") {
|
|
3183
3183
|
if (current.type !== "effect") throw new Error(`Clip "${clip}" is not an effect clip.`);
|
|
3184
3184
|
const d2 = await this.describeEffect(current.effect);
|
|
3185
|
-
return { edit: { op: "update_clip", clip, set: { values:
|
|
3185
|
+
return { edit: { op: "update_clip", clip, set: { values: _chunkVKF3PWKRcjs.checkVideoEffectValues.call(void 0, d2, values, { base: _nullishCoalesce(current.values, () => ( {})), keyframes: true }) } }, label: `Change ${_nullishCoalesce(current.name, () => ( d2.name))}`, clip };
|
|
3186
3186
|
}
|
|
3187
3187
|
const t = current.transition;
|
|
3188
3188
|
if (_optionalChain([t, 'optionalAccess', _94 => _94.type]) !== "effect" || !t.effect) throw new Error(`Clip "${clip}" has no effect transition.`);
|
|
3189
3189
|
const d = await this.describeEffect(t.effect.effect);
|
|
3190
|
-
const merged =
|
|
3190
|
+
const merged = _chunkVKF3PWKRcjs.checkVideoEffectValues.call(void 0, d, values, { base: _nullishCoalesce(t.effect.values, () => ( {})) });
|
|
3191
3191
|
return { edit: { op: "set_transition", clip, transition: { ...t, effect: { ...t.effect, values: merged } } }, label: `Change transition ${d.name}`, clip };
|
|
3192
3192
|
}, options.merge);
|
|
3193
3193
|
}
|
|
3194
3194
|
/** 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). */
|
|
3195
3195
|
setClipEffectKeyframes(clip, instance, control, keys) {
|
|
3196
|
-
const current = _optionalChain([
|
|
3196
|
+
const current = _optionalChain([_chunkVKF3PWKRcjs.findVideoClip.call(void 0, this.project, clip), 'optionalAccess', _95 => _95.clip]);
|
|
3197
3197
|
const was = _optionalChain([current, 'optionalAccess', _96 => _96.effects, 'optionalAccess', _97 => _97.find, 'call', _98 => _98((e) => e.id === instance)]);
|
|
3198
3198
|
const value = _optionalChain([was, 'optionalAccess', _99 => _99.values, 'optionalAccess', _100 => _100[control]]);
|
|
3199
|
-
const plain = keys === null ?
|
|
3199
|
+
const plain = keys === null ? _chunkVKF3PWKRcjs.isVideoKeyframes.call(void 0, value) ? _optionalChain([value, 'access', _101 => _101.keys, 'access', _102 => _102[0], 'optionalAccess', _103 => _103.v]) : value : { keys: [...keys].sort((a, b) => a.t - b.t) };
|
|
3200
3200
|
return this.updateClipEffect(clip, instance, { values: { [control]: _nullishCoalesce(plain, () => ( null)) } });
|
|
3201
3201
|
}
|
|
3202
3202
|
/** What plays at `time` (default: the playhead). */
|
|
3203
3203
|
frame(time = this.player.currentTime) {
|
|
3204
|
-
return
|
|
3204
|
+
return _chunkVKF3PWKRcjs.videoFrameAt.call(void 0, this.project, time);
|
|
3205
3205
|
}
|
|
3206
3206
|
/** The frame at `time` (default: the playhead) as SVG. */
|
|
3207
3207
|
toSvg(time = this.player.currentTime, options = {}) {
|
|
3208
|
-
return
|
|
3208
|
+
return _chunkVKF3PWKRcjs.videoProjectSvg.call(void 0, this.project, time, { lutFor: (src) => this.luts.peek(src), ...options });
|
|
3209
3209
|
}
|
|
3210
3210
|
/** The project as an ffmpeg command. */
|
|
3211
3211
|
toFfmpeg(options = {}) {
|
|
3212
|
-
return
|
|
3212
|
+
return _chunkVKF3PWKRcjs.toVideoFfmpeg.call(void 0, this.project, options);
|
|
3213
3213
|
}
|
|
3214
3214
|
/** The ffmpeg command that measures the mix's loudness (see `toVideoLoudnessMeasure`). */
|
|
3215
3215
|
toLoudnessMeasure(options = {}) {
|
|
3216
|
-
return
|
|
3216
|
+
return _chunkVKF3PWKRcjs.toVideoLoudnessMeasure.call(void 0, this.project, options);
|
|
3217
3217
|
}
|
|
3218
3218
|
/** One track as a CMX 3600 EDL. */
|
|
3219
3219
|
toEdl(options = {}) {
|
|
3220
|
-
return
|
|
3220
|
+
return _chunkVKF3PWKRcjs.toVideoEdl.call(void 0, this.project, options);
|
|
3221
3221
|
}
|
|
3222
3222
|
}, _class6);
|
|
3223
3223
|
function checkPreviewScale(scale) {
|
|
@@ -3236,12 +3236,12 @@ function videoRulerTicks(duration, pxPerSecond, fps) {
|
|
|
3236
3236
|
const ticks = [];
|
|
3237
3237
|
for (let t = 0; t <= duration + 1e-6; t += step) {
|
|
3238
3238
|
const isMajor = Math.abs(t / major - Math.round(t / major)) < 1e-9;
|
|
3239
|
-
ticks.push({ time: t, x: t * pxPerMs, major: isMajor, ...isMajor ? { label:
|
|
3239
|
+
ticks.push({ time: t, x: t * pxPerMs, major: isMajor, ...isMajor ? { label: _chunkVKF3PWKRcjs.formatVideoTimecode.call(void 0, t, fps).replace(/^00:/, "") } : {} });
|
|
3240
3240
|
}
|
|
3241
3241
|
return ticks;
|
|
3242
3242
|
}
|
|
3243
3243
|
function videoClipShowsWaveform(clip, asset, mode = "audio") {
|
|
3244
|
-
if (clip.type !== "media" || mode === "none" || !
|
|
3244
|
+
if (clip.type !== "media" || mode === "none" || !_chunkVKF3PWKRcjs.videoAssetHasSound.call(void 0, asset)) return false;
|
|
3245
3245
|
return mode === "all" || asset.kind === "audio";
|
|
3246
3246
|
}
|
|
3247
3247
|
var VIDEO_CLIP_ANIMATION_LABELS = {
|
|
@@ -3300,11 +3300,11 @@ function videoClipLabel(clip, asset, sequence) {
|
|
|
3300
3300
|
if (clip.type === "sequence") return `Compound: ${_nullishCoalesce(_optionalChain([sequence, 'optionalAccess', _104 => _104.name]), () => ( clip.sequence))}`;
|
|
3301
3301
|
if (clip.type === "effect") return `Effect: ${clip.effect}`;
|
|
3302
3302
|
const base = _nullishCoalesce(_nullishCoalesce(_optionalChain([asset, 'optionalAccess', _105 => _105.name]), () => ( _optionalChain([asset, 'optionalAccess', _106 => _106.src, 'access', _107 => _107.replace, 'call', _108 => _108(/^.*[\\/]/, "")]))), () => ( clip.asset));
|
|
3303
|
-
const speed =
|
|
3303
|
+
const speed = _chunkVKF3PWKRcjs.videoClipSpeed.call(void 0, clip);
|
|
3304
3304
|
return speed !== 1 ? `${base} (${Math.round(speed * 100)}%)` : base;
|
|
3305
3305
|
}
|
|
3306
3306
|
function planVideoClipDrag(project, input) {
|
|
3307
|
-
const at =
|
|
3307
|
+
const at = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, project, input.clip);
|
|
3308
3308
|
if (!at) return null;
|
|
3309
3309
|
const { clip, track } = at;
|
|
3310
3310
|
const snap = _nullishCoalesce(input.snap, () => ( ((t) => t)));
|
|
@@ -3321,17 +3321,17 @@ function planVideoClipDrag(project, input) {
|
|
|
3321
3321
|
}
|
|
3322
3322
|
const minimum = 1e3 / project.fps;
|
|
3323
3323
|
if (input.mode === "trim-start") {
|
|
3324
|
-
const to2 = Math.min(snap(Math.max(0, clip.start + input.delta)),
|
|
3324
|
+
const to2 = Math.min(snap(Math.max(0, clip.start + input.delta)), _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, clip) - minimum);
|
|
3325
3325
|
const changed2 = Math.abs(to2 - clip.start) > 1e-6;
|
|
3326
|
-
const plan = input.ripple ? { start: clip.start, duration: clip.duration - (to2 - clip.start) } : { start: to2, duration:
|
|
3326
|
+
const plan = input.ripple ? { start: clip.start, duration: clip.duration - (to2 - clip.start) } : { start: to2, duration: _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, clip) - to2 };
|
|
3327
3327
|
return { ...plan, track: track.id, edit: changed2 ? { op: "trim_clip", clip: clip.id, edge: "start", to: to2, ...input.ripple ? { ripple: true } : {} } : null };
|
|
3328
3328
|
}
|
|
3329
|
-
const to = Math.max(snap(
|
|
3330
|
-
const changed = Math.abs(to -
|
|
3329
|
+
const to = Math.max(snap(_chunkVKF3PWKRcjs.videoClipEnd.call(void 0, clip) + input.delta), clip.start + minimum);
|
|
3330
|
+
const changed = Math.abs(to - _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, clip)) > 1e-6;
|
|
3331
3331
|
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 };
|
|
3332
3332
|
}
|
|
3333
3333
|
function videoDropTracks(project, clipId) {
|
|
3334
|
-
const at =
|
|
3334
|
+
const at = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, project, clipId);
|
|
3335
3335
|
if (!at) return [];
|
|
3336
3336
|
return project.tracks.filter((t) => t.kind === at.track.kind && !t.locked).map((t) => t.id);
|
|
3337
3337
|
}
|
|
@@ -3340,7 +3340,7 @@ function videoDragLabel(edit) {
|
|
|
3340
3340
|
return edit.op === "trim_clip" && edit.ripple ? "Ripple trim" : "Trim clip";
|
|
3341
3341
|
}
|
|
3342
3342
|
function videoAssetDropEdit(project, assetId, options = {}) {
|
|
3343
|
-
const asset =
|
|
3343
|
+
const asset = _chunkVKF3PWKRcjs.videoAssetMap.call(void 0, project).get(assetId);
|
|
3344
3344
|
if (!asset) return null;
|
|
3345
3345
|
const kind = asset.kind === "audio" ? "audio" : "video";
|
|
3346
3346
|
const track = _nullishCoalesce(options.track, () => ( _optionalChain([project, 'access', _109 => _109.tracks, 'access', _110 => _110.find, 'call', _111 => _111((t) => t.kind === kind && !t.locked), 'optionalAccess', _112 => _112.id])));
|
|
@@ -3392,25 +3392,25 @@ var KEY_LABELS = {
|
|
|
3392
3392
|
scale: { label: "Scale", step: 0.05 },
|
|
3393
3393
|
rotation: { label: "Rotation", step: 1 }
|
|
3394
3394
|
};
|
|
3395
|
-
var animatableOf = (clip, property) =>
|
|
3395
|
+
var animatableOf = (clip, property) => _chunkVKF3PWKRcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([clip, 'access', _113 => _113.transform, 'optionalAccess', _114 => _114[property]]) : property === "volume" ? clip.type === "media" || clip.type === "sequence" ? clip.volume : void 0 : clip.opacity;
|
|
3396
3396
|
var playheadInClip = (clip, time) => Math.round(Math.min(clip.duration, Math.max(0, time - clip.start)));
|
|
3397
3397
|
function videoKeyframeRows(project, clipId, time) {
|
|
3398
|
-
const at =
|
|
3398
|
+
const at = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, project, clipId);
|
|
3399
3399
|
if (!at) return [];
|
|
3400
3400
|
const { clip } = at;
|
|
3401
|
-
const asset = clip.type === "media" ?
|
|
3401
|
+
const asset = clip.type === "media" ? _chunkVKF3PWKRcjs.videoAssetMap.call(void 0, project).get(clip.asset) : void 0;
|
|
3402
3402
|
const visual = !(_optionalChain([asset, 'optionalAccess', _115 => _115.kind]) === "audio" || at.track.kind === "audio");
|
|
3403
|
-
const audible = clip.type === "media" &&
|
|
3404
|
-
const properties = [...visual ? ["opacity"] : [], ...audible ? ["volume"] : [], ...visual ?
|
|
3403
|
+
const audible = clip.type === "media" && _chunkVKF3PWKRcjs.videoAssetHasSound.call(void 0, asset) || clip.type === "sequence";
|
|
3404
|
+
const properties = [...visual ? ["opacity"] : [], ...audible ? ["volume"] : [], ...visual ? _chunkVKF3PWKRcjs.VIDEO_TRANSFORM_PROPERTIES : []];
|
|
3405
3405
|
const clipTime = playheadInClip(clip, time);
|
|
3406
3406
|
return properties.map((property) => {
|
|
3407
3407
|
const prop = animatableOf(clip, property);
|
|
3408
|
-
const keys =
|
|
3409
|
-
const limits =
|
|
3408
|
+
const keys = _chunkVKF3PWKRcjs.isVideoKeyframes.call(void 0, prop) ? prop.keys : [];
|
|
3409
|
+
const limits = _chunkVKF3PWKRcjs.VIDEO_KEYFRAME_LIMITS[property];
|
|
3410
3410
|
return {
|
|
3411
3411
|
property,
|
|
3412
3412
|
...KEY_LABELS[property],
|
|
3413
|
-
value: Math.round(
|
|
3413
|
+
value: Math.round(_chunkVKF3PWKRcjs.videoValueAt.call(void 0, prop, clipTime, limits.default) * 1e3) / 1e3,
|
|
3414
3414
|
keyed: keys.length > 0,
|
|
3415
3415
|
keys: keys.length,
|
|
3416
3416
|
onKey: keys.some((k) => Math.abs(k.t - clipTime) < 0.5),
|
|
@@ -3421,44 +3421,44 @@ function videoKeyframeRows(project, clipId, time) {
|
|
|
3421
3421
|
});
|
|
3422
3422
|
}
|
|
3423
3423
|
function plainValueEdit(clip, property, value) {
|
|
3424
|
-
if (!
|
|
3424
|
+
if (!_chunkVKF3PWKRcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property))
|
|
3425
3425
|
return value === void 0 ? { op: "update_clip", clip: clip.id, remove: [property] } : { op: "update_clip", clip: clip.id, set: { [property]: value } };
|
|
3426
3426
|
const transform = { ...clip.transform, [property]: value };
|
|
3427
3427
|
if (value === void 0) delete transform[property];
|
|
3428
3428
|
return Object.keys(transform).length ? { op: "update_clip", clip: clip.id, set: { transform } } : { op: "update_clip", clip: clip.id, remove: ["transform"] };
|
|
3429
3429
|
}
|
|
3430
3430
|
function videoKeyframeValueEdit(project, clipId, property, time, value) {
|
|
3431
|
-
const at =
|
|
3431
|
+
const at = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, project, clipId);
|
|
3432
3432
|
if (!at) return null;
|
|
3433
3433
|
const prop = animatableOf(at.clip, property);
|
|
3434
|
-
if (!
|
|
3434
|
+
if (!_chunkVKF3PWKRcjs.isVideoKeyframes.call(void 0, prop)) return plainValueEdit(at.clip, property, value);
|
|
3435
3435
|
if (value === void 0) return null;
|
|
3436
|
-
return { op: "set_keyframes", clip: clipId, property, keys:
|
|
3436
|
+
return { op: "set_keyframes", clip: clipId, property, keys: _chunkVKF3PWKRcjs.setVideoKey.call(void 0, prop, { t: playheadInClip(at.clip, time), v: value }, _chunkVKF3PWKRcjs.VIDEO_KEYFRAME_LIMITS[property].default).keys };
|
|
3437
3437
|
}
|
|
3438
3438
|
function videoKeyframeToggleEdit(project, clipId, property, time) {
|
|
3439
|
-
const at =
|
|
3439
|
+
const at = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, project, clipId);
|
|
3440
3440
|
if (!at) return null;
|
|
3441
3441
|
const prop = animatableOf(at.clip, property);
|
|
3442
3442
|
const t = playheadInClip(at.clip, time);
|
|
3443
|
-
const fallback =
|
|
3444
|
-
if (
|
|
3443
|
+
const fallback = _chunkVKF3PWKRcjs.VIDEO_KEYFRAME_LIMITS[property].default;
|
|
3444
|
+
if (_chunkVKF3PWKRcjs.isVideoKeyframes.call(void 0, prop)) {
|
|
3445
3445
|
const key = prop.keys.find((k) => Math.abs(k.t - t) < 0.5);
|
|
3446
3446
|
if (key) {
|
|
3447
|
-
const rest =
|
|
3448
|
-
return
|
|
3447
|
+
const rest = _chunkVKF3PWKRcjs.removeVideoKey.call(void 0, prop, key.t);
|
|
3448
|
+
return _chunkVKF3PWKRcjs.isVideoKeyframes.call(void 0, rest) ? { op: "set_keyframes", clip: clipId, property, keys: rest.keys } : plainValueEdit(at.clip, property, rest === fallback ? void 0 : rest);
|
|
3449
3449
|
}
|
|
3450
3450
|
}
|
|
3451
|
-
const v =
|
|
3452
|
-
return { op: "set_keyframes", clip: clipId, property, keys:
|
|
3451
|
+
const v = _chunkVKF3PWKRcjs.videoValueAt.call(void 0, prop, t, fallback);
|
|
3452
|
+
return { op: "set_keyframes", clip: clipId, property, keys: _chunkVKF3PWKRcjs.isVideoKeyframes.call(void 0, prop) ? _chunkVKF3PWKRcjs.setVideoKey.call(void 0, prop, { t, v }, fallback).keys : [{ t, v }] };
|
|
3453
3453
|
}
|
|
3454
3454
|
function videoLutEdits(project, clips, lut) {
|
|
3455
3455
|
const edits = [];
|
|
3456
3456
|
for (const id of clips) {
|
|
3457
|
-
const at =
|
|
3457
|
+
const at = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, project, id);
|
|
3458
3458
|
if (!at) continue;
|
|
3459
3459
|
const { lut: current, ...rest } = _nullishCoalesce(at.clip.grade, () => ( {}));
|
|
3460
3460
|
if (!lut && !current) continue;
|
|
3461
|
-
const grade =
|
|
3461
|
+
const grade = _chunkVKF3PWKRcjs.normalizeVideoGrade.call(void 0, lut ? { ...rest, lut } : rest);
|
|
3462
3462
|
edits.push(grade ? { op: "update_clip", clip: id, set: { grade } } : { op: "update_clip", clip: id, remove: ["grade"] });
|
|
3463
3463
|
}
|
|
3464
3464
|
return edits;
|
|
@@ -3488,7 +3488,7 @@ var RIPPLE = {
|
|
|
3488
3488
|
};
|
|
3489
3489
|
var MODE = {
|
|
3490
3490
|
type: "string",
|
|
3491
|
-
enum: [...
|
|
3491
|
+
enum: [..._chunkVKF3PWKRcjs.VIDEO_PLACEMENT_MODES],
|
|
3492
3492
|
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.'
|
|
3493
3493
|
};
|
|
3494
3494
|
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.` });
|
|
@@ -3505,11 +3505,11 @@ var TRANSFORM = object(
|
|
|
3505
3505
|
);
|
|
3506
3506
|
var TRANSITION = object(
|
|
3507
3507
|
{
|
|
3508
|
-
type: { type: "string", enum:
|
|
3508
|
+
type: { type: "string", enum: _chunkVKF3PWKRcjs.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." },
|
|
3509
3509
|
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." },
|
|
3510
3510
|
color: COLOR("For dip: the colour passed through (default black)"),
|
|
3511
|
-
direction: { type: "string", enum: [...
|
|
3512
|
-
audioCurve: { type: "string", enum: [...
|
|
3511
|
+
direction: { type: "string", enum: [..._chunkVKF3PWKRcjs.VIDEO_WIPE_DIRECTIONS], description: "For wipe, push and slide: the way the edge or picture travels (default right, coming in from the left)." },
|
|
3512
|
+
audioCurve: { type: "string", enum: [..._chunkVKF3PWKRcjs.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." }
|
|
3513
3513
|
},
|
|
3514
3514
|
["type", "duration"],
|
|
3515
3515
|
"A transition from the clip that ends where this one starts on the same track."
|
|
@@ -3518,7 +3518,7 @@ var LUT_SRC = { type: "string", minLength: 1, description: 'A .cube 3D LUT file
|
|
|
3518
3518
|
var LUT_STRENGTH = { type: "number", minimum: 0, maximum: 1, description: "How much of the LUT's change to apply, 0 (none) to 1 (full, the default); 0.3-0.7 for a subtler look." };
|
|
3519
3519
|
var GRADE = object(
|
|
3520
3520
|
{
|
|
3521
|
-
...Object.fromEntries(
|
|
3521
|
+
...Object.fromEntries(_chunkVKF3PWKRcjs.VIDEO_GRADE_CONTROLS.map((c) => [c.key, { type: "number", minimum: c.min, maximum: c.max, description: c.description }])),
|
|
3522
3522
|
lut: object({ src: LUT_SRC, strength: LUT_STRENGTH, name: { type: "string", minLength: 1, description: "A label for the look." } }, ["src"], "A 3D LUT applied after the other settings (set_video_lut checks the file first).")
|
|
3523
3523
|
},
|
|
3524
3524
|
[],
|
|
@@ -3526,7 +3526,7 @@ var GRADE = object(
|
|
|
3526
3526
|
);
|
|
3527
3527
|
var ANIMATION = (when) => object(
|
|
3528
3528
|
{
|
|
3529
|
-
effect: { type: "string", enum: [...
|
|
3529
|
+
effect: { type: "string", enum: [..._chunkVKF3PWKRcjs.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." },
|
|
3530
3530
|
duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms (default 500)." }
|
|
3531
3531
|
},
|
|
3532
3532
|
["effect"],
|
|
@@ -3536,11 +3536,11 @@ var CLIP_COMMON = {
|
|
|
3536
3536
|
name: { type: "string", description: "A label for the clip." },
|
|
3537
3537
|
opacity: { type: "number", minimum: 0, maximum: 1, description: "Opacity 0\u20131 (default 1). A number replaces any keyframes; set_video_keyframes animates it." },
|
|
3538
3538
|
transform: TRANSFORM,
|
|
3539
|
-
fit: { type: "string", enum: [...
|
|
3539
|
+
fit: { type: "string", enum: [..._chunkVKF3PWKRcjs.VIDEO_FITS], description: "How the picture fits the frame before the transform, as CSS object-fit (default contain for media, fill for colours)." },
|
|
3540
3540
|
grade: GRADE,
|
|
3541
3541
|
animateIn: ANIMATION("How the picture enters, from the clip's start (on top of any fade in). Titles usually rise, pop or fade in."),
|
|
3542
3542
|
animateOut: ANIMATION("How the picture leaves, ending at the clip's end."),
|
|
3543
|
-
blend: { type: "string", enum: [...
|
|
3543
|
+
blend: { type: "string", enum: [..._chunkVKF3PWKRcjs.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." },
|
|
3544
3544
|
fadeIn: MS("Fade up from nothing (picture and sound) over this long"),
|
|
3545
3545
|
fadeOut: MS("Fade down to nothing over this long")
|
|
3546
3546
|
};
|
|
@@ -3549,8 +3549,8 @@ var MEDIA_FIELDS = {
|
|
|
3549
3549
|
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." },
|
|
3550
3550
|
volume: { type: "number", minimum: 0, maximum: 4, description: "Gain (1 = unchanged, default 1). A number replaces any keyframes; set_video_keyframes animates it." },
|
|
3551
3551
|
muted: { type: "boolean", description: "Silence this clip (default false)." },
|
|
3552
|
-
fadeInCurve: { type: "string", enum: [...
|
|
3553
|
-
fadeOutCurve: { type: "string", enum: [...
|
|
3552
|
+
fadeInCurve: { type: "string", enum: [..._chunkVKF3PWKRcjs.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)." },
|
|
3553
|
+
fadeOutCurve: { type: "string", enum: [..._chunkVKF3PWKRcjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fade out (default linear), the same choices as fadeInCurve; exponential sounds natural fading to silence." }
|
|
3554
3554
|
};
|
|
3555
3555
|
var TEXT_FIELDS = {
|
|
3556
3556
|
text: { type: "string", minLength: 1, description: `The title's text ("\\n" breaks lines).` },
|
|
@@ -3599,7 +3599,7 @@ var ASSET_FIELDS = {
|
|
|
3599
3599
|
};
|
|
3600
3600
|
var KEY_PROPERTY = {
|
|
3601
3601
|
type: "string",
|
|
3602
|
-
enum: [...
|
|
3602
|
+
enum: [..._chunkVKF3PWKRcjs.VIDEO_KEYFRAME_PROPERTIES],
|
|
3603
3603
|
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)."
|
|
3604
3604
|
};
|
|
3605
3605
|
var KEYS = {
|
|
@@ -3614,7 +3614,7 @@ var KEYS = {
|
|
|
3614
3614
|
ease: {
|
|
3615
3615
|
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.",
|
|
3616
3616
|
anyOf: [
|
|
3617
|
-
{ type: "string", enum: [...
|
|
3617
|
+
{ type: "string", enum: [..._chunkVKF3PWKRcjs.VIDEO_EASE_NAMES] },
|
|
3618
3618
|
{ type: "array", items: { type: "number" }, minItems: 4, maxItems: 4 }
|
|
3619
3619
|
]
|
|
3620
3620
|
}
|
|
@@ -3643,19 +3643,19 @@ var describeVideoTracks = (tracks) => tracks.map((t, index) => ({
|
|
|
3643
3643
|
...t.locked ? { locked: true } : {},
|
|
3644
3644
|
...t.syncLocked === false ? { syncLocked: false } : {},
|
|
3645
3645
|
...t.volume !== void 0 ? { volume: t.volume } : {},
|
|
3646
|
-
clips:
|
|
3646
|
+
clips: _chunkVKF3PWKRcjs.sortedVideoClips.call(void 0, t).map((c) => ({ ...c, end: _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkVKF3PWKRcjs.videoClipSourceRange.call(void 0, c) } : {} }))
|
|
3647
3647
|
}));
|
|
3648
|
-
var videoSequenceUsers = (project, id) =>
|
|
3649
|
-
({ 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:
|
|
3648
|
+
var videoSequenceUsers = (project, id) => _chunkVKF3PWKRcjs.allVideoTracks.call(void 0, project).flatMap(
|
|
3649
|
+
({ 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: _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, c), source: _chunkVKF3PWKRcjs.videoClipSourceRange.call(void 0, c) }] : [])
|
|
3650
3650
|
);
|
|
3651
3651
|
function describeVideoSequence(project, sequence, tracks = true) {
|
|
3652
|
-
const cycle =
|
|
3652
|
+
const cycle = _chunkVKF3PWKRcjs.findVideoSequenceCycle.call(void 0, project, sequence.id);
|
|
3653
3653
|
return {
|
|
3654
3654
|
id: sequence.id,
|
|
3655
3655
|
...sequence.name ? { name: sequence.name } : {},
|
|
3656
|
-
duration:
|
|
3656
|
+
duration: _chunkVKF3PWKRcjs.videoSequenceDuration.call(void 0, sequence),
|
|
3657
3657
|
clipCount: sequence.tracks.reduce((n, t) => n + t.clips.length, 0),
|
|
3658
|
-
nests:
|
|
3658
|
+
nests: _chunkVKF3PWKRcjs.videoSequenceChildren.call(void 0, sequence),
|
|
3659
3659
|
usedBy: videoSequenceUsers(project, sequence.id),
|
|
3660
3660
|
...cycle ? { cycle } : {},
|
|
3661
3661
|
...tracks ? { tracks: describeVideoTracks(sequence.tracks) } : { trackCount: sequence.tracks.length }
|
|
@@ -3667,7 +3667,7 @@ function describeVideoProject(project) {
|
|
|
3667
3667
|
width: project.width,
|
|
3668
3668
|
height: project.height,
|
|
3669
3669
|
fps: project.fps,
|
|
3670
|
-
duration:
|
|
3670
|
+
duration: _chunkVKF3PWKRcjs.videoProjectDuration.call(void 0, project),
|
|
3671
3671
|
...project.background ? { background: project.background } : {},
|
|
3672
3672
|
assets: project.assets.map(videoAssetOut),
|
|
3673
3673
|
tracks: describeVideoTracks(project.tracks),
|
|
@@ -3684,7 +3684,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
3684
3684
|
const project = () => controller.getProject();
|
|
3685
3685
|
const outcome = (result, extra = {}) => {
|
|
3686
3686
|
if (!result.ok) throw new Error(result.error);
|
|
3687
|
-
return { ...extra, duration:
|
|
3687
|
+
return { ...extra, duration: _chunkVKF3PWKRcjs.videoProjectDuration.call(void 0, result.project), issues: issueSummary(result.issues) };
|
|
3688
3688
|
};
|
|
3689
3689
|
const apply = (edits, label, extra) => {
|
|
3690
3690
|
const result = controller.apply(edits, label);
|
|
@@ -3693,7 +3693,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
3693
3693
|
const clipOut = (p, id) => {
|
|
3694
3694
|
for (const t of p.tracks) {
|
|
3695
3695
|
const c = t.clips.find((x) => x.id === id);
|
|
3696
|
-
if (c) return { track: t.id, ...c, end:
|
|
3696
|
+
if (c) return { track: t.id, ...c, end: _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkVKF3PWKRcjs.videoClipSourceRange.call(void 0, c) } : {} };
|
|
3697
3697
|
}
|
|
3698
3698
|
return null;
|
|
3699
3699
|
};
|
|
@@ -3705,7 +3705,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
3705
3705
|
});
|
|
3706
3706
|
const keysOut = (p, clip, property) => {
|
|
3707
3707
|
const c = clipOut(p, clip);
|
|
3708
|
-
const value =
|
|
3708
|
+
const value = _chunkVKF3PWKRcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([c, 'optionalAccess', _124 => _124.transform, 'optionalAccess', _125 => _125[property]]) : _optionalChain([c, 'optionalAccess', _126 => _126[property]]);
|
|
3709
3709
|
return typeof value === "object" ? { keys: value.keys } : { keys: [], value: _nullishCoalesce(value, () => ( null)) };
|
|
3710
3710
|
};
|
|
3711
3711
|
const getProject = {
|
|
@@ -3727,8 +3727,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
3727
3727
|
inputSchema: object({ time: MS("Time from the start (default: the playhead)") }),
|
|
3728
3728
|
annotations: { title: "What plays at a moment", ...READ },
|
|
3729
3729
|
handler: ({ time }) => {
|
|
3730
|
-
const frame =
|
|
3731
|
-
return { ...frame, timecode:
|
|
3730
|
+
const frame = _chunkVKF3PWKRcjs.videoFrameAt.call(void 0, project(), _nullishCoalesce(time, () => ( controller.getState().time)));
|
|
3731
|
+
return { ...frame, timecode: _chunkVKF3PWKRcjs.formatVideoTimecode.call(void 0, frame.time, project().fps) };
|
|
3732
3732
|
}
|
|
3733
3733
|
};
|
|
3734
3734
|
const listSequences = {
|
|
@@ -3756,7 +3756,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
3756
3756
|
annotations: { title: "Find gaps", ...READ },
|
|
3757
3757
|
handler: ({ track }) => {
|
|
3758
3758
|
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(", ")}.`);
|
|
3759
|
-
return { gaps:
|
|
3759
|
+
return { gaps: _chunkVKF3PWKRcjs.findVideoGaps.call(void 0, project(), track) };
|
|
3760
3760
|
}
|
|
3761
3761
|
};
|
|
3762
3762
|
const checkProject = {
|
|
@@ -3786,7 +3786,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
3786
3786
|
const lutSrcs = [...new Set(p.tracks.flatMap((t) => t.clips.map((c) => _optionalChain([c, 'access', _127 => _127.grade, 'optionalAccess', _128 => _128.lut, 'optionalAccess', _129 => _129.src])).filter((x) => !!x)))];
|
|
3787
3787
|
const missing = (await Promise.all(lutSrcs.map((src) => controller.luts.load(src).then(() => null, (e) => e.message)))).filter((m) => !!m);
|
|
3788
3788
|
const svgOptions = { lutFor: (src) => controller.luts.peek(src), ...columns ? { columns } : {} };
|
|
3789
|
-
const svg = times ?
|
|
3789
|
+
const svg = times ? _chunkVKF3PWKRcjs.videoContactSheetSvg.call(void 0, p, times, svgOptions) : _chunkVKF3PWKRcjs.videoProjectSvg.call(void 0, p, _nullishCoalesce(time, () => ( controller.getState().time)), svgOptions);
|
|
3790
3790
|
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."] : []];
|
|
3791
3791
|
if (format === "png") {
|
|
3792
3792
|
if (!options.rasterize) throw new Error('This host cannot make PNG images; call render_video_frame with format "svg".');
|
|
@@ -3876,7 +3876,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
3876
3876
|
if (play === true) controller.play();
|
|
3877
3877
|
if (play === false) controller.pause();
|
|
3878
3878
|
const state = controller.getState();
|
|
3879
|
-
return { time: state.time, timecode:
|
|
3879
|
+
return { time: state.time, timecode: _chunkVKF3PWKRcjs.formatVideoTimecode.call(void 0, state.time, p.fps), playing: state.playing, clips: state.current };
|
|
3880
3880
|
}
|
|
3881
3881
|
};
|
|
3882
3882
|
const setSettings = {
|
|
@@ -4021,7 +4021,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4021
4021
|
const gradeTargets = (ids) => {
|
|
4022
4022
|
const p = project();
|
|
4023
4023
|
for (const id of ids) {
|
|
4024
|
-
const at =
|
|
4024
|
+
const at = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, p, id);
|
|
4025
4025
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
4026
4026
|
const { clip } = at;
|
|
4027
4027
|
if (at.track.kind !== "video" || clip.type === "media" && _optionalChain([p, 'access', _130 => _130.assets, 'access', _131 => _131.find, 'call', _132 => _132((a) => a.id === clip.asset), 'optionalAccess', _133 => _133.kind]) === "audio")
|
|
@@ -4035,7 +4035,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4035
4035
|
inputSchema: object(
|
|
4036
4036
|
{
|
|
4037
4037
|
clips: { type: "array", items: CLIP_ID, minItems: 1, description: "Clips on video tracks to grade." },
|
|
4038
|
-
preset: { type: "string", enum: [...
|
|
4038
|
+
preset: { type: "string", enum: [..._chunkVKF3PWKRcjs.VIDEO_GRADE_PRESET_NAMES], description: "The look." },
|
|
4039
4039
|
amount: { type: "number", minimum: 0, maximum: 1, description: "Strength, 0 (none) to 1 (full, the default); 0.5 is a subtler version." }
|
|
4040
4040
|
},
|
|
4041
4041
|
["clips", "preset"]
|
|
@@ -4044,10 +4044,10 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4044
4044
|
handler: ({ clips, preset, amount }) => {
|
|
4045
4045
|
gradeTargets(clips);
|
|
4046
4046
|
const edits = clips.map((clip) => {
|
|
4047
|
-
const grade =
|
|
4047
|
+
const grade = _chunkVKF3PWKRcjs.videoGradeLook.call(void 0, _chunkVKF3PWKRcjs.findVideoClip.call(void 0, project(), clip).clip.grade, preset, _nullishCoalesce(amount, () => ( 1)));
|
|
4048
4048
|
return grade ? { op: "update_clip", clip, set: { grade } } : { op: "update_clip", clip, remove: ["grade"] };
|
|
4049
4049
|
});
|
|
4050
|
-
return apply(edits, `Apply ${preset} look`, (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([
|
|
4050
|
+
return apply(edits, `Apply ${preset} look`, (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkVKF3PWKRcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _134 => _134.clip, 'access', _135 => _135.grade]), () => ( null)) })) }));
|
|
4051
4051
|
}
|
|
4052
4052
|
};
|
|
4053
4053
|
const copyGrade = {
|
|
@@ -4058,7 +4058,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4058
4058
|
annotations: { title: "Copy a colour grade", ...WRITE_IDEMPOTENT },
|
|
4059
4059
|
handler: ({ from, to }) => {
|
|
4060
4060
|
gradeTargets([from, ...to]);
|
|
4061
|
-
const grade =
|
|
4061
|
+
const grade = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, project(), from).clip.grade;
|
|
4062
4062
|
const edits = to.map((clip) => grade ? { op: "update_clip", clip, set: { grade: { ...grade } } } : { op: "update_clip", clip, remove: ["grade"] });
|
|
4063
4063
|
return apply(edits, "Copy grade", () => ({ grade: _nullishCoalesce(grade, () => ( null)), clips: to }));
|
|
4064
4064
|
}
|
|
@@ -4083,7 +4083,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4083
4083
|
const lut = await controller.luts.load(src);
|
|
4084
4084
|
const label = _nullishCoalesce(name, () => ( lut.title));
|
|
4085
4085
|
const setting = { src, ...strength !== void 0 && strength !== 1 ? { strength } : {}, ...label ? { name: label } : {} };
|
|
4086
|
-
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([
|
|
4086
|
+
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([_chunkVKF3PWKRcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _136 => _136.clip, 'access', _137 => _137.grade]), () => ( null)) })) }));
|
|
4087
4087
|
}
|
|
4088
4088
|
};
|
|
4089
4089
|
const removeLut = {
|
|
@@ -4095,9 +4095,9 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4095
4095
|
handler: ({ clips }) => {
|
|
4096
4096
|
gradeTargets(clips);
|
|
4097
4097
|
const p = project();
|
|
4098
|
-
const withLut = clips.filter((id) => _optionalChain([
|
|
4098
|
+
const withLut = clips.filter((id) => _optionalChain([_chunkVKF3PWKRcjs.findVideoClip.call(void 0, p, id), 'access', _138 => _138.clip, 'access', _139 => _139.grade, 'optionalAccess', _140 => _140.lut]));
|
|
4099
4099
|
if (!withLut.length) throw new Error(`None of ${clips.map((c) => `"${c}"`).join(", ")} has a LUT; get_video_project shows each clip's grade.`);
|
|
4100
|
-
return apply(videoLutEdits(p, withLut, null), "Remove LUT", (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([
|
|
4100
|
+
return apply(videoLutEdits(p, withLut, null), "Remove LUT", (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkVKF3PWKRcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _141 => _141.clip, 'access', _142 => _142.grade]), () => ( null)) })) }));
|
|
4101
4101
|
}
|
|
4102
4102
|
};
|
|
4103
4103
|
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." };
|
|
@@ -4206,7 +4206,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4206
4206
|
approximate: parsed.approximate,
|
|
4207
4207
|
first: list[0],
|
|
4208
4208
|
last: list[list.length - 1],
|
|
4209
|
-
...a.duration !== void 0 && list[list.length - 1].end > a.duration +
|
|
4209
|
+
...a.duration !== void 0 && list[list.length - 1].end > a.duration + _chunkVKF3PWKRcjs.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?` } : {}
|
|
4210
4210
|
}));
|
|
4211
4211
|
}
|
|
4212
4212
|
};
|
|
@@ -4277,12 +4277,12 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4277
4277
|
const bad = ranges.findIndex((r) => !(r.to > r.from));
|
|
4278
4278
|
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".`);
|
|
4279
4279
|
const merged = mergeVideoRanges(ranges);
|
|
4280
|
-
const before =
|
|
4281
|
-
return apply(videoRemoveRangesEdits(merged, tracks), merged.length > 1 ? `Cut ${merged.length} stretches` : "Cut stretch", (r) => ({ removed: merged.length, time: round(before -
|
|
4280
|
+
const before = _chunkVKF3PWKRcjs.videoProjectDuration.call(void 0, project());
|
|
4281
|
+
return apply(videoRemoveRangesEdits(merged, tracks), merged.length > 1 ? `Cut ${merged.length} stretches` : "Cut stretch", (r) => ({ removed: merged.length, time: round(before - _chunkVKF3PWKRcjs.videoProjectDuration.call(void 0, r.project)), duration: _chunkVKF3PWKRcjs.videoProjectDuration.call(void 0, r.project) }));
|
|
4282
4282
|
}
|
|
4283
4283
|
};
|
|
4284
4284
|
const rampTarget = (id) => {
|
|
4285
|
-
const at =
|
|
4285
|
+
const at = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, project(), id);
|
|
4286
4286
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
4287
4287
|
const { clip } = at;
|
|
4288
4288
|
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.`);
|
|
@@ -4292,7 +4292,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4292
4292
|
};
|
|
4293
4293
|
const rampOut = (r, id) => {
|
|
4294
4294
|
const outcome2 = r.outcomes[r.outcomes.length - 1];
|
|
4295
|
-
return { clip: clipOut(r.project, id), ...outcome2.rippled ? { rippled: outcome2.rippled } : {}, duration:
|
|
4295
|
+
return { clip: clipOut(r.project, id), ...outcome2.rippled ? { rippled: outcome2.rippled } : {}, duration: _chunkVKF3PWKRcjs.videoProjectDuration.call(void 0, r.project) };
|
|
4296
4296
|
};
|
|
4297
4297
|
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." };
|
|
4298
4298
|
const setSpeedRamp = {
|
|
@@ -4323,8 +4323,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4323
4323
|
),
|
|
4324
4324
|
annotations: { title: "Ramp the speed", ...WRITE_IDEMPOTENT },
|
|
4325
4325
|
handler: ({ clip, segments, ripple }) => {
|
|
4326
|
-
const edit =
|
|
4327
|
-
return apply(edit, "Speed ramp", (r) => ({ ...rampOut(r, clip), source: Math.round(
|
|
4326
|
+
const edit = _chunkVKF3PWKRcjs.videoSpeedRampEdit.call(void 0, rampTarget(clip), segments, _nullishCoalesce(ripple, () => ( true)));
|
|
4327
|
+
return apply(edit, "Speed ramp", (r) => ({ ...rampOut(r, clip), source: Math.round(_chunkVKF3PWKRcjs.videoSpeedRampKeys.call(void 0, segments).source) }));
|
|
4328
4328
|
}
|
|
4329
4329
|
};
|
|
4330
4330
|
const addFreeze = {
|
|
@@ -4344,8 +4344,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4344
4344
|
handler: ({ clip, at, duration, ripple }) => {
|
|
4345
4345
|
const c = rampTarget(clip);
|
|
4346
4346
|
const t = at - c.start;
|
|
4347
|
-
if (t < 0 || t > c.duration) throw new Error(`${
|
|
4348
|
-
return apply(
|
|
4347
|
+
if (t < 0 || t > c.duration) throw new Error(`${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, at)} is outside clip "${clip}" (${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, c.start)}\u2013${_chunkVKF3PWKRcjs.formatVideoSeconds.call(void 0, _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, c))}); pick a time inside it.`);
|
|
4348
|
+
return apply(_chunkVKF3PWKRcjs.videoFreezeFrameEdit.call(void 0, c, t, duration, _nullishCoalesce(ripple, () => ( true))), "Freeze frame", (r) => rampOut(r, clip));
|
|
4349
4349
|
}
|
|
4350
4350
|
};
|
|
4351
4351
|
const removeRamp = {
|
|
@@ -4518,7 +4518,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4518
4518
|
let from;
|
|
4519
4519
|
let to;
|
|
4520
4520
|
if (args.clip !== void 0) {
|
|
4521
|
-
const found =
|
|
4521
|
+
const found = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, p, args.clip);
|
|
4522
4522
|
if (!found) throw new Error(`There is no clip "${args.clip}"; get_video_project lists the clips.`);
|
|
4523
4523
|
const c = found.clip;
|
|
4524
4524
|
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).`);
|
|
@@ -4528,7 +4528,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4528
4528
|
toSource = (t) => (_nullishCoalesce(c.in, () => ( 0))) + (t - c.start) * speed;
|
|
4529
4529
|
toOut = (s) => c.start + (s - (_nullishCoalesce(c.in, () => ( 0)))) / speed;
|
|
4530
4530
|
from = Math.max(c.start, _nullishCoalesce(args.from, () => ( c.start)));
|
|
4531
|
-
to = Math.min(
|
|
4531
|
+
to = Math.min(_chunkVKF3PWKRcjs.videoClipEnd.call(void 0, c), _nullishCoalesce(args.to, () => ( _chunkVKF3PWKRcjs.videoClipEnd.call(void 0, c))));
|
|
4532
4532
|
} else {
|
|
4533
4533
|
asset = p.assets.find((a) => a.id === args.asset);
|
|
4534
4534
|
if (!asset) throw new Error(`There is no asset "${args.asset}"; the assets are ${p.assets.map((a) => `"${a.id}"`).join(", ") || "none"}.`);
|
|
@@ -4609,11 +4609,11 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4609
4609
|
annotations: { title: "Measure a frame with scopes", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
4610
4610
|
handler: async ({ time, bins, columns }) => {
|
|
4611
4611
|
const p = project();
|
|
4612
|
-
const end =
|
|
4612
|
+
const end = _chunkVKF3PWKRcjs.videoProjectDuration.call(void 0, p);
|
|
4613
4613
|
const t = _nullishCoalesce(time, () => ( controller.getState().time));
|
|
4614
4614
|
if (time !== void 0 && time > end) throw new Error(`Time ${time} ms is past the end of the project (${end} ms).`);
|
|
4615
4615
|
const pixels = await pixelsAt(t);
|
|
4616
|
-
return { time: t, timecode:
|
|
4616
|
+
return { time: t, timecode: _chunkVKF3PWKRcjs.formatVideoTimecode.call(void 0, t, p.fps), width: pixels.width, height: pixels.height, ...summarizeVideoScopes(pixels, { bins, columns }) };
|
|
4617
4617
|
}
|
|
4618
4618
|
};
|
|
4619
4619
|
const reads = [getProject, listSequences, getFrame, getTranscript, findText, findFillers, findPauses, findGaps, checkProject, renderFrame, getScopes, previewCache, planProxies, exportFfmpeg, exportLoudnessMeasure, exportEdl, audioLevels, findSilences, seek, setPreviewScale];
|
|
@@ -4621,6 +4621,9 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4621
4621
|
return {
|
|
4622
4622
|
id: _nullishCoalesce(options.id, () => ( "video")),
|
|
4623
4623
|
namespace: options.namespace,
|
|
4624
|
+
title: "Video editor",
|
|
4625
|
+
description: "Non-linear video editing: assets, tracks and clips, trims, ripples and gaps, transitions and speed, grading and LUTs, keyframes, audio, transcripts, markers, and EDL or ffmpeg export.",
|
|
4626
|
+
skill: "pixerate-video-editor",
|
|
4624
4627
|
tools: () => readOnlyReason() ? reads : [...reads, ...writes],
|
|
4625
4628
|
subscribe: (notify) => {
|
|
4626
4629
|
let last = readOnlyReason();
|
|
@@ -4653,7 +4656,7 @@ var KEYS2 = {
|
|
|
4653
4656
|
properties: {
|
|
4654
4657
|
t: { type: "number", description: "Clip-relative time in ms (0 = the clip's start)." },
|
|
4655
4658
|
v: { type: "number", description: "The control's value at t, within its range from describe_effect." },
|
|
4656
|
-
ease: { anyOf: [{ type: "string", enum: [...
|
|
4659
|
+
ease: { anyOf: [{ type: "string", enum: [..._chunkVKF3PWKRcjs.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]." }
|
|
4657
4660
|
},
|
|
4658
4661
|
required: ["t", "v"],
|
|
4659
4662
|
additionalProperties: false
|
|
@@ -4667,7 +4670,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
4667
4670
|
return controller.readOnlyReason();
|
|
4668
4671
|
};
|
|
4669
4672
|
const clipOf = (id) => {
|
|
4670
|
-
const at =
|
|
4673
|
+
const at = _chunkVKF3PWKRcjs.findVideoClip.call(void 0, controller.getProject(), id);
|
|
4671
4674
|
if (!at) {
|
|
4672
4675
|
const ids = controller.getProject().tracks.flatMap((t) => t.clips.map((c) => c.id));
|
|
4673
4676
|
throw new Error(`There is no clip "${id}"; the clips are ${ids.map((c) => `"${c}"`).join(", ") || "none"} (get_video_project lists them).`);
|
|
@@ -4680,9 +4683,12 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
4680
4683
|
const effect = _nullishCoalesce(effects.find((e) => e.id === (_nullishCoalesce(instance, () => ( _optionalChain([r, 'access', _154 => _154.effect, 'optionalAccess', _155 => _155.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])));
|
|
4681
4684
|
return { target, effect, effects, ...extra };
|
|
4682
4685
|
};
|
|
4683
|
-
return
|
|
4686
|
+
return _chunkRUZQMYXHcjs.createEffectToolProvider.call(void 0, {
|
|
4684
4687
|
id: _nullishCoalesce(options.id, () => ( "video-effects")),
|
|
4685
4688
|
namespace: options.namespace,
|
|
4689
|
+
title: "Video effects",
|
|
4690
|
+
description: "Provider effects on video clips, effect clips and effect transitions.",
|
|
4691
|
+
skill: "pixerate-video-editor",
|
|
4686
4692
|
target: { noun: "clip", id: 'A clip id from get_video_project (e.g. "c1").' },
|
|
4687
4693
|
applyUses: ["filter", "overlay"],
|
|
4688
4694
|
applyDetails: "Filters change the clip's picture and overlays draw over it, in stack order, on the picture as it comes from the source, before the clip's grade, placement, opacity and blend; numbers may be keyframed (clip-relative ms). Transitions go through set_video_effect_transition and generators or titles through add_video_effect_clip. The preview renders them frame by frame; the ffmpeg export then needs rendered frames (see export_video_ffmpeg).",
|
|
@@ -4735,7 +4741,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
4735
4741
|
duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms (default: the effect's own length, else 5000)." },
|
|
4736
4742
|
values: ctx.valuesSchema("Control values over the effect's defaults", true),
|
|
4737
4743
|
name: { type: "string", minLength: 1, description: "A label for the clip (default: the effect's name)." },
|
|
4738
|
-
mode: { type: "string", enum: [...
|
|
4744
|
+
mode: { type: "string", enum: [..._chunkVKF3PWKRcjs.VIDEO_PLACEMENT_MODES], description: "What to do with clips already there: refuse (default), overwrite or insert." }
|
|
4739
4745
|
},
|
|
4740
4746
|
required: ["track", "effect"],
|
|
4741
4747
|
additionalProperties: false
|
|
@@ -4795,7 +4801,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
4795
4801
|
const clip = clipOf(args.clip);
|
|
4796
4802
|
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).`);
|
|
4797
4803
|
const was = _optionalChain([clip, 'access', _156 => _156.values, 'optionalAccess', _157 => _157[args.control]]);
|
|
4798
|
-
const plain = keys === null ?
|
|
4804
|
+
const plain = keys === null ? _chunkVKF3PWKRcjs.isVideoKeyframes.call(void 0, was) ? _optionalChain([was, 'access', _158 => _158.keys, 'access', _159 => _159[0], 'optionalAccess', _160 => _160.v]) : was : { keys: [...keys].sort((a, b) => a.t - b.t) };
|
|
4799
4805
|
if (plain === void 0) throw new Error(`"${args.control}" has no value to keep; give keys instead.`);
|
|
4800
4806
|
r = await controller.updateEffectValues(args.clip, "generator", { [args.control]: plain });
|
|
4801
4807
|
} else r = await controller.setClipEffectKeyframes(args.clip, args.effect, args.control, keys);
|
|
@@ -5058,4 +5064,4 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
5058
5064
|
|
|
5059
5065
|
|
|
5060
5066
|
|
|
5061
|
-
exports.VIDEO_BLEND_MODES = _chunkBWT4IWLKcjs.VIDEO_BLEND_MODES; exports.VIDEO_BLEND_MODE_LABELS = VIDEO_BLEND_MODE_LABELS; exports.VIDEO_CLIP_ANIMATION_DURATION = _chunkBWT4IWLKcjs.VIDEO_CLIP_ANIMATION_DURATION; exports.VIDEO_CLIP_ANIMATION_EFFECTS = _chunkBWT4IWLKcjs.VIDEO_CLIP_ANIMATION_EFFECTS; exports.VIDEO_CLIP_ANIMATION_LABELS = VIDEO_CLIP_ANIMATION_LABELS; exports.VIDEO_CLIP_TYPES = _chunkBWT4IWLKcjs.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_EASE_NAMES = _chunkBWT4IWLKcjs.VIDEO_EASE_NAMES; exports.VIDEO_EDIT_OPS = VIDEO_EDIT_OPS; exports.VIDEO_EFFECT_PLACES = _chunkBWT4IWLKcjs.VIDEO_EFFECT_PLACES; exports.VIDEO_FADE_CURVES = _chunkBWT4IWLKcjs.VIDEO_FADE_CURVES; exports.VIDEO_FADE_CURVE_LABELS = VIDEO_FADE_CURVE_LABELS; exports.VIDEO_FITS = _chunkBWT4IWLKcjs.VIDEO_FITS; exports.VIDEO_GRADE_CONTROLS = _chunkBWT4IWLKcjs.VIDEO_GRADE_CONTROLS; exports.VIDEO_GRADE_PRESETS = _chunkBWT4IWLKcjs.VIDEO_GRADE_PRESETS; exports.VIDEO_GRADE_PRESET_NAMES = _chunkBWT4IWLKcjs.VIDEO_GRADE_PRESET_NAMES; exports.VIDEO_ISSUE_CODES = VIDEO_ISSUE_CODES; exports.VIDEO_KEYFRAME_LIMITS = _chunkBWT4IWLKcjs.VIDEO_KEYFRAME_LIMITS; exports.VIDEO_KEYFRAME_PROPERTIES = _chunkBWT4IWLKcjs.VIDEO_KEYFRAME_PROPERTIES; exports.VIDEO_LUT_MAX_SIZE = _chunkBWT4IWLKcjs.VIDEO_LUT_MAX_SIZE; exports.VIDEO_PEAK_BLOCK = VIDEO_PEAK_BLOCK; exports.VIDEO_PLACEMENT_MODES = _chunkBWT4IWLKcjs.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 = _chunkBWT4IWLKcjs.VIDEO_TIME_EPSILON; exports.VIDEO_TRANSFORM_PROPERTIES = _chunkBWT4IWLKcjs.VIDEO_TRANSFORM_PROPERTIES; exports.VIDEO_TRANSITION_LABELS = VIDEO_TRANSITION_LABELS; exports.VIDEO_TRANSITION_TYPES = _chunkBWT4IWLKcjs.VIDEO_TRANSITION_TYPES; exports.VIDEO_VECTORSCOPE_TARGETS = VIDEO_VECTORSCOPE_TARGETS; exports.VIDEO_WIPE_DIRECTIONS = _chunkBWT4IWLKcjs.VIDEO_WIPE_DIRECTIONS; exports.VideoAudioPeaksCache = VideoAudioPeaksCache; exports.VideoEditorController = VideoEditorController; exports.VideoEffectsEngine = _chunkBWT4IWLKcjs.VideoEffectsEngine; exports.VideoFrameCache = VideoFrameCache; exports.VideoLutCache = _chunkBWT4IWLKcjs.VideoLutCache; exports.VideoPreviewEngine = VideoPreviewEngine; exports.VideoPreviewPixels = VideoPreviewPixels; exports.allVideoClipIds = _chunkBWT4IWLKcjs.allVideoClipIds; exports.allVideoTracks = _chunkBWT4IWLKcjs.allVideoTracks; exports.applyVideoEdits = applyVideoEdits; exports.applyVideoGrade = _chunkBWT4IWLKcjs.applyVideoGrade; exports.applyVideoLut = _chunkBWT4IWLKcjs.applyVideoLut; exports.applyVideoLutToPixels = _chunkBWT4IWLKcjs.applyVideoLutToPixels; exports.buildVideoAudioPeaks = buildVideoAudioPeaks; exports.checkVideoEffectPlace = _chunkBWT4IWLKcjs.checkVideoEffectPlace; exports.checkVideoEffectValues = _chunkBWT4IWLKcjs.checkVideoEffectValues; exports.checkVideoProject = checkVideoProject; exports.checkVideoTimeRemap = _chunkBWT4IWLKcjs.checkVideoTimeRemap; exports.createVideoEditorToolProvider = createVideoEditorToolProvider; exports.createVideoEffectsToolProvider = createVideoEffectsToolProvider; exports.createVideoElementDecoder = createVideoElementDecoder; exports.createVideoProject = createVideoProject; exports.decodeVideoAudioPeaks = decodeVideoAudioPeaks; exports.describeVideoProject = describeVideoProject; exports.describeVideoSequence = describeVideoSequence; exports.drawVideoFrame = _chunkBWT4IWLKcjs.drawVideoFrame; exports.ffmpegFilterValue = _chunkBWT4IWLKcjs.ffmpegFilterValue; exports.findVideoAudioSilences = findVideoAudioSilences; exports.findVideoClip = _chunkBWT4IWLKcjs.findVideoClip; exports.findVideoFillers = findVideoFillers; exports.findVideoGaps = _chunkBWT4IWLKcjs.findVideoGaps; exports.findVideoSequenceClip = _chunkBWT4IWLKcjs.findVideoSequenceClip; exports.findVideoSequenceCycle = _chunkBWT4IWLKcjs.findVideoSequenceCycle; exports.findVideoTranscriptPauses = findVideoTranscriptPauses; exports.findVideoTranscriptText = findVideoTranscriptText; exports.formatVideoSeconds = _chunkBWT4IWLKcjs.formatVideoSeconds; exports.formatVideoTimecode = _chunkBWT4IWLKcjs.formatVideoTimecode; exports.formatVideoTimecodeFrames = _chunkBWT4IWLKcjs.formatVideoTimecodeFrames; exports.isVideoDropFrameRate = _chunkBWT4IWLKcjs.isVideoDropFrameRate; exports.isVideoKeyframes = _chunkBWT4IWLKcjs.isVideoKeyframes; exports.mergeVideoRanges = mergeVideoRanges; exports.mixEffectPixels = _chunkBWT4IWLKcjs.mixEffectPixels; exports.nextFreeVideoSlot = _chunkBWT4IWLKcjs.nextFreeVideoSlot; exports.normalizeVideoGrade = _chunkBWT4IWLKcjs.normalizeVideoGrade; exports.normalizeVideoGradeLut = _chunkBWT4IWLKcjs.normalizeVideoGradeLut; exports.normalizeVideoWord = normalizeVideoWord; exports.overEffectPixels = _chunkBWT4IWLKcjs.overEffectPixels; exports.parseVideoAnimatable = parseVideoAnimatable; exports.parseVideoAsset = parseVideoAsset; exports.parseVideoAssetProxies = parseVideoAssetProxies; exports.parseVideoClip = parseVideoClip; exports.parseVideoClipAnimation = parseVideoClipAnimation; exports.parseVideoClipEffects = parseVideoClipEffects; exports.parseVideoCubeLut = _chunkBWT4IWLKcjs.parseVideoCubeLut; exports.parseVideoEffectRef = parseVideoEffectRef; exports.parseVideoEffectValues = parseVideoEffectValues; exports.parseVideoGrade = parseVideoGrade; exports.parseVideoGradeLut = parseVideoGradeLut; exports.parseVideoKeyframes = parseVideoKeyframes; exports.parseVideoLoudnessMeasurement = _chunkBWT4IWLKcjs.parseVideoLoudnessMeasurement; exports.parseVideoMarker = parseVideoMarker; exports.parseVideoPreviewScale = parseVideoPreviewScale; exports.parseVideoProject = parseVideoProject; exports.parseVideoSequence = parseVideoSequence; exports.parseVideoTimeRemap = parseVideoTimeRemap; exports.parseVideoTrack = parseVideoTrack; exports.parseVideoTranscript = parseVideoTranscript; exports.parseVideoTranscriptWords = parseVideoTranscriptWords; exports.parseVideoTransform = parseVideoTransform; exports.parseVideoTransition = parseVideoTransition; exports.placeVideoRect = _chunkBWT4IWLKcjs.placeVideoRect; exports.planVideoClipDrag = planVideoClipDrag; exports.planVideoPrefetch = planVideoPrefetch; exports.probeVideoMedia = probeVideoMedia; exports.readVideoScopesPanel = readVideoScopesPanel; exports.removeVideoKey = _chunkBWT4IWLKcjs.removeVideoKey; exports.renderVideoFrameExact = _chunkBWT4IWLKcjs.renderVideoFrameExact; exports.resolveVideoPreviewScale = resolveVideoPreviewScale; exports.retimeVideoAnimatable = _chunkBWT4IWLKcjs.retimeVideoAnimatable; exports.setVideoKey = _chunkBWT4IWLKcjs.setVideoKey; exports.snapToVideoFrame = _chunkBWT4IWLKcjs.snapToVideoFrame; exports.snapVideoTime = _chunkBWT4IWLKcjs.snapVideoTime; exports.sortVideoKeys = _chunkBWT4IWLKcjs.sortVideoKeys; exports.sortedVideoClips = _chunkBWT4IWLKcjs.sortedVideoClips; exports.splitVideoAnimatable = _chunkBWT4IWLKcjs.splitVideoAnimatable; exports.summarizeVideoScopes = summarizeVideoScopes; exports.toVideoEdl = _chunkBWT4IWLKcjs.toVideoEdl; exports.toVideoFfmpeg = _chunkBWT4IWLKcjs.toVideoFfmpeg; exports.toVideoLoudnessMeasure = _chunkBWT4IWLKcjs.toVideoLoudnessMeasure; exports.videoAssetDropEdit = videoAssetDropEdit; exports.videoAssetHasSound = _chunkBWT4IWLKcjs.videoAssetHasSound; exports.videoAssetKindOf = videoAssetKindOf; exports.videoAssetMap = _chunkBWT4IWLKcjs.videoAssetMap; exports.videoAssetProxy = videoAssetProxy; exports.videoAudioLevels = videoAudioLevels; exports.videoAudioPeakRange = videoAudioPeakRange; exports.videoAudioPeakSpans = videoAudioPeakSpans; exports.videoAudioPeaksDuration = videoAudioPeaksDuration; exports.videoCacheEvictions = videoCacheEvictions; exports.videoChroma = videoChroma; exports.videoClipAfter = _chunkBWT4IWLKcjs.videoClipAfter; exports.videoClipAnimated = _chunkBWT4IWLKcjs.videoClipAnimated; exports.videoClipAnimationProperties = _chunkBWT4IWLKcjs.videoClipAnimationProperties; exports.videoClipAnimationSpans = _chunkBWT4IWLKcjs.videoClipAnimationSpans; exports.videoClipAppliedEffects = videoClipAppliedEffects; exports.videoClipBefore = _chunkBWT4IWLKcjs.videoClipBefore; exports.videoClipEffectUses = _chunkBWT4IWLKcjs.videoClipEffectUses; exports.videoClipEnd = _chunkBWT4IWLKcjs.videoClipEnd; exports.videoClipHandles = _chunkBWT4IWLKcjs.videoClipHandles; exports.videoClipKeyframes = videoClipKeyframes; exports.videoClipLabel = videoClipLabel; exports.videoClipOverhang = _chunkBWT4IWLKcjs.videoClipOverhang; exports.videoClipShowsWaveform = videoClipShowsWaveform; exports.videoClipSoundGain = _chunkBWT4IWLKcjs.videoClipSoundGain; exports.videoClipSourceRange = _chunkBWT4IWLKcjs.videoClipSourceRange; exports.videoClipSourceTime = _chunkBWT4IWLKcjs.videoClipSourceTime; exports.videoClipSpeed = _chunkBWT4IWLKcjs.videoClipSpeed; exports.videoClipSpeedAt = _chunkBWT4IWLKcjs.videoClipSpeedAt; exports.videoClipTint = videoClipTint; exports.videoClipWaveform = videoClipWaveform; exports.videoClipWaveformPath = videoClipWaveformPath; exports.videoClipsAt = _chunkBWT4IWLKcjs.videoClipsAt; exports.videoContactSheetSvg = _chunkBWT4IWLKcjs.videoContactSheetSvg; exports.videoDragLabel = videoDragLabel; exports.videoDropTracks = videoDropTracks; exports.videoEaseBezier = _chunkBWT4IWLKcjs.videoEaseBezier; exports.videoEaseProgress = _chunkBWT4IWLKcjs.videoEaseProgress; exports.videoEffectFrameTime = _chunkBWT4IWLKcjs.videoEffectFrameTime; exports.videoEffectLayerKey = _chunkBWT4IWLKcjs.videoEffectLayerKey; exports.videoEffectValuesAt = _chunkBWT4IWLKcjs.videoEffectValuesAt; exports.videoExposureNotes = videoExposureNotes; exports.videoExposureStats = videoExposureStats; exports.videoFadeCurveGain = _chunkBWT4IWLKcjs.videoFadeCurveGain; exports.videoFfmpegUnsupportedEffects = _chunkBWT4IWLKcjs.videoFfmpegUnsupportedEffects; exports.videoFrameAt = _chunkBWT4IWLKcjs.videoFrameAt; exports.videoFrameCacheKey = videoFrameCacheKey; exports.videoFrameDuration = _chunkBWT4IWLKcjs.videoFrameDuration; exports.videoFrameLeafLayers = _chunkBWT4IWLKcjs.videoFrameLeafLayers; exports.videoFrameRequestsAt = videoFrameRequestsAt; exports.videoFrameToSvg = _chunkBWT4IWLKcjs.videoFrameToSvg; exports.videoFrames = _chunkBWT4IWLKcjs.videoFrames; exports.videoFreezeFrameEdit = _chunkBWT4IWLKcjs.videoFreezeFrameEdit; exports.videoGradeCssFilter = _chunkBWT4IWLKcjs.videoGradeCssFilter; exports.videoGradeFfmpegFilters = _chunkBWT4IWLKcjs.videoGradeFfmpegFilters; exports.videoGradeGainsFilterId = _chunkBWT4IWLKcjs.videoGradeGainsFilterId; exports.videoGradeLook = _chunkBWT4IWLKcjs.videoGradeLook; exports.videoGradePreset = _chunkBWT4IWLKcjs.videoGradePreset; exports.videoGradeStepMatrix = _chunkBWT4IWLKcjs.videoGradeStepMatrix; exports.videoGradeStepSvgValues = _chunkBWT4IWLKcjs.videoGradeStepSvgValues; exports.videoGradeSteps = _chunkBWT4IWLKcjs.videoGradeSteps; exports.videoGradeSvgDefs = _chunkBWT4IWLKcjs.videoGradeSvgDefs; exports.videoGradeSvgFilter = _chunkBWT4IWLKcjs.videoGradeSvgFilter; exports.videoHistogram = videoHistogram; exports.videoHistogramImage = videoHistogramImage; exports.videoHourFrames = _chunkBWT4IWLKcjs.videoHourFrames; exports.videoIrisRadius = _chunkBWT4IWLKcjs.videoIrisRadius; exports.videoIssueKey = videoIssueKey; exports.videoKeyframeBreakpoints = _chunkBWT4IWLKcjs.videoKeyframeBreakpoints; exports.videoKeyframeFfmpegExpr = _chunkBWT4IWLKcjs.videoKeyframeFfmpegExpr; exports.videoKeyframeRows = videoKeyframeRows; exports.videoKeyframeToggleEdit = videoKeyframeToggleEdit; exports.videoKeyframeValueEdit = videoKeyframeValueEdit; exports.videoKeysOf = _chunkBWT4IWLKcjs.videoKeysOf; exports.videoLayersUseEffects = _chunkBWT4IWLKcjs.videoLayersUseEffects; exports.videoLayersWithoutTransitionEffects = _chunkBWT4IWLKcjs.videoLayersWithoutTransitionEffects; exports.videoLuma = videoLuma; exports.videoLumaWaveform = videoLumaWaveform; exports.videoLutEdits = videoLutEdits; exports.videoLutFromFunction = _chunkBWT4IWLKcjs.videoLutFromFunction; exports.videoLutSvgApproximation = _chunkBWT4IWLKcjs.videoLutSvgApproximation; exports.videoLutSvgPrimitives = _chunkBWT4IWLKcjs.videoLutSvgPrimitives; exports.videoLutToCube = _chunkBWT4IWLKcjs.videoLutToCube; exports.videoOverlap = _chunkBWT4IWLKcjs.videoOverlap; exports.videoPeakDb = videoPeakDb; exports.videoPreviewSrc = videoPreviewSrc; exports.videoProjectDuration = _chunkBWT4IWLKcjs.videoProjectDuration; exports.videoProjectEffects = _chunkBWT4IWLKcjs.videoProjectEffects; exports.videoProjectHasProxies = videoProjectHasProxies; exports.videoProjectSvg = _chunkBWT4IWLKcjs.videoProjectSvg; exports.videoProxyFfmpeg = videoProxyFfmpeg; exports.videoProxyName = videoProxyName; exports.videoProxyPlan = videoProxyPlan; exports.videoRemoveRangesEdits = videoRemoveRangesEdits; exports.videoRulerTicks = videoRulerTicks; exports.videoScopeImage = videoScopeImage; exports.videoSequenceChildren = _chunkBWT4IWLKcjs.videoSequenceChildren; exports.videoSequenceDuration = _chunkBWT4IWLKcjs.videoSequenceDuration; exports.videoSequenceMap = _chunkBWT4IWLKcjs.videoSequenceMap; exports.videoShellQuote = _chunkBWT4IWLKcjs.videoShellQuote; exports.videoSlowMotionRamp = _chunkBWT4IWLKcjs.videoSlowMotionRamp; exports.videoSnapPoints = _chunkBWT4IWLKcjs.videoSnapPoints; exports.videoSourceFrame = videoSourceFrame; exports.videoSourceFrameTime = videoSourceFrameTime; exports.videoSpeedRampEdit = _chunkBWT4IWLKcjs.videoSpeedRampEdit; exports.videoSpeedRampKeys = _chunkBWT4IWLKcjs.videoSpeedRampKeys; exports.videoTextStyle = _chunkBWT4IWLKcjs.videoTextStyle; exports.videoTimeRemapBreakpoints = _chunkBWT4IWLKcjs.videoTimeRemapBreakpoints; exports.videoTimeRemapSpan = _chunkBWT4IWLKcjs.videoTimeRemapSpan; exports.videoTimecodeFrames = _chunkBWT4IWLKcjs.videoTimecodeFrames; exports.videoTimelineTranscript = videoTimelineTranscript; exports.videoTitleFrame = _chunkBWT4IWLKcjs.videoTitleFrame; exports.videoTrackSyncLocked = _chunkBWT4IWLKcjs.videoTrackSyncLocked; exports.videoTranscriptEdit = videoTranscriptEdit; exports.videoTranscriptTrack = videoTranscriptTrack; exports.videoTransformAt = _chunkBWT4IWLKcjs.videoTransformAt; exports.videoTransitionAudioCurve = _chunkBWT4IWLKcjs.videoTransitionAudioCurve; exports.videoTransitionEase = _chunkBWT4IWLKcjs.videoTransitionEase; exports.videoTransitionHasDirection = videoTransitionHasDirection; exports.videoValueAt = _chunkBWT4IWLKcjs.videoValueAt; exports.videoVectorscope = videoVectorscope; exports.videoVectorscopeAngle = videoVectorscopeAngle; exports.videoVectorscopeImage = videoVectorscopeImage; exports.videoVectorscopePoint = videoVectorscopePoint; exports.videoWaveformImage = videoWaveformImage; exports.videoWaveformPath = videoWaveformPath; exports.videoWipeRect = _chunkBWT4IWLKcjs.videoWipeRect; exports.videoWordAt = videoWordAt; exports.videoWordsRange = videoWordsRange;
|
|
5067
|
+
exports.VIDEO_BLEND_MODES = _chunkVKF3PWKRcjs.VIDEO_BLEND_MODES; exports.VIDEO_BLEND_MODE_LABELS = VIDEO_BLEND_MODE_LABELS; exports.VIDEO_CLIP_ANIMATION_DURATION = _chunkVKF3PWKRcjs.VIDEO_CLIP_ANIMATION_DURATION; exports.VIDEO_CLIP_ANIMATION_EFFECTS = _chunkVKF3PWKRcjs.VIDEO_CLIP_ANIMATION_EFFECTS; exports.VIDEO_CLIP_ANIMATION_LABELS = VIDEO_CLIP_ANIMATION_LABELS; exports.VIDEO_CLIP_TYPES = _chunkVKF3PWKRcjs.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_EASE_NAMES = _chunkVKF3PWKRcjs.VIDEO_EASE_NAMES; exports.VIDEO_EDIT_OPS = VIDEO_EDIT_OPS; exports.VIDEO_EFFECT_PLACES = _chunkVKF3PWKRcjs.VIDEO_EFFECT_PLACES; exports.VIDEO_FADE_CURVES = _chunkVKF3PWKRcjs.VIDEO_FADE_CURVES; exports.VIDEO_FADE_CURVE_LABELS = VIDEO_FADE_CURVE_LABELS; exports.VIDEO_FITS = _chunkVKF3PWKRcjs.VIDEO_FITS; exports.VIDEO_GRADE_CONTROLS = _chunkVKF3PWKRcjs.VIDEO_GRADE_CONTROLS; exports.VIDEO_GRADE_PRESETS = _chunkVKF3PWKRcjs.VIDEO_GRADE_PRESETS; exports.VIDEO_GRADE_PRESET_NAMES = _chunkVKF3PWKRcjs.VIDEO_GRADE_PRESET_NAMES; exports.VIDEO_ISSUE_CODES = VIDEO_ISSUE_CODES; exports.VIDEO_KEYFRAME_LIMITS = _chunkVKF3PWKRcjs.VIDEO_KEYFRAME_LIMITS; exports.VIDEO_KEYFRAME_PROPERTIES = _chunkVKF3PWKRcjs.VIDEO_KEYFRAME_PROPERTIES; exports.VIDEO_LUT_MAX_SIZE = _chunkVKF3PWKRcjs.VIDEO_LUT_MAX_SIZE; exports.VIDEO_PEAK_BLOCK = VIDEO_PEAK_BLOCK; exports.VIDEO_PLACEMENT_MODES = _chunkVKF3PWKRcjs.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 = _chunkVKF3PWKRcjs.VIDEO_TIME_EPSILON; exports.VIDEO_TRANSFORM_PROPERTIES = _chunkVKF3PWKRcjs.VIDEO_TRANSFORM_PROPERTIES; exports.VIDEO_TRANSITION_LABELS = VIDEO_TRANSITION_LABELS; exports.VIDEO_TRANSITION_TYPES = _chunkVKF3PWKRcjs.VIDEO_TRANSITION_TYPES; exports.VIDEO_VECTORSCOPE_TARGETS = VIDEO_VECTORSCOPE_TARGETS; exports.VIDEO_WIPE_DIRECTIONS = _chunkVKF3PWKRcjs.VIDEO_WIPE_DIRECTIONS; exports.VideoAudioPeaksCache = VideoAudioPeaksCache; exports.VideoEditorController = VideoEditorController; exports.VideoEffectsEngine = _chunkVKF3PWKRcjs.VideoEffectsEngine; exports.VideoFrameCache = VideoFrameCache; exports.VideoLutCache = _chunkVKF3PWKRcjs.VideoLutCache; exports.VideoPreviewEngine = VideoPreviewEngine; exports.VideoPreviewPixels = VideoPreviewPixels; exports.allVideoClipIds = _chunkVKF3PWKRcjs.allVideoClipIds; exports.allVideoTracks = _chunkVKF3PWKRcjs.allVideoTracks; exports.applyVideoEdits = applyVideoEdits; exports.applyVideoGrade = _chunkVKF3PWKRcjs.applyVideoGrade; exports.applyVideoLut = _chunkVKF3PWKRcjs.applyVideoLut; exports.applyVideoLutToPixels = _chunkVKF3PWKRcjs.applyVideoLutToPixels; exports.buildVideoAudioPeaks = buildVideoAudioPeaks; exports.checkVideoEffectPlace = _chunkVKF3PWKRcjs.checkVideoEffectPlace; exports.checkVideoEffectValues = _chunkVKF3PWKRcjs.checkVideoEffectValues; exports.checkVideoProject = checkVideoProject; exports.checkVideoTimeRemap = _chunkVKF3PWKRcjs.checkVideoTimeRemap; exports.createVideoEditorToolProvider = createVideoEditorToolProvider; exports.createVideoEffectsToolProvider = createVideoEffectsToolProvider; exports.createVideoElementDecoder = createVideoElementDecoder; exports.createVideoProject = createVideoProject; exports.decodeVideoAudioPeaks = decodeVideoAudioPeaks; exports.describeVideoProject = describeVideoProject; exports.describeVideoSequence = describeVideoSequence; exports.drawVideoFrame = _chunkVKF3PWKRcjs.drawVideoFrame; exports.ffmpegFilterValue = _chunkVKF3PWKRcjs.ffmpegFilterValue; exports.findVideoAudioSilences = findVideoAudioSilences; exports.findVideoClip = _chunkVKF3PWKRcjs.findVideoClip; exports.findVideoFillers = findVideoFillers; exports.findVideoGaps = _chunkVKF3PWKRcjs.findVideoGaps; exports.findVideoSequenceClip = _chunkVKF3PWKRcjs.findVideoSequenceClip; exports.findVideoSequenceCycle = _chunkVKF3PWKRcjs.findVideoSequenceCycle; exports.findVideoTranscriptPauses = findVideoTranscriptPauses; exports.findVideoTranscriptText = findVideoTranscriptText; exports.formatVideoSeconds = _chunkVKF3PWKRcjs.formatVideoSeconds; exports.formatVideoTimecode = _chunkVKF3PWKRcjs.formatVideoTimecode; exports.formatVideoTimecodeFrames = _chunkVKF3PWKRcjs.formatVideoTimecodeFrames; exports.isVideoDropFrameRate = _chunkVKF3PWKRcjs.isVideoDropFrameRate; exports.isVideoKeyframes = _chunkVKF3PWKRcjs.isVideoKeyframes; exports.mergeVideoRanges = mergeVideoRanges; exports.mixEffectPixels = _chunkVKF3PWKRcjs.mixEffectPixels; exports.nextFreeVideoSlot = _chunkVKF3PWKRcjs.nextFreeVideoSlot; exports.normalizeVideoGrade = _chunkVKF3PWKRcjs.normalizeVideoGrade; exports.normalizeVideoGradeLut = _chunkVKF3PWKRcjs.normalizeVideoGradeLut; exports.normalizeVideoWord = normalizeVideoWord; exports.overEffectPixels = _chunkVKF3PWKRcjs.overEffectPixels; exports.parseVideoAnimatable = parseVideoAnimatable; exports.parseVideoAsset = parseVideoAsset; exports.parseVideoAssetProxies = parseVideoAssetProxies; exports.parseVideoClip = parseVideoClip; exports.parseVideoClipAnimation = parseVideoClipAnimation; exports.parseVideoClipEffects = parseVideoClipEffects; exports.parseVideoCubeLut = _chunkVKF3PWKRcjs.parseVideoCubeLut; exports.parseVideoEffectRef = parseVideoEffectRef; exports.parseVideoEffectValues = parseVideoEffectValues; exports.parseVideoGrade = parseVideoGrade; exports.parseVideoGradeLut = parseVideoGradeLut; exports.parseVideoKeyframes = parseVideoKeyframes; exports.parseVideoLoudnessMeasurement = _chunkVKF3PWKRcjs.parseVideoLoudnessMeasurement; exports.parseVideoMarker = parseVideoMarker; exports.parseVideoPreviewScale = parseVideoPreviewScale; exports.parseVideoProject = parseVideoProject; exports.parseVideoSequence = parseVideoSequence; exports.parseVideoTimeRemap = parseVideoTimeRemap; exports.parseVideoTrack = parseVideoTrack; exports.parseVideoTranscript = parseVideoTranscript; exports.parseVideoTranscriptWords = parseVideoTranscriptWords; exports.parseVideoTransform = parseVideoTransform; exports.parseVideoTransition = parseVideoTransition; exports.placeVideoRect = _chunkVKF3PWKRcjs.placeVideoRect; exports.planVideoClipDrag = planVideoClipDrag; exports.planVideoPrefetch = planVideoPrefetch; exports.probeVideoMedia = probeVideoMedia; exports.readVideoScopesPanel = readVideoScopesPanel; exports.removeVideoKey = _chunkVKF3PWKRcjs.removeVideoKey; exports.renderVideoFrameExact = _chunkVKF3PWKRcjs.renderVideoFrameExact; exports.resolveVideoPreviewScale = resolveVideoPreviewScale; exports.retimeVideoAnimatable = _chunkVKF3PWKRcjs.retimeVideoAnimatable; exports.setVideoKey = _chunkVKF3PWKRcjs.setVideoKey; exports.snapToVideoFrame = _chunkVKF3PWKRcjs.snapToVideoFrame; exports.snapVideoTime = _chunkVKF3PWKRcjs.snapVideoTime; exports.sortVideoKeys = _chunkVKF3PWKRcjs.sortVideoKeys; exports.sortedVideoClips = _chunkVKF3PWKRcjs.sortedVideoClips; exports.splitVideoAnimatable = _chunkVKF3PWKRcjs.splitVideoAnimatable; exports.summarizeVideoScopes = summarizeVideoScopes; exports.toVideoEdl = _chunkVKF3PWKRcjs.toVideoEdl; exports.toVideoFfmpeg = _chunkVKF3PWKRcjs.toVideoFfmpeg; exports.toVideoLoudnessMeasure = _chunkVKF3PWKRcjs.toVideoLoudnessMeasure; exports.videoAssetDropEdit = videoAssetDropEdit; exports.videoAssetHasSound = _chunkVKF3PWKRcjs.videoAssetHasSound; exports.videoAssetKindOf = videoAssetKindOf; exports.videoAssetMap = _chunkVKF3PWKRcjs.videoAssetMap; exports.videoAssetProxy = videoAssetProxy; exports.videoAudioLevels = videoAudioLevels; exports.videoAudioPeakRange = videoAudioPeakRange; exports.videoAudioPeakSpans = videoAudioPeakSpans; exports.videoAudioPeaksDuration = videoAudioPeaksDuration; exports.videoCacheEvictions = videoCacheEvictions; exports.videoChroma = videoChroma; exports.videoClipAfter = _chunkVKF3PWKRcjs.videoClipAfter; exports.videoClipAnimated = _chunkVKF3PWKRcjs.videoClipAnimated; exports.videoClipAnimationProperties = _chunkVKF3PWKRcjs.videoClipAnimationProperties; exports.videoClipAnimationSpans = _chunkVKF3PWKRcjs.videoClipAnimationSpans; exports.videoClipAppliedEffects = videoClipAppliedEffects; exports.videoClipBefore = _chunkVKF3PWKRcjs.videoClipBefore; exports.videoClipEffectUses = _chunkVKF3PWKRcjs.videoClipEffectUses; exports.videoClipEnd = _chunkVKF3PWKRcjs.videoClipEnd; exports.videoClipHandles = _chunkVKF3PWKRcjs.videoClipHandles; exports.videoClipKeyframes = videoClipKeyframes; exports.videoClipLabel = videoClipLabel; exports.videoClipOverhang = _chunkVKF3PWKRcjs.videoClipOverhang; exports.videoClipShowsWaveform = videoClipShowsWaveform; exports.videoClipSoundGain = _chunkVKF3PWKRcjs.videoClipSoundGain; exports.videoClipSourceRange = _chunkVKF3PWKRcjs.videoClipSourceRange; exports.videoClipSourceTime = _chunkVKF3PWKRcjs.videoClipSourceTime; exports.videoClipSpeed = _chunkVKF3PWKRcjs.videoClipSpeed; exports.videoClipSpeedAt = _chunkVKF3PWKRcjs.videoClipSpeedAt; exports.videoClipTint = videoClipTint; exports.videoClipWaveform = videoClipWaveform; exports.videoClipWaveformPath = videoClipWaveformPath; exports.videoClipsAt = _chunkVKF3PWKRcjs.videoClipsAt; exports.videoContactSheetSvg = _chunkVKF3PWKRcjs.videoContactSheetSvg; exports.videoDragLabel = videoDragLabel; exports.videoDropTracks = videoDropTracks; exports.videoEaseBezier = _chunkVKF3PWKRcjs.videoEaseBezier; exports.videoEaseProgress = _chunkVKF3PWKRcjs.videoEaseProgress; exports.videoEffectFrameTime = _chunkVKF3PWKRcjs.videoEffectFrameTime; exports.videoEffectLayerKey = _chunkVKF3PWKRcjs.videoEffectLayerKey; exports.videoEffectValuesAt = _chunkVKF3PWKRcjs.videoEffectValuesAt; exports.videoExposureNotes = videoExposureNotes; exports.videoExposureStats = videoExposureStats; exports.videoFadeCurveGain = _chunkVKF3PWKRcjs.videoFadeCurveGain; exports.videoFfmpegUnsupportedEffects = _chunkVKF3PWKRcjs.videoFfmpegUnsupportedEffects; exports.videoFrameAt = _chunkVKF3PWKRcjs.videoFrameAt; exports.videoFrameCacheKey = videoFrameCacheKey; exports.videoFrameDuration = _chunkVKF3PWKRcjs.videoFrameDuration; exports.videoFrameLeafLayers = _chunkVKF3PWKRcjs.videoFrameLeafLayers; exports.videoFrameRequestsAt = videoFrameRequestsAt; exports.videoFrameToSvg = _chunkVKF3PWKRcjs.videoFrameToSvg; exports.videoFrames = _chunkVKF3PWKRcjs.videoFrames; exports.videoFreezeFrameEdit = _chunkVKF3PWKRcjs.videoFreezeFrameEdit; exports.videoGradeCssFilter = _chunkVKF3PWKRcjs.videoGradeCssFilter; exports.videoGradeFfmpegFilters = _chunkVKF3PWKRcjs.videoGradeFfmpegFilters; exports.videoGradeGainsFilterId = _chunkVKF3PWKRcjs.videoGradeGainsFilterId; exports.videoGradeLook = _chunkVKF3PWKRcjs.videoGradeLook; exports.videoGradePreset = _chunkVKF3PWKRcjs.videoGradePreset; exports.videoGradeStepMatrix = _chunkVKF3PWKRcjs.videoGradeStepMatrix; exports.videoGradeStepSvgValues = _chunkVKF3PWKRcjs.videoGradeStepSvgValues; exports.videoGradeSteps = _chunkVKF3PWKRcjs.videoGradeSteps; exports.videoGradeSvgDefs = _chunkVKF3PWKRcjs.videoGradeSvgDefs; exports.videoGradeSvgFilter = _chunkVKF3PWKRcjs.videoGradeSvgFilter; exports.videoHistogram = videoHistogram; exports.videoHistogramImage = videoHistogramImage; exports.videoHourFrames = _chunkVKF3PWKRcjs.videoHourFrames; exports.videoIrisRadius = _chunkVKF3PWKRcjs.videoIrisRadius; exports.videoIssueKey = videoIssueKey; exports.videoKeyframeBreakpoints = _chunkVKF3PWKRcjs.videoKeyframeBreakpoints; exports.videoKeyframeFfmpegExpr = _chunkVKF3PWKRcjs.videoKeyframeFfmpegExpr; exports.videoKeyframeRows = videoKeyframeRows; exports.videoKeyframeToggleEdit = videoKeyframeToggleEdit; exports.videoKeyframeValueEdit = videoKeyframeValueEdit; exports.videoKeysOf = _chunkVKF3PWKRcjs.videoKeysOf; exports.videoLayersUseEffects = _chunkVKF3PWKRcjs.videoLayersUseEffects; exports.videoLayersWithoutTransitionEffects = _chunkVKF3PWKRcjs.videoLayersWithoutTransitionEffects; exports.videoLuma = videoLuma; exports.videoLumaWaveform = videoLumaWaveform; exports.videoLutEdits = videoLutEdits; exports.videoLutFromFunction = _chunkVKF3PWKRcjs.videoLutFromFunction; exports.videoLutSvgApproximation = _chunkVKF3PWKRcjs.videoLutSvgApproximation; exports.videoLutSvgPrimitives = _chunkVKF3PWKRcjs.videoLutSvgPrimitives; exports.videoLutToCube = _chunkVKF3PWKRcjs.videoLutToCube; exports.videoOverlap = _chunkVKF3PWKRcjs.videoOverlap; exports.videoPeakDb = videoPeakDb; exports.videoPreviewSrc = videoPreviewSrc; exports.videoProjectDuration = _chunkVKF3PWKRcjs.videoProjectDuration; exports.videoProjectEffects = _chunkVKF3PWKRcjs.videoProjectEffects; exports.videoProjectHasProxies = videoProjectHasProxies; exports.videoProjectSvg = _chunkVKF3PWKRcjs.videoProjectSvg; exports.videoProxyFfmpeg = videoProxyFfmpeg; exports.videoProxyName = videoProxyName; exports.videoProxyPlan = videoProxyPlan; exports.videoRemoveRangesEdits = videoRemoveRangesEdits; exports.videoRulerTicks = videoRulerTicks; exports.videoScopeImage = videoScopeImage; exports.videoSequenceChildren = _chunkVKF3PWKRcjs.videoSequenceChildren; exports.videoSequenceDuration = _chunkVKF3PWKRcjs.videoSequenceDuration; exports.videoSequenceMap = _chunkVKF3PWKRcjs.videoSequenceMap; exports.videoShellQuote = _chunkVKF3PWKRcjs.videoShellQuote; exports.videoSlowMotionRamp = _chunkVKF3PWKRcjs.videoSlowMotionRamp; exports.videoSnapPoints = _chunkVKF3PWKRcjs.videoSnapPoints; exports.videoSourceFrame = videoSourceFrame; exports.videoSourceFrameTime = videoSourceFrameTime; exports.videoSpeedRampEdit = _chunkVKF3PWKRcjs.videoSpeedRampEdit; exports.videoSpeedRampKeys = _chunkVKF3PWKRcjs.videoSpeedRampKeys; exports.videoTextStyle = _chunkVKF3PWKRcjs.videoTextStyle; exports.videoTimeRemapBreakpoints = _chunkVKF3PWKRcjs.videoTimeRemapBreakpoints; exports.videoTimeRemapSpan = _chunkVKF3PWKRcjs.videoTimeRemapSpan; exports.videoTimecodeFrames = _chunkVKF3PWKRcjs.videoTimecodeFrames; exports.videoTimelineTranscript = videoTimelineTranscript; exports.videoTitleFrame = _chunkVKF3PWKRcjs.videoTitleFrame; exports.videoTrackSyncLocked = _chunkVKF3PWKRcjs.videoTrackSyncLocked; exports.videoTranscriptEdit = videoTranscriptEdit; exports.videoTranscriptTrack = videoTranscriptTrack; exports.videoTransformAt = _chunkVKF3PWKRcjs.videoTransformAt; exports.videoTransitionAudioCurve = _chunkVKF3PWKRcjs.videoTransitionAudioCurve; exports.videoTransitionEase = _chunkVKF3PWKRcjs.videoTransitionEase; exports.videoTransitionHasDirection = videoTransitionHasDirection; exports.videoValueAt = _chunkVKF3PWKRcjs.videoValueAt; exports.videoVectorscope = videoVectorscope; exports.videoVectorscopeAngle = videoVectorscopeAngle; exports.videoVectorscopeImage = videoVectorscopeImage; exports.videoVectorscopePoint = videoVectorscopePoint; exports.videoWaveformImage = videoWaveformImage; exports.videoWaveformPath = videoWaveformPath; exports.videoWipeRect = _chunkVKF3PWKRcjs.videoWipeRect; exports.videoWordAt = videoWordAt; exports.videoWordsRange = videoWordsRange;
|