diff --git a/.agents/skills/formvfx-harness/references/tools.md b/.agents/skills/formvfx-harness/references/tools.md
index 5da4376..d21ca6e 100644
--- a/.agents/skills/formvfx-harness/references/tools.md
+++ b/.agents/skills/formvfx-harness/references/tools.md
@@ -2,11 +2,11 @@
Generated from the formvfx engine by `./formvfx agents sync`; do not edit by hand.
-The `formvfx` MCP server has 29 tools. `./formvfx mcp` serves them over stdio (it starts the engine when it is not running); the engine also serves them over Streamable HTTP at `http://127.0.0.1:8250/mcp`. The shell equivalents are in the last section.
+The `formvfx` MCP server has 33 tools. `./formvfx mcp` serves them over stdio (it starts the engine when it is not running); the engine also serves them over Streamable HTTP at `http://127.0.0.1:8250/mcp`. The shell equivalents are in the last section.
## Contents
-`status` `list_commands` `describe_command` `execute` `batch` `get_comp` `get_layer` `get_property` `set_property` `set_keyframes` `apply_effect` `list_effects` `text_preset` `shapes_from_svg` `planar_track` `object_matte` `render_frame` `contact_sheet` `render` `dynamic_link` `project` `import_files` `run_script` `history` `ui` `wait` `guide` `extensions_list` `extension_command`
+`status` `list_commands` `describe_command` `execute` `batch` `get_comp` `get_layer` `get_property` `set_property` `set_keyframes` `apply_effect` `list_effects` `text_preset` `shapes_from_svg` `planar_track` `object_matte` `render_frame` `contact_sheet` `render` `dynamic_link` `project` `import_files` `run_script` `history` `ui` `wait` `guide` `extensions_list` `extension_command` `comfy_status` `comfy_workflows` `comfy_run` `comfy_job`
## status
@@ -268,7 +268,7 @@ Note: read-only.
## guide
-formvfx know-how for agents: workflow, layers, animation, text, shapes, effects, masks, 3d, expressions, tracking, render, ui, extensions.
+formvfx know-how for agents: workflow, layers, animation, text, shapes, effects, masks, 3d, expressions, tracking, render, ui, extensions, comfy.
- `topic`: string
@@ -290,10 +290,47 @@ Runs a command an extension contributes (ids from extensions_list) in the open f
- `command`: string; required; The command id within the extension.
- `args`: object; default {}; Arguments passed to the extension with the command.
+## comfy_status
+
+Whether the ComfyUI server saved in formvfx's settings answers and has the FormBridge pack: the address, whether the pack is installed, the contract, the server version and a plain message when something is missing. The address is the person's setting; it cannot be changed from here.
+
+- no parameters
+
+Note: read-only.
+
+## comfy_workflows
+
+The workflows the FormBridge pack offers on that ComfyUI server: id, title, task, media, the slots to fill (name, type, required, default, choices) and whether each is ready to run, with the missing nodes or models in plain words.
+
+- no parameters
+
+Note: read-only.
+
+## comfy_run
+
+Runs a FormBridge workflow on that ComfyUI server and lands the result in the project as footage above the source layer (one undo step; a matte output also becomes a track matte). Returns the job at once; follow it with comfy_job. slots holds the non-media values (prompt, seed, strength...). Media slots are filled from sources: {slotName: {layer, comp?, range?}} where range is [first frame, last frame] of the composition; leave sources out to use the selected layer and the composition's work area, as the ComfyUI panel does. The first plate is rendered from the project, so the project must be open.
+
+- `workflow`: string; required; A workflow id from comfy_workflows.
+- `slots`: object; Values for the non-media slots by slot name.
+- `sources`: object; Optional. For each media slot name, the layer to send.
+- `reuse`: boolean; default true; Let the server reuse an earlier identical result; false forces a fresh run.
+
+## comfy_job
+
+A ComfyUI job started by comfy_run in this formvfx session: its state (queued, running, done, failed, cancelled), progress, whether a preview exists, and once done the layers and footage that landed in the project. Poll it every few seconds until the state is done, failed or cancelled.
+
+- `job`: string; required; The job id comfy_run returned.
+
+Note: read-only.
+
## Guide topics
The `guide` tool returns these texts.
+### comfy
+
+Generative workflows on the person's ComfyUI server through the FormBridge pack. comfy_status says whether the server answers and the pack is installed (if not, tell the person to install Comfy-FormBridge-Suite into ComfyUI's custom_nodes and restart it). comfy_workflows lists the workflows with their slots and whether each is ready; a workflow that is not ready names the missing nodes or models, so tell the person instead of running it. comfy_run {workflow, slots} asks the person first, sends the selected layer over the composition's work area (or sources {slotName: {layer, comp, range: [first frame, last frame]}}), and returns a job. Poll comfy_job {job} every few seconds until the state is done, failed or cancelled; a done job has landed footage above the source layer in one undo step (a matte output also becomes a track matte), and render_frame shows the result. Retry with a new seed by calling comfy_run again with a different seed slot and reuse false. The server address is the person's setting in the ComfyUI panel; no tool can change it.
+
### extensions
Form extensions add panels and commands to formvfx (FormPortal installs them, form.ext makes them). extensions_list shows each one's state and commands; extension_command {id, command, args} runs a command in the open window, asking the person once per extension version to allow its permissions. A refused extension shows why (wrong product, newer API, a newer formvfx needed). Their edits are ordinary formvfx commands, one undo step each.
diff --git a/.claude/skills/formvfx-harness/references/tools.md b/.claude/skills/formvfx-harness/references/tools.md
index 5da4376..d21ca6e 100644
--- a/.claude/skills/formvfx-harness/references/tools.md
+++ b/.claude/skills/formvfx-harness/references/tools.md
@@ -2,11 +2,11 @@
Generated from the formvfx engine by `./formvfx agents sync`; do not edit by hand.
-The `formvfx` MCP server has 29 tools. `./formvfx mcp` serves them over stdio (it starts the engine when it is not running); the engine also serves them over Streamable HTTP at `http://127.0.0.1:8250/mcp`. The shell equivalents are in the last section.
+The `formvfx` MCP server has 33 tools. `./formvfx mcp` serves them over stdio (it starts the engine when it is not running); the engine also serves them over Streamable HTTP at `http://127.0.0.1:8250/mcp`. The shell equivalents are in the last section.
## Contents
-`status` `list_commands` `describe_command` `execute` `batch` `get_comp` `get_layer` `get_property` `set_property` `set_keyframes` `apply_effect` `list_effects` `text_preset` `shapes_from_svg` `planar_track` `object_matte` `render_frame` `contact_sheet` `render` `dynamic_link` `project` `import_files` `run_script` `history` `ui` `wait` `guide` `extensions_list` `extension_command`
+`status` `list_commands` `describe_command` `execute` `batch` `get_comp` `get_layer` `get_property` `set_property` `set_keyframes` `apply_effect` `list_effects` `text_preset` `shapes_from_svg` `planar_track` `object_matte` `render_frame` `contact_sheet` `render` `dynamic_link` `project` `import_files` `run_script` `history` `ui` `wait` `guide` `extensions_list` `extension_command` `comfy_status` `comfy_workflows` `comfy_run` `comfy_job`
## status
@@ -268,7 +268,7 @@ Note: read-only.
## guide
-formvfx know-how for agents: workflow, layers, animation, text, shapes, effects, masks, 3d, expressions, tracking, render, ui, extensions.
+formvfx know-how for agents: workflow, layers, animation, text, shapes, effects, masks, 3d, expressions, tracking, render, ui, extensions, comfy.
- `topic`: string
@@ -290,10 +290,47 @@ Runs a command an extension contributes (ids from extensions_list) in the open f
- `command`: string; required; The command id within the extension.
- `args`: object; default {}; Arguments passed to the extension with the command.
+## comfy_status
+
+Whether the ComfyUI server saved in formvfx's settings answers and has the FormBridge pack: the address, whether the pack is installed, the contract, the server version and a plain message when something is missing. The address is the person's setting; it cannot be changed from here.
+
+- no parameters
+
+Note: read-only.
+
+## comfy_workflows
+
+The workflows the FormBridge pack offers on that ComfyUI server: id, title, task, media, the slots to fill (name, type, required, default, choices) and whether each is ready to run, with the missing nodes or models in plain words.
+
+- no parameters
+
+Note: read-only.
+
+## comfy_run
+
+Runs a FormBridge workflow on that ComfyUI server and lands the result in the project as footage above the source layer (one undo step; a matte output also becomes a track matte). Returns the job at once; follow it with comfy_job. slots holds the non-media values (prompt, seed, strength...). Media slots are filled from sources: {slotName: {layer, comp?, range?}} where range is [first frame, last frame] of the composition; leave sources out to use the selected layer and the composition's work area, as the ComfyUI panel does. The first plate is rendered from the project, so the project must be open.
+
+- `workflow`: string; required; A workflow id from comfy_workflows.
+- `slots`: object; Values for the non-media slots by slot name.
+- `sources`: object; Optional. For each media slot name, the layer to send.
+- `reuse`: boolean; default true; Let the server reuse an earlier identical result; false forces a fresh run.
+
+## comfy_job
+
+A ComfyUI job started by comfy_run in this formvfx session: its state (queued, running, done, failed, cancelled), progress, whether a preview exists, and once done the layers and footage that landed in the project. Poll it every few seconds until the state is done, failed or cancelled.
+
+- `job`: string; required; The job id comfy_run returned.
+
+Note: read-only.
+
## Guide topics
The `guide` tool returns these texts.
+### comfy
+
+Generative workflows on the person's ComfyUI server through the FormBridge pack. comfy_status says whether the server answers and the pack is installed (if not, tell the person to install Comfy-FormBridge-Suite into ComfyUI's custom_nodes and restart it). comfy_workflows lists the workflows with their slots and whether each is ready; a workflow that is not ready names the missing nodes or models, so tell the person instead of running it. comfy_run {workflow, slots} asks the person first, sends the selected layer over the composition's work area (or sources {slotName: {layer, comp, range: [first frame, last frame]}}), and returns a job. Poll comfy_job {job} every few seconds until the state is done, failed or cancelled; a done job has landed footage above the source layer in one undo step (a matte output also becomes a track matte), and render_frame shows the result. Retry with a new seed by calling comfy_run again with a different seed slot and reuse false. The server address is the person's setting in the ComfyUI panel; no tool can change it.
+
### extensions
Form extensions add panels and commands to formvfx (FormPortal installs them, form.ext makes them). extensions_list shows each one's state and commands; extension_command {id, command, args} runs a command in the open window, asking the person once per extension version to allow its permissions. A refused extension shows why (wrong product, newer API, a newer formvfx needed). Their edits are ordinary formvfx commands, one undo step each.
diff --git a/.docs/wiki/Agents.md b/.docs/wiki/Agents.md
index c5e754f..1a62c2a 100644
--- a/.docs/wiki/Agents.md
+++ b/.docs/wiki/Agents.md
@@ -20,7 +20,9 @@ Window > Chat with Claude (Alt+Cmd or Ctrl+J) opens a chat that answers in forma
## The tools
-`status`, `list_commands`, `describe_command`, `execute`, `batch`, `get_comp`, `get_layer`, `get_property`, `set_property`, `set_keyframes`, `apply_effect`, `list_effects`, `text_preset`, `shapes_from_svg`, `planar_track`, `object_matte`, `render_frame`, `contact_sheet`, `render`, `dynamic_link`, `project`, `import_files`, `history`, `ui`, `wait`, `run_script`, `guide`, `extensions_list`, `extension_command`. The full reference is `.claude/skills/formvfx-harness/references/tools.md`.
+`status`, `list_commands`, `describe_command`, `execute`, `batch`, `get_comp`, `get_layer`, `get_property`, `set_property`, `set_keyframes`, `apply_effect`, `list_effects`, `text_preset`, `shapes_from_svg`, `planar_track`, `object_matte`, `render_frame`, `contact_sheet`, `render`, `dynamic_link`, `project`, `import_files`, `history`, `ui`, `wait`, `run_script`, `guide`, `extensions_list`, `extension_command`, `comfy_status`, `comfy_workflows`, `comfy_run`, `comfy_job`. The full reference is `.claude/skills/formvfx-harness/references/tools.md`.
+
+The four `comfy_` tools drive the Generate with Comfy panel's loop against the ComfyUI server saved in the panel's address field. `comfy_status`, `comfy_workflows` and `comfy_job` only read and never ask; `comfy_run` asks once in the formvfx window like any change, sends the selected layer over the work area (or the layers and frame ranges it is given), and returns a job to follow with `comfy_job` until it is done, failed or cancelled. A finished job has landed footage above the source layer as one undo step. No tool takes a server address or a file path, so an agent cannot point formvfx at another server or send a file from disk; `guide comfy` explains the loop.
## Command line
diff --git a/.docs/wiki/Manual.md b/.docs/wiki/Manual.md
index c59f676..14925e8 100644
--- a/.docs/wiki/Manual.md
+++ b/.docs/wiki/Manual.md
@@ -1,5 +1,5 @@
# Manual
-The formvfx manual lives in the repository as [`docs/MANUAL.md`](https://github.com/nodemode-dev/formVFX/blob/main/docs/MANUAL.md) and opens inside formvfx from Help > formvfx Manual. It walks through the application area by area with the menu path of every tool: the window, panels and workspaces, projects and footage, compositions and layers, the Flowchart as a node editor, animation, text, shapes and masks, rotoscoping, paint and puppet, effects and plug-ins, 3D, tracking, expressions and scripts, preview, rendering and export, colour, Dynamic Link, agents and the tutorials.
+The formvfx manual lives in the repository as [`docs/MANUAL.md`](https://github.com/nodemode-dev/formVFX/blob/main/docs/MANUAL.md) and opens inside formvfx from Help > formvfx Manual. It walks through the application area by area with the menu path of every tool: the window, panels and workspaces, projects and footage, compositions and layers, the Flowchart as a node editor, animation, text, shapes and masks, rotoscoping, paint and puppet, effects and plug-ins, 3D, tracking, expressions and scripts, preview, rendering and export, colour, Dynamic Link, generating with Comfy (sending a layer to your own ComfyUI server through the Comfy-FormBridge-Suite pack and bringing the result back as footage layers above it with a luma track matte, as one undo step), agents and the tutorials.
Every menu item is also a command; [Agents](Agents) shows how Claude Code, Codex, Cursor and Antigravity run the same commands.
diff --git a/README.md b/README.md
index 7ce621f..cfb385b 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
-
+
@@ -78,7 +78,7 @@
306 effects
Keying · Color Grade · OCIO transforms · Blur and Sharpen · Distort · Particles and simulations · 3D Channel passes · Cryptomatte · 13 audio effects
-
Animate and build
Text animators with 169 presets · Shape layers · Masks · Roto Paint · Puppet pins · 3D cameras and lights · Tracking and stabilizing · Expressions · Scripts · Render Queue
+
Animate and build
Text animators with 169 presets · Shape layers · Masks · Roto Paint · Puppet pins · 3D cameras and lights · Tracking and stabilizing · Expressions · Scripts · Render Queue · Generate with Comfy
`);return e.addEventListener(`click`,()=>{On=e.dataset.key,U.emit(`project`)}),e.addEventListener(`dblclick`,()=>{let t=e.dataset.key.slice(2);if(e.dataset.key.startsWith(`c:`))It(t);else{let e=d(t);e&&Wt(e)}}),e},update:(e,t)=>{let i=o(e,`.fx-item-ic`);i.dataset.i!==t.icon&&(i.dataset.i=t.icon,i.innerHTML=l(t.icon,14)),n(o(e,`.fx-item-n`),t.name),n(o(e,`.fx-item-type`),t.type),n(o(e,`.fx-item-size`),t.size),n(o(e,`.fx-item-dur`),t.dur),r(e,`is-selected`,On===t.key),r(e,`is-active`,t.kind===`comp`&&t.id===W.project.active)}});let m=kn().find(e=>e.key===On);n(o(e,`.pj-name`),m?.name??W.project.name),n(o(e,`.pj-l1`),m?`${m.type} ${m.size}`:`${W.project.comps.length} compositions`),n(o(e,`.pj-l2`),m?m.dur:`${W.project.footage.length} footage items`);let h=m?.kind===`footage`?d(m.id):void 0;n(o(e,`.pj-l3`),h?h.size?`${(h.size/1024).toFixed(0)} KB ${h.mime}`:`Procedural, made in this tab`:``);let g=c.getContext(`2d`);if(g.clearRect(0,0,104,58),h?.src&&(!(h.src instanceof HTMLVideoElement)||h.src.readyState>=2)){let e=Math.min(104/h.w,58/h.h);g.drawImage(h.src,(104-h.w*e)/2,(58-h.h*e)/2,h.w*e,h.h*e)}else if(!h){let e=W.project.comps.find(e=>e.id===(m?.kind===`comp`?m.id:W.project.active))??K();if(e){let t=Math.min(104/e.w,58/e.h);G.render(e,Math.min(W.time,e.dur-1/e.fps),u,t),g.drawImage(u,(104-u.width)/2,(58-u.height)/2)}}n(o(e,`.pj-count`),`${p.length} items`)};e.addEventListener(`click`,e=>{let t=e.target.closest(`[data-a]`);if(!t)return;let n=On.startsWith(`f:`)?d(On.slice(2)):void 0;switch(t.dataset.a){case`import`:yn(`image/*,video/*,.json,.fvxdemo`,!0).then(e=>vn(e));break;case`newcomp`:{let e=pe(`Comp ${W.project.comps.length+1}`);W.project.comps.push(e),J(),It(e.id);break}case`fromfootage`:n?Gt(n):j(`Select a footage item first`);break;case`addlayer`:n?Wt(n):j(`Select a footage item first`)}}),s.addEventListener(`input`,f),s.addEventListener(`keydown`,e=>e.stopPropagation());for(let e of[`project`,`comp`])U.on(e,f);return e}var jn=new Set,Mn=``;function Nn(){let e=a(`
Double-click to apply
-
`),i=o(e,`.fx-efx-list`),s=o(e,`.fx-efx-search input`),c=e=>{e.startsWith(`fx:`)?Kt(e.slice(3)):e.startsWith(`pr:`)&&Jt(e.slice(3))},u=()=>{let e=s.value.trim().toLowerCase(),d=[];for(let t of ke){let n=Ee.filter(n=>n.cat===t&&(!e||n.kind.toLowerCase().includes(e)));if(n.length&&(d.push({key:`cat:${t}`,kind:`cat`,label:t,sub:String(n.length),cat:t}),!Dn.has(t)||e))for(let e of n)d.push({key:`fx:${e.kind}`,kind:`fx`,label:e.kind,sub:`${e.params.length+e.colors.length} ${e.params.length+e.colors.length===1?`param`:`params`}`,cat:t})}let f=Be.filter(t=>!e||t.name.toLowerCase().includes(e));if(f.length&&(d.push({key:`cat:Text Animation Presets`,kind:`cat`,label:`Text Animation Presets`,sub:String(f.length),cat:`Text Animation Presets`}),!Dn.has(`Text Animation Presets`)||e))for(let e of f)d.push({key:`pr:${e.name}`,kind:`preset`,label:e.name,sub:`text`,cat:`Text Animation Presets`});t(i,d,{key:e=>e.key,create:e=>{let t=e.kind===`cat`?a(`
`),update:(e,t)=>{n(o(e,`.fx-rq-name`),t.name),n(o(e,`.fx-rq-out`),`${t.size} ${t.when}`);let r=o(e,`.rq-dl`);r.href!==t.url&&(r.href=t.url,r.download=t.name)}})},y=(e,t)=>{f.style.width=`${Math.round(e/Math.max(1,t)*100)}%`,n(p,`${e} / ${t}`)};return u.addEventListener(`click`,async()=>{let t=K();_={cancelled:!1};let a=c===`work`?t.workIn:0,o=c===`work`?t.workOut:t.dur,l={comp:t,renderer:G,scale:parseFloat(s),from:a,to:o,step:Math.max(1,Math.min(30,parseInt(h.value,10)||1)),signal:_,progress:y};u.disabled=!0,d.disabled=!1,n(p,`Rendering`),f.style.width=`0%`;let m=performance.now(),b=t.name.replace(/\W+/g,`_`);try{let e=null,r=``;if(i===`png`?(e=await Qn(l,W.time),r=`${b}_${Ln(W.time,t.fps)}.png`):i===`sheet`?(e=await er({...l,from:a,to:o}),r=`${b}_contact_sheet.png`):i===`seq`?(e=await $n(l),r=`${b}_frames.zip`):i===`gif`?(e=await nr(l),r=`${b}.gif`):(e=await ir(l),r=`${b}.webm`),!e)n(p,`Cancelled`);else{let t=URL.createObjectURL(e);g.unshift({key:`${Date.now()}`,name:r,size:e.size>1048576?`${(e.size/1048576).toFixed(2)} MB`:`${(e.size/1024).toFixed(0)} KB`,url:t,kind:i,when:`${((performance.now()-m)/1e3).toFixed(1)} s`}),v(),f.style.width=`100%`,n(p,`Done in ${((performance.now()-m)/1e3).toFixed(1)} s`),j(`Rendered ${r}`)}}catch(e){n(p,`Failed`),j(e instanceof Error?e.message:String(e),`error`)}finally{u.disabled=!1,d.disabled=!0,r(e,`is-busy`,!1)}}),d.addEventListener(`click`,()=>{_.cancelled=!0}),e}var $=24,fr=28,pr=new WeakMap;function mr(){let e=[];for(let t of K().layers)if(e.push({key:`L:${t.id}`,kind:`layer`,layer:t}),t.open)for(let n of xt(t))(n.group===`Transform`||nn(n))&&e.push({key:`P:${t.id}:${n.id}`,kind:`prop`,layer:t,ref:n});return e}var hr={solid:`iSolid`,text:`iText`,shape:`iShape`,footage:`iFootage`,null:`iNull`,adjust:`iAdjust`};function gr(e){if(e.kind===`layer`){let t=a(`
-
`),i=e,s=o(t,`.tl-tw`),c=yn(oe,()=>i.kind===`layer`?i.layer.blend:``,e=>{i.kind===`layer`&&(i.layer.blend=e,J())});return o(t,`.tl-mode`).appendChild(c.el),t.addEventListener(`pointerdown`,e=>{i.kind===`layer`&&!e.target.closest(`select, button`)&&Ot(i.layer.id)}),o(t,`.fx-twirl`).addEventListener(`click`,()=>{i.kind===`layer`&&(i.layer.open=!i.layer.open,U.emit(`comp`))}),t.addEventListener(`click`,e=>{let t=e.target.closest(`[data-s]`);if(!t||i.kind!==`layer`)return;let n=i.layer;t.dataset.s===`vis`?n.vis=!n.vis:t.dataset.s===`solo`?n.solo=!n.solo:n.lock=!n.lock,J()}),lr.set(t,e=>{if(e.kind!==`layer`)return;i=e;let a=e.layer,u=K().layers.indexOf(a)+1;n(o(t,`.tl-num`),String(u)),n(o(t,`.fx-name`),a.name);let d=o(t,`.fx-label-chip`);d.style.background!==a.label&&(d.style.background=a.label);let f=o(t,`.fx-type`);f.dataset.k!==a.kind&&(f.dataset.k=a.kind,f.innerHTML=l(dr[a.kind],13)),s.innerHTML=l(a.open?`twirlOpen`:`twirl`,11),r(t,`is-selected`,W.sel===a.id),r(t,`is-off`,!a.vis);for(let e of Array.from(t.querySelectorAll(`[data-s]`)))r(e,`is-on`,e.dataset.s===`vis`?a.vis:e.dataset.s===`solo`?a.solo:a.lock);o(t,`.tl-mode`).hidden=a.kind===`null`,c.update()}),t}let t=a(`
`),i=e,s=o(t,`.fx-stopwatch`),c=o(t,`.fx-keyhere`),u=o(t,`.fx-pval`),d=[];return s.addEventListener(`click`,()=>{i.kind===`prop`&&en(i.ref)}),c.addEventListener(`click`,()=>{i.kind===`prop`&&tn(i.ref)}),t.addEventListener(`pointerdown`,()=>{i.kind===`prop`&&(W.selProp=i.ref.id,Ot(i.layer.id),U.emit(`selprop`))}),lr.set(t,e=>{if(e.kind!==`prop`)return;i=e;let f=e.ref;for(;d.length,`));let t=_n({get:()=>M(i.ref.prop,W.time)[e]??0,set:t=>$t(i.ref,e,t),commit:()=>J(),min:f.min,max:f.max,step:f.step,unit:e===f.dims-1?f.unit:``});d.push(t),u.appendChild(t.el)}n(o(t,`.fx-pname`),f.group.startsWith(`Effect`)?`${f.group.replace(/^Effect · (.+)#.+$/,`$1`)} · ${f.label}`:f.label);let p=Qt(f);r(s,`is-on`,p),c.innerHTML=l(p&&f.prop.k.some(e=>Math.abs(e.t-W.time)<1e-6)?`key`:`keyHollow`,12),c.style.visibility=p?`visible`:`hidden`,r(t,`is-selected`,W.selProp===f.id&&W.sel===e.layer.id);for(let e of d)e.update()}),t}function pr(){let e=a(`
+
`),i=e,s=o(t,`.tl-tw`),c=Cn(le,()=>i.kind===`layer`?i.layer.blend:``,e=>{i.kind===`layer`&&(i.layer.blend=e,J())});return o(t,`.tl-mode`).appendChild(c.el),t.addEventListener(`pointerdown`,e=>{i.kind===`layer`&&!e.target.closest(`select, button`)&&Mt(i.layer.id)}),o(t,`.fx-twirl`).addEventListener(`click`,()=>{i.kind===`layer`&&(i.layer.open=!i.layer.open,U.emit(`comp`))}),t.addEventListener(`click`,e=>{let t=e.target.closest(`[data-s]`);if(!t||i.kind!==`layer`)return;let n=i.layer;t.dataset.s===`vis`?n.vis=!n.vis:t.dataset.s===`solo`?n.solo=!n.solo:n.lock=!n.lock,J()}),pr.set(t,e=>{if(e.kind!==`layer`)return;i=e;let a=e.layer,u=K().layers.indexOf(a)+1;n(o(t,`.tl-num`),String(u)),n(o(t,`.fx-name`),a.name);let d=o(t,`.fx-label-chip`);d.style.background!==a.label&&(d.style.background=a.label);let f=o(t,`.fx-type`);f.dataset.k!==a.kind&&(f.dataset.k=a.kind,f.innerHTML=l(hr[a.kind],13)),s.innerHTML=l(a.open?`twirlOpen`:`twirl`,11),r(t,`is-selected`,W.sel===a.id),r(t,`is-off`,!a.vis);for(let e of Array.from(t.querySelectorAll(`[data-s]`)))r(e,`is-on`,e.dataset.s===`vis`?a.vis:e.dataset.s===`solo`?a.solo:a.lock);o(t,`.tl-mode`).hidden=a.kind===`null`,c.update()}),t}let t=a(`
`),i=e,s=o(t,`.fx-stopwatch`),c=o(t,`.fx-keyhere`),u=o(t,`.fx-pval`),d=[];return s.addEventListener(`click`,()=>{i.kind===`prop`&&an(i.ref)}),c.addEventListener(`click`,()=>{i.kind===`prop`&&on(i.ref)}),t.addEventListener(`pointerdown`,()=>{i.kind===`prop`&&(W.selProp=i.ref.id,Mt(i.layer.id),U.emit(`selprop`))}),pr.set(t,e=>{if(e.kind!==`prop`)return;i=e;let f=e.ref;for(;d.length,`));let t=xn({get:()=>N(i.ref.prop,W.time)[e]??0,set:t=>rn(i.ref,e,t),commit:()=>J(),min:f.min,max:f.max,step:f.step,unit:e===f.dims-1?f.unit:``});d.push(t),u.appendChild(t.el)}n(o(t,`.fx-pname`),f.group.startsWith(`Effect`)?`${f.group.replace(/^Effect · (.+)#.+$/,`$1`)} · ${f.label}`:f.label);let p=nn(f);r(s,`is-on`,p),c.innerHTML=l(p&&f.prop.k.some(e=>Math.abs(e.t-W.time)<1e-6)?`key`:`keyHollow`,12),c.style.visibility=p?`visible`:`hidden`,r(t,`is-selected`,W.selProp===f.id&&W.sel===e.layer.id);for(let e of d)e.update()}),t}function _r(){let e=a(`
@@ -83,11 +83,11 @@
Drag a layer bar to move it, its ends to trim, a keyframe to retime. Wheel scrolls, Ctrl+wheel zooms.
-
`),r=o(e,`.fx-tl-rows`),i=o(e,`.fx-tl-right`),s=o(e,`.fx-tl-ruler`),c=o(e,`.fx-tl-tracks`),l=o(e,`.fx-tl-zoom`),u=o(e,`.fx-tl-tc`),d=o(e,`.fx-tl-frames`),f=[],p=0,m=1,h=0,g=0,_={},v=document.createElement(`i`);v.style.display=`none`,document.body.appendChild(v);let y=e=>(v.style.color=`var(${e})`,getComputedStyle(v).color),b=()=>{for(let e of[`--fx-track-bg`,`--fx-ruler-bg`,`--line-0`,`--line-1`,`--text-secondary`,`--text-muted`,`--fx-cti`,`--fx-workarea`,`--accent-color`,`--surface-1`,`--surface-2`,`--text-primary`])_[e]=y(e)};document.addEventListener(`nm:ui-settings-changed`,()=>{b(),E()});let x=()=>(h-16)/Math.max(.1,K().dur)*m,S=e=>8+(e-p)*x(),C=e=>(e-8)/x()+p,w=e=>Math.round(e*K().fps)/K().fps;function ee(){let e=window.devicePixelRatio||1,t=i.clientWidth,n=i.clientHeight-cr;(t!==h||n!==g)&&(h=t,g=Math.max(0,n),s.style.height=`${cr}px`,s.width=Math.round(h*e),s.height=Math.round(cr*e),c.width=Math.round(h*e),c.height=Math.round(g*e),c.style.width=`${h}px`,c.style.height=`${g}px`,s.style.width=`${h}px`)}let T=!1;function E(){T||(T=!0,requestAnimationFrame(()=>{T=!1,te()}))}function te(){if(ee(),!h)return;_[`--fx-track-bg`]||b();let e=K(),t=window.devicePixelRatio||1,i=s.getContext(`2d`);i.setTransform(t,0,0,t,0,0),i.fillStyle=_[`--fx-ruler-bg`],i.fillRect(0,0,h,cr),i.fillStyle=_[`--fx-workarea`],i.fillRect(S(e.workIn),21,S(e.workOut)-S(e.workIn),5),i.font=`11px "JetBrains Mono", monospace`,i.textBaseline=`middle`;let a=x(),o=[1/e.fps,2/e.fps,5/e.fps,10/e.fps,.5,1,2,5,10,30,60].find(e=>e*a>=70)??60,l=o/5;i.strokeStyle=_[`--text-muted`],i.fillStyle=_[`--text-secondary`],i.beginPath();for(let t=Math.floor(p/l)*l;t<=e.dur+1e-6&&S(t){let n=t*$-y;if(!(n+$<0||n>g)){if(v.fillStyle=e.kind===`layer`?_[`--surface-1`]:_[`--fx-track-bg`],v.globalAlpha=.5,v.fillRect(0,n,h,$),v.globalAlpha=1,v.fillStyle=_[`--line-0`],v.fillRect(0,n+$-1,h,1),e.kind===`layer`){let t=e.layer,r=S(t.tin),i=S(t.tout);if(v.fillStyle=t.label,v.globalAlpha=t.vis?.62:.2,v.beginPath(),v.roundRect(r,n+3,Math.max(2,i-r),17,4),v.fill(),v.globalAlpha=1,W.sel===t.id&&(v.strokeStyle=_[`--accent-color`],v.lineWidth=1.5,v.beginPath(),v.roundRect(r,n+3,Math.max(2,i-r),17,4),v.stroke()),v.fillStyle=_[`--text-primary`],v.font=`11px Inter, sans-serif`,v.textBaseline=`middle`,v.save(),v.beginPath(),v.rect(r,n,Math.max(0,i-r),$),v.clip(),v.fillText(t.name,r+6,n+$/2),v.restore(),!t.open){let e=new Set;for(let r of _t(t))for(let t of r.prop.k){let r=Math.round(S(t.t));e.has(r)||(e.add(r),D(v,r,n+$/2,4,_[`--text-secondary`],!1))}}}else{let t=W.selProp===e.ref.id&&W.sel===e.layer.id;for(let r of e.ref.prop.k)D(v,S(r.t),n+$/2,5,t?_[`--accent-color`]:_[`--fx-cti`],!0,r.e===`hold`)}}});let C=Math.round(S(W.time))+.5;v.strokeStyle=_[`--fx-cti`],v.lineWidth=1,v.beginPath(),v.moveTo(C,0),v.lineTo(C,g),v.stroke(),i.fillStyle=_[`--fx-cti`],i.beginPath(),i.moveTo(C-6,16),i.lineTo(C+6,16),i.lineTo(C,26),i.closePath(),i.fill(),i.strokeStyle=_[`--fx-cti`],i.beginPath(),i.moveTo(C,26),i.lineTo(C,cr),i.stroke(),n(u,Mn(W.time,e.fps)),n(d,`${Nn(W.time,e.fps)} ${e.fps} fps`)}function D(e,t,n,r,i,a,o=!1){e.beginPath(),o?e.rect(t-r+1,n-r+1,(r-1)*2,(r-1)*2):(e.moveTo(t,n-r),e.lineTo(t+r,n),e.lineTo(t,n+r),e.lineTo(t-r,n),e.closePath()),a?(e.fillStyle=i,e.fill()):(e.strokeStyle=i,e.lineWidth=1,e.stroke())}function ne(){f=ur(),t(r,f,{key:e=>e.key,create:fr,update:(e,t)=>lr.get(e)?.(t)})}let O=null,k=(e,t)=>{let n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}};s.addEventListener(`pointerdown`,e=>{s.setPointerCapture(e.pointerId),O={mode:`ruler`},Y(C(k(e,s).x))}),s.addEventListener(`pointermove`,e=>{O?.mode===`ruler`&&Y(C(k(e,s).x))}),s.addEventListener(`pointerup`,()=>{O=null}),c.addEventListener(`pointerdown`,e=>{let{x:t,y:n}=k(e,c),i=Math.floor((n+r.scrollTop)/$),a=f[i];if(c.setPointerCapture(e.pointerId),!a){O={mode:`scrub`},Ot(null),Y(C(t));return}if(a.kind===`prop`){let e=a.ref.prop.k.findIndex(e=>Math.abs(S(e.t)-t)<7);if(e>=0){Ot(a.layer.id),W.selProp=a.ref.id,U.emit(`selprop`),O={mode:`key`,ref:a.ref,idx:e,layer:a.layer};return}O={mode:`scrub`},Y(C(t));return}let o=a.layer;Ot(o.id);let s=S(o.tin),l=S(o.tout);t>=s-4&&t<=l+4?O={mode:Math.abs(t-s)<6?`in`:Math.abs(t-l)<6?`out`:`move`,layer:o,t0:C(t),in0:o.tin,out0:o.tout}:(O={mode:`scrub`},Y(C(t)))}),c.addEventListener(`pointermove`,e=>{if(!O)return;let{x:t}=k(e,c),n=C(t),r=K();if(O.mode===`scrub`)Y(n);else if(O.mode===`key`){let e=O.ref.prop.k[O.idx];e&&(e.t=Math.max(0,Math.min(r.dur,w(n))),U.emit(`frame`),E())}else if(O.mode===`move`){let e=w(n-O.t0);O.layer.tin=O.in0+e,O.layer.tout=O.out0+e,U.emit(`frame`),E()}else O.mode===`in`?(O.layer.tin=Math.max(0,Math.min(O.layer.tout-1/r.fps,w(n))),U.emit(`frame`),E()):O.mode===`out`&&(O.layer.tout=Math.max(O.layer.tin+1/r.fps,Math.min(r.dur,w(n))),U.emit(`frame`),E())});let A=()=>{if(!O)return;let e=O;O=null,e.mode===`key`&&e.ref.prop.k.sort((e,t)=>e.t-t.t),e.mode!==`scrub`&&e.mode!==`ruler`&&J()};c.addEventListener(`pointerup`,A),c.addEventListener(`pointercancel`,A),c.addEventListener(`dblclick`,e=>{let{x:t,y:n}=k(e,c),i=f[Math.floor((n+r.scrollTop)/$)];if(i?.kind!==`prop`)return;let a=i.ref.prop.k.findIndex(e=>Math.abs(S(e.t)-t)<7);a>=0&&(i.ref.prop.k.splice(a,1),J())}),i.addEventListener(`wheel`,e=>{if(e.preventDefault(),e.ctrlKey||e.metaKey){let t=C(k(e,c).x);m=Math.max(1,Math.min(12,m*(e.deltaY<0?1.15:1/1.15))),l.value=String(m),p=t-(k(e,c).x-8)/x(),j()}else e.shiftKey||Math.abs(e.deltaX)>Math.abs(e.deltaY)?(p+=(e.deltaX||e.deltaY)/x(),j()):r.scrollTop+=e.deltaY;E()},{passive:!1});let j=()=>{p=Math.max(0,Math.min(Math.max(0,K().dur-(h-16)/x()),p))};l.addEventListener(`input`,()=>{m=parseFloat(l.value),j(),E()}),r.addEventListener(`scroll`,E),new ResizeObserver(()=>{ee(),E()}).observe(i),e.addEventListener(`click`,e=>{let t=e.target.closest(`[data-a]`);if(!t)return;let n=K();switch(t.dataset.a){case`in`:n.workIn=Math.min(W.time,n.workOut-1/n.fps),J();break;case`out`:n.workOut=Math.max(W.time+1/n.fps,n.workIn+1/n.fps),J();break;case`split`:Gt();break;case`dup`:Ut();break;case`up`:Wt(-1);break;case`down`:Wt(1);break;case`del`:Ht()}});let re=()=>{ne(),E()};return U.on(`comp`,re),U.on(`sel`,re),U.on(`selprop`,re),U.on(`project`,re),U.on(`frame`,()=>{ne(),E()}),U.on(`time`,()=>{f.forEach((e,t)=>{let n=r.children[t];n&&lr.get(n)?.(f[t])}),E()}),e}function mr(e,t){let n=a(``),i=o(n,`.fx-group-tabs`),s=o(n,`.fx-group-body`),c=[],l=[],u=e=>{t.forEach((t,n)=>{r(c[n],`is-active`,e===n),l[n].hidden=e!==n}),t[e].on?.()};return t.forEach((e,t)=>{let n=a(``);n.textContent=e.title,n.addEventListener(`click`,()=>u(t)),i.appendChild(n),c.push(n);let r=a(``);r.appendChild(e.el),s.appendChild(r),l.push(r)}),u(0),n.addEventListener(`pointerdown`,()=>{for(let e of document.querySelectorAll(`.fx-group`))r(e,`is-focused`,e===n)},!0),n.show=e=>{let n=t.findIndex(t=>t.id===e);n>=0&&u(n)},n}function hr(e){return``}async function gr(){try{kt(await Ze()),W.sel=K().layers.find(e=>e.name===`COASTLINE`)?.id??null,U.emit(`sel`),await G.warm(K()),Y(2.8),await G.prepare(K(),W.time),G.render(K(),W.time,document.createElement(`canvas`),.1),U.emit(`frame`),U.emit(`project`)}catch(e){k(`${e instanceof Error?e.message:String(e)}; opened the generated sample instead`,`error`),At()}}function _r(){let e=new Blob([fe(W.project)],{type:`application/json`}),t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=`${W.project.name.replace(/\W+/g,`_`)}.fvxdemo.json`,t.click(),W.dirty=!1,U.emit(`status`),k(`Project saved as a .fvxdemo.json file`)}function vr(e,t,r,i,s){let c=a(``),l=a(``);return n(o(l,`span`),e),l.appendChild(c),{row:l,input:c}}function yr(){let e=K(),t=new d(`Composition Settings`,380),n=[vr(`Width`,e.w,16,4096,1),vr(`Height`,e.h,16,4096,1),vr(`Frame rate`,e.fps,1,120,1),vr(`Duration (s)`,e.dur,.1,600,.1)],r=a(``);for(let e of n)t.body.appendChild(e.row);t.field(`Background`,r),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`OK`,`primary`,()=>{e.w=Math.round(+n[0].input.value)||e.w,e.h=Math.round(+n[1].input.value)||e.h,e.fps=Math.max(1,+n[2].input.value||e.fps),e.dur=Math.max(.1,+n[3].input.value||e.dur),e.bg=r.value,e.workIn=0,e.workOut=e.dur;for(let t of e.layers)t.tout=Math.min(t.tout,e.dur);J(),Y(Math.min(W.time,e.dur)),t.close()}),t.open()}function br(){let e=q();return e&&W.selProp?_t(e).find(e=>e.id===W.selProp):void 0}function xr(){let e=br();if(!e){k(`Click a property row in Effect Controls or the Timeline first`);return}let t=new d(`Wiggler · ${e.label}`,360),n=vr(`Frequency (keys per second)`,4,.5,30,.5),r=vr(`Magnitude${e.unit}`,30,0,5e3,1);t.body.append(n.row,r.row),t.body.appendChild(a(`
Bakes seeded random keyframes over the layer, around the current animation.
`)),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`Apply`,`primary`,()=>{rn(e,+n.input.value,+r.input.value),t.close()}),t.open()}function Sr(){let e=br();if(!e||e.prop.k.length<3){k(`Select an animated property with three or more keyframes`);return}let t=new d(`Smoother · ${e.label}`,360),n=vr(`Tolerance`,4,0,1e3,.5);t.body.append(n.row),t.body.appendChild(a(`
Removes the keyframes that fall within the tolerance of a straight line between their neighbours.
`),r=o(e,`.fx-tl-rows`),i=o(e,`.fx-tl-right`),s=o(e,`.fx-tl-ruler`),c=o(e,`.fx-tl-tracks`),l=o(e,`.fx-tl-zoom`),u=o(e,`.fx-tl-tc`),d=o(e,`.fx-tl-frames`),f=[],p=0,m=1,h=0,g=0,_={},v=document.createElement(`i`);v.style.display=`none`,document.body.appendChild(v);let y=e=>(v.style.color=`var(${e})`,getComputedStyle(v).color),b=()=>{for(let e of[`--fx-track-bg`,`--fx-ruler-bg`,`--line-0`,`--line-1`,`--text-secondary`,`--text-muted`,`--fx-cti`,`--fx-workarea`,`--accent-color`,`--surface-1`,`--surface-2`,`--text-primary`])_[e]=y(e)};document.addEventListener(`nm:ui-settings-changed`,()=>{b(),T()});let x=()=>(h-16)/Math.max(.1,K().dur)*m,S=e=>8+(e-p)*x(),C=e=>(e-8)/x()+p,w=e=>Math.round(e*K().fps)/K().fps;function ee(){let e=window.devicePixelRatio||1,t=i.clientWidth,n=i.clientHeight-fr;(t!==h||n!==g)&&(h=t,g=Math.max(0,n),s.style.height=`${fr}px`,s.width=Math.round(h*e),s.height=Math.round(fr*e),c.width=Math.round(h*e),c.height=Math.round(g*e),c.style.width=`${h}px`,c.style.height=`${g}px`,s.style.width=`${h}px`)}let te=!1;function T(){te||(te=!0,requestAnimationFrame(()=>{te=!1,E()}))}function E(){if(ee(),!h)return;_[`--fx-track-bg`]||b();let e=K(),t=window.devicePixelRatio||1,i=s.getContext(`2d`);i.setTransform(t,0,0,t,0,0),i.fillStyle=_[`--fx-ruler-bg`],i.fillRect(0,0,h,fr),i.fillStyle=_[`--fx-workarea`],i.fillRect(S(e.workIn),21,S(e.workOut)-S(e.workIn),5),i.font=`11px "JetBrains Mono", monospace`,i.textBaseline=`middle`;let a=x(),o=[1/e.fps,2/e.fps,5/e.fps,10/e.fps,.5,1,2,5,10,30,60].find(e=>e*a>=70)??60,l=o/5;i.strokeStyle=_[`--text-muted`],i.fillStyle=_[`--text-secondary`],i.beginPath();for(let t=Math.floor(p/l)*l;t<=e.dur+1e-6&&S(t){let n=t*$-y;if(!(n+$<0||n>g)){if(v.fillStyle=e.kind===`layer`?_[`--surface-1`]:_[`--fx-track-bg`],v.globalAlpha=.5,v.fillRect(0,n,h,$),v.globalAlpha=1,v.fillStyle=_[`--line-0`],v.fillRect(0,n+$-1,h,1),e.kind===`layer`){let t=e.layer,r=S(t.tin),i=S(t.tout);if(v.fillStyle=t.label,v.globalAlpha=t.vis?.62:.2,v.beginPath(),v.roundRect(r,n+3,Math.max(2,i-r),17,4),v.fill(),v.globalAlpha=1,W.sel===t.id&&(v.strokeStyle=_[`--accent-color`],v.lineWidth=1.5,v.beginPath(),v.roundRect(r,n+3,Math.max(2,i-r),17,4),v.stroke()),v.fillStyle=_[`--text-primary`],v.font=`11px Inter, sans-serif`,v.textBaseline=`middle`,v.save(),v.beginPath(),v.rect(r,n,Math.max(0,i-r),$),v.clip(),v.fillText(t.name,r+6,n+$/2),v.restore(),!t.open){let e=new Set;for(let r of xt(t))for(let t of r.prop.k){let r=Math.round(S(t.t));e.has(r)||(e.add(r),D(v,r,n+$/2,4,_[`--text-secondary`],!1))}}}else{let t=W.selProp===e.ref.id&&W.sel===e.layer.id;for(let r of e.ref.prop.k)D(v,S(r.t),n+$/2,5,t?_[`--accent-color`]:_[`--fx-cti`],!0,r.e===`hold`)}}});let C=Math.round(S(W.time))+.5;v.strokeStyle=_[`--fx-cti`],v.lineWidth=1,v.beginPath(),v.moveTo(C,0),v.lineTo(C,g),v.stroke(),i.fillStyle=_[`--fx-cti`],i.beginPath(),i.moveTo(C-6,16),i.lineTo(C+6,16),i.lineTo(C,26),i.closePath(),i.fill(),i.strokeStyle=_[`--fx-cti`],i.beginPath(),i.moveTo(C,26),i.lineTo(C,fr),i.stroke(),n(u,In(W.time,e.fps)),n(d,`${Ln(W.time,e.fps)} ${e.fps} fps`)}function D(e,t,n,r,i,a,o=!1){e.beginPath(),o?e.rect(t-r+1,n-r+1,(r-1)*2,(r-1)*2):(e.moveTo(t,n-r),e.lineTo(t+r,n),e.lineTo(t,n+r),e.lineTo(t-r,n),e.closePath()),a?(e.fillStyle=i,e.fill()):(e.strokeStyle=i,e.lineWidth=1,e.stroke())}function ne(){f=mr(),t(r,f,{key:e=>e.key,create:gr,update:(e,t)=>pr.get(e)?.(t)})}let O=null,k=(e,t)=>{let n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}};s.addEventListener(`pointerdown`,e=>{s.setPointerCapture(e.pointerId),O={mode:`ruler`},Y(C(k(e,s).x))}),s.addEventListener(`pointermove`,e=>{O?.mode===`ruler`&&Y(C(k(e,s).x))}),s.addEventListener(`pointerup`,()=>{O=null}),c.addEventListener(`pointerdown`,e=>{let{x:t,y:n}=k(e,c),i=Math.floor((n+r.scrollTop)/$),a=f[i];if(c.setPointerCapture(e.pointerId),!a){O={mode:`scrub`},Mt(null),Y(C(t));return}if(a.kind===`prop`){let e=a.ref.prop.k.findIndex(e=>Math.abs(S(e.t)-t)<7);if(e>=0){Mt(a.layer.id),W.selProp=a.ref.id,U.emit(`selprop`),O={mode:`key`,ref:a.ref,idx:e,layer:a.layer};return}O={mode:`scrub`},Y(C(t));return}let o=a.layer;Mt(o.id);let s=S(o.tin),l=S(o.tout);t>=s-4&&t<=l+4?O={mode:Math.abs(t-s)<6?`in`:Math.abs(t-l)<6?`out`:`move`,layer:o,t0:C(t),in0:o.tin,out0:o.tout}:(O={mode:`scrub`},Y(C(t)))}),c.addEventListener(`pointermove`,e=>{if(!O)return;let{x:t}=k(e,c),n=C(t),r=K();if(O.mode===`scrub`)Y(n);else if(O.mode===`key`){let e=O.ref.prop.k[O.idx];e&&(e.t=Math.max(0,Math.min(r.dur,w(n))),U.emit(`frame`),T())}else if(O.mode===`move`){let e=w(n-O.t0);O.layer.tin=O.in0+e,O.layer.tout=O.out0+e,U.emit(`frame`),T()}else O.mode===`in`?(O.layer.tin=Math.max(0,Math.min(O.layer.tout-1/r.fps,w(n))),U.emit(`frame`),T()):O.mode===`out`&&(O.layer.tout=Math.max(O.layer.tin+1/r.fps,Math.min(r.dur,w(n))),U.emit(`frame`),T())});let re=()=>{if(!O)return;let e=O;O=null,e.mode===`key`&&e.ref.prop.k.sort((e,t)=>e.t-t.t),e.mode!==`scrub`&&e.mode!==`ruler`&&J()};c.addEventListener(`pointerup`,re),c.addEventListener(`pointercancel`,re),c.addEventListener(`dblclick`,e=>{let{x:t,y:n}=k(e,c),i=f[Math.floor((n+r.scrollTop)/$)];if(i?.kind!==`prop`)return;let a=i.ref.prop.k.findIndex(e=>Math.abs(S(e.t)-t)<7);a>=0&&(i.ref.prop.k.splice(a,1),J())}),i.addEventListener(`wheel`,e=>{if(e.preventDefault(),e.ctrlKey||e.metaKey){let t=C(k(e,c).x);m=Math.max(1,Math.min(12,m*(e.deltaY<0?1.15:1/1.15))),l.value=String(m),p=t-(k(e,c).x-8)/x(),A()}else e.shiftKey||Math.abs(e.deltaX)>Math.abs(e.deltaY)?(p+=(e.deltaX||e.deltaY)/x(),A()):r.scrollTop+=e.deltaY;T()},{passive:!1});let A=()=>{p=Math.max(0,Math.min(Math.max(0,K().dur-(h-16)/x()),p))};l.addEventListener(`input`,()=>{m=parseFloat(l.value),A(),T()}),r.addEventListener(`scroll`,T),new ResizeObserver(()=>{ee(),T()}).observe(i),e.addEventListener(`click`,e=>{let t=e.target.closest(`[data-a]`);if(!t)return;let n=K();switch(t.dataset.a){case`in`:n.workIn=Math.min(W.time,n.workOut-1/n.fps),J();break;case`out`:n.workOut=Math.max(W.time+1/n.fps,n.workIn+1/n.fps),J();break;case`split`:Yt();break;case`dup`:qt();break;case`up`:Jt(-1);break;case`down`:Jt(1);break;case`del`:Kt()}});let ie=()=>{ne(),T()};return U.on(`comp`,ie),U.on(`sel`,ie),U.on(`selprop`,ie),U.on(`project`,ie),U.on(`frame`,()=>{ne(),T()}),U.on(`time`,()=>{f.forEach((e,t)=>{let n=r.children[t];n&&pr.get(n)?.(f[t])}),T()}),e}function vr(e,t){let n=a(``),i=o(n,`.fx-group-tabs`),s=o(n,`.fx-group-body`),c=[],l=[],u=e=>{t.forEach((t,n)=>{r(c[n],`is-active`,e===n),l[n].hidden=e!==n}),t[e].on?.()};return t.forEach((e,t)=>{let n=a(``);n.textContent=e.title,n.addEventListener(`click`,()=>u(t)),i.appendChild(n),c.push(n);let r=a(``);r.appendChild(e.el),s.appendChild(r),l.push(r)}),u(0),n.addEventListener(`pointerdown`,()=>{for(let e of document.querySelectorAll(`.fx-group`))r(e,`is-focused`,e===n)},!0),n.show=e=>{let n=t.findIndex(t=>t.id===e);n>=0&&u(n)},n}function yr(e){return``}async function br(){try{Nt(await tt()),W.sel=K().layers.find(e=>e.name===`COASTLINE`)?.id??null,U.emit(`sel`),await G.warm(K()),Y(2.8),await G.prepare(K(),W.time),G.render(K(),W.time,document.createElement(`canvas`),.1),U.emit(`frame`),U.emit(`project`)}catch(e){j(`${e instanceof Error?e.message:String(e)}; opened the generated sample instead`,`error`),Pt()}}function xr(){let e=new Blob([ge(W.project)],{type:`application/json`}),t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=`${W.project.name.replace(/\W+/g,`_`)}.fvxdemo.json`,t.click(),W.dirty=!1,U.emit(`status`),j(`Project saved as a .fvxdemo.json file`)}function Sr(e,t,r,i,s){let c=a(``),l=a(``);return n(o(l,`span`),e),l.appendChild(c),{row:l,input:c}}function Cr(){let e=K(),t=new d(`Composition Settings`,380),n=[Sr(`Width`,e.w,16,4096,1),Sr(`Height`,e.h,16,4096,1),Sr(`Frame rate`,e.fps,1,120,1),Sr(`Duration (s)`,e.dur,.1,600,.1)],r=a(``);for(let e of n)t.body.appendChild(e.row);t.field(`Background`,r),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`OK`,`primary`,()=>{e.w=Math.round(+n[0].input.value)||e.w,e.h=Math.round(+n[1].input.value)||e.h,e.fps=Math.max(1,+n[2].input.value||e.fps),e.dur=Math.max(.1,+n[3].input.value||e.dur),e.bg=r.value,e.workIn=0,e.workOut=e.dur;for(let t of e.layers)t.tout=Math.min(t.tout,e.dur);J(),Y(Math.min(W.time,e.dur)),t.close()}),t.open()}function wr(){let e=q();return e&&W.selProp?xt(e).find(e=>e.id===W.selProp):void 0}function Tr(){let e=wr();if(!e){j(`Click a property row in Effect Controls or the Timeline first`);return}let t=new d(`Wiggler · ${e.label}`,360),n=Sr(`Frequency (keys per second)`,4,.5,30,.5),r=Sr(`Magnitude${e.unit}`,30,0,5e3,1);t.body.append(n.row,r.row),t.body.appendChild(a(`
Bakes seeded random keyframes over the layer, around the current animation.
`)),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`Apply`,`primary`,()=>{cn(e,+n.input.value,+r.input.value),t.close()}),t.open()}function Er(){let e=wr();if(!e||e.prop.k.length<3){j(`Select an animated property with three or more keyframes`);return}let t=new d(`Smoother · ${e.label}`,360),n=Sr(`Tolerance`,4,0,1e3,.5);t.body.append(n.row),t.body.appendChild(a(`
Removes the keyframes that fall within the tolerance of a straight line between their neighbours.
This page runs a compact compositor written in TypeScript on Canvas 2D, inside your browser, with the app's own interface files. FormVFX itself renders on its Rust engine, on the GPU or the CPU.
-
Nothing is uploaded: the footage you drop stays in this tab.
`)),t.button(`Close`,`primary`,()=>t.close()),t.open()}function wr(){let e=()=>[{label:`Text`,run:Pt},{label:`Solid`,run:It},{label:`Rectangle`,run:()=>Ft(`rect`)},{label:`Ellipse`,run:()=>Ft(`ellipse`)},{label:`Star`,run:()=>Ft(`star`)},{label:`Polygon`,run:()=>Ft(`polygon`)},{label:`Adjustment Layer`,run:Lt},{label:`Null Object`,run:Rt}];return[[`File`,()=>[{label:`New Project`,run:jt},{label:`Open Coastline Project`,run:()=>void gr()},{label:`Open Generated Sample`,run:At},{label:`Open Project...`,shortcut:`Cmd+O`,run:()=>void hn(`.json,.fvxdemo`,!1).then(e=>mn(e))},{label:`Save Project`,shortcut:`Cmd+S`,run:_r},`-`,{label:`Import Footage...`,shortcut:`Cmd+I`,run:()=>void hn(`image/*,video/*`,!0).then(e=>mn(e))},{label:`Import as Composition...`,run:()=>void hn(`image/*,video/*`,!1).then(e=>mn(e,!0))},`-`,{label:`Render Queue`,run:()=>U.emit(`showqueue`)}]],[`Edit`,()=>[{label:`Undo`,shortcut:`Cmd+Z`,enabled:Et(),run:wt},{label:`Redo`,shortcut:`Shift+Cmd+Z`,enabled:Dt(),run:Tt},`-`,{label:`Duplicate`,shortcut:`Cmd+D`,run:Ut},{label:`Delete`,shortcut:`Delete`,run:()=>Ht()},{label:`Split Layer`,shortcut:`Shift+Cmd+D`,run:Gt}]],[`Composition`,()=>[{label:`Composition Settings...`,run:yr},{label:`Set Work Area Start`,shortcut:`B`,run:()=>{let e=K();e.workIn=Math.min(W.time,e.workOut-1/e.fps),J()}},{label:`Set Work Area End`,shortcut:`N`,run:()=>{let e=K();e.workOut=Math.max(W.time+1/e.fps,e.workIn+1/e.fps),J()}},`-`,{label:`Go to Start`,shortcut:`Home`,run:()=>Y(0)},{label:`Go to End`,shortcut:`End`,run:()=>Y(K().dur)}]],[`Layer`,()=>[{label:`New`,children:e},{label:`Add Mask`,children:[{label:`Rectangle Mask`,run:()=>Xt(`rect`)},{label:`Ellipse Mask`,run:()=>Xt(`ellipse`)}]},{label:`Text Animation Preset`,children:Be.map(e=>({label:e.name,run:()=>Jt(e.name)}))}]],[`Effect`,()=>ke.map(e=>({label:e,children:Ee.filter(t=>t.cat===e).map(e=>({label:e.kind,run:()=>Kt(e.kind)}))}))],[`Animation`,()=>[{label:`Toggle Keyframe at Playhead`,run:()=>{let e=br();e?tn(e):k(`Click a property row first`)}},{label:`Keyframe Interpolation`,children:j.map(([e,t])=>({label:t,run:()=>{let t=br();t?nn(t,e):k(`Click a property row first`)}}))},`-`,{label:`Wiggler...`,run:xr},{label:`Smoother...`,run:Sr}]],[`View`,()=>[...Object.entries(x).map(([e,t])=>({label:`Theme: ${t.label}`,checked:T().theme===e,run:()=>D(e)}))]],[`Help`,()=>[{label:`About FormVFX Demo`,run:Cr},{label:`FormVFX on GitHub`,run:()=>window.open(`https://github.com/nodemode-dev/formVFX`,`_blank`,`noopener`)}]]]}function Tr(){te();let t=o(document,`#app`),s=a(`
+
Nothing is uploaded: the footage you drop stays in this tab.
`)),t.button(`Close`,`primary`,()=>t.close()),t.open()}function Or(){let e=()=>[{label:`Text`,run:Rt},{label:`Solid`,run:Bt},{label:`Rectangle`,run:()=>zt(`rect`)},{label:`Ellipse`,run:()=>zt(`ellipse`)},{label:`Star`,run:()=>zt(`star`)},{label:`Polygon`,run:()=>zt(`polygon`)},{label:`Adjustment Layer`,run:Vt},{label:`Null Object`,run:Ht}];return[[`File`,()=>[{label:`New Project`,run:Ft},{label:`Open Coastline Project`,run:()=>void br()},{label:`Open Generated Sample`,run:Pt},{label:`Open Project...`,shortcut:`Cmd+O`,run:()=>void yn(`.json,.fvxdemo`,!1).then(e=>vn(e))},{label:`Save Project`,shortcut:`Cmd+S`,run:xr},`-`,{label:`Import Footage...`,shortcut:`Cmd+I`,run:()=>void yn(`image/*,video/*`,!0).then(e=>vn(e))},{label:`Import as Composition...`,run:()=>void yn(`image/*,video/*`,!1).then(e=>vn(e,!0))},`-`,{label:`Render Queue`,run:()=>U.emit(`showqueue`)}]],[`Edit`,()=>[{label:`Undo`,shortcut:`Cmd+Z`,enabled:At(),run:Ot},{label:`Redo`,shortcut:`Shift+Cmd+Z`,enabled:jt(),run:kt},`-`,{label:`Duplicate`,shortcut:`Cmd+D`,run:qt},{label:`Delete`,shortcut:`Delete`,run:()=>Kt()},{label:`Split Layer`,shortcut:`Shift+Cmd+D`,run:Yt}]],[`Composition`,()=>[{label:`Composition Settings...`,run:Cr},{label:`Set Work Area Start`,shortcut:`B`,run:()=>{let e=K();e.workIn=Math.min(W.time,e.workOut-1/e.fps),J()}},{label:`Set Work Area End`,shortcut:`N`,run:()=>{let e=K();e.workOut=Math.max(W.time+1/e.fps,e.workIn+1/e.fps),J()}},`-`,{label:`Go to Start`,shortcut:`Home`,run:()=>Y(0)},{label:`Go to End`,shortcut:`End`,run:()=>Y(K().dur)}]],[`Layer`,()=>[{label:`New`,children:e},{label:`Add Mask`,children:[{label:`Rectangle Mask`,run:()=>en(`rect`)},{label:`Ellipse Mask`,run:()=>en(`ellipse`)}]},{label:`Text Animation Preset`,children:We.map(e=>({label:e.name,run:()=>Qt(e.name)}))}]],[`Effect`,()=>Ne.map(e=>({label:e,children:Ae.filter(t=>t.cat===e).map(e=>({label:e.kind,run:()=>Xt(e.kind)}))}))],[`Animation`,()=>[{label:`Toggle Keyframe at Playhead`,run:()=>{let e=wr();e?on(e):j(`Click a property row first`)}},{label:`Keyframe Interpolation`,children:ae.map(([e,t])=>({label:t,run:()=>{let t=wr();t?sn(t,e):j(`Click a property row first`)}}))},`-`,{label:`Wiggler...`,run:Tr},{label:`Smoother...`,run:Er}]],[`View`,()=>[...Object.entries(ee).map(([e,t])=>({label:`Theme: ${t.label}`,checked:ne().theme===e,run:()=>re(e)}))]],[`Help`,()=>[{label:`About FormVFX Demo`,run:Dr},{label:`FormVFX on GitHub`,run:()=>window.open(`https://github.com/nodemode-dev/formVFX`,`_blank`,`noopener`)}]]]}function kr(){k();let t=o(document,`#app`),s=a(`
`);return e.addEventListener(`click`,()=>{bn=e.dataset.key,H.emit(`project`)}),e.addEventListener(`dblclick`,()=>{let t=e.dataset.key.slice(2);if(e.dataset.key.startsWith(`c:`))Ot(t);else{let e=d(t);e&&It(e)}}),e},update:(e,t)=>{let i=o(e,`.fx-item-ic`);i.dataset.i!==t.icon&&(i.dataset.i=t.icon,i.innerHTML=l(t.icon,14)),n(o(e,`.fx-item-n`),t.name),n(o(e,`.fx-item-type`),t.type),n(o(e,`.fx-item-size`),t.size),n(o(e,`.fx-item-dur`),t.dur),r(e,`is-selected`,bn===t.key),r(e,`is-active`,t.kind===`comp`&&t.id===U.project.active)}});let m=xn().find(e=>e.key===bn);n(o(e,`.pj-name`),m?.name??U.project.name),n(o(e,`.pj-l1`),m?`${m.type} ${m.size}`:`${U.project.comps.length} compositions`),n(o(e,`.pj-l2`),m?m.dur:`${U.project.footage.length} footage items`);let h=m?.kind===`footage`?d(m.id):void 0;n(o(e,`.pj-l3`),h?h.size?`${(h.size/1024).toFixed(0)} KB ${h.mime}`:`Procedural, made in this tab`:``);let g=c.getContext(`2d`);if(g.clearRect(0,0,104,58),h?.src&&(!(h.src instanceof HTMLVideoElement)||h.src.readyState>=2)){let e=Math.min(104/h.w,58/h.h);g.drawImage(h.src,(104-h.w*e)/2,(58-h.h*e)/2,h.w*e,h.h*e)}else if(!h){let e=U.project.comps.find(e=>e.id===(m?.kind===`comp`?m.id:U.project.active))??G();if(e){let t=Math.min(104/e.w,58/e.h);W.render(e,Math.min(U.time,e.dur-1/e.fps),u,t),g.drawImage(u,(104-u.width)/2,(58-u.height)/2)}}n(o(e,`.pj-count`),`${p.length} items`)};e.addEventListener(`click`,e=>{let t=e.target.closest(`[data-a]`);if(!t)return;let n=bn.startsWith(`f:`)?d(bn.slice(2)):void 0;switch(t.dataset.a){case`import`:dn(`image/*,video/*,.json,.fvxdemo`,!0).then(e=>un(e));break;case`newcomp`:{let e=me(`Comp ${U.project.comps.length+1}`);U.project.comps.push(e),q(),Ot(e.id);break}case`fromfootage`:n?Lt(n):k(`Select a footage item first`);break;case`addlayer`:n?It(n):k(`Select a footage item first`)}}),s.addEventListener(`input`,f),s.addEventListener(`keydown`,e=>e.stopPropagation());for(let e of[`project`,`comp`])H.on(e,f);return e}var Cn=new Set,wn=``;function Tn(){let e=a(`
Double-click to apply
-
`),i=o(e,`.fx-efx-list`),s=o(e,`.fx-efx-search input`),c=e=>{e.startsWith(`fx:`)?Rt(e.slice(3)):e.startsWith(`pr:`)&&Bt(e.slice(3))},u=()=>{let e=s.value.trim().toLowerCase(),d=[];for(let t of Fe){let n=Me.filter(n=>n.cat===t&&(!e||n.kind.toLowerCase().includes(e)));if(n.length&&(d.push({key:`cat:${t}`,kind:`cat`,label:t,sub:String(n.length),cat:t}),!yn.has(t)||e))for(let e of n)d.push({key:`fx:${e.kind}`,kind:`fx`,label:e.kind,sub:`${e.params.length+e.colors.length} ${e.params.length+e.colors.length===1?`param`:`params`}`,cat:t})}let f=Ve.filter(t=>!e||t.name.toLowerCase().includes(e));if(f.length&&(d.push({key:`cat:Text Animation Presets`,kind:`cat`,label:`Text Animation Presets`,sub:String(f.length),cat:`Text Animation Presets`}),!yn.has(`Text Animation Presets`)||e))for(let e of f)d.push({key:`pr:${e.name}`,kind:`preset`,label:e.name,sub:`text`,cat:`Text Animation Presets`});t(i,d,{key:e=>e.key,create:e=>{let t=e.kind===`cat`?a(`
`);e.append(Br(`Motion Source`,t),Br(`Track Type`,i),Br(`Motion Target`,s),Br(`Feature Size`,c),Br(`Search Size`,u),d,p,f,m,h);let g=o(h,`.fx-tracker-meter-fill`),_=o(d,`input`),v=o(f,`[data-a=stop]`),y=Array.from(f.querySelectorAll(`[data-d]`)),b=!1,x={cancelled:!1},S=``,C=e=>{let t=K(),n=t?Qe(U.project,t):void 0;if(!t||n?.kind!==`video`){D(`Select a video layer in the timeline first`);return}let r=Z(t.id)??Er(t,e);r.kind=e,Rr(`track`),D(`Click the viewer to place the track point on a feature, then Analyze Forward`),H.emit(`track`)};for(let t of Array.from(e.querySelectorAll(`[data-k]`)))t.addEventListener(`click`,()=>C(t.dataset.k));let w=()=>{let a=K(),o=Z(a?.id??null),l=G();n(t,a?a.name:`Select a video layer`);let d=l.layers.filter(e=>e.id!==a?.id).map(e=>[e.id,e.name]),f=d.map(e=>e.join(`:`)).join(`|`);f!==S&&(S=f,s.replaceChildren(...[[``,`None`],...d].map(([e,t])=>Object.assign(document.createElement(`option`),{value:e,textContent:t})))),o&&(document.activeElement!==i&&(i.value=o.kind),document.activeElement!==s&&(s.value=o.targetId),document.activeElement!==c&&(c.value=String(o.feat)),document.activeElement!==u&&(u.value=String(o.search)),_.checked=o.adapt);let h=!o||b;for(let e of[i,s,c,u,_])e.disabled=h;for(let e of y)e.disabled=h;for(let e of Array.from(p.querySelectorAll(`button`)))e.disabled=h;for(let t of Array.from(e.querySelectorAll(`[data-k]`)))t.disabled=b;v.disabled=!b,r(e.querySelector(`[data-k=transform]`),`is-active`,Q.tool===`track`&&o?.kind===`transform`),r(e.querySelector(`[data-k=stabilize]`),`is-active`,Q.tool===`track`&&o?.kind===`stabilize`),b||n(m,o?o.pts.size>1?`${o.pts.size} frames tracked. ${o.kind===`stabilize`?`Apply writes counter-motion keyframes to the layer.`:`Pick a Motion Target and Apply to write Position keyframes.`}`:`Place the point on a feature with the viewer tool, then Analyze.`:`Choose Track Motion or Stabilize Motion for the selected video layer.`)};i.addEventListener(`change`,()=>{let e=Z(K()?.id??null);e&&(e.kind=i.value,H.emit(`track`))}),s.addEventListener(`change`,()=>{let e=Z(K()?.id??null);e&&(e.targetId=s.value)}),c.addEventListener(`change`,()=>{let e=Z(K()?.id??null);e&&(e.feat=Math.max(16,+c.value||56),H.emit(`track`))}),u.addEventListener(`change`,()=>{let e=Z(K()?.id??null);e&&(e.search=Math.max(16,+u.value||64),H.emit(`track`))}),_.addEventListener(`change`,()=>{let e=Z(K()?.id??null);e&&(e.adapt=_.checked)}),o(p,`[data-a=reset]`).addEventListener(`click`,()=>{let e=Z(K()?.id??null);e&&kr(e)}),o(p,`[data-a=apply]`).addEventListener(`click`,()=>{let e=Z(K()?.id??null);e&&D(Lr(e))}),v.addEventListener(`click`,()=>{x.cancelled=!0});for(let e of y)e.addEventListener(`click`,async()=>{let t=Z(K()?.id??null);if(t&&!b){b=!0,x={cancelled:!1},w(),n(m,`Analyzing`);try{await Ir(t,+(e.dataset.d??`1`),(e,t)=>{g.style.width=`${Math.round(e/Math.max(1,t)*100)}%`,n(m,`Analyzing ${e} of ${t} frames`)},x)}catch(e){D(e instanceof Error?e.message:String(e),`error`)}finally{b=!1,g.style.width=`0%`,w()}}});for(let e of[`sel`,`comp`,`track`,`tool`])H.on(e,w);return w(),e}function Hr(e,t){let n=a(``),i=o(n,`.fx-group-tabs`),s=o(n,`.fx-group-body`),c=[],l=[],u=e=>{t.forEach((t,n)=>{r(c[n],`is-active`,e===n),l[n].hidden=e!==n}),t[e].on?.()};return t.forEach((e,t)=>{let n=a(``);n.textContent=e.title,n.addEventListener(`click`,()=>u(t)),i.appendChild(n),c.push(n);let r=a(``);r.appendChild(e.el),s.appendChild(r),l.push(r)}),u(0),n.addEventListener(`pointerdown`,()=>{for(let e of document.querySelectorAll(`.fx-group`))r(e,`is-focused`,e===n)},!0),n.show=e=>{let n=t.findIndex(t=>t.id===e);n>=0&&u(n)},n}var Ur=e=>``,Wr=[`Keylight`,`Advanced Spill Suppressor`,`Matte Choker`,`Simple Choker`];function Gr(){return G().layers.filter(e=>e.effects.some(e=>e.kind===`Keylight`))}function Kr(){let e=Gr()[0];return e?e.effects.some(e=>e.kind===`Matte View`&&e.on)?`matte`:e.effects.find(e=>e.kind===`Keylight`)?.on?`final`:`source`:``}function qr(e){for(let t of Gr())for(let n of t.effects)n.kind===`Matte View`?n.on=e===`matte`:Wr.includes(n.kind)&&(n.on=e!==`source`);H.emit(`frame`),H.emit(`comp`)}async function Jr(){try{let{project:e,handles:t,track:n}=await Sr();if(xt(e),n){let e=Dr(t.phone,`transform`,0,n);e.targetId=t.screen.id,Lr(e),e.targetId=t.ping.id,Lr(e),wt(t.lockId),Lr(Dr(t.stable,`stabilize`,0,n)),wt(t.heroId)}for(let e of U.project.comps)await W.warm(e);wt(t.heroId),U.sel=t.phone.id,H.emit(`sel`),J(3),await W.prepare(G(),U.time),W.render(G(),U.time,document.createElement(`canvas`),.1),mt(),U.dirty=!1,H.emit(`frame`),H.emit(`project`)}catch(e){D(`${e instanceof Error?e.message:String(e)}; opened the generated sample instead`,`error`),St()}}function Yr(){let e=new Blob([ge(U.project)],{type:`application/json`}),t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=`${U.project.name.replace(/\W+/g,`_`)}.fvxdemo.json`,t.click(),U.dirty=!1,H.emit(`status`),D(`Project saved as a .fvxdemo.json file`)}function Xr(e,t,r,i,s){let c=a(``),l=a(``);return n(o(l,`span`),e),l.appendChild(c),{row:l,input:c}}function Zr(){let e=K();return e&&U.selProp?lt(e).find(e=>e.id===U.selProp):void 0}function Qr(){let e=Zr();if(!e){D(`Click a property row in Effect Controls or the Timeline first`);return}let t=new d(`Wiggler · ${e.label}`,360),n=Xr(`Frequency (keys per second)`,4,.5,30,.5),r=Xr(`Magnitude${e.unit}`,30,0,5e3,1);t.body.append(n.row,r.row),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`Apply`,`primary`,()=>{Yt(e,+n.input.value,+r.input.value),t.close()}),t.open()}function $r(){let e=Zr();if(!e||e.prop.k.length<3){D(`Select an animated property with three or more keyframes`);return}let t=new d(`Smoother · ${e.label}`,360),n=Xr(`Tolerance`,4,0,1e3,.5);t.body.append(n.row),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`Apply`,`primary`,()=>{D(`Removed ${Xt(e,+n.input.value)} keyframes`),t.close()}),t.open()}function ei(){let t=new d(`About the FormVFX keying demo`,480);t.body.appendChild(a(`
${Ur(44)}
FormVFX
Version ${e} · Apache-2.0 · NodeAgentc, Inc.
+
`),p=a(``),m=a(``),h=a(`
`);e.append(Wr(`Motion Source`,t),Wr(`Track Type`,i),Wr(`Motion Target`,s),Wr(`Feature Size`,c),Wr(`Search Size`,u),d,p,f,m,h);let g=o(h,`.fx-tracker-meter-fill`),_=o(d,`input`),v=o(f,`[data-a=stop]`),y=Array.from(f.querySelectorAll(`[data-d]`)),b=!1,x={cancelled:!1},S=``,C=e=>{let t=K(),n=t?nt(U.project,t):void 0;if(!t||n?.kind!==`video`){k(`Select a video layer in the timeline first`);return}let r=Z(t.id)??Ar(t,e);r.kind=e,Hr(`track`),k(`Click the viewer to place the track point on a feature, then Analyze Forward`),H.emit(`track`)};for(let t of Array.from(e.querySelectorAll(`[data-k]`)))t.addEventListener(`click`,()=>C(t.dataset.k));let w=()=>{let a=K(),o=Z(a?.id??null),l=G();n(t,a?a.name:`Select a video layer`);let d=l.layers.filter(e=>e.id!==a?.id).map(e=>[e.id,e.name]),f=d.map(e=>e.join(`:`)).join(`|`);f!==S&&(S=f,s.replaceChildren(...[[``,`None`],...d].map(([e,t])=>Object.assign(document.createElement(`option`),{value:e,textContent:t})))),o&&(document.activeElement!==i&&(i.value=o.kind),document.activeElement!==s&&(s.value=o.targetId),document.activeElement!==c&&(c.value=String(o.feat)),document.activeElement!==u&&(u.value=String(o.search)),_.checked=o.adapt);let h=!o||b;for(let e of[i,s,c,u,_])e.disabled=h;for(let e of y)e.disabled=h;for(let e of Array.from(p.querySelectorAll(`button`)))e.disabled=h;for(let t of Array.from(e.querySelectorAll(`[data-k]`)))t.disabled=b;v.disabled=!b,r(e.querySelector(`[data-k=transform]`),`is-active`,Q.tool===`track`&&o?.kind===`transform`),r(e.querySelector(`[data-k=stabilize]`),`is-active`,Q.tool===`track`&&o?.kind===`stabilize`),b||n(m,o?o.pts.size>1?`${o.pts.size} frames tracked. ${o.kind===`stabilize`?`Apply writes counter-motion keyframes to the layer.`:`Pick a Motion Target and Apply to write Position keyframes.`}`:`Place the point on a feature with the viewer tool, then Analyze.`:`Choose Track Motion or Stabilize Motion for the selected video layer.`)};i.addEventListener(`change`,()=>{let e=Z(K()?.id??null);e&&(e.kind=i.value,H.emit(`track`))}),s.addEventListener(`change`,()=>{let e=Z(K()?.id??null);e&&(e.targetId=s.value)}),c.addEventListener(`change`,()=>{let e=Z(K()?.id??null);e&&(e.feat=Math.max(16,+c.value||56),H.emit(`track`))}),u.addEventListener(`change`,()=>{let e=Z(K()?.id??null);e&&(e.search=Math.max(16,+u.value||64),H.emit(`track`))}),_.addEventListener(`change`,()=>{let e=Z(K()?.id??null);e&&(e.adapt=_.checked)}),o(p,`[data-a=reset]`).addEventListener(`click`,()=>{let e=Z(K()?.id??null);e&&Nr(e)}),o(p,`[data-a=apply]`).addEventListener(`click`,()=>{let e=Z(K()?.id??null);e&&k(Vr(e))}),v.addEventListener(`click`,()=>{x.cancelled=!0});for(let e of y)e.addEventListener(`click`,async()=>{let t=Z(K()?.id??null);if(t&&!b){b=!0,x={cancelled:!1},w(),n(m,`Analyzing`);try{await Br(t,+(e.dataset.d??`1`),(e,t)=>{g.style.width=`${Math.round(e/Math.max(1,t)*100)}%`,n(m,`Analyzing ${e} of ${t} frames`)},x)}catch(e){k(e instanceof Error?e.message:String(e),`error`)}finally{b=!1,g.style.width=`0%`,w()}}});for(let e of[`sel`,`comp`,`track`,`tool`])H.on(e,w);return w(),e}function Kr(e,t){let n=a(``),i=o(n,`.fx-group-tabs`),s=o(n,`.fx-group-body`),c=[],l=[],u=e=>{t.forEach((t,n)=>{r(c[n],`is-active`,e===n),l[n].hidden=e!==n}),t[e].on?.()};return t.forEach((e,t)=>{let n=a(``);n.textContent=e.title,n.addEventListener(`click`,()=>u(t)),i.appendChild(n),c.push(n);let r=a(``);r.appendChild(e.el),s.appendChild(r),l.push(r)}),u(0),n.addEventListener(`pointerdown`,()=>{for(let e of document.querySelectorAll(`.fx-group`))r(e,`is-focused`,e===n)},!0),n.show=e=>{let n=t.findIndex(t=>t.id===e);n>=0&&u(n)},n}var qr=e=>``,Jr=[`Keylight`,`Advanced Spill Suppressor`,`Matte Choker`,`Simple Choker`];function Yr(){return G().layers.filter(e=>e.effects.some(e=>e.kind===`Keylight`))}function Xr(){let e=Yr()[0];return e?e.effects.some(e=>e.kind===`Matte View`&&e.on)?`matte`:e.effects.find(e=>e.kind===`Keylight`)?.on?`final`:`source`:``}function Zr(e){for(let t of Yr())for(let n of t.effects)n.kind===`Matte View`?n.on=e===`matte`:Jr.includes(n.kind)&&(n.on=e!==`source`);H.emit(`frame`),H.emit(`comp`)}async function Qr(){try{let{project:e,handles:t,track:n}=await Er();if(Tt(e),n){let e=jr(t.phone,`transform`,0,n);e.targetId=t.screen.id,Vr(e),e.targetId=t.ping.id,Vr(e),Ot(t.lockId),Vr(jr(t.stable,`stabilize`,0,n)),Ot(t.heroId)}for(let e of U.project.comps)await W.warm(e);Ot(t.heroId),U.sel=t.phone.id,H.emit(`sel`),J(3),await W.prepare(G(),U.time),W.render(G(),U.time,document.createElement(`canvas`),.1),vt(),U.dirty=!1,H.emit(`frame`),H.emit(`project`)}catch(e){k(`${e instanceof Error?e.message:String(e)}; opened the generated sample instead`,`error`),Et()}}function $r(){let e=new Blob([ve(U.project)],{type:`application/json`}),t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=`${U.project.name.replace(/\W+/g,`_`)}.fvxdemo.json`,t.click(),U.dirty=!1,H.emit(`status`),k(`Project saved as a .fvxdemo.json file`)}function ei(e,t,r,i,s){let c=a(``),l=a(``);return n(o(l,`span`),e),l.appendChild(c),{row:l,input:c}}function ti(){let e=K();return e&&U.selProp?pt(e).find(e=>e.id===U.selProp):void 0}function ni(){let e=ti();if(!e){k(`Click a property row in Effect Controls or the Timeline first`);return}let t=new d(`Wiggler · ${e.label}`,360),n=ei(`Frequency (keys per second)`,4,.5,30,.5),r=ei(`Magnitude${e.unit}`,30,0,5e3,1);t.body.append(n.row,r.row),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`Apply`,`primary`,()=>{$t(e,+n.input.value,+r.input.value),t.close()}),t.open()}function ri(){let e=ti();if(!e||e.prop.k.length<3){k(`Select an animated property with three or more keyframes`);return}let t=new d(`Smoother · ${e.label}`,360),n=ei(`Tolerance`,4,0,1e3,.5);t.body.append(n.row),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`Apply`,`primary`,()=>{k(`Removed ${en(e,+n.input.value)} keyframes`),t.close()}),t.open()}function ii(){let t=new d(`About the FormVFX keying demo`,480);t.body.appendChild(a(`
${qr(44)}
FormVFX
Version ${e} · Apache-2.0 · NodeAgentc, Inc.
Keylight, Advanced Spill Suppressor and the chokers, hand-keyed Mask Paths and the Tracker panel run here as compact TypeScript on Canvas 2D, inside the app's own interface files. FormVFX itself keys, tracks and stabilizes on its Rust engine.
-
Nothing is uploaded: the footage you drop stays in this tab.
`)),t.button(`Close`,`primary`,()=>t.close()),t.open()}function ti(){let e=()=>[{label:`Text`,run:Et},{label:`Solid`,run:Ot},{label:`Rectangle`,run:()=>Dt(`rect`)},{label:`Ellipse`,run:()=>Dt(`ellipse`)},{label:`Star`,run:()=>Dt(`star`)},{label:`Adjustment Layer`,run:kt},{label:`Null Object`,run:At}];return[[`File`,()=>[{label:`New Project`,run:Ct},{label:`Open Keying Lab Project`,run:()=>void Jr()},{label:`Open Project...`,shortcut:`Cmd+O`,run:()=>void sn(`.json,.fvxdemo`,!1).then(e=>on(e))},{label:`Save Project`,shortcut:`Cmd+S`,run:Yr},`-`,{label:`Import Footage...`,shortcut:`Cmd+I`,run:()=>void sn(`image/*,video/*`,!0).then(e=>on(e))},{label:`Import as Composition...`,run:()=>void sn(`image/*,video/*`,!1).then(e=>on(e,!0))},`-`,{label:`Render Queue`,run:()=>H.emit(`showqueue`)}]],[`Edit`,()=>[{label:`Undo`,shortcut:`Cmd+Z`,enabled:vt(),run:gt},{label:`Redo`,shortcut:`Shift+Cmd+Z`,enabled:yt(),run:_t},`-`,{label:`Duplicate`,shortcut:`Cmd+D`,run:Ft},{label:`Delete`,shortcut:`Delete`,run:()=>Pt()},{label:`Split Layer`,shortcut:`Shift+Cmd+D`,run:Lt}]],[`Composition`,()=>[...U.project.comps.map(e=>({label:e.name,checked:e.id===U.project.active,run:()=>wt(e.id)})),`-`,{label:`Go to Start`,shortcut:`Home`,run:()=>J(0)},{label:`Go to End`,shortcut:`End`,run:()=>J(G().dur)}]],[`Layer`,()=>[{label:`New`,children:e},{label:`Add Mask`,children:[{label:`Rectangle Mask`,run:()=>Ht(`rect`)},{label:`Ellipse Mask`,run:()=>Ht(`ellipse`)},{label:`Pen Mask Path`,run:()=>Rr(`pen`)}]},{label:`Text Animation Preset`,children:Ve.map(e=>({label:e.name,run:()=>Bt(e.name)}))}]],[`Effect`,()=>Fe.map(e=>({label:e,children:Me.filter(t=>t.cat===e).map(e=>({label:e.kind,run:()=>Rt(e.kind)}))}))],[`Animation`,()=>[{label:`Toggle Keyframe at Playhead`,run:()=>{let e=Zr();e?qt(e):D(`Click a property row first`)}},{label:`Keyframe Interpolation`,children:ae.map(([e,t])=>({label:t,run:()=>{let t=Zr();t?Jt(t,e):D(`Click a property row first`)}}))},`-`,{label:`Wiggler...`,run:Qr},{label:`Smoother...`,run:$r}]],[`View`,()=>Object.entries(x).map(([e,t])=>({label:`Theme: ${t.label}`,checked:te().theme===e,run:()=>re(e)}))],[`Help`,()=>[{label:`About the keying demo`,run:ei},{label:`FormVFX on GitHub`,run:()=>window.open(`https://github.com/nodemode-dev/formVFX`,`_blank`,`noopener`)}]]]}var ni=``;function ri(){ne();let t=o(document,`#app`),s=a(`
+
Nothing is uploaded: the footage you drop stays in this tab.
`)),t.button(`Close`,`primary`,()=>t.close()),t.open()}function ai(){let e=()=>[{label:`Text`,run:At},{label:`Solid`,run:Mt},{label:`Rectangle`,run:()=>jt(`rect`)},{label:`Ellipse`,run:()=>jt(`ellipse`)},{label:`Star`,run:()=>jt(`star`)},{label:`Adjustment Layer`,run:Nt},{label:`Null Object`,run:Pt}];return[[`File`,()=>[{label:`New Project`,run:Dt},{label:`Open Keying Lab Project`,run:()=>void Qr()},{label:`Open Project...`,shortcut:`Cmd+O`,run:()=>void dn(`.json,.fvxdemo`,!1).then(e=>un(e))},{label:`Save Project`,shortcut:`Cmd+S`,run:$r},`-`,{label:`Import Footage...`,shortcut:`Cmd+I`,run:()=>void dn(`image/*,video/*`,!0).then(e=>un(e))},{label:`Import as Composition...`,run:()=>void dn(`image/*,video/*`,!1).then(e=>un(e,!0))},`-`,{label:`Render Queue`,run:()=>H.emit(`showqueue`)}]],[`Edit`,()=>[{label:`Undo`,shortcut:`Cmd+Z`,enabled:St(),run:bt},{label:`Redo`,shortcut:`Shift+Cmd+Z`,enabled:Ct(),run:xt},`-`,{label:`Duplicate`,shortcut:`Cmd+D`,run:zt},{label:`Delete`,shortcut:`Delete`,run:()=>Rt()},{label:`Split Layer`,shortcut:`Shift+Cmd+D`,run:Vt}]],[`Composition`,()=>[...U.project.comps.map(e=>({label:e.name,checked:e.id===U.project.active,run:()=>Ot(e.id)})),`-`,{label:`Go to Start`,shortcut:`Home`,run:()=>J(0)},{label:`Go to End`,shortcut:`End`,run:()=>J(G().dur)}]],[`Layer`,()=>[{label:`New`,children:e},{label:`Add Mask`,children:[{label:`Rectangle Mask`,run:()=>Kt(`rect`)},{label:`Ellipse Mask`,run:()=>Kt(`ellipse`)},{label:`Pen Mask Path`,run:()=>Hr(`pen`)}]},{label:`Text Animation Preset`,children:We.map(e=>({label:e.name,run:()=>Wt(e.name)}))}]],[`Effect`,()=>Re.map(e=>({label:e,children:Fe.filter(t=>t.cat===e).map(e=>({label:e.kind,run:()=>Ht(e.kind)}))}))],[`Animation`,()=>[{label:`Toggle Keyframe at Playhead`,run:()=>{let e=ti();e?Zt(e):k(`Click a property row first`)}},{label:`Keyframe Interpolation`,children:se.map(([e,t])=>({label:t,run:()=>{let t=ti();t?Qt(t,e):k(`Click a property row first`)}}))},`-`,{label:`Wiggler...`,run:ni},{label:`Smoother...`,run:ri}]],[`View`,()=>Object.entries(ee).map(([e,t])=>({label:`Theme: ${t.label}`,checked:re().theme===e,run:()=>ae(e)}))],[`Help`,()=>[{label:`About the keying demo`,run:ii},{label:`FormVFX on GitHub`,run:()=>window.open(`https://github.com/nodemode-dev/formVFX`,`_blank`,`noopener`)}]]]}var oi=``;function si(){ie();let t=o(document,`#app`),s=a(`
`);return e.addEventListener(`click`,()=>{gn=e.dataset.key,U.emit(`project`)}),e.addEventListener(`dblclick`,()=>{let t=e.dataset.key.slice(2);if(e.dataset.key.startsWith(`c:`))wt(t);else{let e=d(t);e&&Mt(e)}}),e},update:(e,t)=>{let i=o(e,`.fx-item-ic`);i.dataset.i!==t.icon&&(i.dataset.i=t.icon,i.innerHTML=l(t.icon,14)),n(o(e,`.fx-item-n`),t.name),n(o(e,`.fx-item-type`),t.type),n(o(e,`.fx-item-size`),t.size),n(o(e,`.fx-item-dur`),t.dur),r(e,`is-selected`,gn===t.key),r(e,`is-active`,t.kind===`comp`&&t.id===W.project.active)}});let m=_n().find(e=>e.key===gn);n(o(e,`.pj-name`),m?.name??W.project.name),n(o(e,`.pj-l1`),m?`${m.type} ${m.size}`:`${W.project.comps.length} compositions`),n(o(e,`.pj-l2`),m?m.dur:`${W.project.footage.length} footage items`);let h=m?.kind===`footage`?d(m.id):void 0;n(o(e,`.pj-l3`),h?h.size?`${(h.size/1024).toFixed(0)} KB ${h.mime}`:`Procedural, made in this tab`:``);let g=c.getContext(`2d`);if(g.clearRect(0,0,104,58),h?.src&&(!(h.src instanceof HTMLVideoElement)||h.src.readyState>=2)){let e=Math.min(104/h.w,58/h.h);g.drawImage(h.src,(104-h.w*e)/2,(58-h.h*e)/2,h.w*e,h.h*e)}else if(!h){let e=W.project.comps.find(e=>e.id===(m?.kind===`comp`?m.id:W.project.active))??K();if(e){let t=Math.min(104/e.w,58/e.h);G.render(e,Math.min(W.time,e.dur-1/e.fps),u,t),g.drawImage(u,(104-u.width)/2,(58-u.height)/2)}}n(o(e,`.pj-count`),`${p.length} items`)};e.addEventListener(`click`,e=>{let t=e.target.closest(`[data-a]`);if(!t)return;let n=gn.startsWith(`f:`)?d(gn.slice(2)):void 0;switch(t.dataset.a){case`import`:sn(`image/*,video/*,.json,.fvxdemo`,!0).then(e=>on(e));break;case`newcomp`:{let e=fe(`Comp ${W.project.comps.length+1}`);W.project.comps.push(e),J(),wt(e.id);break}case`fromfootage`:n?Nt(n):M(`Select a footage item first`);break;case`addlayer`:n?Mt(n):M(`Select a footage item first`)}}),s.addEventListener(`input`,f),s.addEventListener(`keydown`,e=>e.stopPropagation());for(let e of[`project`,`comp`])U.on(e,f);return e}var yn=new Set,bn=``;function xn(){let e=a(`
Double-click to apply
-
`),i=o(e,`.fx-efx-list`),s=o(e,`.fx-efx-search input`),c=e=>{e.startsWith(`fx:`)?Pt(e.slice(3)):e.startsWith(`pr:`)&&It(e.slice(3))},u=()=>{let e=s.value.trim().toLowerCase(),d=[];for(let t of ke){let n=Ee.filter(n=>n.cat===t&&(!e||n.kind.toLowerCase().includes(e)));if(n.length&&(d.push({key:`cat:${t}`,kind:`cat`,label:t,sub:String(n.length),cat:t}),!hn.has(t)||e))for(let e of n)d.push({key:`fx:${e.kind}`,kind:`fx`,label:e.kind,sub:`${e.params.length+e.colors.length} ${e.params.length+e.colors.length===1?`param`:`params`}`,cat:t})}let f=Fe.filter(t=>!e||t.name.toLowerCase().includes(e));if(f.length&&(d.push({key:`cat:Text Animation Presets`,kind:`cat`,label:`Text Animation Presets`,sub:String(f.length),cat:`Text Animation Presets`}),!hn.has(`Text Animation Presets`)||e))for(let e of f)d.push({key:`pr:${e.name}`,kind:`preset`,label:e.name,sub:`text`,cat:`Text Animation Presets`});t(i,d,{key:e=>e.key,create:e=>{let t=e.kind===`cat`?a(`
`),update:(e,t)=>{n(o(e,`.fx-rq-name`),t.name),n(o(e,`.fx-rq-out`),`${t.size} ${t.when}`);let r=o(e,`.rq-dl`);r.href!==t.url&&(r.href=t.url,r.download=t.name)}})},y=(e,t)=>{f.style.width=`${Math.round(e/Math.max(1,t)*100)}%`,n(p,`${e} / ${t}`)};return u.addEventListener(`click`,async()=>{let t=K();_={cancelled:!1};let a=c===`work`?t.workIn:0,o=c===`work`?t.workOut:t.dur,l={comp:t,renderer:G,scale:parseFloat(s),from:a,to:o,step:Math.max(1,Math.min(30,parseInt(h.value,10)||1)),signal:_,progress:y};u.disabled=!0,d.disabled=!1,n(p,`Rendering`),f.style.width=`0%`;let m=performance.now(),b=t.name.replace(/\W+/g,`_`);try{let e=null,r=``;if(i===`png`?(e=await Vn(l,W.time),r=`${b}_${Tn(W.time,t.fps)}.png`):i===`sheet`?(e=await Un({...l,from:a,to:o}),r=`${b}_contact_sheet.png`):i===`seq`?(e=await Hn(l),r=`${b}_frames.zip`):i===`gif`?(e=await Gn(l),r=`${b}.gif`):(e=await qn(l),r=`${b}.webm`),!e)n(p,`Cancelled`);else{let t=URL.createObjectURL(e);g.unshift({key:`${Date.now()}`,name:r,size:e.size>1048576?`${(e.size/1048576).toFixed(2)} MB`:`${(e.size/1024).toFixed(0)} KB`,url:t,kind:i,when:`${((performance.now()-m)/1e3).toFixed(1)} s`}),v(),f.style.width=`100%`,n(p,`Done in ${((performance.now()-m)/1e3).toFixed(1)} s`),M(`Rendered ${r}`)}}catch(e){n(p,`Failed`),M(e instanceof Error?e.message:String(e),`error`)}finally{u.disabled=!1,d.disabled=!0,r(e,`is-busy`,!1)}}),d.addEventListener(`click`,()=>{_.cancelled=!0}),e}var tr=24,nr=28,rr=new WeakMap;function ir(){let e=[];for(let t of K().layers)if(e.push({key:`L:${t.id}`,kind:`layer`,layer:t}),t.open)for(let n of lt(t))(n.group===`Transform`||Wt(n))&&e.push({key:`P:${t.id}:${n.id}`,kind:`prop`,layer:t,ref:n});return e}var ar={solid:`iSolid`,text:`iText`,shape:`iShape`,footage:`iFootage`,null:`iNull`,adjust:`iAdjust`};function or(e){if(e.kind===`layer`){let t=a(`
-
`),i=e,s=o(t,`.tl-tw`),c=sn(ae,()=>i.kind===`layer`?i.layer.blend:``,e=>{i.kind===`layer`&&(i.layer.blend=e,J())});return o(t,`.tl-mode`).appendChild(c.el),t.addEventListener(`pointerdown`,e=>{i.kind===`layer`&&!e.target.closest(`select, button`)&>(i.layer.id)}),o(t,`.fx-twirl`).addEventListener(`click`,()=>{i.kind===`layer`&&(i.layer.open=!i.layer.open,U.emit(`comp`))}),t.addEventListener(`click`,e=>{let t=e.target.closest(`[data-s]`);if(!t||i.kind!==`layer`)return;let n=i.layer;t.dataset.s===`vis`?n.vis=!n.vis:t.dataset.s===`solo`?n.solo=!n.solo:n.lock=!n.lock,J()}),$n.set(t,e=>{if(e.kind!==`layer`)return;i=e;let a=e.layer,u=K().layers.indexOf(a)+1;n(o(t,`.tl-num`),String(u)),n(o(t,`.fx-name`),a.name);let d=o(t,`.fx-label-chip`);d.style.background!==a.label&&(d.style.background=a.label);let f=o(t,`.fx-type`);f.dataset.k!==a.kind&&(f.dataset.k=a.kind,f.innerHTML=l(tr[a.kind],13)),s.innerHTML=l(a.open?`twirlOpen`:`twirl`,11),r(t,`is-selected`,W.sel===a.id),r(t,`is-off`,!a.vis);for(let e of Array.from(t.querySelectorAll(`[data-s]`)))r(e,`is-on`,e.dataset.s===`vis`?a.vis:e.dataset.s===`solo`?a.solo:a.lock);o(t,`.tl-mode`).hidden=a.kind===`null`,c.update()}),t}let t=a(`
`),i=e,s=o(t,`.fx-stopwatch`),c=o(t,`.fx-keyhere`),u=o(t,`.fx-pval`),d=[];return s.addEventListener(`click`,()=>{i.kind===`prop`&&Ht(i.ref)}),c.addEventListener(`click`,()=>{i.kind===`prop`&&Ut(i.ref)}),t.addEventListener(`pointerdown`,()=>{i.kind===`prop`&&(W.selProp=i.ref.id,gt(i.layer.id),U.emit(`selprop`))}),$n.set(t,e=>{if(e.kind!==`prop`)return;i=e;let f=e.ref;for(;d.length,`));let t=an({get:()=>N(i.ref.prop,W.time)[e]??0,set:t=>Vt(i.ref,e,t),commit:()=>J(),min:f.min,max:f.max,step:f.step,unit:e===f.dims-1?f.unit:``});d.push(t),u.appendChild(t.el)}n(o(t,`.fx-pname`),f.group.startsWith(`Effect`)?`${f.group.replace(/^Effect · (.+)#.+$/,`$1`)} · ${f.label}`:f.label);let p=Bt(f);r(s,`is-on`,p),c.innerHTML=l(p&&f.prop.k.some(e=>Math.abs(e.t-W.time)<1e-6)?`key`:`keyHollow`,12),c.style.visibility=p?`visible`:`hidden`,r(t,`is-selected`,W.selProp===f.id&&W.sel===e.layer.id);for(let e of d)e.update()}),t}function rr(){let e=a(`
+
`),i=e,s=o(t,`.tl-tw`),c=dn(ce,()=>i.kind===`layer`?i.layer.blend:``,e=>{i.kind===`layer`&&(i.layer.blend=e,J())});return o(t,`.tl-mode`).appendChild(c.el),t.addEventListener(`pointerdown`,e=>{i.kind===`layer`&&!e.target.closest(`select, button`)&&bt(i.layer.id)}),o(t,`.fx-twirl`).addEventListener(`click`,()=>{i.kind===`layer`&&(i.layer.open=!i.layer.open,U.emit(`comp`))}),t.addEventListener(`click`,e=>{let t=e.target.closest(`[data-s]`);if(!t||i.kind!==`layer`)return;let n=i.layer;t.dataset.s===`vis`?n.vis=!n.vis:t.dataset.s===`solo`?n.solo=!n.solo:n.lock=!n.lock,J()}),rr.set(t,e=>{if(e.kind!==`layer`)return;i=e;let a=e.layer,u=K().layers.indexOf(a)+1;n(o(t,`.tl-num`),String(u)),n(o(t,`.fx-name`),a.name);let d=o(t,`.fx-label-chip`);d.style.background!==a.label&&(d.style.background=a.label);let f=o(t,`.fx-type`);f.dataset.k!==a.kind&&(f.dataset.k=a.kind,f.innerHTML=l(ar[a.kind],13)),s.innerHTML=l(a.open?`twirlOpen`:`twirl`,11),r(t,`is-selected`,W.sel===a.id),r(t,`is-off`,!a.vis);for(let e of Array.from(t.querySelectorAll(`[data-s]`)))r(e,`is-on`,e.dataset.s===`vis`?a.vis:e.dataset.s===`solo`?a.solo:a.lock);o(t,`.tl-mode`).hidden=a.kind===`null`,c.update()}),t}let t=a(`
`),i=e,s=o(t,`.fx-stopwatch`),c=o(t,`.fx-keyhere`),u=o(t,`.fx-pval`),d=[];return s.addEventListener(`click`,()=>{i.kind===`prop`&&Kt(i.ref)}),c.addEventListener(`click`,()=>{i.kind===`prop`&&qt(i.ref)}),t.addEventListener(`pointerdown`,()=>{i.kind===`prop`&&(W.selProp=i.ref.id,bt(i.layer.id),U.emit(`selprop`))}),rr.set(t,e=>{if(e.kind!==`prop`)return;i=e;let f=e.ref;for(;d.length,`));let t=ln({get:()=>P(i.ref.prop,W.time)[e]??0,set:t=>Gt(i.ref,e,t),commit:()=>J(),min:f.min,max:f.max,step:f.step,unit:e===f.dims-1?f.unit:``});d.push(t),u.appendChild(t.el)}n(o(t,`.fx-pname`),f.group.startsWith(`Effect`)?`${f.group.replace(/^Effect · (.+)#.+$/,`$1`)} · ${f.label}`:f.label);let p=Wt(f);r(s,`is-on`,p),c.innerHTML=l(p&&f.prop.k.some(e=>Math.abs(e.t-W.time)<1e-6)?`key`:`keyHollow`,12),c.style.visibility=p?`visible`:`hidden`,r(t,`is-selected`,W.selProp===f.id&&W.sel===e.layer.id);for(let e of d)e.update()}),t}function sr(){let e=a(`
@@ -83,7 +83,7 @@
Drag a layer bar to move it, its ends to trim, a keyframe to retime. Wheel scrolls, Ctrl+wheel zooms.
-
`),r=o(e,`.fx-tl-rows`),i=o(e,`.fx-tl-right`),s=o(e,`.fx-tl-ruler`),c=o(e,`.fx-tl-tracks`),l=o(e,`.fx-tl-zoom`),u=o(e,`.fx-tl-tc`),d=o(e,`.fx-tl-frames`),f=[],p=0,m=1,h=0,g=0,_={},v=document.createElement(`i`);v.style.display=`none`,document.body.appendChild(v);let y=e=>(v.style.color=`var(${e})`,getComputedStyle(v).color),b=()=>{for(let e of[`--fx-track-bg`,`--fx-ruler-bg`,`--line-0`,`--line-1`,`--text-secondary`,`--text-muted`,`--fx-cti`,`--fx-workarea`,`--accent-color`,`--surface-1`,`--surface-2`,`--text-primary`])_[e]=y(e)};document.addEventListener(`nm:ui-settings-changed`,()=>{b(),D()});let x=()=>(h-16)/Math.max(.1,K().dur)*m,S=e=>8+(e-p)*x(),C=e=>(e-8)/x()+p,w=e=>Math.round(e*K().fps)/K().fps;function T(){let e=window.devicePixelRatio||1,t=i.clientWidth,n=i.clientHeight-Qn;(t!==h||n!==g)&&(h=t,g=Math.max(0,n),s.style.height=`${Qn}px`,s.width=Math.round(h*e),s.height=Math.round(Qn*e),c.width=Math.round(h*e),c.height=Math.round(g*e),c.style.width=`${h}px`,c.style.height=`${g}px`,s.style.width=`${h}px`)}let E=!1;function D(){E||(E=!0,requestAnimationFrame(()=>{E=!1,ee()}))}function ee(){if(T(),!h)return;_[`--fx-track-bg`]||b();let e=K(),t=window.devicePixelRatio||1,i=s.getContext(`2d`);i.setTransform(t,0,0,t,0,0),i.fillStyle=_[`--fx-ruler-bg`],i.fillRect(0,0,h,Qn),i.fillStyle=_[`--fx-workarea`],i.fillRect(S(e.workIn),21,S(e.workOut)-S(e.workIn),5),i.font=`11px "JetBrains Mono", monospace`,i.textBaseline=`middle`;let a=x(),o=[1/e.fps,2/e.fps,5/e.fps,10/e.fps,.5,1,2,5,10,30,60].find(e=>e*a>=70)??60,l=o/5;i.strokeStyle=_[`--text-muted`],i.fillStyle=_[`--text-secondary`],i.beginPath();for(let t=Math.floor(p/l)*l;t<=e.dur+1e-6&&S(t){let n=t*Zn-y;if(!(n+Zn<0||n>g)){if(v.fillStyle=e.kind===`layer`?_[`--surface-1`]:_[`--fx-track-bg`],v.globalAlpha=.5,v.fillRect(0,n,h,Zn),v.globalAlpha=1,v.fillStyle=_[`--line-0`],v.fillRect(0,n+Zn-1,h,1),e.kind===`layer`){let t=e.layer,r=S(t.tin),i=S(t.tout);if(v.fillStyle=t.label,v.globalAlpha=t.vis?.62:.2,v.beginPath(),v.roundRect(r,n+3,Math.max(2,i-r),17,4),v.fill(),v.globalAlpha=1,W.sel===t.id&&(v.strokeStyle=_[`--accent-color`],v.lineWidth=1.5,v.beginPath(),v.roundRect(r,n+3,Math.max(2,i-r),17,4),v.stroke()),v.fillStyle=_[`--text-primary`],v.font=`11px Inter, sans-serif`,v.textBaseline=`middle`,v.save(),v.beginPath(),v.rect(r,n,Math.max(0,i-r),Zn),v.clip(),v.fillText(t.name,r+6,n+Zn/2),v.restore(),!t.open){let e=new Set;for(let r of at(t))for(let t of r.prop.k){let r=Math.round(S(t.t));e.has(r)||(e.add(r),O(v,r,n+Zn/2,4,_[`--text-secondary`],!1))}}}else{let t=W.selProp===e.ref.id&&W.sel===e.layer.id;for(let r of e.ref.prop.k)O(v,S(r.t),n+Zn/2,5,t?_[`--accent-color`]:_[`--fx-cti`],!0,r.e===`hold`)}}});let C=Math.round(S(W.time))+.5;v.strokeStyle=_[`--fx-cti`],v.lineWidth=1,v.beginPath(),v.moveTo(C,0),v.lineTo(C,g),v.stroke(),i.fillStyle=_[`--fx-cti`],i.beginPath(),i.moveTo(C-6,16),i.lineTo(C+6,16),i.lineTo(C,26),i.closePath(),i.fill(),i.strokeStyle=_[`--fx-cti`],i.beginPath(),i.moveTo(C,26),i.lineTo(C,Qn),i.stroke(),n(u,bn(W.time,e.fps)),n(d,`${xn(W.time,e.fps)} ${e.fps} fps`)}function O(e,t,n,r,i,a,o=!1){e.beginPath(),o?e.rect(t-r+1,n-r+1,(r-1)*2,(r-1)*2):(e.moveTo(t,n-r),e.lineTo(t+r,n),e.lineTo(t,n+r),e.lineTo(t-r,n),e.closePath()),a?(e.fillStyle=i,e.fill()):(e.strokeStyle=i,e.lineWidth=1,e.stroke())}function te(){f=er(),t(r,f,{key:e=>e.key,create:nr,update:(e,t)=>$n.get(e)?.(t)})}let k=null,A=(e,t)=>{let n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}};s.addEventListener(`pointerdown`,e=>{s.setPointerCapture(e.pointerId),k={mode:`ruler`},Y(C(A(e,s).x))}),s.addEventListener(`pointermove`,e=>{k?.mode===`ruler`&&Y(C(A(e,s).x))}),s.addEventListener(`pointerup`,()=>{k=null}),c.addEventListener(`pointerdown`,e=>{let{x:t,y:n}=A(e,c),i=Math.floor((n+r.scrollTop)/Zn),a=f[i];if(c.setPointerCapture(e.pointerId),!a){k={mode:`scrub`},gt(null),Y(C(t));return}if(a.kind===`prop`){let e=a.ref.prop.k.findIndex(e=>Math.abs(S(e.t)-t)<7);if(e>=0){gt(a.layer.id),W.selProp=a.ref.id,U.emit(`selprop`),k={mode:`key`,ref:a.ref,idx:e,layer:a.layer};return}k={mode:`scrub`},Y(C(t));return}let o=a.layer;gt(o.id);let s=S(o.tin),l=S(o.tout);t>=s-4&&t<=l+4?k={mode:Math.abs(t-s)<6?`in`:Math.abs(t-l)<6?`out`:`move`,layer:o,t0:C(t),in0:o.tin,out0:o.tout}:(k={mode:`scrub`},Y(C(t)))}),c.addEventListener(`pointermove`,e=>{if(!k)return;let{x:t}=A(e,c),n=C(t),r=K();if(k.mode===`scrub`)Y(n);else if(k.mode===`key`){let e=k.ref.prop.k[k.idx];e&&(e.t=Math.max(0,Math.min(r.dur,w(n))),U.emit(`frame`),D())}else if(k.mode===`move`){let e=w(n-k.t0);k.layer.tin=k.in0+e,k.layer.tout=k.out0+e,U.emit(`frame`),D()}else k.mode===`in`?(k.layer.tin=Math.max(0,Math.min(k.layer.tout-1/r.fps,w(n))),U.emit(`frame`),D()):k.mode===`out`&&(k.layer.tout=Math.max(k.layer.tin+1/r.fps,Math.min(r.dur,w(n))),U.emit(`frame`),D())});let j=()=>{if(!k)return;let e=k;k=null,e.mode===`key`&&e.ref.prop.k.sort((e,t)=>e.t-t.t),e.mode!==`scrub`&&e.mode!==`ruler`&&J()};c.addEventListener(`pointerup`,j),c.addEventListener(`pointercancel`,j),c.addEventListener(`dblclick`,e=>{let{x:t,y:n}=A(e,c),i=f[Math.floor((n+r.scrollTop)/Zn)];if(i?.kind!==`prop`)return;let a=i.ref.prop.k.findIndex(e=>Math.abs(S(e.t)-t)<7);a>=0&&(i.ref.prop.k.splice(a,1),J())}),i.addEventListener(`wheel`,e=>{if(e.preventDefault(),e.ctrlKey||e.metaKey){let t=C(A(e,c).x);m=Math.max(1,Math.min(12,m*(e.deltaY<0?1.15:1/1.15))),l.value=String(m),p=t-(A(e,c).x-8)/x(),M()}else e.shiftKey||Math.abs(e.deltaX)>Math.abs(e.deltaY)?(p+=(e.deltaX||e.deltaY)/x(),M()):r.scrollTop+=e.deltaY;D()},{passive:!1});let M=()=>{p=Math.max(0,Math.min(Math.max(0,K().dur-(h-16)/x()),p))};l.addEventListener(`input`,()=>{m=parseFloat(l.value),M(),D()}),r.addEventListener(`scroll`,D),new ResizeObserver(()=>{T(),D()}).observe(i),e.addEventListener(`click`,e=>{let t=e.target.closest(`[data-a]`);if(!t)return;let n=K();switch(t.dataset.a){case`in`:n.workIn=Math.min(W.time,n.workOut-1/n.fps),J();break;case`out`:n.workOut=Math.max(W.time+1/n.fps,n.workIn+1/n.fps),J();break;case`split`:Nt();break;case`dup`:jt();break;case`up`:Mt(-1);break;case`down`:Mt(1);break;case`del`:At()}});let ne=()=>{te(),D()};return U.on(`comp`,ne),U.on(`sel`,ne),U.on(`selprop`,ne),U.on(`project`,ne),U.on(`frame`,()=>{te(),D()}),U.on(`time`,()=>{f.forEach((e,t)=>{let n=r.children[t];n&&$n.get(n)?.(f[t])}),D()}),e}var ir=e=>e,ar=e=>e,or=`time.value.index.fps.frame.duration.width.height.wiggle.loopOut.valueAtTime.linear.ease.easeIn.easeOut.clamp.random.noise.degreesToRadians.radiansToDegrees.length.lerp.layer.control.add.sub.mul.div.Math`.split(`.`),sr=new Set([`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`]),cr=new Set(`sin.cos.tan.atan.atan2.abs.min.max.floor.ceil.round.sqrt.pow.PI.sign.exp.log.hypot.trunc.length.toFixed.position.scale.rotation.opacity.name`.split(`.`)),lr=/\s+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|[A-Za-z_$][\w$]*|"[^"\\]*"|'[^'\\]*'|===|!==|==|!=|<=|>=|&&|\|\||[-+*/%<>!?:,.()[\]]/y;function ur(e,t){lr.lastIndex=0;let n=0,r=``;for(;lr.lastIndex0)return`Text is not allowed inside brackets`;else if(/^[A-Za-z_$]/.test(o)){if(r===`.`){if(!cr.has(o))return`"${o}" is not a property you can read`}else if(!or.includes(o)&&!sr.has(o)&&!t.has(o))return`"${o}" is not defined`}r=o}}return n===0?``:`Unbalanced brackets`}var dr=new Map;function fr(e){let t=dr.get(e);if(t)return t;let n;try{let t=e.split(`;`).map(e=>e.trim()).filter(Boolean);if(!t.length)throw Error(`Empty expression`);let r=new Set,i=[];for(let e=0;e200&&dr.clear(),dr.set(e,n),n}function pr(e,t){let n=Math.imul(e|0,374761393)+Math.imul(t|0,668265263)|0;return n=Math.imul(n^n>>>13,1274126177),n^=n>>>16,(n>>>0)/4294967296*2-1}function mr(e,t=0){let n=Math.floor(e),r=e-n,i=r*r*(3-2*r);return pr(n,t)*(1-i)+pr(n+1,t)*i}var hr=e=>Array.isArray(e)?e:[Number(e)],gr=(e,t,n)=>{if(!Array.isArray(e)&&!Array.isArray(t))return n(Number(e),Number(t));let r=hr(e),i=hr(t),a=Math.max(r.length,i.length);return Array.from({length:a},(e,t)=>n(r[Math.min(t,r.length-1)],i[Math.min(t,i.length-1)]))},_r=(e,t,n)=>gr(e,t,(e,t)=>e+(t-e)*n),vr=e=>Math.max(0,Math.min(1,e));function yr(e,t){let n=e.tc?.controls.find(e=>e.label===t);if(!n)throw Error(`No Template Control named "${t}"`);if(n.kind===`check`)return+!!n.value;if(n.kind===`color`){let e=parseInt(String(n.value).replace(`#`,``),16);return[(e>>16&255)/255,(e>>8&255)/255,(e&255)/255,1]}return n.value}function br(e,t){let{comp:n,layer:r,t:i,prop:a,pid:o}=e,s=Array.from(o+r.id).reduce((e,t)=>e*31+t.charCodeAt(0)|0,7),c=(e,t,n,r,i,a)=>e<=t?r:e>=n?i:_r(r,i,a((e-t)/(n-t))),l=e=>{let t=N(a,e);return t.length===1?t[0]:t};return{time:i,value:t,index:n.layers.indexOf(r)+1,fps:n.fps,frame:Math.round(i*n.fps),duration:n.dur,width:n.w,height:n.h,wiggle:(e,n,r=1,a=.5)=>{let o=t=>{let o=0,c=1,l=e,u=0;for(let e=0;ee+o(t)):Number(t)+o(0)},loopOut:(e=`cycle`)=>{let n=a.k;if(n.length<2||i<=n[n.length-1].t)return t;let r=n[0].t,o=n[n.length-1].t,s=o-r,c=(i-r)/s;if(e===`pingpong`){let e=(i-r)%(2*s);return l(e<=s?r+e:o-(e-s))}let u=l(r+(i-r)%s);return e===`offset`?gr(u,gr(n[n.length-1].v,n[0].v,(e,t)=>(e-t)*Math.floor(c)),(e,t)=>e+t):u},valueAtTime:l,linear:(e,t,n,r,i)=>c(e,t,n,r,i,e=>e),ease:(e,t,n,r,i)=>c(e,t,n,r,i,e=>e*e*(3-2*e)),easeIn:(e,t,n,r,i)=>c(e,t,n,r,i,e=>e*e*e),easeOut:(e,t,n,r,i)=>c(e,t,n,r,i,e=>1-(1-e)**3),clamp:(e,t,n)=>Math.max(t,Math.min(n,e)),random:(e=1,t)=>{let n=vr((pr(s+Math.floor(i*1e3),5)+1)/2);return t===void 0?n*e:e+n*(t-e)},noise:e=>mr(e,s),degreesToRadians:e=>e*Math.PI/180,radiansToDegrees:e=>e*180/Math.PI,length:(e,t)=>Math.hypot(...t===void 0?hr(e):gr(e,t,(e,t)=>e-t)),lerp:(e,t,n)=>_r(e,t,n),add:(e,t)=>gr(e,t,(e,t)=>e+t),sub:(e,t)=>gr(e,t,(e,t)=>e-t),mul:(e,t)=>gr(e,t,(e,t)=>e*t),div:(e,t)=>gr(e,t,(e,t)=>e/t),control:e=>yr(n,e),layer:e=>{let t=n.layers.find(t=>t.name===e);if(!t)throw Error(`No layer named "${e}"`);let r=e=>{let t=N(e,i);return t.length===1?t[0]:t};return{name:t.name,position:r(t.pos),scale:r(t.scale),rotation:r(t.rot),opacity:r(t.opacity)}},Math}}function xr(e,t,n){let r=fr(e);if(!r.fn)return{ok:!1,error:r.error};try{let e=r.fn(br(t,n));if(typeof e==`string`)return{ok:!0,value:e};let i=typeof e==`boolean`?[+!!e]:hr(e);return!i.length||i.some(e=>typeof e!=`number`||!Number.isFinite(e))?{ok:!1,error:`The expression did not produce a number`}:{ok:!0,value:i}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}var Sr=new Map;function Cr(e,t){let n=ir(e);if(!n.layers.some(e=>e.ex&&Object.keys(e.ex).length))return Sr.clear(),e;Sr.clear();let r=n.layers.map(e=>{if(!e.ex||!Object.keys(e.ex).length)return e;let r=JSON.parse(JSON.stringify(e)),i=fe(r,Oe),a=fe(e,Oe);for(let[o,s]of Object.entries(e.ex)){let c=`${e.id}:${o}`;if(o===`text.value`){if(!r.text)continue;let i=xr(s,{prop:{v:[0],k:[]},dims:1,pid:o,layer:e,comp:n,t},e.text.value);i.ok?r.text.value=Array.isArray(i.value)?i.value.join(`, `):i.value:Sr.set(c,i.error);continue}let l=i.find(e=>e.id===o),u=a.find(e=>e.id===o);if(!l||!u){Sr.set(c,`This property no longer exists`);continue}let d=N(u.prop,t),f=xr(s,{prop:u.prop,dims:u.dims,pid:o,layer:e,comp:n,t},d.length===1?d[0]:d);if(!f.ok){Sr.set(c,f.error);continue}let p=f.value;l.prop.v=d.map((e,t)=>Number.isFinite(p[t])?p[t]:p[0]??e),l.prop.k=[]}return r});return{...e,layers:r}}function wr(e,t,n,r){let i=ar(t).ex?.[n];if(!i)return{ok:!1,error:``};let a=ir(e);if(n===`text.value`){let e=xr(i,{prop:{v:[0],k:[]},dims:1,pid:n,layer:ar(t),comp:a,t:r},t.text?.value??``);return e.ok?{ok:!0,text:String(e.value)}:e}let o=fe(t,Oe).find(e=>e.id===n);if(!o)return{ok:!1,error:`This property no longer exists`};let s=N(o.prop,r),c=xr(i,{prop:o.prop,dims:o.dims,pid:n,layer:ar(t),comp:a,t:r},s.length===1?s[0]:s);return c.ok?{ok:!0,text:c.value.map(e=>e.toFixed(2)).join(`, `)}:c}var Q=(e,t,n,r,i,a=1,o=``)=>({k:e,label:t,def:n,min:r,max:i,step:a,unit:o}),Tr=e=>e,Er=`Layer 3D`,Dr=`Camera`,Or=[{kind:Er,cat:`Perspective`,colors:[],apply:Tr,params:[Q(`z`,`Position Z`,0,-6e3,6e3,1,` px`),Q(`rx`,`X Orientation`,0,-360,360,.5,` deg`),Q(`ry`,`Y Orientation`,0,-360,360,.5,` deg`),Q(`fade`,`Depth Fade`,0,0,100,1,` %`)]},{kind:Dr,cat:`Perspective`,colors:[],apply:Tr,params:[Q(`px`,`Position X`,640,-2e4,2e4,1,` px`),Q(`py`,`Position Y`,360,-2e4,2e4,1,` px`),Q(`pz`,`Position Z`,-1500,-2e4,2e4,1,` px`),Q(`ix`,`Point of Interest X`,640,-2e4,2e4,1,` px`),Q(`iy`,`Point of Interest Y`,360,-2e4,2e4,1,` px`),Q(`iz`,`Point of Interest Z`,0,-2e4,2e4,1,` px`),Q(`zoom`,`Zoom`,1500,100,2e4,1,` px`),Q(`roll`,`Roll`,0,-180,180,.1,` deg`)]}],kr=(e,t)=>[e[0]-t[0],e[1]-t[1],e[2]-t[2]],Ar=(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2],jr=(e,t)=>[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]],Mr=e=>{let t=Math.hypot(e[0],e[1],e[2])||1;return[e[0]/t,e[1]/t,e[2]/t]},Nr=(e,t)=>e.effects.find(e=>e.on&&e.kind===t),Pr=e=>e.kind!==`null`&&e.kind!==`adjust`&&!!Nr(e,`Layer 3D`);function Fr(e,t){let n=e.layers.find(e=>e.vis&&Nr(e,`Camera`)),r=n?Nr(n,Dr):null,i=(e,n)=>r&&r.p[e]?P(r.p[e],t):n,a=[i(`px`,e.w/2),i(`py`,e.h/2),i(`pz`,-1500)],o=Mr(kr([i(`ix`,e.w/2),i(`iy`,e.h/2),i(`iz`,0)],a)),s=Mr(jr(o,[0,-1,0]));Math.abs(o[1])>.999&&(s=[1,0,0]);let c=jr(o,s),l=i(`roll`,0)*Math.PI/180,u=Math.cos(l),d=Math.sin(l),f=[s[0]*u+c[0]*d,s[1]*u+c[1]*d,s[2]*u+c[2]*d];return c=[c[0]*u-s[0]*d,c[1]*u-s[1]*d,c[2]*u-s[2]*d],{p:a,r:f,d:c,f:o,zoom:i(`zoom`,1500)}}function Ir(e,t,n){let r=Nr(e,Er),i=We(t,e,n),[a,o]=N(e.anchor,n),[s,c]=Ue(i,a,o),l=P(r.p.rx,n)*Math.PI/180,u=P(r.p.ry,n)*Math.PI/180;return{px:s,py:c,z:P(r.p.z,n),sx:Math.sin(u),cx:Math.cos(u),sy:Math.sin(l),cy:Math.cos(l)}}function Lr(e,t,n){let r=e-n.px,i=t-n.py,a=i*n.cy,o=-i*n.sy;return[n.px+r*n.cx-o*n.sx,n.py+a,n.z+r*n.sx+o*n.cx]}function Rr(e,t,n,r){let i=kr(t,e.p),a=Ar(i,e.f),o=e.zoom/Math.max(.001,a);return[n/2+Ar(i,e.r)*o,r/2+Ar(i,e.d)*o,a]}var zr=[],Br=new Set;function Vr(e,t){let n=zr.find(n=>!Br.has(n.c)&&n.c.width===e&&n.c.height===t);if(!n){let r=document.createElement(`canvas`);if(r.width=e,r.height=t,n={c:r,ctx:r.getContext(`2d`,{willReadFrequently:!0})},zr.push(n),zr.length>12){let t=zr.filter(t=>Br.has(t.c)||t===n||t.c.width===e);zr.length=0,zr.push(...t)}}return Br.add(n.c),n.ctx.setTransform(1,0,0,1,0,0),n.ctx.globalAlpha=1,n.ctx.globalCompositeOperation=`source-over`,n.ctx.clearRect(0,0,e,t),n}var Hr=e=>{Br.delete(e.c)};function Ur(e,t,n,r){let i=(n[1][0]-n[0][0])*(n[2][1]-n[0][1])-(n[2][0]-n[0][0])*(n[1][1]-n[0][1]);if(Math.abs(i)<1e-9)return;let a=r[1][0]-r[0][0],o=r[1][1]-r[0][1],s=r[2][0]-r[0][0],c=r[2][1]-r[0][1],l=n[1][0]-n[0][0],u=n[1][1]-n[0][1],d=n[2][0]-n[0][0],f=n[2][1]-n[0][1],p=(a*f-s*u)/i,m=(s*l-a*d)/i,h=(o*f-c*u)/i,g=(c*l-o*d)/i,_=r[0][0]-p*n[0][0]-m*n[0][1],v=r[0][1]-h*n[0][0]-g*n[0][1],y=(r[0][0]+r[1][0]+r[2][0])/3,b=(r[0][1]+r[1][1]+r[2][1])/3;e.save(),e.beginPath(),r.forEach((t,n)=>{let r=t[0]-y,i=t[1]-b,a=Math.hypot(r,i)||1,o=t[0]+r/a*.7,s=t[1]+i/a*.7;n?e.lineTo(o,s):e.moveTo(o,s)}),e.closePath(),e.clip(),e.setTransform(p,h,m,g,_,v);let x=Math.max(0,Math.floor(Math.min(n[0][0],n[1][0],n[2][0])-1)),S=Math.max(0,Math.floor(Math.min(n[0][1],n[1][1],n[2][1])-1)),C=Math.min(t.width,Math.ceil(Math.max(n[0][0],n[1][0],n[2][0])+1)),w=Math.min(t.height,Math.ceil(Math.max(n[0][1],n[1][1],n[2][1])+1));C>x&&w>S&&e.drawImage(t,x,S,C-x,w-S,x,S,C-x,w-S),e.restore()}var Wr=new Map,Gr=(e,t)=>t=e.tout-1e-6,Kr={footage:[]},qr=new nt(()=>({...W.project,footage:Kr.footage})),Jr=G.render.bind(G);function Yr(e,t,n,r,i,a,o){let s=We(e,t,n),c=Math.hypot(s[0],s[1])||1e-6,l=(s[0]*s[3]-s[1]*s[2])/c,[u,d]=N(t.anchor,n),[f,p]=Ue(s,u,d),m=JSON.parse(JSON.stringify(t));return m.parent=null,m.matte=`none`,m.blend=`source-over`,m.pos=j(f-r,p-i),m.anchor=j(u,d),m.scale=j(c*100,l*100),m.rot=j(Math.atan2(s[1],s[0])*180/Math.PI),m.opacity=j(100),m.effects=m.effects.filter(e=>e.kind!==Er),{id:`tex`,name:`tex`,w:a,h:o,fps:e.fps,dur:e.dur,bg:`#000000`,layers:[m],workIn:0,workOut:e.dur}}function Xr(e,t,n,r,i,a,o,s){let c=Ir(t,e,n),l=Xe(W.project,e,t,n),u=4+(t.effects.some(e=>e.on&&e.kind!==`Layer 3D`)?120:0)+(t.kind===`text`?240:0),d=Math.floor(Math.min(...l.map(e=>e[0]))-u),f=Math.floor(Math.min(...l.map(e=>e[1]))-u),p=Math.ceil(Math.max(...l.map(e=>e[0]))+u-d),m=Math.ceil(Math.max(...l.map(e=>e[1]))+u-f);if(p<2||m<2)return;let h=Math.min(Math.max(.5,Math.min(1,i*1.5)),2200/Math.max(p,m)),g=Wr.get(t.id);g||(g=document.createElement(`canvas`),Wr.set(t.id,g)),Jr(Yr(e,t,n,d,f,p,m),n,g,h,!0);let _=P(Nr(t,Er).p.fade,n)/100,v=Math.min(14,Math.max(3,Math.ceil(p/90))),y=Math.min(14,Math.max(3,Math.ceil(m/90))),b=[];for(let t=0;t<=y;t+=1){let n=[];for(let a=0;a<=v;a+=1){let o=d+p*a/v,s=f+m*t/y,[l,u,g]=Rr(r,Lr(o,s,c),e.w,e.h);n.push({s:[(o-d)*h,(s-f)*h],d:[l*i,u*i],z:g})}b.push(n)}if(b.some(e=>e.some(e=>e.z<20)))return;let x=Vr(o,s);for(let e=0;ee.solo),u=e.layers.filter(e=>e.vis&&(!l||e.solo)&&!Gr(e,t)),d=Fr(e,t),f=[],p=[],m=()=>{if(!f.length)return;let n={id:`acc`,name:`acc`,kind:`footage`,vis:!0,solo:!1,lock:!1,open:!1,label:``,tin:0,tout:e.dur,srcStart:0,blend:`source-over`,matte:`none`,parent:null,anchor:j(0,0),pos:j(0,0),scale:j(100,100),rot:j(0),opacity:j(100),color:``,color2:``,gradAngle:0,w:e.w,h:e.h,footage:`acc`,text:null,shape:null,effects:[],masks:[]},i={...e,layers:[...f,n]},c=Vr(a,o);qr.render(i,t,c.c,r,!0),s.ctx.globalCompositeOperation=`copy`,s.ctx.drawImage(c.c,0,0),s.ctx.globalCompositeOperation=`source-over`,Hr(c),f=[]},h=()=>{if(!p.length)return;m();let n=p.map(n=>{let r=Ir(n,e,t);return{l:n,z:Rr(d,[r.px,r.py,r.z],e.w,e.h)[2]}});n.sort((e,t)=>t.z-e.z);for(let{l:i}of n)Xr(e,i,t,d,r,s,a,o);p=[]};for(let e=u.length-1;e>=0;--e){let t=u[e];t.kind!==`null`&&(Pr(t)?p.push(t):(h(),f.unshift(t)))}h(),m();let g=n.getContext(`2d`);n.width!==a&&(n.width=a),n.height!==o&&(n.height=o),g.setTransform(1,0,0,1,0,0),g.globalCompositeOperation=`copy`,g.drawImage(s.c,0,0),g.globalCompositeOperation=`source-over`,Hr(s)}function Qr(){for(let e of Or)Ee.some(t=>t.kind===e.kind)||Ee.push(e);ke.includes(`Perspective`)||ke.push(`Perspective`),G.render=(e,t,n,r,i=!1)=>{let a=performance.now(),o=Cr(e,t);o.layers.some(Pr)?Zr(o,t,n,r,i):Jr(o,t,n,r,i),G.lastMs=performance.now()-a,G.lastLayers=o.layers.length}}var $r=e=>e.layers.some(e=>!!Nr(e,Dr));function ei(e){let t=ir(e);return t.tc||={name:e.name,controls:[]},t.tc}function ti(e,t,n,r,i=0,a=100,o=1){return{id:I(`K`),label:e,kind:t,value:n,min:i,max:a,step:o,targets:r}}function ni(e,t,n){let r=e.layers.find(e=>e.id===n.layer);if(!r)return!1;let i=t.value,a=n.path;if(a===`text.value`&&r.text)r.text.value=String(i),r.name=String(i)||`Text`;else if(a===`text.fill`&&r.text)r.text.fill=String(i);else if(a===`text.stroke`&&r.text)r.text.stroke=String(i);else if(a===`shape.fill`&&r.shape)r.shape.fill=String(i);else if(a===`shape.stroke`&&r.shape)r.shape.stroke=String(i);else if(a===`solid.color`)r.color=String(i);else if(a===`vis`)r.vis=!!i;else if(a.startsWith(`fxc:`)){let[e,t]=a.slice(4).split(`.`),n=r.effects.find(t=>t.id===e);if(!n)return!1;n.c[t]=String(i)}else if(a.startsWith(`prop:`)){let e=fe(r,Oe).find(e=>e.id===a.slice(5));if(!e||e.prop.k.length)return!1;e.prop.v=[Math.max(e.min,Math.min(e.max,Number(i)))]}else return!1;return!0}function ri(e,t){for(let n of t.targets)ni(e,t,n)}function ii(e){let t=[];e.text&&(t.push({label:`Source Text`,kind:`text`,path:`text.value`,value:e.text.value,min:0,max:0,step:0}),t.push({label:`Fill Color`,kind:`color`,path:`text.fill`,value:e.text.fill,min:0,max:0,step:0})),e.shape&&(t.push({label:`Fill Color`,kind:`color`,path:`shape.fill`,value:e.shape.fill,min:0,max:0,step:0}),t.push({label:`Stroke Color`,kind:`color`,path:`shape.stroke`,value:e.shape.stroke,min:0,max:0,step:0})),e.kind===`solid`&&t.push({label:`Solid Color`,kind:`color`,path:`solid.color`,value:e.color,min:0,max:0,step:0}),t.push({label:`Visible`,kind:`check`,path:`vis`,value:e.vis,min:0,max:1,step:1});for(let n of fe(e,Oe))n.dims===1&&!n.prop.k.length&&!/^an\./.test(n.id)&&t.push({label:`${n.group.replace(/^Effect · /,``).replace(/#.+$/,``)} ${n.label}`,kind:`slider`,path:`prop:${n.id}`,value:n.prop.v[0],min:n.min,max:Math.min(n.max,5e3),step:n.step});return t}var ai=[[`Wiggle`,`wiggle(1.5, 12)`],[`Loop`,`loopOut("pingpong")`],[`Spin`,`time * 40`],[`Pulse`,`mul(value, 1 + 0.04 * Math.sin(time * 3))`],[`Ease`,`ease(time, 1, 3, 0, 100)`],[`Control`,`value + control("Float")`]];function oi(){let e=q();if(!e)return[];let t=[];e.kind===`text`&&t.push({id:`text.value`,label:`Text > Source Text`});for(let n of at(e))t.push({id:n.id,label:`${n.group.replace(/^Effect · /,``).replace(/#.+$/,``)} > ${n.label}`});return t}function si(){let e=a(`
+
`),r=o(e,`.fx-tl-rows`),i=o(e,`.fx-tl-right`),s=o(e,`.fx-tl-ruler`),c=o(e,`.fx-tl-tracks`),l=o(e,`.fx-tl-zoom`),u=o(e,`.fx-tl-tc`),d=o(e,`.fx-tl-frames`),f=[],p=0,m=1,h=0,g=0,_={},v=document.createElement(`i`);v.style.display=`none`,document.body.appendChild(v);let y=e=>(v.style.color=`var(${e})`,getComputedStyle(v).color),b=()=>{for(let e of[`--fx-track-bg`,`--fx-ruler-bg`,`--line-0`,`--line-1`,`--text-secondary`,`--text-muted`,`--fx-cti`,`--fx-workarea`,`--accent-color`,`--surface-1`,`--surface-2`,`--text-primary`])_[e]=y(e)};document.addEventListener(`nm:ui-settings-changed`,()=>{b(),D()});let x=()=>(h-16)/Math.max(.1,K().dur)*m,S=e=>8+(e-p)*x(),C=e=>(e-8)/x()+p,w=e=>Math.round(e*K().fps)/K().fps;function T(){let e=window.devicePixelRatio||1,t=i.clientWidth,n=i.clientHeight-nr;(t!==h||n!==g)&&(h=t,g=Math.max(0,n),s.style.height=`${nr}px`,s.width=Math.round(h*e),s.height=Math.round(nr*e),c.width=Math.round(h*e),c.height=Math.round(g*e),c.style.width=`${h}px`,c.style.height=`${g}px`,s.style.width=`${h}px`)}let E=!1;function D(){E||(E=!0,requestAnimationFrame(()=>{E=!1,ee()}))}function ee(){if(T(),!h)return;_[`--fx-track-bg`]||b();let e=K(),t=window.devicePixelRatio||1,i=s.getContext(`2d`);i.setTransform(t,0,0,t,0,0),i.fillStyle=_[`--fx-ruler-bg`],i.fillRect(0,0,h,nr),i.fillStyle=_[`--fx-workarea`],i.fillRect(S(e.workIn),21,S(e.workOut)-S(e.workIn),5),i.font=`11px "JetBrains Mono", monospace`,i.textBaseline=`middle`;let a=x(),o=[1/e.fps,2/e.fps,5/e.fps,10/e.fps,.5,1,2,5,10,30,60].find(e=>e*a>=70)??60,l=o/5;i.strokeStyle=_[`--text-muted`],i.fillStyle=_[`--text-secondary`],i.beginPath();for(let t=Math.floor(p/l)*l;t<=e.dur+1e-6&&S(t){let n=t*tr-y;if(!(n+tr<0||n>g)){if(v.fillStyle=e.kind===`layer`?_[`--surface-1`]:_[`--fx-track-bg`],v.globalAlpha=.5,v.fillRect(0,n,h,tr),v.globalAlpha=1,v.fillStyle=_[`--line-0`],v.fillRect(0,n+tr-1,h,1),e.kind===`layer`){let t=e.layer,r=S(t.tin),i=S(t.tout);if(v.fillStyle=t.label,v.globalAlpha=t.vis?.62:.2,v.beginPath(),v.roundRect(r,n+3,Math.max(2,i-r),17,4),v.fill(),v.globalAlpha=1,W.sel===t.id&&(v.strokeStyle=_[`--accent-color`],v.lineWidth=1.5,v.beginPath(),v.roundRect(r,n+3,Math.max(2,i-r),17,4),v.stroke()),v.fillStyle=_[`--text-primary`],v.font=`11px Inter, sans-serif`,v.textBaseline=`middle`,v.save(),v.beginPath(),v.rect(r,n,Math.max(0,i-r),tr),v.clip(),v.fillText(t.name,r+6,n+tr/2),v.restore(),!t.open){let e=new Set;for(let r of lt(t))for(let t of r.prop.k){let r=Math.round(S(t.t));e.has(r)||(e.add(r),O(v,r,n+tr/2,4,_[`--text-secondary`],!1))}}}else{let t=W.selProp===e.ref.id&&W.sel===e.layer.id;for(let r of e.ref.prop.k)O(v,S(r.t),n+tr/2,5,t?_[`--accent-color`]:_[`--fx-cti`],!0,r.e===`hold`)}}});let C=Math.round(S(W.time))+.5;v.strokeStyle=_[`--fx-cti`],v.lineWidth=1,v.beginPath(),v.moveTo(C,0),v.lineTo(C,g),v.stroke(),i.fillStyle=_[`--fx-cti`],i.beginPath(),i.moveTo(C-6,16),i.lineTo(C+6,16),i.lineTo(C,26),i.closePath(),i.fill(),i.strokeStyle=_[`--fx-cti`],i.beginPath(),i.moveTo(C,26),i.lineTo(C,nr),i.stroke(),n(u,wn(W.time,e.fps)),n(d,`${Tn(W.time,e.fps)} ${e.fps} fps`)}function O(e,t,n,r,i,a,o=!1){e.beginPath(),o?e.rect(t-r+1,n-r+1,(r-1)*2,(r-1)*2):(e.moveTo(t,n-r),e.lineTo(t+r,n),e.lineTo(t,n+r),e.lineTo(t-r,n),e.closePath()),a?(e.fillStyle=i,e.fill()):(e.strokeStyle=i,e.lineWidth=1,e.stroke())}function te(){f=ir(),t(r,f,{key:e=>e.key,create:or,update:(e,t)=>rr.get(e)?.(t)})}let k=null,A=(e,t)=>{let n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}};s.addEventListener(`pointerdown`,e=>{s.setPointerCapture(e.pointerId),k={mode:`ruler`},Y(C(A(e,s).x))}),s.addEventListener(`pointermove`,e=>{k?.mode===`ruler`&&Y(C(A(e,s).x))}),s.addEventListener(`pointerup`,()=>{k=null}),c.addEventListener(`pointerdown`,e=>{let{x:t,y:n}=A(e,c),i=Math.floor((n+r.scrollTop)/tr),a=f[i];if(c.setPointerCapture(e.pointerId),!a){k={mode:`scrub`},bt(null),Y(C(t));return}if(a.kind===`prop`){let e=a.ref.prop.k.findIndex(e=>Math.abs(S(e.t)-t)<7);if(e>=0){bt(a.layer.id),W.selProp=a.ref.id,U.emit(`selprop`),k={mode:`key`,ref:a.ref,idx:e,layer:a.layer};return}k={mode:`scrub`},Y(C(t));return}let o=a.layer;bt(o.id);let s=S(o.tin),l=S(o.tout);t>=s-4&&t<=l+4?k={mode:Math.abs(t-s)<6?`in`:Math.abs(t-l)<6?`out`:`move`,layer:o,t0:C(t),in0:o.tin,out0:o.tout}:(k={mode:`scrub`},Y(C(t)))}),c.addEventListener(`pointermove`,e=>{if(!k)return;let{x:t}=A(e,c),n=C(t),r=K();if(k.mode===`scrub`)Y(n);else if(k.mode===`key`){let e=k.ref.prop.k[k.idx];e&&(e.t=Math.max(0,Math.min(r.dur,w(n))),U.emit(`frame`),D())}else if(k.mode===`move`){let e=w(n-k.t0);k.layer.tin=k.in0+e,k.layer.tout=k.out0+e,U.emit(`frame`),D()}else k.mode===`in`?(k.layer.tin=Math.max(0,Math.min(k.layer.tout-1/r.fps,w(n))),U.emit(`frame`),D()):k.mode===`out`&&(k.layer.tout=Math.max(k.layer.tin+1/r.fps,Math.min(r.dur,w(n))),U.emit(`frame`),D())});let j=()=>{if(!k)return;let e=k;k=null,e.mode===`key`&&e.ref.prop.k.sort((e,t)=>e.t-t.t),e.mode!==`scrub`&&e.mode!==`ruler`&&J()};c.addEventListener(`pointerup`,j),c.addEventListener(`pointercancel`,j),c.addEventListener(`dblclick`,e=>{let{x:t,y:n}=A(e,c),i=f[Math.floor((n+r.scrollTop)/tr)];if(i?.kind!==`prop`)return;let a=i.ref.prop.k.findIndex(e=>Math.abs(S(e.t)-t)<7);a>=0&&(i.ref.prop.k.splice(a,1),J())}),i.addEventListener(`wheel`,e=>{if(e.preventDefault(),e.ctrlKey||e.metaKey){let t=C(A(e,c).x);m=Math.max(1,Math.min(12,m*(e.deltaY<0?1.15:1/1.15))),l.value=String(m),p=t-(A(e,c).x-8)/x(),ne()}else e.shiftKey||Math.abs(e.deltaX)>Math.abs(e.deltaY)?(p+=(e.deltaX||e.deltaY)/x(),ne()):r.scrollTop+=e.deltaY;D()},{passive:!1});let ne=()=>{p=Math.max(0,Math.min(Math.max(0,K().dur-(h-16)/x()),p))};l.addEventListener(`input`,()=>{m=parseFloat(l.value),ne(),D()}),r.addEventListener(`scroll`,D),new ResizeObserver(()=>{T(),D()}).observe(i),e.addEventListener(`click`,e=>{let t=e.target.closest(`[data-a]`);if(!t)return;let n=K();switch(t.dataset.a){case`in`:n.workIn=Math.min(W.time,n.workOut-1/n.fps),J();break;case`out`:n.workOut=Math.max(W.time+1/n.fps,n.workIn+1/n.fps),J();break;case`split`:Lt();break;case`dup`:Ft();break;case`up`:It(-1);break;case`down`:It(1);break;case`del`:Pt()}});let re=()=>{te(),D()};return U.on(`comp`,re),U.on(`sel`,re),U.on(`selprop`,re),U.on(`project`,re),U.on(`frame`,()=>{te(),D()}),U.on(`time`,()=>{f.forEach((e,t)=>{let n=r.children[t];n&&rr.get(n)?.(f[t])}),D()}),e}var cr=e=>e,lr=e=>e,ur=`time.value.index.fps.frame.duration.width.height.wiggle.loopOut.valueAtTime.linear.ease.easeIn.easeOut.clamp.random.noise.degreesToRadians.radiansToDegrees.length.lerp.layer.control.add.sub.mul.div.Math`.split(`.`),dr=new Set([`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`]),fr=new Set(`sin.cos.tan.atan.atan2.abs.min.max.floor.ceil.round.sqrt.pow.PI.sign.exp.log.hypot.trunc.length.toFixed.position.scale.rotation.opacity.name`.split(`.`)),pr=/\s+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|[A-Za-z_$][\w$]*|"[^"\\]*"|'[^'\\]*'|===|!==|==|!=|<=|>=|&&|\|\||[-+*/%<>!?:,.()[\]]/y;function mr(e,t){pr.lastIndex=0;let n=0,r=``;for(;pr.lastIndex0)return`Text is not allowed inside brackets`;else if(/^[A-Za-z_$]/.test(o)){if(r===`.`){if(!fr.has(o))return`"${o}" is not a property you can read`}else if(!ur.includes(o)&&!dr.has(o)&&!t.has(o))return`"${o}" is not defined`}r=o}}return n===0?``:`Unbalanced brackets`}var hr=new Map;function gr(e){let t=hr.get(e);if(t)return t;let n;try{let t=e.split(`;`).map(e=>e.trim()).filter(Boolean);if(!t.length)throw Error(`Empty expression`);let r=new Set,i=[];for(let e=0;e200&&hr.clear(),hr.set(e,n),n}function _r(e,t){let n=Math.imul(e|0,374761393)+Math.imul(t|0,668265263)|0;return n=Math.imul(n^n>>>13,1274126177),n^=n>>>16,(n>>>0)/4294967296*2-1}function vr(e,t=0){let n=Math.floor(e),r=e-n,i=r*r*(3-2*r);return _r(n,t)*(1-i)+_r(n+1,t)*i}var yr=e=>Array.isArray(e)?e:[Number(e)],br=(e,t,n)=>{if(!Array.isArray(e)&&!Array.isArray(t))return n(Number(e),Number(t));let r=yr(e),i=yr(t),a=Math.max(r.length,i.length);return Array.from({length:a},(e,t)=>n(r[Math.min(t,r.length-1)],i[Math.min(t,i.length-1)]))},xr=(e,t,n)=>br(e,t,(e,t)=>e+(t-e)*n),Sr=e=>Math.max(0,Math.min(1,e));function Cr(e,t){let n=e.tc?.controls.find(e=>e.label===t);if(!n)throw Error(`No Template Control named "${t}"`);if(n.kind===`check`)return+!!n.value;if(n.kind===`color`){let e=parseInt(String(n.value).replace(`#`,``),16);return[(e>>16&255)/255,(e>>8&255)/255,(e&255)/255,1]}return n.value}function wr(e,t){let{comp:n,layer:r,t:i,prop:a,pid:o}=e,s=Array.from(o+r.id).reduce((e,t)=>e*31+t.charCodeAt(0)|0,7),c=(e,t,n,r,i,a)=>e<=t?r:e>=n?i:xr(r,i,a((e-t)/(n-t))),l=e=>{let t=P(a,e);return t.length===1?t[0]:t};return{time:i,value:t,index:n.layers.indexOf(r)+1,fps:n.fps,frame:Math.round(i*n.fps),duration:n.dur,width:n.w,height:n.h,wiggle:(e,n,r=1,a=.5)=>{let o=t=>{let o=0,c=1,l=e,u=0;for(let e=0;ee+o(t)):Number(t)+o(0)},loopOut:(e=`cycle`)=>{let n=a.k;if(n.length<2||i<=n[n.length-1].t)return t;let r=n[0].t,o=n[n.length-1].t,s=o-r,c=(i-r)/s;if(e===`pingpong`){let e=(i-r)%(2*s);return l(e<=s?r+e:o-(e-s))}let u=l(r+(i-r)%s);return e===`offset`?br(u,br(n[n.length-1].v,n[0].v,(e,t)=>(e-t)*Math.floor(c)),(e,t)=>e+t):u},valueAtTime:l,linear:(e,t,n,r,i)=>c(e,t,n,r,i,e=>e),ease:(e,t,n,r,i)=>c(e,t,n,r,i,e=>e*e*(3-2*e)),easeIn:(e,t,n,r,i)=>c(e,t,n,r,i,e=>e*e*e),easeOut:(e,t,n,r,i)=>c(e,t,n,r,i,e=>1-(1-e)**3),clamp:(e,t,n)=>Math.max(t,Math.min(n,e)),random:(e=1,t)=>{let n=Sr((_r(s+Math.floor(i*1e3),5)+1)/2);return t===void 0?n*e:e+n*(t-e)},noise:e=>vr(e,s),degreesToRadians:e=>e*Math.PI/180,radiansToDegrees:e=>e*180/Math.PI,length:(e,t)=>Math.hypot(...t===void 0?yr(e):br(e,t,(e,t)=>e-t)),lerp:(e,t,n)=>xr(e,t,n),add:(e,t)=>br(e,t,(e,t)=>e+t),sub:(e,t)=>br(e,t,(e,t)=>e-t),mul:(e,t)=>br(e,t,(e,t)=>e*t),div:(e,t)=>br(e,t,(e,t)=>e/t),control:e=>Cr(n,e),layer:e=>{let t=n.layers.find(t=>t.name===e);if(!t)throw Error(`No layer named "${e}"`);let r=e=>{let t=P(e,i);return t.length===1?t[0]:t};return{name:t.name,position:r(t.pos),scale:r(t.scale),rotation:r(t.rot),opacity:r(t.opacity)}},Math}}function Tr(e,t,n){let r=gr(e);if(!r.fn)return{ok:!1,error:r.error};try{let e=r.fn(wr(t,n));if(typeof e==`string`)return{ok:!0,value:e};let i=typeof e==`boolean`?[+!!e]:yr(e);return!i.length||i.some(e=>typeof e!=`number`||!Number.isFinite(e))?{ok:!1,error:`The expression did not produce a number`}:{ok:!0,value:i}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}var Er=new Map;function Dr(e,t){let n=cr(e);if(!n.layers.some(e=>e.ex&&Object.keys(e.ex).length))return Er.clear(),e;Er.clear();let r=n.layers.map(e=>{if(!e.ex||!Object.keys(e.ex).length)return e;let r=JSON.parse(JSON.stringify(e)),i=ge(r,Me),a=ge(e,Me);for(let[o,s]of Object.entries(e.ex)){let c=`${e.id}:${o}`;if(o===`text.value`){if(!r.text)continue;let i=Tr(s,{prop:{v:[0],k:[]},dims:1,pid:o,layer:e,comp:n,t},e.text.value);i.ok?r.text.value=Array.isArray(i.value)?i.value.join(`, `):i.value:Er.set(c,i.error);continue}let l=i.find(e=>e.id===o),u=a.find(e=>e.id===o);if(!l||!u){Er.set(c,`This property no longer exists`);continue}let d=P(u.prop,t),f=Tr(s,{prop:u.prop,dims:u.dims,pid:o,layer:e,comp:n,t},d.length===1?d[0]:d);if(!f.ok){Er.set(c,f.error);continue}let p=f.value;l.prop.v=d.map((e,t)=>Number.isFinite(p[t])?p[t]:p[0]??e),l.prop.k=[]}return r});return{...e,layers:r}}function Or(e,t,n,r){let i=lr(t).ex?.[n];if(!i)return{ok:!1,error:``};let a=cr(e);if(n===`text.value`){let e=Tr(i,{prop:{v:[0],k:[]},dims:1,pid:n,layer:lr(t),comp:a,t:r},t.text?.value??``);return e.ok?{ok:!0,text:String(e.value)}:e}let o=ge(t,Me).find(e=>e.id===n);if(!o)return{ok:!1,error:`This property no longer exists`};let s=P(o.prop,r),c=Tr(i,{prop:o.prop,dims:o.dims,pid:n,layer:lr(t),comp:a,t:r},s.length===1?s[0]:s);return c.ok?{ok:!0,text:c.value.map(e=>e.toFixed(2)).join(`, `)}:c}var Q=(e,t,n,r,i,a=1,o=``)=>({k:e,label:t,def:n,min:r,max:i,step:a,unit:o}),kr=e=>e,Ar=`Layer 3D`,jr=`Camera`,Mr=[{kind:Ar,cat:`Perspective`,colors:[],apply:kr,params:[Q(`z`,`Position Z`,0,-6e3,6e3,1,` px`),Q(`rx`,`X Orientation`,0,-360,360,.5,` deg`),Q(`ry`,`Y Orientation`,0,-360,360,.5,` deg`),Q(`fade`,`Depth Fade`,0,0,100,1,` %`)]},{kind:jr,cat:`Perspective`,colors:[],apply:kr,params:[Q(`px`,`Position X`,640,-2e4,2e4,1,` px`),Q(`py`,`Position Y`,360,-2e4,2e4,1,` px`),Q(`pz`,`Position Z`,-1500,-2e4,2e4,1,` px`),Q(`ix`,`Point of Interest X`,640,-2e4,2e4,1,` px`),Q(`iy`,`Point of Interest Y`,360,-2e4,2e4,1,` px`),Q(`iz`,`Point of Interest Z`,0,-2e4,2e4,1,` px`),Q(`zoom`,`Zoom`,1500,100,2e4,1,` px`),Q(`roll`,`Roll`,0,-180,180,.1,` deg`)]}],Nr=(e,t)=>[e[0]-t[0],e[1]-t[1],e[2]-t[2]],Pr=(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2],Fr=(e,t)=>[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]],Ir=e=>{let t=Math.hypot(e[0],e[1],e[2])||1;return[e[0]/t,e[1]/t,e[2]/t]},Lr=(e,t)=>e.effects.find(e=>e.on&&e.kind===t),Rr=e=>e.kind!==`null`&&e.kind!==`adjust`&&!!Lr(e,`Layer 3D`);function zr(e,t){let n=e.layers.find(e=>e.vis&&Lr(e,`Camera`)),r=n?Lr(n,jr):null,i=(e,n)=>r&&r.p[e]?F(r.p[e],t):n,a=[i(`px`,e.w/2),i(`py`,e.h/2),i(`pz`,-1500)],o=Ir(Nr([i(`ix`,e.w/2),i(`iy`,e.h/2),i(`iz`,0)],a)),s=Ir(Fr(o,[0,-1,0]));Math.abs(o[1])>.999&&(s=[1,0,0]);let c=Fr(o,s),l=i(`roll`,0)*Math.PI/180,u=Math.cos(l),d=Math.sin(l),f=[s[0]*u+c[0]*d,s[1]*u+c[1]*d,s[2]*u+c[2]*d];return c=[c[0]*u-s[0]*d,c[1]*u-s[1]*d,c[2]*u-s[2]*d],{p:a,r:f,d:c,f:o,zoom:i(`zoom`,1500)}}function Br(e,t,n){let r=Lr(e,Ar),i=Je(t,e,n),[a,o]=P(e.anchor,n),[s,c]=qe(i,a,o),l=F(r.p.rx,n)*Math.PI/180,u=F(r.p.ry,n)*Math.PI/180;return{px:s,py:c,z:F(r.p.z,n),sx:Math.sin(u),cx:Math.cos(u),sy:Math.sin(l),cy:Math.cos(l)}}function Vr(e,t,n){let r=e-n.px,i=t-n.py,a=i*n.cy,o=-i*n.sy;return[n.px+r*n.cx-o*n.sx,n.py+a,n.z+r*n.sx+o*n.cx]}function Hr(e,t,n,r){let i=Nr(t,e.p),a=Pr(i,e.f),o=e.zoom/Math.max(.001,a);return[n/2+Pr(i,e.r)*o,r/2+Pr(i,e.d)*o,a]}var Ur=[],Wr=new Set;function Gr(e,t){let n=Ur.find(n=>!Wr.has(n.c)&&n.c.width===e&&n.c.height===t);if(!n){let r=document.createElement(`canvas`);if(r.width=e,r.height=t,n={c:r,ctx:r.getContext(`2d`,{willReadFrequently:!0})},Ur.push(n),Ur.length>12){let t=Ur.filter(t=>Wr.has(t.c)||t===n||t.c.width===e);Ur.length=0,Ur.push(...t)}}return Wr.add(n.c),n.ctx.setTransform(1,0,0,1,0,0),n.ctx.globalAlpha=1,n.ctx.globalCompositeOperation=`source-over`,n.ctx.clearRect(0,0,e,t),n}var Kr=e=>{Wr.delete(e.c)};function qr(e,t,n,r){let i=(n[1][0]-n[0][0])*(n[2][1]-n[0][1])-(n[2][0]-n[0][0])*(n[1][1]-n[0][1]);if(Math.abs(i)<1e-9)return;let a=r[1][0]-r[0][0],o=r[1][1]-r[0][1],s=r[2][0]-r[0][0],c=r[2][1]-r[0][1],l=n[1][0]-n[0][0],u=n[1][1]-n[0][1],d=n[2][0]-n[0][0],f=n[2][1]-n[0][1],p=(a*f-s*u)/i,m=(s*l-a*d)/i,h=(o*f-c*u)/i,g=(c*l-o*d)/i,_=r[0][0]-p*n[0][0]-m*n[0][1],v=r[0][1]-h*n[0][0]-g*n[0][1],y=(r[0][0]+r[1][0]+r[2][0])/3,b=(r[0][1]+r[1][1]+r[2][1])/3;e.save(),e.beginPath(),r.forEach((t,n)=>{let r=t[0]-y,i=t[1]-b,a=Math.hypot(r,i)||1,o=t[0]+r/a*.7,s=t[1]+i/a*.7;n?e.lineTo(o,s):e.moveTo(o,s)}),e.closePath(),e.clip(),e.setTransform(p,h,m,g,_,v);let x=Math.max(0,Math.floor(Math.min(n[0][0],n[1][0],n[2][0])-1)),S=Math.max(0,Math.floor(Math.min(n[0][1],n[1][1],n[2][1])-1)),C=Math.min(t.width,Math.ceil(Math.max(n[0][0],n[1][0],n[2][0])+1)),w=Math.min(t.height,Math.ceil(Math.max(n[0][1],n[1][1],n[2][1])+1));C>x&&w>S&&e.drawImage(t,x,S,C-x,w-S,x,S,C-x,w-S),e.restore()}var Jr=new Map,Yr=(e,t)=>t=e.tout-1e-6,Xr={footage:[]},Zr=new ot(()=>({...W.project,footage:Xr.footage})),Qr=G.render.bind(G);function $r(e,t,n,r,i,a,o){let s=Je(e,t,n),c=Math.hypot(s[0],s[1])||1e-6,l=(s[0]*s[3]-s[1]*s[2])/c,[u,d]=P(t.anchor,n),[f,p]=qe(s,u,d),m=JSON.parse(JSON.stringify(t));return m.parent=null,m.matte=`none`,m.blend=`source-over`,m.pos=N(f-r,p-i),m.anchor=N(u,d),m.scale=N(c*100,l*100),m.rot=N(Math.atan2(s[1],s[0])*180/Math.PI),m.opacity=N(100),m.effects=m.effects.filter(e=>e.kind!==Ar),{id:`tex`,name:`tex`,w:a,h:o,fps:e.fps,dur:e.dur,bg:`#000000`,layers:[m],workIn:0,workOut:e.dur}}function ei(e,t,n,r,i,a,o,s){let c=Br(t,e,n),l=et(W.project,e,t,n),u=4+(t.effects.some(e=>e.on&&e.kind!==`Layer 3D`)?120:0)+(t.kind===`text`?240:0),d=Math.floor(Math.min(...l.map(e=>e[0]))-u),f=Math.floor(Math.min(...l.map(e=>e[1]))-u),p=Math.ceil(Math.max(...l.map(e=>e[0]))+u-d),m=Math.ceil(Math.max(...l.map(e=>e[1]))+u-f);if(p<2||m<2)return;let h=Math.min(Math.max(.5,Math.min(1,i*1.5)),2200/Math.max(p,m)),g=Jr.get(t.id);g||(g=document.createElement(`canvas`),Jr.set(t.id,g)),Qr($r(e,t,n,d,f,p,m),n,g,h,!0);let _=F(Lr(t,Ar).p.fade,n)/100,v=Math.min(14,Math.max(3,Math.ceil(p/90))),y=Math.min(14,Math.max(3,Math.ceil(m/90))),b=[];for(let t=0;t<=y;t+=1){let n=[];for(let a=0;a<=v;a+=1){let o=d+p*a/v,s=f+m*t/y,[l,u,g]=Hr(r,Vr(o,s,c),e.w,e.h);n.push({s:[(o-d)*h,(s-f)*h],d:[l*i,u*i],z:g})}b.push(n)}if(b.some(e=>e.some(e=>e.z<20)))return;let x=Gr(o,s);for(let e=0;ee.solo),u=e.layers.filter(e=>e.vis&&(!l||e.solo)&&!Yr(e,t)),d=zr(e,t),f=[],p=[],m=()=>{if(!f.length)return;let n={id:`acc`,name:`acc`,kind:`footage`,vis:!0,solo:!1,lock:!1,open:!1,label:``,tin:0,tout:e.dur,srcStart:0,blend:`source-over`,matte:`none`,parent:null,anchor:N(0,0),pos:N(0,0),scale:N(100,100),rot:N(0),opacity:N(100),color:``,color2:``,gradAngle:0,w:e.w,h:e.h,footage:`acc`,text:null,shape:null,effects:[],masks:[]},i={...e,layers:[...f,n]},c=Gr(a,o);Zr.render(i,t,c.c,r,!0),s.ctx.globalCompositeOperation=`copy`,s.ctx.drawImage(c.c,0,0),s.ctx.globalCompositeOperation=`source-over`,Kr(c),f=[]},h=()=>{if(!p.length)return;m();let n=p.map(n=>{let r=Br(n,e,t);return{l:n,z:Hr(d,[r.px,r.py,r.z],e.w,e.h)[2]}});n.sort((e,t)=>t.z-e.z);for(let{l:i}of n)ei(e,i,t,d,r,s,a,o);p=[]};for(let e=u.length-1;e>=0;--e){let t=u[e];t.kind!==`null`&&(Rr(t)?p.push(t):(h(),f.unshift(t)))}h(),m();let g=n.getContext(`2d`);n.width!==a&&(n.width=a),n.height!==o&&(n.height=o),g.setTransform(1,0,0,1,0,0),g.globalCompositeOperation=`copy`,g.drawImage(s.c,0,0),g.globalCompositeOperation=`source-over`,Kr(s)}function ni(){for(let e of Mr)Ae.some(t=>t.kind===e.kind)||Ae.push(e);Ne.includes(`Perspective`)||Ne.push(`Perspective`),G.render=(e,t,n,r,i=!1)=>{let a=performance.now(),o=Dr(e,t);o.layers.some(Rr)?ti(o,t,n,r,i):Qr(o,t,n,r,i),G.lastMs=performance.now()-a,G.lastLayers=o.layers.length}}var ri=e=>e.layers.some(e=>!!Lr(e,jr));function ii(e){let t=cr(e);return t.tc||={name:e.name,controls:[]},t.tc}function ai(e,t,n,r,i=0,a=100,o=1){return{id:L(`K`),label:e,kind:t,value:n,min:i,max:a,step:o,targets:r}}function oi(e,t,n){let r=e.layers.find(e=>e.id===n.layer);if(!r)return!1;let i=t.value,a=n.path;if(a===`text.value`&&r.text)r.text.value=String(i),r.name=String(i)||`Text`;else if(a===`text.fill`&&r.text)r.text.fill=String(i);else if(a===`text.stroke`&&r.text)r.text.stroke=String(i);else if(a===`shape.fill`&&r.shape)r.shape.fill=String(i);else if(a===`shape.stroke`&&r.shape)r.shape.stroke=String(i);else if(a===`solid.color`)r.color=String(i);else if(a===`vis`)r.vis=!!i;else if(a.startsWith(`fxc:`)){let[e,t]=a.slice(4).split(`.`),n=r.effects.find(t=>t.id===e);if(!n)return!1;n.c[t]=String(i)}else if(a.startsWith(`prop:`)){let e=ge(r,Me).find(e=>e.id===a.slice(5));if(!e||e.prop.k.length)return!1;e.prop.v=[Math.max(e.min,Math.min(e.max,Number(i)))]}else return!1;return!0}function si(e,t){for(let n of t.targets)oi(e,t,n)}function ci(e){let t=[];e.text&&(t.push({label:`Source Text`,kind:`text`,path:`text.value`,value:e.text.value,min:0,max:0,step:0}),t.push({label:`Fill Color`,kind:`color`,path:`text.fill`,value:e.text.fill,min:0,max:0,step:0})),e.shape&&(t.push({label:`Fill Color`,kind:`color`,path:`shape.fill`,value:e.shape.fill,min:0,max:0,step:0}),t.push({label:`Stroke Color`,kind:`color`,path:`shape.stroke`,value:e.shape.stroke,min:0,max:0,step:0})),e.kind===`solid`&&t.push({label:`Solid Color`,kind:`color`,path:`solid.color`,value:e.color,min:0,max:0,step:0}),t.push({label:`Visible`,kind:`check`,path:`vis`,value:e.vis,min:0,max:1,step:1});for(let n of ge(e,Me))n.dims===1&&!n.prop.k.length&&!/^an\./.test(n.id)&&t.push({label:`${n.group.replace(/^Effect · /,``).replace(/#.+$/,``)} ${n.label}`,kind:`slider`,path:`prop:${n.id}`,value:n.prop.v[0],min:n.min,max:Math.min(n.max,5e3),step:n.step});return t}var li=[[`Wiggle`,`wiggle(1.5, 12)`],[`Loop`,`loopOut("pingpong")`],[`Spin`,`time * 40`],[`Pulse`,`mul(value, 1 + 0.04 * Math.sin(time * 3))`],[`Ease`,`ease(time, 1, 3, 0, 100)`],[`Control`,`value + control("Float")`]];function ui(){let e=q();if(!e)return[];let t=[];e.kind===`text`&&t.push({id:`text.value`,label:`Text > Source Text`});for(let n of lt(e))t.push({id:n.id,label:`${n.group.replace(/^Effect · /,``).replace(/#.+$/,``)} > ${n.label}`});return t}function di(){let e=a(`
@@ -94,7 +94,7 @@
-
`),i=o(e,`.ex-prop`),s=o(e,`.ex-code`),c=o(e,`.ex-status`),l=o(e,`.ex-snips`),u=o(e,`.ex-list`),d=o(e,`.ex-count`),f=``,p=0,m=``;for(let[e,t]of ai){let n=a(``);n.textContent=e,n.addEventListener(`click`,()=>{s.value=t,h(),s.focus()}),l.appendChild(n)}let h=()=>{window.clearTimeout(p);let e=q();if(!e||!f)return;let t=ar(e);s.value.trim()?(t.ex=t.ex??{},t.ex[f]=s.value):t.ex&&(delete t.ex[f],Object.keys(t.ex).length||delete t.ex),J(),U.emit(`frame`),g()};s.addEventListener(`keydown`,e=>e.stopPropagation()),s.addEventListener(`input`,()=>{window.clearTimeout(p),p=window.setTimeout(h,180)}),s.addEventListener(`blur`,h),i.addEventListener(`change`,()=>{f=i.value,W.selProp=f,U.emit(`selprop`),g()});let g=()=>{let e=q(),l=oi();if(e&&e.id!==m){m=e.id;let t=ar(e).ex;f=(W.selProp&&l.some(e=>e.id===W.selProp)?W.selProp:t?Object.keys(t)[0]:``)||(l.find(e=>e.id===`tf.pos`)?`tf.pos`:l[0]?.id??``)}e||(m=``),f&&!l.some(e=>e.id===f)&&(f=l[0]?.id??``);let p=e?ar(e).ex??{}:{};if(t(i,l,{key:e=>e.id,create:()=>document.createElement(`option`),update:(e,t)=>{e.value=t.id,n(e,`${p[t.id]?`= `:``}${t.label}`)}}),i.value!==f&&f&&(i.value=f),i.disabled=!e,s.disabled=!e||!f,document.activeElement!==s&&(s.value=(e&&f?p[f]:``)??``),r(s,`is-error`,!1),!e)n(c,`Select a layer to write an expression.`);else if(!f||!p[f])n(c,`This property has no expression.`);else{let t=wr(K(),e,f,W.time),i=Sr.get(`${e.id}:${f}`)??(t.ok?``:t.error);r(s,`is-error`,!!i),n(c,i?`${i}. The keyframed value is used.`:t.ok?`Value at the playhead: ${t.text}`:``)}let h=[];for(let e of K().layers)for(let[t,n]of Object.entries(ar(e).ex??{}))h.push({key:`${e.id}:${t}`,lid:e.id,pid:t,name:`${e.name} > ${t.startsWith(`fx.`)?`Effect value`:t}`,code:n});n(d,h.length?`Expressions in this composition: ${h.length}`:`No expressions in this composition yet.`),t(u,h,{key:e=>e.key,create:e=>{let t=a(``);return t.addEventListener(`click`,()=>{m=``,W.selProp=e.pid,gt(e.lid),U.emit(`selprop`),g()}),t},update:(e,t)=>{n(o(e,`.fx-eg-kind`),t.name),n(o(e,`.ex-ilabel`),t.code.replace(/\s+/g,` `))}})};return U.on(`sel`,g),U.on(`comp`,g),U.on(`project`,()=>{m=``,g()}),U.on(`time`,g),U.on(`selprop`,()=>{W.selProp&&oi().some(e=>e.id===W.selProp)&&W.selProp!==f&&(f=W.selProp,g())}),g(),e}function ci(){let e=a(`
+
`),i=o(e,`.ex-prop`),s=o(e,`.ex-code`),c=o(e,`.ex-status`),l=o(e,`.ex-snips`),u=o(e,`.ex-list`),d=o(e,`.ex-count`),f=``,p=0,m=``;for(let[e,t]of li){let n=a(``);n.textContent=e,n.addEventListener(`click`,()=>{s.value=t,h(),s.focus()}),l.appendChild(n)}let h=()=>{window.clearTimeout(p);let e=q();if(!e||!f)return;let t=lr(e);s.value.trim()?(t.ex=t.ex??{},t.ex[f]=s.value):t.ex&&(delete t.ex[f],Object.keys(t.ex).length||delete t.ex),J(),U.emit(`frame`),g()};s.addEventListener(`keydown`,e=>e.stopPropagation()),s.addEventListener(`input`,()=>{window.clearTimeout(p),p=window.setTimeout(h,180)}),s.addEventListener(`blur`,h),i.addEventListener(`change`,()=>{f=i.value,W.selProp=f,U.emit(`selprop`),g()});let g=()=>{let e=q(),l=ui();if(e&&e.id!==m){m=e.id;let t=lr(e).ex;f=(W.selProp&&l.some(e=>e.id===W.selProp)?W.selProp:t?Object.keys(t)[0]:``)||(l.find(e=>e.id===`tf.pos`)?`tf.pos`:l[0]?.id??``)}e||(m=``),f&&!l.some(e=>e.id===f)&&(f=l[0]?.id??``);let p=e?lr(e).ex??{}:{};if(t(i,l,{key:e=>e.id,create:()=>document.createElement(`option`),update:(e,t)=>{e.value=t.id,n(e,`${p[t.id]?`= `:``}${t.label}`)}}),i.value!==f&&f&&(i.value=f),i.disabled=!e,s.disabled=!e||!f,document.activeElement!==s&&(s.value=(e&&f?p[f]:``)??``),r(s,`is-error`,!1),!e)n(c,`Select a layer to write an expression.`);else if(!f||!p[f])n(c,`This property has no expression.`);else{let t=Or(K(),e,f,W.time),i=Er.get(`${e.id}:${f}`)??(t.ok?``:t.error);r(s,`is-error`,!!i),n(c,i?`${i}. The keyframed value is used.`:t.ok?`Value at the playhead: ${t.text}`:``)}let h=[];for(let e of K().layers)for(let[t,n]of Object.entries(lr(e).ex??{}))h.push({key:`${e.id}:${t}`,lid:e.id,pid:t,name:`${e.name} > ${t.startsWith(`fx.`)?`Effect value`:t}`,code:n});n(d,h.length?`Expressions in this composition: ${h.length}`:`No expressions in this composition yet.`),t(u,h,{key:e=>e.key,create:e=>{let t=a(``);return t.addEventListener(`click`,()=>{m=``,W.selProp=e.pid,bt(e.lid),U.emit(`selprop`),g()}),t},update:(e,t)=>{n(o(e,`.fx-eg-kind`),t.name),n(o(e,`.ex-ilabel`),t.code.replace(/\s+/g,` `))}})};return U.on(`sel`,g),U.on(`comp`,g),U.on(`project`,()=>{m=``,g()}),U.on(`time`,g),U.on(`selprop`,()=>{W.selProp&&ui().some(e=>e.id===W.selProp)&&W.selProp!==f&&(f=W.selProp,g())}),g(),e}function fi(){let e=a(`
`),n=o(t,`.fx-eg-label`),r=o(t,`.tc-val`),i=()=>ei(K()).controls.find(t=>t.id===e.id);n.addEventListener(`keydown`,e=>{e.stopPropagation(),e.key===`Enter`&&n.blur()}),n.addEventListener(`change`,()=>{let e=i();e&&(e.label=n.value,J())});let s=()=>{let e=i();e&&(ri(K(),e),U.emit(`frame`))},c=()=>{s(),J(),U.emit(`sel`)},u=()=>void 0;if(e.kind===`text`){let e=a(``);e.addEventListener(`keydown`,t=>{t.stopPropagation(),t.key===`Enter`&&e.blur()}),e.addEventListener(`input`,()=>{let t=i();t&&(t.value=e.value,s())}),e.addEventListener(`change`,c),r.appendChild(e),u=()=>{let t=i();t&&document.activeElement!==e&&e.value!==t.value&&(e.value=String(t.value))}}else if(e.kind===`color`){let e=on(()=>String(i()?.value??`#ffffff`),e=>{let t=i();t&&(t.value=e,s())},c);r.appendChild(e.el),u=e.update}else if(e.kind===`slider`){let t=an({get:()=>Number(i()?.value??0),set:e=>{let t=i();t&&(t.value=e,s())},commit:c,min:e.min,max:e.max,step:e.step||1,unit:``});r.appendChild(t.el),u=t.update}else{let e=a(``);e.addEventListener(`change`,()=>{let t=i();t&&(t.value=e.checked,c())}),r.appendChild(e),u=()=>{let t=i();t&&e.checked!==!!t.value&&(e.checked=!!t.value)}}t.sync=u;for(let n of Array.from(t.querySelectorAll(`[data-m]`)))n.addEventListener(`click`,()=>{let t=ei(K()).controls,r=t.findIndex(t=>t.id===e.id);if(!(r<0)){if(n.dataset.m===`remove`)t.splice(r,1);else{let e=r+(n.dataset.m===`up`?-1:1);if(e<0||e>=t.length)return;[t[r],t[e]]=[t[e],t[r]]}J(),f()}});return t},f=()=>{let a=K(),l=ei(a);n(o(e,`.tc-comp`),a.name),document.activeElement!==r&&(r.value=l.name),t(i,l.controls,{key:e=>e.id,create:d,update:(e,t)=>{let r=o(e,`.fx-eg-label`);document.activeElement!==r&&r.value!==t.label&&(r.value=t.label);let i=t.targets.map(e=>a.layers.find(t=>t.id===e.layer)?.name).filter(Boolean);n(o(e,`.fx-eg-kind`),`${t.kind===`text`?`Text`:t.kind===`color`?`Color`:t.kind===`check`?`Checkbox`:`Slider`}${i.length?`: ${i.length>2?`${i[0]} and ${i.length-1} more`:i.join(`, `)}`:`: used by expressions`}`),e.sync()}});let f=u();t(c,f,{key:e=>e.path,create:()=>document.createElement(`option`),update:(e,t)=>{e.value=t.path,n(e,t.label)}}),c.disabled=!f.length,n(s,l.controls.length?`${l.controls.length} controls. Edit them here to restyle the whole title; an expression reads one with control("Label").`:`Select a layer, choose one of its properties and press Add to build a control.`)};return U.on(`sel`,f),U.on(`comp`,f),U.on(`project`,f),f(),e}var li=new Map;function ui(e){let t=li.get(e);return t||(t=new Promise((t,n)=>{let r=document.createElement(`script`);r.src=`assets/media/${e}.js`,r.onload=()=>{let i=window.FVX_MEDIA?.[e];i?(delete window.FVX_MEDIA[e],r.remove(),t(i)):n(Error(`media pack ${e} is empty`))},r.onerror=()=>n(Error(`media pack ${e} did not load`)),document.head.appendChild(r)}),li.set(e,t)),t}function di(e){let t=e.indexOf(`,`),n=/^data:([^;]+)/.exec(e)?.[1]??`application/octet-stream`,r=atob(e.slice(t+1)),i=new Uint8Array(r.length);for(let e=0;e{a.onloadeddata=()=>e(),a.onerror=()=>n(Error(`${t} cannot be decoded by this browser`))});let o=Number.isFinite(a.duration)&&a.duration>0?a.duration:n;return{id:I(`F`),name:t,kind:`video`,w:a.videoWidth,h:a.videoHeight,dur:o,gen:null,data:null,size:r.size,mime:r.type,src:a,url:i}}var mi=`#ffb43a`,$=(e,t,n,r=`easeBoth`)=>F(e,t,n,r);function hi(e,t){let n=H(t);return e.effects.push(n),n}function gi(e,t,n,r,i,a,o,s,c){let l=L(`footage`,e,n);l.footage=t.id,l.w=t.w,l.h=t.h,l.anchor=j(t.w/2,t.h/2),l.pos=j(r[0],r[1]),l.scale=j(i,i),$(l.opacity,c,[0],`easeOut`),$(l.opacity,c+.9,[100],`easeOut`);let u=hi(l,`Drop Shadow`);u.p.opacity=j(55),u.p.dist=j(26),u.p.soft=j(30);let d=hi(l,Er);return $(d.p.z,c,[a+1700],`easeOut`),$(d.p.z,c+1.7,[a],`easeOut`),$(d.p.ry,c,[o+70],`easeOut`),$(d.p.ry,c+1.7,[o],`easeOut`),d.p.rx=j(s),d.p.fade=j(55),l}function _i(e,t,n,r,i,a,o){let s=se(e,t,n);s.name=t,s.pos=j(r,i);let c=Fe[a].make();return c.start=j(o),s.text.animators.push(c),s}function vi(e,t,n,r){let i=ce(`Spring Architecture Week`,1280,720,30,9);i.bg=`#06101f`;let a=L(`footage`,i,`Sky`);a.footage=e.id,a.w=e.w,a.h=e.h,a.anchor=j(e.w/2,e.h/2),a.pos=j(640,360),a.scale=j(104,104),a.tout=Math.min(9,e.dur);let o=hi(a,`Brightness and Contrast`);o.p.bright=j(-15),o.p.contrast=j(8),hi(a,`Hue and Saturation`).p.sat=j(-8);let s=L(`solid`,i,`Sky Wash`);s.color=`#071a45`,s.color2=`#2b7d9c`,s.gradAngle=90,s.blend=`multiply`,s.opacity=j(88);let c=L(`null`,i,`Camera 1`),l=hi(c,Dr);for(let[e,t]of[[0,[520,310,-2100]],[4.5,[640,345,-1720]],[9,[770,380,-1450]]])$(l.p.px,e,[t[0]]),$(l.p.py,e,[t[1]]),$(l.p.pz,e,[t[2]]);l.p.ix=j(640),l.p.iy=j(365),l.p.iz=j(120),$(l.p.roll,0,[-4]),$(l.p.roll,6,[0]);let u=gi(i,t,`Card Concrete`,[150,410],21,-140,24,0,.1),d=gi(i,n,`Card Tower`,[1140,290],21,130,-24,0,.35),f=gi(i,r,`Card Rowhouses`,[1030,585],18,520,-12,0,.6),p=_i(i,`SPRING`,40,640,236,6,.3);p.text.weight=500,p.text.tracking=j(720),p.text.fill=mi,p.text.animators[0].dur=j(1.6);let m=R(i,`ellipse`,`Ring`);m.shape.w=j(560),m.shape.h=j(560),m.shape.fillOn=!1,m.shape.strokeOn=!0,m.shape.stroke=mi,m.shape.strokeW=j(2),m.pos=j(640,340),$(m.scale,.3,[0,0],`overshoot`),$(m.scale,1.6,[100,100],`overshoot`),$(m.opacity,.3,[0],`easeOut`),$(m.opacity,1,[45],`easeOut`);let h=_i(i,`ARCHITECTURE`,100,640,330,0,.8);h.text.weight=800,h.text.tracking=j(60);let g=Fe[7].make();g.dy=j(5),g.freq=j(.45),g.phase=j(.12),h.text.animators.push(g);let _=hi(h,`Drop Shadow`);_.p.opacity=j(55),_.p.dist=j(10),_.p.soft=j(22);let v=hi(h,`Glow`);v.p.thr=j(82),v.p.amount=j(.3),v.p.radius=j(26);let y=R(i,`rect`,`Accent Bar`);y.shape.w=j(520),y.shape.h=j(6),y.shape.fill=mi,y.shape.round=j(3),y.pos=j(640,404),$(y.scale,1.8,[0,100],`easeOut`),$(y.scale,2.5,[100,100],`easeOut`);let b=_i(i,`April 12 to 19 | Free tours in every district`,30,640,458,1,2.3);b.text.weight=500,b.text.fill=`#e8f1ff`,b.text.tracking=j(60),b.effects.push(H(`Drop Shadow`)),b.effects[0].p.opacity=j(50),b.effects[0].p.dist=j(5),b.effects[0].p.soft=j(10);let x=R(i,`polygon`,`Hexagon`);x.shape.w=j(96),x.shape.h=j(96),x.shape.points=j(6),x.shape.fillOn=!1,x.shape.strokeOn=!0,x.shape.stroke=mi,x.shape.strokeW=j(3),x.pos=j(1130,112),$(x.scale,1.4,[0,0],`overshoot`),$(x.scale,2.2,[100,100],`overshoot`);let S=R(i,`star`,`Star`);S.shape.w=j(64),S.shape.h=j(64),S.shape.fill=mi,S.shape.inner=j(.42),S.pos=j(150,108),$(S.scale,1.7,[0,0],`overshoot`),$(S.scale,2.5,[100,100],`overshoot`);let C=R(i,`rect`,`Counter Bar`);C.shape.w=j(400),C.shape.h=j(56),C.shape.fill=`#06142b`,C.shape.round=j(10),C.pos=j(214,646),$(C.pos,2.2,[-200,646],`easeOut`),$(C.pos,3,[214,646],`easeOut`),$(C.opacity,2.2,[0]),$(C.opacity,3,[62]);let w=se(i,`0 BUILDINGS OPEN`,24);w.name=`Counter`,w.pos=j(214,647),w.text.weight=600,w.text.tracking=j(160),w.text.family=`JetBrains Mono`,$(w.opacity,2.6,[0]),$(w.opacity,3.2,[100]);let T=[0,1,2].map(e=>{let t=R(i,`ellipse`,`Dot ${e+1}`);return t.shape.w=j(14),t.shape.h=j(14),t.shape.fill=mi,t.pos=j(444+e*24,646),$(t.scale,3.2+e*.15,[0,0],`overshoot`),$(t.scale,3.8+e*.15,[100,100],`overshoot`),t}),E=L(`adjust`,i,`Finish`),D=hi(E,`Hue and Saturation`);D.p.sat=j(8);let ee=hi(E,`Glow`);ee.p.thr=j(80),ee.p.radius=j(30),ee.p.amount=j(.35);let O=hi(E,`Vignette`);O.p.amount=j(45),O.p.size=j(80),i.layers=[E,...T,w,C,S,x,b,y,h,m,p,f,d,u,c,s,a];for(let e of i.layers)e.tout=Math.min(e.tout,i.dur);let te=(e,t,n)=>`fx.${e.effects.find(e=>e.kind===t).id}.${n}`,k=(e,t,n)=>{let r=ar(e);r.ex=r.ex??{},r.ex[t]=n};for(let e of[u,d,f])k(e,te(e,Er,`ry`),`wiggle(0.35, control("Float"))`),k(e,te(e,Er,`rx`),`wiggle(0.3, control("Float") * 0.5)`);k(m,`tf.scale`,`mul(value, 1 + 0.03 * Math.sin(time * 2.4))`),k(x,`tf.rot`,`time * 40`),k(S,`tf.rot`,`time * -90`),k(S,`tf.scale`,`mul(value, 1 + 0.15 * Math.sin(time * 5))`),k(h,`text.tracking`,`value + 8 * Math.sin(time * 1.4)`),k(w,`text.value`,`Math.round(linear(time, 2.4, 5, 0, control("Buildings"))) + " BUILDINGS OPEN"`);for(let e of T)k(e,`tf.opacity`,`Math.sin(time * 6 - index * 0.8) > 0 ? 100 : 25`);let A=ei(i);A.name=`Spring Architecture Week`;let M=(e,t)=>({layer:e.id,path:t});return A.controls.push(ti(`Kicker`,`text`,`SPRING`,[M(p,`text.value`)]),ti(`Title`,`text`,`ARCHITECTURE`,[M(h,`text.value`)]),ti(`Subtitle`,`text`,b.text.value,[M(b,`text.value`)]),ti(`Accent`,`color`,mi,[M(p,`text.fill`),M(m,`shape.stroke`),M(y,`shape.fill`),M(S,`shape.fill`),M(x,`shape.stroke`),...T.map(e=>M(e,`shape.fill`))]),ti(`Float`,`slider`,8,[],0,30,.5),ti(`Buildings`,`slider`,48,[],0,200,1),ti(`Shapes`,`check`,!0,[M(m,`vis`),M(x,`vis`),M(S,`vis`)]),ti(`Sky Brightness`,`slider`,-15,[M(a,`prop:${te(a,`Brightness and Contrast`,`bright`)}`)],-150,150,1)),i}var yi=4.8;async function bi(){let[e,t,n,r]=await Promise.all([pi(`sky-timelapse`,`sky-timelapse.webm`,9),fi(`card-concrete`,`card-concrete.jpg`),fi(`card-tower`,`card-tower.jpg`),fi(`card-rowhouses`,`card-rowhouses.jpg`)]),i=le();return i.name=`Spring Architecture Week`,i.footage.push(e,t,n,r),i.comps.push(vi(e,t,n,r)),i.active=i.comps[0].id,i}function xi(e,t){let n=a(``),i=o(n,`.fx-group-tabs`),s=o(n,`.fx-group-body`),c=[],l=[],u=e=>{t.forEach((t,n)=>{r(c[n],`is-active`,e===n),l[n].hidden=e!==n}),t[e].on?.()};return t.forEach((e,t)=>{let n=a(``);n.textContent=e.title,n.addEventListener(`click`,()=>u(t)),i.appendChild(n),c.push(n);let r=a(``);r.appendChild(e.el),s.appendChild(r),l.push(r)}),u(0),n.addEventListener(`pointerdown`,()=>{for(let e of document.querySelectorAll(`.fx-group`))r(e,`is-focused`,e===n)},!0),n.show=e=>{let n=t.findIndex(t=>t.id===e);n>=0&&u(n)},n}var Si=e=>``;async function Ci(){try{_t(await bi()),W.sel=K().layers.find(e=>e.name===`ARCHITECTURE`)?.id??null,U.emit(`sel`),await G.warm(K()),Y(yi),await G.prepare(K(),W.time),G.render(K(),W.time,document.createElement(`canvas`),.1),U.emit(`frame`),U.emit(`project`)}catch(e){A(`${e instanceof Error?e.message:String(e)}; opened the generated sample instead`,`error`),vt()}}function wi(){let e=new Blob([de(W.project)],{type:`application/json`}),t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=`${W.project.name.replace(/\W+/g,`_`)}.fvxdemo.json`,t.click(),W.dirty=!1,U.emit(`status`),A(`Project saved as a .fvxdemo.json file`)}function Ti(e,t,r,i,s){let c=a(``),l=a(``);return n(o(l,`span`),e),l.appendChild(c),{row:l,input:c}}function Ei(){let e=K(),t=new d(`Composition Settings`,380),n=[Ti(`Width`,e.w,16,4096,1),Ti(`Height`,e.h,16,4096,1),Ti(`Frame rate`,e.fps,1,120,1),Ti(`Duration (s)`,e.dur,.1,600,.1)],r=a(``);for(let e of n)t.body.appendChild(e.row);t.field(`Background`,r),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`OK`,`primary`,()=>{e.w=Math.round(+n[0].input.value)||e.w,e.h=Math.round(+n[1].input.value)||e.h,e.fps=Math.max(1,+n[2].input.value||e.fps),e.dur=Math.max(.1,+n[3].input.value||e.dur),e.bg=r.value,e.workIn=0,e.workOut=e.dur;for(let t of e.layers)t.tout=Math.min(t.tout,e.dur);J(),Y(Math.min(W.time,e.dur)),t.close()}),t.open()}function Di(){let e=q();return e&&W.selProp?at(e).find(e=>e.id===W.selProp):void 0}function Oi(){let e=Di();if(!e){A(`Click a property row in Effect Controls or the Timeline first`);return}let t=new d(`Wiggler · ${e.label}`,360),n=Ti(`Frequency (keys per second)`,4,.5,30,.5),r=Ti(`Magnitude${e.unit}`,30,0,5e3,1);t.body.append(n.row,r.row),t.body.appendChild(a(`
Bakes seeded random keyframes. The Expressions panel has a live wiggle() that stays editable.
`)),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`Apply`,`primary`,()=>{Gt(e,+n.input.value,+r.input.value),t.close()}),t.open()}function ki(){let e=Di();if(!e||e.prop.k.length<3){A(`Select an animated property with three or more keyframes`);return}let t=new d(`Smoother · ${e.label}`,360),n=Ti(`Tolerance`,4,0,1e3,.5);t.body.append(n.row),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`Apply`,`primary`,()=>{A(`Removed ${Kt(e,+n.input.value)} keyframes`),t.close()}),t.open()}function Ai(){let t=new d(`About this demo`,460);t.body.appendChild(a(`
${Si(44)}
FormVFX motion design demo
Version ${e} · Apache-2.0 · NodeAgentc, Inc.
+
`),n=o(t,`.fx-eg-label`),r=o(t,`.tc-val`),i=()=>ii(K()).controls.find(t=>t.id===e.id);n.addEventListener(`keydown`,e=>{e.stopPropagation(),e.key===`Enter`&&n.blur()}),n.addEventListener(`change`,()=>{let e=i();e&&(e.label=n.value,J())});let s=()=>{let e=i();e&&(si(K(),e),U.emit(`frame`))},c=()=>{s(),J(),U.emit(`sel`)},u=()=>void 0;if(e.kind===`text`){let e=a(``);e.addEventListener(`keydown`,t=>{t.stopPropagation(),t.key===`Enter`&&e.blur()}),e.addEventListener(`input`,()=>{let t=i();t&&(t.value=e.value,s())}),e.addEventListener(`change`,c),r.appendChild(e),u=()=>{let t=i();t&&document.activeElement!==e&&e.value!==t.value&&(e.value=String(t.value))}}else if(e.kind===`color`){let e=un(()=>String(i()?.value??`#ffffff`),e=>{let t=i();t&&(t.value=e,s())},c);r.appendChild(e.el),u=e.update}else if(e.kind===`slider`){let t=ln({get:()=>Number(i()?.value??0),set:e=>{let t=i();t&&(t.value=e,s())},commit:c,min:e.min,max:e.max,step:e.step||1,unit:``});r.appendChild(t.el),u=t.update}else{let e=a(``);e.addEventListener(`change`,()=>{let t=i();t&&(t.value=e.checked,c())}),r.appendChild(e),u=()=>{let t=i();t&&e.checked!==!!t.value&&(e.checked=!!t.value)}}t.sync=u;for(let n of Array.from(t.querySelectorAll(`[data-m]`)))n.addEventListener(`click`,()=>{let t=ii(K()).controls,r=t.findIndex(t=>t.id===e.id);if(!(r<0)){if(n.dataset.m===`remove`)t.splice(r,1);else{let e=r+(n.dataset.m===`up`?-1:1);if(e<0||e>=t.length)return;[t[r],t[e]]=[t[e],t[r]]}J(),f()}});return t},f=()=>{let a=K(),l=ii(a);n(o(e,`.tc-comp`),a.name),document.activeElement!==r&&(r.value=l.name),t(i,l.controls,{key:e=>e.id,create:d,update:(e,t)=>{let r=o(e,`.fx-eg-label`);document.activeElement!==r&&r.value!==t.label&&(r.value=t.label);let i=t.targets.map(e=>a.layers.find(t=>t.id===e.layer)?.name).filter(Boolean);n(o(e,`.fx-eg-kind`),`${t.kind===`text`?`Text`:t.kind===`color`?`Color`:t.kind===`check`?`Checkbox`:`Slider`}${i.length?`: ${i.length>2?`${i[0]} and ${i.length-1} more`:i.join(`, `)}`:`: used by expressions`}`),e.sync()}});let f=u();t(c,f,{key:e=>e.path,create:()=>document.createElement(`option`),update:(e,t)=>{e.value=t.path,n(e,t.label)}}),c.disabled=!f.length,n(s,l.controls.length?`${l.controls.length} controls. Edit them here to restyle the whole title; an expression reads one with control("Label").`:`Select a layer, choose one of its properties and press Add to build a control.`)};return U.on(`sel`,f),U.on(`comp`,f),U.on(`project`,f),f(),e}var pi=new Map;function mi(e){let t=pi.get(e);return t||(t=new Promise((t,n)=>{let r=document.createElement(`script`);r.src=`assets/media/${e}.js`,r.onload=()=>{let i=window.FVX_MEDIA?.[e];i?(delete window.FVX_MEDIA[e],r.remove(),t(i)):n(Error(`media pack ${e} is empty`))},r.onerror=()=>n(Error(`media pack ${e} did not load`)),document.head.appendChild(r)}),pi.set(e,t)),t}function hi(e){let t=e.indexOf(`,`),n=/^data:([^;]+)/.exec(e)?.[1]??`application/octet-stream`,r=atob(e.slice(t+1)),i=new Uint8Array(r.length);for(let e=0;e{a.onloadeddata=()=>e(),a.onerror=()=>n(Error(`${t} cannot be decoded by this browser`))});let o=Number.isFinite(a.duration)&&a.duration>0?a.duration:n;return{id:L(`F`),name:t,kind:`video`,w:a.videoWidth,h:a.videoHeight,dur:o,gen:null,data:null,size:r.size,mime:r.type,src:a,url:i}}var vi=`#ffb43a`,$=(e,t,n,r=`easeBoth`)=>I(e,t,n,r);function yi(e,t){let n=H(t);return e.effects.push(n),n}function bi(e,t,n,r,i,a,o,s,c){let l=R(`footage`,e,n);l.footage=t.id,l.w=t.w,l.h=t.h,l.anchor=N(t.w/2,t.h/2),l.pos=N(r[0],r[1]),l.scale=N(i,i),$(l.opacity,c,[0],`easeOut`),$(l.opacity,c+.9,[100],`easeOut`);let u=yi(l,`Drop Shadow`);u.p.opacity=N(55),u.p.dist=N(26),u.p.soft=N(30);let d=yi(l,Ar);return $(d.p.z,c,[a+1700],`easeOut`),$(d.p.z,c+1.7,[a],`easeOut`),$(d.p.ry,c,[o+70],`easeOut`),$(d.p.ry,c+1.7,[o],`easeOut`),d.p.rx=N(s),d.p.fade=N(55),l}function xi(e,t,n,r,i,a,o){let s=ue(e,t,n);s.name=t,s.pos=N(r,i);let c=ze[a].make();return c.start=N(o),s.text.animators.push(c),s}function Si(e,t,n,r){let i=fe(`Spring Architecture Week`,1280,720,30,9);i.bg=`#06101f`;let a=R(`footage`,i,`Sky`);a.footage=e.id,a.w=e.w,a.h=e.h,a.anchor=N(e.w/2,e.h/2),a.pos=N(640,360),a.scale=N(104,104),a.tout=Math.min(9,e.dur);let o=yi(a,`Brightness and Contrast`);o.p.bright=N(-15),o.p.contrast=N(8),yi(a,`Hue and Saturation`).p.sat=N(-8);let s=R(`solid`,i,`Sky Wash`);s.color=`#071a45`,s.color2=`#2b7d9c`,s.gradAngle=90,s.blend=`multiply`,s.opacity=N(88);let c=R(`null`,i,`Camera 1`),l=yi(c,jr);for(let[e,t]of[[0,[520,310,-2100]],[4.5,[640,345,-1720]],[9,[770,380,-1450]]])$(l.p.px,e,[t[0]]),$(l.p.py,e,[t[1]]),$(l.p.pz,e,[t[2]]);l.p.ix=N(640),l.p.iy=N(365),l.p.iz=N(120),$(l.p.roll,0,[-4]),$(l.p.roll,6,[0]);let u=bi(i,t,`Card Concrete`,[150,410],21,-140,24,0,.1),d=bi(i,n,`Card Tower`,[1140,290],21,130,-24,0,.35),f=bi(i,r,`Card Rowhouses`,[1030,585],18,520,-12,0,.6),p=xi(i,`SPRING`,40,640,236,6,.3);p.text.weight=500,p.text.tracking=N(720),p.text.fill=vi,p.text.animators[0].dur=N(1.6);let m=de(i,`ellipse`,`Ring`);m.shape.w=N(560),m.shape.h=N(560),m.shape.fillOn=!1,m.shape.strokeOn=!0,m.shape.stroke=vi,m.shape.strokeW=N(2),m.pos=N(640,340),$(m.scale,.3,[0,0],`overshoot`),$(m.scale,1.6,[100,100],`overshoot`),$(m.opacity,.3,[0],`easeOut`),$(m.opacity,1,[45],`easeOut`);let h=xi(i,`ARCHITECTURE`,100,640,330,0,.8);h.text.weight=800,h.text.tracking=N(60);let g=ze[7].make();g.dy=N(5),g.freq=N(.45),g.phase=N(.12),h.text.animators.push(g);let _=yi(h,`Drop Shadow`);_.p.opacity=N(55),_.p.dist=N(10),_.p.soft=N(22);let v=yi(h,`Glow`);v.p.thr=N(82),v.p.amount=N(.3),v.p.radius=N(26);let y=de(i,`rect`,`Accent Bar`);y.shape.w=N(520),y.shape.h=N(6),y.shape.fill=vi,y.shape.round=N(3),y.pos=N(640,404),$(y.scale,1.8,[0,100],`easeOut`),$(y.scale,2.5,[100,100],`easeOut`);let b=xi(i,`April 12 to 19 | Free tours in every district`,30,640,458,1,2.3);b.text.weight=500,b.text.fill=`#e8f1ff`,b.text.tracking=N(60),b.effects.push(H(`Drop Shadow`)),b.effects[0].p.opacity=N(50),b.effects[0].p.dist=N(5),b.effects[0].p.soft=N(10);let x=de(i,`polygon`,`Hexagon`);x.shape.w=N(96),x.shape.h=N(96),x.shape.points=N(6),x.shape.fillOn=!1,x.shape.strokeOn=!0,x.shape.stroke=vi,x.shape.strokeW=N(3),x.pos=N(1130,112),$(x.scale,1.4,[0,0],`overshoot`),$(x.scale,2.2,[100,100],`overshoot`);let S=de(i,`star`,`Star`);S.shape.w=N(64),S.shape.h=N(64),S.shape.fill=vi,S.shape.inner=N(.42),S.pos=N(150,108),$(S.scale,1.7,[0,0],`overshoot`),$(S.scale,2.5,[100,100],`overshoot`);let C=de(i,`rect`,`Counter Bar`);C.shape.w=N(400),C.shape.h=N(56),C.shape.fill=`#06142b`,C.shape.round=N(10),C.pos=N(214,646),$(C.pos,2.2,[-200,646],`easeOut`),$(C.pos,3,[214,646],`easeOut`),$(C.opacity,2.2,[0]),$(C.opacity,3,[62]);let w=ue(i,`0 BUILDINGS OPEN`,24);w.name=`Counter`,w.pos=N(214,647),w.text.weight=600,w.text.tracking=N(160),w.text.family=`JetBrains Mono`,$(w.opacity,2.6,[0]),$(w.opacity,3.2,[100]);let T=[0,1,2].map(e=>{let t=de(i,`ellipse`,`Dot ${e+1}`);return t.shape.w=N(14),t.shape.h=N(14),t.shape.fill=vi,t.pos=N(444+e*24,646),$(t.scale,3.2+e*.15,[0,0],`overshoot`),$(t.scale,3.8+e*.15,[100,100],`overshoot`),t}),E=R(`adjust`,i,`Finish`),D=yi(E,`Hue and Saturation`);D.p.sat=N(8);let ee=yi(E,`Glow`);ee.p.thr=N(80),ee.p.radius=N(30),ee.p.amount=N(.35);let O=yi(E,`Vignette`);O.p.amount=N(45),O.p.size=N(80),i.layers=[E,...T,w,C,S,x,b,y,h,m,p,f,d,u,c,s,a];for(let e of i.layers)e.tout=Math.min(e.tout,i.dur);let te=(e,t,n)=>`fx.${e.effects.find(e=>e.kind===t).id}.${n}`,k=(e,t,n)=>{let r=lr(e);r.ex=r.ex??{},r.ex[t]=n};for(let e of[u,d,f])k(e,te(e,Ar,`ry`),`wiggle(0.35, control("Float"))`),k(e,te(e,Ar,`rx`),`wiggle(0.3, control("Float") * 0.5)`);k(m,`tf.scale`,`mul(value, 1 + 0.03 * Math.sin(time * 2.4))`),k(x,`tf.rot`,`time * 40`),k(S,`tf.rot`,`time * -90`),k(S,`tf.scale`,`mul(value, 1 + 0.15 * Math.sin(time * 5))`),k(h,`text.tracking`,`value + 8 * Math.sin(time * 1.4)`),k(w,`text.value`,`Math.round(linear(time, 2.4, 5, 0, control("Buildings"))) + " BUILDINGS OPEN"`);for(let e of T)k(e,`tf.opacity`,`Math.sin(time * 6 - index * 0.8) > 0 ? 100 : 25`);let A=ii(i);A.name=`Spring Architecture Week`;let j=(e,t)=>({layer:e.id,path:t});return A.controls.push(ai(`Kicker`,`text`,`SPRING`,[j(p,`text.value`)]),ai(`Title`,`text`,`ARCHITECTURE`,[j(h,`text.value`)]),ai(`Subtitle`,`text`,b.text.value,[j(b,`text.value`)]),ai(`Accent`,`color`,vi,[j(p,`text.fill`),j(m,`shape.stroke`),j(y,`shape.fill`),j(S,`shape.fill`),j(x,`shape.stroke`),...T.map(e=>j(e,`shape.fill`))]),ai(`Float`,`slider`,8,[],0,30,.5),ai(`Buildings`,`slider`,48,[],0,200,1),ai(`Shapes`,`check`,!0,[j(m,`vis`),j(x,`vis`),j(S,`vis`)]),ai(`Sky Brightness`,`slider`,-15,[j(a,`prop:${te(a,`Brightness and Contrast`,`bright`)}`)],-150,150,1)),i}var Ci=4.8;async function wi(){let[e,t,n,r]=await Promise.all([_i(`sky-timelapse`,`sky-timelapse.webm`,9),gi(`card-concrete`,`card-concrete.jpg`),gi(`card-tower`,`card-tower.jpg`),gi(`card-rowhouses`,`card-rowhouses.jpg`)]),i=pe();return i.name=`Spring Architecture Week`,i.footage.push(e,t,n,r),i.comps.push(Si(e,t,n,r)),i.active=i.comps[0].id,i}function Ti(e,t){let n=a(``),i=o(n,`.fx-group-tabs`),s=o(n,`.fx-group-body`),c=[],l=[],u=e=>{t.forEach((t,n)=>{r(c[n],`is-active`,e===n),l[n].hidden=e!==n}),t[e].on?.()};return t.forEach((e,t)=>{let n=a(``);n.textContent=e.title,n.addEventListener(`click`,()=>u(t)),i.appendChild(n),c.push(n);let r=a(``);r.appendChild(e.el),s.appendChild(r),l.push(r)}),u(0),n.addEventListener(`pointerdown`,()=>{for(let e of document.querySelectorAll(`.fx-group`))r(e,`is-focused`,e===n)},!0),n.show=e=>{let n=t.findIndex(t=>t.id===e);n>=0&&u(n)},n}var Ei=e=>``;async function Di(){try{xt(await wi()),W.sel=K().layers.find(e=>e.name===`ARCHITECTURE`)?.id??null,U.emit(`sel`),await G.warm(K()),Y(Ci),await G.prepare(K(),W.time),G.render(K(),W.time,document.createElement(`canvas`),.1),U.emit(`frame`),U.emit(`project`)}catch(e){M(`${e instanceof Error?e.message:String(e)}; opened the generated sample instead`,`error`),St()}}function Oi(){let e=new Blob([he(W.project)],{type:`application/json`}),t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=`${W.project.name.replace(/\W+/g,`_`)}.fvxdemo.json`,t.click(),W.dirty=!1,U.emit(`status`),M(`Project saved as a .fvxdemo.json file`)}function ki(e,t,r,i,s){let c=a(``),l=a(``);return n(o(l,`span`),e),l.appendChild(c),{row:l,input:c}}function Ai(){let e=K(),t=new d(`Composition Settings`,380),n=[ki(`Width`,e.w,16,4096,1),ki(`Height`,e.h,16,4096,1),ki(`Frame rate`,e.fps,1,120,1),ki(`Duration (s)`,e.dur,.1,600,.1)],r=a(``);for(let e of n)t.body.appendChild(e.row);t.field(`Background`,r),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`OK`,`primary`,()=>{e.w=Math.round(+n[0].input.value)||e.w,e.h=Math.round(+n[1].input.value)||e.h,e.fps=Math.max(1,+n[2].input.value||e.fps),e.dur=Math.max(.1,+n[3].input.value||e.dur),e.bg=r.value,e.workIn=0,e.workOut=e.dur;for(let t of e.layers)t.tout=Math.min(t.tout,e.dur);J(),Y(Math.min(W.time,e.dur)),t.close()}),t.open()}function ji(){let e=q();return e&&W.selProp?lt(e).find(e=>e.id===W.selProp):void 0}function Mi(){let e=ji();if(!e){M(`Click a property row in Effect Controls or the Timeline first`);return}let t=new d(`Wiggler · ${e.label}`,360),n=ki(`Frequency (keys per second)`,4,.5,30,.5),r=ki(`Magnitude${e.unit}`,30,0,5e3,1);t.body.append(n.row,r.row),t.body.appendChild(a(`
Bakes seeded random keyframes. The Expressions panel has a live wiggle() that stays editable.
`)),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`Apply`,`primary`,()=>{Yt(e,+n.input.value,+r.input.value),t.close()}),t.open()}function Ni(){let e=ji();if(!e||e.prop.k.length<3){M(`Select an animated property with three or more keyframes`);return}let t=new d(`Smoother · ${e.label}`,360),n=ki(`Tolerance`,4,0,1e3,.5);t.body.append(n.row),t.button(`Cancel`,`ghost`,()=>t.close()),t.button(`Apply`,`primary`,()=>{M(`Removed ${Xt(e,+n.input.value)} keyframes`),t.close()}),t.open()}function Pi(){let t=new d(`About this demo`,460);t.body.appendChild(a(`
${Ei(44)}
FormVFX motion design demo
Version ${e} · Apache-2.0 · NodeAgentc, Inc.
The interface is the app's own. The compositor is a compact TypeScript one on Canvas 2D, extended here with a look-at camera and 3D layers, per-property expressions and Template Controls. FormVFX itself renders on its Rust engine.
-
Nothing is uploaded: the footage you drop stays in this tab.
`)),t.button(`Close`,`primary`,()=>t.close()),t.open()}function ji(){let e=q();!e||e.kind===`null`||e.kind===`adjust`?A(`Select a footage, text, shape or solid layer first`):e.effects.some(e=>e.kind===`Layer 3D`)?A(`${e.name} is already a 3D layer`):(e.effects.push(H(Er)),J())}function Mi(){let e=K();if($r(e)){A(`This composition already has a camera`);return}let t=L(`null`,e,`Camera 1`);t.tout=e.dur,t.effects.push(H(Dr)),e.layers.unshift(t),W.sel=t.id,J(),U.emit(`sel`)}function Ni(){let e=()=>[{label:`Text`,run:St},{label:`Solid`,run:wt},{label:`Rectangle`,run:()=>Ct(`rect`)},{label:`Ellipse`,run:()=>Ct(`ellipse`)},{label:`Star`,run:()=>Ct(`star`)},{label:`Polygon`,run:()=>Ct(`polygon`)},{label:`Adjustment Layer`,run:Tt},{label:`Null Object`,run:Et},{label:`Camera`,run:Mi}];return[[`File`,()=>[{label:`New Project`,run:yt},{label:`Open Spring Architecture Week`,run:()=>void Ci()},{label:`Open Generated Sample`,run:vt},{label:`Open Project...`,shortcut:`Cmd+O`,run:()=>void nn(`.json,.fvxdemo`,!1).then(e=>tn(e))},{label:`Save Project`,shortcut:`Cmd+S`,run:wi},`-`,{label:`Import Footage...`,shortcut:`Cmd+I`,run:()=>void nn(`image/*,video/*`,!0).then(e=>tn(e))},{label:`Import as Composition...`,run:()=>void nn(`image/*,video/*`,!1).then(e=>tn(e,!0))},`-`,{label:`Render Queue`,run:()=>U.emit(`showqueue`)}]],[`Edit`,()=>[{label:`Undo`,shortcut:`Cmd+Z`,enabled:mt(),run:ft},{label:`Redo`,shortcut:`Shift+Cmd+Z`,enabled:ht(),run:pt},`-`,{label:`Duplicate`,shortcut:`Cmd+D`,run:jt},{label:`Delete`,shortcut:`Delete`,run:()=>At()},{label:`Split Layer`,shortcut:`Shift+Cmd+D`,run:Nt}]],[`Composition`,()=>[{label:`Composition Settings...`,run:Ei},{label:`Set Work Area Start`,shortcut:`B`,run:()=>{let e=K();e.workIn=Math.min(W.time,e.workOut-1/e.fps),J()}},{label:`Set Work Area End`,shortcut:`N`,run:()=>{let e=K();e.workOut=Math.max(W.time+1/e.fps,e.workIn+1/e.fps),J()}},`-`,{label:`Go to Start`,shortcut:`Home`,run:()=>Y(0)},{label:`Go to End`,shortcut:`End`,run:()=>Y(K().dur)}]],[`Layer`,()=>[{label:`New`,children:e},{label:`Make Layer 3D`,run:ji},{label:`Add Mask`,children:[{label:`Rectangle Mask`,run:()=>Rt(`rect`)},{label:`Ellipse Mask`,run:()=>Rt(`ellipse`)}]},{label:`Text Animation Preset`,children:Fe.map(e=>({label:e.name,run:()=>It(e.name)}))}]],[`Effect`,()=>ke.map(e=>({label:e,children:Ee.filter(t=>t.cat===e).map(e=>({label:e.kind,run:()=>Pt(e.kind)}))}))],[`Animation`,()=>[{label:`Toggle Keyframe at Playhead`,run:()=>{let e=Di();e?Ut(e):A(`Click a property row first`)}},{label:`Keyframe Interpolation`,children:M.map(([e,t])=>({label:t,run:()=>{let t=Di();t?Wt(t,e):A(`Click a property row first`)}}))},`-`,{label:`Add Expression...`,run:()=>U.emit(`showexpr`)},{label:`Wiggler...`,run:Oi},{label:`Smoother...`,run:ki}]],[`View`,()=>[...Object.entries(x).map(([e,t])=>({label:`Theme: ${t.label}`,checked:E().theme===e,run:()=>O(e)}))]],[`Help`,()=>[{label:`About this demo`,run:Ai},{label:`FormVFX on GitHub`,run:()=>window.open(`https://github.com/nodemode-dev/formVFX`,`_blank`,`noopener`)}]]]}function Pi(){Qr(),ee();let t=o(document,`#app`),s=a(`
+
Nothing is uploaded: the footage you drop stays in this tab.
`)),t.button(`Close`,`primary`,()=>t.close()),t.open()}function Fi(){let e=q();!e||e.kind===`null`||e.kind===`adjust`?M(`Select a footage, text, shape or solid layer first`):e.effects.some(e=>e.kind===`Layer 3D`)?M(`${e.name} is already a 3D layer`):(e.effects.push(H(Ar)),J())}function Ii(){let e=K();if(ri(e)){M(`This composition already has a camera`);return}let t=R(`null`,e,`Camera 1`);t.tout=e.dur,t.effects.push(H(jr)),e.layers.unshift(t),W.sel=t.id,J(),U.emit(`sel`)}function Li(){let e=()=>[{label:`Text`,run:Et},{label:`Solid`,run:Ot},{label:`Rectangle`,run:()=>Dt(`rect`)},{label:`Ellipse`,run:()=>Dt(`ellipse`)},{label:`Star`,run:()=>Dt(`star`)},{label:`Polygon`,run:()=>Dt(`polygon`)},{label:`Adjustment Layer`,run:kt},{label:`Null Object`,run:At},{label:`Camera`,run:Ii}];return[[`File`,()=>[{label:`New Project`,run:Ct},{label:`Open Spring Architecture Week`,run:()=>void Di()},{label:`Open Generated Sample`,run:St},{label:`Open Project...`,shortcut:`Cmd+O`,run:()=>void sn(`.json,.fvxdemo`,!1).then(e=>on(e))},{label:`Save Project`,shortcut:`Cmd+S`,run:Oi},`-`,{label:`Import Footage...`,shortcut:`Cmd+I`,run:()=>void sn(`image/*,video/*`,!0).then(e=>on(e))},{label:`Import as Composition...`,run:()=>void sn(`image/*,video/*`,!1).then(e=>on(e,!0))},`-`,{label:`Render Queue`,run:()=>U.emit(`showqueue`)}]],[`Edit`,()=>[{label:`Undo`,shortcut:`Cmd+Z`,enabled:vt(),run:gt},{label:`Redo`,shortcut:`Shift+Cmd+Z`,enabled:yt(),run:_t},`-`,{label:`Duplicate`,shortcut:`Cmd+D`,run:Ft},{label:`Delete`,shortcut:`Delete`,run:()=>Pt()},{label:`Split Layer`,shortcut:`Shift+Cmd+D`,run:Lt}]],[`Composition`,()=>[{label:`Composition Settings...`,run:Ai},{label:`Set Work Area Start`,shortcut:`B`,run:()=>{let e=K();e.workIn=Math.min(W.time,e.workOut-1/e.fps),J()}},{label:`Set Work Area End`,shortcut:`N`,run:()=>{let e=K();e.workOut=Math.max(W.time+1/e.fps,e.workIn+1/e.fps),J()}},`-`,{label:`Go to Start`,shortcut:`Home`,run:()=>Y(0)},{label:`Go to End`,shortcut:`End`,run:()=>Y(K().dur)}]],[`Layer`,()=>[{label:`New`,children:e},{label:`Make Layer 3D`,run:Fi},{label:`Add Mask`,children:[{label:`Rectangle Mask`,run:()=>Ht(`rect`)},{label:`Ellipse Mask`,run:()=>Ht(`ellipse`)}]},{label:`Text Animation Preset`,children:ze.map(e=>({label:e.name,run:()=>Bt(e.name)}))}]],[`Effect`,()=>Ne.map(e=>({label:e,children:Ae.filter(t=>t.cat===e).map(e=>({label:e.kind,run:()=>Rt(e.kind)}))}))],[`Animation`,()=>[{label:`Toggle Keyframe at Playhead`,run:()=>{let e=ji();e?qt(e):M(`Click a property row first`)}},{label:`Keyframe Interpolation`,children:ie.map(([e,t])=>({label:t,run:()=>{let t=ji();t?Jt(t,e):M(`Click a property row first`)}}))},`-`,{label:`Add Expression...`,run:()=>U.emit(`showexpr`)},{label:`Wiggler...`,run:Mi},{label:`Smoother...`,run:Ni}]],[`View`,()=>[...Object.entries(T).map(([e,t])=>({label:`Theme: ${t.label}`,checked:te().theme===e,run:()=>j(e)}))]],[`Help`,()=>[{label:`About this demo`,run:Pi},{label:`FormVFX on GitHub`,run:()=>window.open(`https://github.com/nodemode-dev/formVFX`,`_blank`,`noopener`)}]]]}function Ri(){ni(),A();let t=o(document,`#app`),s=a(`
A motion title with 3D cards and a camera move is open: press Space to play, edit the Template Controls, or write an expression.
`,d.addEventListener(`click`,e=>{let t=e.target.closest(`[data-n]`);if(!t)return;let n=t.dataset.n;n===`text`?St():n===`rect`?Ct(`rect`):n===`ellipse`?Ct(`ellipse`):n===`star`?Ct(`star`):n===`solid`?wt():n===`adjust`?Tt():n===`mask`&&Rt(`ellipse`)}),s.addEventListener(`click`,e=>{let t=e.target.closest(`[data-t]`);t&&(t.dataset.t===`undo`?ft():t.dataset.t===`redo`?pt():t.dataset.t===`open`&&nn(`image/*,video/*,.json,.fvxdemo`,!0).then(e=>tn(e)))});let f=Jn(),p=qn(()=>f.update()),m=o(s,`.fx-dock`);m.style.setProperty(`--fx-left`,`372px`);let h=e=>a(``),g=h(`left`),y=h(`center`),x=h(`right`),S=h(`bottom`),C=xi(`left`,[{id:`project`,title:`Project`,el:mn()},{id:`effects`,title:`Effects and Presets`,el:_n()},{id:`tc`,title:`Template Controls`,el:ci()}]),w=xi(`center`,[{id:`comp`,title:`Composition`,el:p}]),T=xi(`right`,[{id:`ec`,title:`Effect Controls`,el:dn()},{id:`ex`,title:`Expressions`,el:si()},{id:`scopes`,title:`Scopes`,el:f.el,on:()=>f.update()},{id:`info`,title:`Info`,el:Yn()}]),E=xi(`bottom`,[{id:`tl`,title:`Timeline`,el:rr(),on:()=>U.emit(`time`)},{id:`rq`,title:`Render Queue`,el:Xn()}]);g.appendChild(C),y.appendChild(w),x.appendChild(T),S.appendChild(E);let D=[`left`,`right`,`bottom`].map(e=>a(``));m.append(g,D[0],y,D[1],x,D[2],S),D.forEach(e=>{e.addEventListener(`pointerdown`,t=>{e.setPointerCapture(t.pointerId),r(e,`is-dragging`,!0);let n=e.dataset.split,i=e=>{let t=m.getBoundingClientRect();n===`left`?m.style.setProperty(`--fx-left`,`${Math.max(200,Math.min(520,e.clientX-t.left))}px`):n===`right`?m.style.setProperty(`--fx-right`,`${Math.max(220,Math.min(560,t.right-e.clientX))}px`):m.style.setProperty(`--fx-bottom`,`${Math.max(160,Math.min(t.height-220,t.bottom-e.clientY))}px`)},a=()=>{e.removeEventListener(`pointermove`,i),e.removeEventListener(`pointerup`,a),r(e,`is-dragging`,!1),U.emit(`frame`)};e.addEventListener(`pointermove`,i),e.addEventListener(`pointerup`,a)})}),U.on(`showqueue`,()=>E.show(`rq`)),U.on(`showexpr`,()=>T.show(`ex`));let O=o(s,`.fx-doc-name`),te=o(s,`.fx-doc-dot`),k=o(s,`.fx-st-act`),A=o(s,`.fx-st-rev`);U.on(`status`,()=>{n(O,W.fileName||W.project.name),r(te,`is-dirty`,W.dirty),o(s,`[data-t=undo]`).disabled=!mt(),o(s,`[data-t=redo]`).disabled=!ht()}),U.on(`frame`,()=>n(A,`${G.lastMs.toFixed(0)} ms/frame`)),U.on(`time`,()=>n(A,`${G.lastMs.toFixed(0)} ms/frame`)),U.on(`sel`,()=>{let e=q();n(k,e?`Selected: ${e.name}`:``)}),U.on(`animmenu`,()=>{let e=o(s,`.fx-ec-head`).getBoundingClientRect();b(e.right-180,e.bottom+4,Fe.map(e=>({label:e.name,run:()=>It(e.name)})))}),document.addEventListener(`keydown`,e=>{if(e.target.closest(`input, textarea, select, [contenteditable]`))return;let t=e.metaKey||e.ctrlKey,n=K();if(n){if(t&&e.key.toLowerCase()===`z`)e.preventDefault(),e.shiftKey?pt():ft();else if(t&&e.key.toLowerCase()===`y`)e.preventDefault(),pt();else if(t&&e.key.toLowerCase()===`d`)e.preventDefault(),e.shiftKey?Nt():jt();else if(t&&e.key.toLowerCase()===`s`)e.preventDefault(),wi();else if(t&&e.key.toLowerCase()===`i`)e.preventDefault(),nn(`image/*,video/*`,!0).then(e=>tn(e));else if(e.code===`Space`)e.preventDefault(),Yt();else if(e.key===`ArrowLeft`)e.preventDefault(),Y(W.time-(e.shiftKey?10:1)/n.fps);else if(e.key===`ArrowRight`)e.preventDefault(),Y(W.time+(e.shiftKey?10:1)/n.fps);else if(e.key===`Home`)Y(0);else if(e.key===`End`)Y(n.dur);else if(e.key===`Delete`||e.key===`Backspace`)At();else if(e.key.toLowerCase()===`b`&&!t)n.workIn=Math.min(W.time,n.workOut-1/n.fps),J();else if(e.key.toLowerCase()===`n`&&!t)n.workOut=Math.max(W.time+1/n.fps,n.workIn+1/n.fps),J();else if(e.key.toLowerCase()===`u`&&!t){let e=q();e&&(e.open=!e.open,U.emit(`comp`))}}});let j=0;document.addEventListener(`dragenter`,e=>{e.dataTransfer?.types.includes(`Files`)&&(j+=1,r(s,`is-dropping`,!0))}),document.addEventListener(`dragleave`,()=>{j=Math.max(0,j-1),j||r(s,`is-dropping`,!1)}),document.addEventListener(`dragover`,e=>{e.dataTransfer?.types.includes(`Files`)&&e.preventDefault()}),document.addEventListener(`drop`,e=>{e.dataTransfer?.files.length&&(e.preventDefault(),j=0,r(s,`is-dropping`,!1),tn(Array.from(e.dataTransfer.files)))}),document.fonts.load(`600 40px Inter`).then(()=>document.fonts.load(`800 40px Inter`)).then(()=>document.fonts.load(`600 20px "JetBrains Mono"`)).catch(()=>void 0).then(()=>Ci()).then(()=>{U.emit(`status`),i()})}Pi()})();
\ No newline at end of file
+
A motion title with 3D cards and a camera move is open: press Space to play, edit the Template Controls, or write an expression.
`,d.addEventListener(`click`,e=>{let t=e.target.closest(`[data-n]`);if(!t)return;let n=t.dataset.n;n===`text`?Et():n===`rect`?Dt(`rect`):n===`ellipse`?Dt(`ellipse`):n===`star`?Dt(`star`):n===`solid`?Ot():n===`adjust`?kt():n===`mask`&&Ht(`ellipse`)}),s.addEventListener(`click`,e=>{let t=e.target.closest(`[data-t]`);t&&(t.dataset.t===`undo`?gt():t.dataset.t===`redo`?_t():t.dataset.t===`open`&&sn(`image/*,video/*,.json,.fvxdemo`,!0).then(e=>on(e)))});let f=Qn(),p=Zn(()=>f.update()),m=o(s,`.fx-dock`);m.style.setProperty(`--fx-left`,`372px`);let h=e=>a(``),g=h(`left`),_=h(`center`),v=h(`right`),y=h(`bottom`),b=Ti(`left`,[{id:`project`,title:`Project`,el:vn()},{id:`effects`,title:`Effects and Presets`,el:xn()},{id:`tc`,title:`Template Controls`,el:fi()}]),C=Ti(`center`,[{id:`comp`,title:`Composition`,el:p}]),T=Ti(`right`,[{id:`ec`,title:`Effect Controls`,el:hn()},{id:`ex`,title:`Expressions`,el:di()},{id:`scopes`,title:`Scopes`,el:f.el,on:()=>f.update()},{id:`info`,title:`Info`,el:$n()}]),E=Ti(`bottom`,[{id:`tl`,title:`Timeline`,el:sr(),on:()=>U.emit(`time`)},{id:`rq`,title:`Render Queue`,el:er()}]);g.appendChild(b),_.appendChild(C),v.appendChild(T),y.appendChild(E);let D=[`left`,`right`,`bottom`].map(e=>a(``));m.append(g,D[0],_,D[1],v,D[2],y),D.forEach(e=>{e.addEventListener(`pointerdown`,t=>{e.setPointerCapture(t.pointerId),r(e,`is-dragging`,!0);let n=e.dataset.split,i=e=>{let t=m.getBoundingClientRect();n===`left`?m.style.setProperty(`--fx-left`,`${Math.max(200,Math.min(520,e.clientX-t.left))}px`):n===`right`?m.style.setProperty(`--fx-right`,`${Math.max(220,Math.min(560,t.right-e.clientX))}px`):m.style.setProperty(`--fx-bottom`,`${Math.max(160,Math.min(t.height-220,t.bottom-e.clientY))}px`)},a=()=>{e.removeEventListener(`pointermove`,i),e.removeEventListener(`pointerup`,a),r(e,`is-dragging`,!1),U.emit(`frame`)};e.addEventListener(`pointermove`,i),e.addEventListener(`pointerup`,a)})}),U.on(`showqueue`,()=>E.show(`rq`)),U.on(`showexpr`,()=>T.show(`ex`));let ee=o(s,`.fx-doc-name`),O=o(s,`.fx-doc-dot`),te=o(s,`.fx-st-act`),k=o(s,`.fx-st-rev`);U.on(`status`,()=>{n(ee,W.fileName||W.project.name),r(O,`is-dirty`,W.dirty),o(s,`[data-t=undo]`).disabled=!vt(),o(s,`[data-t=redo]`).disabled=!yt()}),U.on(`frame`,()=>n(k,`${G.lastMs.toFixed(0)} ms/frame`)),U.on(`time`,()=>n(k,`${G.lastMs.toFixed(0)} ms/frame`)),U.on(`sel`,()=>{let e=q();n(te,e?`Selected: ${e.name}`:``)}),U.on(`animmenu`,()=>{let e=o(s,`.fx-ec-head`).getBoundingClientRect();w(e.right-180,e.bottom+4,ze.map(e=>({label:e.name,run:()=>Bt(e.name)})))}),document.addEventListener(`keydown`,e=>{if(e.target.closest(`input, textarea, select, [contenteditable]`))return;let t=e.metaKey||e.ctrlKey,n=K();if(n){if(t&&e.key.toLowerCase()===`z`)e.preventDefault(),e.shiftKey?_t():gt();else if(t&&e.key.toLowerCase()===`y`)e.preventDefault(),_t();else if(t&&e.key.toLowerCase()===`d`)e.preventDefault(),e.shiftKey?Lt():Ft();else if(t&&e.key.toLowerCase()===`s`)e.preventDefault(),Oi();else if(t&&e.key.toLowerCase()===`i`)e.preventDefault(),sn(`image/*,video/*`,!0).then(e=>on(e));else if(e.code===`Space`)e.preventDefault(),$t();else if(e.key===`ArrowLeft`)e.preventDefault(),Y(W.time-(e.shiftKey?10:1)/n.fps);else if(e.key===`ArrowRight`)e.preventDefault(),Y(W.time+(e.shiftKey?10:1)/n.fps);else if(e.key===`Home`)Y(0);else if(e.key===`End`)Y(n.dur);else if(e.key===`Delete`||e.key===`Backspace`)Pt();else if(e.key.toLowerCase()===`b`&&!t)n.workIn=Math.min(W.time,n.workOut-1/n.fps),J();else if(e.key.toLowerCase()===`n`&&!t)n.workOut=Math.max(W.time+1/n.fps,n.workIn+1/n.fps),J();else if(e.key.toLowerCase()===`u`&&!t){let e=q();e&&(e.open=!e.open,U.emit(`comp`))}}});let j=0;document.addEventListener(`dragenter`,e=>{e.dataTransfer?.types.includes(`Files`)&&(j+=1,r(s,`is-dropping`,!0))}),document.addEventListener(`dragleave`,()=>{j=Math.max(0,j-1),j||r(s,`is-dropping`,!1)}),document.addEventListener(`dragover`,e=>{e.dataTransfer?.types.includes(`Files`)&&e.preventDefault()}),document.addEventListener(`drop`,e=>{e.dataTransfer?.files.length&&(e.preventDefault(),j=0,r(s,`is-dropping`,!1),on(Array.from(e.dataTransfer.files)))}),document.fonts.load(`600 40px Inter`).then(()=>document.fonts.load(`800 40px Inter`)).then(()=>document.fonts.load(`600 20px "JetBrains Mono"`)).catch(()=>void 0).then(()=>Di()).then(()=>{U.emit(`status`),i()})}Ri()})();
\ No newline at end of file
diff --git a/docs/EXTENSIONS.md b/docs/EXTENSIONS.md
index 08aa09e..d3f5d26 100644
--- a/docs/EXTENSIONS.md
+++ b/docs/EXTENSIONS.md
@@ -2,7 +2,7 @@
FormVFX loads extensions that follow the Form Extension Contract, API 1, beside its own effect plug-ins (`docs/PLUGINS.md`), scripts and ScriptUI panels, and HTML panels installed under Window > Extensions. This page is what an extension author needs for FormVFX: the document snapshot, the commands, the events and where things appear. The protocol itself (`host.hello`, `ui.notify`, `storage.*`, `ext.activate` and the rest) is the contract's.
-- Product id: `formvfx`. `host.hello` answers `app: "FormVFX"`, `appVersion` (this release, 0.60.1), `api: "1"`.
+- Product id: `formvfx`. `host.hello` answers `app: "FormVFX"`, `appVersion` (this release, 0.61.0), `api: "1"`.
- Set `"minimum_app": "0.54.0"` in your manifest. A source checkout reports its last release (0.53.3) until the 0.54.0 release commit, so leave `minimum_app` out of a test copy run against an unreleased build.
- Consent: the first time a version is opened or run, FormVFX lists its permissions and the person chooses Allow (stored for that id, version and permission set) or Not Now (not stored; nothing opens and a command fails with -32001). The frame is created only after Allow, so your first `host.hello` already carries the granted permissions.
diff --git a/docs/MANUAL.md b/docs/MANUAL.md
index 446f142..5501822 100644
--- a/docs/MANUAL.md
+++ b/docs/MANUAL.md
@@ -6,7 +6,7 @@ formvfx is a motion graphics and visual effects compositor: a project of footage
- **Title bar** · the menus (File, Edit, Composition, Layer, Effect, Animation, View, Window, Help), the open project's name, the workspace menu, undo and redo, command search, the Agent button (the Terminal, Claude Code, Chat, Codex, Cursor, Antigravity and the Agent workspace) and Settings.
- **Toolbar** · selection, hand, zoom, orbit, pan behind, the shape tools (rectangle, rounded rectangle, ellipse, polygon, star), the pen, the type tool, brush, clone stamp and eraser, Roto Paint and the puppet tools. A shape tool with a non-shape layer selected draws a mask instead.
-- **Panels** · Project, Composition (the viewer), Timeline, Effect Controls, Effects & Presets, Info, Preview, Align, Character, Paragraph, Tracker, Render Queue, Template Controls, Flowchart, History, Audio, Footage, Media Browser, Brushes, Paint, Selection-Aware-Fill, Color Scopes, Markers, Metadata, Motion Sketch, Smoother, Wiggler, Progress, Learn, Chat, Terminal, Agents and Live Link. Window > Panels opens any of them; drag a tab onto another group to dock it there, or use Undock Panel from the tab's menu; the backtick key maximises the focused panel.
+- **Panels** · Project, Composition (the viewer), Timeline, Effect Controls, Effects & Presets, Info, Preview, Align, Character, Paragraph, Tracker, Render Queue, Template Controls, Flowchart, History, Audio, Footage, Media Browser, Brushes, Paint, Selection-Aware-Fill, Color Scopes, Markers, Metadata, Motion Sketch, Smoother, Wiggler, Progress, Learn, Chat, Terminal, Agents, Live Link and Generate with Comfy. Window > Panels opens any of them; drag a tab onto another group to dock it there, or use Undock Panel from the tab's menu; the backtick key maximises the focused panel.
- **Workspaces** · Default, Animation, Effects, Text, Motion Tracking, Agent and Minimal (Window > Workspace or the title bar). Save Changes to this Workspace and Save as New Workspace keep your layout.
- **Language** · Settings > Interface > Language: 26 languages, English by default. The whole interface changes in place, including menus and effect names.
- **Shortcuts** · Edit > Keyboard Shortcuts shows the keyboard by modifier, searches, records new shortcuts, loads presets and imports or exports a set; conflicts are flagged.
@@ -105,6 +105,21 @@ File > Project Settings sets 8, 16 or 32 bits per channel, the working space (sR
In the Project panel, Export Live Link Clip writes a `.fvxlink` for a composition; an editor such as formcut plays it live without rendering. Links survive a moved or renamed project and a renumbered composition. Window > Live Link lists what is being served, relinks and errors.
+## Generate with Comfy
+
+Window > Generate with Comfy sends a layer to a ComfyUI server you run yourself, runs one of its workflows on it and brings the result back as footage. formvfx does not ship ComfyUI or any model; the panel only talks to the server whose address you give it.
+
+- **Install the pack.** Put the Comfy-FormBridge-Suite pack in ComfyUI's `custom_nodes` folder and restart the server. Without it the panel says Comfy answers but the pack is not installed, and the workflow list stays empty. A server older than the pack's minimum says which version it needs.
+- **Server address.** Type the address (the default is `http://127.0.0.1:8188`) and press Test or Enter. The address is saved in `comfy.json` in formvfx's data folder and is the only setting; when it works the panel reads "Connected" with the server's version, the pack's version and the graphics device. The panel fetches nothing until it is shown.
+- **Workflows.** The Workflow list is whatever the pack offers: stills (erase what a mask covers, add what a prompt describes, relight from painted strokes, find an object's mask, upscale), a caption for a picture, and shots (clean a shot, carry an edited first frame through it, animate one picture, make a fluid shot from keyframes, track an object into a matte, upscale a shot, turn an SDR shot into scene-linear EXR). A line under the picker says what the chosen workflow does. Its other values (prompt, seed, strength, size as `1024x576`, points as `x,y x,y`) appear as fields and keep what you typed when you switch workflows.
+- **Readiness.** Under the picker the panel says "Ready to run." or why not: node packs to install into `custom_nodes`, node types missing on the server, and each missing model with its file name, size, where it comes from (and when to accept its terms first) and the folder to put it in. Workflows that are not ready are marked "(not ready)" in the list. formvfx never downloads models for you.
+- **Source.** The source is the layer selected in the Timeline over the composition's work area; the panel shows its name and frame range, or asks you to select a layer. A footage layer with no effects or masks sends its own file; anything else is rendered frame by frame from the work area first (as a PNG sequence, or EXR in a 32-bit project).
+- **Masks and keyframes.** A workflow with a mask slot takes the second selected layer as the mask (select the source first, then the mask layer; the panel names both), and the mask is rendered from that layer, never from the source. A keyframe workflow sends stills of the source at frames 0, 8, 16 and so on of the work area, each a multiple of 8 from its start.
+- **Run.** Run sends the plate and the values and follows the job: waiting in the queue (with the position), then Running with the step, a preview that fills its reserved space, and the seed used. A repeat of an identical job comes back at once marked as reused.
+- **Results.** When the job is done the files are saved in a `Footage/comfy-` folder next to the project (or in formvfx's data folder when the project is unsaved) and imported. Each result becomes a footage layer above the source layer, starting where the source starts; when a workflow returns a matte as well as a picture, the matte becomes its own layer and the picture layer uses it as a luma track matte (white keeps). The whole landing is one undo step.
+- **Retry, Cancel.** Retry with another seed runs the same job again with a new seed; Cancel stops a queued or running job. Closing or hiding the panel only pauses the display; showing it again picks the job back up.
+- **Agents.** `comfy_status`, `comfy_workflows` and `comfy_job` read, and `comfy_run` asks first in the window; agents use the saved address and cannot change it or pass a file path. `guide comfy` explains the loop.
+
## Agents
- The terminal dock sits under the panels, or at their right from the side button in its head; Cmd or Ctrl+J shows and hides it, and programs keep running while it is hidden. Its buttons open a new shell tab (plus), the Chat tab (speech bubble) and a Claude Code tab (robot), restart the current tab, or hide the dock. Window > Start Claude Code (Shift+Cmd or Ctrl+J) opens a Claude Code tab already connected to this window; the line under the dock sends it a request in plain words. Window > Chat with Claude (Alt+Cmd or Ctrl+J) opens the Chat tab, which streams the answer in formatted text with each tool it uses, shows how much of Claude's memory the conversation uses and what it cost, and moves a conversation to or from a Claude Code tab. Every change an agent makes is an ordinary undo step.
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index 3504a89..b199fe6 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -448,3 +448,24 @@ Living context for the interface. Code carries almost no comments; the reasoning
- Kind: fix. Logged: v0.60.1 · 2026-11-29. Refers to `src/app/app.ts`, `src/app/ctx.ts`, the new `src/app/leave.ts`, `src/ui/native-menu.ts` and `src-tauri/capabilities/default.json`.
- Open, New, Close Project, Open Recent, templates and the demo project now offer Save, Don't Save or Cancel when the project has unsaved changes, as the demo did already. Closing the desktop window and Quit ask the same before the engine stops.
- Checked: `tests/window/test_window.py` has a test that New Project asks before unsaved changes are replaced.
+
+## The Generate with Comfy panel (after 0.60.1, unreleased)
+
+- Kind: change. Logged: 2026-11-29. Refers to `src/engine/comfy.ts`, `src/panels/comfy.ts` (panel id `comfy`, registered after Live Link in `src/app/app.ts`), `cfGenerate` in `src/ui/icons-vfx.ts`, the `fx-cf*` rules at the end of `src/styles/vfx.css`, and the `more/` language tables.
+- Why: a person with their own ComfyUI server can run a workflow on a layer from inside the compositor. The browser never talks to that server: the panel asks the engine service (`/api/comfy/*`), which does the network work.
+- Built once, patched in place: the panel is made in the constructor; text, disabled state, the progress width and the preview source are patched. Nothing is fetched until the panel is first shown. The workflow list is patched with `patchList`; each workflow's slot form is built the first time it is picked, kept in a map and only hidden or shown, so switching workflows keeps what was typed. The preview image has its box reserved and swaps through `swapMedia`.
+- The job is followed by polling `/api/comfy/jobs/{id}` every 1.5 s while the panel is visible; hiding clears the timer and showing resumes it. Polling goes on after `done` until the engine reports `landed`, so the result line says what was added. The selftest workflow is hidden from the picker (Test uses the handshake). Run sends `reuse: true`; Retry uses the engine's retry route, which draws a new seed.
+- The source is the first selected layer over the comp's work area, converted to frames with the comp's frame rate; with no layer the panel says so and sends nothing. Slot values: `size` is typed `WxH`, `points` as `x,y x,y`, an empty field is left out so the pack's default applies.
+- Menu and mask: the panel opens from Window > Generate with Comfy. A workflow with a mask slot takes the second selected layer as the mask, and the source line names both.
+- Translations: every sentence goes through `t()` or `tf()` (`t()` plus `{name}` placeholders), so the page translator and the tables see whole strings: the labels, notes, readiness lines, job states and their additions (position, step, seed, reused, ran again) and the landing lines have rows in the 23 `more/` tables, with the placeholders kept; `es-MX` and `fr-CA` inherit from `es` and `fr`. Keys that end in three dots are stored without them. The earlier rows with a closing period on job states were removed, since nothing looks them up now; "Done" uses the existing row of the main tables.
+- Verified: `npm run build` passes; the 23 edited tables parse as JSON; `python3 setup/lint_text.py .` reports 0 findings. The panel was not run against the live engine in this round and no test was added by the owner's decision.
+
+## Menus stay under the menu bar, take a cap and show a more-below hint (after 0.60.0, unreleased)
+
+- Kind: fix and feature. Logged: 2026-11-29. Refers to `src/ui/popup.ts` (`menuCap`, `barFloor`, `floor`, `list`, `openAt`, new `openUnder`, `openBeside`, `showMore`, Home and End in `key`), `src/ui/menubar.ts` (both calls in `show`), `src/styles/panels.css` (the `.cv-menu` card and the new `.cv-menu-list`, `.cv-menu-more` rules). Port of FormVis 2.8.3 and 2.8.4 per FORM-MENU-OVERLAP-FIX 1.2.0.
+- Why: the bar opened its menus with `openAt`, which flips a menu taller than the room below its point above it and clamps it to 4 px, so File, View and Layer covered the bar (1871x1080: View at top 4, 1072 tall; 1280x720: seven menus at top 4). `openBeside` clamped submenus to the window top, and right-click menus (`contextMenu()`) did the same.
+- Removed, quoted: in `openAt` `this.panel.scrollTop = 0;` and `const top = Math.max(4, Math.min(fitsBelow ? y : y - h, window.innerHeight - h - 4));`; in `openBeside` `const y = Math.max(4, Math.min(row.top - 4, window.innerHeight - h - 4));`; in `menubar.ts` twice `m.menu.openAt(r.left, r.bottom + 4);`; in `panels.css` `overflow-y: auto; overscroll-behavior: contain;` on `.cv-menu`.
+- Changed: the bar (its own menus and the engine's) calls `openUnder`, which keeps the top at the button's bottom plus 4 and sets `max-height` to `menuCap` (75% of the window, never past the bottom) before measuring. `openAt` keeps its pointer corner and flip, with the floor at the `.cv-menubar` bottom plus 4 (the window top when the bar is hidden for the macOS system menu) and the same cap. Submenus read the root's floor. Every caller of `contextMenu()` (viewer, timeline, project, effect controls, flowchart, templates, the dock group and tool group menus) gets it through `openAt`; no other point-anchored menu exists in `src` outside `src/dock/`, which is vendored and was left alone.
+- The rows moved into `.cv-menu-list` so the fade is a mask on the list and the glass card stays whole; `max-height` stays on the panel. Nothing outside `popup.ts` reads the panel's children or `scrollTop` (`keys.ts` only checks `.cv-menu:not([hidden])`). The panel no longer scrolls, so End and Home, which the browser used to give the focused panel, are now handled in `key` (focus the last or first row and scroll the list). No scroll listener closes an open submenu: the old panel did not either.
+- Not changed: classes, colours, glass, spacing, z values, `native-menu.ts`. The browser demo imports `ui/popup.ts` and needs rebuilding (`node demo/build.mjs`) to carry this.
+- Verified: `npx tsc --noEmit` clean; `npm run build` passes; no vitest suite exists here. Headless Chrome against the engine built from source (scratch venv, `maturin develop --release`) serving `dist`, a comp with one solid: every bar menu and the first submenu at 1871x1080, 1280x720, 1000x480, 800x320 under 4x CPU, every frame sampled: 0 failures (tops 38 under a bar bottom of 33.5, heights 810, 540, 360, 240 at most, End reaches the last row). Viewer right-click (20 rows, the longest) before and after: 1280x800 top 4 h 653 to top 38 h 600 with the hint; 1871x1080 top 4 to top 38, 653 tall, no hint; 1000x480 top 4 h 472 to top 38 h 360 with the hint. Hint at 1871x1080 unthrottled: full opacity in the first four frames, 0.29 at 80 ms and 0 by 374 ms at the last row, 0.62 at 241 ms and 1 by 744 ms after 120 px up, End hides and Home restores, Help (fits) has none, 30 arrow presses never left the focused row in the fade, a cut-off Layer submenu at 1000x420 has it. Window > Generate with Comfy still opens its panel. The window smoke (`tests/window`) could not start: Playwright's bundled browser is not installed here. Changed files carry no U+2014 and no emoji.
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 1884938..412d4f3 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "formvfx",
- "version": "0.60.1",
+ "version": "0.61.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "formvfx",
- "version": "0.60.1",
+ "version": "0.61.0",
"license": "Apache-2.0",
"dependencies": {
"@fontsource/inter": "5.3.0",
diff --git a/frontend/package.json b/frontend/package.json
index 1a802b3..61494ad 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "formvfx",
"private": true,
- "version": "0.60.1",
+ "version": "0.61.0",
"description": "formvfx · motion graphics and visual effects in the form family",
"license": "Apache-2.0",
"type": "module",
diff --git a/frontend/src/app/app.ts b/frontend/src/app/app.ts
index 8e5f32c..b9c1c9a 100644
--- a/frontend/src/app/app.ts
+++ b/frontend/src/app/app.ts
@@ -15,6 +15,7 @@ import { AlignPanel, CharacterPanel, CommandPanel, HistoryPanel, InfoPanel, Para
import { ColorScopesPanel, ProgressPanel } from '../panels/scopes';
import { LearnPanel } from '../panels/learn';
import { DynamicLinkPanel } from '../panels/dynamic-link';
+import { ComfyPanel } from '../panels/comfy';
import { TimelinePanel } from '../panels/timeline';
import { TrackerPanel } from '../panels/tracker';
import { editTarget, trackerOptions } from '../panels/tracker-controls';
@@ -149,6 +150,7 @@ class App {
{ label: 'Start Antigravity', run: () => void this.tdock.program('antigravity') },
{ label: 'Agents', run: () => this.dock.show('agents') },
{ label: 'Live Link', run: () => this.dock.show('dynamicLink') },
+ { label: 'Generate with Comfy', run: () => this.dock.show('comfy') },
{ label: 'Command Palette...', shortcut: 'Cmd+K', run: () => void this.palette.open() },
{ label: 'Maximize Panel', shortcut: '`', run: () => this.dock.toggleMaximizeFocused() },
],
@@ -296,6 +298,7 @@ class App {
this.dock.register('history', 'History', () => new HistoryPanel(ctx));
this.dock.register('learn', 'Learn', () => new LearnPanel(ctx));
this.dock.register('dynamicLink', 'Live Link', () => new DynamicLinkPanel(ctx));
+ this.dock.register('comfy', 'Generate with Comfy', () => new ComfyPanel(ctx));
this.dock.register('agents', 'Agents', () => new AgentsPanel(ctx));
this.dock.register('extensions', 'Extensions', () => (this.extPanel = new ExtensionsPanel(ctx, this.formext)));
this.dock.register('flowchart', 'Flowchart', () => new FlowchartPanel(ctx));
diff --git a/frontend/src/engine/comfy.ts b/frontend/src/engine/comfy.ts
new file mode 100644
index 0000000..00f94b6
--- /dev/null
+++ b/frontend/src/engine/comfy.ts
@@ -0,0 +1,102 @@
+import { api } from './client';
+
+export interface ComfySettings { address: string }
+
+export interface ComfyHandshake {
+ installed: boolean;
+ supported?: boolean;
+ message?: string;
+ pack?: { name: string; version: string };
+ comfyui?: { version: string; minimum: string; supported: boolean };
+ device?: { name: string; vram_mb: number; ram_mb: number };
+ memory_profile?: string;
+}
+
+export interface ComfySlot {
+ name: string;
+ type: string;
+ required: boolean;
+ default?: unknown;
+ min?: number;
+ max?: number;
+ step?: number;
+ choices?: string[];
+ description?: string;
+}
+
+export interface ComfyWorkflow {
+ id: string;
+ version: number;
+ title: string;
+ task: string;
+ description: string;
+ media: string;
+ slots: ComfySlot[];
+ outputs: Array<{ name: string; kind: string; description: string }>;
+ ready?: boolean;
+}
+
+export interface ComfyReadiness {
+ ready: boolean;
+ nodes: Array<{ class: string; present: boolean }>;
+ packs: Array<{ name: string; present: boolean }>;
+ models: Array<{ folder: string; file: string; present: boolean; size_mb: number; gated: boolean; source: string; place: string }>;
+}
+
+export interface ComfyJob {
+ id: string;
+ workflow: string;
+ state: 'queued' | 'running' | 'done' | 'failed' | 'cancelled';
+ queue_position?: number;
+ progress?: { value: number; max: number; node?: string };
+ seed_used?: number;
+ cached?: boolean;
+ retried?: boolean;
+ outputs?: Array<{ name?: string; kind: string; files: Array<{ file_id: string; name: string }> }>;
+ error?: { code: string; message: string };
+}
+
+export interface ComfyJobAnswer {
+ job: ComfyJob;
+ preview?: { step: number; steps: number; image: string };
+ landed?: { items: number[]; layers: number[] };
+ error?: string;
+}
+
+export type ComfySource = { layer: number; comp: number; range: [number, number] } | { path: string };
+
+export interface ComfyRunRequest {
+ workflow: string;
+ slots: Record;
+ sources: Record;
+ reuse: boolean;
+ land: boolean;
+}
+
+const json = (body: unknown): RequestInit => ({ body: JSON.stringify(body), headers: { 'content-type': 'application/json' } });
+
+export const comfy = {
+ settings: () => api('/api/comfy/settings'),
+ saveSettings: (s: ComfySettings) => api('/api/comfy/settings', { method: 'PUT', ...json(s) }),
+ handshake: () => api('/api/comfy/handshake'),
+ workflows: () => api<{ workflows: ComfyWorkflow[] }>('/api/comfy/workflows'),
+ readiness: (id: string) => api(`/api/comfy/workflows/${encodeURIComponent(id)}/readiness`),
+ run: (req: ComfyRunRequest) => api<{ job: ComfyJob }>('/api/comfy/run', { method: 'POST', ...json(req) }),
+ job: (id: string) => api(`/api/comfy/jobs/${encodeURIComponent(id)}`),
+ cancel: (id: string) => api<{ job: ComfyJob }>(`/api/comfy/jobs/${encodeURIComponent(id)}/cancel`, { method: 'POST' }),
+ retry: (id: string) => api<{ job: ComfyJob }>(`/api/comfy/jobs/${encodeURIComponent(id)}/retry`, { method: 'POST' }),
+};
+
+export function comfyError(e: unknown): string {
+ const raw = e instanceof Error ? e.message : String(e);
+ try {
+ const body = JSON.parse(raw) as { detail?: unknown; message?: string };
+ const d = body.detail;
+ if (typeof d === 'string') return d;
+ if (d && typeof d === 'object' && 'message' in d) return String((d as { message: unknown }).message);
+ if (body.message) return body.message;
+ } catch {
+ return raw || 'The engine did not answer.';
+ }
+ return raw || 'The engine did not answer.';
+}
diff --git a/frontend/src/panels/comfy.ts b/frontend/src/panels/comfy.ts
new file mode 100644
index 0000000..c759a6e
--- /dev/null
+++ b/frontend/src/panels/comfy.ts
@@ -0,0 +1,412 @@
+import type { Ctx } from '../app/ctx';
+import { comfy, comfyError, type ComfyJob, type ComfyJobAnswer, type ComfyReadiness, type ComfySlot, type ComfySource, type ComfyWorkflow } from '../engine/comfy';
+import type { UiState } from '../engine/types';
+import type { Panel } from '../ui/dock';
+import { el, escapeHtml, patchList, q, setClass, setDisabled, setHidden, setText, setValue, swapMedia } from '../ui/dom';
+import { icon } from '../ui/icons';
+import { t } from '../ui/i18n';
+
+const MEDIA = new Set(['image', 'mask', 'frames', 'movie', 'video', 'keyframes', 'media']);
+const POLL_MS = 1500;
+
+const tf = (english: string, vars: Record = {}): string =>
+ t(english).replace(/\{(\w+)\}/g, (all, k: string) => (k in vars ? String(vars[k]) : all));
+
+function readinessWords(r: ComfyReadiness): string {
+ if (r.ready) return t('Ready to run.');
+ const parts: string[] = [];
+ const packs = r.packs.filter((p) => !p.present).map((p) => p.name);
+ if (packs.length) parts.push(tf("Install these node packs into ComfyUI's custom_nodes: {list}.", { list: packs.join(', ') }));
+ const nodes = r.nodes.filter((n) => !n.present).length;
+ if (nodes && !packs.length) parts.push(tf('{n} node type(s) are missing on the server.', { n: nodes }));
+ for (const m of r.models.filter((x) => !x.present)) {
+ const v = { file: m.file, mb: Math.round(m.size_mb), source: m.source, place: m.place };
+ parts.push(m.gated ? tf('Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.', v) : tf('Missing model {file} ({mb} MB from {source}); put it in {place}.', v));
+ }
+ return parts.join(' ') || t('Not ready yet.');
+}
+
+const stateWords: Record = {
+ queued: 'Waiting in the queue',
+ running: 'Running',
+ done: 'Done',
+ failed: 'Failed',
+ cancelled: 'Cancelled',
+};
+
+interface SlotForm {
+ root: HTMLElement;
+ read: () => Record;
+ media: string[];
+ masks: string[];
+}
+
+export class ComfyPanel implements Panel {
+ readonly id = 'comfy';
+ readonly title = 'Generate with Comfy';
+ readonly el: HTMLElement;
+ private started = false;
+ private workflows: ComfyWorkflow[] = [];
+ private forms = new Map();
+ private job: ComfyJob | null = null;
+ private timer = 0;
+ private visible = false;
+ private readonly address: HTMLInputElement;
+ private readonly picker: HTMLSelectElement;
+ private readonly slotsHost: HTMLElement;
+ private readonly runBtn: HTMLButtonElement;
+ private readonly retryBtn: HTMLButtonElement;
+ private readonly cancelBtn: HTMLButtonElement;
+ private readonly preview: HTMLImageElement;
+
+ constructor(private readonly ctx: Ctx) {
+ this.el = el(`
+
${icon('cfGenerate', 14)}Generate with Comfy
+
+
+
Not checked yet.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
No job yet.
+
+
+
+
`);
+ this.address = q(this.el, '[data-automation-id="comfy.address"]');
+ this.picker = q(this.el, '[data-automation-id="comfy.workflow"]');
+ this.slotsHost = q(this.el, '.fx-cf-slots');
+ this.runBtn = q(this.el, '[data-act="run"]');
+ this.retryBtn = q(this.el, '[data-act="retry"]');
+ this.cancelBtn = q(this.el, '[data-act="cancel"]');
+ this.preview = q(this.el, '[data-automation-id="comfy.preview"]');
+ q(this.el, '[data-act="test"]').addEventListener('click', () => void this.test(true));
+ this.address.addEventListener('keydown', (e) => { if (e.key === 'Enter') void this.test(true); });
+ this.picker.addEventListener('change', () => void this.pick());
+ this.runBtn.addEventListener('click', () => void this.run());
+ this.retryBtn.addEventListener('click', () => void this.retry());
+ this.cancelBtn.addEventListener('click', () => void this.cancel());
+ setDisabled(this.runBtn, true);
+ ctx.store.watch((st) => this.sourceLine(st));
+ }
+
+ shown(): void {
+ this.visible = true;
+ if (this.job && !this.finished(this.job)) this.schedule();
+ if (this.started) return;
+ this.started = true;
+ void this.start();
+ }
+
+ hidden(): void {
+ this.visible = false;
+ window.clearTimeout(this.timer);
+ }
+
+ private note(key: string, text: string): void {
+ setText(q(this.el, `[data-r="${key}"]`), text);
+ }
+
+ private async start(): Promise {
+ try {
+ const s = await comfy.settings();
+ setValue(this.address, s.address);
+ } catch (e) {
+ this.note('server', comfyError(e));
+ return;
+ }
+ await this.test(false);
+ }
+
+ private async test(save: boolean): Promise {
+ this.note('server', t('Checking the server...'));
+ try {
+ if (save) await comfy.saveSettings({ address: this.address.value.trim() });
+ const h = await comfy.handshake();
+ if (!h.installed) {
+ this.note('server', h.message || t("Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server."));
+ this.setWorkflows([]);
+ return;
+ }
+ if (h.supported === false || h.comfyui?.supported === false) {
+ this.note('server', h.message || tf('This Comfy server is too old. The pack needs version {v} or later.', { v: h.comfyui?.minimum ?? '?' }));
+ this.setWorkflows([]);
+ return;
+ }
+ this.note('server', tf('Connected: Comfy {comfy}, {pack} {version}, {device}.', { comfy: h.comfyui?.version ?? '', pack: h.pack?.name ?? '', version: h.pack?.version ?? '', device: h.device?.name ?? '' }));
+ const w = await comfy.workflows();
+ this.setWorkflows(w.workflows.filter((x) => x.id !== 'formbridge.selftest'));
+ } catch (e) {
+ this.note('server', comfyError(e));
+ this.setWorkflows([]);
+ }
+ }
+
+ private setWorkflows(list: ComfyWorkflow[]): void {
+ this.workflows = list;
+ const keep = this.picker.value;
+ patchList(this.picker, list, {
+ key: (w) => w.id,
+ create: () => document.createElement('option'),
+ update: (node, w) => {
+ const o = node as HTMLOptionElement;
+ if (o.value !== w.id) o.value = w.id;
+ setText(o, w.ready === false ? tf('{title} (not ready)', { title: w.title }) : w.title);
+ },
+ });
+ if (list.some((w) => w.id === keep)) this.picker.value = keep;
+ void this.pick();
+ }
+
+ private current(): ComfyWorkflow | undefined {
+ return this.workflows.find((w) => w.id === this.picker.value);
+ }
+
+ private async pick(): Promise {
+ const w = this.current();
+ for (const [id, f] of this.forms) setHidden(f.root, id !== w?.id);
+ this.note('about', w ? w.description : '');
+ this.note('ready', '');
+ this.sourceLine(this.ctx.store.state);
+ setDisabled(this.runBtn, !w || this.busy());
+ if (!w) return;
+ if (!this.forms.has(w.id)) {
+ const f = this.buildForm(w);
+ this.forms.set(w.id, f);
+ this.slotsHost.appendChild(f.root);
+ }
+ this.note('ready', t('Checking what this workflow needs...'));
+ try {
+ const r = await comfy.readiness(w.id);
+ if (this.current()?.id === w.id) this.note('ready', readinessWords(r));
+ } catch (e) {
+ if (this.current()?.id === w.id) this.note('ready', comfyError(e));
+ }
+ }
+
+ private buildForm(w: ComfyWorkflow): SlotForm {
+ const root = el(``);
+ const readers: Array<() => [string, unknown] | null> = [];
+ const media: string[] = [];
+ const masks: string[] = [];
+ for (const s of w.slots) {
+ if (MEDIA.has(s.type)) { (s.type === 'mask' ? masks : media).push(s.name); continue; }
+ const { row, read } = this.slotField(w.id, s);
+ root.appendChild(row);
+ readers.push(read);
+ }
+ return {
+ root,
+ media,
+ masks,
+ read: () => Object.fromEntries(readers.map((r) => r()).filter((x): x is [string, unknown] => x !== null)),
+ };
+ }
+
+ private slotField(wid: string, s: ComfySlot): { row: HTMLElement; read: () => [string, unknown] | null } {
+ const id = `comfy.slot.${wid}.${s.name}`;
+ const label = escapeHtml(s.name.replace(/_/g, ' '));
+ const tip = escapeHtml(s.description ?? '');
+ const def = s.default;
+ if (s.type === 'bool') {
+ const row = el(``);
+ const box = q(row, 'input');
+ box.checked = def === true;
+ return { row, read: () => [s.name, box.checked] };
+ }
+ if (s.type === 'choice') {
+ const row = el(``);
+ const sel = q(row, 'select');
+ for (const c of s.choices ?? []) sel.appendChild(Object.assign(document.createElement('option'), { value: c, textContent: c }));
+ if (typeof def === 'string') sel.value = def;
+ return { row, read: () => [s.name, sel.value] };
+ }
+ const numeric = s.type === 'int' || s.type === 'float' || s.type === 'seed';
+ const row = el(``);
+ const inp = q(row, 'input');
+ if (numeric) {
+ if (s.min !== undefined) inp.min = String(s.min);
+ if (s.max !== undefined) inp.max = String(s.max);
+ inp.step = s.step !== undefined ? String(s.step) : s.type === 'float' ? 'any' : '1';
+ }
+ if (s.type === 'size' && Array.isArray(def)) inp.value = def.join('x');
+ else if (s.type === 'points' && Array.isArray(def)) inp.value = (def as number[][]).map((p) => p.join(',')).join(' ');
+ else if (def !== undefined && def !== null) inp.value = String(def);
+ if (s.type === 'size') inp.placeholder = '1024x576';
+ if (s.type === 'points') inp.placeholder = 'x,y x,y';
+ return {
+ row,
+ read: () => {
+ const v = inp.value.trim();
+ if (!v) return null;
+ if (numeric) return Number.isFinite(Number(v)) ? [s.name, Number(v)] : null;
+ if (s.type === 'size') {
+ const m = v.split(/[x, ]+/).map(Number);
+ return m.length === 2 && m.every(Number.isFinite) ? [s.name, m] : null;
+ }
+ if (s.type === 'points') return [s.name, v.split(/\s+/).map((p) => p.split(',').map(Number)).filter((p) => p.length === 2 && p.every(Number.isFinite))];
+ return [s.name, v];
+ },
+ };
+ }
+
+ private source(st: UiState | null, index = 0): { layer: number; comp: number; range: [number, number]; name: string } | null {
+ const comp = this.ctx.store.comp;
+ const id = st?.selection.layers[index];
+ if (!comp || id === undefined) return null;
+ const layer = this.ctx.store.layer(id);
+ if (!layer) return null;
+ const fps = comp.frameRate || 30;
+ const range: [number, number] = [Math.round(comp.workArea[0] * fps), Math.max(Math.round(comp.workArea[0] * fps), Math.round(comp.workArea[1] * fps) - 1)];
+ return { layer: id, comp: comp.id, range, name: layer.name };
+ }
+
+ private sourceLine(st: UiState | null): void {
+ const w = this.current();
+ const f = w ? this.forms.get(w.id) : undefined;
+ if (!w || (f && !f.media.length && !f.masks.length) || (!f && !w.slots.some((s) => MEDIA.has(s.type)))) {
+ this.note('source', '');
+ return;
+ }
+ const src = this.source(st);
+ let line = src ? tf('Source: {name}, frames {a} to {b} (the work area).', { name: src.name, a: src.range[0], b: src.range[1] }) : t('Select a layer in the Timeline to use as the source.');
+ if (f?.masks.length) {
+ const m = this.source(st, 1);
+ line += ' ' + (m ? tf('Mask: {name}.', { name: m.name }) : t('Select the mask layer as the second selected layer.'));
+ }
+ this.note('source', line);
+ }
+
+ private busy(): boolean {
+ return !!this.job && !this.finished(this.job);
+ }
+
+ private finished(j: ComfyJob): boolean {
+ return j.state === 'done' || j.state === 'failed' || j.state === 'cancelled';
+ }
+
+ private async run(): Promise {
+ const w = this.current();
+ const f = w ? this.forms.get(w.id) : undefined;
+ if (!w || !f) return;
+ const sources: Record = {};
+ const st = this.ctx.store.state;
+ if (f.media.length || f.masks.length) {
+ const src = this.source(st);
+ if (!src) { this.note('status', t('Select a layer in the Timeline to use as the source.')); return; }
+ for (const name of f.media) sources[name] = { layer: src.layer, comp: src.comp, range: src.range };
+ }
+ if (f.masks.length) {
+ const m = this.source(st, 1);
+ if (!m) { this.note('status', t('Select the mask layer as the second selected layer.')); return; }
+ for (const name of f.masks) sources[name] = { layer: m.layer, comp: m.comp, range: m.range };
+ }
+ this.note('result', '');
+ this.note('status', t('Preparing the source and sending it...'));
+ setDisabled(this.runBtn, true);
+ try {
+ const a = await comfy.run({ workflow: w.id, slots: f.read(), sources, reuse: true, land: true });
+ this.follow(a.job);
+ } catch (e) {
+ this.note('status', comfyError(e));
+ setDisabled(this.runBtn, false);
+ }
+ }
+
+ private async retry(): Promise {
+ if (!this.job) return;
+ this.note('result', '');
+ setDisabled(this.retryBtn, true);
+ try {
+ this.follow((await comfy.retry(this.job.id)).job);
+ } catch (e) {
+ this.note('status', comfyError(e));
+ setDisabled(this.retryBtn, false);
+ }
+ }
+
+ private async cancel(): Promise {
+ if (!this.job) return;
+ setDisabled(this.cancelBtn, true);
+ try {
+ this.apply({ job: (await comfy.cancel(this.job.id)).job });
+ } catch (e) {
+ this.note('status', comfyError(e));
+ setDisabled(this.cancelBtn, false);
+ }
+ }
+
+ private follow(job: ComfyJob): void {
+ setHidden(this.preview, true);
+ this.apply({ job });
+ if (!this.finished(job)) this.schedule();
+ }
+
+ private schedule(): void {
+ window.clearTimeout(this.timer);
+ if (!this.visible) return;
+ this.timer = window.setTimeout(() => void this.poll(), POLL_MS);
+ }
+
+ private async poll(): Promise {
+ const j = this.job;
+ if (!j) return;
+ try {
+ const a = await comfy.job(j.id);
+ if (this.job?.id !== j.id) return;
+ this.apply(a);
+ if (!a.error && (!this.finished(a.job) || (a.job.state === 'done' && !a.landed))) this.schedule();
+ } catch (e) {
+ this.note('status', comfyError(e));
+ this.schedule();
+ }
+ }
+
+ private apply(a: ComfyJobAnswer): void {
+ const j = a.job;
+ this.job = j;
+ const done = this.finished(j);
+ const fill = q(this.el, '[data-automation-id="comfy.progress"]');
+ const p = j.progress && j.progress.max > 0 ? j.progress.value / j.progress.max : 0;
+ const width = `${Math.round((j.state === 'done' ? 1 : p) * 100)}%`;
+ if (fill.style.width !== width) fill.style.width = width;
+ let words = t(stateWords[j.state]);
+ if (j.state === 'queued' && j.queue_position !== undefined) words += tf(', position {n}', { n: j.queue_position });
+ if (j.state === 'running' && j.progress) words += tf(', step {v} of {max}', { v: j.progress.value, max: j.progress.max });
+ if (j.cached) words += ' ' + t('(reused an earlier result)');
+ if (j.retried) words += ' ' + t('(ran again after the server ran out of memory)');
+ if (j.state === 'failed' && j.error) words += `: ${j.error.message}`;
+ if (j.seed_used !== undefined) words += '. ' + tf('Seed {n}', { n: j.seed_used });
+ this.note('status', `${words}.`);
+ if (a.preview?.image) {
+ if (this.preview.src !== a.preview.image) void swapMedia(this.preview, a.preview.image).then(() => setHidden(this.preview, false), () => undefined);
+ }
+ if (a.error) {
+ this.note('result', a.error);
+ } else if (a.landed) {
+ const n = a.landed.layers.length;
+ this.note('result', n ? tf('Added {n} layer(s) above the source layer.', { n }) : tf('Imported {n} item(s) into the project.', { n: a.landed.items.length }));
+ } else if (j.state === 'done') {
+ this.note('result', t('Bringing the result into the project...'));
+ }
+ setDisabled(this.runBtn, !done || !this.current());
+ setDisabled(this.cancelBtn, done);
+ setDisabled(this.retryBtn, !done);
+ setClass(this.el, 'is-busy', !done);
+ }
+}
diff --git a/frontend/src/styles/panels.css b/frontend/src/styles/panels.css
index 4840b42..db1be04 100644
--- a/frontend/src/styles/panels.css
+++ b/frontend/src/styles/panels.css
@@ -66,7 +66,7 @@
.cv-layers-empty[hidden] { display: none; }
.cv-panel-foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-1); height: 36px; padding: 0 var(--space-2); border-top: 1px solid var(--border-color); }
-.cv-menu { position: fixed; min-width: 232px; max-height: calc(100vh - 8px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: var(--space-1); background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: var(--shadow-window); }
+.cv-menu { position: fixed; min-width: 232px; max-height: calc(100vh - 8px); overflow: hidden; scrollbar-width: none; padding: var(--space-1); background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: var(--shadow-window); }
.cv-menu::-webkit-scrollbar { display: none; }
.cv-menu-sub.is-open:not(:disabled) { background: var(--accent-color); color: var(--text-on-accent); }
.cv-menu-sub.is-open .cv-menu-keys, .cv-menu-sub:hover .cv-menu-keys { color: var(--text-on-accent); }
@@ -80,6 +80,15 @@
.cv-menu-keys { color: var(--text-muted); font-size: var(--fs-11); font-variant-numeric: tabular-nums; }
.cv-menu-item:hover:not(:disabled) .cv-menu-keys { color: var(--text-on-accent); }
.cv-menu-sep { height: 1px; margin: var(--space-1) var(--space-2); background: var(--border-color); }
+@property --menu-more { syntax: ''; inherits: false; initial-value: 0; }
+.cv-menu:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; }
+.cv-menu-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; --menu-more: 0; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - min(88px, 40%)), rgb(0 0 0 / calc(1 - var(--menu-more))) calc(100% - min(22px, 10%))); mask-image: linear-gradient(to bottom, #000 calc(100% - min(88px, 40%)), rgb(0 0 0 / calc(1 - var(--menu-more))) calc(100% - min(22px, 10%))); transition: --menu-more 160ms ease-out; }
+.cv-menu-more { position: absolute; left: 50%; bottom: 6px; width: 56px; height: 12px; margin-left: -28px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--glass-border); border-radius: 999px; background: var(--glass-bg); color: var(--text-secondary); pointer-events: none; opacity: 0; transition: opacity 160ms ease-out; }
+.cv-menu-more svg { width: 12px; height: 8px; }
+.cv-menu.has-more > .cv-menu-list { --menu-more: 1; scroll-padding-block-end: min(88px, 40%); transition-duration: 490ms; }
+.cv-menu.has-more > .cv-menu-more { opacity: 1; transition-duration: 490ms; }
+.cv-menu.no-fade > .cv-menu-list, .cv-menu.no-fade > .cv-menu-more { transition: none; }
+@media (prefers-reduced-motion: reduce) { .cv-menu-list, .cv-menu-more { transition: none; } }
.cv-toast { max-width: 380px; padding: var(--space-2) var(--space-3); background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); color: var(--text-primary); font-size: var(--fs-12); pointer-events: auto; }
.cv-toast.is-error { border-color: var(--danger-fill); color: var(--danger-text); }
diff --git a/frontend/src/styles/vfx.css b/frontend/src/styles/vfx.css
index effe4fa..4047fbe 100644
--- a/frontend/src/styles/vfx.css
+++ b/frontend/src/styles/vfx.css
@@ -793,3 +793,15 @@
.fx-extdialog .formext-frame { flex: 1; width: 100%; height: 100%; border: 0; background: var(--bg-secondary); }
.fx-ext-hidden { position: fixed; width: 0; height: 0; overflow: hidden; }
.fx-extconsent-list { margin: var(--space-2) 0; padding-left: 18px; color: var(--text-primary); line-height: 1.6; }
+.fx-cf { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; background: var(--bg-primary); }
+.fx-cf > .fx-term-bar { flex: none; height: 34px; }
+.fx-cf-sec { display: grid; gap: var(--space-2); padding: var(--space-3); border-bottom: 1px solid var(--line-0); }
+.fx-cf-row { display: flex; gap: var(--space-2); min-width: 0; }
+.fx-cf-row .cv-input { flex: 1 1 auto; min-width: 0; }
+.fx-cf-note { min-height: 1.45em; color: var(--text-muted); font-size: var(--fs-11, 11px); line-height: 1.45; }
+.fx-cf-slots, .fx-cf-form { display: grid; gap: var(--space-2); }
+.fx-cf-form[hidden] { display: none; }
+.fx-cf-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
+.fx-cf-preview { display: grid; place-items: center; aspect-ratio: 16 / 9; border: 1px solid var(--line-0); border-radius: var(--radius-sm); background: var(--surface-0); overflow: hidden; }
+.fx-cf-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
+.fx-cf-preview img[hidden] { display: none; }
diff --git a/frontend/src/ui/i18n/tables/more/cs.json b/frontend/src/ui/i18n/tables/more/cs.json
index 6631356..795da59 100644
--- a/frontend/src/ui/i18n/tables/more/cs.json
+++ b/frontend/src/ui/i18n/tables/more/cs.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Generovat pomocí Comfy",
+"Server address": "Adresa serveru",
+"Test": "Vyzkoušet",
+"Not checked yet.": "Zatím nezkontrolováno.",
+"Workflow": "Pracovní postup",
+"Run": "Spustit",
+"Retry with another seed": "Zkusit znovu s jiným seedem",
+"No job yet.": "Zatím žádná úloha.",
+"Checking the server": "Kontroluje se server",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy odpovídá, ale Comfy-FormBridge-Suite není nainstalován. Nainstalujte jej do složky custom_nodes v ComfyUI a restartujte server.",
+"Ready to run.": "Připraveno ke spuštění.",
+"Not ready yet.": "Zatím není připraveno.",
+"Checking what this workflow needs": "Zjišťuje se, co tento pracovní postup potřebuje",
+"Select a layer in the Timeline to use as the source.": "Vyberte na časové ose vrstvu, která bude zdrojem.",
+"Preparing the source and sending it": "Připravuje se zdroj a odesílá se",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Nainstalujte tyto balíčky uzlů do složky custom_nodes v ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "Na serveru chybí typy uzlů: {n}.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Chybí model {file} ({mb} MB z {source}, nejdřív přijměte jeho podmínky); vložte ho do {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Chybí model {file} ({mb} MB z {source}); vložte ho do {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Tento server Comfy je příliš starý. Balíček potřebuje verzi {v} nebo novější.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Připojeno: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (není připraveno)",
+"Source: {name}, frames {a} to {b} (the work area).": "Zdroj: {name}, snímky {a} až {b} (pracovní oblast).",
+"Mask: {name}.": "Maska: {name}.",
+"Select the mask layer as the second selected layer.": "Vyberte vrstvu masky jako druhou vybranou vrstvu.",
+"Waiting in the queue": "Čeká ve frontě",
+"Running": "Běží",
+"Failed": "Selhalo",
+"Cancelled": "Zrušeno",
+", position {n}": ", pozice {n}",
+", step {v} of {max}": ", krok {v} z {max}",
+"(reused an earlier result)": "(použit dřívější výsledek)",
+"(ran again after the server ran out of memory)": "(spuštěno znovu poté, co serveru došla paměť)",
+"Seed {n}": "Seed {n}",
+"Added {n} layer(s) above the source layer.": "Přidáno vrstev nad zdrojovou vrstvu: {n}.",
+"Imported {n} item(s) into the project.": "Do projektu importováno položek: {n}.",
+"Bringing the result into the project": "Výsledek se přenáší do projektu",
+"The engine did not answer.": "Jádro neodpovědělo."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/da.json b/frontend/src/ui/i18n/tables/more/da.json
index 4b2e31c..72b9d52 100644
--- a/frontend/src/ui/i18n/tables/more/da.json
+++ b/frontend/src/ui/i18n/tables/more/da.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Generer med Comfy",
+"Server address": "Serveradresse",
+"Test": "Test",
+"Not checked yet.": "Ikke kontrolleret endnu.",
+"Workflow": "Workflow",
+"Run": "Kør",
+"Retry with another seed": "Prøv igen med et andet seed",
+"No job yet.": "Intet job endnu.",
+"Checking the server": "Kontrollerer serveren",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy svarer, men Comfy-FormBridge-Suite er ikke installeret. Installer det i mappen custom_nodes i ComfyUI, og genstart serveren.",
+"Ready to run.": "Klar til at køre.",
+"Not ready yet.": "Ikke klar endnu.",
+"Checking what this workflow needs": "Kontrollerer, hvad dette workflow kræver",
+"Select a layer in the Timeline to use as the source.": "Vælg et lag i tidslinjen som kilde.",
+"Preparing the source and sending it": "Forbereder kilden og sender den",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Installer disse node-pakker i mappen custom_nodes i ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "{n} node-type(r) mangler på serveren.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Modellen {file} mangler ({mb} MB fra {source}, accepter først dens vilkår); læg den i {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Modellen {file} mangler ({mb} MB fra {source}); læg den i {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Denne Comfy-server er for gammel. Pakken kræver version {v} eller nyere.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Forbundet: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (ikke klar)",
+"Source: {name}, frames {a} to {b} (the work area).": "Kilde: {name}, billeder {a} til {b} (arbejdsområdet).",
+"Mask: {name}.": "Maske: {name}.",
+"Select the mask layer as the second selected layer.": "Vælg masklaget som det andet valgte lag.",
+"Waiting in the queue": "Venter i køen",
+"Running": "Kører",
+"Failed": "Mislykkedes",
+"Cancelled": "Annulleret",
+", position {n}": ", position {n}",
+", step {v} of {max}": ", trin {v} af {max}",
+"(reused an earlier result)": "(tidligere resultat genbrugt)",
+"(ran again after the server ran out of memory)": "(kørt igen, efter at serveren løb tør for hukommelse)",
+"Seed {n}": "Seed {n}",
+"Added {n} layer(s) above the source layer.": "{n} lag tilføjet over kildelaget.",
+"Imported {n} item(s) into the project.": "{n} element(er) importeret til projektet.",
+"Bringing the result into the project": "Henter resultatet ind i projektet",
+"The engine did not answer.": "Motoren svarede ikke."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/de.json b/frontend/src/ui/i18n/tables/more/de.json
index 9d6c096..9ce0098 100644
--- a/frontend/src/ui/i18n/tables/more/de.json
+++ b/frontend/src/ui/i18n/tables/more/de.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Mit Comfy generieren",
+"Server address": "Serveradresse",
+"Test": "Testen",
+"Not checked yet.": "Noch nicht geprüft.",
+"Workflow": "Workflow",
+"Run": "Ausführen",
+"Retry with another seed": "Mit anderem Seed wiederholen",
+"No job yet.": "Noch kein Auftrag.",
+"Checking the server": "Server wird geprüft",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy antwortet, aber Comfy-FormBridge-Suite ist nicht installiert. Installieren Sie es in den Ordner custom_nodes von ComfyUI und starten Sie den Server neu.",
+"Ready to run.": "Bereit zum Ausführen.",
+"Not ready yet.": "Noch nicht bereit.",
+"Checking what this workflow needs": "Es wird geprüft, was dieser Workflow braucht",
+"Select a layer in the Timeline to use as the source.": "Wählen Sie in der Zeitleiste eine Ebene als Quelle aus.",
+"Preparing the source and sending it": "Quelle wird vorbereitet und gesendet",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Installieren Sie diese Node-Pakete in den Ordner custom_nodes von ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "Auf dem Server fehlen {n} Node-Typen.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Modell {file} fehlt ({mb} MB von {source}, akzeptieren Sie zuerst die Bedingungen); legen Sie es in {place} ab.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Modell {file} fehlt ({mb} MB von {source}); legen Sie es in {place} ab.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Dieser Comfy-Server ist zu alt. Das Paket braucht Version {v} oder neuer.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Verbunden: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (nicht bereit)",
+"Source: {name}, frames {a} to {b} (the work area).": "Quelle: {name}, Bilder {a} bis {b} (der Arbeitsbereich).",
+"Mask: {name}.": "Maske: {name}.",
+"Select the mask layer as the second selected layer.": "Wählen Sie die Maskenebene als zweite ausgewählte Ebene.",
+"Waiting in the queue": "Wartet in der Warteschlange",
+"Running": "Läuft",
+"Failed": "Fehlgeschlagen",
+"Cancelled": "Abgebrochen",
+", position {n}": ", Position {n}",
+", step {v} of {max}": ", Schritt {v} von {max}",
+"(reused an earlier result)": "(früheres Ergebnis wiederverwendet)",
+"(ran again after the server ran out of memory)": "(erneut ausgeführt, nachdem dem Server der Speicher ausging)",
+"Seed {n}": "Seed {n}",
+"Added {n} layer(s) above the source layer.": "{n} Ebene(n) über der Quellebene hinzugefügt.",
+"Imported {n} item(s) into the project.": "{n} Element(e) ins Projekt importiert.",
+"Bringing the result into the project": "Ergebnis wird ins Projekt übernommen",
+"The engine did not answer.": "Die Engine hat nicht geantwortet."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/es.json b/frontend/src/ui/i18n/tables/more/es.json
index 165b6f5..d567808 100644
--- a/frontend/src/ui/i18n/tables/more/es.json
+++ b/frontend/src/ui/i18n/tables/more/es.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Generar con Comfy",
+"Server address": "Dirección del servidor",
+"Test": "Probar",
+"Not checked yet.": "Aún sin comprobar.",
+"Workflow": "Flujo de trabajo",
+"Run": "Ejecutar",
+"Retry with another seed": "Reintentar con otra semilla",
+"No job yet.": "Aún no hay ningún trabajo.",
+"Checking the server": "Comprobando el servidor",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy responde, pero Comfy-FormBridge-Suite no está instalado. Instálalo en la carpeta custom_nodes de ComfyUI y reinicia el servidor.",
+"Ready to run.": "Listo para ejecutar.",
+"Not ready yet.": "Aún no está listo.",
+"Checking what this workflow needs": "Comprobando lo que necesita este flujo de trabajo",
+"Select a layer in the Timeline to use as the source.": "Selecciona una capa en la línea de tiempo para usarla como origen.",
+"Preparing the source and sending it": "Preparando el origen y enviándolo",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Instala estos paquetes de nodos en la carpeta custom_nodes de ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "Faltan {n} tipos de nodo en el servidor.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Falta el modelo {file} ({mb} MB de {source}, acepta antes sus términos); colócalo en {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Falta el modelo {file} ({mb} MB de {source}); colócalo en {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Este servidor de Comfy es demasiado antiguo. El paquete necesita la versión {v} o posterior.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Conectado: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (no está listo)",
+"Source: {name}, frames {a} to {b} (the work area).": "Origen: {name}, fotogramas {a} a {b} (el área de trabajo).",
+"Mask: {name}.": "Máscara: {name}.",
+"Select the mask layer as the second selected layer.": "Selecciona la capa de máscara como segunda capa seleccionada.",
+"Waiting in the queue": "Esperando en la cola",
+"Running": "En ejecución",
+"Failed": "Falló",
+"Cancelled": "Cancelado",
+", position {n}": ", posición {n}",
+", step {v} of {max}": ", paso {v} de {max}",
+"(reused an earlier result)": "(se reutilizó un resultado anterior)",
+"(ran again after the server ran out of memory)": "(se ejecutó de nuevo tras quedarse el servidor sin memoria)",
+"Seed {n}": "Semilla {n}",
+"Added {n} layer(s) above the source layer.": "Se añadieron {n} capa(s) sobre la capa de origen.",
+"Imported {n} item(s) into the project.": "Se importaron {n} elemento(s) al proyecto.",
+"Bringing the result into the project": "Trayendo el resultado al proyecto",
+"The engine did not answer.": "El motor no respondió."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/fi.json b/frontend/src/ui/i18n/tables/more/fi.json
index 6684a16..fc3ca8c 100644
--- a/frontend/src/ui/i18n/tables/more/fi.json
+++ b/frontend/src/ui/i18n/tables/more/fi.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Luo Comfyllä",
+"Server address": "Palvelimen osoite",
+"Test": "Testaa",
+"Not checked yet.": "Ei vielä tarkistettu.",
+"Workflow": "Työnkulku",
+"Run": "Suorita",
+"Retry with another seed": "Yritä uudelleen toisella siemenarvolla",
+"No job yet.": "Ei vielä työtä.",
+"Checking the server": "Tarkistetaan palvelinta",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy vastaa, mutta Comfy-FormBridge-Suitea ei ole asennettu. Asenna se ComfyUI:n custom_nodes-kansioon ja käynnistä palvelin uudelleen.",
+"Ready to run.": "Valmis suoritettavaksi.",
+"Not ready yet.": "Ei vielä valmis.",
+"Checking what this workflow needs": "Tarkistetaan, mitä tämä työnkulku tarvitsee",
+"Select a layer in the Timeline to use as the source.": "Valitse aikajanalta taso lähteeksi.",
+"Preparing the source and sending it": "Valmistellaan lähdettä ja lähetetään se",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Asenna nämä solmupaketit ComfyUI:n custom_nodes-kansioon: {list}.",
+"{n} node type(s) are missing on the server.": "Palvelimelta puuttuu {n} solmutyyppiä.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Malli {file} puuttuu ({mb} Mt lähteestä {source}, hyväksy ensin sen ehdot); laita se kansioon {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Malli {file} puuttuu ({mb} Mt lähteestä {source}); laita se kansioon {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Tämä Comfy-palvelin on liian vanha. Paketti tarvitsee version {v} tai uudemman.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Yhdistetty: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (ei valmis)",
+"Source: {name}, frames {a} to {b} (the work area).": "Lähde: {name}, kuvat {a}-{b} (työalue).",
+"Mask: {name}.": "Maski: {name}.",
+"Select the mask layer as the second selected layer.": "Valitse maskitaso toiseksi valituksi tasoksi.",
+"Waiting in the queue": "Odottaa jonossa",
+"Running": "Käynnissä",
+"Failed": "Epäonnistui",
+"Cancelled": "Peruttu",
+", position {n}": ", sija {n}",
+", step {v} of {max}": ", vaihe {v}/{max}",
+"(reused an earlier result)": "(käytettiin aiempaa tulosta)",
+"(ran again after the server ran out of memory)": "(ajettiin uudelleen, kun palvelimen muisti loppui)",
+"Seed {n}": "Siemenarvo {n}",
+"Added {n} layer(s) above the source layer.": "Lisättiin {n} tasoa lähdetason päälle.",
+"Imported {n} item(s) into the project.": "Tuotiin {n} kohdetta projektiin.",
+"Bringing the result into the project": "Tuodaan tulos projektiin",
+"The engine did not answer.": "Moottori ei vastannut."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/fr.json b/frontend/src/ui/i18n/tables/more/fr.json
index 0ad874b..7e4802f 100644
--- a/frontend/src/ui/i18n/tables/more/fr.json
+++ b/frontend/src/ui/i18n/tables/more/fr.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Générer avec Comfy",
+"Server address": "Adresse du serveur",
+"Test": "Tester",
+"Not checked yet.": "Pas encore vérifié.",
+"Workflow": "Workflow",
+"Run": "Lancer",
+"Retry with another seed": "Réessayer avec une autre graine",
+"No job yet.": "Aucune tâche pour l'instant.",
+"Checking the server": "Vérification du serveur",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy répond, mais Comfy-FormBridge-Suite n'est pas installé. Installez-le dans le dossier custom_nodes de ComfyUI, puis redémarrez le serveur.",
+"Ready to run.": "Prêt à être lancé.",
+"Not ready yet.": "Pas encore prêt.",
+"Checking what this workflow needs": "Vérification de ce dont ce workflow a besoin",
+"Select a layer in the Timeline to use as the source.": "Sélectionnez un calque dans le montage pour l'utiliser comme source.",
+"Preparing the source and sending it": "Préparation de la source et envoi",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Installez ces packs de nodes dans le dossier custom_nodes de ComfyUI : {list}.",
+"{n} node type(s) are missing on the server.": "{n} type(s) de node manquent sur le serveur.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Modèle {file} manquant ({mb} Mo depuis {source}, acceptez d'abord ses conditions) ; placez-le dans {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Modèle {file} manquant ({mb} Mo depuis {source}) ; placez-le dans {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Ce serveur Comfy est trop ancien. Le pack demande la version {v} ou plus récente.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Connecté : Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (pas prêt)",
+"Source: {name}, frames {a} to {b} (the work area).": "Source : {name}, images {a} à {b} (la zone de travail).",
+"Mask: {name}.": "Masque : {name}.",
+"Select the mask layer as the second selected layer.": "Sélectionnez le calque de masque comme second calque sélectionné.",
+"Waiting in the queue": "En attente dans la file",
+"Running": "En cours",
+"Failed": "Échec",
+"Cancelled": "Annulé",
+", position {n}": ", position {n}",
+", step {v} of {max}": ", étape {v} sur {max}",
+"(reused an earlier result)": "(résultat précédent réutilisé)",
+"(ran again after the server ran out of memory)": "(relancé après un manque de mémoire du serveur)",
+"Seed {n}": "Graine {n}",
+"Added {n} layer(s) above the source layer.": "{n} calque(s) ajouté(s) au-dessus du calque source.",
+"Imported {n} item(s) into the project.": "{n} élément(s) importé(s) dans le projet.",
+"Bringing the result into the project": "Import du résultat dans le projet",
+"The engine did not answer.": "Le moteur n'a pas répondu."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/hu.json b/frontend/src/ui/i18n/tables/more/hu.json
index fab407a..d030ba8 100644
--- a/frontend/src/ui/i18n/tables/more/hu.json
+++ b/frontend/src/ui/i18n/tables/more/hu.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Generálás Comfyval",
+"Server address": "Szerver címe",
+"Test": "Próba",
+"Not checked yet.": "Még nincs ellenőrizve.",
+"Workflow": "Munkafolyamat",
+"Run": "Futtatás",
+"Retry with another seed": "Újrapróbálás másik seeddel",
+"No job yet.": "Még nincs feladat.",
+"Checking the server": "A szerver ellenőrzése",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "A Comfy válaszol, de a Comfy-FormBridge-Suite nincs telepítve. Telepítsd a ComfyUI custom_nodes mappájába, majd indítsd újra a szervert.",
+"Ready to run.": "Futtatásra kész.",
+"Not ready yet.": "Még nem kész.",
+"Checking what this workflow needs": "Annak ellenőrzése, mire van szüksége ennek a munkafolyamatnak",
+"Select a layer in the Timeline to use as the source.": "Válassz egy réteget az idővonalon forrásként.",
+"Preparing the source and sending it": "A forrás előkészítése és küldése",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Telepítsd ezeket a csomópontcsomagokat a ComfyUI custom_nodes mappájába: {list}.",
+"{n} node type(s) are missing on the server.": "A szerverről {n} csomóponttípus hiányzik.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Hiányzik a(z) {file} modell ({mb} MB innen: {source}, előbb fogadd el a feltételeit); tedd ide: {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Hiányzik a(z) {file} modell ({mb} MB innen: {source}); tedd ide: {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Ez a Comfy-szerver túl régi. A csomaghoz {v} vagy újabb verzió kell.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Csatlakozva: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (nem kész)",
+"Source: {name}, frames {a} to {b} (the work area).": "Forrás: {name}, {a}. és {b}. képkocka között (a munkaterület).",
+"Mask: {name}.": "Maszk: {name}.",
+"Select the mask layer as the second selected layer.": "Válaszd ki a maszkréteget második kijelölt rétegként.",
+"Waiting in the queue": "Várakozik a sorban",
+"Running": "Fut",
+"Failed": "Sikertelen",
+"Cancelled": "Megszakítva",
+", position {n}": ", {n}. a sorban",
+", step {v} of {max}": ", {v}. lépés / {max}",
+"(reused an earlier result)": "(korábbi eredmény újrahasznosítva)",
+"(ran again after the server ran out of memory)": "(újrafutott, mert a szervernek elfogyott a memóriája)",
+"Seed {n}": "Seed: {n}",
+"Added {n} layer(s) above the source layer.": "{n} réteg hozzáadva a forrásréteg fölé.",
+"Imported {n} item(s) into the project.": "{n} elem importálva a projektbe.",
+"Bringing the result into the project": "Az eredmény behozatala a projektbe",
+"The engine did not answer.": "A motor nem válaszolt."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/id.json b/frontend/src/ui/i18n/tables/more/id.json
index e776e5d..44409e8 100644
--- a/frontend/src/ui/i18n/tables/more/id.json
+++ b/frontend/src/ui/i18n/tables/more/id.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Buat dengan Comfy",
+"Server address": "Alamat server",
+"Test": "Uji",
+"Not checked yet.": "Belum diperiksa.",
+"Workflow": "Alur kerja",
+"Run": "Jalankan",
+"Retry with another seed": "Coba lagi dengan seed lain",
+"No job yet.": "Belum ada tugas.",
+"Checking the server": "Memeriksa server",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy menjawab, tetapi Comfy-FormBridge-Suite belum terpasang. Pasang di folder custom_nodes milik ComfyUI, lalu mulai ulang server.",
+"Ready to run.": "Siap dijalankan.",
+"Not ready yet.": "Belum siap.",
+"Checking what this workflow needs": "Memeriksa apa yang dibutuhkan alur kerja ini",
+"Select a layer in the Timeline to use as the source.": "Pilih sebuah layer di Linimasa untuk dijadikan sumber.",
+"Preparing the source and sending it": "Menyiapkan sumber dan mengirimkannya",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Pasang paket node ini di folder custom_nodes milik ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "{n} tipe node tidak ada di server.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Model {file} belum ada ({mb} MB dari {source}, setujui dulu ketentuannya); letakkan di {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Model {file} belum ada ({mb} MB dari {source}); letakkan di {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Server Comfy ini terlalu lama. Paket ini membutuhkan versi {v} atau yang lebih baru.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Terhubung: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (belum siap)",
+"Source: {name}, frames {a} to {b} (the work area).": "Sumber: {name}, frame {a} sampai {b} (area kerja).",
+"Mask: {name}.": "Mask: {name}.",
+"Select the mask layer as the second selected layer.": "Pilih layer mask sebagai layer terpilih kedua.",
+"Waiting in the queue": "Menunggu dalam antrean",
+"Running": "Berjalan",
+"Failed": "Gagal",
+"Cancelled": "Dibatalkan",
+", position {n}": ", posisi {n}",
+", step {v} of {max}": ", langkah {v} dari {max}",
+"(reused an earlier result)": "(memakai ulang hasil sebelumnya)",
+"(ran again after the server ran out of memory)": "(dijalankan lagi setelah memori server habis)",
+"Seed {n}": "Seed {n}",
+"Added {n} layer(s) above the source layer.": "{n} layer ditambahkan di atas layer sumber.",
+"Imported {n} item(s) into the project.": "{n} item diimpor ke proyek.",
+"Bringing the result into the project": "Membawa hasil ke dalam proyek",
+"The engine did not answer.": "Engine tidak menjawab."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/it.json b/frontend/src/ui/i18n/tables/more/it.json
index 850cb48..f357074 100644
--- a/frontend/src/ui/i18n/tables/more/it.json
+++ b/frontend/src/ui/i18n/tables/more/it.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Genera con Comfy",
+"Server address": "Indirizzo del server",
+"Test": "Prova",
+"Not checked yet.": "Non ancora verificato.",
+"Workflow": "Workflow",
+"Run": "Esegui",
+"Retry with another seed": "Riprova con un altro seed",
+"No job yet.": "Nessun lavoro per ora.",
+"Checking the server": "Verifica del server",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy risponde, ma Comfy-FormBridge-Suite non è installato. Installalo nella cartella custom_nodes di ComfyUI e riavvia il server.",
+"Ready to run.": "Pronto per l'esecuzione.",
+"Not ready yet.": "Non ancora pronto.",
+"Checking what this workflow needs": "Verifica di ciò che serve a questo workflow",
+"Select a layer in the Timeline to use as the source.": "Seleziona un livello nella timeline da usare come sorgente.",
+"Preparing the source and sending it": "Preparazione e invio della sorgente",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Installa questi pacchetti di nodi nella cartella custom_nodes di ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "Sul server mancano {n} tipi di nodo.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Modello {file} mancante ({mb} MB da {source}, accetta prima i suoi termini); mettilo in {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Modello {file} mancante ({mb} MB da {source}); mettilo in {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Questo server Comfy è troppo vecchio. Il pacchetto richiede la versione {v} o successiva.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Connesso: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (non pronto)",
+"Source: {name}, frames {a} to {b} (the work area).": "Sorgente: {name}, fotogrammi da {a} a {b} (l'area di lavoro).",
+"Mask: {name}.": "Maschera: {name}.",
+"Select the mask layer as the second selected layer.": "Seleziona il livello maschera come secondo livello selezionato.",
+"Waiting in the queue": "In attesa nella coda",
+"Running": "In esecuzione",
+"Failed": "Non riuscito",
+"Cancelled": "Annullato",
+", position {n}": ", posizione {n}",
+", step {v} of {max}": ", passo {v} di {max}",
+"(reused an earlier result)": "(riutilizzato un risultato precedente)",
+"(ran again after the server ran out of memory)": "(eseguito di nuovo dopo che il server ha esaurito la memoria)",
+"Seed {n}": "Seed {n}",
+"Added {n} layer(s) above the source layer.": "Aggiunti {n} livelli sopra il livello sorgente.",
+"Imported {n} item(s) into the project.": "Importati {n} elementi nel progetto.",
+"Bringing the result into the project": "Importazione del risultato nel progetto",
+"The engine did not answer.": "Il motore non ha risposto."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/ja.json b/frontend/src/ui/i18n/tables/more/ja.json
index c350000..8da70b4 100644
--- a/frontend/src/ui/i18n/tables/more/ja.json
+++ b/frontend/src/ui/i18n/tables/more/ja.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Comfy で生成",
+"Server address": "サーバーのアドレス",
+"Test": "テスト",
+"Not checked yet.": "まだ確認していません。",
+"Workflow": "ワークフロー",
+"Run": "実行",
+"Retry with another seed": "別のシードでやり直す",
+"No job yet.": "ジョブはまだありません。",
+"Checking the server": "サーバーを確認しています",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy は応答していますが、Comfy-FormBridge-Suite がインストールされていません。ComfyUI の custom_nodes フォルダにインストールして、サーバーを再起動してください。",
+"Ready to run.": "実行できます。",
+"Not ready yet.": "まだ準備ができていません。",
+"Checking what this workflow needs": "このワークフローに必要なものを確認しています",
+"Select a layer in the Timeline to use as the source.": "タイムラインでソースにするレイヤーを選択してください。",
+"Preparing the source and sending it": "ソースを準備して送信しています",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "次のノードパックを ComfyUI の custom_nodes フォルダにインストールしてください: {list}。",
+"{n} node type(s) are missing on the server.": "サーバーに {n} 種類のノードがありません。",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "モデル {file} がありません({source} から {mb} MB、先に利用条件に同意してください)。{place} に置いてください。",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "モデル {file} がありません({source} から {mb} MB)。{place} に置いてください。",
+"This Comfy server is too old. The pack needs version {v} or later.": "この Comfy サーバーは古すぎます。パックにはバージョン {v} 以降が必要です。",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "接続しました: Comfy {comfy}、{pack} {version}、{device}。",
+"{title} (not ready)": "{title}(準備未完了)",
+"Source: {name}, frames {a} to {b} (the work area).": "ソース: {name}、フレーム {a} から {b}(作業領域)。",
+"Mask: {name}.": "マスク: {name}。",
+"Select the mask layer as the second selected layer.": "マスクのレイヤーを 2 番目の選択レイヤーとして選択してください。",
+"Waiting in the queue": "キューで待機中",
+"Running": "実行中",
+"Failed": "失敗",
+"Cancelled": "キャンセル済み",
+", position {n}": "、順番 {n}",
+", step {v} of {max}": "、ステップ {v}/{max}",
+"(reused an earlier result)": "(以前の結果を再利用)",
+"(ran again after the server ran out of memory)": "(サーバーのメモリ不足のため再実行)",
+"Seed {n}": "シード {n}",
+"Added {n} layer(s) above the source layer.": "ソースレイヤーの上に {n} 個のレイヤーを追加しました。",
+"Imported {n} item(s) into the project.": "{n} 個のアイテムをプロジェクトに読み込みました。",
+"Bringing the result into the project": "結果をプロジェクトに取り込んでいます",
+"The engine did not answer.": "エンジンが応答しませんでした。"
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/ko.json b/frontend/src/ui/i18n/tables/more/ko.json
index f363720..878cc96 100644
--- a/frontend/src/ui/i18n/tables/more/ko.json
+++ b/frontend/src/ui/i18n/tables/more/ko.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Comfy로 생성",
+"Server address": "서버 주소",
+"Test": "테스트",
+"Not checked yet.": "아직 확인하지 않았습니다.",
+"Workflow": "워크플로",
+"Run": "실행",
+"Retry with another seed": "다른 시드로 다시 시도",
+"No job yet.": "아직 작업이 없습니다.",
+"Checking the server": "서버를 확인하는 중",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy는 응답하지만 Comfy-FormBridge-Suite가 설치되어 있지 않습니다. ComfyUI의 custom_nodes 폴더에 설치한 다음 서버를 다시 시작하세요.",
+"Ready to run.": "실행할 준비가 되었습니다.",
+"Not ready yet.": "아직 준비되지 않았습니다.",
+"Checking what this workflow needs": "이 워크플로에 필요한 것을 확인하는 중",
+"Select a layer in the Timeline to use as the source.": "타임라인에서 소스로 사용할 레이어를 선택하세요.",
+"Preparing the source and sending it": "소스를 준비하고 보내는 중",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "다음 노드 팩을 ComfyUI의 custom_nodes 폴더에 설치하세요: {list}.",
+"{n} node type(s) are missing on the server.": "서버에 노드 유형 {n}개가 없습니다.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "모델 {file}이(가) 없습니다({source}에서 {mb}MB, 먼저 약관에 동의하세요). {place}에 넣으세요.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "모델 {file}이(가) 없습니다({source}에서 {mb}MB). {place}에 넣으세요.",
+"This Comfy server is too old. The pack needs version {v} or later.": "이 Comfy 서버는 너무 오래되었습니다. 팩에는 버전 {v} 이상이 필요합니다.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "연결됨: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title}(준비 안 됨)",
+"Source: {name}, frames {a} to {b} (the work area).": "소스: {name}, 프레임 {a}부터 {b}까지(작업 영역).",
+"Mask: {name}.": "마스크: {name}.",
+"Select the mask layer as the second selected layer.": "마스크 레이어를 두 번째로 선택한 레이어로 선택하세요.",
+"Waiting in the queue": "대기열에서 기다리는 중",
+"Running": "실행 중",
+"Failed": "실패",
+"Cancelled": "취소됨",
+", position {n}": ", 순번 {n}",
+", step {v} of {max}": ", 단계 {v}/{max}",
+"(reused an earlier result)": "(이전 결과를 다시 사용함)",
+"(ran again after the server ran out of memory)": "(서버 메모리가 부족해 다시 실행함)",
+"Seed {n}": "시드 {n}",
+"Added {n} layer(s) above the source layer.": "소스 레이어 위에 레이어 {n}개를 추가했습니다.",
+"Imported {n} item(s) into the project.": "항목 {n}개를 프로젝트로 가져왔습니다.",
+"Bringing the result into the project": "결과를 프로젝트로 가져오는 중",
+"The engine did not answer.": "엔진이 응답하지 않았습니다."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/nb.json b/frontend/src/ui/i18n/tables/more/nb.json
index 8e137b7..d6258b7 100644
--- a/frontend/src/ui/i18n/tables/more/nb.json
+++ b/frontend/src/ui/i18n/tables/more/nb.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Generer med Comfy",
+"Server address": "Serveradresse",
+"Test": "Test",
+"Not checked yet.": "Ikke kontrollert ennå.",
+"Workflow": "Arbeidsflyt",
+"Run": "Kjør",
+"Retry with another seed": "Prøv igjen med en annen seed",
+"No job yet.": "Ingen jobb ennå.",
+"Checking the server": "Kontrollerer serveren",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy svarer, men Comfy-FormBridge-Suite er ikke installert. Installer det i custom_nodes-mappen til ComfyUI, og start serveren på nytt.",
+"Ready to run.": "Klar til å kjøre.",
+"Not ready yet.": "Ikke klar ennå.",
+"Checking what this workflow needs": "Kontrollerer hva denne arbeidsflyten trenger",
+"Select a layer in the Timeline to use as the source.": "Velg et lag i tidslinjen som kilde.",
+"Preparing the source and sending it": "Forbereder kilden og sender den",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Installer disse nodepakkene i custom_nodes-mappen til ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "{n} nodetype(r) mangler på serveren.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Modellen {file} mangler ({mb} MB fra {source}, godta vilkårene først); legg den i {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Modellen {file} mangler ({mb} MB fra {source}); legg den i {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Denne Comfy-serveren er for gammel. Pakken trenger versjon {v} eller nyere.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Tilkoblet: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (ikke klar)",
+"Source: {name}, frames {a} to {b} (the work area).": "Kilde: {name}, bilder {a} til {b} (arbeidsområdet).",
+"Mask: {name}.": "Maske: {name}.",
+"Select the mask layer as the second selected layer.": "Velg masklaget som det andre valgte laget.",
+"Waiting in the queue": "Venter i køen",
+"Running": "Kjører",
+"Failed": "Mislyktes",
+"Cancelled": "Avbrutt",
+", position {n}": ", posisjon {n}",
+", step {v} of {max}": ", trinn {v} av {max}",
+"(reused an earlier result)": "(tidligere resultat gjenbrukt)",
+"(ran again after the server ran out of memory)": "(kjørt på nytt etter at serveren gikk tom for minne)",
+"Seed {n}": "Seed {n}",
+"Added {n} layer(s) above the source layer.": "La til {n} lag over kildelaget.",
+"Imported {n} item(s) into the project.": "Importerte {n} element(er) til prosjektet.",
+"Bringing the result into the project": "Henter resultatet inn i prosjektet",
+"The engine did not answer.": "Motoren svarte ikke."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/nl.json b/frontend/src/ui/i18n/tables/more/nl.json
index 8805458..b4c4955 100644
--- a/frontend/src/ui/i18n/tables/more/nl.json
+++ b/frontend/src/ui/i18n/tables/more/nl.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Genereren met Comfy",
+"Server address": "Serveradres",
+"Test": "Testen",
+"Not checked yet.": "Nog niet gecontroleerd.",
+"Workflow": "Workflow",
+"Run": "Uitvoeren",
+"Retry with another seed": "Opnieuw met een andere seed",
+"No job yet.": "Nog geen taak.",
+"Checking the server": "Server controleren",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy antwoordt, maar Comfy-FormBridge-Suite is niet geïnstalleerd. Installeer het in de map custom_nodes van ComfyUI en start de server opnieuw.",
+"Ready to run.": "Klaar om uit te voeren.",
+"Not ready yet.": "Nog niet klaar.",
+"Checking what this workflow needs": "Controleren wat deze workflow nodig heeft",
+"Select a layer in the Timeline to use as the source.": "Kies in de tijdlijn een laag als bron.",
+"Preparing the source and sending it": "Bron voorbereiden en verzenden",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Installeer deze nodepakketten in de map custom_nodes van ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "Op de server ontbreken {n} nodetypen.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Model {file} ontbreekt ({mb} MB van {source}, accepteer eerst de voorwaarden); zet het in {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Model {file} ontbreekt ({mb} MB van {source}); zet het in {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Deze Comfy-server is te oud. Het pakket heeft versie {v} of nieuwer nodig.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Verbonden: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (niet klaar)",
+"Source: {name}, frames {a} to {b} (the work area).": "Bron: {name}, frames {a} tot {b} (het werkgebied).",
+"Mask: {name}.": "Masker: {name}.",
+"Select the mask layer as the second selected layer.": "Kies de maskerlaag als tweede geselecteerde laag.",
+"Waiting in the queue": "Wacht in de wachtrij",
+"Running": "Bezig",
+"Failed": "Mislukt",
+"Cancelled": "Geannuleerd",
+", position {n}": ", positie {n}",
+", step {v} of {max}": ", stap {v} van {max}",
+"(reused an earlier result)": "(eerder resultaat hergebruikt)",
+"(ran again after the server ran out of memory)": "(opnieuw uitgevoerd nadat de server geen geheugen meer had)",
+"Seed {n}": "Seed {n}",
+"Added {n} layer(s) above the source layer.": "{n} laag/lagen boven de bronlaag toegevoegd.",
+"Imported {n} item(s) into the project.": "{n} item(s) in het project geïmporteerd.",
+"Bringing the result into the project": "Resultaat naar het project halen",
+"The engine did not answer.": "De engine antwoordde niet."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/pl.json b/frontend/src/ui/i18n/tables/more/pl.json
index 76b50e0..aba4d14 100644
--- a/frontend/src/ui/i18n/tables/more/pl.json
+++ b/frontend/src/ui/i18n/tables/more/pl.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Generuj w Comfy",
+"Server address": "Adres serwera",
+"Test": "Testuj",
+"Not checked yet.": "Jeszcze nie sprawdzono.",
+"Workflow": "Przepływ pracy",
+"Run": "Uruchom",
+"Retry with another seed": "Ponów z innym ziarnem",
+"No job yet.": "Brak zadań.",
+"Checking the server": "Sprawdzanie serwera",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy odpowiada, ale Comfy-FormBridge-Suite nie jest zainstalowany. Zainstaluj go w folderze custom_nodes programu ComfyUI i uruchom serwer ponownie.",
+"Ready to run.": "Gotowe do uruchomienia.",
+"Not ready yet.": "Jeszcze nie gotowe.",
+"Checking what this workflow needs": "Sprawdzanie, czego potrzebuje ten przepływ pracy",
+"Select a layer in the Timeline to use as the source.": "Wybierz warstwę na osi czasu jako źródło.",
+"Preparing the source and sending it": "Przygotowywanie źródła i wysyłanie",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Zainstaluj te pakiety węzłów w folderze custom_nodes programu ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "Na serwerze brakuje typów węzłów: {n}.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Brak modelu {file} ({mb} MB z {source}, najpierw zaakceptuj jego warunki); umieść go w {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Brak modelu {file} ({mb} MB z {source}); umieść go w {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Ten serwer Comfy jest za stary. Pakiet wymaga wersji {v} lub nowszej.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Połączono: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (niegotowe)",
+"Source: {name}, frames {a} to {b} (the work area).": "Źródło: {name}, klatki {a} do {b} (obszar roboczy).",
+"Mask: {name}.": "Maska: {name}.",
+"Select the mask layer as the second selected layer.": "Wybierz warstwę maski jako drugą zaznaczoną warstwę.",
+"Waiting in the queue": "Oczekiwanie w kolejce",
+"Running": "Trwa",
+"Failed": "Niepowodzenie",
+"Cancelled": "Anulowano",
+", position {n}": ", pozycja {n}",
+", step {v} of {max}": ", krok {v} z {max}",
+"(reused an earlier result)": "(użyto wcześniejszego wyniku)",
+"(ran again after the server ran out of memory)": "(uruchomiono ponownie po wyczerpaniu pamięci serwera)",
+"Seed {n}": "Ziarno {n}",
+"Added {n} layer(s) above the source layer.": "Dodano warstw nad warstwą źródłową: {n}.",
+"Imported {n} item(s) into the project.": "Zaimportowano elementów do projektu: {n}.",
+"Bringing the result into the project": "Przenoszenie wyniku do projektu",
+"The engine did not answer.": "Silnik nie odpowiedział."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/pt-BR.json b/frontend/src/ui/i18n/tables/more/pt-BR.json
index 0f6d506..d10ed3d 100644
--- a/frontend/src/ui/i18n/tables/more/pt-BR.json
+++ b/frontend/src/ui/i18n/tables/more/pt-BR.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Gerar com o Comfy",
+"Server address": "Endereço do servidor",
+"Test": "Testar",
+"Not checked yet.": "Ainda não verificado.",
+"Workflow": "Fluxo de trabalho",
+"Run": "Executar",
+"Retry with another seed": "Tentar de novo com outra semente",
+"No job yet.": "Nenhum trabalho ainda.",
+"Checking the server": "Verificando o servidor",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "O Comfy responde, mas o Comfy-FormBridge-Suite não está instalado. Instale-o na pasta custom_nodes do ComfyUI e reinicie o servidor.",
+"Ready to run.": "Pronto para executar.",
+"Not ready yet.": "Ainda não está pronto.",
+"Checking what this workflow needs": "Verificando o que este fluxo de trabalho precisa",
+"Select a layer in the Timeline to use as the source.": "Selecione uma camada na linha do tempo para usar como origem.",
+"Preparing the source and sending it": "Preparando a origem e enviando",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Instale estes pacotes de nós na pasta custom_nodes do ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "Faltam {n} tipos de nó no servidor.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Modelo {file} ausente ({mb} MB de {source}, aceite antes os termos dele); coloque-o em {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Modelo {file} ausente ({mb} MB de {source}); coloque-o em {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Este servidor Comfy é antigo demais. O pacote precisa da versão {v} ou mais recente.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Conectado: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (não está pronto)",
+"Source: {name}, frames {a} to {b} (the work area).": "Origem: {name}, quadros {a} a {b} (a área de trabalho).",
+"Mask: {name}.": "Máscara: {name}.",
+"Select the mask layer as the second selected layer.": "Selecione a camada de máscara como a segunda camada selecionada.",
+"Waiting in the queue": "Aguardando na fila",
+"Running": "Em execução",
+"Failed": "Falhou",
+"Cancelled": "Cancelado",
+", position {n}": ", posição {n}",
+", step {v} of {max}": ", etapa {v} de {max}",
+"(reused an earlier result)": "(resultado anterior reutilizado)",
+"(ran again after the server ran out of memory)": "(executado de novo depois que o servidor ficou sem memória)",
+"Seed {n}": "Semente {n}",
+"Added {n} layer(s) above the source layer.": "{n} camada(s) adicionada(s) acima da camada de origem.",
+"Imported {n} item(s) into the project.": "{n} item(ns) importado(s) para o projeto.",
+"Bringing the result into the project": "Trazendo o resultado para o projeto",
+"The engine did not answer.": "O mecanismo não respondeu."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/ru.json b/frontend/src/ui/i18n/tables/more/ru.json
index 39e7f54..def5dba 100644
--- a/frontend/src/ui/i18n/tables/more/ru.json
+++ b/frontend/src/ui/i18n/tables/more/ru.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Создать с помощью Comfy",
+"Server address": "Адрес сервера",
+"Test": "Проверить",
+"Not checked yet.": "Ещё не проверено.",
+"Workflow": "Рабочий процесс",
+"Run": "Запустить",
+"Retry with another seed": "Повторить с другим сидом",
+"No job yet.": "Задач пока нет.",
+"Checking the server": "Проверка сервера",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy отвечает, но Comfy-FormBridge-Suite не установлен. Установите его в папку custom_nodes в ComfyUI и перезапустите сервер.",
+"Ready to run.": "Готово к запуску.",
+"Not ready yet.": "Ещё не готово.",
+"Checking what this workflow needs": "Проверка того, что нужно этому рабочему процессу",
+"Select a layer in the Timeline to use as the source.": "Выберите слой на шкале времени в качестве источника.",
+"Preparing the source and sending it": "Подготовка источника и отправка",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Установите эти наборы нодов в папку custom_nodes в ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "На сервере не хватает типов нодов: {n}.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Нет модели {file} ({mb} МБ из {source}, сначала примите её условия); положите её в {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Нет модели {file} ({mb} МБ из {source}); положите её в {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Этот сервер Comfy слишком старый. Набору нужна версия {v} или новее.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Подключено: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (не готово)",
+"Source: {name}, frames {a} to {b} (the work area).": "Источник: {name}, кадры с {a} по {b} (рабочая область).",
+"Mask: {name}.": "Маска: {name}.",
+"Select the mask layer as the second selected layer.": "Выберите слой маски вторым выбранным слоем.",
+"Waiting in the queue": "Ожидание в очереди",
+"Running": "Выполняется",
+"Failed": "Не удалось",
+"Cancelled": "Отменено",
+", position {n}": ", позиция {n}",
+", step {v} of {max}": ", шаг {v} из {max}",
+"(reused an earlier result)": "(использован прежний результат)",
+"(ran again after the server ran out of memory)": "(запущено снова после нехватки памяти на сервере)",
+"Seed {n}": "Сид {n}",
+"Added {n} layer(s) above the source layer.": "Слоёв добавлено над исходным слоем: {n}.",
+"Imported {n} item(s) into the project.": "Элементов импортировано в проект: {n}.",
+"Bringing the result into the project": "Перенос результата в проект",
+"The engine did not answer.": "Движок не ответил."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/sv.json b/frontend/src/ui/i18n/tables/more/sv.json
index 66c4c4b..9308c29 100644
--- a/frontend/src/ui/i18n/tables/more/sv.json
+++ b/frontend/src/ui/i18n/tables/more/sv.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Generera med Comfy",
+"Server address": "Serveradress",
+"Test": "Testa",
+"Not checked yet.": "Inte kontrollerad än.",
+"Workflow": "Arbetsflöde",
+"Run": "Kör",
+"Retry with another seed": "Försök igen med ett annat seed",
+"No job yet.": "Inget jobb än.",
+"Checking the server": "Kontrollerar servern",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy svarar, men Comfy-FormBridge-Suite är inte installerat. Installera det i mappen custom_nodes i ComfyUI och starta om servern.",
+"Ready to run.": "Redo att köras.",
+"Not ready yet.": "Inte redo än.",
+"Checking what this workflow needs": "Kontrollerar vad det här arbetsflödet behöver",
+"Select a layer in the Timeline to use as the source.": "Välj ett lager i tidslinjen som källa.",
+"Preparing the source and sending it": "Förbereder källan och skickar den",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Installera dessa nodpaket i mappen custom_nodes i ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "{n} nodtyp(er) saknas på servern.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Modellen {file} saknas ({mb} MB från {source}, godkänn först dess villkor); lägg den i {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Modellen {file} saknas ({mb} MB från {source}); lägg den i {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Den här Comfy-servern är för gammal. Paketet kräver version {v} eller senare.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Ansluten: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (inte redo)",
+"Source: {name}, frames {a} to {b} (the work area).": "Källa: {name}, bildrutor {a} till {b} (arbetsområdet).",
+"Mask: {name}.": "Mask: {name}.",
+"Select the mask layer as the second selected layer.": "Välj masklagret som det andra valda lagret.",
+"Waiting in the queue": "Väntar i kön",
+"Running": "Körs",
+"Failed": "Misslyckades",
+"Cancelled": "Avbruten",
+", position {n}": ", plats {n}",
+", step {v} of {max}": ", steg {v} av {max}",
+"(reused an earlier result)": "(ett tidigare resultat återanvändes)",
+"(ran again after the server ran out of memory)": "(kördes igen när servern fick slut på minne)",
+"Seed {n}": "Seed {n}",
+"Added {n} layer(s) above the source layer.": "Lade till {n} lager ovanför källagret.",
+"Imported {n} item(s) into the project.": "Importerade {n} objekt till projektet.",
+"Bringing the result into the project": "Hämtar in resultatet i projektet",
+"The engine did not answer.": "Motorn svarade inte."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/th.json b/frontend/src/ui/i18n/tables/more/th.json
index 4ab6b74..afe68db 100644
--- a/frontend/src/ui/i18n/tables/more/th.json
+++ b/frontend/src/ui/i18n/tables/more/th.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "สร้างด้วย Comfy",
+"Server address": "ที่อยู่เซิร์ฟเวอร์",
+"Test": "ทดสอบ",
+"Not checked yet.": "ยังไม่ได้ตรวจสอบ",
+"Workflow": "เวิร์กโฟลว์",
+"Run": "เรียกใช้",
+"Retry with another seed": "ลองใหม่ด้วยซีดอื่น",
+"No job yet.": "ยังไม่มีงาน",
+"Checking the server": "กำลังตรวจสอบเซิร์ฟเวอร์",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy ตอบสนอง แต่ยังไม่ได้ติดตั้ง Comfy-FormBridge-Suite ให้ติดตั้งลงในโฟลเดอร์ custom_nodes ของ ComfyUI แล้วเริ่มเซิร์ฟเวอร์ใหม่",
+"Ready to run.": "พร้อมเรียกใช้",
+"Not ready yet.": "ยังไม่พร้อม",
+"Checking what this workflow needs": "กำลังตรวจสอบสิ่งที่เวิร์กโฟลว์นี้ต้องใช้",
+"Select a layer in the Timeline to use as the source.": "เลือกเลเยอร์ในไทม์ไลน์เพื่อใช้เป็นแหล่งที่มา",
+"Preparing the source and sending it": "กำลังเตรียมแหล่งที่มาและส่ง",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "ติดตั้งชุดโหนดเหล่านี้ลงในโฟลเดอร์ custom_nodes ของ ComfyUI: {list}",
+"{n} node type(s) are missing on the server.": "เซิร์ฟเวอร์ขาดโหนดอยู่ {n} ประเภท",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "ไม่พบโมเดล {file} ({mb} MB จาก {source} ให้ยอมรับข้อกำหนดของโมเดลก่อน) วางไว้ใน {place}",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "ไม่พบโมเดล {file} ({mb} MB จาก {source}) วางไว้ใน {place}",
+"This Comfy server is too old. The pack needs version {v} or later.": "เซิร์ฟเวอร์ Comfy นี้เก่าเกินไป ชุดนี้ต้องใช้เวอร์ชัน {v} ขึ้นไป",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "เชื่อมต่อแล้ว: Comfy {comfy}, {pack} {version}, {device}",
+"{title} (not ready)": "{title} (ยังไม่พร้อม)",
+"Source: {name}, frames {a} to {b} (the work area).": "แหล่งที่มา: {name} เฟรม {a} ถึง {b} (พื้นที่ทำงาน)",
+"Mask: {name}.": "มาสก์: {name}",
+"Select the mask layer as the second selected layer.": "เลือกเลเยอร์มาสก์เป็นเลเยอร์ที่เลือกลำดับที่สอง",
+"Waiting in the queue": "กำลังรอในคิว",
+"Running": "กำลังทำงาน",
+"Failed": "ล้มเหลว",
+"Cancelled": "ยกเลิกแล้ว",
+", position {n}": " ลำดับที่ {n}",
+", step {v} of {max}": " ขั้นตอนที่ {v} จาก {max}",
+"(reused an earlier result)": "(ใช้ผลลัพธ์เดิมซ้ำ)",
+"(ran again after the server ran out of memory)": "(รันใหม่หลังจากเซิร์ฟเวอร์หน่วยความจำเต็ม)",
+"Seed {n}": "ซีด {n}",
+"Added {n} layer(s) above the source layer.": "เพิ่ม {n} เลเยอร์เหนือเลเยอร์ต้นทางแล้ว",
+"Imported {n} item(s) into the project.": "นำเข้า {n} รายการสู่โปรเจกต์แล้ว",
+"Bringing the result into the project": "กำลังนำผลลัพธ์เข้าสู่โปรเจกต์",
+"The engine did not answer.": "เอนจินไม่ตอบสนอง"
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/tr.json b/frontend/src/ui/i18n/tables/more/tr.json
index c0e4498..e341487 100644
--- a/frontend/src/ui/i18n/tables/more/tr.json
+++ b/frontend/src/ui/i18n/tables/more/tr.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Comfy ile Oluştur",
+"Server address": "Sunucu adresi",
+"Test": "Dene",
+"Not checked yet.": "Henüz denetlenmedi.",
+"Workflow": "İş akışı",
+"Run": "Çalıştır",
+"Retry with another seed": "Başka bir tohumla yeniden dene",
+"No job yet.": "Henüz iş yok.",
+"Checking the server": "Sunucu denetleniyor",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy yanıt veriyor ancak Comfy-FormBridge-Suite yüklü değil. Bunu ComfyUI'ın custom_nodes klasörüne yükleyin ve sunucuyu yeniden başlatın.",
+"Ready to run.": "Çalıştırmaya hazır.",
+"Not ready yet.": "Henüz hazır değil.",
+"Checking what this workflow needs": "Bu iş akışının neye ihtiyaç duyduğu denetleniyor",
+"Select a layer in the Timeline to use as the source.": "Kaynak olarak kullanmak için Zaman Çizelgesi'nden bir katman seçin.",
+"Preparing the source and sending it": "Kaynak hazırlanıyor ve gönderiliyor",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Bu düğüm paketlerini ComfyUI'ın custom_nodes klasörüne yükleyin: {list}.",
+"{n} node type(s) are missing on the server.": "Sunucuda {n} düğüm türü eksik.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "{file} modeli eksik ({source} kaynağından {mb} MB, önce koşullarını kabul edin); onu {place} içine koyun.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "{file} modeli eksik ({source} kaynağından {mb} MB); onu {place} içine koyun.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Bu Comfy sunucusu çok eski. Paket {v} veya daha yeni bir sürüm gerektiriyor.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Bağlandı: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (hazır değil)",
+"Source: {name}, frames {a} to {b} (the work area).": "Kaynak: {name}, {a} ile {b} arası kareler (çalışma alanı).",
+"Mask: {name}.": "Maske: {name}.",
+"Select the mask layer as the second selected layer.": "Maske katmanını ikinci seçili katman olarak seçin.",
+"Waiting in the queue": "Sırada bekliyor",
+"Running": "Çalışıyor",
+"Failed": "Başarısız",
+"Cancelled": "İptal edildi",
+", position {n}": ", sıra {n}",
+", step {v} of {max}": ", adım {v} / {max}",
+"(reused an earlier result)": "(önceki sonuç yeniden kullanıldı)",
+"(ran again after the server ran out of memory)": "(sunucunun belleği bittikten sonra yeniden çalıştırıldı)",
+"Seed {n}": "Tohum {n}",
+"Added {n} layer(s) above the source layer.": "Kaynak katmanın üstüne {n} katman eklendi.",
+"Imported {n} item(s) into the project.": "Projeye {n} öğe aktarıldı.",
+"Bringing the result into the project": "Sonuç projeye getiriliyor",
+"The engine did not answer.": "Motor yanıt vermedi."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/uk.json b/frontend/src/ui/i18n/tables/more/uk.json
index 5738c80..f5efa7b 100644
--- a/frontend/src/ui/i18n/tables/more/uk.json
+++ b/frontend/src/ui/i18n/tables/more/uk.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Створити за допомогою Comfy",
+"Server address": "Адреса сервера",
+"Test": "Перевірити",
+"Not checked yet.": "Ще не перевірено.",
+"Workflow": "Робочий процес",
+"Run": "Запустити",
+"Retry with another seed": "Повторити з іншим сідом",
+"No job yet.": "Завдань ще немає.",
+"Checking the server": "Перевірка сервера",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy відповідає, але Comfy-FormBridge-Suite не встановлено. Встановіть його в папку custom_nodes у ComfyUI і перезапустіть сервер.",
+"Ready to run.": "Готово до запуску.",
+"Not ready yet.": "Ще не готово.",
+"Checking what this workflow needs": "Перевірка того, що потрібно цьому робочому процесу",
+"Select a layer in the Timeline to use as the source.": "Виберіть шар на часовій шкалі як джерело.",
+"Preparing the source and sending it": "Підготовка джерела й надсилання",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Встановіть ці набори нодів у папку custom_nodes у ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "На сервері бракує типів нодів: {n}.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Немає моделі {file} ({mb} МБ із {source}, спершу прийміть її умови); покладіть її в {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Немає моделі {file} ({mb} МБ із {source}); покладіть її в {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Цей сервер Comfy занадто старий. Набору потрібна версія {v} або новіша.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Підключено: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (не готово)",
+"Source: {name}, frames {a} to {b} (the work area).": "Джерело: {name}, кадри з {a} по {b} (робоча область).",
+"Mask: {name}.": "Маска: {name}.",
+"Select the mask layer as the second selected layer.": "Виберіть шар маски другим вибраним шаром.",
+"Waiting in the queue": "Очікування в черзі",
+"Running": "Виконується",
+"Failed": "Не вдалося",
+"Cancelled": "Скасовано",
+", position {n}": ", позиція {n}",
+", step {v} of {max}": ", крок {v} із {max}",
+"(reused an earlier result)": "(використано попередній результат)",
+"(ran again after the server ran out of memory)": "(запущено знову після браку пам'яті на сервері)",
+"Seed {n}": "Сід {n}",
+"Added {n} layer(s) above the source layer.": "Шарів додано над вихідним шаром: {n}.",
+"Imported {n} item(s) into the project.": "Елементів імпортовано в проєкт: {n}.",
+"Bringing the result into the project": "Перенесення результату в проєкт",
+"The engine did not answer.": "Рушій не відповів."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/vi.json b/frontend/src/ui/i18n/tables/more/vi.json
index 076e529..d25e2ee 100644
--- a/frontend/src/ui/i18n/tables/more/vi.json
+++ b/frontend/src/ui/i18n/tables/more/vi.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "Tạo bằng Comfy",
+"Server address": "Địa chỉ máy chủ",
+"Test": "Kiểm tra",
+"Not checked yet.": "Chưa kiểm tra.",
+"Workflow": "Quy trình",
+"Run": "Chạy",
+"Retry with another seed": "Thử lại với seed khác",
+"No job yet.": "Chưa có tác vụ nào.",
+"Checking the server": "Đang kiểm tra máy chủ",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy có phản hồi nhưng Comfy-FormBridge-Suite chưa được cài đặt. Hãy cài vào thư mục custom_nodes của ComfyUI rồi khởi động lại máy chủ.",
+"Ready to run.": "Sẵn sàng chạy.",
+"Not ready yet.": "Chưa sẵn sàng.",
+"Checking what this workflow needs": "Đang kiểm tra quy trình này cần gì",
+"Select a layer in the Timeline to use as the source.": "Chọn một lớp trong Timeline để làm nguồn.",
+"Preparing the source and sending it": "Đang chuẩn bị nguồn và gửi đi",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "Hãy cài các gói node này vào thư mục custom_nodes của ComfyUI: {list}.",
+"{n} node type(s) are missing on the server.": "Máy chủ thiếu {n} loại node.",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "Thiếu mô hình {file} ({mb} MB từ {source}, hãy chấp nhận điều khoản của nó trước); đặt nó vào {place}.",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "Thiếu mô hình {file} ({mb} MB từ {source}); đặt nó vào {place}.",
+"This Comfy server is too old. The pack needs version {v} or later.": "Máy chủ Comfy này quá cũ. Gói cần phiên bản {v} trở lên.",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "Đã kết nối: Comfy {comfy}, {pack} {version}, {device}.",
+"{title} (not ready)": "{title} (chưa sẵn sàng)",
+"Source: {name}, frames {a} to {b} (the work area).": "Nguồn: {name}, khung hình {a} đến {b} (vùng làm việc).",
+"Mask: {name}.": "Mặt nạ: {name}.",
+"Select the mask layer as the second selected layer.": "Hãy chọn lớp mặt nạ làm lớp được chọn thứ hai.",
+"Waiting in the queue": "Đang chờ trong hàng đợi",
+"Running": "Đang chạy",
+"Failed": "Thất bại",
+"Cancelled": "Đã hủy",
+", position {n}": ", vị trí {n}",
+", step {v} of {max}": ", bước {v} trên {max}",
+"(reused an earlier result)": "(dùng lại kết quả trước đó)",
+"(ran again after the server ran out of memory)": "(chạy lại sau khi máy chủ hết bộ nhớ)",
+"Seed {n}": "Seed {n}",
+"Added {n} layer(s) above the source layer.": "Đã thêm {n} lớp phía trên lớp nguồn.",
+"Imported {n} item(s) into the project.": "Đã nhập {n} mục vào dự án.",
+"Bringing the result into the project": "Đang đưa kết quả vào dự án",
+"The engine did not answer.": "Công cụ xử lý không phản hồi."
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/zh-CN.json b/frontend/src/ui/i18n/tables/more/zh-CN.json
index 3e790b2..5495c0b 100644
--- a/frontend/src/ui/i18n/tables/more/zh-CN.json
+++ b/frontend/src/ui/i18n/tables/more/zh-CN.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "使用 Comfy 生成",
+"Server address": "服务器地址",
+"Test": "测试",
+"Not checked yet.": "尚未检查。",
+"Workflow": "工作流",
+"Run": "运行",
+"Retry with another seed": "换一个种子重试",
+"No job yet.": "还没有任务。",
+"Checking the server": "正在检查服务器",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy 有响应,但尚未安装 Comfy-FormBridge-Suite。请将其安装到 ComfyUI 的 custom_nodes 文件夹,然后重启服务器。",
+"Ready to run.": "可以运行。",
+"Not ready yet.": "尚未就绪。",
+"Checking what this workflow needs": "正在检查此工作流需要什么",
+"Select a layer in the Timeline to use as the source.": "请在时间轴中选择一个图层作为来源。",
+"Preparing the source and sending it": "正在准备来源并发送",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "请将这些节点包安装到 ComfyUI 的 custom_nodes 文件夹:{list}。",
+"{n} node type(s) are missing on the server.": "服务器上缺少 {n} 种节点类型。",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "缺少模型 {file}(来自 {source},{mb} MB,请先接受其条款);请放入 {place}。",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "缺少模型 {file}(来自 {source},{mb} MB);请放入 {place}。",
+"This Comfy server is too old. The pack needs version {v} or later.": "此 Comfy 服务器版本过旧。该包需要 {v} 或更高版本。",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "已连接:Comfy {comfy}、{pack} {version}、{device}。",
+"{title} (not ready)": "{title}(未就绪)",
+"Source: {name}, frames {a} to {b} (the work area).": "来源:{name},第 {a} 到 {b} 帧(工作区域)。",
+"Mask: {name}.": "遮罩:{name}。",
+"Select the mask layer as the second selected layer.": "请将遮罩图层选为第二个选中的图层。",
+"Waiting in the queue": "正在队列中等待",
+"Running": "正在运行",
+"Failed": "失败",
+"Cancelled": "已取消",
+", position {n}": ",第 {n} 位",
+", step {v} of {max}": ",第 {v} 步,共 {max} 步",
+"(reused an earlier result)": "(复用了之前的结果)",
+"(ran again after the server ran out of memory)": "(服务器内存不足后重新运行)",
+"Seed {n}": "种子 {n}",
+"Added {n} layer(s) above the source layer.": "已在来源图层上方添加 {n} 个图层。",
+"Imported {n} item(s) into the project.": "已将 {n} 个项目导入工程。",
+"Bringing the result into the project": "正在将结果带入项目",
+"The engine did not answer.": "引擎没有响应。"
}
\ No newline at end of file
diff --git a/frontend/src/ui/i18n/tables/more/zh-TW.json b/frontend/src/ui/i18n/tables/more/zh-TW.json
index ad34894..19056ca 100644
--- a/frontend/src/ui/i18n/tables/more/zh-TW.json
+++ b/frontend/src/ui/i18n/tables/more/zh-TW.json
@@ -1186,5 +1186,43 @@
"rev 0": "rev 0",
"rev 1": "rev 1",
"sRGB IEC61966-2.1": "sRGB IEC61966-2.1",
-"Čeština": "Čeština"
+"Čeština": "Čeština",
+"Generate with Comfy": "使用 Comfy 生成",
+"Server address": "伺服器位址",
+"Test": "測試",
+"Not checked yet.": "尚未檢查。",
+"Workflow": "工作流程",
+"Run": "執行",
+"Retry with another seed": "換一個種子重試",
+"No job yet.": "還沒有任務。",
+"Checking the server": "正在檢查伺服器",
+"Comfy answers, but Comfy-FormBridge-Suite is not installed. Install it into ComfyUI's custom_nodes and restart the server.": "Comfy 有回應,但尚未安裝 Comfy-FormBridge-Suite。請將其安裝到 ComfyUI 的 custom_nodes 資料夾,然後重新啟動伺服器。",
+"Ready to run.": "可以執行。",
+"Not ready yet.": "尚未就緒。",
+"Checking what this workflow needs": "正在檢查此工作流程需要什麼",
+"Select a layer in the Timeline to use as the source.": "請在時間軸中選擇一個圖層作為來源。",
+"Preparing the source and sending it": "正在準備來源並傳送",
+"Install these node packs into ComfyUI's custom_nodes: {list}.": "請將這些節點包安裝到 ComfyUI 的 custom_nodes 資料夾:{list}。",
+"{n} node type(s) are missing on the server.": "伺服器上缺少 {n} 種節點類型。",
+"Missing model {file} ({mb} MB from {source}, accept its terms first); put it in {place}.": "缺少模型 {file}(來自 {source},{mb} MB,請先接受其條款);請放入 {place}。",
+"Missing model {file} ({mb} MB from {source}); put it in {place}.": "缺少模型 {file}(來自 {source},{mb} MB);請放入 {place}。",
+"This Comfy server is too old. The pack needs version {v} or later.": "此 Comfy 伺服器版本過舊。該套件需要 {v} 或更新版本。",
+"Connected: Comfy {comfy}, {pack} {version}, {device}.": "已連線:Comfy {comfy}、{pack} {version}、{device}。",
+"{title} (not ready)": "{title}(未就緒)",
+"Source: {name}, frames {a} to {b} (the work area).": "來源:{name},第 {a} 到 {b} 影格(工作區域)。",
+"Mask: {name}.": "遮罩:{name}。",
+"Select the mask layer as the second selected layer.": "請將遮罩圖層選為第二個選取的圖層。",
+"Waiting in the queue": "正在佇列中等待",
+"Running": "正在執行",
+"Failed": "失敗",
+"Cancelled": "已取消",
+", position {n}": ",第 {n} 位",
+", step {v} of {max}": ",第 {v} 步,共 {max} 步",
+"(reused an earlier result)": "(重複使用先前的結果)",
+"(ran again after the server ran out of memory)": "(伺服器記憶體不足後重新執行)",
+"Seed {n}": "種子 {n}",
+"Added {n} layer(s) above the source layer.": "已在來源圖層上方新增 {n} 個圖層。",
+"Imported {n} item(s) into the project.": "已將 {n} 個項目匯入專案。",
+"Bringing the result into the project": "正在將結果帶入專案",
+"The engine did not answer.": "引擎沒有回應。"
}
\ No newline at end of file
diff --git a/frontend/src/ui/icons-vfx.ts b/frontend/src/ui/icons-vfx.ts
index 44ab0b2..be4de1c 100644
--- a/frontend/src/ui/icons-vfx.ts
+++ b/frontend/src/ui/icons-vfx.ts
@@ -104,6 +104,7 @@ const VFX: Record = {
plusSmall: s(''),
rulers: s('', 1.4),
showSnap: s(''),
+ cfGenerate: s(''),
};
for (const [k, v] of Object.entries(VFX)) ICONS[k] = v;
diff --git a/frontend/src/ui/menubar.ts b/frontend/src/ui/menubar.ts
index 223a27d..2a8e37a 100644
--- a/frontend/src/ui/menubar.ts
+++ b/frontend/src/ui/menubar.ts
@@ -112,7 +112,7 @@ export class MenuBar {
if (own) {
m.menu.setItems(own.entries());
const r = m.btn.getBoundingClientRect();
- m.menu.openAt(r.left, r.bottom + 4);
+ m.menu.openUnder(r.left, r.bottom + 4);
return;
}
try {
@@ -126,7 +126,7 @@ export class MenuBar {
if (this.open !== title) return;
m.menu.setItems([...before, ...(before.length ? ['-' as const] : []), ...entries, ...(after.length ? ['-' as const] : []), ...after]);
const r = m.btn.getBoundingClientRect();
- m.menu.openAt(r.left, r.bottom + 4);
+ m.menu.openUnder(r.left, r.bottom + 4);
}
close(): void {
diff --git a/frontend/src/ui/popup.ts b/frontend/src/ui/popup.ts
index ab2a4be..053e5b8 100644
--- a/frontend/src/ui/popup.ts
+++ b/frontend/src/ui/popup.ts
@@ -20,6 +20,10 @@ export const keyLabel = (s: string | null | undefined): string => {
return s.replace(/Cmd\+/g, '⌘').replace(/Ctrl\+/g, '⌃').replace(/Alt\+/g, '⌥').replace(/Opt\+/g, '⌥').replace(/Shift\+/g, '⇧');
};
+const MENU_SHARE = 0.75, MENU_PAD = 4;
+const menuCap = (top: number): number => Math.max(0, Math.min(Math.floor(window.innerHeight * MENU_SHARE), Math.floor(window.innerHeight - top - MENU_PAD)));
+const barFloor = (): number => { const r = document.querySelector('.cv-menubar')?.getBoundingClientRect(); return r && r.height > 0 ? r.bottom + MENU_PAD : MENU_PAD; };
+
let openRoots: PopupMenu[] = [];
export function closeAllMenus(): void {
@@ -28,6 +32,8 @@ export function closeAllMenus(): void {
export class PopupMenu {
readonly panel: HTMLElement;
+ private readonly list: HTMLElement;
+ private floor: number | null = null;
private openSub: PopupMenu | null = null;
private subRow: HTMLElement | null = null;
private focusIndex = -1;
@@ -35,7 +41,9 @@ export class PopupMenu {
onClose: (() => void) | null = null;
constructor(private readonly parent: PopupMenu | null = null) {
- this.panel = el('');
+ this.panel = el('