@autoaiai/aicut 0.1.11 → 0.1.13

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 (1063) hide show
  1. package/MANUAL.md +94 -94
  2. package/package.json +1 -1
  3. package/skills/aicut-motion/SKILL.md +69 -3
  4. package/skills/aicut-motion/THIRD_PARTY_NOTICES.md +14 -0
  5. package/skills/aicut-motion/assets/atlas/lib/harness.js +116 -0
  6. package/skills/aicut-motion/assets/atlas/lib/sound.js +274 -0
  7. package/skills/aicut-motion/assets/atlas/styles/001-flat-vector-science/code.js +937 -0
  8. package/skills/aicut-motion/assets/atlas/styles/001-flat-vector-science/poster.jpg +0 -0
  9. package/skills/aicut-motion/assets/atlas/styles/001-flat-vector-science/style.json +13 -0
  10. package/skills/aicut-motion/assets/atlas/styles/002-watercolor-wash/code.js +909 -0
  11. package/skills/aicut-motion/assets/atlas/styles/002-watercolor-wash/poster.jpg +0 -0
  12. package/skills/aicut-motion/assets/atlas/styles/002-watercolor-wash/style.json +13 -0
  13. package/skills/aicut-motion/assets/atlas/styles/003-shadow-puppet-theatre/code.js +881 -0
  14. package/skills/aicut-motion/assets/atlas/styles/003-shadow-puppet-theatre/poster.jpg +0 -0
  15. package/skills/aicut-motion/assets/atlas/styles/003-shadow-puppet-theatre/style.json +13 -0
  16. package/skills/aicut-motion/assets/atlas/styles/004-whiteboard-explainer/code.js +897 -0
  17. package/skills/aicut-motion/assets/atlas/styles/004-whiteboard-explainer/poster.jpg +0 -0
  18. package/skills/aicut-motion/assets/atlas/styles/004-whiteboard-explainer/style.json +13 -0
  19. package/skills/aicut-motion/assets/atlas/styles/005-psychedelic-poster/code.js +814 -0
  20. package/skills/aicut-motion/assets/atlas/styles/005-psychedelic-poster/poster.jpg +0 -0
  21. package/skills/aicut-motion/assets/atlas/styles/005-psychedelic-poster/style.json +13 -0
  22. package/skills/aicut-motion/assets/atlas/styles/006-tech-glow-explainer/code.js +990 -0
  23. package/skills/aicut-motion/assets/atlas/styles/006-tech-glow-explainer/poster.jpg +0 -0
  24. package/skills/aicut-motion/assets/atlas/styles/006-tech-glow-explainer/style.json +13 -0
  25. package/skills/aicut-motion/assets/atlas/styles/007-papercraft-models/code.js +994 -0
  26. package/skills/aicut-motion/assets/atlas/styles/007-papercraft-models/poster.jpg +0 -0
  27. package/skills/aicut-motion/assets/atlas/styles/007-papercraft-models/style.json +13 -0
  28. package/skills/aicut-motion/assets/atlas/styles/008-1940s-film-noir/code.js +792 -0
  29. package/skills/aicut-motion/assets/atlas/styles/008-1940s-film-noir/poster.jpg +0 -0
  30. package/skills/aicut-motion/assets/atlas/styles/008-1940s-film-noir/style.json +13 -0
  31. package/skills/aicut-motion/assets/atlas/styles/009-manim-style-math/code.js +840 -0
  32. package/skills/aicut-motion/assets/atlas/styles/009-manim-style-math/poster.jpg +0 -0
  33. package/skills/aicut-motion/assets/atlas/styles/009-manim-style-math/style.json +13 -0
  34. package/skills/aicut-motion/assets/atlas/styles/010-illuminated-manuscript/code.js +1126 -0
  35. package/skills/aicut-motion/assets/atlas/styles/010-illuminated-manuscript/poster.jpg +0 -0
  36. package/skills/aicut-motion/assets/atlas/styles/010-illuminated-manuscript/style.json +13 -0
  37. package/skills/aicut-motion/assets/atlas/styles/011-editorial-essay-collage/code.js +854 -0
  38. package/skills/aicut-motion/assets/atlas/styles/011-editorial-essay-collage/poster.jpg +0 -0
  39. package/skills/aicut-motion/assets/atlas/styles/011-editorial-essay-collage/style.json +13 -0
  40. package/skills/aicut-motion/assets/atlas/styles/012-bioluminescent-deep-sea/code.js +1124 -0
  41. package/skills/aicut-motion/assets/atlas/styles/012-bioluminescent-deep-sea/poster.jpg +0 -0
  42. package/skills/aicut-motion/assets/atlas/styles/012-bioluminescent-deep-sea/style.json +13 -0
  43. package/skills/aicut-motion/assets/atlas/styles/013-product-launch-reveal/code.js +728 -0
  44. package/skills/aicut-motion/assets/atlas/styles/013-product-launch-reveal/poster.jpg +0 -0
  45. package/skills/aicut-motion/assets/atlas/styles/013-product-launch-reveal/style.json +13 -0
  46. package/skills/aicut-motion/assets/atlas/styles/014-halftone-pop-panel/code.js +664 -0
  47. package/skills/aicut-motion/assets/atlas/styles/014-halftone-pop-panel/poster.jpg +0 -0
  48. package/skills/aicut-motion/assets/atlas/styles/014-halftone-pop-panel/style.json +13 -0
  49. package/skills/aicut-motion/assets/atlas/styles/015-isometric-pastel/code.js +991 -0
  50. package/skills/aicut-motion/assets/atlas/styles/015-isometric-pastel/poster.jpg +0 -0
  51. package/skills/aicut-motion/assets/atlas/styles/015-isometric-pastel/style.json +13 -0
  52. package/skills/aicut-motion/assets/atlas/styles/016-oscilloscope-vector-art/code.js +801 -0
  53. package/skills/aicut-motion/assets/atlas/styles/016-oscilloscope-vector-art/poster.jpg +0 -0
  54. package/skills/aicut-motion/assets/atlas/styles/016-oscilloscope-vector-art/style.json +13 -0
  55. package/skills/aicut-motion/assets/atlas/styles/017-risograph-zine/code.js +692 -0
  56. package/skills/aicut-motion/assets/atlas/styles/017-risograph-zine/poster.jpg +0 -0
  57. package/skills/aicut-motion/assets/atlas/styles/017-risograph-zine/style.json +13 -0
  58. package/skills/aicut-motion/assets/atlas/styles/018-claymation-set/code.js +756 -0
  59. package/skills/aicut-motion/assets/atlas/styles/018-claymation-set/poster.jpg +0 -0
  60. package/skills/aicut-motion/assets/atlas/styles/018-claymation-set/style.json +13 -0
  61. package/skills/aicut-motion/assets/atlas/styles/019-neon-sign-at-night/code.js +922 -0
  62. package/skills/aicut-motion/assets/atlas/styles/019-neon-sign-at-night/poster.jpg +0 -0
  63. package/skills/aicut-motion/assets/atlas/styles/019-neon-sign-at-night/style.json +13 -0
  64. package/skills/aicut-motion/assets/atlas/styles/020-kawaii-anime/code.js +852 -0
  65. package/skills/aicut-motion/assets/atlas/styles/020-kawaii-anime/poster.jpg +0 -0
  66. package/skills/aicut-motion/assets/atlas/styles/020-kawaii-anime/style.json +13 -0
  67. package/skills/aicut-motion/assets/atlas/styles/021-ukiyo-e-woodblock/code.js +724 -0
  68. package/skills/aicut-motion/assets/atlas/styles/021-ukiyo-e-woodblock/poster.jpg +0 -0
  69. package/skills/aicut-motion/assets/atlas/styles/021-ukiyo-e-woodblock/style.json +13 -0
  70. package/skills/aicut-motion/assets/atlas/styles/022-16-bit-pixel-odyssey/code.js +793 -0
  71. package/skills/aicut-motion/assets/atlas/styles/022-16-bit-pixel-odyssey/poster.jpg +0 -0
  72. package/skills/aicut-motion/assets/atlas/styles/022-16-bit-pixel-odyssey/style.json +13 -0
  73. package/skills/aicut-motion/assets/atlas/styles/023-chalkboard-lesson/code.js +846 -0
  74. package/skills/aicut-motion/assets/atlas/styles/023-chalkboard-lesson/poster.jpg +0 -0
  75. package/skills/aicut-motion/assets/atlas/styles/023-chalkboard-lesson/style.json +13 -0
  76. package/skills/aicut-motion/assets/atlas/styles/024-cut-paper-diorama/code.js +1008 -0
  77. package/skills/aicut-motion/assets/atlas/styles/024-cut-paper-diorama/poster.jpg +0 -0
  78. package/skills/aicut-motion/assets/atlas/styles/024-cut-paper-diorama/style.json +13 -0
  79. package/skills/aicut-motion/assets/atlas/styles/025-cathedral-glass/code.js +680 -0
  80. package/skills/aicut-motion/assets/atlas/styles/025-cathedral-glass/poster.jpg +0 -0
  81. package/skills/aicut-motion/assets/atlas/styles/025-cathedral-glass/style.json +13 -0
  82. package/skills/aicut-motion/assets/atlas/styles/026-editorial-chart/code.js +633 -0
  83. package/skills/aicut-motion/assets/atlas/styles/026-editorial-chart/poster.jpg +0 -0
  84. package/skills/aicut-motion/assets/atlas/styles/026-editorial-chart/style.json +13 -0
  85. package/skills/aicut-motion/assets/atlas/styles/027-synthwave-outrun/code.js +757 -0
  86. package/skills/aicut-motion/assets/atlas/styles/027-synthwave-outrun/poster.jpg +0 -0
  87. package/skills/aicut-motion/assets/atlas/styles/027-synthwave-outrun/style.json +13 -0
  88. package/skills/aicut-motion/assets/atlas/styles/028-origami-studio/code.js +828 -0
  89. package/skills/aicut-motion/assets/atlas/styles/028-origami-studio/poster.jpg +0 -0
  90. package/skills/aicut-motion/assets/atlas/styles/028-origami-studio/style.json +13 -0
  91. package/skills/aicut-motion/assets/atlas/styles/029-linocut-relief-print/code.js +697 -0
  92. package/skills/aicut-motion/assets/atlas/styles/029-linocut-relief-print/poster.jpg +0 -0
  93. package/skills/aicut-motion/assets/atlas/styles/029-linocut-relief-print/style.json +13 -0
  94. package/skills/aicut-motion/assets/atlas/styles/030-holographic-foil-card/code.js +687 -0
  95. package/skills/aicut-motion/assets/atlas/styles/030-holographic-foil-card/poster.jpg +0 -0
  96. package/skills/aicut-motion/assets/atlas/styles/030-holographic-foil-card/style.json +13 -0
  97. package/skills/aicut-motion/assets/atlas/styles/031-voxel-diorama/code.js +727 -0
  98. package/skills/aicut-motion/assets/atlas/styles/031-voxel-diorama/poster.jpg +0 -0
  99. package/skills/aicut-motion/assets/atlas/styles/031-voxel-diorama/style.json +13 -0
  100. package/skills/aicut-motion/assets/atlas/styles/032-sumi-e-ink-wash/code.js +903 -0
  101. package/skills/aicut-motion/assets/atlas/styles/032-sumi-e-ink-wash/poster.jpg +0 -0
  102. package/skills/aicut-motion/assets/atlas/styles/032-sumi-e-ink-wash/style.json +13 -0
  103. package/skills/aicut-motion/assets/atlas/styles/033-etch-a-sketch-toy/code.js +662 -0
  104. package/skills/aicut-motion/assets/atlas/styles/033-etch-a-sketch-toy/poster.jpg +0 -0
  105. package/skills/aicut-motion/assets/atlas/styles/033-etch-a-sketch-toy/style.json +13 -0
  106. package/skills/aicut-motion/assets/atlas/styles/034-cosmic-star-chart/code.js +951 -0
  107. package/skills/aicut-motion/assets/atlas/styles/034-cosmic-star-chart/poster.jpg +0 -0
  108. package/skills/aicut-motion/assets/atlas/styles/034-cosmic-star-chart/style.json +13 -0
  109. package/skills/aicut-motion/assets/atlas/styles/035-punk-zine-collage/code.js +759 -0
  110. package/skills/aicut-motion/assets/atlas/styles/035-punk-zine-collage/poster.jpg +0 -0
  111. package/skills/aicut-motion/assets/atlas/styles/035-punk-zine-collage/style.json +13 -0
  112. package/skills/aicut-motion/assets/atlas/styles/036-thermal-camera/code.js +738 -0
  113. package/skills/aicut-motion/assets/atlas/styles/036-thermal-camera/poster.jpg +0 -0
  114. package/skills/aicut-motion/assets/atlas/styles/036-thermal-camera/style.json +13 -0
  115. package/skills/aicut-motion/assets/atlas/styles/037-engineering-blueprint/code.js +793 -0
  116. package/skills/aicut-motion/assets/atlas/styles/037-engineering-blueprint/poster.jpg +0 -0
  117. package/skills/aicut-motion/assets/atlas/styles/037-engineering-blueprint/style.json +13 -0
  118. package/skills/aicut-motion/assets/atlas/styles/038-impasto-night/code.js +673 -0
  119. package/skills/aicut-motion/assets/atlas/styles/038-impasto-night/poster.jpg +0 -0
  120. package/skills/aicut-motion/assets/atlas/styles/038-impasto-night/style.json +13 -0
  121. package/skills/aicut-motion/assets/atlas/styles/039-win95-desktop/code.js +907 -0
  122. package/skills/aicut-motion/assets/atlas/styles/039-win95-desktop/poster.jpg +0 -0
  123. package/skills/aicut-motion/assets/atlas/styles/039-win95-desktop/style.json +13 -0
  124. package/skills/aicut-motion/assets/atlas/styles/040-low-poly-faceted/code.js +833 -0
  125. package/skills/aicut-motion/assets/atlas/styles/040-low-poly-faceted/poster.jpg +0 -0
  126. package/skills/aicut-motion/assets/atlas/styles/040-low-poly-faceted/style.json +13 -0
  127. package/skills/aicut-motion/assets/atlas/styles/041-manga-page/code.js +845 -0
  128. package/skills/aicut-motion/assets/atlas/styles/041-manga-page/poster.jpg +0 -0
  129. package/skills/aicut-motion/assets/atlas/styles/041-manga-page/style.json +13 -0
  130. package/skills/aicut-motion/assets/atlas/styles/042-wood-type-letterpress/code.js +496 -0
  131. package/skills/aicut-motion/assets/atlas/styles/042-wood-type-letterpress/poster.jpg +0 -0
  132. package/skills/aicut-motion/assets/atlas/styles/042-wood-type-letterpress/style.json +13 -0
  133. package/skills/aicut-motion/assets/atlas/styles/043-light-painting/code.js +635 -0
  134. package/skills/aicut-motion/assets/atlas/styles/043-light-painting/poster.jpg +0 -0
  135. package/skills/aicut-motion/assets/atlas/styles/043-light-painting/style.json +13 -0
  136. package/skills/aicut-motion/assets/atlas/styles/044-felt-patchwork/code.js +799 -0
  137. package/skills/aicut-motion/assets/atlas/styles/044-felt-patchwork/poster.jpg +0 -0
  138. package/skills/aicut-motion/assets/atlas/styles/044-felt-patchwork/style.json +13 -0
  139. package/skills/aicut-motion/assets/atlas/styles/045-phosphor-terminal/code.js +547 -0
  140. package/skills/aicut-motion/assets/atlas/styles/045-phosphor-terminal/poster.jpg +0 -0
  141. package/skills/aicut-motion/assets/atlas/styles/045-phosphor-terminal/style.json +13 -0
  142. package/skills/aicut-motion/assets/atlas/styles/046-glassmorphism-ui/code.js +592 -0
  143. package/skills/aicut-motion/assets/atlas/styles/046-glassmorphism-ui/poster.jpg +0 -0
  144. package/skills/aicut-motion/assets/atlas/styles/046-glassmorphism-ui/style.json +13 -0
  145. package/skills/aicut-motion/assets/atlas/styles/047-tarot-card/code.js +768 -0
  146. package/skills/aicut-motion/assets/atlas/styles/047-tarot-card/poster.jpg +0 -0
  147. package/skills/aicut-motion/assets/atlas/styles/047-tarot-card/style.json +13 -0
  148. package/skills/aicut-motion/assets/atlas/styles/048-transit-map/code.js +666 -0
  149. package/skills/aicut-motion/assets/atlas/styles/048-transit-map/poster.jpg +0 -0
  150. package/skills/aicut-motion/assets/atlas/styles/048-transit-map/style.json +13 -0
  151. package/skills/aicut-motion/assets/atlas/styles/049-gouache-travel-poster/code.js +559 -0
  152. package/skills/aicut-motion/assets/atlas/styles/049-gouache-travel-poster/poster.jpg +0 -0
  153. package/skills/aicut-motion/assets/atlas/styles/049-gouache-travel-poster/style.json +13 -0
  154. package/skills/aicut-motion/assets/atlas/styles/050-napkin-sketch/code.js +943 -0
  155. package/skills/aicut-motion/assets/atlas/styles/050-napkin-sketch/poster.jpg +0 -0
  156. package/skills/aicut-motion/assets/atlas/styles/050-napkin-sketch/style.json +13 -0
  157. package/skills/aicut-motion/assets/atlas/styles/051-art-deco-foil/code.js +606 -0
  158. package/skills/aicut-motion/assets/atlas/styles/051-art-deco-foil/poster.jpg +0 -0
  159. package/skills/aicut-motion/assets/atlas/styles/051-art-deco-foil/style.json +13 -0
  160. package/skills/aicut-motion/assets/atlas/styles/052-radiograph-on-lightbox/code.js +730 -0
  161. package/skills/aicut-motion/assets/atlas/styles/052-radiograph-on-lightbox/poster.jpg +0 -0
  162. package/skills/aicut-motion/assets/atlas/styles/052-radiograph-on-lightbox/style.json +13 -0
  163. package/skills/aicut-motion/assets/atlas/styles/053-vaporwave/code.js +782 -0
  164. package/skills/aicut-motion/assets/atlas/styles/053-vaporwave/poster.jpg +0 -0
  165. package/skills/aicut-motion/assets/atlas/styles/053-vaporwave/style.json +13 -0
  166. package/skills/aicut-motion/assets/atlas/styles/054-ebru-paper-marbling/code.js +504 -0
  167. package/skills/aicut-motion/assets/atlas/styles/054-ebru-paper-marbling/poster.jpg +0 -0
  168. package/skills/aicut-motion/assets/atlas/styles/054-ebru-paper-marbling/style.json +13 -0
  169. package/skills/aicut-motion/assets/atlas/styles/055-isotype-pictograms/code.js +517 -0
  170. package/skills/aicut-motion/assets/atlas/styles/055-isotype-pictograms/poster.jpg +0 -0
  171. package/skills/aicut-motion/assets/atlas/styles/055-isotype-pictograms/style.json +13 -0
  172. package/skills/aicut-motion/assets/atlas/styles/056-soft-3d-clay/code.js +713 -0
  173. package/skills/aicut-motion/assets/atlas/styles/056-soft-3d-clay/poster.jpg +0 -0
  174. package/skills/aicut-motion/assets/atlas/styles/056-soft-3d-clay/style.json +13 -0
  175. package/skills/aicut-motion/assets/atlas/styles/057-cross-stitch-sampler/code.js +717 -0
  176. package/skills/aicut-motion/assets/atlas/styles/057-cross-stitch-sampler/poster.jpg +0 -0
  177. package/skills/aicut-motion/assets/atlas/styles/057-cross-stitch-sampler/style.json +13 -0
  178. package/skills/aicut-motion/assets/atlas/styles/058-constructivist-propaganda/code.js +540 -0
  179. package/skills/aicut-motion/assets/atlas/styles/058-constructivist-propaganda/poster.jpg +0 -0
  180. package/skills/aicut-motion/assets/atlas/styles/058-constructivist-propaganda/style.json +13 -0
  181. package/skills/aicut-motion/assets/atlas/styles/059-pocket-monochrome/code.js +524 -0
  182. package/skills/aicut-motion/assets/atlas/styles/059-pocket-monochrome/poster.jpg +0 -0
  183. package/skills/aicut-motion/assets/atlas/styles/059-pocket-monochrome/style.json +13 -0
  184. package/skills/aicut-motion/assets/atlas/styles/060-botanical-plate/code.js +934 -0
  185. package/skills/aicut-motion/assets/atlas/styles/060-botanical-plate/poster.jpg +0 -0
  186. package/skills/aicut-motion/assets/atlas/styles/060-botanical-plate/style.json +13 -0
  187. package/skills/aicut-motion/assets/atlas/styles/061-kinetic-type/code.js +690 -0
  188. package/skills/aicut-motion/assets/atlas/styles/061-kinetic-type/poster.jpg +0 -0
  189. package/skills/aicut-motion/assets/atlas/styles/061-kinetic-type/style.json +13 -0
  190. package/skills/aicut-motion/assets/atlas/styles/062-byzantine-mosaic/code.js +612 -0
  191. package/skills/aicut-motion/assets/atlas/styles/062-byzantine-mosaic/poster.jpg +0 -0
  192. package/skills/aicut-motion/assets/atlas/styles/062-byzantine-mosaic/style.json +13 -0
  193. package/skills/aicut-motion/assets/atlas/styles/063-y2k-liquid-chrome/code.js +666 -0
  194. package/skills/aicut-motion/assets/atlas/styles/063-y2k-liquid-chrome/poster.jpg +0 -0
  195. package/skills/aicut-motion/assets/atlas/styles/063-y2k-liquid-chrome/style.json +13 -0
  196. package/skills/aicut-motion/assets/atlas/styles/064-sticky-note-wall/code.js +651 -0
  197. package/skills/aicut-motion/assets/atlas/styles/064-sticky-note-wall/poster.jpg +0 -0
  198. package/skills/aicut-motion/assets/atlas/styles/064-sticky-note-wall/style.json +13 -0
  199. package/skills/aicut-motion/assets/atlas/styles/065-vintage-newsprint/code.js +656 -0
  200. package/skills/aicut-motion/assets/atlas/styles/065-vintage-newsprint/poster.jpg +0 -0
  201. package/skills/aicut-motion/assets/atlas/styles/065-vintage-newsprint/style.json +13 -0
  202. package/skills/aicut-motion/assets/atlas/styles/066-hidden-line-wireframe/code.js +672 -0
  203. package/skills/aicut-motion/assets/atlas/styles/066-hidden-line-wireframe/poster.jpg +0 -0
  204. package/skills/aicut-motion/assets/atlas/styles/066-hidden-line-wireframe/style.json +13 -0
  205. package/skills/aicut-motion/assets/atlas/styles/067-memphis-group/code.js +548 -0
  206. package/skills/aicut-motion/assets/atlas/styles/067-memphis-group/poster.jpg +0 -0
  207. package/skills/aicut-motion/assets/atlas/styles/067-memphis-group/style.json +13 -0
  208. package/skills/aicut-motion/assets/atlas/styles/068-ballpoint-notebook/code.js +989 -0
  209. package/skills/aicut-motion/assets/atlas/styles/068-ballpoint-notebook/poster.jpg +0 -0
  210. package/skills/aicut-motion/assets/atlas/styles/068-ballpoint-notebook/style.json +13 -0
  211. package/skills/aicut-motion/assets/atlas/styles/069-op-art-sphere/code.js +440 -0
  212. package/skills/aicut-motion/assets/atlas/styles/069-op-art-sphere/poster.jpg +0 -0
  213. package/skills/aicut-motion/assets/atlas/styles/069-op-art-sphere/style.json +13 -0
  214. package/skills/aicut-motion/assets/atlas/styles/070-topographic-survey/code.js +895 -0
  215. package/skills/aicut-motion/assets/atlas/styles/070-topographic-survey/poster.jpg +0 -0
  216. package/skills/aicut-motion/assets/atlas/styles/070-topographic-survey/style.json +13 -0
  217. package/skills/aicut-motion/assets/atlas/styles/071-pointillist-afternoon/code.js +563 -0
  218. package/skills/aicut-motion/assets/atlas/styles/071-pointillist-afternoon/poster.jpg +0 -0
  219. package/skills/aicut-motion/assets/atlas/styles/071-pointillist-afternoon/style.json +13 -0
  220. package/skills/aicut-motion/assets/atlas/styles/072-vector-arcade-1980/code.js +627 -0
  221. package/skills/aicut-motion/assets/atlas/styles/072-vector-arcade-1980/poster.jpg +0 -0
  222. package/skills/aicut-motion/assets/atlas/styles/072-vector-arcade-1980/style.json +13 -0
  223. package/skills/aicut-motion/assets/atlas/styles/073-patent-drawing/code.js +1096 -0
  224. package/skills/aicut-motion/assets/atlas/styles/073-patent-drawing/poster.jpg +0 -0
  225. package/skills/aicut-motion/assets/atlas/styles/073-patent-drawing/style.json +13 -0
  226. package/skills/aicut-motion/assets/atlas/styles/074-bauhaus-poster/code.js +595 -0
  227. package/skills/aicut-motion/assets/atlas/styles/074-bauhaus-poster/poster.jpg +0 -0
  228. package/skills/aicut-motion/assets/atlas/styles/074-bauhaus-poster/style.json +13 -0
  229. package/skills/aicut-motion/assets/atlas/styles/075-bitmap-paint-doodle/code.js +665 -0
  230. package/skills/aicut-motion/assets/atlas/styles/075-bitmap-paint-doodle/poster.jpg +0 -0
  231. package/skills/aicut-motion/assets/atlas/styles/075-bitmap-paint-doodle/style.json +13 -0
  232. package/skills/aicut-motion/assets/atlas/styles/076-nail-thread-string-art/code.js +645 -0
  233. package/skills/aicut-motion/assets/atlas/styles/076-nail-thread-string-art/poster.jpg +0 -0
  234. package/skills/aicut-motion/assets/atlas/styles/076-nail-thread-string-art/style.json +13 -0
  235. package/skills/aicut-motion/assets/atlas/styles/077-ridgeline/code.js +436 -0
  236. package/skills/aicut-motion/assets/atlas/styles/077-ridgeline/poster.jpg +0 -0
  237. package/skills/aicut-motion/assets/atlas/styles/077-ridgeline/style.json +13 -0
  238. package/skills/aicut-motion/assets/atlas/styles/078-sketchbook-graphite/code.js +1237 -0
  239. package/skills/aicut-motion/assets/atlas/styles/078-sketchbook-graphite/poster.jpg +0 -0
  240. package/skills/aicut-motion/assets/atlas/styles/078-sketchbook-graphite/style.json +13 -0
  241. package/skills/aicut-motion/assets/atlas/styles/079-teletext-page/code.js +622 -0
  242. package/skills/aicut-motion/assets/atlas/styles/079-teletext-page/poster.jpg +0 -0
  243. package/skills/aicut-motion/assets/atlas/styles/079-teletext-page/style.json +13 -0
  244. package/skills/aicut-motion/assets/atlas/styles/080-silkscreen-grid/code.js +524 -0
  245. package/skills/aicut-motion/assets/atlas/styles/080-silkscreen-grid/poster.jpg +0 -0
  246. package/skills/aicut-motion/assets/atlas/styles/080-silkscreen-grid/style.json +13 -0
  247. package/skills/aicut-motion/assets/atlas/styles/081-guilloch-security-print/code.js +689 -0
  248. package/skills/aicut-motion/assets/atlas/styles/081-guilloch-security-print/poster.jpg +0 -0
  249. package/skills/aicut-motion/assets/atlas/styles/081-guilloch-security-print/style.json +13 -0
  250. package/skills/aicut-motion/assets/atlas/styles/082-ascii-demoscene/code.js +574 -0
  251. package/skills/aicut-motion/assets/atlas/styles/082-ascii-demoscene/poster.jpg +0 -0
  252. package/skills/aicut-motion/assets/atlas/styles/082-ascii-demoscene/style.json +13 -0
  253. package/skills/aicut-motion/assets/atlas/styles/083-international-typographic-style/code.js +469 -0
  254. package/skills/aicut-motion/assets/atlas/styles/083-international-typographic-style/poster.jpg +0 -0
  255. package/skills/aicut-motion/assets/atlas/styles/083-international-typographic-style/style.json +13 -0
  256. package/skills/aicut-motion/assets/atlas/styles/084-flow-field/code.js +531 -0
  257. package/skills/aicut-motion/assets/atlas/styles/084-flow-field/poster.jpg +0 -0
  258. package/skills/aicut-motion/assets/atlas/styles/084-flow-field/style.json +13 -0
  259. package/skills/aicut-motion/assets/atlas/styles/085-macpaint-1984/code.js +675 -0
  260. package/skills/aicut-motion/assets/atlas/styles/085-macpaint-1984/poster.jpg +0 -0
  261. package/skills/aicut-motion/assets/atlas/styles/085-macpaint-1984/style.json +13 -0
  262. package/skills/aicut-motion/assets/atlas/styles/086-multi-scale-truchet/code.js +609 -0
  263. package/skills/aicut-motion/assets/atlas/styles/086-multi-scale-truchet/poster.jpg +0 -0
  264. package/skills/aicut-motion/assets/atlas/styles/086-multi-scale-truchet/style.json +13 -0
  265. package/skills/aicut-motion/references/motion-delivery.md +55 -0
  266. package/skills/aicut-motion/references/style-index.json +690 -0
  267. package/skills/aicut-motion/references/style-research.md +73 -0
  268. package/skills/aicut-motion/references/style-selection.md +71 -0
  269. package/skills/aicut-motion/scripts/atlas-viewer.html +195 -0
  270. package/skills/aicut-motion/scripts/atlas.mjs +109 -0
  271. package/studio/server/fetch-github.mjs +14 -3
  272. package/studio/server/server.mjs +40 -3
  273. package/studio/server/skill-summaries.mjs +60 -0
  274. package/studio/server/skills.mjs +121 -7
  275. package/studio/server/styles-store.mjs +235 -0
  276. package/studio/server/template-posters.mjs +2 -2
  277. package/studio/server/templates-page.mjs +93 -93
  278. package/studio/server/templates.mjs +32 -7
  279. package/studio/ui/dist/assets/ExportCenter-DasulhAv.js +1 -0
  280. package/studio/ui/dist/assets/SettingsModal-BZw0Hz2_.js +2 -0
  281. package/studio/ui/dist/assets/es-C8XPZARI.js +1 -0
  282. package/studio/ui/dist/assets/index-BjJVmBzB.js +1623 -0
  283. package/studio/ui/dist/assets/index-C3BfKZFO.css +1 -0
  284. package/studio/ui/dist/assets/ja-BeNkdaEj.js +1 -0
  285. package/studio/ui/dist/assets/ko-DcTVhdzK.js +1 -0
  286. package/studio/ui/dist/assets/zh-CN-Cg51ctbL.js +1 -0
  287. package/studio/ui/dist/index.html +2 -2
  288. package/skills/30x-web-to-video/SKILL.md +0 -421
  289. package/skills/30x-web-to-video/examples/INDEX.md +0 -26
  290. package/skills/30x-web-to-video/references/animations.md +0 -539
  291. package/skills/30x-web-to-video/references/audio.md +0 -256
  292. package/skills/30x-web-to-video/references/components.md +0 -340
  293. package/skills/30x-web-to-video/references/lottie.md +0 -174
  294. package/skills/30x-web-to-video/references/visual-effects.md +0 -157
  295. package/skills/30x-web-to-video/remotion-best-practices/rules/audio.md +0 -169
  296. package/skills/30x-web-to-video/remotion-best-practices/rules/calculate-metadata.md +0 -134
  297. package/skills/30x-web-to-video/remotion-best-practices/rules/charts.md +0 -120
  298. package/skills/30x-web-to-video/remotion-best-practices/rules/compositions.md +0 -154
  299. package/skills/30x-web-to-video/remotion-best-practices/rules/ffmpeg.md +0 -38
  300. package/skills/30x-web-to-video/remotion-best-practices/rules/fonts.md +0 -152
  301. package/skills/3d-asset-generation/SKILL.md +0 -142
  302. package/skills/action-fight-prompt/SKILL.md +0 -136
  303. package/skills/action-fight-prompt/references/camera-and-impact.md +0 -64
  304. package/skills/action-fight-prompt/references/example-15s-duel.md +0 -59
  305. package/skills/action-fight-prompt/references/scene-patterns.md +0 -80
  306. package/skills/ad-creative-video/SKILL.md +0 -205
  307. package/skills/ad-creative-video/references/batch-ad-pipeline.md +0 -289
  308. package/skills/ad-creative-video/references/platform-specs.md +0 -72
  309. package/skills/after-effects/SKILL.md +0 -123
  310. package/skills/after-effects/references/export-recipes.md +0 -168
  311. package/skills/after-effects/references/expression-library.md +0 -184
  312. package/skills/after-effects/references/expressions.md +0 -134
  313. package/skills/after-effects/references/performance-triage.md +0 -138
  314. package/skills/after-effects/references/project-hygiene.md +0 -188
  315. package/skills/ai-media-quality-review/SKILL.md +0 -72
  316. package/skills/ai-product-video/SKILL.md +0 -296
  317. package/skills/ai-product-video/references/aesthetic-rules.md +0 -177
  318. package/skills/ai-product-video/references/final-review.md +0 -110
  319. package/skills/ai-product-video/references/guided-free-creation.md +0 -194
  320. package/skills/ai-product-video/references/music-beat-sync.md +0 -219
  321. package/skills/ai-product-video/references/pipeline.md +0 -392
  322. package/skills/ai-product-video/references/sequences/promo-energy-arc.md +0 -50
  323. package/skills/ai-product-video/references/shots/ATTRIBUTION.md +0 -65
  324. package/skills/ai-product-video/references/shots/camera/basic-3d-scene.md +0 -37
  325. package/skills/ai-product-video/references/shots/camera/crash-zoom-punch.md +0 -39
  326. package/skills/ai-product-video/references/shots/camera/cursor-flyover.md +0 -38
  327. package/skills/ai-product-video/references/shots/camera/depth-layer-moves.md +0 -40
  328. package/skills/ai-product-video/references/shots/camera/graze-face-tour.md +0 -57
  329. package/skills/anidoodle/SKILL.md +0 -185
  330. package/skills/anidoodle/references/anatomy.md +0 -91
  331. package/skills/anidoodle/references/backends-and-adapters.md +0 -82
  332. package/skills/anidoodle/references/camera.md +0 -148
  333. package/skills/anidoodle/references/craft-bar.md +0 -72
  334. package/skills/anidoodle/references/determinism-and-contract.md +0 -46
  335. package/skills/anidoodle/references/formats.md +0 -121
  336. package/skills/anidoodle/references/motion-grammar.md +0 -234
  337. package/skills/anidoodle/references/music/compose.md +0 -388
  338. package/skills/anidoodle/references/music/sound-design.md +0 -245
  339. package/skills/anidoodle/references/music/sounds-licenses.md +0 -69
  340. package/skills/anidoodle/references/music/styles/lofi-electronic.md +0 -112
  341. package/skills/anidoodle/references/music/styles/music-box.md +0 -57
  342. package/skills/animated-component-libraries/SKILL.md +0 -820
  343. package/skills/animated-component-libraries/references/customization_guide.md +0 -699
  344. package/skills/animated-component-libraries/references/magic_ui_components.md +0 -422
  345. package/skills/animated-component-libraries/references/react_bits_components.md +0 -587
  346. package/skills/animated-infographic/SKILL.md +0 -211
  347. package/skills/animated-infographic/references/sequenced-infographic.md +0 -286
  348. package/skills/appshot-core/SKILL.md +0 -872
  349. package/skills/article-highlights/SKILL.md +0 -151
  350. package/skills/avatar-mix/SKILL.md +0 -301
  351. package/skills/bang-motion/SKILL.md +0 -583
  352. package/skills/bang-motion/references/ae-bridge-higgsfield.md +0 -160
  353. package/skills/bang-motion/references/anti-ppt.md +0 -110
  354. package/skills/bang-motion/references/architecture.md +0 -188
  355. package/skills/bang-motion/references/explainer.md +0 -579
  356. package/skills/bang-motion/references/kartun-panggung.md +0 -221
  357. package/skills/bang-motion/references/opener-konsep.md +0 -817
  358. package/skills/bang-motion/references/roadmap.md +0 -85
  359. package/skills/bang-motion/references/techniques.md +0 -690
  360. package/skills/beat-sync-edit/SKILL.md +0 -148
  361. package/skills/book-video-factory/SKILL.md +0 -139
  362. package/skills/book-video-factory/references/first-run.md +0 -50
  363. package/skills/book-video-factory/references/paper-collage-explainer.md +0 -127
  364. package/skills/book-video-factory/references/quality-gates.md +0 -87
  365. package/skills/book-video-production/SKILL.md +0 -211
  366. package/skills/brag/SKILL.md +0 -195
  367. package/skills/brag/references/audio.md +0 -312
  368. package/skills/brag/references/step-1-inspect.md +0 -125
  369. package/skills/brag/references/step-2-plan.md +0 -234
  370. package/skills/brag/references/step-3-compose.md +0 -199
  371. package/skills/brag/references/step-4-deliver.md +0 -141
  372. package/skills/brag/references/tones.md +0 -231
  373. package/skills/brand-setup/SKILL.md +0 -228
  374. package/skills/brewreel/SKILL.md +0 -491
  375. package/skills/brewreel/docs/broll.en.md +0 -252
  376. package/skills/brewreel/docs/broll.md +0 -252
  377. package/skills/brewreel/docs/custom-shot.en.md +0 -66
  378. package/skills/brewreel/docs/custom-shot.md +0 -103
  379. package/skills/brewreel/docs/faq.en.md +0 -90
  380. package/skills/brewreel/docs/faq.md +0 -90
  381. package/skills/brewreel/docs/features.en.md +0 -157
  382. package/skills/brewreel/docs/features.md +0 -157
  383. package/skills/brewreel/docs/gallery.en.md +0 -44
  384. package/skills/brewreel/docs/gallery.md +0 -44
  385. package/skills/brewreel/docs/how-it-works.en.md +0 -64
  386. package/skills/brewreel/docs/how-it-works.md +0 -64
  387. package/skills/caption-animation/SKILL.md +0 -216
  388. package/skills/caption-animation/references/word-timed-captions.md +0 -254
  389. package/skills/cartcut-editing/SKILL.md +0 -615
  390. package/skills/cartcut-editing/references/html-typography.md +0 -277
  391. package/skills/cassette-video-edit/SKILL.md +0 -129
  392. package/skills/ccvideo/SKILL.md +0 -264
  393. package/skills/chekhov-dramaturgy/SKILL.md +0 -367
  394. package/skills/chekhov-dramaturgy/reference.md +0 -375
  395. package/skills/chengfeng-check-updates/SKILL.md +0 -283
  396. package/skills/cinematic-product-promo-skill/SKILL.md +0 -295
  397. package/skills/cinematic-product-promo-skill/references/aesthetic-rules.md +0 -187
  398. package/skills/cinematic-product-promo-skill/references/final-review.md +0 -116
  399. package/skills/cinematic-product-promo-skill/references/guided-free-creation.md +0 -199
  400. package/skills/cinematic-product-promo-skill/references/jianying-export.md +0 -183
  401. package/skills/cinematic-product-promo-skill/references/music-beat-sync.md +0 -257
  402. package/skills/cinematic-product-promo-skill/references/pipeline.md +0 -393
  403. package/skills/cinematic-product-promo-skill/references/sequences/promo-energy-arc.md +0 -50
  404. package/skills/cinematic-product-promo-skill/references/shots/ATTRIBUTION.md +0 -65
  405. package/skills/cinematic-product-promo-skill/references/shots/camera/basic-3d-scene.md +0 -37
  406. package/skills/cinematic-product-promo-skill/references/shots/camera/crash-zoom-punch.md +0 -39
  407. package/skills/cinematic-product-promo-skill/references/shots/camera/cursor-flyover.md +0 -38
  408. package/skills/cinematic-product-promo-skill/references/shots/camera/depth-layer-moves.md +0 -40
  409. package/skills/claude-gif/SKILL.md +0 -211
  410. package/skills/claude-gif/references/gif-optimization.md +0 -209
  411. package/skills/claude-gif/references/perfect-loops.md +0 -295
  412. package/skills/claude-gif/references/platform-specs.md +0 -138
  413. package/skills/claude-gif/references/prompt-engineering.md +0 -211
  414. package/skills/claude-gif/references/remotion-gif.md +0 -560
  415. package/skills/codex-video-pipeline/SKILL.md +0 -213
  416. package/skills/codex-video-pipeline/examples/ai-meeting-notes/INPUT.md +0 -10
  417. package/skills/codex-video-pipeline/examples/ai-meeting-notes/expected/action-list.md +0 -22
  418. package/skills/codex-video-pipeline/references/captions.md +0 -39
  419. package/skills/codex-video-pipeline/references/cover-system.md +0 -72
  420. package/skills/codex-video-pipeline/references/cross-platform.md +0 -77
  421. package/skills/codex-video-pipeline/references/example-run.md +0 -54
  422. package/skills/codex-video-pipeline/references/first-run.md +0 -130
  423. package/skills/codex-video-pipeline/references/project-contract.md +0 -54
  424. package/skills/codex-video-pipeline/references/quality-gates.md +0 -44
  425. package/skills/codex-video-pipeline/references/research-and-script.md +0 -50
  426. package/skills/collage-broll-explainers/SKILL.md +0 -429
  427. package/skills/create-onboarding-video/SKILL.md +0 -233
  428. package/skills/cs-shotcraft-skill/SKILL.md +0 -218
  429. package/skills/cs-shotcraft-skill/references/aesthetic-rules.md +0 -207
  430. package/skills/cs-shotcraft-skill/references/camera-table.md +0 -88
  431. package/skills/cs-shotcraft-skill/references/engineering.md +0 -132
  432. package/skills/cs-shotcraft-skill/references/final-review.md +0 -118
  433. package/skills/cs-shotcraft-skill/references/guided-free-creation.md +0 -199
  434. package/skills/cs-shotcraft-skill/references/jianying-export.md +0 -183
  435. package/skills/cs-shotcraft-skill/references/music-beat-sync.md +0 -257
  436. package/skills/cs-shotcraft-skill/references/pipeline.md +0 -408
  437. package/skills/cs-shotcraft-skill/references/product-machine.md +0 -56
  438. package/skills/cs-shotcraft-skill/references/sequences/promo-energy-arc.md +0 -50
  439. package/skills/cs-shotcraft-skill/references/shots/ATTRIBUTION.md +0 -65
  440. package/skills/cs-shotcraft-skill/references/shots/camera/basic-3d-scene.md +0 -37
  441. package/skills/cut-video/SKILL.md +0 -387
  442. package/skills/cyxj-hyperframes-overlay/SKILL.md +0 -75
  443. package/skills/cyxj-remotion-evolve/SKILL.md +0 -123
  444. package/skills/cyxj-remotion-evolve-vibe-motion/SKILL.md +0 -123
  445. package/skills/demo-video-creation-skill/SKILL.md +0 -152
  446. package/skills/demo-video-creation-skill/references/capture-workflow.md +0 -74
  447. package/skills/demo-video-creation-skill/references/qc-checklist.md +0 -61
  448. package/skills/demo-video-creation-skill/references/remotion-ffmpeg.md +0 -94
  449. package/skills/demo-video-creation-skill/references/storytelling.md +0 -86
  450. package/skills/demo-video-creation-skill/references/visual-system.md +0 -83
  451. package/skills/demoday/SKILL.md +0 -148
  452. package/skills/develop-premiere-pro-mcp/SKILL.md +0 -131
  453. package/skills/diagram-animation/SKILL.md +0 -200
  454. package/skills/diagram-animation/references/diagram-and-chart-recipes.md +0 -218
  455. package/skills/diagram-tour/SKILL.md +0 -287
  456. package/skills/diagram-tour/examples/agent-architecture/agent-architecture-tour.md +0 -78
  457. package/skills/docvideoer/SKILL.md +0 -139
  458. package/skills/draftcut/SKILL.md +0 -104
  459. package/skills/draftcut/docs/agent-bootstrap.md +0 -64
  460. package/skills/draftcut/docs/approvals.md +0 -45
  461. package/skills/draftcut/docs/audio-first-migration.md +0 -35
  462. package/skills/draftcut/docs/configuration.md +0 -54
  463. package/skills/draftcut/docs/getting-started.md +0 -63
  464. package/skills/draftcut/docs/harness-case-study.en.md +0 -23
  465. package/skills/draftcut/docs/harness-case-study.md +0 -47
  466. package/skills/draftcut/references/01-plan.md +0 -30
  467. package/skills/draftcut/references/03-deliver.md +0 -26
  468. package/skills/draftcut/references/04-reference-theme-prompt.md +0 -7
  469. package/skills/draftcut/references/05-social-loudness.md +0 -58
  470. package/skills/draftcut/references/06-modern-components.md +0 -72
  471. package/skills/easyedit/SKILL.md +0 -66
  472. package/skills/erduo-broll-loop-engineering/SKILL.md +0 -136
  473. package/skills/erduo-broll-loop-engineering/references/animation-craft.md +0 -208
  474. package/skills/erduo-broll-loop-engineering/references/first-run-onboarding.md +0 -107
  475. package/skills/erduo-broll-loop-engineering/references/handoff-template.md +0 -70
  476. package/skills/erduo-broll-loop-engineering/references/motion-layout-lint.md +0 -122
  477. package/skills/erduo-broll-loop-engineering/references/parent-review-checklist.md +0 -171
  478. package/skills/erduo-broll-loop-engineering/references/prompt-first-workflow.md +0 -322
  479. package/skills/erduo-broll-loop-engineering/references/remotion-backend.md +0 -334
  480. package/skills/erduo-broll-loop-engineering/references/runtime/remotion-hyperframes-map.md +0 -76
  481. package/skills/erduo-broll-loop-engineering/references/runtime/runtime-contract.md +0 -174
  482. package/skills/erduo-broll-loop-engineering/references/runtime/runtime-selection.md +0 -135
  483. package/skills/erduo-broll-loop-engineering/references/shotcraft/remotion-sources/SOURCE.md +0 -7
  484. package/skills/erduo-broll-loop-engineering/references/shotcraft/upstream-attribution.md +0 -65
  485. package/skills/explainer-assets/SKILL.md +0 -98
  486. package/skills/explainer-video/SKILL.md +0 -146
  487. package/skills/framewright/SKILL.md +0 -324
  488. package/skills/framewright/references/audio.md +0 -230
  489. package/skills/framewright/references/guide.md +0 -276
  490. package/skills/framewright/references/painting.md +0 -425
  491. package/skills/framewright/references/photo.md +0 -75
  492. package/skills/framewright/references/questionnaire.md +0 -115
  493. package/skills/framewright/references/styles.md +0 -388
  494. package/skills/framewright/references/troubleshooting.md +0 -119
  495. package/skills/framewright/references/world.md +0 -215
  496. package/skills/gbro-collage-broll/SKILL.md +0 -435
  497. package/skills/gbro-collage-info/SKILL.md +0 -135
  498. package/skills/gbro-collage-info/references/motion-grammar.md +0 -66
  499. package/skills/gbro-collage-info/references/production.md +0 -67
  500. package/skills/gbro-collage-info/references/style-system.md +0 -38
  501. package/skills/gemini-tts/SKILL.md +0 -208
  502. package/skills/gemini-tts/references/prompting-guide.md +0 -169
  503. package/skills/gen/SKILL.md +0 -282
  504. package/skills/ghost-editor/SKILL.md +0 -437
  505. package/skills/ghost-editor/docs/HOW-IT-WORKS.md +0 -82
  506. package/skills/ghost-editor/docs/PLAYBOOK.md +0 -139
  507. package/skills/ghost-editor/docs/THIRD_PARTY/audio.md +0 -17
  508. package/skills/ghost-editor/docs/THIRD_PARTY/audioqa.md +0 -13
  509. package/skills/ghost-editor/docs/THIRD_PARTY/captions.md +0 -20
  510. package/skills/ghost-editor/docs/THIRD_PARTY/fonts.md +0 -17
  511. package/skills/ghost-editor/docs/THIRD_PARTY/kinetic.md +0 -22
  512. package/skills/ghost-editor/docs/THIRD_PARTY/looks.md +0 -22
  513. package/skills/ghost-editor/docs/THIRD_PARTY/matte.md +0 -20
  514. package/skills/ghost-editor/docs/THIRD_PARTY/models.md +0 -11
  515. package/skills/ghost-editor/docs/THIRD_PARTY/runtime.md +0 -13
  516. package/skills/ghost-editor/docs/THIRD_PARTY/shaders.md +0 -15
  517. package/skills/git-story-film/SKILL.md +0 -220
  518. package/skills/git-story-film/examples/raven-story/FONTS.md +0 -8
  519. package/skills/git-story-film/examples/raven-story/OUTLINE.md +0 -93
  520. package/skills/git-story-film/references/craft.md +0 -148
  521. package/skills/git-story-film/references/directing.md +0 -185
  522. package/skills/git-story-film/references/forms.md +0 -150
  523. package/skills/git-story-film/references/production.md +0 -150
  524. package/skills/git-story-film/references/story.md +0 -137
  525. package/skills/git-story-film/references/text-and-fonts.md +0 -90
  526. package/skills/guizang-product-video-skill/SKILL.md +0 -96
  527. package/skills/guizang-product-video-skill/references/audio-and-qa.md +0 -113
  528. package/skills/guizang-product-video-skill/references/audio-sourcing.md +0 -80
  529. package/skills/guizang-product-video-skill/references/case-study.md +0 -63
  530. package/skills/guizang-product-video-skill/references/component-pipeline.md +0 -86
  531. package/skills/guizang-product-video-skill/references/cover.md +0 -43
  532. package/skills/guizang-product-video-skill/references/direction.md +0 -91
  533. package/skills/guizang-product-video-skill/references/onboarding.md +0 -98
  534. package/skills/guizang-product-video-skill/references/repo-and-style.md +0 -44
  535. package/skills/guizang-product-video-skill/references/review.md +0 -38
  536. package/skills/guizang-product-video-skill/references/starter.md +0 -168
  537. package/skills/guizang-product-video-skill/references/story-and-copy.md +0 -88
  538. package/skills/guizang-product-video-skill/references/visual-vocabulary.md +0 -78
  539. package/skills/guofeng-paper-video/SKILL.md +0 -159
  540. package/skills/guofeng-paper-video/style/design.md +0 -43
  541. package/skills/guofeng-paper-video/style/palette.md +0 -21
  542. package/skills/guofeng-paper-video/style/prompts/01-/345/210/206/351/225/234/350/241/250.md +0 -19
  543. package/skills/guofeng-paper-video/style/prompts/02-/347/224/237/346/210/220/347/272/270/347/211/207.md +0 -37
  544. package/skills/guofeng-paper-video/style/prompts/03-/351/205/215/351/237/263/350/204/232/346/234/254.md +0 -27
  545. package/skills/guofeng-paper-video/style//345/210/206/351/225/234/344/270/216/345/233/276/345/261/202/350/247/204/350/214/203.md +0 -67
  546. package/skills/guofeng-paper-video/style//347/272/270/347/211/207/347/264/240/346/235/220/350/247/204/350/214/203.md +0 -29
  547. package/skills/hand-drawn-explainer-video-nikola/SKILL.md +0 -113
  548. package/skills/hand-drawn-explainer-video-nikola/docs/ARCHITECTURE.md +0 -18
  549. package/skills/hand-drawn-explainer-video-nikola/docs/CONFIGURATION.md +0 -22
  550. package/skills/hand-drawn-explainer-video-nikola/docs/STYLES.md +0 -28
  551. package/skills/hand-drawn-explainer-video-nikola/docs/TROUBLESHOOTING.md +0 -35
  552. package/skills/hand-drawn-explainer-video-nikola/examples/program-animation/skill-demo/DESIGN.md +0 -24
  553. package/skills/hand-drawn-explainer-video-nikola/references/automation-workflow.md +0 -67
  554. package/skills/hand-drawn-explainer-video-nikola/references/output-example.md +0 -79
  555. package/skills/hand-drawn-explainer-video-nikola/references/preflight-and-recovery.md +0 -49
  556. package/skills/hand-drawn-explainer-video-nikola/references/style-guide.md +0 -82
  557. package/skills/hand-drawn-explainer-video-nikola/references/style-selection-and-updates.md +0 -39
  558. package/skills/hand-drawn-explainer-video-nikola/references/upstream-whiteboard-review.md +0 -30
  559. package/skills/hand-drawn-explainer-video-nikola/references/voiceover.md +0 -37
  560. package/skills/hbg-life-simulation/SKILL.md +0 -285
  561. package/skills/hbg-life-simulation/references/image-generation.md +0 -53
  562. package/skills/hbg-life-simulation/references/local-account-api.md +0 -112
  563. package/skills/hbg-life-simulation/references/opening-system.md +0 -45
  564. package/skills/hbg-life-simulation/references/project-spec.md +0 -62
  565. package/skills/hbg-life-simulation/references/render-and-qa.md +0 -107
  566. package/skills/hbg-life-simulation/references/storyboarding.md +0 -69
  567. package/skills/hbg-life-simulation/references/style-system.md +0 -80
  568. package/skills/hbg-life-simulation/references/visual-system.md +0 -44
  569. package/skills/heygen-avatar/SKILL.md +0 -489
  570. package/skills/heygen-avatar/references/asset-routing.md +0 -86
  571. package/skills/heygen-avatar/references/avatar-creation.md +0 -181
  572. package/skills/heygen-avatar/references/troubleshooting.md +0 -137
  573. package/skills/heytea-doodle-poster/SKILL.md +0 -132
  574. package/skills/heytea-doodle-poster/references/desktop-pet-character-modes.md +0 -103
  575. package/skills/heytea-doodle-poster/references/desktop-pet-environment.md +0 -122
  576. package/skills/heytea-doodle-poster/references/desktop-pet-pack.md +0 -106
  577. package/skills/heytea-doodle-poster/references/desktop-pet-workflow.md +0 -264
  578. package/skills/heytea-doodle-poster/references/evaluation.md +0 -246
  579. package/skills/heytea-doodle-poster/references/lettering-guide.md +0 -213
  580. package/skills/heytea-doodle-poster/references/mixed-media-style-guide.md +0 -101
  581. package/skills/heytea-doodle-poster/references/monster-poster-workflow.md +0 -56
  582. package/skills/heytea-doodle-poster/references/style-guide.md +0 -412
  583. package/skills/heytea-doodle-poster-hosted/SKILL.md +0 -132
  584. package/skills/heytea-doodle-poster-hosted/references/desktop-pet-character-modes.md +0 -103
  585. package/skills/heytea-doodle-poster-hosted/references/desktop-pet-environment.md +0 -122
  586. package/skills/heytea-doodle-poster-hosted/references/desktop-pet-pack.md +0 -106
  587. package/skills/heytea-doodle-poster-hosted/references/desktop-pet-workflow.md +0 -264
  588. package/skills/heytea-doodle-poster-hosted/references/evaluation.md +0 -246
  589. package/skills/heytea-doodle-poster-hosted/references/lettering-guide.md +0 -213
  590. package/skills/heytea-doodle-poster-hosted/references/mixed-media-style-guide.md +0 -101
  591. package/skills/heytea-doodle-poster-hosted/references/monster-poster-workflow.md +0 -56
  592. package/skills/heytea-doodle-poster-hosted/references/style-guide.md +0 -412
  593. package/skills/html2video/SKILL.md +0 -290
  594. package/skills/html2video/references/cjk-type.md +0 -173
  595. package/skills/html2video/references/editorial.md +0 -145
  596. package/skills/html2video/references/narration.md +0 -111
  597. package/skills/html2video/references/pitfalls.md +0 -238
  598. package/skills/html2video/references/shots.md +0 -198
  599. package/skills/html2video/references/storyboard.md +0 -323
  600. package/skills/hyperdirector/SKILL.md +0 -202
  601. package/skills/hyperdirector/docs/audio-workflow.md +0 -160
  602. package/skills/hyperdirector/docs/audio-workflow.zh-CN.md +0 -244
  603. package/skills/hyperdirector/docs/brand-kit-setup.md +0 -322
  604. package/skills/hyperdirector/docs/brand-kit-setup.zh-CN.md +0 -277
  605. package/skills/hyperdirector/docs/cursor-development-notes.md +0 -474
  606. package/skills/hyperdirector/docs/faq.md +0 -285
  607. package/skills/hyperdirector/docs/faq.zh-CN.md +0 -198
  608. package/skills/hyperdirector/docs/first-video.md +0 -320
  609. package/skills/hyperdirector/docs/first-video.zh-CN.md +0 -265
  610. package/skills/hyperdirector/docs/installation.md +0 -254
  611. package/skills/hyperdirector/docs/installation.zh-CN.md +0 -222
  612. package/skills/hyperdirector/docs/quickstart.md +0 -203
  613. package/skills/hyperframes/SKILL.md +0 -117
  614. package/skills/hyperframes/references/captions.md +0 -46
  615. package/skills/hyperframes/references/film.md +0 -48
  616. package/skills/hyperframes/references/format.md +0 -158
  617. package/skills/hyperframes/references/look.md +0 -69
  618. package/skills/hyperframes/references/motion.md +0 -95
  619. package/skills/hyperframes/references/overlays.md +0 -39
  620. package/skills/hyperframes/references/review.md +0 -51
  621. package/skills/hyperframes/references/runtimes.md +0 -69
  622. package/skills/hyperframes/references/skill-lifecycle.md +0 -49
  623. package/skills/hyperframes/references/sound.md +0 -43
  624. package/skills/hyperframes/references/spec.md +0 -76
  625. package/skills/hyperframes/references/story.md +0 -103
  626. package/skills/hyperframes-motion-director/SKILL.md +0 -920
  627. package/skills/hyperframes-motion-director/references/asset-choreography-and-render-qa.md +0 -185
  628. package/skills/hyperframes-motion-director/references/audio-sync.md +0 -83
  629. package/skills/hyperframes-motion-director/references/design-engineering.md +0 -156
  630. package/skills/hyperframes-motion-director/references/gsap-choreography.md +0 -202
  631. package/skills/hyperframes-motion-director/references/hyperframes-stability.md +0 -99
  632. package/skills/hyperframes-motion-director/references/imagegen-asset-pipeline.md +0 -227
  633. package/skills/hyperframes-motion-director/references/motion-background-system.md +0 -165
  634. package/skills/hyperframes-motion-director/references/motion-craft.md +0 -182
  635. package/skills/hyperframes-motion-director/references/premium-product-promo.md +0 -287
  636. package/skills/hyperframes-motion-director/references/text-over-background-layout.md +0 -221
  637. package/skills/hyperframes-motion-director/references/visual-standard.md +0 -174
  638. package/skills/hyperframes-motion-director/references/workflow.md +0 -320
  639. package/skills/hypit/SKILL.md +0 -367
  640. package/skills/hypit/references/creation/brief.md +0 -93
  641. package/skills/hypit/references/creation/script-and-time.md +0 -259
  642. package/skills/hypit/references/creation/transformations.md +0 -143
  643. package/skills/hypit/references/playbooks/craft/b-roll.md +0 -94
  644. package/skills/hypit/references/playbooks/craft/caption-tracking.md +0 -126
  645. package/skills/hypit/references/playbooks/craft/captions.md +0 -253
  646. package/skills/hypit/references/playbooks/craft/generated-dependencies.md +0 -38
  647. package/skills/hypit/references/playbooks/craft/graphic-compositions.md +0 -85
  648. package/skills/hypit/references/playbooks/craft/motion-graphics.md +0 -68
  649. package/skills/hypit/references/playbooks/craft/screen-demonstrations.md +0 -51
  650. package/skills/hypit/references/playbooks/craft/sound-mix.md +0 -70
  651. package/skills/hypit/references/playbooks/formats/narration-led-demo.md +0 -87
  652. package/skills/image/SKILL.md +0 -153
  653. package/skills/image/references/characters.md +0 -86
  654. package/skills/image/references/creative-direction.md +0 -137
  655. package/skills/image/references/de-slop.md +0 -95
  656. package/skills/image/references/dimensional.md +0 -88
  657. package/skills/image/references/editing.md +0 -112
  658. package/skills/image/references/golden-rules.md +0 -198
  659. package/skills/image/references/gpt-image.md +0 -228
  660. package/skills/image/references/models.md +0 -78
  661. package/skills/image/references/multi-panel.md +0 -354
  662. package/skills/image/references/nano-banana.md +0 -150
  663. package/skills/image/references/patterns/character-design.md +0 -150
  664. package/skills/image/references/patterns/ecommerce.md +0 -124
  665. package/skills/image-smixs/SKILL.md +0 -153
  666. package/skills/image-smixs/references/characters.md +0 -86
  667. package/skills/image-smixs/references/creative-direction.md +0 -137
  668. package/skills/image-smixs/references/de-slop.md +0 -95
  669. package/skills/image-smixs/references/dimensional.md +0 -88
  670. package/skills/image-smixs/references/editing.md +0 -112
  671. package/skills/image-smixs/references/golden-rules.md +0 -198
  672. package/skills/image-smixs/references/gpt-image.md +0 -228
  673. package/skills/image-smixs/references/models.md +0 -78
  674. package/skills/image-smixs/references/multi-panel.md +0 -354
  675. package/skills/image-smixs/references/nano-banana.md +0 -150
  676. package/skills/image-smixs/references/patterns/character-design.md +0 -150
  677. package/skills/image-smixs/references/patterns/ecommerce.md +0 -124
  678. package/skills/image-story-video-wizard/SKILL.md +0 -148
  679. package/skills/image-story-video-wizard/docs/ARTICLE_ALIGNMENT.md +0 -29
  680. package/skills/image-story-video-wizard/references/host-routing.md +0 -44
  681. package/skills/image-story-video-wizard/references/state-schema.md +0 -79
  682. package/skills/image-story-video-wizard/references/workflow.md +0 -203
  683. package/skills/image-story-video-wizard/references/writing-and-review.md +0 -60
  684. package/skills/ip-as-logo/SKILL.md +0 -151
  685. package/skills/ip-as-logo-s1dashu/SKILL.md +0 -151
  686. package/skills/jtxvideo-skill/SKILL.md +0 -337
  687. package/skills/kinetic-reel/SKILL.md +0 -140
  688. package/skills/kinetic-reel/examples/work-reel-26/STORYBOARD.md +0 -51
  689. package/skills/kinetic-reel/references/sound.md +0 -40
  690. package/skills/kinetic-reel/references/style-guide.md +0 -79
  691. package/skills/knowledge-explainer-skill/SKILL.md +0 -149
  692. package/skills/knowledge-explainer-skill/examples/ai_video_3steps.md +0 -61
  693. package/skills/knowledge-explainer-skill/examples/algorithm_bubble.md +0 -20
  694. package/skills/knowledge-explainer-skill/examples/before_after_demo.md +0 -38
  695. package/skills/knowledge-explainer-skill/examples/cta_outro.md +0 -11
  696. package/skills/knowledge-explainer-skill/examples/double_pendulum.md +0 -20
  697. package/skills/knowledge-explainer-skill/examples/paper_fold.md +0 -20
  698. package/skills/knowledge-explainer-skill/examples/script.md +0 -40
  699. package/skills/lanshu-create-ai-presenter-video/SKILL.md +0 -253
  700. package/skills/lanshu-create-ai-presenter-video/references/editing.md +0 -67
  701. package/skills/lanshu-create-ai-presenter-video/references/generation.md +0 -94
  702. package/skills/lanshu-create-ai-presenter-video/references/qa-recovery.md +0 -83
  703. package/skills/lanshu-create-ai-presenter-video/references/styled-explainer.md +0 -189
  704. package/skills/laoxu-video-script/SKILL.md +0 -117
  705. package/skills/laoxu-video-script/references/cases.md +0 -305
  706. package/skills/laoxu-video-script/references/de-ai.md +0 -32
  707. package/skills/laoxu-video-script/references/diagnostics.md +0 -67
  708. package/skills/laoxu-video-script/references/format.md +0 -62
  709. package/skills/laoxu-video-script/references/formulas.md +0 -43
  710. package/skills/laoxu-video-script/references/method.md +0 -115
  711. package/skills/laoxu-video-script/references/motifs-and-lines.md +0 -829
  712. package/skills/laoxu-video-script/references/persona.md +0 -38
  713. package/skills/laoxu-video-script/references/qihao-path.md +0 -35
  714. package/skills/laoxu-video-script/references/qihao-xinfa.md +0 -39
  715. package/skills/laoxu-video-script/references/redlines.md +0 -26
  716. package/skills/lemo-opuscar/SKILL.md +0 -67
  717. package/skills/lipnardo/SKILL.md +0 -308
  718. package/skills/lipnardo/examples/batch-personalized.md +0 -44
  719. package/skills/lipnardo/examples/photo-to-avatar-pipeline.md +0 -56
  720. package/skills/lipnardo/examples/single-video.md +0 -44
  721. package/skills/lipnardo/references/avatar-types.md +0 -42
  722. package/skills/lipnardo/references/credit-costs.md +0 -39
  723. package/skills/lipnardo/references/error-codes.md +0 -66
  724. package/skills/lipnardo/references/heygen-api-reference.md +0 -416
  725. package/skills/ll-video-decomposer/SKILL.md +0 -105
  726. package/skills/ll-video-decomposer/references/audiovisual-analysis-guide.md +0 -44
  727. package/skills/ll-video-decomposer/references/evidence-and-confidence-rules.md +0 -41
  728. package/skills/ll-video-decomposer/references/multi-video-comparison-template.md +0 -48
  729. package/skills/ll-video-decomposer/references/single-video-report-template.md +0 -47
  730. package/skills/ll-video-decomposer/references/tool-discovery-workflow.md +0 -30
  731. package/skills/ll-video-decomposer/references/transcription-routing.md +0 -65
  732. package/skills/ll-video-decomposer/references/video-acquisition-workflow.md +0 -30
  733. package/skills/ltx2-video/SKILL.md +0 -193
  734. package/skills/ltx2-video/references/mode_ux.md +0 -293
  735. package/skills/make-ai-short/SKILL.md +0 -130
  736. package/skills/make-blender-education-video/SKILL.md +0 -247
  737. package/skills/make-blender-education-video/references/evidence-and-explanation.md +0 -62
  738. package/skills/make-blender-education-video/references/github-workflow-discovery.md +0 -55
  739. package/skills/make-blender-education-video/references/production-workflow.md +0 -62
  740. package/skills/make-blender-education-video/references/story-patterns.md +0 -65
  741. package/skills/make-blender-education-video/references/visual-quality.md +0 -82
  742. package/skills/manage-storyboard-projects/SKILL.md +0 -128
  743. package/skills/manim-composer/SKILL.md +0 -176
  744. package/skills/manim-composer/references/narrative-patterns.md +0 -125
  745. package/skills/manim-composer/references/scene-examples.md +0 -216
  746. package/skills/manim-composer/references/visual-techniques.md +0 -223
  747. package/skills/manim-composer/templates/scenes-template.md +0 -147
  748. package/skills/monet-ai-editor-monet/SKILL.md +0 -367
  749. package/skills/motion-graphics/SKILL.md +0 -206
  750. package/skills/motion-graphics/references/craft.md +0 -136
  751. package/skills/motion-graphics/references/engine.md +0 -130
  752. package/skills/motion-graphics/references/export.md +0 -67
  753. package/skills/motion-graphics/references/physics.md +0 -100
  754. package/skills/motion-graphics/references/verify.md +0 -124
  755. package/skills/motion-video/SKILL.md +0 -133
  756. package/skills/motion-video/references/audio-and-beat-sync.md +0 -109
  757. package/skills/motion-video/references/composition-contract.md +0 -107
  758. package/skills/motion-video/references/production-pipeline.md +0 -147
  759. package/skills/motion-video/references/style-comic-spiderverse.md +0 -87
  760. package/skills/motion-video/references/style-glass-keynote.md +0 -69
  761. package/skills/motion-video-maker/SKILL.md +0 -1452
  762. package/skills/motion-video-maker/reference/components.md +0 -451
  763. package/skills/motion-video-maker/reference/workflow.md +0 -190
  764. package/skills/motioncraft/SKILL.md +0 -221
  765. package/skills/motioncraft/references/animation-system.md +0 -57
  766. package/skills/motioncraft/references/assets-and-licensing.md +0 -21
  767. package/skills/motioncraft/references/customization.md +0 -52
  768. package/skills/motioncraft/references/gpu-cloud-render.md +0 -15
  769. package/skills/motioncraft/references/music.md +0 -43
  770. package/skills/motioncraft/references/phase1-planning-and-preview.md +0 -74
  771. package/skills/motioncraft/references/phase2-timeline-audio.md +0 -33
  772. package/skills/motioncraft/references/phase3-pixel-review.md +0 -13
  773. package/skills/motioncraft/references/phase4-templates.md +0 -30
  774. package/skills/motioncraft/references/preflight.md +0 -27
  775. package/skills/motioncraft/references/qa.md +0 -53
  776. package/skills/motioncraft/references/reference-analysis.md +0 -37
  777. package/skills/narrator-ai-cli/SKILL.md +0 -256
  778. package/skills/narrator-ai-cli/references/magic-video.md +0 -205
  779. package/skills/narrator-ai-cli/references/operations.md +0 -230
  780. package/skills/narrator-ai-cli/references/resources.md +0 -126
  781. package/skills/narrator-ai-cli/references/workflows.md +0 -332
  782. package/skills/newcut-video-clipping/SKILL.md +0 -194
  783. package/skills/newcut-video-clipping/references/examples.md +0 -59
  784. package/skills/newcut-video-clipping/references/provider-config.md +0 -110
  785. package/skills/newcut-video-clipping/references/quality-check.md +0 -35
  786. package/skills/newcut-video-clipping/references/semantic-plan.md +0 -65
  787. package/skills/notes-to-video/SKILL.md +0 -476
  788. package/skills/openchatcut/SKILL.md +0 -100
  789. package/skills/openchatcut/references/editing-workflow.md +0 -54
  790. package/skills/openchatcut/references/getting-started.md +0 -106
  791. package/skills/openchatcut/references/known-errors.md +0 -62
  792. package/skills/openstoryline-install/SKILL.md +0 -228
  793. package/skills/orca-motion/SKILL.md +0 -100
  794. package/skills/orca-motion/references/api.md +0 -100
  795. package/skills/orca-motion/references/integration.md +0 -59
  796. package/skills/orca-motion/references/kinetic-type.md +0 -59
  797. package/skills/orca-motion/references/principles.md +0 -76
  798. package/skills/package-talking-head-video/SKILL.md +0 -90
  799. package/skills/package-talking-head-video/docs/EXAMPLES.md +0 -18
  800. package/skills/package-talking-head-video/docs/TROUBLESHOOTING.md +0 -29
  801. package/skills/package-talking-head-video/docs/USAGE.md +0 -83
  802. package/skills/package-talking-head-video/docs/superpowers/plans/2026-08-08-multicolor-center-speaker.md +0 -144
  803. package/skills/package-talking-head-video/docs/superpowers/plans/2026-08-08-semantic-template-system-v2.md +0 -1099
  804. package/skills/package-talking-head-video/docs/superpowers/specs/2026-08-08-multicolor-center-speaker-design.md +0 -154
  805. package/skills/package-talking-head-video/docs/superpowers/specs/2026-08-08-semantic-template-system-v2-design.md +0 -365
  806. package/skills/package-talking-head-video/examples/auto-editing-0/GATE_A.md +0 -56
  807. package/skills/package-talking-head-video/examples/auto-editing-0/GATE_D.md +0 -8
  808. package/skills/package-talking-head-video/examples/auto-editing-0/QA_REPORT.md +0 -34
  809. package/skills/package-talking-head-video/references/director-rules.md +0 -29
  810. package/skills/package-talking-head-video/references/motion-and-illustration.md +0 -25
  811. package/skills/paper-cut/SKILL.md +0 -164
  812. package/skills/paper-cut/references/asset-spec.md +0 -47
  813. package/skills/paper-cut/references/audio-and-chatcut.md +0 -26
  814. package/skills/paper-cut/references/hyperframes-assembly.md +0 -47
  815. package/skills/paper-cut/references/image-led-production.md +0 -65
  816. package/skills/paper-cut/references/storyboard-schema.md +0 -48
  817. package/skills/paper-cut/references/workflow.md +0 -39
  818. package/skills/personal-ip-brand-intro/SKILL.md +0 -216
  819. package/skills/personal-ip-brand-intro/references/intake-schema.md +0 -79
  820. package/skills/personal-ip-brand-intro/references/music-upload-workflow.md +0 -40
  821. package/skills/personal-ip-brand-intro/references/originality-rules.md +0 -42
  822. package/skills/personal-ip-brand-intro/references/qa-checklist.md +0 -60
  823. package/skills/personal-ip-brand-intro/references/rhythm-routing.md +0 -41
  824. package/skills/personal-ip-brand-intro/references/storyboard-contract.md +0 -42
  825. package/skills/pixel2motion/SKILL.md +0 -279
  826. package/skills/pixel2motion/references/html-delivery-template.md +0 -42
  827. package/skills/pixel2motion/references/motion-personality.md +0 -109
  828. package/skills/pixel2motion/references/reveal-patterns.md +0 -163
  829. package/skills/pixel2motion/references/ribbon-fitting.md +0 -90
  830. package/skills/pixel2motion/references/twelve-principles-for-logos.md +0 -116
  831. package/skills/premiere-batch-delivery/SKILL.md +0 -71
  832. package/skills/premiere-pro-mcp/SKILL.md +0 -161
  833. package/skills/promo-creator-skills/SKILL.md +0 -209
  834. package/skills/promo-creator-skills/references/mureka_prompt_guide.md +0 -251
  835. package/skills/promo-creator-skills/references/product_promo_bgm_prompting.md +0 -100
  836. package/skills/promo-video/SKILL.md +0 -408
  837. package/skills/qisi-video-remix/SKILL.md +0 -134
  838. package/skills/qisi-video-remix/examples/creative-plan.md +0 -133
  839. package/skills/qisi-video-remix/references/delivery-guide.md +0 -63
  840. package/skills/reel-video/SKILL.md +0 -237
  841. package/skills/remotion-ad-video/SKILL.md +0 -252
  842. package/skills/remotion-ad-video/references/ad-aesthetic-qa.md +0 -60
  843. package/skills/remotion-ad-video/references/ad-brief-contract.md +0 -235
  844. package/skills/remotion-ad-video/references/ad-exemplars.md +0 -186
  845. package/skills/remotion-ad-video/references/ad-intake.md +0 -54
  846. package/skills/remotion-ad-video/references/asset-harvest.md +0 -56
  847. package/skills/remotion-ad-video/references/audio-caption-system.md +0 -202
  848. package/skills/remotion-ad-video/references/concept-contract.md +0 -128
  849. package/skills/remotion-ad-video/references/creative-direction.md +0 -146
  850. package/skills/remotion-ad-video/references/fast-test-workflow.md +0 -86
  851. package/skills/remotion-ad-video/references/game-ad-patterns.md +0 -75
  852. package/skills/remotion-ad-video/references/hyperframes-output.md +0 -90
  853. package/skills/remotion-ad-video/references/industry-angle-library.md +0 -71
  854. package/skills/remotion-ads/SKILL.md +0 -278
  855. package/skills/remotion-ads/references/ad-copywriting.md +0 -229
  856. package/skills/remotion-ads/references/animations.md +0 -693
  857. package/skills/remotion-ads/references/brand-config-template.md +0 -355
  858. package/skills/remotion-ads/references/captions.md +0 -529
  859. package/skills/remotion-ads/references/carousels.md +0 -580
  860. package/skills/remotion-ads/references/components.md +0 -897
  861. package/skills/remotion-ads/references/copy-frameworks.md +0 -144
  862. package/skills/remotion-ads/references/formats.md +0 -436
  863. package/skills/remotion-ads/references/gemini-tts.md +0 -473
  864. package/skills/remotion-ads/references/html-in-canvas.md +0 -555
  865. package/skills/remotion-ads/references/local-assets.md +0 -543
  866. package/skills/remotion-ads/references/music.md +0 -656
  867. package/skills/remotion-code-motion-explainer/SKILL.md +0 -178
  868. package/skills/remotion-code-motion-explainer/references/code-motion-design.md +0 -86
  869. package/skills/remotion-code-motion-explainer/references/motion-production-patterns.md +0 -93
  870. package/skills/remotion-code-motion-explainer/references/production-and-qc.md +0 -99
  871. package/skills/remotion-code-motion-explainer/references/reference-reconstruction.md +0 -48
  872. package/skills/remotion-code-motion-explainer/references/ui-motion-shot-library.md +0 -62
  873. package/skills/remotion-motion-graphics/SKILL.md +0 -169
  874. package/skills/remotion-motion-graphics/references/patterns.md +0 -355
  875. package/skills/remotion-motion-graphics/references/polish.md +0 -102
  876. package/skills/remotion-motion-graphics/references/scaffold.md +0 -144
  877. package/skills/remotion-motion-graphics/references/traps.md +0 -152
  878. package/skills/remotion-resemble-ai/SKILL.md +0 -879
  879. package/skills/remotion-resemble-ai/rules/resemble-captions.md +0 -350
  880. package/skills/remotion-resemble-ai/rules/resemble-remotion-integration.md +0 -305
  881. package/skills/remotion-resemble-ai/rules/resemble-setup.md +0 -284
  882. package/skills/remotion-resemble-ai/rules/resemble-streaming-tts.md +0 -225
  883. package/skills/remotion-resemble-ai/rules/resemble-sync-tts.md +0 -239
  884. package/skills/remotion-resemble-ai/rules/resemble-voices.md +0 -213
  885. package/skills/remotion-resemble-ai/rules/visual-animations.md +0 -567
  886. package/skills/riffkit/SKILL.md +0 -196
  887. package/skills/riffkit/examples/any-look-styles.md +0 -11
  888. package/skills/riffkit/examples/faceless-and-auto.md +0 -16
  889. package/skills/riffkit/examples/localize-spanish.md +0 -18
  890. package/skills/riffkit/examples/tiktok-shop-product.md +0 -22
  891. package/skills/riffkit/references/anchor.md +0 -62
  892. package/skills/riffkit/references/api.md +0 -806
  893. package/skills/riffkit/references/details.md +0 -153
  894. package/skills/riffkit/references/errors.md +0 -69
  895. package/skills/riffkit/references/intents.md +0 -29
  896. package/skills/saas-motion-video/SKILL.md +0 -71
  897. package/skills/script-to-video/SKILL.md +0 -2627
  898. package/skills/shorts/SKILL.md +0 -372
  899. package/skills/shorts/references/caption-styles.md +0 -105
  900. package/skills/shorts/references/platform-specs.md +0 -149
  901. package/skills/shorts/references/remotion-patterns.md +0 -180
  902. package/skills/shorts/references/scoring-rubric.md +0 -106
  903. package/skills/smart-video-editor/SKILL.md +0 -327
  904. package/skills/smart-video-editor/docs/FONTS.md +0 -57
  905. package/skills/story-telling/SKILL.md +0 -222
  906. package/skills/story-telling/rules/composition.md +0 -130
  907. package/skills/story-telling/rules/images.md +0 -119
  908. package/skills/story-telling/rules/models.md +0 -98
  909. package/skills/story-telling/rules/narration.md +0 -87
  910. package/skills/story-telling/rules/pitfalls.md +0 -140
  911. package/skills/story-telling/rules/story-formats.md +0 -108
  912. package/skills/story-telling/rules/story-json.md +0 -143
  913. package/skills/story-telling/rules/voices.md +0 -114
  914. package/skills/story-telling/rules/workflow.md +0 -105
  915. package/skills/story-to-handdrawn-video/SKILL.md +0 -216
  916. package/skills/story-to-handdrawn-video/references/asset-workflow.md +0 -24
  917. package/skills/story-to-handdrawn-video/references/reference-style-workflow.md +0 -27
  918. package/skills/su-card-to-video/SKILL.md +0 -103
  919. package/skills/talking-head-video-pipeline/SKILL.md +0 -224
  920. package/skills/talking-head-video-pipeline/examples/prompts.md +0 -217
  921. package/skills/talking-head-video-pipeline/references/asr-adapters.md +0 -51
  922. package/skills/talking-head-video-pipeline/references/caption-workflow.md +0 -53
  923. package/skills/talking-head-video-pipeline/references/export-recipes.md +0 -78
  924. package/skills/talking-head-video-pipeline/references/layout-safety.md +0 -49
  925. package/skills/talking-head-video-pipeline/references/video-use-integration.md +0 -71
  926. package/skills/talking-head-video-pipeline/references/workflows/captions.md +0 -52
  927. package/skills/talking-head-video-pipeline/references/workflows/design.md +0 -77
  928. package/skills/talking-head-video-pipeline/references/workflows/doctor.md +0 -51
  929. package/skills/talking-head-video-pipeline/references/workflows/export.md +0 -50
  930. package/skills/talking-head-video-pipeline/references/workflows/init.md +0 -51
  931. package/skills/talking-head-video-pipeline/references/workflows/learn.md +0 -36
  932. package/skills/text-to-lottie/SKILL.md +0 -202
  933. package/skills/text-to-lottie/references/chapterization-transition-grammar.md +0 -132
  934. package/skills/text-to-lottie/references/design-taste.md +0 -292
  935. package/skills/text-to-lottie/references/lottie-spec-map.md +0 -82
  936. package/skills/text-to-lottie/references/motion-taste.md +0 -260
  937. package/skills/text-to-lottie/references/player-contract.md +0 -325
  938. package/skills/text-to-lottie/references/recipe-camera-scene-motion.md +0 -65
  939. package/skills/text-to-lottie/references/recipe-data-stats.md +0 -104
  940. package/skills/text-to-lottie/references/recipe-diagram-technical.md +0 -106
  941. package/skills/text-to-lottie/references/recipe-loaders-icons.md +0 -70
  942. package/skills/text-to-lottie/references/recipe-logo.md +0 -72
  943. package/skills/text-to-lottie/references/recipe-lower-thirds.md +0 -62
  944. package/skills/text-to-lottie/references/recipe-product-promo.md +0 -99
  945. package/skills/ultrademo/SKILL.md +0 -212
  946. package/skills/video-assemble/SKILL.md +0 -101
  947. package/skills/video-assemble-zenstory-ai/SKILL.md +0 -153
  948. package/skills/video-assemble-zenstory-ai/references/audio-modes.md +0 -63
  949. package/skills/video-assemble-zenstory-ai/references/explicit-audio-mix.md +0 -77
  950. package/skills/video-assemble-zenstory-ai/references/jianying/SOURCE.md +0 -14
  951. package/skills/video-assemble-zenstory-ai/references/narration-adoption.md +0 -103
  952. package/skills/video-assemble-zenstory-ai/references/packaging.md +0 -44
  953. package/skills/video-assemble-zenstory-ai/references/source-score.md +0 -146
  954. package/skills/video-assemble-zenstory-ai/references/subtitle-track.md +0 -202
  955. package/skills/video-editing/SKILL.md +0 -688
  956. package/skills/video-explainer/SKILL.md +0 -163
  957. package/skills/video-explainer/references/brief-to-script.md +0 -56
  958. package/skills/video-explainer/references/errors-and-privacy.md +0 -18
  959. package/skills/video-explainer/references/motion-storyboard.md +0 -82
  960. package/skills/video-explainer/references/render-and-verify.md +0 -62
  961. package/skills/video-explainer/references/review-gate.md +0 -82
  962. package/skills/video-explainer/references/setup-and-doctor.md +0 -33
  963. package/skills/video-script-builder/SKILL.md +0 -329
  964. package/skills/video-script-builder/examples/quick-start-transcript.md +0 -19
  965. package/skills/video-script-builder/references/audio-workflow.md +0 -84
  966. package/skills/video-script-builder/references/caption-components.md +0 -70
  967. package/skills/video-script-builder/references/common-pitfalls.md +0 -80
  968. package/skills/video-script-builder/references/component-catalog.md +0 -197
  969. package/skills/video-script-builder/references/component-recipes.md +0 -165
  970. package/skills/video-script-builder/references/gsap-patterns.md +0 -112
  971. package/skills/video-script-builder/references/pacing-rules.md +0 -78
  972. package/skills/video-script-builder/references/quality-checklist.md +0 -98
  973. package/skills/video-script-builder/references/remotion-patterns.md +0 -211
  974. package/skills/video-script-builder/references/shader-transitions.md +0 -115
  975. package/skills/video-script-builder/references/taste-principles.md +0 -160
  976. package/skills/video-scrub/SKILL.md +0 -216
  977. package/skills/video-scrub/references/profiles.md +0 -89
  978. package/skills/video-scrub/references/residue-map.md +0 -204
  979. package/skills/video-short-maker/SKILL.md +0 -182
  980. package/skills/video-shot-analysis-feishu/SKILL.md +0 -173
  981. package/skills/video-shotcraft/SKILL.md +0 -267
  982. package/skills/video-shotcraft/docs/deepseek-harness.md +0 -69
  983. package/skills/video-shotcraft/references/aesthetic-rules.md +0 -177
  984. package/skills/video-shotcraft/references/final-review.md +0 -112
  985. package/skills/video-shotcraft/references/guided-free-creation.md +0 -199
  986. package/skills/video-shotcraft/references/jianying-export.md +0 -182
  987. package/skills/video-shotcraft/references/music-beat-sync.md +0 -219
  988. package/skills/video-shotcraft/references/pipeline.md +0 -390
  989. package/skills/video-shotcraft/references/sequences/promo-energy-arc.md +0 -50
  990. package/skills/video-shotcraft/references/shots/ATTRIBUTION.md +0 -65
  991. package/skills/video-shotcraft/references/shots/camera/basic-3d-scene.md +0 -37
  992. package/skills/video-shotcraft/references/shots/camera/crash-zoom-punch.md +0 -39
  993. package/skills/video-shotcraft/references/shots/camera/cursor-flyover.md +0 -38
  994. package/skills/video-shotcraft-vincentwei10/SKILL.md +0 -316
  995. package/skills/video-shotcraft-vincentwei10/references/aesthetic-rules.md +0 -187
  996. package/skills/video-shotcraft-vincentwei10/references/final-review.md +0 -116
  997. package/skills/video-shotcraft-vincentwei10/references/guided-free-creation.md +0 -199
  998. package/skills/video-shotcraft-vincentwei10/references/jianying-export.md +0 -183
  999. package/skills/video-shotcraft-vincentwei10/references/music-beat-sync.md +0 -257
  1000. package/skills/video-shotcraft-vincentwei10/references/pipeline.md +0 -401
  1001. package/skills/video-shotcraft-vincentwei10/references/publish-upload-post.md +0 -111
  1002. package/skills/video-shotcraft-vincentwei10/references/sequences/promo-energy-arc.md +0 -50
  1003. package/skills/video-shotcraft-vincentwei10/references/shots/ATTRIBUTION.md +0 -62
  1004. package/skills/video-shotcraft-vincentwei10/references/shots/camera/basic-3d-scene.md +0 -41
  1005. package/skills/video-shotcraft-vincentwei10/references/shots/camera/crash-zoom-punch.md +0 -52
  1006. package/skills/video-shotcraft-vincentwei10/references/shots/camera/cursor-flyover.md +0 -39
  1007. package/skills/video-structure-analyzer/SKILL.md +0 -148
  1008. package/skills/video-structure-analyzer/examples/xhs-rook-time-spend/xhs-rook-time-spend_/346/213/211/347/211/207/346/213/206/350/247/243.md +0 -50
  1009. package/skills/video-structure-analyzer/examples/xhs-smelly-cat/xhs-smelly-cat_/346/213/211/347/211/207/346/213/206/350/247/243.md +0 -19
  1010. package/skills/video-toolkit/SKILL.md +0 -686
  1011. package/skills/videocut/SKILL.md +0 -159
  1012. package/skills/videodb/SKILL.md +0 -497
  1013. package/skills/videodb/reference/api-reference.md +0 -741
  1014. package/skills/videodb/reference/capture-reference.md +0 -399
  1015. package/skills/videodb/reference/capture.md +0 -110
  1016. package/skills/videodb/reference/editor-reference.md +0 -506
  1017. package/skills/videodb/reference/editor.md +0 -389
  1018. package/skills/videodb/reference/generative.md +0 -344
  1019. package/skills/videodb/reference/indexing-reference.md +0 -481
  1020. package/skills/videodb/reference/indexing.md +0 -537
  1021. package/skills/videodb/reference/legacy/index-reference.md +0 -223
  1022. package/skills/videodb/reference/legacy/index.md +0 -241
  1023. package/skills/videodb/reference/legacy/search.md +0 -249
  1024. package/skills/videodb/reference/migration.md +0 -113
  1025. package/skills/vlog-auto-edit/SKILL.md +0 -982
  1026. package/skills/vlog-auto-edit/examples/project_structure.md +0 -84
  1027. package/skills/vox-animated-ad-mcp/SKILL.md +0 -419
  1028. package/skills/vox-director/SKILL.md +0 -351
  1029. package/skills/vox-director/references/beat-layer.md +0 -143
  1030. package/skills/vox-director/references/host-mode.md +0 -120
  1031. package/skills/vox-director/references/local-engine.md +0 -73
  1032. package/skills/vox-director/references/models-and-gotchas.md +0 -91
  1033. package/skills/vox-director/references/prompt-guide.md +0 -275
  1034. package/skills/vox-director/references/voices.md +0 -59
  1035. package/skills/xingchen-vox-collage/SKILL.md +0 -251
  1036. package/skills/xingchen-vox-collage/references/asset-layer-contract.md +0 -98
  1037. package/skills/xingchen-vox-collage/references/creative-exploration.md +0 -19
  1038. package/skills/xingchen-vox-collage/references/learned-branches.md +0 -34
  1039. package/skills/xingchen-vox-collage/references/remotion-scene-contract.md +0 -77
  1040. package/skills/xingchen-vox-collage/references/visual-language.md +0 -74
  1041. package/skills/xingchen-vox-collage/references/visual-qa.md +0 -59
  1042. package/skills/youtube/SKILL.md +0 -147
  1043. package/skills/youtube/references/algorithm-guide.md +0 -59
  1044. package/skills/youtube/references/analytics-benchmarks.md +0 -67
  1045. package/skills/youtube/references/dataforseo-integration.md +0 -51
  1046. package/skills/youtube/references/monetization-guide.md +0 -62
  1047. package/skills/youtube/references/repurposing-guide.md +0 -54
  1048. package/skills/youtube/references/retention-scripting-guide.md +0 -75
  1049. package/skills/youtube/references/seo-playbook.md +0 -77
  1050. package/skills/youtube/references/shorts-playbook.md +0 -64
  1051. package/skills/youtube/references/thumbnail-ctr-guide.md +0 -73
  1052. package/skills/youtube-shorts-factory/SKILL.md +0 -358
  1053. package/skills/youtube-shorts-factory/resources/adaptation-guide.md +0 -133
  1054. package/skills/youtube-shorts-factory/resources/storyboard-template.md +0 -271
  1055. package/skills/youtube-shorts-factory/resources/workflow-steps.md +0 -139
  1056. package/studio/ui/dist/assets/ExportCenter-DEyy1vs_.js +0 -1
  1057. package/studio/ui/dist/assets/SettingsModal-CQmsA2A2.js +0 -2
  1058. package/studio/ui/dist/assets/es-AqUfIkAy.js +0 -1
  1059. package/studio/ui/dist/assets/index-C7moXjTY.css +0 -1
  1060. package/studio/ui/dist/assets/index-DdU5QNpY.js +0 -1623
  1061. package/studio/ui/dist/assets/ja-YwiCB4QQ.js +0 -1
  1062. package/studio/ui/dist/assets/ko-CKtBPDze.js +0 -1
  1063. package/studio/ui/dist/assets/zh-CN-DtNEwKWJ.js +0 -1
@@ -15,6 +15,8 @@
15
15
  */
16
16
  import { createProjectFrom, ProjectError } from './projects.mjs';
17
17
  import { installSkills } from './skills.mjs';
18
+ import { summaryFor } from './skill-summaries.mjs';
19
+ import { styleFiles, userStyles } from './styles-store.mjs';
18
20
  import { filmShell, pageHead, pageMath } from './templates-page.mjs';
19
21
  import { STYLE_TEMPLATES } from './templates-styles.mjs';
20
22
 
@@ -243,20 +245,43 @@ export const TEMPLATES = [
243
245
  ...STYLE_TEMPLATES.map((style) => /** @type {Template} */ ({ ...style, kind: 'style' })),
244
246
  ];
245
247
 
246
- /** What the API lists: everything but the files (which only the server needs). */
247
- export function listTemplates() {
248
- return TEMPLATES.map(({ id, seconds, width, height, kind, skill }) => ({ id, seconds, width, height, kind, ...(skill ? { skill } : {}) }));
248
+ /** Everything the Templates page offers, found by id: the built-ins, then the styles this person added from a
249
+ * repository (`styles-store.mjs`), whose files are generated so the film draws and the card shows a real frame.
250
+ * @param {string} id
251
+ * @returns {{ id: string, seconds: number, width: number, height: number, title: string, kind: 'layout' | 'style',
252
+ * skill?: string, repo?: string, hint?: string, files: Record<string, string> } | undefined} */
253
+ export function templateById(id) {
254
+ const builtIn = TEMPLATES.find((t) => t.id === id);
255
+ if (builtIn) return builtIn;
256
+ const entry = userStyles().find((one) => one.id === id);
257
+ if (!entry) return undefined;
258
+ return { ...entry, kind: 'style', files: styleFiles(entry) };
259
+ }
260
+
261
+ /** What the API lists: everything but the files (which only the server needs). A style added from a repository says
262
+ * what it is called and what it is for (its card has no line in any language's dictionary), and that it was added —
263
+ * which is what makes it takeable away again (`repo` says where from, and is empty for a skill AICUT brought). Asked
264
+ * for in a `lang`, its line is the skill's one-liner (skill-summaries.mjs) instead of the paragraph in its SKILL.md.
265
+ * @param {string} [lang] */
266
+ export function listTemplates(lang) {
267
+ return [
268
+ ...TEMPLATES.map(({ id, seconds, width, height, kind, skill }) => ({ id, seconds, width, height, kind, ...(skill ? { skill } : {}) })),
269
+ ...userStyles().map(({ id, seconds, width, height, skill, title, hint, repo }) =>
270
+ ({ id, seconds, width, height, kind: /** @type {'style'} */ ('style'), skill, title, repo, added: true,
271
+ hint: lang ? summaryFor(skill, hint, lang) : hint })),
272
+ ];
249
273
  }
250
274
 
251
275
  /**
252
276
  * A new project made from a template: its name is the template's (taken names get " 2", " 3"…), its files are the
253
- * template's, and it is opened as any new project is. A template that brings a skill (`templates-styles.mjs`) has that
254
- * skill copied into the project at `.pi/skills`, so the film and the rules it follows travel together — and a skill
255
- * this copy of AICUT does not have is no reason to refuse the project (`missing` says so instead).
277
+ * template's, and it is opened as any new project is. A template that brings a skill (`templates-styles.mjs`, or a
278
+ * style added from a repository) has that skill copied into the project at `.pi/skills`, so the film and the rules it
279
+ * follows travel together — and a skill this copy of AICUT does not have is no reason to refuse the project
280
+ * (`missing` says so instead).
256
281
  * @param {string} id @param {string} [name]
257
282
  */
258
283
  export async function createFromTemplate(id, name) {
259
- const template = TEMPLATES.find((t) => t.id === id);
284
+ const template = templateById(id);
260
285
  if (!template) throw new ProjectError(`There is no template called ${JSON.stringify(id)}.`, 404, 'no-template');
261
286
  const project = await createProjectFrom(name || template.title, template.files);
262
287
  if (!template.skill) return project;
@@ -0,0 +1 @@
1
+ import{c as Te,A as ne,u as St,d as Nt,R as h,F as wt,G as Et,H as Qe,I as De,r as Mt,j as t,X as Ft,C as Pt,J as A,K as Dt,D as At,N as _e,g as dt,L as Ue,O as $t,Q as It,M as _t,U as Tt,V as Ht,W as Rt,Y as zt,Z as Lt,_ as Ot,$ as We,a0 as qt,a1 as Bt,s as Gt,x as Vt,a2 as Kt}from"./index-BjJVmBzB.js";const Qt=Te("FolderArchive",[["circle",{cx:"15",cy:"19",r:"2",key:"u2pros"}],["path",{d:"M20.9 19.8A2 2 0 0 0 22 18V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h5.1",key:"1jj40k"}],["path",{d:"M15 11v-1",key:"cntcp"}],["path",{d:"M15 17v-2",key:"1279jj"}]]);const Ut=Te("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]]);const Wt=Te("Presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]),Xe=["prores4444","hevc_alpha","vp9","png"],Xt={h264:"H.264",hevc:"HEVC",vp9:"WebM VP9",prores422hq:"ProRes 422 HQ",prores4444:"ProRes 4444",hevc_alpha:"HEVC + Alpha",png:"PNG"},ge=[{id:"bilibili",name:"哔哩哔哩",group:"landscape",frame:"16:9",shortEdge:1080,fps:60,burnSubtitles:!1,china:!0},{id:"douyin",name:"抖音",group:"vertical",frame:"9:16",shortEdge:1080,fps:30,burnSubtitles:!0,china:!0},{id:"kuaishou",name:"快手",group:"vertical",frame:"9:16",shortEdge:1080,fps:30,burnSubtitles:!0,china:!0},{id:"channels",name:"视频号",group:"vertical",frame:"9:16",shortEdge:1080,fps:30,burnSubtitles:!0,china:!0},{id:"xiaohongshu",name:"小红书",group:"feed",frame:"3:4",shortEdge:1080,fps:30,burnSubtitles:!0,china:!0},{id:"youtube",name:"YouTube",group:"landscape",frame:"16:9",shortEdge:1080,fps:60,burnSubtitles:!1},{id:"youtube-4k",name:"YouTube 4K",group:"landscape",frame:"16:9",shortEdge:2160,fps:60,burnSubtitles:!1},{id:"x",name:"X",group:"landscape",frame:"16:9",shortEdge:1080,fps:30,burnSubtitles:!0,maxDurationSec:140},{id:"shorts",name:"YouTube Shorts",group:"vertical",frame:"9:16",shortEdge:1080,fps:30,burnSubtitles:!0,maxDurationSec:180},{id:"tiktok",name:"TikTok",group:"vertical",frame:"9:16",shortEdge:1080,fps:30,burnSubtitles:!0},{id:"reels",name:"Instagram Reels",group:"vertical",frame:"9:16",shortEdge:1080,fps:30,burnSubtitles:!0},{id:"instagram",name:"Instagram Feed",group:"feed",frame:"4:5",shortEdge:1080,fps:30,burnSubtitles:!0},{id:"square",name:"LinkedIn · Facebook",group:"feed",frame:"1:1",shortEdge:1080,fps:30,burnSubtitles:!0}];function Yt(a){return a==="zh-CN"?[...ge.filter(o=>o.china),...ge.filter(o=>!o.china)]:ge.filter(o=>!o.china)}function Zt(a){return ge.find(o=>o.id===a)??null}const ue=4096;function $(a){return Math.max(2,Math.round(a/2)*2)}function xt(a,o){const i=a.ratio??a.w/Math.max(1,a.h);let r,c;if(i>=1?(c=$(o),r=$(c*i)):(r=$(o),c=$(r/i)),r>ue||c>ue){const f=Math.min(ue/r,ue/c);r=$(r*f),c=$(c*f)}return{w:r,h:c}}function Jt(a,o){const i=a.ratio??a.w/Math.max(1,a.h);return i>=1?{w:$(o),h:$(o/i)}:{w:$(o*i),h:$(o)}}function Ye(a,o,i,r){return xt(ne(a,o,i),r)}const er={standard:.07,high:.11,master:.2};function tr(a,o,i,r){return Math.min(12e7,Math.max(2e6,a.w*a.h*Math.max(1,o)*er[i]*r))}const me={w:1920,h:1080,fps:30,bytes:15e4},rr=[.25,4],sr=[.9,1.1],ar={standard:.58,high:1,master:1.6},nr={h264:1,hevc:.6,vp9:.7},lr={vp9:2e4,prores422hq:192e3,prores4444:192e3,hevc_alpha:192e3};function Ze(a,o,i,r){const c=ne(a,o,i),f=Math.min(1,c.inner.w*c.inner.h/Math.max(1,c.w*c.h));return r.w*r.h*f}function or(a){const o=Math.max(0,a.durationMs)/1e3,i=a.size.w*a.size.h;let r,c=sr;switch(a.codec){case"prores422hq":r=22e7*(i/(1920*1080))*(a.fps/30);break;case"prores4444":r=33e7*(i/(1920*1080))*(a.fps/30);break;case"hevc_alpha":r=tr(a.size,a.fps,a.quality,.8);break;case"png":r=i*8*a.fps;break;default:{const x=a.filmPixels??i;r=8*me.bytes*(x/(me.w*me.h))**.75*(Math.max(1,a.fps)/me.fps)**.35*ar[a.quality]*(nr[a.codec]??1),c=rr}}const f=a.audio?lr[a.codec]??24e3:0,m=x=>Math.round((r/8*x+f)*o);return[m(c[0]),m(c[1])]}const he={w:640,h:360,fps:15,bytes:3e5},Je=[.4,3];function ir(a){const o=a.filmPixels??a.size.w*a.size.h,i=he.bytes*(o/(he.w*he.h))**.9*(Math.max(1,a.fps)/he.fps)**.6*Math.max(0,a.durationMs)/1e3;return[Math.round(i*Je[0]),Math.round(i*Je[1])]}const Ae=400;function cr(a,o){const i=a.filter(x=>x.durMs>0&&x.startMs<o),r=(x,I)=>{const k=[...x].sort((b,P)=>b.ms-P.ms),s=[];for(const b of k){const P=s.at(-1);P&&b.ms-P.last<Ae?(P.last=b.ms,I&&(P.ms=b.ms),P.labels.includes(b.label)||P.labels.push(b.label)):s.push({ms:b.ms,last:b.ms,labels:[b.label]})}return s.map(b=>({ms:b.ms,title:b.labels.filter(Boolean).join(", ")}))},c=r(i.map(x=>({ms:Math.max(0,x.startMs),label:x.label})),!1),f=r(i.map(x=>({ms:Math.min(o,x.startMs+x.durMs),label:x.label})),!0);c[0]&&c[0].ms<Ae?c[0].ms=0:c.unshift({ms:0,title:""});const m=f.at(-1);return m&&o-m.ms<Ae?m.ms=o:o>0&&f.push({ms:o,title:""}),{starts:c,ends:f.filter(x=>x.ms>0)}}const et=[{id:"video",icon:t.jsx(It,{size:16})},{id:"nle",icon:t.jsx(dt,{size:16})},{id:"social",icon:t.jsx(_t,{size:16})},{id:"alpha",icon:t.jsx(Tt,{size:16})},{id:"gif",icon:t.jsx(Ht,{size:16})},{id:"audio",icon:t.jsx(Rt,{size:16})},{id:"subtitles",icon:t.jsx(zt,{size:16})},{id:"images",icon:t.jsx(Ut,{size:16})},{id:"slides",icon:t.jsx(Wt,{size:16})},{id:"html",icon:t.jsx(Lt,{size:16})},{id:"project",icon:t.jsx(Qt,{size:16})}],$e={premiere:"Premiere Pro",resolve:"DaVinci Resolve"},tt={jianying:"剪映",capcut:"CapCut"},dr=["voice","music","sfx","footage"],be="__film__",C={dest:"video",presets:["youtube"],socialQuality:"high",socialSubs:"auto",video:{codec:"h264",shortEdge:1080,fps:"source",quality:"high",frame:"current",fill:"contain",audio:!0,burn:!0,sidecar:"none"},gif:{width:640,fps:15,frame:"current",fill:"contain",burn:!0},alpha:{codec:"prores4444",source:be,shortEdge:1080,scale:1,fps:30,audio:!0},audio:{format:"wav",mix:!0,stems:!1},nle:{app:"auto",fps:"source",audio:"clips",subtitles:!0},subtitles:{format:"srt"},images:{format:"png",shortEdge:1080,frame:"current",fill:"contain",burn:!1},slides:{format:"pptx",shortEdge:1080,frame:"current",fill:"contain",burn:!1},html:{mode:"pages",shortEdge:1080,frame:"current",fill:"contain",burn:!1,packed:!0},project:{as:"zip",history:!1,chat:!1,logs:!1},folder:""},pt="aicut.exportCenter.v1";function xr(a){const o=a==="zh-CN"?{...C,presets:["bilibili"]}:C;try{const i=JSON.parse(localStorage.getItem(pt)??"null");return!i||typeof i!="object"?o:{...C,...i,presets:Array.isArray(i.presets)?i.presets.filter(r=>Zt(r)):C.presets,video:{...C.video,...i.video},gif:{...C.gif,...i.gif},alpha:{...C.alpha,...i.alpha},audio:{...C.audio,...i.audio},nle:{...C.nle,...i.nle},subtitles:{...C.subtitles,...i.subtitles},images:{...C.images,...i.images},slides:{...C.slides,...i.slides},html:{...C.html,...i.html},project:{...C.project,...i.project?.as==="folder"?{as:"folder"}:{}}}}catch{return o}}function pr(a){try{localStorage.setItem(pt,JSON.stringify(a))}catch{}}const rt=[480,720,1080,1440,2160],st=[720,1080,1440,2160],at=Dt,ur=[320,480,640,800,1080],mr=[10,12,15,20,24],nt=["h264","hevc","prores422hq","prores4444","hevc_alpha","vp9","png"],hr=[.5,1,2],fr=["landscape","vertical","feed"],lt=[23.976,24,25,29.97,30,50,59.94,60],ot=/\.(mp4|m4v|mov|webm|mkv|avi|ogv)$/i;function fe(a,o){if(!o)return!0;switch(a){case"h264":return o.h264;case"hevc":return o.hevc;case"hevc_alpha":return o.hevcAlpha;case"vp9":return o.vp9;case"prores422hq":case"prores4444":return o.prores;case"png":return!0}}const gr=new Set(["social","video","alpha","gif","audio","images","slides","html"]);function kr(a){const{open:o,onClose:i}=a,r=St(),c=Nt(),f=h.useMemo(()=>Yt(c),[c]),[m,x]=h.useState(null),[I,k]=h.useState({jianying:!1,capcut:!1}),[s,b]=h.useState(C),[P,mt]=h.useState(!1),[M,W]=h.useState({on:!1,from:0,to:0}),[_,ve]=h.useState(null),[je,X]=h.useState(null),[le,ht]=h.useState(""),[He,ft]=h.useState(null),[S,gt]=h.useState(null),[K,Re]=h.useState(null),[oe,Y]=h.useState(null);h.useEffect(()=>{if(!o)return;const e=xr(c);b(a.focusClipId?{...e,dest:"alpha",alpha:{...e.alpha,source:a.focusClipId}}:e),mt(!0),X(null),ve(null),Y(null),W(n=>({...n,on:!1})),wt(a.projectId).then(n=>{x(n.can),k({jianying:!!n.drafts?.jianying,capcut:!!n.drafts?.capcut}),ht(n.folder),ft(n.subtitles??0),gt(n.project??null)}).catch(()=>{})},[o]),h.useEffect(()=>{P&&pr(s)},[s,P]),h.useEffect(()=>{if(!o)return;const e=n=>{n.key==="Escape"&&!_&&i()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[o,i,_]);const g=a.stage,v=a.durationMs,N=a.film??null,Z=h.useMemo(()=>new Set((N?.sounds??[]).filter(e=>e.durMs>0).map(e=>e.src&&ot.test(e.src)?"footage":e.kind)),[N]),Ce=N!=null&&Z.size===0,ie=h.useMemo(()=>a.mgBlocks??[],[a.mgBlocks]),y=He??0,ke=h.useMemo(()=>[...N?.scenes??[]].sort((e,n)=>e.startMs-n.startMs).find(e=>e.src&&ot.test(e.src))?.src??null,[N]);h.useEffect(()=>{if(Re(null),!o||!ke)return;let e=!0;return Et(a.projectId,ke).then(n=>{!e||n==null||Re(lt.find(l=>Math.abs(l-n)<.05)??null)}).catch(()=>{}),()=>{e=!1}},[o,ke,a.projectId]);const ye=h.useMemo(()=>cr(N?.scenes??[],v),[N,v]),Se=h.useMemo(()=>{if(!N)return 1;let e=-1/0,n=0;for(const l of[...N.scenes].sort((w,j)=>w.startMs-j.startMs))!(l.durMs>0)||l.startMs>=v||l.startMs-e<400||(e=l.startMs,n++);return Math.max(1,Math.min(120,n))},[N,v]);h.useEffect(()=>{W(e=>({...e,from:0,to:v}))},[v]);const Q=M.on&&M.to>M.from&&(M.from>0||M.to<v)?{fromMs:M.from,toMs:M.to}:void 0,q=Q?Q.toMs-Q.fromMs:v,ce=Q?[Q.fromMs/1e3,Q.toMs/1e3]:void 0,B=e=>e==="current"?a.frame:e,J=a.projectFps??30,ze=e=>e==="source"?J:e,d=(e,n)=>{b(l=>({...l,[e]:typeof n=="object"&&!Array.isArray(n)&&n!==null?{...l[e],...n}:n}))},u=et.some(e=>e.id===s.dest)?s.dest:"video",T=ie.find(e=>e.clipId===s.alpha.source),bt=u==="alpha"&&T?T.durMs:q,G=fe(s.video.codec,m)&&nt.includes(s.video.codec)?s.video.codec:"h264",ee=Xe.includes(s.alpha.codec)&&fe(s.alpha.codec,m)?s.alpha.codec:"prores4444",Le=s.audio.format==="mp3"&&m&&!m.mp3?"wav":s.audio.format,de=c==="zh-CN"?"jianying":"capcut",te=I[de]||!I[de==="jianying"?"capcut":"jianying"]?de:de==="jianying"?"capcut":"jianying",Ne=I[te],re=e=>r(e).replaceAll("{app}",tt[te]),H=s.nle.app==="auto"?Ne?"draft":"premiere":s.nle.app,vt=u==="nle"&&H==="draft"&&Ne,xe=e=>Xt[e]+(e==="png"?` ${r("exportCenter.sequence")}`:""),Oe=h.useMemo(()=>Qe.filter(e=>s.project[e]&&(S==null||S[e]!=null)),[s.project,S]),se=h.useMemo(()=>{const e=ce?{range:ce}:{},n=l=>y>0&&l?{burnSubtitles:!0}:{};switch(u){case"social":return s.presets.map(l=>f.find(w=>w.id===l)??null).filter(l=>l!==null).map(l=>({kind:"video",codec:"h264",frame:l.frame,fill:"contain",shortEdge:l.shortEdge,fps:l.fps,quality:s.socialQuality,audio:!0,preset:l.name,label:l.name,...n(s.socialSubs==="auto"?l.burnSubtitles:s.socialSubs==="on"),...e}));case"video":{const l=s.video;return[{kind:"video",codec:G,frame:B(l.frame),fill:l.fill,shortEdge:l.shortEdge,fps:ze(l.fps),quality:l.quality,audio:l.audio,label:xe(G),...n(l.burn),...y>0&&l.sidecar!=="none"&&G!=="png"?{sidecar:l.sidecar}:{},...e}]}case"alpha":{const l=s.alpha;return T?[{kind:"video",codec:ee,clip:T.clipId,scale:l.scale,fps:l.fps,quality:"high",audio:l.audio,label:T.label}]:[{kind:"video",codec:ee,frame:"native",shortEdge:l.shortEdge,fps:l.fps,quality:"high",audio:l.audio,label:xe(ee),...e}]}case"gif":return[{kind:"gif",frame:B(s.gif.frame),fill:s.gif.fill,width:s.gif.width,fps:s.gif.fps,label:"GIF",...n(s.gif.burn),...e}];case"audio":{const l=s.audio.stems;return[{kind:"audio",format:Le,stems:l,mix:l?s.audio.mix:!0,label:r(l?"exportCenter.audioStems":"exportCenter.audioMix"),...e}]}case"nle":return[{kind:"nle",format:H==="draft"?te:"xml",fps:s.nle.fps==="source"?K??J:s.nle.fps,audio:s.nle.audio,media:"copy",subtitles:s.nle.subtitles,label:H==="draft"?re("exportCenter.nleDraftTitle"):`${$e[H]} XML`}];case"subtitles":return[{kind:"subtitles",format:s.subtitles.format,label:s.subtitles.format==="txt"?r("exportCenter.transcript"):s.subtitles.format.toUpperCase(),...e}];case"images":return[{kind:"stills",format:s.images.format,shortEdge:s.images.shortEdge,frame:B(s.images.frame),fill:s.images.fill,label:r("exportCenter.stills"),...n(s.images.burn)}];case"slides":return[{kind:"slides",format:s.slides.format,shortEdge:s.slides.shortEdge,frame:B(s.slides.frame),fill:s.slides.fill,label:s.slides.format==="pdf"?"PDF":"PowerPoint",...n(s.slides.burn)}];case"html":return[{kind:"html",mode:s.html.mode,shortEdge:s.html.shortEdge,frame:B(s.html.frame),fill:s.html.fill,packed:s.html.packed,label:"HTML",...n(s.html.mode==="deck"&&s.html.burn)}];case"project":return[{kind:"project",as:s.project.as,parts:Oe,label:r(s.project.as==="zip"?"exportCenter.projectZip":"exportCenter.projectFolder")}]}},[u,s,m,f,H,te,ce?.[0],ce?.[1],a.frame,ie,K,y,Oe]),qe=h.useMemo(()=>se.reduce(([e,n],l)=>{const w=([j,E])=>[e+j,n+E];if(l.kind==="video"){if(l.clip)return[e,n];const j=l.frame??"native",E=l.fill??"contain",D=Ye(g,j,E,l.shortEdge??Math.min(g.w,g.h));return w(or({codec:l.codec,size:D,filmPixels:Ze(g,j,E,D),fps:l.fps,quality:l.quality,durationMs:q,audio:l.audio&&l.codec!=="png"&&!Ce}))}if(l.kind==="gif"){const j=l.frame??"native",E=l.fill??"contain",D=Jt(ne(g,j,E),l.width);return w(ir({size:D,filmPixels:Ze(g,j,E,D),fps:l.fps,durationMs:q}))}if(l.kind==="audio"){const j=l.format==="wav"?192e3:32e3,E=(l.mix?1:0)+(l.stems?Z.size:0),D=j*(q/1e3)*Math.max(1,E);return w([D,D])}if(l.kind==="project"&&S){const j=l.parts.reduce((E,D)=>E+(S[D]??0),S.work);return w([j,j])}return[e,n]},[0,0]),[se,g,q,Z,Ce,S]),Be=qe[1]>0?[...new Set(qe.map(e=>De(e)))].join("–"):"",R=s.folder||le,we=se.reduce((e,n)=>n.kind==="audio"?e+(n.mix?1:0)+(n.stems?Math.max(1,Z.size):0):n.kind==="video"&&n.sidecar?e+2:e+1,0),pe=a.missingFiles??[],Ee=pe.length&&gr.has(u)?r("exportCenter.missingMedia").replace("{n}",String(pe.length)).replace("{files}",pe.slice(0,3).map(e=>e.split("/").pop()).join(", ")+(pe.length>3?", …":"")):null,Me=Ee||(!v&&u!=="project"?r("exportCenter.emptyFilm"):u==="social"&&se.length===0?r("exportCenter.pickPreset"):u==="subtitles"&&He!=null&&y===0?r("exportCenter.noCaptions"):u==="audio"&&Ce?r("exportCenter.noAudio"):null),Ge=async e=>{if(!_){if(X(null),!R){X({ok:!1,text:r("exportCenter.noFolder")});return}ve(r("exportCenter.queueing"));try{const n=await Kt(a.projectId,e,s.folder||void 0);a.onQueued?.(n),i()}catch(n){X({ok:!1,text:n instanceof TypeError?r("exportCenter.engineDown"):n instanceof Error?n.message:String(n)})}finally{ve(null)}}},Fe=a.playheadMs!=null&&a.playheadMs>0&&a.playheadMs<v?a.playheadMs/1e3:void 0,jt=()=>{const e=Fe;Ge([{kind:"poster",format:s.images.format,shortEdge:s.images.shortEdge,frame:B(s.images.frame),fill:s.images.fill,label:r("exportCenter.poster"),...e!=null?{at:e}:{},...y>0&&s.images.burn?{burnSubtitles:!0}:{}}])},Ve=()=>{if(oe==null)return;const e=oe.trim();d("folder",e===le?"":e),Y(null)},[Pe,Ke]=h.useState(!1),Ct=async()=>{if(!Pe){Ke(!0);try{const e={title:r("exportCenter.pickTitle"),button:r("exportCenter.pickButton"),...R?{at:R}:{}},n=Gt?.folders?.pick,l=n?await n(e):await Vt.pickFolder(e.title,e.at);l&&d("folder",l===le?"":l)}catch{Y(R)}finally{Ke(!1)}}};if(!o||typeof document>"u")return null;const kt=_??(we>1?r("exportCenter.exportN").replace("{n}",String(we)):r("exportCenter.export")),yt=!!_||!!Me||!R;return Mt.createPortal(t.jsx("div",{className:"fixed inset-0 z-[130] flex items-center justify-center bg-black/45 p-4 backdrop-blur-[2px]",onClick:()=>{_||i()},children:t.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":r("exportCenter.title"),className:"flex h-[min(640px,calc(100vh-32px))] w-full max-w-[1080px] overflow-hidden rounded-2xl border border-[var(--border)] bg-[var(--surface)] shadow-[var(--shadow-lg)]",style:{animation:"aicut-rise 0.16s ease-out both"},onClick:e=>e.stopPropagation(),children:[t.jsxs("nav",{className:"flex min-h-0 w-[212px] shrink-0 flex-col border-r border-[var(--border-soft)] bg-[var(--surface-2)]",children:[t.jsx("h2",{className:"shrink-0 px-5 pb-2 pt-4 text-[15px] font-semibold tracking-tight text-[var(--text)]",children:r("exportCenter.title")}),t.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-3 pb-2",children:et.map(e=>{const n=u===e.id;return t.jsxs("button",{type:"button","aria-pressed":n,onClick:()=>{d("dest",e.id),X(null)},className:`flex items-start gap-2.5 rounded-lg px-2.5 py-2 text-left transition ${n?"bg-[var(--surface)] shadow-[var(--shadow-sm)]":"hover:bg-[var(--bg-hover)]"}`,children:[t.jsx("span",{className:`mt-0.5 shrink-0 ${n?"text-[var(--text)]":"text-[var(--text-muted)]"}`,children:e.icon}),t.jsxs("span",{className:"min-w-0",children:[t.jsx("span",{className:`block text-[13px] font-medium ${n?"text-[var(--text)]":"text-[var(--text-muted)]"}`,children:r(`exportCenter.dest.${e.id}`)}),t.jsx("span",{className:"block text-[11px] leading-snug text-[var(--text-faint)]",children:re(`exportCenter.destHint.${e.id}`)})]})]},e.id)})}),t.jsx("div",{className:"shrink-0 border-t border-[var(--border-soft)] px-5 py-3 text-[10.5px] leading-relaxed text-[var(--text-faint)]",children:r("exportCenter.engineDesktop")})]}),t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[t.jsxs("div",{className:"flex shrink-0 items-center gap-2 px-5 pb-1 pt-4",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("h3",{className:"text-[14px] font-semibold text-[var(--text)]",children:r(`exportCenter.dest.${u}`)}),t.jsx("p",{className:"mt-0.5 text-[12px] leading-relaxed text-[var(--text-muted)]",children:re(`exportCenter.destDesc.${u}`)})]}),t.jsx("button",{type:"button",onClick:i,disabled:!!_,"aria-label":r("exportDialog.close"),className:"self-start rounded-lg p-1 text-[var(--text-faint)] transition hover:bg-[var(--bg-hover)] hover:text-[var(--text)]",children:t.jsx(Ft,{size:16})})]}),t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 pb-4 pt-3",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[u==="social"&&t.jsxs(t.Fragment,{children:[fr.map(e=>t.jsx(p,{label:r(`exportCenter.group.${e}`),children:t.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:f.filter(n=>n.group===e).map(n=>{const l=s.presets.includes(n.id),w=xt(ne(g,n.frame),n.shortEdge),j=n.maxDurationSec!=null&&q/1e3>n.maxDurationSec;return t.jsxs("button",{type:"button","aria-pressed":l,onClick:()=>d("presets",l?s.presets.filter(E=>E!==n.id):[...s.presets,n.id]),className:`relative flex flex-col items-start gap-0.5 rounded-xl border px-3 py-2.5 text-left transition ${l?"border-[var(--text)] bg-[var(--bg-hover)]":"border-[var(--border)] hover:border-[var(--text-faint)]"}`,children:[t.jsxs("span",{className:"flex w-full items-center gap-1.5",children:[t.jsx(ut,{frame:n.frame,stage:g}),t.jsx("span",{className:"min-w-0 flex-1 truncate text-[12.5px] font-medium text-[var(--text)]",children:n.name}),l&&t.jsx(Pt,{size:13,className:"shrink-0 text-[var(--text)]"})]}),t.jsxs("span",{className:"text-[11px] tabular-nums text-[var(--text-faint)]",children:[w.w,"×",w.h," · ",n.fps,"fps"]}),j&&t.jsx("span",{className:"text-[10.5px] leading-snug text-[var(--warn)]",children:r("exportCenter.tooLong").replace("{max}",A(n.maxDurationSec*1e3))})]},n.id)})})},e)),t.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[t.jsx(p,{label:r("exportCenter.quality"),children:t.jsx(ct,{value:s.socialQuality,onChange:e=>d("socialQuality",e),t:r})}),y>0&&t.jsx(p,{label:r("exportCenter.burnSubtitles"),children:t.jsx(O,{value:s.socialSubs,options:[{value:"auto",label:r("exportCenter.subsAuto")},{value:"on",label:r("exportCenter.subsOn")},{value:"off",label:r("exportCenter.subsOff")}],onChange:e=>d("socialSubs",e)})})]}),t.jsx(L,{children:r("exportCenter.socialHint")})]}),u==="video"&&t.jsxs(t.Fragment,{children:[t.jsx(p,{label:r("exportCenter.codec"),children:t.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:nt.map(e=>{const n=!fe(e,m);return t.jsx(U,{on:G===e,disabled:n,title:xe(e),desc:r(n?"exportCenter.notOnThisComputer":`exportCenter.codecHint.${e}`),onClick:()=>d("video",{codec:e})},e)})})}),t.jsx(ae,{value:s.video.frame,fill:s.video.fill,current:a.frame,stage:g,onChange:e=>d("video",{frame:e}),onFill:e=>d("video",{fill:e}),t:r}),t.jsx(p,{label:r("exportCenter.resolution"),children:t.jsx(V,{value:s.video.shortEdge,options:rt.map(e=>{const n=Ye(g,B(s.video.frame),s.video.fill,e);return{value:e,label:e===2160?"4K":`${e}p`,sub:`${n.w}×${n.h}`}}),onChange:e=>d("video",{shortEdge:e})})}),t.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[t.jsx(p,{label:r("exportCenter.fps"),children:t.jsx(Ie,{label:r("exportCenter.fps"),value:ze(s.video.fps),rates:at,own:{fps:J,note:r("exportCenter.fpsProject")},onPick:e=>d("video",{fps:e===J?"source":e})})}),!(G.startsWith("prores")||G==="png")&&t.jsx(p,{label:r("exportCenter.quality"),children:t.jsx(ct,{value:s.video.quality,onChange:e=>d("video",{quality:e}),t:r})})]}),G!=="png"&&t.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[t.jsx(p,{label:r("exportCenter.audio"),children:t.jsx(F,{checked:s.video.audio,onChange:e=>d("video",{audio:e}),label:r("exportCenter.includeAudio")})}),y>0&&t.jsxs(p,{label:r("exportCenter.subtitles"),children:[t.jsx(F,{checked:s.video.burn,onChange:e=>d("video",{burn:e}),label:r("exportCenter.burnIn")}),t.jsx("div",{className:"mt-2",children:t.jsx(O,{value:s.video.sidecar,options:[{value:"none",label:r("exportCenter.noSidecar")},{value:"srt",label:"+ SRT"},{value:"vtt",label:"+ VTT"}],onChange:e=>d("video",{sidecar:e})})})]})]})]}),u==="alpha"&&t.jsxs(t.Fragment,{children:[t.jsx(p,{label:r("exportCenter.alphaSource"),children:t.jsxs("div",{className:"flex max-h-[200px] flex-col gap-1.5 overflow-y-auto pr-1",children:[[{clipId:be,label:r("exportCenter.alphaWhole"),startMs:0,durMs:v},...ie].map(e=>{const n=(T?T.clipId:be)===e.clipId;return t.jsxs("button",{type:"button","aria-pressed":n,onClick:()=>d("alpha",{source:e.clipId}),className:`flex items-center gap-2.5 rounded-lg border px-3 py-2 text-left transition ${n?"border-[var(--text)] bg-[var(--bg-hover)]":"border-[var(--border)] hover:border-[var(--text-faint)]"}`,children:[t.jsx("span",{className:`h-3.5 w-3.5 shrink-0 rounded-full border ${n?"border-[4px] border-[var(--text)]":"border-[var(--text-faint)]"}`}),t.jsx("span",{className:"min-w-0 flex-1 truncate text-[12.5px] font-medium text-[var(--text)]",children:e.label}),t.jsx("span",{className:"shrink-0 text-[11px] tabular-nums text-[var(--text-faint)]",children:e.clipId===be?r("exportCenter.alphaWholeHint"):`${A(e.startMs)} · ${A(e.durMs)}`})]},e.clipId)}),ie.length===0&&t.jsx(L,{children:r("exportCenter.alphaNoBlocks")})]})}),t.jsx(p,{label:r("exportCenter.format"),children:t.jsx("div",{className:"grid grid-cols-2 gap-2",children:Xe.map(e=>{const n=!fe(e,m);return t.jsx(U,{on:ee===e,disabled:n,title:xe(e),desc:r(n?"exportCenter.notOnThisComputer":`exportCenter.alphaCodecHint.${e}`),onClick:()=>d("alpha",{codec:e})},e)})})}),t.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[T?t.jsx(p,{label:r("exportCenter.alphaScale"),children:t.jsx(V,{value:s.alpha.scale,options:hr.map(e=>({value:e,label:`${e}×`})),onChange:e=>d("alpha",{scale:e})})}):t.jsx(p,{label:r("exportCenter.resolution"),children:t.jsx(V,{value:s.alpha.shortEdge,options:rt.map(e=>({value:e,label:e===2160?"4K":`${e}p`})),onChange:e=>d("alpha",{shortEdge:e})})}),t.jsx(p,{label:r("exportCenter.fps"),children:t.jsx(Ie,{label:r("exportCenter.fps"),value:s.alpha.fps,rates:at,own:{fps:J,note:r("exportCenter.fpsProject")},onPick:e=>d("alpha",{fps:e})})})]}),ee!=="png"&&t.jsx(F,{checked:s.alpha.audio,onChange:e=>d("alpha",{audio:e}),label:r("exportCenter.includeAudio")}),t.jsx(jr,{children:r("exportCenter.alphaHint")})]}),u==="nle"&&t.jsxs(t.Fragment,{children:[t.jsx(p,{label:r("exportCenter.nleFor"),children:t.jsx(O,{value:H,options:[{value:"draft",label:tt[te]},{value:"premiere",label:$e.premiere},{value:"resolve",label:$e.resolve}],onChange:e=>d("nle",{app:e})})}),t.jsx(p,{label:r("exportCenter.fps"),children:t.jsx(Ie,{label:r("exportCenter.fps"),value:s.nle.fps==="source"?K??30:s.nle.fps,rates:lt,own:K?{fps:K,note:r("exportCenter.fpsSource")}:null,onPick:e=>d("nle",{fps:e===K?"source":e})})}),t.jsx(p,{label:r("exportCenter.nleAudio"),children:t.jsx(O,{value:s.nle.audio,options:[{value:"clips",label:r("exportCenter.nleAudioClips")},{value:"stems",label:r("exportCenter.nleAudioStems")}],onChange:e=>d("nle",{audio:e})})}),y>0&&t.jsx(F,{checked:s.nle.subtitles,onChange:e=>d("nle",{subtitles:e}),label:r(H==="draft"?"exportCenter.nleSubs":"exportCenter.nleSrt")}),t.jsx(L,{children:re(H==="premiere"?"exportCenter.nleHintPremiere":H==="resolve"?"exportCenter.nleHintResolve":Ne?"exportCenter.nleHintDraft":"exportCenter.nleHintDraftNone")})]}),u==="gif"&&t.jsxs(t.Fragment,{children:[t.jsx(ae,{value:s.gif.frame,fill:s.gif.fill,current:a.frame,stage:g,onChange:e=>d("gif",{frame:e}),onFill:e=>d("gif",{fill:e}),t:r}),t.jsx(p,{label:r("exportCenter.gifWidth"),children:t.jsx(V,{value:s.gif.width,options:ur.map(e=>({value:e,label:`${e}px`})),onChange:e=>d("gif",{width:e})})}),t.jsx(p,{label:r("exportCenter.fps"),children:t.jsx(V,{value:s.gif.fps,options:mr.map(e=>({value:e,label:`${e}`})),onChange:e=>d("gif",{fps:e})})}),y>0&&t.jsx(F,{checked:s.gif.burn,onChange:e=>d("gif",{burn:e}),label:r("exportCenter.burnIn")}),t.jsx(L,{children:r("exportCenter.gifHint")})]}),u==="audio"&&t.jsxs(t.Fragment,{children:[t.jsx(p,{label:r("exportCenter.format"),children:t.jsx("div",{className:"grid grid-cols-3 gap-2",children:["wav","m4a","mp3"].map(e=>{const n=e==="mp3"&&m!=null&&!m.mp3;return t.jsx(U,{on:Le===e,disabled:n,title:e.toUpperCase(),desc:r(n?"exportCenter.notOnThisComputer":`exportCenter.audioHint.${e}`),onClick:()=>d("audio",{format:e})},e)})})}),t.jsx(p,{label:r("exportCenter.contents"),children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(F,{checked:s.audio.mix||!s.audio.stems,onChange:e=>d("audio",{mix:e}),label:r("exportCenter.audioMix"),disabled:!s.audio.stems}),t.jsx(F,{checked:s.audio.stems,onChange:e=>d("audio",{stems:e}),label:r("exportCenter.audioStems")}),s.audio.stems&&N&&t.jsx("p",{className:"pl-6 text-[11.5px] text-[var(--text-faint)]",children:dr.filter(e=>Z.has(e)).map(e=>r(`exportCenter.stem.${e}`)).join(" · ")||r("exportCenter.noAudio")})]})}),t.jsx(L,{children:r("exportCenter.stemsHint")})]}),u==="subtitles"&&t.jsxs(t.Fragment,{children:[t.jsx(p,{label:r("exportCenter.format"),children:t.jsx("div",{className:"grid grid-cols-3 gap-2",children:["srt","vtt","txt"].map(e=>t.jsx(U,{on:s.subtitles.format===e,title:e==="txt"?r("exportCenter.transcript"):e.toUpperCase(),desc:r(`exportCenter.subsHint.${e}`),onClick:()=>d("subtitles",{format:e})},e))})}),t.jsx(L,{children:r("exportCenter.captionCount").replace("{n}",String(y))})]}),u==="project"&&t.jsxs(t.Fragment,{children:[t.jsx(p,{label:r("exportCenter.format"),children:t.jsx("div",{className:"grid grid-cols-2 gap-2",children:["zip","folder"].map(e=>t.jsx(U,{on:s.project.as===e,title:r(e==="zip"?"exportCenter.projectZip":"exportCenter.projectFolder"),desc:r(e==="zip"?"exportCenter.projectZipHint":"exportCenter.projectFolderHint"),onClick:()=>d("project",{as:e})},e))})}),t.jsx(p,{label:r("exportCenter.contents"),children:t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsx(it,{checked:!0,locked:!0,onChange:()=>{},label:r("exportCenter.projectPart.work"),hint:r("exportCenter.projectPartHint.work"),size:S?De(S.work):""}),Qe.map(e=>{const n=S!=null&&S[e]==null;return t.jsx(it,{checked:s.project[e]&&!n,disabled:n,onChange:l=>d("project",{[e]:l}),label:r(`exportCenter.projectPart.${e}`),hint:r(n?"exportCenter.projectPartNone":`exportCenter.projectPartHint.${e}`),size:!n&&S?De(S[e]??0):""},e)})]})}),t.jsx(L,{children:r("exportCenter.projectHint")})]}),u==="images"&&t.jsxs(t.Fragment,{children:[t.jsx(p,{label:r("exportCenter.poster"),children:t.jsxs("button",{type:"button",onClick:jt,disabled:!!_||!v||!R,className:"inline-flex h-9 items-center gap-2 self-start rounded-lg border border-[var(--border)] px-3 text-[12.5px] font-medium text-[var(--text)] transition hover:bg-[var(--bg-hover)] disabled:cursor-not-allowed disabled:opacity-40",children:[t.jsx(At,{size:14}),Fe!=null?r("exportCenter.posterAt").replace("{time}",A(Fe*1e3)):r("exportCenter.posterMiddle")]})}),t.jsxs(p,{label:r("exportCenter.sceneStills"),children:[t.jsx("p",{className:"-mt-1 mb-1 text-[12px] text-[var(--text-muted)]",children:r("exportCenter.sceneStillsDesc").replace("{n}",String(Se))}),t.jsx(O,{value:s.images.format,options:[{value:"png",label:"PNG"},{value:"jpg",label:"JPG"}],onChange:e=>d("images",{format:e})})]}),t.jsx(ae,{value:s.images.frame,fill:s.images.fill,current:a.frame,stage:g,onChange:e=>d("images",{frame:e}),onFill:e=>d("images",{fill:e}),t:r}),t.jsx(p,{label:r("exportCenter.resolution"),children:t.jsx(V,{value:s.images.shortEdge,options:st.map(e=>({value:e,label:e===2160?"4K":`${e}p`})),onChange:e=>d("images",{shortEdge:e})})}),y>0&&t.jsx(F,{checked:s.images.burn,onChange:e=>d("images",{burn:e}),label:r("exportCenter.burnIn")})]}),u==="slides"&&t.jsxs(t.Fragment,{children:[t.jsx(p,{label:r("exportCenter.format"),children:t.jsx("div",{className:"grid grid-cols-2 gap-2",children:["pptx","pdf"].map(e=>t.jsx(U,{on:s.slides.format===e,title:e==="pptx"?"PowerPoint":"PDF",desc:r(`exportCenter.slidesHint.${e}`),onClick:()=>d("slides",{format:e})},e))})}),t.jsx(ae,{value:s.slides.frame,fill:s.slides.fill,current:a.frame,stage:g,onChange:e=>d("slides",{frame:e}),onFill:e=>d("slides",{fill:e}),t:r}),y>0&&t.jsx(F,{checked:s.slides.burn,onChange:e=>d("slides",{burn:e}),label:r("exportCenter.burnIn")})]}),u==="html"&&t.jsxs(t.Fragment,{children:[t.jsxs(p,{label:r("exportCenter.htmlMode"),children:[t.jsx(O,{value:s.html.mode,options:[{value:"pages",label:r("exportCenter.htmlModePages")},{value:"film",label:r("exportCenter.htmlModeFilm")},{value:"deck",label:r("exportCenter.htmlModeDeck")}],onChange:e=>d("html",{mode:e})}),t.jsx(L,{children:r(s.html.mode==="film"?"exportCenter.htmlFilmHint":s.html.mode==="pages"?"exportCenter.htmlPagesHint":"exportCenter.htmlHint").replace("{n}",String(Se))})]}),s.html.mode==="deck"&&t.jsxs(t.Fragment,{children:[t.jsx(ae,{value:s.html.frame,fill:s.html.fill,current:a.frame,stage:g,onChange:e=>d("html",{frame:e}),onFill:e=>d("html",{fill:e}),t:r}),t.jsx(p,{label:r("exportCenter.resolution"),children:t.jsx(V,{value:s.html.shortEdge,options:st.map(e=>({value:e,label:e===2160?"4K":`${e}p`})),onChange:e=>d("html",{shortEdge:e})})}),y>0&&t.jsx(F,{checked:s.html.burn,onChange:e=>d("html",{burn:e}),label:r("exportCenter.burnIn")})]}),t.jsxs(p,{label:r("exportCenter.htmlPacking"),children:[t.jsx(F,{checked:s.html.packed,onChange:e=>d("html",{packed:e}),label:r("exportCenter.htmlPacked")}),t.jsx(L,{children:r("exportCenter.htmlPackedHint")})]})]}),(u==="social"||u==="video"||u==="gif"||u==="audio"||u==="subtitles"||u==="alpha"&&!T)&&v>0&&t.jsxs(p,{label:r("exportCenter.range"),children:[t.jsx(O,{value:M.on?"part":"all",options:[{value:"all",label:`${r("exportCenter.rangeAll")} · ${A(v)}`},{value:"part",label:r("exportCenter.rangePart")}],onChange:e=>W(n=>({...n,on:e==="part"}))}),M.on&&t.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-[12px] text-[var(--text-muted)]",children:[t.jsx("div",{className:"flex w-[220px] min-w-0",children:t.jsx(_e,{label:r("exportCenter.rangeFrom"),size:"md",value:String(M.from),groups:[{choices:ye.starts.map(e=>({value:String(e.ms),label:[A(e.ms),e.title].filter(Boolean).join(" · ")}))}],onPick:e=>{const n=Number(e);W(l=>({...l,from:n,to:l.to>n?l.to:ye.ends.find(w=>w.ms>n)?.ms??v}))}})}),t.jsx("span",{children:"→"}),t.jsx("div",{className:"flex w-[220px] min-w-0",children:t.jsx(_e,{label:r("exportCenter.rangeTo"),size:"md",value:String(M.to),groups:[{choices:ye.ends.filter(e=>e.ms>M.from).map(e=>({value:String(e.ms),label:[A(e.ms),e.title].filter(Boolean).join(" · ")}))}],onPick:e=>W(n=>({...n,to:Number(e)}))})}),t.jsx("span",{className:"tabular-nums",children:A(q)})]})]})]})}),t.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-x-4 gap-y-3 border-t border-[var(--border-soft)] bg-[color-mix(in_srgb,var(--surface-2)_45%,transparent)] px-5 py-3.5",children:[vt?t.jsxs("div",{className:"-ml-2 flex min-w-0 max-w-[340px] flex-1 items-center gap-2.5 px-2 py-1.5",children:[t.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-[var(--surface-2)] text-[var(--text-muted)] ring-1 ring-[var(--border)]",children:t.jsx(dt,{size:15})}),t.jsxs("span",{className:"flex min-w-0 items-baseline gap-1.5",children:[t.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-faint)]",children:r("exportCenter.saveTo")}),t.jsx("span",{className:"truncate text-[13px] font-medium text-[var(--text)]",children:re("exportCenter.nleDraftTitle")})]})]}):oe!=null?t.jsx("input",{autoFocus:!0,value:oe,spellCheck:!1,"aria-label":r("exportCenter.saveTo"),onChange:e=>Y(e.target.value),onFocus:e=>e.currentTarget.select(),onBlur:Ve,onKeyDown:e=>{e.key==="Enter"&&(e.preventDefault(),Ve()),e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),Y(null))},className:"h-10 min-w-[200px] flex-1 rounded-lg border border-[var(--border)] bg-[var(--bg)] px-3 font-mono text-[12px] text-[var(--text)] outline-none focus:border-[var(--text-faint)]"}):t.jsxs("button",{type:"button",onClick:()=>{Ct()},disabled:Pe,title:R,"aria-label":`${r("exportCenter.saveTo")}: ${R||"—"}. ${r("exportCenter.change")}`,className:"group -ml-2 flex min-w-0 max-w-[340px] flex-1 items-center gap-2.5 rounded-lg px-2 py-1.5 text-left transition hover:bg-[var(--bg-hover)] disabled:opacity-60",children:[t.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-[var(--surface-2)] text-[var(--text-muted)] ring-1 ring-[var(--border)] transition group-hover:text-[var(--text)]",children:Pe?t.jsx(Ue,{size:15,className:"animate-spin"}):t.jsx($t,{size:15})}),t.jsxs("span",{className:"flex min-w-0 flex-col",children:[t.jsxs("span",{className:"flex min-w-0 items-baseline gap-1.5",children:[t.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-faint)]",children:r("exportCenter.saveTo")}),t.jsx("span",{className:"truncate text-[13px] font-medium text-[var(--text)]",children:br(R)||"—"})]}),t.jsx("span",{className:"truncate text-[11px] text-[var(--text-faint)] group-hover:text-[var(--text-muted)]",children:r("exportCenter.change")})]})]}),t.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-4",children:[t.jsx("div",{className:"min-w-0 text-right text-[12px] leading-snug",children:je?t.jsx("span",{className:je.ok?"text-[var(--ok)]":"text-[var(--err)]",children:je.text}):Me?t.jsx("span",{"data-export-reason":"",className:Ee?"text-[var(--warn)]":"text-[var(--text-faint)]",children:Me}):t.jsxs(t.Fragment,{children:[u==="project"?null:u==="html"?t.jsx("span",{className:"block text-[var(--text-muted)] tabular-nums",children:r(s.html.mode==="film"?"exportCenter.htmlFilmSummary":"exportCenter.htmlSummary").replace("{n}",String(Se))}):t.jsx("span",{className:"block text-[var(--text-muted)] tabular-nums",children:r("exportCenter.summary").replace("{n}",String(we)).replace("{dur}",A(bt))}),Be?t.jsx("span",{className:"block text-[11px] text-[var(--text-faint)] tabular-nums",children:`${r("exportCenter.approx")} ${Be}`}):null]})}),t.jsxs("button",{type:"button",onClick:()=>{Ge(se)},disabled:yt,className:"flex h-10 shrink-0 items-center gap-2 rounded-xl bg-[var(--text)] px-6 text-[13.5px] font-medium text-[var(--bg)] transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-40",children:[_?t.jsx(Ue,{size:14,className:"animate-spin"}):null,kt]})]})]})]}),t.jsxs("aside",{className:"hidden w-[212px] shrink-0 flex-col overflow-y-auto border-l border-[var(--border-soft)] bg-[var(--surface-2)] px-4 pb-4 pt-4 min-[980px]:flex",children:[t.jsx("h4",{className:"text-[12px] font-semibold tracking-tight text-[var(--text)]",children:r("exportCenter.draftParams")}),t.jsxs("dl",{className:"mt-3 flex flex-col gap-2.5",children:[t.jsx(z,{k:r("exportCenter.dpName"),v:a.title}),t.jsx(z,{k:r("exportCenter.dpColor"),v:"Rec.709 SDR"}),t.jsx(z,{k:r("exportCenter.dpRatio"),v:vr(g.w,g.h)}),t.jsx(z,{k:r("exportCenter.dpRes"),v:`${g.w} × ${g.h}`}),t.jsx(z,{k:r("exportCenter.dpDuration"),v:A(v)}),t.jsx(z,{k:r("exportCenter.dpFps"),v:a.projectFps?`${a.projectFps} fps`:r("exportCenter.dpFpsSource")}),t.jsx(z,{k:r("exportCenter.dpScenes"),v:N?String(N.scenes.length):"—"}),t.jsx(z,{k:r("exportCenter.dpSubs"),v:String(y)}),t.jsx(z,{k:r("exportCenter.dpFolder"),v:le||"—"})]})]})]})}),document.body)}function br(a){return a.replace(/[\\/]+$/,"").split(/[\\/]/).pop()||a}function z({k:a,v:o}){return t.jsxs("div",{className:"min-w-0",children:[t.jsx("dt",{className:"text-[10.5px] leading-snug text-[var(--text-faint)]",children:a}),t.jsx("dd",{className:"break-all text-[11.5px] leading-snug text-[var(--text)]",children:o})]})}function vr(a,o){const i=a/Math.max(1,o),r=[[16/9,"16:9"],[9/16,"9:16"],[4/3,"4:3"],[3/4,"3:4"],[1,"1:1"],[3/2,"3:2"],[2/3,"2:3"],[21/9,"21:9"],[5/4,"5:4"],[4/5,"4:5"]];for(const[c,f]of r)if(Math.abs(i-c)<.02)return f;return`${i.toFixed(2)}:1`}function p({label:a,children:o}){return t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-[11.5px] font-medium uppercase tracking-wide text-[var(--text-faint)]",children:a}),o]})}function L({children:a}){return t.jsx("p",{className:"text-[11.5px] leading-relaxed text-[var(--text-faint)]",children:a})}function jr({children:a}){return t.jsxs("div",{className:"flex items-start gap-2 rounded-xl border border-[var(--border)] bg-[var(--surface-2)] px-3 py-2.5 text-[12px] leading-relaxed text-[var(--text-muted)]",children:[t.jsx(Bt,{size:14,className:"mt-0.5 shrink-0 text-[var(--warn)]"}),t.jsx("span",{children:a})]})}function U({on:a,disabled:o,title:i,desc:r,onClick:c}){return t.jsxs("button",{type:"button","aria-pressed":a,disabled:o,onClick:c,className:`flex flex-col items-start gap-0.5 rounded-xl border px-3 py-2.5 text-left transition disabled:cursor-not-allowed disabled:opacity-45 ${a?"border-[var(--text)] bg-[var(--bg-hover)]":"border-[var(--border)] hover:border-[var(--text-faint)]"}`,children:[t.jsx("span",{className:"text-[12.5px] font-medium text-[var(--text)]",children:i}),t.jsx("span",{className:"text-[11px] leading-snug text-[var(--text-faint)]",children:r})]})}function Ie({label:a,value:o,rates:i,own:r,onPick:c}){const f=[...new Set([...i,...r?[r.fps]:[]])].sort((x,I)=>x-I),m=x=>`${x} fps${r&&x===r.fps?` · ${r.note}`:""}`;return t.jsx(_e,{size:"md",label:a,value:String(o),groups:[{choices:f.map(x=>({value:String(x),label:m(x)}))}],onPick:x=>c(Number(x))})}function V({value:a,options:o,onChange:i}){return t.jsx("div",{className:"flex flex-wrap items-start gap-1.5",children:o.map(r=>{const c=r.value===a;return t.jsxs("button",{type:"button","aria-pressed":c,onClick:()=>i(r.value),className:`flex min-w-[56px] flex-col items-center rounded-lg border px-2.5 py-1.5 transition ${c?"border-[var(--text)] bg-[var(--bg-hover)] text-[var(--text)]":"border-[var(--border)] text-[var(--text-muted)] hover:border-[var(--text-faint)]"}`,children:[t.jsx("span",{className:"text-[12.5px] font-medium tabular-nums",children:r.label}),r.sub?t.jsx("span",{className:"text-[10px] tabular-nums text-[var(--text-faint)]",children:r.sub}):null]},String(r.value))})})}function O({value:a,options:o,onChange:i}){return t.jsx("div",{className:"inline-flex max-w-full self-start overflow-x-auto rounded-full border border-[var(--border)] bg-[var(--bg)] p-[3px]",children:o.map(r=>t.jsx("button",{type:"button","aria-pressed":r.value===a,onClick:()=>i(r.value),className:`shrink-0 whitespace-nowrap rounded-full px-3 py-1 text-[12px] font-medium transition ${r.value===a?"bg-[var(--surface-3,var(--bg-hover))] text-[var(--text)] shadow-[var(--shadow-sm)]":"text-[var(--text-muted)] hover:text-[var(--text)]"}`,children:r.label},r.value))})}function F({checked:a,onChange:o,label:i,disabled:r,locked:c}){const f=r?"text-[var(--text-faint)]":a||c?"text-[var(--text)]":"text-[var(--text-muted)]";return t.jsxs("label",{className:`flex select-none items-center gap-2.5 text-[12.5px] ${f} ${r||c?"cursor-default":"cursor-pointer"}`,children:[t.jsx("button",{type:"button",role:"switch","aria-checked":a||!!c,"aria-readonly":c||void 0,disabled:r,onClick:()=>{c||o(!a)},className:`relative h-[18px] w-[30px] shrink-0 rounded-full transition ${a||c?"bg-[var(--text)]":"bg-[var(--border-strong,var(--border))]"} ${c?"cursor-default":""} disabled:opacity-50`,children:t.jsx("span",{className:`absolute top-[2px] h-[14px] w-[14px] rounded-full bg-[var(--bg)] transition-[left] ${a||c?"left-[14px]":"left-[2px]"}`})}),i]})}function it({checked:a,onChange:o,label:i,hint:r,size:c,disabled:f,locked:m}){return t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(F,{checked:a,onChange:o,label:i,disabled:f,locked:m}),c&&t.jsx("span",{className:"ml-auto font-mono text-[11px] tabular-nums text-[var(--text-faint)]",children:c})]}),t.jsx("p",{className:"pl-[40px] text-[11.5px] leading-snug text-[var(--text-faint)]",children:r})]})}function ct({value:a,onChange:o,t:i}){return t.jsx(O,{value:a,options:[{value:"standard",label:i("exportCenter.qStandard")},{value:"high",label:i("exportCenter.qHigh")},{value:"master",label:i("exportCenter.qMaster")}],onChange:o})}function ut({frame:a,stage:o,fill:i="contain"}){const r=ne(o,a,i),c=14/Math.max(r.w,r.h),f=Math.max(6,r.w*c),m=Math.max(6,r.h*c);return t.jsx("span",{className:"relative inline-block shrink-0 overflow-hidden rounded-[2px] border border-[var(--text-faint)]",style:{width:f,height:m},children:t.jsx("span",{className:"absolute bg-[var(--text-muted)] opacity-50",style:{left:r.inner.left*c,top:r.inner.top*c,width:r.inner.w*c,height:r.inner.h*c}})})}function ae({value:a,fill:o,current:i,stage:r,onChange:c,onFill:f,t:m}){const x=a==="current"?i:a,I=x!=="native"&&Math.abs(Ot(x,r)-r.w/Math.max(1,r.h))>.01;return t.jsxs(p,{label:m("exportCenter.frame"),children:[t.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[[...We,...We.includes(x)?[]:[x]].map(k=>{const s=x===k;return t.jsxs("button",{type:"button","aria-pressed":s,onClick:()=>c(k===i?"current":k),className:`flex items-center gap-1.5 rounded-lg border px-2.5 py-1.5 text-[12px] font-medium transition ${s?"border-[var(--text)] bg-[var(--bg-hover)] text-[var(--text)]":"border-[var(--border)] text-[var(--text-muted)] hover:border-[var(--text-faint)]"}`,children:[t.jsx(ut,{frame:k,stage:r,fill:o}),k==="native"?m("exportCenter.frameNative"):k]},k)}),t.jsx(qt,{chip:!0,value:x,onPick:k=>c(k===i?"current":k)})]}),I&&t.jsx(O,{value:o,options:[{value:"contain",label:m("exportCenter.fillContain")},{value:"cover",label:m("exportCenter.fillCover")}],onChange:f})]})}export{kr as ExportCenter};
@@ -0,0 +1,2 @@
1
+ import{c as W,R as m,j as e,P as ye,C as G,a as ke,u as M,s as T,L as P,b as Pe,d as Q,D as ue,e as J,f as Be,X as we,B as ge,M as Ue,g as Ne,E as Se,h as Ie,T as Ce,i as Ee,p as _e,r as We,S as He,k as Ge,l as Ve,m as Ye,n as Je,o as fe,q as Ze,t as $e,v as oe,w as Qe,x as ae,y as Me,z as Xe}from"./index-BjJVmBzB.js";const et=W("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);const tt=W("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);const st=W("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);const nt=W("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);const at=W("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);const rt=W("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);const it=W("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]),lt=Object.freeze({deepseek:"settings.agents.presetDeepSeek"});function ot(t,s,a){const n=lt[t];return n?a(n):s}const ct=["codex","claude","gemini","copilot","cursor","opencode","codebuddy","qwen","kimi"],dt=["deepseek"];function te(t){return dt.includes(t)}function xe({label:t,value:s,options:a,onChange:n,width:r}){const[c,o]=m.useState(!1),x=m.useRef(null),h=m.useRef({text:"",at:0}),u=a.find(d=>d.value===s)??a[0];m.useEffect(()=>{if(!c)return;const d=requestAnimationFrame(()=>(x.current?.querySelector('[aria-selected="true"]')??x.current?.querySelector('[role="option"]'))?.focus());return()=>cancelAnimationFrame(d)},[c]);const b=d=>{o(!1),d.value!==s&&n(d.value)},l=d=>{const g=Array.from(x.current?.querySelectorAll('[role="option"]')??[]),y=g.indexOf(document.activeElement);if(d.key==="ArrowDown"||d.key==="ArrowUp")d.preventDefault(),g[(y+(d.key==="ArrowDown"?1:-1)+g.length)%g.length]?.focus();else if(d.key==="Home"||d.key==="End")d.preventDefault(),g[d.key==="Home"?0:g.length-1]?.focus();else if(d.key.length===1&&!d.metaKey&&!d.ctrlKey&&!d.altKey){const C=Date.now();h.current={text:(C-h.current.at<700?h.current.text:"")+d.key.toLowerCase(),at:C};const $=a.findIndex(E=>E.label.toLowerCase().startsWith(h.current.text));$>=0&&g[$]?.focus()}};return e.jsx(ye,{open:c,onOpenChange:o,placement:"auto",align:"end",layer:10060,trigger:e.jsxs("button",{type:"button","aria-label":`${t}: ${u.label}`,"aria-haspopup":"listbox","aria-expanded":c,style:r?{width:r}:void 0,className:`flex h-10 max-w-full items-center gap-2 ${r?"":"w-auto"} rounded-[8px] border px-3 text-left text-[14.5px] text-[var(--text)] transition ${c?"border-[var(--text-muted)]":"border-[var(--border)] hover:border-[var(--border-strong)]"}`,children:[u.icon?e.jsx("span",{className:"flex shrink-0 text-[var(--text-muted)]",children:u.icon}):null,e.jsx("span",{className:r?"min-w-0 flex-1 truncate":"whitespace-nowrap",children:u.label}),e.jsx(ke,{size:15,className:"shrink-0 text-[var(--text-muted)]"})]}),children:e.jsx("div",{ref:x,role:"listbox","aria-label":t,onKeyDown:l,style:{minWidth:r??160},className:"max-h-[min(320px,var(--popover-max-h))] overflow-y-auto rounded-[10px] border border-[var(--border)] bg-[var(--surface)] p-1 shadow-[var(--shadow-lg)]",children:a.map(d=>{const g=d.value===s;return e.jsxs("button",{type:"button",role:"option","aria-selected":g,onClick:()=>b(d),className:"flex h-9 w-full items-center gap-2 rounded-[6px] px-2 text-left text-[14.5px] text-[var(--text)] outline-none hover:bg-[var(--bg-hover)] focus-visible:bg-[var(--bg-hover)]",children:[d.icon?e.jsx("span",{className:"flex shrink-0 text-[var(--text-muted)]",children:d.icon}):null,e.jsx("span",{className:"min-w-0 flex-1 truncate",children:d.label}),e.jsx(G,{size:16,className:g?"shrink-0 text-[var(--text)]":"invisible shrink-0"})]},d.value)})})})}function H({note:t,children:s}){return e.jsxs("div",{className:"flex max-w-[880px] flex-col",children:[t?e.jsx("p",{className:"mb-8 text-[14.5px] leading-relaxed text-[var(--text-muted)]",children:t}):null,s]})}function F({title:t,footnote:s,children:a}){return e.jsxs("section",{className:"mb-10 last:mb-0",children:[t?e.jsx("h3",{className:"mb-1 text-[17px] font-semibold tracking-[-0.01em] text-[var(--text)]",children:t}):null,e.jsx("div",{className:"flex flex-col divide-y divide-[var(--border)]",children:a}),s?e.jsx("p",{className:"pt-2 text-[13.5px] leading-relaxed text-[var(--text-faint)]",children:s}):null]})}function z({mark:t,title:s,badge:a,description:n,control:r,children:c}){return e.jsxs("div",{className:"py-4",children:[e.jsxs("div",{className:"flex min-h-10 items-center gap-4",children:[t?e.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-[8px] bg-[var(--fill-tsp)] text-[var(--text)]",children:t}):null,e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5",children:[e.jsx("span",{className:"text-[15px] text-[var(--text)]",children:s}),a]}),n?e.jsx("div",{className:"mt-1 text-[14px] leading-[1.55] text-[var(--text-muted)]",children:n}):null]}),r?e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:r}):null]}),c?e.jsx("div",{className:"pt-3",children:c}):null]})}function U({tone:t="ok",children:s}){return e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[13.5px] text-[var(--text-muted)]",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${t==="ok"?"bg-[var(--ok)]":"bg-[var(--text-faint)]"}`,"aria-hidden":!0}),s]})}const Ae={default:"border border-[var(--border)] text-[var(--text)] hover:bg-[var(--bg-hover)]",primary:"border border-transparent bg-[var(--text)] text-[var(--bg)] hover:opacity-90",quiet:"border border-transparent text-[var(--text-muted)] hover:bg-[var(--bg-hover)] hover:text-[var(--text)]"};function k({variant:t="default",className:s="",...a}){return e.jsx("button",{type:"button",...a,className:`inline-flex h-9 shrink-0 items-center justify-center gap-1.5 rounded-[8px] px-3.5 text-[14px] font-medium transition disabled:pointer-events-none disabled:opacity-50 ${Ae[t]} ${s}`})}function ut({className:t="",...s}){return e.jsx("a",{target:"_blank",rel:"noreferrer",...s,className:`inline-flex h-9 shrink-0 items-center justify-center gap-1.5 rounded-[8px] px-3.5 text-[14px] font-medium transition ${Ae.default} ${t}`})}function Z({checked:t,onChange:s,label:a,disabled:n}){return e.jsx("button",{type:"button",role:"switch","aria-checked":t,"aria-label":a,title:a,disabled:n,onClick:()=>s(!t),className:`relative h-6 w-10 shrink-0 rounded-full transition-colors disabled:opacity-50 ${t?"bg-[var(--text)]":"bg-[var(--surface-3)]"}`,children:e.jsx("span",{className:`absolute top-[3px] h-[18px] w-[18px] rounded-full bg-[var(--bg)] shadow-[0_1px_2px_rgba(0,0,0,0.2)] transition-all ${t?"left-[19px]":"left-[3px]"}`})})}function ze({label:t,value:s,options:a,onChange:n}){return e.jsx("div",{role:"radiogroup","aria-label":t,className:"inline-flex shrink-0 gap-0.5 rounded-[10px] bg-[var(--fill-tsp)] p-[3px]",children:a.map(r=>{const c=r.value===s;return e.jsxs("button",{type:"button",role:"radio","aria-checked":c,onClick:()=>{c||n(r.value)},className:`inline-flex h-[30px] items-center gap-1.5 whitespace-nowrap rounded-[7px] px-3 text-[14px] transition ${c?"bg-[var(--dock-pane)] text-[var(--text)] shadow-[0_1px_2px_rgba(0,0,0,0.08)] ring-1 ring-[var(--border)]":"text-[var(--text-muted)] hover:text-[var(--text)]"}`,children:[r.icon?e.jsx("span",{className:"flex shrink-0",children:r.icon}):null,r.label]},r.value)})})}const q=m.forwardRef(function({className:s="",...a},n){return e.jsx("input",{ref:n,...a,className:`h-10 w-full min-w-0 rounded-[8px] border border-[var(--border)] bg-transparent px-3 text-[14px] text-[var(--text)] outline-none transition placeholder:text-[var(--text-faint)] hover:border-[var(--border-strong)] focus:border-[var(--text-muted)] ${s}`})});function X({children:t}){return e.jsx("div",{className:"flex flex-col gap-2.5 rounded-[10px] border border-[var(--border)] p-4",children:t})}const re="inline-flex items-center gap-1 text-[var(--text-muted)] underline-offset-2 hover:text-[var(--text)] hover:underline",I="text-[13.5px] leading-relaxed text-[var(--err)]",Re=["codex"];function xt(){const[t,s]=m.useState(null);return m.useEffect(()=>{const a=T?.agents;if(!a)return;let n=!0;a.list().then(o=>{n&&s(o)}).catch(()=>{});const r=a.onChange(o=>s(o)),c=()=>{a.list(!0).then(o=>{n&&s(o)}).catch(()=>{})};return window.addEventListener("focus",c),()=>{n=!1,r(),window.removeEventListener("focus",c)}},[]),t}function pt({id:t}){return t==="byok"?e.jsx(et,{size:16}):e.jsx(J,{id:Be(t),size:17})}function mt(t){const[s,a]=m.useState({}),n=(t??[]).filter(r=>Re.includes(r.id)&&r.status==="ready").map(r=>r.id).join(",");return m.useEffect(()=>{const r=T?.agents?.usage;if(!r||!n)return;let c=!0;const o=()=>{for(const x of n.split(","))r(x).then(h=>{c&&a(u=>({...u,[x]:h}))}).catch(()=>{c&&a(h=>({...h,[x]:null}))})};return o(),window.addEventListener("focus",o),()=>{c=!1,window.removeEventListener("focus",o)}},[n]),s}function ht({window:t}){const s=M(),a=Q(),n=t.kind==="five_hour"?s("settings.agents.usageFiveHour"):t.kind==="seven_day"?s("settings.agents.usageWeek"):s("settings.agents.usageWindow").replace("{hours}",String(Math.round((t.minutes??0)/60))),r=Math.round(t.usedPercent),c=(()=>{if(t.resetsAt==null)return null;const o=Math.max(0,Math.round((t.resetsAt-Date.now())/6e4)),x=new Intl.RelativeTimeFormat(a,{numeric:"auto"}),h=o<60?x.format(o,"minute"):o<2880?x.format(Math.round(o/60),"hour"):x.format(Math.round(o/1440),"day");return s("settings.agents.usageResets").replace("{time}",h)})();return e.jsxs("div",{className:"flex items-center gap-3 text-[13px]",children:[e.jsx("span",{className:"w-[92px] shrink-0 text-[var(--text-muted)]",children:n}),e.jsx("div",{className:"h-1.5 min-w-[80px] flex-1 overflow-hidden rounded-full bg-[var(--fill-tsp)]",role:"progressbar","aria-label":n,"aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:`h-full rounded-full ${r>=90?"bg-[var(--danger,#e5484d)]":r>=70?"bg-[var(--warn,#f5a524)]":"bg-[var(--text)]"}`,style:{width:`${Math.max(r,1.5)}%`}})}),e.jsx("span",{className:"w-[64px] shrink-0 text-right tabular-nums text-[var(--text)]",children:s("settings.agents.usageUsed").replace("{percent}",String(r))}),e.jsx("span",{className:"w-[120px] shrink-0 truncate text-[var(--text-faint)]",children:c??""})]})}function gt(){const t=M(),s=xt(),a=mt(s),n=T?.agents,[r,c]=m.useState(null),[o,x]=m.useState(null),[h,u]=m.useState(null),[b,l]=m.useState(null);if(!n)return null;const d=(i,S)=>{c(i),x(null),S().then(N=>{const K=N;K&&K.ok===!1&&x({id:i,text:K.error??t("settings.agents.failed")})}).catch(N=>x({id:i,text:N instanceof Error?N.message:String(N)})).finally(()=>c(null))},g=i=>d(i.id,async()=>{const S=await n.locate(i.id,{title:t("settings.agents.locateTitle").replace("{name}",i.name),button:t("settings.agents.locateButton")});return S.ok&&l(null),S.ok||!S.error&&!S.code?{ok:!0}:S.code==="not-a-program"?{ok:!1,error:t("settings.agents.notAProgram")}:S.code==="did-not-start"?{ok:!1,error:`${t("settings.agents.didNotStart")} ${S.error??""}`.trim()}:S}),y=i=>{l({id:i.id,report:null}),n.diagnose(i.id).then(S=>l(N=>N?.id===i.id?{id:i.id,report:S}:N)).catch(S=>{l(null),x({id:i.id,text:S instanceof Error?S.message:String(S)})})},C=i=>{switch(i.hint){case"chosen-missing":return t("settings.agents.hintChosenMissing");case"wsl":return t("settings.agents.hintWsl");case"unusable":return t("settings.agents.hintUnusable");case"none":return t("settings.agents.hintNone").replaceAll("{program}",i.program??"");default:return i.found?t("settings.agents.hintFound").replace("{path}",i.found):null}},$=(i,S)=>{navigator.clipboard.writeText(i.text).then(()=>l(N=>N?.id===S?{...N,copied:!0}:N)).catch(()=>{})},E=i=>{switch(i.status){case"off":return t("settings.agents.off");case"sign-in":return t("settings.agents.signedOut");case"waiting":return t("settings.agents.waiting");case"missing":return i.setupRequired==="code-tab"?t("settings.agents.claudeSetup"):t("settings.agents.missing");case"key":return t("settings.agents.needsKey");case"unavailable":return t("settings.agents.unavailable");case"checking":return t("settings.agents.checking");default:return null}},D=i=>{const S=a[i.id]?.account,N=i.account?{...i.account,...S?.email?{email:S.email}:{},...S?.plan&&!i.account.plan?{plan:S.plan}:{}}:null;if(!N)return null;const K=N.method==="chatgpt"?t("settings.agents.accountChatgpt"):N.method==="api-key"?t("settings.agents.accountApiKey"):N.method==="console"?t("settings.agents.accountConsole"):null,L=N.plan?N.plan.charAt(0).toUpperCase()+N.plan.slice(1):null,_=[N.org,N.email,L,N.email||N.org?null:K].filter(Boolean);return _.length?_.join(" · "):null},f=(i,S=!0)=>{const N=r===i.id,K=!te(i.id);if(i.status==="ready"&&S){const L=n.locate&&i.id!=="byok"&&K;return e.jsxs(e.Fragment,{children:[L?e.jsxs(k,{variant:"quiet",disabled:N,onClick:()=>g(i),children:[N?e.jsx(P,{size:16,className:"animate-spin","aria-hidden":!0}):null,t("settings.agents.locate")]}):null,e.jsx(k,{variant:"quiet",disabled:N,title:i.id==="byok"?void 0:t("settings.agents.disconnectHint").replaceAll("{name}",i.name),onClick:()=>d(i.id,()=>n.disconnect(i.id)),children:t("settings.agents.disconnect")})]})}if(i.status==="missing"){const L=n.locate&&i.setupRequired!=="code-tab"&&!te(i.id);return!i.install&&!L?null:e.jsxs(e.Fragment,{children:[L?e.jsxs(k,{variant:"quiet",disabled:N,onClick:()=>g(i),children:[N?e.jsx(P,{size:16,className:"animate-spin","aria-hidden":!0}):null,t("settings.agents.locate")]}):null,i.install?e.jsxs(ut,{href:i.install,children:[e.jsx(ue,{size:16}),t("settings.agents.install")]}):null]})}return i.status==="key"?e.jsx(k,{onClick:()=>u(i.id),children:t("settings.agents.setUpKey")}):i.status==="unavailable"?null:i.status==="checking"?e.jsx(P,{size:16,className:"animate-spin text-[var(--text-muted)]","aria-hidden":!0}):e.jsxs(k,{disabled:N||i.status==="waiting",onClick:()=>d(i.id,()=>n.connect(i.id)),children:[N?e.jsx(P,{size:16,className:"animate-spin","aria-hidden":!0}):null,i.status==="sign-in"?t("settings.agents.signIn"):t("settings.agents.connect")]})},j=(i,S=!0)=>{const N=i.id==="byok"||te(i.id)?i.byok:void 0,K=o?.id===i.id?o.text:i.error,L=h===i.id,_=!!n.diagnose&&i.status==="missing"&&i.setupRequired!=="code-tab",O=b?.id===i.id?b:null,ee=a[i.id],me=S&&i.status==="ready"&&Re.includes(i.id)&&!!n.usage&&(ee===void 0||!!ee?.windows.length),he=O?.report?C(O.report):null;return e.jsx(z,{mark:e.jsx(pt,{id:i.id}),title:i.id==="byok"?t("settings.agents.byokName"):ot(i.id,i.name,t),badge:e.jsxs(e.Fragment,{children:[i.id==="codex"||i.id==="claude"?e.jsx("span",{title:t("settings.agents.recommendedHint"),className:"inline-flex h-[18px] items-center rounded-full border border-[var(--border)] px-1.5 text-[11px] text-[var(--text-muted)]",children:t("settings.agents.recommended")}):null,i.status==="ready"&&S?e.jsx(U,{children:N?`${De(i).join(", ")} · •••• ${i.byok.last4}`:t("settings.agents.ready")}):null]}),description:i.status==="ready"?D(i):E(i),control:e.jsxs(e.Fragment,{children:[N&&!L?e.jsx(k,{variant:"quiet",onClick:()=>u(i.id),children:t("settings.agents.change")}):null,f(i,S),f(i,S)?e.jsx("span",{className:"mx-1 h-5 w-px bg-[var(--border)]","aria-hidden":!0}):null,e.jsx(Z,{checked:i.shown,label:t("settings.agents.showInChat"),onChange:Y=>{n.setShown(i.id,Y)}})]}),children:i.status==="waiting"||L||K||i.chosen||_||me?e.jsxs("div",{className:"flex flex-col gap-1.5 pl-[34px]",children:[me?e.jsx("div",{className:"flex flex-col gap-1.5","aria-label":t("settings.agents.usage"),children:ee===void 0?e.jsxs("p",{className:"flex items-center gap-1.5 text-[13px] text-[var(--text-faint)]",children:[e.jsx(P,{size:13,className:"animate-spin","aria-hidden":!0}),t("settings.agents.usageLoading")]}):ee?.windows.map(Y=>e.jsx(ht,{window:Y},Y.kind+(Y.minutes??"")))}):null,i.chosen?e.jsxs("p",{className:"break-all text-[13.5px] leading-relaxed text-[var(--text-muted)]",children:[t("settings.agents.chosenAt").replace("{path}",i.chosen)," ",n.useAutomatic?e.jsx("button",{type:"button",onClick:()=>d(i.id,()=>n.useAutomatic(i.id)),className:"underline underline-offset-2 hover:text-[var(--text)]",children:t("settings.agents.automatic")}):null]}):null,_&&!O?e.jsx("p",{className:"text-[13.5px] leading-relaxed text-[var(--text-muted)]",children:e.jsx("button",{type:"button",onClick:()=>y(i),className:"underline underline-offset-2 hover:text-[var(--text)]",children:t("settings.agents.whyMissing")})}):null,_&&O&&!O.report?e.jsxs("p",{className:"flex items-center gap-1.5 text-[13.5px] text-[var(--text-muted)]",children:[e.jsx(P,{size:14,className:"animate-spin","aria-hidden":!0}),t("settings.agents.searching")]}):null,_&&O?.report?e.jsxs(X,{children:[he?e.jsx("p",{className:"break-words text-[14px] leading-relaxed text-[var(--text)]",children:he}):null,e.jsx("p",{className:"text-[13px] leading-relaxed text-[var(--text-faint)]",children:t("settings.agents.reportNote")}),e.jsxs("div",{className:"flex justify-end gap-1.5",children:[e.jsx(k,{variant:"quiet",onClick:()=>l(null),children:t("settings.agents.close")}),e.jsxs(k,{onClick:()=>$(O.report,i.id),children:[O.copied?e.jsx(G,{size:15,"aria-hidden":!0}):e.jsx(Pe,{size:15,"aria-hidden":!0}),O.copied?t("settings.agents.copied"):t("settings.agents.copyReport")]})]})]}):null,i.status==="waiting"?e.jsxs("p",{className:"text-[14.5px] leading-relaxed text-[var(--text-muted)]",children:[t("settings.agents.waitingHint")," ",e.jsx("button",{type:"button",onClick:()=>d(i.id,()=>n.connect(i.id)),className:"underline underline-offset-2 hover:text-[var(--text)]",children:t("settings.agents.startAgain")})]}):null,L?e.jsx(bt,{agent:i,onDone:()=>u(null)}):null,K?e.jsx("p",{className:I,children:K}):null]}):null},i.id)},p=s??[],A=i=>p.find(S=>S.id===i),v=["codex","claude","byok"].map(A).filter(i=>!!i),w=p.filter(i=>ct.includes(i.id)&&!v.includes(i)),R=p.filter(i=>te(i.id)),B=[...v,...w.filter(i=>i.shown),...R.filter(i=>i.shown)],V=[...R.filter(i=>!i.shown),...w.filter(i=>!i.shown)];return e.jsxs(H,{note:t("settings.agents.intro"),children:[e.jsx(F,{title:t("settings.agents.groupYours"),footnote:t("settings.agents.showHint"),children:B.map(i=>j(i))}),V.length?e.jsx(F,{title:t("settings.agents.groupMore"),children:V.map(i=>j(i,!1))}):null]})}const se=[{value:"responses",label:"OpenAI Responses",address:"https://api.openai.com/v1"},{value:"chat",label:"OpenAI Chat Completions",address:"https://api.openai.com/v1"},{value:"anthropic",label:"Anthropic Messages",address:"https://api.anthropic.com"}],De=t=>t.byok?.models?.length?t.byok.models:t.preset?.models??[t.byok?.model??""].filter(Boolean),ve=t=>[...new Set(t.split(/[,\n]/).map(s=>s.trim()).filter(Boolean))],ft=t=>De(t).map(s=>({name:s,...t.byok?.efforts?.[s]??{levels:["auto"],effort:"auto"}}));function vt({row:t,onChange:s,onRemove:a}){const n=M(),r=o=>n(`settings.agents.effortLevels.${o}`),c=o=>{const x=t.levels.includes(o);if(x&&t.levels.length===1)return;const h=ge.filter(u=>u===o?!x:t.levels.includes(u));s({...t,levels:h,effort:h.includes(t.effort)?t.effort:h[0]})};return e.jsxs("div",{className:"flex flex-col gap-2 rounded-[8px] border border-[var(--border)] px-3 py-2.5",children:[e.jsxs("div",{className:"flex min-h-8 items-center gap-2",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[13.5px] text-[var(--text)]",title:t.name,children:t.name}),t.levels.length>1?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"shrink-0 text-[13px] text-[var(--text-muted)]",children:n("settings.agents.effortStart")}),e.jsx(xe,{label:n("settings.agents.effortStart"),value:t.effort,width:128,onChange:o=>s({...t,effort:o}),options:t.levels.map(o=>({value:o,label:r(o)}))})]}):null,e.jsx("button",{type:"button",onClick:a,"aria-label":n("settings.agents.removeModel").replace("{name}",t.name),title:n("settings.agents.removeModel").replace("{name}",t.name),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[6px] text-[var(--text-faint)] transition hover:bg-[var(--bg-hover)] hover:text-[var(--text)]",children:e.jsx(we,{size:14,"aria-hidden":!0})})]}),e.jsx("div",{role:"group","aria-label":`${n("settings.agents.efforts")} · ${t.name}`,className:"flex flex-wrap items-center gap-1",children:ge.map(o=>{const x=t.levels.includes(o);return e.jsxs("button",{type:"button","aria-pressed":x,onClick:()=>c(o),className:`inline-flex h-7 items-center gap-1 rounded-full border px-2.5 text-[12.5px] transition ${x?"border-[var(--text-muted)] bg-[var(--fill-tsp)] text-[var(--text)]":"border-[var(--border)] text-[var(--text-muted)] hover:border-[var(--border-strong)] hover:text-[var(--text)]"}`,children:[x?e.jsx(G,{size:12,"aria-hidden":!0}):null,r(o)]},o)})})]})}function bt({agent:t,onDone:s}){const a=M(),n=T?.agents,[r,c]=m.useState(t.byok?.format??t.preset?.format??"responses"),o=se.find(v=>v.value===r),[x,h]=m.useState(t.byok?.baseUrl??t.preset?.baseUrl??o.address),[u,b]=m.useState(()=>ft(t)),[l,d]=m.useState(""),g=()=>{const v=ve(l).filter(w=>!u.some(R=>R.name===w));v.length&&b(w=>[...w,...v.map(R=>({name:R,levels:["auto"],effort:"auto"}))]),d("")},y=()=>[...u,...ve(l).filter(v=>!u.some(w=>w.name===v)).map(v=>({name:v,levels:["auto"],effort:"auto"}))],[C,$]=m.useState(""),[E,D]=m.useState({busy:!1,error:null}),f=v=>{(se.some(w=>w.address===x.trim())||!x.trim())&&h(se.find(w=>w.value===v).address),c(v)},j=()=>{if(!n)return;D({busy:!0,error:null});const v=y();n.configureByok({provider:t.id,format:r,baseUrl:x,models:v.map(w=>w.name),efforts:Object.fromEntries(v.map(w=>[w.name,{levels:w.levels,effort:w.effort}])),...C?{key:C}:{}}).then(w=>{w.ok?($(""),d(""),D({busy:!1,error:null}),s()):D({busy:!1,error:w.error??a("settings.agents.failed")})}).catch(w=>D({busy:!1,error:w instanceof Error?w.message:String(w)}))},p=y().length>0&&x.trim()&&(C.trim()||t.byok),A=v=>e.jsx("span",{className:"w-[92px] shrink-0 text-[13px] text-[var(--text-muted)]",children:v});return e.jsx(X,{children:e.jsxs("form",{className:"contents",onSubmit:v=>{v.preventDefault(),p&&!E.busy&&j()},children:[e.jsxs("div",{className:"flex items-center gap-2",children:[A(a("settings.agents.format")),e.jsx(xe,{label:a("settings.agents.format"),value:r,onChange:f,width:220,options:se.map(v=>({value:v.value,label:v.label}))})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[A(a("settings.agents.address")),e.jsx(q,{value:x,onChange:v=>h(v.target.value),placeholder:o.address,"aria-label":a("settings.agents.address"),spellCheck:!1})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"flex h-10 items-center",children:A(a("settings.agents.model"))}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[u.map(v=>e.jsx(vt,{row:v,onChange:w=>b(R=>R.map(B=>B.name===v.name?w:B)),onRemove:()=>b(w=>w.filter(R=>R.name!==v.name))},v.name)),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{value:l,onChange:v=>d(v.target.value),placeholder:a("settings.agents.modelPlaceholder"),"aria-label":a("settings.agents.model"),spellCheck:!1,onKeyDown:v=>{v.key==="Enter"&&l.trim()&&(v.preventDefault(),g())}}),e.jsx(k,{onClick:g,disabled:!l.trim(),children:a("settings.agents.addModel")})]}),u.length?e.jsx("p",{className:"text-[12.5px] leading-relaxed text-[var(--text-faint)]",children:a("settings.agents.effortHint")}):null]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[A(a("settings.agents.key")),e.jsx(q,{type:"password",value:C,onChange:v=>$(v.target.value),autoComplete:"off",className:"font-mono placeholder:font-sans",placeholder:t.byok?a("settings.agents.keyKept").replace("{last4}",t.byok.last4):a("settings.agents.keyPlaceholder"),"aria-label":a("settings.agents.key")})]}),e.jsx("p",{className:"text-[13px] leading-relaxed text-[var(--text-faint)]",children:a("settings.agents.byokNote")}),E.error?e.jsx("p",{className:I,children:E.error}):null,e.jsxs("div",{className:"flex justify-end gap-1.5",children:[e.jsx(k,{variant:"quiet",onClick:s,children:a("settings.agents.cancel")}),e.jsxs(k,{type:"submit",variant:"primary",disabled:E.busy||!p,children:[E.busy?e.jsx(P,{size:15,className:"animate-spin","aria-hidden":!0}):null,E.busy?a("settings.agents.checkingKey"):a("settings.agents.save")]})]})]})})}function jt(t,s){return t.providers.filter(a=>!a.source&&a.verbs.includes(s)).map(a=>a.name).sort((a,n)=>a.localeCompare(n))}const yt=(t,s)=>t.providers.some(a=>a.verbs.includes(s)),kt=["tts","music","sfx","asr","image","image-search","video","translate","web-search"];async function ce(t,s){const a=await fetch(`/api/providers${t}`,{method:s?.method??"GET",cache:"no-store",headers:s?.json===void 0?void 0:{"content-type":"application/json"},body:s?.json===void 0?void 0:JSON.stringify(s.json)}),n=await a.json().catch(()=>({}));if(!a.ok)throw new Error(n.error??`Studio answered ${a.status}`);return n}function pe(){const[t,s]=m.useState(null),[a,n]=m.useState(null),[r,c]=m.useState(null),[o,x]=m.useState(null);m.useEffect(()=>{let l=!0,d=0;const g=y=>{ce("").then(C=>{l&&(s(C),n(null),c(null))},C=>{l&&(y<4?d=window.setTimeout(()=>g(y+1),1e3*2**y):n(C.message))})};return g(0),()=>{l=!1,window.clearTimeout(d)}},[]);const h=m.useCallback(async(l,d,g)=>{x(l),n(null);try{const y=await ce(d,g),{whisper:C,separator:$,...E}=y,D=d.split("/")[1]??"";return s(()=>!C&&!$?E:{...E,providers:E.providers.map(f=>f.id!==D?f:C?{...f,whisper:C}:$?{...f,separator:$}:f)}),E}catch(y){return n(y instanceof Error?y.message:String(y)),c(l),null}finally{x(null)}},[]),u=m.useCallback(async()=>{try{s(await ce("")),n(null),c(null)}catch(l){n(l instanceof Error?l.message:String(l))}},[]),b=t?.providers.some(l=>[...l.whisper?.models??[],...l.separator?.models??[]].some(d=>d.progress!=null))??!1;return m.useEffect(()=>{if(!b)return;const l=window.setInterval(()=>{u()},1500);return()=>window.clearInterval(l)},[b,u]),{state:t,problem:a,problemFor:r,busy:o,saveKey:async(l,d)=>!!await h(l,`/${encodeURIComponent(l)}/key`,{method:"PUT",json:{key:d}}),removeKey:async l=>{await h(l,`/${encodeURIComponent(l)}/key`,{method:"DELETE"})},useEnvKey:async l=>!!await h(l,`/${encodeURIComponent(l)}/key`,{method:"PUT",json:{env:!0}}),choose:async(l,d,g)=>{await h(l,"/use",{method:"PUT",json:{verb:l,provider:d||null,...g}})},saveService:async(l,d)=>!!await h(l??"custom",l?`/custom/${encodeURIComponent(l)}`:"/custom",{method:l?"PUT":"POST",json:d}),removeService:async l=>{await h(l,`/custom/${encodeURIComponent(l)}`,{method:"DELETE"})},reload:u,downloadModel:async(l,d)=>{await h(`${l}:${d}`,`/${encodeURIComponent(l)}/models`,{method:"POST",json:{model:d}})},removeModel:async(l,d)=>{await h(`${l}:${d}`,`/${encodeURIComponent(l)}/models/${encodeURIComponent(d)}`,{method:"DELETE"})}}}async function ne(t,s){const a=await fetch(`/api/video-models${t}`,{method:s?.method??"GET",cache:"no-store",headers:s?.json===void 0?void 0:{"content-type":"application/json"},body:s?.json===void 0?void 0:JSON.stringify(s.json)}),n=await a.json().catch(()=>({}));if(!a.ok)throw new Error(n.error??`Studio answered ${a.status}`);return n}function wt(){const[t,s]=m.useState(null),[a,n]=m.useState(null),[r,c]=m.useState(null);m.useEffect(()=>{let u=!0,b=0;const l=d=>{ne("").then(g=>{u&&(s(g),n(null))},g=>{u&&(d<4?b=window.setTimeout(()=>l(d+1),1e3*2**d):n(g.message))})};return l(0),()=>{u=!1,window.clearTimeout(b)}},[]);const o=async u=>{c("endpoint"),n(null);try{const b=await ne("",{method:"PUT",json:{endpoint:u}});return s(b),b.local.reachable===!0}catch(b){return n(b instanceof Error?b.message:String(b)),!1}finally{c(null)}},x=async()=>{c("check"),n(null);try{s(await ne("/check",{method:"POST"}))}catch(u){n(u instanceof Error?u.message:String(u))}finally{c(null)}},h=m.useCallback(async()=>{try{s(await ne("")),n(null)}catch(u){n(u instanceof Error?u.message:String(u))}},[]);return{state:t,problem:a,busy:r,save:o,check:x,reload:h}}function Nt({onConnect:t}){const s=M(),a=wt(),n=pe(),[r,c]=m.useState(null),[o,x]=m.useState(""),[h,u]=m.useState(!1),[b,l]=m.useState(null),d=a.state?.cloud??[],g=d.filter(p=>p.builtin),y=d.filter(p=>!p.builtin),C=a.state?.local,$=n.state?{provider:n.state.use.video??null,model:n.state.model.video??null}:null,E=()=>{c(null),x(""),l(null)},D=async p=>{if(!p.provider||!o.trim()||h)return;u(!0),l(null);const A=await n.saveKey(p.provider,o.trim());if(u(!1),!A){l(n.problem??s("settings.video.cloud.keyRefused"));return}E(),await a.reload();const v=!n.state?.use.video;await n.reload(),v&&p.model&&await n.choose("video",p.provider,{model:p.model})},f=p=>{const A=p.via??"",v=s("settings.video.cloud.pasteKey").replace("{service}",A);return e.jsx("form",{className:"pl-[34px]",onSubmit:w=>{w.preventDefault(),D(p)},children:e.jsxs(X,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{type:"password",autoFocus:!0,autoComplete:"off",spellCheck:!1,value:o,onChange:w=>x(w.target.value),onKeyDown:w=>{w.key==="Escape"&&(w.preventDefault(),E())},placeholder:v,"aria-label":v,className:"flex-1 font-mono placeholder:font-sans"}),e.jsx(k,{variant:"quiet",onClick:E,children:s("settings.video.cloud.cancel")}),e.jsx(k,{type:"submit",variant:"primary",disabled:!o.trim()||h,children:s("settings.video.cloud.save")})]}),b?e.jsx("p",{className:I,role:"alert",children:b}):null,p.keysUrl?e.jsxs("a",{href:p.keysUrl,target:"_blank",rel:"noreferrer",className:`${re} text-[13.5px]`,children:[s("settings.video.cloud.getKey").replace("{service}",A),e.jsx(Se,{size:12})]}):null]})})},j=p=>e.jsx(St,{model:p,on:!!($&&p.provider&&$.provider===p.provider&&$.model===p.model),busy:n.busy==="video"||h,onUse:()=>{p.provider&&p.model&&n.choose("video",p.provider,{model:p.model})},onConnect:()=>{if(!p.builtin){t();return}c(p.id),x(""),l(null)},below:p.builtin&&r===p.id?f(p):null},p.id);return e.jsxs(H,{note:s("settings.video.desc"),children:[e.jsx(F,{title:s("settings.video.cloud.title"),footnote:s("settings.video.cloud.note"),children:g.map(j)}),y.length?e.jsx(F,{title:s("settings.video.cloud.more"),footnote:s("settings.video.cloud.moreNote"),children:y.map(j)}):null,C?e.jsx(Ct,{local:C,hook:a}):null,a.problem?e.jsx("p",{className:I,children:a.problem}):null]})}function St({model:t,on:s,busy:a,onUse:n,onConnect:r,below:c}){const o=M(),x=t.builtin?t.connected?s?e.jsxs(U,{children:[e.jsx(G,{size:14,"aria-hidden":!0}),o("settings.video.cloud.using")]}):e.jsx(k,{disabled:a,onClick:n,children:o("settings.video.cloud.use")}):e.jsx(k,{onClick:r,children:o("settings.video.cloud.connect")}):e.jsx(k,{variant:"quiet",onClick:r,children:o("settings.video.cloud.addOwn")});return e.jsx(z,{mark:t.provider?e.jsx(J,{id:t.provider,size:17}):e.jsx(Ne,{size:16}),title:t.name,badge:t.maker?e.jsx("span",{className:"text-[13.5px] text-[var(--text-faint)]",children:t.maker}):null,description:t.builtin?t.connected?o("settings.video.cloud.servedBy").replace("{service}",t.via??""):o("settings.video.cloud.notConnected").replace("{service}",t.via??""):o("settings.video.cloud.own"),control:x,children:c})}function Ct({local:t,hook:s}){const a=M(),[n,r]=m.useState(t.endpoint);m.useEffect(()=>{r(t.endpoint)},[t.endpoint]);const c=s.busy,o=n.trim().replace(/\/+$/,"")!==t.endpoint,x=()=>{c||s.save(n)};return e.jsxs(F,{title:a("settings.video.local.title"),footnote:a("settings.video.local.note"),children:[e.jsx(z,{mark:e.jsx(Ue,{size:16}),title:a("settings.video.local.endpoint"),description:a("settings.video.local.endpointHint"),badge:c?e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[13.5px] text-[var(--text-muted)]",children:[e.jsx(P,{size:13,className:"animate-spin","aria-hidden":!0}),a("settings.video.local.asking")]}):t.reachable===!0?e.jsx(U,{children:a("settings.video.local.reachable")}):t.reachable===!1?e.jsx(U,{tone:"muted",children:a("settings.video.local.unreachable")}):null,control:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{"aria-label":a("settings.video.local.endpoint"),value:n,spellCheck:!1,placeholder:"http://127.0.0.1:8188",onChange:h=>r(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),x())},className:"w-[248px] font-mono text-[13.5px]"}),e.jsx(k,{disabled:!!c,onClick:x,children:a(o?"settings.video.local.save":"settings.video.local.check")})]})}),t.models.map(h=>e.jsx(z,{title:h.name,badge:e.jsx("span",{className:"text-[13.5px] text-[var(--text-faint)]",children:h.maker}),description:e.jsx("span",{className:"font-mono text-[12.5px] text-[var(--text-faint)]",children:h.nodes.join(" / ")}),control:h.installed?e.jsxs(U,{children:[e.jsx(G,{size:14,"aria-hidden":!0}),a("settings.video.local.installed")]}):e.jsx(U,{tone:"muted",children:a("settings.video.local.missing")})},h.id))]})}function Et({onConnect:t}){const s=M(),a=pe(),n=a.state,r=!!n?.providers.some(c=>c.source);return e.jsxs(H,{note:s("settings.models.desc"),children:[n&&!r?e.jsx(F,{children:e.jsx(z,{description:s("settings.models.nothing"),title:s("settings.models.goConnect"),control:e.jsx(k,{onClick:t,children:s("settings.models.goConnect")})})}):null,n?e.jsx(F,{footnote:s("settings.models.otherBody"),children:kt.filter(c=>yt(n,c)).map(c=>e.jsx($t,{verb:c,hook:a,onConnect:t},c))}):null,a.problem?e.jsx("p",{className:I,children:a.problem}):null]})}function $t({verb:t,hook:s,onConnect:a}){const n=M(),r=s.state,c=n(`settings.providers.verbs.${t}`),o=r.use[t]??"",x=[];for(const d of r.providers)if(d.source&&d.verbs.includes(t)||d.id===o)for(const g of d.models[t]??[])x.push({value:`${d.id}:${g.id}`,provider:d.id,providerName:d.name,name:g.name,pick:{model:g.id}});x.sort((d,g)=>d.providerName.localeCompare(g.providerName));const h=d=>r.providers.find(g=>g.id===d)?.models[t]?.[0]?.id,u=o?`${o}:${r.model[t]??h(o)??""}`:"",b=x.find(d=>d.value===u),l=jt(r,t);return e.jsx(z,{title:c,description:n(`settings.models.about.${t}`),control:e.jsx(Mt,{label:c,choices:x,current:b??null,busy:s.busy===t,could:l,onConnect:a,onPick:d=>{s.choose(t,d?.provider??"",d?.pick)}})})}function Mt({label:t,choices:s,current:a,busy:n,could:r,onConnect:c,onPick:o}){const x=M(),h=Q(),[u,b]=m.useState(!1),l=m.useRef(null),d=s.length===0,g=s.reduce((f,j)=>{const p=f.find(A=>A.provider===j.provider);return p?p.choices.push(j):f.push({provider:j.provider,name:j.providerName,choices:[j]}),f},[]);m.useEffect(()=>{if(!u)return;const f=requestAnimationFrame(()=>(l.current?.querySelector('[aria-selected="true"]')??l.current?.querySelector('[role="option"]'))?.focus());return()=>cancelAnimationFrame(f)},[u]);const y=f=>{if(f.key!=="ArrowDown"&&f.key!=="ArrowUp")return;f.preventDefault();const j=Array.from(l.current?.querySelectorAll('[role="option"]')??[]),p=j.indexOf(document.activeElement);j[(p+(f.key==="ArrowDown"?1:-1)+j.length)%j.length]?.focus()},C=f=>{b(!1),f?.value!==a?.value&&o(f)},$=(f,j)=>{const p=(f?.value??"")===(a?.value??"");return e.jsxs("button",{type:"button",role:"option","aria-selected":p,onClick:()=>C(f),className:"flex h-9 w-full items-center gap-2 rounded-[6px] px-2 text-left text-[14.5px] text-[var(--text)] outline-none hover:bg-[var(--bg-hover)] focus-visible:bg-[var(--bg-hover)]",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate",children:j}),p?e.jsx(G,{size:17,className:"shrink-0 text-[var(--text-muted)]"}):null]},f?.value??"")},E=r.length?x("settings.models.connectNamed").replace("{names}",new Intl.ListFormat(h,{type:"disjunction"}).format(r)):x("settings.models.goConnect"),D=d?e.jsxs("button",{type:"button","aria-label":`${t}: ${E}`,title:E,disabled:n,onClick:c,className:"flex h-10 w-[280px] items-center gap-2 rounded-[8px] border border-[var(--border)] px-3 text-left text-[14.5px] text-[var(--text-muted)] transition hover:border-[var(--border-strong)] hover:text-[var(--text)] disabled:opacity-60",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate",children:E}),e.jsx(Ie,{size:15,className:"shrink-0"})]}):e.jsxs("button",{type:"button","aria-label":t,"aria-haspopup":"listbox","aria-expanded":u,disabled:n,className:`flex h-10 w-[280px] items-center gap-2 rounded-[8px] border px-3 text-left text-[14.5px] text-[var(--text)] transition disabled:opacity-60 ${u?"border-[var(--text-muted)]":"border-[var(--border)] hover:border-[var(--border-strong)]"}`,children:[a?e.jsx(J,{id:a.provider,size:15}):null,e.jsx("span",{className:`min-w-0 flex-1 truncate ${a?"":"text-[var(--text-muted)]"}`,children:a?`${a.providerName} · ${a.name}`:x("settings.models.none")}),e.jsx(ke,{size:15,className:"shrink-0 text-[var(--text-muted)]"})]});return e.jsx("div",{className:"shrink-0",children:e.jsx(ye,{open:u&&!d,onOpenChange:b,placement:"auto",align:"end",layer:10060,trigger:D,children:e.jsxs("div",{ref:l,role:"listbox","aria-label":t,onKeyDown:y,className:"max-h-[min(360px,var(--popover-max-h))] w-[288px] overflow-y-auto rounded-[10px] border border-[var(--border)] bg-[var(--surface)] p-1 shadow-[var(--shadow-lg)]",children:[g.map(f=>e.jsxs("div",{className:"mb-1",role:"group","aria-label":f.name,children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-2 pb-1 pt-1.5 text-[14px] font-medium text-[var(--text-muted)]",children:[e.jsx(J,{id:f.provider,size:15}),f.name]}),f.choices.map(j=>$(j,j.name))]},f.provider)),e.jsx("div",{className:"border-t border-[var(--border-soft)] pt-1",children:$(null,x("settings.models.none"))})]})})})}const At=["tts","music","sfx","asr","image","image-search","video","translate","web-search"];function zt({highlight:t=null}){const s=M(),a=pe(),n=[...a.state?.providers??[]].sort((r,c)=>r.name.localeCompare(c.name));return e.jsxs(H,{note:s("settings.providers.desc"),children:[e.jsx(F,{footnote:s("settings.providers.keyNote"),children:n.map(r=>r.local?r.separator?e.jsx(qt,{provider:r,hook:a,highlighted:t===r.id},r.id):r.whisper?e.jsx(Ot,{provider:r,hook:a,highlighted:t===r.id},r.id):e.jsx(Lt,{provider:r,hook:a,highlighted:t===r.id},r.id):e.jsx(Tt,{provider:r,hook:a,highlighted:t===r.id},r.id))}),e.jsx(Dt,{hook:a}),a.problem&&!n.some(r=>r.id===a.problemFor)&&!Rt(a)?e.jsx("p",{className:I,children:a.problem}):null]})}const Rt=t=>t.problemFor==="custom"||!!t.state?.custom.some(s=>s.id===t.problemFor);function Dt({hook:t}){const s=M(),a=t.state?.custom??[],[n,r]=m.useState(null);return t.state?e.jsxs(F,{title:s("settings.providers.own.title"),footnote:s("settings.providers.own.note"),children:[a.map(c=>e.jsx(z,{mark:e.jsx(rt,{size:16}),title:c.name,badge:c.last4?e.jsx(U,{tone:"muted",children:e.jsxs("span",{className:"font-mono tabular-nums",children:["•••• ",c.last4]})}):null,description:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-mono text-[13px] text-[var(--text-faint)]",children:c.url}),c.note?e.jsx("span",{className:"mt-0.5 block whitespace-pre-line",children:c.note}):null]}),control:n===c.id?null:e.jsxs(e.Fragment,{children:[e.jsx(k,{variant:"quiet",disabled:t.busy===c.id,onClick:()=>{t.removeService(c.id)},children:s("settings.providers.own.remove")}),e.jsx(k,{onClick:()=>r(c.id),children:s("settings.providers.own.edit")})]}),children:n===c.id?e.jsx(be,{hook:t,service:c,onDone:()=>r(null)}):null},c.id)),n===""?e.jsx("div",{className:"py-4",children:e.jsx(be,{hook:t,service:null,onDone:()=>r(null)})}):e.jsx("div",{className:"py-4",children:e.jsxs(k,{onClick:()=>r(""),children:[e.jsx(Ee,{size:15,strokeWidth:2}),s("settings.providers.own.add")]})})]}):null}function be({hook:t,service:s,onDone:a}){const n=M(),[r,c]=m.useState({name:s?.name??"",url:s?.url??"",auth:s?.auth??Ft,note:s?.note??""}),[o,x]=m.useState(""),[h,u]=m.useState(!1),b=t.busy===(s?.id??"custom"),l=y=>C=>c($=>({...$,[y]:C.target.value})),d=async()=>{if(b||!r.name.trim()||!r.url.trim())return;const y={...r,...o.trim()?{key:o.trim()}:h||!s?{key:""}:{}};await t.saveService(s?.id??null,y)&&a()},g=(y,C)=>e.jsxs("label",{className:"flex flex-col gap-1.5 text-[13.5px] text-[var(--text-muted)]",children:[y,C]});return e.jsx("form",{className:s?"pl-[52px]":"",onSubmit:y=>{y.preventDefault(),d()},onKeyDown:y=>{y.key==="Escape"&&(y.preventDefault(),a())},children:e.jsxs(X,{children:[g(n("settings.providers.own.name"),e.jsx(q,{autoFocus:!0,value:r.name,onChange:l("name"),placeholder:n("settings.providers.own.namePlaceholder")})),g(n("settings.providers.own.url"),e.jsx(q,{value:r.url,onChange:l("url"),placeholder:"http://localhost:8000",spellCheck:!1,className:"font-mono placeholder:font-sans"})),g(n("settings.providers.own.key"),e.jsx(q,{type:"password",autoComplete:"off",spellCheck:!1,value:o,onChange:y=>{x(y.target.value),u(!1)},placeholder:s?.last4&&!h?n("settings.providers.own.keyKeep").replaceAll("{last4}",s.last4):n("settings.providers.own.keyOptional"),className:"font-mono placeholder:font-sans"})),s?.last4&&!o&&!h?e.jsx("button",{type:"button",className:`${re} self-start text-[13.5px]`,onClick:()=>u(!0),children:n("settings.providers.own.removeKey")}):null,g(n("settings.providers.own.auth"),e.jsx(q,{value:r.auth,onChange:l("auth"),spellCheck:!1,className:"font-mono"})),g(n("settings.providers.own.what"),e.jsx("textarea",{value:r.note,onChange:l("note"),rows:3,maxLength:600,placeholder:n("settings.providers.own.whatPlaceholder"),className:"w-full min-w-0 resize-y rounded-[8px] border border-[var(--border)] bg-transparent px-3 py-2 text-[14px] leading-[1.5] text-[var(--text)] outline-none transition placeholder:text-[var(--text-faint)] hover:border-[var(--border-strong)] focus:border-[var(--text-muted)]"})),t.problem&&t.problemFor===(s?.id??"custom")?e.jsx("p",{className:I,role:"alert",children:t.problem}):null,e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(k,{variant:"quiet",onClick:a,children:n("settings.providers.cancel")}),e.jsx(k,{type:"submit",variant:"primary",disabled:b||!r.name.trim()||!r.url.trim(),children:n("settings.providers.save")})]})]})})}const Ft="Authorization: Bearer {key}";function ie({id:t,name:s,badge:a,children:n,action:r,below:c,highlighted:o=!1}){const x=m.useRef(null);return m.useEffect(()=>{if(!o)return;const h=x.current;h&&(h.scrollIntoView({block:"center"}),h.querySelector("[data-row-action]")?.focus({preventScroll:!0}))},[o]),e.jsx("div",{ref:x,"data-provider":t,...o?{"data-highlight":""}:{},className:"rounded-[10px] transition-colors duration-500",style:o?{background:"var(--bg-active)",outline:"2px solid var(--text-muted)",outlineOffset:2}:void 0,children:e.jsx(z,{mark:e.jsx(J,{id:t,size:17}),title:s,badge:a,description:n,control:r,children:c})})}function le({children:t}){const s=M();return e.jsxs(U,{children:[s("settings.providers.connected"),t]})}function Kt(t,s){const a=t.map((n,r)=>r?s(`settings.providers.verbs.${n}`).toLowerCase():s(`settings.providers.verbs.${n}`));return a.length>1?`${a.slice(0,-1).join(", ")} ${s("settings.providers.and")} ${a.at(-1)}`:a[0]??""}function Tt({provider:t,hook:s,highlighted:a=!1}){const n=M(),[r,c]=m.useState(!1),[o,x]=m.useState(""),h=s.busy===t.id,u=()=>{c(!1),x("")},b=async()=>{!o.trim()||h||await s.saveKey(t.id,o)&&u()},l=n("settings.providers.pasteKey").replaceAll("{name}",t.name);return e.jsx(ie,{id:t.id,name:t.name,highlighted:a,badge:t.source?e.jsx(le,{children:e.jsxs("span",{className:"font-mono tabular-nums text-[var(--text-faint)]","aria-label":n("settings.providers.keyEnding").replaceAll("{last4}",t.last4??""),children:["•••• ",t.last4]})}):null,action:t.source?e.jsx(k,{variant:"quiet",disabled:h,onClick:()=>{s.removeKey(t.id)},children:n("settings.providers.disconnect")}):r?null:e.jsxs(k,{onClick:()=>c(!0),children:[e.jsx(Ee,{size:15,strokeWidth:2}),n("settings.providers.connect")]}),below:r&&!t.source?e.jsx("form",{className:"pl-[34px]",onSubmit:d=>{d.preventDefault(),b()},children:e.jsxs(X,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{type:"password",autoFocus:!0,autoComplete:"off",spellCheck:!1,value:o,onChange:d=>x(d.target.value),onKeyDown:d=>{d.key==="Escape"&&(d.preventDefault(),u())},placeholder:l,"aria-label":l,className:"flex-1 font-mono placeholder:font-sans"}),e.jsx(k,{variant:"quiet",onClick:u,children:n("settings.providers.cancel")}),e.jsx(k,{type:"submit",variant:"primary",disabled:!o.trim()||h,children:n("settings.providers.save")})]}),s.problem&&s.problemFor===t.id?e.jsx("p",{className:I,role:"alert",children:s.problem}):null,t.envKey?e.jsx("button",{type:"button",disabled:h,onClick:()=>{s.useEnvKey(t.id).then(d=>{d&&u()})},className:`${re} self-start text-[14.5px]`,children:n("settings.providers.useEnv").replaceAll("{env}",t.env)}):null,e.jsxs("a",{href:t.keysUrl,target:"_blank",rel:"noreferrer",className:`${re} text-[14.5px]`,children:[n("settings.providers.getKey").replaceAll("{name}",t.name),e.jsx(Se,{size:12})]})]})}):null,children:Kt(At.filter(d=>t.verbs.includes(d)),n)})}function Fe(t){return t>=1024*1024*1024?`${(t/1024**3).toFixed(1)} GB`:`${Math.round(t/1024**2)} MB`}function Lt({provider:t,hook:s,highlighted:a=!1}){const n=M(),r=s.state?.use.tts===t.id;return e.jsxs(ie,{id:t.id,name:t.name,highlighted:a,badge:e.jsx(le,{}),action:null,children:[e.jsx("span",{className:"block",children:n("settings.providers.edge.desc")}),e.jsx("span",{className:"mt-1 block text-[12.5px] text-[var(--text-faint)]",children:n("settings.providers.edge.languages")}),e.jsxs("span",{className:"mt-1.5 flex items-center gap-2",children:[e.jsx("span",{className:"min-w-0 flex-1 text-[13px] text-[var(--text-faint)]",children:n(r?"settings.providers.edge.ready":"settings.providers.edge.pick")}),r?null:e.jsx(k,{variant:"quiet","data-row-action":!0,disabled:s.busy==="edge-tts:tts",onClick:()=>{s.choose("tts",t.id)},children:n("settings.providers.edge.use")})]})]})}function qt({provider:t,hook:s,highlighted:a=!1}){const n=M(),r=t.separator,c=s.busy?.startsWith(`${t.id}:`)?s.busy:null;return e.jsxs(ie,{id:t.id,name:t.name,highlighted:a,badge:r?.models.some(o=>o.downloaded)?e.jsx(le,{}):null,action:null,children:[e.jsx("span",{className:"block",children:n("settings.providers.separate.desc")}),e.jsx("span",{className:"mt-1.5 block",children:r?.models.map(o=>{const x=c===`${t.id}:${o.id}`;return e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"shrink-0 text-[13.5px] text-[var(--text)]",children:o.name}),e.jsx("span",{className:"shrink-0 text-[12.5px] tabular-nums text-[var(--text-faint)]",children:Fe(o.bytes)}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-[12.5px] text-[var(--text-faint)]",children:o.progress!=null?n("settings.providers.local.progress").replace("{p}",`${Math.round(o.progress*100)}`):o.error??""}),o.downloaded?e.jsxs(k,{variant:"quiet",disabled:x,onClick:()=>{s.removeModel(t.id,o.id)},children:[e.jsx(Ce,{size:14,strokeWidth:2}),n("settings.providers.local.remove")]}):e.jsxs(k,{"data-row-action":!0,disabled:x||o.progress!=null,onClick:()=>{s.downloadModel(t.id,o.id)},children:[e.jsx(ue,{size:14,strokeWidth:2}),n("settings.providers.local.download")]})]},o.id)})}),e.jsx("span",{className:"mt-1 block text-[12.5px] text-[var(--text-faint)]",children:n("settings.providers.separate.note")})]})}function Ot({provider:t,hook:s,highlighted:a=!1}){const n=M(),r=t.whisper,c=s.busy?.startsWith(`${t.id}:`)?s.busy:null,o=t.id==="local-whisper",x=o?t.name:`${t.name}${n("settings.providers.sensevoice.tag")}`,h=(r?.models.length??0)>1;return e.jsxs(ie,{id:t.id,name:x,highlighted:a,badge:r?.models.some(u=>u.downloaded)?e.jsx(le,{}):null,action:null,children:[e.jsx("span",{className:"block",children:n(o?"settings.providers.local.desc":"settings.providers.sensevoice.desc")}),o?e.jsx("span",{className:"mt-1.5 block text-[13px] text-[var(--text)]",children:n("settings.providers.local.chinese")}):null,e.jsx("span",{className:"mt-1.5 block",children:r?.models.map(u=>{const b=c===`${t.id}:${u.id}`;return e.jsxs("span",{className:"mb-1 block",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[h?e.jsx("span",{className:"w-[9.5em] shrink-0 truncate text-[13.5px] text-[var(--text)]",children:u.name}):null,e.jsx("span",{className:"shrink-0 text-[12.5px] tabular-nums text-[var(--text-faint)]",children:Fe(u.bytes)}),u.vram!=null?e.jsx("span",{className:"shrink-0 text-[12.5px] tabular-nums text-[var(--text-faint)]",children:n("settings.providers.local.vram").replace("{g}",String(u.vram))}):null,e.jsx("span",{className:"min-w-0 flex-1 truncate text-[12.5px] text-[var(--text-faint)]",children:u.progress!=null?n("settings.providers.local.progress").replace("{p}",`${Math.round(u.progress*100)}`):u.error??""}),u.downloaded?e.jsxs(k,{variant:"quiet",disabled:b,onClick:()=>{s.removeModel(t.id,u.id)},children:[e.jsx(Ce,{size:14,strokeWidth:2}),n("settings.providers.local.remove")]}):e.jsxs(k,{"data-row-action":!0,disabled:b||u.progress!=null,onClick:()=>{s.downloadModel(t.id,u.id)},children:[e.jsx(ue,{size:14,strokeWidth:2}),n("settings.providers.local.download")]})]}),u.languages?.length?e.jsx("span",{className:"mt-0.5 block text-[12px] text-[var(--text-faint)]",children:n("settings.providers.local.languages").replace("{list}",u.languages.map(l=>n(`settings.providers.local.lang.${l}`)).join(n("settings.providers.local.langSep")))}):null]},u.id)})}),o?e.jsx("span",{className:"mt-1 block text-[12.5px] text-[var(--text-faint)]",children:n("settings.providers.local.vramHint")}):null,r?.models.some(u=>u.downloaded)?s.state?.use.asr===t.id?e.jsx("span",{className:"mt-0.5 block text-[13px] text-[var(--text-faint)]",children:n("settings.providers.local.ready")}):e.jsxs("span",{className:"mt-0.5 flex items-center gap-2",children:[e.jsx("span",{className:"min-w-0 flex-1 text-[13px] text-[var(--text-faint)]",children:n("settings.providers.local.pick")}),e.jsx(k,{variant:"quiet","data-row-action":!0,disabled:s.busy===`${t.id}:asr`,onClick:()=>{s.choose("asr",t.id)},children:n("settings.providers.local.use")})]}):null]})}const Ke="aicut.theme",Te=()=>window.matchMedia("(prefers-color-scheme: dark)");function Le(){try{const t=localStorage.getItem(Ke);return t==="light"||t==="system"?t:"dark"}catch{return"dark"}}function qe(t){document.documentElement.dataset.theme=t==="system"?Te().matches?"dark":"light":t}const de=new Set;typeof window<"u"&&Te().addEventListener("change",()=>{Le()==="system"&&qe("system")});function Pt(t){try{localStorage.setItem(Ke,t)}catch{}qe(t);for(const s of de)s()}function Bt(){return[m.useSyncExternalStore(s=>(de.add(s),()=>de.delete(s)),Le,()=>"dark"),Pt]}const Ut=[{group:"settings",sections:["general",...T?.agents?["agents"]:[],"video","providers","models"]},{group:"help",sections:["shortcuts",...T?.developer?["developer"]:[]]}],It=[{label:"settings.links.github",href:"https://github.com/autoaiai/aicut"},{label:"settings.links.site",href:"http://autoaiai.com/aicut"}],_t={general:e.jsx(Ye,{size:18,strokeWidth:1.75}),agents:e.jsx(Ve,{size:18,strokeWidth:1.75}),video:e.jsx(Ne,{size:18,strokeWidth:1.75}),providers:e.jsx(at,{size:18,strokeWidth:1.75}),models:e.jsx(Ge,{size:18,strokeWidth:1.75}),developer:e.jsx(it,{size:18,strokeWidth:1.75}),shortcuts:e.jsx(tt,{size:18,strokeWidth:1.75})},je={general:["settings.appearance","settings.performance","settings.playback"],agents:"settings.agents",video:"settings.video",providers:"settings.providers",models:"settings.models",developer:"settings.developer",shortcuts:"settings.shortcuts"};function es({open:t,onClose:s,section:a,highlight:n}){const r=M(),c=Q(),[o,x]=m.useState("general"),[h,u]=m.useState(""),[b,l]=m.useState(!1),d=m.useRef(null),g=m.useRef(null),y=m.useRef(s);y.current=s;const C=m.useRef(n);C.current=n,m.useLayoutEffect(()=>{t&&(x(a??"general"),u(""))},[t,a]);const $=m.useMemo(()=>Object.fromEntries(Object.keys(je).map(p=>[p,[r(`settings.sections.${p}`),...[je[p]].flat().flatMap(A=>_e(A,c))].join(`
2
+ `).toLowerCase()])),[r,c]),E=h.trim().toLowerCase(),D=Ut.map(p=>({...p,sections:p.sections.filter(A=>!E||$[A].includes(E))})).filter(p=>p.sections.length>0),f=D.flatMap(p=>p.sections),j=f.includes(o)?o:f[0]??null;return m.useEffect(()=>{if(!t)return;const p=document.activeElement,A=R=>{if(R.defaultPrevented||(R.key==="Escape"&&y.current(),R.key!=="Tab"||!d.current?.contains(document.activeElement)))return;const B=Array.from(d.current.querySelectorAll('button:not(:disabled), a[href], input:not(:disabled), select:not(:disabled), [tabindex="0"]')).filter(S=>S.getClientRects().length>0),V=B[0],i=B[B.length-1];R.shiftKey&&document.activeElement===V?(R.preventDefault(),i?.focus()):!R.shiftKey&&document.activeElement===i&&(R.preventDefault(),V?.focus())};window.addEventListener("keydown",A);const v=document.body.style.overflow;document.body.style.overflow="hidden";const w=requestAnimationFrame(()=>{l(!0),C.current||g.current?.focus()});return()=>{window.removeEventListener("keydown",A),document.body.style.overflow=v,cancelAnimationFrame(w),l(!1),p?.isConnected&&p.focus()}},[t]),t?We.createPortal(e.jsx("div",{className:"fixed inset-0 z-[10050] grid place-items-center p-6",style:{background:"rgba(0,0,0,0.5)",opacity:b?1:0,transition:"opacity 160ms ease"},onMouseDown:p=>{p.target===p.currentTarget&&s()},children:e.jsxs("div",{ref:d,role:"dialog","aria-modal":"true","aria-labelledby":"settings-title",className:"relative flex h-[min(800px,90vh)] w-full max-w-[1120px] overflow-hidden rounded-[14px] border border-[var(--border)] bg-[var(--dock-pane)] shadow-[0_24px_64px_-12px_rgba(0,0,0,0.5),0_4px_16px_rgba(0,0,0,0.14)]",style:{opacity:b?1:0,transform:b?"scale(1)":"scale(0.98)",transition:"opacity 160ms ease, transform 200ms ease"},children:[e.jsxs("nav",{"aria-label":r("settings.title"),className:"flex w-[264px] shrink-0 flex-col overflow-y-auto border-r border-[var(--border)] px-3 pb-4 pt-3",children:[e.jsxs("label",{className:"mb-3 flex h-10 shrink-0 items-center gap-2.5 rounded-[9px] border border-[var(--border)] px-3 text-[var(--text-muted)] transition focus-within:border-[var(--text-muted)]",children:[e.jsx(He,{size:17,strokeWidth:1.75,className:"shrink-0","aria-hidden":!0}),e.jsx("input",{ref:g,value:h,onChange:p=>u(p.target.value),placeholder:r("settings.search"),"aria-label":r("settings.search"),className:"min-w-0 flex-1 bg-transparent text-[15px] text-[var(--text)] outline-none placeholder:text-[var(--text-faint)]"})]}),D.map(p=>e.jsxs("div",{className:"mt-3 flex flex-col gap-0.5",children:[e.jsx("div",{className:"px-2.5 pb-1.5 text-[13px] text-[var(--text-faint)]",children:r(p.group==="help"?"settings.groups.help":"settings.title")}),p.sections.map(A=>{const v=j===A;return e.jsxs("button",{type:"button","aria-current":v?"page":void 0,onClick:()=>x(A),className:`flex h-10 min-w-0 items-center gap-3 rounded-[8px] px-2.5 text-left text-[15px] transition ${v?"bg-[var(--bg-active)] text-[var(--text)]":"text-[var(--text-dim)] hover:bg-[var(--bg-hover)] hover:text-[var(--text)]"}`,children:[e.jsx("span",{className:`shrink-0 ${v?"text-[var(--text)]":"text-[var(--text-muted)]"}`,children:_t[A]}),e.jsx("span",{className:"min-w-0 truncate",children:r(`settings.sections.${A}`)})]},A)})]},p.group)),f.length===0?e.jsx("p",{className:"px-2.5 pt-4 text-[14px] text-[var(--text-faint)]",children:r("settings.noResults")}):null,e.jsx("div",{className:"mt-auto flex flex-wrap gap-x-4 gap-y-1 px-2.5 pt-6 text-[13px] text-[var(--text-faint)]",children:It.map(p=>e.jsx("a",{href:p.href,target:"_blank",rel:"noreferrer",className:"rounded-[4px] transition hover:text-[var(--text)]",children:r(p.label)},p.href))})]}),e.jsxs("div",{className:"relative flex min-w-0 flex-1 flex-col",children:[e.jsx("button",{type:"button",onClick:s,"aria-label":r("settings.done"),className:"absolute right-4 top-4 z-10 flex h-9 w-9 items-center justify-center rounded-[8px] text-[var(--text-muted)] transition hover:bg-[var(--bg-hover)] hover:text-[var(--text)]",children:e.jsx(we,{size:19,strokeWidth:1.75})}),e.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-10 pb-12 pt-9",children:[j?e.jsx("h2",{id:"settings-title",className:"mb-7 text-[22px] font-semibold tracking-[-0.015em] text-[var(--text)]",children:r(`settings.sections.${j}`)}):null,j==="general"&&e.jsx(Wt,{}),j==="agents"&&e.jsx(gt,{}),j==="video"&&e.jsx(Nt,{onConnect:()=>{u(""),x("providers")}}),j==="providers"&&e.jsx(zt,{highlight:n??null}),j==="models"&&e.jsx(Et,{onConnect:()=>{u(""),x("providers")}}),j==="developer"&&e.jsx(Zt,{}),j==="shortcuts"&&e.jsx(Qt,{})]},j??"none")]})]})}),document.body):null}function Wt(){const t=M(),[s,a]=Bt(),[n,r]=Je(),c=Q(),o=fe.find(x=>x.code===c)?.name??c;return e.jsxs(H,{children:[e.jsxs(F,{title:t("settings.appearance.group"),children:[e.jsx(z,{title:t("settings.appearance.theme"),description:t("settings.appearance.themeHint"),control:e.jsx(ze,{label:t("settings.appearance.theme"),value:s,onChange:a,options:[{value:"system",label:t("settings.appearance.system"),icon:e.jsx(st,{size:15})},{value:"light",label:t("settings.appearance.light"),icon:e.jsx(Ze,{size:15})},{value:"dark",label:t("settings.appearance.dark"),icon:e.jsx(nt,{size:15})}]})}),e.jsx(z,{title:t("settings.appearance.language"),description:n==="system"?`${t("settings.appearance.languageHint")} · ${o}`:t("settings.appearance.languageHint"),control:e.jsx(xe,{label:t("settings.appearance.language"),value:n,onChange:r,options:[{value:"system",label:t("settings.appearance.languageSystem")},...fe.map(x=>({value:x.code,label:x.name}))]})})]}),e.jsx(Ht,{}),e.jsx(Gt,{}),T?.update?.onState?e.jsx(Jt,{}):e.jsx(Vt,{})]})}function Ht(){const t=M(),s=T?.acceleration,[a,n]=m.useState(null);if(m.useEffect(()=>{if(s)return s.get().then(n).catch(()=>{}),s.onChange(n)},[s]),!s)return null;const r=!!a&&a.on!==a.atStart;return e.jsx(F,{title:t("settings.performance.group"),children:e.jsx(z,{title:t("settings.performance.gpu"),badge:r?e.jsx("span",{className:"rounded-full bg-[var(--fill-tsp)] px-2 py-0.5 text-[11.5px] text-[var(--text-muted)]",children:t("settings.performance.gpuWaiting")}):null,description:t(r?"settings.performance.gpuRestartHint":"settings.performance.gpuHint"),control:e.jsxs(e.Fragment,{children:[r?e.jsx(k,{onClick:()=>s.restart(),children:t("settings.performance.restart")}):null,a?e.jsx(Z,{checked:a.on,label:t("settings.performance.gpu"),onChange:c=>{n({...a,on:c}),s.set(c).then(n).catch(()=>{})}}):null]})})})}function Gt(){const t=M(),[s,a]=m.useState(null);if(m.useEffect(()=>{ae.prefs().then(a).catch(()=>{})},[]),!s)return null;const n=r=>{a({...s,proxies:{...s.proxies,...r}}),ae.setPrefs({proxies:r}).then(a).catch(()=>{})};return e.jsxs(F,{title:t("settings.playback.group"),children:[e.jsx(z,{title:t("settings.playback.proxies"),description:t("settings.playback.proxiesHint"),control:e.jsx(Z,{checked:s.proxies.on,onChange:r=>n({on:r}),label:t("settings.playback.proxies")})}),s.proxies.on?e.jsx(z,{title:t("settings.playback.proxySize"),description:t("settings.playback.proxySizeHint"),control:e.jsx(ze,{label:t("settings.playback.proxySize"),value:String(s.proxies.height),onChange:r=>n({height:Number(r)}),options:[{value:"540",label:"540p"},{value:"720",label:"720p"},{value:"1080",label:"1080p"}]})}):null]})}function Vt(){const t=M(),[s,a]=m.useState(null),[n,r]=m.useState("idle");m.useEffect(()=>{ae.version().then(a).catch(()=>{})},[]);const c=!!T,o=()=>{r("checking");const h=s?.checkedAt??null;ae.version(!0).then(u=>{a(u),r(u.checkedAt!=null&&u.checkedAt!==h?"idle":"failed")}).catch(()=>r("failed"))},x=c?t("settings.about.inApp"):s?.source?t("settings.about.source"):s&&!s.checking?t("settings.about.off"):n==="checking"?t("settings.about.checking"):n==="failed"?t("settings.about.failed"):s?.newer?t("settings.about.newer").replace("{version}",s.latest??""):s?.latest?t("settings.about.upToDate"):t("settings.about.never");return e.jsxs(F,{title:t("settings.about.group"),children:[e.jsx(z,{title:s?`AiCut ${s.version}`:"AiCut",description:x,control:c||!s?.checking?null:e.jsx(k,{disabled:n==="checking",onClick:o,children:t("settings.about.check")}),children:Me(s?.version)?e.jsx(Oe,{version:s.version}):null}),!c&&!s?.source&&s?.newer?e.jsx(z,{title:t("settings.about.howTitle"),description:t("settings.about.how"),control:e.jsx("code",{className:"select-all rounded-md bg-[var(--surface-2)] px-2 py-1 font-mono text-[12px] text-[var(--text)]",children:"npx -y @autoaiai/aicut@latest open"})}):null]})}function Oe({version:t}){const s=M();return e.jsx("button",{type:"button",onClick:()=>$e([t]),className:"mb-2 text-[13.5px] text-[var(--text-muted)] underline underline-offset-2 transition hover:text-[var(--text)]",children:s("settings.about.whatsNew")})}const Yt=10*6e4;function Jt(){const t=M(),s=Q(),a=T?.update,[n,r]=m.useState(null),[c,o]=m.useState(null);m.useEffect(()=>a?.onState?.(r),[a]);const x=m.useRef(!1);m.useEffect(()=>{if(!n||x.current)return;x.current=!0,(n.checkedAt==null||Date.now()-n.checkedAt>Yt)&&["idle","current","error"].includes(n.status)&&a?.check?.()},[n,a]);const h=()=>{o(null),a?.check?.()},u=()=>{o(null),a?.restart().then(f=>{!f.ok&&f.error&&o(f.error)})},b=f=>{const j=Math.round((Date.now()-f)/6e4),p=new Intl.RelativeTimeFormat(s,{numeric:"auto"});return j<60?p.format(-j,"minute"):j<2880?p.format(-Math.round(j/60),"hour"):p.format(-Math.round(j/1440),"day")},l=n,d=l?.availableVersion??"",g=c??(l?.status==="ready"?l.error:null),y=g==="agent-busy"?t("update.agentBusy"):g==="exporting"?t("update.exporting"):g==="install-failed"?t("update.installFailed").replace("{version}",d):null,C=l?.error==="offline"?t("settings.about.appOffline"):l?.error==="unavailable"?t("settings.about.appUnavailable"):t("settings.about.appFailed"),$=f=>e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(P,{size:13,className:"animate-spin","aria-hidden":!0}),f]}),E=l?l.status==="off"?t("settings.about.appOff"):l.status==="idle"||l.status==="checking"?$(t("settings.about.checking")):l.status==="current"?`${t("settings.about.upToDate")}${l.checkedAt?` ${t("settings.about.appChecked").replace("{time}",b(l.checkedAt))}`:""}`:l.status==="available"||l.status==="downloading"?$(`${t("settings.about.appDownloading").replace("{version}",d)}${l.status==="downloading"?` ${Math.round(l.progress)}%`:""}`):l.status==="staging"?$(t("settings.about.appStaging").replace("{version}",d)):l.status==="ready"?y??t("update.ready").replace("{version}",d):l.status==="installing"?$(t("update.installing")):C:null,D=l?l.status==="current"?e.jsx(k,{onClick:h,children:t("settings.about.check")}):l.status==="error"?e.jsx(k,{onClick:h,children:t("settings.about.appRetry")}):l.status==="ready"?e.jsx(k,{variant:"primary",onClick:u,children:t("update.restart")}):null:null;return e.jsx(F,{title:t("settings.about.group"),children:e.jsxs(z,{title:`AiCut ${l?.version??""}`.trim(),badge:l?.channel==="beta"?e.jsx("span",{className:"rounded-full bg-[var(--fill-tsp)] px-2 py-0.5 text-[11.5px] text-[var(--text-muted)]",children:"beta"}):null,description:E,control:D,children:[Me(l?.version)?e.jsx(Oe,{version:l.version}):null,l?.status==="downloading"?e.jsx("div",{className:"h-1 overflow-hidden rounded-full bg-[var(--fill-tsp)]",role:"progressbar","aria-valuenow":Math.round(l.progress),"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:"h-full rounded-full bg-[var(--text)] transition-[width]",style:{width:`${Math.max(2,l.progress)}%`}})}):null]})})}function Zt(){const t=M(),s=T?.developer,[a,n]=m.useState(null);if(m.useEffect(()=>{if(s)return s.get().then(n),s.onChange(n)},[s]),!s)return null;const r=c=>{n(o=>o&&{...o,...c}),s.set(c)};return e.jsxs(H,{note:t("settings.developer.intro"),children:[e.jsxs(F,{title:t("settings.developer.group"),footnote:t("settings.developer.where"),children:[e.jsx(z,{title:t("settings.developer.changes"),description:t("settings.developer.changesHint"),control:a?e.jsx(Z,{checked:a.changes,label:t("settings.developer.changes"),onChange:c=>r({changes:c})}):null}),e.jsx(z,{title:t("settings.developer.logs"),description:t("settings.developer.logsHint"),control:a?e.jsx(Z,{checked:a.logs,label:t("settings.developer.logs"),onChange:c=>r({logs:c})}):null})]}),oe()?e.jsx(F,{title:t("settings.developer.releaseGroup"),children:e.jsx(z,{title:t("settings.developer.previewWhatsNew"),description:t("settings.developer.previewWhatsNewHint").replace("{version}",oe()),control:e.jsx(k,{onClick:()=>$e([oe()]),children:t("settings.developer.preview")})})}):null]})}function Qt(){const t=M(),s=Qe(t,Xe());return e.jsx(H,{note:t("settings.shortcuts.hint"),children:s.map(a=>e.jsx(F,{title:a.title,children:a.items.map(n=>e.jsxs("div",{className:"flex min-h-[52px] items-center justify-between gap-6 py-2.5",children:[e.jsx("span",{className:"text-[15px] text-[var(--text)]",children:n.label}),e.jsx("span",{className:"flex max-w-[55%] shrink-0 flex-wrap items-center justify-end gap-1",children:n.keys.map((r,c)=>e.jsxs(m.Fragment,{children:[c>0?e.jsx("span",{className:"px-0.5 text-[13px] text-[var(--text-faint)]",children:"/"}):null,e.jsx("kbd",{className:"inline-flex h-7 min-w-7 items-center justify-center rounded-[6px] border border-[var(--border)] px-1.5 font-sans text-[13px] text-[var(--text-dim)]",children:r})]},r))})]},n.label))},a.title))})}export{es as SettingsModal};