hyperframes 0.9.19 → 0.9.21

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 (263) hide show
  1. package/dist/{add-YT7BMWZB.js → add-VQVP3JPZ.js} +14 -15
  2. package/dist/{agentPromptGenerator-VKOL4XCD.js → agentPromptGenerator-PAFWQGHU.js} +10 -11
  3. package/dist/{animatedGifPrep-MD4BNSPH.js → animatedGifPrep-AK26JDVM.js} +10 -11
  4. package/dist/api.js +36 -37
  5. package/dist/{appHistory-WXJ4STHX.js → appHistory-FVDSCS64.js} +1 -1
  6. package/dist/{asset-J42DGWPQ.js → asset-N6RZSN44.js} +2 -2
  7. package/dist/{assetCataloger-XDZB53RE.js → assetCataloger-GWF6II54.js} +11 -12
  8. package/dist/{audio-6EV56WMQ.js → audio-ZHVBBQRA.js} +70 -26
  9. package/dist/{auth-ECYU3HT4.js → auth-AJM3YSN6.js} +4 -4
  10. package/dist/{autoUpdate-HIKCPXQA.js → autoUpdate-GV4LPAJX.js} +2 -2
  11. package/dist/{avatars-X7DEU57Y.js → avatars-5EKOR2DW.js} +16 -17
  12. package/dist/{backgroundChecks-IYWWBPTC.js → backgroundChecks-J4XJD4ET.js} +3 -3
  13. package/dist/backgroundChecksWorker.js +3 -3
  14. package/dist/{batchRender-3TAV6XQQ.js → batchRender-UKQ36JT2.js} +5 -6
  15. package/dist/{beats-IFJBCISA.js → beats-LXYHFVPP.js} +11 -12
  16. package/dist/{benchmark-OS6LVCAY.js → benchmark-KXR56MIT.js} +11 -12
  17. package/dist/{billing-4NRHG5FO.js → billing-3XQYSAKP.js} +15 -16
  18. package/dist/{browser-CFI3GKFB.js → browser-P52FDITF.js} +16 -4
  19. package/dist/{bundleWithLocalizedFonts-6YHKES5G.js → bundleWithLocalizedFonts-I3KWYN6X.js} +1 -1
  20. package/dist/{capture-SNHDWW7W.js → capture-2PSBIAL2.js} +3 -3
  21. package/dist/{capture-4H3W3FNF.js → capture-SMWSGGMG.js} +22 -23
  22. package/dist/{captureCompositionFrame-BH4UMGJP.js → captureCompositionFrame-WRY5ATM7.js} +16 -17
  23. package/dist/{catalog-RZOQ54KZ.js → catalog-JIO6RXSR.js} +14 -15
  24. package/dist/{catch-up-PA4QGVNL.js → catch-up-A73H7VGC.js} +18 -7
  25. package/dist/{check-J2TCCJL5.js → check-FI7SUTK7.js} +43 -42
  26. package/dist/{checkAudio-RIFMEOQI.js → checkAudio-73DDBXXJ.js} +13 -14
  27. package/dist/{checkBrowser-M4YCLLDJ.js → checkBrowser-X5VVYQES.js} +35 -36
  28. package/dist/{chunk-E3GBPA37.js → chunk-2HRKRRQH.js} +2 -2
  29. package/dist/{chunk-OR2FAQFS.js → chunk-3FG3YAHZ.js} +1 -1
  30. package/dist/{chunk-BJUPV6I3.js → chunk-3OIUJOIR.js} +1 -1
  31. package/dist/{chunk-FSTINYWN.js → chunk-3TLAQU62.js} +1 -1
  32. package/dist/{chunk-DTJV7ST5.js → chunk-3ZXKEGKV.js} +1 -1
  33. package/dist/{chunk-ABT7WBZZ.js → chunk-4EL5RKLS.js} +1 -1
  34. package/dist/{chunk-TOD5PQJF.js → chunk-4EMQHF3T.js} +2 -2
  35. package/dist/{chunk-6OBCXHIF.js → chunk-4FNJ2QNP.js} +4 -4
  36. package/dist/{chunk-3QIHS5V3.js → chunk-4NLG5TO6.js} +3 -3
  37. package/dist/{chunk-63LNVITK.js → chunk-4UXCWPHU.js} +1 -1
  38. package/dist/{chunk-UPURJC4I.js → chunk-4ZLMVX3O.js} +1 -1
  39. package/dist/{chunk-IV2R3NET.js → chunk-5PY66UGZ.js} +3 -3
  40. package/dist/{chunk-ZPJYWAAS.js → chunk-7ETNIXIN.js} +1 -1
  41. package/dist/{chunk-HNGHIX26.js → chunk-7EUZAQD6.js} +35 -2
  42. package/dist/{chunk-BEAEO4OV.js → chunk-A2NL7HGF.js} +1 -1
  43. package/dist/{chunk-JWQHGM3V.js → chunk-A4JU6QUG.js} +1 -1
  44. package/dist/{chunk-WMRHEI4N.js → chunk-ADJCNH7M.js} +1 -1
  45. package/dist/{chunk-ENVFGBRD.js → chunk-AXFYCH7S.js} +12 -0
  46. package/dist/{chunk-RRGH76QX.js → chunk-BABCRBAO.js} +38 -4
  47. package/dist/{chunk-SVT6FCQX.js → chunk-BUCJXB6D.js} +1 -1
  48. package/dist/{chunk-3UYQMVJS.js → chunk-C4KYJSSF.js} +9 -9
  49. package/dist/{chunk-N7D6YUGR.js → chunk-CFOJE3VR.js} +2 -2
  50. package/dist/{chunk-GKLZMLX3.js → chunk-CXUT4XVT.js} +22 -1
  51. package/dist/{chunk-2DPQ347C.js → chunk-CZK7A5IB.js} +4 -4
  52. package/dist/{chunk-3XJM7XZN.js → chunk-D3NWGOXW.js} +30 -0
  53. package/dist/{chunk-PTIOZJMF.js → chunk-D7C6NOOO.js} +2 -2
  54. package/dist/{chunk-H3YZRS32.js → chunk-DXIGIMRP.js} +2 -2
  55. package/dist/{chunk-T655WZ4R.js → chunk-DYPAXBNK.js} +1 -1
  56. package/dist/{chunk-4FFKOLNM.js → chunk-DZQEPGNY.js} +3 -3
  57. package/dist/{chunk-RKRJAQFI.js → chunk-F4XUCHQQ.js} +1 -1
  58. package/dist/{chunk-URGLY5QV.js → chunk-FASKJUYU.js} +98 -35
  59. package/dist/{chunk-7EN7RIPV.js → chunk-FET6WMTX.js} +2 -2
  60. package/dist/{chunk-WRBUQRJJ.js → chunk-FOX7LXZ2.js} +1 -1
  61. package/dist/chunk-FRBQYFUV.js +481 -0
  62. package/dist/{chunk-XPIP5ZV3.js → chunk-G5UZHDEZ.js} +2 -2
  63. package/dist/{chunk-AKEZ2BEE.js → chunk-G77Z4GWC.js} +1 -1
  64. package/dist/{chunk-6AYTP32B.js → chunk-GG7RYSIU.js} +1 -1
  65. package/dist/{chunk-KXZD37E5.js → chunk-GH6GWAID.js} +1 -1
  66. package/dist/{chunk-2LZO4FX3.js → chunk-GKOSN3Q6.js} +3 -3
  67. package/dist/chunk-GREVQ2SM.js +5035 -0
  68. package/dist/{chunk-J3QW55W5.js → chunk-H6676SHA.js} +1 -1
  69. package/dist/{chunk-SJUFAZV5.js → chunk-H7N3J7Y3.js} +2 -2
  70. package/dist/{chunk-RWJFNJUE.js → chunk-HCFBCEJT.js} +1 -1
  71. package/dist/{chunk-NKK2FRY7.js → chunk-I7WVS7WN.js} +1 -1
  72. package/dist/{chunk-UIUILBMB.js → chunk-IFY5ACTF.js} +13 -13
  73. package/dist/{chunk-M3EGX3ID.js → chunk-IQR26ZJD.js} +5 -5
  74. package/dist/{chunk-XYHAXHOH.js → chunk-IRWQMKV7.js} +1 -1
  75. package/dist/{chunk-HY5KQ4KT.js → chunk-ITO3VCCW.js} +10 -10
  76. package/dist/{chunk-XKYXENEP.js → chunk-JNN2CTGU.js} +2 -2
  77. package/dist/{chunk-6KBDQAZC.js → chunk-JT6LFFYK.js} +1 -1
  78. package/dist/{chunk-L24NAUBS.js → chunk-KBHBSWEE.js} +64 -19
  79. package/dist/{chunk-XQD6XWE3.js → chunk-L2SQTHMP.js} +1 -1
  80. package/dist/{chunk-ZVDYDMQA.js → chunk-L4C4F4O3.js} +3 -3
  81. package/dist/{chunk-RLXUABCX.js → chunk-LDO7SB4J.js} +12 -5
  82. package/dist/{chunk-IPXNWK7O.js → chunk-LGSSYJS2.js} +2 -2
  83. package/dist/{chunk-ATUCYH5L.js → chunk-LIFQONFJ.js} +1 -1
  84. package/dist/{chunk-NTMMUK6Q.js → chunk-LLUKDUVS.js} +38 -20
  85. package/dist/{chunk-IDNKBZNX.js → chunk-LMUF3BGR.js} +1 -1
  86. package/dist/{chunk-5PC5FMF4.js → chunk-LQBZCXMR.js} +3 -3
  87. package/dist/{chunk-L6YCPDRH.js → chunk-M32FE7JZ.js} +3 -3
  88. package/dist/{chunk-BYVDFTG6.js → chunk-M7Z2SEQG.js} +2 -2
  89. package/dist/{chunk-RL3CNZAX.js → chunk-MERPHIUD.js} +2 -2
  90. package/dist/{chunk-JWORQ5WQ.js → chunk-MFDNMTOP.js} +1 -1
  91. package/dist/{chunk-CBHNARFI.js → chunk-MNMIIDOX.js} +1 -1
  92. package/dist/{chunk-PMAGFCRB.js → chunk-NBHVLN5J.js} +7 -7
  93. package/dist/{chunk-Z2BBCW57.js → chunk-NTNNGWKO.js} +3 -3
  94. package/dist/{chunk-VXZOWF6M.js → chunk-ONBYVA2L.js} +62 -25
  95. package/dist/{chunk-G2HKE5CX.js → chunk-OQ6VGBQV.js} +1 -1
  96. package/dist/{chunk-GNING3UV.js → chunk-OXMEC34G.js} +1 -1
  97. package/dist/{chunk-VGAKHIDG.js → chunk-OXUX73RX.js} +10 -10
  98. package/dist/{chunk-A5MTIN4M.js → chunk-P7WDQTQZ.js} +1 -1
  99. package/dist/chunk-PJNDSYJV.js +525 -0
  100. package/dist/{chunk-X2TDLUIK.js → chunk-PPOJMJR5.js} +51 -16
  101. package/dist/{chunk-67JLV22D.js → chunk-Q2LO2ZF6.js} +3 -3
  102. package/dist/{chunk-CPFG5QSQ.js → chunk-QAES6F2D.js} +7 -7
  103. package/dist/{chunk-FJXBDFH6.js → chunk-QXVJ33BP.js} +362 -190
  104. package/dist/{chunk-WAY7TXDD.js → chunk-RLY4LECT.js} +2 -2
  105. package/dist/{chunk-JDAYOJGJ.js → chunk-RQIR2BOG.js} +1 -1
  106. package/dist/{chunk-YCXW65RT.js → chunk-RYRSI623.js} +5 -5
  107. package/dist/{chunk-BUIZAY4L.js → chunk-TERSCNBN.js} +19 -8
  108. package/dist/{chunk-I4G55F5J.js → chunk-TLNKHH52.js} +1 -1
  109. package/dist/{chunk-I2L7KR3N.js → chunk-UFMWWEL3.js} +7 -7
  110. package/dist/{chunk-GZK32KOL.js → chunk-W62DJ5ZK.js} +5 -5
  111. package/dist/{chunk-TLZCUWHQ.js → chunk-WFEKL42K.js} +266 -61
  112. package/dist/{chunk-LDFI55LW.js → chunk-WZCSU7ZP.js} +1 -1
  113. package/dist/{chunk-7HROKMNQ.js → chunk-XC5PF4T4.js} +4 -4
  114. package/dist/{chunk-2752JKE6.js → chunk-XQUO3BOS.js} +65 -21
  115. package/dist/{chunk-2AL2DME3.js → chunk-XRNXGF7I.js} +2 -2
  116. package/dist/{chunk-QEFMUD5U.js → chunk-YALKIB2K.js} +1 -1
  117. package/dist/{chunk-W6Q7Q7BS.js → chunk-YQV44DRO.js} +77 -2
  118. package/dist/{chunk-WBXUGXZP.js → chunk-YZKRMBYH.js} +1 -1
  119. package/dist/{chunk-D33DCBBM.js → chunk-ZEQOP7XA.js} +2 -2
  120. package/dist/{chunk-YBUZQGMX.js → chunk-ZFYCYUVY.js} +2 -2
  121. package/dist/{chunk-LFSSI7W3.js → chunk-ZH3SXWCV.js} +42 -15
  122. package/dist/{chunk-TJUJJYJC.js → chunk-ZNFYQMFN.js} +2 -2
  123. package/dist/{clean-PMM6YUQ3.js → clean-PILJFGU2.js} +20 -21
  124. package/dist/cli.js +62 -62
  125. package/dist/{cloud-D3WTNTF2.js → cloud-D7DFYONW.js} +4 -4
  126. package/dist/{cloud-OIPASJZZ.js → cloud-HBMQH4EU.js} +4 -4
  127. package/dist/{cloudrun-3TXJ2QOV.js → cloudrun-JZQMF5DS.js} +6 -7
  128. package/dist/commands/layout-audit.browser.js +287 -23
  129. package/dist/{compare-NC7JQXZH.js → compare-5RSAPYJI.js} +32 -33
  130. package/dist/{compiler-C2HCN5CA.js → compiler-T4BPLRFY.js} +4 -4
  131. package/dist/{component-M2VJD3QI.js → component-DMHFV7BD.js} +3 -3
  132. package/dist/{compositions-3QMQV5OS.js → compositions-OW776OLK.js} +14 -15
  133. package/dist/{curve-S3VZXTYX.js → curve-4GNM7DWM.js} +14 -15
  134. package/dist/{cuts-O3OKZGPU.js → cuts-M5R2LKDZ.js} +15 -16
  135. package/dist/{delete-RFDRT4K6.js → delete-MYG77L66.js} +7 -7
  136. package/dist/{deploy-LIQXICPP.js → deploy-FGHE4FID.js} +1 -1
  137. package/dist/{describeProject-IUAV4C55.js → describeProject-SLAKVOOS.js} +11 -12
  138. package/dist/{deterministicFonts-DQDB47K3.js → deterministicFonts-IXXU76SA.js} +1 -1
  139. package/dist/{diff-F434Y7GL.js → diff-TNHEXG72.js} +35 -36
  140. package/dist/{dist-KA45Z5SZ.js → dist-23VTYBIX.js} +11 -12
  141. package/dist/{dist-URQMS2HM.js → dist-5ITUK4AA.js} +6 -4
  142. package/dist/{dist-6N5S5326.js → dist-PEDQQRFU.js} +17 -17
  143. package/dist/docs/motion-blur.md +3 -5
  144. package/dist/{doctor-VAEAFW3N.js → doctor-ILCPSC6S.js} +14 -15
  145. package/dist/{energy-HQG367CH.js → energy-SCJII6HC.js} +15 -16
  146. package/dist/{events-R55FOR6B.js → events-D2QORX35.js} +2 -2
  147. package/dist/{events-M457QJCL.js → events-OHIGKF4W.js} +16 -4
  148. package/dist/{events-3HQKXGJN.js → events-ZMK5VRA2.js} +17 -18
  149. package/dist/{extract-KSYOILWX.js → extract-OD3LI3YL.js} +15 -16
  150. package/dist/{face-IOYVA3KO.js → face-SFQDTQXC.js} +15 -16
  151. package/dist/{feedback-OLY2Y2HB.js → feedback-N3JK4ULK.js} +18 -19
  152. package/dist/{ffmpeg-POWBUKIU.js → ffmpeg-E55HQX7V.js} +10 -11
  153. package/dist/{figma-PYAOGAQ7.js → figma-JYVZPN5L.js} +3 -3
  154. package/dist/fontLocalizeCli.js +14 -15
  155. package/dist/{frames-RIUU6JZF.js → frames-BLCIN32Q.js} +16 -17
  156. package/dist/{generate-TVFTFEHB.js → generate-B7MUYYON.js} +27 -28
  157. package/dist/{get-ASVUBVPU.js → get-VQWG2NY4.js} +7 -7
  158. package/dist/{gpuPolicy-QDYHFIDS.js → gpuPolicy-3TMFL6TM.js} +10 -11
  159. package/dist/{grade-compare-2TVGR2WJ.js → grade-compare-LCS5CBNW.js} +33 -34
  160. package/dist/{heifImagePrep-ZDQ6FE6L.js → heifImagePrep-VHAJEZGL.js} +11 -12
  161. package/dist/{help-MZHLMNGB.js → help-GSE5DFSB.js} +1 -1
  162. package/dist/{history-CCPMGESN.js → history-RSB65UN3.js} +19 -8
  163. package/dist/hyperframe.manifest.json +1 -1
  164. package/dist/hyperframe.runtime.iife.js +65 -65
  165. package/dist/hyperframes-player.global.js +1 -1
  166. package/dist/{info-5CRW7PXR.js → info-FLLONVY5.js} +16 -17
  167. package/dist/{init-6U5JDVOC.js → init-EAKY3LFR.js} +30 -31
  168. package/dist/{ink-BVK6K2CB.js → ink-ZDZVD5CD.js} +15 -16
  169. package/dist/{inspect-NUGGYSLQ.js → inspect-LFEK6HOL.js} +33 -34
  170. package/dist/{installer-TBUJ66L6.js → installer-5NJVGV6X.js} +6 -7
  171. package/dist/{keyframes-N5637YSK.js → keyframes-TZBDB442.js} +16 -8
  172. package/dist/{lambda-VPSI7MTF.js → lambda-RYX5NXX5.js} +14 -15
  173. package/dist/{layout-FHJ2SQTW.js → layout-VATFBERH.js} +33 -34
  174. package/dist/{lint-XPRHASUK.js → lint-QAGBHUXZ.js} +27 -13
  175. package/dist/{lintProject-6TML32JZ.js → lintProject-BC5ISNKQ.js} +2 -2
  176. package/dist/{list-TST4Z4GR.js → list-VQZOLGEO.js} +7 -7
  177. package/dist/{localPage-NR4NBUTZ.js → localPage-ZEJ7ZKIE.js} +10 -11
  178. package/dist/{login-64KOPWVK.js → login-7BL2N6JG.js} +6 -6
  179. package/dist/{logout-EQ2HJDL4.js → logout-EKDVIU6Y.js} +2 -2
  180. package/dist/{look-VBHITYXG.js → look-OKDV2W4W.js} +15 -16
  181. package/dist/{manager-OAK67I5F.js → manager-QPEMMSLW.js} +11 -12
  182. package/dist/{measure-NNQ6XXH2.js → measure-WJ6TR545.js} +11 -11
  183. package/dist/{media-treatment-M2X3Q5NV.js → media-treatment-QYQVLCYP.js} +16 -17
  184. package/dist/{media-use-ZGJJL6KV.js → media-use-OWKQQSPJ.js} +4 -4
  185. package/dist/{models-Y24YJJ6P.js → models-FZ4HL5BX.js} +14 -15
  186. package/dist/{motionShot-KMU2SMX6.js → motionShot-IHZ544WM.js} +19 -20
  187. package/dist/{normalize-audio-27XH53UL.js → normalize-audio-77ZTAPPL.js} +11 -12
  188. package/dist/{open-6MLQR2BC.js → open-Q7AAAYVN.js} +70 -20
  189. package/dist/{parakeetRunner-BMK7KY7W.js → parakeetRunner-TAMKXXNN.js} +15 -16
  190. package/dist/{pipeline-AILSBZUB.js → pipeline-MK7LCHQD.js} +13 -14
  191. package/dist/{play-VTM2B4CS.js → play-WBLWBDBS.js} +22 -23
  192. package/dist/{preflight-IRQCF5ZW.js → preflight-O2EH2LOC.js} +11 -12
  193. package/dist/{present-JQH4CETR.js → present-3GW46ZYF.js} +18 -19
  194. package/dist/{preview-KGMCKLBI.js → preview-MPAHNXEJ.js} +57 -504
  195. package/dist/{probe-IP6W7U4A.js → probe-4F2PK26B.js} +15 -16
  196. package/dist/{producer-PRYLGX6W.js → producer-T462QJC7.js} +1 -1
  197. package/dist/{projectConfig-6WPGQGI3.js → projectConfig-T3WVF6H4.js} +8 -9
  198. package/dist/{publication-25E6ZMLB.js → publication-DX3VDYCI.js} +4 -5
  199. package/dist/{publish-6QT26AMU.js → publish-VNMKJMAK.js} +15 -16
  200. package/dist/{refresh-ARZZRKMP.js → refresh-ZHLUUENK.js} +2 -2
  201. package/dist/{remove-background-CVQQZNQQ.js → remove-background-7LE4IIOE.js} +14 -15
  202. package/dist/{render-3VHULZTP.js → render-5PTZ5VLW.js} +7 -8
  203. package/dist/{render-PUXPIIGJ.js → render-JKUR7OI2.js} +76 -39
  204. package/dist/{render-VMHF2RVD.js → render-RPHNBD4F.js} +42 -39
  205. package/dist/{render-batch-UKWKZUJM.js → render-batch-X2QMZUYH.js} +7 -8
  206. package/dist/renderSetupWorker.js +11 -8
  207. package/dist/{resolver-KEMGGVU7.js → resolver-AXDCEJ77.js} +6 -7
  208. package/dist/{reverse-4BCCUHPA.js → reverse-DQSOSC5W.js} +1 -1
  209. package/dist/{run-WZP6HXIH.js → run-IQLZHH6D.js} +5 -5
  210. package/dist/{screenshotCapture-VGOH65YU.js → screenshotCapture-EAATIOT3.js} +11 -12
  211. package/dist/{sherpa-AQJGVMWJ.js → sherpa-NPPB3DTN.js} +14 -15
  212. package/dist/skills/hyperframes/references/motion.md +1 -1
  213. package/dist/skills/hyperframes/references/storyboard.md +1 -1
  214. package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +1 -1
  215. package/dist/skills/hyperframes-cli/references/preview-render.md +1 -1
  216. package/dist/skills/media-use/audio/scripts/audio.mjs +56 -26
  217. package/dist/skills/media-use/audio/scripts/lib/media-record.mjs +3 -3
  218. package/dist/skills/media-use/audio/scripts/lib/media-record.test.mjs +16 -1
  219. package/dist/skills/media-use/audio/scripts/lib/recording.mjs +53 -0
  220. package/dist/skills/media-use/audio/scripts/lib/voice-credit.mjs +17 -0
  221. package/dist/skills/media-use/audio/scripts/lib/voice-credit.test.mjs +21 -0
  222. package/dist/skills/media-use/audio/scripts/recording.test.mjs +139 -0
  223. package/dist/skills/media-use/references/audio.md +2 -1
  224. package/dist/skills/media-use/references/heygen.md +9 -9
  225. package/dist/{skills-VB4OXS7B.js → skills-S2ODBBMC.js} +19 -7
  226. package/dist/{skillsUpdateCheck-HMGBIR2Z.js → skillsUpdateCheck-AOCZDRXM.js} +3 -3
  227. package/dist/{snapshot-SXWIDOD3.js → snapshot-SS6WDSZ5.js} +40 -41
  228. package/dist/{src-IEVHZX7S.js → src-HHRR3UTF.js} +13 -14
  229. package/dist/{src-RETKK67M.js → src-MYVZPRHS.js} +20 -19
  230. package/dist/{start-PDD5527T.js → start-OYIXMJKF.js} +24 -25
  231. package/dist/{staticProjectServer-GJQCWV7Y.js → staticProjectServer-65X4MWEN.js} +21 -22
  232. package/dist/{status-N6FGW6E2.js → status-JEYVWANY.js} +16 -17
  233. package/dist/studio/assets/{hyperframes-player-Dszy0WKm.js → hyperframes-player-DqxUNa9H.js} +1 -1
  234. package/dist/studio/assets/index-Bgfyny02.css +1 -0
  235. package/dist/studio/assets/{index-CWYuXWlI.js → index-CFUJyYA1.js} +1 -1
  236. package/dist/studio/assets/{index-BeR5xCi5.js → index-Cq43Ovkf.js} +196 -196
  237. package/dist/studio/index.html +2 -2
  238. package/dist/{studio-api-IAELPUY4.js → studio-api-GJGFGQQW.js} +11 -12
  239. package/dist/{studioServer-XTVVJA3E.js → studioServer-IS27DJNF.js} +66 -59
  240. package/dist/{sync-SDUSYR4M.js → sync-NLK2RFSR.js} +15 -16
  241. package/dist/{telemetry-IXOTZW4E.js → telemetry-BMPRZBBX.js} +22 -2
  242. package/dist/{telemetry-U4VJBESU.js → telemetry-BPPPHER2.js} +16 -4
  243. package/dist/templates/_shared/AGENTS.md +3 -1
  244. package/dist/templates/_shared/CLAUDE.md +3 -1
  245. package/dist/{templates-VFKKDFCR.js → templates-YWBAFFI4.js} +25 -26
  246. package/dist/{timeline-62HYU4LF.js → timeline-FAFHG2G4.js} +21 -22
  247. package/dist/{tokens-XJUQMDBP.js → tokens-QCZBFNMS.js} +2 -2
  248. package/dist/{transcribe-7IPTYLH2.js → transcribe-2P6GMYWR.js} +29 -30
  249. package/dist/{transcribe-RRGMCQBP.js → transcribe-VL3YKFMY.js} +13 -14
  250. package/dist/{update-EAL42IMG.js → update-NWDCG6JG.js} +20 -8
  251. package/dist/{updateCheck-CCDI422O.js → updateCheck-PX4XSKDO.js} +2 -2
  252. package/dist/{upgrade-A73PJHPY.js → upgrade-VWETDZDT.js} +3 -3
  253. package/dist/{upload-YQMBLKH5.js → upload-PEY7EYFV.js} +7 -2
  254. package/dist/{urlDownloader-JZIEE3AD.js → urlDownloader-7TVBPNBG.js} +9 -10
  255. package/dist/{validate-N6F4N34T.js → validate-HCJAHDTZ.js} +27 -28
  256. package/dist/{video-6LPKR7VA.js → video-JDUB5IFM.js} +11 -12
  257. package/dist/{voices-LFPLTLKV.js → voices-YBKCBC6K.js} +30 -29
  258. package/dist/warmCheck.js +41 -42
  259. package/package.json +1 -1
  260. package/dist/chunk-GDQQ4U3L.js +0 -226
  261. package/dist/chunk-TK7THLRO.js +0 -65
  262. package/dist/chunk-X7SYA4OP.js +0 -5035
  263. package/dist/studio/assets/index-CNZk2EFC.css +0 -1
@@ -0,0 +1,525 @@
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
+ HyperframesApiError
9
+ } from "./chunk-D3NWGOXW.js";
10
+ import {
11
+ hyperframesConfigDir
12
+ } from "./chunk-GR2E54E6.js";
13
+
14
+ // src/cloud/upload.ts
15
+ import { createHash } from "crypto";
16
+ import { createReadStream as createReadStream2 } from "fs";
17
+
18
+ // src/cloud/uploadPut.ts
19
+ import { createReadStream } from "fs";
20
+ import { request as httpRequest } from "http";
21
+ import { request as httpsRequest } from "https";
22
+ import { Readable } from "stream";
23
+ import { pipeline } from "stream/promises";
24
+ var putTimings = {
25
+ stallMs: 6e4,
26
+ retries: 3,
27
+ backoffMs: 1e3,
28
+ progressMs: 1e4,
29
+ sampleMs: 1e3
30
+ };
31
+ var CUT_CODES = /* @__PURE__ */ new Set(["ECONNRESET", "EPIPE", "ECONNABORTED"]);
32
+ function isConnectionCut(err) {
33
+ const code = err.code;
34
+ return typeof code === "string" && CUT_CODES.has(code) || /socket hang up/.test(String(err));
35
+ }
36
+ function isSameCut(before, now) {
37
+ return before.sent > 0 && now.sent > 0 && Math.abs(before.ageMs - now.ageMs) <= 0.2 * Math.max(before.ageMs, now.ageMs);
38
+ }
39
+ function seconds(ms) {
40
+ return `${Math.round(ms / 1e3)} s`;
41
+ }
42
+ function exhausted(err, tries, last, total) {
43
+ const base = err instanceof Error ? err.message : String(err);
44
+ const percent = total > 0 ? Math.floor(100 * last.sent / total) : 0;
45
+ return Object.assign(
46
+ new Error(
47
+ `${base} (${tries} tries, each from the first byte; the last got ${percent}% of the file through in ${seconds(last.ageMs)})`,
48
+ { cause: err }
49
+ ),
50
+ { code: err.code }
51
+ );
52
+ }
53
+ var PutRefusedError = class extends Error {
54
+ constructor(status, message) {
55
+ super(message);
56
+ this.status = status;
57
+ }
58
+ status;
59
+ };
60
+ function isFinal(err) {
61
+ const code = err.code;
62
+ return err instanceof PutRefusedError && err.status < 500 || code === "ENOENT" || code === "EACCES";
63
+ }
64
+ function repeatedCut(before, now, err, total) {
65
+ if (!before?.cut || !now.cut || !isSameCut(before, now)) return void 0;
66
+ const code = err.code;
67
+ return Object.assign(
68
+ new Error(
69
+ `The connection was cut at ${seconds(now.ageMs)} on two tries in a row, after ${Math.floor(100 * now.sent / total)}% of the file was sent (${code ?? "connection reset"}). Every try restarts the file, so this link cannot finish it before the cut: use a faster connection or send less media.`,
70
+ { cause: err }
71
+ ),
72
+ { code }
73
+ );
74
+ }
75
+ async function putWithRetry(attempt, total, signal) {
76
+ let before;
77
+ for (let tried = 0; ; tried++) {
78
+ const current = { attempt: tried + 1, startedAt: Date.now(), sent: 0 };
79
+ try {
80
+ return await attempt(current);
81
+ } catch (err) {
82
+ if (isFinal(err) || signal?.aborted) throw err;
83
+ const now = { ...current, ageMs: Date.now() - current.startedAt, cut: isConnectionCut(err) };
84
+ const futile = repeatedCut(before, now, err, total);
85
+ if (futile) throw futile;
86
+ if (tried >= putTimings.retries) throw exhausted(err, tried + 1, now, total);
87
+ before = now;
88
+ await sleep(putTimings.backoffMs * 2 ** tried, signal);
89
+ }
90
+ }
91
+ }
92
+ function sleep(ms, signal) {
93
+ return new Promise((resolve) => {
94
+ const timer = setTimeout(resolve, ms);
95
+ signal?.addEventListener("abort", () => (clearTimeout(timer), resolve()), { once: true });
96
+ });
97
+ }
98
+ var SLICE_BYTES = 64 * 1024;
99
+ function bodyStream(body, range) {
100
+ if (!(body instanceof Uint8Array))
101
+ return createReadStream(
102
+ body.path,
103
+ range && { start: range.start, end: range.start + range.length - 1 }
104
+ );
105
+ const from = range?.start ?? 0;
106
+ const to = from + (range?.length ?? body.byteLength);
107
+ return Readable.from(
108
+ (function* () {
109
+ for (let at = from; at < to; at += SLICE_BYTES)
110
+ yield body.subarray(at, Math.min(at + SLICE_BYTES, to));
111
+ })()
112
+ );
113
+ }
114
+ function watchStall(req, onSample) {
115
+ let written = -1;
116
+ let movedAt = Date.now();
117
+ const watch = setInterval(
118
+ () => {
119
+ const now = req.socket?.bytesWritten ?? 0;
120
+ onSample(now);
121
+ if (now !== written) [written, movedAt] = [now, Date.now()];
122
+ else if (Date.now() - movedAt >= putTimings.stallMs)
123
+ req.destroy(new Error(`Upload stalled: no data sent for ${putTimings.stallMs / 1e3} s`));
124
+ },
125
+ Math.min(putTimings.sampleMs, putTimings.stallMs / 3)
126
+ );
127
+ return () => clearInterval(watch);
128
+ }
129
+ async function putStreamToPresignedUrl(uploadUrl, headers, body, signal, onSample, range) {
130
+ const size = range?.length ?? (body instanceof Uint8Array ? body.byteLength : body.size);
131
+ const send = new URL(uploadUrl).protocol === "https:" ? httpsRequest : httpRequest;
132
+ const req = send(uploadUrl, {
133
+ method: "PUT",
134
+ signal,
135
+ headers: { ...headers, "content-length": String(size) }
136
+ });
137
+ const response = new Promise((resolve, reject) => {
138
+ req.once("response", resolve).once("error", reject);
139
+ });
140
+ const stopWatching = watchStall(req, onSample);
141
+ const source = bodyStream(body, range);
142
+ const sent = pipeline(source, req);
143
+ let res;
144
+ try {
145
+ res = await response;
146
+ } catch (err) {
147
+ await sent.catch(() => void 0);
148
+ throw err;
149
+ } finally {
150
+ stopWatching();
151
+ }
152
+ await settle(res, sent);
153
+ return String(res.headers.etag ?? "") || void 0;
154
+ }
155
+ async function settle(res, sent) {
156
+ const status = res.statusCode ?? 0;
157
+ const ok = status >= 200 && status < 300;
158
+ await sent.catch((err) => {
159
+ if (ok) throw err;
160
+ });
161
+ let detail = "";
162
+ for await (const chunk of res) detail += String(chunk);
163
+ if (!ok) {
164
+ throw new PutRefusedError(
165
+ status,
166
+ `Direct upload PUT failed: ${status} ${res.statusMessage ?? ""}${detail ? ` \u2014 ${detail.slice(0, 300)}` : ""}`
167
+ );
168
+ }
169
+ }
170
+
171
+ // src/cloud/uploadParts.ts
172
+ import { mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
173
+ import { dirname } from "path";
174
+ var PARTS_ABOVE_BYTES = 16 * 1024 * 1024;
175
+ var PARTS_IN_FLIGHT = 3;
176
+ function savedUploadFile(sha256, size) {
177
+ return hyperframesConfigDir("uploads", `${sha256.slice(0, 32)}-${size}.json`);
178
+ }
179
+ function readSaved(file) {
180
+ try {
181
+ return JSON.parse(readFileSync(file, "utf8"));
182
+ } catch {
183
+ return void 0;
184
+ }
185
+ }
186
+ function forgetSaved(file) {
187
+ rmSync(file, { force: true });
188
+ }
189
+ function saveUpload(file, saved) {
190
+ try {
191
+ mkdirSync(dirname(file), { recursive: true, mode: 448 });
192
+ writeFileSync(file, JSON.stringify(saved), { mode: 384 });
193
+ } catch {
194
+ }
195
+ }
196
+ async function resumable(client, file) {
197
+ const saved = readSaved(file);
198
+ if (!saved) return void 0;
199
+ try {
200
+ await client.listAssetUploadParts({
201
+ asset_id: saved.asset_id,
202
+ multipart_upload_id: saved.plan.multipart_upload_id
203
+ });
204
+ return saved;
205
+ } catch {
206
+ forgetSaved(file);
207
+ return void 0;
208
+ }
209
+ }
210
+ function partRange(plan, total, number) {
211
+ const start = (number - 1) * plan.part_size_bytes;
212
+ return { start, length: Math.min(plan.part_size_bytes, total - start) };
213
+ }
214
+ async function uploadParts(job) {
215
+ const { client, asset_id, plan, total } = job;
216
+ const id = plan.multipart_upload_id;
217
+ const held = await client.listAssetUploadParts({ asset_id, multipart_upload_id: id });
218
+ const done = /* @__PURE__ */ new Map();
219
+ for (const part of held.parts) {
220
+ const range = partRange(plan, total, part.part_number);
221
+ if (part.size_bytes === range.length) done.set(part.part_number, part.etag);
222
+ }
223
+ const progress = partsProgress(
224
+ job,
225
+ [...done.keys()].reduce((sum, n) => sum + partRange(plan, total, n).length, 0)
226
+ );
227
+ progress.report(1);
228
+ const todo = Array.from({ length: plan.part_count }, (_, i) => i + 1).filter((n) => !done.has(n));
229
+ const failure = {};
230
+ const worker = async () => {
231
+ for (let number = todo.shift(); number !== void 0; number = todo.shift()) {
232
+ if (failure.error) return;
233
+ try {
234
+ done.set(number, await sendPart(job, number, progress));
235
+ progress.finish(number, partRange(plan, total, number).length);
236
+ } catch (err) {
237
+ failure.error ??= err;
238
+ return;
239
+ }
240
+ }
241
+ };
242
+ await Promise.all(Array.from({ length: Math.min(PARTS_IN_FLIGHT, todo.length) }, worker));
243
+ if (failure.error) throw failure.error;
244
+ return [...done.entries()].sort((a, b) => a[0] - b[0]).map(([part_number, etag]) => ({ part_number, etag }));
245
+ }
246
+ function partsProgress(job, finishedBytes) {
247
+ const live = /* @__PURE__ */ new Map();
248
+ let finished = finishedBytes;
249
+ let lastAt = Date.now();
250
+ let lastPercent = -5;
251
+ const report = (attempt) => {
252
+ const sent = Math.min(job.total, finished + [...live.values()].reduce((a, b) => a + b, 0));
253
+ const percent = job.total > 0 ? Math.min(99, Math.floor(100 * sent / job.total)) : 0;
254
+ const now = Date.now();
255
+ if (now - lastAt < putTimings.progressMs && percent < lastPercent + 5) return;
256
+ [lastAt, lastPercent] = [now, percent];
257
+ job.onProgress?.({ phase: "upload", percent, sentBytes: sent, totalBytes: job.total, attempt });
258
+ };
259
+ return {
260
+ report,
261
+ written: (number, bytes, attempt) => (live.set(number, bytes), report(attempt)),
262
+ finish: (number, bytes) => (finished += bytes, live.delete(number), report(1))
263
+ };
264
+ }
265
+ async function sendPart(job, number, progress) {
266
+ const { client, asset_id, plan, body, total, signal } = job;
267
+ const range = partRange(plan, total, number);
268
+ return putWithRetry(
269
+ async (tried) => {
270
+ const minted = await client.getAssetUploadPartUrls({
271
+ asset_id,
272
+ body: { multipart_upload_id: plan.multipart_upload_id, part_numbers: [number] },
273
+ signal
274
+ });
275
+ const url = minted.parts.find((part) => part.part_number === number)?.upload_url;
276
+ if (!url) throw new Error(`The cloud gave no address for part ${number}`);
277
+ progress.written(number, 0, tried.attempt);
278
+ const etag = await putStreamToPresignedUrl(
279
+ url,
280
+ {},
281
+ body,
282
+ signal,
283
+ (written) => {
284
+ tried.sent = written;
285
+ progress.written(number, Math.min(written, range.length), tried.attempt);
286
+ },
287
+ range
288
+ );
289
+ if (!etag) throw new Error(`The cloud gave no ETag for part ${number}`);
290
+ return etag;
291
+ },
292
+ range.length,
293
+ signal
294
+ );
295
+ }
296
+
297
+ // src/cloud/upload.ts
298
+ var CONTENT_TYPE_ZIP = "application/zip";
299
+ function progressReporter(total, emit) {
300
+ let lastAt = Date.now();
301
+ let lastPercent = 0;
302
+ return (tried) => {
303
+ const percent = total > 0 ? Math.min(99, Math.floor(100 * tried.sent / total)) : 0;
304
+ const now = Date.now();
305
+ if (now - lastAt < putTimings.progressMs && percent < lastPercent + 5) return;
306
+ [lastAt, lastPercent] = [now, percent];
307
+ emit?.({
308
+ phase: "upload",
309
+ percent,
310
+ sentBytes: Math.min(tried.sent, total),
311
+ totalBytes: total,
312
+ attempt: tried.attempt
313
+ });
314
+ };
315
+ }
316
+ function sha256Hex(bytes) {
317
+ return createHash("sha256").update(bytes).digest("hex");
318
+ }
319
+ async function sha256OfFile(path) {
320
+ const hash = createHash("sha256");
321
+ for await (const chunk of createReadStream2(path)) hash.update(chunk);
322
+ return hash.digest("hex");
323
+ }
324
+ function normalizeUploadHeaders(raw) {
325
+ const out = {};
326
+ for (const [k, v] of Object.entries(raw ?? {})) {
327
+ if (typeof v === "string") out[k] = v;
328
+ else if (typeof v === "number" || typeof v === "boolean") out[k] = String(v);
329
+ }
330
+ return out;
331
+ }
332
+ async function putBytesToPresignedUrl(fetchImpl, uploadUrl, uploadHeaders, body, contentType, signal, onProgress) {
333
+ const total = body instanceof Uint8Array ? body.byteLength : body.size;
334
+ const report = progressReporter(total, onProgress);
335
+ const headers = {
336
+ "content-type": contentType,
337
+ ...normalizeUploadHeaders(uploadHeaders)
338
+ };
339
+ return putWithRetry(
340
+ async (tried) => {
341
+ if (tried.attempt > 1)
342
+ onProgress?.({
343
+ phase: "upload",
344
+ percent: 0,
345
+ sentBytes: 0,
346
+ totalBytes: total,
347
+ attempt: tried.attempt
348
+ });
349
+ await (fetchImpl && body instanceof Uint8Array ? putBytesOnce(fetchImpl, uploadUrl, headers, body, signal) : putStreamToPresignedUrl(uploadUrl, headers, body, signal, (written) => {
350
+ tried.sent = written;
351
+ report(tried);
352
+ }));
353
+ },
354
+ total,
355
+ signal
356
+ );
357
+ }
358
+ async function putBytesOnce(fetchImpl, uploadUrl, headers, body, signal) {
359
+ const res = await fetchImpl(uploadUrl, {
360
+ method: "PUT",
361
+ signal,
362
+ headers,
363
+ body
364
+ });
365
+ if (!res.ok) {
366
+ const detail = await res.text().catch(() => "");
367
+ throw new PutRefusedError(
368
+ res.status,
369
+ `Direct upload PUT failed: ${res.status} ${res.statusText}${detail ? ` \u2014 ${detail.slice(0, 300)}` : ""}`
370
+ );
371
+ }
372
+ }
373
+ var completeWait = {
374
+ baseMs: 3e4,
375
+ perMiBMs: 500,
376
+ maxMs: 6e5,
377
+ firstPollMs: 500,
378
+ maxPollMs: 5e3
379
+ };
380
+ function completeBudgetMs(sizeBytes) {
381
+ const scaled = completeWait.baseMs + sizeBytes / (1024 * 1024) * completeWait.perMiBMs;
382
+ return Math.min(completeWait.maxMs, scaled);
383
+ }
384
+ async function completeWithRetry(client, asset_id, checksum_sha256, sizeBytes, signal, inParts = {}) {
385
+ const budget = completeBudgetMs(sizeBytes);
386
+ const startedAt = Date.now();
387
+ let poll = completeWait.firstPollMs;
388
+ for (; ; ) {
389
+ try {
390
+ return await client.completeAssetUpload({ asset_id, body: { checksum_sha256, ...inParts } });
391
+ } catch (err) {
392
+ if (!(err instanceof HyperframesApiError && err.status === 409)) throw err;
393
+ const left = startedAt + budget - Date.now();
394
+ if (left <= 0) {
395
+ throw new Error(
396
+ `The file was uploaded, but the cloud had not finished checking it after ${Math.round(budget / 1e3)} s. Try again in a few minutes.`,
397
+ { cause: err }
398
+ );
399
+ }
400
+ await sleep(Math.min(poll, left), signal);
401
+ if (signal?.aborted)
402
+ throw new Error("Stopped waiting for the cloud to finish checking the uploaded file.", {
403
+ cause: signal.reason
404
+ });
405
+ poll = Math.min(poll * 2, completeWait.maxPollMs);
406
+ }
407
+ }
408
+ }
409
+ var TYPE_REFUSAL = /^(Stored file type|content_type not allowed|Stored file does not have a ZIP)/;
410
+ var STATUSES_NOT_ABOUT_THE_FILE = /* @__PURE__ */ new Set([401, 403, 408, 409, 429]);
411
+ function refusesTheFile(err) {
412
+ return err instanceof HyperframesApiError && err.status >= 400 && err.status < 500 && !STATUSES_NOT_ABOUT_THE_FILE.has(err.status);
413
+ }
414
+ function nameRefusedFile(err, filename, contentType) {
415
+ if (!(err instanceof HyperframesApiError) || err.code !== "invalid_parameter") return err;
416
+ const kind = contentType.split("/")[0];
417
+ const noun = kind === "audio" || kind === "video" || kind === "image" ? `${kind} file` : "file";
418
+ const lead = TYPE_REFUSAL.test(err.message) ? `The cloud couldn't read this ${noun}'s type: ${filename}. It said:` : `The cloud refused ${filename}:`;
419
+ return new HyperframesApiError({ ...err, message: `${lead} ${err.message}` });
420
+ }
421
+ async function createUpload(client, o) {
422
+ const body = {
423
+ filename: o.filename,
424
+ content_type: o.contentType,
425
+ size_bytes: o.size_bytes,
426
+ checksum_sha256: o.checksum_sha256
427
+ };
428
+ try {
429
+ return await client.createAssetUpload({
430
+ body: o.inParts ? { ...body, multipart: true } : body,
431
+ idempotencyKey: o.idempotencyKey
432
+ });
433
+ } catch (err) {
434
+ const unknownField = err instanceof HyperframesApiError && (err.status === 400 || err.status === 422);
435
+ if (!o.inParts || !unknownField) throw err;
436
+ return await client.createAssetUpload({ body, idempotencyKey: o.idempotencyKey });
437
+ }
438
+ }
439
+ async function sendInParts(opts, body, size_bytes, asset_id, plan, saved) {
440
+ if (saved) saveUpload(saved, { asset_id, plan });
441
+ const parts = await uploadParts({
442
+ client: opts.client,
443
+ asset_id,
444
+ plan,
445
+ body,
446
+ total: size_bytes,
447
+ onProgress: opts.onProgress,
448
+ signal: opts.signal
449
+ });
450
+ return {
451
+ asset_id,
452
+ inParts: { multipart_upload_id: plan.multipart_upload_id, parts },
453
+ forget: saved ? () => forgetSaved(saved) : void 0
454
+ };
455
+ }
456
+ async function sendFile(opts, body, size_bytes, checksum_sha256) {
457
+ const wantParts = size_bytes > PARTS_ABOVE_BYTES;
458
+ const saved = wantParts ? savedUploadFile(checksum_sha256, size_bytes) : void 0;
459
+ const resumed = saved ? await resumable(opts.client, saved) : void 0;
460
+ if (resumed) {
461
+ opts.onProgress?.({ phase: "upload", percent: 0 });
462
+ return sendInParts(opts, body, size_bytes, resumed.asset_id, resumed.plan, saved);
463
+ }
464
+ const created = await createUpload(opts.client, {
465
+ filename: opts.filename,
466
+ contentType: opts.contentType,
467
+ size_bytes,
468
+ checksum_sha256,
469
+ inParts: wantParts,
470
+ idempotencyKey: opts.idempotencyKey
471
+ });
472
+ opts.onProgress?.({ phase: "upload", percent: 0 });
473
+ if (created.multipart) {
474
+ return sendInParts(opts, body, size_bytes, created.asset_id, created.multipart, saved);
475
+ }
476
+ await putBytesToPresignedUrl(
477
+ opts.fetchImpl,
478
+ created.upload_url,
479
+ created.upload_headers,
480
+ body,
481
+ opts.contentType,
482
+ opts.signal,
483
+ opts.onProgress
484
+ );
485
+ return { asset_id: created.asset_id, inParts: {} };
486
+ }
487
+ async function uploadAssetViaDirectUpload(opts) {
488
+ const start = Date.now();
489
+ const body = "bytes" in opts ? opts.bytes : { path: opts.path, size: opts.size };
490
+ const size_bytes = body instanceof Uint8Array ? body.byteLength : body.size;
491
+ const checksum_sha256 = body instanceof Uint8Array ? sha256Hex(body) : await sha256OfFile(body.path);
492
+ opts.onProgress?.({ phase: "initialize" });
493
+ const sent = await sendFile(opts, body, size_bytes, checksum_sha256);
494
+ opts.onProgress?.({ phase: "upload", percent: 100 });
495
+ opts.onProgress?.({ phase: "complete" });
496
+ const completed = await completeWithRetry(
497
+ opts.client,
498
+ sent.asset_id,
499
+ checksum_sha256,
500
+ size_bytes,
501
+ opts.signal,
502
+ sent.inParts
503
+ ).catch((err) => {
504
+ if (refusesTheFile(err)) sent.forget?.();
505
+ throw nameRefusedFile(err, opts.filename, opts.contentType);
506
+ });
507
+ sent.forget?.();
508
+ return {
509
+ asset_id: completed.asset_id,
510
+ url: completed.url,
511
+ size_bytes,
512
+ duration_ms: Date.now() - start
513
+ };
514
+ }
515
+ function uploadZipViaDirectUpload(opts) {
516
+ return uploadAssetViaDirectUpload({ ...opts, contentType: CONTENT_TYPE_ZIP });
517
+ }
518
+
519
+ export {
520
+ putTimings,
521
+ completeBudgetMs,
522
+ completeWithRetry,
523
+ uploadAssetViaDirectUpload,
524
+ uploadZipViaDirectUpload
525
+ };
@@ -6,19 +6,19 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  refreshIfNeeded
9
- } from "./chunk-J3QW55W5.js";
9
+ } from "./chunk-H6676SHA.js";
10
10
  import {
11
11
  buildAuthHeaders,
12
12
  envCredentialVar,
13
13
  isTokenExpired,
14
14
  tryResolveCredential
15
- } from "./chunk-L24NAUBS.js";
15
+ } from "./chunk-KBHBSWEE.js";
16
16
  import {
17
17
  isAuthError
18
18
  } from "./chunk-LP7B3JLC.js";
19
19
  import {
20
20
  projectIgnore
21
- } from "./chunk-NTMMUK6Q.js";
21
+ } from "./chunk-LLUKDUVS.js";
22
22
  import {
23
23
  CSS_URL_RE,
24
24
  isNonRelativeUrl,
@@ -122,7 +122,7 @@ function writeTeamProject(projectDir, team) {
122
122
  }
123
123
 
124
124
  // src/utils/publishProject.ts
125
- import { basename, dirname, join as join2, posix, relative, resolve as resolve2 } from "path";
125
+ import { basename, dirname, isAbsolute, join as join2, posix, relative, resolve as resolve2 } from "path";
126
126
  import {
127
127
  closeSync,
128
128
  existsSync as existsSync2,
@@ -400,17 +400,47 @@ function addExternalAsset(ctx, absPath) {
400
400
  ctx.usedArchivePaths.add(archivePath);
401
401
  return archivePath;
402
402
  }
403
- function tryResolveExternal(ctx, rawPath, referrerAbsDir) {
404
- if (isNonRelativeUrl(rawPath)) return null;
405
- for (const path of decodeUrlPathVariants(rawPath)) {
406
- const absPath = resolve2(referrerAbsDir, path);
407
- if (isPathInside(absPath, ctx.absProjectDir)) return null;
408
- try {
409
- if (!existsSync2(absPath) || !statSync(absPath).isFile()) continue;
410
- } catch {
411
- continue;
403
+ function includeReferencedProjectFile(ctx, resolvedPath, rawPath, requireOnDisk) {
404
+ const fromRoot = resolve2(ctx.absProjectDir, rawPath);
405
+ for (const candidate of [resolvedPath, fromRoot]) {
406
+ const absPath = candidate.replace(/[?#].*$/, "");
407
+ if (!isPathInside(absPath, ctx.absProjectDir)) continue;
408
+ const rel = relative(ctx.absProjectDir, absPath).replaceAll("\\", "/");
409
+ if (!rel || ctx.fileContents.has(rel) || rel.split("/").some(shouldIgnoreSegment)) return;
410
+ if (!existsSync2(absPath)) continue;
411
+ if (statSync(absPath).isFile()) {
412
+ ctx.fileContents.set(rel, stageFile(absPath, ctx.onDiskMinBytes));
412
413
  }
413
- return encodeUrlPath(addExternalAsset(ctx, absPath));
414
+ return;
415
+ }
416
+ if (!requireOnDisk) return;
417
+ throw new Error(`The composition references "${rawPath}", which is not in the project folder.`);
418
+ }
419
+ var HARD_REFERENCES = /* @__PURE__ */ new Set(["video[src]", "audio[src]", "img[src]", "video[poster]"]);
420
+ var relativeToProject = (ctx, absPath) => encodeUrlPath(relative(ctx.absProjectDir, absPath).replaceAll("\\", "/"));
421
+ function archiveTargetOf(ctx, absPath, rawPath, options) {
422
+ if (isPathInside(absPath, ctx.absProjectDir)) {
423
+ includeReferencedProjectFile(ctx, absPath, rawPath, options.requireOnDisk);
424
+ return options.filesystemPath ? relativeToProject(ctx, absPath) : null;
425
+ }
426
+ try {
427
+ if (!existsSync2(absPath) || !statSync(absPath).isFile()) return void 0;
428
+ } catch {
429
+ return void 0;
430
+ }
431
+ return encodeUrlPath(addExternalAsset(ctx, absPath));
432
+ }
433
+ function tryResolveExternal(ctx, rawPath, referrerAbsDir, requireOnDisk = false) {
434
+ const filesystemPath = isAbsolute(rawPath) && !rawPath.startsWith("//");
435
+ if (isNonRelativeUrl(rawPath) && !filesystemPath) return null;
436
+ const cut = filesystemPath ? rawPath.search(/[?#]/) : -1;
437
+ const [path, suffix] = cut < 0 ? [rawPath, ""] : [rawPath.slice(0, cut), rawPath.slice(cut)];
438
+ for (const variant of decodeUrlPathVariants(path)) {
439
+ const target = archiveTargetOf(ctx, resolve2(referrerAbsDir, variant), rawPath, {
440
+ requireOnDisk,
441
+ filesystemPath
442
+ });
443
+ if (target !== void 0) return target && target + suffix;
414
444
  }
415
445
  return null;
416
446
  }
@@ -435,7 +465,7 @@ function rewriteHtmlAttributes(document, referrerAbsDir, entryPath, resolveTarge
435
465
  for (const attr of attrs) {
436
466
  const val = (el.getAttribute(attr) || "").trim();
437
467
  if (!val) continue;
438
- const target = resolveTarget(val, referrerAbsDir);
468
+ const target = resolveTarget(val, referrerAbsDir, { attr, tag: el.localName });
439
469
  if (!target) continue;
440
470
  el.setAttribute(attr, referenceFrom(entryPath, target));
441
471
  modified = true;
@@ -483,7 +513,12 @@ function rewriteHtmlSrcsets(document, referrerAbsDir, entryPath, resolveTarget)
483
513
  function localizeHtmlEntry(ctx, entryPath, content) {
484
514
  const referrerAbsDir = resolve2(ctx.absProjectDir, dirname(entryPath));
485
515
  const { document } = parseHTML(content.toString("utf-8"));
486
- const resolveTarget = (val, dir) => tryResolveExternal(ctx, val, dir);
516
+ const resolveTarget = (val, dir, ref) => tryResolveExternal(
517
+ ctx,
518
+ val,
519
+ dir,
520
+ ref !== void 0 && HARD_REFERENCES.has(`${ref.tag}[${ref.attr}]`)
521
+ );
487
522
  const attrsChanged = rewriteHtmlAttributes(document, referrerAbsDir, entryPath, resolveTarget, {
488
523
  attrs: ["src", "href", "poster"]
489
524
  });
@@ -9,14 +9,14 @@ import {
9
9
  } from "./chunk-SWC3QIEH.js";
10
10
  import {
11
11
  stoppedByCancelSignal
12
- } from "./chunk-CBHNARFI.js";
12
+ } from "./chunk-MNMIIDOX.js";
13
13
  import {
14
14
  DEFAULT_MODEL,
15
15
  ensureModel,
16
16
  ensureWhisper,
17
17
  hasFFmpeg,
18
18
  pinnedWhisperModel
19
- } from "./chunk-BUIZAY4L.js";
19
+ } from "./chunk-TERSCNBN.js";
20
20
  import {
21
21
  sha256File
22
22
  } from "./chunk-RZ6CXJ56.js";
@@ -24,7 +24,7 @@ import {
24
24
  findFFmpeg,
25
25
  findFFprobe,
26
26
  getFFmpegInstallHint
27
- } from "./chunk-63LNVITK.js";
27
+ } from "./chunk-4UXCWPHU.js";
28
28
  import {
29
29
  findWavChunk
30
30
  } from "./chunk-UOFAE5RF.js";