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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var HyperframesPlayer=(()=>{var k=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var J=Object.prototype.hasOwnProperty;var Q=(n,e)=>{for(var t in e)k(n,t,{get:e[t],enumerable:!0})},Z=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of X(e))!J.call(n,r)&&r!==t&&k(n,r,{get:()=>e[r],enumerable:!(i=Y(e,r))||i.enumerable});return n};var ee=n=>Z(k({},"__esModule",{value:!0}),n);var
|
|
1
|
+
"use strict";var HyperframesPlayer=(()=>{var k=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var J=Object.prototype.hasOwnProperty;var Q=(n,e)=>{for(var t in e)k(n,t,{get:e[t],enumerable:!0})},Z=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of X(e))!J.call(n,r)&&r!==t&&k(n,r,{get:()=>e[r],enumerable:!(i=Y(e,r))||i.enumerable});return n};var ee=n=>Z(k({},"__esModule",{value:!0}),n);var He={};Q(He,{HyperframesSlideshow:()=>b,childrenMayStillArrive:()=>B,dropInvalidSlides:()=>K,locateSlideshowParts:()=>D});var te="application/hyperframes-slideshow+json";function ne(n="i"){let e=te.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t="[\\t\\n\\f\\r ]*";return new RegExp(`<script[^>]*type${t}=${t}["']${e}["'][^>]*>([\\s\\S]*?)<\\/script>`,n)}function A(n){let t=ne("i").exec(n);if(!t||t[1]===void 0)return null;let i=t[1].trim();if(i.length===0)return null;let r=JSON.parse(i);if(!de(r))throw new Error("slideshow island is not a valid SlideshowManifest");return r}function ie(n){return n===void 0||Array.isArray(n)&&n.every(e=>typeof e=="number")}function re(n){return n===void 0||typeof n=="number"&&Number.isFinite(n)}function se(n){return n===void 0||typeof n=="boolean"}function S(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function oe(n){return S(n)&&[n.x,n.y,n.w,n.h].every(e=>typeof e=="number"&&Number.isFinite(e))}function ae(n){return S(n)&&typeof n.id=="string"&&typeof n.label=="string"&&typeof n.target=="string"&&(n.region===void 0||oe(n.region))}function C(n){if(!S(n))return!1;let e=n;return!(typeof e.sceneId!="string"||![e.startTime,e.endTime].every(re)||!ie(e.fragments)||e.hotspots!==void 0&&(!Array.isArray(e.hotspots)||!e.hotspots.every(ae))||!se(e.autoplay))}function le(n){if(typeof n!="object"||n===null)return!1;let e=n;return typeof e.id=="string"&&typeof e.label=="string"&&Array.isArray(e.slides)&&e.slides.every(C)}function de(n){if(typeof n!="object"||n===null||Array.isArray(n))return!1;let e=n;return!(!Array.isArray(e.slides)||!e.slides.every(C)||e.slideSequences!==void 0&&(!Array.isArray(e.slideSequences)||!e.slideSequences.every(le)))}function ue(n,e){return`slide "${n}" sets ${e==="startTime"?"endTime":"startTime"} but ${e} cannot be resolved (no scene "${n}")`}function ce(n,e,t){let{startTime:i,endTime:r,sceneId:s}=n;if(i!==void 0&&r!==void 0)return{start:i,end:r};if(i===void 0&&r===void 0)return e?{start:e.start,end:e.start+e.duration}:(t.push(`slide references unresolved sceneId "${s}"`),{start:0,end:0});if(!e){let a=i===void 0?"startTime":"endTime";t.push(ue(s,a));let d=i??r??0;return{start:d,end:d}}return{start:i??e.start,end:r??e.start+e.duration}}function he(n,e,t,i,r){for(let s of e)(s<t||s>i)&&r.push(`slide "${n}" fragment ${s} is outside range [${t}, ${i}]`)}function P(n,e,t){let i=e.get(n.sceneId),{start:r,end:s}=ce(n,i,t);n.startTime!==void 0&&n.endTime!==void 0&&s<=r&&t.push(`slide "${n.sceneId}" has endTime (${s}) <= startTime (${r})`);let a=[...new Set(n.fragments??[])].sort((d,o)=>d-o);return he(n.sceneId,a,r,s,t),{...n,start:r,end:s,fragments:a,hotspots:n.hotspots??[]}}function L(n,e){let t=[],i=new Map(e.map(o=>[o.id,o])),r={};for(let o of n.slideSequences??[])Object.prototype.hasOwnProperty.call(r,o.id)&&t.push(`duplicate slideSequence id "${o.id}": only the last definition is kept`),r[o.id]={id:o.id,label:o.label,slides:o.slides.map(l=>P(l,i,t))};let s=n.slides.map(o=>P(o,i,t)),a=[...s,...Object.values(r).flatMap(o=>o.slides)];for(let o of a)for(let l of o.hotspots){let u=r[l.target];u?u.slides.length===0&&t.push(`hotspot "${l.id}" targets empty sequence "${l.target}"`):t.push(`hotspot "${l.id}" targets unknown sequence "${l.target}"`)}let d=[...s].sort((o,l)=>o.start-l.start);for(let o=1;o<d.length;o++){let l=d[o-1],u=d[o];l!==void 0&&u!==void 0&&u.start<l.end&&t.push(`main-line slides "${l.sceneId}" and "${u.sceneId}" overlap`)}return{resolved:{slides:s,sequences:r},errors:t}}var f="main",y=class{constructor(e,t){this.player=e;this.show=t;this.enterSlide(0)}player;show;stack=[{sequenceId:f,slideIndex:0,fragmentIndex:-1}];changeCbs=new Set;dispose(){}slidesOf(e){return e===f?this.show.slides:this.show.sequences[e]?.slides??[]}get frame(){return this.stack[this.stack.length-1]}get currentSlide(){return this.slidesOf(this.frame.sequenceId)[this.frame.slideIndex]}get nextSlide(){return this.slidesOf(this.frame.sequenceId)[this.frame.slideIndex+1]??null}get position(){return{...this.frame}}get counter(){return{index:this.frame.slideIndex+1,total:this.slidesOf(this.frame.sequenceId).length}}get canPrev(){return this.frame.slideIndex>0||this.stack.length>1}get canNext(){let e=this.currentSlide;if(e&&this.frame.fragmentIndex+1<e.fragments.length)return!0;let t=this.slidesOf(this.frame.sequenceId);return this.frame.slideIndex+1<t.length||this.stack.length>1}get breadcrumb(){return this.stack.map(e=>e.sequenceId===f?{id:f,label:"Main deck"}:{id:e.sequenceId,label:this.show.sequences[e.sequenceId]?.label??e.sequenceId})}onChange(e){return this.changeCbs.add(e),()=>this.changeCbs.delete(e)}emitChange(){for(let e of this.changeCbs)e()}stopSlideMedia(){this.player.stopMedia?.()}enterSlide(e){e!==this.frame.slideIndex&&this.stopSlideMedia(),this.frame.slideIndex=e;let t=this.currentSlide;if(!t){this.frame.fragmentIndex=-1;return}t.fragments.length>0?(this.frame.fragmentIndex=0,this.playTo(t.fragments[0]??t.end)):(this.frame.fragmentIndex=-1,this.playTo(this.restFrame(t))),t.autoplay&&this.player.playSceneMedia?.(t.sceneId),this.emitChange()}restFrame(e){return e.start+(e.end-e.start)*.5}resumeSlide(e,t){this.frame.slideIndex=e,this.frame.fragmentIndex=t;let i=this.currentSlide;if(!i)return;let r=t>=0&&t<i.fragments.length?i.fragments[t]??i.start:i.fragments.length>0?i.start:this.restFrame(i);this.playTo(r),this.emitChange()}playTo(e){this.player.seek(e)}next(){let e=this.currentSlide;if(!e)return;if(this.frame.fragmentIndex+1<e.fragments.length){this.frame.fragmentIndex+=1;let r=e.fragments[this.frame.fragmentIndex]??e.end;this.playTo(r),this.emitChange();return}let i=this.slidesOf(this.frame.sequenceId);this.frame.slideIndex+1<i.length?this.enterSlide(this.frame.slideIndex+1):this.stack.length>1&&this.back()}prev(){if(this.frame.slideIndex>0){this.enterSlide(this.frame.slideIndex-1);return}this.stack.length>1&&this.back()}goToSlide(e){let t=this.slidesOf(this.frame.sequenceId);e>=0&&e<t.length&&this.enterSlide(e)}enterBranch(e){let t=this.show.sequences[e];!t||t.slides.length===0||(this.stopSlideMedia(),this.stack.push({sequenceId:e,slideIndex:0,fragmentIndex:-1}),this.enterSlide(0))}back(){this.stack.length<=1||(this.stopSlideMedia(),this.stack.pop(),this.resumeSlide(this.frame.slideIndex,this.frame.fragmentIndex))}backToMain(){this.stack.length<=1||(this.stopSlideMedia(),this.stack=[this.stack[0]],this.resumeSlide(this.frame.slideIndex,this.frame.fragmentIndex))}syncTo(e,t,i){this.isValidSyncTarget(e,t)&&(this.isCrossSlide(e,t)&&this.stopSlideMedia(),this.rerootStackTo(e)&&this.resumeSlide(t,i))}isValidSyncTarget(e,t){if(!this.stack[0])return!1;let i=e===f?this.show.slides:this.show.sequences[e]?.slides??null;return i?t>=0&&t<i.length:!1}isCrossSlide(e,t){return this.frame.sequenceId!==e||this.frame.slideIndex!==t}rerootStackTo(e){if(this.frame.sequenceId===e)return!0;let t=this.stack[0];if(!t)return!1;if(this.stack=[t],e===f)return!0;let i=this.show.sequences[e];return!i||i.slides.length===0?!1:(this.stack.push({sequenceId:e,slideIndex:0,fragmentIndex:-1}),!0)}};var $="Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",pe=new Set(["play","pause","seeking","seeked","ratechange","volumechange","ended","timeupdate"]),fe=["currentTime","volume","playbackRate"],me=["paused","ended","muted"];function R(n){return!(typeof n!="object"||n===null)}function ve(n){if(!R(n))return!1;let e=n;return e.type==="goto"&&typeof e.sequenceId=="string"&&typeof e.slideIndex=="number"&&typeof e.fragmentIndex=="number"}function ye(n){return pe.has(n)}function ge(n){return n==="presenter"||n==="audience"}function be(n){return fe.every(e=>typeof n[e]=="number")}function Me(n){return me.every(e=>typeof n[e]=="boolean")}function xe(n){if(!R(n))return!1;let e=n;return e.type==="media"&&ge(e.sender)&&typeof e.key=="string"&&ye(e.action)&&be(e)&&Me(e)}function we(){return`hf-slideshow:${typeof location<"u"?location.pathname:""}`}var m=class{constructor(e,t,i=()=>{}){this.mode=e;this.onGoto=t;this.onMedia=i;try{this.channel=new BroadcastChannel(we())}catch{return}this.channel.onmessage=r=>{if(ve(r.data)){e==="audience"&&this.onGoto(r.data);return}xe(r.data)&&r.data.sender!==e&&this.onMedia(r.data)}}mode;onGoto;onMedia;channel=null;postPosition(e){if(this.mode!=="presenter"||!this.channel)return;let t={type:"goto",...e};this.channel.postMessage(t)}postMedia(e){this.channel&&this.channel.postMessage({type:"media",sender:this.mode,...e})}destroy(){this.channel&&(this.channel.onmessage=null,this.channel.close(),this.channel=null)}};function F(n){let e=s=>s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),t=s=>e(s).replace(/"/g,"""),i=e(n.notes),r=n.hotspots.length?`<div style="display:flex;flex-direction:column;gap:6px;">
|
|
2
2
|
<div style="font-size:12px;text-transform:uppercase;letter-spacing:.12em;opacity:.55;">Branches</div>
|
|
3
3
|
${n.hotspots.map(s=>`<button data-hotspot-id="${t(s.id)}" data-hotspot-target="${t(s.target)}" type="button" title="${t(s.label)}" style="text-align:left;background:rgba(244,183,64,0.14);color:#f4b740;border:1px solid rgba(244,183,64,0.4);border-radius:8px;padding:8px 12px;font-size:15px;cursor:pointer;pointer-events:auto;font-family:inherit;">↳ ${e(s.label)}</button>`).join("")}
|
|
4
4
|
</div>`:"";return`
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div><div style="font-size:11px;text-transform:uppercase;letter-spacing:.1em;opacity:.5;margin-bottom:3px;">Elapsed</div><div data-hf-presenter-elapsed style="font-family:${$};font-size:23px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:0;">${e(n.elapsedText)}</div></div>
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
|
-
</div>`.trim()}function T(n){let e=Math.floor(n/60),t=Math.floor(n%60);return`${String(e).padStart(2,"0")}:${String(t).padStart(2,"0")}`}var g=class{constructor(e,t){this.actions=e;this.onAction=t}actions;onAction;bindings=new WeakMap;owned=new Set;sync(e){let t=new Set,i=[];for(let{key:r,el:s}of e){t.add(s);let a=this.bindings.get(s);if(a?.key===r)continue;a?.controller.abort();let d=s.ownerDocument.defaultView?.AbortController??AbortController,o=new d;this.bindings.set(s,{key:r,controller:o}),i.push(s);for(let l of this.actions)s.addEventListener(l,()=>this.onAction(s,r,l),{signal:o.signal})}for(let r of this.owned)t.has(r)||(this.bindings.get(r)?.controller.abort(),this.bindings.delete(r));return this.owned=t,i}setMuted(e){for(let t of this.owned)t.muted=e||t.defaultMuted}pauseAll(){for(let e of this.owned)e.pause()}clear(){for(let e of this.owned)this.bindings.get(e)?.controller.abort();this.owned.clear(),this.bindings=new WeakMap}};function N(n){return n+1e-5}var H=150,
|
|
16
|
+
</div>`.trim()}function T(n){let e=Math.floor(n/60),t=Math.floor(n%60);return`${String(e).padStart(2,"0")}:${String(t).padStart(2,"0")}`}var g=class{constructor(e,t){this.actions=e;this.onAction=t}actions;onAction;bindings=new WeakMap;owned=new Set;sync(e){let t=new Set,i=[];for(let{key:r,el:s}of e){t.add(s);let a=this.bindings.get(s);if(a?.key===r)continue;a?.controller.abort();let d=s.ownerDocument.defaultView?.AbortController??AbortController,o=new d;this.bindings.set(s,{key:r,controller:o}),i.push(s);for(let l of this.actions)s.addEventListener(l,()=>this.onAction(s,r,l),{signal:o.signal})}for(let r of this.owned)t.has(r)||(this.bindings.get(r)?.controller.abort(),this.bindings.delete(r));return this.owned=t,i}setMuted(e){for(let t of this.owned)t.muted=e||t.defaultMuted}pauseAll(){for(let e of this.owned)e.pause()}clear(){for(let e of this.owned)this.bindings.get(e)?.controller.abort();this.owned.clear(),this.bindings=new WeakMap}};function N(n){return n+1e-5}var H=150,ke=6e3,Se=["play","pause","seeking","seeked","ratechange","volumechange","ended","timeupdate"];function Te(n){if(!n||typeof n.tagName!="string")return!1;let e=n,t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable===!0}function Ee(n){return typeof n.seek=="function"&&typeof n.play=="function"&&typeof n.pause=="function"}function D(n){let e=n.querySelector("hyperframes-player");if(!(e instanceof HTMLElement))return{kind:"incomplete",reason:"no-player"};let t;try{t=A(n.innerHTML)}catch{return{kind:"incomplete",reason:"malformed-island"}}return t?{kind:"ready",player:e,manifest:t}:{kind:"incomplete",reason:"no-island"}}function B(n){return n==="loading"}var Ie="hf-slideshow:presenter-notes:v1:",_=!1;function Pe(){if(_)return;_=!0;let n=document.createElement("style");n.textContent=`
|
|
17
17
|
@keyframes hf-hotspot-pulse {
|
|
18
18
|
0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.35), 0 4px 16px rgba(0,0,0,0.35); }
|
|
19
19
|
50% { box-shadow: 0 0 0 8px rgba(255,255,255,0), 0 4px 20px rgba(0,0,0,0.45); }
|
|
@@ -77,14 +77,14 @@
|
|
|
77
77
|
[data-hf-muted] [data-hf-mute]:hover {
|
|
78
78
|
color: rgba(255,255,255,0.6) !important;
|
|
79
79
|
}
|
|
80
|
-
`,document.head.appendChild(n)}var q='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3H5a2 2 0 0 0-2 2v3M21 8V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3M16 21h3a2 2 0 0 0 2-2v-3"/></svg>',O='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3v3a2 2 0 0 1-2 2H3M21 8h-3a2 2 0 0 1-2-2V3M3 16h3a2 2 0 0 1 2 2v3M16 21v-3a2 2 0 0 1 2-2h3"/></svg>',Pe='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="13" rx="2"/><path d="M8 21h8"/><path d="M12 17v4"/><path d="M10 8.5v4l4-2-4-2z"/></svg>',Ae="Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",b=class extends HTMLElement{controller=null;offChange=null;chrome=null;touchStartX=0;touchStartY=0;channel=null;presenterStartMs=null;presenterInterval=null;presenterPositionTimers=[];disconnected=!1;initTimer=null;initRetry=null;initInFlight=!1;initGeneration=0;keyForwardFrame=null;detachIframeKeys=null;warnedIframeKeyForwardingUnavailable=!1;_muted=!1;mediaWireInterval=null;playerObserver=null;applyingRemoteMedia=!1;lastMediaTimeBroadcastMs=0;audienceMutedPlaybackKeys=new Set;blockedAudienceMedia=new Map;audienceMediaUnlockButton=null;autoplayToken=0;ownedMedia=new g(ke,(e,t,i)=>this.publishMediaState(e,t,i));get muted(){return this._muted}resolveMode(){let e=this.getAttribute("mode");if(e)return e;try{return new URLSearchParams(location.search).get("mode")}catch{return null}}static get observedAttributes(){return["sound","mode"]}attributeChangedCallback(){this.controller&&this.render()}connectedCallback(){this.disconnected=!1,this.initInFlight=!1,this.initGeneration+=1,this.tabIndex=0,window.addEventListener("keydown",this.onKey),this.addEventListener("touchstart",this.onTouchStart,{passive:!0}),this.addEventListener("touchend",this.onTouchEnd),window.addEventListener("message",this.onMessage),document.addEventListener("fullscreenchange",this.onFsChange),this.initChannel(),this.observeInteractivePlayers(),this.initTimer=setTimeout(()=>{this.initTimer=null,this.isConnected&&!this.disconnected&&(this.ensureInteractivePlayers(),this.init())},0)}disconnectedCallback(){this.disconnected=!0,this.initGeneration+=1,this.autoplayToken++,this.initTimer!==null&&(clearTimeout(this.initTimer),this.initTimer=null),this.initRetry!==null&&(document.removeEventListener("DOMContentLoaded",this.initRetry),this.initRetry=null),window.removeEventListener("keydown",this.onKey),this.detachIframeKeys?.(),this.removeEventListener("touchstart",this.onTouchStart),this.removeEventListener("touchend",this.onTouchEnd),window.removeEventListener("message",this.onMessage),document.removeEventListener("fullscreenchange",this.onFsChange),this.offChange?.(),this.offChange=null,this.controller?.dispose?.(),this.controller=null,this.chrome=null,this.channel?.destroy(),this.channel=null,this.mediaWireInterval!==null&&(clearInterval(this.mediaWireInterval),this.mediaWireInterval=null),this.playerObserver!==null&&(this.playerObserver.disconnect(),this.playerObserver=null),this.ownedMedia.clear(),this.audienceMediaUnlockButton?.remove(),this.audienceMediaUnlockButton=null,this.audienceMutedPlaybackKeys.clear(),this.blockedAudienceMedia.clear(),this.presenterInterval!==null&&(clearInterval(this.presenterInterval),this.presenterInterval=null),this.clearPresenterPositionTimers()}__setControllerForTest(e){this.bindController(e)}present(){if(this.resolveMode()==="audience"||this.getAttribute("data-hf-presenting")==="true")return;let e=new URL(location.href);if(e.searchParams.set("mode","audience"),!this.openAudienceTab(e.href)){console.warn("[hyperframes-slideshow] present(): browser blocked the audience tab");return}this.setAttribute("data-hf-presenting","true"),this.postCurrentPresenterPositionBurst(),this.presenterStartMs=Date.now(),this.presenterInterval===null&&(this.presenterInterval=setInterval(()=>this.updateElapsed(),1e3)),this.render()}openAudienceTab(e){let t=navigator.userActivation;if(t&&t.isActive===!1)return!1;let i=document.createElement("a");return i.href=e,i.target="_blank",i.rel="noopener noreferrer",i.style.display="none",(document.body??document.documentElement).appendChild(i),i.click(),i.remove(),!0}updateElapsed(){if(this.presenterStartMs===null)return;let e=this.chrome?.querySelector("[data-hf-presenter-elapsed]");e&&(e.textContent=T(Math.floor((Date.now()-this.presenterStartMs)/1e3)))}initChannel(){this.resolveMode()==="audience"?this.channel=new m("audience",t=>{this.controller&&this.controller.syncTo?.(t.sequenceId,t.slideIndex,t.fragmentIndex)},this.onRemoteMedia):this.channel=new m("presenter",()=>{},this.onRemoteMedia)}async init(){if(this.initInFlight)return;this.initInFlight=!0;let e=this.initGeneration;try{let t=D(this);if(t.kind==="incomplete"){this.retryInitWhenParsed(e);return}let{player:i,manifest:r}=t;if(this.renderInitialChrome(r),!Te(i)||(await Re(i),e!==this.initGeneration))return;this.attachIframeKeyForwarding(i);let s=await Fe(i,2500,()=>e!==this.initGeneration);if(e!==this.initGeneration)return;let{resolved:a,errors:d}=L(r,s);d.length>0&&console.warn("[hyperframes-slideshow] manifest errors:",d);let o=K(a);o.slides.length===0&&r.slides.length>0&&console.error("[hyperframes-slideshow] no main-line slides resolved. The scene timeline may not have loaded in time, or sceneIds/timing are invalid:",d);let l={seek:u=>i.seek(u),play:()=>i.play(),pause:()=>i.pause(),stopMedia:()=>{i.stopMedia?.(),this.stopDocumentMedia()},playSceneMedia:u=>this.playSceneDocumentMedia(u),get currentTime(){return i.currentTime},onTimeUpdate:u=>{let p=c=>{let M=c.detail;u(M.currentTime)};return i.addEventListener("timeupdate",p),()=>i.removeEventListener("timeupdate",p)}};this.bindController(new y(l,o)),s.length===0&&r.slides.length>0&&i.addEventListener("scenes",()=>{e===this.initGeneration&&this.init()},{once:!0})}finally{this.initInFlight=!1}}retryInitWhenParsed(e){if(this.initRetry!==null||!B(document.readyState))return;let t=()=>{this.initRetry=null,e===this.initGeneration&&this.isConnected&&!this.disconnected&&this.init()};this.initRetry=t,document.addEventListener("DOMContentLoaded",t,{once:!0})}renderInitialChrome(e){if(this.controller||e.slides.length===0)return;let t={index:1,total:e.slides.length};if(this.resolveMode()==="audience"){this.paintChrome(this.buildNavCluster(t,"28px","fs-only"));return}this.paintChrome(this.buildNavCluster(t,"28px","full",{canPrev:!1,canNext:e.slides.length>1,loading:e.slides.length>1}))}bindController(e){this.offChange?.(),this.controller?.dispose?.(),this.controller=e,this.startMediaSync(),this.offChange=e.onChange(()=>{this.resolveMode()!=="audience"&&this.channel&&this.channel.postPosition(e.position),this.render()}),this.resolveMode()!=="audience"&&this.channel&&this.channel.postPosition(e.position),this.render()}postCurrentPresenterPosition(){this.resolveMode()==="audience"||!this.channel||!this.controller||this.channel.postPosition(this.controller.position)}postCurrentPresenterPositionBurst(){this.clearPresenterPositionTimers(),this.postCurrentPresenterPosition();for(let e of[250,750,1500,3e3,5e3]){let t=setTimeout(()=>{this.presenterPositionTimers=this.presenterPositionTimers.filter(i=>i!==t),this.postCurrentPresenterPosition()},e);this.presenterPositionTimers.push(t)}}clearPresenterPositionTimers(){for(let e of this.presenterPositionTimers)clearTimeout(e);this.presenterPositionTimers=[]}startMediaSync(){this.wireSlideshowMedia(),this.mediaWireInterval===null&&(this.mediaWireInterval=setInterval(()=>this.wireSlideshowMedia(),1e3))}mediaPlayerElements(){return Array.from(this.querySelectorAll("hyperframes-player")).filter(e=>e instanceof HTMLElement)}ensureInteractivePlayers(){for(let e of this.querySelectorAll("hyperframes-player"))e.hasAttribute("interactive")||e.setAttribute("interactive","")}observeInteractivePlayers(){typeof MutationObserver>"u"||this.playerObserver===null&&(this.playerObserver=new MutationObserver(()=>this.ensureInteractivePlayers()),this.playerObserver.observe(this,{childList:!0,subtree:!0}))}attachIframeKeyForwarding(e){let t=e.iframeElement;if(!(t instanceof HTMLIFrameElement)||t===this.keyForwardFrame)return;this.detachIframeKeys?.();let i=()=>{try{t.contentWindow?.addEventListener("keydown",this.onKey)}catch{this.warnIframeKeyForwardingUnavailable()}};i(),t.addEventListener("load",i),this.keyForwardFrame=t,this.detachIframeKeys=()=>{t.removeEventListener("load",i);try{t.contentWindow?.removeEventListener("keydown",this.onKey)}catch{this.warnIframeKeyForwardingUnavailable()}this.keyForwardFrame=null,this.detachIframeKeys=null}}warnIframeKeyForwardingUnavailable(){this.warnedIframeKeyForwardingUnavailable||(this.warnedIframeKeyForwardingUnavailable=!0,console.warn("[hyperframes-slideshow] iframe keyboard forwarding is unavailable for this composition, likely because the player iframe is cross-origin. Arrow shortcuts work when focus is outside the iframe."))}playerFrameDocument(e){let t=e.iframeElement;if(!(t instanceof HTMLIFrameElement))return null;try{return t.contentDocument}catch{return null}}mediaKey(e,t,i,r){let s=e.id?`player-id:${e.id}`:`player:${t}`,a=i.id?`id:${i.id}`:`${i.tagName.toLowerCase()}:${r}`;return`${s}|${a}`}mediaEntries(){let e=[];return this.mediaPlayerElements().forEach((t,i)=>{let r=this.playerFrameDocument(t);r&&Array.from(r.querySelectorAll("video,audio")).filter(Le).forEach((s,a)=>{e.push({key:this.mediaKey(t,i,s,a),el:s})})}),e}wireSlideshowMedia(){let e=this.ownedMedia.sync(this.mediaEntries());for(let t of e)t.muted=this._muted||t.defaultMuted}publishMediaState(e,t,i){if(!(this.applyingRemoteMedia||this.resolveMode()==="audience"||!this.channel)){if(i==="timeupdate"){let r=performance.now();if(r-this.lastMediaTimeBroadcastMs<450&&!e.paused)return;this.lastMediaTimeBroadcastMs=r}this.channel.postMedia({key:t,action:i,currentTime:v(e.currentTime,0),paused:e.paused,ended:e.ended,muted:e.muted,volume:v(e.volume,1),playbackRate:v(e.playbackRate,1)})}}onRemoteMedia=e=>{if(this.resolveMode()!=="audience")return;if(this.blockedAudienceMedia.has(e.key)&&e.action==="timeupdate"){this.blockedAudienceMedia.set(e.key,e),this.showAudienceMediaUnlock();return}this.wireSlideshowMedia();let t=this.mediaEntries().find(i=>i.key===e.key);if(t){this.applyingRemoteMedia=!0;try{this.applyRemoteMedia(t.el,e)}finally{setTimeout(()=>{this.applyingRemoteMedia=!1},300)}}};applyRemoteMedia(e,t){if(t.action==="pause"||t.action==="ended"){this.audienceMutedPlaybackKeys.delete(t.key),this.blockedAudienceMedia.delete(t.key),this.syncRemoteMediaState(e,t,!0),e.pause(),this.hideAudienceMediaUnlockIfClear();return}if(t.action==="play"||t.action==="timeupdate"&&t.paused===!1&&e.paused){this.playAudienceMediaMuted(e,t);return}this.syncRemoteMediaState(e,t,!0)}syncRemoteMediaState(e,t,i){e.playbackRate=v(t.playbackRate,1),e.volume=Math.max(0,Math.min(1,v(t.volume,1))),e.muted=this.audienceMutedPlaybackKeys.has(t.key)?!0:t.muted,i&&Number.isFinite(t.currentTime)&&Math.abs((e.currentTime||0)-t.currentTime)>.35&&(e.currentTime=N(Math.max(0,t.currentTime)))}playAudienceMediaMuted(e,t){this.audienceMutedPlaybackKeys.add(t.key),this.syncRemoteMediaState(e,t,!0),e.muted=!0;try{e.play().then(()=>{this.blockedAudienceMedia.delete(t.key),this.hideAudienceMediaUnlockIfClear()}).catch(()=>{this.blockedAudienceMedia.set(t.key,t),this.showAudienceMediaUnlock()})}catch{this.blockedAudienceMedia.set(t.key,t),this.showAudienceMediaUnlock()}}retryBlockedAudienceMedia=()=>{this.wireSlideshowMedia();let e=new Map(this.mediaEntries().map(t=>[t.key,t.el]));for(let[t,i]of this.blockedAudienceMedia){let r=e.get(t);r&&this.playAudienceMediaMuted(r,i)}};showAudienceMediaUnlock(){if(this.resolveMode()!=="audience"||this.audienceMediaUnlockButton)return;let e=document.createElement("button");e.type="button",e.textContent="Play audience media muted",e.style.cssText="position:fixed;left:50%;bottom:96px;transform:translateX(-50%);z-index:100000;border:0;border-radius:999px;padding:12px 18px;background:#fff;color:#111827;box-shadow:0 10px 32px rgba(0,0,0,.28);font:700 14px/1 system-ui,sans-serif;cursor:pointer;pointer-events:auto;",e.addEventListener("click",this.retryBlockedAudienceMedia),this.appendChild(e),this.audienceMediaUnlockButton=e}hideAudienceMediaUnlockIfClear(){this.blockedAudienceMedia.size>0||!this.audienceMediaUnlockButton||(this.audienceMediaUnlockButton.remove(),this.audienceMediaUnlockButton=null)}onKey=e=>{if(Se(e.target))return;let t=document.activeElement,i=t===this||this.contains(t),r=document.querySelectorAll("hyperframes-slideshow").length>1,s=i||!r&&(t===document.body||t===null);if((e.key==="p"||e.key==="P")&&!e.metaKey&&!e.ctrlKey&&!e.altKey){if(!s||!this.shouldShowPresentControl())return;this.present(),e.preventDefault();return}if(this.controller){if(e.key==="ArrowRight"){if(!s)return;this.controller.next(),e.preventDefault()}else if(e.key==="ArrowLeft"){if(!s)return;this.controller.prev(),e.preventDefault()}else if(e.key===" "){if(!i)return;this.controller.next(),e.preventDefault()}else if(e.key==="Backspace"){if(!i)return;this.controller.prev(),e.preventDefault()}else if((e.key==="f"||e.key==="F")&&!e.metaKey&&!e.ctrlKey&&!e.altKey){if(!i)return;this.toggleFullscreen(),e.preventDefault()}}};onMessage=e=>{if(e.source!==window.parent&&e.source!==window||this.resolveMode()==="audience")return;let t=e.data;!t||!this.controller||(t.type==="next"?this.controller.next():t.type==="prev"?this.controller.prev():t.type==="goto"&&typeof t.slideIndex=="number"?this.controller.goToSlide?.(t.slideIndex):t.type==="back"&&this.controller.back?.())};onTouchStart=e=>{let t=e.touches[0];t&&(this.touchStartX=t.clientX,this.touchStartY=t.clientY)};onTouchEnd=e=>{if(!this.controller)return;let t=e.changedTouches[0];if(!t)return;let i=t.clientX-this.touchStartX,r=t.clientY-this.touchStartY;Math.abs(i)<=40||Math.abs(i)<=Math.abs(r)||(i<0?this.controller.next():this.controller.prev())};render(){if(!this.controller)return;if(this.resolveMode()==="audience"){let{counter:r}=this.controller;this.paintChrome(this.buildNavCluster(r,"28px","fs-only"));return}if(this.getAttribute("data-hf-presenting")==="true"){this.renderPresenter();return}let{counter:e,currentSlide:t}=this.controller;if(!t)return;let i=t.hotspots.map(r=>{let s=r.region?`left:${r.region.x}%;top:${r.region.y}%;`:"right:5%;bottom:18%;";return`<button
|
|
80
|
+
`,document.head.appendChild(n)}var q='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3H5a2 2 0 0 0-2 2v3M21 8V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3M16 21h3a2 2 0 0 0 2-2v-3"/></svg>',O='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3v3a2 2 0 0 1-2 2H3M21 8h-3a2 2 0 0 1-2-2V3M3 16h3a2 2 0 0 1 2 2v3M16 21v-3a2 2 0 0 1 2-2h3"/></svg>',Ae='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="13" rx="2"/><path d="M8 21h8"/><path d="M12 17v4"/><path d="M10 8.5v4l4-2-4-2z"/></svg>',Ce="Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",b=class extends HTMLElement{controller=null;offChange=null;chrome=null;touchStartX=0;touchStartY=0;channel=null;presenterStartMs=null;presenterInterval=null;presenterPositionTimers=[];disconnected=!1;initTimer=null;initRetry=null;initInFlight=!1;initGeneration=0;keyForwardFrame=null;detachIframeKeys=null;warnedIframeKeyForwardingUnavailable=!1;_muted=!1;mediaWireInterval=null;playerObserver=null;applyingRemoteMedia=!1;lastMediaTimeBroadcastMs=0;audienceMutedPlaybackKeys=new Set;blockedAudienceMedia=new Map;audienceMediaUnlockButton=null;autoplayToken=0;ownedMedia=new g(Se,(e,t,i)=>this.publishMediaState(e,t,i));get muted(){return this._muted}resolveMode(){let e=this.getAttribute("mode");if(e)return e;try{return new URLSearchParams(location.search).get("mode")}catch{return null}}static get observedAttributes(){return["sound","mode"]}attributeChangedCallback(){this.controller&&this.render()}connectedCallback(){this.disconnected=!1,this.initInFlight=!1,this.initGeneration+=1,this.tabIndex=0,window.addEventListener("keydown",this.onKey),this.addEventListener("touchstart",this.onTouchStart,{passive:!0}),this.addEventListener("touchend",this.onTouchEnd),window.addEventListener("message",this.onMessage),document.addEventListener("fullscreenchange",this.onFsChange),this.initChannel(),this.observeInteractivePlayers(),this.initTimer=setTimeout(()=>{this.initTimer=null,this.isConnected&&!this.disconnected&&(this.ensureInteractivePlayers(),this.init())},0)}disconnectedCallback(){this.disconnected=!0,this.initGeneration+=1,this.autoplayToken++,this.initTimer!==null&&(clearTimeout(this.initTimer),this.initTimer=null),this.initRetry!==null&&(document.removeEventListener("DOMContentLoaded",this.initRetry),this.initRetry=null),window.removeEventListener("keydown",this.onKey),this.detachIframeKeys?.(),this.removeEventListener("touchstart",this.onTouchStart),this.removeEventListener("touchend",this.onTouchEnd),window.removeEventListener("message",this.onMessage),document.removeEventListener("fullscreenchange",this.onFsChange),this.offChange?.(),this.offChange=null,this.controller?.dispose?.(),this.controller=null,this.chrome=null,this.channel?.destroy(),this.channel=null,this.mediaWireInterval!==null&&(clearInterval(this.mediaWireInterval),this.mediaWireInterval=null),this.playerObserver!==null&&(this.playerObserver.disconnect(),this.playerObserver=null),this.ownedMedia.clear(),this.audienceMediaUnlockButton?.remove(),this.audienceMediaUnlockButton=null,this.audienceMutedPlaybackKeys.clear(),this.blockedAudienceMedia.clear(),this.presenterInterval!==null&&(clearInterval(this.presenterInterval),this.presenterInterval=null),this.clearPresenterPositionTimers()}__setControllerForTest(e){this.bindController(e)}present(){if(this.resolveMode()==="audience"||this.getAttribute("data-hf-presenting")==="true")return;let e=new URL(location.href);if(e.searchParams.set("mode","audience"),!this.openAudienceTab(e.href)){console.warn("[hyperframes-slideshow] present(): browser blocked the audience tab");return}this.setAttribute("data-hf-presenting","true"),this.postCurrentPresenterPositionBurst(),this.presenterStartMs=Date.now(),this.presenterInterval===null&&(this.presenterInterval=setInterval(()=>this.updateElapsed(),1e3)),this.render()}openAudienceTab(e){let t=navigator.userActivation;if(t&&t.isActive===!1)return!1;let i=document.createElement("a");return i.href=e,i.target="_blank",i.rel="noopener noreferrer",i.style.display="none",(document.body??document.documentElement).appendChild(i),i.click(),i.remove(),!0}updateElapsed(){if(this.presenterStartMs===null)return;let e=this.chrome?.querySelector("[data-hf-presenter-elapsed]");e&&(e.textContent=T(Math.floor((Date.now()-this.presenterStartMs)/1e3)))}initChannel(){this.resolveMode()==="audience"?this.channel=new m("audience",t=>{this.controller&&this.controller.syncTo?.(t.sequenceId,t.slideIndex,t.fragmentIndex)},this.onRemoteMedia):this.channel=new m("presenter",()=>{},this.onRemoteMedia)}async init(){if(this.initInFlight)return;this.initInFlight=!0;let e=this.initGeneration;try{let t=D(this);if(t.kind==="incomplete"){this.retryInitWhenParsed(e);return}let{player:i,manifest:r}=t;if(this.renderInitialChrome(r),!Ee(i)||(await Fe(i),e!==this.initGeneration))return;this.attachIframeKeyForwarding(i);let s=await Ne(i,2500,()=>e!==this.initGeneration);if(e!==this.initGeneration)return;let{resolved:a,errors:d}=L(r,s);d.length>0&&console.warn("[hyperframes-slideshow] manifest errors:",d);let o=K(a);o.slides.length===0&&r.slides.length>0&&console.error("[hyperframes-slideshow] no main-line slides resolved. The scene timeline may not have loaded in time, or sceneIds/timing are invalid:",d);let l={seek:u=>i.seek(u),play:()=>i.play(),pause:()=>i.pause(),stopMedia:()=>{i.stopMedia?.(),this.stopDocumentMedia()},playSceneMedia:u=>this.playSceneDocumentMedia(u),get currentTime(){return i.currentTime},onTimeUpdate:u=>{let p=c=>{let M=c.detail;u(M.currentTime)};return i.addEventListener("timeupdate",p),()=>i.removeEventListener("timeupdate",p)}};this.bindController(new y(l,o)),s.length===0&&r.slides.length>0&&i.addEventListener("scenes",()=>{e===this.initGeneration&&this.init()},{once:!0})}finally{this.initInFlight=!1}}retryInitWhenParsed(e){if(this.initRetry!==null||!B(document.readyState))return;let t=()=>{this.initRetry=null,e===this.initGeneration&&this.isConnected&&!this.disconnected&&this.init()};this.initRetry=t,document.addEventListener("DOMContentLoaded",t,{once:!0})}renderInitialChrome(e){if(this.controller||e.slides.length===0)return;let t={index:1,total:e.slides.length};if(this.resolveMode()==="audience"){this.paintChrome(this.buildNavCluster(t,"28px","fs-only"));return}this.paintChrome(this.buildNavCluster(t,"28px","full",{canPrev:!1,canNext:e.slides.length>1,loading:e.slides.length>1}))}bindController(e){this.offChange?.(),this.controller?.dispose?.(),this.controller=e,this.startMediaSync(),this.offChange=e.onChange(()=>{this.resolveMode()!=="audience"&&this.channel&&this.channel.postPosition(e.position),this.render()}),this.resolveMode()!=="audience"&&this.channel&&this.channel.postPosition(e.position),this.render()}postCurrentPresenterPosition(){this.resolveMode()==="audience"||!this.channel||!this.controller||this.channel.postPosition(this.controller.position)}postCurrentPresenterPositionBurst(){this.clearPresenterPositionTimers(),this.postCurrentPresenterPosition();for(let e of[250,750,1500,3e3,5e3]){let t=setTimeout(()=>{this.presenterPositionTimers=this.presenterPositionTimers.filter(i=>i!==t),this.postCurrentPresenterPosition()},e);this.presenterPositionTimers.push(t)}}clearPresenterPositionTimers(){for(let e of this.presenterPositionTimers)clearTimeout(e);this.presenterPositionTimers=[]}startMediaSync(){this.wireSlideshowMedia(),this.mediaWireInterval===null&&(this.mediaWireInterval=setInterval(()=>this.wireSlideshowMedia(),1e3))}mediaPlayerElements(){return Array.from(this.querySelectorAll("hyperframes-player")).filter(e=>e instanceof HTMLElement)}ensureInteractivePlayers(){for(let e of this.querySelectorAll("hyperframes-player"))e.hasAttribute("interactive")||e.setAttribute("interactive","")}observeInteractivePlayers(){typeof MutationObserver>"u"||this.playerObserver===null&&(this.playerObserver=new MutationObserver(()=>this.ensureInteractivePlayers()),this.playerObserver.observe(this,{childList:!0,subtree:!0}))}attachIframeKeyForwarding(e){let t=e.iframeElement;if(!(t instanceof HTMLIFrameElement)||t===this.keyForwardFrame)return;this.detachIframeKeys?.();let i=()=>{try{t.contentWindow?.addEventListener("keydown",this.onKey)}catch{this.warnIframeKeyForwardingUnavailable()}};i(),t.addEventListener("load",i),this.keyForwardFrame=t,this.detachIframeKeys=()=>{t.removeEventListener("load",i);try{t.contentWindow?.removeEventListener("keydown",this.onKey)}catch{this.warnIframeKeyForwardingUnavailable()}this.keyForwardFrame=null,this.detachIframeKeys=null}}warnIframeKeyForwardingUnavailable(){this.warnedIframeKeyForwardingUnavailable||(this.warnedIframeKeyForwardingUnavailable=!0,console.warn("[hyperframes-slideshow] iframe keyboard forwarding is unavailable for this composition, likely because the player iframe is cross-origin. Arrow shortcuts work when focus is outside the iframe."))}playerFrameDocument(e){let t=e.iframeElement;if(!(t instanceof HTMLIFrameElement))return null;try{return t.contentDocument}catch{return null}}mediaKey(e,t,i,r){let s=e.id?`player-id:${e.id}`:`player:${t}`,a=i.id?`id:${i.id}`:`${i.tagName.toLowerCase()}:${r}`;return`${s}|${a}`}mediaEntries(){let e=[];return this.mediaPlayerElements().forEach((t,i)=>{let r=this.playerFrameDocument(t);r&&Array.from(r.querySelectorAll("video,audio")).filter($e).forEach((s,a)=>{e.push({key:this.mediaKey(t,i,s,a),el:s})})}),e}wireSlideshowMedia(){let e=this.ownedMedia.sync(this.mediaEntries());for(let t of e)t.muted=this._muted||t.defaultMuted}publishMediaState(e,t,i){if(!(this.applyingRemoteMedia||this.resolveMode()==="audience"||!this.channel)){if(i==="timeupdate"){let r=performance.now();if(r-this.lastMediaTimeBroadcastMs<450&&!e.paused)return;this.lastMediaTimeBroadcastMs=r}this.channel.postMedia({key:t,action:i,currentTime:v(e.currentTime,0),paused:e.paused,ended:e.ended,muted:e.muted,volume:v(e.volume,1),playbackRate:v(e.playbackRate,1)})}}onRemoteMedia=e=>{if(this.resolveMode()!=="audience")return;if(this.blockedAudienceMedia.has(e.key)&&e.action==="timeupdate"){this.blockedAudienceMedia.set(e.key,e),this.showAudienceMediaUnlock();return}this.wireSlideshowMedia();let t=this.mediaEntries().find(i=>i.key===e.key);if(t){this.applyingRemoteMedia=!0;try{this.applyRemoteMedia(t.el,e)}finally{setTimeout(()=>{this.applyingRemoteMedia=!1},300)}}};applyRemoteMedia(e,t){if(t.action==="pause"||t.action==="ended"){this.audienceMutedPlaybackKeys.delete(t.key),this.blockedAudienceMedia.delete(t.key),this.syncRemoteMediaState(e,t,!0),e.pause(),this.hideAudienceMediaUnlockIfClear();return}if(t.action==="play"||t.action==="timeupdate"&&t.paused===!1&&e.paused){this.playAudienceMediaMuted(e,t);return}this.syncRemoteMediaState(e,t,!0)}syncRemoteMediaState(e,t,i){e.playbackRate=v(t.playbackRate,1),e.volume=Math.max(0,Math.min(1,v(t.volume,1))),e.muted=this.audienceMutedPlaybackKeys.has(t.key)?!0:t.muted,i&&Number.isFinite(t.currentTime)&&Math.abs((e.currentTime||0)-t.currentTime)>.35&&(e.currentTime=N(Math.max(0,t.currentTime)))}playAudienceMediaMuted(e,t){this.audienceMutedPlaybackKeys.add(t.key),this.syncRemoteMediaState(e,t,!0),e.muted=!0;try{e.play().then(()=>{this.blockedAudienceMedia.delete(t.key),this.hideAudienceMediaUnlockIfClear()}).catch(()=>{this.blockedAudienceMedia.set(t.key,t),this.showAudienceMediaUnlock()})}catch{this.blockedAudienceMedia.set(t.key,t),this.showAudienceMediaUnlock()}}retryBlockedAudienceMedia=()=>{this.wireSlideshowMedia();let e=new Map(this.mediaEntries().map(t=>[t.key,t.el]));for(let[t,i]of this.blockedAudienceMedia){let r=e.get(t);r&&this.playAudienceMediaMuted(r,i)}};showAudienceMediaUnlock(){if(this.resolveMode()!=="audience"||this.audienceMediaUnlockButton)return;let e=document.createElement("button");e.type="button",e.textContent="Play audience media muted",e.style.cssText="position:fixed;left:50%;bottom:96px;transform:translateX(-50%);z-index:100000;border:0;border-radius:999px;padding:12px 18px;background:#fff;color:#111827;box-shadow:0 10px 32px rgba(0,0,0,.28);font:700 14px/1 system-ui,sans-serif;cursor:pointer;pointer-events:auto;",e.addEventListener("click",this.retryBlockedAudienceMedia),this.appendChild(e),this.audienceMediaUnlockButton=e}hideAudienceMediaUnlockIfClear(){this.blockedAudienceMedia.size>0||!this.audienceMediaUnlockButton||(this.audienceMediaUnlockButton.remove(),this.audienceMediaUnlockButton=null)}onKey=e=>{if(Te(e.target))return;let t=document.activeElement,i=t===this||this.contains(t),r=document.querySelectorAll("hyperframes-slideshow").length>1,s=i||!r&&(t===document.body||t===null);if((e.key==="p"||e.key==="P")&&!e.metaKey&&!e.ctrlKey&&!e.altKey){if(!s||!this.shouldShowPresentControl())return;this.present(),e.preventDefault();return}if(this.controller){if(e.key==="ArrowRight"){if(!s)return;this.controller.next(),e.preventDefault()}else if(e.key==="ArrowLeft"){if(!s)return;this.controller.prev(),e.preventDefault()}else if(e.key===" "){if(!i)return;this.controller.next(),e.preventDefault()}else if(e.key==="Backspace"){if(!i)return;this.controller.prev(),e.preventDefault()}else if((e.key==="f"||e.key==="F")&&!e.metaKey&&!e.ctrlKey&&!e.altKey){if(!i)return;this.toggleFullscreen(),e.preventDefault()}}};onMessage=e=>{if(e.source!==window.parent&&e.source!==window||this.resolveMode()==="audience")return;let t=e.data;!t||!this.controller||(t.type==="next"?this.controller.next():t.type==="prev"?this.controller.prev():t.type==="goto"&&typeof t.slideIndex=="number"?this.controller.goToSlide?.(t.slideIndex):t.type==="back"&&this.controller.back?.())};onTouchStart=e=>{let t=e.touches[0];t&&(this.touchStartX=t.clientX,this.touchStartY=t.clientY)};onTouchEnd=e=>{if(!this.controller)return;let t=e.changedTouches[0];if(!t)return;let i=t.clientX-this.touchStartX,r=t.clientY-this.touchStartY;Math.abs(i)<=40||Math.abs(i)<=Math.abs(r)||(i<0?this.controller.next():this.controller.prev())};render(){if(!this.controller)return;if(this.resolveMode()==="audience"){let{counter:r}=this.controller;this.paintChrome(this.buildNavCluster(r,"28px","fs-only"));return}if(this.getAttribute("data-hf-presenting")==="true"){this.renderPresenter();return}let{counter:e,currentSlide:t}=this.controller;if(!t)return;let i=t.hotspots.map(r=>{let s=r.region?`left:${r.region.x}%;top:${r.region.y}%;`:"right:5%;bottom:18%;";return`<button
|
|
81
81
|
class="hf-hotspot-pill"
|
|
82
82
|
data-hotspot-id="${h(r.id)}"
|
|
83
83
|
data-hotspot-target="${h(r.target)}"
|
|
84
84
|
type="button"
|
|
85
85
|
style="position:absolute;${s}display:inline-flex;align-items:center;gap:6px;padding:8px 14px;background:var(--hf-slideshow-accent,rgba(255,255,255,0.92));color:#111;border:none;border-radius:999px;font-size:13px;font-weight:600;letter-spacing:0.01em;cursor:pointer;pointer-events:auto;box-shadow:0 4px 16px rgba(0,0,0,0.35);animation:hf-hotspot-pulse 1.8s ease-in-out infinite;white-space:nowrap;"
|
|
86
86
|
aria-label="${h(r.label)}"
|
|
87
|
-
><span aria-hidden="true" style="font-size:14px;line-height:1;">\u2295</span>${h(r.label)}</button>`}).join("");this.paintChrome(i+this.buildNavCluster(e,"28px"))}paintChrome(e){
|
|
87
|
+
><span aria-hidden="true" style="font-size:14px;line-height:1;">\u2295</span>${h(r.label)}</button>`}).join("");this.paintChrome(i+this.buildNavCluster(e,"28px"))}paintChrome(e){Pe(),this.chrome||(this.chrome=document.createElement("div"),this.chrome.setAttribute("data-hf-chrome",""),this.appendChild(this.chrome)),this.chrome.style.cssText="position:absolute;inset:0;pointer-events:none;z-index:10;",this.chrome.innerHTML=e,this.wireChromeButtons()}buildNavCluster(e,t,i="full",r={}){let s=this.controller,a=r.canPrev??s?.canPrev??!0,d=r.canNext??s?.canNext??!0,o=r.loading===!0&&d,l=this.hasAttribute("sound"),u="display:flex;align-items:center;justify-content:center;width:34px;height:34px;background:transparent;border:none;border-radius:999px;color:rgba(255,255,255,0.85);font-size:16px;cursor:pointer;transition:background 0.15s,color 0.15s;padding:0;",M=l?`<button
|
|
88
88
|
data-hf-mute
|
|
89
89
|
type="button"
|
|
90
90
|
aria-label="${this._muted?"Unmute":"Mute"}"
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
aria-label="Present"
|
|
117
117
|
title="Present"
|
|
118
118
|
data-hf-tooltip="Present"
|
|
119
|
-
style="${u}" >${
|
|
119
|
+
style="${u}" >${Ae}</button>`:"",x=document.fullscreenElement===this,w=x?"Exit full screen":"Full screen",I=`<button
|
|
120
120
|
data-hf-fullscreen
|
|
121
121
|
type="button"
|
|
122
122
|
aria-label="${w}"
|
|
@@ -138,11 +138,11 @@
|
|
|
138
138
|
<span
|
|
139
139
|
data-hf-counter
|
|
140
140
|
aria-label="Slide ${e.index} of ${e.total}"
|
|
141
|
-
style="min-width:46px;text-align:center;color:rgba(255,255,255,0.9);font-family:${
|
|
141
|
+
style="min-width:46px;text-align:center;color:rgba(255,255,255,0.9);font-family:${Ce};font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:0;padding:0 ${V} 0 ${j};user-select:none;"
|
|
142
142
|
>${e.index} / ${e.total}</span>
|
|
143
143
|
${G}
|
|
144
144
|
<span aria-hidden="true" style="width:1px;height:20px;background:rgba(255,255,255,0.12);margin:0 2px;flex-shrink:0;"></span>
|
|
145
145
|
${W}
|
|
146
146
|
${I}
|
|
147
|
-
</div>`}wireChromeButtons(){let e=this.chrome;e&&(this.wireChromeClick(e,"[data-hf-mute]",()=>this.toggleMute()),this.wireChromeClick(e,"[data-hf-prev]",()=>this.controller?.prev()),this.wireChromeClick(e,"[data-hf-next]",()=>this.controller?.next()),this.wireChromeClick(e,"[data-hf-present]",()=>this.present()),this.wireChromeClick(e,"[data-hf-fullscreen]",()=>this.toggleFullscreen()),this.wirePresenterNotes(e),this.wireHotspots(e))}wireChromeClick(e,t,i){let r=e.querySelector(t);r&&r.addEventListener("click",i)}wirePresenterNotes(e){let t=e.querySelector("[data-hf-presenter-notes]");if(t instanceof HTMLTextAreaElement){let i=t.getAttribute("data-hf-presenter-notes-key");t.addEventListener("input",()=>this.writePresenterNotes(i,t.value))}}wireHotspots(e){for(let t of e.querySelectorAll("[data-hotspot-id]")){let i=t.getAttribute("data-hotspot-target")??"";t.addEventListener("click",()=>this.controller?.enterBranch?.(i))}}onFsChange=()=>{let e=this.chrome?.querySelector("[data-hf-fullscreen]");if(!e)return;let t=document.fullscreenElement===this;e.innerHTML=t?O:q;let i=t?"Exit full screen":"Full screen";e.setAttribute("aria-label",i),e.setAttribute("title",i),e.setAttribute("data-hf-tooltip",i),e.setAttribute("aria-pressed",t?"true":"false")};toggleFullscreen(){document.fullscreenElement===this?document.exitFullscreen().catch(()=>{}):this.requestFullscreen().catch(()=>{})}shouldShowPresentControl(){return this.resolveMode()!=="audience"&&this.getAttribute("data-hf-presenting")!=="true"}toggleMute(){this._muted=!this._muted,this._muted?this.setAttribute("data-hf-muted",""):this.removeAttribute("data-hf-muted"),this.applyGlobalMute(this._muted),this.dispatchEvent(new CustomEvent("hf-sound",{detail:{muted:this._muted},bubbles:!0,composed:!0})),this.render()}applyGlobalMute(e){for(let t of this.querySelectorAll("hyperframes-player")){if(!(t instanceof HTMLElement))continue;let i=t;"muted"in i?i.muted=e:e?i.setAttribute("muted",""):i.removeAttribute("muted")}this.ownedMedia.sync(this.mediaEntries()),this.ownedMedia.setMuted(e)}stopDocumentMedia(){this.autoplayToken++,this.ownedMedia.sync(this.mediaEntries()),this.ownedMedia.pauseAll()}playSceneDocumentMedia(e){if(this.resolveMode()==="audience")return;let t=e.replace(/["\\]/g,"\\$&"),i=++this.autoplayToken,r={started:!1,lastTime:-1,advancingTicks:0,waited:0,warned:!1},s=()=>{if(i!==this.autoplayToken)return;let a=this.stepAutoplay(t,r);r.waited+=H,!a&&r.waited<=
|
|
148
|
-
`)[0]??"":"";return e.length>0?`${h(n.sceneId)}: ${h(e)}`:h(n.sceneId)}function
|
|
147
|
+
</div>`}wireChromeButtons(){let e=this.chrome;e&&(this.wireChromeClick(e,"[data-hf-mute]",()=>this.toggleMute()),this.wireChromeClick(e,"[data-hf-prev]",()=>this.controller?.prev()),this.wireChromeClick(e,"[data-hf-next]",()=>this.controller?.next()),this.wireChromeClick(e,"[data-hf-present]",()=>this.present()),this.wireChromeClick(e,"[data-hf-fullscreen]",()=>this.toggleFullscreen()),this.wirePresenterNotes(e),this.wireHotspots(e))}wireChromeClick(e,t,i){let r=e.querySelector(t);r&&r.addEventListener("click",i)}wirePresenterNotes(e){let t=e.querySelector("[data-hf-presenter-notes]");if(t instanceof HTMLTextAreaElement){let i=t.getAttribute("data-hf-presenter-notes-key");t.addEventListener("input",()=>this.writePresenterNotes(i,t.value))}}wireHotspots(e){for(let t of e.querySelectorAll("[data-hotspot-id]")){let i=t.getAttribute("data-hotspot-target")??"";t.addEventListener("click",()=>this.controller?.enterBranch?.(i))}}onFsChange=()=>{let e=this.chrome?.querySelector("[data-hf-fullscreen]");if(!e)return;let t=document.fullscreenElement===this;e.innerHTML=t?O:q;let i=t?"Exit full screen":"Full screen";e.setAttribute("aria-label",i),e.setAttribute("title",i),e.setAttribute("data-hf-tooltip",i),e.setAttribute("aria-pressed",t?"true":"false")};toggleFullscreen(){document.fullscreenElement===this?document.exitFullscreen().catch(()=>{}):this.requestFullscreen().catch(()=>{})}shouldShowPresentControl(){return this.resolveMode()!=="audience"&&this.getAttribute("data-hf-presenting")!=="true"}toggleMute(){this._muted=!this._muted,this._muted?this.setAttribute("data-hf-muted",""):this.removeAttribute("data-hf-muted"),this.applyGlobalMute(this._muted),this.dispatchEvent(new CustomEvent("hf-sound",{detail:{muted:this._muted},bubbles:!0,composed:!0})),this.render()}applyGlobalMute(e){for(let t of this.querySelectorAll("hyperframes-player")){if(!(t instanceof HTMLElement))continue;let i=t;"muted"in i?i.muted=e:e?i.setAttribute("muted",""):i.removeAttribute("muted")}this.ownedMedia.sync(this.mediaEntries()),this.ownedMedia.setMuted(e)}stopDocumentMedia(){this.autoplayToken++,this.ownedMedia.sync(this.mediaEntries()),this.ownedMedia.pauseAll()}playSceneDocumentMedia(e){if(this.resolveMode()==="audience")return;let t=e.replace(/["\\]/g,"\\$&"),i=++this.autoplayToken,r={started:!1,lastTime:-1,advancingTicks:0,waited:0,warned:!1},s=()=>{if(i!==this.autoplayToken)return;let a=this.stepAutoplay(t,r);r.waited+=H,!a&&r.waited<=ke&&window.setTimeout(s,H)};s()}findSceneVideo(e){for(let t of this.mediaPlayerElements()){let r=this.playerFrameDocument(t)?.querySelector(`[data-composition-id="${e}"] video`)??null;if(r instanceof HTMLVideoElement)return r}return null}stepAutoplay(e,t){let i=this.findSceneVideo(e);if(!i)return!1;if(!t.started){t.started=!0,i.muted=this._muted||i.defaultMuted;try{i.currentTime=0}catch{}}let r=!i.paused&&i.currentTime>t.lastTime;return t.lastTime=i.currentTime,r?++t.advancingTicks>=2:(t.advancingTicks=0,i.play().catch(s=>{let a=s instanceof DOMException?s.name:"";a!=="AbortError"&&a!=="NotAllowedError"&&!t.warned&&(t.warned=!0,console.warn("[hyperframes-slideshow] autoplay play() failed:",s))}),!1)}presenterNotesDeckKey(){let e=this.getAttribute("notes-storage-key")?.trim();if(e)return e;let t=this.querySelector("hyperframes-player")?.getAttribute("src")??"",i=t;try{let a=typeof location<"u"?location.href:"http://localhost/";i=new URL(t,a).href}catch{}let r=typeof location<"u"?`${location.origin}${location.pathname}`:"",s=this.ownerDocument.title;return`${r}|${s}|${i}`}presenterNotesStorageKey(e){let t=this.controller?.position;return t?`${Ie}${JSON.stringify([this.presenterNotesDeckKey(),t.sequenceId,t.slideIndex,e.sceneId??""])}`:null}readPresenterNotes(e){if(!e||typeof window>"u")return null;try{return window.localStorage.getItem(e)}catch{return null}}writePresenterNotes(e,t){if(e&&!(typeof window>"u"))try{window.localStorage.setItem(e,t)}catch{}}renderPresenter(){if(!this.controller)return;let{counter:e,currentSlide:t,nextSlide:i}=this.controller;if(!t)return;let r=this.presenterStartMs!==null?Math.floor((Date.now()-this.presenterStartMs)/1e3):0,s=this.querySelector("hyperframes-player");s instanceof HTMLElement&&(s.style.top="0",s.style.bottom="32%",s.style.height="auto");let a=this.presenterNotesStorageKey(t),d=this.readPresenterNotes(a)??t.notes??"";this.paintChrome(F({notes:d,notesStorageKey:a,nextText:Le(i),counterText:`${e.index} / ${e.total}`,elapsedText:T(r),hotspots:t.hotspots})+this.buildNavCluster(e,"calc(32% + 18px)"))}};function Le(n){if(n===null)return"End of sequence";let e=n.notes!=null?n.notes.split(`
|
|
148
|
+
`)[0]??"":"";return e.length>0?`${h(n.sceneId)}: ${h(e)}`:h(n.sceneId)}function $e(n){let e=n.ownerDocument.defaultView;return!e||typeof e.HTMLMediaElement!="function"?!1:n instanceof e.HTMLMediaElement}function v(n,e){return Number.isFinite(n)?n:e}function E(n){return"scenes"in n&&Array.isArray(n.scenes)?n.scenes:[]}var Re=5e3;function Fe(n){return n.ready===!0?Promise.resolve():new Promise(e=>{let t=null,i=()=>{t!==null&&(clearTimeout(t),t=null),e()};n.addEventListener("ready",i,{once:!0}),t=setTimeout(()=>{n.removeEventListener("ready",i),e()},Re)})}function Ne(n,e,t=()=>!1){let i=E(n);if(i.length>0)return Promise.resolve(i);let r=Math.ceil(e/100);return new Promise(s=>{let a=!1,d=null,o=0,l=c=>{a||(a=!0,d!==null&&clearTimeout(d),n.removeEventListener("scenes",u),s(c))},u=()=>{if(t())return l([]);let c=E(n);c.length>0&&l(c)},p=()=>{if(a)return;if(t())return l([]);let c=E(n);if(c.length>0)return l(c);if(o+=1,o>=r)return l([]);d=setTimeout(p,100)};n.addEventListener("scenes",u),d=setTimeout(p,100)})}function K(n){let e=r=>r.end>r.start,t=n.slides.filter(e),i={};for(let[r,s]of Object.entries(n.sequences))i[r]={...s,slides:s.slides.filter(e)};return{slides:t,sequences:i}}function h(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}customElements.get("hyperframes-slideshow")||customElements.define("hyperframes-slideshow",b);return ee(He);})();
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
currentRecords,
|
|
9
|
+
indexPath
|
|
10
|
+
} from "./chunk-DY7PQLIE.js";
|
|
11
|
+
import "./chunk-M2WBOQ2Q.js";
|
|
12
|
+
|
|
13
|
+
// src/media-use/lib/index-gen.mjs
|
|
14
|
+
import { writeFileSync, mkdirSync } from "fs";
|
|
15
|
+
import { dirname } from "path";
|
|
16
|
+
function pad(str, len) {
|
|
17
|
+
return String(str ?? "").padEnd(len);
|
|
18
|
+
}
|
|
19
|
+
function formatDur(record) {
|
|
20
|
+
if (record.duration == null) return "\u2014";
|
|
21
|
+
return `${record.duration}s`;
|
|
22
|
+
}
|
|
23
|
+
function formatDims(record) {
|
|
24
|
+
if (record.width && record.height) return `${record.width}\xD7${record.height}`;
|
|
25
|
+
if (record.type === "icon" && record.transparent) return "svg";
|
|
26
|
+
return "\u2014";
|
|
27
|
+
}
|
|
28
|
+
function generateIndexContent(records) {
|
|
29
|
+
const count = records.length;
|
|
30
|
+
const header = `# .media \xB7 ${count} asset${count === 1 ? "" : "s"}
|
|
31
|
+
`;
|
|
32
|
+
if (count === 0) return header;
|
|
33
|
+
const cols = { id: 4, type: 5, dur: 4, dims: 5, path: 5, desc: 11 };
|
|
34
|
+
for (const r of records) {
|
|
35
|
+
cols.id = Math.max(cols.id, (r.id ?? "").length);
|
|
36
|
+
cols.type = Math.max(cols.type, (r.type ?? "").length);
|
|
37
|
+
cols.dur = Math.max(cols.dur, formatDur(r).length);
|
|
38
|
+
cols.dims = Math.max(cols.dims, formatDims(r).length);
|
|
39
|
+
cols.path = Math.max(cols.path, (r.path ?? "").length);
|
|
40
|
+
}
|
|
41
|
+
const heading = pad("id", cols.id + 2) + pad("type", cols.type + 2) + pad("dur", cols.dur + 2) + pad("dims", cols.dims + 2) + pad("path", cols.path + 2) + "description";
|
|
42
|
+
const lines = [header, heading];
|
|
43
|
+
for (const r of records) {
|
|
44
|
+
lines.push(
|
|
45
|
+
pad(r.id, cols.id + 2) + pad(r.type, cols.type + 2) + pad(formatDur(r), cols.dur + 2) + pad(formatDims(r), cols.dims + 2) + pad(r.path, cols.path + 2) + (r.description ?? "")
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return lines.join("\n") + "\n";
|
|
49
|
+
}
|
|
50
|
+
function regenerateIndex(projectDir) {
|
|
51
|
+
const records = currentRecords(projectDir);
|
|
52
|
+
const content = generateIndexContent(records);
|
|
53
|
+
const p = indexPath(projectDir);
|
|
54
|
+
mkdirSync(dirname(p), { recursive: true });
|
|
55
|
+
writeFileSync(p, content);
|
|
56
|
+
return content;
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
generateIndexContent,
|
|
60
|
+
regenerateIndex
|
|
61
|
+
};
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-ZBAF6L74.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveProject
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SNFVQDKE.js";
|
|
13
13
|
import {
|
|
14
14
|
formatBytes,
|
|
15
15
|
label
|
|
16
16
|
} from "./chunk-5ZBMHUY2.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-LAIGIOEA.js";
|
|
18
|
+
import "./chunk-45UOXUUH.js";
|
|
19
19
|
import "./chunk-PXVQOMKL.js";
|
|
20
20
|
import "./chunk-EQGKUPBJ.js";
|
|
21
21
|
import "./chunk-VLA6UJGH.js";
|
|
@@ -27,10 +27,11 @@ import "./chunk-54HJ63Q2.js";
|
|
|
27
27
|
import {
|
|
28
28
|
c
|
|
29
29
|
} from "./chunk-2GICKZ3I.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-OWFSGDQS.js";
|
|
31
|
+
import "./chunk-MEJH7VEA.js";
|
|
31
32
|
import {
|
|
32
33
|
isHtmlElement
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-UQECNXFA.js";
|
|
34
35
|
import "./chunk-VC76R6W2.js";
|
|
35
36
|
import "./chunk-OFQWTKPW.js";
|
|
36
37
|
import "./chunk-RQVDTPGD.js";
|
|
@@ -40,21 +41,21 @@ import "./chunk-LAGZGKKN.js";
|
|
|
40
41
|
import "./chunk-CZGHFATT.js";
|
|
41
42
|
import {
|
|
42
43
|
readDataDurationSeconds
|
|
43
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-C2KEGBR3.js";
|
|
44
45
|
import {
|
|
45
46
|
CANVAS_DIMENSIONS,
|
|
46
47
|
parseHtml
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-T5ELONXY.js";
|
|
48
49
|
import "./chunk-FR7YBU3H.js";
|
|
49
50
|
import "./chunk-DPVXBVLL.js";
|
|
50
51
|
import "./chunk-GWTIFRF5.js";
|
|
51
52
|
import "./chunk-2RY2LWAA.js";
|
|
52
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-EPQC3FGZ.js";
|
|
53
54
|
import "./chunk-WC4MTXGN.js";
|
|
54
55
|
import "./chunk-FBN2M2HK.js";
|
|
55
56
|
import {
|
|
56
57
|
withMeta
|
|
57
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-K5GMPWMG.js";
|
|
58
59
|
import "./chunk-BR2JQQC5.js";
|
|
59
60
|
import "./chunk-BLBMPEBX.js";
|
|
60
61
|
import "./chunk-ISN5GRYI.js";
|
|
@@ -62,7 +63,7 @@ import "./chunk-SJGE5I5F.js";
|
|
|
62
63
|
import "./chunk-DP5LF7GF.js";
|
|
63
64
|
import "./chunk-J3RXEDR2.js";
|
|
64
65
|
import "./chunk-QBXDU24O.js";
|
|
65
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-P5QGZMGC.js";
|
|
66
67
|
import "./chunk-E63BDV4Z.js";
|
|
67
68
|
import "./chunk-G7VEYUZ2.js";
|
|
68
69
|
import "./chunk-XT6MXC7A.js";
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
gateRegistryItemsCompatibility
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BDEBKAD2.js";
|
|
10
10
|
import {
|
|
11
11
|
copyDirSync
|
|
12
12
|
} from "./chunk-CIWX5UKC.js";
|
|
@@ -23,19 +23,20 @@ import {
|
|
|
23
23
|
} from "./chunk-26AQTUU4.js";
|
|
24
24
|
import {
|
|
25
25
|
initialModelForLanguage
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-44IPXXSK.js";
|
|
27
|
+
import "./chunk-SWC3QIEH.js";
|
|
28
|
+
import "./chunk-LV5AVW6U.js";
|
|
29
29
|
import {
|
|
30
30
|
DEFAULT_MODEL,
|
|
31
31
|
hasFFmpeg
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-CXEU6XNL.js";
|
|
33
|
+
import "./chunk-RZ6CXJ56.js";
|
|
33
34
|
import "./chunk-R4EWRIDL.js";
|
|
34
35
|
import {
|
|
35
36
|
findFFmpeg,
|
|
36
37
|
findFFprobe,
|
|
37
38
|
getFFmpegInstallHint
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-WWOHLNFO.js";
|
|
39
40
|
import "./chunk-UOFAE5RF.js";
|
|
40
41
|
import {
|
|
41
42
|
TRANSCRIPT_FILE
|
|
@@ -49,20 +50,20 @@ import {
|
|
|
49
50
|
listRegistryItems,
|
|
50
51
|
loadAllItems,
|
|
51
52
|
resolveItemWithDependencies
|
|
52
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-MUHOFRGW.js";
|
|
53
54
|
import "./chunk-JHOCK3DG.js";
|
|
54
55
|
import {
|
|
55
56
|
installItem
|
|
56
|
-
} from "./chunk-
|
|
57
|
-
import "./chunk-
|
|
57
|
+
} from "./chunk-IQ7FABPU.js";
|
|
58
|
+
import "./chunk-IJI2JNN7.js";
|
|
58
59
|
import "./chunk-AWDFDFI3.js";
|
|
59
60
|
import "./chunk-P6LJ4Y32.js";
|
|
60
61
|
import "./chunk-T2WJO4XM.js";
|
|
61
62
|
import "./chunk-A4ZTSQLW.js";
|
|
62
63
|
import {
|
|
63
64
|
trackInitTemplate
|
|
64
|
-
} from "./chunk-
|
|
65
|
-
import "./chunk-
|
|
65
|
+
} from "./chunk-LAIGIOEA.js";
|
|
66
|
+
import "./chunk-45UOXUUH.js";
|
|
66
67
|
import "./chunk-PXVQOMKL.js";
|
|
67
68
|
import "./chunk-EQGKUPBJ.js";
|
|
68
69
|
import "./chunk-VLA6UJGH.js";
|
|
@@ -78,16 +79,17 @@ import {
|
|
|
78
79
|
c,
|
|
79
80
|
isColorSupported
|
|
80
81
|
} from "./chunk-2GICKZ3I.js";
|
|
81
|
-
import "./chunk-
|
|
82
|
+
import "./chunk-4XQQQ4KN.js";
|
|
82
83
|
import "./chunk-Z5J67X44.js";
|
|
83
84
|
import "./chunk-5S7W3TUO.js";
|
|
84
85
|
import {
|
|
85
86
|
decodableAudioStream
|
|
86
87
|
} from "./chunk-D3MUHMFG.js";
|
|
87
|
-
import "./chunk-
|
|
88
|
+
import "./chunk-FKBWONRY.js";
|
|
88
89
|
import "./chunk-YWRUQ7XZ.js";
|
|
89
|
-
import "./chunk-
|
|
90
|
-
import "./chunk-
|
|
90
|
+
import "./chunk-OWFSGDQS.js";
|
|
91
|
+
import "./chunk-MEJH7VEA.js";
|
|
92
|
+
import "./chunk-UQECNXFA.js";
|
|
91
93
|
import "./chunk-VC76R6W2.js";
|
|
92
94
|
import "./chunk-OFQWTKPW.js";
|
|
93
95
|
import "./chunk-RQVDTPGD.js";
|
|
@@ -100,23 +102,23 @@ import "./chunk-KGPLIH7B.js";
|
|
|
100
102
|
import "./chunk-LAGZGKKN.js";
|
|
101
103
|
import "./chunk-K4MJX7SR.js";
|
|
102
104
|
import "./chunk-WE42NVH7.js";
|
|
103
|
-
import "./chunk-
|
|
105
|
+
import "./chunk-HT3D5AKG.js";
|
|
106
|
+
import "./chunk-HYRPH6LL.js";
|
|
107
|
+
import "./chunk-AKMY4QVI.js";
|
|
104
108
|
import "./chunk-CZGHFATT.js";
|
|
105
|
-
import "./chunk-
|
|
106
|
-
import "./chunk-PBNWRWKA.js";
|
|
107
|
-
import "./chunk-KSC4O2RY.js";
|
|
109
|
+
import "./chunk-C2KEGBR3.js";
|
|
108
110
|
import {
|
|
109
111
|
CANVAS_DIMENSIONS,
|
|
110
112
|
HTML_BODY_CSS_HEIGHT_FIRST_RE,
|
|
111
113
|
HTML_BODY_CSS_WIDTH_FIRST_RE,
|
|
112
114
|
VIEWPORT_META_SIZE_RE,
|
|
113
115
|
normalizeResolutionFlag
|
|
114
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-T5ELONXY.js";
|
|
115
117
|
import "./chunk-FR7YBU3H.js";
|
|
116
118
|
import "./chunk-DPVXBVLL.js";
|
|
117
119
|
import "./chunk-GWTIFRF5.js";
|
|
118
120
|
import "./chunk-2RY2LWAA.js";
|
|
119
|
-
import "./chunk-
|
|
121
|
+
import "./chunk-EPQC3FGZ.js";
|
|
120
122
|
import "./chunk-WC4MTXGN.js";
|
|
121
123
|
import "./chunk-FBN2M2HK.js";
|
|
122
124
|
import "./chunk-BR2JQQC5.js";
|
|
@@ -134,7 +136,7 @@ import {
|
|
|
134
136
|
import "./chunk-QBXDU24O.js";
|
|
135
137
|
import {
|
|
136
138
|
VERSION
|
|
137
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-P5QGZMGC.js";
|
|
138
140
|
import "./chunk-E63BDV4Z.js";
|
|
139
141
|
import "./chunk-G7VEYUZ2.js";
|
|
140
142
|
import "./chunk-XT6MXC7A.js";
|
|
@@ -558,7 +560,7 @@ async function finishScaffold(destDir, templateId, tailwind) {
|
|
|
558
560
|
if (existsSync2(transcriptFile)) await patchTranscript(destDir, transcriptFile);
|
|
559
561
|
}
|
|
560
562
|
async function patchTranscript(dir, transcriptPath) {
|
|
561
|
-
const { loadTranscript, patchCaptionHtml } = await import("./normalize-
|
|
563
|
+
const { loadTranscript, patchCaptionHtml } = await import("./normalize-MBNGRVQA.js");
|
|
562
564
|
const { words } = loadTranscript(transcriptPath);
|
|
563
565
|
if (words.length === 0) return;
|
|
564
566
|
patchCaptionHtml(dir, words);
|
|
@@ -718,7 +720,7 @@ async function scaffoldProject(destDir, name, templateId, media, tailwind = fals
|
|
|
718
720
|
"utf-8"
|
|
719
721
|
);
|
|
720
722
|
if (!existsSync2(resolve(destDir, "hyperframes.json"))) {
|
|
721
|
-
const { createProjectConfig, DEFAULT_PROJECT_CONFIG } = await import("./projectConfig-
|
|
723
|
+
const { createProjectConfig, DEFAULT_PROJECT_CONFIG } = await import("./projectConfig-WXCB5AZE.js");
|
|
722
724
|
const { normalizeSkillSlug } = await import("./skill-ZHVLH7KX.js");
|
|
723
725
|
const skill = normalizeSkillSlug(authoringSkill);
|
|
724
726
|
createProjectConfig(
|
|
@@ -739,7 +741,7 @@ async function scaffoldProject(destDir, name, templateId, media, tailwind = fals
|
|
|
739
741
|
}
|
|
740
742
|
}
|
|
741
743
|
async function keepSkillsCurrent(destDir) {
|
|
742
|
-
const { updateSkills } = await import("./skills-
|
|
744
|
+
const { updateSkills } = await import("./skills-FTZZJGAB.js");
|
|
743
745
|
console.log();
|
|
744
746
|
console.log(c.bold("Checking AI coding skills against GitHub..."));
|
|
745
747
|
try {
|
|
@@ -935,17 +937,17 @@ var init_default = defineCommand({
|
|
|
935
937
|
if (audioPath) {
|
|
936
938
|
sourceFilePath2 = audioPath;
|
|
937
939
|
copyFileSync(audioPath, resolve(destDir2, basename(audioPath)));
|
|
938
|
-
const { getMediaDurationSeconds } = await import("./transcribe-
|
|
940
|
+
const { getMediaDurationSeconds } = await import("./transcribe-HA4UGLKO.js");
|
|
939
941
|
videoDuration2 = getMediaDurationSeconds(audioPath) ?? void 0;
|
|
940
942
|
console.log(`Audio: ${basename(audioPath)}`);
|
|
941
943
|
}
|
|
942
944
|
if (sourceFilePath2 && !skipTranscribe) {
|
|
943
945
|
try {
|
|
944
|
-
const { ensureWhisper, ensureModel } = await import("./manager-
|
|
946
|
+
const { ensureWhisper, ensureModel } = await import("./manager-SFL6GLYX.js");
|
|
945
947
|
await ensureWhisper();
|
|
946
948
|
await ensureModel(initialTranscriptionModel);
|
|
947
949
|
console.log("Transcribing...");
|
|
948
|
-
const { transcribe: runTranscribe } = await import("./transcribe-
|
|
950
|
+
const { transcribe: runTranscribe } = await import("./transcribe-HA4UGLKO.js");
|
|
949
951
|
const result = await runTranscribe(sourceFilePath2, destDir2, {
|
|
950
952
|
model: modelFlag,
|
|
951
953
|
language: languageFlag
|
|
@@ -1091,7 +1093,7 @@ var init_default = defineCommand({
|
|
|
1091
1093
|
mkdirSync(destDir, { recursive: true });
|
|
1092
1094
|
sourceFilePath = audioPath;
|
|
1093
1095
|
copyFileSync(audioPath, resolve(destDir, basename(audioPath)));
|
|
1094
|
-
const { getMediaDurationSeconds } = await import("./transcribe-
|
|
1096
|
+
const { getMediaDurationSeconds } = await import("./transcribe-HA4UGLKO.js");
|
|
1095
1097
|
videoDuration = getMediaDurationSeconds(audioPath) ?? void 0;
|
|
1096
1098
|
R.info(`Audio copied to ${c.accent(basename(audioPath))}`);
|
|
1097
1099
|
}
|
|
@@ -1101,7 +1103,7 @@ var init_default = defineCommand({
|
|
|
1101
1103
|
initialValue: true
|
|
1102
1104
|
});
|
|
1103
1105
|
if (!q(transcribeChoice) && transcribeChoice) {
|
|
1104
|
-
const { findWhisper } = await import("./manager-
|
|
1106
|
+
const { findWhisper } = await import("./manager-SFL6GLYX.js");
|
|
1105
1107
|
const needsInstall = findWhisper() === void 0;
|
|
1106
1108
|
if (needsInstall) {
|
|
1107
1109
|
R.info(c.dim("whisper-cpp not found \u2014 installing automatically..."));
|
|
@@ -1111,7 +1113,7 @@ var init_default = defineCommand({
|
|
|
1111
1113
|
needsInstall ? "Installing whisper-cpp (this may take a moment)..." : "Preparing transcription..."
|
|
1112
1114
|
);
|
|
1113
1115
|
try {
|
|
1114
|
-
const { ensureWhisper, ensureModel } = await import("./manager-
|
|
1116
|
+
const { ensureWhisper, ensureModel } = await import("./manager-SFL6GLYX.js");
|
|
1115
1117
|
await ensureWhisper({
|
|
1116
1118
|
onProgress: (msg) => spin2.message(msg)
|
|
1117
1119
|
});
|
|
@@ -1119,7 +1121,7 @@ var init_default = defineCommand({
|
|
|
1119
1121
|
onProgress: (msg) => spin2.message(msg)
|
|
1120
1122
|
});
|
|
1121
1123
|
spin2.message("Transcribing audio...");
|
|
1122
|
-
const { transcribe: runTranscribe } = await import("./transcribe-
|
|
1124
|
+
const { transcribe: runTranscribe } = await import("./transcribe-HA4UGLKO.js");
|
|
1123
1125
|
const transcribeResult = await runTranscribe(sourceFilePath, destDir, {
|
|
1124
1126
|
model: modelFlag,
|
|
1125
1127
|
language: languageFlag,
|
|
@@ -1197,7 +1199,7 @@ ${c.dim("Use --example blank for offline use.")}`
|
|
|
1197
1199
|
}
|
|
1198
1200
|
R.info("Opening studio preview...");
|
|
1199
1201
|
try {
|
|
1200
|
-
const previewCmd = await import("./preview-
|
|
1202
|
+
const previewCmd = await import("./preview-V7CYHL6U.js").then((m) => m.default);
|
|
1201
1203
|
await runCommand(previewCmd, { rawArgs: [destDir] });
|
|
1202
1204
|
} catch {
|
|
1203
1205
|
}
|