agentstudio 0.1.18 → 0.1.21

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 (664) hide show
  1. package/README.md +26 -505
  2. package/bin/agentstudio.js +305 -0
  3. package/bin/agentstudio.js.map +1 -0
  4. package/bin/serviceManager.d.ts +16 -0
  5. package/bin/serviceManager.d.ts.map +1 -0
  6. package/bin/serviceManager.js +434 -0
  7. package/bin/serviceManager.js.map +1 -0
  8. package/config/index.d.ts +74 -0
  9. package/config/index.d.ts.map +1 -0
  10. package/config/index.js +166 -0
  11. package/config/index.js.map +1 -0
  12. package/config/paths.d.ts +81 -0
  13. package/config/paths.d.ts.map +1 -0
  14. package/config/paths.js +98 -0
  15. package/config/paths.js.map +1 -0
  16. package/index.d.ts +4 -0
  17. package/index.d.ts.map +1 -0
  18. package/index.js +369 -0
  19. package/index.js.map +1 -0
  20. package/jobs/taskTimeoutMonitor.d.ts +25 -0
  21. package/jobs/taskTimeoutMonitor.d.ts.map +1 -0
  22. package/jobs/taskTimeoutMonitor.js +94 -0
  23. package/jobs/taskTimeoutMonitor.js.map +1 -0
  24. package/middleware/a2aAuth.d.ts +38 -0
  25. package/middleware/a2aAuth.d.ts.map +1 -0
  26. package/middleware/a2aAuth.js +134 -0
  27. package/middleware/a2aAuth.js.map +1 -0
  28. package/{backend/dist/middleware → middleware}/auth.d.ts +3 -1
  29. package/middleware/auth.d.ts.map +1 -0
  30. package/middleware/auth.js +35 -0
  31. package/middleware/auth.js.map +1 -0
  32. package/middleware/httpsOnly.d.ts +38 -0
  33. package/middleware/httpsOnly.d.ts.map +1 -0
  34. package/middleware/httpsOnly.js +105 -0
  35. package/middleware/httpsOnly.js.map +1 -0
  36. package/middleware/rateLimiting.d.ts +37 -0
  37. package/middleware/rateLimiting.d.ts.map +1 -0
  38. package/middleware/rateLimiting.js +118 -0
  39. package/middleware/rateLimiting.js.map +1 -0
  40. package/package.json +43 -38
  41. package/public/assets/AgentsPage-Nvg2xu6K.js +10 -0
  42. package/public/assets/Button-Co56C389.js +1 -0
  43. package/public/assets/ChatPage-D6sol0ad.js +442 -0
  44. package/public/assets/CommandForm-Bk7F_HU8.js +7 -0
  45. package/public/assets/CommandsPage-DZHyOdKd.js +1 -0
  46. package/public/assets/DashboardPage-29qC7Ev1.js +15 -0
  47. package/public/assets/FileBrowser-BYweUPH4.js +6 -0
  48. package/public/assets/FileExplorer-DNYj6Tsx.js +1 -0
  49. package/public/assets/GeneralSettingsPage-D9Xa7Nd8.js +1 -0
  50. package/public/assets/LandingPage-CjnT-cvO.js +1 -0
  51. package/public/assets/LoginPage-DcaGNCXH.js +16 -0
  52. package/public/assets/McpAdminSettingsPage-DgR3E2Bd.js +7 -0
  53. package/public/assets/McpPage-CtWf1CoL.js +40 -0
  54. package/public/assets/MemorySettingsPage-JTry4Ccp.js +1 -0
  55. package/public/assets/PluginsPage-D-BHjQ3P.js +1 -0
  56. package/public/assets/ProjectSelector-DSXOjMQC.js +1 -0
  57. package/public/assets/ProjectsPage-lLUk4-Xa.js +21 -0
  58. package/public/assets/ScheduledTasksPage-5hPbd9Vs.js +1 -0
  59. package/public/assets/SettingsLayout-DGJspXLp.js +1 -0
  60. package/public/assets/SkillsPage-DBw0m7D2.js +18 -0
  61. package/{backend/dist/frontend/assets/SubagentForm-DXtTTIKg.js → public/assets/SubagentForm-BdUK1U4y.js} +2 -2
  62. package/public/assets/SubagentsPage-Dnq70IFd.js +1 -0
  63. package/{backend/dist/frontend/assets/ToastTestPage-DT4wuN5C.js → public/assets/ToastTestPage-BfJQRFIm.js} +1 -1
  64. package/public/assets/ToolsList-Dl5F2fWk.js +1 -0
  65. package/public/assets/UnifiedToolSelector-CNbPsiuq.js +1 -0
  66. package/public/assets/VersionSettingsPage-BfoCcham.js +5 -0
  67. package/public/assets/_basePickBy-7C_e0Xv1.js +1 -0
  68. package/public/assets/_baseUniq-eGJNLBzx.js +1 -0
  69. package/public/assets/agents-ChrA1R0y.js +1 -0
  70. package/public/assets/arc-CuA752eE.js +1 -0
  71. package/public/assets/architectureDiagram-VXUJARFQ-BnPYh1OW.js +36 -0
  72. package/public/assets/blockDiagram-VD42YOAC-72nsMt_i.js +122 -0
  73. package/public/assets/c4Diagram-YG6GDRKO-BNJSAXcg.js +10 -0
  74. package/public/assets/channel-CIunGC5m.js +1 -0
  75. package/public/assets/chunk-4BX2VUAB-RPxkCWhH.js +1 -0
  76. package/public/assets/chunk-55IACEB6-3ePDt0kp.js +1 -0
  77. package/public/assets/chunk-B4BG7PRW-CBg_BBfl.js +165 -0
  78. package/public/assets/chunk-DI55MBZ5-DIh69TUJ.js +220 -0
  79. package/public/assets/chunk-FMBD7UC4-BbjwhyTe.js +15 -0
  80. package/public/assets/chunk-QN33PNHL-BpH-o_YR.js +1 -0
  81. package/public/assets/chunk-QZHKN3VN-DYB7rh5Q.js +1 -0
  82. package/public/assets/chunk-TZMSLE5B-DPCYEVb3.js +1 -0
  83. package/public/assets/classDiagram-2ON5EDUG-aUQHFsTA.js +1 -0
  84. package/public/assets/classDiagram-v2-WZHVMYZB-aUQHFsTA.js +1 -0
  85. package/public/assets/clone-Ckf7tA1V.js +1 -0
  86. package/public/assets/cose-bilkent-S5V4N54A-CnpfmL-Y.js +1 -0
  87. package/public/assets/cytoscape.esm-DtBltrT8.js +331 -0
  88. package/public/assets/dagre-6UL2VRFP-DR9x77Xf.js +4 -0
  89. package/{backend/dist/frontend/assets/data-structures-DLJedtzx.js → public/assets/data-structures-C0h9Oap1.js} +1 -1
  90. package/public/assets/defaultLocale-C4B-KCzX.js +1 -0
  91. package/public/assets/diagram-PSM6KHXK-SONPsQNx.js +24 -0
  92. package/public/assets/diagram-QEK2KX5R-BKYFSfC1.js +43 -0
  93. package/public/assets/diagram-S2PKOQOG-CkM0APZj.js +24 -0
  94. package/public/assets/erDiagram-Q2GNP2WA-BX1DpOGx.js +60 -0
  95. package/public/assets/flowDiagram-NV44I4VS-HAAlzNbq.js +162 -0
  96. package/public/assets/ganttDiagram-LVOFAZNH-BqzWexqa.js +267 -0
  97. package/public/assets/gitGraphDiagram-NY62KEGX-CIPmSp43.js +65 -0
  98. package/public/assets/graph-m515btDj.js +1 -0
  99. package/public/assets/index-Bn3v3S9-.js +293 -0
  100. package/public/assets/index-DWieeYj4.css +1 -0
  101. package/public/assets/infoDiagram-F6ZHWCRC-Pn4yNWrF.js +2 -0
  102. package/public/assets/init-Gi6I4Gst.js +1 -0
  103. package/public/assets/journeyDiagram-XKPGCS4Q-BfzTomS0.js +139 -0
  104. package/public/assets/kanban-definition-3W4ZIXB7-Cgju7b-L.js +89 -0
  105. package/public/assets/katex-qrhCpa0F.js +261 -0
  106. package/public/assets/layout-BKQfQSxJ.js +1 -0
  107. package/public/assets/linear-DigtLz3B.js +1 -0
  108. package/public/assets/mindmap-definition-VGOIOE7T-qopraVFy.js +68 -0
  109. package/public/assets/monaco-editor-DHKm5-VF.js +19 -0
  110. package/public/assets/ordinal-Cboi1Yqb.js +1 -0
  111. package/public/assets/pieDiagram-ADFJNKIX-BcoaAI-L.js +30 -0
  112. package/public/assets/quadrantDiagram-AYHSOK5B-D-DwcoSd.js +7 -0
  113. package/public/assets/requirementDiagram-UZGBJVZJ-DbQCpx77.js +64 -0
  114. package/public/assets/sankeyDiagram-TZEHDZUN-BVk8387S.js +10 -0
  115. package/public/assets/sequenceDiagram-WL72ISMW-BdzICjxO.js +145 -0
  116. package/public/assets/stateDiagram-FKZM4ZOC-CYY-uUvJ.js +1 -0
  117. package/public/assets/stateDiagram-v2-4FDKWEC3-Dh2Kvomq.js +1 -0
  118. package/{backend/dist/frontend/assets/syntax-highlighting-YWvMU4Hm.js → public/assets/syntax-highlighting-CnREyncB.js} +5 -5
  119. package/public/assets/tabManager-B2LQO_Ll.js +30 -0
  120. package/{backend/dist/frontend/assets/table-D6q1rytw.js → public/assets/table-D0L2RL5i.js} +1 -1
  121. package/public/assets/timeline-definition-IT6M3QCI-BAvjPYvX.js +61 -0
  122. package/public/assets/tools-IcPNZlPj.js +1 -0
  123. package/public/assets/treemap-KMMF4GRG-DtkpVA56.js +128 -0
  124. package/{backend/dist/frontend/assets/ui-components-Cw21Epuw.js → public/assets/ui-components-D1St49qC.js} +231 -96
  125. package/public/assets/useAgents-BnDTkOG8.js +2 -0
  126. package/public/assets/useClaudeVersions-CD59tFWM.js +1 -0
  127. package/public/assets/useCommands-mvMu3mMD.js +1 -0
  128. package/public/assets/useProjects-YXOjaOwL.js +1 -0
  129. package/public/assets/xychartDiagram-PRI3JC2R-ByBTDWE2.js +7 -0
  130. package/{backend/dist/frontend → public}/index.html +8 -8
  131. package/routes/__tests__/a2a.integration.test.d.ts +11 -0
  132. package/routes/__tests__/a2a.integration.test.d.ts.map +1 -0
  133. package/routes/__tests__/a2a.integration.test.js +314 -0
  134. package/routes/__tests__/a2a.integration.test.js.map +1 -0
  135. package/routes/__tests__/a2a.test.d.ts +6 -0
  136. package/routes/__tests__/a2a.test.d.ts.map +1 -0
  137. package/routes/__tests__/a2a.test.js +622 -0
  138. package/routes/__tests__/a2a.test.js.map +1 -0
  139. package/routes/__tests__/agents.test.d.ts +6 -0
  140. package/routes/__tests__/agents.test.d.ts.map +1 -0
  141. package/routes/__tests__/agents.test.js +315 -0
  142. package/routes/__tests__/agents.test.js.map +1 -0
  143. package/routes/__tests__/sessions.test.d.ts +7 -0
  144. package/routes/__tests__/sessions.test.d.ts.map +1 -0
  145. package/routes/__tests__/sessions.test.js +330 -0
  146. package/routes/__tests__/sessions.test.js.map +1 -0
  147. package/routes/a2a.d.ts +18 -0
  148. package/routes/a2a.d.ts.map +1 -0
  149. package/routes/a2a.js +649 -0
  150. package/routes/a2a.js.map +1 -0
  151. package/routes/a2a.streaming.test.d.ts +2 -0
  152. package/routes/a2a.streaming.test.d.ts.map +1 -0
  153. package/routes/a2a.streaming.test.js +167 -0
  154. package/routes/a2a.streaming.test.js.map +1 -0
  155. package/routes/a2aManagement.d.ts +21 -0
  156. package/routes/a2aManagement.d.ts.map +1 -0
  157. package/routes/a2aManagement.js +466 -0
  158. package/routes/a2aManagement.js.map +1 -0
  159. package/{backend/dist/routes → routes}/agents.d.ts.map +1 -1
  160. package/routes/agents.js +997 -0
  161. package/routes/agents.js.map +1 -0
  162. package/{backend/dist/routes → routes}/auth.d.ts.map +1 -1
  163. package/routes/auth.js +135 -0
  164. package/routes/auth.js.map +1 -0
  165. package/{backend/dist/routes → routes}/commands.d.ts.map +1 -1
  166. package/{backend/dist/routes → routes}/commands.js +115 -31
  167. package/routes/commands.js.map +1 -0
  168. package/routes/config.d.ts +4 -0
  169. package/routes/config.d.ts.map +1 -0
  170. package/routes/config.js +211 -0
  171. package/routes/config.js.map +1 -0
  172. package/{backend/dist/routes → routes}/files.d.ts.map +1 -1
  173. package/{backend/dist/routes → routes}/files.js +103 -43
  174. package/routes/files.js.map +1 -0
  175. package/routes/mcp.d.ts +27 -0
  176. package/routes/mcp.d.ts.map +1 -0
  177. package/{backend/dist/routes → routes}/mcp.js +195 -105
  178. package/routes/mcp.js.map +1 -0
  179. package/routes/mcpAdmin.d.ts +16 -0
  180. package/routes/mcpAdmin.d.ts.map +1 -0
  181. package/routes/mcpAdmin.js +308 -0
  182. package/routes/mcpAdmin.js.map +1 -0
  183. package/routes/mcpAdminManagement.d.ts +17 -0
  184. package/routes/mcpAdminManagement.d.ts.map +1 -0
  185. package/routes/mcpAdminManagement.js +345 -0
  186. package/routes/mcpAdminManagement.js.map +1 -0
  187. package/routes/media.d.ts.map +1 -0
  188. package/{backend/dist/routes → routes}/media.js +52 -42
  189. package/routes/media.js.map +1 -0
  190. package/routes/mediaAuth.d.ts +8 -0
  191. package/routes/mediaAuth.d.ts.map +1 -0
  192. package/routes/mediaAuth.js +136 -0
  193. package/routes/mediaAuth.js.map +1 -0
  194. package/routes/plugins.d.ts +4 -0
  195. package/routes/plugins.d.ts.map +1 -0
  196. package/routes/plugins.js +339 -0
  197. package/routes/plugins.js.map +1 -0
  198. package/{backend/dist/routes → routes}/projects.d.ts.map +1 -1
  199. package/routes/projects.js +884 -0
  200. package/routes/projects.js.map +1 -0
  201. package/routes/scheduledTasks.d.ts +9 -0
  202. package/routes/scheduledTasks.d.ts.map +1 -0
  203. package/routes/scheduledTasks.js +320 -0
  204. package/routes/scheduledTasks.js.map +1 -0
  205. package/{backend/dist/routes → routes}/sessions.d.ts.map +1 -1
  206. package/{backend/dist/routes → routes}/sessions.js +258 -39
  207. package/routes/sessions.js.map +1 -0
  208. package/{backend/dist/routes → routes}/settings.d.ts.map +1 -1
  209. package/{backend/dist/routes → routes}/settings.js +82 -241
  210. package/routes/settings.js.map +1 -0
  211. package/{backend/dist/routes/mcp.d.ts → routes/skills.d.ts} +1 -1
  212. package/routes/skills.d.ts.map +1 -0
  213. package/routes/skills.js +272 -0
  214. package/routes/skills.js.map +1 -0
  215. package/routes/slack.d.ts +10 -0
  216. package/routes/slack.d.ts.map +1 -0
  217. package/routes/slack.js +189 -0
  218. package/routes/slack.js.map +1 -0
  219. package/{backend/dist/routes → routes}/slides.d.ts.map +1 -1
  220. package/{backend/dist/routes → routes}/slides.js +29 -27
  221. package/routes/slides.js.map +1 -0
  222. package/{backend/dist/routes → routes}/subagents.js +27 -22
  223. package/routes/subagents.js.map +1 -0
  224. package/schemas/a2a.d.ts +858 -0
  225. package/schemas/a2a.d.ts.map +1 -0
  226. package/schemas/a2a.js +300 -0
  227. package/schemas/a2a.js.map +1 -0
  228. package/scripts/postinstall.js +10 -0
  229. package/services/__tests__/pluginInstaller.test.d.ts +5 -0
  230. package/services/__tests__/pluginInstaller.test.d.ts.map +1 -0
  231. package/services/__tests__/pluginInstaller.test.js +290 -0
  232. package/services/__tests__/pluginInstaller.test.js.map +1 -0
  233. package/services/__tests__/pluginParser.test.d.ts +5 -0
  234. package/services/__tests__/pluginParser.test.d.ts.map +1 -0
  235. package/services/__tests__/pluginParser.test.js +272 -0
  236. package/services/__tests__/pluginParser.test.js.map +1 -0
  237. package/services/__tests__/pluginPaths.test.d.ts +5 -0
  238. package/services/__tests__/pluginPaths.test.d.ts.map +1 -0
  239. package/services/__tests__/pluginPaths.test.js +221 -0
  240. package/services/__tests__/pluginPaths.test.js.map +1 -0
  241. package/services/__tests__/pluginScanner.test.d.ts +5 -0
  242. package/services/__tests__/pluginScanner.test.d.ts.map +1 -0
  243. package/services/__tests__/pluginScanner.test.js +272 -0
  244. package/services/__tests__/pluginScanner.test.js.map +1 -0
  245. package/services/__tests__/pluginSymlink.test.d.ts +5 -0
  246. package/services/__tests__/pluginSymlink.test.d.ts.map +1 -0
  247. package/services/__tests__/pluginSymlink.test.js +318 -0
  248. package/services/__tests__/pluginSymlink.test.js.map +1 -0
  249. package/services/__tests__/slackAIService.test.d.ts +5 -0
  250. package/services/__tests__/slackAIService.test.d.ts.map +1 -0
  251. package/services/__tests__/slackAIService.test.js +477 -0
  252. package/services/__tests__/slackAIService.test.js.map +1 -0
  253. package/services/__tests__/slackThreadMapper.test.d.ts +5 -0
  254. package/services/__tests__/slackThreadMapper.test.d.ts.map +1 -0
  255. package/services/__tests__/slackThreadMapper.test.js +194 -0
  256. package/services/__tests__/slackThreadMapper.test.js.map +1 -0
  257. package/services/a2a/__tests__/a2aClientTool.integration.test.d.ts +6 -0
  258. package/services/a2a/__tests__/a2aClientTool.integration.test.d.ts.map +1 -0
  259. package/services/a2a/__tests__/a2aClientTool.integration.test.js +264 -0
  260. package/services/a2a/__tests__/a2aClientTool.integration.test.js.map +1 -0
  261. package/services/a2a/__tests__/a2aClientTool.test.d.ts +6 -0
  262. package/services/a2a/__tests__/a2aClientTool.test.d.ts.map +1 -0
  263. package/services/a2a/__tests__/a2aClientTool.test.js +418 -0
  264. package/services/a2a/__tests__/a2aClientTool.test.js.map +1 -0
  265. package/services/a2a/__tests__/a2aConfigService.test.d.ts +6 -0
  266. package/services/a2a/__tests__/a2aConfigService.test.d.ts.map +1 -0
  267. package/services/a2a/__tests__/a2aConfigService.test.js +431 -0
  268. package/services/a2a/__tests__/a2aConfigService.test.js.map +1 -0
  269. package/services/a2a/__tests__/a2aConfigServicePath.test.d.ts +2 -0
  270. package/services/a2a/__tests__/a2aConfigServicePath.test.d.ts.map +1 -0
  271. package/services/a2a/__tests__/a2aConfigServicePath.test.js +49 -0
  272. package/services/a2a/__tests__/a2aConfigServicePath.test.js.map +1 -0
  273. package/services/a2a/__tests__/a2aSdkMcp.test.d.ts +10 -0
  274. package/services/a2a/__tests__/a2aSdkMcp.test.d.ts.map +1 -0
  275. package/services/a2a/__tests__/a2aSdkMcp.test.js +239 -0
  276. package/services/a2a/__tests__/a2aSdkMcp.test.js.map +1 -0
  277. package/services/a2a/__tests__/agentCardService.test.d.ts +6 -0
  278. package/services/a2a/__tests__/agentCardService.test.d.ts.map +1 -0
  279. package/services/a2a/__tests__/agentCardService.test.js +292 -0
  280. package/services/a2a/__tests__/agentCardService.test.js.map +1 -0
  281. package/services/a2a/__tests__/apiKeyService.test.d.ts +6 -0
  282. package/services/a2a/__tests__/apiKeyService.test.d.ts.map +1 -0
  283. package/services/a2a/__tests__/apiKeyService.test.js +284 -0
  284. package/services/a2a/__tests__/apiKeyService.test.js.map +1 -0
  285. package/services/a2a/__tests__/buildQueryOptionsIntegration.test.d.ts +2 -0
  286. package/services/a2a/__tests__/buildQueryOptionsIntegration.test.d.ts.map +1 -0
  287. package/services/a2a/__tests__/buildQueryOptionsIntegration.test.js +70 -0
  288. package/services/a2a/__tests__/buildQueryOptionsIntegration.test.js.map +1 -0
  289. package/services/a2a/__tests__/dynamic_config_verification.test.d.ts +2 -0
  290. package/services/a2a/__tests__/dynamic_config_verification.test.d.ts.map +1 -0
  291. package/services/a2a/__tests__/dynamic_config_verification.test.js +67 -0
  292. package/services/a2a/__tests__/dynamic_config_verification.test.js.map +1 -0
  293. package/services/a2a/__tests__/integrateA2AMcpServer.test.d.ts +2 -0
  294. package/services/a2a/__tests__/integrateA2AMcpServer.test.d.ts.map +1 -0
  295. package/services/a2a/__tests__/integrateA2AMcpServer.test.js +112 -0
  296. package/services/a2a/__tests__/integrateA2AMcpServer.test.js.map +1 -0
  297. package/services/a2a/__tests__/taskManager.integration.test.d.ts +7 -0
  298. package/services/a2a/__tests__/taskManager.integration.test.d.ts.map +1 -0
  299. package/services/a2a/__tests__/taskManager.integration.test.js +346 -0
  300. package/services/a2a/__tests__/taskManager.integration.test.js.map +1 -0
  301. package/services/a2a/__tests__/taskManager.test.d.ts +7 -0
  302. package/services/a2a/__tests__/taskManager.test.d.ts.map +1 -0
  303. package/services/a2a/__tests__/taskManager.test.js +423 -0
  304. package/services/a2a/__tests__/taskManager.test.js.map +1 -0
  305. package/services/a2a/a2aClientTool.d.ts +73 -0
  306. package/services/a2a/a2aClientTool.d.ts.map +1 -0
  307. package/services/a2a/a2aClientTool.js +572 -0
  308. package/services/a2a/a2aClientTool.js.map +1 -0
  309. package/services/a2a/a2aConfigService.d.ts +50 -0
  310. package/services/a2a/a2aConfigService.d.ts.map +1 -0
  311. package/services/a2a/a2aConfigService.js +186 -0
  312. package/services/a2a/a2aConfigService.js.map +1 -0
  313. package/services/a2a/a2aHistoryService.d.ts +32 -0
  314. package/services/a2a/a2aHistoryService.d.ts.map +1 -0
  315. package/services/a2a/a2aHistoryService.js +108 -0
  316. package/services/a2a/a2aHistoryService.js.map +1 -0
  317. package/services/a2a/a2aIntegration.d.ts +9 -0
  318. package/services/a2a/a2aIntegration.d.ts.map +1 -0
  319. package/services/a2a/a2aIntegration.js +41 -0
  320. package/services/a2a/a2aIntegration.js.map +1 -0
  321. package/services/a2a/a2aQueryService.d.ts +71 -0
  322. package/services/a2a/a2aQueryService.d.ts.map +1 -0
  323. package/services/a2a/a2aQueryService.js +166 -0
  324. package/services/a2a/a2aQueryService.js.map +1 -0
  325. package/services/a2a/a2aSdkMcp.d.ts +51 -0
  326. package/services/a2a/a2aSdkMcp.d.ts.map +1 -0
  327. package/services/a2a/a2aSdkMcp.js +185 -0
  328. package/services/a2a/a2aSdkMcp.js.map +1 -0
  329. package/services/a2a/a2aStreamEvents.d.ts +94 -0
  330. package/services/a2a/a2aStreamEvents.d.ts.map +1 -0
  331. package/services/a2a/a2aStreamEvents.js +92 -0
  332. package/services/a2a/a2aStreamEvents.js.map +1 -0
  333. package/services/a2a/agentCardService.d.ts +34 -0
  334. package/services/a2a/agentCardService.d.ts.map +1 -0
  335. package/services/a2a/agentCardService.js +228 -0
  336. package/services/a2a/agentCardService.js.map +1 -0
  337. package/services/a2a/agentMappingService.d.ts +53 -0
  338. package/services/a2a/agentMappingService.d.ts.map +1 -0
  339. package/services/a2a/agentMappingService.js +185 -0
  340. package/services/a2a/agentMappingService.js.map +1 -0
  341. package/services/a2a/apiKeyService.d.ts +101 -0
  342. package/services/a2a/apiKeyService.d.ts.map +1 -0
  343. package/services/a2a/apiKeyService.js +314 -0
  344. package/services/a2a/apiKeyService.js.map +1 -0
  345. package/services/a2a/taskCleanup.d.ts +30 -0
  346. package/services/a2a/taskCleanup.d.ts.map +1 -0
  347. package/services/a2a/taskCleanup.js +184 -0
  348. package/services/a2a/taskCleanup.js.map +1 -0
  349. package/services/a2a/taskManager.d.ts +86 -0
  350. package/services/a2a/taskManager.d.ts.map +1 -0
  351. package/services/a2a/taskManager.js +263 -0
  352. package/services/a2a/taskManager.js.map +1 -0
  353. package/services/agentStorage.d.ts +27 -0
  354. package/services/agentStorage.d.ts.map +1 -0
  355. package/services/agentStorage.js +487 -0
  356. package/services/agentStorage.js.map +1 -0
  357. package/services/askUserQuestion/askUserQuestionIntegration.d.ts +24 -0
  358. package/services/askUserQuestion/askUserQuestionIntegration.d.ts.map +1 -0
  359. package/services/askUserQuestion/askUserQuestionIntegration.js +52 -0
  360. package/services/askUserQuestion/askUserQuestionIntegration.js.map +1 -0
  361. package/services/askUserQuestion/askUserQuestionMcp.d.ts +103 -0
  362. package/services/askUserQuestion/askUserQuestionMcp.d.ts.map +1 -0
  363. package/services/askUserQuestion/askUserQuestionMcp.js +129 -0
  364. package/services/askUserQuestion/askUserQuestionMcp.js.map +1 -0
  365. package/services/askUserQuestion/index.d.ts +13 -0
  366. package/services/askUserQuestion/index.d.ts.map +1 -0
  367. package/services/askUserQuestion/index.js +35 -0
  368. package/services/askUserQuestion/index.js.map +1 -0
  369. package/services/askUserQuestion/init.d.ts +17 -0
  370. package/services/askUserQuestion/init.d.ts.map +1 -0
  371. package/services/askUserQuestion/init.js +47 -0
  372. package/services/askUserQuestion/init.js.map +1 -0
  373. package/services/askUserQuestion/notificationChannel.d.ts +97 -0
  374. package/services/askUserQuestion/notificationChannel.d.ts.map +1 -0
  375. package/services/askUserQuestion/notificationChannel.js +147 -0
  376. package/services/askUserQuestion/notificationChannel.js.map +1 -0
  377. package/services/askUserQuestion/slackNotificationChannel.d.ts +35 -0
  378. package/services/askUserQuestion/slackNotificationChannel.d.ts.map +1 -0
  379. package/services/askUserQuestion/slackNotificationChannel.js +129 -0
  380. package/services/askUserQuestion/slackNotificationChannel.js.map +1 -0
  381. package/services/askUserQuestion/sseNotificationChannel.d.ts +36 -0
  382. package/services/askUserQuestion/sseNotificationChannel.d.ts.map +1 -0
  383. package/services/askUserQuestion/sseNotificationChannel.js +88 -0
  384. package/services/askUserQuestion/sseNotificationChannel.js.map +1 -0
  385. package/services/askUserQuestion/userInputRegistry.d.ts +107 -0
  386. package/services/askUserQuestion/userInputRegistry.d.ts.map +1 -0
  387. package/services/askUserQuestion/userInputRegistry.js +253 -0
  388. package/services/askUserQuestion/userInputRegistry.js.map +1 -0
  389. package/{backend/dist/services → services}/claudeSession.d.ts +20 -5
  390. package/services/claudeSession.d.ts.map +1 -0
  391. package/{backend/dist/services → services}/claudeSession.js +123 -41
  392. package/services/claudeSession.js.map +1 -0
  393. package/services/claudeVersionStorage.d.ts +20 -0
  394. package/services/claudeVersionStorage.d.ts.map +1 -0
  395. package/services/claudeVersionStorage.js +331 -0
  396. package/services/claudeVersionStorage.js.map +1 -0
  397. package/services/mcpAdmin/__tests__/adminApiKeyService.test.d.ts +5 -0
  398. package/services/mcpAdmin/__tests__/adminApiKeyService.test.d.ts.map +1 -0
  399. package/services/mcpAdmin/__tests__/adminApiKeyService.test.js +289 -0
  400. package/services/mcpAdmin/__tests__/adminApiKeyService.test.js.map +1 -0
  401. package/services/mcpAdmin/__tests__/mcpAdminRoutes.test.d.ts +5 -0
  402. package/services/mcpAdmin/__tests__/mcpAdminRoutes.test.d.ts.map +1 -0
  403. package/services/mcpAdmin/__tests__/mcpAdminRoutes.test.js +345 -0
  404. package/services/mcpAdmin/__tests__/mcpAdminRoutes.test.js.map +1 -0
  405. package/services/mcpAdmin/__tests__/mcpAdminServer.test.d.ts +5 -0
  406. package/services/mcpAdmin/__tests__/mcpAdminServer.test.d.ts.map +1 -0
  407. package/services/mcpAdmin/__tests__/mcpAdminServer.test.js +453 -0
  408. package/services/mcpAdmin/__tests__/mcpAdminServer.test.js.map +1 -0
  409. package/services/mcpAdmin/__tests__/tools.test.d.ts +5 -0
  410. package/services/mcpAdmin/__tests__/tools.test.d.ts.map +1 -0
  411. package/services/mcpAdmin/__tests__/tools.test.js +371 -0
  412. package/services/mcpAdmin/__tests__/tools.test.js.map +1 -0
  413. package/services/mcpAdmin/adminApiKeyService.d.ts +61 -0
  414. package/services/mcpAdmin/adminApiKeyService.d.ts.map +1 -0
  415. package/services/mcpAdmin/adminApiKeyService.js +270 -0
  416. package/services/mcpAdmin/adminApiKeyService.js.map +1 -0
  417. package/services/mcpAdmin/index.d.ts +10 -0
  418. package/services/mcpAdmin/index.d.ts.map +1 -0
  419. package/services/mcpAdmin/index.js +43 -0
  420. package/services/mcpAdmin/index.js.map +1 -0
  421. package/services/mcpAdmin/mcpAdminServer.d.ts +76 -0
  422. package/services/mcpAdmin/mcpAdminServer.d.ts.map +1 -0
  423. package/services/mcpAdmin/mcpAdminServer.js +243 -0
  424. package/services/mcpAdmin/mcpAdminServer.js.map +1 -0
  425. package/services/mcpAdmin/tools/agentTools.d.ts +27 -0
  426. package/services/mcpAdmin/tools/agentTools.d.ts.map +1 -0
  427. package/services/mcpAdmin/tools/agentTools.js +359 -0
  428. package/services/mcpAdmin/tools/agentTools.js.map +1 -0
  429. package/services/mcpAdmin/tools/index.d.ts +15 -0
  430. package/services/mcpAdmin/tools/index.d.ts.map +1 -0
  431. package/services/mcpAdmin/tools/index.js +30 -0
  432. package/services/mcpAdmin/tools/index.js.map +1 -0
  433. package/services/mcpAdmin/tools/mcpServerTools.d.ts +27 -0
  434. package/services/mcpAdmin/tools/mcpServerTools.d.ts.map +1 -0
  435. package/services/mcpAdmin/tools/mcpServerTools.js +334 -0
  436. package/services/mcpAdmin/tools/mcpServerTools.js.map +1 -0
  437. package/services/mcpAdmin/tools/projectTools.d.ts +27 -0
  438. package/services/mcpAdmin/tools/projectTools.d.ts.map +1 -0
  439. package/services/mcpAdmin/tools/projectTools.js +353 -0
  440. package/services/mcpAdmin/tools/projectTools.js.map +1 -0
  441. package/services/mcpAdmin/tools/systemTools.d.ts +23 -0
  442. package/services/mcpAdmin/tools/systemTools.d.ts.map +1 -0
  443. package/services/mcpAdmin/tools/systemTools.js +241 -0
  444. package/services/mcpAdmin/tools/systemTools.js.map +1 -0
  445. package/services/mcpAdmin/types.d.ts +124 -0
  446. package/services/mcpAdmin/types.d.ts.map +1 -0
  447. package/services/mcpAdmin/types.js +18 -0
  448. package/services/mcpAdmin/types.js.map +1 -0
  449. package/{backend/dist/services → services}/messageQueue.d.ts.map +1 -1
  450. package/{backend/dist/services → services}/messageQueue.js +16 -3
  451. package/services/messageQueue.js.map +1 -0
  452. package/services/pluginInstaller.d.ts +58 -0
  453. package/services/pluginInstaller.d.ts.map +1 -0
  454. package/services/pluginInstaller.js +321 -0
  455. package/services/pluginInstaller.js.map +1 -0
  456. package/services/pluginParser.d.ts +45 -0
  457. package/services/pluginParser.d.ts.map +1 -0
  458. package/services/pluginParser.js +437 -0
  459. package/services/pluginParser.js.map +1 -0
  460. package/services/pluginPaths.d.ts +80 -0
  461. package/services/pluginPaths.d.ts.map +1 -0
  462. package/services/pluginPaths.js +274 -0
  463. package/services/pluginPaths.js.map +1 -0
  464. package/services/pluginScanner.d.ts +36 -0
  465. package/services/pluginScanner.d.ts.map +1 -0
  466. package/services/pluginScanner.js +251 -0
  467. package/services/pluginScanner.js.map +1 -0
  468. package/services/pluginSymlink.d.ts +54 -0
  469. package/services/pluginSymlink.d.ts.map +1 -0
  470. package/services/pluginSymlink.js +223 -0
  471. package/services/pluginSymlink.js.map +1 -0
  472. package/services/projectMetadataStorage.d.ts +114 -0
  473. package/services/projectMetadataStorage.d.ts.map +1 -0
  474. package/services/projectMetadataStorage.js +711 -0
  475. package/services/projectMetadataStorage.js.map +1 -0
  476. package/services/scheduledTaskStorage.d.ts +52 -0
  477. package/services/scheduledTaskStorage.d.ts.map +1 -0
  478. package/services/scheduledTaskStorage.js +285 -0
  479. package/services/scheduledTaskStorage.js.map +1 -0
  480. package/services/schedulerService.d.ts +81 -0
  481. package/services/schedulerService.d.ts.map +1 -0
  482. package/services/schedulerService.js +743 -0
  483. package/services/schedulerService.js.map +1 -0
  484. package/{backend/dist/services → services}/sessionManager.d.ts +6 -4
  485. package/services/sessionManager.d.ts.map +1 -0
  486. package/{backend/dist/services → services}/sessionManager.js +77 -16
  487. package/services/sessionManager.js.map +1 -0
  488. package/services/skillStorage.d.ts +60 -0
  489. package/services/skillStorage.d.ts.map +1 -0
  490. package/services/skillStorage.js +398 -0
  491. package/services/skillStorage.js.map +1 -0
  492. package/services/slackAIService.d.ts +81 -0
  493. package/services/slackAIService.d.ts.map +1 -0
  494. package/services/slackAIService.js +1091 -0
  495. package/services/slackAIService.js.map +1 -0
  496. package/services/slackClient.d.ts +46 -0
  497. package/services/slackClient.d.ts.map +1 -0
  498. package/services/slackClient.js +85 -0
  499. package/services/slackClient.js.map +1 -0
  500. package/services/slackSessionLock.d.ts +79 -0
  501. package/services/slackSessionLock.d.ts.map +1 -0
  502. package/services/slackSessionLock.js +353 -0
  503. package/services/slackSessionLock.js.map +1 -0
  504. package/services/slackThreadMapper.d.ts +57 -0
  505. package/services/slackThreadMapper.d.ts.map +1 -0
  506. package/services/slackThreadMapper.js +140 -0
  507. package/services/slackThreadMapper.js.map +1 -0
  508. package/types/a2a.d.ts +275 -0
  509. package/types/a2a.d.ts.map +1 -0
  510. package/types/a2a.js +23 -0
  511. package/types/a2a.js.map +1 -0
  512. package/types/agents.d.ts +95 -0
  513. package/types/agents.d.ts.map +1 -0
  514. package/types/agents.js +46 -0
  515. package/types/agents.js.map +1 -0
  516. package/types/claude-history.d.ts +62 -0
  517. package/types/claude-history.d.ts.map +1 -0
  518. package/types/claude-history.js +4 -0
  519. package/types/claude-history.js.map +1 -0
  520. package/types/claude-versions.d.ts +36 -0
  521. package/types/claude-versions.d.ts.map +1 -0
  522. package/types/claude-versions.js +3 -0
  523. package/types/claude-versions.js.map +1 -0
  524. package/types/commands.d.ts +50 -0
  525. package/types/commands.d.ts.map +1 -0
  526. package/types/commands.js +23 -0
  527. package/types/commands.js.map +1 -0
  528. package/types/plugins.d.ts +144 -0
  529. package/types/plugins.d.ts.map +1 -0
  530. package/types/plugins.js +8 -0
  531. package/types/plugins.js.map +1 -0
  532. package/types/projects.d.ts +42 -0
  533. package/types/projects.d.ts.map +1 -0
  534. package/types/projects.js +4 -0
  535. package/types/projects.js.map +1 -0
  536. package/types/scheduledTasks.d.ts +164 -0
  537. package/types/scheduledTasks.d.ts.map +1 -0
  538. package/types/scheduledTasks.js +17 -0
  539. package/types/scheduledTasks.js.map +1 -0
  540. package/types/skills.d.ts +91 -0
  541. package/types/skills.d.ts.map +1 -0
  542. package/types/skills.js +6 -0
  543. package/types/skills.js.map +1 -0
  544. package/types/slack.d.ts +97 -0
  545. package/types/slack.d.ts.map +1 -0
  546. package/types/slack.js +8 -0
  547. package/types/slack.js.map +1 -0
  548. package/types/streaming.d.ts +12 -0
  549. package/types/streaming.d.ts.map +1 -0
  550. package/types/streaming.js +8 -0
  551. package/types/streaming.js.map +1 -0
  552. package/types/subagents.d.ts +26 -0
  553. package/types/subagents.d.ts.map +1 -0
  554. package/types/subagents.js +3 -0
  555. package/types/subagents.js.map +1 -0
  556. package/utils/__tests__/claudeUtils.test.d.ts +5 -0
  557. package/utils/__tests__/claudeUtils.test.d.ts.map +1 -0
  558. package/utils/__tests__/claudeUtils.test.js +282 -0
  559. package/utils/__tests__/claudeUtils.test.js.map +1 -0
  560. package/utils/__tests__/sessionUtils.test.d.ts +5 -0
  561. package/utils/__tests__/sessionUtils.test.d.ts.map +1 -0
  562. package/utils/__tests__/sessionUtils.test.js +295 -0
  563. package/utils/__tests__/sessionUtils.test.js.map +1 -0
  564. package/utils/agentCardCache.d.ts +93 -0
  565. package/utils/agentCardCache.d.ts.map +1 -0
  566. package/utils/agentCardCache.js +212 -0
  567. package/utils/agentCardCache.js.map +1 -0
  568. package/utils/claudeUtils.d.ts +54 -0
  569. package/utils/claudeUtils.d.ts.map +1 -0
  570. package/utils/claudeUtils.js +387 -0
  571. package/utils/claudeUtils.js.map +1 -0
  572. package/utils/fileUtils.d.ts +2 -0
  573. package/utils/fileUtils.d.ts.map +1 -0
  574. package/utils/fileUtils.js +11 -0
  575. package/utils/fileUtils.js.map +1 -0
  576. package/utils/jwt.d.ts +30 -0
  577. package/utils/jwt.d.ts.map +1 -0
  578. package/utils/jwt.js +95 -0
  579. package/utils/jwt.js.map +1 -0
  580. package/utils/sessionUtils.d.ts +64 -0
  581. package/utils/sessionUtils.d.ts.map +1 -0
  582. package/utils/sessionUtils.js +266 -0
  583. package/utils/sessionUtils.js.map +1 -0
  584. package/README.zh-CN.md +0 -525
  585. package/backend/dist/bin/agentstudio.js +0 -120
  586. package/backend/dist/bin/agentstudio.js.map +0 -1
  587. package/backend/dist/frontend/assets/AgentsPage-Dqb_aqAA.js +0 -1
  588. package/backend/dist/frontend/assets/ChatPage-L8Paywyc.js +0 -91
  589. package/backend/dist/frontend/assets/CommandForm-DLl7EIMS.js +0 -7
  590. package/backend/dist/frontend/assets/CommandsPage-Bzavq0Ec.js +0 -1
  591. package/backend/dist/frontend/assets/DashboardPage-B3o4AYFT.js +0 -15
  592. package/backend/dist/frontend/assets/FileBrowser-DL3ayaqb.js +0 -1
  593. package/backend/dist/frontend/assets/GeneralSettingsPage-CBN_de-V.js +0 -1
  594. package/backend/dist/frontend/assets/LandingPage-Dl4ioKos.js +0 -1
  595. package/backend/dist/frontend/assets/LoginPage-4QqRdiSi.js +0 -12
  596. package/backend/dist/frontend/assets/McpPage-CY3tYiqj.js +0 -39
  597. package/backend/dist/frontend/assets/MemorySettingsPage-DGxrok5K.js +0 -1
  598. package/backend/dist/frontend/assets/ProjectSelector-hgmGYVFh.js +0 -1
  599. package/backend/dist/frontend/assets/ProjectsPage-D399IM0c.js +0 -14
  600. package/backend/dist/frontend/assets/SettingsLayout-CL_K-lzJ.js +0 -1
  601. package/backend/dist/frontend/assets/SubagentsPage-Chbhj8p2.js +0 -1
  602. package/backend/dist/frontend/assets/UnifiedToolSelector-CsM9qBvs.js +0 -1
  603. package/backend/dist/frontend/assets/VersionSettingsPage-74Q-LVgA.js +0 -5
  604. package/backend/dist/frontend/assets/agents-ClAzIJTw.js +0 -1
  605. package/backend/dist/frontend/assets/authFetch-BATQyPG5.js +0 -1
  606. package/backend/dist/frontend/assets/index-B9YHa7XT.css +0 -1
  607. package/backend/dist/frontend/assets/index-B_CTNvca.js +0 -268
  608. package/backend/dist/frontend/assets/monaco-editor-C7Z4sOhS.js +0 -19
  609. package/backend/dist/frontend/assets/tabManager-DV8urRBM.js +0 -30
  610. package/backend/dist/frontend/assets/tools-C4EPanYi.js +0 -1
  611. package/backend/dist/frontend/assets/useAgents-DwnOE1_k.js +0 -2
  612. package/backend/dist/frontend/assets/useClaudeVersions-CQdGnCqv.js +0 -1
  613. package/backend/dist/frontend/assets/useCommands-CCVaurbt.js +0 -1
  614. package/backend/dist/index.d.ts +0 -3
  615. package/backend/dist/index.d.ts.map +0 -1
  616. package/backend/dist/index.js +0 -157
  617. package/backend/dist/index.js.map +0 -1
  618. package/backend/dist/middleware/auth.d.ts.map +0 -1
  619. package/backend/dist/middleware/auth.js +0 -21
  620. package/backend/dist/middleware/auth.js.map +0 -1
  621. package/backend/dist/routes/agents.js +0 -803
  622. package/backend/dist/routes/agents.js.map +0 -1
  623. package/backend/dist/routes/auth.js +0 -60
  624. package/backend/dist/routes/auth.js.map +0 -1
  625. package/backend/dist/routes/commands.js.map +0 -1
  626. package/backend/dist/routes/files.js.map +0 -1
  627. package/backend/dist/routes/mcp.d.ts.map +0 -1
  628. package/backend/dist/routes/mcp.js.map +0 -1
  629. package/backend/dist/routes/media.d.ts.map +0 -1
  630. package/backend/dist/routes/media.js.map +0 -1
  631. package/backend/dist/routes/projects.js +0 -528
  632. package/backend/dist/routes/projects.js.map +0 -1
  633. package/backend/dist/routes/sessions.js.map +0 -1
  634. package/backend/dist/routes/settings.js.map +0 -1
  635. package/backend/dist/routes/slides.js.map +0 -1
  636. package/backend/dist/routes/subagents.js.map +0 -1
  637. package/backend/dist/services/claudeSession.d.ts.map +0 -1
  638. package/backend/dist/services/claudeSession.js.map +0 -1
  639. package/backend/dist/services/messageQueue.js.map +0 -1
  640. package/backend/dist/services/sessionManager.d.ts.map +0 -1
  641. package/backend/dist/services/sessionManager.js.map +0 -1
  642. package/backend/dist/utils/jwt.d.ts +0 -15
  643. package/backend/dist/utils/jwt.d.ts.map +0 -1
  644. package/backend/dist/utils/jwt.js +0 -28
  645. package/backend/dist/utils/jwt.js.map +0 -1
  646. /package/{backend/dist/bin → bin}/agentstudio.d.ts +0 -0
  647. /package/{backend/dist/bin → bin}/agentstudio.d.ts.map +0 -0
  648. /package/{backend/dist/frontend → public}/assets/ChatPage-BvQmXfcP.css +0 -0
  649. /package/{backend/dist/frontend → public}/assets/agents-DwCY2K8p.css +0 -0
  650. /package/{backend/dist/frontend → public}/assets/dateFormat-CXa8VnEC.js +0 -0
  651. /package/{backend/dist/frontend → public}/cc-studio.png +0 -0
  652. /package/{backend/dist/frontend → public}/vite.svg +0 -0
  653. /package/{backend/dist/routes → routes}/agents.d.ts +0 -0
  654. /package/{backend/dist/routes → routes}/auth.d.ts +0 -0
  655. /package/{backend/dist/routes → routes}/commands.d.ts +0 -0
  656. /package/{backend/dist/routes → routes}/files.d.ts +0 -0
  657. /package/{backend/dist/routes → routes}/media.d.ts +0 -0
  658. /package/{backend/dist/routes → routes}/projects.d.ts +0 -0
  659. /package/{backend/dist/routes → routes}/sessions.d.ts +0 -0
  660. /package/{backend/dist/routes → routes}/settings.d.ts +0 -0
  661. /package/{backend/dist/routes → routes}/slides.d.ts +0 -0
  662. /package/{backend/dist/routes → routes}/subagents.d.ts +0 -0
  663. /package/{backend/dist/routes → routes}/subagents.d.ts.map +0 -0
  664. /package/{backend/dist/services → services}/messageQueue.d.ts +0 -0
@@ -0,0 +1,4 @@
1
+ import{_ as w,aw as F,ax as Y,ay as _,az as H,l as r,c as V,aA as z,aB as U,ai as $,an as q,aj as P,ah as K,aC as Q,aD as W,aE as Z}from"./ChatPage-D6sol0ad.js";import{G as B}from"./graph-m515btDj.js";import{l as I}from"./layout-BKQfQSxJ.js";import{i as b}from"./_baseUniq-eGJNLBzx.js";import{c as L}from"./clone-Ckf7tA1V.js";import{m as A}from"./_basePickBy-7C_e0Xv1.js";import"./data-structures-C0h9Oap1.js";import"./monaco-editor-DHKm5-VF.js";import"./syntax-highlighting-CnREyncB.js";import"./agents-ChrA1R0y.js";import"./tools-IcPNZlPj.js";import"./ui-components-D1St49qC.js";import"./useAgents-BnDTkOG8.js";import"./tabManager-B2LQO_Ll.js";import"./index-Bn3v3S9-.js";import"./useCommands-mvMu3mMD.js";import"./useClaudeVersions-CD59tFWM.js";import"./FileExplorer-DNYj6Tsx.js";import"./UnifiedToolSelector-CNbPsiuq.js";import"./FileBrowser-BYweUPH4.js";import"./ProjectSelector-DSXOjMQC.js";function p(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return b(e.graph())||(t.value=L(e.graph())),t}function ee(e){return A(e.nodes(),function(t){var n=e.node(t),a=e.parent(t),s={v:t};return b(n)||(s.value=n),b(a)||(s.parent=a),s})}function ne(e){return A(e.edges(),function(t){var n=e.edge(t),a={v:t.v,w:t.w};return b(t.name)||(a.name=t.name),b(n)||(a.value=n),a})}var d=new Map,X=new Map,J=new Map,te=w(()=>{X.clear(),J.clear(),d.clear()},"clear"),D=w((e,t)=>{const n=X.get(t)||[];return r.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),ie=w((e,t)=>{const n=X.get(t)||[];return r.info("Descendants of ",t," is ",n),r.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||D(e.v,t)||D(e.w,t)||n.includes(e.w):(r.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=w((e,t,n,a)=>{r.warn("Copying children of ",e,"root",a,"data",t.node(e),a);const s=t.children(e)||[];e!==a&&s.push(e),r.warn("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)G(o,t,n,a);else{const l=t.node(o);r.info("cp ",o," to ",a," with parent ",e),n.setNode(o,l),a!==t.parent(o)&&(r.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==a&&o!==e?(r.debug("Setting parent",o,e),n.setParent(o,e)):(r.info("In copy ",e,"root",a,"data",t.node(e),a),r.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));const u=t.edges(o);r.debug("Copying Edges",u),u.forEach(c=>{r.info("Edge",c);const m=t.edge(c.v,c.w,c.name);r.info("Edge data",m,a);try{ie(c,a)?(r.info("Copying as ",c.v,c.w,m,c.name),n.setEdge(c.v,c.w,m,c.name),r.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):r.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",a," clusterId:",e)}catch(h){r.error(h)}})}r.debug("Removing node",o),t.removeNode(o)})},"copy"),R=w((e,t)=>{const n=t.children(e);let a=[...n];for(const s of n)J.set(s,e),a=[...a,...R(s,t)];return a},"extractDescendants"),re=w((e,t,n)=>{const a=e.edges().filter(c=>c.v===t||c.w===t),s=e.edges().filter(c=>c.v===n||c.w===n),o=a.map(c=>({v:c.v===t?n:c.v,w:c.w===t?t:c.w})),l=s.map(c=>({v:c.v,w:c.w}));return o.filter(c=>l.some(m=>c.v===m.v&&c.w===m.w))},"findCommonEdges"),C=w((e,t,n)=>{const a=t.children(e);if(r.trace("Searching children of id ",e,a),a.length<1)return e;let s;for(const o of a){const l=C(o,t,n),u=re(t,n,l);if(l)if(u.length>0)s=l;else return l}return s},"findNonClusterChild"),k=w(e=>!d.has(e)||!d.get(e).externalConnections?e:d.has(e)?d.get(e).id:e,"getAnchorId"),se=w((e,t)=>{if(!e||t>10){r.debug("Opting out, no graph ");return}else r.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(r.warn("Cluster identified",n," Replacement id in edges: ",C(n,e,n)),X.set(n,R(n,e)),d.set(n,{id:C(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),s=e.edges();a.length>0?(r.debug("Cluster identified",n,X),s.forEach(o=>{const l=D(o.v,n),u=D(o.w,n);l^u&&(r.warn("Edge: ",o," leaves cluster ",n),r.warn("Descendants of XXX ",n,": ",X.get(n)),d.get(n).externalConnections=!0)})):r.debug("Not a cluster ",n,X)});for(let n of d.keys()){const a=d.get(n).id,s=e.parent(a);s!==n&&d.has(s)&&!d.get(s).externalConnections&&(d.get(n).id=s)}e.edges().forEach(function(n){const a=e.edge(n);r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let s=n.v,o=n.w;if(r.warn("Fix XXX",d,"ids:",n.v,n.w,"Translating: ",d.get(n.v)," --- ",d.get(n.w)),d.get(n.v)||d.get(n.w)){if(r.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),s=k(n.v),o=k(n.w),e.removeEdge(n.v,n.w,n.name),s!==n.v){const l=e.parent(s);d.get(l).externalConnections=!0,a.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);d.get(l).externalConnections=!0,a.toCluster=n.w}r.warn("Fix Replacing with XXX",s,o,n.name),e.setEdge(s,o,a,n.name)}}),r.warn("Adjusted Graph",p(e)),T(e,0),r.trace(d)},"adjustClustersAndEdges"),T=w((e,t)=>{if(r.warn("extractor - ",t,p(e),e.children("D")),t>10){r.error("Bailing out");return}let n=e.nodes(),a=!1;for(const s of n){const o=e.children(s);a=a||o.length>0}if(!a){r.debug("Done, no node has children",e.nodes());return}r.debug("Nodes = ",n,t);for(const s of n)if(r.debug("Extracting node",s,d,d.has(s)&&!d.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!d.has(s))r.debug("Not a cluster",s,t);else if(!d.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){r.warn("Cluster without external connections, without a parent and with children",s,t);let l=e.graph().rankdir==="TB"?"LR":"TB";d.get(s)?.clusterData?.dir&&(l=d.get(s).clusterData.dir,r.warn("Fixing dir",d.get(s).clusterData.dir,l));const u=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});r.warn("Old graph before copy",p(e)),G(s,e,u,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:d.get(s).clusterData,label:d.get(s).label,graph:u}),r.warn("New graph after copy node: (",s,")",p(u)),r.debug("Old graph after copy",p(e))}else r.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!d.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),r.debug(d);n=e.nodes(),r.warn("New list of nodes",n);for(const s of n){const o=e.node(s);r.warn(" Now next level",s,o),o?.clusterNode&&T(o.graph,t+1)}},"extractor"),M=w((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(a=>{const s=e.children(a),o=M(e,s);n=[...n,...o]}),n},"sorter"),oe=w(e=>M(e,e.children()),"sortNodesByHierarchy"),j=w(async(e,t,n,a,s,o)=>{r.warn("Graph in recursive render:XAX",p(t),s);const l=t.graph().rankdir;r.trace("Dir in recursive render - dir:",l);const u=e.insert("g").attr("class","root");t.nodes()?r.info("Recursive render XXX",t.nodes()):r.info("No nodes found for",t),t.edges().length>0&&r.info("Recursive edges",t.edge(t.edges()[0]));const c=u.insert("g").attr("class","clusters"),m=u.insert("g").attr("class","edgePaths"),h=u.insert("g").attr("class","edgeLabels"),v=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(f){const i=t.node(f);if(s!==void 0){const g=JSON.parse(JSON.stringify(s.clusterData));r.trace(`Setting data for parent cluster XXX
2
+ Node.id = `,f,`
3
+ data=`,g.height,`
4
+ Parent cluster`,s.height),t.setNode(s.id,g),t.parent(f)||(r.trace("Setting parent",f,s.id),t.setParent(f,s.id,g))}if(r.info("(Insert) Node XXX"+f+": "+JSON.stringify(t.node(f))),i?.clusterNode){r.info("Cluster identified XBX",f,i.width,t.node(f));const{ranksep:g,nodesep:E}=t.graph();i.graph.setGraph({...i.graph.graph(),ranksep:g+25,nodesep:E});const N=await j(v,i.graph,n,a,t.node(f),o),x=N.elem;z(i,x),i.diff=N.diff||0,r.info("New compound node after recursive render XAX",f,"width",i.width,"height",i.height),U(x,i)}else t.children(f).length>0?(r.trace("Cluster - the non recursive path XBX",f,i.id,i,i.width,"Graph:",t),r.trace(C(i.id,t)),d.set(i.id,{id:C(i.id,t),node:i})):(r.trace("Node - the non recursive path XAX",f,v,t.node(f),l),await $(v,t.node(f),{config:o,dir:l}))})),await w(async()=>{const f=t.edges().map(async function(i){const g=t.edge(i.v,i.w,i.name);r.info("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),r.info("Edge "+i.v+" -> "+i.w+": ",i," ",JSON.stringify(t.edge(i))),r.info("Fix",d,"ids:",i.v,i.w,"Translating: ",d.get(i.v),d.get(i.w)),await Z(h,g)});await Promise.all(f)},"processEdges")(),r.info("Graph before layout:",JSON.stringify(p(t))),r.info("############################################# XXX"),r.info("### Layout ### XXX"),r.info("############################################# XXX"),I(t),r.info("Graph after layout:",JSON.stringify(p(t)));let O=0,{subGraphTitleTotalMargin:S}=q(o);return await Promise.all(oe(t).map(async function(f){const i=t.node(f);if(r.info("Position XBX => "+f+": ("+i.x,","+i.y,") width: ",i.width," height: ",i.height),i?.clusterNode)i.y+=S,r.info("A tainted cluster node XBX1",f,i.id,i.width,i.height,i.x,i.y,t.parent(f)),d.get(i.id).node=i,P(i);else if(t.children(f).length>0){r.info("A pure cluster node XBX1",f,i.id,i.x,i.y,i.width,i.height,t.parent(f)),i.height+=S,t.node(i.parentId);const g=i?.padding/2||0,E=i?.labelBBox?.height||0,N=E-g||0;r.debug("OffsetY",N,"labelHeight",E,"halfPadding",g),await K(c,i),d.get(i.id).node=i}else{const g=t.node(i.parentId);i.y+=S/2,r.info("A regular node XBX1 - using the padding",i.id,"parent",i.parentId,i.width,i.height,i.x,i.y,"offsetY",i.offsetY,"parent",g,g?.offsetY,i),P(i)}})),t.edges().forEach(function(f){const i=t.edge(f);r.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(i),i),i.points.forEach(x=>x.y+=S/2);const g=t.node(f.v);var E=t.node(f.w);const N=Q(m,i,d,n,g,E,a);W(i,N)}),t.nodes().forEach(function(f){const i=t.node(f);r.info(f,i.type,i.diff),i.isGroup&&(O=i.diff)}),r.warn("Returning from recursive render XAX",u,O),{elem:u,diff:O}},"recursiveRender"),Oe=w(async(e,t)=>{const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=t.select("g");F(a,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(o=>{n.setNode(o.id,{...o}),o.parentId&&n.setParent(o.id,o.parentId)}),r.debug("Edges:",e.edges),e.edges.forEach(o=>{if(o.start===o.end){const l=o.start,u=l+"---"+l+"---1",c=l+"---"+l+"---2",m=n.node(l);n.setNode(u,{domId:u,id:u,parentId:m.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(u,m.parentId),n.setNode(c,{domId:c,id:c,parentId:m.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(c,m.parentId);const h=structuredClone(o),v=structuredClone(o),y=structuredClone(o);h.label="",h.arrowTypeEnd="none",h.id=l+"-cyclic-special-1",v.arrowTypeStart="none",v.arrowTypeEnd="none",v.id=l+"-cyclic-special-mid",y.label="",m.isGroup&&(h.fromCluster=l,y.toCluster=l),y.id=l+"-cyclic-special-2",y.arrowTypeStart="none",n.setEdge(l,u,h,l+"-cyclic-special-0"),n.setEdge(u,c,v,l+"-cyclic-special-1"),n.setEdge(c,l,y,l+"-cyc<lic-special-2")}else n.setEdge(o.start,o.end,{...o},o.id)}),r.warn("Graph at first:",JSON.stringify(p(n))),se(n),r.warn("Graph after XAX:",JSON.stringify(p(n)));const s=V();await j(a,n,e.type,e.diagramId,void 0,s)},"render");export{Oe as render};
@@ -1,4 +1,4 @@
1
- import{a as sn,r as p,W as sr,g as un}from"./monaco-editor-C7Z4sOhS.js";import{_ as ln,a as cn,b as lt}from"./syntax-highlighting-YWvMU4Hm.js";var Ce={exports:{}},Q={};/**
1
+ import{a as sn,r as p,W as sr,g as un}from"./monaco-editor-DHKm5-VF.js";import{_ as ln,a as cn,b as lt}from"./syntax-highlighting-CnREyncB.js";var Ce={exports:{}},Q={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -0,0 +1 @@
1
+ function H(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function j(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,i=n.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+n.slice(e+1)]}function J(n){return n=j(Math.abs(n)),n?n[1]:NaN}function K(n,t){return function(e,i){for(var o=e.length,f=[],c=0,u=n[0],p=0;o>0&&u>0&&(p+u+1>i&&(u=Math.max(1,i-p)),f.push(e.substring(o-=u,o+u)),!((p+=u+1)>i));)u=n[c=(c+1)%n.length];return f.reverse().join(t)}}function Q(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var V=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function N(n){if(!(t=V.exec(n)))throw new Error("invalid format: "+n);var t;return new $({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}N.prototype=$.prototype;function $(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}$.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function W(n){n:for(var t=n.length,e=1,i=-1,o;e<t;++e)switch(n[e]){case".":i=o=e;break;case"0":i===0&&(i=e),o=e;break;default:if(!+n[e])break n;i>0&&(i=0);break}return i>0?n.slice(0,i)+n.slice(o+1):n}var U;function _(n,t){var e=j(n,t);if(!e)return n+"";var i=e[0],o=e[1],f=o-(U=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,c=i.length;return f===c?i:f>c?i+new Array(f-c+1).join("0"):f>0?i.slice(0,f)+"."+i.slice(f):"0."+new Array(1-f).join("0")+j(n,Math.max(0,t+f-1))[0]}function G(n,t){var e=j(n,t);if(!e)return n+"";var i=e[0],o=e[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}const I={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:H,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>G(n*100,t),r:G,s:_,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function X(n){return n}var O=Array.prototype.map,R=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function v(n){var t=n.grouping===void 0||n.thousands===void 0?X:K(O.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",i=n.currency===void 0?"":n.currency[1]+"",o=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?X:Q(O.call(n.numerals,String)),c=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",p=n.nan===void 0?"NaN":n.nan+"";function F(a){a=N(a);var x=a.fill,M=a.align,m=a.sign,w=a.symbol,l=a.zero,S=a.width,E=a.comma,g=a.precision,L=a.trim,d=a.type;d==="n"?(E=!0,d="g"):I[d]||(g===void 0&&(g=12),L=!0,d="g"),(l||x==="0"&&M==="=")&&(l=!0,x="0",M="=");var Z=w==="$"?e:w==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",q=w==="$"?i:/[%p]/.test(d)?c:"",T=I[d],B=/[defgprs%]/.test(d);g=g===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(r){var y=Z,h=q,b,D,k;if(d==="c")h=T(r)+h,r="";else{r=+r;var P=r<0||1/r<0;if(r=isNaN(r)?p:T(Math.abs(r),g),L&&(r=W(r)),P&&+r==0&&m!=="+"&&(P=!1),y=(P?m==="("?m:u:m==="-"||m==="("?"":m)+y,h=(d==="s"?R[8+U/3]:"")+h+(P&&m==="("?")":""),B){for(b=-1,D=r.length;++b<D;)if(k=r.charCodeAt(b),48>k||k>57){h=(k===46?o+r.slice(b+1):r.slice(b))+h,r=r.slice(0,b);break}}}E&&!l&&(r=t(r,1/0));var z=y.length+r.length+h.length,s=z<S?new Array(S-z+1).join(x):"";switch(E&&l&&(r=t(s+r,s.length?S-h.length:1/0),s=""),M){case"<":r=y+r+h+s;break;case"=":r=y+s+r+h;break;case"^":r=s.slice(0,z=s.length>>1)+y+r+h+s.slice(z);break;default:r=s+y+r+h;break}return f(r)}return C.toString=function(){return a+""},C}function Y(a,x){var M=F((a=N(a),a.type="f",a)),m=Math.max(-8,Math.min(8,Math.floor(J(x)/3)))*3,w=Math.pow(10,-m),l=R[8+m/3];return function(S){return M(w*S)+l}}return{format:F,formatPrefix:Y}}var A,nn,tn;rn({thousands:",",grouping:[3],currency:["$",""]});function rn(n){return A=v(n),nn=A.format,tn=A.formatPrefix,A}export{tn as a,nn as b,J as e,N as f};
@@ -0,0 +1,24 @@
1
+ import{_ as w,D as te,E as ae,H as de,e as he,l as K,aZ as P,d as Y,b as ue,a as fe,p as me,q as ge,g as ye,s as Se,F as ve,a_ as xe,y as be}from"./ChatPage-D6sol0ad.js";import{s as we}from"./chunk-QN33PNHL-BpH-o_YR.js";import{p as Ce}from"./chunk-4BX2VUAB-RPxkCWhH.js";import{p as Te}from"./treemap-KMMF4GRG-DtkpVA56.js";import{b as O}from"./defaultLocale-C4B-KCzX.js";import{o as J}from"./ordinal-Cboi1Yqb.js";import"./data-structures-C0h9Oap1.js";import"./monaco-editor-DHKm5-VF.js";import"./syntax-highlighting-CnREyncB.js";import"./agents-ChrA1R0y.js";import"./tools-IcPNZlPj.js";import"./ui-components-D1St49qC.js";import"./useAgents-BnDTkOG8.js";import"./tabManager-B2LQO_Ll.js";import"./index-Bn3v3S9-.js";import"./useCommands-mvMu3mMD.js";import"./useClaudeVersions-CD59tFWM.js";import"./FileExplorer-DNYj6Tsx.js";import"./UnifiedToolSelector-CNbPsiuq.js";import"./FileBrowser-BYweUPH4.js";import"./ProjectSelector-DSXOjMQC.js";import"./_baseUniq-eGJNLBzx.js";import"./_basePickBy-7C_e0Xv1.js";import"./clone-Ckf7tA1V.js";import"./init-Gi6I4Gst.js";function Le(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function $e(){return this.eachAfter(Le)}function Ae(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Fe(t,a){for(var l=this,n=[l],o,s,p=-1;l=n.pop();)if(t.call(a,l,++p,this),o=l.children)for(s=o.length-1;s>=0;--s)n.push(o[s]);return this}function ke(t,a){for(var l=this,n=[l],o=[],s,p,d,m=-1;l=n.pop();)if(o.push(l),s=l.children)for(p=0,d=s.length;p<d;++p)n.push(s[p]);for(;l=o.pop();)t.call(a,l,++m,this);return this}function Ne(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Me(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,o=n&&n.length;--o>=0;)l+=n[o].value;a.value=l})}function _e(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=Ve(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var o=n.length;t!==l;)n.splice(o,0,t),t=t.parent;return n}function Ve(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),o=null;for(t=l.pop(),a=n.pop();t===a;)o=t,t=l.pop(),a=n.pop();return o}function De(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Pe(){return Array.from(this)}function Be(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ee(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Re(){var t=this,a,l=[t],n,o,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(o=0,s=n.length;o<s;++o)l.push(n[o]);while(l.length)}function Q(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ie)):a===void 0&&(a=He);for(var l=new Z(t),n,o=[l],s,p,d,m;n=o.pop();)if((p=a(n.data))&&(m=(p=Array.from(p)).length))for(n.children=p,d=m-1;d>=0;--d)o.push(s=p[d]=new Z(p[d])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(qe)}function We(){return Q(this).eachBefore(Oe)}function He(t){return t.children}function Ie(t){return Array.isArray(t)?t[1]:null}function Oe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function qe(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Z(t){this.data=t,this.depth=this.height=0,this.parent=null}Z.prototype=Q.prototype={constructor:Z,count:$e,each:Ae,eachAfter:ke,eachBefore:Fe,find:Ne,sum:Me,sort:_e,path:ze,ancestors:De,descendants:Pe,leaves:Be,links:Ee,copy:We,[Symbol.iterator]:Re};function Ge(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function G(t){return function(){return t}}function Xe(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,o){for(var s=t.children,p,d=-1,m=s.length,c=t.value&&(n-a)/t.value;++d<m;)p=s[d],p.y0=l,p.y1=o,p.x0=a,p.x1=a+=p.value*c}function Ye(t,a,l,n,o){for(var s=t.children,p,d=-1,m=s.length,c=t.value&&(o-l)/t.value;++d<m;)p=s[d],p.x0=a,p.x1=n,p.y0=l,p.y1=l+=p.value*c}var Ze=(1+Math.sqrt(5))/2;function Ue(t,a,l,n,o,s){for(var p=[],d=a.children,m,c,h=0,b=0,r=d.length,x,S,v=a.value,u,g,N,k,V,R,M;h<r;){x=o-l,S=s-n;do u=d[b++].value;while(!u&&b<r);for(g=N=u,R=Math.max(S/x,x/S)/(v*t),M=u*u*R,V=Math.max(N/M,M/g);b<r;++b){if(u+=c=d[b].value,c<g&&(g=c),c>N&&(N=c),M=u*u*R,k=Math.max(N/M,M/g),k>V){u-=c;break}V=k}p.push(m={value:u,dice:x<S,children:d.slice(h,b)}),m.dice?je(m,l,n,o,v?n+=S*u/v:s):Ye(m,l,n,v?l+=x*u/v:o,s),v-=u,h=b}return p}const Je=(function t(a){function l(n,o,s,p,d){Ue(a,n,o,s,p,d)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(Ze);function Ke(){var t=Je,a=!1,l=1,n=1,o=[0],s=q,p=q,d=q,m=q,c=q;function h(r){return r.x0=r.y0=0,r.x1=l,r.y1=n,r.eachBefore(b),o=[0],a&&r.eachBefore(Xe),r}function b(r){var x=o[r.depth],S=r.x0+x,v=r.y0+x,u=r.x1-x,g=r.y1-x;u<S&&(S=u=(S+u)/2),g<v&&(v=g=(v+g)/2),r.x0=S,r.y0=v,r.x1=u,r.y1=g,r.children&&(x=o[r.depth+1]=s(r)/2,S+=c(r)-x,v+=p(r)-x,u-=d(r)-x,g-=m(r)-x,u<S&&(S=u=(S+u)/2),g<v&&(v=g=(v+g)/2),t(r,S,v,u,g))}return h.round=function(r){return arguments.length?(a=!!r,h):a},h.size=function(r){return arguments.length?(l=+r[0],n=+r[1],h):[l,n]},h.tile=function(r){return arguments.length?(t=Ge(r),h):t},h.padding=function(r){return arguments.length?h.paddingInner(r).paddingOuter(r):h.paddingInner()},h.paddingInner=function(r){return arguments.length?(s=typeof r=="function"?r:G(+r),h):s},h.paddingOuter=function(r){return arguments.length?h.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r):h.paddingTop()},h.paddingTop=function(r){return arguments.length?(p=typeof r=="function"?r:G(+r),h):p},h.paddingRight=function(r){return arguments.length?(d=typeof r=="function"?r:G(+r),h):d},h.paddingBottom=function(r){return arguments.length?(m=typeof r=="function"?r:G(+r),h):m},h.paddingLeft=function(r){return arguments.length?(c=typeof r=="function"?r:G(+r),h):c},h}var E,ne=(E=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=me,this.getDiagramTitle=ge,this.getAccDescription=ye,this.setAccDescription=Se}getNodes(){return this.nodes}getConfig(){const a=ve,l=ae();return te({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},o=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");o&&o.forEach(s=>{xe(s)&&(n?.textStyles?n.textStyles.push(s):n.textStyles=[s]),n?.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){be(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(E,"TreeMapDB"),E);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const o={name:n.name,children:n.type==="Leaf"?void 0:[]};for(o.classSelector=n?.classSelector,n?.cssCompiledStyles&&(o.cssCompiledStyles=[n.cssCompiledStyles]),n.type==="Leaf"&&n.value!==void 0&&(o.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(o);else{const s=l[l.length-1].node;s.children?s.children.push(o):s.children=[o]}n.type!=="Leaf"&&l.push({node:o,level:n.level})}),a}w(le,"buildHierarchy");var Qe=w((t,a)=>{Ce(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const p=s.item;if(!p)continue;const d=s.indent?parseInt(s.indent):0,m=et(p),c=p.classSelector?a.getStylesForClass(p.classSelector):[],h=c.length>0?c.join(";"):void 0,b={level:d,name:m,type:p.$type,value:p.value,classSelector:p.classSelector,cssCompiledStyles:h};l.push(b)}const n=le(l),o=w((s,p)=>{for(const d of s)a.addNode(d,p),d.children&&d.children.length>0&&o(d.children,p+1)},"addNodesRecursively");o(n,0)},"populate"),et=w(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:w(async t=>{try{const l=await Te("treemap",t);K.debug("Treemap AST:",l);const n=re.parser?.yy;if(!(n instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Qe(l,n)}catch(a){throw K.error("Error parsing treemap:",a),a}},"parse")},tt=10,B=10,X=25,at=w((t,a,l,n)=>{const o=n.db,s=o.getConfig(),p=s.padding??tt,d=o.getDiagramTitle(),m=o.getRoot(),{themeVariables:c}=ae();if(!m)return;const h=d?30:0,b=de(a),r=s.nodeWidth?s.nodeWidth*B:960,x=s.nodeHeight?s.nodeHeight*B:500,S=r,v=x+h;b.attr("viewBox",`0 0 ${S} ${v}`),he(b,v,S,s.useMaxWidth);let u;try{const e=s.valueFormat||",";if(e==="$0,0")u=w(i=>"$"+O(",")(i),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const i=/\.\d+/.exec(e),f=i?i[0]:"";u=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const i=e.substring(1);u=w(f=>"$"+O(i||"")(f),"valueFormat")}else u=O(e)}catch(e){K.error("Error creating format function:",e),u=O(",")}const g=J().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=J().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),k=J().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",h/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${h})`).attr("class","treemapContainer"),R=Q(m).sum(e=>e.value??0).sort((e,i)=>(i.value??0)-(e.value??0)),ee=Ke().size([r,x]).paddingTop(e=>e.children&&e.children.length>0?X+B:0).paddingInner(p).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(R),se=ee.descendants().filter(e=>e.children&&e.children.length>0),W=V.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),W.append("clipPath").attr("id",(e,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,i)=>`treemapSection section${i}`).attr("fill",e=>g(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>N(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const i=P({cssCompiledStyles:e.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const i=Y(this),f=e.data.name;i.text(f);const C=e.x1-e.x0,L=6;let $;s.showValues!==!1&&e.value?$=C-10-30-10-L:$=C-L-6;const A=Math.max(15,$),y=i.node();if(y.getComputedTextLength()>A){let T=f;for(;T.length>0;){if(T=f.substring(0,T.length-1),T.length===0){i.text("..."),y.getComputedTextLength()>A&&i.text("");break}if(i.text(T+"..."),y.getComputedTextLength()<=A)break}}}),s.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?u(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const ie=ee.leaves(),j=V.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,i)=>`treemapNode treemapLeafGroup leaf${i}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);j.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("style",e=>P({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(e,i)=>`clip-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const i="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+k(e.data.name)+";",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,i)=>`url(#clip-${a}-${i})`).text(e=>e.data.name).each(function(e){const i=Y(this),f=e.x1-e.x0,C=e.y1-e.y0,L=i.node(),$=4,D=f-2*$,A=C-2*$;if(D<10||A<10){i.style("display","none");return}let y=parseInt(i.style("font-size"),10);const _=8,F=28,T=.6,z=6,H=2;for(;L.getComputedTextLength()>D&&y>_;)y--,i.style("font-size",`${y}px`);let I=Math.max(z,Math.min(F,Math.round(y*T))),U=y+H+I;for(;U>A&&y>_&&(y--,I=Math.max(z,Math.min(F,Math.round(y*T))),!(I<z&&y===_));)i.style("font-size",`${y}px`),U=y+H+I;i.style("font-size",`${y}px`),(L.getComputedTextLength()>D||y<_||A<y)&&i.style("display","none")}),s.showValues!==!1&&j.append("text").attr("class","treemapValue").attr("x",i=>(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+k(i.data.name)+";",C=P({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const $=parseFloat(L.style("font-size")),D=28,A=.6,y=6,_=2,F=Math.max(y,Math.min(D,Math.round($*A)));f.style("font-size",`${F}px`);const z=(i.y1-i.y0)/2+$/2+_;f.attr("y",z);const H=i.x1-i.x0,ce=i.y1-i.y0-4,pe=H-8;f.node().getComputedTextLength()>pe||z+F>ce||F<y?f.style("display","none"):f.style("display",null)});const oe=s.diagramPadding??8;we(b,oe,"flowchart",s?.useMaxWidth||!1)},"draw"),nt=w(function(t,a){return a.db.getClasses()},"getClasses"),lt={draw:at,getClasses:nt},rt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},st=w(({treemap:t}={})=>{const a=te(rt,t);return`
2
+ .treemapNode.section {
3
+ stroke: ${a.sectionStrokeColor};
4
+ stroke-width: ${a.sectionStrokeWidth};
5
+ fill: ${a.sectionFillColor};
6
+ }
7
+ .treemapNode.leaf {
8
+ stroke: ${a.leafStrokeColor};
9
+ stroke-width: ${a.leafStrokeWidth};
10
+ fill: ${a.leafFillColor};
11
+ }
12
+ .treemapLabel {
13
+ fill: ${a.labelColor};
14
+ font-size: ${a.labelFontSize};
15
+ }
16
+ .treemapValue {
17
+ fill: ${a.valueColor};
18
+ font-size: ${a.valueFontSize};
19
+ }
20
+ .treemapTitle {
21
+ fill: ${a.titleColor};
22
+ font-size: ${a.titleFontSize};
23
+ }
24
+ `},"getStyles"),it=st,Vt={parser:re,get db(){return new ne},renderer:lt,styles:it};export{Vt as diagram};
@@ -0,0 +1,43 @@
1
+ import{_ as l,s as k,g as R,q as E,p as F,a as I,b as _,H as D,y as G,D as f,E as C,F as P,l as z,K as H}from"./ChatPage-D6sol0ad.js";import{p as V}from"./chunk-4BX2VUAB-RPxkCWhH.js";import{p as W}from"./treemap-KMMF4GRG-DtkpVA56.js";import"./data-structures-C0h9Oap1.js";import"./monaco-editor-DHKm5-VF.js";import"./syntax-highlighting-CnREyncB.js";import"./agents-ChrA1R0y.js";import"./tools-IcPNZlPj.js";import"./ui-components-D1St49qC.js";import"./useAgents-BnDTkOG8.js";import"./tabManager-B2LQO_Ll.js";import"./index-Bn3v3S9-.js";import"./useCommands-mvMu3mMD.js";import"./useClaudeVersions-CD59tFWM.js";import"./FileExplorer-DNYj6Tsx.js";import"./UnifiedToolSelector-CNbPsiuq.js";import"./FileBrowser-BYweUPH4.js";import"./ProjectSelector-DSXOjMQC.js";import"./_baseUniq-eGJNLBzx.js";import"./_basePickBy-7C_e0Xv1.js";import"./clone-Ckf7tA1V.js";var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:h},g=structuredClone(w),B=P.radar,j=l(()=>f({...B,...C().radar}),"getConfig"),b=l(()=>g.axes,"getAxes"),q=l(()=>g.curves,"getCurves"),K=l(()=>g.options,"getOptions"),N=l(a=>{g.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),U=l(a=>{g.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:X(t.entries)}))},"setCurves"),X=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),Y=l(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});g.options={showLegend:t.showLegend?.value??h.showLegend,ticks:t.ticks?.value??h.ticks,max:t.max?.value??h.max,min:t.min?.value??h.min,graticule:t.graticule?.value??h.graticule}},"setOptions"),Z=l(()=>{G(),g=structuredClone(w)},"clear"),$={getAxes:b,getCurves:q,getOptions:K,setAxes:N,setCurves:U,setOptions:Y,getConfig:j,clear:Z,setAccTitle:_,getAccTitle:I,setDiagramTitle:F,getDiagramTitle:E,getAccDescription:R,setAccDescription:k},J=l(a=>{V(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),Q={parse:l(async a=>{const t=await W("radar",a);z.debug(t),J(t)},"parse")},tt=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),m=D(t),p=et(m,c),u=n.max??Math.max(...i.map(y=>Math.max(...y.entries))),x=n.min,v=Math.min(c.width,c.height)/2;at(p,o,v,n.ticks,n.graticule),rt(p,o,v,c),M(p,o,i,x,u,n.graticule,c),T(p,i,n.showLegend,c),p.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),et=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return a.attr("viewbox",`0 0 ${e} ${r}`).attr("width",e).attr("height",r),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),at=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o<r;o++){const i=e*(o+1)/r;a.append("circle").attr("r",i).attr("class","radarGraticule")}else if(s==="polygon"){const o=t.length;for(let i=0;i<r;i++){const n=e*(i+1)/r,c=t.map((d,m)=>{const p=2*m*Math.PI/o-Math.PI/2,u=n*Math.cos(p),x=n*Math.sin(p);return`${u},${x}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),rt=l((a,t,e,r)=>{const s=t.length;for(let o=0;o<s;o++){const i=t[o].label,n=2*o*Math.PI/s-Math.PI/2;a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*Math.cos(n)).attr("y2",e*r.axisScaleFactor*Math.sin(n)).attr("class","radarAxisLine"),a.append("text").text(i).attr("x",e*r.axisLabelFactor*Math.cos(n)).attr("y",e*r.axisLabelFactor*Math.sin(n)).attr("class","radarAxisLabel")}},"drawAxes");function M(a,t,e,r,s,o,i){const n=t.length,c=Math.min(i.width,i.height)/2;e.forEach((d,m)=>{if(d.entries.length!==n)return;const p=d.entries.map((u,x)=>{const v=2*Math.PI*x/n-Math.PI/2,y=A(u,r,s,c),O=y*Math.cos(v),S=y*Math.sin(v);return{x:O,y:S}});o==="circle"?a.append("path").attr("d",L(p,i.curveTension)).attr("class",`radarCurve-${m}`):o==="polygon"&&a.append("polygon").attr("points",p.map(u=>`${u.x},${u.y}`).join(" ")).attr("class",`radarCurve-${m}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const o=a[(s-1+e)%e],i=a[s],n=a[(s+1)%e],c=a[(s+2)%e],d={x:i.x+(n.x-o.x)*t,y:i.y+(n.y-o.y)*t},m={x:n.x-(c.x-i.x)*t,y:n.y-(c.y-i.y)*t};r+=` C${d.x},${d.y} ${m.x},${m.y} ${n.x},${n.y}`}return`${r} Z`}l(L,"closedRoundCurve");function T(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,o=-(r.height/2+r.marginTop)*3/4,i=20;t.forEach((n,c)=>{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var st={draw:tt},nt=l((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
2
+ .radarCurve-${r} {
3
+ color: ${s};
4
+ fill: ${s};
5
+ fill-opacity: ${t.curveOpacity};
6
+ stroke: ${s};
7
+ stroke-width: ${t.curveStrokeWidth};
8
+ }
9
+ .radarLegendBox-${r} {
10
+ fill: ${s};
11
+ fill-opacity: ${t.curveOpacity};
12
+ stroke: ${s};
13
+ }
14
+ `}return e},"genIndexStyles"),ot=l(a=>{const t=H(),e=C(),r=f(t,e.themeVariables),s=f(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),it=l(({radar:a}={})=>{const{themeVariables:t,radarOptions:e}=ot(a);return`
15
+ .radarTitle {
16
+ font-size: ${t.fontSize};
17
+ color: ${t.titleColor};
18
+ dominant-baseline: hanging;
19
+ text-anchor: middle;
20
+ }
21
+ .radarAxisLine {
22
+ stroke: ${e.axisColor};
23
+ stroke-width: ${e.axisStrokeWidth};
24
+ }
25
+ .radarAxisLabel {
26
+ dominant-baseline: middle;
27
+ text-anchor: middle;
28
+ font-size: ${e.axisLabelFontSize}px;
29
+ color: ${e.axisColor};
30
+ }
31
+ .radarGraticule {
32
+ fill: ${e.graticuleColor};
33
+ fill-opacity: ${e.graticuleOpacity};
34
+ stroke: ${e.graticuleColor};
35
+ stroke-width: ${e.graticuleStrokeWidth};
36
+ }
37
+ .radarLegendText {
38
+ text-anchor: start;
39
+ font-size: ${e.legendFontSize}px;
40
+ dominant-baseline: hanging;
41
+ }
42
+ ${nt(t,e)}
43
+ `},"styles"),St={parser:Q,db:$,renderer:st,styles:it};export{St as diagram};
@@ -0,0 +1,24 @@
1
+ import{_ as f,D as u,H as B,e as C,l as w,b as S,a as D,p as T,q as E,g as F,s as P,E as z,F as A,y as W}from"./ChatPage-D6sol0ad.js";import{p as _}from"./chunk-4BX2VUAB-RPxkCWhH.js";import{p as N}from"./treemap-KMMF4GRG-DtkpVA56.js";import"./data-structures-C0h9Oap1.js";import"./monaco-editor-DHKm5-VF.js";import"./syntax-highlighting-CnREyncB.js";import"./agents-ChrA1R0y.js";import"./tools-IcPNZlPj.js";import"./ui-components-D1St49qC.js";import"./useAgents-BnDTkOG8.js";import"./tabManager-B2LQO_Ll.js";import"./index-Bn3v3S9-.js";import"./useCommands-mvMu3mMD.js";import"./useClaudeVersions-CD59tFWM.js";import"./FileExplorer-DNYj6Tsx.js";import"./UnifiedToolSelector-CNbPsiuq.js";import"./FileBrowser-BYweUPH4.js";import"./ProjectSelector-DSXOjMQC.js";import"./_baseUniq-eGJNLBzx.js";import"./_basePickBy-7C_e0Xv1.js";import"./clone-Ckf7tA1V.js";var L=A.packet,b,v=(b=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=E,this.getAccDescription=F,this.setAccDescription=P}getConfig(){const t=u({...L,...z().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},f(b,"PacketDB"),b),M=1e4,Y=f((e,t)=>{_(e,t);let r=-1,o=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:s,bits:p,label:c}of e.blocks){if(a!==void 0&&s!==void 0&&s<a)throw new Error(`Packet block ${a} - ${s} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${s??a} is not contiguous. It should start from ${r+1}.`);if(p===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(s??=a+(p??1)-1,p??=s-a+1,r=s,w.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&t.getPacket().length<M;){const[d,i]=H({start:a,end:s,bits:p,label:c},n,l);if(o.push(d),d.end+1===n*l&&(t.pushWord(o),o=[],n++),!i)break;({start:a,end:s,bits:p,label:c}=i)}}t.pushWord(o)},"populate"),H=f((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const o=t*r-1,n=t*r;return[{start:e.start,end:o,label:e.label,bits:o-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:f(async e=>{const t=await N("packet",e),r=x.parser?.yy;if(!(r instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,r)},"parse")},I=f((e,t,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:s,bitWidth:p,bitsPerRow:c}=l,d=n.getPacket(),i=n.getDiagramTitle(),h=a+s,g=h*(d.length+1)-(i?0:a),m=p*c+2,k=B(t);k.attr("viewbox",`0 0 ${m} ${g}`),C(k,g,m,l.useMaxWidth);for(const[y,$]of d.entries())O(k,$,y,l);k.append("text").text(i).attr("x",m/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=f((e,t,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:s,showBits:p})=>{const c=e.append("g"),d=r*(o+l)+l;for(const i of t){const h=i.start%s*a+1,g=(i.end-i.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",d).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",d+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(i.label),!p)continue;const m=i.end===i.start,k=d-2;c.append("text").attr("x",h+(m?g/2:0)).attr("y",k).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",m?"middle":"start").text(i.start),m||c.append("text").attr("x",h+g).attr("y",k).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(i.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=f(({packet:e}={})=>{const t=u(q,e);return`
2
+ .packetByte {
3
+ font-size: ${t.byteFontSize};
4
+ }
5
+ .packetByte.start {
6
+ fill: ${t.startByteColor};
7
+ }
8
+ .packetByte.end {
9
+ fill: ${t.endByteColor};
10
+ }
11
+ .packetLabel {
12
+ fill: ${t.labelColor};
13
+ font-size: ${t.labelFontSize};
14
+ }
15
+ .packetTitle {
16
+ fill: ${t.titleColor};
17
+ font-size: ${t.titleFontSize};
18
+ }
19
+ .packetBlock {
20
+ stroke: ${t.blockStrokeColor};
21
+ stroke-width: ${t.blockStrokeWidth};
22
+ fill: ${t.blockFillColor};
23
+ }
24
+ `},"styles"),ht={parser:x,get db(){return new v},renderer:j,styles:G};export{ht as diagram};
@@ -0,0 +1,60 @@
1
+ import{g as Dt}from"./chunk-55IACEB6-3ePDt0kp.js";import{s as wt}from"./chunk-QN33PNHL-BpH-o_YR.js";import{_ as u,b as Vt,a as Lt,s as Mt,g as Bt,p as Ft,q as Yt,c as tt,l as D,y as Pt,x as zt,A as Gt,B as Kt,o as Zt,r as Ut,d as jt,u as Wt}from"./ChatPage-D6sol0ad.js";import{c as Qt}from"./channel-CIunGC5m.js";import"./data-structures-C0h9Oap1.js";import"./monaco-editor-DHKm5-VF.js";import"./syntax-highlighting-CnREyncB.js";import"./agents-ChrA1R0y.js";import"./tools-IcPNZlPj.js";import"./ui-components-D1St49qC.js";import"./useAgents-BnDTkOG8.js";import"./tabManager-B2LQO_Ll.js";import"./index-Bn3v3S9-.js";import"./useCommands-mvMu3mMD.js";import"./useClaudeVersions-CD59tFWM.js";import"./FileExplorer-DNYj6Tsx.js";import"./UnifiedToolSelector-CNbPsiuq.js";import"./FileBrowser-BYweUPH4.js";import"./ProjectSelector-DSXOjMQC.js";var dt=(function(){var s=u(function(R,n,a,c){for(a=a||{},c=R.length;c--;a[R[c]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],o=[1,10],d=[1,11],l=[1,12],h=[1,13],y=[1,20],_=[1,21],E=[1,22],V=[1,23],Z=[1,24],S=[1,19],et=[1,25],U=[1,26],T=[1,18],L=[1,33],st=[1,34],it=[1,35],rt=[1,36],nt=[1,37],pt=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],O=[1,42],A=[1,43],M=[1,52],B=[40,50,68,69],F=[1,63],Y=[1,61],N=[1,58],P=[1,62],z=[1,64],j=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],ft=[63,64,65,66,67],yt=[1,81],_t=[1,80],gt=[1,78],bt=[1,79],mt=[6,10,42,47],C=[6,10,13,41,42,47,48,49],W=[1,89],Q=[1,88],X=[1,87],G=[19,56],Et=[1,98],kt=[1,97],at=[19,56,58,60],ct={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:u(function(n,a,c,r,p,t,K){var e=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 56:case 64:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 76:case 77:this.$=t[e].replace(/"/g,"");break;case 55:case 78:this.$=t[e];break;case 57:t[e].push(t[e-1]),this.$=t[e];break;case 58:this.$={type:t[e-1],name:t[e]};break;case 59:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 60:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 61:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 62:case 63:case 66:this.$=t[e];break;case 65:t[e-2].push(t[e]),this.$=t[e-2];break;case 67:this.$=t[e].replace(/"/g,"");break;case 68:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 69:this.$=r.Cardinality.ZERO_OR_ONE;break;case 70:this.$=r.Cardinality.ZERO_OR_MORE;break;case 71:this.$=r.Cardinality.ONE_OR_MORE;break;case 72:this.$=r.Cardinality.ONLY_ONE;break;case 73:this.$=r.Cardinality.MD_PARENT;break;case 74:this.$=r.Identification.NON_IDENTIFYING;break;case 75:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:o,24:d,26:l,28:h,29:14,30:15,31:16,32:17,33:y,34:_,35:E,36:V,37:Z,40:S,43:et,44:U,50:T},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:27,11:9,22:o,24:d,26:l,28:h,29:14,30:15,31:16,32:17,33:y,34:_,35:E,36:V,37:Z,40:S,43:et,44:U,50:T},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:L,64:st,65:it,66:rt,67:nt}),{23:[1,38]},{25:[1,39]},{27:[1,40]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(pt,[2,54]),s(pt,[2,55]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:41,40:O,41:A},{16:44,40:O,41:A},{16:45,40:O,41:A},s(i,[2,4]),{11:46,40:S,50:T},{16:47,40:O,41:A},{18:48,19:[1,49],51:50,52:51,56:M},{11:53,40:S,50:T},{62:54,68:[1,55],69:[1,56]},s(B,[2,69]),s(B,[2,70]),s(B,[2,71]),s(B,[2,72]),s(B,[2,73]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:F,38:57,41:Y,42:N,45:59,46:60,48:P,49:z},s(j,[2,37]),s(j,[2,38]),{16:65,40:O,41:A,42:N},{13:F,38:66,41:Y,42:N,45:59,46:60,48:P,49:z},{13:[1,67],15:[1,68]},s(i,[2,17],{61:32,12:69,17:[1,70],42:N,63:L,64:st,65:it,66:rt,67:nt}),{19:[1,71]},s(i,[2,14]),{18:72,19:[2,56],51:50,52:51,56:M},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:L,64:st,65:it,66:rt,67:nt},s(ft,[2,74]),s(ft,[2,75]),{6:yt,10:_t,39:77,42:gt,47:bt},{40:[1,82],41:[1,83]},s(mt,[2,43],{46:84,13:F,41:Y,48:P,49:z}),s(C,[2,45]),s(C,[2,50]),s(C,[2,51]),s(C,[2,52]),s(C,[2,53]),s(i,[2,41],{42:N}),{6:yt,10:_t,39:85,42:gt,47:bt},{14:86,40:W,50:Q,70:X},{16:90,40:O,41:A},{11:91,40:S,50:T},{18:92,19:[1,93],51:50,52:51,56:M},s(i,[2,12]),{19:[2,57]},s(G,[2,58],{54:94,55:95,57:96,59:Et,60:kt}),s([19,56,59,60],[2,63]),s(i,[2,22],{15:[1,100],17:[1,99]}),s([40,50],[2,68]),s(i,[2,36]),{13:F,41:Y,45:101,46:60,48:P,49:z},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(j,[2,39]),s(j,[2,40]),s(C,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,76]),s(i,[2,77]),s(i,[2,78]),{13:[1,102],42:N},{13:[1,104],15:[1,103]},{19:[1,105]},s(i,[2,15]),s(G,[2,59],{55:106,58:[1,107],60:kt}),s(G,[2,60]),s(at,[2,64]),s(G,[2,67]),s(at,[2,66]),{18:108,19:[1,109],51:50,52:51,56:M},{16:110,40:O,41:A},s(mt,[2,44],{46:84,13:F,41:Y,48:P,49:z}),{14:111,40:W,50:Q,70:X},{16:112,40:O,41:A},{14:113,40:W,50:Q,70:X},s(i,[2,13]),s(G,[2,61]),{57:114,59:Et},{19:[1,115]},s(i,[2,20]),s(i,[2,23],{17:[1,116],42:N}),s(i,[2,11]),{13:[1,117],42:N},s(i,[2,10]),s(at,[2,65]),s(i,[2,18]),{18:118,19:[1,119],51:50,52:51,56:M},{14:120,40:W,50:Q,70:X},{19:[1,121]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:u(function(n,a){if(a.recoverable)this.trace(n);else{var c=new Error(n);throw c.hash=a,c}},"parseError"),parse:u(function(n){var a=this,c=[0],r=[],p=[null],t=[],K=this.table,e="",H=0,St=0,xt=2,Tt=1,It=t.slice.call(arguments,1),f=Object.create(this.lexer),x={yy:{}};for(var ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ot)&&(x.yy[ot]=this.yy[ot]);f.setInput(n,x.yy),x.yy.lexer=f,x.yy.parser=this,typeof f.yylloc>"u"&&(f.yylloc={});var lt=f.yylloc;t.push(lt);var Ct=f.options&&f.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function vt(b){c.length=c.length-2*b,p.length=p.length-b,t.length=t.length-b}u(vt,"popStack");function Ot(){var b;return b=r.pop()||f.lex()||Tt,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}u(Ot,"lex");for(var g,I,m,ht,v={},J,k,At,$;;){if(I=c[c.length-1],this.defaultActions[I]?m=this.defaultActions[I]:((g===null||typeof g>"u")&&(g=Ot()),m=K[I]&&K[I][g]),typeof m>"u"||!m.length||!m[0]){var ut="";$=[];for(J in K[I])this.terminals_[J]&&J>xt&&$.push("'"+this.terminals_[J]+"'");f.showPosition?ut="Parse error on line "+(H+1)+`:
2
+ `+f.showPosition()+`
3
+ Expecting `+$.join(", ")+", got '"+(this.terminals_[g]||g)+"'":ut="Parse error on line "+(H+1)+": Unexpected "+(g==Tt?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(ut,{text:f.match,token:this.terminals_[g]||g,line:f.yylineno,loc:lt,expected:$})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+g);switch(m[0]){case 1:c.push(g),p.push(f.yytext),t.push(f.yylloc),c.push(m[1]),g=null,St=f.yyleng,e=f.yytext,H=f.yylineno,lt=f.yylloc;break;case 2:if(k=this.productions_[m[1]][1],v.$=p[p.length-k],v._$={first_line:t[t.length-(k||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(k||1)].first_column,last_column:t[t.length-1].last_column},Ct&&(v._$.range=[t[t.length-(k||1)].range[0],t[t.length-1].range[1]]),ht=this.performAction.apply(v,[e,St,H,x.yy,m[1],p,t].concat(It)),typeof ht<"u")return ht;k&&(c=c.slice(0,-1*k*2),p=p.slice(0,-1*k),t=t.slice(0,-1*k)),c.push(this.productions_[m[1]][0]),p.push(v.$),t.push(v._$),At=K[c[c.length-2]][c[c.length-1]],c.push(At);break;case 3:return!0}}return!0},"parse")},Rt=(function(){var R={EOF:1,parseError:u(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:u(function(n,a){return this.yy=a||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:u(function(n){var a=n.length,c=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===r.length?this.yylloc.first_column:0)+r[r.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(n){this.unput(this.match.slice(n))},"less"),pastInput:u(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
5
+ `+a+"^"},"showPosition"),test_match:u(function(n,a){var c,r,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),r=n[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(n[0].length),this.matched+=n[0],c=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var t in p)this[t]=p[t];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,a,c,r;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),t=0;t<p.length;t++)if(c=this._input.match(this.rules[p[t]]),c&&(!a||c[0].length>a[0].length)){if(a=c,r=t,this.options.backtrack_lexer){if(n=this.test_match(c,p[t]),n!==!1)return n;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(n=this.test_match(a,p[r]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var a=this.next();return a||this.lex()},"lex"),begin:u(function(a){this.conditionStack.push(a)},"begin"),popState:u(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:u(function(a){this.begin(a)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(a,c,r,p){switch(r){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 59;case 25:return 56;case 26:return 56;case 27:return 60;case 28:break;case 29:return this.popState(),19;case 30:return c.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;case 40:return 43;case 41:return 63;case 42:return 65;case 43:return 65;case 44:return 65;case 45:return 63;case 46:return 63;case 47:return 64;case 48:return 64;case 49:return 64;case 50:return 64;case 51:return 64;case 52:return 65;case 53:return 64;case 54:return 65;case 55:return 66;case 56:return 66;case 57:return 66;case 58:return 66;case 59:return 63;case 60:return 64;case 61:return 65;case 62:return 67;case 63:return 68;case 64:return 69;case 65:return 69;case 66:return 68;case 67:return 68;case 68:return 68;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 73:return c.yytext[0];case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}};return R})();ct.lexer=Rt;function q(){this.yy={}}return u(q,"Parser"),q.prototype=ct,ct.Parser=q,new q})();dt.parser=dt;var Xt=dt,w,qt=(w=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Vt,this.getAccTitle=Lt,this.setAccDescription=Mt,this.getAccDescription=Bt,this.setDiagramTitle=Ft,this.getDiagramTitle=Yt,this.getConfig=u(()=>tt().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}addEntity(i,o=""){return this.entities.has(i)?!this.entities.get(i)?.alias&&o&&(this.entities.get(i).alias=o,D.info(`Add alias '${o}' to entity '${i}'`)):(this.entities.set(i,{id:`entity-${i}-${this.entities.size}`,label:i,attributes:[],alias:o,shape:"erBox",look:tt().look??"default",cssClasses:"default",cssStyles:[]}),D.info("Added new entity :",i)),this.entities.get(i)}getEntity(i){return this.entities.get(i)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(i,o){const d=this.addEntity(i);let l;for(l=o.length-1;l>=0;l--)o[l].keys||(o[l].keys=[]),o[l].comment||(o[l].comment=""),d.attributes.push(o[l]),D.debug("Added attribute ",o[l].name)}addRelationship(i,o,d,l){const h=this.entities.get(i),y=this.entities.get(d);if(!h||!y)return;const _={entityA:h.id,roleA:o,entityB:y.id,relSpec:l};this.relationships.push(_),D.debug("Added new relationship :",_)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(i){this.direction=i}getCompiledStyles(i){let o=[];for(const d of i){const l=this.classes.get(d);l?.styles&&(o=[...o,...l.styles??[]].map(h=>h.trim())),l?.textStyles&&(o=[...o,...l.textStyles??[]].map(h=>h.trim()))}return o}addCssStyles(i,o){for(const d of i){const l=this.entities.get(d);if(!o||!l)return;for(const h of o)l.cssStyles.push(h)}}addClass(i,o){i.forEach(d=>{let l=this.classes.get(d);l===void 0&&(l={id:d,styles:[],textStyles:[]},this.classes.set(d,l)),o&&o.forEach(function(h){if(/color/.exec(h)){const y=h.replace("fill","bgFill");l.textStyles.push(y)}l.styles.push(h)})})}setClass(i,o){for(const d of i){const l=this.entities.get(d);if(l)for(const h of o)l.cssClasses+=" "+h}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],Pt()}getData(){const i=[],o=[],d=tt();for(const h of this.entities.keys()){const y=this.entities.get(h);y&&(y.cssCompiledStyles=this.getCompiledStyles(y.cssClasses.split(" ")),i.push(y))}let l=0;for(const h of this.relationships){const y={id:zt(h.entityA,h.entityB,{prefix:"id",counter:l++}),type:"normal",curve:"basis",start:h.entityA,end:h.entityB,label:h.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:h.relSpec.cardB.toLowerCase(),arrowTypeEnd:h.relSpec.cardA.toLowerCase(),pattern:h.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:d.look};o.push(y)}return{nodes:i,edges:o,other:{},config:d,direction:"TB"}}},u(w,"ErDB"),w),Nt={};Kt(Nt,{draw:()=>Ht});var Ht=u(async function(s,i,o,d){D.info("REF0:"),D.info("Drawing er diagram (unified)",i);const{securityLevel:l,er:h,layout:y}=tt(),_=d.db.getData(),E=Dt(i,l);_.type=d.type,_.layoutAlgorithm=Zt(y),_.config.flowchart.nodeSpacing=h?.nodeSpacing||140,_.config.flowchart.rankSpacing=h?.rankSpacing||80,_.direction=d.db.getDirection(),_.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],_.diagramId=i,await Ut(_,E),_.layoutAlgorithm==="elk"&&E.select(".edges").lower();const V=E.selectAll('[id*="-background"]');Array.from(V).length>0&&V.each(function(){const S=jt(this),U=S.attr("id").replace("-background",""),T=E.select(`#${CSS.escape(U)}`);if(!T.empty()){const L=T.attr("transform");S.attr("transform",L)}});const Z=8;Wt.insertTitle(E,"erDiagramTitleText",h?.titleTopMargin??25,d.db.getDiagramTitle()),wt(E,Z,"erDiagram",h?.useMaxWidth??!0)},"draw"),Jt=u((s,i)=>{const o=Qt,d=o(s,"r"),l=o(s,"g"),h=o(s,"b");return Gt(d,l,h,i)},"fade"),$t=u(s=>`
7
+ .entityBox {
8
+ fill: ${s.mainBkg};
9
+ stroke: ${s.nodeBorder};
10
+ }
11
+
12
+ .relationshipLabelBox {
13
+ fill: ${s.tertiaryColor};
14
+ opacity: 0.7;
15
+ background-color: ${s.tertiaryColor};
16
+ rect {
17
+ opacity: 0.5;
18
+ }
19
+ }
20
+
21
+ .labelBkg {
22
+ background-color: ${Jt(s.tertiaryColor,.5)};
23
+ }
24
+
25
+ .edgeLabel .label {
26
+ fill: ${s.nodeBorder};
27
+ font-size: 14px;
28
+ }
29
+
30
+ .label {
31
+ font-family: ${s.fontFamily};
32
+ color: ${s.nodeTextColor||s.textColor};
33
+ }
34
+
35
+ .edge-pattern-dashed {
36
+ stroke-dasharray: 8,8;
37
+ }
38
+
39
+ .node rect,
40
+ .node circle,
41
+ .node ellipse,
42
+ .node polygon
43
+ {
44
+ fill: ${s.mainBkg};
45
+ stroke: ${s.nodeBorder};
46
+ stroke-width: 1px;
47
+ }
48
+
49
+ .relationshipLine {
50
+ stroke: ${s.lineColor};
51
+ stroke-width: 1;
52
+ fill: none;
53
+ }
54
+
55
+ .marker {
56
+ fill: none !important;
57
+ stroke: ${s.lineColor} !important;
58
+ stroke-width: 1;
59
+ }
60
+ `,"getStyles"),te=$t,Ee={parser:Xt,get db(){return new qt},renderer:Nt,styles:te};export{Ee as diagram};