@nodaro/shared 3.30.0 → 3.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/README.md +17 -0
  2. package/dist/chunk-2NIQO2J3.cjs +54 -0
  3. package/dist/chunk-2NIQO2J3.cjs.map +1 -0
  4. package/dist/chunk-2OJIVO7R.cjs +32 -0
  5. package/dist/chunk-2OJIVO7R.cjs.map +1 -0
  6. package/dist/chunk-2RF4Z7KG.cjs +803 -0
  7. package/dist/chunk-2RF4Z7KG.cjs.map +1 -0
  8. package/dist/chunk-3CUFITU7.js +1905 -0
  9. package/dist/chunk-3CUFITU7.js.map +1 -0
  10. package/dist/chunk-3RYKIUAE.js +86 -0
  11. package/dist/chunk-3RYKIUAE.js.map +1 -0
  12. package/dist/chunk-44I73CQS.cjs +194 -0
  13. package/dist/chunk-44I73CQS.cjs.map +1 -0
  14. package/dist/chunk-5AUSSJIM.cjs +3372 -0
  15. package/dist/chunk-5AUSSJIM.cjs.map +1 -0
  16. package/dist/chunk-5PC6JBGJ.cjs +1419 -0
  17. package/dist/chunk-5PC6JBGJ.cjs.map +1 -0
  18. package/dist/chunk-5RU2HCW2.js +30 -0
  19. package/dist/chunk-5RU2HCW2.js.map +1 -0
  20. package/dist/chunk-5THUHJ3E.js +46 -0
  21. package/dist/chunk-5THUHJ3E.js.map +1 -0
  22. package/dist/chunk-5U7VLG43.js +141 -0
  23. package/dist/chunk-5U7VLG43.js.map +1 -0
  24. package/dist/chunk-6DAWSVX2.cjs +103 -0
  25. package/dist/chunk-6DAWSVX2.cjs.map +1 -0
  26. package/dist/chunk-6DKDOWBL.js +1567 -0
  27. package/dist/chunk-6DKDOWBL.js.map +1 -0
  28. package/dist/chunk-6IJOPRZP.cjs +197 -0
  29. package/dist/chunk-6IJOPRZP.cjs.map +1 -0
  30. package/dist/chunk-7G7G42KS.js +86 -0
  31. package/dist/chunk-7G7G42KS.js.map +1 -0
  32. package/dist/chunk-AINCI23X.js +2171 -0
  33. package/dist/chunk-AINCI23X.js.map +1 -0
  34. package/dist/chunk-AROWPFO2.js +773 -0
  35. package/dist/chunk-AROWPFO2.js.map +1 -0
  36. package/dist/chunk-AVQK77G6.cjs +2000 -0
  37. package/dist/chunk-AVQK77G6.cjs.map +1 -0
  38. package/dist/chunk-C57NEO3X.js +3327 -0
  39. package/dist/chunk-C57NEO3X.js.map +1 -0
  40. package/dist/chunk-CK3GK34R.js +1381 -0
  41. package/dist/chunk-CK3GK34R.js.map +1 -0
  42. package/dist/chunk-E2TGXG6X.cjs +1770 -0
  43. package/dist/chunk-E2TGXG6X.cjs.map +1 -0
  44. package/dist/chunk-EK362Q45.cjs +38 -0
  45. package/dist/chunk-EK362Q45.cjs.map +1 -0
  46. package/dist/chunk-FBV5DF6D.js +95 -0
  47. package/dist/chunk-FBV5DF6D.js.map +1 -0
  48. package/dist/chunk-FG4E7MTG.cjs +4 -0
  49. package/dist/chunk-FG4E7MTG.cjs.map +1 -0
  50. package/dist/chunk-G6IIVKMO.js +26 -0
  51. package/dist/chunk-G6IIVKMO.js.map +1 -0
  52. package/dist/chunk-HGC5JNVA.cjs +1503 -0
  53. package/dist/chunk-HGC5JNVA.cjs.map +1 -0
  54. package/dist/chunk-HSHCCBIV.js +255 -0
  55. package/dist/chunk-HSHCCBIV.js.map +1 -0
  56. package/dist/chunk-IEBZHTPE.js +254 -0
  57. package/dist/chunk-IEBZHTPE.js.map +1 -0
  58. package/dist/chunk-ISJDAFKS.js +1604 -0
  59. package/dist/chunk-ISJDAFKS.js.map +1 -0
  60. package/dist/chunk-J6KHW2E5.cjs +1963 -0
  61. package/dist/chunk-J6KHW2E5.cjs.map +1 -0
  62. package/dist/chunk-J7BMO73N.cjs +114 -0
  63. package/dist/chunk-J7BMO73N.cjs.map +1 -0
  64. package/dist/chunk-JL4C5VJ7.cjs +488 -0
  65. package/dist/chunk-JL4C5VJ7.cjs.map +1 -0
  66. package/dist/chunk-JSGIEF6Z.cjs +1087 -0
  67. package/dist/chunk-JSGIEF6Z.cjs.map +1 -0
  68. package/dist/chunk-JSNV5O2F.cjs +34 -0
  69. package/dist/chunk-JSNV5O2F.cjs.map +1 -0
  70. package/dist/chunk-JWA5SGCS.js +203 -0
  71. package/dist/chunk-JWA5SGCS.js.map +1 -0
  72. package/dist/chunk-JX5YZ4DH.cjs +430 -0
  73. package/dist/chunk-JX5YZ4DH.cjs.map +1 -0
  74. package/dist/chunk-KHCBJ7KD.js +42 -0
  75. package/dist/chunk-KHCBJ7KD.js.map +1 -0
  76. package/dist/chunk-KU6S7IYV.cjs +210 -0
  77. package/dist/chunk-KU6S7IYV.cjs.map +1 -0
  78. package/dist/chunk-LKAIXWK3.js +181 -0
  79. package/dist/chunk-LKAIXWK3.js.map +1 -0
  80. package/dist/chunk-LPW3XNC2.js +471 -0
  81. package/dist/chunk-LPW3XNC2.js.map +1 -0
  82. package/dist/chunk-M36G6SRP.js +447 -0
  83. package/dist/chunk-M36G6SRP.js.map +1 -0
  84. package/dist/chunk-MRXGWL42.cjs +4 -0
  85. package/dist/chunk-MRXGWL42.cjs.map +1 -0
  86. package/dist/chunk-NB72XWXQ.cjs +54 -0
  87. package/dist/chunk-NB72XWXQ.cjs.map +1 -0
  88. package/dist/chunk-NEJ2PV4C.cjs +211 -0
  89. package/dist/chunk-NEJ2PV4C.cjs.map +1 -0
  90. package/dist/chunk-NT6IJH4L.cjs +273 -0
  91. package/dist/chunk-NT6IJH4L.cjs.map +1 -0
  92. package/dist/chunk-O5MP52U2.cjs +526 -0
  93. package/dist/chunk-O5MP52U2.cjs.map +1 -0
  94. package/dist/chunk-O7PUQLJ3.cjs +818 -0
  95. package/dist/chunk-O7PUQLJ3.cjs.map +1 -0
  96. package/dist/chunk-PQHS255G.js +1369 -0
  97. package/dist/chunk-PQHS255G.js.map +1 -0
  98. package/dist/chunk-PRYE7AZQ.cjs +1227 -0
  99. package/dist/chunk-PRYE7AZQ.cjs.map +1 -0
  100. package/dist/chunk-Q4CDQ2KO.js +21 -0
  101. package/dist/chunk-Q4CDQ2KO.js.map +1 -0
  102. package/dist/chunk-QELDJGDK.cjs +1714 -0
  103. package/dist/chunk-QELDJGDK.cjs.map +1 -0
  104. package/dist/chunk-QJRP44ZO.js +769 -0
  105. package/dist/chunk-QJRP44ZO.js.map +1 -0
  106. package/dist/chunk-QNGNOU4Z.js +29 -0
  107. package/dist/chunk-QNGNOU4Z.js.map +1 -0
  108. package/dist/chunk-RJL7RCEM.cjs +159 -0
  109. package/dist/chunk-RJL7RCEM.cjs.map +1 -0
  110. package/dist/chunk-RN3RMBJZ.js +1164 -0
  111. package/dist/chunk-RN3RMBJZ.js.map +1 -0
  112. package/dist/chunk-S5DMKUWK.cjs +1273 -0
  113. package/dist/chunk-S5DMKUWK.cjs.map +1 -0
  114. package/dist/chunk-SES6GDBQ.cjs +624 -0
  115. package/dist/chunk-SES6GDBQ.cjs.map +1 -0
  116. package/dist/chunk-TNPDV7I4.cjs +2346 -0
  117. package/dist/chunk-TNPDV7I4.cjs.map +1 -0
  118. package/dist/chunk-TZBIY5C3.js +187 -0
  119. package/dist/chunk-TZBIY5C3.js.map +1 -0
  120. package/dist/chunk-TZE673G6.js +3 -0
  121. package/dist/chunk-TZE673G6.js.map +1 -0
  122. package/dist/chunk-ULXI7A6Q.cjs +1047 -0
  123. package/dist/chunk-ULXI7A6Q.cjs.map +1 -0
  124. package/dist/chunk-VIWSWVAW.js +1782 -0
  125. package/dist/chunk-VIWSWVAW.js.map +1 -0
  126. package/dist/chunk-VWGNPMJZ.cjs +19 -0
  127. package/dist/chunk-VWGNPMJZ.cjs.map +1 -0
  128. package/dist/chunk-WDIBOWAA.js +1054 -0
  129. package/dist/chunk-WDIBOWAA.js.map +1 -0
  130. package/dist/chunk-WNG7HRVA.cjs +25 -0
  131. package/dist/chunk-WNG7HRVA.cjs.map +1 -0
  132. package/dist/chunk-WNVQ3SMB.cjs +96 -0
  133. package/dist/chunk-WNVQ3SMB.cjs.map +1 -0
  134. package/dist/chunk-WRSWH7US.cjs +285 -0
  135. package/dist/chunk-WRSWH7US.cjs.map +1 -0
  136. package/dist/chunk-XAMC4S53.js +17 -0
  137. package/dist/chunk-XAMC4S53.js.map +1 -0
  138. package/dist/chunk-XNISPHTZ.js +1039 -0
  139. package/dist/chunk-XNISPHTZ.js.map +1 -0
  140. package/dist/chunk-Y2PM3FFL.js +3 -0
  141. package/dist/chunk-Y2PM3FFL.js.map +1 -0
  142. package/dist/chunk-YBPBK5KI.js +1030 -0
  143. package/dist/chunk-YBPBK5KI.js.map +1 -0
  144. package/dist/chunk-YHRG7UOC.js +31 -0
  145. package/dist/chunk-YHRG7UOC.js.map +1 -0
  146. package/dist/chunk-YWNYGYI7.cjs +31 -0
  147. package/dist/chunk-YWNYGYI7.cjs.map +1 -0
  148. package/dist/chunk-YYV35XOS.js +122 -0
  149. package/dist/chunk-YYV35XOS.js.map +1 -0
  150. package/dist/chunk-Z2OL5AJD.cjs +133 -0
  151. package/dist/chunk-Z2OL5AJD.cjs.map +1 -0
  152. package/dist/chunk-Z4AZW6FY.js +920 -0
  153. package/dist/chunk-Z4AZW6FY.js.map +1 -0
  154. package/dist/chunk-ZDFHA2EC.js +572 -0
  155. package/dist/chunk-ZDFHA2EC.js.map +1 -0
  156. package/dist/chunk-ZNZDQAXN.js +175 -0
  157. package/dist/chunk-ZNZDQAXN.js.map +1 -0
  158. package/dist/chunk-ZRL2UFTH.cjs +1073 -0
  159. package/dist/chunk-ZRL2UFTH.cjs.map +1 -0
  160. package/dist/chunk-ZT77RY6R.js +404 -0
  161. package/dist/chunk-ZT77RY6R.js.map +1 -0
  162. package/dist/entries/apps.cjs +155 -0
  163. package/dist/entries/apps.cjs.map +1 -0
  164. package/dist/entries/apps.d.cts +283 -0
  165. package/dist/entries/apps.d.ts +283 -0
  166. package/dist/entries/apps.js +10 -0
  167. package/dist/entries/apps.js.map +1 -0
  168. package/dist/entries/captions.cjs +124 -0
  169. package/dist/entries/captions.cjs.map +1 -0
  170. package/dist/entries/captions.d.cts +354 -0
  171. package/dist/entries/captions.d.ts +354 -0
  172. package/dist/entries/captions.js +3 -0
  173. package/dist/entries/captions.js.map +1 -0
  174. package/dist/entries/catalogs.cjs +165 -0
  175. package/dist/entries/catalogs.cjs.map +1 -0
  176. package/dist/entries/catalogs.d.cts +385 -0
  177. package/dist/entries/catalogs.d.ts +385 -0
  178. package/dist/entries/catalogs.js +4 -0
  179. package/dist/entries/catalogs.js.map +1 -0
  180. package/dist/entries/credits.cjs +592 -0
  181. package/dist/entries/credits.cjs.map +1 -0
  182. package/dist/entries/credits.d.cts +1429 -0
  183. package/dist/entries/credits.d.ts +1429 -0
  184. package/dist/entries/credits.js +11 -0
  185. package/dist/entries/credits.js.map +1 -0
  186. package/dist/entries/edl.cjs +409 -0
  187. package/dist/entries/edl.cjs.map +1 -0
  188. package/dist/entries/edl.d.cts +1199 -0
  189. package/dist/entries/edl.d.ts +1199 -0
  190. package/dist/entries/edl.js +4 -0
  191. package/dist/entries/edl.js.map +1 -0
  192. package/dist/entries/entities.cjs +530 -0
  193. package/dist/entries/entities.cjs.map +1 -0
  194. package/dist/entries/entities.d.cts +1371 -0
  195. package/dist/entries/entities.d.ts +1371 -0
  196. package/dist/entries/entities.js +5 -0
  197. package/dist/entries/entities.js.map +1 -0
  198. package/dist/entries/i18n.cjs +48 -0
  199. package/dist/entries/i18n.cjs.map +1 -0
  200. package/dist/entries/i18n.d.cts +69 -0
  201. package/dist/entries/i18n.d.ts +69 -0
  202. package/dist/entries/i18n.js +3 -0
  203. package/dist/entries/i18n.js.map +1 -0
  204. package/dist/entries/llm-models.cjs +177 -0
  205. package/dist/entries/llm-models.cjs.map +1 -0
  206. package/dist/entries/llm-models.d.cts +435 -0
  207. package/dist/entries/llm-models.d.ts +435 -0
  208. package/dist/entries/llm-models.js +4 -0
  209. package/dist/entries/llm-models.js.map +1 -0
  210. package/dist/entries/media.cjs +335 -0
  211. package/dist/entries/media.cjs.map +1 -0
  212. package/dist/entries/media.d.cts +518 -0
  213. package/dist/entries/media.d.ts +518 -0
  214. package/dist/entries/media.js +6 -0
  215. package/dist/entries/media.js.map +1 -0
  216. package/dist/entries/model-catalog.cjs +247 -0
  217. package/dist/entries/model-catalog.cjs.map +1 -0
  218. package/dist/entries/model-catalog.d.cts +202 -0
  219. package/dist/entries/model-catalog.d.ts +202 -0
  220. package/dist/entries/model-catalog.js +6 -0
  221. package/dist/entries/model-catalog.js.map +1 -0
  222. package/dist/entries/models.cjs +833 -0
  223. package/dist/entries/models.cjs.map +1 -0
  224. package/dist/entries/models.d.cts +287 -0
  225. package/dist/entries/models.d.ts +287 -0
  226. package/dist/entries/models.js +8 -0
  227. package/dist/entries/models.js.map +1 -0
  228. package/dist/entries/nodes.cjs +789 -0
  229. package/dist/entries/nodes.cjs.map +1 -0
  230. package/dist/entries/nodes.d.cts +1600 -0
  231. package/dist/entries/nodes.d.ts +1600 -0
  232. package/dist/entries/nodes.js +16 -0
  233. package/dist/entries/nodes.js.map +1 -0
  234. package/dist/entries/organizations.cjs +80 -0
  235. package/dist/entries/organizations.cjs.map +1 -0
  236. package/dist/entries/organizations.d.cts +466 -0
  237. package/dist/entries/organizations.d.ts +466 -0
  238. package/dist/entries/organizations.js +3 -0
  239. package/dist/entries/organizations.js.map +1 -0
  240. package/dist/entries/pipeline.cjs +594 -0
  241. package/dist/entries/pipeline.cjs.map +1 -0
  242. package/dist/entries/pipeline.d.cts +2617 -0
  243. package/dist/entries/pipeline.d.ts +2617 -0
  244. package/dist/entries/pipeline.js +5 -0
  245. package/dist/entries/pipeline.js.map +1 -0
  246. package/dist/entries/scene3d.cjs +704 -0
  247. package/dist/entries/scene3d.cjs.map +1 -0
  248. package/dist/entries/scene3d.d.cts +4284 -0
  249. package/dist/entries/scene3d.d.ts +4284 -0
  250. package/dist/entries/scene3d.js +3 -0
  251. package/dist/entries/scene3d.js.map +1 -0
  252. package/dist/entries/social.cjs +714 -0
  253. package/dist/entries/social.cjs.map +1 -0
  254. package/dist/entries/social.d.cts +1366 -0
  255. package/dist/entries/social.d.ts +1366 -0
  256. package/dist/entries/social.js +5 -0
  257. package/dist/entries/social.js.map +1 -0
  258. package/dist/entries/types.cjs +13 -0
  259. package/dist/entries/types.cjs.map +1 -0
  260. package/dist/entries/types.d.cts +162 -0
  261. package/dist/entries/types.d.ts +162 -0
  262. package/dist/entries/types.js +4 -0
  263. package/dist/entries/types.js.map +1 -0
  264. package/dist/entries/ugc.cjs +279 -0
  265. package/dist/entries/ugc.cjs.map +1 -0
  266. package/dist/entries/ugc.d.cts +575 -0
  267. package/dist/entries/ugc.d.ts +575 -0
  268. package/dist/entries/ugc.js +6 -0
  269. package/dist/entries/ugc.js.map +1 -0
  270. package/dist/entries/video.cjs +549 -0
  271. package/dist/entries/video.cjs.map +1 -0
  272. package/dist/entries/video.d.cts +1791 -0
  273. package/dist/entries/video.d.ts +1791 -0
  274. package/dist/entries/video.js +8 -0
  275. package/dist/entries/video.js.map +1 -0
  276. package/dist/entries/workflow.cjs +574 -0
  277. package/dist/entries/workflow.cjs.map +1 -0
  278. package/dist/entries/workflow.d.cts +1733 -0
  279. package/dist/entries/workflow.d.ts +1733 -0
  280. package/dist/entries/workflow.js +5 -0
  281. package/dist/entries/workflow.js.map +1 -0
  282. package/dist/fan-out-meta-Bu6VyXcZ.d.cts +19 -0
  283. package/dist/fan-out-meta-Bu6VyXcZ.d.ts +19 -0
  284. package/dist/gemini-omni-voices-zeRXxSbZ.d.cts +174 -0
  285. package/dist/gemini-omni-voices-zeRXxSbZ.d.ts +174 -0
  286. package/dist/image-overlay-layers-CyBfRhxJ.d.cts +208 -0
  287. package/dist/image-overlay-layers-CyBfRhxJ.d.ts +208 -0
  288. package/dist/index.cjs +7731 -26444
  289. package/dist/index.cjs.map +1 -1
  290. package/dist/index.d.cts +32 -23733
  291. package/dist/index.d.ts +32 -23733
  292. package/dist/index.js +40 -24641
  293. package/dist/index.js.map +1 -1
  294. package/dist/model-catalog-flJYaa-g.d.cts +561 -0
  295. package/dist/model-catalog-flJYaa-g.d.ts +561 -0
  296. package/dist/presentation-types-0ENOCjoj.d.cts +61 -0
  297. package/dist/presentation-types-0ENOCjoj.d.ts +61 -0
  298. package/dist/presentation-utils-BIqiCzSA.d.cts +90 -0
  299. package/dist/presentation-utils-BdiObtwq.d.ts +90 -0
  300. package/dist/scene-node-types-DjenYFLO.d.cts +1949 -0
  301. package/dist/scene-node-types-DjenYFLO.d.ts +1949 -0
  302. package/dist/supported-fonts-CRoF1gOy.d.cts +16 -0
  303. package/dist/supported-fonts-CRoF1gOy.d.ts +16 -0
  304. package/dist/types-BRlFPEru.d.cts +511 -0
  305. package/dist/types-BRlFPEru.d.ts +511 -0
  306. package/dist/types-DffyGSy5.d.cts +67 -0
  307. package/dist/types-DffyGSy5.d.ts +67 -0
  308. package/package.json +102 -1
  309. package/src/__tests__/add-captions-plan.test.ts +6 -2
  310. package/src/__tests__/caption-edge-dash.test.ts +23 -0
  311. package/src/__tests__/entity-image-handle.test.ts +61 -1
  312. package/src/__tests__/fixtures/root-exports.baseline.json +4625 -0
  313. package/src/__tests__/input-field-extra-keys.test.ts +1 -0
  314. package/src/__tests__/json-kinds.test.ts +10 -0
  315. package/src/__tests__/model-seed-capability.test.ts +34 -0
  316. package/src/__tests__/no-internal-imports.test.ts +1 -1
  317. package/src/__tests__/node-aspect-ratio.test.ts +25 -0
  318. package/src/__tests__/node-preset-extract.test.ts +8 -0
  319. package/src/__tests__/node-run-routes.test.ts +63 -0
  320. package/src/__tests__/node-runtime-keys.test.ts +70 -0
  321. package/src/__tests__/package-entries.test.ts +50 -0
  322. package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
  323. package/src/__tests__/presentation-utils.test.ts +14 -0
  324. package/src/__tests__/preview-gate-use-case.test.ts +151 -0
  325. package/src/__tests__/producer-types.test.ts +15 -0
  326. package/src/__tests__/run-continuation.test.ts +7 -1
  327. package/src/__tests__/seedance-draft.test.ts +74 -0
  328. package/src/__tests__/site-capture-node.test.ts +58 -0
  329. package/src/__tests__/ugc-clip-saved-list.test.ts +19 -0
  330. package/src/__tests__/ugc-lane-wires.test.ts +228 -0
  331. package/src/__tests__/ugc-node-wires.test.ts +606 -0
  332. package/src/__tests__/ugc-run-state.test.ts +85 -7
  333. package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
  334. package/src/__tests__/video-analysis-pricing.test.ts +6 -6
  335. package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
  336. package/src/__tests__/workflow-export-strip.test.ts +14 -0
  337. package/src/add-captions-plan.ts +9 -3
  338. package/src/caption-edge-dash.ts +33 -0
  339. package/src/credit-estimators/index.ts +22 -1
  340. package/src/credit-estimators/pitch-tempo.ts +15 -1
  341. package/src/credit-estimators/speech.ts +72 -4
  342. package/src/credit-estimators/unit-quote.ts +52 -0
  343. package/src/credit-estimators/video-sfx.ts +15 -0
  344. package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
  345. package/src/entity-image-handle.ts +50 -1
  346. package/src/entries/apps.ts +63 -0
  347. package/src/entries/captions.ts +34 -0
  348. package/src/entries/catalogs.ts +65 -0
  349. package/src/entries/credits.ts +104 -0
  350. package/src/entries/edl.ts +42 -0
  351. package/src/entries/entities.ts +144 -0
  352. package/src/entries/i18n.ts +31 -0
  353. package/src/entries/llm-models.ts +63 -0
  354. package/src/entries/media.ts +36 -0
  355. package/src/entries/model-catalog.ts +89 -0
  356. package/src/entries/models.ts +266 -0
  357. package/src/entries/nodes.ts +245 -0
  358. package/src/entries/organizations.ts +9 -0
  359. package/src/entries/pipeline.ts +43 -0
  360. package/src/entries/scene3d.ts +27 -0
  361. package/src/entries/social.ts +297 -0
  362. package/src/entries/types.ts +26 -0
  363. package/src/entries/ugc.ts +14 -0
  364. package/src/entries/video.ts +59 -0
  365. package/src/entries/workflow.ts +172 -0
  366. package/src/fan-out-rows.ts +2 -0
  367. package/src/index.ts +25 -1838
  368. package/src/json-kinds.ts +13 -0
  369. package/src/model-catalog.ts +97 -36
  370. package/src/model-constants.ts +3 -0
  371. package/src/node-mappable-fields.ts +1 -0
  372. package/src/node-preset-export.ts +2 -2
  373. package/src/node-preset-extract.ts +6 -4
  374. package/src/node-run-routes.ts +78 -0
  375. package/src/node-runtime-keys.ts +50 -1
  376. package/src/normalize-node-params.ts +30 -0
  377. package/src/presentation-utils.ts +8 -0
  378. package/src/preview-gate.ts +92 -14
  379. package/src/producer-types.ts +26 -2
  380. package/src/run-continuation.ts +21 -0
  381. package/src/seedance-draft.ts +64 -0
  382. package/src/site-capture-node.ts +82 -0
  383. package/src/social-post.ts +13 -0
  384. package/src/ugc-lane-wires.ts +246 -0
  385. package/src/ugc-node-wires.ts +653 -0
  386. package/src/ugc-run-state.ts +65 -8
  387. package/src/video-analysis-pricing.ts +31 -29
  388. package/src/workflow-export.ts +3 -1
@@ -0,0 +1,773 @@
1
+ import { UGC_PRIMARY_HANDLE } from './chunk-LPW3XNC2.js';
2
+ import { dropStaleVideoLinkFields } from './chunk-TZBIY5C3.js';
3
+ import { SPEAKER_VIEW_CREDIT_IDS, speakerViewCreditId, applyEdlCreditId } from './chunk-IEBZHTPE.js';
4
+
5
+ // src/producer-types.ts
6
+ var VIDEO_PRODUCER_TYPES = /* @__PURE__ */ new Set([
7
+ "image-to-video",
8
+ "video-to-video",
9
+ "switchx",
10
+ // Beeble SwitchX relight/composite
11
+ "text-to-video",
12
+ // Unified video node — emits videoUrl identically to i2v/t2v (its payload-builder
13
+ // case dispatches dynamically to "image-to-video" or "text-to-video" jobName based
14
+ // on whether a start frame is wired). Without this, getPrimaryOutput would fall
15
+ // through to the imageUrl/videoUrl/audioUrl/text default and downstream consumers
16
+ // could silently misroute the output.
17
+ "generate-video",
18
+ // Generate Video Pro — Seedance-2-family multi-segment stitch variant of
19
+ // generate-video (same "emits videoUrl" contract; a trimmed provider +
20
+ // handle set). Must mirror generate-video here or its output can't connect
21
+ // downstream (the recurring "cannot connect the outputs" bug class).
22
+ "generate-video-pro",
23
+ // Edit Video Pro — Seedance-2-family span-replace sibling of generate-
24
+ // video-pro (same "emits videoUrl" contract; source video + prompt in,
25
+ // ONE video out). Must mirror generate-video-pro here or its output can't
26
+ // connect downstream (the recurring "cannot connect the outputs" bug class).
27
+ "edit-video-pro",
28
+ "upload-video",
29
+ "youtube-video",
30
+ "combine-videos",
31
+ "lip-sync",
32
+ "speech-to-video",
33
+ "motion-transfer",
34
+ "video-upscale",
35
+ "video-depth",
36
+ "extend-video",
37
+ // face-swap output is video (writes generatedVideoUrl, per-result `url`).
38
+ // Frontend execution-graph already includes it in VIDEO_SOURCE_TYPES; this
39
+ // entry brings the shared set in line so canvas typed-handle validation
40
+ // doesn't reject face-swap → video-consumer edges that the orchestrator
41
+ // would happily route at runtime.
42
+ "face-swap",
43
+ // Speaker View (C3.2): an EDL rendered with its speakers framed — one VIDEO
44
+ // out (no audio-only render). Registered in RENDER_NODE_TYPES as well.
45
+ "speaker-view",
46
+ "video-retake",
47
+ // video-sfx: adds an SFX track to a video → emits a video URL. Belongs here so
48
+ // canvas handle validation accepts video-sfx → video-consumer edges and the
49
+ // backend routes its output as video (it was previously relying on a fallback).
50
+ "video-sfx",
51
+ "suno-music-video",
52
+ "merge-video-audio",
53
+ "add-captions",
54
+ "resize-video",
55
+ "social-media-format",
56
+ "trim-video",
57
+ "render-video",
58
+ "speed-ramp",
59
+ "loop-video",
60
+ "fade-video",
61
+ // Video Mask emits its mask as a video; Mask Composite its composite.
62
+ "video-mask",
63
+ "mask-composite",
64
+ "transcode-video",
65
+ "manual-edit",
66
+ // Remove Audio: strips the audio track, emits a silent video.
67
+ "remove-audio",
68
+ // AI Avatar (HeyGen): avatar + voice/audio → video.
69
+ "ai-avatar",
70
+ // Cinematic Avatar (HeyGen cinematic_avatar): prompt + 1–3 avatar looks → video.
71
+ "cinematic-avatar",
72
+ // Assemble Narrated Video: fits N (clip, voice) blocks into one MP4 → video.
73
+ "assemble-narrated-video",
74
+ // Still to Video: one still image + one audio track → MP4 (local FFmpeg,
75
+ // no provider). Emits generatedVideoUrl like every other ffmpeg video node.
76
+ "still-to-video",
77
+ // Slideshow: 2-100 stills + one optional audio track → MP4 (local FFmpeg,
78
+ // no provider). Same contract; images arrive via the image-collage lane.
79
+ "slideshow",
80
+ // GIF to Video: animated GIF → H.264 MP4 (local FFmpeg, no provider).
81
+ // Emits generatedVideoUrl so it connects to any downstream video consumer
82
+ // (e.g. a Seedance video-reference input) by an ordinary edge.
83
+ "gif-to-video",
84
+ // 3D Render Pro: authors a scene AND exports it in one operation, settling
85
+ // with the standard `videoUrl` field. It is a video producer as much as it
86
+ // is a composition producer — omitting it here is the "cannot connect the
87
+ // outputs" bug, and its `composition` handle is typed separately.
88
+ "pro-3d-render",
89
+ // Video Overlay: timed image layers over a video in one local FFmpeg pass
90
+ // (the base audio copied) — emits a video URL on `video-out`.
91
+ "video-overlay",
92
+ // UGC Clip: renders one clip of a UGC video from its ticket — emits a video
93
+ // URL on `video-out` (one per fan-out iteration).
94
+ "ugc-clip",
95
+ // UGC Finish: the video's clips, finished, as one ordered list — a registered producer, so a
96
+ // Bundle edge into Combine Videos routes each one as a video, in order.
97
+ "ugc-finish-clips"
98
+ ]);
99
+ var DYNAMIC_PRODUCER_TYPES = /* @__PURE__ */ new Set([
100
+ "list",
101
+ "sub-workflow",
102
+ "adjust-volume",
103
+ // Pitch & Tempo: audio in → audio out, video in → video out (picture
104
+ // copied). Dual-mode like adjust-volume; stays in AUDIO_PRODUCER_TYPES as
105
+ // its default.
106
+ "pitch-tempo",
107
+ // Dual-mode: audio in → audio out; video in → video out (+ revoiced audio).
108
+ // Listed here so canvas validators accept its output on BOTH audio and video
109
+ // input handles (it also stays in AUDIO_PRODUCER_TYPES as its default).
110
+ "voice-changer",
111
+ // voice-changer-pro (renamed from voice-recast in #3581) is a behavioral
112
+ // twin of voice-changer — identical dual-mode output. Must mirror it in
113
+ // EVERY producer set or its outputs can't connect (was the "cannot connect
114
+ // the outputs of voice-changer-pro" bug). Guarded by producer-types.test.ts.
115
+ "voice-changer-pro",
116
+ // Dubbing joined the dual-mode family with the full-surface upgrade:
117
+ // audio in → dubbed audio; video in (or a video sourceUrl) → dubbed VIDEO
118
+ // (+ audio sidecar). Same wiring contract as voice-changer; stays in
119
+ // AUDIO_PRODUCER_TYPES as its default. Explicitly asserted in
120
+ // producer-types.test.ts (the suite does not fail on omission).
121
+ "dubbing",
122
+ "reduce",
123
+ // Dual-output time chunker (UI label "Split into Chunks"; type id stays
124
+ // "split-media"): video in → video chunks, audio in → audio chunks — two
125
+ // independent lanes on two output handles. Like voice-changer, the canvas
126
+ // validator only sees the source NODE type, not which handle a wire leaves,
127
+ // so it lives here to be accepted on BOTH audio and video input handles. The
128
+ // backend routes the correct lane by sourceHandle in getPrimaryOutput
129
+ // (output-extractor.ts); the frontend does so in extractNodeOutput.
130
+ "split-media",
131
+ // apply-edl renders an EDL into ONE media output whose type is decided at
132
+ // run time by the node's `output` setting (video OR audio) — so its static
133
+ // medium is genuinely unknown and it belongs here, letting canvas validators
134
+ // accept its default media handle on BOTH audio and video input handles. It
135
+ // ALSO emits a fixed `json` handle (the remapped Transcript); that half lives
136
+ // in JSON_PRODUCER_TYPES (frontend/src/lib/data-handles.ts). The FIRST node
137
+ // with both a dynamic media handle and a fixed json handle. Because
138
+ // getOutputType (presentation-utils.ts) deliberately returns "data" for
139
+ // DYNAMIC members, apply-edl is ALSO added to the literal VIDEO_OUTPUT_TYPES
140
+ // there so a published app renders the cut as video, mirroring the
141
+ // voice-changer/dubbing precedent. Asserted in producer-types.test.ts (the
142
+ // suite does not fail on omission).
143
+ "apply-edl",
144
+ // Tighten Episode (podcast use-case node): the episode is video OR audio by
145
+ // its `output` setting (an audio recording forces audio) — runtime-decided.
146
+ "tighten-episode"
147
+ ]);
148
+ var AUDIO_PRODUCER_TYPES = /* @__PURE__ */ new Set([
149
+ "text-to-speech",
150
+ "text-to-audio",
151
+ "generate-music",
152
+ "upload-audio",
153
+ "suno-generate",
154
+ "suno-cover",
155
+ "suno-extend",
156
+ "suno-separate",
157
+ "audio-separation",
158
+ "suno-mashup",
159
+ "suno-replace-section",
160
+ "suno-add-instrumental",
161
+ "suno-add-vocals",
162
+ "suno-convert-wav",
163
+ "suno-upload-extend",
164
+ "trim-audio",
165
+ "mix-audio",
166
+ "combine-audio",
167
+ "adjust-volume",
168
+ "audio-fx",
169
+ "pitch-tempo",
170
+ "reference-audio",
171
+ "audio-isolation",
172
+ "text-to-dialogue",
173
+ "voice-changer",
174
+ // Twin of voice-changer (see DYNAMIC_PRODUCER_TYPES note). Audio is its
175
+ // default output mode; video mode is handled via DYNAMIC membership.
176
+ "voice-changer-pro",
177
+ "dubbing",
178
+ "voice-remix",
179
+ "voice-design",
180
+ // Extract Audio: demuxes a video's audio track to a standalone MP3.
181
+ "extract-audio"
182
+ ]);
183
+ var IMAGE_PRODUCER_TYPES = /* @__PURE__ */ new Set([
184
+ "upload-image",
185
+ "generate-image",
186
+ "edit-image",
187
+ "image-to-image",
188
+ "modify-image",
189
+ "upscale-image",
190
+ "remove-background",
191
+ // extract-frame produces a single still image extracted from a video source.
192
+ "extract-frame",
193
+ // generate-mask emits the source image AND a mask PNG; its `image` source
194
+ // pip is the passthrough (the same image as the input).
195
+ "generate-mask",
196
+ // paint-mask emits the hand-painted mask PNG (a plain image at runtime).
197
+ // Membership is what makes mask targets accept it — mask is an advisory
198
+ // color, not a gated type.
199
+ "paint-mask",
200
+ // reference-sheet's `sheet` is one composited image and `panels` carries
201
+ // clean reference images; both resolve to image URLs at runtime.
202
+ "reference-sheet",
203
+ // reference-board's `image` pip emits a real generated board image.
204
+ "reference-board",
205
+ // image-collage composites N images → ONE image.
206
+ "image-collage",
207
+ // image-overlay places layers on a base → ONE image.
208
+ "image-overlay",
209
+ // 3D Render Pro's `stills` handle carries one PNG per shot of the exported
210
+ // composition (spread into referenceImageUrls like reference-sheet
211
+ // `panels`). A validator sees only the source NODE type, so this also makes
212
+ // its `video` pip droppable on an image input — the handle-blind trade
213
+ // reference-sheet and split-media already make; the input resolvers route
214
+ // by handle, so only `stills` becomes an image at runtime. Deliberately NOT
215
+ // in IMAGE_SOURCE_TYPES on either engine: that set types the node's PRIMARY
216
+ // asset, and 3D Render Pro's is the MP4.
217
+ "pro-3d-render"
218
+ ]);
219
+ var FAN_OUT_EACH_TYPES = /* @__PURE__ */ new Set([
220
+ "list",
221
+ "split-text",
222
+ "filter-list",
223
+ "deduplicate",
224
+ "merge-lists",
225
+ "sort-list",
226
+ "selector",
227
+ // edit-plan `clips` mode emits a bare `Edl[]` on `data.generatedJson`, so an
228
+ // edge leaving it defaults to "each" — one downstream execution (typically an
229
+ // apply-edl render) per clip. The `tighten`/`chapters` modes emit an OBJECT,
230
+ // for which the list extractors return undefined, so an "each" edge falls back
231
+ // to the scalar `edl` value (no fan-out) — the same graceful degradation
232
+ // web-scrape relies on. See `unwrapEditPlanOutput` in `edit-plan-contract.ts`.
233
+ "edit-plan",
234
+ // Content Ideas emits one creative brief per idea on `listResults`, so an
235
+ // edge leaving it defaults to "each" — the node after it (typically
236
+ // Generate Script) runs once per idea, on the server too.
237
+ "content-ideas"
238
+ ]);
239
+ var FAN_OUT_EACH_HANDLES = {
240
+ // Camera Switch run once per clip (Edit Plan in clips mode): each clip's
241
+ // switched EDL is its own Apply EDL render. Its transcript is the same for
242
+ // every clip (the master clock, renamed), so that handle stays one value
243
+ // (decided 2026-10-04).
244
+ "camera-switch": { each: ["edl"], primary: "edl" },
245
+ // UGC Clips: one ticket per clip on `clips` (each); `plan-out` and
246
+ // `transcript` carry one value. Not a FAN_OUT_EACH_TYPES member — every
247
+ // handle of such a member would fan out. Its one run writes the tickets as
248
+ // its list (`listResults`, the editor's `__listResults`). The pip an edge
249
+ // with no handle reads is the UGC wires' own (UGC_PRIMARY_HANDLE).
250
+ "ugc-clips": { each: ["clips"], primary: UGC_PRIMARY_HANDLE["ugc-clips"] }
251
+ };
252
+ var FAN_OUT_ALL_OR_NOTHING_TYPES = /* @__PURE__ */ new Set(["ugc-clip"]);
253
+ var OWN_LIST_NODE_TYPES = /* @__PURE__ */ new Set([
254
+ "extract-field",
255
+ "json-process",
256
+ // Site Capture: its stills, in page order — the last capture's, never every capture's (site-capture-node.ts).
257
+ "site-capture"
258
+ ]);
259
+ function ownsItsList(nodeType) {
260
+ return typeof nodeType === "string" && OWN_LIST_NODE_TYPES.has(nodeType);
261
+ }
262
+ function defaultEdgeOutputMode(sourceType, sourceHandle) {
263
+ if (typeof sourceType !== "string") return "last";
264
+ if (FAN_OUT_EACH_TYPES.has(sourceType)) return "each";
265
+ const entry = FAN_OUT_EACH_HANDLES[sourceType];
266
+ if (!entry) return "last";
267
+ return entry.each.includes(sourceHandle || entry.primary) ? "each" : "last";
268
+ }
269
+ function listResultsServeHandle(sourceType, sourceHandle) {
270
+ const entry = typeof sourceType === "string" ? FAN_OUT_EACH_HANDLES[sourceType] : void 0;
271
+ return !entry || entry.each.includes(sourceHandle || entry.primary);
272
+ }
273
+ var FAN_IN_TARGETS = {
274
+ // Choose Best — every wire is a candidate.
275
+ reduce: "*",
276
+ // Content Ideas — one or more recipes, from several Content Recipe nodes
277
+ // and/or one that ran once per post.
278
+ "content-ideas": ["recipes"],
279
+ // Telegram Reply — one message per run, whatever is wired into its text
280
+ // input: a list (or a writer that ran once per item) arrives as one
281
+ // message, never as a burst of sends to the owner's chat.
282
+ "telegram-account-send": ["in"],
283
+ // The list operators — they READ the whole list wired into them (their
284
+ // executors collect every upstream item themselves) and emit a list. Run
285
+ // once per item by an "each" wire (a Split Text, a List, a node that ran per
286
+ // item), every iteration saw the same whole list and answered with its
287
+ // first match: a Filter List fed 11 stories handed 11 copies of story one
288
+ // downstream, and every paid stage after it ran 11 times on it
289
+ // (2026-10-06). A list operator is never fanned out, on any wire.
290
+ "filter-list": "*",
291
+ deduplicate: "*",
292
+ "merge-lists": "*",
293
+ "sort-list": "*",
294
+ selector: "*",
295
+ // Speaker Frames on a clip pack (P3-24 (a), decided 2026-10-06): ONE run over
296
+ // the union of the clips' spans — the pack's EDLs fold onto its `edl` wire
297
+ // instead of running one detection job (and one minimum charge) per clip.
298
+ "speaker-frames": ["edl"],
299
+ // UGC Finish: ONE run over every clip of the video, in clip order — the finish plans its
300
+ // cut and its sound over all of them at once, so it is never run once per clip.
301
+ "ugc-finish-clips": ["clips"]
302
+ };
303
+ function isFanInNodeType(nodeType) {
304
+ return typeof nodeType === "string" && Object.prototype.hasOwnProperty.call(FAN_IN_TARGETS, nodeType);
305
+ }
306
+ function isFanInEdge(targetType, targetHandle) {
307
+ if (!isFanInNodeType(targetType)) return false;
308
+ const spec = FAN_IN_TARGETS[targetType];
309
+ if (spec === "*") return true;
310
+ return targetHandle == null || targetHandle === "" || spec.includes(targetHandle);
311
+ }
312
+
313
+ // src/exposed-field-keys.ts
314
+ var LEGACY_EXPOSED_FIELD_KEYS = {
315
+ // Published as the Text to Speech slider's key. The node's data field, and every runner, route and config
316
+ // panel, has always been `similarityBoost` — so the slider moved nothing.
317
+ "text-to-speech": { similarity: "similarityBoost" }
318
+ };
319
+ function canonicalExposedFieldKey(nodeType, key) {
320
+ if (typeof nodeType !== "string" || !Object.hasOwn(LEGACY_EXPOSED_FIELD_KEYS, nodeType)) return key;
321
+ const renames = LEGACY_EXPOSED_FIELD_KEYS[nodeType];
322
+ return Object.hasOwn(renames, key) ? renames[key] : key;
323
+ }
324
+ function canonicalizeOverrideKeys(nodeType, overrides) {
325
+ let out;
326
+ for (const key of Object.keys(overrides)) {
327
+ const current = canonicalExposedFieldKey(nodeType, key);
328
+ if (current === key) continue;
329
+ out ??= { ...overrides };
330
+ delete out[key];
331
+ if (!Object.hasOwn(overrides, current)) out[current] = overrides[key];
332
+ }
333
+ return out ?? overrides;
334
+ }
335
+
336
+ // src/render-nodes.ts
337
+ var RENDER_JSON_HANDLE = "json";
338
+ var outputSettingMedium = (data) => data.output === "audio" ? "audio" : "video";
339
+ var descriptor = (d) => Object.freeze({ ...d, creditIds: Object.freeze([...d.creditIds]), transcriptOutput: Object.freeze({ ...d.transcriptOutput }) });
340
+ var RENDER_NODE_TYPES = Object.freeze({
341
+ "apply-edl": descriptor({
342
+ mediumOf: outputSettingMedium,
343
+ creditId: (quality) => applyEdlCreditId(quality),
344
+ creditIds: ["apply-edl", "apply-edl:proxy"],
345
+ clockMapFrom: "input",
346
+ ownerOnlyListing: true,
347
+ latestBatch: true,
348
+ jsonKind: "transcript",
349
+ transcriptOutput: { handle: RENDER_JSON_HANDLE, dataField: "generatedJson" }
350
+ }),
351
+ // Speaker View (C3.2): video only; its `json` is the EDL as it drew it (the
352
+ // turns split, the layouts written), so a player maps the output clock
353
+ // through THAT, and Add Captions never takes it for a Transcript. The wired
354
+ // transcript, remapped through that same drawn edit, comes out on its own
355
+ // `transcript` pip (decided 2026-10-08) — what a caption step reads.
356
+ "speaker-view": descriptor({
357
+ mediumOf: () => "video",
358
+ creditId: (quality, _output, priceTier) => speakerViewCreditId(quality, priceTier),
359
+ creditIds: SPEAKER_VIEW_CREDIT_IDS,
360
+ clockMapFrom: "output-json",
361
+ ownerOnlyListing: true,
362
+ latestBatch: true,
363
+ jsonKind: "edl",
364
+ transcriptOutput: { handle: "transcript", dataField: "generatedTranscript" }
365
+ })
366
+ });
367
+ var RENDER_NODE_TYPE_IDS = Object.freeze(Object.keys(RENDER_NODE_TYPES));
368
+ function renderNodeOf(type) {
369
+ return typeof type === "string" && Object.hasOwn(RENDER_NODE_TYPES, type) ? RENDER_NODE_TYPES[type] : void 0;
370
+ }
371
+ function isRenderNodeType(type) {
372
+ return renderNodeOf(type) !== void 0;
373
+ }
374
+ function rendersLatestBatch(type) {
375
+ return renderNodeOf(type)?.latestBatch === true;
376
+ }
377
+ function rendersTranscriptJson(type) {
378
+ return renderNodeOf(type)?.jsonKind === "transcript";
379
+ }
380
+ function renderTranscriptOutputOf(type) {
381
+ return renderNodeOf(type)?.transcriptOutput;
382
+ }
383
+ function isRenderDataHandle(type, handle) {
384
+ const d = renderNodeOf(type);
385
+ if (!d || typeof handle !== "string") return false;
386
+ return handle === RENDER_JSON_HANDLE || handle === d.transcriptOutput.handle;
387
+ }
388
+ function renderSavedJsonOutputs(type) {
389
+ const d = renderNodeOf(type);
390
+ if (!d) return [];
391
+ const json = { outputKey: RENDER_JSON_HANDLE, dataField: "generatedJson" };
392
+ const t = d.transcriptOutput;
393
+ return t.handle === RENDER_JSON_HANDLE ? [json] : [json, { outputKey: t.handle, dataField: t.dataField }];
394
+ }
395
+ var OWNER_ONLY_LISTING_RENDER_TYPES = Object.freeze(
396
+ RENDER_NODE_TYPE_IDS.filter((t) => RENDER_NODE_TYPES[t].ownerOnlyListing)
397
+ );
398
+
399
+ // src/presentation-utils.ts
400
+ var INPUT_NODE_TYPES = /* @__PURE__ */ new Set([
401
+ "text-prompt",
402
+ "upload-image",
403
+ "upload-video",
404
+ "upload-audio",
405
+ "tone",
406
+ "style-guide",
407
+ "provider",
408
+ "scene-count",
409
+ "duration",
410
+ "aspect-ratio",
411
+ "motion",
412
+ "camera-motion",
413
+ "framing",
414
+ "lens",
415
+ "camera-format",
416
+ "lighting",
417
+ "color-look",
418
+ "atmosphere",
419
+ "action-fx",
420
+ "temporal",
421
+ "reference-audio",
422
+ "youtube-video"
423
+ ]);
424
+ var ALWAYS_EXCLUDED_TYPES = /* @__PURE__ */ new Set([
425
+ "sticky-note",
426
+ "webhook-trigger",
427
+ "schedule-trigger",
428
+ "sub-workflow-input",
429
+ "sub-workflow-output"
430
+ ]);
431
+ var NON_OUTPUT_TYPES = /* @__PURE__ */ new Set([
432
+ "text-prompt",
433
+ "list",
434
+ "upload-image",
435
+ "upload-video",
436
+ "upload-audio",
437
+ "reference-audio",
438
+ "rss-feed",
439
+ "youtube-video",
440
+ "tone",
441
+ "style-guide",
442
+ "provider",
443
+ "scene-count",
444
+ "duration",
445
+ "aspect-ratio",
446
+ "motion",
447
+ "camera-motion",
448
+ "framing",
449
+ "lens",
450
+ "camera-format",
451
+ "lighting",
452
+ "color-look",
453
+ "atmosphere",
454
+ "action-fx",
455
+ "temporal",
456
+ "sticky-note",
457
+ "sub-workflow-input",
458
+ "sub-workflow-output",
459
+ "webhook-trigger",
460
+ "schedule-trigger",
461
+ "combine-text",
462
+ "split-text",
463
+ "save-to-storage",
464
+ "webhook-output",
465
+ "component"
466
+ ]);
467
+ var MEDIA_PRODUCING_TYPES = /* @__PURE__ */ new Set([
468
+ "generate-image",
469
+ "edit-image",
470
+ "image-to-image",
471
+ "image-to-video",
472
+ "text-to-video",
473
+ "video-to-video",
474
+ "text-to-speech",
475
+ "generate-music",
476
+ "text-to-audio",
477
+ "generate-script",
478
+ "ai-writer",
479
+ "llm-chat",
480
+ "render-video",
481
+ "video-composer",
482
+ "after-effects",
483
+ "lottie-overlay",
484
+ "3d-title",
485
+ "motion-graphics",
486
+ "composite",
487
+ "text-to-dialogue",
488
+ "voice-changer",
489
+ "dubbing",
490
+ "voice-remix",
491
+ "voice-design",
492
+ "extend-video",
493
+ "lip-sync",
494
+ "motion-transfer",
495
+ "video-upscale",
496
+ "video-depth"
497
+ ]);
498
+ var IMAGE_OUTPUT_TYPES = /* @__PURE__ */ new Set([
499
+ "generate-image",
500
+ "edit-image",
501
+ "image-to-image",
502
+ "upload-image"
503
+ ]);
504
+ var VIDEO_OUTPUT_TYPES = /* @__PURE__ */ new Set([
505
+ "image-to-video",
506
+ "text-to-video",
507
+ "video-to-video",
508
+ "extend-video",
509
+ "render-video",
510
+ "video-composer",
511
+ "after-effects",
512
+ "lottie-overlay",
513
+ "3d-title",
514
+ "motion-graphics",
515
+ "composite",
516
+ "combine-videos",
517
+ "merge-video-audio",
518
+ "resize-video",
519
+ "trim-video",
520
+ "speed-ramp",
521
+ "loop-video",
522
+ "fade-video",
523
+ "transcode-video",
524
+ "upload-video",
525
+ "lip-sync",
526
+ "motion-transfer",
527
+ "video-upscale",
528
+ "video-depth",
529
+ "add-captions",
530
+ "social-media-format",
531
+ // A render (Apply EDL) renders an EDL into video OR audio. Its medium is
532
+ // decided at run time (DYNAMIC_PRODUCER_TYPES), so getOutputType would answer
533
+ // "data" and a published app would render the cut as a JSON blob. Declaring
534
+ // every render here — as the voice-changer/dubbing precedent does for their
535
+ // default medium — makes the classifier answer "video" (the common case; an
536
+ // audio-only cut still plays in a video element). Asserted in
537
+ // producer-types.test.ts.
538
+ ...RENDER_NODE_TYPE_IDS,
539
+ // Tighten Episode: a published app shows the episode as media, never as data
540
+ // (it is not a render, so RENDER_NODE_TYPE_IDS does not bring it).
541
+ "tighten-episode"
542
+ ]);
543
+ var AUDIO_OUTPUT_TYPES = /* @__PURE__ */ new Set([
544
+ "text-to-speech",
545
+ "generate-music",
546
+ "text-to-audio",
547
+ "text-to-dialogue",
548
+ "voice-changer",
549
+ "dubbing",
550
+ "voice-remix",
551
+ "voice-design",
552
+ "mix-audio",
553
+ "adjust-volume",
554
+ "audio-fx",
555
+ "pitch-tempo",
556
+ "trim-audio",
557
+ "audio-isolation",
558
+ "audio-separation",
559
+ "upload-audio"
560
+ ]);
561
+ var TEXT_OUTPUT_TYPES = /* @__PURE__ */ new Set([
562
+ "generate-script",
563
+ "ai-writer",
564
+ "llm-chat",
565
+ "transcribe",
566
+ "image-to-text",
567
+ "qa-check",
568
+ "text-prompt",
569
+ // UGC Cards' output card is its Notes: a run hands it on as the node's text
570
+ // (`output.text`, `generatedText` on the canvas).
571
+ "ugc-cards"
572
+ ]);
573
+ function getInputNodes(nodes, curatedOnly = true) {
574
+ return nodes.filter((n) => {
575
+ if (!n.type || ALWAYS_EXCLUDED_TYPES.has(n.type)) return false;
576
+ if (n.hidden) return false;
577
+ if (curatedOnly) {
578
+ if (n.data.presentationInput === true) return true;
579
+ if (n.data.presentationVisible === true && INPUT_NODE_TYPES.has(n.type)) return true;
580
+ return false;
581
+ }
582
+ return true;
583
+ });
584
+ }
585
+ function getOutputNodes(nodes, edges, curatedOnly = true) {
586
+ const nodesWithOutgoing = new Set(edges.map((e) => e.source));
587
+ return nodes.filter((n) => {
588
+ if (!n.type || ALWAYS_EXCLUDED_TYPES.has(n.type)) return false;
589
+ if (n.hidden) return false;
590
+ if (curatedOnly) {
591
+ if (n.data.presentationOutput === true) return true;
592
+ if (n.data.presentationVisible === true) {
593
+ if (NON_OUTPUT_TYPES.has(n.type)) return false;
594
+ return !nodesWithOutgoing.has(n.id) || isMediaProducingType(n.type);
595
+ }
596
+ return false;
597
+ }
598
+ return true;
599
+ });
600
+ }
601
+ function getOutputType(nodeType) {
602
+ if (!nodeType) return "data";
603
+ if (IMAGE_OUTPUT_TYPES.has(nodeType)) return "image";
604
+ if (VIDEO_OUTPUT_TYPES.has(nodeType)) return "video";
605
+ if (AUDIO_OUTPUT_TYPES.has(nodeType)) return "audio";
606
+ if (TEXT_OUTPUT_TYPES.has(nodeType)) return "text";
607
+ if (VIDEO_PRODUCER_TYPES.has(nodeType)) return "video";
608
+ if (AUDIO_PRODUCER_TYPES.has(nodeType)) return "audio";
609
+ return "data";
610
+ }
611
+ function isMediaProducingType(nodeType) {
612
+ if (MEDIA_PRODUCING_TYPES.has(nodeType)) return true;
613
+ const output = getOutputType(nodeType);
614
+ return output === "image" || output === "video" || output === "audio";
615
+ }
616
+ function getNodeResult(nodeData) {
617
+ const previewItems = nodeData.previewItems;
618
+ if (previewItems && previewItems.length > 0) {
619
+ const first = previewItems.find((item) => item.visible !== false) ?? previewItems[0];
620
+ if (first) {
621
+ if (first.type === "image" || first.type === "video" || first.type === "audio") {
622
+ return { url: first.value };
623
+ }
624
+ return { text: first.value };
625
+ }
626
+ }
627
+ const results = nodeData.generatedResults;
628
+ if (results && results.length > 0) {
629
+ const idx = nodeData.activeResultIndex ?? 0;
630
+ const active = results[idx] ?? results[0];
631
+ const url2 = active?.url ?? active?.imageUrl ?? active?.videoUrl ?? active?.audioUrl;
632
+ const text2 = active?.text ?? active?.script;
633
+ return { url: url2, text: text2 };
634
+ }
635
+ const url = nodeData.generatedImageUrl ?? nodeData.generatedVideoUrl ?? nodeData.generatedAudioUrl;
636
+ const text = nodeData.generatedScript ?? nodeData.generatedText;
637
+ return { url, text };
638
+ }
639
+ function getNodeLabel(node) {
640
+ return node.data.label || node.type?.replace(/-/g, " ").replace(/\b\w/g, (c) => c.toUpperCase()) || "Node";
641
+ }
642
+ var INPUT_FIELD_MAP = {
643
+ // --- Source / upload nodes (not parameter pickers) ---
644
+ "text-prompt": { key: "text", type: "text" },
645
+ "upload-image": { key: "url", type: "image-url" },
646
+ "upload-video": { key: "url", type: "video-url" },
647
+ "upload-audio": { key: "url", type: "audio-url" },
648
+ "reference-audio": { key: "extractedAudioUrl", type: "audio-url" },
649
+ // A LINK, not an upload (rule: `videoLinkInputProblem`, video-link.ts); still a `video-url` media input.
650
+ "youtube-video": { key: "youtubeUrl", type: "video-url" },
651
+ // --- Classic parameters ---
652
+ "provider": { key: "provider", type: "select" },
653
+ "style-guide": { key: "text", type: "text" },
654
+ // reads data.text (was wrongly "styleGuide")
655
+ "scene-count": { key: "count", type: "number" },
656
+ "duration": { key: "seconds", type: "number" },
657
+ // reads data.seconds (was wrongly "duration")
658
+ "aspect-ratio": { key: "ratio", type: "select" },
659
+ // reads data.ratio (was wrongly "aspectRatio")
660
+ // --- Single-field parameter pickers ---
661
+ "tone": { key: "tone", type: "select" },
662
+ "motion": { key: "motion", type: "select" },
663
+ "camera-motion": { key: "cameraMotion", type: "select" },
664
+ "lens": { key: "lens", type: "select" },
665
+ "camera-format": { key: "cameraFormat", type: "select" },
666
+ "color-look": { key: "colorLook", type: "select" },
667
+ "atmosphere": { key: "atmosphere", type: "select" },
668
+ "style": { key: "style", type: "select" },
669
+ "setting": { key: "setting", type: "select" },
670
+ "mood": { key: "mood", type: "select" },
671
+ "photographer": { key: "photographer", type: "select" },
672
+ "aesthetic": { key: "aesthetic", type: "select" },
673
+ "era": { key: "era", type: "select" },
674
+ "material": { key: "material", type: "select" },
675
+ "animal": { key: "animal", type: "select" },
676
+ "vehicle": { key: "vehicle", type: "select" },
677
+ "weapon": { key: "weapon", type: "select" },
678
+ "furniture": { key: "furniture", type: "select" },
679
+ "photo-genre": { key: "photoGenre", type: "select" },
680
+ "backdrop": { key: "backdrop", type: "select" },
681
+ "held-prop": { key: "heldProp", type: "select" },
682
+ "render-quality": { key: "renderQuality", type: "select" },
683
+ "composition-effects": { key: "compositionEffect", type: "select" },
684
+ "post-process-effects": { key: "postProcess", type: "select" },
685
+ "action-fx": { key: "actionFx", type: "select" },
686
+ "character-fx": { key: "characterFx", type: "select" },
687
+ "character-motion": { key: "characterMotion", type: "select" },
688
+ "transition": { key: "transition", type: "select" },
689
+ "loop-subject": { key: "loopSubject", type: "select" },
690
+ // --- Multi-dimension pickers: representative (first) field. Overriding only
691
+ // sets that dimension; full hint composition runs in the executors. ---
692
+ "framing": { key: "shotSize", type: "select" },
693
+ "lighting": { key: "timeOfDay", type: "select" },
694
+ "temporal": { key: "temporalSpeed", type: "select" },
695
+ "person": { key: "type", type: "select" },
696
+ "pose": { key: "pose", type: "select" },
697
+ "styling": { key: "makeup", type: "select" },
698
+ "exposure-settings": { key: "aperture", type: "select" },
699
+ "music-genre": { key: "subgenre", type: "select" },
700
+ "music-mood": { key: "emotion", type: "select" },
701
+ "instrumentation": { key: "production", type: "select" },
702
+ "voice-character": { key: "timbre", type: "select" },
703
+ "voice-delivery": { key: "archetype", type: "select" },
704
+ // --- UGC (Cloud) ---
705
+ "ugc-creator": { key: "source", type: "select" }
706
+ };
707
+ var INPUT_FIELD_EXTRA_KEYS = {
708
+ "ugc-creator": [{ key: "gender", type: "select" }, { key: "photoUrl", type: "image-url" }],
709
+ // The script's language: changes together with UGC_OVERRIDABLE_FIELDS["ugc-script"] and UgcScriptData.language.
710
+ "ugc-script": [{ key: "language", type: "select" }]
711
+ };
712
+ function getInputFieldExtraKeys(nodeType) {
713
+ return Object.hasOwn(INPUT_FIELD_EXTRA_KEYS, nodeType) ? INPUT_FIELD_EXTRA_KEYS[nodeType] : [];
714
+ }
715
+ function getInputFieldSchema(nodeType) {
716
+ return INPUT_FIELD_MAP[nodeType];
717
+ }
718
+ var MEDIA_INPUT_FIELD_TYPES = /* @__PURE__ */ new Set([
719
+ "image-url",
720
+ "video-url",
721
+ "audio-url"
722
+ ]);
723
+ function mergeNodeInputOverrides(nodeType, data, overrides) {
724
+ const incoming = canonicalizeOverrideKeys(nodeType, overrides);
725
+ const base = nodeType === "youtube-video" ? dropStaleVideoLinkFields(data, incoming) : data;
726
+ const merged = { ...base, ...incoming };
727
+ const schema = nodeType ? INPUT_FIELD_MAP[nodeType] : void 0;
728
+ if (schema && MEDIA_INPUT_FIELD_TYPES.has(schema.type) && schema.key in overrides && overrides[schema.key] !== data[schema.key] && !("metadata" in overrides)) {
729
+ delete merged.metadata;
730
+ }
731
+ return merged;
732
+ }
733
+ function migrateToItems(order) {
734
+ if (!order) return void 0;
735
+ return order.map((nodeId) => ({ type: "node", nodeId }));
736
+ }
737
+ function validateNoNestedGroups(items) {
738
+ return items.map((item) => {
739
+ if (item.type === "group") {
740
+ return { ...item, items: item.items.filter((child) => child.type !== "group") };
741
+ }
742
+ return item;
743
+ });
744
+ }
745
+ function flattenItems(items) {
746
+ const result = [];
747
+ for (const item of items) {
748
+ if (item.type === "group") {
749
+ result.push(...flattenItems(item.items));
750
+ } else {
751
+ result.push(item);
752
+ }
753
+ }
754
+ return result;
755
+ }
756
+ function getItemSortId(item) {
757
+ return item.type === "node" ? item.nodeId : item.id;
758
+ }
759
+ function cleanOrphanedItems(items, nodeIds) {
760
+ return items.filter((item) => {
761
+ if (item.type === "node" || item.type === "field" || item.type === "output") return nodeIds.has(item.nodeId);
762
+ return true;
763
+ }).map((item) => {
764
+ if (item.type === "group") {
765
+ return { ...item, items: cleanOrphanedItems(item.items, nodeIds) };
766
+ }
767
+ return item;
768
+ });
769
+ }
770
+
771
+ export { AUDIO_PRODUCER_TYPES, DYNAMIC_PRODUCER_TYPES, FAN_IN_TARGETS, FAN_OUT_ALL_OR_NOTHING_TYPES, FAN_OUT_EACH_HANDLES, FAN_OUT_EACH_TYPES, IMAGE_PRODUCER_TYPES, INPUT_FIELD_EXTRA_KEYS, INPUT_FIELD_MAP, INPUT_NODE_TYPES, LEGACY_EXPOSED_FIELD_KEYS, OWNER_ONLY_LISTING_RENDER_TYPES, OWN_LIST_NODE_TYPES, RENDER_JSON_HANDLE, RENDER_NODE_TYPES, RENDER_NODE_TYPE_IDS, VIDEO_PRODUCER_TYPES, canonicalExposedFieldKey, canonicalizeOverrideKeys, cleanOrphanedItems, defaultEdgeOutputMode, flattenItems, getInputFieldExtraKeys, getInputFieldSchema, getInputNodes, getItemSortId, getNodeLabel, getNodeResult, getOutputNodes, getOutputType, isFanInEdge, isFanInNodeType, isRenderDataHandle, isRenderNodeType, listResultsServeHandle, mergeNodeInputOverrides, migrateToItems, ownsItsList, renderNodeOf, renderSavedJsonOutputs, renderTranscriptOutputOf, rendersLatestBatch, rendersTranscriptJson, validateNoNestedGroups };
772
+ //# sourceMappingURL=chunk-AROWPFO2.js.map
773
+ //# sourceMappingURL=chunk-AROWPFO2.js.map