hyperframes 0.8.222 → 0.8.223

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 (237) hide show
  1. package/dist/{add-6MPLIWVP.js → add-PBLOPJHC.js} +12 -12
  2. package/dist/{agentPromptGenerator-X7SQPCXZ.js → agentPromptGenerator-OD74HKYZ.js} +7 -7
  3. package/dist/{animatedGifPrep-ESOJ4FQ7.js → animatedGifPrep-QCG2BTDC.js} +7 -7
  4. package/dist/api.d.ts +5 -3
  5. package/dist/api.js +32 -21
  6. package/dist/{asset-Y735VQV6.js → asset-KHXCO4OR.js} +2 -2
  7. package/dist/{assetCataloger-AOJAUEZW.js → assetCataloger-ZX5WZTDQ.js} +8 -8
  8. package/dist/{audio-VMMCGPOV.js → audio-7AH2C6PB.js} +145 -1153
  9. package/dist/{auth-BD5NHYRA.js → auth-DJWMGXQB.js} +5 -5
  10. package/dist/{autoUpdate-VTMNHOAJ.js → autoUpdate-KJMLYSHE.js} +2 -2
  11. package/dist/{backgroundChecks-SUDYQZSW.js → backgroundChecks-XLVQMMXY.js} +3 -3
  12. package/dist/backgroundChecksWorker.js +3 -3
  13. package/dist/{batchRender-4NR7RMT7.js → batchRender-UR67LI4H.js} +8 -8
  14. package/dist/{beats-PKEHQHBY.js → beats-ISWSYNN6.js} +10 -10
  15. package/dist/{benchmark-K55DDFHG.js → benchmark-7JUATINH.js} +8 -8
  16. package/dist/billing-VGKY3FMX.js +86 -0
  17. package/dist/{browser-G2WFWJJ3.js → browser-HNGQB47C.js} +3 -3
  18. package/dist/{bundleWithLocalizedFonts-MNG2UVH3.js → bundleWithLocalizedFonts-4XWX2XPS.js} +2 -2
  19. package/dist/{capture-U3EEAPI6.js → capture-GFDP5THL.js} +3 -3
  20. package/dist/{capture-24PIC3TZ.js → capture-LBEGVQTJ.js} +25 -25
  21. package/dist/{captureCompositionFrame-KL4V6ORD.js → captureCompositionFrame-5L3J4MZ4.js} +12 -12
  22. package/dist/{catalog-J3BU4TFW.js → catalog-SNUTPI57.js} +12 -12
  23. package/dist/{catch-up-LDGNMEGL.js → catch-up-FE3HDMLJ.js} +4 -4
  24. package/dist/{check-J6HG6EKE.js → check-MQCBMOKA.js} +40 -39
  25. package/dist/{checkAudio-MAX7JUYG.js → checkAudio-6VPMLIY6.js} +15 -15
  26. package/dist/{checkBrowser-3W74WJ26.js → checkBrowser-SHUVFQ4S.js} +34 -33
  27. package/dist/{chunk-P5M3AXEP.js → chunk-2GMHYOV3.js} +1 -1
  28. package/dist/{chunk-7D2LTSNV.js → chunk-2HBB5U52.js} +1 -1
  29. package/dist/{chunk-G675S644.js → chunk-3FGEDDSA.js} +26 -26
  30. package/dist/{chunk-D6LGD472.js → chunk-44IPXXSK.js} +6 -4
  31. package/dist/{chunk-FT3CNACL.js → chunk-44YG42L5.js} +144 -41
  32. package/dist/{chunk-NUE44RN2.js → chunk-45UOXUUH.js} +16 -3
  33. package/dist/chunk-4JRFMRCQ.js +288 -0
  34. package/dist/{chunk-AIXH3V5A.js → chunk-4XQQQ4KN.js} +3 -3
  35. package/dist/{chunk-6MUI2H6P.js → chunk-54Q3H2UQ.js} +5 -2
  36. package/dist/{chunk-YEKJOA47.js → chunk-664JAO7C.js} +1 -1
  37. package/dist/{chunk-QOZPWIYV.js → chunk-6LE7K3YM.js} +16 -13
  38. package/dist/{chunk-DC26QLB7.js → chunk-7LKEHM2R.js} +1 -1
  39. package/dist/{chunk-CZOC7WY7.js → chunk-7XWCCFYW.js} +1 -1
  40. package/dist/{chunk-G2EY3MVW.js → chunk-A2KNKY4Z.js} +1 -1
  41. package/dist/{chunk-OAXWHPNS.js → chunk-A5WWEW6U.js} +1 -1
  42. package/dist/{chunk-Y7IV5MAK.js → chunk-AKTI2SHL.js} +2 -2
  43. package/dist/chunk-AW7UW2Z7.js +312 -0
  44. package/dist/{chunk-F6QV5N3A.js → chunk-B5HFCGI7.js} +2 -2
  45. package/dist/{chunk-K5UCRKUK.js → chunk-B6F33PUK.js} +2 -2
  46. package/dist/{chunk-HQDHMAUI.js → chunk-BDEBKAD2.js} +1 -1
  47. package/dist/{chunk-DNTPNSH5.js → chunk-BN75GXZM.js} +3 -3
  48. package/dist/{chunk-BPIY5LB3.js → chunk-C466I3DT.js} +3 -3
  49. package/dist/{chunk-KEY2VA65.js → chunk-CXEU6XNL.js} +6 -20
  50. package/dist/{chunk-JQWITWVC.js → chunk-CYE2NNFF.js} +2 -2
  51. package/dist/{chunk-RRPO44PE.js → chunk-DFK4RMNE.js} +5 -5
  52. package/dist/chunk-DY7PQLIE.js +248 -0
  53. package/dist/chunk-EF735J3K.js +59 -0
  54. package/dist/{chunk-EGJ4UECR.js → chunk-EHZESMRB.js} +8 -2
  55. package/dist/chunk-EJOFIHX4.js +46 -0
  56. package/dist/{chunk-SKCS4SUZ.js → chunk-EX75C5HT.js} +13 -9
  57. package/dist/{chunk-3RXZZIDQ.js → chunk-FKBWONRY.js} +2 -2
  58. package/dist/{chunk-CVY6OIKN.js → chunk-FORV75JT.js} +26 -14
  59. package/dist/{chunk-WWT6ETQA.js → chunk-G5KX4X6W.js} +26 -26
  60. package/dist/{chunk-VQMHDS2V.js → chunk-HT3D5AKG.js} +52 -12
  61. package/dist/{chunk-35JKCWYI.js → chunk-I6OY5MS6.js} +1 -1
  62. package/dist/{chunk-VJVVWYP6.js → chunk-IJI2JNN7.js} +1 -1
  63. package/dist/{chunk-IGBOFU2Y.js → chunk-IQ7FABPU.js} +2 -2
  64. package/dist/{chunk-ZPTNLDOB.js → chunk-JNQCM6CR.js} +2 -2
  65. package/dist/{chunk-IB7UYGXR.js → chunk-JO4LHFFP.js} +9 -9
  66. package/dist/chunk-JTZHDD63.js +70 -0
  67. package/dist/{chunk-L55LAERP.js → chunk-K5GMPWMG.js} +1 -1
  68. package/dist/{chunk-ZBNK6X5O.js → chunk-KCDWRMTC.js} +2 -2
  69. package/dist/{chunk-GOWU3NCE.js → chunk-KJGYQVFD.js} +1 -1
  70. package/dist/{chunk-7IH3RSSG.js → chunk-KT2WLSX5.js} +10 -10
  71. package/dist/{chunk-AOHG22HQ.js → chunk-KWYK65GR.js} +5 -5
  72. package/dist/{chunk-AN4USOFT.js → chunk-LAIGIOEA.js} +1 -1
  73. package/dist/{chunk-E5IIR67Q.js → chunk-LV5AVW6U.js} +1 -1
  74. package/dist/{chunk-GHEYGMKD.js → chunk-M4UVOUWC.js} +1 -1
  75. package/dist/{chunk-DIXTEVWQ.js → chunk-M7HNGAWN.js} +3 -3
  76. package/dist/{chunk-EOUKB53E.js → chunk-MTVL7FWZ.js} +1 -1
  77. package/dist/{chunk-6CFBFWLF.js → chunk-MUHOFRGW.js} +1 -1
  78. package/dist/{chunk-OROHGC7W.js → chunk-N6XKBBT5.js} +7 -7
  79. package/dist/{chunk-4VEXJTUT.js → chunk-NLWG5TU7.js} +2 -2
  80. package/dist/chunk-NZZQCWUC.js +205 -0
  81. package/dist/{chunk-42Q3VX34.js → chunk-OL2C3ODS.js} +5 -5
  82. package/dist/{chunk-ZLXWRYOO.js → chunk-OVINGNLQ.js} +3 -3
  83. package/dist/{chunk-BDZSH6P3.js → chunk-OWFSGDQS.js} +1 -1
  84. package/dist/chunk-OZM6VLD7.js +71 -0
  85. package/dist/{chunk-6W3DY5BP.js → chunk-P5QGZMGC.js} +2 -2
  86. package/dist/{chunk-52VXA3SC.js → chunk-PBPHKD56.js} +1 -1
  87. package/dist/chunk-PHEPL7OX.js +1048 -0
  88. package/dist/{chunk-537WSYHU.js → chunk-PX7Y4HMM.js} +1 -1
  89. package/dist/{chunk-XHD7RKEZ.js → chunk-QNLHDYYO.js} +2 -2
  90. package/dist/{chunk-ZAJQFY5Q.js → chunk-QU5OYMTB.js} +15 -2
  91. package/dist/chunk-QZGKKQ77.js +570 -0
  92. package/dist/{chunk-WJYFJGYT.js → chunk-RKVKFXYB.js} +3 -3
  93. package/dist/{chunk-OQLYKDL5.js → chunk-RORIFIUW.js} +1 -1
  94. package/dist/{chunk-MESSJFK3.js → chunk-RWSVSCOP.js} +38 -28
  95. package/dist/chunk-RZ6CXJ56.js +24 -0
  96. package/dist/chunk-SDBVVDBW.js +113 -0
  97. package/dist/{chunk-Z5VQBRU2.js → chunk-SNFVQDKE.js} +1 -1
  98. package/dist/{chunk-EE7YWKDY.js → chunk-SX7ESVCQ.js} +4 -4
  99. package/dist/{chunk-AXVTL7B6.js → chunk-UFYWGUUV.js} +2 -2
  100. package/dist/{chunk-DSHFKKSZ.js → chunk-UGUWSAJT.js} +2 -2
  101. package/dist/chunk-UQECNXFA.js +5013 -0
  102. package/dist/{chunk-QYRMR45H.js → chunk-UQVAAEPQ.js} +1 -1
  103. package/dist/{chunk-NHXGFQWQ.js → chunk-UVF4U3ZF.js} +1 -1
  104. package/dist/{chunk-YSTBSLWY.js → chunk-VBCBHDIW.js} +1 -1
  105. package/dist/chunk-VJM6NX54.js +250 -0
  106. package/dist/chunk-WGOIJN57.js +95 -0
  107. package/dist/{chunk-GODT7QDZ.js → chunk-WQLTKHPP.js} +3 -3
  108. package/dist/{chunk-RIGSGNDQ.js → chunk-WUXDIF5D.js} +20 -19
  109. package/dist/{chunk-5GSEM63G.js → chunk-WWOHLNFO.js} +1 -1
  110. package/dist/{chunk-L37AZWB2.js → chunk-XZEHFUQF.js} +2 -2
  111. package/dist/{chunk-FMKI7ZLM.js → chunk-Y4INSXS7.js} +2 -2
  112. package/dist/{chunk-YHL4CVTF.js → chunk-ZEKV5T3I.js} +13 -13
  113. package/dist/{clean-K6IM3LC4.js → clean-JZOPMJMV.js} +21 -21
  114. package/dist/cli.js +58 -55
  115. package/dist/{cloud-OV7EA4BJ.js → cloud-VMPF2KMA.js} +4 -4
  116. package/dist/{cloudrun-ZEMODIOP.js → cloudrun-LA2FKS2F.js} +5 -5
  117. package/dist/{compare-MJZ3D3HA.js → compare-IQCFSC5Z.js} +30 -30
  118. package/dist/{compiler-6KKETX77.js → compiler-J7OZQIPD.js} +4 -4
  119. package/dist/{component-EVXMYIP3.js → component-TRGBVFCI.js} +3 -3
  120. package/dist/{compositions-PZ7FQ7WN.js → compositions-FOC2CAZX.js} +13 -13
  121. package/dist/curve-ID3Z522S.js +329 -0
  122. package/dist/cuts-MWHQSE2Z.js +123 -0
  123. package/dist/{delete-DL3XA4QV.js → delete-47KZ7PLI.js} +5 -5
  124. package/dist/{deploy-VEYP3IP5.js → deploy-NTNEO4TI.js} +8 -8
  125. package/dist/describeProject-WWREIVQV.js +56 -0
  126. package/dist/diff-GH4KCQGQ.js +1825 -0
  127. package/dist/{dist-SHMQOKMF.js → dist-24QQO5IL.js} +2 -2
  128. package/dist/{dist-M77KFAYW.js → dist-XW7FATO6.js} +2 -2
  129. package/dist/{doctor-JM2WHH7Y.js → doctor-4ZH7WFU6.js} +11 -11
  130. package/dist/energy-2C65KXBH.js +134 -0
  131. package/dist/{events-S7KVBRSL.js → events-FUFFA55P.js} +3 -3
  132. package/dist/{events-GW5I5RCG.js → events-Q3EBOW2Y.js} +2 -2
  133. package/dist/events-QO5G2VCC.js +221 -0
  134. package/dist/extract-Z6TLBM5B.js +309 -0
  135. package/dist/face-WI6BPPUG.js +171 -0
  136. package/dist/{feedback-7OR5FVTX.js → feedback-M5GZWDXP.js} +12 -12
  137. package/dist/{ffmpeg-A7CSIX3U.js → ffmpeg-27H6P7ZU.js} +7 -7
  138. package/dist/{figma-444HKFX5.js → figma-AI6TSWVO.js} +3 -3
  139. package/dist/fontLocalizeCli.js +10 -10
  140. package/dist/frames-WUTLVZIR.js +352 -0
  141. package/dist/generate-3CJREF5U.js +74 -0
  142. package/dist/{get-6UTF3225.js → get-KTDRE33B.js} +5 -5
  143. package/dist/{gpuPolicy-ORPUS5Z2.js → gpuPolicy-Z4MM64HY.js} +7 -7
  144. package/dist/{grade-compare-UCTAYN3B.js → grade-compare-IM7Z7HWI.js} +34 -31
  145. package/dist/{heifImagePrep-ED6V6RFN.js → heifImagePrep-CXI2ZMUX.js} +8 -8
  146. package/dist/{help-HZR32XWP.js → help-5FR6BRLR.js} +7 -1
  147. package/dist/{history-TQ56MZIA.js → history-5P5YVP5H.js} +7 -7
  148. package/dist/hyperframe.manifest.json +1 -1
  149. package/dist/hyperframe.runtime.iife.js +70 -70
  150. package/dist/hyperframes-player.global.js +3 -3
  151. package/dist/index-gen-OPMQ5WSN.js +61 -0
  152. package/dist/{info-RPIIP7RN.js → info-5ZGNJJVA.js} +7 -7
  153. package/dist/{init-ONAWKHFW.js → init-NWIAEYSX.js} +29 -28
  154. package/dist/{inspect-A75PYOWJ.js → inspect-HBLAVW5C.js} +31 -30
  155. package/dist/{installer-ISMCCFBZ.js → installer-KVFTBZZ5.js} +4 -4
  156. package/dist/{keyframes-2I75DP3O.js → keyframes-LFCLUY2R.js} +6 -6
  157. package/dist/{lambda-4QIHGPGJ.js → lambda-RFWTTMLU.js} +13 -13
  158. package/dist/{layout-GW7WE7RT.js → layout-WOG2Y5ND.js} +31 -30
  159. package/dist/{lint-OWP72OZQ.js → lint-7MALXMMF.js} +8 -8
  160. package/dist/{lintProject-XYQ5L7RQ.js → lintProject-6H64SX3V.js} +2 -2
  161. package/dist/{list-WVK7ZCPW.js → list-XRYAT24W.js} +5 -5
  162. package/dist/{localPage-IQWHN7BH.js → localPage-IN36JVJU.js} +7 -7
  163. package/dist/{login-Q5CNHYWU.js → login-32WGVGTM.js} +15 -9
  164. package/dist/{logout-6VFJ7WMW.js → logout-SLI6YTHI.js} +2 -2
  165. package/dist/look-ZWVE6JO3.js +180 -0
  166. package/dist/{manager-JCYVNEWH.js → manager-SFL6GLYX.js} +9 -8
  167. package/dist/manifest-QSJYVERU.js +49 -0
  168. package/dist/measure-Q74BJTRQ.js +46 -0
  169. package/dist/{media-treatment-M5IUP7H4.js → media-treatment-3R6DYEAZ.js} +16 -16
  170. package/dist/{media-use-ZNTB7W6N.js → media-use-ZM2WCRQC.js} +9 -5
  171. package/dist/{models-CFXKDYZ3.js → models-NNC53UPU.js} +11 -11
  172. package/dist/{motionShot-CWUEI4ZM.js → motionShot-5BI5JFUP.js} +15 -15
  173. package/dist/{normalize-QJVXFMWO.js → normalize-MBNGRVQA.js} +2 -1
  174. package/dist/{normalize-audio-FASY33LR.js → normalize-audio-6Z2WN56Q.js} +8 -8
  175. package/dist/{open-KOVVESYN.js → open-5NCEN6RC.js} +11 -11
  176. package/dist/{parakeetRunner-E4IP5SL4.js → parakeetRunner-DH3XKR3C.js} +13 -12
  177. package/dist/{pipeline-C6EZVV43.js → pipeline-CGEGQAPH.js} +10 -10
  178. package/dist/{play-MZJI6SMH.js → play-K37BN736.js} +23 -23
  179. package/dist/{policies-J5BWAZHM.js → policies-U4PFXF5E.js} +4 -2
  180. package/dist/{preflight-K4SPUWXP.js → preflight-CG7H3D5B.js} +8 -8
  181. package/dist/{present-7L7ZTG7F.js → present-KQ53DOHA.js} +18 -18
  182. package/dist/{preview-QGDVMR3X.js → preview-V7CYHL6U.js} +21 -21
  183. package/dist/probe-JVW2MPY3.js +178 -0
  184. package/dist/{producer-EJPNNY3E.js → producer-UD32S7PX.js} +1 -1
  185. package/dist/{projectConfig-EEF6OPXO.js → projectConfig-WXCB5AZE.js} +6 -6
  186. package/dist/{publication-5KF44AKQ.js → publication-KG4UDZRM.js} +2 -2
  187. package/dist/{publish-SSKWZ5TE.js → publish-MEQB543T.js} +16 -16
  188. package/dist/{refresh-I6ITGHKL.js → refresh-2LU4XDL7.js} +2 -2
  189. package/dist/{remove-background-PCL6I5SZ.js → remove-background-FSV5KQK3.js} +11 -11
  190. package/dist/{render-DH4UA7KW.js → render-O4S4SURS.js} +6 -6
  191. package/dist/{render-UPRWOGLS.js → render-SQXZAGPQ.js} +37 -37
  192. package/dist/{render-DRWQ6F37.js → render-SY4AXKXC.js} +33 -33
  193. package/dist/{render-batch-EBW5WHB5.js → render-batch-GTZQUB3H.js} +6 -6
  194. package/dist/renderSetupWorker.js +2 -2
  195. package/dist/{resolver-ZSZXNRFP.js → resolver-BQZNCVJS.js} +4 -4
  196. package/dist/run-67OPNJGD.js +31 -0
  197. package/dist/{sherpa-IKVUCBOW.js → sherpa-KH3PJAUG.js} +12 -11
  198. package/dist/skills/media-use/SKILL.md +20 -21
  199. package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +26 -1
  200. package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +33 -0
  201. package/dist/skills/media-use/references/heygen.md +58 -0
  202. package/dist/skills/media-use/references/operations.md +9 -6
  203. package/dist/skills/media-use/references/setup-providers.md +11 -12
  204. package/dist/skills/media-use/scripts/lib/index-gen.d.mts +1 -0
  205. package/dist/skills/media-use/scripts/lib/manifest.d.mts +21 -0
  206. package/dist/{skills-ZREHX3TU.js → skills-FTZZJGAB.js} +5 -5
  207. package/dist/{skillsUpdateCheck-PPJ5NGAL.js → skillsUpdateCheck-LZPD2CZI.js} +3 -3
  208. package/dist/{snapshot-KPFLZNEL.js → snapshot-4BORZ3ED.js} +37 -36
  209. package/dist/{src-QRV3466B.js → src-6ZOFAM3F.js} +9 -9
  210. package/dist/{src-EPOGDJTT.js → src-D7AO7PGH.js} +6 -6
  211. package/dist/{staticProjectServer-ERKLMZVM.js → staticProjectServer-Q23A6XU2.js} +19 -19
  212. package/dist/{status-4AAPTTRW.js → status-VIJRZ4ZK.js} +34 -9
  213. package/dist/studio/assets/hyperframes-player-D0W1SNqK.js +478 -0
  214. package/dist/studio/assets/{index-C8VIUiGz.js → index-DD9KJoEr.js} +119 -119
  215. package/dist/studio/assets/{index-CVPNbydK.js → index-mbwAH5iR.js} +1 -1
  216. package/dist/studio/index.html +1 -1
  217. package/dist/{studio-api-7WFZIIPL.js → studio-api-XVVJZ7YT.js} +15 -15
  218. package/dist/{studioServer-3XZTLI26.js → studioServer-6HG3AMTW.js} +49 -49
  219. package/dist/sync-Q5SRIL7V.js +115 -0
  220. package/dist/{telemetry-BMLI4TMC.js → telemetry-VXPSJ3X3.js} +3 -3
  221. package/dist/{timeline-EDCDO2ZR.js → timeline-6477OWFA.js} +25 -21
  222. package/dist/{tokens-2ZFLFO3K.js → tokens-ZUUNEDKT.js} +2 -2
  223. package/dist/{transcribe-3WMH62HH.js → transcribe-HA4UGLKO.js} +11 -10
  224. package/dist/{transcribe-Y2LPBT7I.js → transcribe-ITVANIDK.js} +35 -18
  225. package/dist/{tts-BVTJEP72.js → tts-KMZPHG3K.js} +1 -1
  226. package/dist/{updateCheck-5LFZGC3P.js → updateCheck-SVADAQ43.js} +2 -2
  227. package/dist/{upgrade-X7QVSEKP.js → upgrade-WKW4FDNF.js} +2 -2
  228. package/dist/{urlDownloader-TYD6ROKL.js → urlDownloader-VWHCESDD.js} +6 -6
  229. package/dist/{validate-26KQ5VX7.js → validate-7VG2RLP2.js} +24 -24
  230. package/dist/{video-BPKLZIJK.js → video-LM3FYHGG.js} +8 -8
  231. package/dist/warmCheck.js +40 -39
  232. package/package.json +1 -1
  233. package/dist/chunk-LL3VMDAC.js +0 -5013
  234. package/dist/studio/assets/hyperframes-player-Dka6e1BG.js +0 -478
  235. package/dist/{chunk-NOH32H42.js → chunk-HBAUU3IK.js} +124 -124
  236. package/dist/{destroy-BQ5R7LUF.js → destroy-6NWJMQX2.js} +4 -4
  237. package/dist/{synthesize-4JC74JW5.js → synthesize-DIT2SR3D.js} +5 -5
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  sherpaParakeetInstalled,
9
9
  sherpaUnsupportedReason
10
- } from "./chunk-DIXTEVWQ.js";
10
+ } from "./chunk-M7HNGAWN.js";
11
11
  import {
12
12
  findParakeet
13
13
  } from "./chunk-JZIEZCQM.js";
@@ -6,11 +6,11 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  withOwner
9
- } from "./chunk-4VEXJTUT.js";
9
+ } from "./chunk-NLWG5TU7.js";
10
10
  import {
11
11
  HistoryBusyError,
12
12
  beginArtifactCapture
13
- } from "./chunk-ZAJQFY5Q.js";
13
+ } from "./chunk-QU5OYMTB.js";
14
14
 
15
15
  // src/utils/artifactCapture.ts
16
16
  var SKIP_BUSY_HISTORY = { ownerWaitMs: 0 };
@@ -26,7 +26,7 @@ import {
26
26
  mkdirWithinProject
27
27
  } from "./chunk-OFQWTKPW.js";
28
28
 
29
- // ../studio-server/dist/chunk-CZ2QLV2C.js
29
+ // ../studio-server/dist/chunk-UC72OCMB.js
30
30
  import { randomUUID as randomUUID7 } from "crypto";
31
31
  import { mkdir as mkdir2, readdir as readdir4, rm as rm3, rmdir, stat as stat2, writeFile } from "fs/promises";
32
32
  import {
@@ -66,7 +66,7 @@ import { lstat as lstat2, readdir as readdir3, rm as rm2 } from "fs/promises";
66
66
  import { tmpdir } from "os";
67
67
  import { dirname as dirname2, join as join4 } from "path";
68
68
  import { randomUUID as randomUUID4 } from "crypto";
69
- import { existsSync, mkdirSync as mkdirSync2, readFileSync as readFileSync4, statSync as statSync2, writeFileSync as writeFileSync2 } from "fs";
69
+ import { existsSync, mkdirSync as mkdirSync2, readFileSync as readFileSync4, statSync as statSync2, utimesSync, writeFileSync as writeFileSync2 } from "fs";
70
70
  import { basename, join as join3, resolve as resolve4 } from "path";
71
71
  import { createHash as createHash5, randomUUID as randomUUID6 } from "crypto";
72
72
  import { createReadStream as createReadStream2, existsSync as existsSync2, readFileSync as readFileSync8, renameSync as renameSync2, statSync as statSync4 } from "fs";
@@ -930,8 +930,21 @@ var HistoryIdError = class extends Error {
930
930
  this.name = "HistoryIdError";
931
931
  }
932
932
  };
933
+ function markUsed(historyDir) {
934
+ const now = /* @__PURE__ */ new Date();
935
+ try {
936
+ utimesSync(join3(historyDir, "project.json"), now, now);
937
+ } catch {
938
+ return;
939
+ }
940
+ }
933
941
  function recordProject(historyDir, dir, folder) {
934
942
  const record = { dir, ino: folder.ino, born: folder.birthtimeMs, dev: folder.dev };
943
+ const was = readRecord(historyDir);
944
+ if (was?.dir === record.dir && was.ino === record.ino && was.born === record.born && was.dev === record.dev) {
945
+ markUsed(historyDir);
946
+ return;
947
+ }
935
948
  mkdirSync2(historyDir, { recursive: true });
936
949
  replaceFileAtomically(join3(historyDir, "project.json"), JSON.stringify(record), 420);
937
950
  }
@@ -0,0 +1,570 @@
1
+ import { createRequire as __hf_createRequire } from "node:module";
2
+ import { fileURLToPath as __hf_fileURLToPath } from "node:url";
3
+ import { dirname as __hf_dirname } from "node:path";
4
+ var require = __hf_createRequire(import.meta.url);
5
+ var __filename = __hf_fileURLToPath(import.meta.url);
6
+ var __dirname = __hf_dirname(__filename);
7
+ import {
8
+ findCuts,
9
+ signatures
10
+ } from "./chunk-OZM6VLD7.js";
11
+ import {
12
+ jsonArg,
13
+ num,
14
+ runMeasure
15
+ } from "./chunk-WGOIJN57.js";
16
+ import {
17
+ idempotencyKey,
18
+ runJob
19
+ } from "./chunk-NZZQCWUC.js";
20
+ import {
21
+ Fix,
22
+ probeVideo,
23
+ round,
24
+ runFfmpeg,
25
+ videoClip
26
+ } from "./chunk-VJM6NX54.js";
27
+ import {
28
+ defineCommand
29
+ } from "./chunk-DL4OD7IA.js";
30
+
31
+ // src/heygen/generate.ts
32
+ import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "fs";
33
+ import { tmpdir } from "os";
34
+ import { dirname, extname, join, relative, resolve } from "path";
35
+ var GENERATE_TYPES = [
36
+ "image",
37
+ "video",
38
+ "avatar",
39
+ "voice",
40
+ "music"
41
+ ];
42
+ function parseMask(text) {
43
+ const m = /^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?)\s*-\s*(\d+(?:\.\d+)?)\s*)?$/.exec(
44
+ text
45
+ );
46
+ if (!m || Number(m[3]) <= 0 || Number(m[4]) <= 0)
47
+ throw new Fix(`--mask ${text} is not x,y,w,h[,a-b]`, "--mask 190,405,700,175,1.0-2.7");
48
+ const box = [Number(m[1]), Number(m[2]), Number(m[3]), Number(m[4])];
49
+ return m[5] ? { box, window: [Number(m[5]), Number(m[6])] } : { box };
50
+ }
51
+ function maskFilters(masks, width, height) {
52
+ return masks.flatMap(({ box: [x, y, w, h], window }) => {
53
+ const [x0, y0] = [Math.max(1, x), Math.max(1, y)];
54
+ const [x1, y1] = [Math.min(width - 2, x + w), Math.min(height - 2, y + h)];
55
+ if (x1 - x0 < 1 || y1 - y0 < 1) return [];
56
+ const when = window ? `:enable='between(t,${window[0]},${window[1]})'` : "";
57
+ return [`delogo=x=${x0}:y=${y0}:w=${x1 - x0}:h=${y1 - y0}${when}`];
58
+ });
59
+ }
60
+ var DEFAULTS = { image: "nano-banana-2", video: "heygen-video-1", music: "lyria-3-pro" };
61
+ var VIDEO_RESOLUTION = "768p";
62
+ var GUIDE_MAX_S = 15;
63
+ var MUSIC_LENGTHS = [30, 60, 120, 180];
64
+ var need = (value, flag, example) => {
65
+ if (value === void 0 || value === "")
66
+ throw new Fix(`${flag} is required for this type`, example);
67
+ return value;
68
+ };
69
+ var ROUTES = {
70
+ image: {
71
+ path: "/v3/images",
72
+ poll: (id) => `/v3/images/${id}`,
73
+ body: (r, media) => ({
74
+ model: r.model ?? DEFAULTS.image,
75
+ prompt: need(r.prompt, "--prompt", '--prompt "the same room, empty, no text"'),
76
+ num_images: 1,
77
+ ...r.aspect ? { aspect_ratio: r.aspect } : {},
78
+ ...r.references?.length ? { reference_images: r.references.map((p) => media(p, "image")) } : {}
79
+ }),
80
+ urls: ["images.0.url", "image_url", "url"],
81
+ ledger: "image",
82
+ ext: [".png", ".jpg", ".jpeg", ".webp"]
83
+ },
84
+ video: {
85
+ path: "/v3/models/videos",
86
+ poll: (id) => `/v3/models/videos/${id}`,
87
+ // fallow-ignore-next-line complexity
88
+ body: (r, media) => {
89
+ const spoken = !!r.audio || !!r.references?.length || !!r.motion;
90
+ if (spoken && r.firstFrame)
91
+ throw new Fix(
92
+ "--first-frame cannot be used with --reference, --audio or --motion",
93
+ "a speaking shot takes the person as --reference and the voice as --audio"
94
+ );
95
+ return {
96
+ model: r.model ?? DEFAULTS.video,
97
+ mode: spoken ? "reference_to_video" : r.firstFrame ? "image_to_video" : "text_to_video",
98
+ prompt: need(r.prompt, "--prompt", '--prompt "slow push in on the desk"'),
99
+ duration: Math.min(15, Math.max(5, Math.round(r.seconds ?? 5))),
100
+ // 1080p bills about twice 768p (2026-10-23, 5 s 9:16 jobs: text $0.10 vs $0.20, a reference picture $0.25
101
+ // vs $0.45, a 1 s guide clip $0.30 vs $0.55), so every shot stays at 768p whatever the source's size.
102
+ resolution: VIDEO_RESOLUTION,
103
+ ...r.firstFrame ? { image: media(r.firstFrame, "image") } : {},
104
+ ...r.firstFrame ? {} : { aspect_ratio: r.aspect ?? "16:9" },
105
+ ...r.references?.length ? { reference_images: r.references.map((p) => media(p, "image")) } : {},
106
+ ...r.audio ? { reference_audio: [media(r.audio, "audio")] } : {},
107
+ // One guide clip: HeyGen follows its camera and body motion, and takes the face from the references.
108
+ ...r.motion ? { reference_videos: [media(r.motion, "video")] } : {}
109
+ };
110
+ },
111
+ urls: ["video_url", "output.video_url", "url"],
112
+ ledger: "video",
113
+ ext: [".mp4", ".mov", ".webm"]
114
+ },
115
+ avatar: {
116
+ path: "/v3/videos",
117
+ poll: (id) => `/v3/videos/${id}`,
118
+ body: (r, media) => ({
119
+ type: "image",
120
+ image: media(need(r.photo, "--photo", "--photo assets/presenter.png"), "image"),
121
+ script: need(r.script, "--script", '--script "What they say"'),
122
+ voice_id: need(
123
+ r.voice,
124
+ "--voice",
125
+ "--voice <voice id> (npx hyperframes media-use resolve --type voice lists voices)"
126
+ ),
127
+ ...r.aspect ? { aspect_ratio: r.aspect } : {},
128
+ output_format: "mp4"
129
+ }),
130
+ urls: ["video_url"],
131
+ ledger: "video",
132
+ ext: [".mp4"]
133
+ },
134
+ voice: {
135
+ path: "/v3/voices/speech",
136
+ poll: (id) => `/v3/voices/speech/${id}`,
137
+ body: (r) => ({
138
+ text: need(r.script, "--script", '--script "What the voice says"'),
139
+ voice_id: need(r.voice, "--voice", "--voice <voice id>")
140
+ }),
141
+ urls: ["audio_url"],
142
+ ledger: "voice",
143
+ ext: [".mp3", ".wav", ".m4a"]
144
+ },
145
+ music: {
146
+ path: "/v3/audio/music",
147
+ poll: (id) => `/v3/audio/music/${id}`,
148
+ body: (r) => ({
149
+ model: r.model ?? DEFAULTS.music,
150
+ prompt: need(r.prompt, "--prompt", '--prompt "warm lo-fi beat, soft keys"'),
151
+ duration_seconds: MUSIC_LENGTHS.find((s) => s >= (r.seconds ?? 30)) ?? 180,
152
+ instrumental: r.instrumental ?? true,
153
+ ...r.bpm ? { bpm: Math.round(r.bpm) } : {}
154
+ }),
155
+ urls: ["audio_url"],
156
+ ledger: "bgm",
157
+ ext: [".mp3"]
158
+ }
159
+ };
160
+ var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
161
+ function urlOf(job, paths) {
162
+ for (const p of paths) {
163
+ let v = job;
164
+ for (const key of p.split("."))
165
+ v = Array.isArray(v) ? v[Number(key)] : isRecord(v) ? v[key] : void 0;
166
+ if (typeof v === "string" && /^https?:\/\//.test(v)) return v;
167
+ }
168
+ return null;
169
+ }
170
+ function needFile(path) {
171
+ if (!existsSync(path))
172
+ throw new Fix(`no file at ${path}`, "pass a picture or sound from the project");
173
+ }
174
+ function inline(work, masks = []) {
175
+ return (path, kind) => {
176
+ needFile(path);
177
+ const out = join(
178
+ work,
179
+ `in-${Math.random().toString(36).slice(2)}.${{ image: "jpg", audio: "mp3", video: "mp4" }[kind]}`
180
+ );
181
+ if (kind === "image")
182
+ runFfmpeg([
183
+ "-y",
184
+ "-i",
185
+ path,
186
+ "-vf",
187
+ "scale='min(2048,iw)':'min(2048,ih)':force_original_aspect_ratio=decrease",
188
+ "-q:v",
189
+ "3",
190
+ "-frames:v",
191
+ "1",
192
+ out
193
+ ]);
194
+ else if (kind === "audio")
195
+ runFfmpeg(["-y", "-i", path, "-vn", "-ac", "1", "-c:a", "libmp3lame", "-b:a", "128k", out]);
196
+ else {
197
+ const { width, height } = masks.length ? probeVideo(path) : { width: 0, height: 0 };
198
+ const filters = [
199
+ ...maskFilters(masks, width, height),
200
+ "scale='if(gt(iw,ih),min(720,iw),-2)':'if(gt(iw,ih),-2,min(720,ih))'"
201
+ ];
202
+ runFfmpeg([
203
+ ...["-y", "-i", path, "-t", "15", "-an", "-vf", filters.join(",")],
204
+ ...["-c:v", "libx264", "-crf", "28", "-preset", "veryfast", "-pix_fmt", "yuv420p", out]
205
+ ]);
206
+ }
207
+ return {
208
+ type: "base64",
209
+ media_type: { image: "image/jpeg", audio: "audio/mpeg", video: "video/mp4" }[kind],
210
+ data: readFileSync(out).toString("base64")
211
+ };
212
+ };
213
+ }
214
+ function cutsInside(path, seconds) {
215
+ const info = probeVideo(path);
216
+ const clip = videoClip(info.path, 0, seconds, info);
217
+ const { frames } = signatures(clip.input, clip.filters);
218
+ const cuts = findCuts(frames).filter((c) => c.frame > 1 && c.frame < frames.length - 1).map((c) => round(c.frame / info.fps, 3));
219
+ return { cuts, length: round(frames.length / info.fps, 3) };
220
+ }
221
+ var COUNT = ["", "one", "two", "three", "four", "five", "six"];
222
+ function checkGuide(r) {
223
+ if (!r.motion) return;
224
+ const { cuts, length } = cutsInside(r.motion, GUIDE_MAX_S);
225
+ if (!cuts.length) return;
226
+ const s = (t) => t.toFixed(2);
227
+ const and = (items) => `${items.slice(0, -1).join(", ")} and ${items.at(-1)}`;
228
+ const at2 = cuts.length > 1 ? `cuts at ${and(cuts.map((t) => `${s(t)} s`))}` : `a cut at ${s(cuts[0])} s`;
229
+ const edges = [0, ...cuts, length];
230
+ const shots = edges.slice(1).map((e, i) => `${i ? s(edges[i]) : "0"}\u2013${s(e)} s`);
231
+ throw new Fix(
232
+ `--motion ${r.motion} has ${at2}`,
233
+ `guide has ${at2}: generate ${and(shots)} as ${COUNT[shots.length] ?? shots.length} shots, each with its own --motion clip`
234
+ );
235
+ }
236
+ function checkRequest(r) {
237
+ const route = ROUTES[r.type];
238
+ if (!route.ext.includes(extname(r.out).toLowerCase()))
239
+ throw new Fix(`--out ${r.out} does not fit a ${r.type}`, `--out assets/name${route.ext[0]}`);
240
+ if (r.masks?.length && !r.motion)
241
+ throw new Fix("--mask blanks regions of the --motion clip", "pass --motion with --mask");
242
+ route.body(r, (path) => {
243
+ needFile(path);
244
+ return { type: "base64", media_type: "", data: "" };
245
+ });
246
+ checkGuide(r);
247
+ }
248
+ function projectOf(from) {
249
+ for (let dir = resolve(from); ; dir = dirname(dir)) {
250
+ if (existsSync(join(dir, "index.html"))) return dir;
251
+ if (dirname(dir) === dir) return null;
252
+ }
253
+ }
254
+ async function generate(r, onWait, credits) {
255
+ checkRequest(r);
256
+ const route = ROUTES[r.type];
257
+ const out = resolve(r.out);
258
+ mkdirSync(dirname(out), { recursive: true });
259
+ const project = projectOf(dirname(out));
260
+ const work = mkdtempSync(join(tmpdir(), "hf-generate-"));
261
+ try {
262
+ const body = route.body(r, inline(work, r.masks));
263
+ const key = idempotencyKey(route.path, [JSON.stringify(body)]);
264
+ const job = await runJob(route.path, body, key, (id) => route.poll(encodeURIComponent(id)), {
265
+ log: {
266
+ projectDir: project ?? void 0,
267
+ what: `generate ${r.type} ${relative(project ?? ".", out)}`
268
+ },
269
+ onWait: (j) => onWait?.(j.status),
270
+ timeoutMs: 30 * 6e4,
271
+ credits
272
+ });
273
+ const url = urlOf(job, route.urls);
274
+ if (!url)
275
+ throw new Fix(
276
+ `HeyGen finished job ${job.id} without a file URL`,
277
+ "run the same command again; it re-reads the job"
278
+ );
279
+ const res = await fetch(url, { signal: AbortSignal.timeout(3e5) });
280
+ if (!res.ok)
281
+ throw new Fix(
282
+ `could not download the result (${res.status})`,
283
+ "run the same command again; it re-reads the job"
284
+ );
285
+ writeFileSync(out, Buffer.from(await res.arrayBuffer()));
286
+ let cuts;
287
+ if (r.type === "video")
288
+ try {
289
+ cuts = cutsInside(out).cuts;
290
+ } catch {
291
+ cuts = null;
292
+ }
293
+ let ledger;
294
+ if (project) {
295
+ const { recordInPlace } = await import("./manifest-QSJYVERU.js");
296
+ const { regenerateIndex } = await import("./index-gen-OPMQ5WSN.js");
297
+ const describe = (p) => p ? relative(project, resolve(p)).split("\\").join("/") : void 0;
298
+ ledger = recordInPlace(project, {
299
+ type: route.ledger,
300
+ path: relative(project, out).split("\\").join("/"),
301
+ source: "generated",
302
+ description: r.prompt ?? r.script ?? r.type,
303
+ provenance: {
304
+ provider: "heygen",
305
+ route: route.path,
306
+ model: body.model ?? null,
307
+ job: job.id,
308
+ prompt: r.prompt ?? null,
309
+ ...r.references?.length ? { references: r.references.map(describe) } : {},
310
+ ...r.firstFrame ? { first_frame: describe(r.firstFrame) } : {},
311
+ ...r.photo ? { photo: describe(r.photo) } : {},
312
+ ...r.audio ? { audio: describe(r.audio) } : {},
313
+ ...r.motion ? { motion: describe(r.motion) } : {},
314
+ ...r.masks?.length ? { motion_masks: r.masks.map((m) => [...m.box, ...m.window ?? []]) } : {},
315
+ ...r.voice ? { voice: r.voice } : {},
316
+ ...cuts !== void 0 ? { cuts_inside: cuts } : {}
317
+ }
318
+ }).id;
319
+ regenerateIndex(project);
320
+ }
321
+ return {
322
+ out,
323
+ type: r.type,
324
+ job: job.id,
325
+ route: route.path,
326
+ ...ledger ? { ledger } : {},
327
+ ...cuts !== void 0 ? { cuts_inside: cuts } : {}
328
+ };
329
+ } finally {
330
+ rmSync(work, { recursive: true, force: true });
331
+ }
332
+ }
333
+
334
+ // src/heygen/pricing.ts
335
+ var UNIT = 1 / 60;
336
+ var charged = (usd) => Math.ceil(usd / UNIT - 1e-9) * UNIT;
337
+ var cents = (usd) => Math.ceil(charged(usd) * 100 - 1e-9) / 100;
338
+ var HF_CREDITS_PER_USD = 1e3;
339
+ var at = (list, basis, credits = list * HF_CREDITS_PER_USD) => ({
340
+ usd: cents(list),
341
+ list,
342
+ credits,
343
+ basis
344
+ });
345
+ var GPT_IMAGE = {
346
+ "1:1": 0.05268,
347
+ "16:9": 0.0396,
348
+ "9:16": 0.0396,
349
+ "4:3": 0.03612,
350
+ "3:4": 0.03612
351
+ };
352
+ var NANO_IMAGE = 0.067;
353
+ var VIDEO_768P_PER_S = 0.018;
354
+ var VIDEO_REF_768P_PER_S = 0.05;
355
+ var VIDEO_INCLUDED_IMAGES = 2;
356
+ var VIDEO_EXTRA_IMAGE = 0.02;
357
+ var HF_VIDEO_768P_PER_S = 12;
358
+ var HF_VIDEO_REF_768P_PER_S = 100 / 3;
359
+ var HF_VIDEO_EXTRA_IMAGE = 40 / 3;
360
+ var HF_AVATAR_IV_PHOTO_PER_S = 800 / 60;
361
+ var MUSIC_PER_TRACK = 0.08;
362
+ var AVATAR_IV_PER_MIN = 4.83;
363
+ var SCRIPT_WORDS_PER_S = 2;
364
+ function priceOf(r) {
365
+ switch (r.type) {
366
+ case "image": {
367
+ const refs = r.references?.length ?? 0;
368
+ if ((r.model ?? "nano-banana-2") === "nano-banana-2")
369
+ return at(NANO_IMAGE, "nano-banana-2, $0.067 an image");
370
+ const each = GPT_IMAGE[r.aspect ?? "16:9"] ?? GPT_IMAGE["16:9"];
371
+ return at(
372
+ each + Math.max(0, refs - 1) * 82e-4,
373
+ `gpt-image-2.5 at ${r.aspect ?? "16:9"}, $0.0082 a reference after the first`
374
+ );
375
+ }
376
+ case "video": {
377
+ const seconds = Math.min(15, Math.max(5, Math.round(r.seconds ?? 5)));
378
+ if (r.audio || r.references?.length || r.motion) {
379
+ const guide = r.motion ? Math.min(GUIDE_MAX_S, probeVideo(r.motion).pictureDuration) : 0;
380
+ const extra = Math.max(0, (r.references?.length ?? 0) - VIDEO_INCLUDED_IMAGES);
381
+ const billed = seconds + guide;
382
+ return at(
383
+ billed * VIDEO_REF_768P_PER_S + extra * VIDEO_EXTRA_IMAGE,
384
+ `heygen-video-1 reference shot at 768p, ${seconds} s${guide ? ` and the ${round(guide, 2)} s guide` : ""} at $0.05 a second${extra ? `, ${extra} extra pictures at $0.02` : ""}`,
385
+ billed * HF_VIDEO_REF_768P_PER_S + extra * HF_VIDEO_EXTRA_IMAGE
386
+ );
387
+ }
388
+ return at(
389
+ seconds * VIDEO_768P_PER_S,
390
+ `heygen-video-1 at 768p, ${seconds} s at $0.018 a second`,
391
+ seconds * HF_VIDEO_768P_PER_S
392
+ );
393
+ }
394
+ case "avatar": {
395
+ const words = (r.script ?? "").split(/\s+/).filter(Boolean).length;
396
+ const seconds = Math.max(1, Math.floor(words / SCRIPT_WORDS_PER_S));
397
+ return at(
398
+ Math.ceil(seconds * AVATAR_IV_PER_MIN) / 60,
399
+ `avatar video, about ${seconds} s from ${words} words at $4.83 a minute`,
400
+ seconds * HF_AVATAR_IV_PHOTO_PER_S
401
+ );
402
+ }
403
+ case "music":
404
+ return at(MUSIC_PER_TRACK, "lyria-3-pro, $0.08 a track");
405
+ case "voice":
406
+ return {
407
+ usd: null,
408
+ list: null,
409
+ credits: null,
410
+ basis: "HeyGen does not price catalog speech ahead; it is charged per character"
411
+ };
412
+ }
413
+ }
414
+ var creditsOf = (p) => p.credits === null ? null : Math.ceil(p.credits - 1e-9);
415
+ function checkLimit(credits, limit) {
416
+ if (limit === void 0) return;
417
+ const fix = "tell the person what their limit leaves out, then ask whether to raise it or make the video without this piece";
418
+ if (credits === null)
419
+ throw new Fix(
420
+ `this call cannot be priced ahead, so it cannot be kept under --max-credits ${limit}; nothing was made`,
421
+ fix
422
+ );
423
+ if (credits > limit)
424
+ throw new Fix(
425
+ `this call is about ${credits} credits, over --max-credits ${limit}; nothing was made or charged`,
426
+ fix
427
+ );
428
+ }
429
+
430
+ // src/commands/media-use/generate.ts
431
+ var examples = [
432
+ [
433
+ "Price a clean plate of a frame, then make it",
434
+ 'hyperframes media-use generate --type image --reference f120.png --prompt "the same shot with no text" --out assets/plate.png --plan'
435
+ ],
436
+ [
437
+ "A 6 s shot that starts from the original's first frame",
438
+ 'hyperframes media-use generate --type video --first-frame assets/s03-first.png --prompt "slow push in" --seconds 6 --out assets/s03.mp4'
439
+ ],
440
+ [
441
+ "The original's presenter re-shot clean, saying an 8 s stretch of the original voice",
442
+ 'hyperframes media-use generate --type video --reference assets/presenter-clean.png --audio assets/s02-voice.m4a --motion assets/s02-original.mp4 --mask 110,615,390,165 --prompt "the woman talks to camera, seated, soft daylight" --seconds 8 --aspect 9:16 --out assets/s02-presenter.mp4'
443
+ ],
444
+ [
445
+ "The person in a photo saying a script in a chosen voice",
446
+ 'hyperframes media-use generate --type avatar --photo assets/presenter.png --script "Hi, I am Ana" --voice <voice-id> --out assets/ana.mp4'
447
+ ]
448
+ ];
449
+ var isType = (v) => GENERATE_TYPES.some((t) => t === v);
450
+ function repeated(raw, flag) {
451
+ return raw.flatMap(
452
+ (a, i) => a === flag && raw[i + 1] !== void 0 ? [raw[i + 1]] : a.startsWith(`${flag}=`) ? [a.slice(flag.length + 1)] : []
453
+ );
454
+ }
455
+ var generate_default = defineCommand({
456
+ meta: {
457
+ name: "generate",
458
+ description: "Make new media on HeyGen: an image (edited from references), a video shot (from a first frame), a person speaking from a photo, a voice, or music. --plan prices it first"
459
+ },
460
+ args: {
461
+ type: {
462
+ type: "string",
463
+ description: `What to make: ${GENERATE_TYPES.join(", ")}`,
464
+ required: true
465
+ },
466
+ out: {
467
+ type: "string",
468
+ description: "The project file to write, e.g. assets/plate.png",
469
+ required: true
470
+ },
471
+ prompt: { type: "string", description: "What it shows or sounds like (image, video, music)" },
472
+ reference: {
473
+ type: "string",
474
+ description: "image: comma-separated pictures to edit from or follow; video: the person to show speaking"
475
+ },
476
+ audio: {
477
+ type: "string",
478
+ description: "video: speech the referenced person says, lips in sync (5\u201315 s)"
479
+ },
480
+ motion: {
481
+ type: "string",
482
+ description: "video: a clip whose camera and body motion the shot follows (up to 15 s)"
483
+ },
484
+ mask: {
485
+ type: "string",
486
+ description: "video: x,y,w,h[,a-b] of the --motion clip to blank before sending (its drawn text; a-b in the clip's seconds); repeat for more"
487
+ },
488
+ "first-frame": { type: "string", description: "video: the picture the shot starts from" },
489
+ photo: { type: "string", description: "avatar: the person's photo" },
490
+ script: { type: "string", description: "avatar, voice: the words spoken" },
491
+ voice: { type: "string", description: "avatar, voice: a HeyGen voice id" },
492
+ seconds: {
493
+ type: "string",
494
+ description: "video 5\u201315 (default 5); music: 30, 60, 120 or 180 (default 30)"
495
+ },
496
+ aspect: {
497
+ type: "string",
498
+ description: "Aspect ratio, e.g. 9:16 (image, video without a first frame, avatar)"
499
+ },
500
+ model: { type: "string", description: "image: nano-banana-2 (default) or gpt-image-2.5" },
501
+ bpm: { type: "string", description: "music: tempo, 60\u2013180" },
502
+ vocals: {
503
+ type: "boolean",
504
+ description: "music: allow singing (default instrumental)",
505
+ default: false
506
+ },
507
+ "max-credits": {
508
+ type: "string",
509
+ description: "The person's credit limit, less what earlier calls used: make nothing when this call would cost more"
510
+ },
511
+ plan: {
512
+ type: "boolean",
513
+ description: "Print the price and what would be sent; make nothing",
514
+ default: false
515
+ },
516
+ json: jsonArg
517
+ },
518
+ async run({ args, rawArgs }) {
519
+ await runMeasure(async () => {
520
+ const type = String(args.type);
521
+ if (!isType(type))
522
+ throw new Fix(`unknown --type ${type}`, `--type ${GENERATE_TYPES.join("|")}`);
523
+ const request = {
524
+ type,
525
+ out: String(args.out),
526
+ prompt: args.prompt,
527
+ references: args.reference?.split(",").map((p) => p.trim()).filter(Boolean),
528
+ firstFrame: args["first-frame"],
529
+ audio: args.audio,
530
+ motion: args.motion,
531
+ masks: repeated(rawArgs, "--mask").map(parseMask),
532
+ photo: args.photo,
533
+ script: args.script,
534
+ voice: args.voice,
535
+ seconds: num(args.seconds, "--seconds"),
536
+ aspect: args.aspect,
537
+ model: args.model,
538
+ bpm: num(args.bpm, "--bpm"),
539
+ instrumental: !args.vocals
540
+ };
541
+ const price = priceOf(request);
542
+ const credits = creditsOf(price);
543
+ if (args.plan) {
544
+ checkRequest(request);
545
+ return {
546
+ plan: true,
547
+ type,
548
+ out: request.out,
549
+ price,
550
+ credits,
551
+ next: "run the same command without --plan to make it"
552
+ };
553
+ }
554
+ checkLimit(credits, num(args["max-credits"], "--max-credits"));
555
+ const made = await generate(
556
+ request,
557
+ (status) => console.error(`generate: ${status}\u2026`),
558
+ credits ?? void 0
559
+ );
560
+ return { ...made, price, credits };
561
+ });
562
+ }
563
+ });
564
+
565
+ export {
566
+ parseMask,
567
+ examples,
568
+ repeated,
569
+ generate_default
570
+ };
@@ -7,10 +7,10 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  parseFeedbackRating,
9
9
  trackRenderFeedback
10
- } from "./chunk-AN4USOFT.js";
10
+ } from "./chunk-LAIGIOEA.js";
11
11
  import {
12
12
  shouldTrack
13
- } from "./chunk-NUE44RN2.js";
13
+ } from "./chunk-45UOXUUH.js";
14
14
  import {
15
15
  c
16
16
  } from "./chunk-2GICKZ3I.js";
@@ -84,7 +84,7 @@ async function getDoctorSummary() {
84
84
  try {
85
85
  const [{ getSystemMeta }, { findFFmpeg }] = await Promise.all([
86
86
  import("./system-FDPS57FU.js"),
87
- import("./ffmpeg-A7CSIX3U.js")
87
+ import("./ffmpeg-27H6P7ZU.js")
88
88
  ]);
89
89
  const sys = getSystemMeta();
90
90
  const parts = [
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
 
8
8
  // src/utils/producer.ts
9
9
  async function loadProducer() {
10
- return await import("./src-QRV3466B.js");
10
+ return await import("./src-6ZOFAM3F.js");
11
11
  }
12
12
 
13
13
  export {