hyperframes 0.8.221 → 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-7CVO7K6M.js → add-PBLOPJHC.js} +16 -15
- package/dist/{agentPromptGenerator-YFC2SJLF.js → agentPromptGenerator-OD74HKYZ.js} +12 -11
- package/dist/{animatedGifPrep-YSMY5GU2.js → animatedGifPrep-QCG2BTDC.js} +12 -11
- package/dist/api.d.ts +5 -3
- package/dist/api.js +38 -26
- package/dist/{asset-ZVKHSO3M.js → asset-KHXCO4OR.js} +2 -2
- package/dist/{assetCataloger-6IBSEOK7.js → assetCataloger-ZX5WZTDQ.js} +13 -12
- package/dist/{audio-JUV3TVSW.js → audio-7AH2C6PB.js} +153 -1160
- package/dist/{auth-2J6FP462.js → auth-DJWMGXQB.js} +5 -5
- package/dist/{autoUpdate-ML6EZK6D.js → autoUpdate-KJMLYSHE.js} +2 -2
- package/dist/{backgroundChecks-MAWP2REX.js → backgroundChecks-XLVQMMXY.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-Z7MGNJZH.js → batchRender-UR67LI4H.js} +12 -9
- package/dist/{beats-LRZOZUUQ.js → beats-ISWSYNN6.js} +54 -22
- package/dist/{benchmark-XJWLDTIL.js → benchmark-7JUATINH.js} +12 -11
- package/dist/billing-VGKY3FMX.js +86 -0
- package/dist/{browser-STEVEWWA.js → browser-HNGQB47C.js} +3 -3
- package/dist/{bundleWithLocalizedFonts-WH63ZWUT.js → bundleWithLocalizedFonts-4XWX2XPS.js} +2 -2
- package/dist/{capture-VB5ID7HT.js → capture-GFDP5THL.js} +3 -3
- package/dist/{capture-U3ZT3GNI.js → capture-LBEGVQTJ.js} +80 -38
- package/dist/{captureCompositionFrame-MXJ3WO2R.js → captureCompositionFrame-5L3J4MZ4.js} +18 -17
- package/dist/{catalog-ICGHSRPZ.js → catalog-SNUTPI57.js} +16 -15
- package/dist/{catch-up-DJPQKXQB.js → catch-up-FE3HDMLJ.js} +4 -4
- package/dist/{check-TL7AGWPO.js → check-MQCBMOKA.js} +47 -45
- package/dist/{checkAudio-GPTU6EGB.js → checkAudio-6VPMLIY6.js} +22 -21
- package/dist/{checkBrowser-FG5DAW2R.js → checkBrowser-SHUVFQ4S.js} +45 -39
- package/dist/{chunk-YKMFCE5B.js → chunk-2GMHYOV3.js} +1 -1
- package/dist/{chunk-TNQCXU37.js → chunk-2HBB5U52.js} +1 -1
- package/dist/{chunk-UNQ3CVKW.js → chunk-3FGEDDSA.js} +27 -28
- package/dist/{chunk-HSHKLYDI.js → chunk-44IPXXSK.js} +7 -5
- package/dist/{chunk-TVT465RJ.js → chunk-44YG42L5.js} +144 -41
- package/dist/{chunk-ZBLSSWSE.js → chunk-45UOXUUH.js} +16 -3
- package/dist/chunk-4JRFMRCQ.js +288 -0
- package/dist/{chunk-M2F6VGCP.js → chunk-4XQQQ4KN.js} +85 -50
- package/dist/{chunk-6MUI2H6P.js → chunk-54Q3H2UQ.js} +5 -2
- package/dist/{chunk-67CALYTU.js → chunk-664JAO7C.js} +1 -1
- package/dist/{chunk-H3HC6U4I.js → chunk-6LE7K3YM.js} +17 -14
- package/dist/{chunk-Z7YQEDA5.js → chunk-7LKEHM2R.js} +1 -1
- package/dist/{chunk-I45R2REQ.js → chunk-7XWCCFYW.js} +1 -1
- package/dist/{chunk-L63FJVSC.js → chunk-A2KNKY4Z.js} +1 -1
- package/dist/{chunk-MEB6HWBM.js → chunk-A5WWEW6U.js} +2 -2
- package/dist/{chunk-PBNWRWKA.js → chunk-AKMY4QVI.js} +2 -1
- package/dist/{chunk-OPKSVV4G.js → chunk-AKTI2SHL.js} +2 -2
- package/dist/{chunk-VZBJ5BQF.js → chunk-AW3XJY4S.js} +1 -1
- package/dist/chunk-AW7UW2Z7.js +312 -0
- package/dist/{chunk-DWTFLQ3P.js → chunk-B2ZZYISD.js} +4 -2
- package/dist/{chunk-625I5VBE.js → chunk-B5HFCGI7.js} +2 -2
- package/dist/{chunk-AZXDEC2G.js → chunk-B6F33PUK.js} +6 -8
- package/dist/{chunk-AW7A27JM.js → chunk-BDEBKAD2.js} +1 -1
- package/dist/{chunk-322M35EB.js → chunk-BN75GXZM.js} +3 -3
- package/dist/{chunk-KSC4O2RY.js → chunk-C2KEGBR3.js} +53 -4
- package/dist/{chunk-6YW3FEHC.js → chunk-C466I3DT.js} +9 -8
- package/dist/{chunk-M2BCU4Y5.js → chunk-CXEU6XNL.js} +6 -20
- package/dist/{chunk-KQPP4NIZ.js → chunk-CYE2NNFF.js} +2 -2
- package/dist/{chunk-U6WH572X.js → chunk-DFK4RMNE.js} +5 -5
- package/dist/chunk-DY7PQLIE.js +248 -0
- package/dist/chunk-EF735J3K.js +59 -0
- package/dist/{chunk-XFMO3BEN.js → chunk-EHZESMRB.js} +18 -6
- package/dist/chunk-EJOFIHX4.js +46 -0
- package/dist/{chunk-3422KMTD.js → chunk-EPQC3FGZ.js} +4 -0
- package/dist/{chunk-2ZNURTH5.js → chunk-EX75C5HT.js} +4459 -4312
- package/dist/{chunk-4ZM727AO.js → chunk-FKBWONRY.js} +5 -5
- package/dist/{chunk-YISDQ7YP.js → chunk-FORV75JT.js} +26 -14
- package/dist/{chunk-ZKPRJPWN.js → chunk-G5KX4X6W.js} +59 -59
- package/dist/{chunk-SGTEKMJW.js → chunk-HOTXWVVP.js} +93 -5
- package/dist/{chunk-LYZB5CJN.js → chunk-HT3D5AKG.js} +160 -19
- package/dist/{chunk-BIROA7JM.js → chunk-HYRPH6LL.js} +7 -6
- package/dist/{chunk-35JKCWYI.js → chunk-I6OY5MS6.js} +1 -1
- package/dist/{chunk-S5GOFDX5.js → chunk-IJI2JNN7.js} +1 -1
- package/dist/{chunk-SAKL7SZH.js → chunk-IQ7FABPU.js} +3 -3
- package/dist/{chunk-YV2QQUTL.js → chunk-JNQCM6CR.js} +2 -2
- package/dist/{chunk-TMK3MW7B.js → chunk-JO4LHFFP.js} +10 -10
- package/dist/chunk-JTZHDD63.js +70 -0
- package/dist/{chunk-YSZ4VMXI.js → chunk-K5GMPWMG.js} +1 -1
- package/dist/{chunk-ROVRC3CG.js → chunk-KCDWRMTC.js} +5 -5
- package/dist/{chunk-74E7EHVH.js → chunk-KJGYQVFD.js} +1 -1
- package/dist/{chunk-3STL4WJ6.js → chunk-KT2WLSX5.js} +19 -10
- package/dist/{chunk-OMLDAF44.js → chunk-KWYK65GR.js} +9 -8
- package/dist/{chunk-F6WHVEUS.js → chunk-LAIGIOEA.js} +5 -1
- package/dist/{chunk-3PJ3HVLG.js → chunk-LV5AVW6U.js} +1 -1
- package/dist/{chunk-XETZLYGW.js → chunk-M4UVOUWC.js} +2 -2
- package/dist/{chunk-DMCU2ELU.js → chunk-M7HNGAWN.js} +3 -3
- package/dist/chunk-MEJH7VEA.js +63 -0
- package/dist/{chunk-MYXFBIJO.js → chunk-MTVL7FWZ.js} +1 -1
- package/dist/{chunk-MYNBV7WG.js → chunk-MUHOFRGW.js} +1 -1
- package/dist/{chunk-7DVR3DL3.js → chunk-N6XKBBT5.js} +8 -8
- package/dist/{chunk-OOEOJPFY.js → chunk-NLWG5TU7.js} +2 -2
- package/dist/chunk-NZZQCWUC.js +205 -0
- package/dist/{chunk-ZOLKM3VZ.js → chunk-OL2C3ODS.js} +9 -9
- package/dist/{chunk-QLQVQQP6.js → chunk-OVINGNLQ.js} +3 -3
- package/dist/{chunk-MXVH6UW6.js → chunk-OWFSGDQS.js} +6 -57
- package/dist/chunk-OZM6VLD7.js +71 -0
- package/dist/{chunk-5YT2KHPO.js → chunk-P5QGZMGC.js} +2 -2
- package/dist/{chunk-NYOQP6DO.js → chunk-PBPHKD56.js} +1 -1
- package/dist/chunk-PHEPL7OX.js +1048 -0
- package/dist/{chunk-AZI2T2KO.js → chunk-PX7Y4HMM.js} +1 -1
- package/dist/{chunk-IDWJJ7PP.js → chunk-QNLHDYYO.js} +2 -2
- package/dist/{chunk-N4XNRHFM.js → chunk-QNW43LWB.js} +1 -1
- package/dist/{chunk-24F7TOW2.js → chunk-QU5OYMTB.js} +140 -54
- package/dist/chunk-QZGKKQ77.js +570 -0
- package/dist/{chunk-NQOCM4KQ.js → chunk-RKVKFXYB.js} +3 -3
- package/dist/{chunk-Y4GLFHO5.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-YBNF5ZOC.js → chunk-SFS5BTQ3.js} +1 -1
- package/dist/{chunk-BQNTY7J5.js → chunk-SNFVQDKE.js} +1 -1
- package/dist/{chunk-J74ZUXVU.js → chunk-SWC3QIEH.js} +1 -1
- package/dist/{chunk-D2RQVJLZ.js → chunk-SX7ESVCQ.js} +5 -29
- package/dist/{chunk-P6FGS4U6.js → chunk-UFYWGUUV.js} +6 -6
- package/dist/{chunk-GSCFMG4C.js → chunk-UGUWSAJT.js} +3 -3
- package/dist/chunk-UQECNXFA.js +5013 -0
- package/dist/{chunk-XDTCPMR3.js → chunk-UQVAAEPQ.js} +2 -2
- 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-5SKC4G26.js → chunk-VMRQDPFL.js} +1 -1
- package/dist/chunk-WGOIJN57.js +95 -0
- package/dist/{chunk-RVCWVOXM.js → chunk-WQLTKHPP.js} +3 -3
- package/dist/{chunk-RVIMLJXC.js → chunk-WUXDIF5D.js} +60 -23
- package/dist/{chunk-QYUXDFJY.js → chunk-WWOHLNFO.js} +12 -10
- package/dist/{chunk-JGZUG5V4.js → chunk-XZEHFUQF.js} +2 -2
- package/dist/{chunk-6HKUUBAV.js → chunk-Y4INSXS7.js} +2 -2
- package/dist/{chunk-O7WR4AHX.js → chunk-ZEKV5T3I.js} +14 -14
- package/dist/{clean-3NMJWZXK.js → clean-JZOPMJMV.js} +27 -26
- package/dist/cli.js +59 -56
- package/dist/{cloud-CB3NYNUR.js → cloud-VMPF2KMA.js} +4 -4
- package/dist/{cloudrun-2CTKCIXV.js → cloudrun-LA2FKS2F.js} +10 -9
- package/dist/commands/layout-audit.browser.js +19 -3
- package/dist/commands/motion-signature.browser.js +8 -4
- package/dist/{compare-FVY3AMTT.js → compare-IQCFSC5Z.js} +37 -36
- package/dist/{compiler-SEQRWEEN.js → compiler-J7OZQIPD.js} +8 -8
- package/dist/{component-AEMJRROX.js → component-TRGBVFCI.js} +3 -3
- package/dist/{compositions-NRBSIBGZ.js → compositions-FOC2CAZX.js} +18 -17
- package/dist/curve-ID3Z522S.js +329 -0
- package/dist/cuts-MWHQSE2Z.js +123 -0
- package/dist/{delete-T4E53ELR.js → delete-47KZ7PLI.js} +5 -5
- package/dist/{deploy-PUF2DW3H.js → deploy-NTNEO4TI.js} +8 -8
- package/dist/describeProject-WWREIVQV.js +56 -0
- package/dist/{deterministicFonts-2ISM3LMW.js → deterministicFonts-LV2JMOJL.js} +2 -2
- package/dist/diff-GH4KCQGQ.js +1825 -0
- package/dist/{dist-VARV35QH.js → dist-24QQO5IL.js} +6 -6
- package/dist/{dist-B6C3DU6I.js → dist-XW7FATO6.js} +7 -6
- package/dist/{doctor-FVBU575B.js → doctor-4ZH7WFU6.js} +16 -15
- package/dist/{dotEnv-BGFXSQOA.js → dotEnv-33RDHX7P.js} +1 -1
- package/dist/energy-2C65KXBH.js +134 -0
- package/dist/{events-RSPDI7FX.js → events-FUFFA55P.js} +3 -3
- package/dist/{events-DZ5PRR6F.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-AALA3OA7.js → feedback-M5GZWDXP.js} +16 -15
- package/dist/{ffmpeg-YXKE5CUE.js → ffmpeg-27H6P7ZU.js} +13 -12
- package/dist/{figma-37R727XZ.js → figma-AI6TSWVO.js} +3 -3
- package/dist/fontLocalizeCli.js +16 -15
- package/dist/frames-WUTLVZIR.js +352 -0
- package/dist/generate-3CJREF5U.js +74 -0
- package/dist/{get-L3VKJ6JF.js → get-KTDRE33B.js} +5 -5
- package/dist/{gpuPolicy-6QIFFWAI.js → gpuPolicy-Z4MM64HY.js} +12 -11
- package/dist/{grade-compare-7IN5QDJD.js → grade-compare-IM7Z7HWI.js} +41 -37
- package/dist/{heifImagePrep-AWII25PM.js → heifImagePrep-CXI2ZMUX.js} +13 -12
- package/dist/{help-B4MB7MWW.js → help-5FR6BRLR.js} +7 -1
- package/dist/{history-TQO6AWEQ.js → history-5P5YVP5H.js} +17 -8
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +72 -72
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/hyperframes-slideshow.global.js +8 -8
- package/dist/index-gen-OPMQ5WSN.js +61 -0
- package/dist/{info-7CBHVXSG.js → info-5ZGNJJVA.js} +11 -10
- package/dist/{init-D7HKPQ5A.js → init-NWIAEYSX.js} +35 -33
- package/dist/{inspect-VHDQL55M.js → inspect-HBLAVW5C.js} +38 -36
- package/dist/{installer-EJNLL6SV.js → installer-KVFTBZZ5.js} +8 -7
- package/dist/{keyframes-IFLBMAJP.js → keyframes-LFCLUY2R.js} +7 -7
- package/dist/{lambda-I7EQULHC.js → lambda-RFWTTMLU.js} +19 -18
- package/dist/{layout-MOCEANRO.js → layout-WOG2Y5ND.js} +38 -36
- package/dist/{lint-HFXGSQKN.js → lint-7MALXMMF.js} +12 -12
- package/dist/{lintProject-VCDI6A2W.js → lintProject-6H64SX3V.js} +6 -6
- package/dist/{list-OFYIXVON.js → list-XRYAT24W.js} +5 -5
- package/dist/{localPage-QOOQ5YA2.js → localPage-IN36JVJU.js} +12 -11
- package/dist/{login-WAG7B4PM.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-34U5CEFB.js → manager-SFL6GLYX.js} +14 -12
- package/dist/manifest-QSJYVERU.js +49 -0
- package/dist/measure-Q74BJTRQ.js +46 -0
- package/dist/{media-treatment-2TLX6NKS.js → media-treatment-3R6DYEAZ.js} +24 -23
- package/dist/{media-use-ZNTB7W6N.js → media-use-ZM2WCRQC.js} +9 -5
- package/dist/{models-M2F4WTAR.js → models-NNC53UPU.js} +16 -15
- package/dist/{motionShot-6WCTCV4W.js → motionShot-5BI5JFUP.js} +21 -20
- package/dist/{normalize-QJVXFMWO.js → normalize-MBNGRVQA.js} +2 -1
- package/dist/{normalize-audio-T6PIPWOT.js → normalize-audio-6Z2WN56Q.js} +15 -14
- package/dist/{open-BC5METIY.js → open-5NCEN6RC.js} +15 -14
- package/dist/{parakeetRunner-UXVY7PV2.js → parakeetRunner-DH3XKR3C.js} +19 -17
- package/dist/{pipeline-GJAJPWPB.js → pipeline-CGEGQAPH.js} +15 -14
- package/dist/{play-UCIRUHCU.js → play-K37BN736.js} +28 -27
- package/dist/{policies-J5BWAZHM.js → policies-U4PFXF5E.js} +4 -2
- package/dist/{preflight-GVRYYIH5.js → preflight-CG7H3D5B.js} +13 -12
- package/dist/{present-46QLZOK4.js → present-KQ53DOHA.js} +24 -23
- package/dist/{preview-HWXMP7WL.js → preview-V7CYHL6U.js} +26 -25
- package/dist/probe-JVW2MPY3.js +178 -0
- package/dist/{producer-2PBHUE5O.js → producer-UD32S7PX.js} +1 -1
- package/dist/{projectConfig-C4S3LBBX.js → projectConfig-WXCB5AZE.js} +10 -9
- package/dist/{publication-GESNVVMS.js → publication-KG4UDZRM.js} +6 -5
- package/dist/{publish-IBY26S3T.js → publish-MEQB543T.js} +22 -21
- package/dist/{refresh-I6ITGHKL.js → refresh-2LU4XDL7.js} +2 -2
- package/dist/{remove-background-3OBWOHVZ.js → remove-background-FSV5KQK3.js} +16 -15
- package/dist/{render-LSI5WXS7.js → render-O4S4SURS.js} +10 -9
- package/dist/{render-SR5RISLU.js → render-SQXZAGPQ.js} +160 -46
- package/dist/{render-3F6GQ5WW.js → render-SY4AXKXC.js} +40 -39
- package/dist/{render-batch-HV4W3PZM.js → render-batch-GTZQUB3H.js} +10 -9
- package/dist/renderSetupWorker.js +6 -6
- package/dist/{resolver-R5X3HAPE.js → resolver-BQZNCVJS.js} +8 -7
- package/dist/run-67OPNJGD.js +31 -0
- package/dist/{screenshotCapture-U3IYWTDB.js → screenshotCapture-4THETOMD.js} +2 -1
- package/dist/{sherpa-2Q6U4ZFY.js → sherpa-KH3PJAUG.js} +18 -16
- package/dist/skills/hyperframes-cli/references/beats.md +1 -1
- package/dist/skills/media-use/SKILL.md +20 -21
- package/dist/skills/media-use/audio/scripts/lib/gemini-tts.mjs +13 -1
- package/dist/skills/media-use/audio/scripts/lib/gemini-tts.test.mjs +10 -0
- 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-FSGXQSHA.js → skills-FTZZJGAB.js} +5 -5
- package/dist/{skillsUpdateCheck-UW6643XX.js → skillsUpdateCheck-LZPD2CZI.js} +3 -3
- package/dist/{slideshow-SJGK4RQS.js → slideshow-ARJR22W4.js} +1 -1
- package/dist/{snapshot-HFPB34Y7.js → snapshot-4BORZ3ED.js} +60 -47
- package/dist/{src-VMTQQUUP.js → src-6ZOFAM3F.js} +21 -14
- package/dist/{src-ROWFWCEN.js → src-D7AO7PGH.js} +12 -11
- package/dist/{staticProjectServer-4TGZJIWN.js → staticProjectServer-Q23A6XU2.js} +25 -24
- 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-BDE7dwov.js → index-DD9KJoEr.js} +119 -119
- package/dist/studio/assets/{index-D0jGq2dS.js → index-mbwAH5iR.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-TSHXVZ6R.js → studio-api-XVVJZ7YT.js} +24 -19
- package/dist/{studioServer-74ZBLNP2.js → studioServer-6HG3AMTW.js} +77 -114
- package/dist/sync-Q5SRIL7V.js +115 -0
- package/dist/{telemetry-3NDLZOPR.js → telemetry-VXPSJ3X3.js} +3 -3
- package/dist/templates/blank/index.html +1 -1
- package/dist/templates/from-file/index.html +1 -1
- package/dist/{timeline-5IFZJU7M.js → timeline-6477OWFA.js} +31 -26
- package/dist/{tokens-UFNPQVLS.js → tokens-ZUUNEDKT.js} +2 -2
- package/dist/{transcribe-7KQAUHEN.js → transcribe-HA4UGLKO.js} +17 -15
- package/dist/{transcribe-NAXKBIPW.js → transcribe-ITVANIDK.js} +41 -23
- package/dist/{tts-BVTJEP72.js → tts-KMZPHG3K.js} +1 -1
- package/dist/{updateCheck-KDSFL3XX.js → updateCheck-SVADAQ43.js} +2 -2
- package/dist/{upgrade-EXX4C35N.js → upgrade-WKW4FDNF.js} +2 -2
- package/dist/{urlDownloader-4UFCIAPH.js → urlDownloader-VWHCESDD.js} +11 -10
- package/dist/{validate-QYOHY3N6.js → validate-7VG2RLP2.js} +31 -30
- package/dist/{video-HRL3V2R5.js → video-LM3FYHGG.js} +13 -12
- package/dist/warmCheck.js +47 -45
- package/package.json +1 -1
- package/dist/chunk-Q3PPGPEA.js +0 -5061
- package/dist/studio/assets/hyperframes-player-B_wvwarc.js +0 -478
- package/dist/{chunk-NOH32H42.js → chunk-HBAUU3IK.js} +124 -124
- package/dist/{chunk-NHA4NRBE.js → chunk-T5ELONXY.js} +0 -0
- package/dist/{destroy-BQ5R7LUF.js → destroy-6NWJMQX2.js} +4 -4
- package/dist/{synthesize-4JC74JW5.js → synthesize-DIT2SR3D.js} +5 -5
|
@@ -4,36 +4,24 @@ import { dirname as __hf_dirname } from "node:path";
|
|
|
4
4
|
var require = __hf_createRequire(import.meta.url);
|
|
5
5
|
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
verifies
|
|
9
|
+
} from "./chunk-RZ6CXJ56.js";
|
|
7
10
|
import {
|
|
8
11
|
downloadFile
|
|
9
12
|
} from "./chunk-R4EWRIDL.js";
|
|
10
13
|
import {
|
|
11
14
|
findFFmpeg
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WWOHLNFO.js";
|
|
13
16
|
import {
|
|
14
17
|
stoppableExecFile
|
|
15
18
|
} from "./chunk-HU2SPFNG.js";
|
|
16
19
|
|
|
17
20
|
// src/whisper/manager.ts
|
|
18
21
|
import { execFileSync } from "child_process";
|
|
19
|
-
import { existsSync, mkdirSync, readdirSync, rmSync, statSync
|
|
22
|
+
import { existsSync, mkdirSync, readdirSync, rmSync, statSync } from "fs";
|
|
20
23
|
import { homedir, platform } from "os";
|
|
21
24
|
import { join } from "path";
|
|
22
|
-
|
|
23
|
-
// src/whisper/modelFile.ts
|
|
24
|
-
import { createHash } from "crypto";
|
|
25
|
-
import { createReadStream, statSync } from "fs";
|
|
26
|
-
async function sha256File(path) {
|
|
27
|
-
const hash = createHash("sha256");
|
|
28
|
-
for await (const chunk of createReadStream(path)) hash.update(chunk);
|
|
29
|
-
return hash.digest("hex");
|
|
30
|
-
}
|
|
31
|
-
async function verifies(path, file) {
|
|
32
|
-
if (statSync(path, { throwIfNoEntry: false })?.size !== file.bytes) return false;
|
|
33
|
-
return await sha256File(path) === file.sha256;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// src/whisper/manager.ts
|
|
37
25
|
var MODELS_DIR = join(homedir(), ".cache", "hyperframes", "whisper", "models");
|
|
38
26
|
var DEFAULT_MODEL = "small.en";
|
|
39
27
|
var WhisperUnavailableError = class extends Error {
|
|
@@ -259,7 +247,7 @@ async function ensureWhisper(options) {
|
|
|
259
247
|
async function ensureModel(model = DEFAULT_MODEL, options) {
|
|
260
248
|
const modelPath = join(MODELS_DIR, `ggml-${model}.bin`);
|
|
261
249
|
const pin = PINNED_MODELS.get(model);
|
|
262
|
-
const cachedBytes =
|
|
250
|
+
const cachedBytes = statSync(modelPath, { throwIfNoEntry: false })?.size;
|
|
263
251
|
if (cachedBytes !== void 0 && (!pin || cachedBytes === pin.bytes)) return modelPath;
|
|
264
252
|
mkdirSync(MODELS_DIR, { recursive: true });
|
|
265
253
|
rmSync(modelPath, { force: true });
|
|
@@ -284,8 +272,6 @@ function hasFFmpeg() {
|
|
|
284
272
|
}
|
|
285
273
|
|
|
286
274
|
export {
|
|
287
|
-
sha256File,
|
|
288
|
-
verifies,
|
|
289
275
|
MODELS_DIR,
|
|
290
276
|
DEFAULT_MODEL,
|
|
291
277
|
WhisperUnavailableError,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
typeDirPath,
|
|
21
21
|
updateRecord,
|
|
22
22
|
withFigmaErrors
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2HBB5U52.js";
|
|
24
24
|
import {
|
|
25
25
|
defineCommand
|
|
26
26
|
} from "./chunk-DL4OD7IA.js";
|
|
@@ -229,7 +229,7 @@ var asset_default = defineCommand({
|
|
|
229
229
|
rendered > 0 ? `(${results.length} nodes, ${rendered} rendered in 1 figma request)` : `(${results.length} nodes, all reused from cache \u2014 no figma request)`
|
|
230
230
|
);
|
|
231
231
|
}
|
|
232
|
-
const { trackFigmaImport } = await import("./telemetry-
|
|
232
|
+
const { trackFigmaImport } = await import("./telemetry-VXPSJ3X3.js");
|
|
233
233
|
trackFigmaImport({
|
|
234
234
|
phase: "asset",
|
|
235
235
|
reused: results.every((r) => r.reused),
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-J3OVTOVC.js";
|
|
17
17
|
import {
|
|
18
18
|
runEnvironmentChecks
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-A5WWEW6U.js";
|
|
20
20
|
import {
|
|
21
21
|
OPTIONAL_PACKAGES,
|
|
22
22
|
installedOptionalPackageVersion
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-2GICKZ3I.js";
|
|
30
30
|
import {
|
|
31
31
|
resolveExtractCacheDir
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-4XQQQ4KN.js";
|
|
33
33
|
import {
|
|
34
34
|
getFreeDiskMb,
|
|
35
35
|
getShmSizeMb,
|
|
@@ -41,14 +41,14 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
getUpdateMeta,
|
|
43
43
|
withMeta
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-K5GMPWMG.js";
|
|
45
45
|
import {
|
|
46
46
|
CONFIG_PATH,
|
|
47
47
|
withFileLock
|
|
48
48
|
} from "./chunk-BLBMPEBX.js";
|
|
49
49
|
import {
|
|
50
50
|
VERSION
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-P5QGZMGC.js";
|
|
52
52
|
import {
|
|
53
53
|
normalizeErrorMessage
|
|
54
54
|
} from "./chunk-E63BDV4Z.js";
|
|
@@ -240,7 +240,7 @@ function checkEnvironment() {
|
|
|
240
240
|
return { ok: true, detail: parts.join(" \xB7 ") };
|
|
241
241
|
}
|
|
242
242
|
async function checkWhisper() {
|
|
243
|
-
const { findWhisper, getInstallInstructions } = await import("./manager-
|
|
243
|
+
const { findWhisper, getInstallInstructions } = await import("./manager-SFL6GLYX.js");
|
|
244
244
|
const result = findWhisper();
|
|
245
245
|
if (result) {
|
|
246
246
|
return { ok: true, detail: result.executablePath };
|
|
@@ -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
|
+
};
|
|
@@ -8,15 +8,17 @@ var __dirname = __hf_dirname(__filename);
|
|
|
8
8
|
// src/utils/jsonFlag.ts
|
|
9
9
|
import { readFileSync } from "fs";
|
|
10
10
|
import { resolve } from "path";
|
|
11
|
-
function
|
|
11
|
+
function decodeJsonText(bytes) {
|
|
12
12
|
if (bytes[0] === 255 && bytes[1] === 254)
|
|
13
13
|
return bytes.toString("utf16le").replace(/^\uFEFF/, "");
|
|
14
14
|
return bytes.toString("utf8").replace(/^\uFEFF/, "");
|
|
15
15
|
}
|
|
16
16
|
var defaultIO = {
|
|
17
|
-
readFile: (path) =>
|
|
18
|
-
readStdin: () =>
|
|
17
|
+
readFile: (path) => decodeJsonText(readFileSync(resolve(path))),
|
|
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}`);
|
|
@@ -36,24 +38,31 @@ function isJsonScalar(text) {
|
|
|
36
38
|
}
|
|
37
39
|
var errorText = (error) => error instanceof Error ? error.message : String(error);
|
|
38
40
|
function readJsonFlagText(value, partialIo = {}) {
|
|
39
|
-
const io = {
|
|
41
|
+
const io = {
|
|
42
|
+
readFile: partialIo.readFile ?? defaultIO.readFile,
|
|
43
|
+
readStdin: partialIo.readStdin ?? defaultIO.readStdin
|
|
44
|
+
};
|
|
40
45
|
const trimmed = value.trim();
|
|
41
46
|
if (trimmed.startsWith("{") || trimmed.startsWith("[") || isJsonScalar(trimmed)) return value;
|
|
42
47
|
const source = trimmed === "-" ? "stdin" : value;
|
|
43
48
|
try {
|
|
44
|
-
|
|
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;
|
|
45
53
|
} catch (error) {
|
|
46
54
|
throw new JsonFlagReadError(source, errorText(error));
|
|
47
55
|
}
|
|
48
56
|
}
|
|
49
57
|
var inlineJsonHint = (flag) => `PowerShell strips the quotes from inline JSON; pass a file (${flag} payload.json) or pipe it (${flag} -)`;
|
|
58
|
+
var unreadableJsonHint = (flag, value) => value.includes(":") && !/^\s*[A-Za-z]:[\\/]/.test(value) ? ` (${inlineJsonHint(flag)})` : "";
|
|
50
59
|
function readJsonFlag(flag, value, io) {
|
|
51
60
|
let text;
|
|
52
61
|
try {
|
|
53
62
|
text = readJsonFlagText(value, io);
|
|
54
63
|
} catch (error) {
|
|
55
64
|
if (!(error instanceof JsonFlagReadError)) throw error;
|
|
56
|
-
throw new Error(`Could not read ${flag}: ${error.message}`);
|
|
65
|
+
throw new Error(`Could not read ${flag}: ${error.message}${unreadableJsonHint(flag, value)}`);
|
|
57
66
|
}
|
|
58
67
|
try {
|
|
59
68
|
return JSON.parse(text);
|
|
@@ -64,8 +73,11 @@ function readJsonFlag(flag, value, io) {
|
|
|
64
73
|
}
|
|
65
74
|
|
|
66
75
|
export {
|
|
76
|
+
readJsonFileText,
|
|
77
|
+
readJsonStdinText,
|
|
67
78
|
JsonFlagReadError,
|
|
68
79
|
readJsonFlagText,
|
|
69
80
|
inlineJsonHint,
|
|
81
|
+
unreadableJsonHint,
|
|
70
82
|
readJsonFlag
|
|
71
83
|
};
|
|
@@ -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
|
+
};
|
|
@@ -31,6 +31,9 @@ function parseSlideshowManifest(html) {
|
|
|
31
31
|
function isOptionalNumberArray(v) {
|
|
32
32
|
return v === void 0 || Array.isArray(v) && v.every((n) => typeof n === "number");
|
|
33
33
|
}
|
|
34
|
+
function isOptionalFiniteNumber(v) {
|
|
35
|
+
return v === void 0 || typeof v === "number" && Number.isFinite(v);
|
|
36
|
+
}
|
|
34
37
|
function isOptionalBoolean(v) {
|
|
35
38
|
return v === void 0 || typeof v === "boolean";
|
|
36
39
|
}
|
|
@@ -49,6 +52,7 @@ function isSlideRef(v) {
|
|
|
49
52
|
if (!isRecord(v)) return false;
|
|
50
53
|
const r = v;
|
|
51
54
|
if (typeof r["sceneId"] !== "string") return false;
|
|
55
|
+
if (![r["startTime"], r["endTime"]].every(isOptionalFiniteNumber)) return false;
|
|
52
56
|
if (!isOptionalNumberArray(r["fragments"])) return false;
|
|
53
57
|
if (r["hotspots"] !== void 0 && (!Array.isArray(r["hotspots"]) || !r["hotspots"].every(isSlideHotspot)))
|
|
54
58
|
return false;
|