@pixerate/editor 0.249.0 → 0.251.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.cjs +40 -41
- package/dist/agent/index.js +9 -10
- package/dist/animation/index.cjs +6 -7
- package/dist/animation/index.js +5 -6
- package/dist/animation-editor/index.cjs +124 -123
- package/dist/animation-editor/index.js +15 -14
- package/dist/brushes/index.cjs +1406 -0
- package/dist/brushes/index.d.cts +12 -0
- package/dist/brushes/index.d.ts +12 -0
- package/dist/brushes/index.js +1406 -0
- package/dist/brushes/migrate.d.cts +17 -0
- package/dist/brushes/migrate.d.ts +17 -0
- package/dist/brushes/normalize.d.cts +15 -0
- package/dist/brushes/normalize.d.ts +15 -0
- package/dist/brushes/presets.d.cts +12 -0
- package/dist/brushes/presets.d.ts +12 -0
- package/dist/brushes/resolve.d.cts +56 -0
- package/dist/brushes/resolve.d.ts +56 -0
- package/dist/brushes/schema.d.cts +29 -0
- package/dist/brushes/schema.d.ts +29 -0
- package/dist/brushes/types.d.cts +323 -0
- package/dist/brushes/types.d.ts +323 -0
- package/dist/{brushstrokeRender-T3JZST44.js → brushstrokeRender-5PYSKZIJ.js} +9 -8
- package/dist/{brushstrokeRender-GCKK7V2I.cjs → brushstrokeRender-7FLLSQEC.cjs} +15 -14
- package/dist/canvas/index.cjs +120 -65
- package/dist/canvas/index.d.cts +1 -0
- package/dist/canvas/index.d.ts +1 -0
- package/dist/canvas/index.js +88 -33
- package/dist/canvas/stickers.d.cts +35 -0
- package/dist/canvas/stickers.d.ts +35 -0
- package/dist/chart/index.cjs +159 -160
- package/dist/chart/index.js +9 -10
- package/dist/{chunk-RXZL4NG5.js → chunk-226QDRO3.js} +1 -1
- package/dist/{chunk-DOIU7VJG.js → chunk-2ZJ4DT3M.js} +1 -1
- package/dist/{chunk-XZNU4DUX.cjs → chunk-3NS5C7FB.cjs} +76 -76
- package/dist/{chunk-UTI5IITZ.cjs → chunk-4ZC5QJE2.cjs} +3 -3
- package/dist/{chunk-L3JFOTBQ.js → chunk-5E2Q7ZHI.js} +1 -1
- package/dist/{chunk-6BIDVPED.js → chunk-5JNA6LLY.js} +1 -1
- package/dist/{chunk-RD7RX52G.cjs → chunk-5UEFBM2M.cjs} +207 -18
- package/dist/{chunk-WA44NKPF.js → chunk-62Z5WLRA.js} +1 -1
- package/dist/{chunk-BVRRIW7F.js → chunk-6GRUVGKU.js} +3 -3
- package/dist/{chunk-QARCM66V.js → chunk-6ZZKRH7R.js} +3 -3
- package/dist/{chunk-BP6KSGVD.js → chunk-7272D3K2.js} +4 -6
- package/dist/{chunk-O75V4ZS3.js → chunk-7P6VF3FG.js} +2 -2
- package/dist/{chunk-AU6MWQKZ.js → chunk-ABL7IWFZ.js} +1 -1
- package/dist/{chunk-5RH3VXAK.js → chunk-APX63ILU.js} +4 -100
- package/dist/{chunk-W7L4HUT2.cjs → chunk-CJ6TBL2N.cjs} +16 -16
- package/dist/{chunk-7PT4RJL5.cjs → chunk-EUIDTZNQ.cjs} +111 -113
- package/dist/{chunk-CXXXAZ7H.js → chunk-F6R67I3A.js} +1 -1
- package/dist/{chunk-I7NJPHWV.cjs → chunk-FQPUF2W2.cjs} +35 -606
- package/dist/{chunk-D5KGAO4Z.js → chunk-GCVFEPJG.js} +2 -573
- package/dist/{chunk-LEQKZGQI.js → chunk-GOBOCZZI.js} +1 -1
- package/dist/{chunk-PZP2SZIZ.js → chunk-GYMMNCFT.js} +3 -3
- package/dist/{chunk-NUTMINJZ.cjs → chunk-H7ET2ISK.cjs} +52 -52
- package/dist/chunk-HS6QDWDF.cjs +1029 -0
- package/dist/{chunk-T7KQEMAE.cjs → chunk-HUAISCUX.cjs} +18 -18
- package/dist/{chunk-YGQVCQTG.js → chunk-ILP77UD6.js} +1 -1
- package/dist/{chunk-GHCSC2WP.cjs → chunk-ISIO63Q5.cjs} +21 -15
- package/dist/{chunk-S6OT6CTS.cjs → chunk-IWEVV63O.cjs} +31 -33
- package/dist/{chunk-OFH6Q67U.js → chunk-JA57JIT5.js} +9 -3
- package/dist/{chunk-LP2MCSBE.cjs → chunk-JFHBXNR2.cjs} +88 -88
- package/dist/{chunk-IOFVM3L3.cjs → chunk-JPEHXIB5.cjs} +10 -10
- package/dist/chunk-JSDND7DF.cjs +173 -0
- package/dist/{chunk-36ZTV7WO.js → chunk-L6Y7TSQ4.js} +1 -1
- package/dist/{chunk-KYX7NZ5V.cjs → chunk-LFMKWGFL.cjs} +1 -1
- package/dist/{chunk-V6DT2CDH.js → chunk-M2TPMYJE.js} +1 -1
- package/dist/{chunk-LJZRHVZV.cjs → chunk-M5GLQQWG.cjs} +2 -2
- package/dist/{chunk-JEGJP4OW.js → chunk-MHLU6GRJ.js} +196 -7
- package/dist/{chunk-KMPM5JM5.js → chunk-MONXNVZK.js} +4 -6
- package/dist/chunk-MTKY6K3Q.js +1029 -0
- package/dist/{chunk-MOW3JMNG.cjs → chunk-N76AMOKE.cjs} +42 -42
- package/dist/{chunk-75K3W4D6.cjs → chunk-NKGB64CW.cjs} +16 -16
- package/dist/{chunk-SGPIVHJB.js → chunk-P3K2JCJA.js} +3 -3
- package/dist/chunk-PXDIAYB6.cjs +594 -0
- package/dist/{chunk-UBRJOIR5.js → chunk-QC3OXRE4.js} +9 -9
- package/dist/{chunk-QOBCBGGI.cjs → chunk-QKXO6JPP.cjs} +14 -14
- package/dist/{chunk-WLJZZHUZ.cjs → chunk-QLSGTCYT.cjs} +23 -23
- package/dist/{chunk-7YW7T5TJ.js → chunk-RHPSE2YR.js} +2 -2
- package/dist/{chunk-44BMJJVA.cjs → chunk-RUONPPMC.cjs} +8 -8
- package/dist/{chunk-LJRCU3BJ.cjs → chunk-SABJMH6M.cjs} +150 -15
- package/dist/{chunk-XWOLPNBW.cjs → chunk-SOSBOS5T.cjs} +22 -22
- package/dist/chunk-SZTI6EER.js +13 -0
- package/dist/{chunk-PPFJHTW5.cjs → chunk-TFF2GTGN.cjs} +22 -24
- package/dist/{chunk-2SMMZDMG.cjs → chunk-TLOGFIIV.cjs} +37 -37
- package/dist/chunk-TXFWZ5ZJ.js +594 -0
- package/dist/chunk-U67EN7GG.cjs +13 -0
- package/dist/{chunk-GXAK6Q5J.js → chunk-UFEDHACQ.js} +2 -2
- package/dist/{chunk-GA4EU4P3.cjs → chunk-UXETV2NC.cjs} +4 -4
- package/dist/{chunk-N4DFDI73.js → chunk-WKMUBATU.js} +1 -1
- package/dist/{chunk-3R5P3DVY.cjs → chunk-WRZ6C4TU.cjs} +6 -6
- package/dist/{chunk-EJLRBS5Q.js → chunk-WZOGDKCQ.js} +137 -2
- package/dist/{chunk-6ADHGQ73.js → chunk-YBAPT7NL.js} +2 -4
- package/dist/{chunk-K5DS2JTA.cjs → chunk-Z3BRH4JK.cjs} +6 -6
- package/dist/{chunk-XNZFVYC2.cjs → chunk-ZBCT5MEA.cjs} +7 -7
- package/dist/color/index.cjs +4 -6
- package/dist/color/index.js +7 -9
- package/dist/effects/helpers.d.cts +6 -0
- package/dist/effects/helpers.d.ts +6 -0
- package/dist/effects/index.cjs +62 -60
- package/dist/effects/index.js +5 -3
- package/dist/effects/tools.d.cts +6 -0
- package/dist/effects/tools.d.ts +6 -0
- package/dist/export/index.cjs +7 -8
- package/dist/export/index.js +6 -7
- package/dist/extensions/index.cjs +10 -11
- package/dist/extensions/index.js +9 -10
- package/dist/gradient/index.cjs +33 -34
- package/dist/gradient/index.js +4 -5
- package/dist/image-editor/effects.d.cts +1 -1
- package/dist/image-editor/effects.d.ts +1 -1
- package/dist/image-editor/index.cjs +887 -863
- package/dist/image-editor/index.d.cts +1 -0
- package/dist/image-editor/index.d.ts +1 -0
- package/dist/image-editor/index.js +69 -45
- package/dist/image-editor/stickers.d.cts +9 -0
- package/dist/image-editor/stickers.d.ts +9 -0
- package/dist/index.cjs +16 -17
- package/dist/index.js +10 -11
- package/dist/paint/index.cjs +6 -4
- package/dist/paint/index.js +21 -19
- package/dist/paint-editor/brushes.d.cts +1 -2
- package/dist/paint-editor/brushes.d.ts +1 -2
- package/dist/paint-editor/index.cjs +2199 -699
- package/dist/paint-editor/index.js +1577 -77
- package/dist/paint-editor/mark-settings.d.cts +104 -0
- package/dist/paint-editor/mark-settings.d.ts +104 -0
- package/dist/paint-editor/procedural.d.cts +2 -75
- package/dist/paint-editor/procedural.d.ts +2 -75
- package/dist/paint-editor/stickers.d.cts +1 -22
- package/dist/paint-editor/stickers.d.ts +1 -22
- package/dist/raster/index.cjs +2 -2
- package/dist/raster/index.js +9 -9
- package/dist/stickers/index.cjs +22 -16
- package/dist/stickers/index.d.cts +1 -1
- package/dist/stickers/index.d.ts +1 -1
- package/dist/stickers/index.js +14 -8
- package/dist/stickers/tools.d.cts +57 -1
- package/dist/stickers/tools.d.ts +57 -1
- package/dist/tokens/index.cjs +3 -4
- package/dist/tokens/index.js +2 -3
- package/dist/typography/index.cjs +7 -8
- package/dist/typography/index.js +2 -3
- package/dist/vector/index.cjs +1011 -977
- package/dist/vector/index.d.cts +1 -0
- package/dist/vector/index.d.ts +1 -0
- package/dist/vector/index.js +47 -13
- package/dist/vector/stickers.d.cts +11 -0
- package/dist/vector/stickers.d.ts +11 -0
- package/dist/video-editor/index.cjs +349 -350
- package/dist/video-editor/index.js +9 -10
- package/package.json +11 -1
- package/skills/pixerate-image-editor/SKILL.md +1 -1
- package/skills/pixerate-stickers/SKILL.md +13 -1
- package/dist/chunk-7AHBW2CQ.cjs +0 -200
- package/dist/chunk-F67XMVDI.js +0 -200
- package/dist/chunk-H4AOUUBE.cjs +0 -2635
- package/dist/chunk-J7T5QZ45.js +0 -2635
- package/dist/chunk-ZEYMKDYS.cjs +0 -269
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQKXO6JPPcjs = require('../chunk-QKXO6JPP.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -149,7 +149,7 @@ var _chunkQOBCBGGIcjs = require('../chunk-QOBCBGGI.cjs');
|
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
|
|
152
|
-
var
|
|
152
|
+
var _chunkZBCT5MEAcjs = require('../chunk-ZBCT5MEA.cjs');
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
var _chunkDGWOGQJ5cjs = require('../chunk-DGWOGQJ5.cjs');
|
|
@@ -159,7 +159,7 @@ var _chunkDGWOGQJ5cjs = require('../chunk-DGWOGQJ5.cjs');
|
|
|
159
159
|
|
|
160
160
|
|
|
161
161
|
|
|
162
|
-
var
|
|
162
|
+
var _chunkZ3BRH4JKcjs = require('../chunk-Z3BRH4JK.cjs');
|
|
163
163
|
require('../chunk-PY4GWSE2.cjs');
|
|
164
164
|
|
|
165
165
|
|
|
@@ -171,7 +171,7 @@ require('../chunk-PY4GWSE2.cjs');
|
|
|
171
171
|
|
|
172
172
|
|
|
173
173
|
|
|
174
|
-
var
|
|
174
|
+
var _chunkISIO63Q5cjs = require('../chunk-ISIO63Q5.cjs');
|
|
175
175
|
require('../chunk-WOFXZ3XU.cjs');
|
|
176
176
|
|
|
177
177
|
|
|
@@ -182,17 +182,16 @@ require('../chunk-2BSBFBOA.cjs');
|
|
|
182
182
|
var _chunkWKPXOGZZcjs = require('../chunk-WKPXOGZZ.cjs');
|
|
183
183
|
|
|
184
184
|
|
|
185
|
-
var
|
|
185
|
+
var _chunkM5GLQQWGcjs = require('../chunk-M5GLQQWG.cjs');
|
|
186
186
|
|
|
187
187
|
|
|
188
188
|
|
|
189
189
|
var _chunkDWJJI6RTcjs = require('../chunk-DWJJI6RT.cjs');
|
|
190
|
-
require('../chunk-
|
|
190
|
+
require('../chunk-4ZC5QJE2.cjs');
|
|
191
191
|
require('../chunk-A6QWKBJP.cjs');
|
|
192
|
-
require('../chunk-
|
|
193
|
-
require('../chunk-
|
|
194
|
-
require('../chunk-
|
|
195
|
-
require('../chunk-7AHBW2CQ.cjs');
|
|
192
|
+
require('../chunk-EUIDTZNQ.cjs');
|
|
193
|
+
require('../chunk-TFF2GTGN.cjs');
|
|
194
|
+
require('../chunk-5UEFBM2M.cjs');
|
|
196
195
|
require('../chunk-IPJ3TEYR.cjs');
|
|
197
196
|
|
|
198
197
|
// src/video-editor/parse.ts
|
|
@@ -231,7 +230,7 @@ function parseVideoEase(v, path) {
|
|
|
231
230
|
if (v[0] < 0 || v[0] > 1 || v[2] < 0 || v[2] > 1) fail(path, "must have x1 and x2 between 0 and 1");
|
|
232
231
|
return [v[0], v[1], v[2], v[3]];
|
|
233
232
|
}
|
|
234
|
-
return oneOf(v,
|
|
233
|
+
return oneOf(v, _chunkZBCT5MEAcjs.VIDEO_EASE_NAMES, path);
|
|
235
234
|
}
|
|
236
235
|
function parseVideoKeyframes(v, path, { min, max } = {}) {
|
|
237
236
|
if (!isObject(v)) return fail(path, "must be a number or keyframes { keys: [{ t, v, ease }] }");
|
|
@@ -273,7 +272,7 @@ function parseVideoTimeRemap(v, speed, path) {
|
|
|
273
272
|
if (speed !== void 0 && speed !== 1) fail(path, 'cannot be used with a speed; a ramp sets the speed itself (remove "speed")');
|
|
274
273
|
for (let i = 1; i < remap.keys.length; i++) if (remap.keys[i].t === remap.keys[i - 1].t) fail(`${path}.keys[${i}].t`, `must be later than the key before (${remap.keys[i - 1].t} ms); a speed ramp has one key per time`);
|
|
275
274
|
try {
|
|
276
|
-
|
|
275
|
+
_chunkZBCT5MEAcjs.checkVideoTimeRemap.call(void 0, remap, path);
|
|
277
276
|
} catch (e) {
|
|
278
277
|
throw new Error(e.message.replace(/\.?$/, "."));
|
|
279
278
|
}
|
|
@@ -283,17 +282,17 @@ function parseVideoClipAnimation(v, path) {
|
|
|
283
282
|
if (v === void 0) return void 0;
|
|
284
283
|
if (!isObject(v)) return fail(path, "must be an object { effect, duration }");
|
|
285
284
|
return compact({
|
|
286
|
-
effect: oneOf(v.effect,
|
|
285
|
+
effect: oneOf(v.effect, _chunkZBCT5MEAcjs.VIDEO_CLIP_ANIMATION_EFFECTS, `${path}.effect`, false),
|
|
287
286
|
duration: num(v.duration, `${path}.duration`, { optional: true, positive: true })
|
|
288
287
|
});
|
|
289
288
|
}
|
|
290
289
|
function parseVideoGrade(v, path) {
|
|
291
290
|
if (v === void 0) return void 0;
|
|
292
291
|
if (!isObject(v)) return fail(path, "must be an object such as { exposure, contrast, saturation }");
|
|
293
|
-
const known = /* @__PURE__ */ new Set([...
|
|
292
|
+
const known = /* @__PURE__ */ new Set([..._chunkZBCT5MEAcjs.VIDEO_GRADE_CONTROLS.map((c) => c.key), "lut"]);
|
|
294
293
|
const unknown = Object.keys(v).find((k) => !known.has(k));
|
|
295
294
|
if (unknown) fail(`${path}.${unknown}`, `is not a grade setting; use ${[...known].join(", ")}`);
|
|
296
|
-
return compact({ ...Object.fromEntries(
|
|
295
|
+
return compact({ ...Object.fromEntries(_chunkZBCT5MEAcjs.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`) });
|
|
297
296
|
}
|
|
298
297
|
function parseVideoGradeLut(v, path) {
|
|
299
298
|
if (v === void 0) return void 0;
|
|
@@ -308,7 +307,7 @@ function parseVideoClipMask(v, path) {
|
|
|
308
307
|
if (!isObject(v)) return fail(path, 'must be an object such as { shape: "ellipse", x: 0.5, y: 0.5, width: 0.4, height: 0.6, feather: 20 }');
|
|
309
308
|
const unknown = Object.keys(v).find((k) => !MASK_KEYS.includes(k));
|
|
310
309
|
if (unknown) fail(`${path}.${unknown}`, `is not a mask setting; use ${MASK_KEYS.join(", ")}`);
|
|
311
|
-
const shape = oneOf(v.shape,
|
|
310
|
+
const shape = oneOf(v.shape, _chunkZBCT5MEAcjs.VIDEO_MASK_SHAPES, `${path}.shape`, false);
|
|
312
311
|
let points;
|
|
313
312
|
if (v.points !== void 0) {
|
|
314
313
|
if (shape !== "polygon") fail(`${path}.points`, "is only for polygon masks");
|
|
@@ -334,15 +333,15 @@ function parseVideoClipMask(v, path) {
|
|
|
334
333
|
function parseVideoTransition(v, path) {
|
|
335
334
|
if (v === void 0) return void 0;
|
|
336
335
|
if (!isObject(v)) return fail(path, "must be an object { type, duration }");
|
|
337
|
-
const type = oneOf(v.type,
|
|
336
|
+
const type = oneOf(v.type, _chunkZBCT5MEAcjs.VIDEO_TRANSITION_TYPES, `${path}.type`, false);
|
|
338
337
|
if (type === "effect" && v.effect === void 0) fail(`${path}.effect`, 'is required for an effect transition: { effect: "<effect id>", values }');
|
|
339
338
|
if (type !== "effect" && v.effect !== void 0) fail(`${path}.effect`, 'is only for transitions of type "effect"');
|
|
340
339
|
return compact({
|
|
341
340
|
type,
|
|
342
341
|
duration: num(v.duration, `${path}.duration`, { positive: true }),
|
|
343
342
|
color: str(v.color, `${path}.color`, true),
|
|
344
|
-
direction: oneOf(v.direction,
|
|
345
|
-
audioCurve: oneOf(v.audioCurve,
|
|
343
|
+
direction: oneOf(v.direction, _chunkZBCT5MEAcjs.VIDEO_WIPE_DIRECTIONS, `${path}.direction`),
|
|
344
|
+
audioCurve: oneOf(v.audioCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.audioCurve`),
|
|
346
345
|
effect: v.effect === void 0 ? void 0 : parseVideoEffectRef(v.effect, `${path}.effect`, false)
|
|
347
346
|
});
|
|
348
347
|
}
|
|
@@ -471,7 +470,7 @@ function parseVideoClipCamera(v, path) {
|
|
|
471
470
|
}
|
|
472
471
|
function parseVideoClip(v, path = "clip") {
|
|
473
472
|
if (!isObject(v)) return fail(path, "must be an object");
|
|
474
|
-
const type = oneOf(_nullishCoalesce(v.type, () => ( "media")),
|
|
473
|
+
const type = oneOf(_nullishCoalesce(v.type, () => ( "media")), _chunkZBCT5MEAcjs.VIDEO_CLIP_TYPES, `${path}.type`, false);
|
|
475
474
|
const base = {
|
|
476
475
|
id: str(v.id, `${path}.id`),
|
|
477
476
|
name: str(v.name, `${path}.name`, true),
|
|
@@ -479,8 +478,8 @@ function parseVideoClip(v, path = "clip") {
|
|
|
479
478
|
duration: num(v.duration, `${path}.duration`, { positive: true }),
|
|
480
479
|
opacity: parseVideoAnimatable(v.opacity, `${path}.opacity`, { optional: true, min: 0, max: 1 }),
|
|
481
480
|
transform: parseVideoTransform(v.transform, `${path}.transform`),
|
|
482
|
-
fit: oneOf(v.fit,
|
|
483
|
-
blend: oneOf(v.blend,
|
|
481
|
+
fit: oneOf(v.fit, _chunkZBCT5MEAcjs.VIDEO_FITS, `${path}.fit`),
|
|
482
|
+
blend: oneOf(v.blend, _chunkZBCT5MEAcjs.VIDEO_BLEND_MODES, `${path}.blend`),
|
|
484
483
|
grade: parseVideoGrade(v.grade, `${path}.grade`),
|
|
485
484
|
animateIn: parseVideoClipAnimation(v.animateIn, `${path}.animateIn`),
|
|
486
485
|
animateOut: parseVideoClipAnimation(v.animateOut, `${path}.animateOut`),
|
|
@@ -501,8 +500,8 @@ function parseVideoClip(v, path = "clip") {
|
|
|
501
500
|
volume: parseVideoAnimatable(v.volume, `${path}.volume`, { optional: true, min: 0, max: 4 }),
|
|
502
501
|
muted: bool(v.muted, `${path}.muted`),
|
|
503
502
|
timeRemap: parseVideoTimeRemap(v.timeRemap, v.speed, `${path}.timeRemap`),
|
|
504
|
-
fadeInCurve: oneOf(v.fadeInCurve,
|
|
505
|
-
fadeOutCurve: oneOf(v.fadeOutCurve,
|
|
503
|
+
fadeInCurve: oneOf(v.fadeInCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
|
|
504
|
+
fadeOutCurve: oneOf(v.fadeOutCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
|
|
506
505
|
});
|
|
507
506
|
if (type === "sequence") {
|
|
508
507
|
for (const key of ["speed", "timeRemap"])
|
|
@@ -514,8 +513,8 @@ function parseVideoClip(v, path = "clip") {
|
|
|
514
513
|
in: num(v.in, `${path}.in`, { optional: true, min: 0 }),
|
|
515
514
|
volume: parseVideoAnimatable(v.volume, `${path}.volume`, { optional: true, min: 0, max: 4 }),
|
|
516
515
|
muted: bool(v.muted, `${path}.muted`),
|
|
517
|
-
fadeInCurve: oneOf(v.fadeInCurve,
|
|
518
|
-
fadeOutCurve: oneOf(v.fadeOutCurve,
|
|
516
|
+
fadeInCurve: oneOf(v.fadeInCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
|
|
517
|
+
fadeOutCurve: oneOf(v.fadeOutCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
|
|
519
518
|
});
|
|
520
519
|
}
|
|
521
520
|
if (type === "text")
|
|
@@ -530,7 +529,7 @@ function parseVideoClip(v, path = "clip") {
|
|
|
530
529
|
background: str(v.background, `${path}.background`, true)
|
|
531
530
|
});
|
|
532
531
|
if (type === "adjustment") {
|
|
533
|
-
const scope = oneOf(v.scope,
|
|
532
|
+
const scope = oneOf(v.scope, _chunkZBCT5MEAcjs.VIDEO_ADJUSTMENT_SCOPES, `${path}.scope`);
|
|
534
533
|
const targetTrack = str(v.targetTrack, `${path}.targetTrack`, true);
|
|
535
534
|
if (scope === "track" && !targetTrack) fail(`${path}.targetTrack`, 'is required when scope is "track": the id of the track whose pictures the adjustment changes');
|
|
536
535
|
if (targetTrack !== void 0 && scope !== "track") fail(`${path}.targetTrack`, 'is only for scope "track"');
|
|
@@ -633,9 +632,9 @@ function createVideoProject(options = {}) {
|
|
|
633
632
|
// src/video-editor/check.ts
|
|
634
633
|
function videoClipKeyframes(clip) {
|
|
635
634
|
const out = [
|
|
636
|
-
{ property: "opacity", keys:
|
|
637
|
-
{ property: "volume", keys: clip.type === "media" || clip.type === "sequence" ?
|
|
638
|
-
...
|
|
635
|
+
{ property: "opacity", keys: _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, clip.opacity) },
|
|
636
|
+
{ property: "volume", keys: clip.type === "media" || clip.type === "sequence" ? _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, clip.volume) : [] },
|
|
637
|
+
..._chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => ({ property: p, keys: _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _2 => _2.transform, 'optionalAccess', _3 => _3[p]])) }))
|
|
639
638
|
];
|
|
640
639
|
return out.filter((o) => o.keys.length);
|
|
641
640
|
}
|
|
@@ -664,8 +663,8 @@ var VIDEO_ISSUE_CODES = [
|
|
|
664
663
|
var videoIssueKey = (i) => [i.code, _nullishCoalesce(i.sequence, () => ( "")), _nullishCoalesce(i.track, () => ( "")), _nullishCoalesce(i.clip, () => ( "")), _nullishCoalesce(i.asset, () => ( "")), _nullishCoalesce(i.marker, () => ( ""))].join("|");
|
|
665
664
|
function checkVideoProject(project) {
|
|
666
665
|
const issues = [];
|
|
667
|
-
const assets =
|
|
668
|
-
const sequences =
|
|
666
|
+
const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project);
|
|
667
|
+
const sequences = _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, project);
|
|
669
668
|
const used = /* @__PURE__ */ new Set();
|
|
670
669
|
const usedSequences = /* @__PURE__ */ new Set();
|
|
671
670
|
const cycles = /* @__PURE__ */ new Map();
|
|
@@ -673,7 +672,7 @@ function checkVideoProject(project) {
|
|
|
673
672
|
if ((asset.kind === "video" || asset.kind === "audio") && asset.duration === void 0)
|
|
674
673
|
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.` });
|
|
675
674
|
const checkTrack = (track, sequence) => {
|
|
676
|
-
const clips =
|
|
675
|
+
const clips = _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track);
|
|
677
676
|
const where = sequence ? ` in sequence "${sequence}"` : "";
|
|
678
677
|
for (let i = 0; i < clips.length; i++) {
|
|
679
678
|
const clip = clips[i];
|
|
@@ -683,13 +682,13 @@ function checkVideoProject(project) {
|
|
|
683
682
|
const seq = sequences.get(clip.sequence);
|
|
684
683
|
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.` });
|
|
685
684
|
else {
|
|
686
|
-
if (!cycles.has(seq.id)) cycles.set(seq.id,
|
|
685
|
+
if (!cycles.has(seq.id)) cycles.set(seq.id, _chunkZBCT5MEAcjs.findVideoSequenceCycle.call(void 0, project, seq.id));
|
|
687
686
|
const cycle = cycles.get(seq.id);
|
|
688
687
|
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.` });
|
|
689
|
-
const length =
|
|
690
|
-
const range =
|
|
691
|
-
if (range.out > length +
|
|
692
|
-
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Compound clip "${clip.id}" plays to ${
|
|
688
|
+
const length = _chunkZBCT5MEAcjs.videoSequenceDuration.call(void 0, seq);
|
|
689
|
+
const range = _chunkZBCT5MEAcjs.videoClipSourceRange.call(void 0, clip);
|
|
690
|
+
if (range.out > length + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
|
|
691
|
+
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Compound clip "${clip.id}" plays to ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, range.out)} of sequence "${seq.id}", which is only ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, length)} long; shorten the clip or move its in point.` });
|
|
693
692
|
}
|
|
694
693
|
} else if (clip.type === "media") {
|
|
695
694
|
used.add(clip.asset);
|
|
@@ -698,32 +697,32 @@ function checkVideoProject(project) {
|
|
|
698
697
|
else {
|
|
699
698
|
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.` });
|
|
700
699
|
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.` });
|
|
701
|
-
const range =
|
|
702
|
-
if (asset.duration !== void 0 && range.out > asset.duration +
|
|
703
|
-
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Clip "${clip.id}" plays to ${
|
|
700
|
+
const range = _chunkZBCT5MEAcjs.videoClipSourceRange.call(void 0, clip);
|
|
701
|
+
if (asset.duration !== void 0 && range.out > asset.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
|
|
702
|
+
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Clip "${clip.id}" plays to ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, range.out)} of "${asset.id}", which is only ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, asset.duration)} long; shorten the clip or move its in point.` });
|
|
704
703
|
}
|
|
705
704
|
} 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.` });
|
|
706
705
|
if (clip.type === "adjustment" && (_nullishCoalesce(clip.scope, () => ( "underneath"))) === "track" && !(sequence ? _nullishCoalesce(_optionalChain([sequences, 'access', _4 => _4.get, 'call', _5 => _5(sequence), 'optionalAccess', _6 => _6.tracks]), () => ( [])) : project.tracks).some((t) => t.id === clip.targetTrack))
|
|
707
706
|
issues.push({ code: "missing-target-track", severity: "warning", ...at, message: `Adjustment clip "${clip.id}" changes track "${clip.targetTrack}", which is not ${sequence ? `in sequence "${sequence}"` : "in the project"}, so it changes nothing; set its targetTrack to a track beside it or change its scope.` });
|
|
708
707
|
const next = clips[i + 1];
|
|
709
|
-
if (next && next.start <
|
|
710
|
-
issues.push({ code: "overlap", severity: "error", ...at, message: `Clips "${clip.id}" and "${next.id}" overlap on track "${track.id}"${where} from ${
|
|
711
|
-
if ((_nullishCoalesce(clip.fadeIn, () => ( 0))) + (_nullishCoalesce(clip.fadeOut, () => ( 0))) > clip.duration +
|
|
708
|
+
if (next && next.start < _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip) - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
|
|
709
|
+
issues.push({ code: "overlap", severity: "error", ...at, message: `Clips "${clip.id}" and "${next.id}" overlap on track "${track.id}"${where} from ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, next.start)}; move one of them.` });
|
|
710
|
+
if ((_nullishCoalesce(clip.fadeIn, () => ( 0))) + (_nullishCoalesce(clip.fadeOut, () => ( 0))) > clip.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
|
|
712
711
|
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.` });
|
|
713
|
-
const anim = (clip.animateIn ? _nullishCoalesce(clip.animateIn.duration, () => (
|
|
714
|
-
if (anim > clip.duration +
|
|
712
|
+
const anim = (clip.animateIn ? _nullishCoalesce(clip.animateIn.duration, () => ( _chunkZBCT5MEAcjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0) + (clip.animateOut ? _nullishCoalesce(clip.animateOut.duration, () => ( _chunkZBCT5MEAcjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0);
|
|
713
|
+
if (anim > clip.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
|
|
715
714
|
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.` });
|
|
716
715
|
for (const which of ["animateIn", "animateOut"]) {
|
|
717
716
|
const a = clip[which];
|
|
718
717
|
if (!a) continue;
|
|
719
|
-
const keyed =
|
|
718
|
+
const keyed = _chunkZBCT5MEAcjs.videoClipAnimationProperties.call(void 0, a).filter((p) => _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, p === "opacity" ? clip.opacity : _optionalChain([clip, 'access', _7 => _7.transform, 'optionalAccess', _8 => _8[p]])).length);
|
|
720
719
|
if (keyed.length)
|
|
721
720
|
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.` });
|
|
722
721
|
}
|
|
723
722
|
if (clip.camera) {
|
|
724
|
-
const last = Math.max(0, ...
|
|
723
|
+
const last = Math.max(0, ..._chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.flatMap((p) => _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _9 => _9.transform, 'optionalAccess', _10 => _10[p]])).map((k) => k.t)));
|
|
725
724
|
const frame = 1e3 / (project.fps || 30);
|
|
726
|
-
if (last > 0 && Math.abs(last - clip.duration) > frame +
|
|
725
|
+
if (last > 0 && Math.abs(last - clip.duration) > frame + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
|
|
727
726
|
issues.push({
|
|
728
727
|
code: "camera-stale",
|
|
729
728
|
severity: "warning",
|
|
@@ -732,7 +731,7 @@ function checkVideoProject(project) {
|
|
|
732
731
|
});
|
|
733
732
|
}
|
|
734
733
|
for (const { property, keys } of videoClipKeyframes(clip)) {
|
|
735
|
-
const outside = keys.filter((k) => k.t < -
|
|
734
|
+
const outside = keys.filter((k) => k.t < -_chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || k.t > clip.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON);
|
|
736
735
|
if (outside.length)
|
|
737
736
|
issues.push({
|
|
738
737
|
code: "keyframes-outside-clip",
|
|
@@ -743,20 +742,20 @@ function checkVideoProject(project) {
|
|
|
743
742
|
}
|
|
744
743
|
if (clip.transition) {
|
|
745
744
|
const d = clip.transition.duration;
|
|
746
|
-
const before =
|
|
745
|
+
const before = _chunkZBCT5MEAcjs.videoClipBefore.call(void 0, track, clip);
|
|
747
746
|
if (!before) {
|
|
748
747
|
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.` });
|
|
749
748
|
continue;
|
|
750
749
|
}
|
|
751
|
-
if (d > clip.duration +
|
|
750
|
+
if (d > clip.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || d > before.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
|
|
752
751
|
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.` });
|
|
753
752
|
continue;
|
|
754
753
|
}
|
|
755
754
|
if (clip.transition.type === "dip") continue;
|
|
756
|
-
const outgoing =
|
|
757
|
-
const incoming =
|
|
755
|
+
const outgoing = _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, before, assets, sequences).after;
|
|
756
|
+
const incoming = _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, clip, assets, sequences).before;
|
|
758
757
|
const half = d / 2;
|
|
759
|
-
if (outgoing < half -
|
|
758
|
+
if (outgoing < half - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || incoming < half - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
|
|
760
759
|
const fits = 2 * Math.min(outgoing, incoming);
|
|
761
760
|
issues.push({
|
|
762
761
|
code: "transition-handles",
|
|
@@ -773,9 +772,9 @@ function checkVideoProject(project) {
|
|
|
773
772
|
for (const sequence of _nullishCoalesce(project.sequences, () => ( [])))
|
|
774
773
|
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.` });
|
|
775
774
|
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.` });
|
|
776
|
-
const end =
|
|
775
|
+
const end = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, project);
|
|
777
776
|
for (const marker of _nullishCoalesce(project.markers, () => ( [])))
|
|
778
|
-
if (marker.time > end +
|
|
777
|
+
if (marker.time > end + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) issues.push({ code: "marker-past-end", severity: "note", marker: marker.id, message: `Marker "${marker.id}" at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, marker.time)} is past the end (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, end)}).` });
|
|
779
778
|
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." });
|
|
780
779
|
const rank = { error: 0, warning: 1, note: 2 };
|
|
781
780
|
return issues.sort((a, b) => rank[a.severity] - rank[b.severity]);
|
|
@@ -829,7 +828,7 @@ function mergeSpans(spans) {
|
|
|
829
828
|
const out = [];
|
|
830
829
|
for (const [from, to] of [...spans].sort((a, b) => a[0] - b[0])) {
|
|
831
830
|
const last = out[out.length - 1];
|
|
832
|
-
if (last && from <= last[1] +
|
|
831
|
+
if (last && from <= last[1] + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) last[1] = Math.max(last[1], to);
|
|
833
832
|
else out.push([from, to]);
|
|
834
833
|
}
|
|
835
834
|
return out;
|
|
@@ -843,13 +842,13 @@ function clipAnimatables(clip) {
|
|
|
843
842
|
// A speed ramp is keys in clip time too, so trims and splits keep it on the same frames of source.
|
|
844
843
|
{ get: () => c.timeRemap, set: (v) => c.timeRemap = v }
|
|
845
844
|
];
|
|
846
|
-
for (const p of
|
|
845
|
+
for (const p of _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES) out.push({ get: () => _optionalChain([c, 'access', _11 => _11.transform, 'optionalAccess', _12 => _12[p]]), set: (v) => c.transform && (c.transform[p] = v) });
|
|
847
846
|
return out;
|
|
848
847
|
}
|
|
849
848
|
function retimeClipKeys(clip, fn) {
|
|
850
849
|
for (const a of clipAnimatables(clip)) {
|
|
851
850
|
const v = a.get();
|
|
852
|
-
if (
|
|
851
|
+
if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, v)) a.set(fn(v));
|
|
853
852
|
}
|
|
854
853
|
}
|
|
855
854
|
var OPTIONAL_CLIP_FIELDS = ["name", "effects", "mask", "camera", "scope", "targetTrack", "values", "provider", "opacity", "transform", "fit", "blend", "grade", "animateIn", "animateOut", "fadeIn", "fadeOut", "fadeInCurve", "fadeOutCurve", "transition", "in", "speed", "timeRemap", "volume", "muted", "color", "fontSize", "fontFamily", "fontWeight", "background"];
|
|
@@ -866,8 +865,8 @@ var Editor = (_class = class {
|
|
|
866
865
|
return t;
|
|
867
866
|
}
|
|
868
867
|
clip(id) {
|
|
869
|
-
const at =
|
|
870
|
-
const nested = at ? null :
|
|
868
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.p, id);
|
|
869
|
+
const nested = at ? null : _chunkZBCT5MEAcjs.findVideoSequenceClip.call(void 0, this.p, id);
|
|
871
870
|
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).`);
|
|
872
871
|
if (!at) {
|
|
873
872
|
const ids = this.p.tracks.flatMap((t) => t.clips.map((c) => c.id));
|
|
@@ -884,16 +883,16 @@ var Editor = (_class = class {
|
|
|
884
883
|
return a;
|
|
885
884
|
}
|
|
886
885
|
fits(track, start, duration, ignore, what) {
|
|
887
|
-
const hit =
|
|
886
|
+
const hit = _chunkZBCT5MEAcjs.videoOverlap.call(void 0, track, start, start + duration, ignore);
|
|
888
887
|
if (hit) {
|
|
889
|
-
const free =
|
|
890
|
-
refuse(`${what} at ${
|
|
888
|
+
const free = _chunkZBCT5MEAcjs.nextFreeVideoSlot.call(void 0, track, start, duration, ignore);
|
|
889
|
+
refuse(`${what} at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, start)}\u2013${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, start + duration)} would overlap clip "${hit.id}" (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, hit))}) on track "${track.id}"; the next free place is ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, free)}, or use mode "insert" to push later clips along or "overwrite" to replace what is there.`);
|
|
891
890
|
}
|
|
892
891
|
}
|
|
893
892
|
/** An adjustment clip's target track must exist. */
|
|
894
893
|
adjustmentTarget(clip) {
|
|
895
894
|
if (clip.type !== "adjustment" || clip.targetTrack === void 0) return;
|
|
896
|
-
const ids =
|
|
895
|
+
const ids = _chunkZBCT5MEAcjs.allVideoTracks.call(void 0, this.p).map(({ track }) => track.id);
|
|
897
896
|
if (!ids.includes(clip.targetTrack)) refuse(`Adjustment clip "${clip.id}" targets track ${_chunkDGWOGQJ5cjs.namedWithSuggestion.call(void 0, clip.targetTrack, ids)}, which does not exist; the tracks are ${ids.map((t) => `"${t}"`).join(", ")}.`);
|
|
898
897
|
}
|
|
899
898
|
kindFits(track, clip) {
|
|
@@ -909,14 +908,14 @@ var Editor = (_class = class {
|
|
|
909
908
|
/** Moves every clip on `track` starting at or after `from` by `delta`. */
|
|
910
909
|
shift(track, from, delta, except = /* @__PURE__ */ new Set()) {
|
|
911
910
|
if (!delta) return;
|
|
912
|
-
for (const c of track.clips) if (!except.has(c.id) && c.start >= from -
|
|
911
|
+
for (const c of track.clips) if (!except.has(c.id) && c.start >= from - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) c.start = Math.max(0, c.start + delta);
|
|
913
912
|
track.clips.sort((a, b) => a.start - b.start);
|
|
914
913
|
}
|
|
915
914
|
get frame() {
|
|
916
915
|
return 1e3 / this.p.fps;
|
|
917
916
|
}
|
|
918
917
|
ids() {
|
|
919
|
-
return
|
|
918
|
+
return _chunkZBCT5MEAcjs.allVideoClipIds.call(void 0, this.p);
|
|
920
919
|
}
|
|
921
920
|
/**
|
|
922
921
|
* The tracks a ripple on `sources` moves, top to bottom: the sources, and every unlocked
|
|
@@ -924,8 +923,8 @@ var Editor = (_class = class {
|
|
|
924
923
|
*/
|
|
925
924
|
rippleTracks(sources) {
|
|
926
925
|
const set = new Set(sources);
|
|
927
|
-
if ([...set].some(
|
|
928
|
-
for (const t of this.p.tracks) if (
|
|
926
|
+
if ([...set].some(_chunkZBCT5MEAcjs.videoTrackSyncLocked)) {
|
|
927
|
+
for (const t of this.p.tracks) if (_chunkZBCT5MEAcjs.videoTrackSyncLocked.call(void 0, t) && !t.locked) set.add(t);
|
|
929
928
|
}
|
|
930
929
|
return this.p.tracks.filter((t) => set.has(t));
|
|
931
930
|
}
|
|
@@ -942,7 +941,7 @@ var Editor = (_class = class {
|
|
|
942
941
|
return open;
|
|
943
942
|
}
|
|
944
943
|
range(from, to) {
|
|
945
|
-
if (!(to - from >
|
|
944
|
+
if (!(to - from > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)) refuse(`"to" (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, to)}) must be after "from" (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, from)}).`);
|
|
946
945
|
}
|
|
947
946
|
/** Moves a media or compound clip's in point by `delta` of timeline time (stills, titles and colours have none). */
|
|
948
947
|
moveIn(clip, delta) {
|
|
@@ -951,18 +950,18 @@ var Editor = (_class = class {
|
|
|
951
950
|
if (clip.in < 1e-9) delete clip.in;
|
|
952
951
|
return;
|
|
953
952
|
}
|
|
954
|
-
if (clip.type !== "media" || _optionalChain([
|
|
955
|
-
clip.in = Math.max(0, (_nullishCoalesce(clip.in, () => ( 0))) + delta *
|
|
953
|
+
if (clip.type !== "media" || _optionalChain([_chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p), 'access', _14 => _14.get, 'call', _15 => _15(clip.asset), 'optionalAccess', _16 => _16.kind]) === "image") return;
|
|
954
|
+
clip.in = Math.max(0, (_nullishCoalesce(clip.in, () => ( 0))) + delta * _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, clip));
|
|
956
955
|
if (clip.in < 1e-9) delete clip.in;
|
|
957
956
|
}
|
|
958
957
|
/** Moves a clip's head `delta` later in time (start, in point and keys); the caller sets start and duration. */
|
|
959
958
|
trimHead(clip, delta) {
|
|
960
959
|
if (!isRamped(clip)) this.moveIn(clip, delta);
|
|
961
|
-
retimeClipKeys(clip, (v) =>
|
|
960
|
+
retimeClipKeys(clip, (v) => _chunkZBCT5MEAcjs.retimeVideoAnimatable.call(void 0, v, -delta));
|
|
962
961
|
}
|
|
963
962
|
/** Cuts `clip` at `at` (inside it): the left part keeps the id, the right part is returned. */
|
|
964
963
|
cut(track, clip, at, id) {
|
|
965
|
-
const end =
|
|
964
|
+
const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
|
|
966
965
|
const right = { ...structuredClone(clip), id: _nullishCoalesce(id, () => ( freshId(`${clip.id}-`, this.ids()))), start: at, duration: end - at };
|
|
967
966
|
delete right.transition;
|
|
968
967
|
delete right.fadeIn;
|
|
@@ -970,9 +969,9 @@ var Editor = (_class = class {
|
|
|
970
969
|
delete right.animateIn;
|
|
971
970
|
const leftValues = clipAnimatables(clip);
|
|
972
971
|
clipAnimatables(right).forEach((r, i) => {
|
|
973
|
-
const [l, rr] =
|
|
974
|
-
if (
|
|
975
|
-
if (
|
|
972
|
+
const [l, rr] = _chunkZBCT5MEAcjs.splitVideoAnimatable.call(void 0, leftValues[i].get(), at - clip.start);
|
|
973
|
+
if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, l)) leftValues[i].set(l);
|
|
974
|
+
if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, rr)) r.set(rr);
|
|
976
975
|
});
|
|
977
976
|
if (!isRamped(right)) this.moveIn(right, at - clip.start);
|
|
978
977
|
clip.duration = at - clip.start;
|
|
@@ -986,7 +985,7 @@ var Editor = (_class = class {
|
|
|
986
985
|
/** Cuts every clip on `tracks` that runs across `at`; returns the new right-hand parts. */
|
|
987
986
|
cutAcross(tracks, at) {
|
|
988
987
|
const made = [];
|
|
989
|
-
for (const t of tracks) for (const c of [...t.clips]) if (c.start < at -
|
|
988
|
+
for (const t of tracks) for (const c of [...t.clips]) if (c.start < at - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON && _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) > at + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) made.push(this.cut(t, c, at));
|
|
990
989
|
return made;
|
|
991
990
|
}
|
|
992
991
|
/**
|
|
@@ -1004,10 +1003,10 @@ var Editor = (_class = class {
|
|
|
1004
1003
|
*/
|
|
1005
1004
|
close(tracks, from, to) {
|
|
1006
1005
|
for (const t of tracks) {
|
|
1007
|
-
const hit =
|
|
1006
|
+
const hit = _chunkZBCT5MEAcjs.videoOverlap.call(void 0, t, from, to);
|
|
1008
1007
|
if (hit)
|
|
1009
1008
|
refuse(
|
|
1010
|
-
`Rippling out ${
|
|
1009
|
+
`Rippling out ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, from)}\u2013${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, to)} would pull track "${t.id}" out of sync: clip "${hit.id}" (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, _chunkZBCT5MEAcjs.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.`
|
|
1011
1010
|
);
|
|
1012
1011
|
}
|
|
1013
1012
|
for (const t of tracks) this.shift(t, to, from - to);
|
|
@@ -1019,10 +1018,10 @@ var Editor = (_class = class {
|
|
|
1019
1018
|
clear(track, from, to, report) {
|
|
1020
1019
|
for (const c of [...track.clips]) {
|
|
1021
1020
|
const start = c.start;
|
|
1022
|
-
const end =
|
|
1023
|
-
if (end <= from +
|
|
1024
|
-
const coversHead = start >= from -
|
|
1025
|
-
const coversTail = end <= to +
|
|
1021
|
+
const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c);
|
|
1022
|
+
if (end <= from + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || start >= to - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) continue;
|
|
1023
|
+
const coversHead = start >= from - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON;
|
|
1024
|
+
const coversTail = end <= to + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON;
|
|
1026
1025
|
if (coversHead && coversTail) {
|
|
1027
1026
|
track.clips = track.clips.filter((x) => x !== c);
|
|
1028
1027
|
report.removed.push(c.id);
|
|
@@ -1045,8 +1044,8 @@ var Editor = (_class = class {
|
|
|
1045
1044
|
/** Clamps a slip, roll or slide to `[lo, hi]`, refusing when it cannot move that way at all. */
|
|
1046
1045
|
clamp(delta, lo, hi, why) {
|
|
1047
1046
|
const applied = Math.min(Math.max(delta, Math.min(0, lo)), Math.max(0, hi));
|
|
1048
|
-
if (Math.abs(delta) >
|
|
1049
|
-
return Math.abs(applied) <=
|
|
1047
|
+
if (Math.abs(delta) > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON && Math.abs(applied) <= _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(why());
|
|
1048
|
+
return Math.abs(applied) <= _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON ? 0 : applied;
|
|
1050
1049
|
}
|
|
1051
1050
|
/** Places a clip on a track by `mode`, returning what it cut, trimmed, removed and rippled. */
|
|
1052
1051
|
place(track, clip, mode, outcome) {
|
|
@@ -1056,14 +1055,14 @@ var Editor = (_class = class {
|
|
|
1056
1055
|
outcome.rippled = tracks.map((t) => t.id);
|
|
1057
1056
|
} else if (mode === "overwrite") {
|
|
1058
1057
|
const report = { removed: [], trimmed: [], created: [] };
|
|
1059
|
-
this.clear(track, clip.start,
|
|
1058
|
+
this.clear(track, clip.start, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip), report);
|
|
1060
1059
|
Object.assign(outcome, report);
|
|
1061
1060
|
} else this.fits(track, clip.start, clip.duration, /* @__PURE__ */ new Set([clip.id]), `Clip "${clip.id}"`);
|
|
1062
1061
|
track.clips.push(clip);
|
|
1063
1062
|
track.clips.sort((a, b) => a.start - b.start);
|
|
1064
1063
|
}
|
|
1065
1064
|
placement(mode, ripple) {
|
|
1066
|
-
if (mode !== void 0 && !
|
|
1065
|
+
if (mode !== void 0 && !_chunkZBCT5MEAcjs.VIDEO_PLACEMENT_MODES.includes(mode)) refuse(`"mode" must be ${_chunkZBCT5MEAcjs.VIDEO_PLACEMENT_MODES.map((m) => `"${m}"`).join(", ")}.`);
|
|
1067
1066
|
if (ripple && mode !== void 0 && mode !== "insert") refuse(`"ripple" means mode "insert", so it cannot go with mode "${mode}"; pass one or the other.`);
|
|
1068
1067
|
return _nullishCoalesce(mode, () => ( (ripple ? "insert" : "refuse")));
|
|
1069
1068
|
}
|
|
@@ -1100,7 +1099,7 @@ var Editor = (_class = class {
|
|
|
1100
1099
|
}
|
|
1101
1100
|
case "remove_asset": {
|
|
1102
1101
|
const asset = this.asset(e.asset);
|
|
1103
|
-
const users =
|
|
1102
|
+
const users = _chunkZBCT5MEAcjs.allVideoTracks.call(void 0, this.p).flatMap(({ track: t }) => t.clips.filter((c) => c.type === "media" && c.asset === asset.id).map((c) => c.id));
|
|
1104
1103
|
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.`);
|
|
1105
1104
|
this.p.assets = this.p.assets.filter((a) => a !== asset);
|
|
1106
1105
|
return this.outcomes.push({ op: e.op, asset: asset.id });
|
|
@@ -1153,12 +1152,12 @@ var Editor = (_class = class {
|
|
|
1153
1152
|
else draft.duration = (asset.duration - (_nullishCoalesce(draft.in, () => ( 0)))) / (_nullishCoalesce(draft.speed, () => ( 1)));
|
|
1154
1153
|
if (!(draft.duration > 0)) refuse(`"in" (${draft.in} ms) is at or past the end of "${asset.id}" (${asset.duration} ms).`);
|
|
1155
1154
|
} else if (draft.type === "sequence") {
|
|
1156
|
-
const length =
|
|
1155
|
+
const length = _chunkZBCT5MEAcjs.videoSequenceDuration.call(void 0, _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p).get(draft.sequence)) - (_nullishCoalesce(draft.in, () => ( 0)));
|
|
1157
1156
|
if (!(length > 0)) refuse(`"in" (${_nullishCoalesce(draft.in, () => ( 0))} ms) is at or past the end of sequence "${draft.sequence}".`);
|
|
1158
1157
|
draft.duration = length;
|
|
1159
1158
|
} else draft.duration = VIDEO_DEFAULT_TITLE_DURATION;
|
|
1160
1159
|
}
|
|
1161
|
-
const end =
|
|
1160
|
+
const end = _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track).reduce((m, c) => Math.max(m, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c)), 0);
|
|
1162
1161
|
draft.start ??= end;
|
|
1163
1162
|
const clip = parseVideoClip(draft, "clip");
|
|
1164
1163
|
this.adjustmentTarget(clip);
|
|
@@ -1184,20 +1183,20 @@ var Editor = (_class = class {
|
|
|
1184
1183
|
case "trim_clip": {
|
|
1185
1184
|
const { track, clip } = this.clip(e.clip);
|
|
1186
1185
|
this.unlocked(track);
|
|
1187
|
-
const speed =
|
|
1188
|
-
const end =
|
|
1186
|
+
const speed = _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, clip);
|
|
1187
|
+
const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
|
|
1189
1188
|
const minimum = 1e3 / this.p.fps;
|
|
1190
|
-
const assets =
|
|
1189
|
+
const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p);
|
|
1191
1190
|
if (e.edge === "start") {
|
|
1192
1191
|
const delta = e.to - clip.start;
|
|
1193
|
-
if (clip.duration - delta < minimum -
|
|
1192
|
+
if (clip.duration - delta < minimum - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(`Trimming the start to ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it ends at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, end)}.`);
|
|
1194
1193
|
if (clip.type === "media" && !isRamped(clip) || clip.type === "sequence") {
|
|
1195
1194
|
const sourceIn = (_nullishCoalesce(clip.in, () => ( 0))) + delta * speed;
|
|
1196
|
-
if (sourceIn < -
|
|
1195
|
+
if (sourceIn < -_chunkZBCT5MEAcjs.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 ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, clip.start - (_nullishCoalesce(clip.in, () => ( 0))) / speed)}).`);
|
|
1197
1196
|
clip.in = Math.max(0, sourceIn);
|
|
1198
1197
|
if (clip.in === 0) delete clip.in;
|
|
1199
1198
|
}
|
|
1200
|
-
retimeClipKeys(clip, (v) =>
|
|
1199
|
+
retimeClipKeys(clip, (v) => _chunkZBCT5MEAcjs.retimeVideoAnimatable.call(void 0, v, -delta));
|
|
1201
1200
|
if (e.ripple) {
|
|
1202
1201
|
const tracks = this.rippleTracks([track]);
|
|
1203
1202
|
if (delta > 0) {
|
|
@@ -1218,17 +1217,17 @@ var Editor = (_class = class {
|
|
|
1218
1217
|
}
|
|
1219
1218
|
} else {
|
|
1220
1219
|
const duration = e.to - clip.start;
|
|
1221
|
-
if (duration < minimum -
|
|
1220
|
+
if (duration < minimum - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(`Trimming the end to ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it starts at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, clip.start)}.`);
|
|
1222
1221
|
if (clip.type === "media" && !isRamped(clip)) {
|
|
1223
1222
|
const asset = assets.get(clip.asset);
|
|
1224
1223
|
const out = (_nullishCoalesce(clip.in, () => ( 0))) + duration * speed;
|
|
1225
|
-
if (_optionalChain([asset, 'optionalAccess', _17 => _17.duration]) !== void 0 && out > asset.duration +
|
|
1226
|
-
refuse(`"${clip.id}" can end at most at ${
|
|
1224
|
+
if (_optionalChain([asset, 'optionalAccess', _17 => _17.duration]) !== void 0 && out > asset.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
|
|
1225
|
+
refuse(`"${clip.id}" can end at most at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, clip.start + (asset.duration - (_nullishCoalesce(clip.in, () => ( 0)))) / speed)}, where "${asset.id}" runs out.`);
|
|
1227
1226
|
}
|
|
1228
1227
|
if (clip.type === "sequence") {
|
|
1229
|
-
const seq =
|
|
1230
|
-
const length = seq ?
|
|
1231
|
-
if ((_nullishCoalesce(clip.in, () => ( 0))) + duration > length +
|
|
1228
|
+
const seq = _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p).get(clip.sequence);
|
|
1229
|
+
const length = seq ? _chunkZBCT5MEAcjs.videoSequenceDuration.call(void 0, seq) : Infinity;
|
|
1230
|
+
if ((_nullishCoalesce(clip.in, () => ( 0))) + duration > length + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(`"${clip.id}" can end at most at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, clip.start + length - (_nullishCoalesce(clip.in, () => ( 0))))}, where sequence "${clip.sequence}" ends.`);
|
|
1232
1231
|
}
|
|
1233
1232
|
if (e.ripple) {
|
|
1234
1233
|
const tracks = this.rippleTracks([track]);
|
|
@@ -1250,9 +1249,9 @@ var Editor = (_class = class {
|
|
|
1250
1249
|
case "split_clip": {
|
|
1251
1250
|
const { track, clip } = this.clip(e.clip);
|
|
1252
1251
|
this.unlocked(track);
|
|
1253
|
-
const end =
|
|
1252
|
+
const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
|
|
1254
1253
|
const minimum = 1e3 / this.p.fps;
|
|
1255
|
-
if (e.at < clip.start + minimum -
|
|
1254
|
+
if (e.at < clip.start + minimum - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || e.at > end - minimum + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(`${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, e.at)} is not inside "${clip.id}" (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, clip.start)}\u2013${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, end)}), at least a frame from either end.`);
|
|
1256
1255
|
if (e.id !== void 0 && this.ids().includes(e.id)) refuse(`There is already a clip "${e.id}".`);
|
|
1257
1256
|
const right = this.cut(track, clip, e.at, e.id);
|
|
1258
1257
|
return this.outcomes.push({ op: e.op, clips: [clip.id, right.id], clip: right.id, track: track.id });
|
|
@@ -1263,12 +1262,12 @@ var Editor = (_class = class {
|
|
|
1263
1262
|
for (const track of new Set(found.map((f) => f.track))) track.clips = track.clips.filter((c) => !found.some((f) => f.clip === c));
|
|
1264
1263
|
if (!e.ripple) return this.outcomes.push({ op: e.op, clips: found.map((f) => f.clip.id) });
|
|
1265
1264
|
const rippled = /* @__PURE__ */ new Set();
|
|
1266
|
-
const groups = [...new Set(found.map((f) => f.track))].filter((t) => !
|
|
1267
|
-
if (found.some((f) =>
|
|
1265
|
+
const groups = [...new Set(found.map((f) => f.track))].filter((t) => !_chunkZBCT5MEAcjs.videoTrackSyncLocked.call(void 0, t)).map((t) => [t]);
|
|
1266
|
+
if (found.some((f) => _chunkZBCT5MEAcjs.videoTrackSyncLocked.call(void 0, f.track))) groups.push(found.filter((f) => _chunkZBCT5MEAcjs.videoTrackSyncLocked.call(void 0, f.track)).map((f) => f.track));
|
|
1268
1267
|
for (const sources of groups) {
|
|
1269
1268
|
const tracks = this.rippleTracks(sources);
|
|
1270
1269
|
tracks.forEach((t) => rippled.add(t));
|
|
1271
|
-
const spans = mergeSpans(found.filter((f) => sources.includes(f.track)).map((f) => [f.clip.start,
|
|
1270
|
+
const spans = mergeSpans(found.filter((f) => sources.includes(f.track)).map((f) => [f.clip.start, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, f.clip)]));
|
|
1272
1271
|
for (const [from, to] of spans.reverse()) this.close(tracks, from, to);
|
|
1273
1272
|
}
|
|
1274
1273
|
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) });
|
|
@@ -1284,7 +1283,7 @@ var Editor = (_class = class {
|
|
|
1284
1283
|
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.");
|
|
1285
1284
|
let stretch = 1;
|
|
1286
1285
|
if (at.clip.type === "media" && !("duration" in set)) {
|
|
1287
|
-
const was =
|
|
1286
|
+
const was = _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, at.clip);
|
|
1288
1287
|
const now = "speed" in set ? set.speed : _optionalChain([e, 'access', _18 => _18.remove, 'optionalAccess', _19 => _19.includes, 'call', _20 => _20("speed")]) ? 1 : was;
|
|
1289
1288
|
if (now !== was) {
|
|
1290
1289
|
set.duration = at.clip.duration * was / now;
|
|
@@ -1292,7 +1291,7 @@ var Editor = (_class = class {
|
|
|
1292
1291
|
}
|
|
1293
1292
|
}
|
|
1294
1293
|
const next = { ...structuredClone(at.clip), ...set };
|
|
1295
|
-
if (stretch !== 1) retimeClipKeys(next, (v) =>
|
|
1294
|
+
if (stretch !== 1) retimeClipKeys(next, (v) => _chunkZBCT5MEAcjs.retimeVideoAnimatable.call(void 0, v, 0, stretch));
|
|
1296
1295
|
for (const k of _nullishCoalesce(e.remove, () => ( []))) delete next[k];
|
|
1297
1296
|
const clip = parseVideoClip(next, "set");
|
|
1298
1297
|
this.adjustmentTarget(clip);
|
|
@@ -1306,17 +1305,17 @@ var Editor = (_class = class {
|
|
|
1306
1305
|
const { track, clip } = this.clip(e.clip);
|
|
1307
1306
|
this.unlocked(track);
|
|
1308
1307
|
if (clip.type === "sequence") refuse(`Clip "${clip.id}" is a compound clip, which plays its sequence at normal speed; ramp the clips inside the sequence instead.`);
|
|
1309
|
-
if (clip.type !== "media") refuse(`Clip "${clip.id}" is a ${
|
|
1308
|
+
if (clip.type !== "media") refuse(`Clip "${clip.id}" is a ${_chunkZBCT5MEAcjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to ramp; only video and audio clips change speed.`);
|
|
1310
1309
|
const asset = this.asset(clip.asset);
|
|
1311
1310
|
if (asset.kind === "image") refuse(`Clip "${clip.id}" is a still ("${asset.id}"), so it has no motion to ramp.`);
|
|
1312
1311
|
const media = clip;
|
|
1313
|
-
const end =
|
|
1312
|
+
const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, media);
|
|
1314
1313
|
const duration = _nullishCoalesce(e.duration, () => ( media.duration));
|
|
1315
|
-
if (!(duration >= 1e3 / this.p.fps -
|
|
1314
|
+
if (!(duration >= 1e3 / this.p.fps - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)) refuse(`"duration" must be at least a frame (${Math.ceil(1e3 / this.p.fps)} ms).`);
|
|
1316
1315
|
if (e.keys === null) {
|
|
1317
1316
|
if (!media.timeRemap) refuse(`Clip "${clip.id}" has no speed ramp to remove.`);
|
|
1318
1317
|
const from = (_nullishCoalesce(media.in, () => ( 0))) + media.timeRemap.keys[0].v;
|
|
1319
|
-
if (asset.duration !== void 0 && from + duration > asset.duration +
|
|
1318
|
+
if (asset.duration !== void 0 && from + duration > asset.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
|
|
1320
1319
|
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.`);
|
|
1321
1320
|
delete media.timeRemap;
|
|
1322
1321
|
media.in = from;
|
|
@@ -1324,17 +1323,17 @@ var Editor = (_class = class {
|
|
|
1324
1323
|
} else {
|
|
1325
1324
|
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).');
|
|
1326
1325
|
const remap = parseVideoTimeRemap({ keys: e.keys }, void 0, "keys");
|
|
1327
|
-
remap.keys =
|
|
1328
|
-
|
|
1329
|
-
const span =
|
|
1330
|
-
if (asset.duration !== void 0 && (_nullishCoalesce(media.in, () => ( 0))) + span.to > asset.duration +
|
|
1326
|
+
remap.keys = _chunkZBCT5MEAcjs.sortVideoKeys.call(void 0, remap.keys, { jumps: false });
|
|
1327
|
+
_chunkZBCT5MEAcjs.checkVideoTimeRemap.call(void 0, remap, "keys");
|
|
1328
|
+
const span = _chunkZBCT5MEAcjs.videoTimeRemapSpan.call(void 0, remap);
|
|
1329
|
+
if (asset.duration !== void 0 && (_nullishCoalesce(media.in, () => ( 0))) + span.to > asset.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
|
|
1331
1330
|
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.`);
|
|
1332
1331
|
media.timeRemap = remap;
|
|
1333
1332
|
delete media.speed;
|
|
1334
1333
|
}
|
|
1335
1334
|
const newEnd = media.start + duration;
|
|
1336
1335
|
const outcome = { op: e.op, clip: clip.id, track: track.id };
|
|
1337
|
-
if (Math.abs(newEnd - end) >
|
|
1336
|
+
if (Math.abs(newEnd - end) > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
|
|
1338
1337
|
if (e.ripple) {
|
|
1339
1338
|
const tracks = this.rippleTracks([track]);
|
|
1340
1339
|
if (newEnd < end) {
|
|
@@ -1363,11 +1362,11 @@ var Editor = (_class = class {
|
|
|
1363
1362
|
case "slip_clip": {
|
|
1364
1363
|
const { track, clip } = this.clip(e.clip);
|
|
1365
1364
|
this.unlocked(track);
|
|
1366
|
-
if (clip.type !== "media" && clip.type !== "sequence") refuse(`Clip "${clip.id}" is a ${
|
|
1365
|
+
if (clip.type !== "media" && clip.type !== "sequence") refuse(`Clip "${clip.id}" is a ${_chunkZBCT5MEAcjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to slip; only video, audio and compound clips slip.`);
|
|
1367
1366
|
const source = clip.type === "sequence" ? `sequence "${clip.sequence}"` : `"${this.asset(clip.asset).id}"`;
|
|
1368
1367
|
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.`);
|
|
1369
|
-
const handles =
|
|
1370
|
-
const { lead, tail } =
|
|
1368
|
+
const handles = _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, clip, _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p), _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p));
|
|
1369
|
+
const { lead, tail } = _chunkZBCT5MEAcjs.videoClipOverhang.call(void 0, track, clip);
|
|
1371
1370
|
const delta = this.clamp(
|
|
1372
1371
|
e.delta,
|
|
1373
1372
|
lead - handles.before,
|
|
@@ -1385,13 +1384,13 @@ var Editor = (_class = class {
|
|
|
1385
1384
|
this.unlocked(track);
|
|
1386
1385
|
const L = left.clip;
|
|
1387
1386
|
const R = right.clip;
|
|
1388
|
-
if (Math.abs(
|
|
1389
|
-
if (Math.abs(
|
|
1390
|
-
refuse(`"${L.id}" ends at ${
|
|
1387
|
+
if (Math.abs(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, L) - R.start) > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
|
|
1388
|
+
if (Math.abs(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, R) - L.start) <= _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(`"${R.id}" comes before "${L.id}"; pass left "${R.id}" and right "${L.id}".`);
|
|
1389
|
+
refuse(`"${L.id}" ends at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, L))} but "${R.id}" starts at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, R.start)}; a roll needs two clips that meet at a cut (use trim_clip to move one edge).`);
|
|
1391
1390
|
}
|
|
1392
|
-
const assets =
|
|
1393
|
-
const lo = Math.max(-(L.duration - this.frame), -(
|
|
1394
|
-
const hi = Math.min(R.duration - this.frame,
|
|
1391
|
+
const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p);
|
|
1392
|
+
const lo = Math.max(-(L.duration - this.frame), -(_chunkZBCT5MEAcjs.videoClipHandles.call(void 0, R, assets, _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p)).before - _chunkZBCT5MEAcjs.videoClipOverhang.call(void 0, track, R).lead));
|
|
1393
|
+
const hi = Math.min(R.duration - this.frame, _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, L, assets, _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p)).after - _chunkZBCT5MEAcjs.videoClipOverhang.call(void 0, track, L).tail);
|
|
1395
1394
|
const delta = this.clamp(
|
|
1396
1395
|
e.delta,
|
|
1397
1396
|
lo,
|
|
@@ -1407,18 +1406,18 @@ var Editor = (_class = class {
|
|
|
1407
1406
|
case "slide_clip": {
|
|
1408
1407
|
const { track, clip } = this.clip(e.clip);
|
|
1409
1408
|
this.unlocked(track);
|
|
1410
|
-
const before =
|
|
1411
|
-
const after =
|
|
1409
|
+
const before = _chunkZBCT5MEAcjs.videoClipBefore.call(void 0, track, clip);
|
|
1410
|
+
const after = _chunkZBCT5MEAcjs.videoClipAfter.call(void 0, track, clip);
|
|
1412
1411
|
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.`);
|
|
1413
|
-
const assets =
|
|
1414
|
-
const end =
|
|
1412
|
+
const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p);
|
|
1413
|
+
const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
|
|
1415
1414
|
const others = track.clips.filter((c) => c !== clip);
|
|
1416
1415
|
const room = {
|
|
1417
|
-
earlier: before ? before.duration - this.frame : clip.start - others.filter((c) =>
|
|
1418
|
-
later: after ? after.duration - this.frame : others.filter((c) => c.start >= end -
|
|
1416
|
+
earlier: before ? before.duration - this.frame : clip.start - others.filter((c) => _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) <= clip.start + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.max(m, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c)), 0),
|
|
1417
|
+
later: after ? after.duration - this.frame : others.filter((c) => c.start >= end - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.min(m, c.start - end), Infinity)
|
|
1419
1418
|
};
|
|
1420
|
-
const lo = -Math.min(room.earlier, after ?
|
|
1421
|
-
const hi = Math.min(room.later, before ?
|
|
1419
|
+
const lo = -Math.min(room.earlier, after ? _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, after, assets, _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p)).before - _chunkZBCT5MEAcjs.videoClipOverhang.call(void 0, track, after).lead : Infinity);
|
|
1420
|
+
const hi = Math.min(room.later, before ? _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, before, assets, _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p)).after - _chunkZBCT5MEAcjs.videoClipOverhang.call(void 0, track, before).tail : Infinity);
|
|
1422
1421
|
const delta = this.clamp(
|
|
1423
1422
|
e.delta,
|
|
1424
1423
|
lo,
|
|
@@ -1451,29 +1450,29 @@ var Editor = (_class = class {
|
|
|
1451
1450
|
}
|
|
1452
1451
|
case "split_at": {
|
|
1453
1452
|
const tracks = this.rangeTracks(e.tracks);
|
|
1454
|
-
const lefts = tracks.flatMap((t) => t.clips.filter((c) => c.start < e.at -
|
|
1455
|
-
if (!lefts.length) refuse(`No clip runs across ${
|
|
1453
|
+
const lefts = tracks.flatMap((t) => t.clips.filter((c) => c.start < e.at - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON && _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) > e.at + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON).map((c) => c.id));
|
|
1454
|
+
if (!lefts.length) refuse(`No clip runs across ${_chunkZBCT5MEAcjs.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.`);
|
|
1456
1455
|
const created = this.cutAcross(tracks, e.at).map((c) => c.id);
|
|
1457
1456
|
return this.outcomes.push({ op: e.op, clips: lefts, created });
|
|
1458
1457
|
}
|
|
1459
1458
|
case "set_keyframes": {
|
|
1460
1459
|
const { track, clip } = this.clip(e.clip);
|
|
1461
1460
|
this.unlocked(track);
|
|
1462
|
-
if (!
|
|
1461
|
+
if (!_chunkZBCT5MEAcjs.VIDEO_KEYFRAME_PROPERTIES.includes(e.property)) refuse(`"${e.property}" cannot be keyframed; use one of ${_chunkZBCT5MEAcjs.VIDEO_KEYFRAME_PROPERTIES.join(", ")}.`);
|
|
1463
1462
|
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.`);
|
|
1464
|
-
const limits =
|
|
1465
|
-
const transform =
|
|
1463
|
+
const limits = _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_LIMITS[e.property];
|
|
1464
|
+
const transform = _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.includes(e.property);
|
|
1466
1465
|
const c = clip;
|
|
1467
1466
|
const current = transform ? _optionalChain([c, 'access', _23 => _23.transform, 'optionalAccess', _24 => _24[e.property]]) : c[e.property];
|
|
1468
1467
|
let value;
|
|
1469
1468
|
if (e.keys === null) {
|
|
1470
|
-
const v =
|
|
1471
|
-
value =
|
|
1469
|
+
const v = _chunkZBCT5MEAcjs.videoValueAt.call(void 0, current, 0, limits.default);
|
|
1470
|
+
value = _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, current) ? v === limits.default ? void 0 : v : current;
|
|
1472
1471
|
} else {
|
|
1473
1472
|
if (!Array.isArray(e.keys) || !e.keys.length) refuse('"keys" must list at least one key { t, v }; pass null to remove the keyframes.');
|
|
1474
1473
|
let sorted = [];
|
|
1475
1474
|
try {
|
|
1476
|
-
sorted =
|
|
1475
|
+
sorted = _chunkZBCT5MEAcjs.sortVideoKeys.call(void 0, e.keys);
|
|
1477
1476
|
} catch (error) {
|
|
1478
1477
|
refuse(error.message);
|
|
1479
1478
|
}
|
|
@@ -1492,12 +1491,12 @@ var Editor = (_class = class {
|
|
|
1492
1491
|
this.unlocked(track);
|
|
1493
1492
|
let at = 0;
|
|
1494
1493
|
const moved = [];
|
|
1495
|
-
for (const clip of
|
|
1496
|
-
if (clip.start >= (_nullishCoalesce(e.from, () => ( 0))) -
|
|
1494
|
+
for (const clip of _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track)) {
|
|
1495
|
+
if (clip.start >= (_nullishCoalesce(e.from, () => ( 0))) - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON && clip.start > at + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
|
|
1497
1496
|
clip.start = Math.max(at, _nullishCoalesce(e.from, () => ( 0)));
|
|
1498
1497
|
moved.push(clip.id);
|
|
1499
1498
|
}
|
|
1500
|
-
at = Math.max(at,
|
|
1499
|
+
at = Math.max(at, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip));
|
|
1501
1500
|
}
|
|
1502
1501
|
return this.outcomes.push({ op: e.op, track: track.id, clips: moved });
|
|
1503
1502
|
}
|
|
@@ -1627,7 +1626,7 @@ function videoTranscriptTrack(project, track) {
|
|
|
1627
1626
|
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(", ")}.`);
|
|
1628
1627
|
return track;
|
|
1629
1628
|
}
|
|
1630
|
-
const assets =
|
|
1629
|
+
const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project);
|
|
1631
1630
|
const transcribed = (t) => t.clips.some((c) => c.type === "media" && _optionalChain([assets, 'access', _26 => _26.get, 'call', _27 => _27(c.asset), 'optionalAccess', _28 => _28.transcript, 'optionalAccess', _29 => _29.length]));
|
|
1632
1631
|
return _nullishCoalesce(_optionalChain([(_nullishCoalesce(project.tracks.find((t) => t.kind === "audio" && transcribed(t)), () => ( project.tracks.find(transcribed)))), 'optionalAccess', _30 => _30.id]), () => ( null));
|
|
1633
1632
|
}
|
|
@@ -1635,16 +1634,16 @@ function videoTimelineTranscript(project, options = {}) {
|
|
|
1635
1634
|
const id = videoTranscriptTrack(project, options.track);
|
|
1636
1635
|
if (!id) return [];
|
|
1637
1636
|
const track = project.tracks.find((t) => t.id === id);
|
|
1638
|
-
const assets =
|
|
1637
|
+
const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project);
|
|
1639
1638
|
const out = [];
|
|
1640
|
-
for (const clip of
|
|
1639
|
+
for (const clip of _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track)) {
|
|
1641
1640
|
if (clip.type !== "media") continue;
|
|
1642
1641
|
const words = _optionalChain([assets, 'access', _31 => _31.get, 'call', _32 => _32(clip.asset), 'optionalAccess', _33 => _33.transcript]);
|
|
1643
1642
|
if (!_optionalChain([words, 'optionalAccess', _34 => _34.length])) continue;
|
|
1644
|
-
const speed =
|
|
1643
|
+
const speed = _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, clip);
|
|
1645
1644
|
const from = _nullishCoalesce(clip.in, () => ( 0));
|
|
1646
1645
|
const to = from + clip.duration * speed;
|
|
1647
|
-
const toTimeline = (s) => Math.min(
|
|
1646
|
+
const toTimeline = (s) => Math.min(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip), Math.max(clip.start, clip.start + (s - from) / speed));
|
|
1648
1647
|
words.forEach((w, index) => {
|
|
1649
1648
|
const mid = (w.start + w.end) / 2;
|
|
1650
1649
|
if (mid < from || mid >= to) return;
|
|
@@ -1689,19 +1688,19 @@ function findVideoTranscriptPauses(words, options = {}) {
|
|
|
1689
1688
|
let to = b.start - keep;
|
|
1690
1689
|
if (options.fps) {
|
|
1691
1690
|
const f = 1e3 / options.fps;
|
|
1692
|
-
from =
|
|
1693
|
-
to =
|
|
1691
|
+
from = _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, Math.ceil(from / f - 1e-9) * f, options.fps);
|
|
1692
|
+
to = _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, Math.floor(to / f + 1e-9) * f, options.fps);
|
|
1694
1693
|
}
|
|
1695
|
-
if (to - from >
|
|
1694
|
+
if (to - from > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) out.push({ from, to, text: `(pause after "${a.word}")` });
|
|
1696
1695
|
}
|
|
1697
1696
|
return out;
|
|
1698
1697
|
}
|
|
1699
1698
|
function mergeVideoRanges(ranges) {
|
|
1700
|
-
const sorted = ranges.filter((r) => r.to - r.from >
|
|
1699
|
+
const sorted = ranges.filter((r) => r.to - r.from > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON).map((r) => ({ from: r.from, to: r.to })).sort((a, b) => a.from - b.from);
|
|
1701
1700
|
const out = [];
|
|
1702
1701
|
for (const r of sorted) {
|
|
1703
1702
|
const last = out[out.length - 1];
|
|
1704
|
-
if (last && r.from <= last.to +
|
|
1703
|
+
if (last && r.from <= last.to + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) last.to = Math.max(last.to, r.to);
|
|
1705
1704
|
else out.push(r);
|
|
1706
1705
|
}
|
|
1707
1706
|
return out;
|
|
@@ -1747,7 +1746,7 @@ function findVideoRepetitions(words, options = {}) {
|
|
|
1747
1746
|
var VIDEO_DISFLUENCY_KINDS = ["filler", "pause", "repetition"];
|
|
1748
1747
|
function detectVideoDisfluencies(words, options = {}) {
|
|
1749
1748
|
const kinds = new Set(_nullishCoalesce(options.kinds, () => ( VIDEO_DISFLUENCY_KINDS)));
|
|
1750
|
-
const startIndex = (time) => Math.max(0, words.findIndex((w) => w.start >= time -
|
|
1749
|
+
const startIndex = (time) => Math.max(0, words.findIndex((w) => w.start >= time - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON));
|
|
1751
1750
|
const out = [];
|
|
1752
1751
|
if (kinds.has("filler"))
|
|
1753
1752
|
for (const r of findVideoFillers(words, options.fillers)) {
|
|
@@ -1761,13 +1760,13 @@ function detectVideoDisfluencies(words, options = {}) {
|
|
|
1761
1760
|
}
|
|
1762
1761
|
if (kinds.has("pause"))
|
|
1763
1762
|
for (const r of findVideoTranscriptPauses(words, options.pauses)) {
|
|
1764
|
-
const after = words.findIndex((w) => w.start >= r.to -
|
|
1763
|
+
const after = words.findIndex((w) => w.start >= r.to - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON);
|
|
1765
1764
|
out.push({ ...r, kind: "pause", words: [Math.max(0, after - 1), Math.max(0, after)] });
|
|
1766
1765
|
}
|
|
1767
1766
|
return out.sort((a, b) => a.from - b.from || a.to - b.to);
|
|
1768
1767
|
}
|
|
1769
1768
|
function videoCutsWithMargin(ranges, keep) {
|
|
1770
|
-
return ranges.map((r) => ({ ...r, from: r.from + keep, to: r.to - keep })).filter((r) => r.to - r.from >
|
|
1769
|
+
return ranges.map((r) => ({ ...r, from: r.from + keep, to: r.to - keep })).filter((r) => r.to - r.from > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON);
|
|
1771
1770
|
}
|
|
1772
1771
|
|
|
1773
1772
|
// src/video-editor/mix.ts
|
|
@@ -1873,7 +1872,7 @@ function videoDuckingKeys(clip, speech, options = {}) {
|
|
|
1873
1872
|
const gap = Math.max(_nullishCoalesce(options.mergeGap, () => ( 600)), attack + release);
|
|
1874
1873
|
const base = _nullishCoalesce(options.base, () => ( 1));
|
|
1875
1874
|
const low = Math.round(base * 10 ** (duckDb / 20) * 1e4) / 1e4;
|
|
1876
|
-
const end =
|
|
1875
|
+
const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
|
|
1877
1876
|
const ranges = [];
|
|
1878
1877
|
for (const r of mergeVideoRanges(speech)) {
|
|
1879
1878
|
if (r.to <= clip.start - release || r.from >= end + attack) continue;
|
|
@@ -2078,7 +2077,7 @@ function videoClipWaveform(clip, peaks, columns) {
|
|
|
2078
2077
|
const step = clip.duration / Math.max(1, n);
|
|
2079
2078
|
for (let c = 0; c < n; c++) {
|
|
2080
2079
|
const { min, max } = videoAudioPeakRange(peaks, start + c * step * speed, start + (c + 1) * step * speed);
|
|
2081
|
-
const gain =
|
|
2080
|
+
const gain = _chunkZBCT5MEAcjs.videoClipSoundGain.call(void 0, clip, (c + 0.5) * step);
|
|
2082
2081
|
out[2 * c] = min * gain;
|
|
2083
2082
|
out[2 * c + 1] = max * gain;
|
|
2084
2083
|
}
|
|
@@ -2211,8 +2210,8 @@ function videoClipPicture(project, clip) {
|
|
|
2211
2210
|
const asset = clip.type === "media" ? project.assets.find((a) => a.id === clip.asset) : void 0;
|
|
2212
2211
|
const size = asset ? { width: _nullishCoalesce(asset.width, () => ( project.width)), height: _nullishCoalesce(asset.height, () => ( project.height)) } : { width: project.width, height: project.height };
|
|
2213
2212
|
const fit = _nullishCoalesce(clip.fit, () => ( (clip.type === "media" || clip.type === "sequence" ? "contain" : "fill")));
|
|
2214
|
-
const rect =
|
|
2215
|
-
return { size, rect, rotation:
|
|
2213
|
+
const rect = _chunkZBCT5MEAcjs.placeVideoRect.call(void 0, project, size, clip.type === "text" ? "fill" : fit, clip.transform, 0);
|
|
2214
|
+
return { size, rect, rotation: _chunkZBCT5MEAcjs.videoTransformAt.call(void 0, clip.transform, 0).rotation };
|
|
2216
2215
|
}
|
|
2217
2216
|
function turn(x, y, cx, cy, deg) {
|
|
2218
2217
|
if (!deg) return [x, y];
|
|
@@ -2238,7 +2237,7 @@ function videoClipMaskOutline(project, clip) {
|
|
|
2238
2237
|
const { rect, rotation } = picture;
|
|
2239
2238
|
const cx = rect.x + rect.width / 2;
|
|
2240
2239
|
const cy = rect.y + rect.height / 2;
|
|
2241
|
-
const polygon =
|
|
2240
|
+
const polygon = _chunkZBCT5MEAcjs.videoMaskPolygon.call(void 0, clip.mask, rect).map(([x, y]) => turn(x, y, cx, cy, rotation));
|
|
2242
2241
|
if (polygon.length < 2) return null;
|
|
2243
2242
|
return [...polygon, polygon[0]].flatMap(([x, y]) => [Math.round(x * 100) / 100, Math.round(y * 100) / 100]);
|
|
2244
2243
|
}
|
|
@@ -2276,7 +2275,7 @@ var VideoPathGesture = (_class3 = class {
|
|
|
2276
2275
|
// src/video-editor/plan.ts
|
|
2277
2276
|
function clipIndex(project) {
|
|
2278
2277
|
const out = /* @__PURE__ */ new Map();
|
|
2279
|
-
for (const { track } of
|
|
2278
|
+
for (const { track } of _chunkZBCT5MEAcjs.allVideoTracks.call(void 0, project)) for (const c of track.clips) out.set(c.id, c);
|
|
2280
2279
|
return out;
|
|
2281
2280
|
}
|
|
2282
2281
|
function diffVideoProjects(before, after) {
|
|
@@ -2285,8 +2284,8 @@ function diffVideoProjects(before, after) {
|
|
|
2285
2284
|
const clipsAdded = [...b.keys()].filter((id) => !a.has(id));
|
|
2286
2285
|
const clipsRemoved = [...a.keys()].filter((id) => !b.has(id));
|
|
2287
2286
|
const clipsChanged = [...b.keys()].filter((id) => a.has(id) && JSON.stringify(a.get(id)) !== JSON.stringify(b.get(id)));
|
|
2288
|
-
const durationBefore =
|
|
2289
|
-
const durationAfter =
|
|
2287
|
+
const durationBefore = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, before);
|
|
2288
|
+
const durationAfter = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, after);
|
|
2290
2289
|
return { durationBefore, durationAfter, durationDelta: durationAfter - durationBefore, clipsAdded, clipsRemoved, clipsChanged };
|
|
2291
2290
|
}
|
|
2292
2291
|
function planVideoEdits(project, input) {
|
|
@@ -2713,10 +2712,10 @@ function videoTransformOfView(view, base, stage) {
|
|
|
2713
2712
|
function videoCameraBase(clip) {
|
|
2714
2713
|
if (clip.camera) return clip.camera.base;
|
|
2715
2714
|
const t = _nullishCoalesce(clip.transform, () => ( {}));
|
|
2716
|
-
const keyed =
|
|
2715
|
+
const keyed = _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.filter((p) => _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, t[p]));
|
|
2717
2716
|
if (keyed.length)
|
|
2718
2717
|
throw new Error(`Clip "${clip.id}" keys its ${keyed.join(", ")}, which a camera move would replace; remove those keyframes first (set_video_keyframes with keys null).`);
|
|
2719
|
-
return Object.fromEntries(
|
|
2718
|
+
return Object.fromEntries(_chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.flatMap((p) => typeof t[p] === "number" ? [[p, t[p]]] : []));
|
|
2720
2719
|
}
|
|
2721
2720
|
async function bakeVideoClipCamera(clip, camera, project, provider) {
|
|
2722
2721
|
const stage = { width: project.width, height: project.height };
|
|
@@ -2727,22 +2726,22 @@ async function bakeVideoClipCamera(clip, camera, project, provider) {
|
|
|
2727
2726
|
const windows = {};
|
|
2728
2727
|
let keys = [];
|
|
2729
2728
|
let inMs = 0;
|
|
2730
|
-
const moveIn =
|
|
2729
|
+
const moveIn = _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, camera.in);
|
|
2731
2730
|
if (moveIn) {
|
|
2732
|
-
const { description } = await
|
|
2731
|
+
const { description } = await _chunkISIO63Q5cjs.resolveCameraMoveSpec.call(void 0, provider, moveIn, "transition");
|
|
2733
2732
|
inMs = _nullishCoalesce(moveIn.ms, () => ( description.camera.durationMs));
|
|
2734
2733
|
if (inMs > clip.duration) throw new Error(`The move into clip "${clip.id}" takes ${inMs} ms, longer than the clip (${clip.duration} ms); give a shorter "ms" or lengthen the clip.`);
|
|
2735
|
-
const sample = await
|
|
2734
|
+
const sample = await _chunkISIO63Q5cjs.sampleEffectCameraMove.call(void 0, provider, moveIn.move, { from: videoCameraView(camera.from, stage), to, ms: inMs, stage, fps, values: moveIn.values });
|
|
2736
2735
|
keys.push(...sample.keys);
|
|
2737
2736
|
if (sample.cut !== void 0) cuts.push(sample.cut);
|
|
2738
2737
|
windows.in = { start: 0, end: inMs };
|
|
2739
2738
|
}
|
|
2740
|
-
const moveDuring =
|
|
2739
|
+
const moveDuring = _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, camera.during);
|
|
2741
2740
|
const holdMs = clip.duration - inMs;
|
|
2742
2741
|
if (moveDuring && holdMs > 0) {
|
|
2743
|
-
await
|
|
2742
|
+
await _chunkISIO63Q5cjs.resolveCameraMoveSpec.call(void 0, provider, moveDuring, "hold");
|
|
2744
2743
|
const at = keys.length ? keys[keys.length - 1].view : to;
|
|
2745
|
-
const sample = await
|
|
2744
|
+
const sample = await _chunkISIO63Q5cjs.sampleEffectCameraMove.call(void 0, provider, moveDuring.move, { from: at, to: at, ms: holdMs, stage, fps, values: moveDuring.values });
|
|
2746
2745
|
const shifted = sample.keys.map((k) => ({ t: k.t + inMs, view: k.view }));
|
|
2747
2746
|
if (keys.length && shifted.length && sameView(keys[keys.length - 1].view, shifted[0].view)) shifted.shift();
|
|
2748
2747
|
keys.push(...shifted);
|
|
@@ -2755,7 +2754,7 @@ async function bakeVideoClipCamera(clip, camera, project, provider) {
|
|
|
2755
2754
|
const base = videoCameraBase(clip);
|
|
2756
2755
|
const transforms = keys.map((k) => ({ t: Math.round(k.t * 1e3) / 1e3, value: videoTransformOfView(k.view, base, stage) }));
|
|
2757
2756
|
const transform = {};
|
|
2758
|
-
for (const p of
|
|
2757
|
+
for (const p of _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES) {
|
|
2759
2758
|
const out = [];
|
|
2760
2759
|
for (const { t, value } of transforms) {
|
|
2761
2760
|
const last = out[out.length - 1];
|
|
@@ -2769,7 +2768,7 @@ async function bakeVideoClipCamera(clip, camera, project, provider) {
|
|
|
2769
2768
|
}
|
|
2770
2769
|
var sameView = (a, b) => ["zoom", "scrollX", "scrollY", "tilt", "turn", "roll", "blur"].every((k) => Math.abs((_nullishCoalesce(a[k], () => ( 0))) - (_nullishCoalesce(b[k], () => ( 0)))) < 1e-9);
|
|
2771
2770
|
function videoClipCameraMove(clip, role) {
|
|
2772
|
-
return
|
|
2771
|
+
return _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, _optionalChain([clip, 'optionalAccess', _45 => _45.camera, 'optionalAccess', _46 => _46[role === "transition" ? "in" : "during"]]));
|
|
2773
2772
|
}
|
|
2774
2773
|
|
|
2775
2774
|
// src/video-editor/transcript-controller.ts
|
|
@@ -2998,7 +2997,7 @@ function videoProxyFfmpeg(asset, options = {}) {
|
|
|
2998
2997
|
output
|
|
2999
2998
|
];
|
|
3000
2999
|
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 } : {} };
|
|
3001
|
-
return { asset: asset.id, args, command: ["ffmpeg", ...args].map(
|
|
3000
|
+
return { asset: asset.id, args, command: ["ffmpeg", ...args].map(_chunkZBCT5MEAcjs.videoShellQuote).join(" "), proxy };
|
|
3002
3001
|
}
|
|
3003
3002
|
function videoProxyPlan(project, options = {}) {
|
|
3004
3003
|
const scale = _nullishCoalesce(options.scale, () => ( 0.5));
|
|
@@ -3024,7 +3023,7 @@ var videoSourceFrameTime = (frame, fps) => (frame + 0.5) * 1e3 / fps;
|
|
|
3024
3023
|
var videoFrameCacheKey = (src, frame) => `${frame}@${src}`;
|
|
3025
3024
|
function videoFrameRequestsAt(project, time, srcFor = (l) => l.src) {
|
|
3026
3025
|
const out = [];
|
|
3027
|
-
for (const layer of
|
|
3026
|
+
for (const layer of _chunkZBCT5MEAcjs.videoFrameLeafLayers.call(void 0, _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project, time).layers)) {
|
|
3028
3027
|
if (layer.type !== "media" || layer.assetKind !== "video") continue;
|
|
3029
3028
|
const src = srcFor(layer);
|
|
3030
3029
|
if (!src) continue;
|
|
@@ -3365,7 +3364,7 @@ var VideoPreviewEngine = (_class7 = class {
|
|
|
3365
3364
|
if (this.destroyed) return;
|
|
3366
3365
|
const state = this.source.getState();
|
|
3367
3366
|
const { project, time, playing } = state;
|
|
3368
|
-
const frame =
|
|
3367
|
+
const frame = _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project, time);
|
|
3369
3368
|
const scale = resolveVideoPreviewScale(_nullishCoalesce(this.options.previewScale, () => ( state.previewScale)), this.resolutionFor(project.width));
|
|
3370
3369
|
const assets = new Map(project.assets.map((a) => [a.id, a]));
|
|
3371
3370
|
this.srcFor = (layer) => videoPreviewSrc(assets.get(_nullishCoalesce(layer.asset, () => ( ""))), scale, layer.src);
|
|
@@ -3395,7 +3394,7 @@ var VideoPreviewEngine = (_class7 = class {
|
|
|
3395
3394
|
}
|
|
3396
3395
|
};
|
|
3397
3396
|
const sounding = new Map(frame.audio.map((a) => [a.clip, a]));
|
|
3398
|
-
for (const layer of
|
|
3397
|
+
for (const layer of _chunkZBCT5MEAcjs.videoFrameLeafLayers.call(void 0, frame.layers)) {
|
|
3399
3398
|
if (layer.type !== "media" || layer.assetKind !== "video" || !layer.src) continue;
|
|
3400
3399
|
const sound = sounding.get(layer.clip);
|
|
3401
3400
|
sync(layer.clip, this.srcFor(layer), "video", _nullishCoalesce(layer.sourceTime, () => ( 0)), _nullishCoalesce(_optionalChain([sound, 'optionalAccess', _93 => _93.speed]), () => ( 1)), sound ? sound.gain : null);
|
|
@@ -3407,9 +3406,9 @@ var VideoPreviewEngine = (_class7 = class {
|
|
|
3407
3406
|
}
|
|
3408
3407
|
/** With effects, the frame is drawn at the start of its frame, so effect pictures are cached once per frame. */
|
|
3409
3408
|
drawable(project, frame) {
|
|
3410
|
-
if (!_optionalChain([this, 'access', _94 => _94.effects, 'optionalAccess', _95 => _95.available]) || !
|
|
3411
|
-
const at =
|
|
3412
|
-
return at === frame.time ? frame : { ...
|
|
3409
|
+
if (!_optionalChain([this, 'access', _94 => _94.effects, 'optionalAccess', _95 => _95.available]) || !_chunkZBCT5MEAcjs.videoLayersUseEffects.call(void 0, frame.layers)) return frame;
|
|
3410
|
+
const at = _chunkZBCT5MEAcjs.videoEffectFrameTime.call(void 0, frame.time, project.fps);
|
|
3411
|
+
return at === frame.time ? frame : { ..._chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project, at), time: frame.time };
|
|
3413
3412
|
}
|
|
3414
3413
|
redraw() {
|
|
3415
3414
|
if (this.scheduled || this.destroyed) return;
|
|
@@ -3418,7 +3417,7 @@ var VideoPreviewEngine = (_class7 = class {
|
|
|
3418
3417
|
this.scheduled = false;
|
|
3419
3418
|
if (this.destroyed) return;
|
|
3420
3419
|
const { project, time } = this.source.getState();
|
|
3421
|
-
this.draw(this.drawable(project,
|
|
3420
|
+
this.draw(this.drawable(project, _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project, time)));
|
|
3422
3421
|
});
|
|
3423
3422
|
}
|
|
3424
3423
|
__init42() {this.sourceFor = (layer) => {
|
|
@@ -3461,7 +3460,7 @@ var VideoPreviewEngine = (_class7 = class {
|
|
|
3461
3460
|
if (!source) this.complete = false;
|
|
3462
3461
|
return source;
|
|
3463
3462
|
};
|
|
3464
|
-
|
|
3463
|
+
_chunkZBCT5MEAcjs.drawVideoFrame.call(void 0, this.ctx, frame, sourceFor, resolution, {
|
|
3465
3464
|
defineSvgFilter: this.defineSvgFilter,
|
|
3466
3465
|
lutFor: this.lutFor,
|
|
3467
3466
|
scratch: this.scratch,
|
|
@@ -3534,15 +3533,15 @@ var VideoPreviewEngine = (_class7 = class {
|
|
|
3534
3533
|
var svgUrl = (svg) => svg.trimStart().startsWith("<") ? `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}` : svg;
|
|
3535
3534
|
var GROUPS = ["base", "background", "subject", "overlay", "text"];
|
|
3536
3535
|
function videoEditsFromSequence(project, sequence, options = {}) {
|
|
3537
|
-
const at = _nullishCoalesce(options.at, () => (
|
|
3536
|
+
const at = _nullishCoalesce(options.at, () => ( _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, project)));
|
|
3538
3537
|
const W = project.width;
|
|
3539
3538
|
const H = project.height;
|
|
3540
3539
|
const sx = W / sequence.stage.width;
|
|
3541
3540
|
const sy = H / sequence.stage.height;
|
|
3542
|
-
const timing =
|
|
3541
|
+
const timing = _chunkZ3BRH4JKcjs.effectSequenceTiming.call(void 0, sequence);
|
|
3543
3542
|
const provider = options.provider ? { provider: options.provider } : {};
|
|
3544
3543
|
const notes = [];
|
|
3545
|
-
const usedClips = new Set(
|
|
3544
|
+
const usedClips = new Set(_chunkZBCT5MEAcjs.allVideoClipIds.call(void 0, project));
|
|
3546
3545
|
const usedTracks = new Set(project.tracks.map((t) => t.id));
|
|
3547
3546
|
const usedAssets = new Set(project.assets.map((a) => a.id));
|
|
3548
3547
|
const fresh = (used, base) => {
|
|
@@ -3584,11 +3583,11 @@ function videoEditsFromSequence(project, sequence, options = {}) {
|
|
|
3584
3583
|
const shotEnd = _nullishCoalesce(timing.starts[i + 1], () => ( timing.total));
|
|
3585
3584
|
let base;
|
|
3586
3585
|
shot.layers.forEach((layer, j) => {
|
|
3587
|
-
const span =
|
|
3586
|
+
const span = _chunkZ3BRH4JKcjs.effectLayerSpan.call(void 0, layer, i, timing.starts, timing.total);
|
|
3588
3587
|
if (span.end - span.start <= 0) return void notes.push(`Shot ${i + 1}, layer ${j + 1} lasts no time, so it was left out.`);
|
|
3589
3588
|
const clip = clipOf(layer, at + span.start, span.end - span.start, i);
|
|
3590
|
-
const isBase = j === 0 && !base && span.start === shotStart && span.end === shotEnd &&
|
|
3591
|
-
const item = { group: isBase ? "base" :
|
|
3589
|
+
const isBase = j === 0 && !base && span.start === shotStart && span.end === shotEnd && _chunkZ3BRH4JKcjs.effectLayerRole.call(void 0, layer) === "background" && !layer.rect;
|
|
3590
|
+
const item = { group: isBase ? "base" : _chunkZ3BRH4JKcjs.effectLayerRole.call(void 0, layer), clip };
|
|
3592
3591
|
if (isBase) base = item;
|
|
3593
3592
|
items.push(item);
|
|
3594
3593
|
});
|
|
@@ -3665,17 +3664,17 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3665
3664
|
constructor(options = {}) {;_class8.prototype.__init46.call(this);_class8.prototype.__init47.call(this);_class8.prototype.__init48.call(this);_class8.prototype.__init49.call(this);_class8.prototype.__init50.call(this);_class8.prototype.__init51.call(this);_class8.prototype.__init52.call(this);_class8.prototype.__init53.call(this);_class8.prototype.__init54.call(this);_class8.prototype.__init55.call(this);_class8.prototype.__init56.call(this);_class8.prototype.__init57.call(this);_class8.prototype.__init58.call(this);
|
|
3666
3665
|
this.history = _nullishCoalesce(options.history, () => ( new (0, _chunkWKPXOGZZcjs.HistoryManager)()));
|
|
3667
3666
|
this.audioPeaks = options.audioPeaks instanceof VideoAudioPeaksCache ? options.audioPeaks : new VideoAudioPeaksCache(options.audioPeaks);
|
|
3668
|
-
this.luts = options.luts instanceof
|
|
3667
|
+
this.luts = options.luts instanceof _chunkZBCT5MEAcjs.VideoLutCache ? options.luts : new (0, _chunkZBCT5MEAcjs.VideoLutCache)(options.luts);
|
|
3669
3668
|
this.frameCache = _nullishCoalesce(options.frameCache, () => ( null));
|
|
3670
|
-
this.effects = new (0,
|
|
3669
|
+
this.effects = new (0, _chunkISIO63Q5cjs.EffectsSlot)();
|
|
3671
3670
|
if (options.effects) this.effects.set(options.effects);
|
|
3672
|
-
this.effectsEngine = new (0,
|
|
3671
|
+
this.effectsEngine = new (0, _chunkZBCT5MEAcjs.VideoEffectsEngine)({ slot: this.effects });
|
|
3673
3672
|
this.project = options.project ? parseVideoProject(options.project) : createVideoProject();
|
|
3674
3673
|
this.issues = checkVideoProject(this.project);
|
|
3675
3674
|
this.readOnly = _nullishCoalesce(options.readOnly, () => ( false));
|
|
3676
3675
|
this.previewScale = checkPreviewScale(_nullishCoalesce(options.previewScale, () => ( "auto")));
|
|
3677
3676
|
this.onChange = options.onChange;
|
|
3678
|
-
this.player = new (0,
|
|
3677
|
+
this.player = new (0, _chunkM5GLQQWGcjs.AnimationPlayer)({ clock: options.clock, duration: () => _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, this.project), loop: "none" });
|
|
3679
3678
|
this.state = this.computeState();
|
|
3680
3679
|
this.connect();
|
|
3681
3680
|
}
|
|
@@ -3712,12 +3711,12 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3712
3711
|
const h = this.history.getState();
|
|
3713
3712
|
return {
|
|
3714
3713
|
project: this.project,
|
|
3715
|
-
duration:
|
|
3714
|
+
duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, this.project),
|
|
3716
3715
|
time: p.time,
|
|
3717
3716
|
playing: p.playing,
|
|
3718
3717
|
loop: p.loop,
|
|
3719
3718
|
selection: this.selection,
|
|
3720
|
-
current:
|
|
3719
|
+
current: _chunkZBCT5MEAcjs.videoClipsAt.call(void 0, this.project, p.time).map((c) => c.clip.id),
|
|
3721
3720
|
issues: this.issues,
|
|
3722
3721
|
readOnly: this.readOnly,
|
|
3723
3722
|
error: this.error,
|
|
@@ -3751,7 +3750,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3751
3750
|
this.issues = checkVideoProject(project);
|
|
3752
3751
|
const ids = new Set(project.tracks.flatMap((t) => t.clips.map((c) => c.id)));
|
|
3753
3752
|
if (this.selection.some((id) => !ids.has(id))) this.selection = this.selection.filter((id) => ids.has(id));
|
|
3754
|
-
this.player.setDuration(() =>
|
|
3753
|
+
this.player.setDuration(() => _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, this.project));
|
|
3755
3754
|
} finally {
|
|
3756
3755
|
this.applying = false;
|
|
3757
3756
|
}
|
|
@@ -3913,7 +3912,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3913
3912
|
}
|
|
3914
3913
|
/** Selects clips (unknown ids are dropped). `add` toggles them into the current selection. */
|
|
3915
3914
|
select(clips, options = {}) {
|
|
3916
|
-
const known = _nullishCoalesce(_optionalChain([clips, 'optionalAccess', _117 => _117.filter, 'call', _118 => _118((id) =>
|
|
3915
|
+
const known = _nullishCoalesce(_optionalChain([clips, 'optionalAccess', _117 => _117.filter, 'call', _118 => _118((id) => _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, id))]), () => ( []));
|
|
3917
3916
|
let next;
|
|
3918
3917
|
if (options.add) {
|
|
3919
3918
|
next = [...this.selection];
|
|
@@ -3940,7 +3939,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3940
3939
|
step(frames) {
|
|
3941
3940
|
this.player.pause();
|
|
3942
3941
|
const fps = this.project.fps;
|
|
3943
|
-
this.player.seek(Math.max(0,
|
|
3942
|
+
this.player.seek(Math.max(0, _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, this.player.currentTime, fps) + frames * 1e3 / fps));
|
|
3944
3943
|
}
|
|
3945
3944
|
setLoop(loop) {
|
|
3946
3945
|
this.player.setLoop(loop);
|
|
@@ -3957,14 +3956,14 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3957
3956
|
*/
|
|
3958
3957
|
snap(time, options = {}) {
|
|
3959
3958
|
const threshold = _nullishCoalesce(options.threshold, () => ( 8 * 1e3 / this.project.fps));
|
|
3960
|
-
const points =
|
|
3961
|
-
const hit =
|
|
3962
|
-
return hit.snapped !== null ? hit : { time: Math.max(0,
|
|
3959
|
+
const points = _chunkZBCT5MEAcjs.videoSnapPoints.call(void 0, this.project, { exclude: options.exclude, playhead: options.playhead === false ? void 0 : this.player.currentTime });
|
|
3960
|
+
const hit = _chunkZBCT5MEAcjs.snapVideoTime.call(void 0, time, points, threshold);
|
|
3961
|
+
return hit.snapped !== null ? hit : { time: Math.max(0, _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, time, this.project.fps)), snapped: null };
|
|
3963
3962
|
}
|
|
3964
3963
|
/** Splits the selected clips (or every clip) under the playhead there, as one undo step. */
|
|
3965
3964
|
splitAtPlayhead() {
|
|
3966
|
-
const t =
|
|
3967
|
-
const under =
|
|
3965
|
+
const t = _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, this.player.currentTime, this.project.fps);
|
|
3966
|
+
const under = _chunkZBCT5MEAcjs.videoClipsAt.call(void 0, this.project, t).filter(({ clip }) => t > clip.start && t < _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip));
|
|
3968
3967
|
const chosen = this.selection.length ? under.filter(({ clip }) => this.selection.includes(clip.id)) : under;
|
|
3969
3968
|
if (!chosen.length) return this.refuse("No clip is under the playhead to split.");
|
|
3970
3969
|
return this.apply(chosen.map(({ clip }) => ({ op: "split_clip", clip: clip.id, at: t })), "Split");
|
|
@@ -3992,7 +3991,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3992
3991
|
/** The provider's description of an effect, checked for `place` (rejects without a provider or for an unknown id). */
|
|
3993
3992
|
async describeEffect(effect, place) {
|
|
3994
3993
|
const d = await this.effects.require().describe(effect);
|
|
3995
|
-
if (place)
|
|
3994
|
+
if (place) _chunkZBCT5MEAcjs.checkVideoEffectPlace.call(void 0, d, place);
|
|
3996
3995
|
return d;
|
|
3997
3996
|
}
|
|
3998
3997
|
/**
|
|
@@ -4007,9 +4006,9 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4007
4006
|
if (options.at !== void 0 && !(Number.isFinite(options.at) && options.at >= 0)) return this.refused(`"at" is a time in ms, 0 or more (got ${options.at}).`);
|
|
4008
4007
|
let filled;
|
|
4009
4008
|
try {
|
|
4010
|
-
filled = await
|
|
4009
|
+
filled = await _chunkZ3BRH4JKcjs.fillEffectTemplate.call(void 0, this.effects.provider, template, values, options.name ? { name: options.name } : {});
|
|
4011
4010
|
} catch (error) {
|
|
4012
|
-
if (
|
|
4011
|
+
if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
|
|
4013
4012
|
throw error;
|
|
4014
4013
|
}
|
|
4015
4014
|
const made = videoEditsFromSequence(this.getState().project, filled.sequence, { at: options.at, provider: this.effects.provider.id });
|
|
@@ -4028,7 +4027,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4028
4027
|
try {
|
|
4029
4028
|
plan = await run();
|
|
4030
4029
|
} catch (error) {
|
|
4031
|
-
if (
|
|
4030
|
+
if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
|
|
4032
4031
|
throw error;
|
|
4033
4032
|
}
|
|
4034
4033
|
const result = this.apply(plan.edit, plan.label, { merge });
|
|
@@ -4036,7 +4035,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4036
4035
|
return { ...result, clip: plan.clip, ...plan.effect ? { effect: plan.effect() } : {} };
|
|
4037
4036
|
}
|
|
4038
4037
|
clipOrThrow(id) {
|
|
4039
|
-
const at =
|
|
4038
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, id);
|
|
4040
4039
|
if (!at) throw new Error(`There is no clip "${id}"; list_applied_effects or get_video_project lists the clips.`);
|
|
4041
4040
|
return at.clip;
|
|
4042
4041
|
}
|
|
@@ -4049,7 +4048,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4049
4048
|
return this.effectEdit(async () => {
|
|
4050
4049
|
const current = this.clipOrThrow(clip);
|
|
4051
4050
|
const d = await this.describeEffect(effect, "clip");
|
|
4052
|
-
const values =
|
|
4051
|
+
const values = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
|
|
4053
4052
|
const stack = [..._nullishCoalesce(current.effects, () => ( []))];
|
|
4054
4053
|
const taken = new Set(stack.map((e) => e.id));
|
|
4055
4054
|
let n = 1;
|
|
@@ -4085,7 +4084,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4085
4084
|
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(", ")}.`);
|
|
4086
4085
|
base[k] = d.defaults[k];
|
|
4087
4086
|
}
|
|
4088
|
-
next.values =
|
|
4087
|
+
next.values = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, given, { base, keyframes: true });
|
|
4089
4088
|
}
|
|
4090
4089
|
if (changes.enabled !== void 0) {
|
|
4091
4090
|
if (changes.enabled) delete next.enabled;
|
|
@@ -4106,7 +4105,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4106
4105
|
return (await provider.list({ kind: "camera" })).filter((e) => e.kind === "camera" && e.camera && (!role || e.camera.role === role));
|
|
4107
4106
|
}
|
|
4108
4107
|
cameraClip(id) {
|
|
4109
|
-
const at =
|
|
4108
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, id);
|
|
4110
4109
|
if (!at) {
|
|
4111
4110
|
const ids = this.project.tracks.flatMap((t) => t.clips.map((c) => c.id));
|
|
4112
4111
|
throw new Error(`There is no clip "${id}"; the clips are ${ids.map((c) => `"${c}"`).join(", ") || "none"} (get_video_project lists them).`);
|
|
@@ -4127,7 +4126,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4127
4126
|
const bake = await bakeVideoClipCamera(clip, camera, this.project, this.effects.require());
|
|
4128
4127
|
const r = this.apply({ op: "update_clip", clip: clipId, set: { camera, transform: bake.transform } }, label, { merge });
|
|
4129
4128
|
if (!r.ok) return r;
|
|
4130
|
-
const keys = Object.fromEntries(
|
|
4129
|
+
const keys = Object.fromEntries(_chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => [p, _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, bake.transform[p]).length]));
|
|
4131
4130
|
return { ok: true, clip: clipId, camera, keys, cuts: bake.cuts, windows: bake.windows, notes: bake.notes };
|
|
4132
4131
|
}
|
|
4133
4132
|
/**
|
|
@@ -4142,10 +4141,10 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4142
4141
|
if (reason) return this.refused(reason);
|
|
4143
4142
|
try {
|
|
4144
4143
|
const current = this.cameraClip(clip);
|
|
4145
|
-
const { spec: parts, description } = await
|
|
4144
|
+
const { spec: parts, description } = await _chunkISIO63Q5cjs.resolveCameraMoveSpec.call(void 0, this.effects.require(), spec, role);
|
|
4146
4145
|
const move = role === "transition" && parts.ms === void 0 ? { ...parts, ms: description.camera.durationMs } : parts;
|
|
4147
4146
|
const simple = move.ms === void 0 && move.preset === void 0 && move.values === void 0;
|
|
4148
|
-
const camera = { ..._nullishCoalesce(current.camera, () => ( { base: videoCameraBase(current) })), [
|
|
4147
|
+
const camera = { ..._nullishCoalesce(current.camera, () => ( { base: videoCameraBase(current) })), [_chunkISIO63Q5cjs.cameraMoveField.call(void 0, role)]: simple ? move.move : move };
|
|
4149
4148
|
for (const key of ["from", "framing"]) {
|
|
4150
4149
|
if (options[key] === null) delete camera[key];
|
|
4151
4150
|
else if (options[key] !== void 0) camera[key] = options[key];
|
|
@@ -4153,7 +4152,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4153
4152
|
if (camera.from && !camera.in) throw new Error('"from" is where a move in starts; set a transition move too, or leave "from" out.');
|
|
4154
4153
|
return await this.cameraEdit(clip, camera, `${role === "hold" ? "Hold move" : "Camera move"} ${description.name}`, options.merge);
|
|
4155
4154
|
} catch (error) {
|
|
4156
|
-
if (
|
|
4155
|
+
if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
|
|
4157
4156
|
throw error;
|
|
4158
4157
|
}
|
|
4159
4158
|
}
|
|
@@ -4166,7 +4165,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4166
4165
|
if (reason) return this.refused(reason);
|
|
4167
4166
|
try {
|
|
4168
4167
|
const current = this.cameraClip(clip);
|
|
4169
|
-
const field =
|
|
4168
|
+
const field = _chunkISIO63Q5cjs.cameraMoveField.call(void 0, role);
|
|
4170
4169
|
const other = field === "in" ? "during" : "in";
|
|
4171
4170
|
if (_optionalChain([current, 'access', _121 => _121.camera, 'optionalAccess', _122 => _122[field]]) === void 0)
|
|
4172
4171
|
throw new Error(`Clip "${clip}" has no camera "${field}" move to clear${_optionalChain([current, 'access', _123 => _123.camera, 'optionalAccess', _124 => _124[other]]) !== void 0 ? `; it has a "${other}" move (role ${role === "hold" ? "transition" : "hold"})` : ""}.`);
|
|
@@ -4176,7 +4175,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4176
4175
|
const left = camera.in !== void 0 || camera.during !== void 0;
|
|
4177
4176
|
return await this.cameraEdit(clip, left ? camera : null, role === "hold" ? "Clear hold move" : "Clear camera move");
|
|
4178
4177
|
} catch (error) {
|
|
4179
|
-
if (
|
|
4178
|
+
if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
|
|
4180
4179
|
throw error;
|
|
4181
4180
|
}
|
|
4182
4181
|
}
|
|
@@ -4184,7 +4183,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4184
4183
|
removeClipEffect(clip, instance) {
|
|
4185
4184
|
const reason = this.readOnlyReason();
|
|
4186
4185
|
if (reason) return this.refused(reason);
|
|
4187
|
-
const at =
|
|
4186
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, clip);
|
|
4188
4187
|
if (!at) return this.refused(`There is no clip "${clip}".`);
|
|
4189
4188
|
const stack = _nullishCoalesce(at.clip.effects, () => ( []));
|
|
4190
4189
|
const was = stack.find((e) => e.id === instance);
|
|
@@ -4201,7 +4200,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4201
4200
|
return this.effectEdit(async () => {
|
|
4202
4201
|
this.clipOrThrow(clip);
|
|
4203
4202
|
const d = await this.describeEffect(effect, "transition");
|
|
4204
|
-
const values =
|
|
4203
|
+
const values = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, options.values);
|
|
4205
4204
|
const duration = _nullishCoalesce(_nullishCoalesce(options.duration, () => ( d.duration)), () => ( 1e3));
|
|
4206
4205
|
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 };
|
|
4207
4206
|
});
|
|
@@ -4214,7 +4213,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4214
4213
|
addEffectClip(track, effect, options = {}) {
|
|
4215
4214
|
return this.effectEdit(async () => {
|
|
4216
4215
|
const d = await this.describeEffect(effect, "generator");
|
|
4217
|
-
const values =
|
|
4216
|
+
const values = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
|
|
4218
4217
|
const duration = _nullishCoalesce(_nullishCoalesce(options.duration, () => ( d.duration)), () => ( 5e3));
|
|
4219
4218
|
const label = `Add ${d.name}`;
|
|
4220
4219
|
const clipId = _nullishCoalesce(options.id, () => ( ""));
|
|
@@ -4236,12 +4235,12 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4236
4235
|
if (part === "generator") {
|
|
4237
4236
|
if (current.type !== "effect") throw new Error(`Clip "${clip}" is not an effect clip.`);
|
|
4238
4237
|
const d2 = await this.describeEffect(current.effect);
|
|
4239
|
-
return { edit: { op: "update_clip", clip, set: { values:
|
|
4238
|
+
return { edit: { op: "update_clip", clip, set: { values: _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d2, values, { base: _nullishCoalesce(current.values, () => ( {})), keyframes: true }) } }, label: `Change ${_nullishCoalesce(current.name, () => ( d2.name))}`, clip };
|
|
4240
4239
|
}
|
|
4241
4240
|
const t = current.transition;
|
|
4242
4241
|
if (_optionalChain([t, 'optionalAccess', _128 => _128.type]) !== "effect" || !t.effect) throw new Error(`Clip "${clip}" has no effect transition.`);
|
|
4243
4242
|
const d = await this.describeEffect(t.effect.effect);
|
|
4244
|
-
const merged =
|
|
4243
|
+
const merged = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, values, { base: _nullishCoalesce(t.effect.values, () => ( {})) });
|
|
4245
4244
|
return { edit: { op: "set_transition", clip, transition: { ...t, effect: { ...t.effect, values: merged } } }, label: `Change transition ${d.name}`, clip };
|
|
4246
4245
|
}, options.merge);
|
|
4247
4246
|
}
|
|
@@ -4265,7 +4264,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4265
4264
|
return fail2(`Clip "${clip}" has no effect "${instance}"; its effects are ${ids.map((i) => `"${i}"`).join(", ") || "none"} ("generator" is an effect clip's own picture).`);
|
|
4266
4265
|
}
|
|
4267
4266
|
const d = await this.describeEffect(effect);
|
|
4268
|
-
const controls =
|
|
4267
|
+
const controls = _chunkISIO63Q5cjs.pathControlsOf.call(void 0, d);
|
|
4269
4268
|
if (!controls.length) return fail2(`"${d.id}" does not draw along a path. Find one that does with search_effects accepts ["path"].`);
|
|
4270
4269
|
const control = _nullishCoalesce(options.control, () => ( (controls.length === 1 ? controls[0] : void 0)));
|
|
4271
4270
|
if (!control) return fail2(`"${d.id}" has several path controls (${controls.join(", ")}); pass control.`);
|
|
@@ -4280,7 +4279,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4280
4279
|
if (typeof path.d !== "string") return fail2('d must be SVG path data (a string), or "" to clear the path.');
|
|
4281
4280
|
value = path.d;
|
|
4282
4281
|
} else if ("mask" in path) {
|
|
4283
|
-
const from = _optionalChain([
|
|
4282
|
+
const from = _optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, path.mask.clip), 'optionalAccess', _133 => _133.clip]);
|
|
4284
4283
|
if (!from) return fail2(`There is no clip "${path.mask.clip}" to take a mask from.`);
|
|
4285
4284
|
const outline = videoClipMaskOutline(this.project, from);
|
|
4286
4285
|
if (!outline) return fail2(`Clip "${path.mask.clip}" has no mask; add one with set_video_clip_mask, or pass points or d.`);
|
|
@@ -4322,31 +4321,31 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4322
4321
|
}
|
|
4323
4322
|
/** 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). */
|
|
4324
4323
|
setClipEffectKeyframes(clip, instance, control, keys) {
|
|
4325
|
-
const current = _optionalChain([
|
|
4324
|
+
const current = _optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, clip), 'optionalAccess', _134 => _134.clip]);
|
|
4326
4325
|
const was = _optionalChain([current, 'optionalAccess', _135 => _135.effects, 'optionalAccess', _136 => _136.find, 'call', _137 => _137((e) => e.id === instance)]);
|
|
4327
4326
|
const value = _optionalChain([was, 'optionalAccess', _138 => _138.values, 'optionalAccess', _139 => _139[control]]);
|
|
4328
|
-
const plain = keys === null ?
|
|
4327
|
+
const plain = keys === null ? _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, value) ? _optionalChain([value, 'access', _140 => _140.keys, 'access', _141 => _141[0], 'optionalAccess', _142 => _142.v]) : value : { keys: [...keys].sort((a, b) => a.t - b.t) };
|
|
4329
4328
|
return this.updateClipEffect(clip, instance, { values: { [control]: _nullishCoalesce(plain, () => ( null)) } });
|
|
4330
4329
|
}
|
|
4331
4330
|
/** What plays at `time` (default: the playhead). */
|
|
4332
4331
|
frame(time = this.player.currentTime) {
|
|
4333
|
-
return
|
|
4332
|
+
return _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, this.project, time);
|
|
4334
4333
|
}
|
|
4335
4334
|
/** The frame at `time` (default: the playhead) as SVG. */
|
|
4336
4335
|
toSvg(time = this.player.currentTime, options = {}) {
|
|
4337
|
-
return
|
|
4336
|
+
return _chunkZBCT5MEAcjs.videoProjectSvg.call(void 0, this.project, time, { lutFor: (src) => this.luts.peek(src), ...options });
|
|
4338
4337
|
}
|
|
4339
4338
|
/** The project as an ffmpeg command. */
|
|
4340
4339
|
toFfmpeg(options = {}) {
|
|
4341
|
-
return
|
|
4340
|
+
return _chunkZBCT5MEAcjs.toVideoFfmpeg.call(void 0, this.project, options);
|
|
4342
4341
|
}
|
|
4343
4342
|
/** The ffmpeg command that measures the mix's loudness (see `toVideoLoudnessMeasure`). */
|
|
4344
4343
|
toLoudnessMeasure(options = {}) {
|
|
4345
|
-
return
|
|
4344
|
+
return _chunkZBCT5MEAcjs.toVideoLoudnessMeasure.call(void 0, this.project, options);
|
|
4346
4345
|
}
|
|
4347
4346
|
/** One track as a CMX 3600 EDL. */
|
|
4348
4347
|
toEdl(options = {}) {
|
|
4349
|
-
return
|
|
4348
|
+
return _chunkZBCT5MEAcjs.toVideoEdl.call(void 0, this.project, options);
|
|
4350
4349
|
}
|
|
4351
4350
|
}, _class8.__initStatic(), _class8);
|
|
4352
4351
|
function checkPreviewScale(scale) {
|
|
@@ -4414,12 +4413,12 @@ function videoRulerTicks(duration, pxPerSecond, fps) {
|
|
|
4414
4413
|
const ticks = [];
|
|
4415
4414
|
for (let t = 0; t <= duration + 1e-6; t += step) {
|
|
4416
4415
|
const isMajor = Math.abs(t / major - Math.round(t / major)) < 1e-9;
|
|
4417
|
-
ticks.push({ time: t, x: t * pxPerMs, major: isMajor, ...isMajor ? { label:
|
|
4416
|
+
ticks.push({ time: t, x: t * pxPerMs, major: isMajor, ...isMajor ? { label: _chunkZBCT5MEAcjs.formatVideoTimecode.call(void 0, t, fps).replace(/^00:/, "") } : {} });
|
|
4418
4417
|
}
|
|
4419
4418
|
return ticks;
|
|
4420
4419
|
}
|
|
4421
4420
|
function videoClipShowsWaveform(clip, asset, mode = "audio") {
|
|
4422
|
-
if (clip.type !== "media" || mode === "none" || !
|
|
4421
|
+
if (clip.type !== "media" || mode === "none" || !_chunkZBCT5MEAcjs.videoAssetHasSound.call(void 0, asset)) return false;
|
|
4423
4422
|
return mode === "all" || asset.kind === "audio";
|
|
4424
4423
|
}
|
|
4425
4424
|
var VIDEO_CLIP_ANIMATION_LABELS = {
|
|
@@ -4480,11 +4479,11 @@ function videoClipLabel(clip, asset, sequence) {
|
|
|
4480
4479
|
if (clip.type === "effect") return `Effect: ${clip.effect}`;
|
|
4481
4480
|
if (clip.type === "adjustment") return `Adjustment${clip.scope === "all" ? " (all tracks)" : clip.scope === "track" ? ` (${clip.targetTrack})` : ""}`;
|
|
4482
4481
|
const base = _nullishCoalesce(_nullishCoalesce(_optionalChain([asset, 'optionalAccess', _145 => _145.name]), () => ( _optionalChain([asset, 'optionalAccess', _146 => _146.src, 'access', _147 => _147.replace, 'call', _148 => _148(/^.*[\\/]/, "")]))), () => ( clip.asset));
|
|
4483
|
-
const speed =
|
|
4482
|
+
const speed = _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, clip);
|
|
4484
4483
|
return speed !== 1 ? `${base} (${Math.round(speed * 100)}%)` : base;
|
|
4485
4484
|
}
|
|
4486
4485
|
function planVideoClipDrag(project, input) {
|
|
4487
|
-
const at =
|
|
4486
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, input.clip);
|
|
4488
4487
|
if (!at) return null;
|
|
4489
4488
|
const { clip, track } = at;
|
|
4490
4489
|
const snap = _nullishCoalesce(input.snap, () => ( ((t) => t)));
|
|
@@ -4501,17 +4500,17 @@ function planVideoClipDrag(project, input) {
|
|
|
4501
4500
|
}
|
|
4502
4501
|
const minimum = 1e3 / project.fps;
|
|
4503
4502
|
if (input.mode === "trim-start") {
|
|
4504
|
-
const to2 = Math.min(snap(Math.max(0, clip.start + input.delta)),
|
|
4503
|
+
const to2 = Math.min(snap(Math.max(0, clip.start + input.delta)), _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip) - minimum);
|
|
4505
4504
|
const changed2 = Math.abs(to2 - clip.start) > 1e-6;
|
|
4506
|
-
const plan = input.ripple ? { start: clip.start, duration: clip.duration - (to2 - clip.start) } : { start: to2, duration:
|
|
4505
|
+
const plan = input.ripple ? { start: clip.start, duration: clip.duration - (to2 - clip.start) } : { start: to2, duration: _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip) - to2 };
|
|
4507
4506
|
return { ...plan, track: track.id, edit: changed2 ? { op: "trim_clip", clip: clip.id, edge: "start", to: to2, ...input.ripple ? { ripple: true } : {} } : null };
|
|
4508
4507
|
}
|
|
4509
|
-
const to = Math.max(snap(
|
|
4510
|
-
const changed = Math.abs(to -
|
|
4508
|
+
const to = Math.max(snap(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip) + input.delta), clip.start + minimum);
|
|
4509
|
+
const changed = Math.abs(to - _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip)) > 1e-6;
|
|
4511
4510
|
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 };
|
|
4512
4511
|
}
|
|
4513
4512
|
function videoDropTracks(project, clipId) {
|
|
4514
|
-
const at =
|
|
4513
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, clipId);
|
|
4515
4514
|
if (!at) return [];
|
|
4516
4515
|
return project.tracks.filter((t) => t.kind === at.track.kind && !t.locked).map((t) => t.id);
|
|
4517
4516
|
}
|
|
@@ -4520,7 +4519,7 @@ function videoDragLabel(edit) {
|
|
|
4520
4519
|
return edit.op === "trim_clip" && edit.ripple ? "Ripple trim" : "Trim clip";
|
|
4521
4520
|
}
|
|
4522
4521
|
function videoAssetDropEdit(project, assetId, options = {}) {
|
|
4523
|
-
const asset =
|
|
4522
|
+
const asset = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project).get(assetId);
|
|
4524
4523
|
if (!asset) return null;
|
|
4525
4524
|
const kind = asset.kind === "audio" ? "audio" : "video";
|
|
4526
4525
|
const track = _nullishCoalesce(options.track, () => ( _optionalChain([project, 'access', _149 => _149.tracks, 'access', _150 => _150.find, 'call', _151 => _151((t) => t.kind === kind && !t.locked), 'optionalAccess', _152 => _152.id])));
|
|
@@ -4572,25 +4571,25 @@ var KEY_LABELS = {
|
|
|
4572
4571
|
scale: { label: "Scale", step: 0.05 },
|
|
4573
4572
|
rotation: { label: "Rotation", step: 1 }
|
|
4574
4573
|
};
|
|
4575
|
-
var animatableOf = (clip, property) =>
|
|
4574
|
+
var animatableOf = (clip, property) => _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([clip, 'access', _153 => _153.transform, 'optionalAccess', _154 => _154[property]]) : property === "volume" ? clip.type === "media" || clip.type === "sequence" ? clip.volume : void 0 : clip.opacity;
|
|
4576
4575
|
var playheadInClip = (clip, time) => Math.round(Math.min(clip.duration, Math.max(0, time - clip.start)));
|
|
4577
4576
|
function videoKeyframeRows(project, clipId, time) {
|
|
4578
|
-
const at =
|
|
4577
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, clipId);
|
|
4579
4578
|
if (!at) return [];
|
|
4580
4579
|
const { clip } = at;
|
|
4581
|
-
const asset = clip.type === "media" ?
|
|
4580
|
+
const asset = clip.type === "media" ? _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project).get(clip.asset) : void 0;
|
|
4582
4581
|
const visual = !(_optionalChain([asset, 'optionalAccess', _155 => _155.kind]) === "audio" || at.track.kind === "audio");
|
|
4583
|
-
const audible = clip.type === "media" &&
|
|
4584
|
-
const properties = [...visual ? ["opacity"] : [], ...audible ? ["volume"] : [], ...visual ?
|
|
4582
|
+
const audible = clip.type === "media" && _chunkZBCT5MEAcjs.videoAssetHasSound.call(void 0, asset) || clip.type === "sequence";
|
|
4583
|
+
const properties = [...visual ? ["opacity"] : [], ...audible ? ["volume"] : [], ...visual ? _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES : []];
|
|
4585
4584
|
const clipTime = playheadInClip(clip, time);
|
|
4586
4585
|
return properties.map((property) => {
|
|
4587
4586
|
const prop = animatableOf(clip, property);
|
|
4588
|
-
const keys =
|
|
4589
|
-
const limits =
|
|
4587
|
+
const keys = _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, prop) ? prop.keys : [];
|
|
4588
|
+
const limits = _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_LIMITS[property];
|
|
4590
4589
|
return {
|
|
4591
4590
|
property,
|
|
4592
4591
|
...KEY_LABELS[property],
|
|
4593
|
-
value: Math.round(
|
|
4592
|
+
value: Math.round(_chunkZBCT5MEAcjs.videoValueAt.call(void 0, prop, clipTime, limits.default) * 1e3) / 1e3,
|
|
4594
4593
|
keyed: keys.length > 0,
|
|
4595
4594
|
keys: keys.length,
|
|
4596
4595
|
onKey: keys.some((k) => Math.abs(k.t - clipTime) < 0.5),
|
|
@@ -4601,44 +4600,44 @@ function videoKeyframeRows(project, clipId, time) {
|
|
|
4601
4600
|
});
|
|
4602
4601
|
}
|
|
4603
4602
|
function plainValueEdit(clip, property, value) {
|
|
4604
|
-
if (!
|
|
4603
|
+
if (!_chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property))
|
|
4605
4604
|
return value === void 0 ? { op: "update_clip", clip: clip.id, remove: [property] } : { op: "update_clip", clip: clip.id, set: { [property]: value } };
|
|
4606
4605
|
const transform = { ...clip.transform, [property]: value };
|
|
4607
4606
|
if (value === void 0) delete transform[property];
|
|
4608
4607
|
return Object.keys(transform).length ? { op: "update_clip", clip: clip.id, set: { transform } } : { op: "update_clip", clip: clip.id, remove: ["transform"] };
|
|
4609
4608
|
}
|
|
4610
4609
|
function videoKeyframeValueEdit(project, clipId, property, time, value) {
|
|
4611
|
-
const at =
|
|
4610
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, clipId);
|
|
4612
4611
|
if (!at) return null;
|
|
4613
4612
|
const prop = animatableOf(at.clip, property);
|
|
4614
|
-
if (!
|
|
4613
|
+
if (!_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, prop)) return plainValueEdit(at.clip, property, value);
|
|
4615
4614
|
if (value === void 0) return null;
|
|
4616
|
-
return { op: "set_keyframes", clip: clipId, property, keys:
|
|
4615
|
+
return { op: "set_keyframes", clip: clipId, property, keys: _chunkZBCT5MEAcjs.setVideoKey.call(void 0, prop, { t: playheadInClip(at.clip, time), v: value }, _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_LIMITS[property].default).keys };
|
|
4617
4616
|
}
|
|
4618
4617
|
function videoKeyframeToggleEdit(project, clipId, property, time) {
|
|
4619
|
-
const at =
|
|
4618
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, clipId);
|
|
4620
4619
|
if (!at) return null;
|
|
4621
4620
|
const prop = animatableOf(at.clip, property);
|
|
4622
4621
|
const t = playheadInClip(at.clip, time);
|
|
4623
|
-
const fallback =
|
|
4624
|
-
if (
|
|
4622
|
+
const fallback = _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_LIMITS[property].default;
|
|
4623
|
+
if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, prop)) {
|
|
4625
4624
|
const key = prop.keys.find((k) => Math.abs(k.t - t) < 0.5);
|
|
4626
4625
|
if (key) {
|
|
4627
|
-
const rest =
|
|
4628
|
-
return
|
|
4626
|
+
const rest = _chunkZBCT5MEAcjs.removeVideoKey.call(void 0, prop, key.t);
|
|
4627
|
+
return _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, rest) ? { op: "set_keyframes", clip: clipId, property, keys: rest.keys } : plainValueEdit(at.clip, property, rest === fallback ? void 0 : rest);
|
|
4629
4628
|
}
|
|
4630
4629
|
}
|
|
4631
|
-
const v =
|
|
4632
|
-
return { op: "set_keyframes", clip: clipId, property, keys:
|
|
4630
|
+
const v = _chunkZBCT5MEAcjs.videoValueAt.call(void 0, prop, t, fallback);
|
|
4631
|
+
return { op: "set_keyframes", clip: clipId, property, keys: _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, prop) ? _chunkZBCT5MEAcjs.setVideoKey.call(void 0, prop, { t, v }, fallback).keys : [{ t, v }] };
|
|
4633
4632
|
}
|
|
4634
4633
|
function videoLutEdits(project, clips, lut) {
|
|
4635
4634
|
const edits = [];
|
|
4636
4635
|
for (const id of clips) {
|
|
4637
|
-
const at =
|
|
4636
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, id);
|
|
4638
4637
|
if (!at) continue;
|
|
4639
4638
|
const { lut: current, ...rest } = _nullishCoalesce(at.clip.grade, () => ( {}));
|
|
4640
4639
|
if (!lut && !current) continue;
|
|
4641
|
-
const grade =
|
|
4640
|
+
const grade = _chunkZBCT5MEAcjs.normalizeVideoGrade.call(void 0, lut ? { ...rest, lut } : rest);
|
|
4642
4641
|
edits.push(grade ? { op: "update_clip", clip: id, set: { grade } } : { op: "update_clip", clip: id, remove: ["grade"] });
|
|
4643
4642
|
}
|
|
4644
4643
|
return edits;
|
|
@@ -4659,7 +4658,7 @@ function videoAddAdjustmentEdits(project, time, options = {}) {
|
|
|
4659
4658
|
const duration = _nullishCoalesce(options.duration, () => ( 3e3));
|
|
4660
4659
|
const start = Math.max(0, time);
|
|
4661
4660
|
const top = project.tracks[0];
|
|
4662
|
-
const free = top && top.kind === "video" && !top.locked && !top.clips.some((c) => c.start < start + duration &&
|
|
4661
|
+
const free = top && top.kind === "video" && !top.locked && !top.clips.some((c) => c.start < start + duration && _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) > start);
|
|
4663
4662
|
const edits = [];
|
|
4664
4663
|
let track = _optionalChain([top, 'optionalAccess', _156 => _156.id]);
|
|
4665
4664
|
if (!free) {
|
|
@@ -4678,7 +4677,7 @@ function videoMaskEdit(clip, mask) {
|
|
|
4678
4677
|
function videoSkinProtectionEdits(project, clips, amount) {
|
|
4679
4678
|
const edits = [];
|
|
4680
4679
|
for (const id of clips) {
|
|
4681
|
-
const clip = _optionalChain([
|
|
4680
|
+
const clip = _optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, id), 'optionalAccess', _157 => _157.clip]);
|
|
4682
4681
|
const lut = _optionalChain([clip, 'optionalAccess', _158 => _158.grade, 'optionalAccess', _159 => _159.lut]);
|
|
4683
4682
|
if (!clip || !lut) continue;
|
|
4684
4683
|
const { preserveSkinTones: _p, ...rest } = lut;
|
|
@@ -4712,7 +4711,7 @@ var RIPPLE = {
|
|
|
4712
4711
|
};
|
|
4713
4712
|
var MODE = {
|
|
4714
4713
|
type: "string",
|
|
4715
|
-
enum: [...
|
|
4714
|
+
enum: [..._chunkZBCT5MEAcjs.VIDEO_PLACEMENT_MODES],
|
|
4716
4715
|
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.'
|
|
4717
4716
|
};
|
|
4718
4717
|
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.` });
|
|
@@ -4729,11 +4728,11 @@ var TRANSFORM = object(
|
|
|
4729
4728
|
);
|
|
4730
4729
|
var TRANSITION = object(
|
|
4731
4730
|
{
|
|
4732
|
-
type: { type: "string", enum:
|
|
4731
|
+
type: { type: "string", enum: _chunkZBCT5MEAcjs.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." },
|
|
4733
4732
|
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." },
|
|
4734
4733
|
color: COLOR("For dip: the colour passed through (default black)"),
|
|
4735
|
-
direction: { type: "string", enum: [...
|
|
4736
|
-
audioCurve: { type: "string", enum: [...
|
|
4734
|
+
direction: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_WIPE_DIRECTIONS], description: "For wipe, push and slide: the way the edge or picture travels (default right, coming in from the left)." },
|
|
4735
|
+
audioCurve: { type: "string", enum: [..._chunkZBCT5MEAcjs.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." }
|
|
4737
4736
|
},
|
|
4738
4737
|
["type", "duration"],
|
|
4739
4738
|
"A transition from the clip that ends where this one starts on the same track."
|
|
@@ -4743,7 +4742,7 @@ var LUT_STRENGTH = { type: "number", minimum: 0, maximum: 1, description: "How m
|
|
|
4743
4742
|
var SKIN = { type: "number", minimum: 0, maximum: 1, description: "How much of the LUT's change to hold back on skin tones, 0 (none, the default) to 1 (skin keeps its colour); 0.5-0.8 keeps faces natural under a heavy look. Applied in the preview and frame renders; ffmpeg's lut3d cannot, so the export notes it." };
|
|
4744
4743
|
var GRADE = object(
|
|
4745
4744
|
{
|
|
4746
|
-
...Object.fromEntries(
|
|
4745
|
+
...Object.fromEntries(_chunkZBCT5MEAcjs.VIDEO_GRADE_CONTROLS.map((c) => [c.key, { type: "number", minimum: c.min, maximum: c.max, description: c.description }])),
|
|
4747
4746
|
lut: object({ src: LUT_SRC, strength: LUT_STRENGTH, name: { type: "string", minLength: 1, description: "A label for the look." }, preserveSkinTones: SKIN }, ["src"], "A 3D LUT applied after the other settings (set_video_lut checks the file first).")
|
|
4748
4747
|
},
|
|
4749
4748
|
[],
|
|
@@ -4751,7 +4750,7 @@ var GRADE = object(
|
|
|
4751
4750
|
);
|
|
4752
4751
|
var ANIMATION = (when) => object(
|
|
4753
4752
|
{
|
|
4754
|
-
effect: { type: "string", enum: [...
|
|
4753
|
+
effect: { type: "string", enum: [..._chunkZBCT5MEAcjs.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." },
|
|
4755
4754
|
duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms (default 500)." }
|
|
4756
4755
|
},
|
|
4757
4756
|
["effect"],
|
|
@@ -4761,11 +4760,11 @@ var CLIP_COMMON = {
|
|
|
4761
4760
|
name: { type: "string", description: "A label for the clip." },
|
|
4762
4761
|
opacity: { type: "number", minimum: 0, maximum: 1, description: "Opacity 0\u20131 (default 1). A number replaces any keyframes; set_video_keyframes animates it." },
|
|
4763
4762
|
transform: TRANSFORM,
|
|
4764
|
-
fit: { type: "string", enum: [...
|
|
4763
|
+
fit: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_FITS], description: "How the picture fits the frame before the transform, as CSS object-fit (default contain for media, fill for colours)." },
|
|
4765
4764
|
grade: GRADE,
|
|
4766
4765
|
animateIn: ANIMATION("How the picture enters, from the clip's start (on top of any fade in). Titles usually rise, pop or fade in."),
|
|
4767
4766
|
animateOut: ANIMATION("How the picture leaves, ending at the clip's end."),
|
|
4768
|
-
blend: { type: "string", enum: [...
|
|
4767
|
+
blend: { type: "string", enum: [..._chunkZBCT5MEAcjs.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." },
|
|
4769
4768
|
fadeIn: MS("Fade up from nothing (picture and sound) over this long"),
|
|
4770
4769
|
fadeOut: MS("Fade down to nothing over this long")
|
|
4771
4770
|
};
|
|
@@ -4774,8 +4773,8 @@ var MEDIA_FIELDS = {
|
|
|
4774
4773
|
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." },
|
|
4775
4774
|
volume: { type: "number", minimum: 0, maximum: 4, description: "Gain (1 = unchanged, default 1). A number replaces any keyframes; set_video_keyframes animates it." },
|
|
4776
4775
|
muted: { type: "boolean", description: "Silence this clip (default false)." },
|
|
4777
|
-
fadeInCurve: { type: "string", enum: [...
|
|
4778
|
-
fadeOutCurve: { type: "string", enum: [...
|
|
4776
|
+
fadeInCurve: { type: "string", enum: [..._chunkZBCT5MEAcjs.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)." },
|
|
4777
|
+
fadeOutCurve: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fade out (default linear), the same choices as fadeInCurve; exponential sounds natural fading to silence." }
|
|
4779
4778
|
};
|
|
4780
4779
|
var TEXT_FIELDS = {
|
|
4781
4780
|
text: { type: "string", minLength: 1, description: `The title's text ("\\n" breaks lines).` },
|
|
@@ -4824,7 +4823,7 @@ var ASSET_FIELDS = {
|
|
|
4824
4823
|
};
|
|
4825
4824
|
var KEY_PROPERTY = {
|
|
4826
4825
|
type: "string",
|
|
4827
|
-
enum: [...
|
|
4826
|
+
enum: [..._chunkZBCT5MEAcjs.VIDEO_KEYFRAME_PROPERTIES],
|
|
4828
4827
|
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)."
|
|
4829
4828
|
};
|
|
4830
4829
|
var KEYS = {
|
|
@@ -4839,7 +4838,7 @@ var KEYS = {
|
|
|
4839
4838
|
ease: {
|
|
4840
4839
|
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.",
|
|
4841
4840
|
anyOf: [
|
|
4842
|
-
{ type: "string", enum: [...
|
|
4841
|
+
{ type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_EASE_NAMES] },
|
|
4843
4842
|
{ type: "array", items: { type: "number" }, minItems: 4, maxItems: 4 }
|
|
4844
4843
|
]
|
|
4845
4844
|
}
|
|
@@ -4868,19 +4867,19 @@ var describeVideoTracks = (tracks) => tracks.map((t, index) => ({
|
|
|
4868
4867
|
...t.locked ? { locked: true } : {},
|
|
4869
4868
|
...t.syncLocked === false ? { syncLocked: false } : {},
|
|
4870
4869
|
...t.volume !== void 0 ? { volume: t.volume } : {},
|
|
4871
|
-
clips:
|
|
4870
|
+
clips: _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, t).map((c) => ({ ...c, end: _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkZBCT5MEAcjs.videoClipSourceRange.call(void 0, c) } : {} }))
|
|
4872
4871
|
}));
|
|
4873
|
-
var videoSequenceUsers = (project, id) =>
|
|
4874
|
-
({ 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:
|
|
4872
|
+
var videoSequenceUsers = (project, id) => _chunkZBCT5MEAcjs.allVideoTracks.call(void 0, project).flatMap(
|
|
4873
|
+
({ 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: _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c), source: _chunkZBCT5MEAcjs.videoClipSourceRange.call(void 0, c) }] : [])
|
|
4875
4874
|
);
|
|
4876
4875
|
function describeVideoSequence(project, sequence, tracks = true) {
|
|
4877
|
-
const cycle =
|
|
4876
|
+
const cycle = _chunkZBCT5MEAcjs.findVideoSequenceCycle.call(void 0, project, sequence.id);
|
|
4878
4877
|
return {
|
|
4879
4878
|
id: sequence.id,
|
|
4880
4879
|
...sequence.name ? { name: sequence.name } : {},
|
|
4881
|
-
duration:
|
|
4880
|
+
duration: _chunkZBCT5MEAcjs.videoSequenceDuration.call(void 0, sequence),
|
|
4882
4881
|
clipCount: sequence.tracks.reduce((n, t) => n + t.clips.length, 0),
|
|
4883
|
-
nests:
|
|
4882
|
+
nests: _chunkZBCT5MEAcjs.videoSequenceChildren.call(void 0, sequence),
|
|
4884
4883
|
usedBy: videoSequenceUsers(project, sequence.id),
|
|
4885
4884
|
...cycle ? { cycle } : {},
|
|
4886
4885
|
...tracks ? { tracks: describeVideoTracks(sequence.tracks) } : { trackCount: sequence.tracks.length }
|
|
@@ -4892,7 +4891,7 @@ function describeVideoProject(project) {
|
|
|
4892
4891
|
width: project.width,
|
|
4893
4892
|
height: project.height,
|
|
4894
4893
|
fps: project.fps,
|
|
4895
|
-
duration:
|
|
4894
|
+
duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, project),
|
|
4896
4895
|
...project.background ? { background: project.background } : {},
|
|
4897
4896
|
assets: project.assets.map(videoAssetOut),
|
|
4898
4897
|
tracks: describeVideoTracks(project.tracks),
|
|
@@ -4909,7 +4908,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4909
4908
|
const project = () => controller.getProject();
|
|
4910
4909
|
const outcome = (result, extra = {}) => {
|
|
4911
4910
|
if (!result.ok) throw new Error(result.error);
|
|
4912
|
-
return { ...extra, duration:
|
|
4911
|
+
return { ...extra, duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, result.project), issues: issueSummary(result.issues) };
|
|
4913
4912
|
};
|
|
4914
4913
|
const apply = (edits, label, extra) => {
|
|
4915
4914
|
const result = controller.apply(edits, label);
|
|
@@ -4918,7 +4917,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4918
4917
|
const clipOut = (p, id) => {
|
|
4919
4918
|
for (const t of p.tracks) {
|
|
4920
4919
|
const c = t.clips.find((x) => x.id === id);
|
|
4921
|
-
if (c) return { track: t.id, ...c, end:
|
|
4920
|
+
if (c) return { track: t.id, ...c, end: _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkZBCT5MEAcjs.videoClipSourceRange.call(void 0, c) } : {} };
|
|
4922
4921
|
}
|
|
4923
4922
|
return null;
|
|
4924
4923
|
};
|
|
@@ -4930,7 +4929,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4930
4929
|
});
|
|
4931
4930
|
const keysOut = (p, clip, property) => {
|
|
4932
4931
|
const c = clipOut(p, clip);
|
|
4933
|
-
const value =
|
|
4932
|
+
const value = _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([c, 'optionalAccess', _168 => _168.transform, 'optionalAccess', _169 => _169[property]]) : _optionalChain([c, 'optionalAccess', _170 => _170[property]]);
|
|
4934
4933
|
return typeof value === "object" ? { keys: value.keys } : { keys: [], value: _nullishCoalesce(value, () => ( null)) };
|
|
4935
4934
|
};
|
|
4936
4935
|
const getProject = {
|
|
@@ -4952,8 +4951,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4952
4951
|
inputSchema: object({ time: MS("Time from the start (default: the playhead)") }),
|
|
4953
4952
|
annotations: { title: "What plays at a moment", ...READ },
|
|
4954
4953
|
handler: ({ time }) => {
|
|
4955
|
-
const frame =
|
|
4956
|
-
return { ...frame, timecode:
|
|
4954
|
+
const frame = _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project(), _nullishCoalesce(time, () => ( controller.getState().time)));
|
|
4955
|
+
return { ...frame, timecode: _chunkZBCT5MEAcjs.formatVideoTimecode.call(void 0, frame.time, project().fps) };
|
|
4957
4956
|
}
|
|
4958
4957
|
};
|
|
4959
4958
|
const listSequences = {
|
|
@@ -4981,7 +4980,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4981
4980
|
annotations: { title: "Find gaps", ...READ },
|
|
4982
4981
|
handler: ({ track }) => {
|
|
4983
4982
|
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(", ")}.`);
|
|
4984
|
-
return { gaps:
|
|
4983
|
+
return { gaps: _chunkZBCT5MEAcjs.findVideoGaps.call(void 0, project(), track) };
|
|
4985
4984
|
}
|
|
4986
4985
|
};
|
|
4987
4986
|
const checkProject = {
|
|
@@ -5011,7 +5010,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5011
5010
|
const lutSrcs = [...new Set(p.tracks.flatMap((t) => t.clips.map((c) => _optionalChain([c, 'access', _171 => _171.grade, 'optionalAccess', _172 => _172.lut, 'optionalAccess', _173 => _173.src])).filter((x) => !!x)))];
|
|
5012
5011
|
const missing = (await Promise.all(lutSrcs.map((src) => controller.luts.load(src).then(() => null, (e) => e.message)))).filter((m) => !!m);
|
|
5013
5012
|
const svgOptions = { lutFor: (src) => controller.luts.peek(src), ...columns ? { columns } : {} };
|
|
5014
|
-
const svg = times ?
|
|
5013
|
+
const svg = times ? _chunkZBCT5MEAcjs.videoContactSheetSvg.call(void 0, p, times, svgOptions) : _chunkZBCT5MEAcjs.videoProjectSvg.call(void 0, p, _nullishCoalesce(time, () => ( controller.getState().time)), svgOptions);
|
|
5015
5014
|
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."] : []];
|
|
5016
5015
|
if (format === "png") {
|
|
5017
5016
|
if (!options.rasterize) throw new Error('This host cannot make PNG images; call render_video_frame with format "svg".');
|
|
@@ -5101,7 +5100,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5101
5100
|
if (play === true) controller.play();
|
|
5102
5101
|
if (play === false) controller.pause();
|
|
5103
5102
|
const state = controller.getState();
|
|
5104
|
-
return { time: state.time, timecode:
|
|
5103
|
+
return { time: state.time, timecode: _chunkZBCT5MEAcjs.formatVideoTimecode.call(void 0, state.time, p.fps), playing: state.playing, clips: state.current };
|
|
5105
5104
|
}
|
|
5106
5105
|
};
|
|
5107
5106
|
const setSettings = {
|
|
@@ -5227,7 +5226,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5227
5226
|
inputSchema: object(
|
|
5228
5227
|
{
|
|
5229
5228
|
clip: CLIP_ID,
|
|
5230
|
-
set: object({ ...CLIP_COMMON, ...MEDIA_FIELDS, asset: { ...ASSET_ID, description: "For media: play another asset (same in point)." }, ...TEXT_FIELDS, color: COLOR("Text colour, or a colour clip's fill"), scope: { type: "string", enum: [...
|
|
5229
|
+
set: object({ ...CLIP_COMMON, ...MEDIA_FIELDS, asset: { ...ASSET_ID, description: "For media: play another asset (same in point)." }, ...TEXT_FIELDS, color: COLOR("Text colour, or a colour clip's fill"), scope: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_ADJUSTMENT_SCOPES], description: "For adjustment clips: which pictures it changes, underneath (default), all or track." }, targetTrack: { ...TRACK_ID, description: 'For adjustment clips with scope "track": the track whose pictures it changes.' } }, [], "Fields to replace (only those that fit the clip's type)."),
|
|
5231
5230
|
remove: { type: "array", items: { type: "string", enum: ["name", "opacity", "transform", "fit", "blend", "grade", "animateIn", "animateOut", "fadeIn", "fadeOut", "fadeInCurve", "fadeOutCurve", "in", "speed", "volume", "muted", "fontSize", "fontFamily", "fontWeight", "background", "scope", "targetTrack"] }, description: 'Fields to reset to their defaults (an adjustment clip going from scope "track" to another scope must also remove targetTrack).' }
|
|
5232
5231
|
},
|
|
5233
5232
|
["clip"]
|
|
@@ -5246,7 +5245,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5246
5245
|
const gradeTargets = (ids) => {
|
|
5247
5246
|
const p = project();
|
|
5248
5247
|
for (const id of ids) {
|
|
5249
|
-
const at =
|
|
5248
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, p, id);
|
|
5250
5249
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
5251
5250
|
const { clip } = at;
|
|
5252
5251
|
if (at.track.kind !== "video" || clip.type === "media" && _optionalChain([p, 'access', _174 => _174.assets, 'access', _175 => _175.find, 'call', _176 => _176((a) => a.id === clip.asset), 'optionalAccess', _177 => _177.kind]) === "audio")
|
|
@@ -5260,7 +5259,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5260
5259
|
inputSchema: object(
|
|
5261
5260
|
{
|
|
5262
5261
|
clips: { type: "array", items: CLIP_ID, minItems: 1, description: "Clips on video tracks to grade." },
|
|
5263
|
-
preset: { type: "string", enum: [...
|
|
5262
|
+
preset: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_GRADE_PRESET_NAMES], description: "The look." },
|
|
5264
5263
|
amount: { type: "number", minimum: 0, maximum: 1, description: "Strength, 0 (none) to 1 (full, the default); 0.5 is a subtler version." }
|
|
5265
5264
|
},
|
|
5266
5265
|
["clips", "preset"]
|
|
@@ -5269,10 +5268,10 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5269
5268
|
handler: ({ clips, preset, amount }) => {
|
|
5270
5269
|
gradeTargets(clips);
|
|
5271
5270
|
const edits = clips.map((clip) => {
|
|
5272
|
-
const grade =
|
|
5271
|
+
const grade = _chunkZBCT5MEAcjs.videoGradeLook.call(void 0, _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), clip).clip.grade, preset, _nullishCoalesce(amount, () => ( 1)));
|
|
5273
5272
|
return grade ? { op: "update_clip", clip, set: { grade } } : { op: "update_clip", clip, remove: ["grade"] };
|
|
5274
5273
|
});
|
|
5275
|
-
return apply(edits, `Apply ${preset} look`, (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([
|
|
5274
|
+
return apply(edits, `Apply ${preset} look`, (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _178 => _178.clip, 'access', _179 => _179.grade]), () => ( null)) })) }));
|
|
5276
5275
|
}
|
|
5277
5276
|
};
|
|
5278
5277
|
const copyGrade = {
|
|
@@ -5283,7 +5282,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5283
5282
|
annotations: { title: "Copy a colour grade", ...WRITE_IDEMPOTENT },
|
|
5284
5283
|
handler: ({ from, to }) => {
|
|
5285
5284
|
gradeTargets([from, ...to]);
|
|
5286
|
-
const grade =
|
|
5285
|
+
const grade = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), from).clip.grade;
|
|
5287
5286
|
const edits = to.map((clip) => grade ? { op: "update_clip", clip, set: { grade: { ...grade } } } : { op: "update_clip", clip, remove: ["grade"] });
|
|
5288
5287
|
return apply(edits, "Copy grade", () => ({ grade: _nullishCoalesce(grade, () => ( null)), clips: to }));
|
|
5289
5288
|
}
|
|
@@ -5309,7 +5308,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5309
5308
|
const lut = await controller.luts.load(src);
|
|
5310
5309
|
const label = _nullishCoalesce(name, () => ( lut.title));
|
|
5311
5310
|
const setting = { src, ...strength !== void 0 && strength !== 1 ? { strength } : {}, ...label ? { name: label } : {}, ...preserve_skin_tones ? { preserveSkinTones: preserve_skin_tones } : {} };
|
|
5312
|
-
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([
|
|
5311
|
+
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([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _180 => _180.clip, 'access', _181 => _181.grade]), () => ( null)) })) }));
|
|
5313
5312
|
}
|
|
5314
5313
|
};
|
|
5315
5314
|
const removeLut = {
|
|
@@ -5321,9 +5320,9 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5321
5320
|
handler: ({ clips }) => {
|
|
5322
5321
|
gradeTargets(clips);
|
|
5323
5322
|
const p = project();
|
|
5324
|
-
const withLut = clips.filter((id) => _optionalChain([
|
|
5323
|
+
const withLut = clips.filter((id) => _optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, p, id), 'access', _182 => _182.clip, 'access', _183 => _183.grade, 'optionalAccess', _184 => _184.lut]));
|
|
5325
5324
|
if (!withLut.length) throw new Error(`None of ${clips.map((c) => `"${c}"`).join(", ")} has a LUT; get_video_project shows each clip's grade.`);
|
|
5326
|
-
return apply(videoLutEdits(p, withLut, null), "Remove LUT", (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([
|
|
5325
|
+
return apply(videoLutEdits(p, withLut, null), "Remove LUT", (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _185 => _185.clip, 'access', _186 => _186.grade]), () => ( null)) })) }));
|
|
5327
5326
|
}
|
|
5328
5327
|
};
|
|
5329
5328
|
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." };
|
|
@@ -5432,7 +5431,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5432
5431
|
approximate: parsed.approximate,
|
|
5433
5432
|
first: list[0],
|
|
5434
5433
|
last: list[list.length - 1],
|
|
5435
|
-
...a.duration !== void 0 && list[list.length - 1].end > a.duration +
|
|
5434
|
+
...a.duration !== void 0 && list[list.length - 1].end > a.duration + _chunkZBCT5MEAcjs.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?` } : {}
|
|
5436
5435
|
}));
|
|
5437
5436
|
}
|
|
5438
5437
|
};
|
|
@@ -5503,22 +5502,22 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5503
5502
|
const bad = ranges.findIndex((r) => !(r.to > r.from));
|
|
5504
5503
|
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".`);
|
|
5505
5504
|
const merged = mergeVideoRanges(ranges);
|
|
5506
|
-
const before =
|
|
5507
|
-
return apply(videoRemoveRangesEdits(merged, tracks), merged.length > 1 ? `Cut ${merged.length} stretches` : "Cut stretch", (r) => ({ removed: merged.length, time: round(before -
|
|
5505
|
+
const before = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, project());
|
|
5506
|
+
return apply(videoRemoveRangesEdits(merged, tracks), merged.length > 1 ? `Cut ${merged.length} stretches` : "Cut stretch", (r) => ({ removed: merged.length, time: round(before - _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, r.project)), duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, r.project) }));
|
|
5508
5507
|
}
|
|
5509
5508
|
};
|
|
5510
5509
|
const rampTarget = (id) => {
|
|
5511
|
-
const at =
|
|
5510
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), id);
|
|
5512
5511
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
5513
5512
|
const { clip } = at;
|
|
5514
5513
|
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.`);
|
|
5515
|
-
if (clip.type !== "media") throw new Error(`Clip "${id}" is a ${
|
|
5514
|
+
if (clip.type !== "media") throw new Error(`Clip "${id}" is a ${_chunkZBCT5MEAcjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to change the speed of; use a video or audio clip.`);
|
|
5516
5515
|
if (_optionalChain([project, 'call', _191 => _191(), 'access', _192 => _192.assets, 'access', _193 => _193.find, 'call', _194 => _194((a) => a.id === clip.asset), 'optionalAccess', _195 => _195.kind]) === "image") throw new Error(`Clip "${id}" is a still, so it has no motion to change the speed of.`);
|
|
5517
5516
|
return clip;
|
|
5518
5517
|
};
|
|
5519
5518
|
const rampOut = (r, id) => {
|
|
5520
5519
|
const outcome2 = r.outcomes[r.outcomes.length - 1];
|
|
5521
|
-
return { clip: clipOut(r.project, id), ...outcome2.rippled ? { rippled: outcome2.rippled } : {}, duration:
|
|
5520
|
+
return { clip: clipOut(r.project, id), ...outcome2.rippled ? { rippled: outcome2.rippled } : {}, duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, r.project) };
|
|
5522
5521
|
};
|
|
5523
5522
|
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." };
|
|
5524
5523
|
const setSpeedRamp = {
|
|
@@ -5549,8 +5548,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5549
5548
|
),
|
|
5550
5549
|
annotations: { title: "Ramp the speed", ...WRITE_IDEMPOTENT },
|
|
5551
5550
|
handler: ({ clip, segments, ripple }) => {
|
|
5552
|
-
const edit =
|
|
5553
|
-
return apply(edit, "Speed ramp", (r) => ({ ...rampOut(r, clip), source: Math.round(
|
|
5551
|
+
const edit = _chunkZBCT5MEAcjs.videoSpeedRampEdit.call(void 0, rampTarget(clip), segments, _nullishCoalesce(ripple, () => ( true)));
|
|
5552
|
+
return apply(edit, "Speed ramp", (r) => ({ ...rampOut(r, clip), source: Math.round(_chunkZBCT5MEAcjs.videoSpeedRampKeys.call(void 0, segments).source) }));
|
|
5554
5553
|
}
|
|
5555
5554
|
};
|
|
5556
5555
|
const addFreeze = {
|
|
@@ -5570,8 +5569,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5570
5569
|
handler: ({ clip, at, duration, ripple }) => {
|
|
5571
5570
|
const c = rampTarget(clip);
|
|
5572
5571
|
const t = at - c.start;
|
|
5573
|
-
if (t < 0 || t > c.duration) throw new Error(`${
|
|
5574
|
-
return apply(
|
|
5572
|
+
if (t < 0 || t > c.duration) throw new Error(`${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, at)} is outside clip "${clip}" (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, c.start)}\u2013${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c))}); pick a time inside it.`);
|
|
5573
|
+
return apply(_chunkZBCT5MEAcjs.videoFreezeFrameEdit.call(void 0, c, t, duration, _nullishCoalesce(ripple, () => ( true))), "Freeze frame", (r) => rampOut(r, clip));
|
|
5575
5574
|
}
|
|
5576
5575
|
};
|
|
5577
5576
|
const removeRamp = {
|
|
@@ -5744,7 +5743,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5744
5743
|
let from;
|
|
5745
5744
|
let to;
|
|
5746
5745
|
if (args.clip !== void 0) {
|
|
5747
|
-
const found =
|
|
5746
|
+
const found = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, p, args.clip);
|
|
5748
5747
|
if (!found) throw new Error(`There is no clip "${args.clip}"; get_video_project lists the clips.`);
|
|
5749
5748
|
const c = found.clip;
|
|
5750
5749
|
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).`);
|
|
@@ -5754,7 +5753,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5754
5753
|
toSource = (t) => (_nullishCoalesce(c.in, () => ( 0))) + (t - c.start) * speed;
|
|
5755
5754
|
toOut = (s) => c.start + (s - (_nullishCoalesce(c.in, () => ( 0)))) / speed;
|
|
5756
5755
|
from = Math.max(c.start, _nullishCoalesce(args.from, () => ( c.start)));
|
|
5757
|
-
to = Math.min(
|
|
5756
|
+
to = Math.min(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c), _nullishCoalesce(args.to, () => ( _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c))));
|
|
5758
5757
|
} else {
|
|
5759
5758
|
asset = p.assets.find((a) => a.id === args.asset);
|
|
5760
5759
|
if (!asset) throw new Error(`There is no asset "${args.asset}"; the assets are ${p.assets.map((a) => `"${a.id}"`).join(", ") || "none"}.`);
|
|
@@ -5835,15 +5834,15 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5835
5834
|
annotations: { title: "Measure a frame with scopes", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
5836
5835
|
handler: async ({ time, bins, columns }) => {
|
|
5837
5836
|
const p = project();
|
|
5838
|
-
const end =
|
|
5837
|
+
const end = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, p);
|
|
5839
5838
|
const t = _nullishCoalesce(time, () => ( controller.getState().time));
|
|
5840
5839
|
if (time !== void 0 && time > end) throw new Error(`Time ${time} ms is past the end of the project (${end} ms).`);
|
|
5841
5840
|
const pixels = await pixelsAt(t);
|
|
5842
|
-
return { time: t, timecode:
|
|
5841
|
+
return { time: t, timecode: _chunkZBCT5MEAcjs.formatVideoTimecode.call(void 0, t, p.fps), width: pixels.width, height: pixels.height, ...summarizeVideoScopes(pixels, { bins, columns }) };
|
|
5843
5842
|
}
|
|
5844
5843
|
};
|
|
5845
5844
|
const MASK_FIELDS = {
|
|
5846
|
-
shape: { type: "string", enum: [...
|
|
5845
|
+
shape: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_MASK_SHAPES], description: "rectangle (with corner_radius), ellipse, linear (a straight split: the side above the line at rotation 0 shows) or polygon (points)." },
|
|
5847
5846
|
x: { type: "number", description: "Centre across the clip's picture, 0 (left edge) to 1 (right edge); default 0.5." },
|
|
5848
5847
|
y: { type: "number", description: "Centre down the clip's picture, 0 (top) to 1 (bottom); default 0.5." },
|
|
5849
5848
|
width: { type: "number", minimum: 0, description: "Width as a fraction of the picture's width (default 0.5). Unused by linear." },
|
|
@@ -5863,10 +5862,10 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5863
5862
|
track: { ...TRACK_ID, description: 'A video track to put it on; tracks below it are "underneath".' },
|
|
5864
5863
|
start: MS("Where it starts on the timeline (default: the end of the track)"),
|
|
5865
5864
|
duration: { type: "number", exclusiveMinimum: 0, description: "How long it lasts, in ms (default 3000)." },
|
|
5866
|
-
scope: { type: "string", enum: [...
|
|
5865
|
+
scope: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_ADJUSTMENT_SCOPES], description: "Which pictures it changes: underneath (default), all or track." },
|
|
5867
5866
|
target_track: { ...TRACK_ID, description: 'For scope "track" (required then): the track whose pictures it changes.' },
|
|
5868
5867
|
grade: GRADE,
|
|
5869
|
-
preset: { type: "string", enum: [...
|
|
5868
|
+
preset: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_GRADE_PRESET_NAMES], description: "A named look to start from (grade settings given override it)." },
|
|
5870
5869
|
amount: { type: "number", minimum: 0, maximum: 1, description: "Strength of the preset, 0\u20131 (default 1)." },
|
|
5871
5870
|
name: { type: "string", minLength: 1, description: 'A label for the clip (e.g. "Night look").' },
|
|
5872
5871
|
id: { type: "string", minLength: 1, description: 'Your own id for the clip (default: a fresh one such as "c7").' },
|
|
@@ -5880,13 +5879,13 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5880
5879
|
if (t && t.kind !== "video") throw new Error(`Track "${track}" is an audio track; adjustment clips change pictures, so put it on a video track.`);
|
|
5881
5880
|
if (scope === "track" && !target_track) throw new Error('Scope "track" needs target_track: the id of the track whose pictures it changes.');
|
|
5882
5881
|
if (target_track !== void 0 && scope !== "track") throw new Error('target_track is only for scope "track"; leave it out or set scope to "track".');
|
|
5883
|
-
const look = { ...preset ?
|
|
5882
|
+
const look = { ...preset ? _chunkZBCT5MEAcjs.videoGradePreset.call(void 0, preset, _nullishCoalesce(amount, () => ( 1))) : {}, ..._nullishCoalesce(grade, () => ( {})) };
|
|
5884
5883
|
const clip = { type: "adjustment", ...id ? { id } : {}, ...name ? { name } : {}, ...start !== void 0 ? { start } : {}, duration: _nullishCoalesce(duration, () => ( 3e3)), ...scope ? { scope } : {}, ...target_track ? { targetTrack: target_track } : {}, ...Object.keys(look).length ? { grade: look } : {} };
|
|
5885
5884
|
return apply({ op: "add_clip", track, clip, mode }, "Add adjustment clip", (r) => ({ clip: clipOut(r.project, r.outcomes[0].clip), ...placed(r.outcomes[0]), ...Object.keys(look).length ? {} : { hint: "It changes nothing yet: give it a grade (update_video_clip), effects (apply_effect) or a mask." } }));
|
|
5886
5885
|
}
|
|
5887
5886
|
};
|
|
5888
5887
|
const maskTarget = (id) => {
|
|
5889
|
-
const at =
|
|
5888
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), id);
|
|
5890
5889
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
5891
5890
|
if (at.track.kind !== "video") throw new Error(`Clip "${id}" is on audio track "${at.track.id}"; masks cut pictures, so pass a clip on a video track.`);
|
|
5892
5891
|
return at;
|
|
@@ -5928,13 +5927,13 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5928
5927
|
gradeTargets(clips);
|
|
5929
5928
|
const edits = [];
|
|
5930
5929
|
for (const id of clips) {
|
|
5931
|
-
const clip =
|
|
5930
|
+
const clip = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), id).clip;
|
|
5932
5931
|
const lut = _optionalChain([clip, 'access', _196 => _196.grade, 'optionalAccess', _197 => _197.lut]);
|
|
5933
5932
|
if (!lut) throw new Error(`Clip "${id}" has no LUT to protect skin from; add one with set_video_lut first.`);
|
|
5934
5933
|
const { preserveSkinTones: _p, ...rest } = lut;
|
|
5935
5934
|
edits.push({ op: "update_clip", clip: id, set: { grade: { ...clip.grade, lut: amount > 0 ? { ...rest, preserveSkinTones: amount } : rest } } });
|
|
5936
5935
|
}
|
|
5937
|
-
return apply(edits, amount > 0 ? "Protect skin tones" : "Stop protecting skin tones", (r) => ({ clips: clips.map((id) => ({ id, lut: _nullishCoalesce(_optionalChain([
|
|
5936
|
+
return apply(edits, amount > 0 ? "Protect skin tones" : "Stop protecting skin tones", (r) => ({ clips: clips.map((id) => ({ id, lut: _nullishCoalesce(_optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _198 => _198.clip, 'access', _199 => _199.grade, 'optionalAccess', _200 => _200.lut]), () => ( null)) })) }));
|
|
5938
5937
|
}
|
|
5939
5938
|
};
|
|
5940
5939
|
const planOut = (plan) => ({
|
|
@@ -5987,7 +5986,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5987
5986
|
handler: ({ plan }) => {
|
|
5988
5987
|
const r = controller.applyPlan(plan);
|
|
5989
5988
|
if (!r.ok) throw new Error(r.error);
|
|
5990
|
-
return { plan: r.plan.id, title: r.plan.title, stale: r.stale, outcomes: r.outcomes, duration:
|
|
5989
|
+
return { plan: r.plan.id, title: r.plan.title, stale: r.stale, outcomes: r.outcomes, duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, r.project), issues: issueSummary(r.issues) };
|
|
5991
5990
|
}
|
|
5992
5991
|
};
|
|
5993
5992
|
const discardPlan = {
|
|
@@ -6075,7 +6074,7 @@ function videoCameraMoveTools(controller, ctx) {
|
|
|
6075
6074
|
clip: { type: "string", minLength: 1, description: "A clip id with a picture, from get_video_project." },
|
|
6076
6075
|
role: ROLE,
|
|
6077
6076
|
move: { type: "string", minLength: 1, description: "A camera move id of that role from list_video_camera_moves." },
|
|
6078
|
-
ms: { type: "number", minimum: 0, maximum:
|
|
6077
|
+
ms: { type: "number", minimum: 0, maximum: _chunkISIO63Q5cjs.CAMERA_MOVE_MAX_MS, description: `How long a transition takes, ms (default the move's durationMs; at most the clip's length). Not for a hold, which plays across the rest of the clip.` },
|
|
6079
6078
|
preset: { type: "string", minLength: 1, description: "A preset of the move by name, from describe_effect." },
|
|
6080
6079
|
values: ctx.valuesSchema("Control values over the move's defaults (and the preset's), from describe_effect"),
|
|
6081
6080
|
from: FRAMING("Where a transition starts."),
|
|
@@ -6125,7 +6124,7 @@ var KEYS2 = {
|
|
|
6125
6124
|
properties: {
|
|
6126
6125
|
t: { type: "number", description: "Clip-relative time in ms (0 = the clip's start)." },
|
|
6127
6126
|
v: { type: "number", description: "The control's value at t, within its range from describe_effect." },
|
|
6128
|
-
ease: { anyOf: [{ type: "string", enum: [...
|
|
6127
|
+
ease: { anyOf: [{ type: "string", enum: [..._chunkZBCT5MEAcjs.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]." }
|
|
6129
6128
|
},
|
|
6130
6129
|
required: ["t", "v"],
|
|
6131
6130
|
additionalProperties: false
|
|
@@ -6139,7 +6138,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
6139
6138
|
return controller.readOnlyReason();
|
|
6140
6139
|
};
|
|
6141
6140
|
const clipOf = (id) => {
|
|
6142
|
-
const at =
|
|
6141
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, controller.getProject(), id);
|
|
6143
6142
|
if (!at) {
|
|
6144
6143
|
const ids = controller.getProject().tracks.flatMap((t) => t.clips.map((c) => c.id));
|
|
6145
6144
|
throw new Error(`There is no clip "${id}"; the clips are ${ids.map((c) => `"${c}"`).join(", ") || "none"} (get_video_project lists them).`);
|
|
@@ -6152,7 +6151,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
6152
6151
|
const effect = _nullishCoalesce(effects.find((e) => e.id === (_nullishCoalesce(instance, () => ( _optionalChain([r, 'access', _205 => _205.effect, 'optionalAccess', _206 => _206.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])));
|
|
6153
6152
|
return { target, effect, effects, ...extra };
|
|
6154
6153
|
};
|
|
6155
|
-
return withVideoPlayback(
|
|
6154
|
+
return withVideoPlayback(_chunkISIO63Q5cjs.createEffectToolProvider.call(void 0, {
|
|
6156
6155
|
id: _nullishCoalesce(options.id, () => ( "video-effects")),
|
|
6157
6156
|
namespace: options.namespace,
|
|
6158
6157
|
title: "Video effects",
|
|
@@ -6198,7 +6197,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
6198
6197
|
subscribe: (notify) => controller.subscribe(() => notify()),
|
|
6199
6198
|
extraTools: (ctx) => [
|
|
6200
6199
|
...videoCameraMoveTools(controller, ctx),
|
|
6201
|
-
...
|
|
6200
|
+
..._chunkZ3BRH4JKcjs.effectTemplateTools.call(void 0,
|
|
6202
6201
|
{
|
|
6203
6202
|
provider: () => controller.effectsProvider,
|
|
6204
6203
|
fillDetails: `It goes on the timeline at "at" (default the end of the project), on new tracks above the others: each shot's bottom layer on a base track (with the shot's transition), other layers as effect, picture and text clips on tracks by role, titles and captions as text clips; an open subject slot becomes a grey placeholder clip named after it. Camera moves are not carried over. Returns { template, tracks, clips, assets, start, end (ms), placeholders (clip ids by open slot), openSlots, notes }. To fill an open slot, add the picture with add_video_asset and put it on the placeholder's track at its start with add_video_clip in overwrite mode.`,
|
|
@@ -6225,7 +6224,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
6225
6224
|
duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms (default: the effect's own length, else 5000)." },
|
|
6226
6225
|
values: ctx.valuesSchema("Control values over the effect's defaults", true),
|
|
6227
6226
|
name: { type: "string", minLength: 1, description: "A label for the clip (default: the effect's name)." },
|
|
6228
|
-
mode: { type: "string", enum: [...
|
|
6227
|
+
mode: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_PLACEMENT_MODES], description: "What to do with clips already there: refuse (default), overwrite or insert." }
|
|
6229
6228
|
},
|
|
6230
6229
|
required: ["track", "effect"],
|
|
6231
6230
|
additionalProperties: false
|
|
@@ -6326,7 +6325,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
6326
6325
|
const clip = clipOf(args.clip);
|
|
6327
6326
|
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).`);
|
|
6328
6327
|
const was = _optionalChain([clip, 'access', _207 => _207.values, 'optionalAccess', _208 => _208[args.control]]);
|
|
6329
|
-
const plain = keys === null ?
|
|
6328
|
+
const plain = keys === null ? _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, was) ? _optionalChain([was, 'access', _209 => _209.keys, 'access', _210 => _210[0], 'optionalAccess', _211 => _211.v]) : was : { keys: [...keys].sort((a, b) => a.t - b.t) };
|
|
6330
6329
|
if (plain === void 0) throw new Error(`"${args.control}" has no value to keep; give keys instead.`);
|
|
6331
6330
|
r = await controller.updateEffectValues(args.clip, "generator", { [args.control]: plain });
|
|
6332
6331
|
} else r = await controller.setClipEffectKeyframes(args.clip, args.effect, args.control, keys);
|
|
@@ -6404,7 +6403,7 @@ function createVideoDialogueToolProvider(controller, options = {}) {
|
|
|
6404
6403
|
const r = controller.proposePlan({ title, description: "Cuts fillers, long pauses and stutters found in the transcript, closing up every sync-locked track.", edits: videoRemoveRangesEdits(cuts), ranges: cuts.map((d) => ({ from: d.from, to: d.to, text: d.text, reason: d.kind })), source: "plan_video_dialogue_cleanup" });
|
|
6405
6404
|
if (!r.ok) throw new Error(r.error);
|
|
6406
6405
|
const p = r.plan;
|
|
6407
|
-
return { plan: { id: p.id, title: p.title, summary: p.summary, text: describeVideoEditPlan(p), cuts: cuts.length }, durationNow:
|
|
6406
|
+
return { plan: { id: p.id, title: p.title, summary: p.summary, text: describeVideoEditPlan(p), cuts: cuts.length }, durationNow: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, controller.getProject()), hint: `Nothing changed yet. Show the user the plan, then call apply_video_edit_plan with plan "${p.id}" (or discard_video_edit_plan).` };
|
|
6408
6407
|
}
|
|
6409
6408
|
};
|
|
6410
6409
|
return withVideoPlayback(
|
|
@@ -6451,7 +6450,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6451
6450
|
};
|
|
6452
6451
|
const project = () => controller.getProject();
|
|
6453
6452
|
const soundClip = (p, id) => {
|
|
6454
|
-
const at =
|
|
6453
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, p, id);
|
|
6455
6454
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
6456
6455
|
const c = at.clip;
|
|
6457
6456
|
if (c.type !== "media") throw new Error(`Clip "${id}" is a ${c.type} clip and has no sound of its own; pass a video or audio clip.`);
|
|
@@ -6467,8 +6466,8 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6467
6466
|
const { clip, asset: asset2 } = soundClip(p, args.clip);
|
|
6468
6467
|
const speed = _nullishCoalesce(clip.speed, () => ( 1));
|
|
6469
6468
|
const from2 = Math.max(clip.start, _nullishCoalesce(args.from, () => ( clip.start)));
|
|
6470
|
-
const to2 = Math.min(
|
|
6471
|
-
if (!(to2 > from2)) throw new Error(`The stretch is empty (${from2}\u2013${to2} ms); "from" and "to" must be inside the clip (${clip.start}\u2013${
|
|
6469
|
+
const to2 = Math.min(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip), _nullishCoalesce(args.to, () => ( _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip))));
|
|
6470
|
+
if (!(to2 > from2)) throw new Error(`The stretch is empty (${from2}\u2013${to2} ms); "from" and "to" must be inside the clip (${clip.start}\u2013${_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip)} ms) with "to" after "from".`);
|
|
6472
6471
|
return { asset: asset2, from: (_nullishCoalesce(clip.in, () => ( 0))) + (from2 - clip.start) * speed, to: (_nullishCoalesce(clip.in, () => ( 0))) + (to2 - clip.start) * speed, out: (s) => clip.start + (s - (_nullishCoalesce(clip.in, () => ( 0)))) / speed };
|
|
6473
6472
|
}
|
|
6474
6473
|
const asset = p.assets.find((a) => a.id === args.asset);
|
|
@@ -6510,7 +6509,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6510
6509
|
handler: async ({ clips, target, ceiling, replace }) => {
|
|
6511
6510
|
const p = project();
|
|
6512
6511
|
const targets = clips.map((id) => soundClip(p, id));
|
|
6513
|
-
for (const t of targets) if (
|
|
6512
|
+
for (const t of targets) if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, t.clip.volume) && !replace) throw new Error(`Clip "${t.clip.id}" has volume keyframes, which a constant gain would replace; pass replace: true, or remove them first.`);
|
|
6514
6513
|
const results = [];
|
|
6515
6514
|
const edits = [];
|
|
6516
6515
|
for (const { clip, asset } of targets) {
|
|
@@ -6555,7 +6554,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6555
6554
|
handler: async (args) => {
|
|
6556
6555
|
const p = project();
|
|
6557
6556
|
const music = args.music.map((id) => soundClip(p, id));
|
|
6558
|
-
for (const m of music) if (
|
|
6557
|
+
for (const m of music) if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, m.clip.volume) && !args.replace) throw new Error(`Music clip "${m.clip.id}" already has volume keyframes; pass replace: true to replace them, or remove them first.`);
|
|
6559
6558
|
const transcriptTrack = videoTranscriptTrack(p, args.dialogue_track);
|
|
6560
6559
|
const mode = _nullishCoalesce(args.speech, () => ( (transcriptTrack && videoTimelineTranscript(p, { track: transcriptTrack }).length ? "transcript" : "audio")));
|
|
6561
6560
|
let ranges = [];
|
|
@@ -6568,7 +6567,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6568
6567
|
const track = p.tracks.find((t) => t.id === args.dialogue_track);
|
|
6569
6568
|
if (!track) throw new Error(`There is no track "${args.dialogue_track}".`);
|
|
6570
6569
|
const musicIds = new Set(music.map((m) => m.clip.id));
|
|
6571
|
-
for (const c of
|
|
6570
|
+
for (const c of _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track)) {
|
|
6572
6571
|
if (c.type !== "media" || musicIds.has(c.id)) continue;
|
|
6573
6572
|
const asset = p.assets.find((a) => a.id === c.asset);
|
|
6574
6573
|
if (!asset || asset.kind === "image" || asset.hasAudio === false) continue;
|
|
@@ -6579,10 +6578,10 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6579
6578
|
let at = c.start;
|
|
6580
6579
|
for (const s of silences) {
|
|
6581
6580
|
const a = c.start + (s.start - src0) / speed;
|
|
6582
|
-
if (a - at >
|
|
6581
|
+
if (a - at > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: a });
|
|
6583
6582
|
at = c.start + (s.end - src0) / speed;
|
|
6584
6583
|
}
|
|
6585
|
-
if (
|
|
6584
|
+
if (_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) - at > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) });
|
|
6586
6585
|
}
|
|
6587
6586
|
if (!ranges.length) throw new Error(`Track "${args.dialogue_track}" has no sound above -40 dBFS, so there is no speech to duck under.`);
|
|
6588
6587
|
}
|
|
@@ -6645,7 +6644,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6645
6644
|
if (!beats.length) throw new Error(`No beats were found in "${args.music}"; try a lower sensitivity, or pass beats.`);
|
|
6646
6645
|
} else beats = [...args.beats].sort((a, b) => a - b);
|
|
6647
6646
|
const tolerance = _nullishCoalesce(args.tolerance, () => ( 150));
|
|
6648
|
-
const clips =
|
|
6647
|
+
const clips = _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track);
|
|
6649
6648
|
const edits = [];
|
|
6650
6649
|
const ranges = [];
|
|
6651
6650
|
const skipped = [];
|
|
@@ -6653,8 +6652,8 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6653
6652
|
for (let i = 0; i + 1 < clips.length; i++) {
|
|
6654
6653
|
const left = clips[i];
|
|
6655
6654
|
const right = clips[i + 1];
|
|
6656
|
-
const cut =
|
|
6657
|
-
if (Math.abs(right.start - cut) >
|
|
6655
|
+
const cut = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, left);
|
|
6656
|
+
if (Math.abs(right.start - cut) > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) continue;
|
|
6658
6657
|
const beat = nearestVideoBeat(beats, cut, tolerance);
|
|
6659
6658
|
if (beat === null) {
|
|
6660
6659
|
skipped.push({ cut: round4(cut), reason: `no beat within ${tolerance} ms` });
|
|
@@ -6729,7 +6728,7 @@ function videoClipEffectDocument(clip, instance, providerId) {
|
|
|
6729
6728
|
const values = {};
|
|
6730
6729
|
const tracks = {};
|
|
6731
6730
|
for (const [control, v] of Object.entries(_nullishCoalesce(effect.values, () => ( {})))) {
|
|
6732
|
-
if (
|
|
6731
|
+
if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, v)) {
|
|
6733
6732
|
values[control] = v.keys[0].v;
|
|
6734
6733
|
tracks[control] = v.keys.map((k) => ({ time: k.t, value: k.v, ...k.ease && k.ease !== "linear" ? { easing: videoEaseToAnimationEasing(k.ease) } : {} }));
|
|
6735
6734
|
} else values[control] = v;
|
|
@@ -6770,10 +6769,10 @@ function videoEffectValuesFromDocument(doc) {
|
|
|
6770
6769
|
async function openVideoClipEffectAuthoring(controller, clip, instance, options = {}) {
|
|
6771
6770
|
const provider = controller.effectsProvider;
|
|
6772
6771
|
if (!provider) throw new Error("No effects provider is registered, so the effect cannot be opened for authoring; register one with setEffectsProvider.");
|
|
6773
|
-
const at =
|
|
6772
|
+
const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, controller.getProject(), clip);
|
|
6774
6773
|
if (!at) throw new Error(`There is no clip "${clip}".`);
|
|
6775
6774
|
const doc = videoClipEffectDocument(at.clip, instance, provider.id);
|
|
6776
|
-
const session = await
|
|
6775
|
+
const session = await _chunkQKXO6JPPcjs.createEffectAuthoringSession.call(void 0, { document: doc }, { ...options, provider });
|
|
6777
6776
|
return {
|
|
6778
6777
|
clip,
|
|
6779
6778
|
instance,
|
|
@@ -7127,4 +7126,4 @@ function createVideoEditorDocument(controller) {
|
|
|
7127
7126
|
|
|
7128
7127
|
|
|
7129
7128
|
|
|
7130
|
-
exports.TranscriptVideoController = TranscriptVideoController; exports.VIDEO_ADJUSTMENT_SCOPES = _chunkXNZFVYC2cjs.VIDEO_ADJUSTMENT_SCOPES; exports.VIDEO_ADJUSTMENT_SCOPE_LABELS = VIDEO_ADJUSTMENT_SCOPE_LABELS; exports.VIDEO_BLEND_MODES = _chunkXNZFVYC2cjs.VIDEO_BLEND_MODES; exports.VIDEO_BLEND_MODE_LABELS = VIDEO_BLEND_MODE_LABELS; exports.VIDEO_CLIP_ANIMATION_DURATION = _chunkXNZFVYC2cjs.VIDEO_CLIP_ANIMATION_DURATION; exports.VIDEO_CLIP_ANIMATION_EFFECTS = _chunkXNZFVYC2cjs.VIDEO_CLIP_ANIMATION_EFFECTS; exports.VIDEO_CLIP_ANIMATION_LABELS = VIDEO_CLIP_ANIMATION_LABELS; exports.VIDEO_CLIP_TYPES = _chunkXNZFVYC2cjs.VIDEO_CLIP_TYPES; exports.VIDEO_DEFAULT_FILLERS = VIDEO_DEFAULT_FILLERS; exports.VIDEO_DEFAULT_STILL_DURATION = VIDEO_DEFAULT_STILL_DURATION; exports.VIDEO_DEFAULT_TITLE_DURATION = VIDEO_DEFAULT_TITLE_DURATION; exports.VIDEO_DISFLUENCY_KINDS = VIDEO_DISFLUENCY_KINDS; exports.VIDEO_EASE_NAMES = _chunkXNZFVYC2cjs.VIDEO_EASE_NAMES; exports.VIDEO_EDIT_OPS = VIDEO_EDIT_OPS; exports.VIDEO_EFFECT_PLACES = _chunkXNZFVYC2cjs.VIDEO_EFFECT_PLACES; exports.VIDEO_FADE_CURVES = _chunkXNZFVYC2cjs.VIDEO_FADE_CURVES; exports.VIDEO_FADE_CURVE_LABELS = VIDEO_FADE_CURVE_LABELS; exports.VIDEO_FITS = _chunkXNZFVYC2cjs.VIDEO_FITS; exports.VIDEO_GRADE_CONTROLS = _chunkXNZFVYC2cjs.VIDEO_GRADE_CONTROLS; exports.VIDEO_GRADE_PRESETS = _chunkXNZFVYC2cjs.VIDEO_GRADE_PRESETS; exports.VIDEO_GRADE_PRESET_NAMES = _chunkXNZFVYC2cjs.VIDEO_GRADE_PRESET_NAMES; exports.VIDEO_ISSUE_CODES = VIDEO_ISSUE_CODES; exports.VIDEO_KEYFRAME_LIMITS = _chunkXNZFVYC2cjs.VIDEO_KEYFRAME_LIMITS; exports.VIDEO_KEYFRAME_PROPERTIES = _chunkXNZFVYC2cjs.VIDEO_KEYFRAME_PROPERTIES; exports.VIDEO_LOUDNESS_HOP = VIDEO_LOUDNESS_HOP; exports.VIDEO_LUT_MAX_SIZE = _chunkXNZFVYC2cjs.VIDEO_LUT_MAX_SIZE; exports.VIDEO_MASK_DEFAULTS = _chunkXNZFVYC2cjs.VIDEO_MASK_DEFAULTS; exports.VIDEO_MASK_SHAPES = _chunkXNZFVYC2cjs.VIDEO_MASK_SHAPES; exports.VIDEO_MASK_SHAPE_LABELS = VIDEO_MASK_SHAPE_LABELS; exports.VIDEO_PEAK_BLOCK = VIDEO_PEAK_BLOCK; exports.VIDEO_PLACEMENT_MODES = _chunkXNZFVYC2cjs.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 = _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON; exports.VIDEO_TRANSFORM_PROPERTIES = _chunkXNZFVYC2cjs.VIDEO_TRANSFORM_PROPERTIES; exports.VIDEO_TRANSITION_LABELS = VIDEO_TRANSITION_LABELS; exports.VIDEO_TRANSITION_TYPES = _chunkXNZFVYC2cjs.VIDEO_TRANSITION_TYPES; exports.VIDEO_VECTORSCOPE_TARGETS = VIDEO_VECTORSCOPE_TARGETS; exports.VIDEO_WIPE_DIRECTIONS = _chunkXNZFVYC2cjs.VIDEO_WIPE_DIRECTIONS; exports.VideoAudioPeaksCache = VideoAudioPeaksCache; exports.VideoEditorController = VideoEditorController; exports.VideoEffectsEngine = _chunkXNZFVYC2cjs.VideoEffectsEngine; exports.VideoFrameCache = VideoFrameCache; exports.VideoLutCache = _chunkXNZFVYC2cjs.VideoLutCache; exports.VideoPathGesture = VideoPathGesture; exports.VideoPreviewEngine = VideoPreviewEngine; exports.VideoPreviewPixels = VideoPreviewPixels; exports.allVideoClipIds = _chunkXNZFVYC2cjs.allVideoClipIds; exports.allVideoTracks = _chunkXNZFVYC2cjs.allVideoTracks; exports.animationEasingToVideoEase = animationEasingToVideoEase; exports.applyVideoEdits = applyVideoEdits; exports.applyVideoGrade = _chunkXNZFVYC2cjs.applyVideoGrade; exports.applyVideoLut = _chunkXNZFVYC2cjs.applyVideoLut; exports.applyVideoLutToPixels = _chunkXNZFVYC2cjs.applyVideoLutToPixels; exports.bakeVideoClipCamera = bakeVideoClipCamera; exports.buildVideoAudioPeaks = buildVideoAudioPeaks; exports.checkVideoEffectPlace = _chunkXNZFVYC2cjs.checkVideoEffectPlace; exports.checkVideoEffectValues = _chunkXNZFVYC2cjs.checkVideoEffectValues; exports.checkVideoProject = checkVideoProject; exports.checkVideoTimeRemap = _chunkXNZFVYC2cjs.checkVideoTimeRemap; exports.createVideoDialogueToolProvider = createVideoDialogueToolProvider; exports.createVideoEditorDocument = createVideoEditorDocument; exports.createVideoEditorToolProvider = createVideoEditorToolProvider; exports.createVideoEffectsToolProvider = createVideoEffectsToolProvider; exports.createVideoElementDecoder = createVideoElementDecoder; exports.createVideoMusicToolProvider = createVideoMusicToolProvider; exports.createVideoProject = createVideoProject; exports.decodeVideoAudioPeaks = decodeVideoAudioPeaks; exports.describeVideoEditPlan = describeVideoEditPlan; exports.describeVideoProject = describeVideoProject; exports.describeVideoSequence = describeVideoSequence; exports.detectVideoDisfluencies = detectVideoDisfluencies; exports.diffVideoProjects = diffVideoProjects; exports.drawVideoFrame = _chunkXNZFVYC2cjs.drawVideoFrame; exports.ffmpegFilterValue = _chunkXNZFVYC2cjs.ffmpegFilterValue; exports.findVideoAudioBeats = findVideoAudioBeats; exports.findVideoAudioSilences = findVideoAudioSilences; exports.findVideoClip = _chunkXNZFVYC2cjs.findVideoClip; exports.findVideoFillers = findVideoFillers; exports.findVideoGaps = _chunkXNZFVYC2cjs.findVideoGaps; exports.findVideoRepetitions = findVideoRepetitions; exports.findVideoSequenceClip = _chunkXNZFVYC2cjs.findVideoSequenceClip; exports.findVideoSequenceCycle = _chunkXNZFVYC2cjs.findVideoSequenceCycle; exports.findVideoTranscriptPauses = findVideoTranscriptPauses; exports.findVideoTranscriptText = findVideoTranscriptText; exports.formatVideoSeconds = _chunkXNZFVYC2cjs.formatVideoSeconds; exports.formatVideoTimecode = _chunkXNZFVYC2cjs.formatVideoTimecode; exports.formatVideoTimecodeFrames = _chunkXNZFVYC2cjs.formatVideoTimecodeFrames; exports.framePointsToPicture = framePointsToPicture; exports.isVideoDropFrameRate = _chunkXNZFVYC2cjs.isVideoDropFrameRate; exports.isVideoKeyframes = _chunkXNZFVYC2cjs.isVideoKeyframes; exports.measureVideoLoudness = measureVideoLoudness; exports.mergeVideoRanges = mergeVideoRanges; exports.mixEffectPixels = _chunkXNZFVYC2cjs.mixEffectPixels; exports.nearestVideoBeat = nearestVideoBeat; exports.nextFreeVideoSlot = _chunkXNZFVYC2cjs.nextFreeVideoSlot; exports.normalizeVideoClipMask = _chunkXNZFVYC2cjs.normalizeVideoClipMask; exports.normalizeVideoGrade = _chunkXNZFVYC2cjs.normalizeVideoGrade; exports.normalizeVideoGradeLut = _chunkXNZFVYC2cjs.normalizeVideoGradeLut; exports.normalizeVideoWord = normalizeVideoWord; exports.openVideoClipEffectAuthoring = openVideoClipEffectAuthoring; exports.overEffectPixels = _chunkXNZFVYC2cjs.overEffectPixels; exports.parseVideoAnimatable = parseVideoAnimatable; exports.parseVideoAsset = parseVideoAsset; exports.parseVideoAssetProxies = parseVideoAssetProxies; exports.parseVideoClip = parseVideoClip; exports.parseVideoClipAnimation = parseVideoClipAnimation; exports.parseVideoClipCamera = parseVideoClipCamera; exports.parseVideoClipEffects = parseVideoClipEffects; exports.parseVideoClipMask = parseVideoClipMask; exports.parseVideoCubeLut = _chunkXNZFVYC2cjs.parseVideoCubeLut; exports.parseVideoEffectRef = parseVideoEffectRef; exports.parseVideoEffectValues = parseVideoEffectValues; exports.parseVideoGrade = parseVideoGrade; exports.parseVideoGradeLut = parseVideoGradeLut; exports.parseVideoKeyframes = parseVideoKeyframes; exports.parseVideoLoudnessMeasurement = _chunkXNZFVYC2cjs.parseVideoLoudnessMeasurement; exports.parseVideoMarker = parseVideoMarker; exports.parseVideoPreviewScale = parseVideoPreviewScale; exports.parseVideoProject = parseVideoProject; exports.parseVideoSequence = parseVideoSequence; exports.parseVideoTimeRef = parseVideoTimeRef; exports.parseVideoTimeRemap = parseVideoTimeRemap; exports.parseVideoTrack = parseVideoTrack; exports.parseVideoTranscript = parseVideoTranscript; exports.parseVideoTranscriptWords = parseVideoTranscriptWords; exports.parseVideoTransform = parseVideoTransform; exports.parseVideoTransition = parseVideoTransition; exports.placeVideoRect = _chunkXNZFVYC2cjs.placeVideoRect; exports.planVideoClipDrag = planVideoClipDrag; exports.planVideoEdits = planVideoEdits; exports.planVideoPrefetch = planVideoPrefetch; exports.planVideoToolPlayback = planVideoToolPlayback; exports.probeVideoMedia = probeVideoMedia; exports.readVideoScopesPanel = readVideoScopesPanel; exports.removeVideoKey = _chunkXNZFVYC2cjs.removeVideoKey; exports.renderVideoFrameExact = _chunkXNZFVYC2cjs.renderVideoFrameExact; exports.resolveVideoPreviewScale = resolveVideoPreviewScale; exports.retimeVideoAnimatable = _chunkXNZFVYC2cjs.retimeVideoAnimatable; exports.setVideoKey = _chunkXNZFVYC2cjs.setVideoKey; exports.snapToVideoFrame = _chunkXNZFVYC2cjs.snapToVideoFrame; exports.snapVideoTime = _chunkXNZFVYC2cjs.snapVideoTime; exports.sortVideoKeys = _chunkXNZFVYC2cjs.sortVideoKeys; exports.sortedVideoClips = _chunkXNZFVYC2cjs.sortedVideoClips; exports.splitVideoAnimatable = _chunkXNZFVYC2cjs.splitVideoAnimatable; exports.summarizeVideoScopes = summarizeVideoScopes; exports.toVideoEdl = _chunkXNZFVYC2cjs.toVideoEdl; exports.toVideoFfmpeg = _chunkXNZFVYC2cjs.toVideoFfmpeg; exports.toVideoLoudnessMeasure = _chunkXNZFVYC2cjs.toVideoLoudnessMeasure; exports.videoAddAdjustmentEdits = videoAddAdjustmentEdits; exports.videoAssetDropEdit = videoAssetDropEdit; exports.videoAssetHasSound = _chunkXNZFVYC2cjs.videoAssetHasSound; exports.videoAssetKindOf = videoAssetKindOf; exports.videoAssetMap = _chunkXNZFVYC2cjs.videoAssetMap; exports.videoAssetProxy = videoAssetProxy; exports.videoAudioLevels = videoAudioLevels; exports.videoAudioLoudness = videoAudioLoudness; exports.videoAudioPeakRange = videoAudioPeakRange; exports.videoAudioPeakSpans = videoAudioPeakSpans; exports.videoAudioPeaksDuration = videoAudioPeaksDuration; exports.videoAuthorableEffects = videoAuthorableEffects; exports.videoCacheEvictions = videoCacheEvictions; exports.videoCameraBase = videoCameraBase; exports.videoCameraMoveTools = videoCameraMoveTools; exports.videoCameraView = videoCameraView; exports.videoChroma = videoChroma; exports.videoClipAfter = _chunkXNZFVYC2cjs.videoClipAfter; exports.videoClipAnimated = _chunkXNZFVYC2cjs.videoClipAnimated; exports.videoClipAnimationProperties = _chunkXNZFVYC2cjs.videoClipAnimationProperties; exports.videoClipAnimationSpans = _chunkXNZFVYC2cjs.videoClipAnimationSpans; exports.videoClipAppliedEffects = videoClipAppliedEffects; exports.videoClipBefore = _chunkXNZFVYC2cjs.videoClipBefore; exports.videoClipCameraMove = videoClipCameraMove; exports.videoClipEffectDocument = videoClipEffectDocument; exports.videoClipEffectUses = _chunkXNZFVYC2cjs.videoClipEffectUses; exports.videoClipEnd = _chunkXNZFVYC2cjs.videoClipEnd; exports.videoClipHandles = _chunkXNZFVYC2cjs.videoClipHandles; exports.videoClipHeading = videoClipHeading; exports.videoClipKeyframes = videoClipKeyframes; exports.videoClipLabel = videoClipLabel; exports.videoClipMaskOutline = videoClipMaskOutline; exports.videoClipOverhang = _chunkXNZFVYC2cjs.videoClipOverhang; exports.videoClipPicture = videoClipPicture; exports.videoClipShowsWaveform = videoClipShowsWaveform; exports.videoClipSoundGain = _chunkXNZFVYC2cjs.videoClipSoundGain; exports.videoClipSourceRange = _chunkXNZFVYC2cjs.videoClipSourceRange; exports.videoClipSourceTime = _chunkXNZFVYC2cjs.videoClipSourceTime; exports.videoClipSpeed = _chunkXNZFVYC2cjs.videoClipSpeed; exports.videoClipSpeedAt = _chunkXNZFVYC2cjs.videoClipSpeedAt; exports.videoClipTint = videoClipTint; exports.videoClipTypeLabel = _chunkXNZFVYC2cjs.videoClipTypeLabel; exports.videoClipWaveform = videoClipWaveform; exports.videoClipWaveformPath = videoClipWaveformPath; exports.videoClipsAt = _chunkXNZFVYC2cjs.videoClipsAt; exports.videoContactSheetSvg = _chunkXNZFVYC2cjs.videoContactSheetSvg; exports.videoCutsWithMargin = videoCutsWithMargin; exports.videoDragLabel = videoDragLabel; exports.videoDropTracks = videoDropTracks; exports.videoDuckingKeys = videoDuckingKeys; exports.videoEaseBezier = _chunkXNZFVYC2cjs.videoEaseBezier; exports.videoEaseProgress = _chunkXNZFVYC2cjs.videoEaseProgress; exports.videoEaseToAnimationEasing = videoEaseToAnimationEasing; exports.videoEditsFromSequence = videoEditsFromSequence; exports.videoEffectFrameTime = _chunkXNZFVYC2cjs.videoEffectFrameTime; exports.videoEffectLayerKey = _chunkXNZFVYC2cjs.videoEffectLayerKey; exports.videoEffectValuesAt = _chunkXNZFVYC2cjs.videoEffectValuesAt; exports.videoEffectValuesFromDocument = videoEffectValuesFromDocument; exports.videoExposureNotes = videoExposureNotes; exports.videoExposureStats = videoExposureStats; exports.videoFadeCurveGain = _chunkXNZFVYC2cjs.videoFadeCurveGain; exports.videoFfmpegUnsupportedEffects = _chunkXNZFVYC2cjs.videoFfmpegUnsupportedEffects; exports.videoFfmpegUnsupportedFeatures = _chunkXNZFVYC2cjs.videoFfmpegUnsupportedFeatures; exports.videoFrameAt = _chunkXNZFVYC2cjs.videoFrameAt; exports.videoFrameCacheKey = videoFrameCacheKey; exports.videoFrameDuration = _chunkXNZFVYC2cjs.videoFrameDuration; exports.videoFrameLeafLayers = _chunkXNZFVYC2cjs.videoFrameLeafLayers; exports.videoFrameRequestsAt = videoFrameRequestsAt; exports.videoFrameToSvg = _chunkXNZFVYC2cjs.videoFrameToSvg; exports.videoFrames = _chunkXNZFVYC2cjs.videoFrames; exports.videoFreezeFrameEdit = _chunkXNZFVYC2cjs.videoFreezeFrameEdit; exports.videoGradeCssFilter = _chunkXNZFVYC2cjs.videoGradeCssFilter; exports.videoGradeFfmpegFilters = _chunkXNZFVYC2cjs.videoGradeFfmpegFilters; exports.videoGradeGainsFilterId = _chunkXNZFVYC2cjs.videoGradeGainsFilterId; exports.videoGradeLook = _chunkXNZFVYC2cjs.videoGradeLook; exports.videoGradePreset = _chunkXNZFVYC2cjs.videoGradePreset; exports.videoGradeStepMatrix = _chunkXNZFVYC2cjs.videoGradeStepMatrix; exports.videoGradeStepSvgValues = _chunkXNZFVYC2cjs.videoGradeStepSvgValues; exports.videoGradeSteps = _chunkXNZFVYC2cjs.videoGradeSteps; exports.videoGradeSvgDefs = _chunkXNZFVYC2cjs.videoGradeSvgDefs; exports.videoGradeSvgFilter = _chunkXNZFVYC2cjs.videoGradeSvgFilter; exports.videoHistogram = videoHistogram; exports.videoHistogramImage = videoHistogramImage; exports.videoHourFrames = _chunkXNZFVYC2cjs.videoHourFrames; exports.videoIrisRadius = _chunkXNZFVYC2cjs.videoIrisRadius; exports.videoIssueKey = videoIssueKey; exports.videoKeyTimesProblem = _chunkXNZFVYC2cjs.videoKeyTimesProblem; exports.videoKeyframeBreakpoints = _chunkXNZFVYC2cjs.videoKeyframeBreakpoints; exports.videoKeyframeFfmpegExpr = _chunkXNZFVYC2cjs.videoKeyframeFfmpegExpr; exports.videoKeyframeRows = videoKeyframeRows; exports.videoKeyframeToggleEdit = videoKeyframeToggleEdit; exports.videoKeyframeValueEdit = videoKeyframeValueEdit; exports.videoKeysOf = _chunkXNZFVYC2cjs.videoKeysOf; exports.videoLayerMask = _chunkXNZFVYC2cjs.videoLayerMask; exports.videoLayersUseEffects = _chunkXNZFVYC2cjs.videoLayersUseEffects; exports.videoLayersWithoutTransitionEffects = _chunkXNZFVYC2cjs.videoLayersWithoutTransitionEffects; exports.videoLoudnessEnergy = videoLoudnessEnergy; exports.videoLoudnessGain = videoLoudnessGain; exports.videoLoudnessOf = videoLoudnessOf; exports.videoLuma = videoLuma; exports.videoLumaWaveform = videoLumaWaveform; exports.videoLutEdits = videoLutEdits; exports.videoLutFromFunction = _chunkXNZFVYC2cjs.videoLutFromFunction; exports.videoLutSvgApproximation = _chunkXNZFVYC2cjs.videoLutSvgApproximation; exports.videoLutSvgPrimitives = _chunkXNZFVYC2cjs.videoLutSvgPrimitives; exports.videoLutToCube = _chunkXNZFVYC2cjs.videoLutToCube; exports.videoMaskContains = _chunkXNZFVYC2cjs.videoMaskContains; exports.videoMaskEdit = videoMaskEdit; exports.videoMaskPolygon = _chunkXNZFVYC2cjs.videoMaskPolygon; exports.videoMaskSvgPath = _chunkXNZFVYC2cjs.videoMaskSvgPath; exports.videoOverlap = _chunkXNZFVYC2cjs.videoOverlap; exports.videoPeakDb = videoPeakDb; exports.videoPreviewSrc = videoPreviewSrc; exports.videoProjectDuration = _chunkXNZFVYC2cjs.videoProjectDuration; exports.videoProjectEffects = _chunkXNZFVYC2cjs.videoProjectEffects; exports.videoProjectHasProxies = videoProjectHasProxies; exports.videoProjectSvg = _chunkXNZFVYC2cjs.videoProjectSvg; exports.videoProxyFfmpeg = videoProxyFfmpeg; exports.videoProxyName = videoProxyName; exports.videoProxyPlan = videoProxyPlan; exports.videoRemoveRangesEdits = videoRemoveRangesEdits; exports.videoRulerTicks = videoRulerTicks; exports.videoScopeImage = videoScopeImage; exports.videoSequenceChildren = _chunkXNZFVYC2cjs.videoSequenceChildren; exports.videoSequenceDuration = _chunkXNZFVYC2cjs.videoSequenceDuration; exports.videoSequenceMap = _chunkXNZFVYC2cjs.videoSequenceMap; exports.videoShellQuote = _chunkXNZFVYC2cjs.videoShellQuote; exports.videoSkinProtectionEdits = videoSkinProtectionEdits; exports.videoSkinToneWeight = _chunkXNZFVYC2cjs.videoSkinToneWeight; exports.videoSlowMotionRamp = _chunkXNZFVYC2cjs.videoSlowMotionRamp; exports.videoSnapPoints = _chunkXNZFVYC2cjs.videoSnapPoints; exports.videoSourceFrame = videoSourceFrame; exports.videoSourceFrameTime = videoSourceFrameTime; exports.videoSpeechRanges = videoSpeechRanges; exports.videoSpeedRampEdit = _chunkXNZFVYC2cjs.videoSpeedRampEdit; exports.videoSpeedRampKeys = _chunkXNZFVYC2cjs.videoSpeedRampKeys; exports.videoTextStyle = _chunkXNZFVYC2cjs.videoTextStyle; exports.videoTimeRef = videoTimeRef; exports.videoTimeRemapBreakpoints = _chunkXNZFVYC2cjs.videoTimeRemapBreakpoints; exports.videoTimeRemapSpan = _chunkXNZFVYC2cjs.videoTimeRemapSpan; exports.videoTimecodeFrames = _chunkXNZFVYC2cjs.videoTimecodeFrames; exports.videoTimelineTranscript = videoTimelineTranscript; exports.videoTitleFrame = _chunkXNZFVYC2cjs.videoTitleFrame; exports.videoTrackSyncLocked = _chunkXNZFVYC2cjs.videoTrackSyncLocked; exports.videoTranscriptEdit = videoTranscriptEdit; exports.videoTranscriptTrack = videoTranscriptTrack; exports.videoTransformAt = _chunkXNZFVYC2cjs.videoTransformAt; exports.videoTransformOfView = videoTransformOfView; exports.videoTransitionAudioCurve = _chunkXNZFVYC2cjs.videoTransitionAudioCurve; exports.videoTransitionEase = _chunkXNZFVYC2cjs.videoTransitionEase; exports.videoTransitionHasDirection = videoTransitionHasDirection; exports.videoValueAt = _chunkXNZFVYC2cjs.videoValueAt; exports.videoVectorscope = videoVectorscope; exports.videoVectorscopeAngle = videoVectorscopeAngle; exports.videoVectorscopeImage = videoVectorscopeImage; exports.videoVectorscopePoint = videoVectorscopePoint; exports.videoWaveformImage = videoWaveformImage; exports.videoWaveformPath = videoWaveformPath; exports.videoWipeRect = _chunkXNZFVYC2cjs.videoWipeRect; exports.videoWordAt = videoWordAt; exports.videoWordsRange = videoWordsRange; exports.withVideoPlayback = withVideoPlayback;
|
|
7129
|
+
exports.TranscriptVideoController = TranscriptVideoController; exports.VIDEO_ADJUSTMENT_SCOPES = _chunkZBCT5MEAcjs.VIDEO_ADJUSTMENT_SCOPES; exports.VIDEO_ADJUSTMENT_SCOPE_LABELS = VIDEO_ADJUSTMENT_SCOPE_LABELS; exports.VIDEO_BLEND_MODES = _chunkZBCT5MEAcjs.VIDEO_BLEND_MODES; exports.VIDEO_BLEND_MODE_LABELS = VIDEO_BLEND_MODE_LABELS; exports.VIDEO_CLIP_ANIMATION_DURATION = _chunkZBCT5MEAcjs.VIDEO_CLIP_ANIMATION_DURATION; exports.VIDEO_CLIP_ANIMATION_EFFECTS = _chunkZBCT5MEAcjs.VIDEO_CLIP_ANIMATION_EFFECTS; exports.VIDEO_CLIP_ANIMATION_LABELS = VIDEO_CLIP_ANIMATION_LABELS; exports.VIDEO_CLIP_TYPES = _chunkZBCT5MEAcjs.VIDEO_CLIP_TYPES; exports.VIDEO_DEFAULT_FILLERS = VIDEO_DEFAULT_FILLERS; exports.VIDEO_DEFAULT_STILL_DURATION = VIDEO_DEFAULT_STILL_DURATION; exports.VIDEO_DEFAULT_TITLE_DURATION = VIDEO_DEFAULT_TITLE_DURATION; exports.VIDEO_DISFLUENCY_KINDS = VIDEO_DISFLUENCY_KINDS; exports.VIDEO_EASE_NAMES = _chunkZBCT5MEAcjs.VIDEO_EASE_NAMES; exports.VIDEO_EDIT_OPS = VIDEO_EDIT_OPS; exports.VIDEO_EFFECT_PLACES = _chunkZBCT5MEAcjs.VIDEO_EFFECT_PLACES; exports.VIDEO_FADE_CURVES = _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES; exports.VIDEO_FADE_CURVE_LABELS = VIDEO_FADE_CURVE_LABELS; exports.VIDEO_FITS = _chunkZBCT5MEAcjs.VIDEO_FITS; exports.VIDEO_GRADE_CONTROLS = _chunkZBCT5MEAcjs.VIDEO_GRADE_CONTROLS; exports.VIDEO_GRADE_PRESETS = _chunkZBCT5MEAcjs.VIDEO_GRADE_PRESETS; exports.VIDEO_GRADE_PRESET_NAMES = _chunkZBCT5MEAcjs.VIDEO_GRADE_PRESET_NAMES; exports.VIDEO_ISSUE_CODES = VIDEO_ISSUE_CODES; exports.VIDEO_KEYFRAME_LIMITS = _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_LIMITS; exports.VIDEO_KEYFRAME_PROPERTIES = _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_PROPERTIES; exports.VIDEO_LOUDNESS_HOP = VIDEO_LOUDNESS_HOP; exports.VIDEO_LUT_MAX_SIZE = _chunkZBCT5MEAcjs.VIDEO_LUT_MAX_SIZE; exports.VIDEO_MASK_DEFAULTS = _chunkZBCT5MEAcjs.VIDEO_MASK_DEFAULTS; exports.VIDEO_MASK_SHAPES = _chunkZBCT5MEAcjs.VIDEO_MASK_SHAPES; exports.VIDEO_MASK_SHAPE_LABELS = VIDEO_MASK_SHAPE_LABELS; exports.VIDEO_PEAK_BLOCK = VIDEO_PEAK_BLOCK; exports.VIDEO_PLACEMENT_MODES = _chunkZBCT5MEAcjs.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 = _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON; exports.VIDEO_TRANSFORM_PROPERTIES = _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES; exports.VIDEO_TRANSITION_LABELS = VIDEO_TRANSITION_LABELS; exports.VIDEO_TRANSITION_TYPES = _chunkZBCT5MEAcjs.VIDEO_TRANSITION_TYPES; exports.VIDEO_VECTORSCOPE_TARGETS = VIDEO_VECTORSCOPE_TARGETS; exports.VIDEO_WIPE_DIRECTIONS = _chunkZBCT5MEAcjs.VIDEO_WIPE_DIRECTIONS; exports.VideoAudioPeaksCache = VideoAudioPeaksCache; exports.VideoEditorController = VideoEditorController; exports.VideoEffectsEngine = _chunkZBCT5MEAcjs.VideoEffectsEngine; exports.VideoFrameCache = VideoFrameCache; exports.VideoLutCache = _chunkZBCT5MEAcjs.VideoLutCache; exports.VideoPathGesture = VideoPathGesture; exports.VideoPreviewEngine = VideoPreviewEngine; exports.VideoPreviewPixels = VideoPreviewPixels; exports.allVideoClipIds = _chunkZBCT5MEAcjs.allVideoClipIds; exports.allVideoTracks = _chunkZBCT5MEAcjs.allVideoTracks; exports.animationEasingToVideoEase = animationEasingToVideoEase; exports.applyVideoEdits = applyVideoEdits; exports.applyVideoGrade = _chunkZBCT5MEAcjs.applyVideoGrade; exports.applyVideoLut = _chunkZBCT5MEAcjs.applyVideoLut; exports.applyVideoLutToPixels = _chunkZBCT5MEAcjs.applyVideoLutToPixels; exports.bakeVideoClipCamera = bakeVideoClipCamera; exports.buildVideoAudioPeaks = buildVideoAudioPeaks; exports.checkVideoEffectPlace = _chunkZBCT5MEAcjs.checkVideoEffectPlace; exports.checkVideoEffectValues = _chunkZBCT5MEAcjs.checkVideoEffectValues; exports.checkVideoProject = checkVideoProject; exports.checkVideoTimeRemap = _chunkZBCT5MEAcjs.checkVideoTimeRemap; exports.createVideoDialogueToolProvider = createVideoDialogueToolProvider; exports.createVideoEditorDocument = createVideoEditorDocument; exports.createVideoEditorToolProvider = createVideoEditorToolProvider; exports.createVideoEffectsToolProvider = createVideoEffectsToolProvider; exports.createVideoElementDecoder = createVideoElementDecoder; exports.createVideoMusicToolProvider = createVideoMusicToolProvider; exports.createVideoProject = createVideoProject; exports.decodeVideoAudioPeaks = decodeVideoAudioPeaks; exports.describeVideoEditPlan = describeVideoEditPlan; exports.describeVideoProject = describeVideoProject; exports.describeVideoSequence = describeVideoSequence; exports.detectVideoDisfluencies = detectVideoDisfluencies; exports.diffVideoProjects = diffVideoProjects; exports.drawVideoFrame = _chunkZBCT5MEAcjs.drawVideoFrame; exports.ffmpegFilterValue = _chunkZBCT5MEAcjs.ffmpegFilterValue; exports.findVideoAudioBeats = findVideoAudioBeats; exports.findVideoAudioSilences = findVideoAudioSilences; exports.findVideoClip = _chunkZBCT5MEAcjs.findVideoClip; exports.findVideoFillers = findVideoFillers; exports.findVideoGaps = _chunkZBCT5MEAcjs.findVideoGaps; exports.findVideoRepetitions = findVideoRepetitions; exports.findVideoSequenceClip = _chunkZBCT5MEAcjs.findVideoSequenceClip; exports.findVideoSequenceCycle = _chunkZBCT5MEAcjs.findVideoSequenceCycle; exports.findVideoTranscriptPauses = findVideoTranscriptPauses; exports.findVideoTranscriptText = findVideoTranscriptText; exports.formatVideoSeconds = _chunkZBCT5MEAcjs.formatVideoSeconds; exports.formatVideoTimecode = _chunkZBCT5MEAcjs.formatVideoTimecode; exports.formatVideoTimecodeFrames = _chunkZBCT5MEAcjs.formatVideoTimecodeFrames; exports.framePointsToPicture = framePointsToPicture; exports.isVideoDropFrameRate = _chunkZBCT5MEAcjs.isVideoDropFrameRate; exports.isVideoKeyframes = _chunkZBCT5MEAcjs.isVideoKeyframes; exports.measureVideoLoudness = measureVideoLoudness; exports.mergeVideoRanges = mergeVideoRanges; exports.mixEffectPixels = _chunkZBCT5MEAcjs.mixEffectPixels; exports.nearestVideoBeat = nearestVideoBeat; exports.nextFreeVideoSlot = _chunkZBCT5MEAcjs.nextFreeVideoSlot; exports.normalizeVideoClipMask = _chunkZBCT5MEAcjs.normalizeVideoClipMask; exports.normalizeVideoGrade = _chunkZBCT5MEAcjs.normalizeVideoGrade; exports.normalizeVideoGradeLut = _chunkZBCT5MEAcjs.normalizeVideoGradeLut; exports.normalizeVideoWord = normalizeVideoWord; exports.openVideoClipEffectAuthoring = openVideoClipEffectAuthoring; exports.overEffectPixels = _chunkZBCT5MEAcjs.overEffectPixels; exports.parseVideoAnimatable = parseVideoAnimatable; exports.parseVideoAsset = parseVideoAsset; exports.parseVideoAssetProxies = parseVideoAssetProxies; exports.parseVideoClip = parseVideoClip; exports.parseVideoClipAnimation = parseVideoClipAnimation; exports.parseVideoClipCamera = parseVideoClipCamera; exports.parseVideoClipEffects = parseVideoClipEffects; exports.parseVideoClipMask = parseVideoClipMask; exports.parseVideoCubeLut = _chunkZBCT5MEAcjs.parseVideoCubeLut; exports.parseVideoEffectRef = parseVideoEffectRef; exports.parseVideoEffectValues = parseVideoEffectValues; exports.parseVideoGrade = parseVideoGrade; exports.parseVideoGradeLut = parseVideoGradeLut; exports.parseVideoKeyframes = parseVideoKeyframes; exports.parseVideoLoudnessMeasurement = _chunkZBCT5MEAcjs.parseVideoLoudnessMeasurement; exports.parseVideoMarker = parseVideoMarker; exports.parseVideoPreviewScale = parseVideoPreviewScale; exports.parseVideoProject = parseVideoProject; exports.parseVideoSequence = parseVideoSequence; exports.parseVideoTimeRef = parseVideoTimeRef; exports.parseVideoTimeRemap = parseVideoTimeRemap; exports.parseVideoTrack = parseVideoTrack; exports.parseVideoTranscript = parseVideoTranscript; exports.parseVideoTranscriptWords = parseVideoTranscriptWords; exports.parseVideoTransform = parseVideoTransform; exports.parseVideoTransition = parseVideoTransition; exports.placeVideoRect = _chunkZBCT5MEAcjs.placeVideoRect; exports.planVideoClipDrag = planVideoClipDrag; exports.planVideoEdits = planVideoEdits; exports.planVideoPrefetch = planVideoPrefetch; exports.planVideoToolPlayback = planVideoToolPlayback; exports.probeVideoMedia = probeVideoMedia; exports.readVideoScopesPanel = readVideoScopesPanel; exports.removeVideoKey = _chunkZBCT5MEAcjs.removeVideoKey; exports.renderVideoFrameExact = _chunkZBCT5MEAcjs.renderVideoFrameExact; exports.resolveVideoPreviewScale = resolveVideoPreviewScale; exports.retimeVideoAnimatable = _chunkZBCT5MEAcjs.retimeVideoAnimatable; exports.setVideoKey = _chunkZBCT5MEAcjs.setVideoKey; exports.snapToVideoFrame = _chunkZBCT5MEAcjs.snapToVideoFrame; exports.snapVideoTime = _chunkZBCT5MEAcjs.snapVideoTime; exports.sortVideoKeys = _chunkZBCT5MEAcjs.sortVideoKeys; exports.sortedVideoClips = _chunkZBCT5MEAcjs.sortedVideoClips; exports.splitVideoAnimatable = _chunkZBCT5MEAcjs.splitVideoAnimatable; exports.summarizeVideoScopes = summarizeVideoScopes; exports.toVideoEdl = _chunkZBCT5MEAcjs.toVideoEdl; exports.toVideoFfmpeg = _chunkZBCT5MEAcjs.toVideoFfmpeg; exports.toVideoLoudnessMeasure = _chunkZBCT5MEAcjs.toVideoLoudnessMeasure; exports.videoAddAdjustmentEdits = videoAddAdjustmentEdits; exports.videoAssetDropEdit = videoAssetDropEdit; exports.videoAssetHasSound = _chunkZBCT5MEAcjs.videoAssetHasSound; exports.videoAssetKindOf = videoAssetKindOf; exports.videoAssetMap = _chunkZBCT5MEAcjs.videoAssetMap; exports.videoAssetProxy = videoAssetProxy; exports.videoAudioLevels = videoAudioLevels; exports.videoAudioLoudness = videoAudioLoudness; exports.videoAudioPeakRange = videoAudioPeakRange; exports.videoAudioPeakSpans = videoAudioPeakSpans; exports.videoAudioPeaksDuration = videoAudioPeaksDuration; exports.videoAuthorableEffects = videoAuthorableEffects; exports.videoCacheEvictions = videoCacheEvictions; exports.videoCameraBase = videoCameraBase; exports.videoCameraMoveTools = videoCameraMoveTools; exports.videoCameraView = videoCameraView; exports.videoChroma = videoChroma; exports.videoClipAfter = _chunkZBCT5MEAcjs.videoClipAfter; exports.videoClipAnimated = _chunkZBCT5MEAcjs.videoClipAnimated; exports.videoClipAnimationProperties = _chunkZBCT5MEAcjs.videoClipAnimationProperties; exports.videoClipAnimationSpans = _chunkZBCT5MEAcjs.videoClipAnimationSpans; exports.videoClipAppliedEffects = videoClipAppliedEffects; exports.videoClipBefore = _chunkZBCT5MEAcjs.videoClipBefore; exports.videoClipCameraMove = videoClipCameraMove; exports.videoClipEffectDocument = videoClipEffectDocument; exports.videoClipEffectUses = _chunkZBCT5MEAcjs.videoClipEffectUses; exports.videoClipEnd = _chunkZBCT5MEAcjs.videoClipEnd; exports.videoClipHandles = _chunkZBCT5MEAcjs.videoClipHandles; exports.videoClipHeading = videoClipHeading; exports.videoClipKeyframes = videoClipKeyframes; exports.videoClipLabel = videoClipLabel; exports.videoClipMaskOutline = videoClipMaskOutline; exports.videoClipOverhang = _chunkZBCT5MEAcjs.videoClipOverhang; exports.videoClipPicture = videoClipPicture; exports.videoClipShowsWaveform = videoClipShowsWaveform; exports.videoClipSoundGain = _chunkZBCT5MEAcjs.videoClipSoundGain; exports.videoClipSourceRange = _chunkZBCT5MEAcjs.videoClipSourceRange; exports.videoClipSourceTime = _chunkZBCT5MEAcjs.videoClipSourceTime; exports.videoClipSpeed = _chunkZBCT5MEAcjs.videoClipSpeed; exports.videoClipSpeedAt = _chunkZBCT5MEAcjs.videoClipSpeedAt; exports.videoClipTint = videoClipTint; exports.videoClipTypeLabel = _chunkZBCT5MEAcjs.videoClipTypeLabel; exports.videoClipWaveform = videoClipWaveform; exports.videoClipWaveformPath = videoClipWaveformPath; exports.videoClipsAt = _chunkZBCT5MEAcjs.videoClipsAt; exports.videoContactSheetSvg = _chunkZBCT5MEAcjs.videoContactSheetSvg; exports.videoCutsWithMargin = videoCutsWithMargin; exports.videoDragLabel = videoDragLabel; exports.videoDropTracks = videoDropTracks; exports.videoDuckingKeys = videoDuckingKeys; exports.videoEaseBezier = _chunkZBCT5MEAcjs.videoEaseBezier; exports.videoEaseProgress = _chunkZBCT5MEAcjs.videoEaseProgress; exports.videoEaseToAnimationEasing = videoEaseToAnimationEasing; exports.videoEditsFromSequence = videoEditsFromSequence; exports.videoEffectFrameTime = _chunkZBCT5MEAcjs.videoEffectFrameTime; exports.videoEffectLayerKey = _chunkZBCT5MEAcjs.videoEffectLayerKey; exports.videoEffectValuesAt = _chunkZBCT5MEAcjs.videoEffectValuesAt; exports.videoEffectValuesFromDocument = videoEffectValuesFromDocument; exports.videoExposureNotes = videoExposureNotes; exports.videoExposureStats = videoExposureStats; exports.videoFadeCurveGain = _chunkZBCT5MEAcjs.videoFadeCurveGain; exports.videoFfmpegUnsupportedEffects = _chunkZBCT5MEAcjs.videoFfmpegUnsupportedEffects; exports.videoFfmpegUnsupportedFeatures = _chunkZBCT5MEAcjs.videoFfmpegUnsupportedFeatures; exports.videoFrameAt = _chunkZBCT5MEAcjs.videoFrameAt; exports.videoFrameCacheKey = videoFrameCacheKey; exports.videoFrameDuration = _chunkZBCT5MEAcjs.videoFrameDuration; exports.videoFrameLeafLayers = _chunkZBCT5MEAcjs.videoFrameLeafLayers; exports.videoFrameRequestsAt = videoFrameRequestsAt; exports.videoFrameToSvg = _chunkZBCT5MEAcjs.videoFrameToSvg; exports.videoFrames = _chunkZBCT5MEAcjs.videoFrames; exports.videoFreezeFrameEdit = _chunkZBCT5MEAcjs.videoFreezeFrameEdit; exports.videoGradeCssFilter = _chunkZBCT5MEAcjs.videoGradeCssFilter; exports.videoGradeFfmpegFilters = _chunkZBCT5MEAcjs.videoGradeFfmpegFilters; exports.videoGradeGainsFilterId = _chunkZBCT5MEAcjs.videoGradeGainsFilterId; exports.videoGradeLook = _chunkZBCT5MEAcjs.videoGradeLook; exports.videoGradePreset = _chunkZBCT5MEAcjs.videoGradePreset; exports.videoGradeStepMatrix = _chunkZBCT5MEAcjs.videoGradeStepMatrix; exports.videoGradeStepSvgValues = _chunkZBCT5MEAcjs.videoGradeStepSvgValues; exports.videoGradeSteps = _chunkZBCT5MEAcjs.videoGradeSteps; exports.videoGradeSvgDefs = _chunkZBCT5MEAcjs.videoGradeSvgDefs; exports.videoGradeSvgFilter = _chunkZBCT5MEAcjs.videoGradeSvgFilter; exports.videoHistogram = videoHistogram; exports.videoHistogramImage = videoHistogramImage; exports.videoHourFrames = _chunkZBCT5MEAcjs.videoHourFrames; exports.videoIrisRadius = _chunkZBCT5MEAcjs.videoIrisRadius; exports.videoIssueKey = videoIssueKey; exports.videoKeyTimesProblem = _chunkZBCT5MEAcjs.videoKeyTimesProblem; exports.videoKeyframeBreakpoints = _chunkZBCT5MEAcjs.videoKeyframeBreakpoints; exports.videoKeyframeFfmpegExpr = _chunkZBCT5MEAcjs.videoKeyframeFfmpegExpr; exports.videoKeyframeRows = videoKeyframeRows; exports.videoKeyframeToggleEdit = videoKeyframeToggleEdit; exports.videoKeyframeValueEdit = videoKeyframeValueEdit; exports.videoKeysOf = _chunkZBCT5MEAcjs.videoKeysOf; exports.videoLayerMask = _chunkZBCT5MEAcjs.videoLayerMask; exports.videoLayersUseEffects = _chunkZBCT5MEAcjs.videoLayersUseEffects; exports.videoLayersWithoutTransitionEffects = _chunkZBCT5MEAcjs.videoLayersWithoutTransitionEffects; exports.videoLoudnessEnergy = videoLoudnessEnergy; exports.videoLoudnessGain = videoLoudnessGain; exports.videoLoudnessOf = videoLoudnessOf; exports.videoLuma = videoLuma; exports.videoLumaWaveform = videoLumaWaveform; exports.videoLutEdits = videoLutEdits; exports.videoLutFromFunction = _chunkZBCT5MEAcjs.videoLutFromFunction; exports.videoLutSvgApproximation = _chunkZBCT5MEAcjs.videoLutSvgApproximation; exports.videoLutSvgPrimitives = _chunkZBCT5MEAcjs.videoLutSvgPrimitives; exports.videoLutToCube = _chunkZBCT5MEAcjs.videoLutToCube; exports.videoMaskContains = _chunkZBCT5MEAcjs.videoMaskContains; exports.videoMaskEdit = videoMaskEdit; exports.videoMaskPolygon = _chunkZBCT5MEAcjs.videoMaskPolygon; exports.videoMaskSvgPath = _chunkZBCT5MEAcjs.videoMaskSvgPath; exports.videoOverlap = _chunkZBCT5MEAcjs.videoOverlap; exports.videoPeakDb = videoPeakDb; exports.videoPreviewSrc = videoPreviewSrc; exports.videoProjectDuration = _chunkZBCT5MEAcjs.videoProjectDuration; exports.videoProjectEffects = _chunkZBCT5MEAcjs.videoProjectEffects; exports.videoProjectHasProxies = videoProjectHasProxies; exports.videoProjectSvg = _chunkZBCT5MEAcjs.videoProjectSvg; exports.videoProxyFfmpeg = videoProxyFfmpeg; exports.videoProxyName = videoProxyName; exports.videoProxyPlan = videoProxyPlan; exports.videoRemoveRangesEdits = videoRemoveRangesEdits; exports.videoRulerTicks = videoRulerTicks; exports.videoScopeImage = videoScopeImage; exports.videoSequenceChildren = _chunkZBCT5MEAcjs.videoSequenceChildren; exports.videoSequenceDuration = _chunkZBCT5MEAcjs.videoSequenceDuration; exports.videoSequenceMap = _chunkZBCT5MEAcjs.videoSequenceMap; exports.videoShellQuote = _chunkZBCT5MEAcjs.videoShellQuote; exports.videoSkinProtectionEdits = videoSkinProtectionEdits; exports.videoSkinToneWeight = _chunkZBCT5MEAcjs.videoSkinToneWeight; exports.videoSlowMotionRamp = _chunkZBCT5MEAcjs.videoSlowMotionRamp; exports.videoSnapPoints = _chunkZBCT5MEAcjs.videoSnapPoints; exports.videoSourceFrame = videoSourceFrame; exports.videoSourceFrameTime = videoSourceFrameTime; exports.videoSpeechRanges = videoSpeechRanges; exports.videoSpeedRampEdit = _chunkZBCT5MEAcjs.videoSpeedRampEdit; exports.videoSpeedRampKeys = _chunkZBCT5MEAcjs.videoSpeedRampKeys; exports.videoTextStyle = _chunkZBCT5MEAcjs.videoTextStyle; exports.videoTimeRef = videoTimeRef; exports.videoTimeRemapBreakpoints = _chunkZBCT5MEAcjs.videoTimeRemapBreakpoints; exports.videoTimeRemapSpan = _chunkZBCT5MEAcjs.videoTimeRemapSpan; exports.videoTimecodeFrames = _chunkZBCT5MEAcjs.videoTimecodeFrames; exports.videoTimelineTranscript = videoTimelineTranscript; exports.videoTitleFrame = _chunkZBCT5MEAcjs.videoTitleFrame; exports.videoTrackSyncLocked = _chunkZBCT5MEAcjs.videoTrackSyncLocked; exports.videoTranscriptEdit = videoTranscriptEdit; exports.videoTranscriptTrack = videoTranscriptTrack; exports.videoTransformAt = _chunkZBCT5MEAcjs.videoTransformAt; exports.videoTransformOfView = videoTransformOfView; exports.videoTransitionAudioCurve = _chunkZBCT5MEAcjs.videoTransitionAudioCurve; exports.videoTransitionEase = _chunkZBCT5MEAcjs.videoTransitionEase; exports.videoTransitionHasDirection = videoTransitionHasDirection; exports.videoValueAt = _chunkZBCT5MEAcjs.videoValueAt; exports.videoVectorscope = videoVectorscope; exports.videoVectorscopeAngle = videoVectorscopeAngle; exports.videoVectorscopeImage = videoVectorscopeImage; exports.videoVectorscopePoint = videoVectorscopePoint; exports.videoWaveformImage = videoWaveformImage; exports.videoWaveformPath = videoWaveformPath; exports.videoWipeRect = _chunkZBCT5MEAcjs.videoWipeRect; exports.videoWordAt = videoWordAt; exports.videoWordsRange = videoWordsRange; exports.withVideoPlayback = withVideoPlayback;
|