hyperframes 0.8.222 → 0.8.223
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-6MPLIWVP.js → add-PBLOPJHC.js} +12 -12
- package/dist/{agentPromptGenerator-X7SQPCXZ.js → agentPromptGenerator-OD74HKYZ.js} +7 -7
- package/dist/{animatedGifPrep-ESOJ4FQ7.js → animatedGifPrep-QCG2BTDC.js} +7 -7
- package/dist/api.d.ts +5 -3
- package/dist/api.js +32 -21
- package/dist/{asset-Y735VQV6.js → asset-KHXCO4OR.js} +2 -2
- package/dist/{assetCataloger-AOJAUEZW.js → assetCataloger-ZX5WZTDQ.js} +8 -8
- package/dist/{audio-VMMCGPOV.js → audio-7AH2C6PB.js} +145 -1153
- package/dist/{auth-BD5NHYRA.js → auth-DJWMGXQB.js} +5 -5
- package/dist/{autoUpdate-VTMNHOAJ.js → autoUpdate-KJMLYSHE.js} +2 -2
- package/dist/{backgroundChecks-SUDYQZSW.js → backgroundChecks-XLVQMMXY.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-4NR7RMT7.js → batchRender-UR67LI4H.js} +8 -8
- package/dist/{beats-PKEHQHBY.js → beats-ISWSYNN6.js} +10 -10
- package/dist/{benchmark-K55DDFHG.js → benchmark-7JUATINH.js} +8 -8
- package/dist/billing-VGKY3FMX.js +86 -0
- package/dist/{browser-G2WFWJJ3.js → browser-HNGQB47C.js} +3 -3
- package/dist/{bundleWithLocalizedFonts-MNG2UVH3.js → bundleWithLocalizedFonts-4XWX2XPS.js} +2 -2
- package/dist/{capture-U3EEAPI6.js → capture-GFDP5THL.js} +3 -3
- package/dist/{capture-24PIC3TZ.js → capture-LBEGVQTJ.js} +25 -25
- package/dist/{captureCompositionFrame-KL4V6ORD.js → captureCompositionFrame-5L3J4MZ4.js} +12 -12
- package/dist/{catalog-J3BU4TFW.js → catalog-SNUTPI57.js} +12 -12
- package/dist/{catch-up-LDGNMEGL.js → catch-up-FE3HDMLJ.js} +4 -4
- package/dist/{check-J6HG6EKE.js → check-MQCBMOKA.js} +40 -39
- package/dist/{checkAudio-MAX7JUYG.js → checkAudio-6VPMLIY6.js} +15 -15
- package/dist/{checkBrowser-3W74WJ26.js → checkBrowser-SHUVFQ4S.js} +34 -33
- package/dist/{chunk-P5M3AXEP.js → chunk-2GMHYOV3.js} +1 -1
- package/dist/{chunk-7D2LTSNV.js → chunk-2HBB5U52.js} +1 -1
- package/dist/{chunk-G675S644.js → chunk-3FGEDDSA.js} +26 -26
- package/dist/{chunk-D6LGD472.js → chunk-44IPXXSK.js} +6 -4
- package/dist/{chunk-FT3CNACL.js → chunk-44YG42L5.js} +144 -41
- package/dist/{chunk-NUE44RN2.js → chunk-45UOXUUH.js} +16 -3
- package/dist/chunk-4JRFMRCQ.js +288 -0
- package/dist/{chunk-AIXH3V5A.js → chunk-4XQQQ4KN.js} +3 -3
- package/dist/{chunk-6MUI2H6P.js → chunk-54Q3H2UQ.js} +5 -2
- package/dist/{chunk-YEKJOA47.js → chunk-664JAO7C.js} +1 -1
- package/dist/{chunk-QOZPWIYV.js → chunk-6LE7K3YM.js} +16 -13
- package/dist/{chunk-DC26QLB7.js → chunk-7LKEHM2R.js} +1 -1
- package/dist/{chunk-CZOC7WY7.js → chunk-7XWCCFYW.js} +1 -1
- package/dist/{chunk-G2EY3MVW.js → chunk-A2KNKY4Z.js} +1 -1
- package/dist/{chunk-OAXWHPNS.js → chunk-A5WWEW6U.js} +1 -1
- package/dist/{chunk-Y7IV5MAK.js → chunk-AKTI2SHL.js} +2 -2
- package/dist/chunk-AW7UW2Z7.js +312 -0
- package/dist/{chunk-F6QV5N3A.js → chunk-B5HFCGI7.js} +2 -2
- package/dist/{chunk-K5UCRKUK.js → chunk-B6F33PUK.js} +2 -2
- package/dist/{chunk-HQDHMAUI.js → chunk-BDEBKAD2.js} +1 -1
- package/dist/{chunk-DNTPNSH5.js → chunk-BN75GXZM.js} +3 -3
- package/dist/{chunk-BPIY5LB3.js → chunk-C466I3DT.js} +3 -3
- package/dist/{chunk-KEY2VA65.js → chunk-CXEU6XNL.js} +6 -20
- package/dist/{chunk-JQWITWVC.js → chunk-CYE2NNFF.js} +2 -2
- package/dist/{chunk-RRPO44PE.js → chunk-DFK4RMNE.js} +5 -5
- package/dist/chunk-DY7PQLIE.js +248 -0
- package/dist/chunk-EF735J3K.js +59 -0
- package/dist/{chunk-EGJ4UECR.js → chunk-EHZESMRB.js} +8 -2
- package/dist/chunk-EJOFIHX4.js +46 -0
- package/dist/{chunk-SKCS4SUZ.js → chunk-EX75C5HT.js} +13 -9
- package/dist/{chunk-3RXZZIDQ.js → chunk-FKBWONRY.js} +2 -2
- package/dist/{chunk-CVY6OIKN.js → chunk-FORV75JT.js} +26 -14
- package/dist/{chunk-WWT6ETQA.js → chunk-G5KX4X6W.js} +26 -26
- package/dist/{chunk-VQMHDS2V.js → chunk-HT3D5AKG.js} +52 -12
- package/dist/{chunk-35JKCWYI.js → chunk-I6OY5MS6.js} +1 -1
- package/dist/{chunk-VJVVWYP6.js → chunk-IJI2JNN7.js} +1 -1
- package/dist/{chunk-IGBOFU2Y.js → chunk-IQ7FABPU.js} +2 -2
- package/dist/{chunk-ZPTNLDOB.js → chunk-JNQCM6CR.js} +2 -2
- package/dist/{chunk-IB7UYGXR.js → chunk-JO4LHFFP.js} +9 -9
- package/dist/chunk-JTZHDD63.js +70 -0
- package/dist/{chunk-L55LAERP.js → chunk-K5GMPWMG.js} +1 -1
- package/dist/{chunk-ZBNK6X5O.js → chunk-KCDWRMTC.js} +2 -2
- package/dist/{chunk-GOWU3NCE.js → chunk-KJGYQVFD.js} +1 -1
- package/dist/{chunk-7IH3RSSG.js → chunk-KT2WLSX5.js} +10 -10
- package/dist/{chunk-AOHG22HQ.js → chunk-KWYK65GR.js} +5 -5
- package/dist/{chunk-AN4USOFT.js → chunk-LAIGIOEA.js} +1 -1
- package/dist/{chunk-E5IIR67Q.js → chunk-LV5AVW6U.js} +1 -1
- package/dist/{chunk-GHEYGMKD.js → chunk-M4UVOUWC.js} +1 -1
- package/dist/{chunk-DIXTEVWQ.js → chunk-M7HNGAWN.js} +3 -3
- package/dist/{chunk-EOUKB53E.js → chunk-MTVL7FWZ.js} +1 -1
- package/dist/{chunk-6CFBFWLF.js → chunk-MUHOFRGW.js} +1 -1
- package/dist/{chunk-OROHGC7W.js → chunk-N6XKBBT5.js} +7 -7
- package/dist/{chunk-4VEXJTUT.js → chunk-NLWG5TU7.js} +2 -2
- package/dist/chunk-NZZQCWUC.js +205 -0
- package/dist/{chunk-42Q3VX34.js → chunk-OL2C3ODS.js} +5 -5
- package/dist/{chunk-ZLXWRYOO.js → chunk-OVINGNLQ.js} +3 -3
- package/dist/{chunk-BDZSH6P3.js → chunk-OWFSGDQS.js} +1 -1
- package/dist/chunk-OZM6VLD7.js +71 -0
- package/dist/{chunk-6W3DY5BP.js → chunk-P5QGZMGC.js} +2 -2
- package/dist/{chunk-52VXA3SC.js → chunk-PBPHKD56.js} +1 -1
- package/dist/chunk-PHEPL7OX.js +1048 -0
- package/dist/{chunk-537WSYHU.js → chunk-PX7Y4HMM.js} +1 -1
- package/dist/{chunk-XHD7RKEZ.js → chunk-QNLHDYYO.js} +2 -2
- package/dist/{chunk-ZAJQFY5Q.js → chunk-QU5OYMTB.js} +15 -2
- package/dist/chunk-QZGKKQ77.js +570 -0
- package/dist/{chunk-WJYFJGYT.js → chunk-RKVKFXYB.js} +3 -3
- package/dist/{chunk-OQLYKDL5.js → chunk-RORIFIUW.js} +1 -1
- package/dist/{chunk-MESSJFK3.js → chunk-RWSVSCOP.js} +38 -28
- package/dist/chunk-RZ6CXJ56.js +24 -0
- package/dist/chunk-SDBVVDBW.js +113 -0
- package/dist/{chunk-Z5VQBRU2.js → chunk-SNFVQDKE.js} +1 -1
- package/dist/{chunk-EE7YWKDY.js → chunk-SX7ESVCQ.js} +4 -4
- package/dist/{chunk-AXVTL7B6.js → chunk-UFYWGUUV.js} +2 -2
- package/dist/{chunk-DSHFKKSZ.js → chunk-UGUWSAJT.js} +2 -2
- package/dist/chunk-UQECNXFA.js +5013 -0
- package/dist/{chunk-QYRMR45H.js → chunk-UQVAAEPQ.js} +1 -1
- package/dist/{chunk-NHXGFQWQ.js → chunk-UVF4U3ZF.js} +1 -1
- package/dist/{chunk-YSTBSLWY.js → chunk-VBCBHDIW.js} +1 -1
- package/dist/chunk-VJM6NX54.js +250 -0
- package/dist/chunk-WGOIJN57.js +95 -0
- package/dist/{chunk-GODT7QDZ.js → chunk-WQLTKHPP.js} +3 -3
- package/dist/{chunk-RIGSGNDQ.js → chunk-WUXDIF5D.js} +20 -19
- package/dist/{chunk-5GSEM63G.js → chunk-WWOHLNFO.js} +1 -1
- package/dist/{chunk-L37AZWB2.js → chunk-XZEHFUQF.js} +2 -2
- package/dist/{chunk-FMKI7ZLM.js → chunk-Y4INSXS7.js} +2 -2
- package/dist/{chunk-YHL4CVTF.js → chunk-ZEKV5T3I.js} +13 -13
- package/dist/{clean-K6IM3LC4.js → clean-JZOPMJMV.js} +21 -21
- package/dist/cli.js +58 -55
- package/dist/{cloud-OV7EA4BJ.js → cloud-VMPF2KMA.js} +4 -4
- package/dist/{cloudrun-ZEMODIOP.js → cloudrun-LA2FKS2F.js} +5 -5
- package/dist/{compare-MJZ3D3HA.js → compare-IQCFSC5Z.js} +30 -30
- package/dist/{compiler-6KKETX77.js → compiler-J7OZQIPD.js} +4 -4
- package/dist/{component-EVXMYIP3.js → component-TRGBVFCI.js} +3 -3
- package/dist/{compositions-PZ7FQ7WN.js → compositions-FOC2CAZX.js} +13 -13
- package/dist/curve-ID3Z522S.js +329 -0
- package/dist/cuts-MWHQSE2Z.js +123 -0
- package/dist/{delete-DL3XA4QV.js → delete-47KZ7PLI.js} +5 -5
- package/dist/{deploy-VEYP3IP5.js → deploy-NTNEO4TI.js} +8 -8
- package/dist/describeProject-WWREIVQV.js +56 -0
- package/dist/diff-GH4KCQGQ.js +1825 -0
- package/dist/{dist-SHMQOKMF.js → dist-24QQO5IL.js} +2 -2
- package/dist/{dist-M77KFAYW.js → dist-XW7FATO6.js} +2 -2
- package/dist/{doctor-JM2WHH7Y.js → doctor-4ZH7WFU6.js} +11 -11
- package/dist/energy-2C65KXBH.js +134 -0
- package/dist/{events-S7KVBRSL.js → events-FUFFA55P.js} +3 -3
- package/dist/{events-GW5I5RCG.js → events-Q3EBOW2Y.js} +2 -2
- package/dist/events-QO5G2VCC.js +221 -0
- package/dist/extract-Z6TLBM5B.js +309 -0
- package/dist/face-WI6BPPUG.js +171 -0
- package/dist/{feedback-7OR5FVTX.js → feedback-M5GZWDXP.js} +12 -12
- package/dist/{ffmpeg-A7CSIX3U.js → ffmpeg-27H6P7ZU.js} +7 -7
- package/dist/{figma-444HKFX5.js → figma-AI6TSWVO.js} +3 -3
- package/dist/fontLocalizeCli.js +10 -10
- package/dist/frames-WUTLVZIR.js +352 -0
- package/dist/generate-3CJREF5U.js +74 -0
- package/dist/{get-6UTF3225.js → get-KTDRE33B.js} +5 -5
- package/dist/{gpuPolicy-ORPUS5Z2.js → gpuPolicy-Z4MM64HY.js} +7 -7
- package/dist/{grade-compare-UCTAYN3B.js → grade-compare-IM7Z7HWI.js} +34 -31
- package/dist/{heifImagePrep-ED6V6RFN.js → heifImagePrep-CXI2ZMUX.js} +8 -8
- package/dist/{help-HZR32XWP.js → help-5FR6BRLR.js} +7 -1
- package/dist/{history-TQ56MZIA.js → history-5P5YVP5H.js} +7 -7
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +70 -70
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/index-gen-OPMQ5WSN.js +61 -0
- package/dist/{info-RPIIP7RN.js → info-5ZGNJJVA.js} +7 -7
- package/dist/{init-ONAWKHFW.js → init-NWIAEYSX.js} +29 -28
- package/dist/{inspect-A75PYOWJ.js → inspect-HBLAVW5C.js} +31 -30
- package/dist/{installer-ISMCCFBZ.js → installer-KVFTBZZ5.js} +4 -4
- package/dist/{keyframes-2I75DP3O.js → keyframes-LFCLUY2R.js} +6 -6
- package/dist/{lambda-4QIHGPGJ.js → lambda-RFWTTMLU.js} +13 -13
- package/dist/{layout-GW7WE7RT.js → layout-WOG2Y5ND.js} +31 -30
- package/dist/{lint-OWP72OZQ.js → lint-7MALXMMF.js} +8 -8
- package/dist/{lintProject-XYQ5L7RQ.js → lintProject-6H64SX3V.js} +2 -2
- package/dist/{list-WVK7ZCPW.js → list-XRYAT24W.js} +5 -5
- package/dist/{localPage-IQWHN7BH.js → localPage-IN36JVJU.js} +7 -7
- package/dist/{login-Q5CNHYWU.js → login-32WGVGTM.js} +15 -9
- package/dist/{logout-6VFJ7WMW.js → logout-SLI6YTHI.js} +2 -2
- package/dist/look-ZWVE6JO3.js +180 -0
- package/dist/{manager-JCYVNEWH.js → manager-SFL6GLYX.js} +9 -8
- package/dist/manifest-QSJYVERU.js +49 -0
- package/dist/measure-Q74BJTRQ.js +46 -0
- package/dist/{media-treatment-M5IUP7H4.js → media-treatment-3R6DYEAZ.js} +16 -16
- package/dist/{media-use-ZNTB7W6N.js → media-use-ZM2WCRQC.js} +9 -5
- package/dist/{models-CFXKDYZ3.js → models-NNC53UPU.js} +11 -11
- package/dist/{motionShot-CWUEI4ZM.js → motionShot-5BI5JFUP.js} +15 -15
- package/dist/{normalize-QJVXFMWO.js → normalize-MBNGRVQA.js} +2 -1
- package/dist/{normalize-audio-FASY33LR.js → normalize-audio-6Z2WN56Q.js} +8 -8
- package/dist/{open-KOVVESYN.js → open-5NCEN6RC.js} +11 -11
- package/dist/{parakeetRunner-E4IP5SL4.js → parakeetRunner-DH3XKR3C.js} +13 -12
- package/dist/{pipeline-C6EZVV43.js → pipeline-CGEGQAPH.js} +10 -10
- package/dist/{play-MZJI6SMH.js → play-K37BN736.js} +23 -23
- package/dist/{policies-J5BWAZHM.js → policies-U4PFXF5E.js} +4 -2
- package/dist/{preflight-K4SPUWXP.js → preflight-CG7H3D5B.js} +8 -8
- package/dist/{present-7L7ZTG7F.js → present-KQ53DOHA.js} +18 -18
- package/dist/{preview-QGDVMR3X.js → preview-V7CYHL6U.js} +21 -21
- package/dist/probe-JVW2MPY3.js +178 -0
- package/dist/{producer-EJPNNY3E.js → producer-UD32S7PX.js} +1 -1
- package/dist/{projectConfig-EEF6OPXO.js → projectConfig-WXCB5AZE.js} +6 -6
- package/dist/{publication-5KF44AKQ.js → publication-KG4UDZRM.js} +2 -2
- package/dist/{publish-SSKWZ5TE.js → publish-MEQB543T.js} +16 -16
- package/dist/{refresh-I6ITGHKL.js → refresh-2LU4XDL7.js} +2 -2
- package/dist/{remove-background-PCL6I5SZ.js → remove-background-FSV5KQK3.js} +11 -11
- package/dist/{render-DH4UA7KW.js → render-O4S4SURS.js} +6 -6
- package/dist/{render-UPRWOGLS.js → render-SQXZAGPQ.js} +37 -37
- package/dist/{render-DRWQ6F37.js → render-SY4AXKXC.js} +33 -33
- package/dist/{render-batch-EBW5WHB5.js → render-batch-GTZQUB3H.js} +6 -6
- package/dist/renderSetupWorker.js +2 -2
- package/dist/{resolver-ZSZXNRFP.js → resolver-BQZNCVJS.js} +4 -4
- package/dist/run-67OPNJGD.js +31 -0
- package/dist/{sherpa-IKVUCBOW.js → sherpa-KH3PJAUG.js} +12 -11
- package/dist/skills/media-use/SKILL.md +20 -21
- package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +26 -1
- package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +33 -0
- package/dist/skills/media-use/references/heygen.md +58 -0
- package/dist/skills/media-use/references/operations.md +9 -6
- package/dist/skills/media-use/references/setup-providers.md +11 -12
- package/dist/skills/media-use/scripts/lib/index-gen.d.mts +1 -0
- package/dist/skills/media-use/scripts/lib/manifest.d.mts +21 -0
- package/dist/{skills-ZREHX3TU.js → skills-FTZZJGAB.js} +5 -5
- package/dist/{skillsUpdateCheck-PPJ5NGAL.js → skillsUpdateCheck-LZPD2CZI.js} +3 -3
- package/dist/{snapshot-KPFLZNEL.js → snapshot-4BORZ3ED.js} +37 -36
- package/dist/{src-QRV3466B.js → src-6ZOFAM3F.js} +9 -9
- package/dist/{src-EPOGDJTT.js → src-D7AO7PGH.js} +6 -6
- package/dist/{staticProjectServer-ERKLMZVM.js → staticProjectServer-Q23A6XU2.js} +19 -19
- package/dist/{status-4AAPTTRW.js → status-VIJRZ4ZK.js} +34 -9
- package/dist/studio/assets/hyperframes-player-D0W1SNqK.js +478 -0
- package/dist/studio/assets/{index-C8VIUiGz.js → index-DD9KJoEr.js} +119 -119
- package/dist/studio/assets/{index-CVPNbydK.js → index-mbwAH5iR.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-7WFZIIPL.js → studio-api-XVVJZ7YT.js} +15 -15
- package/dist/{studioServer-3XZTLI26.js → studioServer-6HG3AMTW.js} +49 -49
- package/dist/sync-Q5SRIL7V.js +115 -0
- package/dist/{telemetry-BMLI4TMC.js → telemetry-VXPSJ3X3.js} +3 -3
- package/dist/{timeline-EDCDO2ZR.js → timeline-6477OWFA.js} +25 -21
- package/dist/{tokens-2ZFLFO3K.js → tokens-ZUUNEDKT.js} +2 -2
- package/dist/{transcribe-3WMH62HH.js → transcribe-HA4UGLKO.js} +11 -10
- package/dist/{transcribe-Y2LPBT7I.js → transcribe-ITVANIDK.js} +35 -18
- package/dist/{tts-BVTJEP72.js → tts-KMZPHG3K.js} +1 -1
- package/dist/{updateCheck-5LFZGC3P.js → updateCheck-SVADAQ43.js} +2 -2
- package/dist/{upgrade-X7QVSEKP.js → upgrade-WKW4FDNF.js} +2 -2
- package/dist/{urlDownloader-TYD6ROKL.js → urlDownloader-VWHCESDD.js} +6 -6
- package/dist/{validate-26KQ5VX7.js → validate-7VG2RLP2.js} +24 -24
- package/dist/{video-BPKLZIJK.js → video-LM3FYHGG.js} +8 -8
- package/dist/warmCheck.js +40 -39
- package/package.json +1 -1
- package/dist/chunk-LL3VMDAC.js +0 -5013
- package/dist/studio/assets/hyperframes-player-Dka6e1BG.js +0 -478
- package/dist/{chunk-NOH32H42.js → chunk-HBAUU3IK.js} +124 -124
- package/dist/{destroy-BQ5R7LUF.js → destroy-6NWJMQX2.js} +4 -4
- package/dist/{synthesize-4JC74JW5.js → synthesize-DIT2SR3D.js} +5 -5
|
@@ -0,0 +1,248 @@
|
|
|
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
|
+
|
|
8
|
+
// src/media-use/lib/manifest.mjs
|
|
9
|
+
import {
|
|
10
|
+
readFileSync,
|
|
11
|
+
appendFileSync,
|
|
12
|
+
mkdirSync,
|
|
13
|
+
existsSync,
|
|
14
|
+
readdirSync,
|
|
15
|
+
openSync,
|
|
16
|
+
closeSync,
|
|
17
|
+
writeFileSync,
|
|
18
|
+
rmSync,
|
|
19
|
+
statSync
|
|
20
|
+
} from "fs";
|
|
21
|
+
import { randomBytes } from "crypto";
|
|
22
|
+
import { basename, join } from "path";
|
|
23
|
+
var MANIFEST_FILE = "manifest.jsonl";
|
|
24
|
+
var INDEX_FILE = "index.md";
|
|
25
|
+
var TYPE_DIRS = {
|
|
26
|
+
bgm: "audio/bgm",
|
|
27
|
+
sfx: "audio/sfx",
|
|
28
|
+
voice: "audio/voice",
|
|
29
|
+
image: "images",
|
|
30
|
+
icon: "images",
|
|
31
|
+
logo: "images",
|
|
32
|
+
brand: "images",
|
|
33
|
+
video: "video",
|
|
34
|
+
grade: "luts",
|
|
35
|
+
lut: "luts",
|
|
36
|
+
recipe: "recipes"
|
|
37
|
+
};
|
|
38
|
+
function mediaDir(projectDir) {
|
|
39
|
+
return join(projectDir, ".media");
|
|
40
|
+
}
|
|
41
|
+
function manifestPath(projectDir) {
|
|
42
|
+
return join(mediaDir(projectDir), MANIFEST_FILE);
|
|
43
|
+
}
|
|
44
|
+
function indexPath(projectDir) {
|
|
45
|
+
return join(mediaDir(projectDir), INDEX_FILE);
|
|
46
|
+
}
|
|
47
|
+
function typeSubdir(type) {
|
|
48
|
+
const sub = TYPE_DIRS[type];
|
|
49
|
+
if (!sub) throw new Error(`unknown media type: ${type}`);
|
|
50
|
+
return sub;
|
|
51
|
+
}
|
|
52
|
+
function typeDirPath(projectDir, type) {
|
|
53
|
+
return join(mediaDir(projectDir), typeSubdir(type));
|
|
54
|
+
}
|
|
55
|
+
function readManifest(projectDir) {
|
|
56
|
+
const p = manifestPath(projectDir);
|
|
57
|
+
if (!existsSync(p)) return [];
|
|
58
|
+
const raw = readFileSync(p, "utf8");
|
|
59
|
+
const records = [];
|
|
60
|
+
for (const line of raw.split(/\r?\n/)) {
|
|
61
|
+
const trimmed = line.trim();
|
|
62
|
+
if (!trimmed) continue;
|
|
63
|
+
try {
|
|
64
|
+
records.push(JSON.parse(trimmed));
|
|
65
|
+
} catch {
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return records;
|
|
69
|
+
}
|
|
70
|
+
function appendRecord(projectDir, record) {
|
|
71
|
+
const dir = mediaDir(projectDir);
|
|
72
|
+
mkdirSync(dir, { recursive: true });
|
|
73
|
+
const typeDir = typeDirPath(projectDir, record.type);
|
|
74
|
+
mkdirSync(typeDir, { recursive: true });
|
|
75
|
+
const p = manifestPath(projectDir);
|
|
76
|
+
const line = JSON.stringify(record) + "\n";
|
|
77
|
+
appendFileSync(p, line);
|
|
78
|
+
}
|
|
79
|
+
var AGENT_SOURCES = ["generated", "search", "bundled"];
|
|
80
|
+
function latestRecordFor(projectDir, path) {
|
|
81
|
+
return readManifest(projectDir).findLast((record) => record.path === path);
|
|
82
|
+
}
|
|
83
|
+
function currentRecords(projectDir) {
|
|
84
|
+
const records = readManifest(projectDir);
|
|
85
|
+
const last = new Map(records.map((record, index) => [record.path, index]));
|
|
86
|
+
return records.filter((record, index) => !record.path || last.get(record.path) === index);
|
|
87
|
+
}
|
|
88
|
+
function recordInPlace(projectDir, { type, path, source, description, duration, provenance }) {
|
|
89
|
+
const fields = {
|
|
90
|
+
type,
|
|
91
|
+
path,
|
|
92
|
+
source,
|
|
93
|
+
description: description || basename(path),
|
|
94
|
+
...duration != null && { duration: Math.round(duration * 10) / 10 }
|
|
95
|
+
};
|
|
96
|
+
return withMediaLock(projectDir, () => {
|
|
97
|
+
const latest = latestRecordFor(projectDir, path);
|
|
98
|
+
const same = ["source", "description", "duration"].every(
|
|
99
|
+
(key) => latest?.[key] === fields[key]
|
|
100
|
+
);
|
|
101
|
+
if (latest && same) return latest;
|
|
102
|
+
const record = { id: nextFreeId(projectDir, type), ...fields, provenance };
|
|
103
|
+
appendRecord(projectDir, record);
|
|
104
|
+
return record;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function normalizePrompt(prompt) {
|
|
108
|
+
return String(prompt ?? "").trim().toLowerCase().replace(/\s+/g, " ");
|
|
109
|
+
}
|
|
110
|
+
function findByPrompt(projectDir, prompt, type) {
|
|
111
|
+
const key = normalizePrompt(prompt);
|
|
112
|
+
if (!key) return null;
|
|
113
|
+
const records = currentRecords(projectDir);
|
|
114
|
+
return records.find(
|
|
115
|
+
(r) => normalizePrompt(r.provenance?.prompt) === key && (type == null || r.type === type)
|
|
116
|
+
) || null;
|
|
117
|
+
}
|
|
118
|
+
function findByEntity(projectDir, entity) {
|
|
119
|
+
const lower = entity.toLowerCase();
|
|
120
|
+
const records = currentRecords(projectDir);
|
|
121
|
+
return records.find((r) => r.entity && r.entity.toLowerCase() === lower) || null;
|
|
122
|
+
}
|
|
123
|
+
function nextId(projectDir, type) {
|
|
124
|
+
const records = readManifest(projectDir);
|
|
125
|
+
const prefix = type;
|
|
126
|
+
let max = 0;
|
|
127
|
+
for (const r of records) {
|
|
128
|
+
if (r.type !== type) continue;
|
|
129
|
+
const m = r.id?.match(new RegExp(`^${prefix}_(\\d+)$`));
|
|
130
|
+
if (m) max = Math.max(max, parseInt(m[1], 10));
|
|
131
|
+
}
|
|
132
|
+
return `${prefix}_${String(max + 1).padStart(3, "0")}`;
|
|
133
|
+
}
|
|
134
|
+
function sleepMs(ms) {
|
|
135
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
136
|
+
}
|
|
137
|
+
var LOCK_STALE_MS = 15e3;
|
|
138
|
+
var LOCK_TIMEOUT_MS = 2e4;
|
|
139
|
+
function withLock(dir, fn) {
|
|
140
|
+
const lock = join(dir, ".lock");
|
|
141
|
+
const start = Date.now();
|
|
142
|
+
for (; ; ) {
|
|
143
|
+
try {
|
|
144
|
+
closeSync(openSync(lock, "wx"));
|
|
145
|
+
break;
|
|
146
|
+
} catch (err) {
|
|
147
|
+
if (err.code !== "EEXIST") throw err;
|
|
148
|
+
try {
|
|
149
|
+
if (Date.now() - statSync(lock).mtimeMs > LOCK_STALE_MS) {
|
|
150
|
+
rmSync(lock, { force: true });
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
} catch {
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
if (Date.now() - start > LOCK_TIMEOUT_MS) {
|
|
157
|
+
throw new Error("media-use: timed out acquiring .media/.lock");
|
|
158
|
+
}
|
|
159
|
+
sleepMs(25);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
try {
|
|
163
|
+
return fn();
|
|
164
|
+
} finally {
|
|
165
|
+
rmSync(lock, { force: true });
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function withMediaLock(projectDir, fn) {
|
|
169
|
+
mkdirSync(mediaDir(projectDir), { recursive: true });
|
|
170
|
+
return withLock(mediaDir(projectDir), fn);
|
|
171
|
+
}
|
|
172
|
+
function allocateId(projectDir, type, ext) {
|
|
173
|
+
mkdirSync(typeDirPath(projectDir, type), { recursive: true });
|
|
174
|
+
return withMediaLock(projectDir, () => {
|
|
175
|
+
const id = nextFreeId(projectDir, type);
|
|
176
|
+
const localPath = `.media/${typeSubdir(type)}/${id}${ext}`;
|
|
177
|
+
const markerPath = `${join(projectDir, localPath)}.hf${randomBytes(3).toString("hex")}.tmp`;
|
|
178
|
+
writeFileSync(markerPath, "", { flag: "wx" });
|
|
179
|
+
return { id, localPath, markerPath };
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function nextFreeId(projectDir, type) {
|
|
183
|
+
const re = new RegExp(`^${type}_(\\d+)`);
|
|
184
|
+
let max = 0;
|
|
185
|
+
for (const r of readManifest(projectDir)) {
|
|
186
|
+
if (r.type !== type) continue;
|
|
187
|
+
const m = r.id?.match(re);
|
|
188
|
+
if (m) max = Math.max(max, parseInt(m[1], 10));
|
|
189
|
+
}
|
|
190
|
+
const typeDir = typeDirPath(projectDir, type);
|
|
191
|
+
for (const f of existsSync(typeDir) ? readdirSync(typeDir) : []) {
|
|
192
|
+
const m = f.match(re);
|
|
193
|
+
if (m) max = Math.max(max, parseInt(m[1], 10));
|
|
194
|
+
}
|
|
195
|
+
return `${type}_${String(max + 1).padStart(3, "0")}`;
|
|
196
|
+
}
|
|
197
|
+
function reservedFile(projectDir, type, ext) {
|
|
198
|
+
const allocation = allocateId(projectDir, type, ext);
|
|
199
|
+
return { ...allocation, fullPath: join(projectDir, allocation.localPath) };
|
|
200
|
+
}
|
|
201
|
+
function releaseReservation(reservation, committed) {
|
|
202
|
+
if (!committed) rmSync(reservation.fullPath, { force: true });
|
|
203
|
+
rmSync(reservation.markerPath, { force: true });
|
|
204
|
+
}
|
|
205
|
+
function withReservedFileSync(projectDir, type, ext, populate) {
|
|
206
|
+
const reservation = reservedFile(projectDir, type, ext);
|
|
207
|
+
try {
|
|
208
|
+
const result = populate(reservation);
|
|
209
|
+
releaseReservation(reservation, result != null);
|
|
210
|
+
return result;
|
|
211
|
+
} catch (error) {
|
|
212
|
+
releaseReservation(reservation, false);
|
|
213
|
+
throw error;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
async function withReservedFile(projectDir, type, ext, populate) {
|
|
217
|
+
const reservation = reservedFile(projectDir, type, ext);
|
|
218
|
+
try {
|
|
219
|
+
const result = await populate(reservation);
|
|
220
|
+
releaseReservation(reservation, result != null);
|
|
221
|
+
return result;
|
|
222
|
+
} catch (error) {
|
|
223
|
+
releaseReservation(reservation, false);
|
|
224
|
+
throw error;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export {
|
|
229
|
+
mediaDir,
|
|
230
|
+
manifestPath,
|
|
231
|
+
indexPath,
|
|
232
|
+
typeSubdir,
|
|
233
|
+
typeDirPath,
|
|
234
|
+
readManifest,
|
|
235
|
+
appendRecord,
|
|
236
|
+
AGENT_SOURCES,
|
|
237
|
+
latestRecordFor,
|
|
238
|
+
currentRecords,
|
|
239
|
+
recordInPlace,
|
|
240
|
+
normalizePrompt,
|
|
241
|
+
findByPrompt,
|
|
242
|
+
findByEntity,
|
|
243
|
+
nextId,
|
|
244
|
+
withMediaLock,
|
|
245
|
+
allocateId,
|
|
246
|
+
withReservedFileSync,
|
|
247
|
+
withReservedFile
|
|
248
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
resolveCloudAuthHeaders,
|
|
9
|
+
resolveCloudBaseUrl
|
|
10
|
+
} from "./chunk-VBCBHDIW.js";
|
|
11
|
+
import {
|
|
12
|
+
oauthEnvironment
|
|
13
|
+
} from "./chunk-VLA6UJGH.js";
|
|
14
|
+
|
|
15
|
+
// src/heygen/plan.ts
|
|
16
|
+
var UNPAID = /* @__PURE__ */ new Set(["incomplete", "incomplete_expired"]);
|
|
17
|
+
var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
18
|
+
function mockPlan() {
|
|
19
|
+
const raw = process.env["HYPERFRAMES_MOCK_PLAN"]?.trim();
|
|
20
|
+
if (!raw) return null;
|
|
21
|
+
const [plan = "none", credits = "0"] = raw.split(":");
|
|
22
|
+
return { plan, credits: Number(credits) || 0, mock: true };
|
|
23
|
+
}
|
|
24
|
+
var billingBaseUrl = () => resolveCloudBaseUrl().replace("://api.", "://api2.");
|
|
25
|
+
async function readPlan() {
|
|
26
|
+
try {
|
|
27
|
+
const res = await fetch(`${billingBaseUrl()}/v1/payment/hyperframes/subscription`, {
|
|
28
|
+
headers: { ...await resolveCloudAuthHeaders(), accept: "application/json" },
|
|
29
|
+
signal: AbortSignal.timeout(15e3)
|
|
30
|
+
});
|
|
31
|
+
const body = await res.json().catch(() => null);
|
|
32
|
+
const data = isRecord(body) && isRecord(body.data) ? body.data : body;
|
|
33
|
+
if (!res.ok || !isRecord(data)) return mockPlan();
|
|
34
|
+
const usage = isRecord(data.usage) ? data.usage : {};
|
|
35
|
+
const sub = isRecord(data.subscription) ? data.subscription : null;
|
|
36
|
+
const paid = !!sub && !UNPAID.has(String(sub.status));
|
|
37
|
+
return {
|
|
38
|
+
plan: paid ? String(sub.plan_name ?? "paid") : "none",
|
|
39
|
+
credits: Number(usage.remaining_units ?? 0) || 0
|
|
40
|
+
};
|
|
41
|
+
} catch {
|
|
42
|
+
return mockPlan();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
var webBase = () => oauthEnvironment() === "dev" ? "https://dev.hyperframes.dev" : "https://hyperframes.studio";
|
|
46
|
+
var plansUrl = () => process.env["HYPERFRAMES_PLANS_URL"] || `${webBase()}/pricing`;
|
|
47
|
+
var creditsUrl = () => process.env["HYPERFRAMES_CREDITS_URL"] || `${webBase()}/plan`;
|
|
48
|
+
function pageUrl(kind, fields = {}) {
|
|
49
|
+
const url = new URL(fields.base ?? (kind === "plans" ? plansUrl() : creditsUrl()));
|
|
50
|
+
url.searchParams.set("from", "cli");
|
|
51
|
+
if (fields.needed) url.searchParams.set("needed_credits", String(fields.needed));
|
|
52
|
+
if (fields.tool) url.searchParams.set("tool", fields.tool);
|
|
53
|
+
return url.toString();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export {
|
|
57
|
+
readPlan,
|
|
58
|
+
pageUrl
|
|
59
|
+
};
|
|
@@ -17,6 +17,8 @@ var defaultIO = {
|
|
|
17
17
|
readFile: (path) => decodeJsonText(readFileSync(resolve(path))),
|
|
18
18
|
readStdin: () => decodeJsonText(readFileSync(0))
|
|
19
19
|
};
|
|
20
|
+
var readJsonFileText = (path) => defaultIO.readFile(path);
|
|
21
|
+
var readJsonStdinText = () => defaultIO.readStdin();
|
|
20
22
|
var JsonFlagReadError = class extends Error {
|
|
21
23
|
constructor(path, cause) {
|
|
22
24
|
super(`${path}: ${cause}`);
|
|
@@ -44,7 +46,10 @@ function readJsonFlagText(value, partialIo = {}) {
|
|
|
44
46
|
if (trimmed.startsWith("{") || trimmed.startsWith("[") || isJsonScalar(trimmed)) return value;
|
|
45
47
|
const source = trimmed === "-" ? "stdin" : value;
|
|
46
48
|
try {
|
|
47
|
-
|
|
49
|
+
if (trimmed !== "-") return io.readFile(value);
|
|
50
|
+
const piped = io.readStdin();
|
|
51
|
+
if (!piped.trim()) throw new Error("nothing was piped in");
|
|
52
|
+
return piped;
|
|
48
53
|
} catch (error) {
|
|
49
54
|
throw new JsonFlagReadError(source, errorText(error));
|
|
50
55
|
}
|
|
@@ -68,7 +73,8 @@ function readJsonFlag(flag, value, io) {
|
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
export {
|
|
71
|
-
|
|
76
|
+
readJsonFileText,
|
|
77
|
+
readJsonStdinText,
|
|
72
78
|
JsonFlagReadError,
|
|
73
79
|
readJsonFlagText,
|
|
74
80
|
inlineJsonHint,
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
meanAbsDiff,
|
|
9
|
+
pearson,
|
|
10
|
+
ratioOf,
|
|
11
|
+
readClip,
|
|
12
|
+
round
|
|
13
|
+
} from "./chunk-VJM6NX54.js";
|
|
14
|
+
|
|
15
|
+
// src/measure/energy.ts
|
|
16
|
+
var ENERGY_RATE = 12;
|
|
17
|
+
var STILL_SHOT_GREY_LEVELS = 0.1;
|
|
18
|
+
function energyCurve(clip, roi) {
|
|
19
|
+
const { frames } = readClip(clip, { fps: ENERGY_RATE, width: 270, gray: true, roi });
|
|
20
|
+
return frames.slice(1).map((f, i) => meanAbsDiff(f, frames[i]));
|
|
21
|
+
}
|
|
22
|
+
function compareEnergy(ref, yours) {
|
|
23
|
+
let best = [-2, 0];
|
|
24
|
+
for (let lag = -ENERGY_RATE; lag <= ENERGY_RATE; lag++) {
|
|
25
|
+
const [aa, bb] = lag >= 0 ? [ref.slice(0, ref.length - lag), yours.slice(lag)] : [ref.slice(-lag), yours.slice(0, yours.length + lag)];
|
|
26
|
+
if (Math.min(aa.length, bb.length) > 8) {
|
|
27
|
+
const r = pearson(aa, bb) ?? 0;
|
|
28
|
+
if (r > best[0]) best = [r, lag];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const mean = (v) => v.reduce((s, x) => s + x, 0) / (v.length || 1);
|
|
32
|
+
return {
|
|
33
|
+
r: round(best[0] === -2 ? 0 : best[0]),
|
|
34
|
+
lag_s: round(best[1] / ENERGY_RATE, 2),
|
|
35
|
+
peak_ratio: round(
|
|
36
|
+
ratioOf(Math.max(...yours, 0), Math.max(...ref, 0), STILL_SHOT_GREY_LEVELS),
|
|
37
|
+
2
|
|
38
|
+
),
|
|
39
|
+
mean_ratio: round(ratioOf(mean(yours), mean(ref), STILL_SHOT_GREY_LEVELS), 2)
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
energyCurve,
|
|
45
|
+
compareEnergy
|
|
46
|
+
};
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
Semaphore,
|
|
9
9
|
prepareHeifImageInputs,
|
|
10
10
|
withMediaProbeSlot
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AKTI2SHL.js";
|
|
12
12
|
import {
|
|
13
13
|
EncoderInterruptedError,
|
|
14
14
|
encoderFailureError,
|
|
15
15
|
prepareAnimatedGifInputs
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JNQCM6CR.js";
|
|
17
17
|
import {
|
|
18
18
|
GENERIC_FAMILIES,
|
|
19
19
|
collectFontFamilyCustomProperties,
|
|
@@ -174,7 +174,7 @@ import {
|
|
|
174
174
|
videoAudioId,
|
|
175
175
|
videoStartOnMediaTimeline,
|
|
176
176
|
writeCapturedFrame
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-4XQQQ4KN.js";
|
|
178
178
|
import {
|
|
179
179
|
assignBundledRuntimeCompositionIds,
|
|
180
180
|
emitMountedModuleScripts,
|
|
@@ -186,7 +186,7 @@ import {
|
|
|
186
186
|
parsesAsScript,
|
|
187
187
|
prepareFlattenedInnerRoot,
|
|
188
188
|
stripSdrPngColourTags
|
|
189
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-FKBWONRY.js";
|
|
190
190
|
import {
|
|
191
191
|
collectScratchLeftovers,
|
|
192
192
|
removeScratch,
|
|
@@ -205,7 +205,7 @@ import {
|
|
|
205
205
|
parseVfxChain,
|
|
206
206
|
resolveAuthoredTimingWindow,
|
|
207
207
|
toFps
|
|
208
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-OWFSGDQS.js";
|
|
209
209
|
import {
|
|
210
210
|
gsapCdnDist,
|
|
211
211
|
normalizeGsapBaseUrl
|
|
@@ -244,7 +244,7 @@ import {
|
|
|
244
244
|
sourceTimeAt,
|
|
245
245
|
styleElementsFor,
|
|
246
246
|
timeAtSourceTime
|
|
247
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-UQECNXFA.js";
|
|
248
248
|
import {
|
|
249
249
|
TRANSITIONS,
|
|
250
250
|
convertTransfer,
|
|
@@ -260,7 +260,7 @@ import {
|
|
|
260
260
|
import {
|
|
261
261
|
lintHyperframeHtml,
|
|
262
262
|
resolveReferencedStart
|
|
263
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-HT3D5AKG.js";
|
|
264
264
|
import {
|
|
265
265
|
isUnresolvedAssetPlaceholder,
|
|
266
266
|
readProjectFile,
|
|
@@ -10619,6 +10619,7 @@ async function runCaptureHdrStage(input) {
|
|
|
10619
10619
|
let lastBrowserConsole = [];
|
|
10620
10620
|
let captureDurationMs = 0;
|
|
10621
10621
|
let encodeMs = 0;
|
|
10622
|
+
let encoderDrainWaitMs;
|
|
10622
10623
|
const nativeHdrIds = /* @__PURE__ */ new Set([...nativeHdrVideoIds, ...nativeHdrImageIds]);
|
|
10623
10624
|
log.info(
|
|
10624
10625
|
hasHdrContent ? "[Render] HDR layered composite: z-ordered DOM + native HDR video/image layers" : "[Render] Shader transition composite: z-ordered SDR DOM layers"
|
|
@@ -10856,6 +10857,7 @@ async function runCaptureHdrStage(input) {
|
|
|
10856
10857
|
reportEncodeProgress(job, totalFrames, totalFrames, onProgress, encodeFrom);
|
|
10857
10858
|
captureDurationMs = Date.now() - stageStart;
|
|
10858
10859
|
encodeMs = hdrEncodeResult.durationMs;
|
|
10860
|
+
encoderDrainWaitMs = hdrEncodeResult.drainWaitMs;
|
|
10859
10861
|
} catch (error) {
|
|
10860
10862
|
lastBrowserConsole = domSession.browserConsoleBuffer;
|
|
10861
10863
|
throw wrapCaptureStageError(error, lastBrowserConsole);
|
|
@@ -10888,6 +10890,7 @@ async function runCaptureHdrStage(input) {
|
|
|
10888
10890
|
hdrPerf,
|
|
10889
10891
|
captureDurationMs,
|
|
10890
10892
|
encodeMs,
|
|
10893
|
+
encoderDrainWaitMs,
|
|
10891
10894
|
warnings: cloneCaptureWarnings(domSession.warnings)
|
|
10892
10895
|
};
|
|
10893
10896
|
}
|
|
@@ -13585,6 +13588,7 @@ async function executeRenderPipeline(input) {
|
|
|
13585
13588
|
perfStages.captureFrameMs = hdrRes.captureDurationMs;
|
|
13586
13589
|
perfStages.captureSetupMs = Math.max(0, Date.now() - stage4Start - hdrRes.captureDurationMs);
|
|
13587
13590
|
perfStages.encodeMs = hdrRes.encodeMs;
|
|
13591
|
+
perfStages.encoderDrainWaitMs = hdrRes.encoderDrainWaitMs ?? 0;
|
|
13588
13592
|
} else {
|
|
13589
13593
|
let streamingHandled = false;
|
|
13590
13594
|
if (capturePlan.kind === "sdr_segmented") {
|
|
@@ -16558,7 +16562,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
16558
16562
|
if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
|
|
16559
16563
|
if (probeResult.probeSession) {
|
|
16560
16564
|
try {
|
|
16561
|
-
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-
|
|
16565
|
+
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-D7AO7PGH.js");
|
|
16562
16566
|
await closeCaptureSession2(probeResult.probeSession);
|
|
16563
16567
|
} catch (err) {
|
|
16564
16568
|
log.warn("[plan] probe session close failed", {
|
|
@@ -19932,7 +19936,7 @@ function startServer(options = {}) {
|
|
|
19932
19936
|
});
|
|
19933
19937
|
async function shutdown(signal) {
|
|
19934
19938
|
log.info(`Received ${signal}, shutting down`);
|
|
19935
|
-
const { drainBrowserPool } = await import("./src-
|
|
19939
|
+
const { drainBrowserPool } = await import("./src-D7AO7PGH.js");
|
|
19936
19940
|
await drainBrowserPool().catch(() => {
|
|
19937
19941
|
});
|
|
19938
19942
|
const handle = await Promise.race([
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
warnUnknownEnumValues,
|
|
59
59
|
wrapInlineScriptWithErrorBoundary,
|
|
60
60
|
wrapScopedCompositionScript
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-UQECNXFA.js";
|
|
62
62
|
import {
|
|
63
63
|
cssVariableName
|
|
64
64
|
} from "./chunk-VC76R6W2.js";
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
import {
|
|
70
70
|
collectExternalStyles,
|
|
71
71
|
lintHyperframeHtml
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-HT3D5AKG.js";
|
|
73
73
|
import {
|
|
74
74
|
CSS_URL_RE,
|
|
75
75
|
checkSubCompositionUsability,
|
|
@@ -15,16 +15,16 @@ import {
|
|
|
15
15
|
findFFmpeg,
|
|
16
16
|
findFFprobe,
|
|
17
17
|
getFFmpegInstallHint
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WWOHLNFO.js";
|
|
19
19
|
import {
|
|
20
20
|
registerBrowserSessionCleanup
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XZEHFUQF.js";
|
|
22
22
|
import {
|
|
23
23
|
DEFAULT_VP9_CPU_USED,
|
|
24
24
|
SDR_RGB_TO_BT709_FILTER,
|
|
25
25
|
SDR_RGB_TO_TAGGED_BT709_FILTER,
|
|
26
26
|
renderProvenanceArgs
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-4XQQQ4KN.js";
|
|
28
28
|
import {
|
|
29
29
|
runCancellableProcess
|
|
30
30
|
} from "./chunk-X6JUUQCM.js";
|
|
@@ -38,6 +38,28 @@ import { randomUUID } from "crypto";
|
|
|
38
38
|
import { renameSync, rmSync as rmSync2 } from "fs";
|
|
39
39
|
import { basename as basename2, dirname, extname, join as join3 } from "path";
|
|
40
40
|
|
|
41
|
+
// src/background-removal/frameReader.ts
|
|
42
|
+
async function* readFrames(stream, frameBytes) {
|
|
43
|
+
let frame;
|
|
44
|
+
let filled = 0;
|
|
45
|
+
for await (const chunk of stream) {
|
|
46
|
+
let at = 0;
|
|
47
|
+
while (at < chunk.length) {
|
|
48
|
+
frame ??= Buffer.allocUnsafe(frameBytes);
|
|
49
|
+
const take = Math.min(frameBytes - filled, chunk.length - at);
|
|
50
|
+
chunk.copy(frame, filled, at, at + take);
|
|
51
|
+
filled += take;
|
|
52
|
+
at += take;
|
|
53
|
+
if (filled === frameBytes) {
|
|
54
|
+
const whole = frame;
|
|
55
|
+
frame = void 0;
|
|
56
|
+
filled = 0;
|
|
57
|
+
yield whole;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
41
63
|
// src/background-removal/coremlTemp.ts
|
|
42
64
|
import { mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
43
65
|
import { homedir, tmpdir } from "os";
|
|
@@ -391,7 +413,7 @@ async function decoderTransposesDimensions(inputPath) {
|
|
|
391
413
|
}
|
|
392
414
|
async function probeMedia(inputPath) {
|
|
393
415
|
const isImage = inferInputKind(inputPath) === "image";
|
|
394
|
-
const engine = await import("./src-
|
|
416
|
+
const engine = await import("./src-D7AO7PGH.js");
|
|
395
417
|
const meta = await engine.extractMediaMetadata(inputPath);
|
|
396
418
|
if (isImage) {
|
|
397
419
|
return { width: meta.width, height: meta.height, fps: 0, frameCount: 1 };
|
|
@@ -476,16 +498,6 @@ function buildEncoderArgs(format, width, height, fps, outputPath, quality = DEFA
|
|
|
476
498
|
}
|
|
477
499
|
return [...base, "-frames:v", "1", "-pix_fmt", "rgba", "-update", "1", outputPath];
|
|
478
500
|
}
|
|
479
|
-
async function* readFrames(stream, frameBytes) {
|
|
480
|
-
let buffered = Buffer.alloc(0);
|
|
481
|
-
for await (const chunk of stream) {
|
|
482
|
-
buffered = buffered.length === 0 ? chunk : Buffer.concat([buffered, chunk]);
|
|
483
|
-
while (buffered.length >= frameBytes) {
|
|
484
|
-
yield Buffer.from(buffered.subarray(0, frameBytes));
|
|
485
|
-
buffered = buffered.subarray(frameBytes);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
501
|
function resolveRenderTargets(inputPath, outputPath, backgroundOutputPath) {
|
|
490
502
|
const format = inferOutputFormat(outputPath);
|
|
491
503
|
const inputKind = inferInputKind(inputPath);
|
|
@@ -19,11 +19,7 @@ import {
|
|
|
19
19
|
splitElementInHtml,
|
|
20
20
|
unwrapElementsFromHtml,
|
|
21
21
|
wrapElementsInHtml
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
MEDIA_LINK_ATTR,
|
|
25
|
-
relinkSplitHalves
|
|
26
|
-
} from "./chunk-AW3XJY4S.js";
|
|
22
|
+
} from "./chunk-C466I3DT.js";
|
|
27
23
|
import {
|
|
28
24
|
DEFAULT_TARGET_LUFS,
|
|
29
25
|
absoluteLoudnessPlan,
|
|
@@ -32,22 +28,11 @@ import {
|
|
|
32
28
|
requestedProjectPath,
|
|
33
29
|
requiredFfmpeg,
|
|
34
30
|
resolveLocalAudioPath
|
|
35
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-KCDWRMTC.js";
|
|
36
32
|
import {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
UNDO_MODES,
|
|
41
|
-
clearFileWriteReceipt,
|
|
42
|
-
createProjectSignature,
|
|
43
|
-
createWriteToken,
|
|
44
|
-
fileContentVersion,
|
|
45
|
-
recordFileWriteReceipt,
|
|
46
|
-
resolveProjectAndSignature,
|
|
47
|
-
resolveProjectSignature,
|
|
48
|
-
serveWhileOpen,
|
|
49
|
-
settledFileTag
|
|
50
|
-
} from "./chunk-ZAJQFY5Q.js";
|
|
33
|
+
MEDIA_LINK_ATTR,
|
|
34
|
+
relinkSplitHalves
|
|
35
|
+
} from "./chunk-AW3XJY4S.js";
|
|
51
36
|
import {
|
|
52
37
|
PROXY_PARAMS_VERSION,
|
|
53
38
|
PROXY_PENDING_RETRY_AFTER_SECONDS,
|
|
@@ -70,11 +55,26 @@ import {
|
|
|
70
55
|
scanProjectMedia,
|
|
71
56
|
shouldPrewarmProxy,
|
|
72
57
|
waitForProxy
|
|
73
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-UFYWGUUV.js";
|
|
74
59
|
import {
|
|
75
60
|
probeAudioTrack,
|
|
76
61
|
probeMediaMetadata
|
|
77
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-UQVAAEPQ.js";
|
|
63
|
+
import {
|
|
64
|
+
HistoryBusyError,
|
|
65
|
+
MAX_WINDOW_IDLE_MS,
|
|
66
|
+
STUDIO_SIGNATURE_MANIFEST_PATHS,
|
|
67
|
+
UNDO_MODES,
|
|
68
|
+
clearFileWriteReceipt,
|
|
69
|
+
createProjectSignature,
|
|
70
|
+
createWriteToken,
|
|
71
|
+
fileContentVersion,
|
|
72
|
+
recordFileWriteReceipt,
|
|
73
|
+
resolveProjectAndSignature,
|
|
74
|
+
resolveProjectSignature,
|
|
75
|
+
serveWhileOpen,
|
|
76
|
+
settledFileTag
|
|
77
|
+
} from "./chunk-QU5OYMTB.js";
|
|
78
78
|
import {
|
|
79
79
|
STUDIO_MOTION_PATH,
|
|
80
80
|
createStudioMotionRenderBodyScript,
|
|
@@ -115,7 +115,7 @@ import {
|
|
|
115
115
|
ensureHfIds,
|
|
116
116
|
stampHfIdsInPlace,
|
|
117
117
|
stripSdrPngColourTags
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-FKBWONRY.js";
|
|
119
119
|
import {
|
|
120
120
|
PREVIEW_PROXY_BOX_PARAM,
|
|
121
121
|
PREVIEW_PROXY_LIGHT_PARAM,
|
|
@@ -127,7 +127,7 @@ import {
|
|
|
127
127
|
fpsToNumber,
|
|
128
128
|
parseFps,
|
|
129
129
|
parsePreviewProxyBox
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-OWFSGDQS.js";
|
|
131
131
|
import {
|
|
132
132
|
GSAP_BASE_URL_META,
|
|
133
133
|
gsapCdnDist,
|
|
@@ -149,7 +149,7 @@ import {
|
|
|
149
149
|
resolveRateSpec,
|
|
150
150
|
sourceTimeAt,
|
|
151
151
|
stripEmbeddedRuntimeScripts
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-UQECNXFA.js";
|
|
153
153
|
import {
|
|
154
154
|
ProjectRootMissingError,
|
|
155
155
|
folderGone,
|
|
@@ -5592,7 +5592,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
|
|
|
5592
5592
|
let block = extractGsapScriptBlock(html);
|
|
5593
5593
|
if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
|
|
5594
5594
|
const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
|
|
5595
|
-
const { GSAP_CDN } = await import("./dist-
|
|
5595
|
+
const { GSAP_CDN } = await import("./dist-XW7FATO6.js");
|
|
5596
5596
|
const bootstrap = [
|
|
5597
5597
|
`<script src="${GSAP_CDN}"></script>`,
|
|
5598
5598
|
"<script>",
|