@genfeedai/workflow-ui 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/canvas.js +11 -10
  2. package/dist/canvas.mjs +5 -4
  3. package/dist/{chunk-DICI5FSP.js → chunk-3TMV3K34.js} +3 -3
  4. package/dist/chunk-4MZ62VMF.js +37 -0
  5. package/dist/{chunk-EYL6J4MW.mjs → chunk-7P2JWDC7.mjs} +2 -2
  6. package/dist/{chunk-3PMLER6D.mjs → chunk-AOTUCJMA.mjs} +1 -1
  7. package/dist/{chunk-XOC5ETTX.mjs → chunk-AUZR6REQ.mjs} +1 -1
  8. package/dist/{chunk-DUZLPHRC.js → chunk-AXFOCPPP.js} +1 -1
  9. package/dist/{chunk-PVWLMJGZ.js → chunk-BMFRA6GK.js} +13 -13
  10. package/dist/{chunk-PFHFGSM5.mjs → chunk-E3YBVMYZ.mjs} +389 -10
  11. package/dist/{chunk-H3JOHAS5.js → chunk-ECD5J2BA.js} +450 -71
  12. package/dist/{chunk-I3GNO2SR.mjs → chunk-HCXI63ME.mjs} +1 -1
  13. package/dist/{chunk-HWY6IBWT.js → chunk-KDIWRSYV.js} +5 -5
  14. package/dist/{chunk-OZNYKFMX.js → chunk-SEV2DWKF.js} +18 -18
  15. package/dist/{chunk-73V6SUEO.mjs → chunk-SQK4JDYY.mjs} +1 -1
  16. package/dist/chunk-ZJWP5KGZ.mjs +33 -0
  17. package/dist/hooks.js +12 -11
  18. package/dist/hooks.mjs +3 -2
  19. package/dist/index.js +38 -37
  20. package/dist/index.mjs +7 -6
  21. package/dist/lib.js +1 -0
  22. package/dist/lib.mjs +1 -0
  23. package/dist/nodes.js +37 -36
  24. package/dist/nodes.mjs +4 -3
  25. package/dist/panels.js +6 -5
  26. package/dist/panels.mjs +3 -2
  27. package/dist/provider.js +1 -0
  28. package/dist/provider.mjs +1 -0
  29. package/dist/stores.js +6 -5
  30. package/dist/stores.mjs +2 -1
  31. package/dist/toolbar.js +9 -8
  32. package/dist/toolbar.mjs +3 -2
  33. package/dist/ui.js +1 -0
  34. package/dist/ui.mjs +1 -0
  35. package/dist/{workflowStore-ZCSVIZQF.mjs → workflowStore-7SDJC4UR.mjs} +1 -0
  36. package/dist/{workflowStore-32ZH5REM.js → workflowStore-LNJQ5RZG.js} +1 -0
  37. package/package.json +4 -4
@@ -2,14 +2,15 @@
2
2
 
3
3
  var chunk3SPPKCWR_js = require('./chunk-3SPPKCWR.js');
4
4
  var chunk3YFFDHC5_js = require('./chunk-3YFFDHC5.js');
5
- var chunkDICI5FSP_js = require('./chunk-DICI5FSP.js');
5
+ var chunk3TMV3K34_js = require('./chunk-3TMV3K34.js');
6
6
  var chunk5HJFQVUR_js = require('./chunk-5HJFQVUR.js');
7
7
  var chunkEMUMKW5C_js = require('./chunk-EMUMKW5C.js');
8
8
  var chunk6DOEUDD5_js = require('./chunk-6DOEUDD5.js');
9
- var chunkDUZLPHRC_js = require('./chunk-DUZLPHRC.js');
9
+ var chunkAXFOCPPP_js = require('./chunk-AXFOCPPP.js');
10
10
  var chunkIHF35QZD_js = require('./chunk-IHF35QZD.js');
11
11
  var chunkRJ262NXS_js = require('./chunk-RJ262NXS.js');
12
12
  var chunkRXNEDWK2_js = require('./chunk-RXNEDWK2.js');
13
+ var chunk4MZ62VMF_js = require('./chunk-4MZ62VMF.js');
13
14
  var types = require('@genfeedai/types');
14
15
  var react$1 = require('@xyflow/react');
15
16
  var clsx = require('clsx');
@@ -18,14 +19,290 @@ var react = require('react');
18
19
  var jsxRuntime = require('react/jsx-runtime');
19
20
  var Image4 = require('next/image');
20
21
  var reactDom = require('react-dom');
21
- var reactCompareSlider = require('react-compare-slider');
22
22
  var shallow = require('zustand/react/shallow');
23
- var core = require('@genfeedai/core');
24
23
 
25
24
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
26
25
 
27
26
  var Image4__default = /*#__PURE__*/_interopDefault(Image4);
28
27
 
28
+ // ../core/dist/chunk-OAAW6BNW.js
29
+ var require_chunk_OAAW6BNW = chunk4MZ62VMF_js.__commonJS({
30
+ "../core/dist/chunk-OAAW6BNW.js"(exports$1) {
31
+ function topologicalSort(nodes, edges) {
32
+ const inDegree = /* @__PURE__ */ new Map();
33
+ const adjList = /* @__PURE__ */ new Map();
34
+ for (const node of nodes) {
35
+ inDegree.set(node.id, 0);
36
+ adjList.set(node.id, []);
37
+ }
38
+ for (const edge of edges) {
39
+ adjList.get(edge.source)?.push(edge.target);
40
+ inDegree.set(edge.target, (inDegree.get(edge.target) ?? 0) + 1);
41
+ }
42
+ const queue = [];
43
+ for (const [nodeId, degree] of inDegree) {
44
+ if (degree === 0) {
45
+ queue.push(nodeId);
46
+ }
47
+ }
48
+ const result = [];
49
+ while (queue.length > 0) {
50
+ const node = queue.shift();
51
+ result.push(node);
52
+ for (const neighbor of adjList.get(node) ?? []) {
53
+ inDegree.set(neighbor, (inDegree.get(neighbor) ?? 1) - 1);
54
+ if (inDegree.get(neighbor) === 0) {
55
+ queue.push(neighbor);
56
+ }
57
+ }
58
+ }
59
+ return result;
60
+ }
61
+ function buildDependencyMap(nodes, edges) {
62
+ const deps = /* @__PURE__ */ new Map();
63
+ for (const node of nodes) {
64
+ deps.set(node.id, []);
65
+ }
66
+ for (const edge of edges) {
67
+ const existing = deps.get(edge.target) ?? [];
68
+ deps.set(edge.target, [...existing, edge.source]);
69
+ }
70
+ return deps;
71
+ }
72
+ exports$1.buildDependencyMap = buildDependencyMap;
73
+ exports$1.topologicalSort = topologicalSort;
74
+ }
75
+ });
76
+
77
+ // ../core/dist/chunk-FZCK5A7S.js
78
+ var require_chunk_FZCK5A7S = chunk4MZ62VMF_js.__commonJS({
79
+ "../core/dist/chunk-FZCK5A7S.js"(exports$1) {
80
+ var types = chunk4MZ62VMF_js.__require("@genfeedai/types");
81
+ function detectCycles(nodes, edges) {
82
+ const visited = /* @__PURE__ */ new Set();
83
+ const recStack = /* @__PURE__ */ new Set();
84
+ function hasCycle(nodeId) {
85
+ if (recStack.has(nodeId)) return true;
86
+ if (visited.has(nodeId)) return false;
87
+ visited.add(nodeId);
88
+ recStack.add(nodeId);
89
+ const outgoing = edges.filter((e) => e.source === nodeId);
90
+ for (const edge of outgoing) {
91
+ if (hasCycle(edge.target)) return true;
92
+ }
93
+ recStack.delete(nodeId);
94
+ return false;
95
+ }
96
+ for (const node of nodes) {
97
+ if (hasCycle(node.id)) return true;
98
+ }
99
+ return false;
100
+ }
101
+ function validateWorkflow(nodes, edges) {
102
+ const errors = [];
103
+ const warnings = [];
104
+ for (const node of nodes) {
105
+ const nodeDef = types.NODE_DEFINITIONS[node.type];
106
+ if (!nodeDef) continue;
107
+ const incomingEdges = edges.filter((e) => e.target === node.id);
108
+ for (const input of nodeDef.inputs) {
109
+ if (input.required) {
110
+ const hasConnection = incomingEdges.some((e) => e.targetHandle === input.id);
111
+ if (!hasConnection) {
112
+ errors.push({
113
+ nodeId: node.id,
114
+ message: `Missing required input: ${input.label}`,
115
+ severity: "error"
116
+ });
117
+ }
118
+ }
119
+ }
120
+ if (node.type === "download") {
121
+ const hasMediaInput = incomingEdges.some(
122
+ (e) => e.targetHandle === "image" || e.targetHandle === "video"
123
+ );
124
+ if (!hasMediaInput) {
125
+ errors.push({
126
+ nodeId: node.id,
127
+ message: "Output node requires at least one Media input (image or video)",
128
+ severity: "error"
129
+ });
130
+ }
131
+ }
132
+ }
133
+ if (detectCycles(nodes, edges)) {
134
+ errors.push({
135
+ nodeId: nodes[0]?.id ?? "unknown",
136
+ message: "Workflow contains a cycle",
137
+ severity: "error"
138
+ });
139
+ }
140
+ return {
141
+ isValid: errors.length === 0,
142
+ errors,
143
+ warnings
144
+ };
145
+ }
146
+ function getHandleType(nodeType, handleId, direction) {
147
+ const nodeDef = types.NODE_DEFINITIONS[nodeType];
148
+ if (!nodeDef) return null;
149
+ const handles = direction === "source" ? nodeDef.outputs : nodeDef.inputs;
150
+ const handle = handles.find((h) => h.id === handleId);
151
+ return handle?.type ?? null;
152
+ }
153
+ function isValidConnection(sourceNodeType, sourceHandle, targetNodeType, targetHandle) {
154
+ const sourceType = getHandleType(sourceNodeType, sourceHandle, "source");
155
+ const targetType = getHandleType(targetNodeType, targetHandle, "target");
156
+ if (!sourceType || !targetType) return false;
157
+ return types.CONNECTION_RULES[sourceType]?.includes(targetType) ?? false;
158
+ }
159
+ function getCompatibleHandles(handleType) {
160
+ return types.CONNECTION_RULES[handleType] ?? [];
161
+ }
162
+ exports$1.detectCycles = detectCycles;
163
+ exports$1.getCompatibleHandles = getCompatibleHandles;
164
+ exports$1.getHandleType = getHandleType;
165
+ exports$1.isValidConnection = isValidConnection;
166
+ exports$1.validateWorkflow = validateWorkflow;
167
+ }
168
+ });
169
+
170
+ // ../core/dist/index.js
171
+ var require_dist = chunk4MZ62VMF_js.__commonJS({
172
+ "../core/dist/index.js"(exports$1) {
173
+ var chunkOAAW6BNW_js = require_chunk_OAAW6BNW();
174
+ var chunkFZCK5A7S_js = require_chunk_FZCK5A7S();
175
+ var PRICING = {
176
+ // Image generation (per image)
177
+ "nano-banana": 0.039,
178
+ "nano-banana-pro": {
179
+ "1K": 0.15,
180
+ "2K": 0.15,
181
+ "4K": 0.3
182
+ },
183
+ // Legacy aliases
184
+ "imagen-4-fast": 0.039,
185
+ "imagen-4": 0.15,
186
+ // Video generation (per second)
187
+ "veo-3.1-fast": { withAudio: 0.15, withoutAudio: 0.1 },
188
+ "veo-3.1": { withAudio: 0.4, withoutAudio: 0.2 },
189
+ // Legacy aliases
190
+ "veo-3-fast": { withAudio: 0.15, withoutAudio: 0.1 },
191
+ "veo-3": { withAudio: 0.4, withoutAudio: 0.2 },
192
+ // LLM (per token, derived from $9.50/million)
193
+ llama: 95e-7,
194
+ // Luma Reframe
195
+ "luma-reframe-image": {
196
+ "photon-flash-1": 0.01,
197
+ "photon-1": 0.03
198
+ },
199
+ "luma-reframe-video": 0.06,
200
+ // per second
201
+ // Topaz Upscale (tiered by megapixels)
202
+ "topaz-image-upscale": [
203
+ { maxMP: 1, price: 0.05 },
204
+ { maxMP: 4, price: 0.08 },
205
+ { maxMP: 9, price: 0.16 },
206
+ { maxMP: 16, price: 0.27 },
207
+ { maxMP: 25, price: 0.41 },
208
+ { maxMP: Infinity, price: 0.82 }
209
+ ],
210
+ // Topaz Video (per 5 seconds based on resolution and fps)
211
+ "topaz-video-upscale": {
212
+ "720p-15": 0.014,
213
+ "720p-24": 0.022,
214
+ "720p-30": 0.027,
215
+ "720p-60": 0.054,
216
+ "1080p-15": 0.051,
217
+ "1080p-24": 0.081,
218
+ "1080p-30": 0.101,
219
+ "1080p-60": 0.203,
220
+ "4k-15": 0.187,
221
+ "4k-24": 0.299,
222
+ "4k-30": 0.373,
223
+ "4k-60": 0.747
224
+ }
225
+ };
226
+ var IMAGE_NODE_TYPES = ["imageGen", "image-gen", "ImageGenNode"];
227
+ var VIDEO_NODE_TYPES = ["videoGen", "video-gen", "VideoGenNode"];
228
+ var LUMA_NODE_TYPES = ["reframe", "lumaReframeImage", "lumaReframeVideo"];
229
+ var TOPAZ_NODE_TYPES = ["upscale", "topazImageUpscale", "topazVideoUpscale"];
230
+ var DEFAULT_VIDEO_DURATION = 8;
231
+ var ASPECT_RATIOS3 = [
232
+ "1:1",
233
+ "16:9",
234
+ "9:16",
235
+ "4:3",
236
+ "3:4",
237
+ "4:5",
238
+ "5:4",
239
+ "2:3",
240
+ "3:2",
241
+ "21:9"
242
+ ];
243
+ var VIDEO_ASPECT_RATIOS = ["16:9", "9:16"];
244
+ var RESOLUTIONS2 = ["1K", "2K", "4K"];
245
+ var VIDEO_RESOLUTIONS = ["720p", "1080p"];
246
+ var VIDEO_DURATIONS = [4, 6, 8];
247
+ var OUTPUT_FORMATS2 = ["jpg", "png", "webp"];
248
+ var LUMA_ASPECT_RATIOS2 = ["1:1", "3:4", "4:3", "9:16", "16:9", "9:21", "21:9"];
249
+ Object.defineProperty(exports$1, "buildDependencyMap", {
250
+ enumerable: true,
251
+ get: function() {
252
+ return chunkOAAW6BNW_js.buildDependencyMap;
253
+ }
254
+ });
255
+ Object.defineProperty(exports$1, "topologicalSort", {
256
+ enumerable: true,
257
+ get: function() {
258
+ return chunkOAAW6BNW_js.topologicalSort;
259
+ }
260
+ });
261
+ Object.defineProperty(exports$1, "detectCycles", {
262
+ enumerable: true,
263
+ get: function() {
264
+ return chunkFZCK5A7S_js.detectCycles;
265
+ }
266
+ });
267
+ Object.defineProperty(exports$1, "getCompatibleHandles", {
268
+ enumerable: true,
269
+ get: function() {
270
+ return chunkFZCK5A7S_js.getCompatibleHandles;
271
+ }
272
+ });
273
+ Object.defineProperty(exports$1, "getHandleType", {
274
+ enumerable: true,
275
+ get: function() {
276
+ return chunkFZCK5A7S_js.getHandleType;
277
+ }
278
+ });
279
+ Object.defineProperty(exports$1, "isValidConnection", {
280
+ enumerable: true,
281
+ get: function() {
282
+ return chunkFZCK5A7S_js.isValidConnection;
283
+ }
284
+ });
285
+ Object.defineProperty(exports$1, "validateWorkflow", {
286
+ enumerable: true,
287
+ get: function() {
288
+ return chunkFZCK5A7S_js.validateWorkflow;
289
+ }
290
+ });
291
+ exports$1.ASPECT_RATIOS = ASPECT_RATIOS3;
292
+ exports$1.DEFAULT_VIDEO_DURATION = DEFAULT_VIDEO_DURATION;
293
+ exports$1.IMAGE_NODE_TYPES = IMAGE_NODE_TYPES;
294
+ exports$1.LUMA_ASPECT_RATIOS = LUMA_ASPECT_RATIOS2;
295
+ exports$1.LUMA_NODE_TYPES = LUMA_NODE_TYPES;
296
+ exports$1.OUTPUT_FORMATS = OUTPUT_FORMATS2;
297
+ exports$1.PRICING = PRICING;
298
+ exports$1.RESOLUTIONS = RESOLUTIONS2;
299
+ exports$1.TOPAZ_NODE_TYPES = TOPAZ_NODE_TYPES;
300
+ exports$1.VIDEO_ASPECT_RATIOS = VIDEO_ASPECT_RATIOS;
301
+ exports$1.VIDEO_DURATIONS = VIDEO_DURATIONS;
302
+ exports$1.VIDEO_NODE_TYPES = VIDEO_NODE_TYPES;
303
+ exports$1.VIDEO_RESOLUTIONS = VIDEO_RESOLUTIONS;
304
+ }
305
+ });
29
306
  var NodeErrorBoundary = class extends react.Component {
30
307
  constructor(props) {
31
308
  super(props);
@@ -202,16 +479,16 @@ function BaseNodeComponent({
202
479
  disabledInputs
203
480
  }) {
204
481
  const isResized = width !== void 0 || height !== void 0;
205
- const selectNode = chunkDUZLPHRC_js.useUIStore((state) => state.selectNode);
206
- const selectedNodeId = chunkDUZLPHRC_js.useUIStore((state) => state.selectedNodeId);
207
- const highlightedNodeIds = chunkDUZLPHRC_js.useUIStore((state) => state.highlightedNodeIds);
482
+ const selectNode = chunkAXFOCPPP_js.useUIStore((state) => state.selectNode);
483
+ const selectedNodeId = chunkAXFOCPPP_js.useUIStore((state) => state.selectedNodeId);
484
+ const highlightedNodeIds = chunkAXFOCPPP_js.useUIStore((state) => state.highlightedNodeIds);
208
485
  const toggleNodeLock = chunkIHF35QZD_js.useWorkflowStore((state) => state.toggleNodeLock);
209
486
  const isNodeLocked = chunkIHF35QZD_js.useWorkflowStore((state) => state.isNodeLocked);
210
487
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
211
- const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
212
- const isRunning = chunkDUZLPHRC_js.useExecutionStore((state) => state.isRunning);
213
- const stopExecution = chunkDUZLPHRC_js.useExecutionStore((state) => state.stopExecution);
214
- const stopNodeExecution = chunkDUZLPHRC_js.useExecutionStore((state) => state.stopNodeExecution);
488
+ const executeNode = chunkAXFOCPPP_js.useExecutionStore((state) => state.executeNode);
489
+ const isRunning = chunkAXFOCPPP_js.useExecutionStore((state) => state.isRunning);
490
+ const stopExecution = chunkAXFOCPPP_js.useExecutionStore((state) => state.stopExecution);
491
+ const stopNodeExecution = chunkAXFOCPPP_js.useExecutionStore((state) => state.stopNodeExecution);
215
492
  const updateNodeInternals = react$1.useUpdateNodeInternals();
216
493
  const nodeDef = types.NODE_DEFINITIONS[type];
217
494
  const nodeData = data;
@@ -238,7 +515,7 @@ function BaseNodeComponent({
238
515
  return () => cancelAnimationFrame(rafId);
239
516
  }, [id, updateNodeInternals, handlesKey]);
240
517
  const isHighlighted = highlightedNodeIds.length === 0 || highlightedNodeIds.includes(id);
241
- const nodeExecuting = chunkDUZLPHRC_js.useExecutionStore((state) => state.activeNodeExecutions.has(id));
518
+ const nodeExecuting = chunkAXFOCPPP_js.useExecutionStore((state) => state.activeNodeExecutions.has(id));
242
519
  const handleRetry = react.useCallback(
243
520
  (e) => {
244
521
  e.stopPropagation();
@@ -946,9 +1223,9 @@ function ImageGenNodeComponent(props) {
946
1223
  const { id, type, data } = props;
947
1224
  const nodeData = data;
948
1225
  const { ModelBrowserModal } = chunkRJ262NXS_js.useWorkflowUIConfig();
949
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
950
- const { handleGenerate, handleStop } = chunkDICI5FSP_js.useNodeExecution(id);
951
- const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
1226
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
1227
+ const { handleGenerate, handleStop } = chunk3TMV3K34_js.useNodeExecution(id);
1228
+ const { canGenerate } = chunk3TMV3K34_js.useCanGenerate({
952
1229
  nodeId: id,
953
1230
  nodeType: type,
954
1231
  inputSchema: nodeData.selectedModel?.inputSchema,
@@ -976,12 +1253,12 @@ function ImageGenNodeComponent(props) {
976
1253
  setTimeout(() => handleDownload(index), index * 100);
977
1254
  });
978
1255
  }, [nodeData.outputImages, handleDownload]);
979
- const { handleModelSelect } = chunkDICI5FSP_js.useModelSelection({
1256
+ const { handleModelSelect } = chunk3TMV3K34_js.useModelSelection({
980
1257
  nodeId: id,
981
1258
  modelMap: chunk3YFFDHC5_js.IMAGE_MODEL_MAP,
982
1259
  fallbackModel: chunk3YFFDHC5_js.DEFAULT_IMAGE_MODEL
983
1260
  });
984
- chunkDICI5FSP_js.useAutoLoadModelSchema({
1261
+ chunk3TMV3K34_js.useAutoLoadModelSchema({
985
1262
  currentModel: nodeData.model,
986
1263
  selectedModel: nodeData.selectedModel,
987
1264
  modelIdMap: chunk3YFFDHC5_js.IMAGE_MODEL_ID_MAP,
@@ -993,7 +1270,7 @@ function ImageGenNodeComponent(props) {
993
1270
  modelSupportsImageInput,
994
1271
  handleSchemaParamChange,
995
1272
  componentSchemas
996
- } = chunkDICI5FSP_js.useAIGenNode({
1273
+ } = chunk3TMV3K34_js.useAIGenNode({
997
1274
  nodeId: id,
998
1275
  selectedModel: nodeData.selectedModel,
999
1276
  schemaParams: nodeData.schemaParams
@@ -1007,7 +1284,7 @@ function ImageGenNodeComponent(props) {
1007
1284
  );
1008
1285
  const isProcessing = nodeData.status === "processing";
1009
1286
  const handleModelBrowse = react.useCallback(() => setIsModelBrowserOpen(true), []);
1010
- const { titleElement, headerActions } = chunkDICI5FSP_js.useAIGenNodeHeader({
1287
+ const { titleElement, headerActions } = chunk3TMV3K34_js.useAIGenNodeHeader({
1011
1288
  modelDisplayName,
1012
1289
  isProcessing,
1013
1290
  canGenerate,
@@ -1154,9 +1431,9 @@ function LipSyncNodeComponent(props) {
1154
1431
  const { id, type, data } = props;
1155
1432
  const nodeData = data;
1156
1433
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
1157
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
1158
- const { handleGenerate } = chunkDICI5FSP_js.useNodeExecution(id);
1159
- const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
1434
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
1435
+ const { handleGenerate } = chunk3TMV3K34_js.useNodeExecution(id);
1436
+ const { canGenerate } = chunk3TMV3K34_js.useCanGenerate({
1160
1437
  nodeId: id,
1161
1438
  nodeType: type
1162
1439
  });
@@ -1293,9 +1570,9 @@ function LLMNodeComponent(props) {
1293
1570
  const nodeData = data;
1294
1571
  const { ModelBrowserModal } = chunkRJ262NXS_js.useWorkflowUIConfig();
1295
1572
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
1296
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
1297
- const { handleGenerate, handleStop } = chunkDICI5FSP_js.useNodeExecution(id);
1298
- const { canGenerate: hasRequiredConnections } = chunkDICI5FSP_js.useCanGenerate({
1573
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
1574
+ const { handleGenerate, handleStop } = chunk3TMV3K34_js.useNodeExecution(id);
1575
+ const { canGenerate: hasRequiredConnections } = chunk3TMV3K34_js.useCanGenerate({
1299
1576
  nodeId: id,
1300
1577
  nodeType: type
1301
1578
  });
@@ -1303,12 +1580,12 @@ function LLMNodeComponent(props) {
1303
1580
  const hasInputPrompt = !!nodeData.inputPrompt?.trim();
1304
1581
  const canGenerate = hasRequiredConnections && hasSystemPrompt && hasInputPrompt;
1305
1582
  const [isModelBrowserOpen, setIsModelBrowserOpen] = react.useState(false);
1306
- const { handleModelSelect } = chunkDICI5FSP_js.useModelSelection({
1583
+ const { handleModelSelect } = chunk3TMV3K34_js.useModelSelection({
1307
1584
  nodeId: id,
1308
1585
  modelMap: chunk3YFFDHC5_js.LLM_MODEL_MAP,
1309
1586
  fallbackModel: chunk3YFFDHC5_js.DEFAULT_LLM_MODEL
1310
1587
  });
1311
- chunkDICI5FSP_js.useAutoLoadModelSchema({
1588
+ chunk3TMV3K34_js.useAutoLoadModelSchema({
1312
1589
  currentModel: nodeData.model,
1313
1590
  selectedModel: nodeData.selectedModel,
1314
1591
  modelIdMap: chunk3YFFDHC5_js.LLM_MODEL_ID_MAP,
@@ -1341,7 +1618,7 @@ function LLMNodeComponent(props) {
1341
1618
  );
1342
1619
  const isProcessing = nodeData.status === "processing";
1343
1620
  const handleModelBrowse = react.useCallback(() => setIsModelBrowserOpen(true), []);
1344
- const { titleElement, headerActions } = chunkDICI5FSP_js.useAIGenNodeHeader({
1621
+ const { titleElement, headerActions } = chunk3TMV3K34_js.useAIGenNodeHeader({
1345
1622
  modelDisplayName,
1346
1623
  isProcessing,
1347
1624
  canGenerate,
@@ -1498,9 +1775,9 @@ function MotionControlNodeComponent(props) {
1498
1775
  const { id, type, data } = props;
1499
1776
  const nodeData = data;
1500
1777
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
1501
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
1502
- const { handleGenerate, handleStop } = chunkDICI5FSP_js.useNodeExecution(id);
1503
- const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
1778
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
1779
+ const { handleGenerate, handleStop } = chunk3TMV3K34_js.useNodeExecution(id);
1780
+ const { canGenerate } = chunk3TMV3K34_js.useCanGenerate({
1504
1781
  nodeId: id,
1505
1782
  nodeType: type
1506
1783
  });
@@ -1735,8 +2012,8 @@ function TextToSpeechNodeComponent(props) {
1735
2012
  const { id, type, data } = props;
1736
2013
  const nodeData = data;
1737
2014
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
1738
- const { handleGenerate } = chunkDICI5FSP_js.useNodeExecution(id);
1739
- const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
2015
+ const { handleGenerate } = chunk3TMV3K34_js.useNodeExecution(id);
2016
+ const { canGenerate } = chunk3TMV3K34_js.useCanGenerate({
1740
2017
  nodeId: id,
1741
2018
  nodeType: type
1742
2019
  });
@@ -1917,9 +2194,9 @@ function TranscribeNodeComponent(props) {
1917
2194
  const { id, type, data } = props;
1918
2195
  const nodeData = data;
1919
2196
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
1920
- const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
1921
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
1922
- const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
2197
+ const executeNode = chunkAXFOCPPP_js.useExecutionStore((state) => state.executeNode);
2198
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
2199
+ const { canGenerate } = chunk3TMV3K34_js.useCanGenerate({
1923
2200
  nodeId: id,
1924
2201
  nodeType: type
1925
2202
  });
@@ -2014,21 +2291,21 @@ function VideoGenNodeComponent(props) {
2014
2291
  const { id, type, data } = props;
2015
2292
  const nodeData = data;
2016
2293
  const { ModelBrowserModal } = chunkRJ262NXS_js.useWorkflowUIConfig();
2017
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
2018
- const { handleGenerate, handleStop } = chunkDICI5FSP_js.useNodeExecution(id);
2019
- const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
2294
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
2295
+ const { handleGenerate, handleStop } = chunk3TMV3K34_js.useNodeExecution(id);
2296
+ const { canGenerate } = chunk3TMV3K34_js.useCanGenerate({
2020
2297
  nodeId: id,
2021
2298
  nodeType: type,
2022
2299
  inputSchema: nodeData.selectedModel?.inputSchema,
2023
2300
  schemaParams: nodeData.schemaParams
2024
2301
  });
2025
2302
  const [isModelBrowserOpen, setIsModelBrowserOpen] = react.useState(false);
2026
- const { handleModelSelect } = chunkDICI5FSP_js.useModelSelection({
2303
+ const { handleModelSelect } = chunk3TMV3K34_js.useModelSelection({
2027
2304
  nodeId: id,
2028
2305
  modelMap: chunk3YFFDHC5_js.VIDEO_MODEL_MAP,
2029
2306
  fallbackModel: chunk3YFFDHC5_js.DEFAULT_VIDEO_MODEL
2030
2307
  });
2031
- chunkDICI5FSP_js.useAutoLoadModelSchema({
2308
+ chunk3TMV3K34_js.useAutoLoadModelSchema({
2032
2309
  currentModel: nodeData.model,
2033
2310
  selectedModel: nodeData.selectedModel,
2034
2311
  modelIdMap: chunk3YFFDHC5_js.VIDEO_MODEL_ID_MAP,
@@ -2040,7 +2317,7 @@ function VideoGenNodeComponent(props) {
2040
2317
  modelSupportsImageInput,
2041
2318
  handleSchemaParamChange,
2042
2319
  componentSchemas
2043
- } = chunkDICI5FSP_js.useAIGenNode({
2320
+ } = chunk3TMV3K34_js.useAIGenNode({
2044
2321
  nodeId: id,
2045
2322
  selectedModel: nodeData.selectedModel,
2046
2323
  schemaParams: nodeData.schemaParams
@@ -2054,7 +2331,7 @@ function VideoGenNodeComponent(props) {
2054
2331
  );
2055
2332
  const isProcessing = nodeData.status === "processing";
2056
2333
  const handleModelBrowse = react.useCallback(() => setIsModelBrowserOpen(true), []);
2057
- const { titleElement, headerActions } = chunkDICI5FSP_js.useAIGenNodeHeader({
2334
+ const { titleElement, headerActions } = chunk3TMV3K34_js.useAIGenNodeHeader({
2058
2335
  modelDisplayName,
2059
2336
  isProcessing,
2060
2337
  canGenerate,
@@ -2131,9 +2408,9 @@ function VoiceChangeNodeComponent(props) {
2131
2408
  const { id, type, data } = props;
2132
2409
  const nodeData = data;
2133
2410
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
2134
- const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
2135
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
2136
- const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
2411
+ const executeNode = chunkAXFOCPPP_js.useExecutionStore((state) => state.executeNode);
2412
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
2413
+ const { canGenerate } = chunk3TMV3K34_js.useCanGenerate({
2137
2414
  nodeId: id,
2138
2415
  nodeType: type
2139
2416
  });
@@ -2753,7 +3030,7 @@ function AudioInputNodeComponent(props) {
2753
3030
  const { id, data } = props;
2754
3031
  const nodeData = data;
2755
3032
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
2756
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
3033
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
2757
3034
  const fileInputRef = react.useRef(null);
2758
3035
  const [showUrlInput, setShowUrlInput] = react.useState(false);
2759
3036
  const [urlValue, setUrlValue] = react.useState(nodeData.url || "");
@@ -2929,7 +3206,7 @@ var AudioInputNode = react.memo(AudioInputNodeComponent);
2929
3206
  function ImageInputNodeComponent(props) {
2930
3207
  const { id, data } = props;
2931
3208
  const nodeData = data;
2932
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
3209
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
2933
3210
  const {
2934
3211
  fileInputRef,
2935
3212
  showUrlInput,
@@ -2941,7 +3218,7 @@ function ImageInputNodeComponent(props) {
2941
3218
  handleRemove,
2942
3219
  handleUrlSubmit,
2943
3220
  handleUrlKeyDown
2944
- } = chunkDICI5FSP_js.useMediaUpload({
3221
+ } = chunk3TMV3K34_js.useMediaUpload({
2945
3222
  nodeId: id,
2946
3223
  mediaType: "image",
2947
3224
  initialUrl: nodeData.url || "",
@@ -3117,7 +3394,7 @@ function PromptConstructorNodeComponent(props) {
3117
3394
  handleKeyDown,
3118
3395
  handleAutocompleteSelect,
3119
3396
  closeAutocomplete
3120
- } = chunkDICI5FSP_js.usePromptAutocomplete({
3397
+ } = chunk3TMV3K34_js.usePromptAutocomplete({
3121
3398
  availableVariables,
3122
3399
  textareaRef,
3123
3400
  localTemplate,
@@ -3291,7 +3568,7 @@ var PromptNode = react.memo(PromptNodeComponent);
3291
3568
  function VideoInputNodeComponent(props) {
3292
3569
  const { id, data } = props;
3293
3570
  const nodeData = data;
3294
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
3571
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
3295
3572
  const {
3296
3573
  fileInputRef,
3297
3574
  showUrlInput,
@@ -3303,7 +3580,7 @@ function VideoInputNodeComponent(props) {
3303
3580
  handleRemove,
3304
3581
  handleUrlSubmit,
3305
3582
  handleUrlKeyDown
3306
- } = chunkDICI5FSP_js.useMediaUpload({
3583
+ } = chunk3TMV3K34_js.useMediaUpload({
3307
3584
  nodeId: id,
3308
3585
  mediaType: "video",
3309
3586
  initialUrl: nodeData.url || "",
@@ -3483,7 +3760,7 @@ function DownloadNodeComponent(props) {
3483
3760
  const nodeData = data;
3484
3761
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
3485
3762
  const edges = chunkIHF35QZD_js.useWorkflowStore((state) => state.edges);
3486
- const isRunning = chunkDUZLPHRC_js.useExecutionStore((state) => state.isRunning);
3763
+ const isRunning = chunkAXFOCPPP_js.useExecutionStore((state) => state.isRunning);
3487
3764
  const [isDownloading, setIsDownloading] = react.useState(false);
3488
3765
  const isConnected = edges.some((edge) => edge.target === id);
3489
3766
  const activeMedia = nodeData.inputVideo || nodeData.inputImage;
@@ -3601,9 +3878,9 @@ function AnimationNodeComponent(props) {
3601
3878
  const { id, type, data } = props;
3602
3879
  const nodeData = data;
3603
3880
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
3604
- const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
3605
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
3606
- const { hasRequiredInputs } = chunkDICI5FSP_js.useRequiredInputs(id, type);
3881
+ const executeNode = chunkAXFOCPPP_js.useExecutionStore((state) => state.executeNode);
3882
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
3883
+ const { hasRequiredInputs } = chunk3TMV3K34_js.useRequiredInputs(id, type);
3607
3884
  const handleCurveTypeChange = react.useCallback(
3608
3885
  (type2) => {
3609
3886
  updateNodeData(id, { curveType: type2 });
@@ -3748,7 +4025,7 @@ function AnnotationNodeComponent(props) {
3748
4025
  const { id, data } = props;
3749
4026
  const nodeData = data;
3750
4027
  const openAnnotation = chunk6DOEUDD5_js.useAnnotationStore((state) => state.openAnnotation);
3751
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
4028
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
3752
4029
  const getConnectedInputs = chunkIHF35QZD_js.useWorkflowStore((state) => state.getConnectedInputs);
3753
4030
  const connectedInputs = getConnectedInputs(id);
3754
4031
  const inputImage = connectedInputs.get("image") ?? nodeData.inputImage;
@@ -3813,6 +4090,105 @@ function AnnotationNodeComponent(props) {
3813
4090
  ] }) });
3814
4091
  }
3815
4092
  var AnnotationNode = react.memo(AnnotationNodeComponent);
4093
+ var B = react.forwardRef(({ transition: e, ...t }, r) => {
4094
+ let o = { position: "absolute", top: 0, left: 0, width: "100%", height: "100%", transition: e ? `clip-path ${e}` : void 0, userSelect: "none", willChange: "clip-path, transition", KhtmlUserSelect: "none", MozUserSelect: "none", WebkitUserSelect: "none" };
4095
+ return jsxRuntime.jsx("div", { ...t, style: o, "data-rcs": "clip-item", ref: r });
4096
+ });
4097
+ B.displayName = "ContainerClip";
4098
+ var W = react.forwardRef(({ children: e, disabled: t, portrait: r, position: o, transition: i }, m) => {
4099
+ let u = { position: "absolute", top: 0, width: r ? "100%" : void 0, height: r ? void 0 : "100%", background: "none", border: 0, padding: 0, pointerEvents: "all", appearance: "none", WebkitAppearance: "none", MozAppearance: "none", outline: 0, transform: r ? "translate3d(0, -50% ,0)" : "translate3d(-50%, 0, 0)", transition: i ? `${r ? "top" : "left"} ${i}` : void 0 };
4100
+ return jsxRuntime.jsx("button", { ref: m, "aria-label": "Drag to move or focus and use arrow keys", "aria-orientation": r ? "vertical" : "horizontal", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": o, "data-rcs": "handle-container", disabled: t, role: "slider", style: u, children: e });
4101
+ });
4102
+ W.displayName = "ThisHandleContainer";
4103
+ var re = ({ flip: e }) => jsxRuntime.jsx("div", { className: "__rcs-handle-arrow", style: { width: 0, height: 0, borderTop: "8px solid transparent", borderRight: "10px solid", borderBottom: "8px solid transparent", transform: e ? "rotate(180deg)" : void 0 } });
4104
+ var F = ({ className: e = "__rcs-handle-root", disabled: t, buttonStyle: r, linesStyle: o, portrait: i, style: m, ...C }) => {
4105
+ let u = { display: "flex", flexDirection: i ? "row" : "column", placeItems: "center", height: "100%", cursor: t ? "not-allowed" : i ? "ns-resize" : "ew-resize", pointerEvents: "none", color: "#fff", ...m }, E = { flexGrow: 1, height: i ? 2 : "100%", width: i ? "100%" : 2, backgroundColor: "currentColor", pointerEvents: "auto", boxShadow: "0 0 4px rgba(0,0,0,.5)", ...o }, y = { display: "grid", gridAutoFlow: "column", gap: 8, placeContent: "center", flexShrink: 0, width: 56, height: 56, borderRadius: "50%", borderStyle: "solid", borderWidth: 2, pointerEvents: "auto", backdropFilter: "blur(7px)", WebkitBackdropFilter: "blur(7px)", backgroundColor: "rgba(0, 0, 0, 0.125)", boxShadow: "0 0 4px rgba(0,0,0,.35)", transform: i ? "rotate(90deg)" : void 0, ...r };
4106
+ return jsxRuntime.jsxs("div", { ...C, className: e, style: u, children: [jsxRuntime.jsx("div", { className: "__rcs-handle-line", style: E }), jsxRuntime.jsxs("div", { className: "__rcs-handle-button", style: y, children: [jsxRuntime.jsx(re, {}), jsxRuntime.jsx(re, { flip: true })] }), jsxRuntime.jsx("div", { className: "__rcs-handle-line", style: E })] });
4107
+ };
4108
+ var $ = ((i) => (i.ARROW_LEFT = "ArrowLeft", i.ARROW_RIGHT = "ArrowRight", i.ARROW_UP = "ArrowUp", i.ARROW_DOWN = "ArrowDown", i))($ || {});
4109
+ var G = ({ boxSizing: e = "border-box", objectFit: t = "cover", objectPosition: r = "center center", ...o } = {}) => ({ display: "block", width: "100%", height: "100%", maxWidth: "100%", boxSizing: e, objectFit: t, objectPosition: r, ...o });
4110
+ var oe = (e) => {
4111
+ let t = react.useRef(e);
4112
+ return react.useEffect(() => {
4113
+ t.current = e;
4114
+ }), t.current;
4115
+ };
4116
+ var U = (e, t, r, o) => {
4117
+ let i = react.useRef();
4118
+ react.useEffect(() => {
4119
+ i.current = t;
4120
+ }, [t]), react.useEffect(() => {
4121
+ if (!(r && r.addEventListener)) return;
4122
+ let m = (C) => i.current && i.current(C);
4123
+ return r.addEventListener(e, m, o), () => {
4124
+ r.removeEventListener(e, m, o);
4125
+ };
4126
+ }, [e, r, o]);
4127
+ };
4128
+ var Te = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? react.useLayoutEffect : react.useEffect;
4129
+ var ie = (e, t) => {
4130
+ let r = react.useRef(), o = react.useCallback(() => {
4131
+ e.current && r.current && r.current.observe(e.current);
4132
+ }, [e]);
4133
+ Te(() => (r.current = new ResizeObserver(([i]) => t(i.contentRect)), o(), () => {
4134
+ r.current && r.current.disconnect();
4135
+ }), [t, o]);
4136
+ };
4137
+ var I = { capture: false, passive: true };
4138
+ var X4 = { capture: true, passive: false };
4139
+ var Me = (e) => {
4140
+ e.preventDefault(), e.currentTarget.focus();
4141
+ };
4142
+ var se = react.forwardRef(({ boundsPadding: e = 0, browsingContext: t = globalThis, changePositionOnHover: r = false, disabled: o = false, handle: i, itemOne: m, itemTwo: C, keyboardIncrement: u = "5%", onlyHandleDraggable: E = false, onPositionChange: y, portrait: a = false, position: g = 50, style: le, transition: ce, ...pe }, de) => {
4143
+ let p = react.useRef(null), j = react.useRef(null), f = react.useRef(null), d = react.useRef(g), [L, q] = react.useState(false), [me, x] = react.useState(true), w = react.useRef(false), [ue, fe] = react.useState(), J = oe(g), l = react.useCallback(function({ x: s, y: c, isOffset: R }) {
4144
+ let b = p.current, A = f.current, D = j.current, { width: h, height: S, left: Pe, top: Ee } = b.getBoundingClientRect();
4145
+ if (h === 0 || S === 0) return;
4146
+ let ye = a ? R ? c - Ee - t.scrollY : c : R ? s - Pe - t.scrollX : s, Q = Math.min(Math.max(ye / (a ? S : h) * 100, 0), 100), z = a ? S / (b.offsetHeight || 1) : h / (b.offsetWidth || 1), Z = e * z / (a ? S : h) * 100, _ = Math.min(Math.max(Q, Z * z), 100 - Z * z);
4147
+ d.current = Q, A.setAttribute("aria-valuenow", `${Math.round(d.current)}`), A.style.top = a ? `${_}%` : "0", A.style.left = a ? "0" : `${_}%`, D.style.clipPath = a ? `inset(${_}% 0 0 0)` : `inset(0 0 0 ${_}%)`, y && y(d.current);
4148
+ }, [e, y, a, t]);
4149
+ react.useEffect(() => {
4150
+ let { width: n, height: s } = p.current.getBoundingClientRect(), c = g === J ? d.current : g;
4151
+ l({ x: n / 100 * c, y: s / 100 * c });
4152
+ }, [e, g, a, J, l]);
4153
+ let Re = react.useCallback((n) => {
4154
+ n.preventDefault(), !(o || n.button !== 0) && (l({ isOffset: true, x: n.pageX, y: n.pageY }), q(true), x(true));
4155
+ }, [o, l]), v = react.useCallback(function(s) {
4156
+ l({ isOffset: true, x: s.pageX, y: s.pageY }), x(false);
4157
+ }, [l]), T = react.useCallback(() => {
4158
+ q(false), x(true);
4159
+ }, []), Se = react.useCallback(({ width: n, height: s }) => {
4160
+ let { width: c, height: R } = p.current.getBoundingClientRect();
4161
+ l({ x: n / 100 * d.current * c / n, y: s / 100 * d.current * R / s });
4162
+ }, [l]), Ce = react.useCallback((n) => {
4163
+ if (!Object.values($).includes(n.key)) return;
4164
+ n.preventDefault(), x(true);
4165
+ let { top: s, left: c } = f.current.getBoundingClientRect(), { width: R, height: b } = p.current.getBoundingClientRect(), D = typeof u == "string" ? parseFloat(u) : u / R * 100, h = a ? n.key === "ArrowLeft" || n.key === "ArrowDown" : n.key === "ArrowRight" || n.key === "ArrowUp", S = Math.min(Math.max(h ? d.current + D : d.current - D, 0), 100);
4166
+ l({ x: a ? c : R * S / 100, y: a ? b * S / 100 : s });
4167
+ }, [u, a, l]);
4168
+ react.useEffect(() => {
4169
+ fe(E ? f.current : p.current);
4170
+ }, [E]), react.useEffect(() => {
4171
+ let n = p.current, s = () => {
4172
+ L || T();
4173
+ };
4174
+ return r && (n.addEventListener("pointermove", v, I), n.addEventListener("pointerleave", s, I)), () => {
4175
+ n.removeEventListener("pointermove", v), n.removeEventListener("pointerleave", s);
4176
+ };
4177
+ }, [r, v, T, L]), react.useEffect(() => (L && !w.current && (t.addEventListener("pointermove", v, I), t.addEventListener("pointerup", T, I), w.current = true), () => {
4178
+ w.current && (t.removeEventListener("pointermove", v), t.removeEventListener("pointerup", T), w.current = false);
4179
+ }), [v, T, L, t]), react.useImperativeHandle(de, () => ({ rootContainer: p.current, handleContainer: f.current, setPosition(n) {
4180
+ let { width: s, height: c } = p.current.getBoundingClientRect();
4181
+ l({ x: s / 100 * n, y: c / 100 * n });
4182
+ } }), [l]), ie(p, Se), U("keydown", Ce, f.current, X4), U("click", Me, f.current, X4), U("pointerdown", Re, ue, X4);
4183
+ let ve = i || jsxRuntime.jsx(F, { disabled: o, portrait: a }), K = me ? ce : void 0, he = { position: "relative", display: "flex", overflow: "hidden", cursor: L ? a ? "ns-resize" : "ew-resize" : void 0, touchAction: "none", userSelect: "none", KhtmlUserSelect: "none", msUserSelect: "none", MozUserSelect: "none", WebkitUserSelect: "none", ...le };
4184
+ return jsxRuntime.jsxs("div", { ...pe, ref: p, style: he, "data-rcs": "root", children: [m, jsxRuntime.jsx(B, { ref: j, transition: K, children: C }), jsxRuntime.jsx(W, { disabled: o, portrait: a, position: Math.round(d.current), ref: f, transition: K, children: ve })] });
4185
+ });
4186
+ se.displayName = "ReactCompareSlider";
4187
+ var ae = react.forwardRef(({ style: e, ...t }, r) => {
4188
+ let o = G(e);
4189
+ return jsxRuntime.jsx("img", { ref: r, ...t, style: o, "data-rcs": "image" });
4190
+ });
4191
+ ae.displayName = "ReactCompareSliderImage";
3816
4192
  function ImageCompareNodeComponent(props) {
3817
4193
  const { id, data } = props;
3818
4194
  const nodeData = data;
@@ -3847,10 +4223,10 @@ function ImageCompareNodeComponent(props) {
3847
4223
  const imageB = displayImages[1] || nodeData.imageB || null;
3848
4224
  return /* @__PURE__ */ jsxRuntime.jsx(BaseNode, { ...props, children: imageA && imageB ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 relative nodrag nopan nowheel min-h-[200px]", children: [
3849
4225
  /* @__PURE__ */ jsxRuntime.jsx(
3850
- reactCompareSlider.ReactCompareSlider,
4226
+ se,
3851
4227
  {
3852
4228
  itemOne: /* @__PURE__ */ jsxRuntime.jsx(
3853
- reactCompareSlider.ReactCompareSliderImage,
4229
+ ae,
3854
4230
  {
3855
4231
  src: imageA,
3856
4232
  alt: "Image A",
@@ -3858,7 +4234,7 @@ function ImageCompareNodeComponent(props) {
3858
4234
  }
3859
4235
  ),
3860
4236
  itemTwo: /* @__PURE__ */ jsxRuntime.jsx(
3861
- reactCompareSlider.ReactCompareSliderImage,
4237
+ ae,
3862
4238
  {
3863
4239
  src: imageB,
3864
4240
  alt: "Image B",
@@ -3887,7 +4263,7 @@ function ImageGridSplitNodeComponent(props) {
3887
4263
  const { id, data } = props;
3888
4264
  const nodeData = data;
3889
4265
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
3890
- const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
4266
+ const executeNode = chunkAXFOCPPP_js.useExecutionStore((state) => state.executeNode);
3891
4267
  const [selectedPreview, setSelectedPreview] = react.useState(null);
3892
4268
  const handleRowsChange = react.useCallback(
3893
4269
  (e) => {
@@ -4360,7 +4736,7 @@ function ReframeNodeComponent(props) {
4360
4736
  const { id, data } = props;
4361
4737
  const nodeData = data;
4362
4738
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
4363
- const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
4739
+ const executeNode = chunkAXFOCPPP_js.useExecutionStore((state) => state.executeNode);
4364
4740
  const videoRef = react.useRef(null);
4365
4741
  const [isPlaying, setIsPlaying] = react.useState(false);
4366
4742
  const inputType = nodeData.inputType ?? (nodeData.inputImage ? "image" : nodeData.inputVideo ? "video" : null);
@@ -4518,6 +4894,9 @@ function ReframeNodeComponent(props) {
4518
4894
  ] }) });
4519
4895
  }
4520
4896
  var ReframeNode = react.memo(ReframeNodeComponent);
4897
+
4898
+ // src/nodes/processing/ResizeNode.tsx
4899
+ var import_core = chunk4MZ62VMF_js.__toESM(require_dist());
4521
4900
  var MODELS2 = {
4522
4901
  image: { id: "photon-flash-1", label: "Luma Photon Flash", price: "$0.01" },
4523
4902
  video: { id: "luma-reframe", label: "Luma Reframe", price: "$0.05" }
@@ -4526,7 +4905,7 @@ function ResizeNodeComponent(props) {
4526
4905
  const { id, data } = props;
4527
4906
  const nodeData = data;
4528
4907
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
4529
- const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
4908
+ const executeNode = chunkAXFOCPPP_js.useExecutionStore((state) => state.executeNode);
4530
4909
  const mediaType = nodeData.inputType ?? "image";
4531
4910
  const currentModel = MODELS2[mediaType];
4532
4911
  const handleTypeChange = react.useCallback(
@@ -4581,7 +4960,7 @@ function ResizeNodeComponent(props) {
4581
4960
  /* @__PURE__ */ jsxRuntime.jsx(chunk3SPPKCWR_js.Label, { className: "text-xs", children: "Target Aspect Ratio" }),
4582
4961
  /* @__PURE__ */ jsxRuntime.jsxs(chunk3SPPKCWR_js.Select, { value: nodeData.targetAspectRatio, onValueChange: handleAspectRatioChange, children: [
4583
4962
  /* @__PURE__ */ jsxRuntime.jsx(chunk3SPPKCWR_js.SelectTrigger, { className: "nodrag h-9 w-full", children: /* @__PURE__ */ jsxRuntime.jsx(chunk3SPPKCWR_js.SelectValue, {}) }),
4584
- /* @__PURE__ */ jsxRuntime.jsx(chunk3SPPKCWR_js.SelectContent, { children: core.LUMA_ASPECT_RATIOS.map((ratio) => /* @__PURE__ */ jsxRuntime.jsx(chunk3SPPKCWR_js.SelectItem, { value: ratio, children: ratio }, ratio)) })
4963
+ /* @__PURE__ */ jsxRuntime.jsx(chunk3SPPKCWR_js.SelectContent, { children: import_core.LUMA_ASPECT_RATIOS.map((ratio) => /* @__PURE__ */ jsxRuntime.jsx(chunk3SPPKCWR_js.SelectItem, { value: ratio, children: ratio }, ratio)) })
4585
4964
  ] })
4586
4965
  ] }),
4587
4966
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -4667,7 +5046,7 @@ function SubtitleNodeComponent(props) {
4667
5046
  const { id, data } = props;
4668
5047
  const nodeData = data;
4669
5048
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
4670
- const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
5049
+ const executeNode = chunkAXFOCPPP_js.useExecutionStore((state) => state.executeNode);
4671
5050
  const handleStyleChange = react.useCallback(
4672
5051
  (value) => {
4673
5052
  updateNodeData(id, { style: value });
@@ -4805,8 +5184,8 @@ function UpscaleNodeComponent(props) {
4805
5184
  const { id, data } = props;
4806
5185
  const nodeData = data;
4807
5186
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
4808
- const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
4809
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
5187
+ const executeNode = chunkAXFOCPPP_js.useExecutionStore((state) => state.executeNode);
5188
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
4810
5189
  const videoRef = react.useRef(null);
4811
5190
  const [isPlaying, setIsPlaying] = react.useState(false);
4812
5191
  const inputType = nodeData.inputType ?? (nodeData.inputImage ? "image" : nodeData.inputVideo ? "video" : null);
@@ -5157,7 +5536,7 @@ function VideoFrameExtractNodeComponent(props) {
5157
5536
  const { id, data } = props;
5158
5537
  const nodeData = data;
5159
5538
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
5160
- const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
5539
+ const executeNode = chunkAXFOCPPP_js.useExecutionStore((state) => state.executeNode);
5161
5540
  const handleModeChange = react.useCallback(
5162
5541
  (value) => {
5163
5542
  updateNodeData(id, { selectionMode: value });
@@ -5232,7 +5611,7 @@ function VideoStitchNodeComponent(props) {
5232
5611
  const nodeData = data;
5233
5612
  const inputVideos = nodeData.inputVideos ?? [];
5234
5613
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
5235
- const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
5614
+ const executeNode = chunkAXFOCPPP_js.useExecutionStore((state) => state.executeNode);
5236
5615
  const handleTransitionChange = react.useCallback(
5237
5616
  (value) => {
5238
5617
  updateNodeData(id, {
@@ -5425,8 +5804,8 @@ function VideoTrimNodeComponent(props) {
5425
5804
  const { id, data } = props;
5426
5805
  const nodeData = data;
5427
5806
  const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
5428
- const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
5429
- const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
5807
+ const executeNode = chunkAXFOCPPP_js.useExecutionStore((state) => state.executeNode);
5808
+ const openNodeDetailModal = chunkAXFOCPPP_js.useUIStore((state) => state.openNodeDetailModal);
5430
5809
  const hasRequiredInputs = !!nodeData.inputVideo;
5431
5810
  const handleStartTimeChange = react.useCallback(
5432
5811
  (e) => {