@ignix-social/editor 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (586) hide show
  1. package/LICENSE +190 -0
  2. package/NOTICE +54 -0
  3. package/README.md +23 -0
  4. package/bin/ignix-editor.mjs +8 -0
  5. package/package.json +53 -0
  6. package/patches/index.mjs +53 -0
  7. package/scripts/build-ffmpeg-macos.sh +35 -0
  8. package/scripts/build-whisper-macos.sh +21 -0
  9. package/scripts/vendor.mjs +41 -0
  10. package/skills/ignix-editor/SKILL.md +132 -0
  11. package/src/audio.mjs +31 -0
  12. package/src/binaries.json +46 -0
  13. package/src/binaries.mjs +83 -0
  14. package/src/cli.mjs +254 -0
  15. package/src/prepare.mjs +74 -0
  16. package/src/runtime/ignix-frame.js +92 -0
  17. package/src/transcribe.mjs +71 -0
  18. package/src/validate.mjs +71 -0
  19. package/templates/blank/index.html +41 -0
  20. package/vendor/hyperframes/README.md +181 -0
  21. package/vendor/hyperframes/UPSTREAM.json +12 -0
  22. package/vendor/hyperframes/bin/hyperframes-localize-fonts.mjs +12 -0
  23. package/vendor/hyperframes/bin/hyperframes.mjs +11 -0
  24. package/vendor/hyperframes/dist/add-LR3ZR2A5.js +79 -0
  25. package/vendor/hyperframes/dist/agentPromptGenerator-VIIPZCJ3.js +143 -0
  26. package/vendor/hyperframes/dist/animatedGifPrep-P2T6YM7Z.js +34 -0
  27. package/vendor/hyperframes/dist/asset-BE2DOV72.js +26 -0
  28. package/vendor/hyperframes/dist/assetCataloger-VBLPHX24.js +340 -0
  29. package/vendor/hyperframes/dist/auth-RCQB2ZT7.js +60 -0
  30. package/vendor/hyperframes/dist/autoUpdate-RJAX3DAZ.js +268 -0
  31. package/vendor/hyperframes/dist/backgroundChecks-H2LCUIMJ.js +61 -0
  32. package/vendor/hyperframes/dist/backgroundChecksWorker.js +26 -0
  33. package/vendor/hyperframes/dist/batchRender-FT7AP7XH.js +355 -0
  34. package/vendor/hyperframes/dist/beat-analyzer.global.js +338 -0
  35. package/vendor/hyperframes/dist/beats-Y2EOP72P.js +309 -0
  36. package/vendor/hyperframes/dist/benchmark-MZ7GY3JW.js +231 -0
  37. package/vendor/hyperframes/dist/browser-HUTAMRQE.js +237 -0
  38. package/vendor/hyperframes/dist/bundleWithLocalizedFonts-5QOPOB5D.js +52 -0
  39. package/vendor/hyperframes/dist/capture-RLZA6EMR.js +4079 -0
  40. package/vendor/hyperframes/dist/capture-SZZ4IYJK.js +290 -0
  41. package/vendor/hyperframes/dist/captureFile-LYOJOUIE.js +15 -0
  42. package/vendor/hyperframes/dist/captureTimeout-PA4FYWT5.js +27 -0
  43. package/vendor/hyperframes/dist/catalog-KYU55EWR.js +1001 -0
  44. package/vendor/hyperframes/dist/check-TCG4PXLR.js +1697 -0
  45. package/vendor/hyperframes/dist/checkBrowser-RPMO4OW5.js +1032 -0
  46. package/vendor/hyperframes/dist/chunk-2EAXUCCE.js +88 -0
  47. package/vendor/hyperframes/dist/chunk-2EGFTPWD.js +1077 -0
  48. package/vendor/hyperframes/dist/chunk-2PSPARWP.js +6058 -0
  49. package/vendor/hyperframes/dist/chunk-2YN64IN5.js +5747 -0
  50. package/vendor/hyperframes/dist/chunk-3GXQPCJC.js +682 -0
  51. package/vendor/hyperframes/dist/chunk-3ZP5DXE7.js +15 -0
  52. package/vendor/hyperframes/dist/chunk-4NWOGZZS.js +1990 -0
  53. package/vendor/hyperframes/dist/chunk-4PFZPP2N.js +587 -0
  54. package/vendor/hyperframes/dist/chunk-4THIAPBL.js +128 -0
  55. package/vendor/hyperframes/dist/chunk-4YYJOFKS.js +28 -0
  56. package/vendor/hyperframes/dist/chunk-54HJ63Q2.js +29 -0
  57. package/vendor/hyperframes/dist/chunk-5ETJX6WM.js +89 -0
  58. package/vendor/hyperframes/dist/chunk-5IAKAQA7.js +389 -0
  59. package/vendor/hyperframes/dist/chunk-5Z63TBTX.js +37 -0
  60. package/vendor/hyperframes/dist/chunk-6BEFEWFB.js +25 -0
  61. package/vendor/hyperframes/dist/chunk-6CSYCFQV.js +68 -0
  62. package/vendor/hyperframes/dist/chunk-6CTIGJY7.js +154 -0
  63. package/vendor/hyperframes/dist/chunk-7HG4BFIN.js +93 -0
  64. package/vendor/hyperframes/dist/chunk-7JZ4FXP2.js +118 -0
  65. package/vendor/hyperframes/dist/chunk-A2Z4Z4VL.js +2961 -0
  66. package/vendor/hyperframes/dist/chunk-AMKC3AXA.js +25 -0
  67. package/vendor/hyperframes/dist/chunk-AVUUN2XD.js +4847 -0
  68. package/vendor/hyperframes/dist/chunk-AWDFDFI3.js +46 -0
  69. package/vendor/hyperframes/dist/chunk-AWNBM3MZ.js +94 -0
  70. package/vendor/hyperframes/dist/chunk-BXCMXMJQ.js +73 -0
  71. package/vendor/hyperframes/dist/chunk-BZ56MTDX.js +6 -0
  72. package/vendor/hyperframes/dist/chunk-CFKU7HTK.js +171 -0
  73. package/vendor/hyperframes/dist/chunk-CWPVM2QV.js +308 -0
  74. package/vendor/hyperframes/dist/chunk-DPVXBVLL.js +31292 -0
  75. package/vendor/hyperframes/dist/chunk-DQBY7FRR.js +397 -0
  76. package/vendor/hyperframes/dist/chunk-E6RPWJVC.js +213 -0
  77. package/vendor/hyperframes/dist/chunk-EISRN4E6.js +294 -0
  78. package/vendor/hyperframes/dist/chunk-EOVYQ3IG.js +143 -0
  79. package/vendor/hyperframes/dist/chunk-F3WZGU7C.js +479 -0
  80. package/vendor/hyperframes/dist/chunk-FCSIGXXP.js +366 -0
  81. package/vendor/hyperframes/dist/chunk-FI4I7CME.js +56 -0
  82. package/vendor/hyperframes/dist/chunk-FLWXXDNS.js +15 -0
  83. package/vendor/hyperframes/dist/chunk-GK4AIFIH.js +11171 -0
  84. package/vendor/hyperframes/dist/chunk-GMECXFAN.js +57 -0
  85. package/vendor/hyperframes/dist/chunk-GULOKZLI.js +155 -0
  86. package/vendor/hyperframes/dist/chunk-H4YZZ2VQ.js +68 -0
  87. package/vendor/hyperframes/dist/chunk-H6QMKUYA.js +477 -0
  88. package/vendor/hyperframes/dist/chunk-HBBJFK6I.js +273 -0
  89. package/vendor/hyperframes/dist/chunk-HRUGC23L.js +212 -0
  90. package/vendor/hyperframes/dist/chunk-HVW7ABXD.js +19 -0
  91. package/vendor/hyperframes/dist/chunk-HW6OYASV.js +344 -0
  92. package/vendor/hyperframes/dist/chunk-HWKCIWQT.js +3578 -0
  93. package/vendor/hyperframes/dist/chunk-I465DBM6.js +1214 -0
  94. package/vendor/hyperframes/dist/chunk-IGLEPPTN.js +24 -0
  95. package/vendor/hyperframes/dist/chunk-IGNAAHS3.js +433 -0
  96. package/vendor/hyperframes/dist/chunk-IHFUKJOR.js +85 -0
  97. package/vendor/hyperframes/dist/chunk-IQ3OUQ5Z.js +213 -0
  98. package/vendor/hyperframes/dist/chunk-ISN5GRYI.js +20 -0
  99. package/vendor/hyperframes/dist/chunk-IUZFXWSV.js +446 -0
  100. package/vendor/hyperframes/dist/chunk-JH556Q42.js +647 -0
  101. package/vendor/hyperframes/dist/chunk-JTHMTOMQ.js +601 -0
  102. package/vendor/hyperframes/dist/chunk-K2EQN4VU.js +405 -0
  103. package/vendor/hyperframes/dist/chunk-K2FTXJYH.js +16044 -0
  104. package/vendor/hyperframes/dist/chunk-K4WIOZFP.js +32 -0
  105. package/vendor/hyperframes/dist/chunk-K4WKGXRC.js +18 -0
  106. package/vendor/hyperframes/dist/chunk-KBJUXVOJ.js +172 -0
  107. package/vendor/hyperframes/dist/chunk-KC5XXX3X.js +590 -0
  108. package/vendor/hyperframes/dist/chunk-KNU5COPB.js +29 -0
  109. package/vendor/hyperframes/dist/chunk-KZI44OPA.js +185 -0
  110. package/vendor/hyperframes/dist/chunk-L3YOGIPG.js +48 -0
  111. package/vendor/hyperframes/dist/chunk-LAOCA3MQ.js +189 -0
  112. package/vendor/hyperframes/dist/chunk-LCSMOLGX.js +312 -0
  113. package/vendor/hyperframes/dist/chunk-LFGJWOVA.js +61 -0
  114. package/vendor/hyperframes/dist/chunk-LHSR3M4M.js +498 -0
  115. package/vendor/hyperframes/dist/chunk-LYNI3FOL.js +123 -0
  116. package/vendor/hyperframes/dist/chunk-M2WBOQ2Q.js +54 -0
  117. package/vendor/hyperframes/dist/chunk-MRF4AMKD.js +104 -0
  118. package/vendor/hyperframes/dist/chunk-MWB3ZIFM.js +852 -0
  119. package/vendor/hyperframes/dist/chunk-NGKM64BP.js +39 -0
  120. package/vendor/hyperframes/dist/chunk-NXMYHJAL.js +43 -0
  121. package/vendor/hyperframes/dist/chunk-OAF4XJOW.js +192 -0
  122. package/vendor/hyperframes/dist/chunk-OFQWTKPW.js +117 -0
  123. package/vendor/hyperframes/dist/chunk-P6LJ4Y32.js +4662 -0
  124. package/vendor/hyperframes/dist/chunk-PBN6GBJE.js +108 -0
  125. package/vendor/hyperframes/dist/chunk-PDAMK4Q5.js +28 -0
  126. package/vendor/hyperframes/dist/chunk-PFCFR3KZ.js +20 -0
  127. package/vendor/hyperframes/dist/chunk-PJ3HDUCY.js +108 -0
  128. package/vendor/hyperframes/dist/chunk-PMRBLBUP.js +152 -0
  129. package/vendor/hyperframes/dist/chunk-PPQUYWTW.js +240 -0
  130. package/vendor/hyperframes/dist/chunk-Q5X2B5WT.js +29 -0
  131. package/vendor/hyperframes/dist/chunk-Q7IU7MOR.js +351 -0
  132. package/vendor/hyperframes/dist/chunk-QC4FJVLM.js +371 -0
  133. package/vendor/hyperframes/dist/chunk-QNYYOUU3.js +1318 -0
  134. package/vendor/hyperframes/dist/chunk-RDNNAKEP.js +161 -0
  135. package/vendor/hyperframes/dist/chunk-RMHUQGRK.js +657 -0
  136. package/vendor/hyperframes/dist/chunk-RQVDTPGD.js +6 -0
  137. package/vendor/hyperframes/dist/chunk-RVCWIIZ7.js +68 -0
  138. package/vendor/hyperframes/dist/chunk-S3D6GE5W.js +72 -0
  139. package/vendor/hyperframes/dist/chunk-S3S4TGEH.js +424 -0
  140. package/vendor/hyperframes/dist/chunk-S7NPLFWV.js +11395 -0
  141. package/vendor/hyperframes/dist/chunk-SHB5VDMH.js +51 -0
  142. package/vendor/hyperframes/dist/chunk-TCLGPL65.js +860 -0
  143. package/vendor/hyperframes/dist/chunk-THXFSPLV.js +40 -0
  144. package/vendor/hyperframes/dist/chunk-TJSTGSAW.js +354 -0
  145. package/vendor/hyperframes/dist/chunk-TQFG7HTI.js +1024 -0
  146. package/vendor/hyperframes/dist/chunk-TVCRUG2S.js +265 -0
  147. package/vendor/hyperframes/dist/chunk-TWWSYAKJ.js +24 -0
  148. package/vendor/hyperframes/dist/chunk-U7CZBDMV.js +27 -0
  149. package/vendor/hyperframes/dist/chunk-UEZXMWG3.js +139 -0
  150. package/vendor/hyperframes/dist/chunk-UYEZTK4U.js +61 -0
  151. package/vendor/hyperframes/dist/chunk-VC76R6W2.js +27 -0
  152. package/vendor/hyperframes/dist/chunk-VFCKXTBB.js +159 -0
  153. package/vendor/hyperframes/dist/chunk-VWG7OQKU.js +22 -0
  154. package/vendor/hyperframes/dist/chunk-VXVRPIJA.js +105 -0
  155. package/vendor/hyperframes/dist/chunk-WBLXWOYK.js +15 -0
  156. package/vendor/hyperframes/dist/chunk-WERLJGIC.js +20 -0
  157. package/vendor/hyperframes/dist/chunk-WMQNIQDJ.js +2057 -0
  158. package/vendor/hyperframes/dist/chunk-WPHMNO44.js +4528 -0
  159. package/vendor/hyperframes/dist/chunk-X5HWXQPU.js +113 -0
  160. package/vendor/hyperframes/dist/chunk-X7MTZ4T2.js +6 -0
  161. package/vendor/hyperframes/dist/chunk-XH4DSOS5.js +59 -0
  162. package/vendor/hyperframes/dist/chunk-XS4EJSKU.js +23 -0
  163. package/vendor/hyperframes/dist/chunk-XT5P4QMO.js +181 -0
  164. package/vendor/hyperframes/dist/chunk-XT7X6QCP.js +6 -0
  165. package/vendor/hyperframes/dist/chunk-XUHOIDKG.js +6 -0
  166. package/vendor/hyperframes/dist/chunk-XUXGIA7H.js +485 -0
  167. package/vendor/hyperframes/dist/chunk-XZABUQTX.js +113 -0
  168. package/vendor/hyperframes/dist/chunk-Y6W4DVPS.js +356 -0
  169. package/vendor/hyperframes/dist/chunk-YEIFI443.js +44 -0
  170. package/vendor/hyperframes/dist/chunk-YQZNILVH.js +375 -0
  171. package/vendor/hyperframes/dist/chunk-Z27A7NUB.js +65 -0
  172. package/vendor/hyperframes/dist/chunk-Z6B37SNM.js +3081 -0
  173. package/vendor/hyperframes/dist/chunk-ZJUKFZ2P.js +10954 -0
  174. package/vendor/hyperframes/dist/chunk-ZKDMAOFU.js +32 -0
  175. package/vendor/hyperframes/dist/chunk-ZMXUQLI2.js +17219 -0
  176. package/vendor/hyperframes/dist/chunk-ZTZ7NCJT.js +58 -0
  177. package/vendor/hyperframes/dist/chunk-ZTZA4UWZ.js +108 -0
  178. package/vendor/hyperframes/dist/clean-W57E5YQ3.js +293 -0
  179. package/vendor/hyperframes/dist/cli.js +495 -0
  180. package/vendor/hyperframes/dist/cloud-FFTJGZ24.js +70 -0
  181. package/vendor/hyperframes/dist/cloudrun-AJUTHUEA.js +763 -0
  182. package/vendor/hyperframes/dist/colors-HKWSZCGK.js +15 -0
  183. package/vendor/hyperframes/dist/commands/contrast-audit.browser.js +459 -0
  184. package/vendor/hyperframes/dist/commands/layout-audit.browser.js +2102 -0
  185. package/vendor/hyperframes/dist/commands/motion-sample.browser.js +74 -0
  186. package/vendor/hyperframes/dist/commands/motion-signature.browser.js +374 -0
  187. package/vendor/hyperframes/dist/compare-AYCTT55F.js +421 -0
  188. package/vendor/hyperframes/dist/compiler-QO36EXLS.js +121 -0
  189. package/vendor/hyperframes/dist/component-VFFR2O7T.js +176 -0
  190. package/vendor/hyperframes/dist/compositions-QTVN3U2A.js +228 -0
  191. package/vendor/hyperframes/dist/contactSheet-27SRU7A4.js +22 -0
  192. package/vendor/hyperframes/dist/delete-ZAKYCB7I.js +114 -0
  193. package/vendor/hyperframes/dist/deploy-MX76RZ36.js +101 -0
  194. package/vendor/hyperframes/dist/destroy-H2TZBYHH.js +42 -0
  195. package/vendor/hyperframes/dist/deterministicFonts-HAEMV4TM.js +50 -0
  196. package/vendor/hyperframes/dist/dist-EWXJGN63.js +129 -0
  197. package/vendor/hyperframes/dist/dist-FNNGCKFS.js +29 -0
  198. package/vendor/hyperframes/dist/dist-S3PJNPXQ.js +392 -0
  199. package/vendor/hyperframes/dist/docker/Dockerfile.render +65 -0
  200. package/vendor/hyperframes/dist/docs/compositions.md +67 -0
  201. package/vendor/hyperframes/dist/docs/data-attributes.md +27 -0
  202. package/vendor/hyperframes/dist/docs/examples.md +19 -0
  203. package/vendor/hyperframes/dist/docs/gsap.md +26 -0
  204. package/vendor/hyperframes/dist/docs/rendering.md +35 -0
  205. package/vendor/hyperframes/dist/docs/troubleshooting.md +29 -0
  206. package/vendor/hyperframes/dist/docs-QAPJEGLS.js +131 -0
  207. package/vendor/hyperframes/dist/doctor-AI7C3FON.js +67 -0
  208. package/vendor/hyperframes/dist/dom-IROKGVJI.js +14 -0
  209. package/vendor/hyperframes/dist/dotEnv-AECLXQSO.js +14 -0
  210. package/vendor/hyperframes/dist/events-7LALYNKZ.js +92 -0
  211. package/vendor/hyperframes/dist/events-FQY3HGKZ.js +88 -0
  212. package/vendor/hyperframes/dist/feedback-WCMDMSTK.js +472 -0
  213. package/vendor/hyperframes/dist/ffmpeg-QIUFEFTY.js +35 -0
  214. package/vendor/hyperframes/dist/figma-64WY462P.js +63 -0
  215. package/vendor/hyperframes/dist/fontData.generated-NXAOI4GH.js +13 -0
  216. package/vendor/hyperframes/dist/fontLocalizeCli.js +132 -0
  217. package/vendor/hyperframes/dist/get-FPOMJMZB.js +103 -0
  218. package/vendor/hyperframes/dist/gpuPolicy-2ZUZE5D6.js +38 -0
  219. package/vendor/hyperframes/dist/grade-compare-E2CKPST4.js +647 -0
  220. package/vendor/hyperframes/dist/gsapParser-DIYYX6JT.js +2846 -0
  221. package/vendor/hyperframes/dist/gsapParserAcorn-E3GEIRZB.js +28 -0
  222. package/vendor/hyperframes/dist/help-YRQIDDML.js +197 -0
  223. package/vendor/hyperframes/dist/history-PP5NDRV3.js +571 -0
  224. package/vendor/hyperframes/dist/hyperframe-runtime.js +1081 -0
  225. package/vendor/hyperframes/dist/hyperframe.manifest.json +22 -0
  226. package/vendor/hyperframes/dist/hyperframe.runtime.iife.js +1081 -0
  227. package/vendor/hyperframes/dist/hyperframes-player.global.js +474 -0
  228. package/vendor/hyperframes/dist/hyperframes-slideshow.global.js +149 -0
  229. package/vendor/hyperframes/dist/info-SEX3B7JL.js +153 -0
  230. package/vendor/hyperframes/dist/init-U3AKHO5B.js +1147 -0
  231. package/vendor/hyperframes/dist/inspect-Q3K6EDEK.js +97 -0
  232. package/vendor/hyperframes/dist/installer-K6O5WF44.js +37 -0
  233. package/vendor/hyperframes/dist/keyframes-DC64JCI3.js +2602 -0
  234. package/vendor/hyperframes/dist/lambda-D7UMN4DJ.js +451 -0
  235. package/vendor/hyperframes/dist/layout-XSPPDHOO.js +86 -0
  236. package/vendor/hyperframes/dist/lib-TPG2ZMAX.js +128 -0
  237. package/vendor/hyperframes/dist/lint-7DQZE7L3.js +164 -0
  238. package/vendor/hyperframes/dist/lintProject-OHBBM3DJ.js +27 -0
  239. package/vendor/hyperframes/dist/list-4K5MVDQX.js +162 -0
  240. package/vendor/hyperframes/dist/login-NTX4OWXL.js +377 -0
  241. package/vendor/hyperframes/dist/logout-Q654A3SI.js +100 -0
  242. package/vendor/hyperframes/dist/manager-67P2XFXQ.js +34 -0
  243. package/vendor/hyperframes/dist/manager-CT3D67CG.js +38 -0
  244. package/vendor/hyperframes/dist/manager-GFN75DM4.js +30 -0
  245. package/vendor/hyperframes/dist/media-treatment-5FYAOPNL.js +972 -0
  246. package/vendor/hyperframes/dist/media-use-4XXGABIL.js +113 -0
  247. package/vendor/hyperframes/dist/models-C4E4IWJD.js +137 -0
  248. package/vendor/hyperframes/dist/motionShot-S4MIGMT5.js +614 -0
  249. package/vendor/hyperframes/dist/normalize-O76AC4HE.js +333 -0
  250. package/vendor/hyperframes/dist/normalize-audio-CSFTXLXD.js +276 -0
  251. package/vendor/hyperframes/dist/open-2ZD6BHZG.js +115 -0
  252. package/vendor/hyperframes/dist/pipeline-TNGWUZQC.js +54 -0
  253. package/vendor/hyperframes/dist/play-CTMUXX6E.js +349 -0
  254. package/vendor/hyperframes/dist/policies-FSDZVS2E.js +292 -0
  255. package/vendor/hyperframes/dist/preflight-SMNV6RW2.js +45 -0
  256. package/vendor/hyperframes/dist/present-WQVHV5CR.js +350 -0
  257. package/vendor/hyperframes/dist/preview-JOJXTH75.js +1820 -0
  258. package/vendor/hyperframes/dist/producer-ECLEN5RP.js +13 -0
  259. package/vendor/hyperframes/dist/progress-FBIEEB7Y.js +73 -0
  260. package/vendor/hyperframes/dist/projectConfig-HYJMJ5BY.js +56 -0
  261. package/vendor/hyperframes/dist/publication-HQ5Y3KBM.js +29 -0
  262. package/vendor/hyperframes/dist/publish-VHDYQASC.js +430 -0
  263. package/vendor/hyperframes/dist/refresh-K24ETHMA.js +53 -0
  264. package/vendor/hyperframes/dist/remove-background-W2YX2NVH.js +253 -0
  265. package/vendor/hyperframes/dist/render-AO5VX3YI.js +177 -0
  266. package/vendor/hyperframes/dist/render-LNO62LEL.js +2367 -0
  267. package/vendor/hyperframes/dist/render-TTQI7TGN.js +796 -0
  268. package/vendor/hyperframes/dist/render-batch-YH7CTWNY.js +284 -0
  269. package/vendor/hyperframes/dist/renderCancellation-JPIHE47X.js +35 -0
  270. package/vendor/hyperframes/dist/renderSetupWorker.js +79 -0
  271. package/vendor/hyperframes/dist/resolver-IZ647GBZ.js +38 -0
  272. package/vendor/hyperframes/dist/runtimeVersion.js +18 -0
  273. package/vendor/hyperframes/dist/screenshotCapture-ECBTLCU6.js +179 -0
  274. package/vendor/hyperframes/dist/shaderTransitionWorker.js +44 -0
  275. package/vendor/hyperframes/dist/sherpa-KKLNW6U2.js +314 -0
  276. package/vendor/hyperframes/dist/sherpaWorker.js +77 -0
  277. package/vendor/hyperframes/dist/sites-TNVKZS73.js +52 -0
  278. package/vendor/hyperframes/dist/skill-ZHVLH7KX.js +15 -0
  279. package/vendor/hyperframes/dist/skills/hyperframes/SKILL.md +152 -0
  280. package/vendor/hyperframes/dist/skills/hyperframes/references/brief-contract.md +108 -0
  281. package/vendor/hyperframes/dist/skills/hyperframes/references/brief-format.md +72 -0
  282. package/vendor/hyperframes/dist/skills/hyperframes/references/capability-menu.md +47 -0
  283. package/vendor/hyperframes/dist/skills/hyperframes/references/frame-worker-core.md +80 -0
  284. package/vendor/hyperframes/dist/skills/hyperframes/references/intent-interview.md +73 -0
  285. package/vendor/hyperframes/dist/skills/hyperframes/references/pitch-round.md +40 -0
  286. package/vendor/hyperframes/dist/skills/hyperframes/references/plugin-installation.md +43 -0
  287. package/vendor/hyperframes/dist/skills/hyperframes/references/production-loop.md +26 -0
  288. package/vendor/hyperframes/dist/skills/hyperframes/references/review-loop.md +37 -0
  289. package/vendor/hyperframes/dist/skills/hyperframes/references/route-briefs.md +11 -0
  290. package/vendor/hyperframes/dist/skills/hyperframes/references/routes/embedded-captions.md +11 -0
  291. package/vendor/hyperframes/dist/skills/hyperframes/references/routes/faceless-explainer.md +12 -0
  292. package/vendor/hyperframes/dist/skills/hyperframes/references/routes/general-video.md +12 -0
  293. package/vendor/hyperframes/dist/skills/hyperframes/references/routes/motion-graphics.md +11 -0
  294. package/vendor/hyperframes/dist/skills/hyperframes/references/routes/music-to-video.md +12 -0
  295. package/vendor/hyperframes/dist/skills/hyperframes/references/routes/pr-to-video.md +28 -0
  296. package/vendor/hyperframes/dist/skills/hyperframes/references/routes/product-launch-video.md +13 -0
  297. package/vendor/hyperframes/dist/skills/hyperframes/references/routes/remotion-to-hyperframes.md +9 -0
  298. package/vendor/hyperframes/dist/skills/hyperframes/references/routes/slideshow.md +11 -0
  299. package/vendor/hyperframes/dist/skills/hyperframes/references/routes/talking-head-recut.md +11 -0
  300. package/vendor/hyperframes/dist/skills/hyperframes/references/script-format.md +52 -0
  301. package/vendor/hyperframes/dist/skills/hyperframes/references/skill-lifecycle.md +35 -0
  302. package/vendor/hyperframes/dist/skills/hyperframes/references/storyboard-format.md +99 -0
  303. package/vendor/hyperframes/dist/skills/hyperframes/references/subagent-dispatch.md +35 -0
  304. package/vendor/hyperframes/dist/skills/hyperframes/references/workflow-catalog.md +10 -0
  305. package/vendor/hyperframes/dist/skills/hyperframes/scripts/lib/frame-packets-core.mjs +194 -0
  306. package/vendor/hyperframes/dist/skills/hyperframes/scripts/plugin-cli.mjs +88 -0
  307. package/vendor/hyperframes/dist/skills/hyperframes/scripts/plugin-cli.test.mjs +117 -0
  308. package/vendor/hyperframes/dist/skills/hyperframes-cli/SKILL.md +189 -0
  309. package/vendor/hyperframes/dist/skills/hyperframes-cli/references/beats.md +19 -0
  310. package/vendor/hyperframes/dist/skills/hyperframes-cli/references/cloud.md +163 -0
  311. package/vendor/hyperframes/dist/skills/hyperframes-cli/references/cloudrun.md +62 -0
  312. package/vendor/hyperframes/dist/skills/hyperframes-cli/references/compare-and-batch.md +105 -0
  313. package/vendor/hyperframes/dist/skills/hyperframes-cli/references/doctor-browser.md +57 -0
  314. package/vendor/hyperframes/dist/skills/hyperframes-cli/references/init-and-scaffold.md +74 -0
  315. package/vendor/hyperframes/dist/skills/hyperframes-cli/references/lambda.md +185 -0
  316. package/vendor/hyperframes/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +132 -0
  317. package/vendor/hyperframes/dist/skills/hyperframes-cli/references/preview-render.md +193 -0
  318. package/vendor/hyperframes/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +134 -0
  319. package/vendor/hyperframes/dist/skills/media-use/SKILL.md +100 -0
  320. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/CREDITS.md +35 -0
  321. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/chime.mp3 +0 -0
  322. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/click-soft.mp3 +0 -0
  323. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/click.mp3 +0 -0
  324. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/error.mp3 +0 -0
  325. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/glitch-1.mp3 +0 -0
  326. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/glitch-2.mp3 +0 -0
  327. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/glitch-3.mp3 +0 -0
  328. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/impact-bass-1.mp3 +0 -0
  329. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/impact-bass-2.mp3 +0 -0
  330. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/key-press.mp3 +0 -0
  331. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/manifest.json +97 -0
  332. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/notification.mp3 +0 -0
  333. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/ping.mp3 +0 -0
  334. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/pop.mp3 +0 -0
  335. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/riser.mp3 +0 -0
  336. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/sparkle.mp3 +0 -0
  337. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/typing.mp3 +0 -0
  338. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/whoosh-cinematic.mp3 +0 -0
  339. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/whoosh-short.mp3 +0 -0
  340. package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/whoosh.mp3 +0 -0
  341. package/vendor/hyperframes/dist/skills/media-use/audio/references/bgm.md +76 -0
  342. package/vendor/hyperframes/dist/skills/media-use/audio/references/captions/authoring.md +163 -0
  343. package/vendor/hyperframes/dist/skills/media-use/audio/references/captions/motion.md +87 -0
  344. package/vendor/hyperframes/dist/skills/media-use/audio/references/captions/transcript-handling.md +97 -0
  345. package/vendor/hyperframes/dist/skills/media-use/audio/references/remove-background.md +143 -0
  346. package/vendor/hyperframes/dist/skills/media-use/audio/references/requirements.md +29 -0
  347. package/vendor/hyperframes/dist/skills/media-use/audio/references/sfx.md +42 -0
  348. package/vendor/hyperframes/dist/skills/media-use/audio/references/transcribe.md +52 -0
  349. package/vendor/hyperframes/dist/skills/media-use/audio/references/tts-to-captions.md +35 -0
  350. package/vendor/hyperframes/dist/skills/media-use/audio/references/tts.md +260 -0
  351. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/audio.mjs +311 -0
  352. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/audio.test.mjs +159 -0
  353. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/gemini-pipeline.test.mjs +131 -0
  354. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-tts.mjs +122 -0
  355. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-tts.test.mjs +38 -0
  356. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-voice.mjs +98 -0
  357. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-voice.test.mjs +233 -0
  358. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/audio-meta.mjs +39 -0
  359. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/audio-meta.test.mjs +136 -0
  360. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/bgm-volume.mjs +4 -0
  361. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/bgm.mjs +257 -0
  362. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/bgm.test.mjs +74 -0
  363. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/concurrency.mjs +14 -0
  364. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/concurrency.test.mjs +41 -0
  365. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth.mjs +43 -0
  366. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth.py +52 -0
  367. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth.test.mjs +86 -0
  368. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth_test.py +90 -0
  369. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-tts.mjs +122 -0
  370. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-tts.test.mjs +243 -0
  371. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/heygen.mjs +197 -0
  372. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +185 -0
  373. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/media-record.mjs +114 -0
  374. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/media-record.test.mjs +205 -0
  375. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/python.mjs +77 -0
  376. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/python.test.mjs +136 -0
  377. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/sfx.mjs +165 -0
  378. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/sfx.test.mjs +121 -0
  379. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/tts.mjs +389 -0
  380. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/tts.spawn.test.mjs +158 -0
  381. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +230 -0
  382. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lyria-recipe.py +136 -0
  383. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/wait-bgm.mjs +175 -0
  384. package/vendor/hyperframes/dist/skills/media-use/audio/scripts/wait-bgm.test.mjs +108 -0
  385. package/vendor/hyperframes/dist/skills/media-use/luts/README.md +28 -0
  386. package/vendor/hyperframes/dist/skills/media-use/luts/index.json +57 -0
  387. package/vendor/hyperframes/dist/skills/media-use/references/audio.md +20 -0
  388. package/vendor/hyperframes/dist/skills/media-use/references/grading.md +160 -0
  389. package/vendor/hyperframes/dist/skills/media-use/references/media-treatment-recipes.md +929 -0
  390. package/vendor/hyperframes/dist/skills/media-use/references/media-treatments.md +202 -0
  391. package/vendor/hyperframes/dist/skills/media-use/references/memory.md +37 -0
  392. package/vendor/hyperframes/dist/skills/media-use/references/meta.md +61 -0
  393. package/vendor/hyperframes/dist/skills/media-use/references/operations.md +327 -0
  394. package/vendor/hyperframes/dist/skills/media-use/references/resolve.md +150 -0
  395. package/vendor/hyperframes/dist/skills/media-use/references/setup-providers.md +80 -0
  396. package/vendor/hyperframes/dist/skills/media-use/references/telemetry-dashboard.md +49 -0
  397. package/vendor/hyperframes/dist/skills/media-use/scripts/audio-duck.mjs +113 -0
  398. package/vendor/hyperframes/dist/skills/media-use/scripts/compatibility.test.mjs +96 -0
  399. package/vendor/hyperframes/dist/skills/media-use/scripts/dither.mjs +328 -0
  400. package/vendor/hyperframes/dist/skills/media-use/scripts/dither.test.mjs +176 -0
  401. package/vendor/hyperframes/dist/skills/media-use/scripts/eval.mjs +369 -0
  402. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/adopt.mjs +128 -0
  403. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/adopt.test.mjs +95 -0
  404. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/bgm-provider.mjs +20 -0
  405. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/brand-provider.mjs +59 -0
  406. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/bundled-sfx-provider.mjs +119 -0
  407. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/bundled-sfx-provider.test.mjs +139 -0
  408. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cache.mjs +148 -0
  409. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/candidates.mjs +91 -0
  410. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/candidates.test.mjs +155 -0
  411. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/codex-provider.mjs +161 -0
  412. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/codex-provider.test.mjs +34 -0
  413. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/config-lock.d.mts +3 -0
  414. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/config-lock.mjs +45 -0
  415. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/config-lock.test.mjs +79 -0
  416. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/coverage.test.mjs +136 -0
  417. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-build.mjs +181 -0
  418. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-build.test.mjs +80 -0
  419. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-validate.mjs +198 -0
  420. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-validate.test.mjs +125 -0
  421. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cutlist.mjs +184 -0
  422. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cutlist.test.mjs +162 -0
  423. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/duck.mjs +95 -0
  424. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/duck.test.mjs +153 -0
  425. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/error-diffusion.mjs +230 -0
  426. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/error-diffusion.test.mjs +102 -0
  427. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/ff-binaries.mjs +37 -0
  428. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/freeze.mjs +72 -0
  429. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/freeze.test.mjs +138 -0
  430. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/grade-analyzer.mjs +265 -0
  431. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/grade-analyzer.test.mjs +285 -0
  432. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-cli.mjs +191 -0
  433. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-cli.test.mjs +301 -0
  434. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-search.mjs +45 -0
  435. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-search.test.mjs +49 -0
  436. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-video-provider.mjs +138 -0
  437. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-video-provider.test.mjs +435 -0
  438. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/image-provider.mjs +44 -0
  439. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/index-gen.mjs +63 -0
  440. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-media-search.mjs +32 -0
  441. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-models.mjs +318 -0
  442. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-models.test.mjs +220 -0
  443. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-run.mjs +78 -0
  444. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-run.test.mjs +121 -0
  445. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/logo-provider.mjs +244 -0
  446. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/logo-provider.test.mjs +298 -0
  447. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/ltx-video-provider.mjs +94 -0
  448. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/ltx-video-provider.test.mjs +316 -0
  449. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/lut-preset-provider.mjs +271 -0
  450. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/lut-preset-provider.test.mjs +199 -0
  451. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/manifest.d.mts +19 -0
  452. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/manifest.mjs +279 -0
  453. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/manifest.test.mjs +397 -0
  454. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/match.mjs +47 -0
  455. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-fetch.mjs +85 -0
  456. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-fetch.test.mjs +197 -0
  457. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-home.mjs +20 -0
  458. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-home.test.mjs +61 -0
  459. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-search.d.mts +9 -0
  460. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-search.mjs +107 -0
  461. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/mflux-provider.mjs +128 -0
  462. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/mflux-provider.test.mjs +174 -0
  463. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/misses.mjs +49 -0
  464. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/misses.test.mjs +89 -0
  465. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/npx-sync.mjs +31 -0
  466. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/npx-sync.test.mjs +50 -0
  467. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/parakeet-words.mjs +27 -0
  468. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/parakeet-words.test.mjs +44 -0
  469. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/prefs-store.mjs +180 -0
  470. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/prefs-store.test.mjs +189 -0
  471. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/probe.mjs +41 -0
  472. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/probe.test.mjs +148 -0
  473. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/providers.mjs +5 -0
  474. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/recipe-store.mjs +367 -0
  475. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/recipe-store.test.mjs +367 -0
  476. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/registry.mjs +212 -0
  477. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/registry.test.mjs +262 -0
  478. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/search.mjs +24 -0
  479. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/search.test.mjs +32 -0
  480. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/sfx-provider.mjs +23 -0
  481. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/specs.mjs +132 -0
  482. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/specs.test.mjs +157 -0
  483. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/stats.mjs +117 -0
  484. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/stats.test.mjs +165 -0
  485. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/svg-sanitize.mjs +21 -0
  486. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/telemetry.mjs +210 -0
  487. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/telemetry.test.mjs +437 -0
  488. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/test-home.test.mjs +10 -0
  489. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/transcriptCutFade.mjs +21 -0
  490. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/transcriptCutFade.test.mjs +33 -0
  491. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/tts-local-provider.mjs +94 -0
  492. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/tts-local-provider.test.mjs +72 -0
  493. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/usage.mjs +57 -0
  494. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/usage.test.mjs +54 -0
  495. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/voice-provider.mjs +57 -0
  496. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/voice-provider.test.mjs +46 -0
  497. package/vendor/hyperframes/dist/skills/media-use/scripts/lib/words.mjs +18 -0
  498. package/vendor/hyperframes/dist/skills/media-use/scripts/prefs.mjs +70 -0
  499. package/vendor/hyperframes/dist/skills/media-use/scripts/recipe.mjs +103 -0
  500. package/vendor/hyperframes/dist/skills/media-use/scripts/resolve-plugin.test.mjs +62 -0
  501. package/vendor/hyperframes/dist/skills/media-use/scripts/resolve.mjs +1369 -0
  502. package/vendor/hyperframes/dist/skills/media-use/scripts/transcribe.mjs +194 -0
  503. package/vendor/hyperframes/dist/skills/media-use/scripts/transcribe.test.mjs +112 -0
  504. package/vendor/hyperframes/dist/skills/media-use/scripts/transcript-cut.mjs +270 -0
  505. package/vendor/hyperframes/dist/skills/media-use/scripts/transcript-cut.test.mjs +117 -0
  506. package/vendor/hyperframes/dist/skills-MJ2J4GEM.js +808 -0
  507. package/vendor/hyperframes/dist/skillsUpdateCheck-TKTYQN5R.js +26 -0
  508. package/vendor/hyperframes/dist/slideshow-EJ4IMY6P.js +24 -0
  509. package/vendor/hyperframes/dist/snapshot-KIVDUUMN.js +875 -0
  510. package/vendor/hyperframes/dist/src-6YQBJGWR.js +202 -0
  511. package/vendor/hyperframes/dist/src-PVYUYV3M.js +471 -0
  512. package/vendor/hyperframes/dist/state-KAXGHF77.js +26 -0
  513. package/vendor/hyperframes/dist/staticProjectServer-7EU666GS.js +49 -0
  514. package/vendor/hyperframes/dist/status-YM52BQ6S.js +311 -0
  515. package/vendor/hyperframes/dist/studio/assets/hyperframes-player-Cp8e_Zst.js +473 -0
  516. package/vendor/hyperframes/dist/studio/assets/index-BX3KHhGX.js +71 -0
  517. package/vendor/hyperframes/dist/studio/assets/index-CASEBNy2.js +1 -0
  518. package/vendor/hyperframes/dist/studio/assets/index-D11atkBt.css +1 -0
  519. package/vendor/hyperframes/dist/studio/assets/index-DMTt9nTf.js +531 -0
  520. package/vendor/hyperframes/dist/studio/assets/index-oE1pOdAy.js +399 -0
  521. package/vendor/hyperframes/dist/studio/chunk-5VSXRGIX.js +948 -0
  522. package/vendor/hyperframes/dist/studio/chunk-5VSXRGIX.js.map +1 -0
  523. package/vendor/hyperframes/dist/studio/chunk-7UQWVN52.js +938 -0
  524. package/vendor/hyperframes/dist/studio/chunk-7UQWVN52.js.map +1 -0
  525. package/vendor/hyperframes/dist/studio/chunk-EEXSYY5F.js +190 -0
  526. package/vendor/hyperframes/dist/studio/chunk-EEXSYY5F.js.map +1 -0
  527. package/vendor/hyperframes/dist/studio/chunk-FOEID72M.js +1441 -0
  528. package/vendor/hyperframes/dist/studio/chunk-FOEID72M.js.map +1 -0
  529. package/vendor/hyperframes/dist/studio/chunk-PZ5AY32C.js +10 -0
  530. package/vendor/hyperframes/dist/studio/chunk-PZ5AY32C.js.map +1 -0
  531. package/vendor/hyperframes/dist/studio/chunk-TDWGXBUT.js +1103 -0
  532. package/vendor/hyperframes/dist/studio/chunk-TDWGXBUT.js.map +1 -0
  533. package/vendor/hyperframes/dist/studio/domEditingLayers-IEVLO54Z.js +47 -0
  534. package/vendor/hyperframes/dist/studio/domEditingLayers-IEVLO54Z.js.map +1 -0
  535. package/vendor/hyperframes/dist/studio/favicon.svg +14 -0
  536. package/vendor/hyperframes/dist/studio/icons/timeline/audio.svg +7 -0
  537. package/vendor/hyperframes/dist/studio/icons/timeline/captions.svg +5 -0
  538. package/vendor/hyperframes/dist/studio/icons/timeline/composition.svg +12 -0
  539. package/vendor/hyperframes/dist/studio/icons/timeline/image.svg +18 -0
  540. package/vendor/hyperframes/dist/studio/icons/timeline/music.svg +10 -0
  541. package/vendor/hyperframes/dist/studio/icons/timeline/text.svg +3 -0
  542. package/vendor/hyperframes/dist/studio/index.css +165 -0
  543. package/vendor/hyperframes/dist/studio/index.css.map +1 -0
  544. package/vendor/hyperframes/dist/studio/index.d.ts +4296 -0
  545. package/vendor/hyperframes/dist/studio/index.html +23 -0
  546. package/vendor/hyperframes/dist/studio/index.js +99693 -0
  547. package/vendor/hyperframes/dist/studio/index.js.map +1 -0
  548. package/vendor/hyperframes/dist/studio/player.d.ts +30 -0
  549. package/vendor/hyperframes/dist/studio/player.js +10 -0
  550. package/vendor/hyperframes/dist/studio/player.js.map +1 -0
  551. package/vendor/hyperframes/dist/studio/styles/tailwind-preset.d.ts +39 -0
  552. package/vendor/hyperframes/dist/studio/styles/tailwind-preset.js +50 -0
  553. package/vendor/hyperframes/dist/studio/styles/tailwind-preset.js.map +1 -0
  554. package/vendor/hyperframes/dist/studio/styles.css +1 -0
  555. package/vendor/hyperframes/dist/studio/ui.d.ts +296 -0
  556. package/vendor/hyperframes/dist/studio/ui.js +66 -0
  557. package/vendor/hyperframes/dist/studio/ui.js.map +1 -0
  558. package/vendor/hyperframes/dist/studio-api-PNQZRPX5.js +136 -0
  559. package/vendor/hyperframes/dist/studioSelectionClient-IUUPKUHZ.js +25 -0
  560. package/vendor/hyperframes/dist/studioServer-UWRBPIOJ.js +1457 -0
  561. package/vendor/hyperframes/dist/synthesize-K62TIZWI.js +182 -0
  562. package/vendor/hyperframes/dist/system-EZYZNUFD.js +44 -0
  563. package/vendor/hyperframes/dist/telemetry-2YC4SGQU.js +144 -0
  564. package/vendor/hyperframes/dist/telemetry-QMYM4WME.js +95 -0
  565. package/vendor/hyperframes/dist/templates/_shared/AGENTS.md +107 -0
  566. package/vendor/hyperframes/dist/templates/_shared/CLAUDE.md +107 -0
  567. package/vendor/hyperframes/dist/templates/blank/index.html +55 -0
  568. package/vendor/hyperframes/dist/templates/from-file/index.html +75 -0
  569. package/vendor/hyperframes/dist/templates/warm-grain/compositions/captions.html +154 -0
  570. package/vendor/hyperframes/dist/templates/warm-grain/compositions/graphics.html +162 -0
  571. package/vendor/hyperframes/dist/templates/warm-grain/compositions/intro.html +87 -0
  572. package/vendor/hyperframes/dist/templates/warm-grain/index.html +264 -0
  573. package/vendor/hyperframes/dist/templates/warm-grain/registry-item.json +34 -0
  574. package/vendor/hyperframes/dist/timeline-77Z3BBQM.js +1377 -0
  575. package/vendor/hyperframes/dist/tokens-OBGTYE4Z.js +92 -0
  576. package/vendor/hyperframes/dist/transcribe-7NVFHCGA.js +387 -0
  577. package/vendor/hyperframes/dist/transcribe-BNSJRR4M.js +62 -0
  578. package/vendor/hyperframes/dist/tts-P3LIPIL5.js +234 -0
  579. package/vendor/hyperframes/dist/updateCheck-UDWIJ4ZQ.js +39 -0
  580. package/vendor/hyperframes/dist/upgrade-CT3CPO3E.js +231 -0
  581. package/vendor/hyperframes/dist/urlDownloader-H6WRI2UE.js +39 -0
  582. package/vendor/hyperframes/dist/usage-EC3KFUIJ.js +2139 -0
  583. package/vendor/hyperframes/dist/validate-65QDZJWZ.js +70 -0
  584. package/vendor/hyperframes/dist/video-FGSGKRSV.js +261 -0
  585. package/vendor/hyperframes/dist/workspaceBuildCheck-TOLGAI4T.js +133 -0
  586. package/vendor/hyperframes/package.json +80 -0
@@ -0,0 +1,1990 @@
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
+ ancestor,
9
+ parse,
10
+ simple
11
+ } from "./chunk-2PSPARWP.js";
12
+
13
+ // ../parsers/dist/gsapParserAcorn.js
14
+ var GSAP_DEFAULT_DURATION = 0.5;
15
+ var BUILTIN_VAR_KEYS = /* @__PURE__ */ new Set(["duration", "ease", "delay"]);
16
+ var DROPPED_VAR_KEYS = /* @__PURE__ */ new Set([
17
+ "onComplete",
18
+ "onStart",
19
+ "onUpdate",
20
+ "onRepeat"
21
+ ]);
22
+ var EXTRAS_KEYS = /* @__PURE__ */ new Set([
23
+ "stagger",
24
+ "yoyo",
25
+ "repeat",
26
+ "repeatDelay",
27
+ "snap",
28
+ "overwrite",
29
+ "immediateRender"
30
+ ]);
31
+ var PROPERTY_GROUPS = {
32
+ position: /* @__PURE__ */ new Set(["x", "y", "xPercent", "yPercent"]),
33
+ scale: /* @__PURE__ */ new Set(["scale", "scaleX", "scaleY"]),
34
+ size: /* @__PURE__ */ new Set(["width", "height"]),
35
+ rotation: /* @__PURE__ */ new Set(["rotation", "skewX", "skewY"]),
36
+ visual: /* @__PURE__ */ new Set(["opacity", "autoAlpha"]),
37
+ other: /* @__PURE__ */ new Set()
38
+ };
39
+ var PROP_TO_GROUP = /* @__PURE__ */ new Map();
40
+ for (const [group, props] of Object.entries(PROPERTY_GROUPS)) {
41
+ for (const p of props) PROP_TO_GROUP.set(p, group);
42
+ }
43
+ function classifyPropertyGroup(prop) {
44
+ return PROP_TO_GROUP.get(prop) ?? "other";
45
+ }
46
+ function classifyTweenPropertyGroup(properties) {
47
+ const groups = /* @__PURE__ */ new Set();
48
+ for (const key of Object.keys(properties)) {
49
+ if (key === "transformOrigin" || key === "_auto" || key === "data") continue;
50
+ const g = classifyPropertyGroup(key);
51
+ groups.add(g);
52
+ }
53
+ if (groups.size === 1) return groups.values().next().value;
54
+ return void 0;
55
+ }
56
+ function editabilityForProvenance(provenance) {
57
+ if (!provenance || provenance.kind === "literal") return "direct";
58
+ if (provenance.kind === "runtime-dynamic") return "source";
59
+ return "unroll";
60
+ }
61
+ function buildArcPath(coords, curviness, autoRotate, isCubic) {
62
+ const first = coords[0];
63
+ if (coords.length < 2 || !first) return void 0;
64
+ const segments = [];
65
+ let waypoints;
66
+ if (isCubic && coords.length >= 4) {
67
+ waypoints = [first];
68
+ for (let i = 1; i + 2 < coords.length; i += 3) {
69
+ const cp1 = coords[i];
70
+ const cp2 = coords[i + 1];
71
+ const anchor = coords[i + 2];
72
+ if (!cp1 || !cp2 || !anchor) continue;
73
+ waypoints.push(anchor);
74
+ segments.push({ curviness, cp1, cp2 });
75
+ }
76
+ } else {
77
+ waypoints = coords;
78
+ for (let i = 0; i < waypoints.length - 1; i++) segments.push({ curviness });
79
+ }
80
+ return { arcPath: { enabled: true, autoRotate, segments }, waypoints };
81
+ }
82
+ var SKIP_KEYS = /* @__PURE__ */ new Set([
83
+ "type",
84
+ "start",
85
+ "end",
86
+ "loc",
87
+ "range",
88
+ "__hfProvenance",
89
+ "__hfOrder",
90
+ "__hfSiteStart"
91
+ ]);
92
+ var FUNCTION_TYPES = /* @__PURE__ */ new Set([
93
+ "ArrowFunctionExpression",
94
+ "FunctionExpression",
95
+ "FunctionDeclaration"
96
+ ]);
97
+ var GSAP_METHODS = /* @__PURE__ */ new Set(["set", "to", "from", "fromTo"]);
98
+ var MAX_DEPTH = 8;
99
+ var MAX_ITERS = 512;
100
+ function isFunctionNode(node) {
101
+ return !!node && FUNCTION_TYPES.has(node.type);
102
+ }
103
+ function isNode(x) {
104
+ return !!x && typeof x === "object" && typeof x.type === "string";
105
+ }
106
+ function transformChildren(node, fn) {
107
+ for (const key of Object.keys(node)) {
108
+ if (SKIP_KEYS.has(key) || isNonValueIdentifierSlot(node, key)) continue;
109
+ const child = node[key];
110
+ if (Array.isArray(child)) {
111
+ for (let i = 0; i < child.length; i++) child[i] = fn(child[i]);
112
+ } else {
113
+ node[key] = fn(child);
114
+ }
115
+ }
116
+ }
117
+ function cloneNode(node) {
118
+ return structuredClone(node);
119
+ }
120
+ function collectPatternNames(pattern, out) {
121
+ if (pattern?.type === "Identifier") out.add(pattern.name);
122
+ else if (pattern?.type === "AssignmentPattern") collectPatternNames(pattern.left, out);
123
+ else if (pattern?.type === "RestElement") collectPatternNames(pattern.argument, out);
124
+ }
125
+ function boundPatterns(node) {
126
+ if (isFunctionNode(node)) return node.params ?? [];
127
+ if (node.type === "VariableDeclarator") return [node.id];
128
+ if (node.type === "CatchClause") return [node.param];
129
+ if (node.type === "AssignmentExpression" && node.left?.type === "Identifier") return [node.left];
130
+ return [];
131
+ }
132
+ function collectBoundNames(root) {
133
+ const names = /* @__PURE__ */ new Set();
134
+ const visit = (node) => {
135
+ if (!isNode(node)) return node;
136
+ for (const pattern of boundPatterns(node)) collectPatternNames(pattern, names);
137
+ transformChildren(node, visit);
138
+ return node;
139
+ };
140
+ visit(root);
141
+ return names;
142
+ }
143
+ function isNonValueIdentifierSlot(node, key) {
144
+ if (node.computed) return false;
145
+ return node.type === "MemberExpression" && key === "property" || node.type === "Property" && key === "key";
146
+ }
147
+ function substituteParams(node, bindings) {
148
+ const shadowed = collectBoundNames(node);
149
+ let effective = bindings;
150
+ if (shadowed.size > 0) {
151
+ effective = new Map(bindings);
152
+ for (const name of shadowed) effective.delete(name);
153
+ }
154
+ if (effective.size === 0) return node;
155
+ return replace(node, effective);
156
+ }
157
+ function replace(node, bindings) {
158
+ if (!isNode(node)) return node;
159
+ if (node.type === "Identifier" && bindings.has(node.name)) {
160
+ return cloneNode(bindings.get(node.name));
161
+ }
162
+ transformChildren(node, (child) => replace(child, bindings));
163
+ return node;
164
+ }
165
+ function tagProvenance(node, provenance) {
166
+ if (node && typeof node === "object") node.__hfProvenance = provenance;
167
+ return node;
168
+ }
169
+ function readProvenance(node) {
170
+ return node?.__hfProvenance;
171
+ }
172
+ function numericLiteral(value) {
173
+ return { type: "Literal", value, raw: String(value) };
174
+ }
175
+ function walkNodes(node, fn) {
176
+ if (!isNode(node)) return;
177
+ fn(node);
178
+ for (const key of Object.keys(node)) {
179
+ if (SKIP_KEYS.has(key)) continue;
180
+ const child = node[key];
181
+ if (Array.isArray(child)) for (const c of child) walkNodes(c, fn);
182
+ else walkNodes(child, fn);
183
+ }
184
+ }
185
+ function timelineRootName(call) {
186
+ let obj = call.callee?.object;
187
+ while (obj?.type === "CallExpression") obj = obj.callee?.object;
188
+ return obj?.type === "Identifier" ? obj.name : null;
189
+ }
190
+ function isTimelineRooted(call, timelineVar) {
191
+ if (timelineRootName(call) !== timelineVar) return false;
192
+ return call.callee?.property?.type === "Identifier" && GSAP_METHODS.has(call.callee.property.name);
193
+ }
194
+ function isAddLabelCall(call, timelineVar) {
195
+ return timelineRootName(call) === timelineVar && call.callee?.property?.name === "addLabel";
196
+ }
197
+ function containsTimelineCall(node, timelineVar) {
198
+ let found = false;
199
+ walkNodes(node, (n) => {
200
+ if (n.type === "CallExpression" && isTimelineRooted(n, timelineVar)) found = true;
201
+ });
202
+ return found;
203
+ }
204
+ function rangeOf(node) {
205
+ return typeof node.start === "number" && typeof node.end === "number" ? [node.start, node.end] : void 0;
206
+ }
207
+ var SAFE_DEFAULT_NODES = /* @__PURE__ */ new Set([
208
+ "ArrayExpression",
209
+ "BinaryExpression",
210
+ "ChainExpression",
211
+ "ConditionalExpression",
212
+ "Identifier",
213
+ "Literal",
214
+ "LogicalExpression",
215
+ "MemberExpression",
216
+ "ObjectExpression",
217
+ "Property",
218
+ "SpreadElement",
219
+ "TemplateElement",
220
+ "TemplateLiteral",
221
+ "UnaryExpression"
222
+ ]);
223
+ function isSafeDefaultExpression(node, earlierParams) {
224
+ let safe = true;
225
+ const visit = (current, parent, key) => {
226
+ if (!isNode(current) || !safe) return;
227
+ if (!SAFE_DEFAULT_NODES.has(current.type)) {
228
+ safe = false;
229
+ return;
230
+ }
231
+ if (current.type === "UnaryExpression" && current.operator === "delete") {
232
+ safe = false;
233
+ return;
234
+ }
235
+ if (current.type === "Identifier") {
236
+ const nonValue = parent && key ? isNonValueIdentifierSlot(parent, key) : false;
237
+ if (!nonValue && current.name !== "undefined" && !earlierParams.has(current.name)) {
238
+ safe = false;
239
+ }
240
+ return;
241
+ }
242
+ for (const childKey of Object.keys(current)) {
243
+ if (SKIP_KEYS.has(childKey)) continue;
244
+ const child = current[childKey];
245
+ if (Array.isArray(child)) {
246
+ for (const item of child) visit(item, current, childKey);
247
+ } else {
248
+ visit(child, current, childKey);
249
+ }
250
+ }
251
+ };
252
+ visit(node);
253
+ return safe;
254
+ }
255
+ var SUPPORTED_PARAMS_CACHE = /* @__PURE__ */ new WeakMap();
256
+ function supportedParam(param, earlier) {
257
+ if (param.type === "Identifier") return { name: param.name };
258
+ if (param.type !== "AssignmentPattern" || param.left?.type !== "Identifier") return null;
259
+ if (!isSafeDefaultExpression(param.right, earlier)) return null;
260
+ return { name: param.left.name, defaultExpression: param.right };
261
+ }
262
+ function supportedParams(fn) {
263
+ if (SUPPORTED_PARAMS_CACHE.has(fn)) return SUPPORTED_PARAMS_CACHE.get(fn) ?? null;
264
+ const params = [];
265
+ const earlier = /* @__PURE__ */ new Set();
266
+ for (const param of fn.params ?? []) {
267
+ const parsed = supportedParam(param, earlier);
268
+ if (!parsed) {
269
+ SUPPORTED_PARAMS_CACHE.set(fn, null);
270
+ return null;
271
+ }
272
+ params.push(parsed);
273
+ earlier.add(parsed.name);
274
+ }
275
+ SUPPORTED_PARAMS_CACHE.set(fn, params);
276
+ return params;
277
+ }
278
+ function isShapeEligible(fn) {
279
+ return isFunctionNode(fn) && fn.body?.type === "BlockStatement" && supportedParams(fn) !== null;
280
+ }
281
+ function callsAny(node, names) {
282
+ let hit = false;
283
+ walkNodes(node, (n) => {
284
+ if (n.type === "CallExpression" && n.callee?.type === "Identifier" && names.has(n.callee.name)) {
285
+ hit = true;
286
+ }
287
+ });
288
+ return hit;
289
+ }
290
+ function varDeclHelper(stmt) {
291
+ if (stmt.declarations?.length !== 1) return null;
292
+ const d = stmt.declarations[0];
293
+ return d.id?.type === "Identifier" && isShapeEligible(d.init) ? [d.id.name, d.init] : null;
294
+ }
295
+ function helperFromStatement(stmt) {
296
+ if (stmt.type === "FunctionDeclaration") {
297
+ return stmt.id && isShapeEligible(stmt) ? [stmt.id.name, stmt] : null;
298
+ }
299
+ if (stmt.type === "VariableDeclaration") return varDeclHelper(stmt);
300
+ return null;
301
+ }
302
+ function gatherHelperCandidates(program) {
303
+ const candidates = /* @__PURE__ */ new Map();
304
+ for (const stmt of program.body ?? []) {
305
+ const helper = helperFromStatement(stmt);
306
+ if (helper) candidates.set(helper[0], helper[1]);
307
+ }
308
+ return candidates;
309
+ }
310
+ function timelineBuildingNames(candidates, timelineVar) {
311
+ const building = /* @__PURE__ */ new Set();
312
+ for (const [name, fn] of candidates) {
313
+ if (containsTimelineCall(fn.body, timelineVar)) building.add(name);
314
+ }
315
+ for (let changed = true; changed; ) {
316
+ changed = false;
317
+ for (const [name, fn] of candidates) {
318
+ if (!building.has(name) && callsAny(fn.body, building)) {
319
+ building.add(name);
320
+ changed = true;
321
+ }
322
+ }
323
+ }
324
+ return building;
325
+ }
326
+ function bump(counts, key) {
327
+ counts.set(key, (counts.get(key) ?? 0) + 1);
328
+ }
329
+ function undefinedIdentifier() {
330
+ return { type: "Identifier", name: "undefined" };
331
+ }
332
+ function isExplicitUndefined(node) {
333
+ return node?.type === "Identifier" && node.name === "undefined" || node?.type === "UnaryExpression" && node.operator === "void" && node.argument?.type === "Literal" && node.argument.value === 0;
334
+ }
335
+ function resolveHelperBindings(call, params) {
336
+ if (call.arguments?.some((arg) => arg?.type === "SpreadElement")) return null;
337
+ const bindings = /* @__PURE__ */ new Map();
338
+ for (let i = 0; i < params.length; i++) {
339
+ const param = params[i];
340
+ const arg = call.arguments?.[i];
341
+ if (arg && !isExplicitUndefined(arg)) {
342
+ bindings.set(param.name, arg);
343
+ } else if (param.defaultExpression) {
344
+ bindings.set(param.name, substituteParams(cloneNode(param.defaultExpression), bindings));
345
+ } else {
346
+ bindings.set(param.name, undefinedIdentifier());
347
+ }
348
+ }
349
+ return bindings;
350
+ }
351
+ function statementHelperCall(node, names) {
352
+ if (node.type !== "ExpressionStatement") return void 0;
353
+ const expression = node.expression;
354
+ if (expression?.type !== "CallExpression" || expression.callee?.type !== "Identifier") {
355
+ return void 0;
356
+ }
357
+ return names.has(expression.callee.name) ? expression : void 0;
358
+ }
359
+ function safelyDroppable(program, candidates) {
360
+ const names = new Set(candidates.keys());
361
+ const totalIds = /* @__PURE__ */ new Map();
362
+ const stmtCalls = /* @__PURE__ */ new Map();
363
+ const unbindable = /* @__PURE__ */ new Set();
364
+ walkNodes(program, (n) => {
365
+ if (n.type === "Identifier" && names.has(n.name)) bump(totalIds, n.name);
366
+ const call = statementHelperCall(n, names);
367
+ if (!call) return;
368
+ bump(stmtCalls, call.callee.name);
369
+ const fn = candidates.get(call.callee.name);
370
+ const params = fn && supportedParams(fn);
371
+ if (!params || !resolveHelperBindings(call, params)) unbindable.add(call.callee.name);
372
+ });
373
+ const safe = /* @__PURE__ */ new Map();
374
+ for (const [name, fn] of candidates) {
375
+ if (!unbindable.has(name) && (totalIds.get(name) ?? 0) === 1 + (stmtCalls.get(name) ?? 0)) {
376
+ safe.set(name, fn);
377
+ }
378
+ }
379
+ return safe;
380
+ }
381
+ function collectInlinableHelpers(program, timelineVar) {
382
+ const candidates = gatherHelperCandidates(program);
383
+ if (candidates.size === 0) return candidates;
384
+ const building = timelineBuildingNames(candidates, timelineVar);
385
+ for (const name of [...candidates.keys()]) if (!building.has(name)) candidates.delete(name);
386
+ if (candidates.size === 0) return candidates;
387
+ return safelyDroppable(program, candidates);
388
+ }
389
+ function isHelperDecl(stmt, helpers) {
390
+ if (stmt.type === "FunctionDeclaration") return !!stmt.id && helpers.get(stmt.id.name) === stmt;
391
+ if (stmt.type === "VariableDeclaration" && stmt.declarations?.length === 1) {
392
+ const d = stmt.declarations[0];
393
+ return d.id?.type === "Identifier" && helpers.get(d.id.name) === d.init;
394
+ }
395
+ return false;
396
+ }
397
+ function bodyStatements(node) {
398
+ if (node?.type === "BlockStatement") return node.body ?? [];
399
+ return node ? [{ type: "ExpressionStatement", expression: node }] : [];
400
+ }
401
+ function tagTimelineCalls(stmts, prov, ctx) {
402
+ for (const stmt of stmts) {
403
+ const calls = [];
404
+ walkNodes(stmt, (n) => {
405
+ if (n.type === "CallExpression" && (isTimelineRooted(n, ctx.timelineVar) || isAddLabelCall(n, ctx.timelineVar)))
406
+ calls.push(n);
407
+ });
408
+ calls.sort((a, b) => a.callee.property.start - b.callee.property.start);
409
+ for (const n of calls) {
410
+ tagProvenance(n, { ...prov });
411
+ n.__hfOrder = ctx.order.n++;
412
+ n.__hfSiteStart = ctx.rootStart;
413
+ }
414
+ }
415
+ }
416
+ function expandBody(bodyStmts, bindings, prov, ctx) {
417
+ const block = substituteParams(cloneNode({ type: "BlockStatement", body: bodyStmts }), bindings);
418
+ tagProvenance(block, prov);
419
+ tagTimelineCalls(block.body, prov, ctx);
420
+ block.body = expandStatements(block.body, { ...ctx, depth: ctx.depth + 1 });
421
+ return [block];
422
+ }
423
+ function inlineHelper(call, ctx) {
424
+ const fn = ctx.helpers.get(call.callee.name);
425
+ if (!fn) return null;
426
+ const params = supportedParams(fn);
427
+ if (!params) return null;
428
+ const bindings = resolveHelperBindings(call, params);
429
+ if (!bindings) return null;
430
+ const prov = {
431
+ kind: "helper",
432
+ fn: call.callee.name,
433
+ callSite: ++ctx.site.n,
434
+ sourceRange: rangeOf(call)
435
+ };
436
+ return expandBody(fn.body.body, bindings, prov, ctx);
437
+ }
438
+ function assignStep(update, resolve) {
439
+ if (update.operator === "+=") return asNum(resolve(update.right));
440
+ if (update.operator === "-=") {
441
+ const s = asNum(resolve(update.right));
442
+ return s === void 0 ? void 0 : -s;
443
+ }
444
+ if (update.operator === "=" && update.right?.type === "BinaryExpression") {
445
+ return asNum(resolve(update.right.right));
446
+ }
447
+ return void 0;
448
+ }
449
+ function updatedVarName(update) {
450
+ if (update?.type === "UpdateExpression") return update.argument?.name ?? null;
451
+ if (update?.type === "AssignmentExpression") return update.left?.name ?? null;
452
+ return null;
453
+ }
454
+ function loopStep(update, varName, resolve) {
455
+ if (updatedVarName(update) !== varName) return void 0;
456
+ if (update.type === "UpdateExpression") return update.operator === "++" ? 1 : -1;
457
+ return assignStep(update, resolve);
458
+ }
459
+ function asNum(v) {
460
+ return typeof v === "number" && Number.isFinite(v) ? v : void 0;
461
+ }
462
+ function loopSatisfied(op, x, end) {
463
+ if (op === "<") return x < end;
464
+ if (op === "<=") return x <= end;
465
+ if (op === ">") return x > end;
466
+ if (op === ">=") return x >= end;
467
+ return false;
468
+ }
469
+ function forInitVar(init) {
470
+ if (init?.type !== "VariableDeclaration" || init.declarations?.length !== 1) return null;
471
+ const d = init.declarations[0];
472
+ return d.id?.type === "Identifier" ? { name: d.id.name, initExpr: d.init } : null;
473
+ }
474
+ function parseForHeader(stmt, resolve) {
475
+ const iv = forInitVar(stmt.init);
476
+ const test = stmt.test;
477
+ if (!iv || test?.type !== "BinaryExpression" || test.left?.name !== iv.name) return null;
478
+ const start = asNum(resolve(iv.initExpr));
479
+ const end = asNum(resolve(test.right));
480
+ const step = loopStep(stmt.update, iv.name, resolve);
481
+ if (start === void 0 || end === void 0 || !step) return null;
482
+ return { v: iv.name, start, end, op: test.operator, step };
483
+ }
484
+ function unrollFor(stmt, ctx) {
485
+ const h = parseForHeader(stmt, ctx.resolve);
486
+ if (!h) return null;
487
+ const body = bodyStatements(stmt.body);
488
+ const out = [];
489
+ const site = ++ctx.site.n;
490
+ let iteration = 0;
491
+ for (let x = h.start; loopSatisfied(h.op, x, h.end); x += h.step) {
492
+ if (iteration >= MAX_ITERS) return null;
493
+ const prov = {
494
+ kind: "loop",
495
+ callSite: site,
496
+ iteration,
497
+ sourceRange: rangeOf(stmt)
498
+ };
499
+ out.push(...expandBody(body, /* @__PURE__ */ new Map([[h.v, numericLiteral(x)]]), prov, ctx));
500
+ iteration++;
501
+ }
502
+ return out;
503
+ }
504
+ function forOfVarName(left) {
505
+ if (left?.type === "VariableDeclaration") {
506
+ const id = left.declarations?.[0]?.id;
507
+ return id?.type === "Identifier" ? id.name : null;
508
+ }
509
+ return left?.type === "Identifier" ? left.name : null;
510
+ }
511
+ function unrollOverArray(elements, body, elName, idxName, range, ctx) {
512
+ const out = [];
513
+ const site = ++ctx.site.n;
514
+ elements.forEach((el, i) => {
515
+ if (!el) return;
516
+ const bindings = /* @__PURE__ */ new Map();
517
+ if (elName) bindings.set(elName, el);
518
+ if (idxName) bindings.set(idxName, numericLiteral(i));
519
+ const prov = { kind: "loop", callSite: site, iteration: i, sourceRange: range };
520
+ out.push(...expandBody(body, bindings, prov, ctx));
521
+ });
522
+ return out;
523
+ }
524
+ function unrollForOf(stmt, ctx) {
525
+ if (stmt.right?.type !== "ArrayExpression") return null;
526
+ const elName = forOfVarName(stmt.left);
527
+ if (!elName) return null;
528
+ return unrollOverArray(
529
+ stmt.right.elements ?? [],
530
+ bodyStatements(stmt.body),
531
+ elName,
532
+ null,
533
+ rangeOf(stmt),
534
+ ctx
535
+ );
536
+ }
537
+ function callbackParamNames(cb) {
538
+ const names = [];
539
+ for (const p of [cb.params?.[0], cb.params?.[1]]) {
540
+ if (!p) names.push(null);
541
+ else if (p.type !== "Identifier") return null;
542
+ else names.push(p.name);
543
+ }
544
+ return { el: names[0], idx: names[1] };
545
+ }
546
+ function isForEachCall(callee) {
547
+ return callee?.type === "MemberExpression" && callee.property?.name === "forEach" && callee.object?.type === "ArrayExpression";
548
+ }
549
+ function forEachTarget(call) {
550
+ if (!isForEachCall(call.callee)) return null;
551
+ const cb = call.arguments?.[0];
552
+ return isFunctionNode(cb) ? { elements: call.callee.object.elements ?? [], cb } : null;
553
+ }
554
+ function unrollForEach(call, ctx) {
555
+ const target = forEachTarget(call);
556
+ if (!target) return null;
557
+ const params = callbackParamNames(target.cb);
558
+ if (!params) return null;
559
+ return unrollOverArray(
560
+ target.elements,
561
+ bodyStatements(target.cb.body),
562
+ params.el,
563
+ params.idx,
564
+ rangeOf(call),
565
+ ctx
566
+ );
567
+ }
568
+ function expandCall(call, ctx) {
569
+ if (call.callee?.type === "Identifier" && ctx.helpers.has(call.callee.name)) {
570
+ return inlineHelper(call, ctx);
571
+ }
572
+ return unrollForEach(call, ctx);
573
+ }
574
+ function expandStatement(stmt, ctx) {
575
+ if (ctx.depth >= MAX_DEPTH) return null;
576
+ if (stmt.type === "ForStatement") return unrollFor(stmt, ctx);
577
+ if (stmt.type === "ForOfStatement") return unrollForOf(stmt, ctx);
578
+ if (stmt.type === "ExpressionStatement" && stmt.expression?.type === "CallExpression") {
579
+ return expandCall(stmt.expression, ctx);
580
+ }
581
+ return null;
582
+ }
583
+ function expandStatements(stmts, ctx) {
584
+ const out = [];
585
+ for (const stmt of stmts) {
586
+ const expanded = expandStatement(stmt, ctx);
587
+ if (expanded) out.push(...expanded);
588
+ else out.push(stmt);
589
+ }
590
+ return out;
591
+ }
592
+ function inlineComputedTimelines(ast, timelineVar, resolve) {
593
+ const helpers = collectInlinableHelpers(ast, timelineVar);
594
+ const ctx = {
595
+ helpers,
596
+ timelineVar,
597
+ resolve,
598
+ depth: 0,
599
+ site: { n: 0 },
600
+ order: { n: 0 },
601
+ rootStart: 0
602
+ };
603
+ const body = (ast.body ?? []).filter((stmt) => !isHelperDecl(stmt, helpers));
604
+ ast.body = body.flatMap((stmt) => {
605
+ ctx.rootStart = stmt.start;
606
+ return expandStatements([stmt], ctx);
607
+ });
608
+ }
609
+ var roundPercentage = (percentage) => Math.round(percentage * 10) / 10;
610
+ function getObjectArrayKeyframeTiming(durations) {
611
+ const steps = durations.map((duration) => duration ?? GSAP_DEFAULT_DURATION);
612
+ if (!steps.every(
613
+ (duration) => typeof duration === "number" && Number.isFinite(duration) && duration > 0
614
+ )) {
615
+ return null;
616
+ }
617
+ const totalDuration = steps.reduce((sum, duration) => sum + duration, 0);
618
+ let cumulative = 0;
619
+ return {
620
+ percentages: steps.map((duration) => {
621
+ cumulative += duration;
622
+ return roundPercentage(cumulative / totalDuration * 100);
623
+ }),
624
+ totalDuration
625
+ };
626
+ }
627
+ var GSAP_METHODS2 = /* @__PURE__ */ new Set(["set", "to", "from", "fromTo"]);
628
+ var QUERY_METHODS = /* @__PURE__ */ new Set(["querySelector", "querySelectorAll"]);
629
+ var ITERATION_METHODS = /* @__PURE__ */ new Set(["forEach", "map"]);
630
+ var SCOPE_NODE_TYPES = /* @__PURE__ */ new Set([
631
+ "Program",
632
+ "BlockStatement",
633
+ "FunctionDeclaration",
634
+ "FunctionExpression",
635
+ "ArrowFunctionExpression"
636
+ ]);
637
+ function parseProgram(script) {
638
+ try {
639
+ return parse(script, {
640
+ ecmaVersion: "latest",
641
+ sourceType: "script",
642
+ locations: true
643
+ });
644
+ } catch {
645
+ return parse(script, {
646
+ ecmaVersion: "latest",
647
+ sourceType: "module",
648
+ locations: true
649
+ });
650
+ }
651
+ }
652
+ var CONST_NODES = /* @__PURE__ */ Symbol("hf.constNodes");
653
+ function constNodesOf(scope) {
654
+ return scope[CONST_NODES];
655
+ }
656
+ var MATH_FNS = /* @__PURE__ */ new Set(["min", "max", "round", "floor", "ceil", "abs", "sqrt", "sign", "trunc"]);
657
+ var MATH_CONSTS = { PI: Math.PI, E: Math.E, SQRT2: Math.SQRT2 };
658
+ function resolveMemberNode(node, scope) {
659
+ if (node.object?.type === "Identifier" && node.object.name === "Math") {
660
+ const key = node.property?.name;
661
+ return typeof key === "string" ? MATH_CONSTS[key] : void 0;
662
+ }
663
+ const objNode = resolveConstNode(node.object, scope);
664
+ if (!objNode) return void 0;
665
+ let valueNode;
666
+ if (node.computed) {
667
+ const idx = resolveNode(node.property, scope);
668
+ if (objNode.type === "ArrayExpression" && typeof idx === "number") {
669
+ valueNode = objNode.elements?.[idx];
670
+ } else if (objNode.type === "ObjectExpression" && (typeof idx === "string" || typeof idx === "number")) {
671
+ valueNode = findPropertyNode(objNode, String(idx));
672
+ }
673
+ } else if (objNode.type === "ObjectExpression") {
674
+ valueNode = findPropertyNode(objNode, node.property?.name ?? node.property?.value);
675
+ }
676
+ return valueNode ? resolveNode(valueNode, scope) : void 0;
677
+ }
678
+ function resolveConstMember(objNode, node, scope) {
679
+ if (!node.computed) {
680
+ return objNode.type === "ObjectExpression" ? findPropertyNode(objNode, node.property?.name ?? node.property?.value) : void 0;
681
+ }
682
+ const idx = resolveNode(node.property, scope);
683
+ if (objNode.type === "ArrayExpression" && typeof idx === "number") return objNode.elements?.[idx];
684
+ if (objNode.type === "ObjectExpression") return findPropertyNode(objNode, String(idx));
685
+ return void 0;
686
+ }
687
+ function resolveConstNode(node, scope) {
688
+ if (!node) return void 0;
689
+ if (node.type === "ArrayExpression" || node.type === "ObjectExpression") return node;
690
+ if (node.type === "Identifier") return constNodesOf(scope)?.get(node.name);
691
+ if (node.type !== "MemberExpression") return void 0;
692
+ const objNode = resolveConstNode(node.object, scope);
693
+ return objNode ? resolveConstMember(objNode, node, scope) : void 0;
694
+ }
695
+ function resolveNode(node, scope) {
696
+ if (!node) return void 0;
697
+ if (node.type === "NumericLiteral" || node.type === "Literal" && typeof node.value === "number")
698
+ return node.value;
699
+ if (node.type === "StringLiteral" || node.type === "Literal" && typeof node.value === "string")
700
+ return node.value;
701
+ if (node.type === "BooleanLiteral" || node.type === "Literal" && typeof node.value === "boolean")
702
+ return node.value;
703
+ if (node.type === "UnaryExpression" && node.operator === "-" && node.argument) {
704
+ const val = resolveNode(node.argument, scope);
705
+ return typeof val === "number" ? -val : void 0;
706
+ }
707
+ if (node.type === "BinaryExpression") {
708
+ const left = resolveNode(node.left, scope);
709
+ const right = resolveNode(node.right, scope);
710
+ if (typeof left === "number" && typeof right === "number") {
711
+ switch (node.operator) {
712
+ case "+":
713
+ return left + right;
714
+ case "-":
715
+ return left - right;
716
+ case "*":
717
+ return left * right;
718
+ case "/":
719
+ return right !== 0 ? left / right : void 0;
720
+ }
721
+ }
722
+ if (typeof left === "string" && node.operator === "+") return left + String(right ?? "");
723
+ if (typeof right === "string" && node.operator === "+") return String(left ?? "") + right;
724
+ }
725
+ if (node.type === "Identifier" && scope.has(node.name)) {
726
+ return scope.get(node.name);
727
+ }
728
+ if (node.type === "TemplateLiteral" && node.expressions?.length === 0) {
729
+ return node.quasis?.[0]?.value?.cooked ?? void 0;
730
+ }
731
+ if (node.type === "MemberExpression") {
732
+ return resolveMemberNode(node, scope);
733
+ }
734
+ if (node.type === "CallExpression" && node.callee?.type === "MemberExpression" && node.callee.object?.type === "Identifier" && node.callee.object.name === "Math" && MATH_FNS.has(node.callee.property?.name)) {
735
+ const args = (node.arguments ?? []).map((a) => resolveNode(a, scope));
736
+ if (args.every((a) => typeof a === "number")) {
737
+ return Math[node.callee.property.name](...args);
738
+ }
739
+ }
740
+ return void 0;
741
+ }
742
+ function extractLiteralValue(node, scope) {
743
+ return resolveNode(node, scope);
744
+ }
745
+ function selectorFromQueryCall(node, scope) {
746
+ if (node?.type !== "CallExpression") return null;
747
+ const callee = node.callee;
748
+ if (callee?.type !== "MemberExpression" || callee.property?.type !== "Identifier") return null;
749
+ const method = callee.property.name;
750
+ const argValue = resolveNode(node.arguments?.[0], scope);
751
+ if (typeof argValue !== "string" || argValue.length === 0) return null;
752
+ if (QUERY_METHODS.has(method) || method === "toArray") return argValue;
753
+ if (method === "getElementById") return `#${argValue}`;
754
+ return null;
755
+ }
756
+ function enclosingScopeNodeFromAncestors(ancestors, includeBlocks = true) {
757
+ for (let i = ancestors.length - 2; i >= 0; i--) {
758
+ const node = ancestors[i];
759
+ if (node && SCOPE_NODE_TYPES.has(node.type) && (includeBlocks || node.type !== "BlockStatement")) {
760
+ return node;
761
+ }
762
+ }
763
+ return null;
764
+ }
765
+ function scopeChainFromAncestors(ancestors) {
766
+ const chain = [];
767
+ for (let i = ancestors.length - 1; i >= 0; i--) {
768
+ const node = ancestors[i];
769
+ if (node && SCOPE_NODE_TYPES.has(node.type)) chain.push(node);
770
+ }
771
+ return chain;
772
+ }
773
+ function nearestExpandedScopeFromAncestors(ancestors) {
774
+ for (let index = ancestors.length - 2; index >= 0; index--) {
775
+ const candidate = ancestors[index];
776
+ if (candidate?.type === "BlockStatement" && readProvenance(candidate)) return candidate;
777
+ }
778
+ return void 0;
779
+ }
780
+ function findVisibleIdentifierDeclaration(name, ancestors, index, usageStart = Number.POSITIVE_INFINITY) {
781
+ const declarations = index.declarationsByName.get(name) ?? [];
782
+ const expandedScopeNode = nearestExpandedScopeFromAncestors(ancestors);
783
+ for (const scopeNode of scopeChainFromAncestors(ancestors)) {
784
+ const candidates = declarations.filter(
785
+ (declaration) => declaration.scopeNode === scopeNode && (!declaration.expandedScopeNode || declaration.expandedScopeNode === expandedScopeNode) && (declaration.kind === "var" || declaration.kind === "param" || declaration.node.start < usageStart)
786
+ ).sort((left, right) => right.node.start - left.node.start);
787
+ if (candidates[0]) return candidates[0];
788
+ }
789
+ return void 0;
790
+ }
791
+ function collectIdentifierBindingIndex(ast) {
792
+ const declarationsByName = /* @__PURE__ */ new Map();
793
+ const reassignedDeclarations = /* @__PURE__ */ new Set();
794
+ ancestor(ast, {
795
+ VariableDeclarator(node, _, ancestors) {
796
+ const name = node.id?.name;
797
+ if (!name) return;
798
+ const declaration = ancestors.at(-2);
799
+ const kind = declaration?.kind;
800
+ if (!kind) return;
801
+ const includeBlocks = declaration?.type !== "VariableDeclaration" || kind !== "var";
802
+ const scopeNode = enclosingScopeNodeFromAncestors(ancestors, includeBlocks);
803
+ const expandedScopeNode = nearestExpandedScopeFromAncestors(ancestors);
804
+ const entries = declarationsByName.get(name) ?? [];
805
+ entries.push({ node, scopeNode, expandedScopeNode, name, kind });
806
+ declarationsByName.set(name, entries);
807
+ },
808
+ FunctionDeclaration: indexFunctionParameters,
809
+ FunctionExpression: indexFunctionParameters,
810
+ ArrowFunctionExpression: indexFunctionParameters
811
+ });
812
+ const index = { declarationsByName, reassignedDeclarations };
813
+ ancestor(ast, {
814
+ AssignmentExpression(node, _, ancestors) {
815
+ const name = node.left?.type === "Identifier" ? node.left.name : void 0;
816
+ if (!name) return;
817
+ const declaration = findVisibleIdentifierDeclaration(name, ancestors, index, node.start);
818
+ if (declaration) reassignedDeclarations.add(declaration.node);
819
+ }
820
+ });
821
+ return index;
822
+ function indexFunctionParameters(node) {
823
+ for (const parameter of node.params ?? []) {
824
+ if (parameter?.type !== "Identifier") continue;
825
+ const entries = declarationsByName.get(parameter.name) ?? [];
826
+ entries.push({ node: parameter, scopeNode: node, name: parameter.name, kind: "param" });
827
+ declarationsByName.set(parameter.name, entries);
828
+ }
829
+ }
830
+ }
831
+ function addBinding(bindings, scopeNode, name, selector) {
832
+ let scoped = bindings.get(scopeNode);
833
+ if (!scoped) {
834
+ scoped = /* @__PURE__ */ new Map();
835
+ bindings.set(scopeNode, scoped);
836
+ }
837
+ if (!scoped.has(name)) scoped.set(name, selector);
838
+ }
839
+ function lookupBindingFromAncestors(name, ancestors, bindings) {
840
+ for (const scopeNode of scopeChainFromAncestors(ancestors)) {
841
+ const selector = bindings.get(scopeNode)?.get(name);
842
+ if (selector !== void 0) return selector;
843
+ }
844
+ return bindings.get(null)?.get(name) ?? null;
845
+ }
846
+ function isFunctionNode2(node) {
847
+ return node?.type === "ArrowFunctionExpression" || node?.type === "FunctionExpression" || node?.type === "FunctionDeclaration";
848
+ }
849
+ function resolveCollectionSelector(node, ancestors, scope, bindings) {
850
+ if (node?.type === "Identifier")
851
+ return lookupBindingFromAncestors(node.name, ancestors, bindings);
852
+ if (node?.type === "CallExpression") return selectorFromQueryCall(node, scope);
853
+ return null;
854
+ }
855
+ function collectScopeBindings(ast) {
856
+ const bindings = /* @__PURE__ */ new Map();
857
+ const ambiguousBindings = /* @__PURE__ */ new Set();
858
+ const constNodes = /* @__PURE__ */ new Map();
859
+ Object.defineProperty(bindings, CONST_NODES, { value: constNodes, enumerable: false });
860
+ simple(ast, {
861
+ VariableDeclarator(node) {
862
+ const name = node.id?.name;
863
+ const init = node.init;
864
+ if (!name || !init) return;
865
+ if (init.type === "ArrayExpression" || init.type === "ObjectExpression") {
866
+ constNodes.set(name, init);
867
+ return;
868
+ }
869
+ const val = resolveNode(init, bindings);
870
+ if (val === void 0 || ambiguousBindings.has(name)) return;
871
+ const existing = bindings.get(name);
872
+ if (existing !== void 0 && existing !== val) {
873
+ bindings.delete(name);
874
+ ambiguousBindings.add(name);
875
+ } else if (existing === void 0) {
876
+ bindings.set(name, val);
877
+ }
878
+ }
879
+ });
880
+ return bindings;
881
+ }
882
+ function collectTargetBindings(ast, scope, identifierBindings) {
883
+ const bindings = /* @__PURE__ */ new Map();
884
+ ancestor(ast, {
885
+ VariableDeclarator(node, _, ancestors) {
886
+ const name = node.id?.name;
887
+ const selector = selectorFromQueryCall(node.init, scope);
888
+ if (name && selector !== null) {
889
+ const declaration = ancestors.at(-2);
890
+ const includeBlocks = declaration?.type !== "VariableDeclaration" || declaration.kind !== "var";
891
+ addBinding(
892
+ bindings,
893
+ enclosingScopeNodeFromAncestors(ancestors, includeBlocks),
894
+ name,
895
+ selector
896
+ );
897
+ }
898
+ },
899
+ AssignmentExpression(node, _, ancestors) {
900
+ const left = node.left;
901
+ const selector = selectorFromQueryCall(node.right, scope);
902
+ if (left?.type === "Identifier" && selector !== null) {
903
+ const declaration = findVisibleIdentifierDeclaration(
904
+ left.name,
905
+ ancestors,
906
+ identifierBindings,
907
+ node.start
908
+ );
909
+ addBinding(
910
+ bindings,
911
+ declaration?.scopeNode ?? nearestExpandedScopeFromAncestors(ancestors) ?? enclosingScopeNodeFromAncestors(ancestors),
912
+ left.name,
913
+ selector
914
+ );
915
+ }
916
+ }
917
+ });
918
+ ancestor(ast, {
919
+ // fallow-ignore-next-line complexity
920
+ CallExpression(node, _, ancestors) {
921
+ const callee = node.callee;
922
+ if (callee?.type === "MemberExpression" && callee.property?.type === "Identifier" && ITERATION_METHODS.has(callee.property.name)) {
923
+ const collectionSelector = resolveCollectionSelector(
924
+ callee.object,
925
+ ancestors,
926
+ scope,
927
+ bindings
928
+ );
929
+ const fn = node.arguments?.[0];
930
+ const param = fn?.params?.[0];
931
+ if (collectionSelector && param?.type === "Identifier" && isFunctionNode2(fn)) {
932
+ addBinding(bindings, fn, param.name, collectionSelector);
933
+ }
934
+ }
935
+ }
936
+ });
937
+ const COLLECTION_ALIAS_METHODS = /* @__PURE__ */ new Set(["slice", "filter", "concat", "reverse"]);
938
+ ancestor(ast, {
939
+ // fallow-ignore-next-line complexity
940
+ VariableDeclarator(node, _, ancestors) {
941
+ const name = node.id?.name;
942
+ const init = node.init;
943
+ if (!name || !init) return;
944
+ let sourceVar;
945
+ if (init.type === "MemberExpression" && init.object?.type === "Identifier") {
946
+ sourceVar = init.object.name;
947
+ } else if (init.type === "CallExpression" && init.callee?.type === "MemberExpression" && init.callee.object?.type === "Identifier" && init.callee.property?.type === "Identifier" && COLLECTION_ALIAS_METHODS.has(init.callee.property.name)) {
948
+ sourceVar = init.callee.object.name;
949
+ }
950
+ if (!sourceVar) return;
951
+ const selector = lookupBindingFromAncestors(sourceVar, ancestors, bindings);
952
+ if (selector)
953
+ addBinding(bindings, enclosingScopeNodeFromAncestors(ancestors), name, selector);
954
+ }
955
+ });
956
+ return bindings;
957
+ }
958
+ function resolveTargetSelector(node, ancestors, scope, bindings) {
959
+ if (!node) return null;
960
+ if (node.type === "StringLiteral" || node.type === "Literal") {
961
+ return typeof node.value === "string" ? node.value : null;
962
+ }
963
+ if (node.type === "Identifier") {
964
+ return lookupBindingFromAncestors(node.name, ancestors, bindings);
965
+ }
966
+ if (node.type === "CallExpression") {
967
+ return selectorFromQueryCall(node, scope);
968
+ }
969
+ if (node.type === "ArrayExpression") {
970
+ const parts = node.elements.map((el) => resolveTargetSelector(el, ancestors, scope, bindings)).filter((s) => typeof s === "string" && s.length > 0);
971
+ return parts.length > 0 ? parts.join(", ") : null;
972
+ }
973
+ if (node.type === "MemberExpression" && node.object?.type === "Identifier") {
974
+ return lookupBindingFromAncestors(node.object.name, ancestors, bindings);
975
+ }
976
+ return null;
977
+ }
978
+ function hasUnresolvedArrayPart(node, ancestors, scope, bindings) {
979
+ return node?.type === "ArrayExpression" && node.elements.some(
980
+ (el) => !resolveTargetSelector(el, ancestors, scope, bindings) || hasUnresolvedArrayPart(el, ancestors, scope, bindings)
981
+ );
982
+ }
983
+ function describeProxyTarget(targetNode, varsNode, scope) {
984
+ const objNode = targetNode?.type === "ObjectExpression" ? targetNode : targetNode?.type === "Identifier" ? resolveConstNode(targetNode, scope) : void 0;
985
+ if (objNode?.type !== "ObjectExpression") return null;
986
+ const onUpdate = findPropertyNode(varsNode, "onUpdate");
987
+ const driven = onUpdate ? drivenDomChannel(onUpdate) : void 0;
988
+ if (driven) return `proxy \u2192 ${driven}`;
989
+ return "dwell/hold";
990
+ }
991
+ function isStyleAssignmentTarget(left) {
992
+ return left?.type === "MemberExpression" && left.object?.type === "MemberExpression" && left.object.property?.name === "style" && !!left.property?.name;
993
+ }
994
+ function drivenDomChannel(fnNode) {
995
+ let found;
996
+ simple(fnNode, {
997
+ CallExpression(node) {
998
+ if (node.callee?.type === "MemberExpression" && node.callee.property?.name === "setAttribute" && typeof node.arguments?.[0]?.value === "string") {
999
+ found ??= node.arguments[0].value;
1000
+ }
1001
+ },
1002
+ AssignmentExpression(node) {
1003
+ const left = node.left;
1004
+ if (isStyleAssignmentTarget(left)) found ??= `style.${left.property.name}`;
1005
+ }
1006
+ });
1007
+ return found;
1008
+ }
1009
+ function isObjectProperty(prop) {
1010
+ return prop?.type === "ObjectProperty" || prop?.type === "Property";
1011
+ }
1012
+ function propKeyName(prop) {
1013
+ return prop?.key?.name ?? prop?.key?.value;
1014
+ }
1015
+ function findPropertyNode(varsArgNode, key) {
1016
+ if (varsArgNode?.type !== "ObjectExpression") return void 0;
1017
+ for (const prop of varsArgNode.properties ?? []) {
1018
+ if (!isObjectProperty(prop)) continue;
1019
+ if (propKeyName(prop) === key) return prop.value;
1020
+ }
1021
+ return void 0;
1022
+ }
1023
+ function extractRawPropertySource(varsArgNode, key, source) {
1024
+ const node = findPropertyNode(varsArgNode, key);
1025
+ return node ? source.slice(node.start, node.end) : void 0;
1026
+ }
1027
+ function objectExpressionToRecord(node, scope, source) {
1028
+ const result = {};
1029
+ if (node?.type !== "ObjectExpression") return result;
1030
+ for (const prop of node.properties ?? []) {
1031
+ if (!isObjectProperty(prop)) continue;
1032
+ const key = prop.key?.name ?? prop.key?.value;
1033
+ if (!key) continue;
1034
+ const resolved = resolveNode(prop.value, scope);
1035
+ if (resolved !== void 0) {
1036
+ result[key] = resolved;
1037
+ } else {
1038
+ result[key] = `__raw:${source.slice(prop.value.start, prop.value.end)}`;
1039
+ }
1040
+ }
1041
+ return result;
1042
+ }
1043
+ function isGsapTimelineCall(node) {
1044
+ return node?.type === "CallExpression" && node.callee?.type === "MemberExpression" && node.callee.object?.name === "gsap" && node.callee.property?.name === "timeline";
1045
+ }
1046
+ function hasUnknownDuration(varsNode, scope) {
1047
+ if (!varsNode) return false;
1048
+ if (varsNode.type !== "ObjectExpression") return true;
1049
+ const props = varsNode.properties ?? [];
1050
+ if (props.some((p) => p.type === "SpreadElement")) return true;
1051
+ const prop = props.find((p) => isObjectProperty(p) && propKeyName(p) === "duration");
1052
+ return prop !== void 0 && typeof resolveNode(prop.value, scope) !== "number";
1053
+ }
1054
+ function staticMemberKey(node) {
1055
+ if (!node || node.type !== "MemberExpression") return null;
1056
+ if (node.computed) {
1057
+ const p = node.property;
1058
+ if (p?.type === "Literal" && typeof p.value === "string") return p.value;
1059
+ return null;
1060
+ }
1061
+ return node.property?.type === "Identifier" ? node.property.name : null;
1062
+ }
1063
+ function isStaticMemberRef(node) {
1064
+ return node?.type === "MemberExpression" && staticMemberKey(node) !== null;
1065
+ }
1066
+ function sameMemberAccess(a, b) {
1067
+ if (a?.type !== "MemberExpression" || b?.type !== "MemberExpression") return false;
1068
+ if (staticMemberKey(a) !== staticMemberKey(b) || staticMemberKey(a) === null) return false;
1069
+ const ao = a.object;
1070
+ const bo = b.object;
1071
+ if (ao?.type === "Identifier" && bo?.type === "Identifier") return ao.name === bo.name;
1072
+ if (ao?.type === "MemberExpression" && bo?.type === "MemberExpression")
1073
+ return sameMemberAccess(ao, bo);
1074
+ return false;
1075
+ }
1076
+ function timelineRootSource(ref, script) {
1077
+ return ref.kind === "identifier" ? ref.name : script.slice(ref.node.start, ref.node.end);
1078
+ }
1079
+ function escapeRegExp(s) {
1080
+ return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1081
+ }
1082
+ function extractTimelineDefaults(callNode, scope) {
1083
+ const arg = callNode.arguments?.[0];
1084
+ if (!arg || arg.type !== "ObjectExpression") return void 0;
1085
+ const defaultsProp = arg.properties?.find(
1086
+ (p) => isObjectProperty(p) && propKeyName(p) === "defaults"
1087
+ );
1088
+ if (!defaultsProp?.value || defaultsProp.value.type !== "ObjectExpression") return void 0;
1089
+ const result = {};
1090
+ for (const prop of defaultsProp.value.properties ?? []) {
1091
+ if (!isObjectProperty(prop)) continue;
1092
+ const key = propKeyName(prop);
1093
+ const val = resolveNode(prop.value, scope);
1094
+ if (key === "ease" && typeof val === "string") result.ease = val;
1095
+ if (key === "duration") {
1096
+ if (typeof val === "number") result.duration = val;
1097
+ else result.durationUnresolved = true;
1098
+ }
1099
+ }
1100
+ return Object.keys(result).length > 0 ? result : void 0;
1101
+ }
1102
+ function findTimelineVar(ast, scope) {
1103
+ let timelineVar = null;
1104
+ let ref = null;
1105
+ let timelineCount = 0;
1106
+ let defaults;
1107
+ const emptyScope = scope ?? /* @__PURE__ */ new Map();
1108
+ simple(ast, {
1109
+ VariableDeclarator(node) {
1110
+ if (isGsapTimelineCall(node.init)) {
1111
+ timelineCount += 1;
1112
+ if (!ref && node.id?.type === "Identifier") {
1113
+ timelineVar = node.id.name;
1114
+ ref = { kind: "identifier", name: node.id.name };
1115
+ defaults = extractTimelineDefaults(node.init, emptyScope);
1116
+ }
1117
+ }
1118
+ },
1119
+ AssignmentExpression(node) {
1120
+ if (isGsapTimelineCall(node.right)) {
1121
+ timelineCount += 1;
1122
+ if (!ref) {
1123
+ const left = node.left;
1124
+ if (left?.type === "Identifier") {
1125
+ timelineVar = left.name;
1126
+ ref = { kind: "identifier", name: left.name };
1127
+ defaults = extractTimelineDefaults(node.right, emptyScope);
1128
+ } else if (isStaticMemberRef(left)) {
1129
+ ref = { kind: "member", node: left };
1130
+ defaults = extractTimelineDefaults(node.right, emptyScope);
1131
+ }
1132
+ }
1133
+ }
1134
+ }
1135
+ });
1136
+ return { timelineVar, ref, timelineCount, defaults };
1137
+ }
1138
+ function isTimelineRootedCall(callNode, ref) {
1139
+ let obj = callNode.callee?.object;
1140
+ while (obj?.type === "CallExpression") {
1141
+ obj = obj.callee?.object;
1142
+ }
1143
+ if (ref.kind === "identifier") return obj?.type === "Identifier" && obj.name === ref.name;
1144
+ return sameMemberAccess(obj, ref.node);
1145
+ }
1146
+ function findAllTweenCalls(ast, ref, scope, targetBindings) {
1147
+ const results = [];
1148
+ function visit(node, ancestors) {
1149
+ if (!node || typeof node !== "object") return;
1150
+ const nodeAncestors = [...ancestors, node];
1151
+ if (node.type === "CallExpression") {
1152
+ const callee = node.callee;
1153
+ const gsapSetArg = node.arguments?.[0];
1154
+ const isGlobalSet = callee?.type === "MemberExpression" && callee.object?.type === "Identifier" && callee.object.name === "gsap" && callee.property?.type === "Identifier" && callee.property.name === "set" && (gsapSetArg?.type === "StringLiteral" || gsapSetArg?.type === "Literal" && typeof gsapSetArg.value === "string");
1155
+ if (callee?.type === "MemberExpression" && callee.property?.type === "Identifier" && (isTimelineRootedCall(node, ref) || isGlobalSet) && GSAP_METHODS2.has(callee.property.name)) {
1156
+ const method = callee.property.name;
1157
+ const args = node.arguments;
1158
+ const selectorValue = args.length >= 1 ? resolveTargetSelector(args[0], nodeAncestors, scope, targetBindings) ?? "__unresolved__" : "__unresolved__";
1159
+ const partial = hasUnresolvedArrayPart(args[0], nodeAncestors, scope, targetBindings) ? { selectorPartial: true } : {};
1160
+ if (method === "fromTo" && args.length >= 3) {
1161
+ results.push({
1162
+ node,
1163
+ ancestors: nodeAncestors,
1164
+ method: "fromTo",
1165
+ selector: selectorValue,
1166
+ ...partial,
1167
+ fromArg: args[1],
1168
+ varsArg: args[2],
1169
+ positionArg: args[3]
1170
+ });
1171
+ } else if (method !== "fromTo" && args.length >= 2) {
1172
+ results.push({
1173
+ node,
1174
+ ancestors: nodeAncestors,
1175
+ method,
1176
+ selector: selectorValue,
1177
+ ...partial,
1178
+ varsArg: args[1],
1179
+ positionArg: args[2],
1180
+ ...isGlobalSet ? { global: true } : {}
1181
+ });
1182
+ }
1183
+ }
1184
+ }
1185
+ for (const key of Object.keys(node)) {
1186
+ if (key === "type" || key === "start" || key === "end" || key === "loc") continue;
1187
+ const child = node[key];
1188
+ if (Array.isArray(child)) {
1189
+ for (const item of child) {
1190
+ if (item && typeof item === "object" && item.type) visit(item, nodeAncestors);
1191
+ }
1192
+ } else if (child && typeof child === "object" && child.type) {
1193
+ visit(child, nodeAncestors);
1194
+ }
1195
+ }
1196
+ }
1197
+ visit(ast, []);
1198
+ return results;
1199
+ }
1200
+ var PERCENTAGE_KEY_RE = /^(\d+(?:\.\d+)?)%$/;
1201
+ function tryResolveStringProp(propValue, scope, source) {
1202
+ const val = resolveNode(propValue, scope);
1203
+ if (typeof val === "string") return val;
1204
+ return source === void 0 ? void 0 : `__raw:${source.slice(propValue.start, propValue.end)}`;
1205
+ }
1206
+ function parsePercentageKeyframes(node, scope, source) {
1207
+ const keyframes = [];
1208
+ let ease;
1209
+ let easeEach;
1210
+ for (const prop of node.properties ?? []) {
1211
+ if (prop.type !== "ObjectProperty" && prop.type !== "Property") continue;
1212
+ const key = prop.key?.value ?? prop.key?.name;
1213
+ if (typeof key !== "string") continue;
1214
+ const pctMatch = PERCENTAGE_KEY_RE.exec(key);
1215
+ if (pctMatch) {
1216
+ if (!isPlainStep(prop.value)) return void 0;
1217
+ const percentage = Number.parseFloat(pctMatch[1] ?? "0");
1218
+ const record = objectExpressionToRecord(prop.value, scope, source);
1219
+ const properties = {};
1220
+ let kfEase;
1221
+ for (const [k, v] of Object.entries(record)) {
1222
+ if (k === "ease" && typeof v === "string") {
1223
+ kfEase = v;
1224
+ } else if (k === "duration") {
1225
+ continue;
1226
+ } else if (typeof v === "number" || typeof v === "string") {
1227
+ properties[k] = v;
1228
+ }
1229
+ }
1230
+ keyframes.push({ percentage, properties, ...kfEase ? { ease: kfEase } : {} });
1231
+ } else if (key === "ease") {
1232
+ ease = tryResolveStringProp(prop.value, scope, source) ?? ease;
1233
+ } else if (key === "easeEach") {
1234
+ easeEach = tryResolveStringProp(prop.value, scope, source) ?? easeEach;
1235
+ } else {
1236
+ return void 0;
1237
+ }
1238
+ }
1239
+ keyframes.sort((a, b) => a.percentage - b.percentage);
1240
+ return {
1241
+ format: "percentage",
1242
+ keyframes,
1243
+ ...ease ? { ease } : {},
1244
+ ...easeEach ? { easeEach } : {}
1245
+ };
1246
+ }
1247
+ function computeKeyframesTotalDuration(varsNode, scope, source) {
1248
+ const kfNode = (varsNode.properties ?? []).find(
1249
+ (p) => (p.key?.name ?? p.key?.value) === "keyframes"
1250
+ )?.value;
1251
+ if (!kfNode || kfNode.type !== "ArrayExpression") return void 0;
1252
+ const durations = [];
1253
+ for (const el of kfNode.elements ?? []) {
1254
+ if (!el || el.type !== "ObjectExpression") continue;
1255
+ const r = objectExpressionToRecord(el, scope, source);
1256
+ durations.push(r.duration);
1257
+ }
1258
+ return getObjectArrayKeyframeTiming(durations)?.totalDuration;
1259
+ }
1260
+ function staticKeyName(prop) {
1261
+ if (prop.type !== "ObjectProperty" && prop.type !== "Property") return void 0;
1262
+ if (prop.method || prop.kind && prop.kind !== "init") return void 0;
1263
+ const key = prop.computed ? prop.key?.type === "Literal" && prop.key.value : prop.key?.name ?? prop.key?.value;
1264
+ return typeof key === "string" ? key : void 0;
1265
+ }
1266
+ var isPlainObject = (node) => node?.type === "ObjectExpression" && (node.properties ?? []).every((p) => staticKeyName(p) !== void 0);
1267
+ var isPlainStep = (node) => node?.type === "Literal" || isPlainObject(node);
1268
+ function parseObjectArrayKeyframes(node, scope, source) {
1269
+ const elements = node.elements ?? [];
1270
+ const raw = [];
1271
+ for (const el of elements) {
1272
+ if (!isPlainObject(el)) return void 0;
1273
+ const record = objectExpressionToRecord(el, scope, source);
1274
+ const properties = {};
1275
+ let duration;
1276
+ let ease;
1277
+ for (const [k, v] of Object.entries(record)) {
1278
+ if (k === "duration") {
1279
+ duration = v;
1280
+ } else if (k === "ease" && typeof v === "string") {
1281
+ ease = v;
1282
+ } else if (typeof v === "number" || typeof v === "string") {
1283
+ properties[k] = v;
1284
+ } else {
1285
+ return void 0;
1286
+ }
1287
+ }
1288
+ raw.push({ properties, duration, ease });
1289
+ }
1290
+ const timing = getObjectArrayKeyframeTiming(raw.map((entry) => entry.duration));
1291
+ if (!timing) return void 0;
1292
+ const keyframes = raw.map((entry, index) => ({
1293
+ percentage: timing.percentages[index],
1294
+ properties: entry.properties,
1295
+ ...entry.ease ? { ease: entry.ease } : {}
1296
+ }));
1297
+ return { format: "object-array", keyframes };
1298
+ }
1299
+ function parseSimpleArrayKeyframes(node, scope) {
1300
+ const arrayProps = /* @__PURE__ */ new Map();
1301
+ let ease;
1302
+ let easeEach;
1303
+ for (const prop of node.properties ?? []) {
1304
+ if (prop.type !== "ObjectProperty" && prop.type !== "Property") continue;
1305
+ const key = prop.key?.name ?? prop.key?.value;
1306
+ if (typeof key !== "string") continue;
1307
+ if (prop.value?.type === "ArrayExpression") {
1308
+ const values = [];
1309
+ for (const el of prop.value.elements ?? []) {
1310
+ const val = resolveNode(el, scope);
1311
+ if (typeof val !== "number" && typeof val !== "string") return void 0;
1312
+ values.push(val);
1313
+ }
1314
+ if (values.length > 0) arrayProps.set(key, values);
1315
+ } else if (key === "ease") {
1316
+ ease = tryResolveStringProp(prop.value, scope) ?? ease;
1317
+ } else if (key === "easeEach") {
1318
+ easeEach = tryResolveStringProp(prop.value, scope) ?? easeEach;
1319
+ }
1320
+ }
1321
+ const maxLen = Math.max(...[...arrayProps.values()].map((a) => a.length), 0);
1322
+ const keyframes = [];
1323
+ for (let i = 0; i < maxLen; i++) {
1324
+ const percentage = maxLen > 1 ? Math.round(i / (maxLen - 1) * 100) : 0;
1325
+ const properties = {};
1326
+ for (const [key, values] of arrayProps) {
1327
+ if (i < values.length) properties[key] = values[i];
1328
+ }
1329
+ keyframes.push({ percentage, properties });
1330
+ }
1331
+ return {
1332
+ format: "simple-array",
1333
+ keyframes,
1334
+ ...ease ? { ease } : {},
1335
+ ...easeEach ? { easeEach } : {}
1336
+ };
1337
+ }
1338
+ function parseKeyframesNode(node, scope, source) {
1339
+ if (!node) return void 0;
1340
+ if (node.type === "ArrayExpression") {
1341
+ return parseObjectArrayKeyframes(node, scope, source);
1342
+ }
1343
+ if (node.type !== "ObjectExpression") return void 0;
1344
+ const props = node.properties ?? [];
1345
+ if (!props.every((p) => staticKeyName(p) !== void 0)) return void 0;
1346
+ let hasPercentageKey = false;
1347
+ let hasArrayValue = false;
1348
+ for (const prop of props) {
1349
+ if (prop.type !== "ObjectProperty" && prop.type !== "Property") continue;
1350
+ const key = prop.key?.value ?? prop.key?.name;
1351
+ if (typeof key === "string" && PERCENTAGE_KEY_RE.test(key)) {
1352
+ hasPercentageKey = true;
1353
+ break;
1354
+ }
1355
+ if (prop.value?.type === "ArrayExpression") {
1356
+ hasArrayValue = true;
1357
+ }
1358
+ }
1359
+ if (hasPercentageKey) return parsePercentageKeyframes(node, scope, source);
1360
+ if (hasArrayValue) return parseSimpleArrayKeyframes(node, scope);
1361
+ return void 0;
1362
+ }
1363
+ function parseMotionPathNode(node, scope, source) {
1364
+ if (!node) return void 0;
1365
+ let pathNode;
1366
+ let autoRotate = false;
1367
+ let curviness = 1;
1368
+ let isCubic = false;
1369
+ if (node.type === "ObjectExpression") {
1370
+ for (const prop of node.properties ?? []) {
1371
+ if (!isObjectProperty(prop)) continue;
1372
+ const key = propKeyName(prop);
1373
+ if (key === "path") pathNode = prop.value;
1374
+ else if (key === "autoRotate") {
1375
+ const val = resolveNode(prop.value, scope);
1376
+ autoRotate = typeof val === "number" ? val : val === true;
1377
+ } else if (key === "curviness") {
1378
+ const val = resolveNode(prop.value, scope);
1379
+ if (typeof val === "number") curviness = val;
1380
+ } else if (key === "type") {
1381
+ const val = resolveNode(prop.value, scope);
1382
+ if (val === "cubic") isCubic = true;
1383
+ }
1384
+ }
1385
+ } else if (node.type === "ArrayExpression") {
1386
+ pathNode = node;
1387
+ }
1388
+ if (!pathNode || pathNode.type !== "ArrayExpression") return void 0;
1389
+ const elements = pathNode.elements ?? [];
1390
+ const coords = [];
1391
+ for (const elem of elements) {
1392
+ if (!elem || elem.type !== "ObjectExpression") continue;
1393
+ const rec = objectExpressionToRecord(elem, scope, source);
1394
+ const x = typeof rec.x === "number" ? rec.x : void 0;
1395
+ const y = typeof rec.y === "number" ? rec.y : void 0;
1396
+ if (x !== void 0 && y !== void 0) coords.push({ x, y });
1397
+ }
1398
+ return buildArcPath(coords, curviness, autoRotate, isCubic);
1399
+ }
1400
+ function tweenCallToAnimation(call, scope, source, identifierBindings) {
1401
+ const provenance = readProvenance(call.node);
1402
+ const vars = objectExpressionToRecord(call.varsArg, scope, source);
1403
+ const properties = {};
1404
+ const extras = {};
1405
+ let keyframesData;
1406
+ let hasUnresolvedKeyframes = false;
1407
+ let motionPathResult;
1408
+ for (const [key, val] of Object.entries(vars)) {
1409
+ if (BUILTIN_VAR_KEYS.has(key)) continue;
1410
+ if (DROPPED_VAR_KEYS.has(key)) continue;
1411
+ if (key === "keyframes") {
1412
+ const kfNode = findPropertyNode(call.varsArg, "keyframes");
1413
+ keyframesData = parseKeyframesNode(kfNode, scope, source);
1414
+ if (!keyframesData && kfNode) hasUnresolvedKeyframes = true;
1415
+ continue;
1416
+ }
1417
+ if (key === "motionPath") {
1418
+ const mpNode = findPropertyNode(call.varsArg, "motionPath");
1419
+ motionPathResult = parseMotionPathNode(mpNode, scope, source);
1420
+ continue;
1421
+ }
1422
+ if (key === "easeEach") continue;
1423
+ if (EXTRAS_KEYS.has(key)) {
1424
+ const rawSource = extractRawPropertySource(call.varsArg, key, source);
1425
+ if (rawSource !== void 0) {
1426
+ extras[key] = `__raw:${rawSource}`;
1427
+ } else if (val !== void 0) {
1428
+ extras[key] = val;
1429
+ }
1430
+ continue;
1431
+ }
1432
+ if (typeof val === "number" || typeof val === "string") {
1433
+ properties[key] = val;
1434
+ }
1435
+ }
1436
+ if (keyframesData && typeof vars.easeEach === "string") {
1437
+ keyframesData.easeEach = vars.easeEach;
1438
+ }
1439
+ if (motionPathResult) {
1440
+ const { waypoints } = motionPathResult;
1441
+ if (!keyframesData) {
1442
+ const kf = waypoints.map((wp, i) => ({
1443
+ percentage: waypoints.length > 1 ? Math.round(i / (waypoints.length - 1) * 100) : 0,
1444
+ properties: { x: wp.x, y: wp.y }
1445
+ }));
1446
+ keyframesData = { format: "percentage", keyframes: kf, fromMotionPath: true };
1447
+ } else {
1448
+ const kfs = keyframesData.keyframes;
1449
+ if (kfs.length === waypoints.length) {
1450
+ for (let i = 0; i < kfs.length; i++) {
1451
+ const kf = kfs[i];
1452
+ const wp = waypoints[i];
1453
+ if (kf && wp) {
1454
+ kf.properties.x = wp.x;
1455
+ kf.properties.y = wp.y;
1456
+ }
1457
+ }
1458
+ }
1459
+ }
1460
+ }
1461
+ let fromProperties;
1462
+ if (call.method === "fromTo" && call.fromArg) {
1463
+ fromProperties = {};
1464
+ const fromVars = objectExpressionToRecord(call.fromArg, scope, source);
1465
+ for (const [key, val] of Object.entries(fromVars)) {
1466
+ if (typeof val === "number" || typeof val === "string") {
1467
+ fromProperties[key] = val;
1468
+ }
1469
+ }
1470
+ }
1471
+ const hasPositionArg = !!call.positionArg;
1472
+ const posVal = hasPositionArg ? extractLiteralValue(call.positionArg, scope) : 0;
1473
+ const position = typeof posVal === "number" ? posVal : typeof posVal === "string" ? posVal : hasPositionArg ? `__raw:${source.slice(call.positionArg.start, call.positionArg.end)}` : 0;
1474
+ let duration = typeof vars.duration === "number" ? vars.duration : void 0;
1475
+ const ease = typeof vars.ease === "string" ? vars.ease : void 0;
1476
+ const durationUnresolved = call.method !== "set" && duration === void 0 && hasUnknownDuration(call.varsArg, scope);
1477
+ if (duration === void 0 && keyframesData && !durationUnresolved) {
1478
+ duration = computeKeyframesTotalDuration(call.varsArg, scope, source);
1479
+ }
1480
+ let selector = call.selector;
1481
+ let targetIdentity;
1482
+ if (selector === "__unresolved__") {
1483
+ const targetNode = call.node.arguments?.[0];
1484
+ const proxyLabel = describeProxyTarget(targetNode, call.varsArg, scope);
1485
+ if (proxyLabel) {
1486
+ selector = proxyLabel;
1487
+ if (targetNode?.type === "Identifier") {
1488
+ const declaration = findVisibleIdentifierDeclaration(
1489
+ targetNode.name,
1490
+ call.ancestors,
1491
+ identifierBindings,
1492
+ call.node.start
1493
+ );
1494
+ if (declaration?.node.init?.type === "ObjectExpression" && !identifierBindings.reassignedDeclarations.has(declaration.node)) {
1495
+ const declarationProvenance = readProvenance(declaration.scopeNode) ?? readProvenance(declaration.expandedScopeNode);
1496
+ const instanceIdentity = declarationProvenance && (declarationProvenance.kind === "helper" || declarationProvenance.kind === "loop") ? `:${declarationProvenance.kind}:${declarationProvenance.callSite ?? ""}:${declarationProvenance.iteration ?? ""}` : "";
1497
+ targetIdentity = `proxy:${targetNode.name}@${declaration.node.start}${instanceIdentity}`;
1498
+ }
1499
+ }
1500
+ }
1501
+ }
1502
+ const anim = {
1503
+ targetSelector: selector,
1504
+ method: call.method,
1505
+ position,
1506
+ properties,
1507
+ fromProperties,
1508
+ duration,
1509
+ ease
1510
+ };
1511
+ if (targetIdentity) anim.targetIdentity = targetIdentity;
1512
+ if (!hasPositionArg) anim.implicitPosition = true;
1513
+ let group = classifyTweenPropertyGroup(properties);
1514
+ if (!group && keyframesData) {
1515
+ const kfProps = {};
1516
+ for (const kf of keyframesData.keyframes) {
1517
+ for (const k of Object.keys(kf.properties)) kfProps[k] = true;
1518
+ }
1519
+ group = classifyTweenPropertyGroup(kfProps);
1520
+ }
1521
+ if (group) anim.propertyGroup = group;
1522
+ if (call.global) anim.global = true;
1523
+ if (Object.keys(extras).length > 0) anim.extras = extras;
1524
+ if (keyframesData) anim.keyframes = keyframesData;
1525
+ if (motionPathResult) anim.arcPath = motionPathResult.arcPath;
1526
+ if (hasUnresolvedKeyframes) anim.hasUnresolvedKeyframes = true;
1527
+ if (durationUnresolved) anim.durationUnresolved = true;
1528
+ if (selector === "__unresolved__") anim.hasUnresolvedSelector = true;
1529
+ if (call.selectorPartial) anim.hasPartialSelector = true;
1530
+ if (provenance) anim.provenance = provenance;
1531
+ return anim;
1532
+ }
1533
+ function staggerAmount(raw) {
1534
+ if (typeof raw === "number") return raw;
1535
+ if (typeof raw !== "string") return void 0;
1536
+ const src = raw.startsWith("__raw:") ? raw.slice(6) : raw;
1537
+ const m = /(?:each\s*:\s*)?(-?\d+(?:\.\d+)?)/.exec(src);
1538
+ if (!m) return void 0;
1539
+ const n = Number.parseFloat(m[1]);
1540
+ return Number.isFinite(n) ? n : void 0;
1541
+ }
1542
+ function restValue(prop) {
1543
+ return prop === "opacity" || prop.startsWith("scale") ? 1 : 0;
1544
+ }
1545
+ function staggeredKeyframes(anim, each) {
1546
+ const vars = { ...anim.properties };
1547
+ let from;
1548
+ let to;
1549
+ if (anim.method === "fromTo") {
1550
+ from = { ...anim.fromProperties ?? {} };
1551
+ to = vars;
1552
+ } else if (anim.method === "from") {
1553
+ from = vars;
1554
+ to = {};
1555
+ for (const k of Object.keys(vars)) to[k] = restValue(k);
1556
+ } else {
1557
+ from = { ...anim.fromProperties ?? {} };
1558
+ for (const k of Object.keys(vars)) if (from[k] === void 0) from[k] = restValue(k);
1559
+ to = vars;
1560
+ }
1561
+ return [
1562
+ { percentage: 0, properties: { ...from, stagger: each } },
1563
+ { percentage: 100, properties: { ...to, stagger: each } }
1564
+ ];
1565
+ }
1566
+ function annotateStaggeredCollections(anims) {
1567
+ for (const anim of anims) {
1568
+ if (anim.keyframes || anim.arcPath) continue;
1569
+ const each = staggerAmount(anim.extras?.stagger);
1570
+ if (each === void 0) continue;
1571
+ anim.keyframes = { format: "percentage", keyframes: staggeredKeyframes(anim, each) };
1572
+ }
1573
+ }
1574
+ function resolvePositionString(pos, cursor, prevStart) {
1575
+ const trimmed = pos.trim();
1576
+ if (trimmed === "") return cursor;
1577
+ if (trimmed.startsWith("+=")) {
1578
+ const n2 = Number.parseFloat(trimmed.slice(2));
1579
+ return Number.isFinite(n2) ? cursor + n2 : null;
1580
+ }
1581
+ if (trimmed.startsWith("-=")) {
1582
+ const n2 = Number.parseFloat(trimmed.slice(2));
1583
+ return Number.isFinite(n2) ? cursor - n2 : null;
1584
+ }
1585
+ if (trimmed === "<") return prevStart;
1586
+ if (trimmed === ">") return cursor;
1587
+ if (trimmed.startsWith("<")) {
1588
+ const n2 = Number.parseFloat(trimmed.slice(1));
1589
+ return Number.isFinite(n2) ? prevStart + n2 : null;
1590
+ }
1591
+ if (trimmed.startsWith(">")) {
1592
+ const n2 = Number.parseFloat(trimmed.slice(1));
1593
+ return Number.isFinite(n2) ? cursor + n2 : null;
1594
+ }
1595
+ const n = Number.parseFloat(trimmed);
1596
+ return Number.isFinite(n) ? n : null;
1597
+ }
1598
+ function collectGsapSetStates(ast, scope, bindings, source) {
1599
+ const states = /* @__PURE__ */ new Map();
1600
+ ancestor(ast, {
1601
+ // fallow-ignore-next-line complexity
1602
+ CallExpression(node, _, ancestors) {
1603
+ const callee = node.callee;
1604
+ if (callee?.type !== "MemberExpression" || callee.object?.name !== "gsap" || callee.property?.name !== "set")
1605
+ return;
1606
+ const selector = resolveTargetSelector(node.arguments?.[0], ancestors, scope, bindings);
1607
+ if (!selector) return;
1608
+ const rec = objectExpressionToRecord(node.arguments?.[1], scope, source);
1609
+ const props = states.get(selector) ?? {};
1610
+ for (const [k, v] of Object.entries(rec)) {
1611
+ if (typeof v === "number" || typeof v === "string") props[k] = v;
1612
+ }
1613
+ states.set(selector, props);
1614
+ }
1615
+ });
1616
+ return states;
1617
+ }
1618
+ function mergeProps(target, props) {
1619
+ for (const [k, v] of Object.entries(props)) target[k] = v;
1620
+ return target;
1621
+ }
1622
+ function seedFromPreState(anim, cur) {
1623
+ const from = { ...anim.fromProperties ?? {} };
1624
+ let seeded = false;
1625
+ for (const prop of Object.keys(anim.properties)) {
1626
+ if (from[prop] === void 0 && cur[prop] !== void 0) {
1627
+ from[prop] = cur[prop];
1628
+ seeded = true;
1629
+ }
1630
+ }
1631
+ if (seeded) anim.fromProperties = from;
1632
+ }
1633
+ function seedSetStates(anims, initial) {
1634
+ const state = /* @__PURE__ */ new Map();
1635
+ for (const [sel, props] of initial) state.set(sel, { ...props });
1636
+ for (const anim of anims) {
1637
+ const sel = anim.targetSelector;
1638
+ if (anim.method === "set") {
1639
+ state.set(sel, mergeProps(state.get(sel) ?? {}, anim.properties));
1640
+ continue;
1641
+ }
1642
+ const cur = state.get(sel);
1643
+ if (anim.method === "to" && cur) seedFromPreState(anim, cur);
1644
+ state.set(sel, mergeProps(state.get(sel) ?? {}, anim.properties));
1645
+ }
1646
+ }
1647
+ function applyTimelineDefaults(anims, defaults) {
1648
+ if (!defaults) return;
1649
+ for (const anim of anims) {
1650
+ if (anim.method === "set") continue;
1651
+ if (anim.duration === void 0 && !anim.durationUnresolved) {
1652
+ if (defaults.duration !== void 0) anim.duration = defaults.duration;
1653
+ else if (defaults.durationUnresolved) anim.durationUnresolved = true;
1654
+ }
1655
+ if (anim.ease === void 0 && defaults.ease !== void 0 && (!anim.keyframes || anim.keyframes.fromMotionPath)) {
1656
+ anim.ease = defaults.ease;
1657
+ }
1658
+ }
1659
+ }
1660
+ function resolveLabelPosition(pos, labels, cursor) {
1661
+ const m = /^([A-Za-z_$][\w$]*)\s*(?:([+-])=\s*([\d.]+))?$/.exec(pos.trim());
1662
+ if (!m) return null;
1663
+ const name = m[1];
1664
+ let base = labels.get(name);
1665
+ if (base === void 0) {
1666
+ base = cursor;
1667
+ labels.set(name, base);
1668
+ }
1669
+ if (m[2] && m[3]) {
1670
+ const n = Number.parseFloat(m[3]);
1671
+ if (Number.isFinite(n)) return m[2] === "+" ? base + n : base - n;
1672
+ }
1673
+ return base;
1674
+ }
1675
+ function resolveAnimStart(anim, cursor, prevStart, labels) {
1676
+ if (anim.implicitPosition) return cursor;
1677
+ if (typeof anim.position === "number") return anim.position;
1678
+ if (typeof anim.position === "string") {
1679
+ return resolveLabelPosition(anim.position, labels, cursor) ?? resolvePositionString(anim.position, cursor, prevStart);
1680
+ }
1681
+ return cursor;
1682
+ }
1683
+ function resolveTimelinePositions(anims, labelDefs = []) {
1684
+ let cursor = 0;
1685
+ let prevStart = 0;
1686
+ let cursorKnown = true;
1687
+ const labels = /* @__PURE__ */ new Map();
1688
+ let labelIdx = 0;
1689
+ const sortedLabels = [...labelDefs].sort((a, b) => a.order - b.order);
1690
+ const defineLabel = (def) => {
1691
+ let value;
1692
+ if (typeof def.position === "number") value = def.position;
1693
+ else if (!cursorKnown) return;
1694
+ else if (typeof def.position === "string") {
1695
+ value = resolveLabelPosition(def.position, labels, cursor) ?? cursor;
1696
+ } else value = cursor;
1697
+ labels.set(def.name, Math.max(0, value));
1698
+ };
1699
+ anims.forEach((anim, i) => {
1700
+ while (labelIdx < sortedLabels.length && sortedLabels[labelIdx].order <= i) {
1701
+ defineLabel(sortedLabels[labelIdx]);
1702
+ labelIdx++;
1703
+ }
1704
+ if (anim.method === "set" && anim.global) {
1705
+ anim.resolvedStart = 0;
1706
+ return;
1707
+ }
1708
+ const duration = anim.method === "set" ? 0 : anim.duration ?? GSAP_DEFAULT_DURATION;
1709
+ const readsCursor = anim.implicitPosition || typeof anim.position !== "number";
1710
+ const start = cursorKnown || !readsCursor ? resolveAnimStart(anim, cursor, prevStart, labels) : null;
1711
+ if (start == null || anim.durationUnresolved) cursorKnown = false;
1712
+ if (start != null) {
1713
+ anim.resolvedStart = Math.max(0, start);
1714
+ prevStart = anim.resolvedStart;
1715
+ cursor = Math.max(cursor, anim.resolvedStart + duration);
1716
+ }
1717
+ });
1718
+ while (labelIdx < sortedLabels.length) defineLabel(sortedLabels[labelIdx++]);
1719
+ }
1720
+ function collectAddLabelDefs(ast, ref, scope, sortedCalls) {
1721
+ const callKeys = sortedCalls.map((c) => ({
1722
+ site: callSiteStart(c),
1723
+ order: c.node.__hfOrder
1724
+ }));
1725
+ const comesAfter = (site, order, labelSite, labelOrder) => {
1726
+ if (site === void 0) return false;
1727
+ if (site !== labelSite) return site > labelSite;
1728
+ return (order ?? -Infinity) > (labelOrder ?? -Infinity);
1729
+ };
1730
+ const defs = [];
1731
+ simple(ast, {
1732
+ // fallow-ignore-next-line complexity
1733
+ CallExpression(node) {
1734
+ const callee = node.callee;
1735
+ const objMatches = ref.kind === "identifier" ? callee.object?.type === "Identifier" && callee.object.name === ref.name : sameMemberAccess(callee.object, ref.node);
1736
+ if (callee?.type !== "MemberExpression" || !objMatches || callee.property?.name !== "addLabel")
1737
+ return;
1738
+ const nameNode = node.arguments?.[0];
1739
+ const name = typeof nameNode?.value === "string" ? nameNode.value : void 0;
1740
+ if (!name) return;
1741
+ const posVal = resolveNode(node.arguments?.[1], scope);
1742
+ const position = typeof posVal === "number" || typeof posVal === "string" ? posVal : void 0;
1743
+ const labelStart = node.__hfSiteStart ?? callee.property?.start;
1744
+ const labelOrder = node.__hfOrder;
1745
+ let order = sortedCalls.length;
1746
+ if (labelStart !== void 0) {
1747
+ order = callKeys.findIndex((k) => comesAfter(k.site, k.order, labelStart, labelOrder));
1748
+ if (order === -1) order = sortedCalls.length;
1749
+ }
1750
+ defs.push({ name, position, order });
1751
+ }
1752
+ });
1753
+ return defs;
1754
+ }
1755
+ function compareByLoc(a, b) {
1756
+ const aLoc = a.node.callee?.property?.loc?.start;
1757
+ const bLoc = b.node.callee?.property?.loc?.start;
1758
+ if (!aLoc || !bLoc) return 0;
1759
+ return aLoc.line - bLoc.line || aLoc.column - bLoc.column;
1760
+ }
1761
+ function callSiteStart(call) {
1762
+ return call.node.__hfSiteStart ?? call.node.callee?.property?.start;
1763
+ }
1764
+ function compareCallOrder(a, b) {
1765
+ const aSite = callSiteStart(a);
1766
+ const bSite = callSiteStart(b);
1767
+ if (aSite !== void 0 && bSite !== void 0 && aSite !== bSite) return aSite - bSite;
1768
+ const ao = a.node.__hfOrder;
1769
+ const bo = b.node.__hfOrder;
1770
+ if (ao !== void 0 && bo !== void 0) return ao - bo;
1771
+ return compareByLoc(a, b);
1772
+ }
1773
+ function sortBySourcePosition(calls) {
1774
+ calls.sort(compareCallOrder);
1775
+ }
1776
+ function assignStableIds(anims) {
1777
+ const counts = /* @__PURE__ */ new Map();
1778
+ return anims.map((anim) => {
1779
+ const posKey = typeof anim.position === "number" ? String(Math.round(anim.position * 1e3)) : String(anim.position);
1780
+ const groupSuffix = anim.propertyGroup ? `-${anim.propertyGroup}` : "";
1781
+ const base = `${anim.targetSelector}-${anim.method}-${posKey}${groupSuffix}`;
1782
+ const count = (counts.get(base) ?? 0) + 1;
1783
+ counts.set(base, count);
1784
+ const id = count === 1 ? base : `${base}-${count}`;
1785
+ return { ...anim, id };
1786
+ });
1787
+ }
1788
+ function parseGsapScriptAcornForWrite(script) {
1789
+ try {
1790
+ const ast = parse(script, {
1791
+ ecmaVersion: "latest",
1792
+ sourceType: "script",
1793
+ locations: true
1794
+ });
1795
+ const scope = collectScopeBindings(ast);
1796
+ const identifierBindings = collectIdentifierBindingIndex(ast);
1797
+ const targetBindings = collectTargetBindings(ast, scope, identifierBindings);
1798
+ const detection = findTimelineVar(ast, scope);
1799
+ const ref = detection.ref ?? { kind: "identifier", name: "tl" };
1800
+ const timelineVar = timelineRootSource(ref, script);
1801
+ const calls = findAllTweenCalls(ast, ref, scope, targetBindings);
1802
+ sortBySourcePosition(calls);
1803
+ const rawAnims = calls.map(
1804
+ (call) => tweenCallToAnimation(call, scope, script, identifierBindings)
1805
+ );
1806
+ applyTimelineDefaults(rawAnims, detection.defaults);
1807
+ resolveTimelinePositions(rawAnims, collectAddLabelDefs(ast, ref, scope, calls));
1808
+ const animations = assignStableIds(rawAnims);
1809
+ const located = calls.map((call, i) => ({
1810
+ id: animations[i].id,
1811
+ call,
1812
+ animation: animations[i]
1813
+ }));
1814
+ return { ast, timelineVar, hasTimeline: detection.ref !== null, located };
1815
+ } catch {
1816
+ return null;
1817
+ }
1818
+ }
1819
+ var PARSE_MEMO_ENTRIES = 4;
1820
+ var parseMemo = /* @__PURE__ */ new Map();
1821
+ function findTimelineScript(scripts) {
1822
+ const text = (script) => script.textContent ?? "";
1823
+ return scripts.find((script) => text(script).includes("gsap.timeline")) ?? scripts.find((script) => /\.(set|to)\(/.test(text(script))) ?? null;
1824
+ }
1825
+ function parseGsapScriptAcorn(script) {
1826
+ const parsed = parseMemo.get(script) ?? parseGsapScriptAcornUncached(script);
1827
+ parseMemo.delete(script);
1828
+ parseMemo.set(script, parsed);
1829
+ if (parseMemo.size > PARSE_MEMO_ENTRIES) parseMemo.delete(parseMemo.keys().next().value);
1830
+ return structuredClone(parsed);
1831
+ }
1832
+ function parseGsapScriptAcornUncached(script) {
1833
+ try {
1834
+ const ast = parseProgram(script);
1835
+ const scope = collectScopeBindings(ast);
1836
+ const detection = findTimelineVar(ast, scope);
1837
+ const ref = detection.ref ?? { kind: "identifier", name: "tl" };
1838
+ const timelineVar = timelineRootSource(ref, script);
1839
+ if (ref.kind === "identifier") {
1840
+ try {
1841
+ inlineComputedTimelines(ast, timelineVar, (node) => resolveNode(node, scope));
1842
+ } catch {
1843
+ }
1844
+ }
1845
+ const identifierBindings = collectIdentifierBindingIndex(ast);
1846
+ const targetBindings = collectTargetBindings(ast, scope, identifierBindings);
1847
+ const calls = findAllTweenCalls(ast, ref, scope, targetBindings);
1848
+ sortBySourcePosition(calls);
1849
+ const rawAnims = calls.map(
1850
+ (call) => tweenCallToAnimation(call, scope, script, identifierBindings)
1851
+ );
1852
+ applyTimelineDefaults(rawAnims, detection.defaults);
1853
+ seedSetStates(rawAnims, collectGsapSetStates(ast, scope, targetBindings, script));
1854
+ const labelDefs = collectAddLabelDefs(ast, ref, scope, calls);
1855
+ resolveTimelinePositions(rawAnims, labelDefs);
1856
+ annotateStaggeredCollections(rawAnims);
1857
+ const animations = assignStableIds(rawAnims);
1858
+ const declPattern = ref.kind === "identifier" ? `(?:const|let|var)\\s+${timelineVar}\\s*=\\s*gsap\\.timeline\\s*\\([^)]*\\)\\s*;?` : `${escapeRegExp(timelineVar)}\\s*=\\s*gsap\\.timeline\\s*\\([^)]*\\)\\s*;?`;
1859
+ const timelineMatch = script.match(new RegExp(`^[\\s\\S]*?${declPattern}`));
1860
+ const fallbackPreamble = ref.kind === "identifier" ? `const ${timelineVar} = gsap.timeline({ paused: true });` : `${timelineVar} = gsap.timeline({ paused: true });`;
1861
+ const preamble = timelineMatch?.[0] ?? fallbackPreamble;
1862
+ const lastCallIdx = script.lastIndexOf(`${timelineVar}.`);
1863
+ let postamble = "";
1864
+ if (lastCallIdx !== -1) {
1865
+ const afterLast = script.slice(lastCallIdx);
1866
+ const endOfCall = afterLast.indexOf(";");
1867
+ if (endOfCall !== -1) {
1868
+ postamble = script.slice(lastCallIdx + endOfCall + 1).trim();
1869
+ }
1870
+ }
1871
+ const result = { animations, timelineVar, preamble, postamble };
1872
+ if (detection.timelineCount > 1) result.multipleTimelines = true;
1873
+ if (detection.timelineCount > 0 && detection.ref === null)
1874
+ result.unsupportedTimelinePattern = true;
1875
+ return result;
1876
+ } catch {
1877
+ return { animations: [], timelineVar: "tl", preamble: "", postamble: "" };
1878
+ }
1879
+ }
1880
+ function gsapScriptMotionPathFirstUseIndex(script) {
1881
+ try {
1882
+ const ast = parseProgram(script);
1883
+ const scope = collectScopeBindings(ast);
1884
+ const identifierBindings = collectIdentifierBindingIndex(ast);
1885
+ const timelineRef = findTimelineVar(ast, scope).ref;
1886
+ const timelineDeclarations = /* @__PURE__ */ new Set();
1887
+ let firstUseIndex = null;
1888
+ ancestor(ast, {
1889
+ VariableDeclarator(node) {
1890
+ if (node.id?.type === "Identifier" && isGsapTimelineCall(node.init)) {
1891
+ timelineDeclarations.add(node);
1892
+ }
1893
+ },
1894
+ AssignmentExpression(node, _, ancestors) {
1895
+ if (node.left?.type === "Identifier" && isGsapTimelineCall(node.right)) {
1896
+ const declaration = findVisibleIdentifierDeclaration(
1897
+ node.left.name,
1898
+ ancestors,
1899
+ identifierBindings,
1900
+ node.start
1901
+ );
1902
+ if (declaration) timelineDeclarations.add(declaration.node);
1903
+ }
1904
+ }
1905
+ });
1906
+ ancestor(ast, {
1907
+ CallExpression(node, _, ancestors) {
1908
+ const callee = node.callee;
1909
+ const method = callee?.property?.name;
1910
+ if (callee?.type !== "MemberExpression" || !GSAP_METHODS2.has(method)) return;
1911
+ let rootObject = callee.object;
1912
+ while (rootObject?.type === "CallExpression") rootObject = rootObject.callee?.object;
1913
+ const isGsapRooted = rootObject?.type === "Identifier" && rootObject.name === "gsap";
1914
+ const visibleTimelineDeclaration = rootObject?.type === "Identifier" ? findVisibleIdentifierDeclaration(
1915
+ rootObject.name,
1916
+ ancestors,
1917
+ identifierBindings,
1918
+ node.start
1919
+ ) : void 0;
1920
+ const isTimelineTween = (timelineRef?.kind === "member" ? isTimelineRootedCall(node, timelineRef) : false) || !!visibleTimelineDeclaration && timelineDeclarations.has(visibleTimelineDeclaration.node);
1921
+ if (!isGsapRooted && !isTimelineTween) return;
1922
+ const varsArgs = method === "fromTo" ? [node.arguments?.[1], node.arguments?.[2]] : [node.arguments?.[1]];
1923
+ if (varsArgs.some((varsArg) => {
1924
+ if (findPropertyNode(varsArg, "motionPath")) return true;
1925
+ if (varsArg?.type !== "Identifier") return false;
1926
+ const declaration = findVisibleIdentifierDeclaration(
1927
+ varsArg.name,
1928
+ ancestors,
1929
+ identifierBindings,
1930
+ node.start
1931
+ );
1932
+ return !!findPropertyNode(declaration?.node.init, "motionPath");
1933
+ }))
1934
+ firstUseIndex = firstUseIndex === null ? node.start : Math.min(firstUseIndex, node.start);
1935
+ }
1936
+ });
1937
+ return firstUseIndex;
1938
+ } catch {
1939
+ return null;
1940
+ }
1941
+ }
1942
+ function gsapScriptUsesMotionPath(script) {
1943
+ return gsapScriptMotionPathFirstUseIndex(script) !== null;
1944
+ }
1945
+ function extractGsapLabels(script) {
1946
+ try {
1947
+ const ast = parse(script, {
1948
+ ecmaVersion: "latest",
1949
+ sourceType: "script",
1950
+ locations: true
1951
+ });
1952
+ const scope = collectScopeBindings(ast);
1953
+ const detection = findTimelineVar(ast, scope);
1954
+ const ref = detection.ref ?? { kind: "identifier", name: "tl" };
1955
+ const labels = [];
1956
+ simple(ast, {
1957
+ // fallow-ignore-next-line complexity
1958
+ ExpressionStatement(node) {
1959
+ const expr = node.expression;
1960
+ if (!expr || expr.type !== "CallExpression") return;
1961
+ const callee = expr.callee;
1962
+ const objMatches = ref.kind === "identifier" ? callee.object?.type === "Identifier" && callee.object.name === ref.name : sameMemberAccess(callee.object, ref.node);
1963
+ if (callee?.type !== "MemberExpression" || !objMatches || callee.property?.name !== "addLabel")
1964
+ return;
1965
+ const args = expr.arguments ?? [];
1966
+ const nameNode = args[0];
1967
+ const posNode = args[1];
1968
+ if (nameNode?.type !== "Literal" || typeof nameNode.value !== "string") return;
1969
+ if (!posNode) return;
1970
+ const pos = resolveNode(posNode, scope);
1971
+ if (typeof pos !== "number" || !Number.isFinite(pos)) return;
1972
+ labels.push({ name: nameNode.value, position: pos });
1973
+ }
1974
+ });
1975
+ return labels;
1976
+ } catch {
1977
+ return [];
1978
+ }
1979
+ }
1980
+
1981
+ export {
1982
+ editabilityForProvenance,
1983
+ buildArcPath,
1984
+ parseGsapScriptAcornForWrite,
1985
+ findTimelineScript,
1986
+ parseGsapScriptAcorn,
1987
+ gsapScriptMotionPathFirstUseIndex,
1988
+ gsapScriptUsesMotionPath,
1989
+ extractGsapLabels
1990
+ };