hyperframes 0.9.58 → 0.9.61

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 (365) hide show
  1. package/bin/hyperframes.mjs +3 -1
  2. package/dist/{add-JQUKPSEZ.js → add-LNPIKHAX.js} +33 -32
  3. package/dist/{agentPromptGenerator-3NEY7FPP.js → agentPromptGenerator-N3HL4JWM.js} +19 -20
  4. package/dist/{animatedGifPrep-VMUZ6IVJ.js → animatedGifPrep-SEPXIM4W.js} +24 -24
  5. package/dist/api.d.ts +8 -1
  6. package/dist/api.js +70 -69
  7. package/dist/{appHistory-JNI6IOR6.js → appHistory-ASGUPUUV.js} +6 -6
  8. package/dist/{asset-ZT3VXZ67.js → asset-3L2G3ROU.js} +17 -7
  9. package/dist/{assetCataloger-D2DV65BA.js → assetCataloger-3D75A6GI.js} +21 -22
  10. package/dist/{audio-LD5H2R5V.js → audio-U4W5ZWQ7.js} +54 -53
  11. package/dist/{auth-4FPYYMSH.js → auth-V4G5ZE3P.js} +4 -4
  12. package/dist/{autoUpdate-5ZKSFCG4.js → autoUpdate-QYKF3DDS.js} +6 -6
  13. package/dist/{avatars-DCLFE7VG.js → avatars-SB2XCDWJ.js} +31 -32
  14. package/dist/{backgroundChecks-UZA3F46H.js → backgroundChecks-KHBYRE6J.js} +16 -9
  15. package/dist/backgroundChecksWorker.js +9 -9
  16. package/dist/{batchRender-TAUW3CT2.js → batchRender-6S5GMICZ.js} +13 -14
  17. package/dist/{beats-X3LCR6OG.js → beats-7YLYCCMD.js} +21 -22
  18. package/dist/{benchmark-DNZQT3YQ.js → benchmark-IBX7ZWVU.js} +37 -35
  19. package/dist/{billing-4BFUAHWX.js → billing-EAHOGMQW.js} +28 -29
  20. package/dist/{browser-5J2MTDB6.js → browser-XKYRXDJW.js} +23 -24
  21. package/dist/{bundleWithLocalizedFonts-XWK47ZVF.js → bundleWithLocalizedFonts-ZFX7TSWT.js} +1 -1
  22. package/dist/{capture-TVYTKWTG.js → capture-4WKQKMXG.js} +38 -17
  23. package/dist/{capture-2YSVFKWV.js → capture-IBOCZ2MK.js} +56 -50
  24. package/dist/{captureCompositionFrame-L765HLCT.js → captureCompositionFrame-HZA3LNU3.js} +29 -30
  25. package/dist/{captureFile-DOCK42K3.js → captureFile-Z7HQDRC2.js} +4 -4
  26. package/dist/captureProxy-4K3J652A.js +23 -0
  27. package/dist/{catalog-CHGGRRQX.js → catalog-TSXQTLKM.js} +45 -43
  28. package/dist/{catch-up-OCFU6ZR3.js → catch-up-LD2B5CE3.js} +35 -29
  29. package/dist/{check-LWK4Z7FI.js → check-TEZKUD26.js} +72 -72
  30. package/dist/{checkAudio-R5ORBXBO.js → checkAudio-3GM74ZGV.js} +22 -23
  31. package/dist/{checkBrowser-6SH73T47.js → checkBrowser-OFH3I7Q6.js} +62 -62
  32. package/dist/{chunk-2WA62M3B.js → chunk-22B53HD3.js} +10 -5
  33. package/dist/{chunk-K2EJQ44S.js → chunk-2CNVJQKU.js} +1 -1
  34. package/dist/{chunk-XMT4MG6W.js → chunk-2H4SJSUS.js} +14 -14
  35. package/dist/{chunk-6RPKPL22.js → chunk-2SPQTJA2.js} +25 -23
  36. package/dist/{chunk-GIVMQDSK.js → chunk-32H642MS.js} +2 -2
  37. package/dist/chunk-3GF72UPC.js +256 -0
  38. package/dist/chunk-3HJX4F2S.js +39 -0
  39. package/dist/{chunk-VXE46PXX.js → chunk-3JVTHNDH.js} +1 -1
  40. package/dist/{chunk-H3LEOZVK.js → chunk-3ROFCQAW.js} +1 -1
  41. package/dist/{chunk-NLVIE7VN.js → chunk-3W2ORSFV.js} +4 -4
  42. package/dist/{chunk-4QPT3IEL.js → chunk-4AMOVEV7.js} +181 -59
  43. package/dist/{chunk-A4L7G74T.js → chunk-4EWS3KP3.js} +3 -3
  44. package/dist/{chunk-AJ7YRQS4.js → chunk-4ORH2OXS.js} +2 -2
  45. package/dist/{chunk-2GRCLLKU.js → chunk-4SDNEKTL.js} +4 -4
  46. package/dist/{chunk-CDNVZEGQ.js → chunk-4T45V6GF.js} +5 -2
  47. package/dist/{chunk-GDIBE57N.js → chunk-4ZLWEPK4.js} +2 -2
  48. package/dist/{chunk-CRPLPK6J.js → chunk-5F2ULLFW.js} +7 -7
  49. package/dist/{chunk-O5U3Y5DX.js → chunk-5GUYYSVT.js} +1 -1
  50. package/dist/{chunk-EOXNEA4Z.js → chunk-5RM7274K.js} +21 -9
  51. package/dist/{chunk-E4IR34CF.js → chunk-5T2LNQAH.js} +58 -20
  52. package/dist/{chunk-M5TTYUZM.js → chunk-5ZAM42GH.js} +6 -6
  53. package/dist/{chunk-5IE5ZI66.js → chunk-62UUXB3F.js} +1 -1
  54. package/dist/{chunk-A4YRESMH.js → chunk-63CSQYYO.js} +2 -2
  55. package/dist/{chunk-R4EWRIDL.js → chunk-6B2TH52B.js} +8 -1
  56. package/dist/{chunk-X3IVUSOX.js → chunk-6KU6TCSS.js} +3 -3
  57. package/dist/{chunk-DHVRVI7F.js → chunk-6NDSDQCR.js} +62 -27
  58. package/dist/{chunk-O4K22EFS.js → chunk-6OKMCIDU.js} +24 -14
  59. package/dist/{chunk-D3M5VOC5.js → chunk-6P7FLYOR.js} +55 -125
  60. package/dist/{chunk-JQZ5WP7L.js → chunk-6R22Y26Z.js} +1 -1
  61. package/dist/{chunk-2SJNGWSY.js → chunk-6X2CLRU7.js} +1 -1
  62. package/dist/{chunk-PYTF6VHF.js → chunk-6ZU654EU.js} +3 -3
  63. package/dist/{chunk-G3U5CUF3.js → chunk-73NC557V.js} +2 -2
  64. package/dist/{chunk-7WAWUQDQ.js → chunk-7463BOQJ.js} +4 -4
  65. package/dist/{chunk-4N3WOFP3.js → chunk-7AP5C4C2.js} +19 -19
  66. package/dist/{chunk-FFOFGL2O.js → chunk-7DMES2F3.js} +2 -2
  67. package/dist/{chunk-Y6CZFX5X.js → chunk-7GDEQJSL.js} +28 -19
  68. package/dist/{chunk-ECGNWHFE.js → chunk-A2ZUVULS.js} +88 -2
  69. package/dist/{chunk-CNAOJ7XI.js → chunk-A7NRMVUG.js} +1 -1
  70. package/dist/{chunk-TLGQQ324.js → chunk-ADQ7XZE5.js} +11 -9
  71. package/dist/{chunk-M3IHARIW.js → chunk-B5JWBMDR.js} +102 -40
  72. package/dist/{chunk-7ZHBY7T5.js → chunk-B5TLZC2D.js} +11 -4
  73. package/dist/{chunk-DH3M5X3Y.js → chunk-BAU3ASNM.js} +4 -4
  74. package/dist/{chunk-ELRE6LVJ.js → chunk-BHZZM2PK.js} +5 -5
  75. package/dist/chunk-BNH2IKGV.js +5101 -0
  76. package/dist/{chunk-ROESFEBP.js → chunk-BNO5RN55.js} +74 -66
  77. package/dist/{chunk-EWKJDXH6.js → chunk-C2GAAMZ3.js} +4 -4
  78. package/dist/{chunk-OMZSPAK5.js → chunk-C7IEAEKF.js} +1 -1
  79. package/dist/{chunk-ZFOV3R2L.js → chunk-CAAUQUCW.js} +23 -9
  80. package/dist/{chunk-CPDPSNSB.js → chunk-CPHK3XMF.js} +7 -7
  81. package/dist/{chunk-NJPLH762.js → chunk-CPLVXXRS.js} +4 -4
  82. package/dist/{chunk-AMS7Q7P7.js → chunk-CRX444MF.js} +22 -21
  83. package/dist/{chunk-4LZSNWFJ.js → chunk-CRZ7FUMI.js} +3 -3
  84. package/dist/{chunk-VI2LLFW6.js → chunk-CSWJCRDU.js} +2 -2
  85. package/dist/{chunk-37Y334MN.js → chunk-CT54FOTS.js} +18 -14
  86. package/dist/{chunk-CGODFJZ7.js → chunk-CYM53TWZ.js} +32 -18
  87. package/dist/chunk-D37I36FY.js +21 -0
  88. package/dist/{chunk-LO5USUM4.js → chunk-DD37XZVE.js} +1 -1
  89. package/dist/{chunk-OD7XWF5T.js → chunk-DWGDP537.js} +12 -6
  90. package/dist/chunk-EDH2DMXM.js +113 -0
  91. package/dist/{chunk-TAXMLPTE.js → chunk-ENKXJNKX.js} +2 -2
  92. package/dist/{chunk-UJTLTFB6.js → chunk-ERYGKPIR.js} +1 -1
  93. package/dist/{chunk-HOIEN7O4.js → chunk-F6PI5O3H.js} +3 -1
  94. package/dist/{chunk-GVIJFPZV.js → chunk-FLJ4S7NA.js} +2 -2
  95. package/dist/{chunk-KYKQO4VN.js → chunk-FU62NEWC.js} +3 -3
  96. package/dist/{chunk-MPC3OODR.js → chunk-G7HO2FFX.js} +4 -4
  97. package/dist/chunk-GADMF4BL.js +170 -0
  98. package/dist/{chunk-DWFWF6IR.js → chunk-GNRC4L6F.js} +34 -242
  99. package/dist/{chunk-BSFTB6AM.js → chunk-GYPZTG46.js} +12 -6
  100. package/dist/{chunk-OL7RHRNJ.js → chunk-H4HYZUE3.js} +2 -2
  101. package/dist/{chunk-V3O4AFO3.js → chunk-H6Y4XOSP.js} +17 -15
  102. package/dist/{chunk-PGITR2WX.js → chunk-HAMPVCRY.js} +4 -4
  103. package/dist/{chunk-677JGYQL.js → chunk-HLVNKNSW.js} +1 -0
  104. package/dist/{chunk-HFIVZJJD.js → chunk-HTHLFEO2.js} +1 -1
  105. package/dist/{chunk-SM5PNCDI.js → chunk-ICZWQNBR.js} +2 -2
  106. package/dist/{chunk-HTGJOOXE.js → chunk-IIXSSRUR.js} +4 -4
  107. package/dist/{chunk-GEOJA37C.js → chunk-ILKK6F5E.js} +3 -3
  108. package/dist/{chunk-IHXMN5YH.js → chunk-IOWECUEU.js} +2 -2
  109. package/dist/{chunk-SE4NOUB6.js → chunk-IT2YUKYY.js} +5 -5
  110. package/dist/chunk-IU6AC3WL.js +125 -0
  111. package/dist/{chunk-IGZQYMZA.js → chunk-J56ZJFSF.js} +303 -123
  112. package/dist/{chunk-5SGGOZNL.js → chunk-KBEC6VQS.js} +595 -206
  113. package/dist/{chunk-WEU6WLVT.js → chunk-KTY46LIH.js} +8 -4
  114. package/dist/chunk-KUJJJBV2.js +211 -0
  115. package/dist/{chunk-CHCMXYER.js → chunk-KVIXXJLO.js} +1 -1
  116. package/dist/{chunk-XYP4T6TQ.js → chunk-KYZEK7QF.js} +5 -5
  117. package/dist/{chunk-UGKUGYHD.js → chunk-L7MFHIG7.js} +5 -2
  118. package/dist/{chunk-YTHXSYYB.js → chunk-LB6ZAP4I.js} +19 -11
  119. package/dist/{chunk-SV72WLBE.js → chunk-LGIWC6KN.js} +28 -15
  120. package/dist/{chunk-ADVVQX4I.js → chunk-LMNCEQCC.js} +4 -2
  121. package/dist/{chunk-VLFBOKZX.js → chunk-LTXZLTXW.js} +304 -234
  122. package/dist/{chunk-WJIWXHXK.js → chunk-LULZFFDN.js} +3 -3
  123. package/dist/{chunk-CGJIMWNU.js → chunk-LV2ETFC5.js} +5 -5
  124. package/dist/{chunk-DL6PEJWH.js → chunk-LYTELQL2.js} +2 -4
  125. package/dist/{chunk-W2OXNTHG.js → chunk-LZSSGF7G.js} +3 -3
  126. package/dist/chunk-MERWX4DZ.js +159 -0
  127. package/dist/{chunk-CVTIGS5K.js → chunk-MJBBKSKB.js} +1 -1
  128. package/dist/{chunk-5IUVWP3A.js → chunk-MPVJI4SE.js} +2 -2
  129. package/dist/{chunk-7WYJXKIG.js → chunk-MPX3FO4A.js} +5 -5
  130. package/dist/{chunk-ERDQIRUL.js → chunk-MQCIX6O2.js} +20 -10
  131. package/dist/{chunk-ZO5NHAF3.js → chunk-MTCVUAUK.js} +10 -4
  132. package/dist/{chunk-E26Z73S3.js → chunk-MTKXKULM.js} +2 -2
  133. package/dist/{chunk-MCDNAIFF.js → chunk-NGRWDXRZ.js} +1 -1
  134. package/dist/{chunk-FNXU56VT.js → chunk-NK2UW3WR.js} +1 -1
  135. package/dist/{chunk-PS7WBIPK.js → chunk-NOJRZCN3.js} +33 -18
  136. package/dist/{chunk-JOOKM2NC.js → chunk-NU7BEOCX.js} +3 -3
  137. package/dist/chunk-NY6E4272.js +112 -0
  138. package/dist/{chunk-JZVI2TMX.js → chunk-OBP5WNKP.js} +3 -3
  139. package/dist/{chunk-AM4Y3XMR.js → chunk-OGOR22GY.js} +4 -4
  140. package/dist/{chunk-D2LIT7UR.js → chunk-OH3MUFZG.js} +1 -1
  141. package/dist/{chunk-DX5Y3L5B.js → chunk-OPUR2XQ2.js} +6 -6
  142. package/dist/{chunk-SYKUNH25.js → chunk-OW6MOJSR.js} +59 -7
  143. package/dist/{chunk-XCJ2YYMV.js → chunk-P5M3IEXO.js} +1 -1
  144. package/dist/{chunk-D2LSYXLW.js → chunk-PAHTZDMZ.js} +1 -1
  145. package/dist/{chunk-OSKSTJNQ.js → chunk-PJQVJSMG.js} +21 -12
  146. package/dist/{chunk-72GTIFAI.js → chunk-POVOGRMU.js} +2 -2
  147. package/dist/{chunk-U5MILT4G.js → chunk-PPETKAEO.js} +1 -1
  148. package/dist/{chunk-ZLTB7ZCQ.js → chunk-PQ2OPPGP.js} +8 -4
  149. package/dist/chunk-PTGNUVCB.js +112 -0
  150. package/dist/{chunk-X6JUUQCM.js → chunk-Q4FVSYTD.js} +5 -2
  151. package/dist/{chunk-MYETYFDI.js → chunk-Q7IOMZ5X.js} +2 -2
  152. package/dist/{chunk-GRSZAGJB.js → chunk-R2LBMDYH.js} +2 -2
  153. package/dist/{chunk-QBN2W4T3.js → chunk-RC2DDVX5.js} +1 -1
  154. package/dist/{chunk-VSM7OIG2.js → chunk-RDJOA5MM.js} +2 -2
  155. package/dist/{chunk-OEGWTN6N.js → chunk-RF3DT4CS.js} +1 -1
  156. package/dist/{chunk-WGHJUGNU.js → chunk-RJCQZMNI.js} +10 -10
  157. package/dist/{chunk-B2WXMYMA.js → chunk-RPICLHBJ.js} +1 -1
  158. package/dist/{chunk-7ECPFKQV.js → chunk-RRI7NGQZ.js} +37 -13
  159. package/dist/{chunk-X3UXEB2U.js → chunk-RSYV6NNI.js} +2 -2
  160. package/dist/{chunk-6EMFSRTW.js → chunk-S35RUNXJ.js} +7 -0
  161. package/dist/{chunk-QGQCWG7F.js → chunk-SCEBICAQ.js} +2 -2
  162. package/dist/{chunk-JKLWQUSV.js → chunk-SDIQEPAR.js} +1 -1
  163. package/dist/{chunk-3VMZQQUI.js → chunk-SIQGTRZ5.js} +1 -1
  164. package/dist/{chunk-N6PAWR5C.js → chunk-SQI2MWJE.js} +5 -5
  165. package/dist/{chunk-BSDUTNFX.js → chunk-SYMLVFQF.js} +1 -1
  166. package/dist/{chunk-XMAU5ZQX.js → chunk-TFAKFI3R.js} +1 -1
  167. package/dist/{chunk-SNKBI4YB.js → chunk-TJAFCC37.js} +9 -9
  168. package/dist/{chunk-6T4PB35F.js → chunk-TRQDC2UC.js} +9 -2
  169. package/dist/{chunk-4NNYYCJN.js → chunk-TRVWLAQ3.js} +25 -21
  170. package/dist/{chunk-UDLWVQ74.js → chunk-TTRX7NM3.js} +35 -21
  171. package/dist/{chunk-66W5IWLO.js → chunk-U7M4SZUB.js} +13 -2
  172. package/dist/{chunk-TLDIP7Y3.js → chunk-UEJMLVGW.js} +16 -17
  173. package/dist/{chunk-ZAWQJOTW.js → chunk-UX5KLSAJ.js} +74 -76
  174. package/dist/{chunk-O2BLY7PO.js → chunk-VJVTGSGW.js} +1 -1
  175. package/dist/{chunk-IE6BIB3L.js → chunk-VM2VBJRC.js} +34 -3
  176. package/dist/{chunk-AM6UYKVR.js → chunk-VNWPHKKI.js} +11 -11
  177. package/dist/{chunk-WQZQMADW.js → chunk-VRUVJTFW.js} +244 -28
  178. package/dist/{chunk-37VS6QY6.js → chunk-VSS3OAZB.js} +1 -1
  179. package/dist/{chunk-H7DTMLAR.js → chunk-VZM7AFUH.js} +39 -24
  180. package/dist/{chunk-WLNHZ2OM.js → chunk-W772ZFTE.js} +21 -6
  181. package/dist/{chunk-3GKGBYW3.js → chunk-WTO3A7ET.js} +120 -9
  182. package/dist/{chunk-ALD7JBPV.js → chunk-WTS245RC.js} +2 -2
  183. package/dist/{chunk-VBEDZGBW.js → chunk-WTUDKVWQ.js} +74 -19
  184. package/dist/{chunk-OPSGEOCO.js → chunk-WVCCSYZC.js} +53 -31
  185. package/dist/{chunk-ZCLC3KVY.js → chunk-X3NGTIE3.js} +1 -1
  186. package/dist/{chunk-RV3HR3BZ.js → chunk-XLG3JMSS.js} +9 -9
  187. package/dist/{chunk-ZYNNZ5DE.js → chunk-Y53Z2M77.js} +2 -2
  188. package/dist/{chunk-O2INZCGB.js → chunk-YB2ZJJFJ.js} +1 -1
  189. package/dist/{chunk-J6VYWZSO.js → chunk-YLC67YFR.js} +1 -1
  190. package/dist/{chunk-6LU6JICP.js → chunk-YWUE4CRU.js} +96 -9
  191. package/dist/chunk-Z3BPDCRV.js +537 -0
  192. package/dist/{chunk-I6V25IXG.js → chunk-Z55ASKZE.js} +2 -2
  193. package/dist/{chunk-EZJHKHWU.js → chunk-ZBDITGMP.js} +3 -3
  194. package/dist/{chunk-MSC5KBCE.js → chunk-ZGSGBGTB.js} +32 -24
  195. package/dist/{clean-6ODSABBF.js → clean-RJKQ23WH.js} +46 -46
  196. package/dist/cli.js +120 -77
  197. package/dist/{cloud-IMYQB5RC.js → cloud-R3NQSUTQ.js} +4 -4
  198. package/dist/{cloud-NTKLXMBS.js → cloud-VUR3ZO6O.js} +10 -10
  199. package/dist/{cloudrun-JNLDP33J.js → cloudrun-SZYAYV7N.js} +24 -16
  200. package/dist/{compare-VLYZ6ZS4.js → compare-AO5VJBJW.js} +79 -100
  201. package/dist/{compiler-7M2UCEWG.js → compiler-65SP7M2P.js} +9 -10
  202. package/dist/{component-KMUHKZ4R.js → component-WGTPAIKX.js} +23 -9
  203. package/dist/{compositions-ESLWNOMS.js → compositions-HWM6DNJA.js} +28 -29
  204. package/dist/{contactSheet-4YF7U6U7.js → contactSheet-ROUVWDRO.js} +7 -7
  205. package/dist/{curve-7RPSNRPE.js → curve-PLPTMDS4.js} +27 -28
  206. package/dist/{cuts-KBAAZSPS.js → cuts-T5GYTDUA.js} +28 -29
  207. package/dist/{delete-EP5Z7HKF.js → delete-6WE3N3VO.js} +33 -21
  208. package/dist/{deploy-MVR63JLD.js → deploy-GYY6CYQD.js} +14 -13
  209. package/dist/{describeProject-NBVZT5EN.js → describeProject-UQQ2GGIX.js} +19 -20
  210. package/dist/{destroy-DQKIT574.js → destroy-WSGREGAG.js} +14 -13
  211. package/dist/{deterministicFonts-LYBMXXBW.js → deterministicFonts-JER4GPCM.js} +7 -7
  212. package/dist/{diff-RI3FTMOZ.js → diff-JQBZUPKG.js} +305 -114
  213. package/dist/{dist-LRGTXDSM.js → dist-6EF2P3P7.js} +6 -5
  214. package/dist/{dist-G7VFX23I.js → dist-HF753IX4.js} +12 -10
  215. package/dist/{dist-TOOMD57O.js → dist-JRJHFP27.js} +24 -24
  216. package/dist/{docs-YTM4NX2R.js → docs-3OAPSKPG.js} +1 -1
  217. package/dist/{doctor-43YNRCRB.js → doctor-SPJ5AJKX.js} +31 -32
  218. package/dist/{dotEnv-RZ52L7X3.js → dotEnv-7JWLJ2TG.js} +11 -3
  219. package/dist/{energy-YCH36KCC.js → energy-KPDVIZ5D.js} +28 -29
  220. package/dist/{events-VUR27EF6.js → events-4WAMG3JE.js} +15 -16
  221. package/dist/{events-6RJBITYN.js → events-P4223ZZZ.js} +30 -31
  222. package/dist/{events-JCPYG3CD.js → events-XON5I7VU.js} +9 -9
  223. package/dist/{execute-OXMKWIFI.js → execute-CN5FLBYU.js} +57 -53
  224. package/dist/{extract-XGD2RDEX.js → extract-ABSBKYYH.js} +29 -30
  225. package/dist/{face-XCNWNTGN.js → face-PLPQ5335.js} +29 -30
  226. package/dist/{feedback-JNFDVBFV.js → feedback-QPQ4G72X.js} +70 -44
  227. package/dist/{ffmpeg-YQLAJUEA.js → ffmpeg-F3XK57IP.js} +19 -20
  228. package/dist/{figma-XXGHYEB3.js → figma-S5CVANVZ.js} +3 -3
  229. package/dist/fontLocalizeCli.js +29 -29
  230. package/dist/{frames-PEMWFRRY.js → frames-F4QEQB4V.js} +30 -31
  231. package/dist/{generate-H5M4QSJR.js → generate-O3OPOCHP.js} +46 -47
  232. package/dist/{get-R6Y2OE5P.js → get-P7LQ7U22.js} +29 -17
  233. package/dist/{gpuPolicy-2WVDQYZA.js → gpuPolicy-JPRDRQWU.js} +18 -19
  234. package/dist/{grade-compare-KFXPZFDL.js → grade-compare-6UZ6SK4J.js} +61 -61
  235. package/dist/hangReport.js +2 -2
  236. package/dist/{heifImagePrep-VLKYA5QZ.js → heifImagePrep-3PDFNYIE.js} +25 -25
  237. package/dist/{help-T3XUX5RI.js → help-DLOCAL7E.js} +1 -1
  238. package/dist/{history-QJPUCUUC.js → history-YIJVOGH7.js} +29 -30
  239. package/dist/hyperframe.manifest.json +1 -1
  240. package/dist/hyperframe.runtime.iife.js +64 -64
  241. package/dist/hyperframes-player.global.js +14 -6
  242. package/dist/{info-556DHJHJ.js → info-FVYJNNQL.js} +33 -34
  243. package/dist/{init-P62TPWR3.js → init-V45K4VAG.js} +54 -53
  244. package/dist/{ink-SRN65OZH.js → ink-P72OB7L4.js} +28 -29
  245. package/dist/{inspect-U5FWQQFB.js → inspect-3W2IG3JF.js} +63 -59
  246. package/dist/{installer-3TNMANQV.js → installer-QGDTFTDU.js} +11 -12
  247. package/dist/{keyframes-FPGEFGCH.js → keyframes-57OPHIR2.js} +111 -49
  248. package/dist/{lambda-YJY2MYWL.js → lambda-EQZS7UMO.js} +40 -33
  249. package/dist/{layout-QIKSVA44.js → layout-KSWMO6MH.js} +63 -61
  250. package/dist/{lint-RD33ESM5.js → lint-WIYBGVF2.js} +23 -24
  251. package/dist/{lintProject-ZWLXB3A2.js → lintProject-N3UN6HEE.js} +6 -5
  252. package/dist/{list-FFO3WOB2.js → list-3FQAHEE2.js} +32 -20
  253. package/dist/{localPage-DHIBMNJH.js → localPage-G2QEA7JL.js} +19 -20
  254. package/dist/{login-IMFRQOEQ.js → login-C3U6WSHF.js} +10 -10
  255. package/dist/{logout-SLBKP67J.js → logout-525LWS6J.js} +5 -5
  256. package/dist/{look-ZZHJYSPC.js → look-U5LWOI4H.js} +28 -29
  257. package/dist/{manager-U4WEPCLV.js → manager-C5S25OOK.js} +7 -7
  258. package/dist/{manager-V4LGD4HB.js → manager-ZVYDWLHI.js} +21 -22
  259. package/dist/{measure-ZRBVN45B.js → measure-R2KZIHXT.js} +11 -11
  260. package/dist/{media-treatment-3I2CMQJZ.js → media-treatment-FAW5ZLT7.js} +37 -36
  261. package/dist/{media-use-2OYJ3CCN.js → media-use-CPTT2ZDE.js} +14 -10
  262. package/dist/{models-PRW7EWSV.js → models-53JHNGSL.js} +31 -32
  263. package/dist/{motionShot-VWILMLHQ.js → motionShot-K5ZHHHE6.js} +33 -34
  264. package/dist/{normalize-PGMS24I2.js → normalize-TBACWMEK.js} +4 -1
  265. package/dist/{normalize-audio-42XMF35K.js → normalize-audio-EOO2ORPP.js} +25 -25
  266. package/dist/{oauth-V3HSFZRE.js → oauth-E5QBYYTX.js} +2 -2
  267. package/dist/{open-D52MJZQA.js → open-3YABRCER.js} +34 -35
  268. package/dist/{parakeetRunner-ZR2JWQZH.js → parakeetRunner-TLZC2WAJ.js} +31 -32
  269. package/dist/{pipeline-W3H4JA6H.js → pipeline-LZ73CHLB.js} +27 -26
  270. package/dist/{plan-2HQOFJO7.js → plan-3QQZ57IC.js} +38 -39
  271. package/dist/{play-G5XDRDIZ.js → play-ESWP4SF2.js} +53 -50
  272. package/dist/{policies-5RUNO47I.js → policies-XG6OTGQC.js} +2 -2
  273. package/dist/{preflight-W2JDYF3T.js → preflight-7G5OBMAA.js} +22 -23
  274. package/dist/{present-CYMTHQFM.js → present-5ER4JKR5.js} +45 -44
  275. package/dist/{preview-DTQPQZTK.js → preview-62XOVSXM.js} +61 -60
  276. package/dist/privateProjectFile-6NPNZXK3.js +65 -0
  277. package/dist/{probe-WZJK3YQI.js → probe-CFOGEVFU.js} +28 -29
  278. package/dist/{producer-2BSMSO6I.js → producer-LLE32VVO.js} +1 -1
  279. package/dist/{progress-KRDVC24C.js → progress-PT3NAFVP.js} +6 -5
  280. package/dist/{projectConfig-BYRVYLCC.js → projectConfig-R54UDB5Y.js} +14 -15
  281. package/dist/{prompts-7VQEH645.js → prompts-XC3IBT4D.js} +2 -2
  282. package/dist/{publicNetwork-GW7SVP7N.js → publicNetwork-66HWFKYG.js} +3 -1
  283. package/dist/{publication-UCFJLELD.js → publication-TOBV6M4Q.js} +8 -9
  284. package/dist/{publish-KXVPSWCO.js → publish-QVNH5PXC.js} +107 -76
  285. package/dist/receivedRecordFollow-U43DTVLP.js +54 -0
  286. package/dist/{refresh-2GVNKDQE.js → refresh-HK4YEHWC.js} +5 -5
  287. package/dist/{remove-background-O7BZNS3X.js → remove-background-XHE6JL35.js} +31 -30
  288. package/dist/{render-TYS3LCIQ.js → render-7JJ2DFEB.js} +16 -15
  289. package/dist/{render-QOWXGWQZ.js → render-GRZMK6ET.js} +143 -100
  290. package/dist/{render-DGAP4Q2Z.js → render-WK3D5VOW.js} +173 -138
  291. package/dist/{render-batch-TEQRGAUC.js → render-batch-KFEZFJXB.js} +20 -18
  292. package/dist/renderSetupWorker.js +23 -13
  293. package/dist/{resolver-RN2JGGQL.js → resolver-N4U52UK5.js} +11 -12
  294. package/dist/{reverse-FUARFEG2.js → reverse-6AOA3PXF.js} +1 -1
  295. package/dist/{run-V722HMUG.js → run-M2J3ZJ3W.js} +14 -14
  296. package/dist/runtimeVersion.js +6 -1
  297. package/dist/{sam-KHLM2DJA.js → sam-O7Y2CCK3.js} +5 -5
  298. package/dist/{screenshotCapture-4BB4LUMX.js → screenshotCapture-UXJZ7D3L.js} +21 -22
  299. package/dist/{service-ZPCHJY6B.js → service-DBNZZLPU.js} +31 -31
  300. package/dist/{share-PXUN7AH7.js → share-6P7S3USP.js} +36 -36
  301. package/dist/{sherpa-LT6Y7IGM.js → sherpa-CXEHEVAJ.js} +30 -31
  302. package/dist/sherpaWorker.js +6 -6
  303. package/dist/{sites-WWCABDSX.js → sites-R5F5FNAL.js} +9 -6
  304. package/dist/skills/hyperframes/scripts/locate.mjs +13 -19
  305. package/dist/skills/hyperframes-cli/references/lambda.md +1 -1
  306. package/dist/skills/media-use/audio/references/tts-to-captions.md +1 -1
  307. package/dist/skills/media-use/audio/references/tts.md +6 -6
  308. package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +143 -2
  309. package/dist/skills/media-use/audio/scripts/lib/tts.mjs +12 -2
  310. package/dist/skills/media-use/scripts/lib/candidates.mjs +3 -2
  311. package/dist/skills/media-use/scripts/lib/credit-limit.d.mts +1 -1
  312. package/dist/skills/media-use/scripts/lib/credit-limit.mjs +14 -9
  313. package/dist/skills/media-use/scripts/lib/terminal-text.d.mts +1 -0
  314. package/dist/skills/media-use/scripts/lib/terminal-text.mjs +12 -0
  315. package/dist/skills/media-use/scripts/resolve.mjs +21 -15
  316. package/dist/{skills-G63W5GD5.js → skills-RMIHFNI6.js} +21 -22
  317. package/dist/{skillsUpdateCheck-2T3JVDAA.js → skillsUpdateCheck-EHOSL2AC.js} +7 -7
  318. package/dist/{snapshot-EVSKTVDG.js → snapshot-DQK3P7TF.js} +114 -90
  319. package/dist/{src-K5FSMLTB.js → src-4INHWM6L.js} +29 -29
  320. package/dist/{src-R57EQQSI.js → src-BNSCFKOD.js} +25 -22
  321. package/dist/{start-XBCYKGBV.js → start-KPCEUG5K.js} +52 -45
  322. package/dist/{state-FO64CPYE.js → state-5LE7AN6F.js} +6 -5
  323. package/dist/{staticProjectServer-Q6VR7CXT.js → staticProjectServer-VCS4TOU2.js} +37 -37
  324. package/dist/{status-E5XIWRCQ.js → status-WBNQSG4H.js} +31 -32
  325. package/dist/studio/assets/hyperframes-player-Cm0hYGm2.js +573 -0
  326. package/dist/studio/assets/{index-D7ICtobF.js → index-BGrNWeLK.js} +199 -199
  327. package/dist/studio/assets/{index-ww7-RmuM.js → index-REqr_dLu.js} +1 -1
  328. package/dist/studio/assets/{pausedVideoDecoder-Dbe8Cmab.js → pausedVideoDecoder-DqLDSq8J.js} +1 -1
  329. package/dist/studio/index.html +1 -1
  330. package/dist/{studio-api-GMJVYGET.js → studio-api-RAW4CIPR.js} +24 -24
  331. package/dist/{studioSelectionClient-S46TNAAZ.js → studioSelectionClient-PLBQBLCJ.js} +2 -2
  332. package/dist/{studioServer-MIQCMK6U.js → studioServer-5PWBZADN.js} +357 -163
  333. package/dist/subCompositionWorker.js +62 -55
  334. package/dist/{sync-WJOFN6VN.js → sync-PM2WLBUC.js} +28 -29
  335. package/dist/{synthesize-FXM7ZD6J.js → synthesize-NGU4DRKC.js} +24 -14
  336. package/dist/{system-DBUN5UDD.js → system-PKL4Y4MX.js} +3 -3
  337. package/dist/{telemetry-HZ4P4DMC.js → telemetry-4BST73P2.js} +15 -16
  338. package/dist/{telemetry-M722DCXI.js → telemetry-UC4MSMG3.js} +1 -1
  339. package/dist/{templates-KFZZSSKW.js → templates-G3XOWYXG.js} +36 -31
  340. package/dist/{timeline-5M6DPCXF.js → timeline-E6ZXYGQR.js} +50 -46
  341. package/dist/{tokens-H4NPNRFR.js → tokens-KRHXM44C.js} +17 -7
  342. package/dist/{transcribe-6STI2ALX.js → transcribe-RJ3GOCJL.js} +56 -57
  343. package/dist/{transcribe-7PE5UH7J.js → transcribe-TKV3POYD.js} +26 -27
  344. package/dist/{tts-D7CLD3AD.js → tts-EPXRE275.js} +26 -10
  345. package/dist/{update-H3T3AVVG.js → update-TO7MLJCS.js} +23 -24
  346. package/dist/{updateCheck-TLCXUNBV.js → updateCheck-5AY447D5.js} +6 -6
  347. package/dist/{upgrade-BZVTMCQU.js → upgrade-BLZWWXYL.js} +11 -11
  348. package/dist/{urlDownloader-FJXNC3IM.js → urlDownloader-ME67HQ4O.js} +17 -18
  349. package/dist/{validate-WTRVCEL5.js → validate-SRBV5NFV.js} +53 -49
  350. package/dist/{video-TVO2U5F2.js → video-JPESR36I.js} +38 -34
  351. package/dist/{voices-F3EW43LX.js → voices-AECYKXGA.js} +43 -44
  352. package/dist/warmCheck.js +73 -73
  353. package/dist/warmCheckClient.js +4 -4
  354. package/package.json +1 -1
  355. package/dist/chunk-23SG3B6M.js +0 -81
  356. package/dist/chunk-2RUCE54M.js +0 -5083
  357. package/dist/chunk-HFUI6LVF.js +0 -34
  358. package/dist/chunk-JOQR4AP6.js +0 -22
  359. package/dist/chunk-MK23FXLH.js +0 -21
  360. package/dist/chunk-SALNTRJA.js +0 -204
  361. package/dist/chunk-VC76R6W2.js +0 -27
  362. package/dist/chunk-Z642P33A.js +0 -270
  363. package/dist/studio/assets/hyperframes-player-B78JDyI_.js +0 -565
  364. package/dist/{chunk-7IMHPBSH.js → chunk-4NDSGKPO.js} +3 -3
  365. /package/dist/{chunk-YXX6CIHL.js → chunk-BWFNWEUO.js} +0 -0
@@ -19,11 +19,7 @@ import {
19
19
  splitElementInHtml,
20
20
  unwrapElementsFromHtml,
21
21
  wrapElementsInHtml
22
- } from "./chunk-DH3M5X3Y.js";
23
- import {
24
- MEDIA_LINK_ATTR,
25
- relinkSplitHalves
26
- } from "./chunk-HYO4DIYT.js";
22
+ } from "./chunk-BAU3ASNM.js";
27
23
  import {
28
24
  DEFAULT_TARGET_LUFS,
29
25
  absoluteLoudnessPlan,
@@ -32,7 +28,11 @@ import {
32
28
  requestedProjectPath,
33
29
  requiredFfmpeg,
34
30
  resolveLocalAudioPath
35
- } from "./chunk-WGHJUGNU.js";
31
+ } from "./chunk-RJCQZMNI.js";
32
+ import {
33
+ MEDIA_LINK_ATTR,
34
+ relinkSplitHalves
35
+ } from "./chunk-HYO4DIYT.js";
36
36
  import {
37
37
  PROXY_PARAMS_VERSION,
38
38
  PROXY_PENDING_RETRY_AFTER_SECONDS,
@@ -40,6 +40,7 @@ import {
40
40
  ProxyCapacityError,
41
41
  ProxyTranscodeError,
42
42
  ProxyWaitTimeoutError,
43
+ StillPastEndError,
43
44
  createMediaCodecProbeCache,
44
45
  decideMediaProxyEligibility,
45
46
  isProxyVariantRequest,
@@ -56,11 +57,11 @@ import {
56
57
  scanProjectMedia,
57
58
  shouldPrewarmProxy,
58
59
  waitForProxy
59
- } from "./chunk-ZAWQJOTW.js";
60
+ } from "./chunk-UX5KLSAJ.js";
60
61
  import {
61
62
  probeAudioTrack,
62
63
  probeMediaMetadata
63
- } from "./chunk-SNKBI4YB.js";
64
+ } from "./chunk-TJAFCC37.js";
64
65
  import {
65
66
  HistoryBusyError,
66
67
  MAX_WINDOW_IDLE_MS,
@@ -75,7 +76,7 @@ import {
75
76
  resolveProjectSignature,
76
77
  serveWhileOpen,
77
78
  settledFileTag
78
- } from "./chunk-E4IR34CF.js";
79
+ } from "./chunk-5T2LNQAH.js";
79
80
  import {
80
81
  findTimelineScript,
81
82
  parseGsapScriptAcorn
@@ -96,23 +97,26 @@ import {
96
97
  isAudioFile
97
98
  } from "./chunk-P2ZMVHTF.js";
98
99
  import {
99
- MEDIA_INPUT_ARGS
100
- } from "./chunk-6T4PB35F.js";
100
+ mediaInputArgs
101
+ } from "./chunk-TRQDC2UC.js";
101
102
  import {
102
103
  isInHiddenOrVendorDir,
103
104
  isLinkFreeWithinProject,
104
105
  isPrivateProjectFile,
105
106
  isPrivateProjectPath,
107
+ isProjectCacheFile,
106
108
  isWritableProjectFile,
107
109
  mkdirOwnedWithinProject,
108
110
  pinWithinProject,
109
111
  pinWritableWithinProject,
110
112
  projectRelativePath,
113
+ readProjectCacheFile,
111
114
  realFilePath,
112
115
  resolveWithinProject as resolveWithinProject2,
113
116
  resolveWritableWithinProject,
117
+ toolTrustedFileWithin,
114
118
  walkDir
115
- } from "./chunk-3GKGBYW3.js";
119
+ } from "./chunk-WTO3A7ET.js";
116
120
  import {
117
121
  PREVIEW_FOR_ANOTHER_SITE_META,
118
122
  STUDIO_PREVIEW_CAPTURE_MODE,
@@ -121,7 +125,7 @@ import {
121
125
  STUDIO_PREVIEW_LAZY_ATTR,
122
126
  STUDIO_PREVIEW_MARK_META,
123
127
  refusedPreviewMessage
124
- } from "./chunk-YXX6CIHL.js";
128
+ } from "./chunk-BWFNWEUO.js";
125
129
  import {
126
130
  decodableAudioStream
127
131
  } from "./chunk-D54ZDCZR.js";
@@ -130,7 +134,10 @@ import {
130
134
  ensureHfIds,
131
135
  stampHfIdsInPlace,
132
136
  stripSdrPngColourTags
133
- } from "./chunk-4N3WOFP3.js";
137
+ } from "./chunk-7AP5C4C2.js";
138
+ import {
139
+ RENDER_VARIABLES_FILE
140
+ } from "./chunk-F6PI5O3H.js";
134
141
  import {
135
142
  atomicTempPath,
136
143
  catchHeldRename,
@@ -138,7 +145,7 @@ import {
138
145
  createStagingDir,
139
146
  replaceFileAtomically,
140
147
  retryWindowsHold
141
- } from "./chunk-DL6PEJWH.js";
148
+ } from "./chunk-LYTELQL2.js";
142
149
  import {
143
150
  GSAP_BASE_URL_META,
144
151
  PREVIEW_PROXY_BOX_PARAM,
@@ -156,7 +163,7 @@ import {
156
163
  normalizeGsapLocalRoot,
157
164
  parseFps,
158
165
  parsePreviewProxyBox
159
- } from "./chunk-5IUVWP3A.js";
166
+ } from "./chunk-MPVJI4SE.js";
160
167
  import {
161
168
  AFTER_FONTS_SCRIPT_TYPE,
162
169
  RUNTIME_BOOTSTRAP_ATTR,
@@ -171,7 +178,7 @@ import {
171
178
  resolveRateSpec,
172
179
  sourceTimeAt,
173
180
  stripEmbeddedRuntimeScripts
174
- } from "./chunk-2RUCE54M.js";
181
+ } from "./chunk-BNH2IKGV.js";
175
182
  import {
176
183
  ProjectRootMissingError,
177
184
  folderGone,
@@ -180,11 +187,11 @@ import {
180
187
  mkdirWithinProject,
181
188
  realpath,
182
189
  resolveWithinProject
183
- } from "./chunk-SALNTRJA.js";
190
+ } from "./chunk-3GF72UPC.js";
184
191
  import {
185
192
  isWithinProjectRoot,
186
193
  readProjectFile
187
- } from "./chunk-6EMFSRTW.js";
194
+ } from "./chunk-S35RUNXJ.js";
188
195
  import {
189
196
  decodeCssEscapes,
190
197
  decodeWellFormedEscapes,
@@ -203,20 +210,20 @@ import {
203
210
  decodeAuthoredAttribute,
204
211
  scanHtmlOpeningTags,
205
212
  unrollComputedTimeline
206
- } from "./chunk-7IMHPBSH.js";
207
- import {
208
- parseHTML
209
- } from "./chunk-GWTIFRF5.js";
213
+ } from "./chunk-4NDSGKPO.js";
210
214
  import {
211
215
  ancestor,
212
216
  full,
213
217
  simple
214
218
  } from "./chunk-WC4MTXGN.js";
219
+ import {
220
+ parseHTML
221
+ } from "./chunk-GWTIFRF5.js";
215
222
  import {
216
223
  FFPROBE_PATH_ENV,
217
224
  findFfBinary,
218
225
  requireFfBinary
219
- } from "./chunk-IE6BIB3L.js";
226
+ } from "./chunk-VM2VBJRC.js";
220
227
 
221
228
  // ../studio-server/dist/chunk-UEEXAVOA.js
222
229
  function findUnsafeMutationValues(value, path = "body", options = {}) {
@@ -243,7 +250,7 @@ function findUnsafeDomPatchValues(value) {
243
250
  });
244
251
  }
245
252
 
246
- // ../studio-server/dist/chunk-QSGY6LJM.js
253
+ // ../studio-server/dist/chunk-P7XQOBFZ.js
247
254
  import { hostname, networkInterfaces } from "os";
248
255
  function isLoopbackHost(host) {
249
256
  if (!host) return false;
@@ -327,6 +334,10 @@ function requestFromAnotherSite(headers) {
327
334
  if (!host || isLoopbackHost(host)) return false;
328
335
  return !refererNamesHost(headers.referer, host);
329
336
  }
337
+ function documentFromAnotherSite(headers) {
338
+ if (headers.fetchSite !== void 0 || !headers.host) return requestFromAnotherSite(headers);
339
+ return !refererNamesHost(headers.referer, headers.host);
340
+ }
330
341
  function firstForwarded(value) {
331
342
  const first = value?.split(",")[0]?.trim();
332
343
  return first === "" ? void 0 : first;
@@ -351,7 +362,7 @@ function sameOriginPost(headers) {
351
362
  return originMatches(headers.origin, host, proto);
352
363
  }
353
364
 
354
- // ../studio-server/dist/chunk-CRNUQN3O.js
365
+ // ../studio-server/dist/chunk-MFIHKG5J.js
355
366
  import { createHash } from "crypto";
356
367
  import { closeSync, constants, fstatSync, openSync, readFileSync } from "fs";
357
368
  import { dirname, join } from "path";
@@ -637,7 +648,7 @@ function studioMotionRenderRuntime(manifestContent, activeCompositionPath) {
637
648
  applyManifest();
638
649
  }
639
650
 
640
- // ../studio-server/dist/chunk-GWETDT5A.js
651
+ // ../studio-server/dist/chunk-2ZSUGK2Q.js
641
652
  import { resolve } from "path";
642
653
  function isAutoProxyEnabled(adapter) {
643
654
  return adapter.autoProxy !== false;
@@ -684,7 +695,7 @@ async function injectMediaCodecMap(html, adapter, projectDir, compSrcPath, probe
684
695
  return injectMediaCodecMapIntoHtml(html, projectDir, [{ html, compSrcPath }], probeCache, false);
685
696
  }
686
697
 
687
- // ../studio-server/dist/chunk-BOT2TMP7.js
698
+ // ../studio-server/dist/chunk-DRQHYTL6.js
688
699
  import { existsSync, readFileSync as readFileSync2 } from "fs";
689
700
  import { join as join2 } from "path";
690
701
  import { readlinkSync } from "fs";
@@ -1268,7 +1279,13 @@ var JobAbandonedError = class extends Error {
1268
1279
  this.name = "JobAbandonedError";
1269
1280
  }
1270
1281
  };
1271
- function createJobSlots(limit) {
1282
+ var JobQueueFullError = class extends Error {
1283
+ constructor() {
1284
+ super("job queue is full; retry shortly");
1285
+ this.name = "JobQueueFullError";
1286
+ }
1287
+ };
1288
+ function createJobSlots(limit, maxWaiting = Number.POSITIVE_INFINITY) {
1272
1289
  let running = 0;
1273
1290
  const waiting = [];
1274
1291
  const acquire = (signal) => new Promise((resolve33, reject) => {
@@ -1277,6 +1294,7 @@ function createJobSlots(limit) {
1277
1294
  running++;
1278
1295
  return resolve33();
1279
1296
  }
1297
+ if (waiting.length >= maxWaiting) return reject(new JobQueueFullError());
1280
1298
  const leave = () => {
1281
1299
  waiting.splice(waiting.indexOf(start), 1);
1282
1300
  reject(new JobAbandonedError());
@@ -1303,7 +1321,7 @@ function createJobSlots(limit) {
1303
1321
  };
1304
1322
  }
1305
1323
  var PROJECT_SIGNATURE_META = "hyperframes-project-signature";
1306
- var runStillJob = createJobSlots(4);
1324
+ var runStillJob = createJobSlots(4, 16);
1307
1325
  function escapeGsapUrl(url) {
1308
1326
  return url.replace(/&/g, "&").replace(/"/g, """);
1309
1327
  }
@@ -1477,6 +1495,7 @@ function previewVariablesFromRequest(rawVariables) {
1477
1495
  return { raw: rawVariables, values: parse22.values };
1478
1496
  }
1479
1497
  var PREVIEW_CAPTURE_PARAM = "hf-capture";
1498
+ var PREVIEW_PROXY_PARAM = "hf-proxy";
1480
1499
  function scriptJson(value) {
1481
1500
  return JSON.stringify(value).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
1482
1501
  }
@@ -1775,7 +1794,7 @@ ${etag}`;
1775
1794
  }
1776
1795
  const contentType = getMimeType(subPath);
1777
1796
  const isText2 = /\.(html|css|js|json|svg|txt|md|cube)$/i.test(subPath);
1778
- const proxyParam = c.req.query("hf-proxy");
1797
+ const proxyParam = c.req.query(PREVIEW_PROXY_PARAM);
1779
1798
  const boxParam = c.req.query(PREVIEW_PROXY_BOX_PARAM);
1780
1799
  const proxyBox = boxParam === void 0 ? void 0 : parsePreviewProxyBox(boxParam);
1781
1800
  const lightRequested = c.req.query(PREVIEW_PROXY_LIGHT_PARAM) !== void 0;
@@ -1814,6 +1833,10 @@ ${etag}`;
1814
1833
  headers: { "Content-Type": "image/jpeg", "Cache-Control": "private, max-age=3600" }
1815
1834
  });
1816
1835
  } catch (err) {
1836
+ if (err instanceof JobQueueFullError) {
1837
+ return c.text(err.message, 503, { "Retry-After": "5" });
1838
+ }
1839
+ if (err instanceof StillPastEndError) return c.text("not found", 404);
1817
1840
  if (isProjectRootMissing(err)) throw err;
1818
1841
  return c.text("media still failed", 502);
1819
1842
  }
@@ -1966,7 +1989,7 @@ import {
1966
1989
  statSync as statSync3,
1967
1990
  fstatSync as fstatSync2,
1968
1991
  renameSync as renameSync2,
1969
- readdirSync as readdirSync2,
1992
+ readdirSync as readdirSync3,
1970
1993
  realpathSync
1971
1994
  } from "fs";
1972
1995
  import { resolve as resolve23, dirname as dirname3, join as join52, sep as sep2 } from "path";
@@ -1981,16 +2004,18 @@ import {
1981
2004
  writeFileSync,
1982
2005
  mkdirSync,
1983
2006
  lstatSync,
2007
+ readdirSync,
1984
2008
  renameSync,
1985
2009
  rmSync,
1986
- statSync as statSync2
2010
+ statSync as statSync2,
2011
+ utimesSync
1987
2012
  } from "fs";
1988
2013
  import { dirname as dirname23, join as join23 } from "path";
1989
2014
  import { spawnSync } from "child_process";
1990
2015
  import { mkdtempSync, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "fs";
1991
2016
  import { tmpdir } from "os";
1992
2017
  import { basename, join as join32 } from "path";
1993
- import { readdirSync, readFileSync as readFileSync23, unlinkSync, writeFileSync as writeFileSync3 } from "fs";
2018
+ import { readdirSync as readdirSync2, readFileSync as readFileSync23, unlinkSync, writeFileSync as writeFileSync3 } from "fs";
1994
2019
  import { Buffer as Buffer2 } from "buffer";
1995
2020
  import { createHash as createHash22 } from "crypto";
1996
2021
  import { join as join42, relative as relative22 } from "path";
@@ -5246,7 +5271,7 @@ import {
5246
5271
  lstatSync as lstatSync3,
5247
5272
  readFileSync as readFileSync6,
5248
5273
  unlinkSync as unlinkSync3,
5249
- readdirSync as readdirSync3,
5274
+ readdirSync as readdirSync4,
5250
5275
  statSync as statSync4
5251
5276
  } from "fs";
5252
5277
  import { dirname as dirname42, join as join7 } from "path";
@@ -5259,7 +5284,7 @@ import {
5259
5284
  fstatSync as fstatSync22,
5260
5285
  openSync as openSync22,
5261
5286
  readFileSync as readFileSync7,
5262
- readdirSync as readdirSync4,
5287
+ readdirSync as readdirSync5,
5263
5288
  renameSync as renameSync3,
5264
5289
  rmSync as rmSync4,
5265
5290
  statSync as statSync5,
@@ -5269,29 +5294,29 @@ import {
5269
5294
  import { dirname as dirname5, join as join8 } from "path";
5270
5295
  import { createHash as createHash4, randomUUID as randomUUID2 } from "crypto";
5271
5296
  import { isIP } from "net";
5272
- import { existsSync as existsSync5, readFileSync as readFileSync8, statSync as statSync6 } from "fs";
5297
+ import { statSync as statSync6 } from "fs";
5273
5298
  import { join as join9, relative as relative3, resolve as resolve32 } from "path";
5274
5299
  import { execFile } from "child_process";
5275
- import { readFileSync as readFileSync9, rmSync as rmSync5, statSync as statSync7 } from "fs";
5300
+ import { readFileSync as readFileSync8, rmSync as rmSync5, statSync as statSync7 } from "fs";
5276
5301
  import { basename as basename2, dirname as dirname6, join as join10, relative as relative4, sep as sep3 } from "path";
5277
5302
  import { createHash as createHash5, randomBytes } from "crypto";
5278
- import { existsSync as existsSync6 } from "fs";
5279
- import { existsSync as existsSync7, readFileSync as readFileSync10, statSync as statSync8 } from "fs";
5303
+ import { existsSync as existsSync5 } from "fs";
5304
+ import { statSync as statSync8 } from "fs";
5280
5305
  import { join as join11, relative as relative5, resolve as resolve4 } from "path";
5281
5306
  import { spawn as spawn2 } from "child_process";
5282
5307
  import { closeSync as closeSync3, constants as constants2, fstatSync as fstatSync3, openSync as openSync3, readSync } from "fs";
5283
5308
  import { createHash as createHash6 } from "crypto";
5284
- import { closeSync as closeSync4, constants as constants22, fstatSync as fstatSync4, openSync as openSync4, readFileSync as readFileSync11, rmSync as rmSync6 } from "fs";
5309
+ import { closeSync as closeSync4, constants as constants22, fstatSync as fstatSync4, openSync as openSync4, readFileSync as readFileSync9, rmSync as rmSync6 } from "fs";
5285
5310
  import { join as join12 } from "path";
5286
5311
  import { streamSSE as streamSSE2 } from "hono/streaming";
5287
- import { existsSync as existsSync8, statSync as statSync9 } from "fs";
5312
+ import { existsSync as existsSync6, statSync as statSync9 } from "fs";
5288
5313
  import { basename as basename3, dirname as dirname7, extname, join as join13, posix } from "path";
5289
- import { existsSync as existsSync9, readFileSync as readFileSync12 } from "fs";
5314
+ import { existsSync as existsSync7, readFileSync as readFileSync10 } from "fs";
5290
5315
  import { homedir } from "os";
5291
5316
  import { join as join14 } from "path";
5292
5317
  import { createHmac, randomBytes as randomBytes2, timingSafeEqual } from "crypto";
5293
- import { createHash as createHash7 } from "crypto";
5294
- import { readFileSync as readFileSync13, readdirSync as readdirSync5, rmSync as rmSync7 } from "fs";
5318
+ import { createHash as createHash7, createHmac as createHmac2, timingSafeEqual as timingSafeEqual2 } from "crypto";
5319
+ import { readdirSync as readdirSync6, rmSync as rmSync7 } from "fs";
5295
5320
  import { join as join15 } from "path";
5296
5321
  async function filterCompositionFiles(projectDir, files) {
5297
5322
  const htmlFiles = files.filter((f) => f.endsWith(".html") && !isInHiddenOrVendorDir(f));
@@ -5634,6 +5659,8 @@ function compositionsAffectedBy(projectDir, changedPath) {
5634
5659
  var SAMPLE_RATE = 4e3;
5635
5660
  var PEAK_COUNT = 4e3;
5636
5661
  var WAVEFORM_CACHE_VERSION = "v2";
5662
+ var WAVEFORM_CACHE_LIMITS = { entries: 500, bytes: 256 * 1024 * 1024 };
5663
+ var SAMPLE_BIN_CAPACITY = 1 << 16;
5637
5664
  function buildWaveformCacheKey(assetPath, fingerprint) {
5638
5665
  const name = assetPath.replace(/[/\\]/g, "_");
5639
5666
  if (!fingerprint) return `${WAVEFORM_CACHE_VERSION}_${name}.json`;
@@ -5656,15 +5683,48 @@ function computePeaks(floats, count) {
5656
5683
  const maxPeak = Math.max(...peaks, 1e-3);
5657
5684
  return peaks.map((p) => p / maxPeak);
5658
5685
  }
5659
- async function decodeAudioPeaks(audioPath) {
5686
+ function createSampleBins(capacity = SAMPLE_BIN_CAPACITY) {
5687
+ return {
5688
+ peaks: new Float32Array(capacity),
5689
+ length: 0,
5690
+ samplesPerBin: 1,
5691
+ inBin: 0,
5692
+ carry: Buffer.alloc(0)
5693
+ };
5694
+ }
5695
+ function mergeNeighbouringBins(bins) {
5696
+ const half = bins.length / 2;
5697
+ for (let i = 0; i < half; i++) {
5698
+ bins.peaks[i] = Math.max(bins.peaks[2 * i] ?? 0, bins.peaks[2 * i + 1] ?? 0);
5699
+ }
5700
+ bins.length = half;
5701
+ bins.samplesPerBin *= 2;
5702
+ }
5703
+ function addSamples(bins, chunk) {
5704
+ const data = bins.carry.length > 0 ? Buffer.concat([bins.carry, chunk]) : chunk;
5705
+ const whole = data.length - data.length % 4;
5706
+ for (let offset = 0; offset < whole; offset += 4) {
5707
+ const abs = Math.abs(data.readFloatLE(offset));
5708
+ if (bins.inBin === 0) {
5709
+ if (bins.length === bins.peaks.length) mergeNeighbouringBins(bins);
5710
+ bins.peaks[bins.length++] = abs;
5711
+ } else if (abs > (bins.peaks[bins.length - 1] ?? 0)) {
5712
+ bins.peaks[bins.length - 1] = abs;
5713
+ }
5714
+ bins.inBin = (bins.inBin + 1) % bins.samplesPerBin;
5715
+ }
5716
+ bins.carry = Buffer.from(data.subarray(whole));
5717
+ }
5718
+ async function decodeAudioPeaks(audioPath, signal) {
5660
5719
  const track2 = await probeAudioTrack(audioPath);
5661
5720
  if (!track2) throw new Error("no audio stream");
5721
+ signal?.throwIfAborted();
5662
5722
  const ffmpeg = requireFfBinary("ffmpeg");
5663
5723
  return new Promise((resolvePromise, reject) => {
5664
5724
  const proc = spawn(
5665
5725
  ffmpeg,
5666
5726
  [
5667
- ...MEDIA_INPUT_ARGS,
5727
+ ...mediaInputArgs(audioPath),
5668
5728
  "-i",
5669
5729
  audioPath,
5670
5730
  "-map",
@@ -5680,23 +5740,20 @@ async function decodeAudioPeaks(audioPath) {
5680
5740
  "-vn",
5681
5741
  "pipe:1"
5682
5742
  ],
5683
- { stdio: ["ignore", "pipe", "ignore"], windowsHide: true }
5743
+ { stdio: ["ignore", "pipe", "ignore"], windowsHide: true, signal }
5684
5744
  );
5685
- const chunks = [];
5686
- proc.stdout?.on("data", (chunk) => chunks.push(chunk));
5745
+ const bins = createSampleBins();
5746
+ proc.stdout?.on("data", (chunk) => addSamples(bins, chunk));
5687
5747
  proc.on("close", (code) => {
5688
- if (code !== 0 && chunks.length === 0) {
5748
+ if (code !== 0 && bins.length === 0) {
5689
5749
  reject(new Error(`ffmpeg exited with code ${code}`));
5690
5750
  return;
5691
5751
  }
5692
- const buf = Buffer.concat(chunks);
5693
- const numSamples = Math.floor(buf.length / 4);
5694
- if (numSamples === 0) {
5752
+ if (bins.length === 0) {
5695
5753
  reject(new Error("ffmpeg produced no audio samples"));
5696
5754
  return;
5697
5755
  }
5698
- const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + numSamples * 4);
5699
- resolvePromise(computePeaks(new Float32Array(ab), PEAK_COUNT));
5756
+ resolvePromise(computePeaks(bins.peaks.subarray(0, bins.length), PEAK_COUNT));
5700
5757
  });
5701
5758
  proc.on("error", reject);
5702
5759
  });
@@ -5707,14 +5764,14 @@ async function generateWaveformCache(projectDir, assetPath) {
5707
5764
  const stats = statSync2(audioPath);
5708
5765
  const cacheDir = join23(projectDir, ".waveform-cache");
5709
5766
  const cachePath = join23(cacheDir, buildWaveformCacheKey(assetPath, stats));
5710
- if (isWaveformCacheDirectory(cacheDir) && existsSync22(cachePath)) return;
5767
+ if (isProjectCacheFile(projectDir, cachePath)) return;
5711
5768
  const peaks = await decodeAudioPeaks(audioPath);
5712
5769
  writeWaveformCache(cachePath, peaks);
5713
5770
  }
5714
5771
  function isWaveformCacheDirectory(cacheDir) {
5715
5772
  return lstatSync(cacheDir, { throwIfNoEntry: false })?.isDirectory() ?? false;
5716
5773
  }
5717
- function writeWaveformCache(cachePath, peaks) {
5774
+ function writeWaveformCache(cachePath, peaks, limits = WAVEFORM_CACHE_LIMITS) {
5718
5775
  const cacheDir = dirname23(cachePath);
5719
5776
  try {
5720
5777
  mkdirSync(cacheDir, { mode: 448 });
@@ -5732,10 +5789,46 @@ function writeWaveformCache(cachePath, peaks) {
5732
5789
  } finally {
5733
5790
  try {
5734
5791
  rmSync(stagingDir, { recursive: true, force: true });
5792
+ dropEntriesPastCacheLimit(cacheDir, limits);
5735
5793
  } catch {
5736
5794
  }
5737
5795
  }
5738
5796
  }
5797
+ var PEAKS_CACHE_MAX_BYTES = 64 * 1024 * 1024;
5798
+ function readCachedPeaks(projectDir, cachePath) {
5799
+ const bytes = readProjectCacheFile(projectDir, cachePath, PEAKS_CACHE_MAX_BYTES);
5800
+ if (!bytes) return null;
5801
+ try {
5802
+ const parsed = JSON.parse(bytes.toString("utf-8"));
5803
+ if (!Array.isArray(parsed) || !parsed.every((n) => typeof n === "number")) return null;
5804
+ markWaveformCacheUsed(cachePath);
5805
+ return parsed;
5806
+ } catch {
5807
+ return null;
5808
+ }
5809
+ }
5810
+ function markWaveformCacheUsed(cachePath) {
5811
+ try {
5812
+ const now = /* @__PURE__ */ new Date();
5813
+ utimesSync(cachePath, now, now);
5814
+ } catch {
5815
+ }
5816
+ }
5817
+ function dropEntriesPastCacheLimit(cacheDir, limits) {
5818
+ const entries = readdirSync(cacheDir, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => {
5819
+ const path = join23(cacheDir, entry.name);
5820
+ const stats = lstatSync(path, { throwIfNoEntry: false });
5821
+ return { path, mtimeMs: stats?.mtimeMs ?? 0, size: stats?.size ?? 0 };
5822
+ }).sort((a, b) => a.mtimeMs - b.mtimeMs);
5823
+ let count = entries.length;
5824
+ let bytes = entries.reduce((sum, entry) => sum + entry.size, 0);
5825
+ for (const entry of entries) {
5826
+ if (count <= limits.entries && bytes <= limits.bytes) return;
5827
+ rmSync(entry.path, { force: true });
5828
+ count--;
5829
+ bytes -= entry.size;
5830
+ }
5831
+ }
5739
5832
  var VIDEO_EXT = /\.(mp4|webm|mov|mkv|avi|m4v|mxf|mts|m2ts|ts)$/i;
5740
5833
  var AUDIO_EXT = /\.(mp3|wav|ogg|m4a|aac|flac)$/i;
5741
5834
  var defaultRunner = spawnSync;
@@ -5757,7 +5850,7 @@ function validateUploadedMedia(filePath, runner = defaultRunner) {
5757
5850
  "stream=codec_type,codec_name",
5758
5851
  "-of",
5759
5852
  "json",
5760
- ...MEDIA_INPUT_ARGS,
5853
+ ...mediaInputArgs(filePath),
5761
5854
  "--",
5762
5855
  filePath
5763
5856
  ],
@@ -5857,7 +5950,7 @@ function nextBackupPath(backupDir, backupKey) {
5857
5950
  }
5858
5951
  function backupsNewestFirst(backupDir, backupKeys) {
5859
5952
  const suffix = new RegExp(`-(?:${backupKeys.join("|")})(?:-\\d+)?$`);
5860
- return readdirSync(backupDir).filter((name) => suffix.test(name)).map((name) => join42(backupDir, name)).sort((a, b) => b.localeCompare(a));
5953
+ return readdirSync2(backupDir).filter((name) => suffix.test(name)).map((name) => join42(backupDir, name)).sort((a, b) => b.localeCompare(a));
5861
5954
  }
5862
5955
  function pruneBackups(backupDir, backupKeys, keepPerFile) {
5863
5956
  const keep = Math.max(1, Math.floor(keepPerFile));
@@ -6332,7 +6425,7 @@ function skippable(error) {
6332
6425
  }
6333
6426
  function readableEntries(dir) {
6334
6427
  try {
6335
- return readdirSync2(dir, { withFileTypes: true });
6428
+ return readdirSync3(dir, { withFileTypes: true });
6336
6429
  } catch (error) {
6337
6430
  if (skippable(error)) return [];
6338
6431
  throw error;
@@ -6910,7 +7003,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
6910
7003
  let block = extractGsapScriptBlock(html);
6911
7004
  if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
6912
7005
  const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
6913
- const { GSAP_CDN } = await import("./dist-G7VFX23I.js");
7006
+ const { GSAP_CDN } = await import("./dist-HF753IX4.js");
6914
7007
  const bootstrap = [
6915
7008
  `<script src="${GSAP_CDN}"></script>`,
6916
7009
  "<script>",
@@ -7767,8 +7860,10 @@ async function processUploadedFiles(formData, targetDir, projectDir) {
7767
7860
  finalName = `${base} (${n})${ext}`;
7768
7861
  finalPath = resolve23(targetDir, finalName);
7769
7862
  }
7770
- if (!isSafePath(projectDir, finalPath) || !isWritableProjectFile(projectDir, finalPath))
7863
+ if (!isSafePath(projectDir, finalPath) || !isWritableProjectFile(projectDir, finalPath)) {
7864
+ skipped.push(name);
7771
7865
  continue;
7866
+ }
7772
7867
  const buffer = Buffer.from(await value.arrayBuffer());
7773
7868
  const validation = validateUploadedMediaBuffer(finalName, buffer);
7774
7869
  if (!validation.ok) {
@@ -8024,6 +8119,9 @@ function registerFileRoutes(api, adapter) {
8024
8119
  const res = await resolveProjectFile(c, adapter, { mustExist: true, write: true });
8025
8120
  if ("error" in res) return res.error;
8026
8121
  const stat2 = statSync3(res.absPath);
8122
+ if (stat2.isDirectory() && toolTrustedFileWithin(res.project.dir, res.absPath)) {
8123
+ return c.json({ error: "forbidden", why: "protected_path" }, 403);
8124
+ }
8027
8125
  const backup = snapshotBeforeWrite(res.project.dir, res.absPath);
8028
8126
  if (backup.error) return c.json({ error: `backup failed: ${backup.error}` }, 500);
8029
8127
  if (stat2.isDirectory()) {
@@ -8577,6 +8675,9 @@ function registerFileRoutes(api, adapter) {
8577
8675
  return c.json({ error: "already exists" }, 409);
8578
8676
  }
8579
8677
  const isDirectory = statSync3(res.absPath, { throwIfNoEntry: false })?.isDirectory() ?? false;
8678
+ if (isDirectory && toolTrustedFileWithin(res.project.dir, res.absPath)) {
8679
+ return c.json({ error: "forbidden", why: "protected_path" }, 403);
8680
+ }
8580
8681
  ensureDir(res.project.dir, newAbs);
8581
8682
  renameSync2(res.absPath, newAbs);
8582
8683
  const updatedFiles = updateReferences(res.project.dir, res.filePath, newPath, isDirectory);
@@ -9006,6 +9107,20 @@ function registerRenderRoutes(api, adapter) {
9006
9107
  ensureCleanupTimer();
9007
9108
  return c.json({ jobId, status: "rendering" });
9008
9109
  });
9110
+ api.put("/projects/:id/render-variables", async (c) => {
9111
+ const project = await adapter.resolveProject(c.req.param("id"));
9112
+ if (!project) return c.json({ error: "not found" }, 404);
9113
+ const values = await c.req.json().catch(() => void 0);
9114
+ if (!isVariablesPayload(values)) return c.json({ error: VARIABLES_PAYLOAD_ERROR }, 400);
9115
+ if (folderGone(project.dir)) return projectDirMissing(c);
9116
+ const path = join7(project.dir, RENDER_VARIABLES_FILE);
9117
+ if (!isLinkFreeWithinProject(project.dir, dirname42(path))) {
9118
+ return c.json({ error: "forbidden", why: "link" }, 403);
9119
+ }
9120
+ mkdirWithinProject(project.dir, dirname42(path));
9121
+ replaceFileAtomically(path, JSON.stringify(values, null, 2) + "\n", 420);
9122
+ return c.json({ path: RENDER_VARIABLES_FILE });
9123
+ });
9009
9124
  api.get("/render/:jobId/progress", (c) => {
9010
9125
  const { jobId } = c.req.param();
9011
9126
  const job = renderJobs.get(jobId);
@@ -9121,7 +9236,7 @@ function registerRenderRoutes(api, adapter) {
9121
9236
  if (!project) return c.json({ error: "not found" }, 404);
9122
9237
  const rendersDir = adapter.rendersDir(project);
9123
9238
  if (!existsSync42(rendersDir)) return c.json({ renders: [] });
9124
- const files = readdirSync3(rendersDir).filter((f) => RENDER_EXTENSIONS.some((extension) => f.endsWith(extension))).flatMap((f) => {
9239
+ const files = readdirSync4(rendersDir).filter((f) => RENDER_EXTENSIONS.some((extension) => f.endsWith(extension))).flatMap((f) => {
9125
9240
  const fp = resolveWithinProject2(rendersDir, f);
9126
9241
  return fp && !isPrivateProjectFile(project.dir, fp) ? [{ f, fp }] : [];
9127
9242
  }).map(({ f, fp }) => {
@@ -9288,7 +9403,7 @@ function pruneThumbnailCache(cacheDir, protectedPaths, now = Date.now()) {
9288
9403
  if (!isLinkFreeWithinProject(dirname5(cacheDir), cacheDir)) return;
9289
9404
  let entries;
9290
9405
  try {
9291
- entries = readdirSync4(cacheDir, { withFileTypes: true });
9406
+ entries = readdirSync5(cacheDir, { withFileTypes: true });
9292
9407
  } catch (err) {
9293
9408
  if (err.code === "ENOENT") return;
9294
9409
  throw err;
@@ -9355,7 +9470,7 @@ function manifestKey(file) {
9355
9470
  const hash = createHash4("sha1").update(manifest.data).digest("hex").slice(0, 16);
9356
9471
  return { key: `_${hash}`, mtimeMs: Math.round(manifest.mtimeMs) };
9357
9472
  }
9358
- function registerThumbnailRoutes(api, adapter) {
9473
+ function registerThumbnailRoutes(api, adapter, frameTokenForCapture) {
9359
9474
  api.get("/projects/:id/thumbnail/*", async (c) => {
9360
9475
  if (!adapter.generateThumbnail) {
9361
9476
  return c.json({ error: "Thumbnails not available" }, 501);
@@ -9405,7 +9520,8 @@ function registerThumbnailRoutes(api, adapter) {
9405
9520
  const origin = thumbnailPreviewOrigin(adapter.serverOrigin?.(), c.req.header("host"));
9406
9521
  if (!origin) return c.json({ error: "thumbnail needs a loopback Host" }, 400);
9407
9522
  const projectUrl = `${origin}/api/projects/${encodeURIComponent(project.id)}`;
9408
- const previewPath = compPath === "index.html" ? `${projectUrl}/preview` : `${projectUrl}/preview/comp/${compPath.split("/").map(encodeURIComponent).join("/")}`;
9523
+ const preview = frameTokenForCapture ? `preview/~${frameTokenForCapture(project.id)}` : "preview";
9524
+ const previewPath = compPath === "index.html" ? `${projectUrl}/${preview}` : `${projectUrl}/${preview}/comp/${compPath.split("/").map(encodeURIComponent).join("/")}`;
9409
9525
  const previewUrl = `${previewPath}?${PREVIEW_CAPTURE_PARAM}=1`;
9410
9526
  const cacheDir = join8(project.dir, ".thumbnails");
9411
9527
  const selectorKey = selector ? `_${createHash4("sha1").update(selector).digest("hex").slice(0, 16)}_${selectorIndex ?? 0}` : "";
@@ -9423,9 +9539,9 @@ function registerThumbnailRoutes(api, adapter) {
9423
9539
  /* @__PURE__ */ new Set([...thumbnailGenerationCoordinator.protectedKeys(), cachePath])
9424
9540
  );
9425
9541
  }
9426
- const cached = readFileOnce(cachePath);
9427
- if (typeof cached === "object") {
9428
- return new Response(new Uint8Array(cached.data), {
9542
+ const cached = readProjectCacheFile(project.dir, cachePath, THUMBNAIL_CACHE_MAX_BYTES);
9543
+ if (cached) {
9544
+ return new Response(new Uint8Array(cached), {
9429
9545
  headers: { "Content-Type": contentType, "Cache-Control": "no-cache" }
9430
9546
  });
9431
9547
  }
@@ -9484,6 +9600,65 @@ function registerThumbnailRoutes(api, adapter) {
9484
9600
  }
9485
9601
  });
9486
9602
  }
9603
+ var AUDIO_DECODE_LIMIT = 4;
9604
+ var AUDIO_DECODE_TIMEOUT_MS = 10 * 6e4;
9605
+ var AudioDecodeTimeoutError = class extends Error {
9606
+ constructor() {
9607
+ super("audio decode took too long");
9608
+ this.name = "AudioDecodeTimeoutError";
9609
+ }
9610
+ };
9611
+ var runDecode = createJobSlots(AUDIO_DECODE_LIMIT);
9612
+ var inFlight = /* @__PURE__ */ new Map();
9613
+ function decodeWithTimeout(mediaPath, decode, stop) {
9614
+ const timedOut = new AbortController();
9615
+ const timer = setTimeout(
9616
+ () => timedOut.abort(new AudioDecodeTimeoutError()),
9617
+ AUDIO_DECODE_TIMEOUT_MS
9618
+ );
9619
+ return decode(mediaPath, AbortSignal.any([stop, timedOut.signal])).finally(
9620
+ () => clearTimeout(timer)
9621
+ );
9622
+ }
9623
+ function startDecode(key, mediaPath, decode) {
9624
+ const stop = new AbortController();
9625
+ const result = runDecode(
9626
+ () => decodeWithTimeout(mediaPath, decode, stop.signal),
9627
+ stop.signal
9628
+ ).finally(() => {
9629
+ if (inFlight.get(key) === shared) inFlight.delete(key);
9630
+ });
9631
+ result.catch(() => void 0);
9632
+ const shared = { result, waiting: 0, stop };
9633
+ inFlight.set(key, shared);
9634
+ return shared;
9635
+ }
9636
+ function decodeShared(key, mediaPath, decode, signal) {
9637
+ const shared = inFlight.get(key) ?? startDecode(key, mediaPath, decode);
9638
+ shared.waiting++;
9639
+ return new Promise((resolve5, reject) => {
9640
+ const leave = () => {
9641
+ shared.waiting--;
9642
+ if (shared.waiting === 0) {
9643
+ if (inFlight.get(key) === shared) inFlight.delete(key);
9644
+ shared.stop.abort();
9645
+ }
9646
+ reject(new JobAbandonedError());
9647
+ };
9648
+ if (signal?.aborted) return leave();
9649
+ signal?.addEventListener("abort", leave, { once: true });
9650
+ shared.result.then(
9651
+ (peaks) => {
9652
+ signal?.removeEventListener("abort", leave);
9653
+ resolve5(peaks);
9654
+ },
9655
+ (error) => {
9656
+ signal?.removeEventListener("abort", leave);
9657
+ reject(error);
9658
+ }
9659
+ );
9660
+ });
9661
+ }
9487
9662
  function registerWaveformRoutes(api, adapter) {
9488
9663
  api.get("/projects/:id/waveform/*", async (c) => {
9489
9664
  const project = await adapter.resolveProject(c.req.param("id"));
@@ -9500,16 +9675,11 @@ function registerWaveformRoutes(api, adapter) {
9500
9675
  cacheDir,
9501
9676
  buildWaveformCacheKey(relative3(project.dir, audioPath), stats)
9502
9677
  );
9503
- try {
9504
- if (isWaveformCacheDirectory(cacheDir) && existsSync5(cachePath)) {
9505
- const peaks2 = JSON.parse(readFileSync8(cachePath, "utf-8"));
9506
- return c.json({ peaks: peaks2 });
9507
- }
9508
- } catch {
9509
- }
9678
+ const cached = readCachedPeaks(project.dir, cachePath);
9679
+ if (cached) return c.json({ peaks: cached });
9510
9680
  let peaks;
9511
9681
  try {
9512
- peaks = await decodeAudioPeaks(audioPath);
9682
+ peaks = await decodeShared(cachePath, audioPath, decodeAudioPeaks, c.req.raw.signal);
9513
9683
  } catch {
9514
9684
  return c.json({ error: "failed to decode audio" }, 500);
9515
9685
  }
@@ -9541,7 +9711,7 @@ function freezeExtractArgs(src, mediaTime, output) {
9541
9711
  "-y",
9542
9712
  "-ss",
9543
9713
  String(round3(mediaTime)),
9544
- ...MEDIA_INPUT_ARGS,
9714
+ ...mediaInputArgs(src),
9545
9715
  "-i",
9546
9716
  src,
9547
9717
  "-frames:v",
@@ -9713,7 +9883,7 @@ var FREEZE_DIR = ["assets", "freeze"];
9713
9883
  function readExpected(absPath, expectedVersion) {
9714
9884
  let content;
9715
9885
  try {
9716
- content = readFileSync9(absPath, "utf-8");
9886
+ content = readFileSync8(absPath, "utf-8");
9717
9887
  } catch {
9718
9888
  return { error: "not found", status: 404 };
9719
9889
  }
@@ -9721,7 +9891,7 @@ function readExpected(absPath, expectedVersion) {
9721
9891
  }
9722
9892
  function readFrame(path) {
9723
9893
  try {
9724
- return readFileSync9(path);
9894
+ return readFileSync8(path);
9725
9895
  } catch (error) {
9726
9896
  if (error.code === "ENOENT") return null;
9727
9897
  throw error;
@@ -9774,7 +9944,7 @@ async function extractStill(projectDir, absPath, source, playhead, tools) {
9774
9944
  return { imageSrc: `${"../".repeat(depth)}${stillPath}`, stillPath, imagePath };
9775
9945
  }
9776
9946
  function writeFolded(projectDir, absPath, path, before, after, options) {
9777
- if (readFileSync9(absPath, "utf-8") !== before) {
9947
+ if (readFileSync8(absPath, "utf-8") !== before) {
9778
9948
  return { error: `file conflict: ${path}`, status: 409 };
9779
9949
  }
9780
9950
  const backup = snapshotBeforeWrite(projectDir, absPath);
@@ -9891,7 +10061,7 @@ function registerLoudnessRoutes(api, adapter, measure = defaultMeasure) {
9891
10061
  } catch (error) {
9892
10062
  return c.json({ error: error instanceof Error ? error.message : String(error) }, 400);
9893
10063
  }
9894
- if (!existsSync6(file)) return c.json({ error: "file not found" }, 404);
10064
+ if (!existsSync5(file)) return c.json({ error: "file not found" }, 404);
9895
10065
  try {
9896
10066
  const measurement = await measure(file, request.window);
9897
10067
  const plan = absoluteLoudnessPlan(
@@ -9939,9 +10109,10 @@ function accumulatePeaks(acc, chunk) {
9939
10109
  function finishPeaks(acc) {
9940
10110
  return acc.bins.map((peak) => Number(peak.toFixed(4)));
9941
10111
  }
9942
- async function decodePeakMap(mediaPath) {
10112
+ async function decodePeakMap(mediaPath, signal) {
9943
10113
  const track2 = await probeAudioTrack(mediaPath);
9944
10114
  if (!track2 || track2.channels < 1) throw new Error("no audio stream");
10115
+ signal?.throwIfAborted();
9945
10116
  const { stream, channels } = track2;
9946
10117
  const ffmpeg = requireFfBinary("ffmpeg");
9947
10118
  return new Promise((resolvePromise, reject) => {
@@ -9950,7 +10121,7 @@ async function decodePeakMap(mediaPath) {
9950
10121
  [
9951
10122
  "-v",
9952
10123
  "error",
9953
- ...MEDIA_INPUT_ARGS,
10124
+ ...mediaInputArgs(mediaPath),
9954
10125
  "-i",
9955
10126
  mediaPath,
9956
10127
  "-map",
@@ -9962,7 +10133,7 @@ async function decodePeakMap(mediaPath) {
9962
10133
  "f32le",
9963
10134
  "pipe:1"
9964
10135
  ],
9965
- { stdio: ["ignore", "pipe", "ignore"], windowsHide: true }
10136
+ { stdio: ["ignore", "pipe", "ignore"], windowsHide: true, signal }
9966
10137
  );
9967
10138
  const acc = createPeakAccumulator(PEAK_SAMPLE_RATE, PEAK_BIN_SECONDS, channels);
9968
10139
  proc.stdout?.on("data", (chunk) => accumulatePeaks(acc, chunk));
@@ -9984,23 +10155,6 @@ function buildPeakMapCacheKey(assetPath, fingerprint) {
9984
10155
  const name = assetPath.replace(/[/\\]/g, "_");
9985
10156
  return `${PEAK_MAP_CACHE_VERSION}_${name}_${fingerprint.size}-${Math.round(fingerprint.mtimeMs)}.json`;
9986
10157
  }
9987
- var decodesInFlight = /* @__PURE__ */ new Map();
9988
- function decodeOnce(cachePath, mediaPath, decode) {
9989
- const pending2 = decodesInFlight.get(cachePath);
9990
- if (pending2) return pending2;
9991
- const started = decode(mediaPath).finally(() => decodesInFlight.delete(cachePath));
9992
- decodesInFlight.set(cachePath, started);
9993
- return started;
9994
- }
9995
- function readCachedBins(cacheDir, cachePath) {
9996
- try {
9997
- if (!isWaveformCacheDirectory(cacheDir) || !existsSync7(cachePath)) return null;
9998
- const parsed = JSON.parse(readFileSync10(cachePath, "utf-8"));
9999
- return Array.isArray(parsed) && parsed.every((n) => typeof n === "number") ? parsed : null;
10000
- } catch {
10001
- return null;
10002
- }
10003
- }
10004
10158
  function registerPeakRoutes(api, adapter, decode = decodePeakMap) {
10005
10159
  api.get("/projects/:id/peaks/*", async (c) => {
10006
10160
  const project = await adapter.resolveProject(c.req.param("id"));
@@ -10013,11 +10167,11 @@ function registerPeakRoutes(api, adapter, decode = decodePeakMap) {
10013
10167
  if (!stats?.isFile()) return c.json({ error: "file not found" }, 404);
10014
10168
  const cacheDir = join11(project.dir, ".waveform-cache");
10015
10169
  const cachePath = join11(cacheDir, buildPeakMapCacheKey(relative5(project.dir, mediaPath), stats));
10016
- const cached = readCachedBins(cacheDir, cachePath);
10170
+ const cached = readCachedPeaks(project.dir, cachePath);
10017
10171
  if (cached) return c.json({ binSeconds: PEAK_BIN_SECONDS, bins: cached });
10018
10172
  let bins;
10019
10173
  try {
10020
- bins = await decodeOnce(cachePath, mediaPath, decode);
10174
+ bins = await decodeShared(cachePath, mediaPath, decode, c.req.raw.signal);
10021
10175
  } catch {
10022
10176
  return c.json({ error: "failed to decode audio" }, 500);
10023
10177
  }
@@ -10298,7 +10452,7 @@ function readDraft(file) {
10298
10452
  try {
10299
10453
  const stat2 = fstatSync4(fd);
10300
10454
  if (!stat2.isFile() || stat2.size > MAX_DRAFT_BYTES) return null;
10301
- return JSON.parse(readFileSync11(fd, "utf-8"));
10455
+ return JSON.parse(readFileSync9(fd, "utf-8"));
10302
10456
  } catch {
10303
10457
  return null;
10304
10458
  } finally {
@@ -10377,7 +10531,7 @@ function uniqueAssetPath(projectDir, assetPath, taken) {
10377
10531
  const ext = extname(assetPath);
10378
10532
  const withoutExt = assetPath.slice(0, -ext.length);
10379
10533
  let candidate = assetPath;
10380
- for (let index = 2; taken.has(candidate) || existsSync8(join13(projectDir, candidate)); index++) {
10534
+ for (let index = 2; taken.has(candidate) || existsSync6(join13(projectDir, candidate)); index++) {
10381
10535
  candidate = `${withoutExt}-${index}${ext}`;
10382
10536
  }
10383
10537
  return candidate;
@@ -10463,7 +10617,7 @@ function registerMediaRoutes(api, adapter, options = {}) {
10463
10617
  }
10464
10618
  const inputPath = resolveWithinProject2(project.dir, inputAssetPath);
10465
10619
  if (!inputPath) return c.json({ error: "forbidden" }, 403);
10466
- if (!existsSync8(inputPath)) return c.json({ error: "input media not found" }, 404);
10620
+ if (!existsSync6(inputPath)) return c.json({ error: "input media not found" }, 404);
10467
10621
  const inputIsVideo = isVideoPath(inputAssetPath);
10468
10622
  const inputIsImage = isImagePath(inputAssetPath);
10469
10623
  if (!inputIsVideo && !inputIsImage) {
@@ -10556,9 +10710,9 @@ function registerMediaRoutes(api, adapter, options = {}) {
10556
10710
  }
10557
10711
  function readGlobalAssets(home = homedir()) {
10558
10712
  const manifestPath = join14(home, ".media", "manifest.jsonl");
10559
- if (!existsSync9(manifestPath)) return [];
10713
+ if (!existsSync7(manifestPath)) return [];
10560
10714
  const out = [];
10561
- for (const line of readFileSync12(manifestPath, "utf8").split("\n")) {
10715
+ for (const line of readFileSync10(manifestPath, "utf8").split("\n")) {
10562
10716
  if (!line.trim()) continue;
10563
10717
  try {
10564
10718
  const rec = JSON.parse(line);
@@ -10923,6 +11077,8 @@ async function underToken(res, headers, projectId, token) {
10923
11077
  const html = (await res.text()).replaceAll(base, `${base}~${token}/`);
10924
11078
  return new Response(html, { status: res.status, headers });
10925
11079
  }
11080
+ var frameTokenLoads = /* @__PURE__ */ new WeakSet();
11081
+ var loadedThroughFrameToken = (request) => frameTokenLoads.has(request);
10926
11082
  function serveTokenPreviewPaths(api, tokens, resolveProjectId) {
10927
11083
  return async (c, next) => {
10928
11084
  const url = new URL(c.req.url);
@@ -10936,6 +11092,7 @@ function serveTokenPreviewPaths(api, tokens, resolveProjectId) {
10936
11092
  if (answersProxyPreflight(c, url))
10937
11093
  return new Response(null, { status: 204, headers: PROXY_PREFLIGHT_ANSWER });
10938
11094
  const req = new Request(url, { method: c.req.method, headers: c.req.raw.headers });
11095
+ frameTokenLoads.add(req);
10939
11096
  const res = await api.fetch(req);
10940
11097
  return underToken(res, tokenPathHeaders(c, res, url.pathname), projectId, token);
10941
11098
  };
@@ -10951,11 +11108,13 @@ async function answerRefusedFrameWithPage(c, next) {
10951
11108
  headers
10952
11109
  });
10953
11110
  }
10954
- var fromAnotherSite = (c) => requestFromAnotherSite({
11111
+ var siteHeaders = (c) => ({
10955
11112
  fetchSite: c.req.header("sec-fetch-site"),
10956
11113
  host: c.req.header("host") ?? urlHost(c.req.url),
10957
11114
  referer: c.req.header("referer")
10958
11115
  });
11116
+ var fromAnotherSite = (c) => requestFromAnotherSite(siteHeaders(c));
11117
+ var documentForAnotherSite = (c) => documentFromAnotherSite(siteHeaders(c));
10959
11118
  var isThumbnailCapture = (c) => c.req.query(PREVIEW_CAPTURE_PARAM) !== void 0;
10960
11119
  async function markPreviewForAnotherSite(c) {
10961
11120
  if (c.res.status !== 200 || !c.res.headers.get("content-type")?.startsWith("text/html")) return;
@@ -10971,7 +11130,7 @@ async function markPreviewForAnotherSite(c) {
10971
11130
  }
10972
11131
  var FRAMED_DESTS = /* @__PURE__ */ new Set(["document", "iframe", "frame", "embed", "object", "fencedframe"]);
10973
11132
  var framedByAnotherSite = (c) => {
10974
- if (!fromAnotherSite(c)) return false;
11133
+ if (!documentForAnotherSite(c)) return false;
10975
11134
  const dest = c.req.header("sec-fetch-dest");
10976
11135
  return dest === void 0 || FRAMED_DESTS.has(dest);
10977
11136
  };
@@ -10984,12 +11143,18 @@ function withoutValidators(request) {
10984
11143
  var sandboxPreviewForAnotherSiteOrCapture = (sandboxCaptures) => async (c, next) => {
10985
11144
  if (framedByAnotherSite(c)) c.req.raw = withoutValidators(c.req.raw);
10986
11145
  await next();
10987
- c.header("Vary", "Sec-Fetch-Site", { append: true });
10988
- const anotherSite = fromAnotherSite(c);
11146
+ c.header("Vary", "Sec-Fetch-Site, Referer", { append: true });
11147
+ const anotherSite = documentForAnotherSite(c);
10989
11148
  if (anotherSite || sandboxCaptures && isThumbnailCapture(c))
10990
11149
  c.header("Content-Security-Policy", "sandbox allow-scripts");
10991
11150
  if (anotherSite) await markPreviewForAnotherSite(c);
10992
11151
  };
11152
+ async function refuseProxyWorkForAnotherSite(c, next) {
11153
+ const proxyWork = c.req.query(PREVIEW_PROXY_PARAM) !== void 0;
11154
+ if (proxyWork && fromAnotherSite(c) && !loadedThroughFrameToken(c.req.raw))
11155
+ return c.text("forbidden: media proxy requested by another site", 403);
11156
+ return next();
11157
+ }
10993
11158
  var refuseForAnotherSite = (what) => async (c, next) => {
10994
11159
  if (fromAnotherSite(c))
10995
11160
  return c.json({ error: `forbidden: ${what} requested by another site` }, 403);
@@ -11018,6 +11183,7 @@ function createStudioApi(adapter, options = {}) {
11018
11183
  () => void 0
11019
11184
  );
11020
11185
  api.use("/projects/:id/preview/*", serveTokenPreviewPaths(api, frameTokens, resolveProjectId));
11186
+ api.use("/projects/:id/preview/*", refuseProxyWorkForAnotherSite);
11021
11187
  api.use(
11022
11188
  "/projects/:id/preview/*",
11023
11189
  sandboxPreviewForAnotherSiteOrCapture(sandboxThumbnailCaptures)
@@ -11098,7 +11264,11 @@ function createStudioApi(adapter, options = {}) {
11098
11264
  });
11099
11265
  registerLintRoutes(api, adapter);
11100
11266
  registerRenderRoutes(api, adapter);
11101
- registerThumbnailRoutes(api, adapter);
11267
+ registerThumbnailRoutes(
11268
+ api,
11269
+ adapter,
11270
+ sandboxThumbnailCaptures ? frameTokens.tokenFor : void 0
11271
+ );
11102
11272
  registerImageThumbnailRoutes(api, adapter);
11103
11273
  registerSelectionRoutes(api, adapter);
11104
11274
  registerRecoveryDraftRoutes(api, adapter);
@@ -11163,24 +11333,33 @@ function numericAttribute(element, name) {
11163
11333
  const value = Number(element.getAttribute(name));
11164
11334
  return Number.isFinite(value) ? value : null;
11165
11335
  }
11166
- function createPreviewDocumentStore(projectDir, salt) {
11336
+ var MAX_DOCUMENT_BYTES = 256 * 1024 * 1024;
11337
+ var MAC_HEX_LENGTH = 64;
11338
+ function createPreviewDocumentStore(projectDir, salt, secret) {
11339
+ if (!secret) return { read: () => null, write: () => {
11340
+ } };
11167
11341
  const dir = join15(projectDir, ".hyperframes", "preview");
11168
11342
  const fileFor = (key) => join15(dir, `${createHash7("sha256").update(`${salt}
11169
11343
  ${key}`).digest("hex").slice(0, 32)}.html`);
11344
+ const macFor = (key, html) => createHmac2("sha256", secret).update(`preview-document
11345
+ ${salt}
11346
+ ${key}
11347
+ `).update(html).digest("hex");
11170
11348
  return {
11171
11349
  read(key) {
11172
- try {
11173
- return readFileSync13(fileFor(key), "utf-8");
11174
- } catch {
11175
- return null;
11176
- }
11350
+ const stored = readProjectCacheFile(projectDir, fileFor(key), MAX_DOCUMENT_BYTES);
11351
+ if (!stored || stored.length <= MAC_HEX_LENGTH) return null;
11352
+ const html = stored.subarray(MAC_HEX_LENGTH + 1).toString("utf-8");
11353
+ const mac = stored.subarray(0, MAC_HEX_LENGTH);
11354
+ return timingSafeEqual2(mac, Buffer.from(macFor(key, html))) ? html : null;
11177
11355
  },
11178
11356
  write(key, html) {
11179
11357
  try {
11180
11358
  mkdirOwnedWithinProject(projectDir, dir);
11181
11359
  const file = fileFor(key);
11182
- replaceFileAtomically(file, html, 420);
11183
- for (const name of readdirSync5(dir)) {
11360
+ replaceFileAtomically(file, `${macFor(key, html)}
11361
+ ${html}`, 420);
11362
+ for (const name of readdirSync6(dir)) {
11184
11363
  if (join15(dir, name) !== file) rmSync7(join15(dir, name), { force: true });
11185
11364
  }
11186
11365
  } catch {
@@ -11260,6 +11439,7 @@ export {
11260
11439
  hostHeaderAllowed,
11261
11440
  wildcardBindHostAllowed,
11262
11441
  requestFromAnotherSite,
11442
+ documentFromAnotherSite,
11263
11443
  sameOriginPost,
11264
11444
  stampProjectHfIds,
11265
11445
  stampProjectHfIdsAsync,