@bkm016/basalt 0.1.27 → 0.1.28

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 (535) hide show
  1. package/{chunk-ydhdewcv.js → chunk-4n4wn5cj.js} +1 -1
  2. package/{chunk-x3g1bzq6.js → chunk-78yngmvf.js} +1 -1
  3. package/{chunk-jxcghx26.js → chunk-a454ntda.js} +2 -2
  4. package/compiled.js +1 -1
  5. package/package.json +1 -1
  6. package/web/{chunk-45ex0e3e.js → chunk-02z7yrhn.js} +1 -1
  7. package/web/chunk-02z7yrhn.js.br +0 -0
  8. package/web/chunk-02z7yrhn.js.gz +0 -0
  9. package/web/chunk-0an1eqtf.js +1 -0
  10. package/web/chunk-0an1eqtf.js.br +0 -0
  11. package/web/chunk-0an1eqtf.js.gz +0 -0
  12. package/web/{chunk-w2gy2tmp.js → chunk-128zy60g.js} +1 -1
  13. package/web/chunk-128zy60g.js.br +0 -0
  14. package/web/chunk-128zy60g.js.gz +0 -0
  15. package/web/{chunk-1fnxbfkf.js → chunk-1e2jy7m2.js} +1 -1
  16. package/web/chunk-1e2jy7m2.js.br +0 -0
  17. package/web/chunk-1e2jy7m2.js.gz +0 -0
  18. package/web/{chunk-f2bb976c.js → chunk-1v3e001f.js} +1 -1
  19. package/web/chunk-1v3e001f.js.br +0 -0
  20. package/web/chunk-1v3e001f.js.gz +0 -0
  21. package/web/{chunk-whfh2wev.js → chunk-214p3rj6.js} +1 -1
  22. package/web/chunk-214p3rj6.js.br +0 -0
  23. package/web/chunk-214p3rj6.js.gz +0 -0
  24. package/web/{chunk-5h3r1hpg.js → chunk-29byd5kf.js} +1 -1
  25. package/web/chunk-29byd5kf.js.br +0 -0
  26. package/web/chunk-29byd5kf.js.gz +0 -0
  27. package/web/{chunk-b4d1948q.js → chunk-3fbh1wxk.js} +1 -1
  28. package/web/chunk-3fbh1wxk.js.br +0 -0
  29. package/web/chunk-3fbh1wxk.js.gz +0 -0
  30. package/web/{chunk-r97hd8wk.js → chunk-3fnrzj1h.js} +1 -1
  31. package/web/chunk-3fnrzj1h.js.br +0 -0
  32. package/web/chunk-3fnrzj1h.js.gz +0 -0
  33. package/web/{chunk-nymsmy8d.js → chunk-3g1095m7.js} +1 -1
  34. package/web/chunk-3g1095m7.js.br +0 -0
  35. package/web/chunk-3g1095m7.js.gz +0 -0
  36. package/web/{chunk-a1cpkzwh.js → chunk-3nn7w4hw.js} +1 -1
  37. package/web/chunk-3nn7w4hw.js.br +0 -0
  38. package/web/chunk-3nn7w4hw.js.gz +0 -0
  39. package/web/{chunk-vwms8c7b.js → chunk-3qa8xcdr.js} +1 -1
  40. package/web/chunk-3qa8xcdr.js.br +0 -0
  41. package/web/chunk-3qa8xcdr.js.gz +0 -0
  42. package/web/{chunk-ctr4kt7p.js → chunk-3x69jfmh.js} +1 -1
  43. package/web/chunk-3x69jfmh.js.br +0 -0
  44. package/web/chunk-3x69jfmh.js.gz +0 -0
  45. package/web/chunk-4v6m77sv.css +1 -0
  46. package/web/chunk-4v6m77sv.css.br +0 -0
  47. package/web/chunk-4v6m77sv.css.gz +0 -0
  48. package/web/chunk-4vk6xma5.js +1 -0
  49. package/web/chunk-4vk6xma5.js.br +0 -0
  50. package/web/chunk-4vk6xma5.js.gz +0 -0
  51. package/web/{chunk-qa0wwff0.js → chunk-50pdas2t.js} +1 -1
  52. package/web/chunk-50pdas2t.js.br +0 -0
  53. package/web/chunk-50pdas2t.js.gz +0 -0
  54. package/web/{chunk-hxsrph02.js → chunk-56a6zytc.js} +94 -94
  55. package/web/chunk-56a6zytc.js.br +0 -0
  56. package/web/chunk-56a6zytc.js.gz +0 -0
  57. package/web/chunk-5ckj4zez.js +1 -0
  58. package/web/chunk-5ckj4zez.js.br +2 -0
  59. package/web/chunk-5ckj4zez.js.gz +0 -0
  60. package/web/{chunk-xjbxndxz.js → chunk-5mr8z024.js} +1 -1
  61. package/web/chunk-5mr8z024.js.br +0 -0
  62. package/web/chunk-5mr8z024.js.gz +0 -0
  63. package/web/{chunk-df9ja645.js → chunk-5q4pemdh.js} +1 -1
  64. package/web/chunk-5q4pemdh.js.br +0 -0
  65. package/web/chunk-5q4pemdh.js.gz +0 -0
  66. package/web/{chunk-g7b4p9k9.js → chunk-63ft76vs.js} +1 -1
  67. package/web/chunk-63ft76vs.js.br +0 -0
  68. package/web/chunk-63ft76vs.js.gz +0 -0
  69. package/web/chunk-67ynxnvq.js +8 -0
  70. package/web/chunk-67ynxnvq.js.br +0 -0
  71. package/web/chunk-67ynxnvq.js.gz +0 -0
  72. package/web/{chunk-3m2nnnk5.js → chunk-6c2pv79h.js} +1 -1
  73. package/web/chunk-6c2pv79h.js.br +0 -0
  74. package/web/chunk-6c2pv79h.js.gz +0 -0
  75. package/web/{chunk-a31z4c14.js → chunk-77nxgqqb.js} +1 -1
  76. package/web/chunk-77nxgqqb.js.br +0 -0
  77. package/web/chunk-77nxgqqb.js.gz +0 -0
  78. package/web/{chunk-68q4nnmc.js → chunk-7c59jb8d.js} +1 -1
  79. package/web/chunk-7c59jb8d.js.br +0 -0
  80. package/web/chunk-7c59jb8d.js.gz +0 -0
  81. package/web/{chunk-btk2h3vh.js → chunk-7ed5jf6e.js} +1 -1
  82. package/web/chunk-7ed5jf6e.js.br +0 -0
  83. package/web/chunk-7ed5jf6e.js.gz +0 -0
  84. package/web/{chunk-x1gr0017.js → chunk-891bpx3c.js} +1 -1
  85. package/web/chunk-891bpx3c.js.br +0 -0
  86. package/web/chunk-891bpx3c.js.gz +0 -0
  87. package/web/{chunk-jnhem746.js → chunk-8h4dc48v.js} +1 -1
  88. package/web/chunk-8h4dc48v.js.br +0 -0
  89. package/web/chunk-8h4dc48v.js.gz +0 -0
  90. package/web/{chunk-82aqq58f.js → chunk-9bs7khrr.js} +1 -1
  91. package/web/chunk-9bs7khrr.js.br +0 -0
  92. package/web/chunk-9bs7khrr.js.gz +0 -0
  93. package/web/{chunk-3ry5cjnp.js → chunk-9ctyqr3n.js} +1 -1
  94. package/web/chunk-9ctyqr3n.js.br +0 -0
  95. package/web/chunk-9ctyqr3n.js.gz +0 -0
  96. package/web/{chunk-508cpafz.js → chunk-9qdx0ekk.js} +2 -2
  97. package/web/chunk-9qdx0ekk.js.br +0 -0
  98. package/web/chunk-9qdx0ekk.js.gz +0 -0
  99. package/web/{chunk-023b3kdx.js → chunk-9r0rnt6d.js} +1 -1
  100. package/web/chunk-9r0rnt6d.js.br +0 -0
  101. package/web/chunk-9r0rnt6d.js.gz +0 -0
  102. package/web/chunk-ac9g3w7v.js +1 -0
  103. package/web/chunk-ac9g3w7v.js.br +0 -0
  104. package/web/chunk-ac9g3w7v.js.gz +0 -0
  105. package/web/{chunk-mvm0gvwj.js → chunk-ackts7ph.js} +1 -1
  106. package/web/chunk-ackts7ph.js.br +0 -0
  107. package/web/chunk-ackts7ph.js.gz +0 -0
  108. package/web/{chunk-wjecy48x.js → chunk-asyqrf38.js} +1 -1
  109. package/web/chunk-asyqrf38.js.br +0 -0
  110. package/web/chunk-asyqrf38.js.gz +0 -0
  111. package/web/{chunk-jw92texh.js → chunk-b13crsv9.js} +1 -1
  112. package/web/chunk-b13crsv9.js.br +0 -0
  113. package/web/chunk-b13crsv9.js.gz +0 -0
  114. package/web/{chunk-nxnkb0w4.js → chunk-brg2zcv5.js} +1 -1
  115. package/web/chunk-brg2zcv5.js.br +0 -0
  116. package/web/chunk-brg2zcv5.js.gz +0 -0
  117. package/web/{chunk-6ktmzq32.js → chunk-cgwnzse1.js} +1 -1
  118. package/web/chunk-cgwnzse1.js.br +0 -0
  119. package/web/chunk-cgwnzse1.js.gz +0 -0
  120. package/web/{chunk-gxwsf4t1.js → chunk-cm4fjb6j.js} +1 -1
  121. package/web/chunk-cm4fjb6j.js.br +0 -0
  122. package/web/chunk-cm4fjb6j.js.gz +0 -0
  123. package/web/{chunk-n0fqhrqv.js → chunk-djrvdzsb.js} +1 -1
  124. package/web/chunk-djrvdzsb.js.br +0 -0
  125. package/web/chunk-djrvdzsb.js.gz +0 -0
  126. package/web/{chunk-7rs26q98.js → chunk-dsffzc1e.js} +1 -1
  127. package/web/chunk-dsffzc1e.js.br +0 -0
  128. package/web/chunk-dsffzc1e.js.gz +0 -0
  129. package/web/{chunk-wqmyjj6w.js → chunk-e1wy8050.js} +1 -1
  130. package/web/chunk-e1wy8050.js.br +0 -0
  131. package/web/chunk-e1wy8050.js.gz +0 -0
  132. package/web/{chunk-z04ncfs3.js → chunk-ebknmxdp.js} +1 -1
  133. package/web/chunk-ebknmxdp.js.br +0 -0
  134. package/web/chunk-ebknmxdp.js.gz +0 -0
  135. package/web/{chunk-crfbqd4d.js → chunk-egjv760p.js} +1 -1
  136. package/web/chunk-egjv760p.js.br +0 -0
  137. package/web/chunk-egjv760p.js.gz +0 -0
  138. package/web/chunk-etpd8y98.js +1 -0
  139. package/web/chunk-etpd8y98.js.br +0 -0
  140. package/web/chunk-etpd8y98.js.gz +0 -0
  141. package/web/chunk-f5kr9p2k.js +1 -0
  142. package/web/chunk-f5kr9p2k.js.br +2 -0
  143. package/web/chunk-f5kr9p2k.js.gz +0 -0
  144. package/web/{chunk-1qd75yjn.js → chunk-fjhqg9ag.js} +1 -1
  145. package/web/chunk-fjhqg9ag.js.br +0 -0
  146. package/web/chunk-fjhqg9ag.js.gz +0 -0
  147. package/web/{chunk-zapwrc5k.js → chunk-fyr6rm2p.js} +1 -1
  148. package/web/chunk-fyr6rm2p.js.br +0 -0
  149. package/web/chunk-fyr6rm2p.js.gz +0 -0
  150. package/web/chunk-grjq1g15.js +1 -0
  151. package/web/chunk-grjq1g15.js.br +0 -0
  152. package/web/chunk-grjq1g15.js.gz +0 -0
  153. package/web/{chunk-eq59kad4.js → chunk-h4bzgvbg.js} +2 -2
  154. package/web/chunk-h4bzgvbg.js.br +0 -0
  155. package/web/chunk-h4bzgvbg.js.gz +0 -0
  156. package/web/{chunk-dy2egpw5.js → chunk-heen0v5d.js} +1 -1
  157. package/web/chunk-heen0v5d.js.br +0 -0
  158. package/web/chunk-heen0v5d.js.gz +0 -0
  159. package/web/{chunk-sb61aqg8.js → chunk-henez15c.js} +1 -1
  160. package/web/chunk-henez15c.js.br +0 -0
  161. package/web/chunk-henez15c.js.gz +0 -0
  162. package/web/chunk-hpcvwdkg.js +1 -0
  163. package/web/chunk-hpcvwdkg.js.br +0 -0
  164. package/web/chunk-hpcvwdkg.js.gz +0 -0
  165. package/web/{chunk-g0s2xxfd.js → chunk-hpvyk6rz.js} +1 -1
  166. package/web/chunk-hpvyk6rz.js.br +0 -0
  167. package/web/chunk-hpvyk6rz.js.gz +0 -0
  168. package/web/chunk-j0dyf1g8.js +2 -0
  169. package/web/chunk-j0dyf1g8.js.br +3 -0
  170. package/web/chunk-j0dyf1g8.js.gz +0 -0
  171. package/web/{chunk-b07y0tzq.js → chunk-jb89v31q.js} +1 -1
  172. package/web/chunk-jb89v31q.js.br +0 -0
  173. package/web/chunk-jb89v31q.js.gz +0 -0
  174. package/web/{chunk-xsfmh8rr.js → chunk-jb949ewp.js} +1 -1
  175. package/web/chunk-jb949ewp.js.br +0 -0
  176. package/web/chunk-jb949ewp.js.gz +0 -0
  177. package/web/{chunk-n1p03ng0.js → chunk-je4bf95v.js} +1 -1
  178. package/web/chunk-je4bf95v.js.br +0 -0
  179. package/web/chunk-je4bf95v.js.gz +0 -0
  180. package/web/{chunk-wv83gygp.js → chunk-js6c1973.js} +1 -1
  181. package/web/chunk-js6c1973.js.br +0 -0
  182. package/web/chunk-js6c1973.js.gz +0 -0
  183. package/web/chunk-k140nr54.js +1 -0
  184. package/web/chunk-k140nr54.js.br +0 -0
  185. package/web/chunk-k140nr54.js.gz +0 -0
  186. package/web/{chunk-hh6vpvar.js → chunk-kknrn2wb.js} +1 -1
  187. package/web/chunk-kknrn2wb.js.br +0 -0
  188. package/web/chunk-kknrn2wb.js.gz +0 -0
  189. package/web/{chunk-ghr3jf15.js → chunk-mhtzdq9d.js} +1 -1
  190. package/web/chunk-mhtzdq9d.js.br +0 -0
  191. package/web/chunk-mhtzdq9d.js.gz +0 -0
  192. package/web/{chunk-22jfhjk3.js → chunk-mrnj2k3v.js} +1 -1
  193. package/web/chunk-mrnj2k3v.js.br +0 -0
  194. package/web/chunk-mrnj2k3v.js.gz +0 -0
  195. package/web/{chunk-g1k9nggh.js → chunk-my0k5w7f.js} +1 -1
  196. package/web/chunk-my0k5w7f.js.br +0 -0
  197. package/web/chunk-my0k5w7f.js.gz +0 -0
  198. package/web/{chunk-58gh3tbh.js → chunk-n08727ym.js} +1 -1
  199. package/web/chunk-n08727ym.js.br +0 -0
  200. package/web/chunk-n08727ym.js.gz +0 -0
  201. package/web/{chunk-d7nrrcwp.js → chunk-n5ghyxwk.js} +1 -1
  202. package/web/chunk-n5ghyxwk.js.br +0 -0
  203. package/web/chunk-n5ghyxwk.js.gz +0 -0
  204. package/web/{chunk-3crfxxst.js → chunk-nt21rjrm.js} +2 -2
  205. package/web/chunk-nt21rjrm.js.br +0 -0
  206. package/web/chunk-nt21rjrm.js.gz +0 -0
  207. package/web/{chunk-j2gkg76r.js → chunk-nzgj9qx5.js} +1 -1
  208. package/web/chunk-nzgj9qx5.js.br +0 -0
  209. package/web/chunk-nzgj9qx5.js.gz +0 -0
  210. package/web/{chunk-20v068s6.js → chunk-p9wm0dv3.js} +1 -1
  211. package/web/chunk-p9wm0dv3.js.br +0 -0
  212. package/web/chunk-p9wm0dv3.js.gz +0 -0
  213. package/web/{chunk-xa9m0mh2.js → chunk-pqh9yszs.js} +1 -1
  214. package/web/chunk-pqh9yszs.js.br +0 -0
  215. package/web/chunk-pqh9yszs.js.gz +0 -0
  216. package/web/chunk-q0vsqq43.js +1 -0
  217. package/web/chunk-q0vsqq43.js.br +0 -0
  218. package/web/chunk-q0vsqq43.js.gz +0 -0
  219. package/web/{chunk-tefm9md2.js → chunk-qv5d69fn.js} +1 -1
  220. package/web/chunk-qv5d69fn.js.br +0 -0
  221. package/web/chunk-qv5d69fn.js.gz +0 -0
  222. package/web/{chunk-37hn49td.js → chunk-r7afv22v.js} +1 -1
  223. package/web/chunk-r7afv22v.js.br +0 -0
  224. package/web/chunk-r7afv22v.js.gz +0 -0
  225. package/web/{chunk-6x9r1z9z.js → chunk-rc6at4k5.js} +1 -1
  226. package/web/chunk-rc6at4k5.js.br +0 -0
  227. package/web/chunk-rc6at4k5.js.gz +0 -0
  228. package/web/{chunk-n033azqs.js → chunk-rnsvrehz.js} +1 -1
  229. package/web/chunk-rnsvrehz.js.br +0 -0
  230. package/web/chunk-rnsvrehz.js.gz +0 -0
  231. package/web/chunk-rsmhn1fq.js +1 -0
  232. package/web/chunk-rsmhn1fq.js.br +0 -0
  233. package/web/chunk-rsmhn1fq.js.gz +0 -0
  234. package/web/chunk-s1p271av.js +1 -0
  235. package/web/chunk-s1p271av.js.br +0 -0
  236. package/web/chunk-s1p271av.js.gz +0 -0
  237. package/web/chunk-sc4kwbnh.js +1 -0
  238. package/web/chunk-sc4kwbnh.js.br +2 -0
  239. package/web/chunk-sc4kwbnh.js.gz +0 -0
  240. package/web/{chunk-cgt871p9.js → chunk-scebh2ee.js} +1 -1
  241. package/web/chunk-scebh2ee.js.br +0 -0
  242. package/web/chunk-scebh2ee.js.gz +0 -0
  243. package/web/{chunk-c1s7faqj.js → chunk-shtkgxz6.js} +1 -1
  244. package/web/chunk-shtkgxz6.js.br +0 -0
  245. package/web/chunk-shtkgxz6.js.gz +0 -0
  246. package/web/{chunk-nb73fq72.js → chunk-spmfwbhd.js} +1 -1
  247. package/web/chunk-spmfwbhd.js.br +0 -0
  248. package/web/chunk-spmfwbhd.js.gz +0 -0
  249. package/web/chunk-svtenejf.js +1 -0
  250. package/web/chunk-svtenejf.js.br +0 -0
  251. package/web/chunk-svtenejf.js.gz +0 -0
  252. package/web/{chunk-qtwjt5mm.js → chunk-t9z1bp8j.js} +1 -1
  253. package/web/chunk-t9z1bp8j.js.br +0 -0
  254. package/web/chunk-t9z1bp8j.js.gz +0 -0
  255. package/web/chunk-tnttdgsc.js +1 -0
  256. package/web/chunk-tnttdgsc.js.br +0 -0
  257. package/web/chunk-tnttdgsc.js.gz +0 -0
  258. package/web/{chunk-6wxxypbv.js → chunk-txdkp6yc.js} +1 -1
  259. package/web/chunk-txdkp6yc.js.br +0 -0
  260. package/web/chunk-txdkp6yc.js.gz +0 -0
  261. package/web/{chunk-gv4zh4er.js → chunk-v34mwgx8.js} +1 -1
  262. package/web/chunk-v34mwgx8.js.br +0 -0
  263. package/web/chunk-v34mwgx8.js.gz +0 -0
  264. package/web/{chunk-00a6amwf.js → chunk-vtp01n96.js} +1 -1
  265. package/web/chunk-vtp01n96.js.br +0 -0
  266. package/web/chunk-vtp01n96.js.gz +0 -0
  267. package/web/{chunk-zs7physk.js → chunk-vx1qmkbm.js} +1 -1
  268. package/web/chunk-vx1qmkbm.js.br +0 -0
  269. package/web/chunk-vx1qmkbm.js.gz +0 -0
  270. package/web/chunk-vxx451tt.js +1 -0
  271. package/web/chunk-vxx451tt.js.br +0 -0
  272. package/web/chunk-vxx451tt.js.gz +0 -0
  273. package/web/{chunk-hxqqy585.js → chunk-w8epfc0c.js} +1 -1
  274. package/web/chunk-w8epfc0c.js.br +0 -0
  275. package/web/chunk-w8epfc0c.js.gz +0 -0
  276. package/web/{chunk-shtvhd61.js → chunk-whgh2r7d.js} +1 -1
  277. package/web/chunk-whgh2r7d.js.br +0 -0
  278. package/web/chunk-whgh2r7d.js.gz +0 -0
  279. package/web/chunk-x0p1n5ws.js +1 -0
  280. package/web/chunk-x0p1n5ws.js.br +2 -0
  281. package/web/chunk-x0p1n5ws.js.gz +0 -0
  282. package/web/{chunk-jcbheqv1.js → chunk-x2tk9zeq.js} +1 -1
  283. package/web/chunk-x2tk9zeq.js.br +0 -0
  284. package/web/chunk-x2tk9zeq.js.gz +0 -0
  285. package/web/chunk-xbt045kt.js +1 -0
  286. package/web/chunk-xbt045kt.js.br +2 -0
  287. package/web/chunk-xbt045kt.js.gz +0 -0
  288. package/web/{chunk-f05s9gsw.js → chunk-xh3agbvb.js} +1 -1
  289. package/web/chunk-xh3agbvb.js.br +0 -0
  290. package/web/chunk-xh3agbvb.js.gz +0 -0
  291. package/web/{chunk-407zrkgx.js → chunk-xpw1spgj.js} +1 -1
  292. package/web/chunk-xpw1spgj.js.br +0 -0
  293. package/web/chunk-xpw1spgj.js.gz +0 -0
  294. package/web/{chunk-scwrkcdw.js → chunk-yp2jydfj.js} +1 -1
  295. package/web/chunk-yp2jydfj.js.br +0 -0
  296. package/web/chunk-yp2jydfj.js.gz +0 -0
  297. package/web/{chunk-g26mzwzc.js → chunk-yxp1es3b.js} +1 -1
  298. package/web/chunk-yxp1es3b.js.br +0 -0
  299. package/web/chunk-yxp1es3b.js.gz +0 -0
  300. package/web/{chunk-fmbc7t17.js → chunk-yzrww95m.js} +1 -1
  301. package/web/chunk-yzrww95m.js.br +0 -0
  302. package/web/chunk-yzrww95m.js.gz +0 -0
  303. package/web/{chunk-qgv81n98.js → chunk-z502b5p0.js} +1 -1
  304. package/web/chunk-z502b5p0.js.br +0 -0
  305. package/web/chunk-z502b5p0.js.gz +0 -0
  306. package/web/chunk-zny7cya7.js +1 -0
  307. package/web/chunk-zny7cya7.js.br +2 -0
  308. package/web/chunk-zny7cya7.js.gz +0 -0
  309. package/web/index.html +1 -1
  310. package/web/index.html.br +0 -0
  311. package/web/index.html.gz +0 -0
  312. package/web/chunk-00a6amwf.js.br +0 -0
  313. package/web/chunk-00a6amwf.js.gz +0 -0
  314. package/web/chunk-023b3kdx.js.br +0 -0
  315. package/web/chunk-023b3kdx.js.gz +0 -0
  316. package/web/chunk-1bzdt1n8.js +0 -1
  317. package/web/chunk-1bzdt1n8.js.br +0 -2
  318. package/web/chunk-1bzdt1n8.js.gz +0 -0
  319. package/web/chunk-1fnxbfkf.js.br +0 -0
  320. package/web/chunk-1fnxbfkf.js.gz +0 -0
  321. package/web/chunk-1qd75yjn.js.br +0 -0
  322. package/web/chunk-1qd75yjn.js.gz +0 -0
  323. package/web/chunk-20v068s6.js.br +0 -0
  324. package/web/chunk-20v068s6.js.gz +0 -0
  325. package/web/chunk-22jfhjk3.js.br +0 -0
  326. package/web/chunk-22jfhjk3.js.gz +0 -0
  327. package/web/chunk-37hn49td.js.br +0 -0
  328. package/web/chunk-37hn49td.js.gz +0 -0
  329. package/web/chunk-3crfxxst.js.br +0 -0
  330. package/web/chunk-3crfxxst.js.gz +0 -0
  331. package/web/chunk-3hg9a6xa.js +0 -1
  332. package/web/chunk-3hg9a6xa.js.br +0 -0
  333. package/web/chunk-3hg9a6xa.js.gz +0 -0
  334. package/web/chunk-3m2nnnk5.js.br +0 -0
  335. package/web/chunk-3m2nnnk5.js.gz +0 -0
  336. package/web/chunk-3ry5cjnp.js.br +0 -0
  337. package/web/chunk-3ry5cjnp.js.gz +0 -0
  338. package/web/chunk-407zrkgx.js.br +0 -0
  339. package/web/chunk-407zrkgx.js.gz +0 -0
  340. package/web/chunk-43e1ste5.js +0 -1
  341. package/web/chunk-43e1ste5.js.br +0 -0
  342. package/web/chunk-43e1ste5.js.gz +0 -0
  343. package/web/chunk-45ex0e3e.js.br +0 -0
  344. package/web/chunk-45ex0e3e.js.gz +0 -0
  345. package/web/chunk-508cpafz.js.br +0 -0
  346. package/web/chunk-508cpafz.js.gz +0 -0
  347. package/web/chunk-538r4sey.js +0 -1
  348. package/web/chunk-538r4sey.js.br +0 -0
  349. package/web/chunk-538r4sey.js.gz +0 -0
  350. package/web/chunk-55zs0yq1.js +0 -1
  351. package/web/chunk-55zs0yq1.js.br +0 -0
  352. package/web/chunk-55zs0yq1.js.gz +0 -0
  353. package/web/chunk-58gh3tbh.js.br +0 -0
  354. package/web/chunk-58gh3tbh.js.gz +0 -0
  355. package/web/chunk-5h3r1hpg.js.br +0 -0
  356. package/web/chunk-5h3r1hpg.js.gz +0 -0
  357. package/web/chunk-68q4nnmc.js.br +0 -3
  358. package/web/chunk-68q4nnmc.js.gz +0 -0
  359. package/web/chunk-6ktmzq32.js.br +0 -0
  360. package/web/chunk-6ktmzq32.js.gz +0 -0
  361. package/web/chunk-6ry6x1ez.js +0 -1
  362. package/web/chunk-6ry6x1ez.js.br +0 -0
  363. package/web/chunk-6ry6x1ez.js.gz +0 -0
  364. package/web/chunk-6wxxypbv.js.br +0 -0
  365. package/web/chunk-6wxxypbv.js.gz +0 -0
  366. package/web/chunk-6x9r1z9z.js.br +0 -0
  367. package/web/chunk-6x9r1z9z.js.gz +0 -0
  368. package/web/chunk-7devrtv4.js +0 -2
  369. package/web/chunk-7devrtv4.js.br +0 -3
  370. package/web/chunk-7devrtv4.js.gz +0 -0
  371. package/web/chunk-7rs26q98.js.br +0 -0
  372. package/web/chunk-7rs26q98.js.gz +0 -0
  373. package/web/chunk-82aqq58f.js.br +0 -0
  374. package/web/chunk-82aqq58f.js.gz +0 -0
  375. package/web/chunk-a1cpkzwh.js.br +0 -0
  376. package/web/chunk-a1cpkzwh.js.gz +0 -0
  377. package/web/chunk-a31z4c14.js.br +0 -0
  378. package/web/chunk-a31z4c14.js.gz +0 -0
  379. package/web/chunk-b07y0tzq.js.br +0 -0
  380. package/web/chunk-b07y0tzq.js.gz +0 -0
  381. package/web/chunk-b4d1948q.js.br +0 -0
  382. package/web/chunk-b4d1948q.js.gz +0 -0
  383. package/web/chunk-btk2h3vh.js.br +0 -0
  384. package/web/chunk-btk2h3vh.js.gz +0 -0
  385. package/web/chunk-c1s7faqj.js.br +0 -0
  386. package/web/chunk-c1s7faqj.js.gz +0 -0
  387. package/web/chunk-cgt871p9.js.br +0 -0
  388. package/web/chunk-cgt871p9.js.gz +0 -0
  389. package/web/chunk-crfbqd4d.js.br +0 -0
  390. package/web/chunk-crfbqd4d.js.gz +0 -0
  391. package/web/chunk-ctr4kt7p.js.br +0 -0
  392. package/web/chunk-ctr4kt7p.js.gz +0 -0
  393. package/web/chunk-d6wcabaa.css +0 -1
  394. package/web/chunk-d6wcabaa.css.br +0 -0
  395. package/web/chunk-d6wcabaa.css.gz +0 -0
  396. package/web/chunk-d7nrrcwp.js.br +0 -0
  397. package/web/chunk-d7nrrcwp.js.gz +0 -0
  398. package/web/chunk-df9ja645.js.br +0 -0
  399. package/web/chunk-df9ja645.js.gz +0 -0
  400. package/web/chunk-dhxc6xe9.js +0 -1
  401. package/web/chunk-dhxc6xe9.js.br +0 -2
  402. package/web/chunk-dhxc6xe9.js.gz +0 -0
  403. package/web/chunk-dy2egpw5.js.br +0 -0
  404. package/web/chunk-dy2egpw5.js.gz +0 -0
  405. package/web/chunk-eq59kad4.js.br +0 -0
  406. package/web/chunk-eq59kad4.js.gz +0 -0
  407. package/web/chunk-f05s9gsw.js.br +0 -0
  408. package/web/chunk-f05s9gsw.js.gz +0 -0
  409. package/web/chunk-f2bb976c.js.br +0 -0
  410. package/web/chunk-f2bb976c.js.gz +0 -0
  411. package/web/chunk-f4aabnnv.js +0 -1
  412. package/web/chunk-f4aabnnv.js.br +0 -0
  413. package/web/chunk-f4aabnnv.js.gz +0 -0
  414. package/web/chunk-fmbc7t17.js.br +0 -0
  415. package/web/chunk-fmbc7t17.js.gz +0 -0
  416. package/web/chunk-g0s2xxfd.js.br +0 -0
  417. package/web/chunk-g0s2xxfd.js.gz +0 -0
  418. package/web/chunk-g1k9nggh.js.br +0 -0
  419. package/web/chunk-g1k9nggh.js.gz +0 -0
  420. package/web/chunk-g26mzwzc.js.br +0 -0
  421. package/web/chunk-g26mzwzc.js.gz +0 -0
  422. package/web/chunk-g7b4p9k9.js.br +0 -0
  423. package/web/chunk-g7b4p9k9.js.gz +0 -0
  424. package/web/chunk-ghr3jf15.js.br +0 -0
  425. package/web/chunk-ghr3jf15.js.gz +0 -0
  426. package/web/chunk-gv4zh4er.js.br +0 -0
  427. package/web/chunk-gv4zh4er.js.gz +0 -0
  428. package/web/chunk-gw0e69yj.js +0 -1
  429. package/web/chunk-gw0e69yj.js.br +0 -0
  430. package/web/chunk-gw0e69yj.js.gz +0 -0
  431. package/web/chunk-gxwsf4t1.js.br +0 -0
  432. package/web/chunk-gxwsf4t1.js.gz +0 -0
  433. package/web/chunk-hh6vpvar.js.br +0 -0
  434. package/web/chunk-hh6vpvar.js.gz +0 -0
  435. package/web/chunk-hxqqy585.js.br +0 -0
  436. package/web/chunk-hxqqy585.js.gz +0 -0
  437. package/web/chunk-hxsrph02.js.br +0 -0
  438. package/web/chunk-hxsrph02.js.gz +0 -0
  439. package/web/chunk-hxx6ad4x.js +0 -1
  440. package/web/chunk-hxx6ad4x.js.br +0 -0
  441. package/web/chunk-hxx6ad4x.js.gz +0 -0
  442. package/web/chunk-j2gkg76r.js.br +0 -0
  443. package/web/chunk-j2gkg76r.js.gz +0 -0
  444. package/web/chunk-jcbheqv1.js.br +0 -0
  445. package/web/chunk-jcbheqv1.js.gz +0 -0
  446. package/web/chunk-jhx6v9es.js +0 -1
  447. package/web/chunk-jhx6v9es.js.br +0 -0
  448. package/web/chunk-jhx6v9es.js.gz +0 -0
  449. package/web/chunk-jnhem746.js.br +0 -0
  450. package/web/chunk-jnhem746.js.gz +0 -0
  451. package/web/chunk-jr796qsk.js +0 -1
  452. package/web/chunk-jr796qsk.js.br +0 -0
  453. package/web/chunk-jr796qsk.js.gz +0 -0
  454. package/web/chunk-jw92texh.js.br +0 -0
  455. package/web/chunk-jw92texh.js.gz +0 -0
  456. package/web/chunk-mvm0gvwj.js.br +0 -0
  457. package/web/chunk-mvm0gvwj.js.gz +0 -0
  458. package/web/chunk-n033azqs.js.br +0 -0
  459. package/web/chunk-n033azqs.js.gz +0 -0
  460. package/web/chunk-n0fqhrqv.js.br +0 -0
  461. package/web/chunk-n0fqhrqv.js.gz +0 -0
  462. package/web/chunk-n1p03ng0.js.br +0 -0
  463. package/web/chunk-n1p03ng0.js.gz +0 -0
  464. package/web/chunk-nb73fq72.js.br +0 -0
  465. package/web/chunk-nb73fq72.js.gz +0 -0
  466. package/web/chunk-nxnkb0w4.js.br +0 -0
  467. package/web/chunk-nxnkb0w4.js.gz +0 -0
  468. package/web/chunk-nymsmy8d.js.br +0 -0
  469. package/web/chunk-nymsmy8d.js.gz +0 -0
  470. package/web/chunk-nzqxb0ea.js +0 -1
  471. package/web/chunk-nzqxb0ea.js.br +0 -0
  472. package/web/chunk-nzqxb0ea.js.gz +0 -0
  473. package/web/chunk-p26b4zdm.js +0 -1
  474. package/web/chunk-p26b4zdm.js.br +0 -0
  475. package/web/chunk-p26b4zdm.js.gz +0 -0
  476. package/web/chunk-qa0wwff0.js.br +0 -0
  477. package/web/chunk-qa0wwff0.js.gz +0 -0
  478. package/web/chunk-qgv81n98.js.br +0 -0
  479. package/web/chunk-qgv81n98.js.gz +0 -0
  480. package/web/chunk-qtwjt5mm.js.br +0 -0
  481. package/web/chunk-qtwjt5mm.js.gz +0 -0
  482. package/web/chunk-r49dy5vx.js +0 -1
  483. package/web/chunk-r49dy5vx.js.br +0 -0
  484. package/web/chunk-r49dy5vx.js.gz +0 -0
  485. package/web/chunk-r97hd8wk.js.br +0 -0
  486. package/web/chunk-r97hd8wk.js.gz +0 -0
  487. package/web/chunk-sb61aqg8.js.br +0 -0
  488. package/web/chunk-sb61aqg8.js.gz +0 -0
  489. package/web/chunk-scwrkcdw.js.br +0 -0
  490. package/web/chunk-scwrkcdw.js.gz +0 -0
  491. package/web/chunk-shtvhd61.js.br +0 -0
  492. package/web/chunk-shtvhd61.js.gz +0 -0
  493. package/web/chunk-t5e9vh89.js +0 -1
  494. package/web/chunk-t5e9vh89.js.br +0 -0
  495. package/web/chunk-t5e9vh89.js.gz +0 -0
  496. package/web/chunk-tefm9md2.js.br +0 -0
  497. package/web/chunk-tefm9md2.js.gz +0 -0
  498. package/web/chunk-tr7fg3tv.js +0 -8
  499. package/web/chunk-tr7fg3tv.js.br +0 -0
  500. package/web/chunk-tr7fg3tv.js.gz +0 -0
  501. package/web/chunk-v5xf47q0.js +0 -1
  502. package/web/chunk-v5xf47q0.js.br +0 -0
  503. package/web/chunk-v5xf47q0.js.gz +0 -0
  504. package/web/chunk-vwms8c7b.js.br +0 -0
  505. package/web/chunk-vwms8c7b.js.gz +0 -0
  506. package/web/chunk-w2gy2tmp.js.br +0 -0
  507. package/web/chunk-w2gy2tmp.js.gz +0 -0
  508. package/web/chunk-whfh2wev.js.br +0 -0
  509. package/web/chunk-whfh2wev.js.gz +0 -0
  510. package/web/chunk-wjecy48x.js.br +0 -0
  511. package/web/chunk-wjecy48x.js.gz +0 -0
  512. package/web/chunk-wqmyjj6w.js.br +0 -0
  513. package/web/chunk-wqmyjj6w.js.gz +0 -0
  514. package/web/chunk-wv83gygp.js.br +0 -0
  515. package/web/chunk-wv83gygp.js.gz +0 -0
  516. package/web/chunk-x1gr0017.js.br +0 -0
  517. package/web/chunk-x1gr0017.js.gz +0 -0
  518. package/web/chunk-xa9m0mh2.js.br +0 -0
  519. package/web/chunk-xa9m0mh2.js.gz +0 -0
  520. package/web/chunk-xjbxndxz.js.br +0 -0
  521. package/web/chunk-xjbxndxz.js.gz +0 -0
  522. package/web/chunk-xsfmh8rr.js.br +0 -0
  523. package/web/chunk-xsfmh8rr.js.gz +0 -0
  524. package/web/chunk-xvsb3w1f.js +0 -1
  525. package/web/chunk-xvsb3w1f.js.br +0 -0
  526. package/web/chunk-xvsb3w1f.js.gz +0 -0
  527. package/web/chunk-ynpx7j96.js +0 -1
  528. package/web/chunk-ynpx7j96.js.br +0 -0
  529. package/web/chunk-ynpx7j96.js.gz +0 -0
  530. package/web/chunk-z04ncfs3.js.br +0 -0
  531. package/web/chunk-z04ncfs3.js.gz +0 -0
  532. package/web/chunk-zapwrc5k.js.br +0 -0
  533. package/web/chunk-zapwrc5k.js.gz +0 -0
  534. package/web/chunk-zs7physk.js.br +0 -0
  535. package/web/chunk-zs7physk.js.gz +0 -0
Binary file
Binary file
@@ -0,0 +1 @@
1
+ import{Ds}from"./chunk-9qdx0ekk.js";export{Ds as createGitGraphServices};
@@ -0,0 +1,2 @@
1
+ �$�import{Ds}from"./chunk-9qdx0ekk.js";export{Ds as createGitGraphServices};
2
+ 
Binary file
@@ -1,2 +1,2 @@
1
- import{a,m,e,n,b,l,xe,cr,re}from"./chunk-hxsrph02.js";var g=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7",key:"lw07rv"}]],s=l("chart-spline",g);function Ni(t){let o=b();o.useTheme();let[u,d]=a("preview"),r=t.streaming&&!t.rendered,c=!t.streaming&&!t.rendered&&Boolean(t.error),i=u==="code"||r;return n(o.Panel,{"aria-label":t.title,"data-render-pending":t.pending&&!c?"true":void 0,className:"group/graph relative my-4 font-sans not-italic first:mt-0 last:mb-0",children:[e("div",{role:"toolbar","aria-label":`${t.title}操作`,className:r?"absolute top-2 right-2 z-10 flex items-center":o.style("surface.toolbarFloating","absolute top-2 right-2 z-10 opacity-0 transition-opacity duration-150 group-hover/graph:opacity-100 focus-within:opacity-100 [@media(hover:none)]:opacity-70"),children:r?n("span",{className:o.style("control.badge","gap-1.5 rounded-full px-2 py-0.5 text-2xs"),children:[e(re,{className:"size-3 animate-spin"}),"生成",t.title]}):n(m,{children:[e("button",{type:"button","aria-label":i?"查看图表":"查看代码",title:i?"查看图表":"查看代码",onClick:()=>d(i?"preview":"code"),className:"flex size-6 items-center justify-center rounded-md text-dim hover:bg-raised hover:text-ink [&_svg]:size-3.5",children:i?e(s,{}):e(cr,{})}),e(o.CopyButton,{text:t.code,size:"icon-sm",label:"复制代码"})]})}),i&&e(o.Code,{code:t.code,lang:t.codeLang,className:"px-4 py-3"}),c&&!i&&n("div",{role:"alert",className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[e(xe,{className:"size-5 text-warning"}),e("p",{className:"max-w-full text-xs break-words text-dim",children:t.error}),e("button",{type:"button",onClick:()=>d("code"),className:"text-xs text-accent-strong underline underline-offset-2",children:"查看代码"})]}),e("div",{hidden:i||c,children:t.children})]})}
1
+ import{a,m,e,n,b,l,xe,cr,re}from"./chunk-56a6zytc.js";var g=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7",key:"lw07rv"}]],s=l("chart-spline",g);function Ni(t){let o=b();o.useTheme();let[u,d]=a("preview"),r=t.streaming&&!t.rendered,c=!t.streaming&&!t.rendered&&Boolean(t.error),i=u==="code"||r;return n(o.Panel,{"aria-label":t.title,"data-render-pending":t.pending&&!c?"true":void 0,className:"group/graph relative my-4 font-sans not-italic first:mt-0 last:mb-0",children:[e("div",{role:"toolbar","aria-label":`${t.title}操作`,className:r?"absolute top-2 right-2 z-10 flex items-center":o.style("surface.toolbarFloating","absolute top-2 right-2 z-10 opacity-0 transition-opacity duration-150 group-hover/graph:opacity-100 focus-within:opacity-100 [@media(hover:none)]:opacity-70"),children:r?n("span",{className:o.style("control.badge","gap-1.5 rounded-full px-2 py-0.5 text-2xs"),children:[e(re,{className:"size-3 animate-spin"}),"生成",t.title]}):n(m,{children:[e("button",{type:"button","aria-label":i?"查看图表":"查看代码",title:i?"查看图表":"查看代码",onClick:()=>d(i?"preview":"code"),className:"flex size-6 items-center justify-center rounded-md text-dim hover:bg-raised hover:text-ink [&_svg]:size-3.5",children:i?e(s,{}):e(cr,{})}),e(o.CopyButton,{text:t.code,size:"icon-sm",label:"复制代码"})]})}),i&&e(o.Code,{code:t.code,lang:t.codeLang,className:"px-4 py-3"}),c&&!i&&n("div",{role:"alert",className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[e(xe,{className:"size-5 text-warning"}),e("p",{className:"max-w-full text-xs break-words text-dim",children:t.error}),e("button",{type:"button",onClick:()=>d("code"),className:"text-xs text-accent-strong underline underline-offset-2",children:"查看代码"})]}),e("div",{hidden:i||c,children:t.children})]})}
2
2
  export{Ni};
Binary file
Binary file
@@ -1 +1 @@
1
- import{y,s,o,a,m,e,n,b,l,xe,Ft,Be,ke,ye,gt,Ht,me,ce,Yc,mi,fi,hi,ps}from"./chunk-hxsrph02.js";import{wi,ki,Ci}from"./chunk-68q4nnmc.js";var be=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],pe=l("rotate-cw",be);function fe(i){let{ApprovalPanel:P,Button:S,CopyButton:H,DetailChip:R,DetailList:g,DetailRow:p,DetailTitle:M,Dialog:D,Switch:Z,Tooltip:u,cn:te,confirm:w,useTheme:ne}=b();ne();let{info:r,connection:j}=i,N=i.projectID?`?projectID=${encodeURIComponent(i.projectID)}`:"",[G,se]=a(),[J,z]=a(),[h,T]=a(!1),[v,E]=a(),[B,O]=a(),Y=r.status.status==="connected",ee=r.status.status==="needs_auth",A=r.status.status==="failed",t=r.config.type==="remote"&&Boolean(r.config.oauth),I=r.projectID!==(i.projectID??null);s(()=>{function d(k){if(k&&k!==r.name)return;j.request(`/api/mcp/${encodeURIComponent(r.name)}/connect${N}`,{method:"POST"}).then((C)=>i.onChanged(C)).catch((C)=>{z(C instanceof Error?C.message:"授权后重新连接失败")})}function c(k){if(k.origin!==window.location.origin)return;if(k.data?.type==="mcp-oauth-success")d(k.data.name)}function f(k){if(k.key==="basalt-mcp-oauth-event"&&k.newValue)try{let C=JSON.parse(k.newValue);d(C.name)}catch(C){}}window.addEventListener("message",c),window.addEventListener("storage",f);let K;if("BroadcastChannel"in window)K=new BroadcastChannel("basalt-mcp-oauth"),K.onmessage=(k)=>{if(k.data?.type==="mcp-oauth-success")d(k.data.name)};return()=>{window.removeEventListener("message",c),window.removeEventListener("storage",f),K?.close()}},[j,r.name,N,i]),s(()=>{if(r.status.status!=="connected")return;j.request(`/api/mcp/${encodeURIComponent(r.name)}/tools${N}`).then((d)=>{if(Array.isArray(d))se(d),z(void 0)}).catch((d)=>{z(d instanceof Error?d.message:"获取工具失败")})},[j,r.name,N,r.status.status]);async function x(d){T(!0);try{let c=await j.request(`/api/mcp/${encodeURIComponent(r.name)}/${d}${N}`,{method:"POST"});i.onChanged(c)}catch{}finally{T(!1)}}async function F(){if(!v||h)return;let d=v.fingerprint;O(void 0),T(!0);try{let c=await j.request(`/api/mcp/${encodeURIComponent(r.name)}/trust${N}`,{method:"POST",body:JSON.stringify({fingerprint:d})});i.onChanged(c),E(void 0)}catch(c){O(c instanceof Error?c.message:"确认失败,请刷新配置")}finally{T(!1)}}async function U(){let d=window.open("about:blank","_blank","width=600,height=700");if(!d){z("授权窗口被浏览器拦截,请允许弹出窗口后重试");return}T(!0),z(void 0);try{let c=await j.request(`/api/mcp/${encodeURIComponent(r.name)}/oauth/authorize${N}`,{method:"POST"}),f=new URL(c.authorizationUrl);if(f.protocol!=="https:"&&f.protocol!=="http:")throw Error("授权服务返回了不支持的链接协议");d.location.href=f.href}catch(c){d.close(),z(c instanceof Error?c.message:"获取授权链接失败")}finally{T(!1)}}async function ie(){T(!0);try{let d=await j.request(`/api/mcp/${encodeURIComponent(r.name)}/oauth/clear${N}`,{method:"POST"});i.onChanged(d)}finally{T(!1)}}async function _(){if(!await w({title:`删除 ${r.name}?`,description:"删除后将断开连接并不再向会话提供其工具。",action:"删除",danger:!0}))return;T(!0);try{await j.request(`/api/mcp/${encodeURIComponent(r.name)}${N}`,{method:"DELETE"}),i.onChanged(),i.onClose()}finally{T(!1)}}let ae=r.config,re=hi(ae),V="error"in r.status?r.status.error:void 0,oe=ae.enabled===!1,le=!oe&&!ee&&r.status.status!=="needs_trust";if(v)return e(D,{open:!0,onOpenChange:(d)=>{if(!d&&!h)E(void 0)},title:`信任 ${r.name}?`,size:"lg",children:n(P,{hideTitle:!0,title:"信任项目本地命令",command:v.command,approveLabel:"信任并连接",busy:h?"approve":void 0,error:B,onDecision:(d)=>{if(d)F();else E(void 0)},description:"项目命令将以你的权限运行,请确认来源可信。",children:[n("div",{className:"flex min-w-0 items-start gap-2 text-xs text-dim",children:[e("span",{className:"shrink-0 leading-5",children:"目录"}),e("code",{className:"min-w-0 flex-1 leading-5 [overflow-wrap:anywhere]",children:v.cwd}),e(H,{text:v.cwd,label:"复制工作目录",size:"icon-xs"})]}),n("section",{className:"min-w-0 space-y-2",children:[e("h3",{className:"text-xs font-medium text-dim",children:"环境变量"}),v.variables.length?e("div",{className:"flex min-w-0 flex-wrap gap-2",children:v.variables.map((d)=>e("span",{className:"max-w-full rounded-md bg-raised px-2 py-1 font-mono text-xs text-dim [overflow-wrap:anywhere]",children:d},d))}):e("p",{className:"text-xs text-faint",children:"无"})]}),e("p",{className:"text-xs leading-5 text-faint",children:"配置变更后需重新确认。"})]})});return e(D,{open:!0,onOpenChange:(d)=>{if(!d&&!h)i.onClose()},title:e(M,{icon:ae.type==="local"?e(Ht,{}):e(Be,{}),name:r.name,meta:[ae.type==="local"?"本地命令":"远程服务",fi(r.scope),t&&"OAuth 2.0"]}),size:"lg",footer:n("div",{className:"flex w-full items-center justify-between gap-2 max-sm:[&>*]:flex-none",children:[n("div",{className:"inline-flex items-center gap-2.5 text-ui text-dim",children:[!I&&e(Z,{label:`启用 ${r.name}`,checked:!oe,disabled:h||i.toggling,onCheckedChange:i.onToggle}),e(ps,{info:r,tools:!0})]}),n("div",{className:"flex items-center gap-1.5",children:[r.status.status==="needs_trust"&&e(S,{type:"button",size:"sm",onClick:()=>{if(r.status.status!=="needs_trust"||r.config.type!=="local")return;O(void 0),E({fingerprint:r.status.fingerprint,cwd:r.status.cwd,command:hi(r.config),variables:Object.keys(r.config.environment??{})})},disabled:h,children:"信任并连接"}),t&&e(S,{type:"button",variant:"ghost",size:"sm",onClick:ie,disabled:h,children:"清除凭据"}),!I&&e(u,{label:"删除服务器",children:e(S,{type:"button",variant:"danger-ghost",size:"icon","aria-label":"删除服务器",onClick:_,disabled:h,children:e(me,{className:"size-4"})})}),le&&e(u,{label:"终止服务进程并重新启动,让更新后的代码生效",children:e(S,{type:"button",variant:"ghost",size:"icon","aria-label":"重启",onClick:()=>x("restart"),disabled:h,children:e(pe,{className:te("size-4",h&&"animate-spin")})})}),le&&e(S,{type:"button",size:"sm",onClick:()=>x(Y?"disconnect":"connect"),disabled:h,children:Y?"断开连接":"连接"}),!I&&n(S,{type:"button",size:"sm",onClick:i.onEdit,disabled:h,children:[e(gt,{className:"size-3.5"}),e("span",{children:"编辑配置"})]})]})]}),children:n(g,{children:[n(p,{label:ae.type==="local"?"命令":"地址",children:[e("span",{className:"min-w-0 font-mono text-xs text-dim leading-5.5 [overflow-wrap:anywhere]",children:re}),e(H,{text:re,label:"复制",size:"icon-xs",className:"shrink-0 text-faint hover:text-ink"})]}),ee&&n("div",{className:"flex items-center justify-between gap-4 py-3.5 max-sm:flex-col max-sm:items-start max-sm:gap-2.5",children:[n("div",{className:"min-w-0 space-y-1",children:[e("p",{className:"text-ui text-ink leading-5",children:"需要授权"}),e("p",{className:"text-xs text-faint leading-5",children:"完成授权后即可使用,凭据自动保存。"})]}),e(S,{type:"button",size:"sm",className:"shrink-0",onClick:U,disabled:h,children:h?"正在连接…":"连接账户"})]}),A&&e(p,{label:"错误",children:e("p",{className:"min-w-0 font-mono text-xs text-danger leading-5 [overflow-wrap:anywhere]",children:V})}),e(p,{label:"工具",children:J?e("span",{className:"text-danger",children:J}):!Y?e("span",{className:"text-faint",children:"连接后列出工具"}):!G?e("span",{role:"status",className:"text-faint",children:"正在获取"}):G.length===0?e("span",{className:"text-faint",children:"服务器没有声明任何工具"}):G.map((d)=>e(R,{mono:!0,title:d.description,children:d.name},d.name))})]})})}var Ce=/^[A-Za-z0-9_-]{1,64}$/;function Q(i){return e("span",{className:"truncate text-xs text-faint",children:i.children})}function ge(i){let{pairs:P,onChange:S,InputComponent:H}=i,R=(g,p)=>S(P.map((M,D)=>D===g?{...M,...p}:M));return n("div",{className:"space-y-2",children:[n("div",{className:"flex min-h-7 items-center gap-2",children:[e("span",{className:"shrink-0 text-ui font-medium text-dim",children:i.label}),e(Q,{children:i.tip}),n("button",{type:"button",className:"ml-auto inline-flex h-7 shrink-0 cursor-pointer items-center gap-1 rounded-lg px-2 text-xs font-medium text-dim transition-colors hover:bg-raised hover:text-ink",onClick:()=>S([...P,{key:"",value:"",saved:!1}]),children:[e(ke,{className:"size-3.5"}),"添加"]})]}),P.map((g,p)=>n("div",{className:"flex min-w-0 items-center gap-1.5",children:[e(H,{"aria-label":`${i.keyLabel} ${p+1}`,placeholder:i.keyLabel,value:g.key,readOnly:g.saved,onChange:(M)=>R(p,{key:M.target.value}),className:"min-w-0 flex-[2] font-mono text-xs"}),e(H,{"aria-label":`${i.keyLabel} ${g.key||p+1} 的值`,type:"password",autoComplete:"off",placeholder:g.saved?"已保存,留空保持不变":"值",value:g.value,onChange:(M)=>R(p,{value:M.target.value}),className:"min-w-0 flex-[3] font-mono text-xs"}),e("button",{type:"button","aria-label":`删除 ${g.key||"该项"}`,className:"flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-lg text-faint transition-colors hover:bg-danger/10 hover:text-danger",onClick:()=>S(P.filter((M,D)=>D!==p)),children:e(ce,{className:"size-4"})})]},p))]})}function he(i){return Object.keys(i??{}).map((P)=>({key:P,value:"",saved:!0}))}function ve(i){let{Button:P,Segmented:S,Dialog:H,Form:R,Field:g,Input:p,Switch:M,style:D,useTheme:Z}=b();Z();let{existing:u}=i,[te,w]=a(u?.config.type??"local"),[ne,r]=a(u?.name??""),[j,N]=a(u?.config.type==="local"?mi(u.config.command):""),[G,se]=a(u?.config.type==="remote"?u.config.url:""),[J,z]=a(he(u?.config.type==="local"?u.config.environment:void 0)),[h,T]=a(he(u?.config.type==="remote"?u.config.headers:void 0)),v=u?.config.type==="remote"?u.config.oauth:void 0,[E,B]=a(Boolean(v)),[O,Y]=a(typeof v==="object"&&v.clientId?v.clientId:""),[ee,A]=a(""),[t,I]=a(typeof v==="object"&&v.scope?v.scope:""),[x,F]=a(u?.config.defer??"default"),[U,ie]=a(u?.config.timeout!==void 0?String(u.config.timeout):""),[_,ae]=a(u?.config.defer!==void 0||u?.config.timeout!==void 0),[re,V]=a(),[oe,le]=a(!1);async function d(c){c.preventDefault(),V(void 0);let f=ne.trim();if(!u&&!Ce.test(f)){V("名称只能包含英文字母、数字、下划线与中划线,长度 1-64");return}if(!u&&i.taken.includes(f)){V("同名服务器已存在");return}let K=U.trim()?Number.parseInt(U.trim(),10):void 0;if(K!==void 0&&(!Number.isFinite(K)||K<=0)){V("超时时间须为大于 0 的毫秒数");return}let k;if(te==="local"){let C=Yc(j.trim());if(!C.length){V("请输入启动命令");return}let W={};for(let q of J){let L=q.key.trim();if(!L)continue;if(!q.saved||q.value)W[L]=q.value}k={type:"local",command:C,environment:Object.keys(W).length?W:void 0,enabled:u?u.config.enabled:!0,defer:x==="default"?void 0:x,timeout:K}}else{let C=G.trim();try{let L=new URL(C);if(L.protocol!=="http:"&&L.protocol!=="https:")throw Error("bad protocol")}catch{V("请输入合法的 HTTP 或 HTTPS 地址");return}let W={};for(let L of h){let de=L.key.trim();if(!de)continue;if(!L.saved||L.value)W[de]=L.value}let q;if(E){let L=O.trim(),de=ee.trim(),ue=t.trim();if(L||de||ue)q={clientId:L||void 0,clientSecret:de||void 0,scope:ue||void 0};else q=!0}else q=!1;k={type:"remote",url:C,headers:Object.keys(W).length?W:void 0,oauth:q,enabled:u?u.config.enabled:!0,defer:x==="default"?void 0:x,timeout:K}}le(!0);try{let C=u?.name??f,W=u?u.projectID:i.projectID,q=W?`?projectID=${encodeURIComponent(W)}`:"";await i.connection.request(`/api/mcp/${encodeURIComponent(C)}${q}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(k)}),i.onSaved()}catch(C){V(C instanceof Error?C.message:"保存失败")}finally{le(!1)}}return e(H,{open:!0,onOpenChange:(c)=>{if(!c&&!oe)i.onClose()},title:u?`编辑 ${u.name}`:"添加 MCP 服务器",size:"lg",footer:n("div",{className:"flex w-full justify-end gap-2.5",children:[e(P,{type:"button",variant:"ghost",onClick:i.onClose,disabled:oe,className:"min-w-20",children:"取消"}),e(P,{type:"submit",form:"mcp-server-form",variant:"primary",disabled:oe,className:"min-w-24",children:oe?"保存中...":"保存"})]}),children:n(R,{id:"mcp-server-form",onSubmit:d,children:[e(S,{value:te,onChange:(c)=>w(c),className:"w-full [&>button]:flex-1",options:[{value:"local",label:"本地(标准输入输出)"},{value:"remote",label:"远程(HTTP / SSE)"}]}),!u&&e(g,{label:"名称",aside:e(Q,{children:"唯一标识,如 postgres"}),children:(c)=>e(p,{id:c,value:ne,onChange:(f)=>r(f.target.value),placeholder:"postgres",className:"font-mono text-xs"})}),te==="local"?n(m,{children:[e(g,{label:"启动命令",aside:e(Q,{children:"完整命令及参数"}),children:(c)=>e(p,{id:c,value:j,onChange:(f)=>N(f.target.value),placeholder:"npx -y @modelcontextprotocol/server-postgres ...",className:"font-mono text-xs"})}),e(ge,{label:"环境变量",tip:"启动进程时注入",keyLabel:"变量名",pairs:J,onChange:z,InputComponent:p})]}):n(m,{children:[e(g,{label:"服务地址",aside:e(Q,{children:"HTTP / HTTPS 端点"}),children:(c)=>e(p,{id:c,value:G,onChange:(f)=>se(f.target.value),placeholder:"https://example.com/mcp",className:"font-mono text-xs"})}),e(ge,{label:"请求头",tip:"随每次请求发送",keyLabel:"头字段",pairs:h,onChange:T,InputComponent:p}),n("div",{className:"flex items-center justify-between gap-4",children:[n("div",{className:"min-w-0",children:[e("span",{className:"block text-ui font-medium text-dim",children:"OAuth 2.0 认证"}),e("span",{className:"block truncate text-xs text-faint",children:"自动发现授权端点,使用 PKCE 并刷新令牌"})]}),e(M,{checked:E,onCheckedChange:B,label:"启用 OAuth 2.0"})]}),E&&n(m,{children:[e(g,{label:"Client ID",aside:e(Q,{children:"留空自动动态注册(DCR)"}),children:(c)=>e(p,{id:c,value:O,onChange:(f)=>Y(f.target.value),placeholder:"留空自动动态注册",className:"font-mono text-xs"})}),e(g,{label:"Client Secret",aside:e(Q,{children:"留空保持不变"}),children:(c)=>e(p,{id:c,type:"password",autoComplete:"off",value:ee,onChange:(f)=>A(f.target.value),placeholder:"••••••••",className:"font-mono text-xs"})}),e(g,{label:"Scope",aside:e(Q,{children:"选填授权范围"}),children:(c)=>e(p,{id:c,value:t,onChange:(f)=>I(f.target.value),placeholder:"repo read:org",className:"font-mono text-xs"})})]})]}),n("div",{className:"space-y-3 border-t border-line/60 pt-3",children:[n("button",{type:"button","aria-expanded":_,className:"flex w-full cursor-pointer items-center gap-1.5 text-ui font-medium text-dim transition-colors hover:text-ink",onClick:()=>ae(!_),children:[e(Ft,{className:`size-3.5 transition-transform ${_?"rotate-90":""}`}),"高级设置",e("span",{className:"truncate text-xs font-normal text-faint",children:"加载时机、超时"})]}),_&&n("div",{className:"grid grid-cols-2 gap-3 max-sm:grid-cols-1",children:[e(g,{label:"加载时机",aside:e(Q,{children:"延迟 = 按需加载"}),children:()=>e(S,{value:x,onChange:(c)=>F(c),className:"w-full [&>button]:flex-1",options:[{value:"default",label:"默认"},{value:"defer",label:"延迟"},{value:"always",label:"常驻"}]})}),e(g,{label:"超时(毫秒)",aside:e(Q,{children:"留空用默认"}),children:(c)=>e(p,{id:c,value:U,onChange:(f)=>ie(f.target.value),placeholder:"默认",className:"font-mono text-xs"})})]})]}),re&&n("div",{role:"alert",className:D("callout.base",D("callout.danger"),"px-3 py-2.5 text-xs"),children:[e(xe,{className:"mt-0.5 size-3.5 shrink-0"}),e("span",{className:"min-w-0 break-words",children:re})]})]})})}var X="global";function He({connection:i}){let{Button:P,Select:S,CatalogRow:H,style:R,useTheme:g}=b();g();let[p,M]=a(""),[D,Z]=a(),[u,te]=a([]),[w,ne]=a(X),[r,j]=a(),[N,G]=a(!1),[se,J]=a(),[z,h]=a(!1),T=o(!1),[v,E]=a(),B=o(0),O=y(async()=>{let t=++B.current;G(!0);try{let I=w===X?"":`?projectID=${encodeURIComponent(w)}`,[x,F]=await Promise.all([i.request(`/api/mcp${I}`),i.request("/api/mcp/projects")]);if(t!==B.current)return;if(Z(x),te(F),w!==X&&!F.some((U)=>U.id===w))ne(X);j(void 0)}catch(I){if(t===B.current)j(I instanceof Error?I.message:"读取失败")}finally{if(t===B.current)G(!1)}},[i,w]);s(()=>(O(),()=>{B.current++}),[O]);async function Y(t,I){if(T.current)return;T.current=!0,h(!0);let x=B.current;try{let F=t.projectID?`?projectID=${encodeURIComponent(t.projectID)}`:"",U=await i.request(`/api/mcp/${encodeURIComponent(t.name)}${F}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({...t.config,enabled:I})});if(x===B.current)Z((ie)=>ie?.map((_)=>_.name===U.name&&_.projectID===U.projectID?U:_))}finally{T.current=!1,h(!1)}}let ee=D?.filter((t)=>`${t.name} ${hi(t.config)}`.toLowerCase().includes(p.trim().toLowerCase())),A=D?.find((t)=>t.name===se);return n("div",{className:"min-w-0 space-y-6",children:[n("section",{className:"min-w-0",children:[n("div",{className:"mb-2.5 flex flex-wrap items-end justify-between gap-3 px-0.5",children:[n("div",{className:"min-w-0 flex-1 basis-48",children:[e("h2",{className:R("settings.groupTitle"),children:"MCP 服务器"}),e("p",{className:R("settings.groupDesc"),children:"外部工具与数据源管理"})]}),n("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[e(S,{value:w,disabled:N,onValueChange:(t)=>{J(void 0),E(void 0),Z(void 0),ne(t)},groups:[{options:[{value:X,label:"全局"}]},...wi(u)],className:"w-44"}),e(P,{variant:"ghost",disabled:N,onClick:O,className:"h-9 px-2.5 text-xs",children:e(ye,{className:`size-3.5 ${N?"animate-spin":""}`})}),n(P,{variant:"secondary",onClick:()=>E({}),className:"h-9 px-2.5 text-xs",children:[e(ke,{className:"size-3.5 mr-1"}),"添加服务器"]})]})]}),r&&n("div",{role:"alert",className:R("callout.base",R("callout.danger"),"mb-3 flex-wrap items-center justify-between"),children:[n("p",{className:"min-w-0 flex-1 break-words text-sm text-danger",children:["无法读取 MCP 服务器:",r]}),e(P,{disabled:N,onClick:O,children:"重试"})]}),e(ki,{label:"搜索 MCP 服务器",placeholder:"搜索服务器",value:p,onChange:M}),e("div",{className:R("settings.groupBox"),children:!D?e(Ci,{}):ee?.length===0?e("p",{className:"p-4 text-sm text-dim",children:"没有匹配的 MCP 服务器"}):e("ul",{className:"divide-y divide-line",children:ee?.map((t)=>{let I=t.config.enabled===!1,x=t.projectID!==(w===X?null:w);return e("li",{children:e(H,{name:t.name,selectLabel:`查看 ${t.name}`,onSelect:()=>J(t.name),title:x?"继承的全局配置,请切换到全局范围编辑":void 0,description:e("span",{className:"font-mono text-2xs",children:hi(t.config)}),icon:t.config.type==="local"?e(Ht,{}):e(Be,{}),inactive:I,aside:n(m,{children:[e("span",{className:R("control.badge"),children:fi(t.scope)}),e(ps,{info:t})]}),toggle:x?void 0:{checked:!I,label:`启用服务器 ${t.name}`,disabled:z||N,onCheckedChange:(F)=>Y(t,F)}})},t.name)})})})]}),A&&!v&&e(fe,{connection:i,info:A,toggling:z,onToggle:(t)=>Y(A,t),projectID:w===X?void 0:w,onClose:()=>J(void 0),onEdit:()=>E({info:A}),onChanged:(t)=>t?Z((I)=>I?.map((x)=>x.name===t.name?t:x)):O()},`${A.projectID}:${A.name}`),v&&e(ve,{connection:i,projectID:w===X?void 0:w,existing:v.info,taken:(D??[]).filter((t)=>t.scope===(w===X?"global":"project")).map((t)=>t.name),onClose:()=>E(void 0),onSaved:()=>{E(void 0),O()}})]})}export{He as McpSection};
1
+ import{y,s,o,a,m,e,n,b,l,xe,Ft,Be,ke,ye,gt,Ht,me,ce,Yc,mi,fi,hi,ps}from"./chunk-56a6zytc.js";import{wi,ki,Ci}from"./chunk-7c59jb8d.js";var be=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],pe=l("rotate-cw",be);function fe(i){let{ApprovalPanel:P,Button:S,CopyButton:H,DetailChip:R,DetailList:g,DetailRow:p,DetailTitle:M,Dialog:D,Switch:Z,Tooltip:u,cn:te,confirm:w,useTheme:ne}=b();ne();let{info:r,connection:j}=i,N=i.projectID?`?projectID=${encodeURIComponent(i.projectID)}`:"",[G,se]=a(),[J,z]=a(),[h,T]=a(!1),[v,E]=a(),[B,O]=a(),Y=r.status.status==="connected",ee=r.status.status==="needs_auth",A=r.status.status==="failed",t=r.config.type==="remote"&&Boolean(r.config.oauth),I=r.projectID!==(i.projectID??null);s(()=>{function d(k){if(k&&k!==r.name)return;j.request(`/api/mcp/${encodeURIComponent(r.name)}/connect${N}`,{method:"POST"}).then((C)=>i.onChanged(C)).catch((C)=>{z(C instanceof Error?C.message:"授权后重新连接失败")})}function c(k){if(k.origin!==window.location.origin)return;if(k.data?.type==="mcp-oauth-success")d(k.data.name)}function f(k){if(k.key==="basalt-mcp-oauth-event"&&k.newValue)try{let C=JSON.parse(k.newValue);d(C.name)}catch(C){}}window.addEventListener("message",c),window.addEventListener("storage",f);let K;if("BroadcastChannel"in window)K=new BroadcastChannel("basalt-mcp-oauth"),K.onmessage=(k)=>{if(k.data?.type==="mcp-oauth-success")d(k.data.name)};return()=>{window.removeEventListener("message",c),window.removeEventListener("storage",f),K?.close()}},[j,r.name,N,i]),s(()=>{if(r.status.status!=="connected")return;j.request(`/api/mcp/${encodeURIComponent(r.name)}/tools${N}`).then((d)=>{if(Array.isArray(d))se(d),z(void 0)}).catch((d)=>{z(d instanceof Error?d.message:"获取工具失败")})},[j,r.name,N,r.status.status]);async function x(d){T(!0);try{let c=await j.request(`/api/mcp/${encodeURIComponent(r.name)}/${d}${N}`,{method:"POST"});i.onChanged(c)}catch{}finally{T(!1)}}async function F(){if(!v||h)return;let d=v.fingerprint;O(void 0),T(!0);try{let c=await j.request(`/api/mcp/${encodeURIComponent(r.name)}/trust${N}`,{method:"POST",body:JSON.stringify({fingerprint:d})});i.onChanged(c),E(void 0)}catch(c){O(c instanceof Error?c.message:"确认失败,请刷新配置")}finally{T(!1)}}async function U(){let d=window.open("about:blank","_blank","width=600,height=700");if(!d){z("授权窗口被浏览器拦截,请允许弹出窗口后重试");return}T(!0),z(void 0);try{let c=await j.request(`/api/mcp/${encodeURIComponent(r.name)}/oauth/authorize${N}`,{method:"POST"}),f=new URL(c.authorizationUrl);if(f.protocol!=="https:"&&f.protocol!=="http:")throw Error("授权服务返回了不支持的链接协议");d.location.href=f.href}catch(c){d.close(),z(c instanceof Error?c.message:"获取授权链接失败")}finally{T(!1)}}async function ie(){T(!0);try{let d=await j.request(`/api/mcp/${encodeURIComponent(r.name)}/oauth/clear${N}`,{method:"POST"});i.onChanged(d)}finally{T(!1)}}async function _(){if(!await w({title:`删除 ${r.name}?`,description:"删除后将断开连接并不再向会话提供其工具。",action:"删除",danger:!0}))return;T(!0);try{await j.request(`/api/mcp/${encodeURIComponent(r.name)}${N}`,{method:"DELETE"}),i.onChanged(),i.onClose()}finally{T(!1)}}let ae=r.config,re=hi(ae),V="error"in r.status?r.status.error:void 0,oe=ae.enabled===!1,le=!oe&&!ee&&r.status.status!=="needs_trust";if(v)return e(D,{open:!0,onOpenChange:(d)=>{if(!d&&!h)E(void 0)},title:`信任 ${r.name}?`,size:"lg",children:n(P,{hideTitle:!0,title:"信任项目本地命令",command:v.command,approveLabel:"信任并连接",busy:h?"approve":void 0,error:B,onDecision:(d)=>{if(d)F();else E(void 0)},description:"项目命令将以你的权限运行,请确认来源可信。",children:[n("div",{className:"flex min-w-0 items-start gap-2 text-xs text-dim",children:[e("span",{className:"shrink-0 leading-5",children:"目录"}),e("code",{className:"min-w-0 flex-1 leading-5 [overflow-wrap:anywhere]",children:v.cwd}),e(H,{text:v.cwd,label:"复制工作目录",size:"icon-xs"})]}),n("section",{className:"min-w-0 space-y-2",children:[e("h3",{className:"text-xs font-medium text-dim",children:"环境变量"}),v.variables.length?e("div",{className:"flex min-w-0 flex-wrap gap-2",children:v.variables.map((d)=>e("span",{className:"max-w-full rounded-md bg-raised px-2 py-1 font-mono text-xs text-dim [overflow-wrap:anywhere]",children:d},d))}):e("p",{className:"text-xs text-faint",children:"无"})]}),e("p",{className:"text-xs leading-5 text-faint",children:"配置变更后需重新确认。"})]})});return e(D,{open:!0,onOpenChange:(d)=>{if(!d&&!h)i.onClose()},title:e(M,{icon:ae.type==="local"?e(Ht,{}):e(Be,{}),name:r.name,meta:[ae.type==="local"?"本地命令":"远程服务",fi(r.scope),t&&"OAuth 2.0"]}),size:"lg",footer:n("div",{className:"flex w-full items-center justify-between gap-2 max-sm:[&>*]:flex-none",children:[n("div",{className:"inline-flex items-center gap-2.5 text-ui text-dim",children:[!I&&e(Z,{label:`启用 ${r.name}`,checked:!oe,disabled:h||i.toggling,onCheckedChange:i.onToggle}),e(ps,{info:r,tools:!0})]}),n("div",{className:"flex items-center gap-1.5",children:[r.status.status==="needs_trust"&&e(S,{type:"button",size:"sm",onClick:()=>{if(r.status.status!=="needs_trust"||r.config.type!=="local")return;O(void 0),E({fingerprint:r.status.fingerprint,cwd:r.status.cwd,command:hi(r.config),variables:Object.keys(r.config.environment??{})})},disabled:h,children:"信任并连接"}),t&&e(S,{type:"button",variant:"ghost",size:"sm",onClick:ie,disabled:h,children:"清除凭据"}),!I&&e(u,{label:"删除服务器",children:e(S,{type:"button",variant:"danger-ghost",size:"icon","aria-label":"删除服务器",onClick:_,disabled:h,children:e(me,{className:"size-4"})})}),le&&e(u,{label:"终止服务进程并重新启动,让更新后的代码生效",children:e(S,{type:"button",variant:"ghost",size:"icon","aria-label":"重启",onClick:()=>x("restart"),disabled:h,children:e(pe,{className:te("size-4",h&&"animate-spin")})})}),le&&e(S,{type:"button",size:"sm",onClick:()=>x(Y?"disconnect":"connect"),disabled:h,children:Y?"断开连接":"连接"}),!I&&n(S,{type:"button",size:"sm",onClick:i.onEdit,disabled:h,children:[e(gt,{className:"size-3.5"}),e("span",{children:"编辑配置"})]})]})]}),children:n(g,{children:[n(p,{label:ae.type==="local"?"命令":"地址",children:[e("span",{className:"min-w-0 font-mono text-xs text-dim leading-5.5 [overflow-wrap:anywhere]",children:re}),e(H,{text:re,label:"复制",size:"icon-xs",className:"shrink-0 text-faint hover:text-ink"})]}),ee&&n("div",{className:"flex items-center justify-between gap-4 py-3.5 max-sm:flex-col max-sm:items-start max-sm:gap-2.5",children:[n("div",{className:"min-w-0 space-y-1",children:[e("p",{className:"text-ui text-ink leading-5",children:"需要授权"}),e("p",{className:"text-xs text-faint leading-5",children:"完成授权后即可使用,凭据自动保存。"})]}),e(S,{type:"button",size:"sm",className:"shrink-0",onClick:U,disabled:h,children:h?"正在连接…":"连接账户"})]}),A&&e(p,{label:"错误",children:e("p",{className:"min-w-0 font-mono text-xs text-danger leading-5 [overflow-wrap:anywhere]",children:V})}),e(p,{label:"工具",children:J?e("span",{className:"text-danger",children:J}):!Y?e("span",{className:"text-faint",children:"连接后列出工具"}):!G?e("span",{role:"status",className:"text-faint",children:"正在获取"}):G.length===0?e("span",{className:"text-faint",children:"服务器没有声明任何工具"}):G.map((d)=>e(R,{mono:!0,title:d.description,children:d.name},d.name))})]})})}var Ce=/^[A-Za-z0-9_-]{1,64}$/;function Q(i){return e("span",{className:"truncate text-xs text-faint",children:i.children})}function ge(i){let{pairs:P,onChange:S,InputComponent:H}=i,R=(g,p)=>S(P.map((M,D)=>D===g?{...M,...p}:M));return n("div",{className:"space-y-2",children:[n("div",{className:"flex min-h-7 items-center gap-2",children:[e("span",{className:"shrink-0 text-ui font-medium text-dim",children:i.label}),e(Q,{children:i.tip}),n("button",{type:"button",className:"ml-auto inline-flex h-7 shrink-0 cursor-pointer items-center gap-1 rounded-lg px-2 text-xs font-medium text-dim transition-colors hover:bg-raised hover:text-ink",onClick:()=>S([...P,{key:"",value:"",saved:!1}]),children:[e(ke,{className:"size-3.5"}),"添加"]})]}),P.map((g,p)=>n("div",{className:"flex min-w-0 items-center gap-1.5",children:[e(H,{"aria-label":`${i.keyLabel} ${p+1}`,placeholder:i.keyLabel,value:g.key,readOnly:g.saved,onChange:(M)=>R(p,{key:M.target.value}),className:"min-w-0 flex-[2] font-mono text-xs"}),e(H,{"aria-label":`${i.keyLabel} ${g.key||p+1} 的值`,type:"password",autoComplete:"off",placeholder:g.saved?"已保存,留空保持不变":"值",value:g.value,onChange:(M)=>R(p,{value:M.target.value}),className:"min-w-0 flex-[3] font-mono text-xs"}),e("button",{type:"button","aria-label":`删除 ${g.key||"该项"}`,className:"flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-lg text-faint transition-colors hover:bg-danger/10 hover:text-danger",onClick:()=>S(P.filter((M,D)=>D!==p)),children:e(ce,{className:"size-4"})})]},p))]})}function he(i){return Object.keys(i??{}).map((P)=>({key:P,value:"",saved:!0}))}function ve(i){let{Button:P,Segmented:S,Dialog:H,Form:R,Field:g,Input:p,Switch:M,style:D,useTheme:Z}=b();Z();let{existing:u}=i,[te,w]=a(u?.config.type??"local"),[ne,r]=a(u?.name??""),[j,N]=a(u?.config.type==="local"?mi(u.config.command):""),[G,se]=a(u?.config.type==="remote"?u.config.url:""),[J,z]=a(he(u?.config.type==="local"?u.config.environment:void 0)),[h,T]=a(he(u?.config.type==="remote"?u.config.headers:void 0)),v=u?.config.type==="remote"?u.config.oauth:void 0,[E,B]=a(Boolean(v)),[O,Y]=a(typeof v==="object"&&v.clientId?v.clientId:""),[ee,A]=a(""),[t,I]=a(typeof v==="object"&&v.scope?v.scope:""),[x,F]=a(u?.config.defer??"default"),[U,ie]=a(u?.config.timeout!==void 0?String(u.config.timeout):""),[_,ae]=a(u?.config.defer!==void 0||u?.config.timeout!==void 0),[re,V]=a(),[oe,le]=a(!1);async function d(c){c.preventDefault(),V(void 0);let f=ne.trim();if(!u&&!Ce.test(f)){V("名称只能包含英文字母、数字、下划线与中划线,长度 1-64");return}if(!u&&i.taken.includes(f)){V("同名服务器已存在");return}let K=U.trim()?Number.parseInt(U.trim(),10):void 0;if(K!==void 0&&(!Number.isFinite(K)||K<=0)){V("超时时间须为大于 0 的毫秒数");return}let k;if(te==="local"){let C=Yc(j.trim());if(!C.length){V("请输入启动命令");return}let W={};for(let q of J){let L=q.key.trim();if(!L)continue;if(!q.saved||q.value)W[L]=q.value}k={type:"local",command:C,environment:Object.keys(W).length?W:void 0,enabled:u?u.config.enabled:!0,defer:x==="default"?void 0:x,timeout:K}}else{let C=G.trim();try{let L=new URL(C);if(L.protocol!=="http:"&&L.protocol!=="https:")throw Error("bad protocol")}catch{V("请输入合法的 HTTP 或 HTTPS 地址");return}let W={};for(let L of h){let de=L.key.trim();if(!de)continue;if(!L.saved||L.value)W[de]=L.value}let q;if(E){let L=O.trim(),de=ee.trim(),ue=t.trim();if(L||de||ue)q={clientId:L||void 0,clientSecret:de||void 0,scope:ue||void 0};else q=!0}else q=!1;k={type:"remote",url:C,headers:Object.keys(W).length?W:void 0,oauth:q,enabled:u?u.config.enabled:!0,defer:x==="default"?void 0:x,timeout:K}}le(!0);try{let C=u?.name??f,W=u?u.projectID:i.projectID,q=W?`?projectID=${encodeURIComponent(W)}`:"";await i.connection.request(`/api/mcp/${encodeURIComponent(C)}${q}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(k)}),i.onSaved()}catch(C){V(C instanceof Error?C.message:"保存失败")}finally{le(!1)}}return e(H,{open:!0,onOpenChange:(c)=>{if(!c&&!oe)i.onClose()},title:u?`编辑 ${u.name}`:"添加 MCP 服务器",size:"lg",footer:n("div",{className:"flex w-full justify-end gap-2.5",children:[e(P,{type:"button",variant:"ghost",onClick:i.onClose,disabled:oe,className:"min-w-20",children:"取消"}),e(P,{type:"submit",form:"mcp-server-form",variant:"primary",disabled:oe,className:"min-w-24",children:oe?"保存中...":"保存"})]}),children:n(R,{id:"mcp-server-form",onSubmit:d,children:[e(S,{value:te,onChange:(c)=>w(c),className:"w-full [&>button]:flex-1",options:[{value:"local",label:"本地(标准输入输出)"},{value:"remote",label:"远程(HTTP / SSE)"}]}),!u&&e(g,{label:"名称",aside:e(Q,{children:"唯一标识,如 postgres"}),children:(c)=>e(p,{id:c,value:ne,onChange:(f)=>r(f.target.value),placeholder:"postgres",className:"font-mono text-xs"})}),te==="local"?n(m,{children:[e(g,{label:"启动命令",aside:e(Q,{children:"完整命令及参数"}),children:(c)=>e(p,{id:c,value:j,onChange:(f)=>N(f.target.value),placeholder:"npx -y @modelcontextprotocol/server-postgres ...",className:"font-mono text-xs"})}),e(ge,{label:"环境变量",tip:"启动进程时注入",keyLabel:"变量名",pairs:J,onChange:z,InputComponent:p})]}):n(m,{children:[e(g,{label:"服务地址",aside:e(Q,{children:"HTTP / HTTPS 端点"}),children:(c)=>e(p,{id:c,value:G,onChange:(f)=>se(f.target.value),placeholder:"https://example.com/mcp",className:"font-mono text-xs"})}),e(ge,{label:"请求头",tip:"随每次请求发送",keyLabel:"头字段",pairs:h,onChange:T,InputComponent:p}),n("div",{className:"flex items-center justify-between gap-4",children:[n("div",{className:"min-w-0",children:[e("span",{className:"block text-ui font-medium text-dim",children:"OAuth 2.0 认证"}),e("span",{className:"block truncate text-xs text-faint",children:"自动发现授权端点,使用 PKCE 并刷新令牌"})]}),e(M,{checked:E,onCheckedChange:B,label:"启用 OAuth 2.0"})]}),E&&n(m,{children:[e(g,{label:"Client ID",aside:e(Q,{children:"留空自动动态注册(DCR)"}),children:(c)=>e(p,{id:c,value:O,onChange:(f)=>Y(f.target.value),placeholder:"留空自动动态注册",className:"font-mono text-xs"})}),e(g,{label:"Client Secret",aside:e(Q,{children:"留空保持不变"}),children:(c)=>e(p,{id:c,type:"password",autoComplete:"off",value:ee,onChange:(f)=>A(f.target.value),placeholder:"••••••••",className:"font-mono text-xs"})}),e(g,{label:"Scope",aside:e(Q,{children:"选填授权范围"}),children:(c)=>e(p,{id:c,value:t,onChange:(f)=>I(f.target.value),placeholder:"repo read:org",className:"font-mono text-xs"})})]})]}),n("div",{className:"space-y-3 border-t border-line/60 pt-3",children:[n("button",{type:"button","aria-expanded":_,className:"flex w-full cursor-pointer items-center gap-1.5 text-ui font-medium text-dim transition-colors hover:text-ink",onClick:()=>ae(!_),children:[e(Ft,{className:`size-3.5 transition-transform ${_?"rotate-90":""}`}),"高级设置",e("span",{className:"truncate text-xs font-normal text-faint",children:"加载时机、超时"})]}),_&&n("div",{className:"grid grid-cols-2 gap-3 max-sm:grid-cols-1",children:[e(g,{label:"加载时机",aside:e(Q,{children:"延迟 = 按需加载"}),children:()=>e(S,{value:x,onChange:(c)=>F(c),className:"w-full [&>button]:flex-1",options:[{value:"default",label:"默认"},{value:"defer",label:"延迟"},{value:"always",label:"常驻"}]})}),e(g,{label:"超时(毫秒)",aside:e(Q,{children:"留空用默认"}),children:(c)=>e(p,{id:c,value:U,onChange:(f)=>ie(f.target.value),placeholder:"默认",className:"font-mono text-xs"})})]})]}),re&&n("div",{role:"alert",className:D("callout.base",D("callout.danger"),"px-3 py-2.5 text-xs"),children:[e(xe,{className:"mt-0.5 size-3.5 shrink-0"}),e("span",{className:"min-w-0 break-words",children:re})]})]})})}var X="global";function He({connection:i}){let{Button:P,Select:S,CatalogRow:H,style:R,useTheme:g}=b();g();let[p,M]=a(""),[D,Z]=a(),[u,te]=a([]),[w,ne]=a(X),[r,j]=a(),[N,G]=a(!1),[se,J]=a(),[z,h]=a(!1),T=o(!1),[v,E]=a(),B=o(0),O=y(async()=>{let t=++B.current;G(!0);try{let I=w===X?"":`?projectID=${encodeURIComponent(w)}`,[x,F]=await Promise.all([i.request(`/api/mcp${I}`),i.request("/api/mcp/projects")]);if(t!==B.current)return;if(Z(x),te(F),w!==X&&!F.some((U)=>U.id===w))ne(X);j(void 0)}catch(I){if(t===B.current)j(I instanceof Error?I.message:"读取失败")}finally{if(t===B.current)G(!1)}},[i,w]);s(()=>(O(),()=>{B.current++}),[O]);async function Y(t,I){if(T.current)return;T.current=!0,h(!0);let x=B.current;try{let F=t.projectID?`?projectID=${encodeURIComponent(t.projectID)}`:"",U=await i.request(`/api/mcp/${encodeURIComponent(t.name)}${F}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({...t.config,enabled:I})});if(x===B.current)Z((ie)=>ie?.map((_)=>_.name===U.name&&_.projectID===U.projectID?U:_))}finally{T.current=!1,h(!1)}}let ee=D?.filter((t)=>`${t.name} ${hi(t.config)}`.toLowerCase().includes(p.trim().toLowerCase())),A=D?.find((t)=>t.name===se);return n("div",{className:"min-w-0 space-y-6",children:[n("section",{className:"min-w-0",children:[n("div",{className:"mb-2.5 flex flex-wrap items-end justify-between gap-3 px-0.5",children:[n("div",{className:"min-w-0 flex-1 basis-48",children:[e("h2",{className:R("settings.groupTitle"),children:"MCP 服务器"}),e("p",{className:R("settings.groupDesc"),children:"外部工具与数据源管理"})]}),n("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[e(S,{value:w,disabled:N,onValueChange:(t)=>{J(void 0),E(void 0),Z(void 0),ne(t)},groups:[{options:[{value:X,label:"全局"}]},...wi(u)],className:"w-44"}),e(P,{variant:"ghost",disabled:N,onClick:O,className:"h-9 px-2.5 text-xs",children:e(ye,{className:`size-3.5 ${N?"animate-spin":""}`})}),n(P,{variant:"secondary",onClick:()=>E({}),className:"h-9 px-2.5 text-xs",children:[e(ke,{className:"size-3.5 mr-1"}),"添加服务器"]})]})]}),r&&n("div",{role:"alert",className:R("callout.base",R("callout.danger"),"mb-3 flex-wrap items-center justify-between"),children:[n("p",{className:"min-w-0 flex-1 break-words text-sm text-danger",children:["无法读取 MCP 服务器:",r]}),e(P,{disabled:N,onClick:O,children:"重试"})]}),e(ki,{label:"搜索 MCP 服务器",placeholder:"搜索服务器",value:p,onChange:M}),e("div",{className:R("settings.groupBox"),children:!D?e(Ci,{}):ee?.length===0?e("p",{className:"p-4 text-sm text-dim",children:"没有匹配的 MCP 服务器"}):e("ul",{className:"divide-y divide-line",children:ee?.map((t)=>{let I=t.config.enabled===!1,x=t.projectID!==(w===X?null:w);return e("li",{children:e(H,{name:t.name,selectLabel:`查看 ${t.name}`,onSelect:()=>J(t.name),title:x?"继承的全局配置,请切换到全局范围编辑":void 0,description:e("span",{className:"font-mono text-2xs",children:hi(t.config)}),icon:t.config.type==="local"?e(Ht,{}):e(Be,{}),inactive:I,aside:n(m,{children:[e("span",{className:R("control.badge"),children:fi(t.scope)}),e(ps,{info:t})]}),toggle:x?void 0:{checked:!I,label:`启用服务器 ${t.name}`,disabled:z||N,onCheckedChange:(F)=>Y(t,F)}})},t.name)})})})]}),A&&!v&&e(fe,{connection:i,info:A,toggling:z,onToggle:(t)=>Y(A,t),projectID:w===X?void 0:w,onClose:()=>J(void 0),onEdit:()=>E({info:A}),onChanged:(t)=>t?Z((I)=>I?.map((x)=>x.name===t.name?t:x)):O()},`${A.projectID}:${A.name}`),v&&e(ve,{connection:i,projectID:w===X?void 0:w,existing:v.info,taken:(D??[]).filter((t)=>t.scope===(w===X?"global":"project")).map((t)=>t.name),onClose:()=>E(void 0),onSaved:()=>{E(void 0),O()}})]})}export{He as McpSection};
Binary file
Binary file
@@ -1 +1 @@
1
- import{s,o,a,le,m,e,n,u,Bt,Z,k,p,x,ae,oe,fe,Xi,ot,xs}from"./chunk-hxsrph02.js";var P=30;function W(t){let l=new Date(t),b=new Date,c=new Date(l.getFullYear(),l.getMonth(),l.getDate()).getTime(),v=new Date(b.getFullYear(),b.getMonth(),b.getDate()).getTime(),d=86400000,h=Math.round((v-c)/86400000),g=`${l.getMonth()+1}月${l.getDate()}日`;if(h===0)return`今天 · ${g}`;if(h===1)return`昨天 · ${g}`;if(h>1&&h<7)return`${h} 天前 · ${g}`;if(l.getFullYear()===b.getFullYear())return g;return`${l.getFullYear()}年${g}`}function q(t){if(!t)return"";let l=new Date(t),b=(d)=>String(d).padStart(2,"0"),c=b(l.getHours()),v=b(l.getMinutes());return`${c}:${v}`}function Q(t){if(!t)return"";return new Date(t).toLocaleString()}function V(t,l=t.length){let b=[],c=new Map;for(let v=0;v<t.length;v++){let d=t[v];if(!d)continue;let h=d.archivedAt??0,g=new Date(h),w=`${g.getFullYear()}-${g.getMonth()+1}-${g.getDate()}`,N=c.get(w);if(!N){if(v>=l)continue;N={key:w,title:W(h),total:0,sessions:[]},c.set(w,N),b.push(N)}if(N.total+=1,v<l)N.sessions.push(d)}return b}function de(t){k();let[l,b]=a(""),[c,v]=a(!1),[d,h]=a(new Set),[g,w]=a(!1),N=o(null),S=le(t.conn.state),A=t.projectID??"chat",T=t.projectID?t.projects.find((i)=>i.id===t.projectID)?.name??"项目":"聊天",I=Xi(t.sessions,A),f=Xi(I,A,l),z=`${A}\x00${l.trim().toLocaleLowerCase()}`,[F,R]=a({key:z,count:P}),O=F.key===z?F.count:P,B=Math.min(O,f.length),L=B<f.length;s(()=>{let i=N.current;if(!i||!L||typeof IntersectionObserver>"u")return;let y=i.closest(".minimal-scroll-area"),r=new IntersectionObserver((j)=>{if(j.some((M)=>M.isIntersecting))R({key:z,count:Math.min(f.length,B+P)})},{root:y,rootMargin:"320px 0px"});return r.observe(i),()=>r.disconnect()},[z,L,B,f.length]);let E=f.filter((i)=>d.has(i.id)),C=f.length>0&&d.size===f.length;function H(){if(C)h(new Set);else h(new Set(f.map((i)=>i.id)))}function Y(i){h((y)=>{let r=new Set(y);if(r.has(i))r.delete(i);else r.add(i);return r})}async function G(i){if(i.length===0||g)return;w(!0);try{if(t.onBatchDelete)await t.onBatchDelete(i);else for(let y of i)t.onDelete(y);if(h(new Set),c&&i.length===f.length)v(!1)}finally{w(!1)}}async function _(i){if(i.length===0||g)return;w(!0);try{if(t.onBatchRestore)await t.onBatchRestore(i);else for(let y of i)t.onRestore(y);if(h(new Set),c&&i.length===f.length)v(!1)}finally{w(!1)}}function K(){if(S.indexError)return n("div",{role:"alert",className:"animate-fade space-y-2 rounded-2xl border border-danger/20 bg-danger/5 p-6 text-sm text-danger",children:[n("p",{children:["加载失败:",S.indexError]}),e(x,{loading:S.indexLoading,disabled:S.indexLoading,onClick:()=>{if(!t.conn.state.get().indexLoading)t.conn.refreshIndex()},children:"重试"})]});if(S.status!=="open"||S.indexLoading)return e("div",{className:"flex justify-center py-12 text-xs text-faint",children:"正在连接…"});if(f.length===0)return n("div",{className:p("surface.emptyDashed","animate-fade"),children:[e("div",{className:"grid size-11 place-items-center rounded-xl bg-raised text-dim",children:e(Bt,{className:"size-5"})}),n("div",{children:[e("p",{className:"text-md font-medium",children:I.length===0?`${T}里暂无归档会话`:"没有匹配结果"}),e("p",{className:"mt-1 text-sm text-dim",children:I.length===0?"归档的会话会安全存放在这里,不干扰日常列表。":"尝试更换关键词重新搜索。"})]})]});let i=V(f,B);return n("div",{className:"space-y-6 animate-fade",children:[i.map((y)=>n("section",{className:"space-y-2",children:[n("div",{className:"flex items-center justify-between px-1 text-xs text-dim",children:[e("h2",{className:"font-medium text-ink",children:y.title}),n("span",{className:"tabular-nums text-faint",children:[y.total," 个会话"]})]}),e("div",{className:p("settings.groupBox"),children:e("ul",{className:"divide-y divide-line/60",children:y.sessions.map((r)=>{let j=d.has(r.id),M=t.projects.find((D)=>D.id===r.projectID)?.name;return n("li",{tabIndex:c?0:void 0,className:u("group flex flex-wrap items-center justify-between gap-x-3 gap-y-1 px-4 py-2.5 transition-colors sm:flex-nowrap",c?"cursor-pointer hover:bg-raised/70 focus:outline-hidden focus:bg-raised/70":"hover:bg-raised/50",c&&j&&"bg-accent/5"),onClick:c?()=>Y(r.id):void 0,onKeyDown:c?(D)=>{if(D.key==="Enter"||D.key===" ")D.preventDefault(),Y(r.id)}:void 0,children:[n("div",{className:"flex min-w-0 flex-1 basis-48 items-center gap-2.5",children:[c&&e("span",{className:u("flex size-4 shrink-0 items-center justify-center rounded-md border transition-colors",j?"border-accent bg-accent text-accent-ink":"border-line-strong bg-panel"),children:j&&e(Z,{className:"size-3",strokeWidth:3})}),e(ot,{modelID:r.model,className:"size-4 shrink-0 text-dim"}),e("button",{type:"button",disabled:c,className:u("block max-w-full truncate text-left text-sm font-medium text-ink transition-colors focus:outline-hidden",!c&&"hover:text-accent"),onClick:()=>!c&&t.onOpen(r.id),children:fe(r)}),M&&e("span",{className:p("control.badge","shrink-0 text-2xs text-dim"),children:M})]}),n("div",{className:"flex shrink-0 items-center justify-end gap-1.5 sm:grid sm:justify-items-end",children:[e("time",{dateTime:r.archivedAt?new Date(r.archivedAt).toISOString():void 0,title:r.archivedAt?`归档于 ${Q(r.archivedAt)}`:void 0,className:u("text-xs tabular-nums text-faint cursor-default sm:col-start-1 sm:row-start-1",!c&&"transition-opacity sm:group-hover:opacity-0 sm:group-focus-within:opacity-0"),children:q(r.archivedAt)}),!c&&n("div",{className:"flex items-center gap-1.5 opacity-90 transition-opacity sm:pointer-events-none sm:col-start-1 sm:row-start-1 sm:opacity-0 sm:group-hover:pointer-events-auto sm:group-hover:opacity-100 sm:group-focus-within:pointer-events-auto sm:group-focus-within:opacity-100",children:[e(x,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",disabled:t.pending.has(r.id),onClick:(D)=>{D.stopPropagation(),t.onRestore(r)},children:"恢复"}),e(x,{size:"sm",variant:"danger-ghost",className:"h-7 px-2 text-xs",disabled:t.pending.has(r.id),onClick:(D)=>{D.stopPropagation(),t.onDelete(r)},children:"永久删除"})]})]})]},r.id)})})})]},y.key)),L&&n("div",{ref:N,className:"flex items-center justify-between rounded-xl border border-line/60 bg-panel/40 px-4 py-2.5 text-xs text-faint",children:[n("span",{className:"tabular-nums",children:["已显示 ",B," / ",f.length," 个会话"]}),n("div",{className:"flex items-center gap-1.5",children:[e(x,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>R({key:z,count:Math.min(f.length,B+P)}),children:"加载更多"}),e(x,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>R({key:z,count:f.length}),children:"显示全部"})]})]})]})}return n(xs,{"aria-label":"已归档会话",title:n(m,{children:["已归档 ",n("span",{className:"text-dim",children:["· ",T]})]}),description:"浏览和管理已归档的会话,可随时恢复到聊天列表或彻底删除。",children:[n("div",{className:"mb-6 space-y-2",children:[e(oe,{label:"搜索标题",children:(i)=>e(ae,{id:i,value:l,onChange:(y)=>b(y.target.value),placeholder:"搜索归档会话…"})}),I.length>0&&(c?n("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-xl border border-line bg-panel p-2.5 shadow-xs",children:[n("button",{type:"button",className:"flex items-center gap-2 text-xs font-medium text-ink hover:text-accent focus:outline-hidden",onClick:H,children:[n("span",{className:u("flex size-4 shrink-0 items-center justify-center rounded-md border transition-colors",C?"border-accent bg-accent text-accent-ink":d.size>0?"border-accent bg-accent/20 text-accent":"border-line-strong bg-panel"),children:[C&&e(Z,{className:"size-3",strokeWidth:3}),!C&&d.size>0&&e("span",{className:"size-1.5 rounded-xs bg-accent"})]}),n("span",{children:[C?"取消全选":"全选",n("span",{className:"ml-1 text-dim",children:["(",d.size,"/",f.length,")"]})]})]}),n("div",{className:"flex items-center gap-2",children:[n(x,{size:"sm",variant:"secondary",className:"h-7 px-2.5 text-xs",loading:g,disabled:d.size===0||g,onClick:()=>void _(E),children:["批量恢复",d.size>0?` (${d.size})`:""]}),n(x,{size:"sm",variant:"danger",className:"h-7 px-2.5 text-xs",loading:g,disabled:d.size===0||g,onClick:()=>void G(E),children:["彻底删除",d.size>0?` (${d.size})`:""]}),e(x,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",disabled:g,onClick:()=>{v(!1),h(new Set)},children:"退出管理"})]})]}):n("div",{className:"flex items-center justify-between px-0.5 text-xs text-dim",children:[e("span",{children:l.trim()?`匹配 ${f.length} 个会话(共 ${I.length} 个)`:`共 ${I.length} 个归档会话`}),f.length>0&&n("div",{className:"flex items-center gap-2",children:[e(x,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>v(!0),children:"批量管理"}),e(x,{size:"sm",variant:"danger-ghost",className:"h-7 px-2 text-xs",onClick:()=>void G(f),children:l.trim()?"清空匹配结果":"清空全部"})]})]}))]}),K()]})}export{de as ArchivePage};
1
+ import{s,o,a,le,m,e,n,u,Bt,Z,k,p,x,ae,oe,fe,Xi,ot,xs}from"./chunk-56a6zytc.js";var P=30;function W(t){let l=new Date(t),b=new Date,c=new Date(l.getFullYear(),l.getMonth(),l.getDate()).getTime(),v=new Date(b.getFullYear(),b.getMonth(),b.getDate()).getTime(),d=86400000,h=Math.round((v-c)/86400000),g=`${l.getMonth()+1}月${l.getDate()}日`;if(h===0)return`今天 · ${g}`;if(h===1)return`昨天 · ${g}`;if(h>1&&h<7)return`${h} 天前 · ${g}`;if(l.getFullYear()===b.getFullYear())return g;return`${l.getFullYear()}年${g}`}function q(t){if(!t)return"";let l=new Date(t),b=(d)=>String(d).padStart(2,"0"),c=b(l.getHours()),v=b(l.getMinutes());return`${c}:${v}`}function Q(t){if(!t)return"";return new Date(t).toLocaleString()}function V(t,l=t.length){let b=[],c=new Map;for(let v=0;v<t.length;v++){let d=t[v];if(!d)continue;let h=d.archivedAt??0,g=new Date(h),w=`${g.getFullYear()}-${g.getMonth()+1}-${g.getDate()}`,N=c.get(w);if(!N){if(v>=l)continue;N={key:w,title:W(h),total:0,sessions:[]},c.set(w,N),b.push(N)}if(N.total+=1,v<l)N.sessions.push(d)}return b}function de(t){k();let[l,b]=a(""),[c,v]=a(!1),[d,h]=a(new Set),[g,w]=a(!1),N=o(null),S=le(t.conn.state),A=t.projectID??"chat",T=t.projectID?t.projects.find((i)=>i.id===t.projectID)?.name??"项目":"聊天",I=Xi(t.sessions,A),f=Xi(I,A,l),z=`${A}\x00${l.trim().toLocaleLowerCase()}`,[F,R]=a({key:z,count:P}),O=F.key===z?F.count:P,B=Math.min(O,f.length),L=B<f.length;s(()=>{let i=N.current;if(!i||!L||typeof IntersectionObserver>"u")return;let y=i.closest(".minimal-scroll-area"),r=new IntersectionObserver((j)=>{if(j.some((M)=>M.isIntersecting))R({key:z,count:Math.min(f.length,B+P)})},{root:y,rootMargin:"320px 0px"});return r.observe(i),()=>r.disconnect()},[z,L,B,f.length]);let E=f.filter((i)=>d.has(i.id)),C=f.length>0&&d.size===f.length;function H(){if(C)h(new Set);else h(new Set(f.map((i)=>i.id)))}function Y(i){h((y)=>{let r=new Set(y);if(r.has(i))r.delete(i);else r.add(i);return r})}async function G(i){if(i.length===0||g)return;w(!0);try{if(t.onBatchDelete)await t.onBatchDelete(i);else for(let y of i)t.onDelete(y);if(h(new Set),c&&i.length===f.length)v(!1)}finally{w(!1)}}async function _(i){if(i.length===0||g)return;w(!0);try{if(t.onBatchRestore)await t.onBatchRestore(i);else for(let y of i)t.onRestore(y);if(h(new Set),c&&i.length===f.length)v(!1)}finally{w(!1)}}function K(){if(S.indexError)return n("div",{role:"alert",className:"animate-fade space-y-2 rounded-2xl border border-danger/20 bg-danger/5 p-6 text-sm text-danger",children:[n("p",{children:["加载失败:",S.indexError]}),e(x,{loading:S.indexLoading,disabled:S.indexLoading,onClick:()=>{if(!t.conn.state.get().indexLoading)t.conn.refreshIndex()},children:"重试"})]});if(S.status!=="open"||S.indexLoading)return e("div",{className:"flex justify-center py-12 text-xs text-faint",children:"正在连接…"});if(f.length===0)return n("div",{className:p("surface.emptyDashed","animate-fade"),children:[e("div",{className:"grid size-11 place-items-center rounded-xl bg-raised text-dim",children:e(Bt,{className:"size-5"})}),n("div",{children:[e("p",{className:"text-md font-medium",children:I.length===0?`${T}里暂无归档会话`:"没有匹配结果"}),e("p",{className:"mt-1 text-sm text-dim",children:I.length===0?"归档的会话会安全存放在这里,不干扰日常列表。":"尝试更换关键词重新搜索。"})]})]});let i=V(f,B);return n("div",{className:"space-y-6 animate-fade",children:[i.map((y)=>n("section",{className:"space-y-2",children:[n("div",{className:"flex items-center justify-between px-1 text-xs text-dim",children:[e("h2",{className:"font-medium text-ink",children:y.title}),n("span",{className:"tabular-nums text-faint",children:[y.total," 个会话"]})]}),e("div",{className:p("settings.groupBox"),children:e("ul",{className:"divide-y divide-line/60",children:y.sessions.map((r)=>{let j=d.has(r.id),M=t.projects.find((D)=>D.id===r.projectID)?.name;return n("li",{tabIndex:c?0:void 0,className:u("group flex flex-wrap items-center justify-between gap-x-3 gap-y-1 px-4 py-2.5 transition-colors sm:flex-nowrap",c?"cursor-pointer hover:bg-raised/70 focus:outline-hidden focus:bg-raised/70":"hover:bg-raised/50",c&&j&&"bg-accent/5"),onClick:c?()=>Y(r.id):void 0,onKeyDown:c?(D)=>{if(D.key==="Enter"||D.key===" ")D.preventDefault(),Y(r.id)}:void 0,children:[n("div",{className:"flex min-w-0 flex-1 basis-48 items-center gap-2.5",children:[c&&e("span",{className:u("flex size-4 shrink-0 items-center justify-center rounded-md border transition-colors",j?"border-accent bg-accent text-accent-ink":"border-line-strong bg-panel"),children:j&&e(Z,{className:"size-3",strokeWidth:3})}),e(ot,{modelID:r.model,className:"size-4 shrink-0 text-dim"}),e("button",{type:"button",disabled:c,className:u("block max-w-full truncate text-left text-sm font-medium text-ink transition-colors focus:outline-hidden",!c&&"hover:text-accent"),onClick:()=>!c&&t.onOpen(r.id),children:fe(r)}),M&&e("span",{className:p("control.badge","shrink-0 text-2xs text-dim"),children:M})]}),n("div",{className:"flex shrink-0 items-center justify-end gap-1.5 sm:grid sm:justify-items-end",children:[e("time",{dateTime:r.archivedAt?new Date(r.archivedAt).toISOString():void 0,title:r.archivedAt?`归档于 ${Q(r.archivedAt)}`:void 0,className:u("text-xs tabular-nums text-faint cursor-default sm:col-start-1 sm:row-start-1",!c&&"transition-opacity sm:group-hover:opacity-0 sm:group-focus-within:opacity-0"),children:q(r.archivedAt)}),!c&&n("div",{className:"flex items-center gap-1.5 opacity-90 transition-opacity sm:pointer-events-none sm:col-start-1 sm:row-start-1 sm:opacity-0 sm:group-hover:pointer-events-auto sm:group-hover:opacity-100 sm:group-focus-within:pointer-events-auto sm:group-focus-within:opacity-100",children:[e(x,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",disabled:t.pending.has(r.id),onClick:(D)=>{D.stopPropagation(),t.onRestore(r)},children:"恢复"}),e(x,{size:"sm",variant:"danger-ghost",className:"h-7 px-2 text-xs",disabled:t.pending.has(r.id),onClick:(D)=>{D.stopPropagation(),t.onDelete(r)},children:"永久删除"})]})]})]},r.id)})})})]},y.key)),L&&n("div",{ref:N,className:"flex items-center justify-between rounded-xl border border-line/60 bg-panel/40 px-4 py-2.5 text-xs text-faint",children:[n("span",{className:"tabular-nums",children:["已显示 ",B," / ",f.length," 个会话"]}),n("div",{className:"flex items-center gap-1.5",children:[e(x,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>R({key:z,count:Math.min(f.length,B+P)}),children:"加载更多"}),e(x,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>R({key:z,count:f.length}),children:"显示全部"})]})]})]})}return n(xs,{"aria-label":"已归档会话",title:n(m,{children:["已归档 ",n("span",{className:"text-dim",children:["· ",T]})]}),description:"浏览和管理已归档的会话,可随时恢复到聊天列表或彻底删除。",children:[n("div",{className:"mb-6 space-y-2",children:[e(oe,{label:"搜索标题",children:(i)=>e(ae,{id:i,value:l,onChange:(y)=>b(y.target.value),placeholder:"搜索归档会话…"})}),I.length>0&&(c?n("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-xl border border-line bg-panel p-2.5 shadow-xs",children:[n("button",{type:"button",className:"flex items-center gap-2 text-xs font-medium text-ink hover:text-accent focus:outline-hidden",onClick:H,children:[n("span",{className:u("flex size-4 shrink-0 items-center justify-center rounded-md border transition-colors",C?"border-accent bg-accent text-accent-ink":d.size>0?"border-accent bg-accent/20 text-accent":"border-line-strong bg-panel"),children:[C&&e(Z,{className:"size-3",strokeWidth:3}),!C&&d.size>0&&e("span",{className:"size-1.5 rounded-xs bg-accent"})]}),n("span",{children:[C?"取消全选":"全选",n("span",{className:"ml-1 text-dim",children:["(",d.size,"/",f.length,")"]})]})]}),n("div",{className:"flex items-center gap-2",children:[n(x,{size:"sm",variant:"secondary",className:"h-7 px-2.5 text-xs",loading:g,disabled:d.size===0||g,onClick:()=>void _(E),children:["批量恢复",d.size>0?` (${d.size})`:""]}),n(x,{size:"sm",variant:"danger",className:"h-7 px-2.5 text-xs",loading:g,disabled:d.size===0||g,onClick:()=>void G(E),children:["彻底删除",d.size>0?` (${d.size})`:""]}),e(x,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",disabled:g,onClick:()=>{v(!1),h(new Set)},children:"退出管理"})]})]}):n("div",{className:"flex items-center justify-between px-0.5 text-xs text-dim",children:[e("span",{children:l.trim()?`匹配 ${f.length} 个会话(共 ${I.length} 个)`:`共 ${I.length} 个归档会话`}),f.length>0&&n("div",{className:"flex items-center gap-2",children:[e(x,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>v(!0),children:"批量管理"}),e(x,{size:"sm",variant:"danger-ghost",className:"h-7 px-2 text-xs",onClick:()=>void G(f),children:l.trim()?"清空匹配结果":"清空全部"})]})]}))]}),K()]})}export{de as ArchivePage};
Binary file
Binary file
@@ -0,0 +1,8 @@
1
+ import{t}from"./chunk-h4bzgvbg.js";import"./chunk-shtkgxz6.js";import{Us,js}from"./chunk-9r0rnt6d.js";import"./chunk-cgwnzse1.js";import"./chunk-j0dyf1g8.js";import"./chunk-r7afv22v.js";import"./chunk-qv5d69fn.js";var o=t((r)=>`${Us(r)}
2
+ .swimlane.cluster:not([data-color-id]) rect {
3
+ stroke: ${r.clusterBorder} !important;
4
+ }
5
+ [data-look="neo"].cluster rect {
6
+ filter: none;
7
+ }
8
+ `,"getStyles"),m=o,D=js({styles:m});export{D as diagram};
Binary file
Binary file
@@ -1 +1 @@
1
- import{te,e,n,b}from"./chunk-hxsrph02.js";import{Wn,na}from"./chunk-1qd75yjn.js";import"./chunk-crfbqd4d.js";var s="session";function f({connection:d}){let{ModelSelector:a,SettingGroup:m,SettingRow:g}=b(),r=te(),t=na({connection:d,endpoint:"/api/plugins/title-generator/settings",loadError:"读取标题生成设置失败",toBody:(o)=>({schemaVersion:1,revision:o.revision,model:o.model}),differs:(o,i)=>o.model!==i.model}),l=t.settings?.model??null,c={models:[{id:s,name:"跟随会话模型"},...t.modelList.models.filter((o)=>o.available===!0||o.id===l)]};return n("form",{id:r,onSubmit:t.save,className:"min-w-0 space-y-5",children:[e(m,{title:"标题生成",children:e(g,{title:"标题模型",description:"首次输入直接命名;后续输入识别为独立需求时自动改名。请求始终使用 None 思考。",children:e("div",{className:"w-56",children:e(a,{variant:"field",models:c,value:l??s,onChange:(o)=>t.edit((i)=>({...i,model:o===s?null:o}))})})})}),e(Wn,{formID:r,notice:t.notice,dirty:t.dirty,busy:t.loading||t.saving,saving:t.saving,onReset:t.reset})]})}export{f as TitleGeneratorSettingsSection};
1
+ import{te,e,n,b}from"./chunk-56a6zytc.js";import{Wn,na}from"./chunk-fjhqg9ag.js";import"./chunk-egjv760p.js";var s="session";function f({connection:d}){let{ModelSelector:a,SettingGroup:m,SettingRow:g}=b(),r=te(),t=na({connection:d,endpoint:"/api/plugins/title-generator/settings",loadError:"读取标题生成设置失败",toBody:(o)=>({schemaVersion:1,revision:o.revision,model:o.model}),differs:(o,i)=>o.model!==i.model}),l=t.settings?.model??null,c={models:[{id:s,name:"跟随会话模型"},...t.modelList.models.filter((o)=>o.available===!0||o.id===l)]};return n("form",{id:r,onSubmit:t.save,className:"min-w-0 space-y-5",children:[e(m,{title:"标题生成",children:e(g,{title:"标题模型",description:"首次输入直接命名;后续输入识别为独立需求时自动改名。请求始终使用 None 思考。",children:e("div",{className:"w-56",children:e(a,{variant:"field",models:c,value:l??s,onChange:(o)=>t.edit((i)=>({...i,model:o===s?null:o}))})})})}),e(Wn,{formID:r,notice:t.notice,dirty:t.dirty,busy:t.loading||t.saving,saving:t.saving,onReset:t.reset})]})}export{f as TitleGeneratorSettingsSection};
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- import{V,An,s,w,o,a,m,e,n,b,Z,is,os,ss,Vc,pc,di,Vi,Gc,uc,Wc,Gi,Wi,Ar,cs,ls}from"./chunk-hxsrph02.js";import{Oa}from"./chunk-zq1qbaxb.js";var D={sealed:"已封存",folded:"已折叠",archived:"已移出"};function P(t,l){if(t.startsWith("recent-"))return"json";let d=l.trimStart();if(!d)return"markdown";if(d.startsWith("{")||d.startsWith("["))return"json";if(/^<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?>/.test(d))return"xml";return"markdown"}function W(t){if(!t||t.length>32000)return t;if(!t.trimStart().startsWith("<"))return t;let d=[],r=0,i=(p)=>" ".repeat(p),u=/(<([a-zA-Z_][\w.-]*)(?:\s+[^>]*)?>([^\r\n<]*)<\/\2>)|(<\/[a-zA-Z_][\w.-]*>)|(<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?\/>)|(<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?>)|([^<]+)/g;for(let p of t.matchAll(u)){let[,f,,,g,c,h,x]=p;if(f)d.push(`${i(r)}${f.trim()}`);else if(g)r=Math.max(0,r-1),d.push(`${i(r)}${g.trim()}`);else if(h)d.push(`${i(r)}${h.trim()}`),r++;else if(c)d.push(`${i(r)}${c.trim()}`);else if(x){let y=x.trim();if(y)for(let C of y.split(/\r?\n/)){let N=C.trim();if(N)d.push(`${i(r)}${N}`)}}}return d.length>0?d.join(`
1
+ import{V,An,s,w,o,a,m,e,n,b,Z,is,os,ss,Vc,pc,di,Vi,Gc,uc,Wc,Gi,Wi,Ar,cs,ls}from"./chunk-56a6zytc.js";import{Oa}from"./chunk-zq1qbaxb.js";var D={sealed:"已封存",folded:"已折叠",archived:"已移出"};function P(t,l){if(t.startsWith("recent-"))return"json";let d=l.trimStart();if(!d)return"markdown";if(d.startsWith("{")||d.startsWith("["))return"json";if(/^<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?>/.test(d))return"xml";return"markdown"}function W(t){if(!t||t.length>32000)return t;if(!t.trimStart().startsWith("<"))return t;let d=[],r=0,i=(p)=>" ".repeat(p),u=/(<([a-zA-Z_][\w.-]*)(?:\s+[^>]*)?>([^\r\n<]*)<\/\2>)|(<\/[a-zA-Z_][\w.-]*>)|(<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?\/>)|(<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?>)|([^<]+)/g;for(let p of t.matchAll(u)){let[,f,,,g,c,h,x]=p;if(f)d.push(`${i(r)}${f.trim()}`);else if(g)r=Math.max(0,r-1),d.push(`${i(r)}${g.trim()}`);else if(h)d.push(`${i(r)}${h.trim()}`),r++;else if(c)d.push(`${i(r)}${c.trim()}`);else if(x){let y=x.trim();if(y)for(let C of y.split(/\r?\n/)){let N=C.trim();if(N)d.push(`${i(r)}${N}`)}}}return d.length>0?d.join(`
2
2
  `):t}function z(){return n("div",{role:"status","aria-busy":"true","aria-label":"正在加载上下文",className:"space-y-2 animate-pulse",children:[e("div",{className:"h-10 rounded-xl border border-line bg-panel/40"}),e("div",{className:"h-10 rounded-xl border border-line bg-panel/40"}),e("div",{className:"h-10 rounded-xl border border-line bg-panel/40"})]})}function T(t){let{style:l}=b();return e("p",{className:l("surface.empty"),children:t.children})}function E(t){let{Chevron:l,Collapsible:d,CollapsibleContent:r,CollapsibleTrigger:i,style:u}=b(),[p,f]=a(!1),[g,c]=a(!1);return n(d,{open:p,onOpenChange:(h)=>An(()=>{if(f(h),h)c(!0)}),className:u("surface.interactive","group/collapsible"),children:[n(i,{className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs",children:[t.header,e(l,{className:"-rotate-90 text-faint group-data-[state=open]/collapsible:rotate-90"})]}),e(r,{children:g&&e("div",{className:"border-t border-line/60 bg-raised/20 px-3 py-2 text-xs text-dim",children:t.children})})]})}function R(t){let{Code:l}=b();return e(l,{code:t.code,lang:t.lang,className:"text-2xs! leading-relaxed! [&_pre]:whitespace-pre-wrap [&_pre]:break-words [&_pre]:[overflow-wrap:anywhere]"})}function O(t){let{cn:l}=b(),d=t.items.filter((i)=>i.state!=="archived");if(!d.length)return e(T,{children:"当前没有上下文内容。"});let r=d.reduce((i,u)=>i+u.tokens,0)||1;return n("div",{className:"space-y-2.5",children:[e("div",{className:"flex h-2 overflow-hidden rounded-full bg-raised",children:d.map((i)=>e("span",{className:l(is[os(i)].color,"transition-[width] duration-300 ease-out-quint"),title:`${i.label}:${i.tokens.toLocaleString()} token`,style:{width:`${i.tokens/r*100}%`}},i.id))}),e("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-2xs text-dim",children:Object.entries(is).filter(([i])=>d.some((u)=>os(u)===i)).map(([i,u])=>n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:l("size-2 rounded-full",u.color),"aria-hidden":!0}),u.label]},i))}),e("div",{className:"space-y-1.5",children:d.map((i)=>e(Q,{item:i,total:r,color:is[os(i)].color},i.id))})]})}function Q(t){let{cn:l,style:d,useTheme:r}=b();r();let i=(t.item.tokens/t.total*100).toFixed(1);return e(E,{header:n(m,{children:[e("span",{className:l("size-2 shrink-0 rounded-full",t.color),"aria-hidden":!0}),e("span",{className:"min-w-0 flex-1 font-medium break-words text-ink [overflow-wrap:anywhere]",children:t.item.label}),t.item.state&&e("span",{className:d("control.badge","text-3xs"),children:D[t.item.state]}),e("span",{className:"font-mono tabular-nums text-dim",children:t.item.tokens.toLocaleString()}),n("span",{className:"w-10 text-right font-mono text-2xs tabular-nums text-faint",children:[i,"%"]})]}),children:e(Y,{item:t.item,percent:i,color:t.color})})}function Y(t){let{cn:l,CopyButton:d,style:r,useTheme:i}=b();i();let u=t.item.detail,p=w(()=>u?P(t.item.id,u):"markdown",[u,t.item.id]),f=w(()=>{if(!u)return"";return p==="xml"?W(u):u},[u,p]);return n(m,{children:[e("div",{className:"mb-2 h-1 overflow-hidden rounded-full bg-raised",children:e("div",{className:l("h-full",t.color),style:{width:`${t.percent}%`}})}),f?n("div",{className:r("surface.subtle","group/detail relative overflow-hidden rounded-lg bg-panel/70 p-2.5"),children:[e("div",{className:"absolute right-1.5 top-1.5 z-10",children:e(d,{text:t.item.detail,size:"icon-xs",className:"bg-raised/60 hover:bg-raised text-faint hover:text-ink backdrop-blur-sm"})}),e("div",{className:"max-h-80 overflow-y-auto pr-6 text-dim",children:e(R,{code:f,lang:p})})]}):e("p",{className:"py-2 text-center text-xs text-faint",children:"(空)"})]})}var B=40,ee={accent:"bg-accent/15 text-accent",success:"bg-success/15 text-success",warning:"bg-warning/15 text-warning",danger:"bg-danger/15 text-danger",neutral:"bg-raised text-dim"};function j(t){let{Button:l,CopyButton:d,style:r,useTheme:i}=b();i();let[u,p]=a(B),f=o(null),g=w(()=>t.entries.filter((x)=>!(x.type==="extension"&&x.namespace==="session"&&x.kind==="request_budget")),[t.entries]),c=u<g.length;s(()=>{let x=f.current;if(!x||!c||typeof IntersectionObserver>"u")return;let y=new IntersectionObserver((C)=>{if(C.some((N)=>N.isIntersecting))p((N)=>Math.min(g.length,N+B))},{rootMargin:"480px"});return y.observe(x),()=>y.disconnect()},[c,g.length]);let h=w(()=>g.slice(-u).reverse(),[g,u]);if(!g.length)return e(T,{children:"还没有消息。"});return n("div",{className:"space-y-1.5",children:[n("div",{className:r("surface.subtle","flex items-center justify-between px-3 py-1.5 text-xs text-faint"),children:[n("span",{children:["共 ",g.length," 条记录"]}),e(d,{text:()=>t.entries.map((x)=>JSON.stringify(x,null,2)).join(`
3
3
 
4
4
  `),size:"icon-xs",label:"复制全部原始 JSON",className:"hover:bg-raised text-faint hover:text-ink"})]}),h.map((x)=>e(te,{entry:x},x.seq)),c&&n("div",{ref:f,className:r("surface.subtle","flex items-center justify-between bg-panel/40 px-3 py-2 text-xs text-faint"),children:[n("span",{children:["已显示 ",h.length," / ",g.length," 条"]}),n("div",{className:"flex items-center gap-1.5",children:[e(l,{size:"sm",variant:"ghost",onClick:()=>p((x)=>Math.min(g.length,x+B)),children:"加载更多"}),e(l,{size:"sm",variant:"ghost",onClick:()=>p(g.length),children:"显示全部"})]})]})]})}var te=V(function(l){let{CopyButton:d,style:r,useTheme:i}=b();i();let u=Gc(l.entry),p=w(()=>Vc(l.entry.time),[l.entry.time]);return e(E,{header:n(m,{children:[n("span",{className:"shrink-0 font-mono text-2xs tabular-nums text-faint",children:["#",l.entry.seq]}),e("span",{className:r("control.badge","shrink-0 font-medium text-3xs",ee[u.tone]),children:u.badge}),e("span",{className:"min-w-0 flex-1 truncate text-ink",children:u.title}),u.meta&&e("span",{className:r("control.badge","shrink-0 font-mono text-3xs text-faint"),children:u.meta}),e("span",{className:"shrink-0 font-mono text-2xs tabular-nums text-faint",children:p})]}),children:n("div",{className:"space-y-2",children:[n("div",{className:"flex items-center justify-between text-2xs text-faint",children:[n("span",{className:"font-mono",children:[l.entry.type," · #",l.entry.seq]}),e(d,{text:()=>JSON.stringify(l.entry,null,2),size:"icon-xs",label:"复制此条 JSON",className:"bg-raised/60 hover:bg-raised text-faint hover:text-ink"})]}),e(ae,{entry:l.entry})]})})});function ae(t){let{style:l,useTheme:d}=b();d();let r=t.entry;if(r.type==="user")return n("div",{className:"space-y-2",children:[r.text&&e("pre",{className:l("surface.subtle","max-h-72 overflow-y-auto p-2.5 font-sans text-xs leading-relaxed text-ink whitespace-pre-wrap break-words [overflow-wrap:anywhere]"),children:di(r.text)}),r.attachments&&r.attachments.length>0&&n("div",{className:"space-y-1",children:[n("div",{className:"text-2xs font-medium text-faint",children:["附件(",r.attachments.length,")"]}),e("div",{className:"flex flex-wrap gap-1.5",children:r.attachments.map((i,u)=>{let p=i.kind==="image"?Math.floor(i.data.length*0.75):i.data.length;return n("div",{className:l("surface.subtle","inline-flex items-center gap-1.5 px-2 py-1 text-2xs"),children:[e("span",{className:l("control.badge","text-3xs text-faint"),children:i.kind==="image"?"图片":i.kind==="path"?"路径":"文本"}),e("span",{className:"max-w-40 truncate font-medium text-ink",children:i.name}),n("span",{className:"font-mono text-3xs text-faint",children:[i.mimeType," · ",pc(p)]})]},`${i.name}-${u}`)})})]}),r.notices&&r.notices.length>0&&n("div",{className:"space-y-1",children:[n("div",{className:"text-2xs font-medium text-faint",children:["通知来源(",r.notices.length,")"]}),r.notices.map((i)=>n("div",{className:l("surface.subtle","flex items-center justify-between px-2.5 py-1.5 font-mono text-2xs"),children:[n("span",{className:"truncate text-ink",children:[i.sourceKind,"/",i.sourceID]}),e("span",{className:"text-faint",children:i.state})]},i.dedupeKey))]})]});if(r.type==="assistant")return n("div",{className:"space-y-2",children:[n("div",{className:"font-mono text-2xs text-faint",children:["模型:",r.model]}),r.error&&e("div",{className:"rounded-lg border border-danger/30 bg-danger/8 px-2.5 py-2 text-xs text-danger",children:r.error}),r.parts.map((i,u)=>{if(i.type==="thinking")return n("div",{className:l("surface.subtle","p-2.5 space-y-1"),children:[e("div",{className:"text-2xs font-medium text-faint",children:"思考"}),e("pre",{className:"max-h-60 overflow-y-auto font-sans text-xs italic leading-relaxed text-dim whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:di(i.text)})]},`thinking-${u}`);if(i.type==="text")return n("div",{className:l("surface.subtle","p-2.5 space-y-1"),children:[e("div",{className:"text-2xs font-medium text-faint",children:"回复"}),e("pre",{className:"max-h-60 overflow-y-auto font-sans text-xs leading-relaxed text-ink whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:di(i.text)})]},`text-${u}`);return n("div",{className:l("surface.subtle","p-2.5 space-y-1.5"),children:[n("div",{className:"flex items-center justify-between gap-2 text-2xs",children:[n("span",{className:"font-mono font-medium text-ink",children:["工具调用 · ",i.name]}),e("span",{className:"truncate font-mono text-3xs text-faint",children:i.id})]}),e("div",{className:"max-h-60 overflow-y-auto text-dim",children:e(R,{code:Vi(JSON.stringify(i.input,uc,2)),lang:"json"})})]},i.id||`tool-${u}`)})]});if(r.type==="tool_result")return n("div",{className:"space-y-2",children:[n("div",{className:"flex flex-wrap items-center gap-2 font-mono text-2xs text-faint",children:[e("span",{className:"text-ink",children:r.name}),e("span",{children:"·"}),e("span",{className:"truncate",children:r.callID}),e("span",{className:l("control.badge","ml-auto font-sans text-3xs",r.isError?"bg-danger/15 text-danger":"text-dim"),children:r.isError?"执行失败":"执行完成"})]}),r.images&&r.images.length>0&&e("div",{className:"flex flex-wrap gap-1.5",children:r.images.map((i,u)=>n("span",{className:l("surface.subtle","px-2 py-1 font-mono text-2xs text-faint"),children:["图片 #",u+1," · ",i.mimeType," · ",pc(Math.floor(i.data.length*0.75))]},`${i.mimeType}-${u}`))}),ss(r.output)?e("pre",{className:l("surface.subtle","max-h-72 overflow-y-auto p-2.5 font-mono text-2xs leading-relaxed whitespace-pre-wrap break-words [overflow-wrap:anywhere]",r.isError?"text-danger":"text-dim"),children:di(r.output)}):e("p",{className:"py-1 text-faint",children:"(无文本输出)"})]});return e("pre",{className:l("surface.subtle","max-h-72 overflow-y-auto p-2.5 font-mono text-2xs leading-relaxed text-dim whitespace-pre-wrap break-words [overflow-wrap:anywhere]"),children:Wc(r)})}function L(t){let{cn:l,style:d,useTheme:r}=b();if(r(),!t.todos.length)return e(T,{children:"暂无待办。"});return e("ul",{className:"space-y-1.5",children:t.todos.map((i)=>n("li",{className:d("surface.interactive","flex items-start gap-2.5 px-3 py-2 text-xs"),children:[n("span",{className:l("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border transition-colors duration-300",i.status==="completed"&&"border-success bg-success text-panel",i.status==="in_progress"&&"border-accent",i.status==="pending"&&"border-line-strong"),children:[i.status==="completed"&&e(Z,{className:"size-2.5 animate-pop",strokeWidth:3.5}),i.status==="in_progress"&&e("span",{className:"size-1.5 animate-pulse rounded-full bg-accent"})]}),e("span",{className:l("min-w-0 flex-1 break-words leading-relaxed [overflow-wrap:anywhere]",i.status==="completed"&&"text-faint line-through decoration-faint/60",i.status==="in_progress"&&"font-medium text-ink",i.status==="pending"&&"text-dim"),children:i.content})]},`${i.status}-${i.content}`))})}function A(t){let{cn:l,style:d,useTheme:r}=b();r();let[i,u]=a("all"),p=w(()=>t.tools.filter((c)=>c.deferred).length,[t.tools]),f=t.tools.length-p,g=w(()=>{if(i==="deferred")return t.tools.filter((c)=>c.deferred);if(i==="active")return t.tools.filter((c)=>!c.deferred);return t.tools},[t.tools,i]);if(!t.tools.length)return e(T,{children:"当前会话没有可用工具。"});return n("div",{className:"space-y-2",children:[p>0&&n("div",{className:"flex items-center gap-1 text-2xs",children:[n("button",{type:"button",onClick:()=>u("all"),className:l("rounded-lg px-2 py-1 transition-colors",i==="all"?"bg-raised font-medium text-ink":"text-faint hover:text-dim"),children:["全部 (",t.tools.length,")"]}),n("button",{type:"button",onClick:()=>u("active"),className:l("rounded-lg px-2 py-1 transition-colors",i==="active"?"bg-raised font-medium text-ink":"text-faint hover:text-dim"),children:["常驻 (",f,")"]}),n("button",{type:"button",onClick:()=>u("deferred"),className:l("rounded-lg px-2 py-1 transition-colors",i==="deferred"?"bg-raised font-medium text-ink":"text-faint hover:text-dim"),children:["延迟加载 (",p,")"]})]}),e("div",{className:"space-y-1.5",children:g.map((c)=>e(se,{tool:c},`${c.group}-${c.name}`))})]})}function se(t){let{style:l,useTheme:d}=b();return d(),e(E,{header:n("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 truncate font-mono text-ink",children:[e("span",{className:"truncate",children:t.tool.name}),t.tool.group&&e("span",{className:l("control.badge","font-sans text-3xs"),children:t.tool.group}),t.tool.deferred&&e("span",{className:l("control.badge","font-sans text-3xs"),children:"延迟加载"})]}),children:e(ne,{tool:t.tool})})}function ne(t){let{CopyButton:l,style:d,useTheme:r}=b();r();let i=w(()=>JSON.stringify(t.tool.schema,null,2),[t.tool.schema]);return n(m,{children:[t.tool.deferred&&e("div",{className:d("surface.subtle","mb-2 px-2.5 py-1.5 text-2xs text-faint"),children:"延迟加载:此工具默认以精简描述挂载,模型通过 toolsearch 取回定义后才向上下文注入完整参数 Schema。"}),t.tool.description&&e("pre",{className:"mb-2 max-h-60 overflow-y-auto font-sans text-xs leading-relaxed text-dim whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:Vi(t.tool.description)}),n("div",{className:d("surface.subtle","group/schema relative overflow-hidden rounded-lg p-2.5"),children:[e("div",{className:"absolute right-1.5 top-1.5 z-10",children:e(l,{text:i,size:"icon-xs",className:"bg-raised/60 hover:bg-raised text-faint hover:text-ink backdrop-blur-sm"})}),e("div",{className:"max-h-72 overflow-y-auto pr-6 text-dim",children:e(R,{code:Vi(i),lang:"json"})})]})]})}function oe(){try{let t=localStorage.getItem("basalt.contextSidebar.tab");if(t==="tools"||t==="todos"||t==="raw")return t}catch{}return"breakdown"}function ie(t){let{style:l,useTheme:d}=b();return d(),n("div",{className:l("surface.panel","bg-panel/70 px-3 py-2"),children:[e("div",{className:"text-3xs font-medium uppercase tracking-wider text-faint",children:t.label}),e("div",{className:"mt-0.5 truncate font-mono text-xs font-semibold tabular-nums text-ink",children:t.value})]})}function He(t){let{Button:l,StatusChip:d,Segmented:r,cn:i,style:u,useTheme:p}=b();p();let[f,g]=a(oe),[c,h]=a(()=>Ar.get(t.session.id)),[x,y]=a(!1),[C,N]=a(0),[F,H]=a(!1);s(()=>{let v=setTimeout(()=>An(()=>H(!0)),140);return()=>clearTimeout(v)},[]),s(()=>{let v=Ar.get(t.session.id);if(v)h(v);return cs((I,G)=>{if(I===t.session.id)An(()=>h(G))})},[t.session.id]),s(()=>{let v=!0;return y(!1),ls(t.connection,t.session.id,`${t.session.updated}:${t.entries.length}`,C>0).then((I)=>{if(v)An(()=>h(I))},()=>{if(v)y(!0)}),()=>{v=!1}},[t.connection,t.session.id,t.session.updated,t.entries.length,C]);let k=Gi(c?.items??[],c?.usableWindow,c?.calibratedTokens,c?.lastInputTokens,c?.hasPendingOutput),S=Wi(k.percent),M=c?.lastCacheHitRate,_=c?.usage?.cacheHitRate,q=M===void 0?"—":`${(M*100).toFixed(1)}%`,U=_===void 0?"—":`${(_*100).toFixed(1)}%`,J=(v)=>{g(v);try{localStorage.setItem("basalt.contextSidebar.tab",v)}catch{}},K=[{value:"breakdown",label:"构成"},{value:"tools",label:n("span",{className:"inline-flex items-center gap-1",children:["工具",c&&e("span",{className:"text-3xs text-faint tabular-nums",children:c.tools.length})]})},{value:"todos",label:n("span",{className:"inline-flex items-center gap-1",children:["待办",t.session.todos.length>0&&e("span",{className:"text-3xs text-faint tabular-nums",children:t.session.todos.length})]})},{value:"raw",label:"原始消息"}],X=n("div",{className:"px-3.5 pt-1 pb-3",children:[n("div",{className:"flex items-start justify-between gap-3",children:[n("div",{children:[e("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:"预计下次输入"}),n("div",{className:"mt-0.5 flex items-baseline gap-1.5",children:[e("span",{className:"font-mono text-xl font-semibold tabular-nums text-ink",children:c?k.totalTokens.toLocaleString():"—"}),n("span",{className:"font-mono text-xs text-dim",children:["/ ",c?.usableWindow.toLocaleString()??"—"]})]})]}),e(d,{tone:S==="overflow"||S==="near_limit"?"danger":S==="sealing"?"warning":"success",children:S==="overflow"?"预计超限":S==="near_limit"?"接近上限":S==="sealing"?"接近封存":"正常"})]}),k.percent!==null&&e("meter",{className:"sr-only","aria-label":"可用上下文窗口占比",min:0,max:100,value:Math.min(100,k.percent)}),e("div",{"aria-hidden":!0,className:i("relative mt-2.5 h-2 w-full overflow-hidden rounded-full bg-raised",!c&&"animate-pulse"),children:e("div",{className:"h-full rounded-full bg-accent transition-[width] duration-500 ease-out-quint",style:{width:`${Math.min(100,k.percent??0)}%`}})}),n("div",{className:"mt-2 flex items-center justify-between text-2xs",children:[e("span",{className:"text-dim",children:k.percent===null?"暂无窗口数据":`${k.percent.toFixed(1)}% 可用窗口`}),n("span",{className:"text-faint",children:["总窗口 ",c?.contextWindow.toLocaleString()??"—"," · 80% 封存 · 97% 折叠"]})]}),n("div",{className:"mt-3 flex items-center justify-between gap-2 text-2xs",title:"最近实际发往模型的请求体大小(UTF-8 字节,图片优化后,不含 HTTP 头);重启后需重新发送请求才有记录。",children:[e("span",{className:"text-dim",children:"最近请求体"}),e("span",{className:"font-mono font-semibold tabular-nums text-ink",children:c?.lastRequestBodyBytes===void 0?"—":Oa(c.lastRequestBodyBytes)})]}),n("div",{className:"mt-2 flex items-center justify-between gap-2 text-2xs",children:[e("span",{className:"text-dim",children:"最近实际输入"}),n("span",{className:"font-mono tabular-nums text-ink",children:[c?.lastInputTokens?.toLocaleString()??"—"," tokens"]})]}),c?.usage&&(c.usage.input>0||c.usage.output>0||c.usage.cacheRead>0||c.usage.cacheWrite>0||c.usage.cost>0)&&e("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[["Input",c.usage.input.toLocaleString()],["Output",c.usage.output.toLocaleString()],["缓存命中 当前 / 平均",`${q} / ${U}`],["平均 TPS",c.usage.tps!==void 0?`${c.usage.tps.toFixed(1)} tok/s`:"—"]].map(([v,I])=>e(ie,{label:v,value:I},v))})]});return n(m,{children:[X,e("div",{className:"px-3 py-2",children:e(r,{value:f,onChange:J,options:K,className:"w-full grid grid-cols-4"})}),n("div",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-3",children:[x&&!c&&n("div",{role:"alert",className:"flex items-center justify-between rounded-xl border border-danger/30 bg-danger/8 px-3 py-2 text-xs text-danger",children:[e("span",{children:"上下文加载失败。"}),e(l,{size:"sm",variant:"ghost",onClick:()=>N((v)=>v+1),children:"重试"})]}),e("div",{children:!F?e(z,{}):n(m,{children:[f==="raw"&&e(j,{entries:t.entries}),f==="todos"&&e(L,{todos:t.session.todos}),f==="breakdown"&&(c?e(O,{items:k.items}):!x?e(z,{}):null),f==="tools"&&(c?e(A,{tools:c.tools??[]}):!x?e(z,{}):null)]})},f)]})]})}export{He as ContextSidebar};
Binary file
Binary file
@@ -1,2 +1,2 @@
1
- import{e,n,b,Fe}from"./chunk-hxsrph02.js";function wi(a){let t=a.filter((l)=>l.closedAt===null);if(!t.length)return[];return[{label:"项目",options:t.map((l)=>({value:l.id,label:l.name,description:l.directory}))}]}function ki(a){let{Input:t}=b();return n("div",{className:"relative mb-3 min-w-0",children:[e(Fe,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),e(t,{type:"search","aria-label":a.label,placeholder:a.placeholder,value:a.value,onChange:(l)=>a.onChange(l.target.value),className:"h-10 min-w-0 pl-9"})]})}function Ci(){return e("div",{role:"status","aria-label":"正在加载",className:"divide-y divide-line",children:[0,1,2].map((a)=>n("div",{className:"h-16 space-y-2 px-4 py-3",children:[e("div",{className:"h-3 w-24 animate-pulse rounded bg-raised"}),e("div",{className:"h-3 w-2/3 animate-pulse rounded bg-raised"})]},a))})}
1
+ import{e,n,b,Fe}from"./chunk-56a6zytc.js";function wi(a){let t=a.filter((l)=>l.closedAt===null);if(!t.length)return[];return[{label:"项目",options:t.map((l)=>({value:l.id,label:l.name,description:l.directory}))}]}function ki(a){let{Input:t}=b();return n("div",{className:"relative mb-3 min-w-0",children:[e(Fe,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),e(t,{type:"search","aria-label":a.label,placeholder:a.placeholder,value:a.value,onChange:(l)=>a.onChange(l.target.value),className:"h-10 min-w-0 pl-9"})]})}function Ci(){return e("div",{role:"status","aria-label":"正在加载",className:"divide-y divide-line",children:[0,1,2].map((a)=>n("div",{className:"h-16 space-y-2 px-4 py-3",children:[e("div",{className:"h-3 w-24 animate-pulse rounded bg-raised"}),e("div",{className:"h-3 w-2/3 animate-pulse rounded bg-raised"})]},a))})}
2
2
  export{wi,ki,Ci};
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- import{ie}from"./chunk-j2gkg76r.js";import{t,i,F,A,q,un,L,M,R,P,I,O,D,d,g,J,ec,Gr,Yt,Q,kt,ct}from"./chunk-eq59kad4.js";import{ge}from"./chunk-508cpafz.js";import{fn,ci}from"./chunk-ctr4kt7p.js";import{Ze,Qe}from"./chunk-hxsrph02.js";var lt=Qe(function(et,nt){(function(n,s){if(typeof et==="object"&&typeof nt==="object")nt.exports=s(ci());else if(typeof define==="function"&&define.amd)define(["cose-base"],s);else if(typeof et==="object")et.cytoscapeFcose=s(ci());else n.cytoscapeFcose=s(n.coseBase)})(et,function(e){return(()=>{var n={658:(T)=>{T.exports=Object.assign!=null?Object.assign.bind(Object):function(G){for(var p=arguments.length,x=Array(p>1?p-1:0),l=1;l<p;l++)x[l-1]=arguments[l];return x.forEach(function(y){Object.keys(y).forEach(function(c){return G[c]=y[c]})}),G}},548:(T,G,p)=>{var x=function(){function c(f,u){var h=[],r=!0,z=!1,N=void 0;try{for(var o=f[Symbol.iterator](),v;!(r=(v=o.next()).done);r=!0)if(h.push(v.value),u&&h.length===u)break}catch(C){z=!0,N=C}finally{try{if(!r&&o.return)o.return()}finally{if(z)throw N}}return h}return function(f,u){if(Array.isArray(f))return f;else if(Symbol.iterator in Object(f))return c(f,u);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=p(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(c){var f={};for(var u=0;u<c.length;u++)f[c[u].id()]=!0;var h=c.filter(function(r,z){if(typeof r==="number")r=z;var N=r.parent()[0];while(N!=null){if(f[N.id()])return!1;N=N.parent()[0]}return!0});return h},y.connectComponents=function(c,f,u,h){var r=new l,z=new Set,N=[],o=void 0,v=void 0,C=void 0,a=!1,S=1,Y=[],b=[],U=function(){var w=c.collection();b.push(w);var _=u[0],X=c.collection();X.merge(_).merge(_.descendants().intersection(f)),N.push(_),X.forEach(function(ee){r.push(ee),z.add(ee),w.merge(ee)});var j=function(){_=r.shift();var fe=c.collection();_.neighborhood().nodes().forEach(function(H){if(f.intersection(_.edgesWith(H)).length>0)fe.merge(H)});for(var Ae=0;Ae<fe.length;Ae++){var Re=fe[Ae];if(o=u.intersection(Re.union(Re.ancestors())),o!=null&&!z.has(o[0])){var ce=o.union(o.descendants());ce.forEach(function(H){if(r.push(H),z.add(H),w.merge(H),u.has(H))N.push(H)})}}};while(r.length!=0)j();if(w.forEach(function(ee){f.intersection(ee.connectedEdges()).forEach(function(fe){if(w.has(fe.source())&&w.has(fe.target()))w.merge(fe)})}),N.length==u.length)a=!0;if(!a||a&&S>1){v=N[0],C=v.connectedEdges().length,N.forEach(function(ee){if(ee.connectedEdges().length<C)C=ee.connectedEdges().length,v=ee}),Y.push(v.id());var oe=c.collection();oe.merge(N[0]),N.forEach(function(ee){oe.merge(ee)}),N=[],u=u.difference(oe),S++}};do U();while(!a);if(h){if(Y.length>0)h.set("dummy"+(h.size+1),Y)}return b},y.relocateComponent=function(c,f,u){if(!u.fixedNodeConstraint){var{POSITIVE_INFINITY:h,NEGATIVE_INFINITY:r,POSITIVE_INFINITY:z,NEGATIVE_INFINITY:N}=Number;if(u.quality=="draft"){var o=!0,v=!1,C=void 0;try{for(var a=f.nodeIndexes[Symbol.iterator](),S;!(o=(S=a.next()).done);o=!0){var Y=S.value,b=x(Y,2),U=b[0],B=b[1],w=u.cy.getElementById(U);if(w){var _=w.boundingBox(),X=f.xCoords[B]-_.w/2,j=f.xCoords[B]+_.w/2,oe=f.yCoords[B]-_.h/2,ee=f.yCoords[B]+_.h/2;if(X<h)h=X;if(j>r)r=j;if(oe<z)z=oe;if(ee>N)N=ee}}}catch(H){v=!0,C=H}finally{try{if(!o&&a.return)a.return()}finally{if(v)throw C}}var fe=c.x-(r+h)/2,Ae=c.y-(N+z)/2;f.xCoords=f.xCoords.map(function(H){return H+fe}),f.yCoords=f.yCoords.map(function(H){return H+Ae})}else{Object.keys(f).forEach(function(H){var ae=f[H],Ie=ae.getRect().x,be=ae.getRect().x+ae.getRect().width,Ne=ae.getRect().y,xe=ae.getRect().y+ae.getRect().height;if(Ie<h)h=Ie;if(be>r)r=be;if(Ne<z)z=Ne;if(xe>N)N=xe});var Re=c.x-(r+h)/2,ce=c.y-(N+z)/2;Object.keys(f).forEach(function(H){var ae=f[H];ae.setCenter(ae.getCenterX()+Re,ae.getCenterY()+ce)})}}},y.calcBoundingBox=function(c,f,u,h){var{MAX_SAFE_INTEGER:r,MIN_SAFE_INTEGER:z,MAX_SAFE_INTEGER:N,MIN_SAFE_INTEGER:o}=Number,v=void 0,C=void 0,a=void 0,S=void 0,Y=c.descendants().not(":parent"),b=Y.length;for(var U=0;U<b;U++){var B=Y[U];if(v=f[h.get(B.id())]-B.width()/2,C=f[h.get(B.id())]+B.width()/2,a=u[h.get(B.id())]-B.height()/2,S=u[h.get(B.id())]+B.height()/2,r>v)r=v;if(z<C)z=C;if(N>a)N=a;if(o<S)o=S}var w={};return w.topLeftX=r,w.topLeftY=N,w.width=z-r,w.height=o-N,w},y.calcParentsWithoutChildren=function(c,f){var u=c.collection();return f.nodes(":parent").forEach(function(h){var r=!1;if(h.children().forEach(function(z){if(z.css("display")!="none")r=!0}),!r)u.merge(h)}),u},T.exports=y},816:(T,G,p)=>{var x=p(548),l=p(140).CoSELayout,y=p(140).CoSENode,c=p(140).layoutBase.PointD,f=p(140).layoutBase.DimensionD,u=p(140).layoutBase.LayoutConstants,h=p(140).layoutBase.FDLayoutConstants,r=p(140).CoSEConstants,z=function(o,v){var{cy:C,eles:a}=o,S=a.nodes(),Y=a.edges(),b=void 0,U=void 0,B=void 0,w={};if(o.randomize)b=v.nodeIndexes,U=v.xCoords,B=v.yCoords;var _=function(H){return typeof H==="function"},X=function(H,ae){if(_(H))return H(ae);else return H},j=x.calcParentsWithoutChildren(C,a),oe=function ce(H,ae,Ie,be){var Ne=ae.length;for(var xe=0;xe<Ne;xe++){var V=ae[xe],Te=null;if(V.intersection(j).length==0)Te=V.children();var te=void 0,ve=V.layoutDimensions({nodeDimensionsIncludeLabels:be.nodeDimensionsIncludeLabels});if(V.outerWidth()!=null&&V.outerHeight()!=null)if(be.randomize)if(!V.isParent())te=H.add(new y(Ie.graphManager,new c(U[b.get(V.id())]-ve.w/2,B[b.get(V.id())]-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else{var ke=x.calcBoundingBox(V,U,B,b);if(V.intersection(j).length==0)te=H.add(new y(Ie.graphManager,new c(ke.topLeftX,ke.topLeftY),new f(ke.width,ke.height)));else te=H.add(new y(Ie.graphManager,new c(ke.topLeftX,ke.topLeftY),new f(parseFloat(ve.w),parseFloat(ve.h))))}else te=H.add(new y(Ie.graphManager,new c(V.position("x")-ve.w/2,V.position("y")-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else te=H.add(new y(this.graphManager));if(te.id=V.data("id"),te.nodeRepulsion=X(be.nodeRepulsion,V),te.paddingLeft=parseInt(V.css("padding")),te.paddingTop=parseInt(V.css("padding")),te.paddingRight=parseInt(V.css("padding")),te.paddingBottom=parseInt(V.css("padding")),be.nodeDimensionsIncludeLabels)te.labelWidth=V.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,te.labelHeight=V.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,te.labelPosVertical=V.css("text-valign"),te.labelPosHorizontal=V.css("text-halign");if(w[V.data("id")]=te,isNaN(te.rect.x))te.rect.x=0;if(isNaN(te.rect.y))te.rect.y=0;if(Te!=null&&Te.length>0){var $e=void 0;$e=Ie.getGraphManager().add(Ie.newGraph(),te),ce($e,Te,Ie,be)}}},ee=function(H,ae,Ie){var be=0,Ne=0;for(var xe=0;xe<Ie.length;xe++){var V=Ie[xe],Te=w[V.data("source")],te=w[V.data("target")];if(Te&&te&&Te!==te&&Te.getEdgesBetween(te).length==0){var ve=ae.add(H.newEdge(),Te,te);ve.id=V.id(),ve.idealLength=X(o.idealEdgeLength,V),ve.edgeElasticity=X(o.edgeElasticity,V),be+=ve.idealLength,Ne++}}if(o.idealEdgeLength!=null){if(Ne>0)r.DEFAULT_EDGE_LENGTH=h.DEFAULT_EDGE_LENGTH=be/Ne;else if(!_(o.idealEdgeLength))r.DEFAULT_EDGE_LENGTH=h.DEFAULT_EDGE_LENGTH=o.idealEdgeLength;else r.DEFAULT_EDGE_LENGTH=h.DEFAULT_EDGE_LENGTH=50;r.MIN_REPULSION_DIST=h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,r.DEFAULT_RADIAL_SEPARATION=h.DEFAULT_EDGE_LENGTH}},fe=function(H,ae){if(ae.fixedNodeConstraint)H.constraints.fixedNodeConstraint=ae.fixedNodeConstraint;if(ae.alignmentConstraint)H.constraints.alignmentConstraint=ae.alignmentConstraint;if(ae.relativePlacementConstraint)H.constraints.relativePlacementConstraint=ae.relativePlacementConstraint};if(o.nestingFactor!=null)r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=o.nestingFactor;if(o.gravity!=null)r.DEFAULT_GRAVITY_STRENGTH=h.DEFAULT_GRAVITY_STRENGTH=o.gravity;if(o.numIter!=null)r.MAX_ITERATIONS=h.MAX_ITERATIONS=o.numIter;if(o.gravityRange!=null)r.DEFAULT_GRAVITY_RANGE_FACTOR=h.DEFAULT_GRAVITY_RANGE_FACTOR=o.gravityRange;if(o.gravityCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=o.gravityCompound;if(o.gravityRangeCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=o.gravityRangeCompound;if(o.initialEnergyOnIncremental!=null)r.DEFAULT_COOLING_FACTOR_INCREMENTAL=h.DEFAULT_COOLING_FACTOR_INCREMENTAL=o.initialEnergyOnIncremental;if(o.tilingCompareBy!=null)r.TILING_COMPARE_BY=o.tilingCompareBy;if(o.quality=="proof")u.QUALITY=2;else u.QUALITY=0;if(r.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=o.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!o.randomize,r.ANIMATE=h.ANIMATE=u.ANIMATE=o.animate,r.TILE=o.tile,r.TILING_PADDING_VERTICAL=typeof o.tilingPaddingVertical==="function"?o.tilingPaddingVertical.call():o.tilingPaddingVertical,r.TILING_PADDING_HORIZONTAL=typeof o.tilingPaddingHorizontal==="function"?o.tilingPaddingHorizontal.call():o.tilingPaddingHorizontal,r.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!0,r.PURE_INCREMENTAL=!o.randomize,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=o.uniformNodeDimensions,o.step=="transformed")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!1;if(o.step=="enforced")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!1;if(o.step=="cose")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!0;if(o.step=="all"){if(o.randomize)r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0}if(o.fixedNodeConstraint||o.alignmentConstraint||o.relativePlacementConstraint)r.TREE_REDUCTION_ON_INCREMENTAL=!1;else r.TREE_REDUCTION_ON_INCREMENTAL=!0;var Ae=new l,Re=Ae.newGraphManager();return oe(Re.addRoot(),x.getTopMostNodes(S),Ae,o),ee(Ae,Re,Y),fe(Ae,o),Ae.runLayout(),w};T.exports={coseLayout:z}},212:(T,G,p)=>{var x=function(){function o(v,C){for(var a=0;a<C.length;a++){var S=C[a];if(S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S)S.writable=!0;Object.defineProperty(v,S.key,S)}}return function(v,C,a){if(C)o(v.prototype,C);if(a)o(v,a);return v}}();function l(o,v){if(!(o instanceof v))throw TypeError("Cannot call a class as a function")}var y=p(658),c=p(548),f=p(657),u=f.spectralLayout,h=p(816),r=h.coseLayout,z=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(v){return 4500},idealEdgeLength:function(v){return 50},edgeElasticity:function(v){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),N=function(){function o(v){l(this,o),this.options=y({},z,v)}return x(o,[{key:"run",value:function(){var C=this,a=this.options,{cy:S,eles:Y}=a,b=[],U=void 0,B=void 0,w=[],_=void 0,X=[];if(a.fixedNodeConstraint&&(!Array.isArray(a.fixedNodeConstraint)||a.fixedNodeConstraint.length==0))a.fixedNodeConstraint=void 0;if(a.alignmentConstraint){if(a.alignmentConstraint.vertical&&(!Array.isArray(a.alignmentConstraint.vertical)||a.alignmentConstraint.vertical.length==0))a.alignmentConstraint.vertical=void 0;if(a.alignmentConstraint.horizontal&&(!Array.isArray(a.alignmentConstraint.horizontal)||a.alignmentConstraint.horizontal.length==0))a.alignmentConstraint.horizontal=void 0}if(a.relativePlacementConstraint&&(!Array.isArray(a.relativePlacementConstraint)||a.relativePlacementConstraint.length==0))a.relativePlacementConstraint=void 0;var j=a.fixedNodeConstraint||a.alignmentConstraint||a.relativePlacementConstraint;if(j)a.tile=!1,a.packComponents=!1;var oe=void 0,ee=!1;if(S.layoutUtilities&&a.packComponents){if(oe=S.layoutUtilities("get"),!oe)oe=S.layoutUtilities();ee=!0}if(Y.nodes().length>0)if(!ee){var fe=a.eles.boundingBox();if(X.push({x:fe.x1+fe.w/2,y:fe.y1+fe.h/2}),a.randomize){var Ae=u(a);b.push(Ae)}if(a.quality=="default"||a.quality=="proof")w.push(r(a,b[0])),c.relocateComponent(X[0],w[0],a);else c.relocateComponent(X[0],b[0],a)}else{var Re=c.getTopMostNodes(a.eles.nodes());if(_=c.connectComponents(S,a.eles,Re),_.forEach(function(W){var k=W.boundingBox();X.push({x:k.x1+k.w/2,y:k.y1+k.h/2})}),a.randomize)_.forEach(function(W){a.eles=W,b.push(u(a))});if(a.quality=="default"||a.quality=="proof"){var ce=S.collection();if(a.tile){var H=new Map,ae=[],Ie=[],be=0,Ne={nodeIndexes:H,xCoords:ae,yCoords:Ie},xe=[];if(_.forEach(function(W,k){if(W.edges().length==0)W.nodes().forEach(function(pe,se){if(ce.merge(W.nodes()[se]),!pe.isParent())Ne.nodeIndexes.set(W.nodes()[se].id(),be++),Ne.xCoords.push(W.nodes()[0].position().x),Ne.yCoords.push(W.nodes()[0].position().y)}),xe.push(k)}),ce.length>1){var V=ce.boundingBox();X.push({x:V.x1+V.w/2,y:V.y1+V.h/2}),_.push(ce),b.push(Ne);for(var Te=xe.length-1;Te>=0;Te--)_.splice(xe[Te],1),b.splice(xe[Te],1),X.splice(xe[Te],1)}}_.forEach(function(W,k){a.eles=W,w.push(r(a,b[k])),c.relocateComponent(X[k],w[k],a)})}else _.forEach(function(W,k){c.relocateComponent(X[k],b[k],a)});var te=new Set;if(_.length>1){var ve=[],ke=Y.filter(function(W){return W.css("display")=="none"});_.forEach(function(W,k){var pe=void 0;if(a.quality=="draft")pe=b[k].nodeIndexes;if(W.nodes().not(ke).length>0){var se={};se.edges=[],se.nodes=[];var me=void 0;if(W.nodes().not(ke).forEach(function(de){if(a.quality=="draft")if(!de.isParent())me=pe.get(de.id()),se.nodes.push({x:b[k].xCoords[me]-de.boundingbox().w/2,y:b[k].yCoords[me]-de.boundingbox().h/2,width:de.boundingbox().w,height:de.boundingbox().h});else{var he=c.calcBoundingBox(de,b[k].xCoords,b[k].yCoords,pe);se.nodes.push({x:he.topLeftX,y:he.topLeftY,width:he.width,height:he.height})}else if(w[k][de.id()])se.nodes.push({x:w[k][de.id()].getLeft(),y:w[k][de.id()].getTop(),width:w[k][de.id()].getWidth(),height:w[k][de.id()].getHeight()})}),W.edges().forEach(function(de){var he=de.source(),Ee=de.target();if(he.css("display")!="none"&&Ee.css("display")!="none"){if(a.quality=="draft"){var Pe=pe.get(he.id()),Je=pe.get(Ee.id()),Me=[],Ge=[];if(he.isParent()){var Ve=c.calcBoundingBox(he,b[k].xCoords,b[k].yCoords,pe);Me.push(Ve.topLeftX+Ve.width/2),Me.push(Ve.topLeftY+Ve.height/2)}else Me.push(b[k].xCoords[Pe]),Me.push(b[k].yCoords[Pe]);if(Ee.isParent()){var Xe=c.calcBoundingBox(Ee,b[k].xCoords,b[k].yCoords,pe);Ge.push(Xe.topLeftX+Xe.width/2),Ge.push(Xe.topLeftY+Xe.height/2)}else Ge.push(b[k].xCoords[Je]),Ge.push(b[k].yCoords[Je]);se.edges.push({startX:Me[0],startY:Me[1],endX:Ge[0],endY:Ge[1]})}else if(w[k][he.id()]&&w[k][Ee.id()])se.edges.push({startX:w[k][he.id()].getCenterX(),startY:w[k][he.id()].getCenterY(),endX:w[k][Ee.id()].getCenterX(),endY:w[k][Ee.id()].getCenterY()})}}),se.nodes.length>0)ve.push(se),te.add(k)}});var $e=oe.packComponents(ve,a.randomize).shifts;if(a.quality=="draft")b.forEach(function(W,k){var pe=W.xCoords.map(function(me){return me+$e[k].dx}),se=W.yCoords.map(function(me){return me+$e[k].dy});W.xCoords=pe,W.yCoords=se});else{var We=0;te.forEach(function(W){Object.keys(w[W]).forEach(function(k){var pe=w[W][k];pe.setCenter(pe.getCenterX()+$e[We].dx,pe.getCenterY()+$e[We].dy)}),We++})}}}var Ue=function(k,pe){if(a.quality=="default"||a.quality=="proof"){if(typeof k==="number")k=pe;var se=void 0,me=void 0,de=k.data("id");if(w.forEach(function(Ee){if(de in Ee)se={x:Ee[de].getRect().getCenterX(),y:Ee[de].getRect().getCenterY()},me=Ee[de]}),a.nodeDimensionsIncludeLabels){if(me.labelWidth){if(me.labelPosHorizontal=="left")se.x+=me.labelWidth/2;else if(me.labelPosHorizontal=="right")se.x-=me.labelWidth/2}if(me.labelHeight){if(me.labelPosVertical=="top")se.y+=me.labelHeight/2;else if(me.labelPosVertical=="bottom")se.y-=me.labelHeight/2}}if(se==null)se={x:k.position("x"),y:k.position("y")};return{x:se.x,y:se.y}}else{var he=void 0;if(b.forEach(function(Ee){var Pe=Ee.nodeIndexes.get(k.id());if(Pe!=null)he={x:Ee.xCoords[Pe],y:Ee.yCoords[Pe]}}),he==null)he={x:k.position("x"),y:k.position("y")};return{x:he.x,y:he.y}}};if(a.quality=="default"||a.quality=="proof"||a.randomize){var rt=c.calcParentsWithoutChildren(S,Y),He=Y.filter(function(W){return W.css("display")=="none"});if(a.eles=Y.not(He),Y.nodes().not(":parent").not(He).layoutPositions(C,a,Ue),rt.length>0)rt.forEach(function(W){W.position(Ue(W))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();T.exports=N},657:(T,G,p)=>{var x=p(548),l=p(140).layoutBase.Matrix,y=p(140).layoutBase.SVD,c=function(u){var{cy:h,eles:r}=u,z=r.nodes(),N=r.nodes(":parent"),o=new Map,v=new Map,C=new Map,a=[],S=[],Y=[],b=[],U=[],B=[],w=[],_=[],X=void 0,j=void 0,oe=1e8,ee=0.000000001,{piTol:fe,samplingType:Ae,nodeSeparation:Re}=u,ce=void 0,H=function(){var Z=0,K=0,re=!1;while(K<ce){Z=Math.floor(Math.random()*j),re=!1;for(var ne=0;ne<K;ne++)if(b[ne]==Z){re=!0;break}if(!re)b[K]=Z,K++;else continue}},ae=function(Z,K,re){var ne=[],we=0,ue=0,le=0,Le=void 0,Ce=[],De=0,Oe=1;for(var ze=0;ze<j;ze++)Ce[ze]=oe;ne[ue]=Z,Ce[Z]=0;while(ue>=we){le=ne[we++];var Ye=a[le];for(var Be=0;Be<Ye.length;Be++)if(Le=v.get(Ye[Be]),Ce[Le]==oe)Ce[Le]=Ce[le]+1,ne[++ue]=Le;B[le][K]=Ce[le]*Re}if(re){for(var Fe=0;Fe<j;Fe++)if(B[Fe][K]<U[Fe])U[Fe]=B[Fe][K];for(var Ke=0;Ke<j;Ke++)if(U[Ke]>De)De=U[Ke],Oe=Ke}return Oe},Ie=function(Z){var K=void 0;if(!Z){H();for(var re=0;re<ce;re++)ae(b[re],re,Z,!1)}else{K=Math.floor(Math.random()*j),X=K;for(var ne=0;ne<j;ne++)U[ne]=oe;for(var we=0;we<ce;we++)b[we]=K,K=ae(K,we,Z)}for(var ue=0;ue<j;ue++)for(var le=0;le<ce;le++)B[ue][le]*=B[ue][le];for(var Le=0;Le<ce;Le++)w[Le]=[];for(var Ce=0;Ce<ce;Ce++)for(var De=0;De<ce;De++)w[Ce][De]=B[b[De]][Ce]},be=function(){var Z=y.svd(w),{S:K,U:re,V:ne}=Z,we=K[0]*K[0]*K[0],ue=[];for(var le=0;le<ce;le++){ue[le]=[];for(var Le=0;Le<ce;Le++)if(ue[le][Le]=0,le==Le)ue[le][Le]=K[le]/(K[le]*K[le]+we/(K[le]*K[le]))}_=l.multMat(l.multMat(ne,ue),l.transpose(re))},Ne=function(){var Z=void 0,K=void 0,re=[],ne=[],we=[],ue=[];for(var le=0;le<j;le++)re[le]=Math.random(),ne[le]=Math.random();re=l.normalize(re),ne=l.normalize(ne);var Le=0,Ce=ee,De=ee,Oe=void 0;while(!0){Le++;for(var ze=0;ze<j;ze++)we[ze]=re[ze];if(re=l.multGamma(l.multL(l.multGamma(we),B,_)),Z=l.dotProduct(we,re),re=l.normalize(re),Ce=l.dotProduct(we,re),Oe=Math.abs(Ce/De),Oe<=1+fe&&Oe>=1)break;De=Ce}for(var Ye=0;Ye<j;Ye++)we[Ye]=re[Ye];Le=0,De=ee;while(!0){Le++;for(var Be=0;Be<j;Be++)ue[Be]=ne[Be];if(ue=l.minusOp(ue,l.multCons(we,l.dotProduct(we,ue))),ne=l.multGamma(l.multL(l.multGamma(ue),B,_)),K=l.dotProduct(ue,ne),ne=l.normalize(ne),Ce=l.dotProduct(ue,ne),Oe=Math.abs(Ce/De),Oe<=1+fe&&Oe>=1)break;De=Ce}for(var Fe=0;Fe<j;Fe++)ue[Fe]=ne[Fe];S=l.multCons(we,Math.sqrt(Math.abs(Z))),Y=l.multCons(ue,Math.sqrt(Math.abs(K)))};x.connectComponents(h,r,x.getTopMostNodes(z),o),N.forEach(function(ye){x.connectComponents(h,r,x.getTopMostNodes(ye.descendants().intersection(r)),o)});var xe=0;for(var V=0;V<z.length;V++)if(!z[V].isParent())v.set(z[V].id(),xe++);var Te=!0,te=!1,ve=void 0;try{for(var ke=o.keys()[Symbol.iterator](),$e;!(Te=($e=ke.next()).done);Te=!0){var We=$e.value;v.set(We,xe++)}}catch(ye){te=!0,ve=ye}finally{try{if(!Te&&ke.return)ke.return()}finally{if(te)throw ve}}for(var Ue=0;Ue<v.size;Ue++)a[Ue]=[];N.forEach(function(ye){var Z=ye.children().intersection(r);while(Z.nodes(":childless").length==0)Z=Z.nodes()[0].children().intersection(r);var K=0,re=Z.nodes(":childless")[0].connectedEdges().length;Z.nodes(":childless").forEach(function(ne,we){if(ne.connectedEdges().length<re)re=ne.connectedEdges().length,K=we}),C.set(ye.id(),Z.nodes(":childless")[K].id())}),z.forEach(function(ye){var Z=void 0;if(ye.isParent())Z=v.get(C.get(ye.id()));else Z=v.get(ye.id());ye.neighborhood().nodes().forEach(function(K){if(r.intersection(ye.edgesWith(K)).length>0)if(K.isParent())a[Z].push(C.get(K.id()));else a[Z].push(K.id())})});var rt=function(Z){var K=v.get(Z),re=void 0;o.get(Z).forEach(function(ne){if(h.getElementById(ne).isParent())re=C.get(ne);else re=ne;a[K].push(re),a[v.get(re)].push(Z)})},He=!0,W=!1,k=void 0;try{for(var pe=o.keys()[Symbol.iterator](),se;!(He=(se=pe.next()).done);He=!0){var me=se.value;rt(me)}}catch(ye){W=!0,k=ye}finally{try{if(!He&&pe.return)pe.return()}finally{if(W)throw k}}j=v.size;var de=void 0;if(j>2){ce=j<u.sampleSize?j:u.sampleSize;for(var he=0;he<j;he++)B[he]=[];for(var Ee=0;Ee<ce;Ee++)_[Ee]=[];if(u.quality=="draft"||u.step=="all")Ie(Ae),be(),Ne(),de={nodeIndexes:v,xCoords:S,yCoords:Y};else v.forEach(function(ye,Z){S.push(h.getElementById(Z).position("x")),Y.push(h.getElementById(Z).position("y"))}),de={nodeIndexes:v,xCoords:S,yCoords:Y};return de}else{var Pe=v.keys(),Je=h.getElementById(Pe.next().value),Me=Je.position(),Ge=Je.outerWidth();if(S.push(Me.x),Y.push(Me.y),j==2){var Ve=h.getElementById(Pe.next().value),Xe=Ve.outerWidth();S.push(Me.x+Ge/2+Xe/2+u.idealEdgeLength),Y.push(Me.y)}return de={nodeIndexes:v,xCoords:S,yCoords:Y},de}};T.exports={spectralLayout:c}},579:(T,G,p)=>{var x=p(212),l=function(c){if(!c)return;c("layout","fcose",x)};if(typeof cytoscape<"u")l(cytoscape);T.exports=l},140:(T)=>{T.exports=e}},s={};function E(T){var G=s[T];if(G!==void 0)return G.exports;var p=s[T]={exports:{}};return n[T](p,p.exports,E),p.exports}var m=E(579);return m})()})});var mt=Ze(lt(),1);var dt={L:"left",R:"right",T:"top",B:"bottom"},ft={L:t((e)=>`${e},${e/2} 0,${e} 0,0`,"L"),R:t((e)=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:t((e)=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:t((e)=>`${e/2},0 ${e},${e} 0,${e}`,"B")},it={L:t((e,n)=>e-n+2,"L"),R:t((e,n)=>e-2,"R"),T:t((e,n)=>e-n+2,"T"),B:t((e,n)=>e-2,"B")},It=t(function(e){if(Se(e))return e==="L"?"R":"L";else return e==="T"?"B":"T"},"getOppositeArchitectureDirection"),ut=t(function(e){let n=e;return n==="L"||n==="R"||n==="T"||n==="B"},"isArchitectureDirection"),Se=t(function(e){let n=e;return n==="L"||n==="R"},"isArchitectureDirectionX"),_e=t(function(e){let n=e;return n==="T"||n==="B"},"isArchitectureDirectionY"),st=t(function(e,n){let s=Se(e)&&_e(n),E=_e(e)&&Se(n);return s||E},"isArchitectureDirectionXY"),bt=t(function(e){let n=e[0],s=e[1],E=Se(n)&&_e(s),m=_e(n)&&Se(s);return E||m},"isArchitecturePairXY"),Nt=t(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),at=t(function(e,n){let s=`${e}${n}`;return Nt(s)?s:void 0},"getArchitectureDirectionPair"),St=t(function([e,n],s){let E=s[0],m=s[1];if(Se(E))if(_e(m))return[e+(E==="L"?-1:1),n+(m==="T"?1:-1)];else return[e+(E==="L"?-1:1),n];else if(Se(m))return[e+(m==="L"?1:-1),n+(E==="T"?1:-1)];else return[e,n+(E==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Dt=t(function(e){if(e==="LT"||e==="TL")return[1,1];else if(e==="BL"||e==="LB")return[1,-1];else if(e==="BR"||e==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),Rt=t(function(e,n){if(st(e,n))return"bend";else if(Se(e))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Mt=t(function(e){return e.type==="service"},"isArchitectureService"),Ft=t(function(e){return e.type==="junction"},"isArchitectureJunction"),gt=t((e,n)=>{let[s,E]=[e,n].sort();return`${JSON.stringify(s)}-${JSON.stringify(E)}`},"architectureGroupAlignmentKey"),ht=t((e)=>e.data(),"edgeData"),qe=t((e)=>e.data(),"nodeData"),$t=F.architecture,vt=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=M,this.getAccTitle=R,this.setDiagramTitle=O,this.getDiagramTitle=D,this.getAccDescription=I,this.setAccDescription=P,this.clear()}static{t(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",L()}addService({id:e,icon:n,in:s,title:E,iconText:m}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(s!==void 0){if(e===s)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(s)==="node")throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:n,iconText:m,title:E,edges:[],in:s})}getServices(){return[...this.nodes.values()].filter(Mt)}addJunction({id:e,in:n}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(n)==="node")throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:n})}getJunctions(){return[...this.nodes.values()].filter(Ft)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:n,in:s,title:E}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(s!==void 0){if(e===s)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(s)==="node")throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:n,title:E,in:s})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:n,lhsDir:s,rhsDir:E,lhsInto:m,rhsInto:T,lhsGroup:G,rhsGroup:p,title:x}){if(!ut(s))throw Error(`Invalid direction given for left hand side of edge ${e}--${n}. Expected (L,R,T,B) got ${String(s)}`);if(!ut(E))throw Error(`Invalid direction given for right hand side of edge ${e}--${n}. Expected (L,R,T,B) got ${String(E)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(n)&&!this.groups.has(n))throw Error(`The right-hand id [${n}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(e).in,y=this.nodes.get(n).in;if(G&&l&&y&&l==y)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(p&&l&&y&&l==y)throw Error(`The right-hand id [${n}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let c={lhsId:e,lhsDir:s,lhsInto:m,lhsGroup:G,rhsId:n,rhsDir:E,rhsInto:T,rhsGroup:p,title:x};this.edges.push(c);let f=this.nodes.get(e),u=this.nodes.get(n);if(f&&u)f.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let n=new Set;e.members.forEach((s)=>{if(this.registeredIds.get(s)!=="node")throw Error(`align ${e.direction} references [${s}], which is not a service or junction`);if(n.has(s))throw Error(`align ${e.direction} lists [${s}] more than once`);n.add(s)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,n=new Map;for(let[G,p]of this.nodes.entries()){let x=new Map;for(let l of p.edges){let y=this.getNode(l.lhsId)?.in,c=this.getNode(l.rhsId)?.in;if(y&&c&&y!==c){let f=Rt(l.lhsDir,l.rhsDir);if(f!=="bend")e.set(gt(y,c),f)}if(l.lhsId===G){let f=at(l.lhsDir,l.rhsDir);if(f)x.set(f,l.rhsId)}else{let f=at(l.rhsDir,l.lhsDir);if(f)x.set(f,l.lhsId)}}n.set(G,x)}let s=new Set,E=new Set(n.keys()),m=t((G)=>{let p=new Map([[G,[0,0]]]),x=[G];while(x.length>0){let l=x.shift();if(l){s.add(l),E.delete(l);let y=n.get(l);if(!y)throw Error(`BFS error: adjacency list for id ${l} not found. Please report this as a bug.`);let c=p.get(l);if(!c)throw Error(`BFS error: position for id ${l} not found in spatial map. Please report this as a bug.`);let[f,u]=c;y.forEach((h,r)=>{if(!s.has(h))p.set(h,St([f,u],r)),x.push(h)})}}return p},"BFS"),T=[];while(E.size>0){let G=E.values().next().value;T.push(m(G))}this.dataStructures={adjList:n,spatialMaps:T,groupAlignments:e}}return this.dataStructures}setElementForId(e,n){this.elements.set(e,n)}getElementById(e){return this.elements.get(e)}getConfig(){return Q({...$t,...A().architecture})}getConfigField(e){return this.getConfig()[e]}},Pt=t((e,n)=>{ie(e,n),e.groups.map((s)=>n.addGroup(s)),e.services.map((s)=>n.addService({...s,type:"service"})),e.junctions.map((s)=>n.addJunction({...s,type:"junction"})),e.edges.map((s)=>n.addEdge(s)),e.alignments?.map((s)=>n.addLayoutHint({direction:s.direction,members:[...s.members]}))},"populateDb"),pt={parser:{yy:void 0},parse:t(async(e)=>{let n=await ge("architecture",e);i.debug(n);let s=pt.parser?.yy;if(!(s instanceof vt))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Pt(n,s)},"parse")},Ot=t((e)=>`
1
+ import{ie}from"./chunk-nzgj9qx5.js";import{t,i,F,A,q,un,L,M,R,P,I,O,D,d,g,J,ec,Gr,Yt,Q,kt,ct}from"./chunk-h4bzgvbg.js";import{ge}from"./chunk-9qdx0ekk.js";import{fn,ci}from"./chunk-3x69jfmh.js";import{Ze,Qe}from"./chunk-56a6zytc.js";var lt=Qe(function(et,nt){(function(n,s){if(typeof et==="object"&&typeof nt==="object")nt.exports=s(ci());else if(typeof define==="function"&&define.amd)define(["cose-base"],s);else if(typeof et==="object")et.cytoscapeFcose=s(ci());else n.cytoscapeFcose=s(n.coseBase)})(et,function(e){return(()=>{var n={658:(T)=>{T.exports=Object.assign!=null?Object.assign.bind(Object):function(G){for(var p=arguments.length,x=Array(p>1?p-1:0),l=1;l<p;l++)x[l-1]=arguments[l];return x.forEach(function(y){Object.keys(y).forEach(function(c){return G[c]=y[c]})}),G}},548:(T,G,p)=>{var x=function(){function c(f,u){var h=[],r=!0,z=!1,N=void 0;try{for(var o=f[Symbol.iterator](),v;!(r=(v=o.next()).done);r=!0)if(h.push(v.value),u&&h.length===u)break}catch(C){z=!0,N=C}finally{try{if(!r&&o.return)o.return()}finally{if(z)throw N}}return h}return function(f,u){if(Array.isArray(f))return f;else if(Symbol.iterator in Object(f))return c(f,u);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=p(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(c){var f={};for(var u=0;u<c.length;u++)f[c[u].id()]=!0;var h=c.filter(function(r,z){if(typeof r==="number")r=z;var N=r.parent()[0];while(N!=null){if(f[N.id()])return!1;N=N.parent()[0]}return!0});return h},y.connectComponents=function(c,f,u,h){var r=new l,z=new Set,N=[],o=void 0,v=void 0,C=void 0,a=!1,S=1,Y=[],b=[],U=function(){var w=c.collection();b.push(w);var _=u[0],X=c.collection();X.merge(_).merge(_.descendants().intersection(f)),N.push(_),X.forEach(function(ee){r.push(ee),z.add(ee),w.merge(ee)});var j=function(){_=r.shift();var fe=c.collection();_.neighborhood().nodes().forEach(function(H){if(f.intersection(_.edgesWith(H)).length>0)fe.merge(H)});for(var Ae=0;Ae<fe.length;Ae++){var Re=fe[Ae];if(o=u.intersection(Re.union(Re.ancestors())),o!=null&&!z.has(o[0])){var ce=o.union(o.descendants());ce.forEach(function(H){if(r.push(H),z.add(H),w.merge(H),u.has(H))N.push(H)})}}};while(r.length!=0)j();if(w.forEach(function(ee){f.intersection(ee.connectedEdges()).forEach(function(fe){if(w.has(fe.source())&&w.has(fe.target()))w.merge(fe)})}),N.length==u.length)a=!0;if(!a||a&&S>1){v=N[0],C=v.connectedEdges().length,N.forEach(function(ee){if(ee.connectedEdges().length<C)C=ee.connectedEdges().length,v=ee}),Y.push(v.id());var oe=c.collection();oe.merge(N[0]),N.forEach(function(ee){oe.merge(ee)}),N=[],u=u.difference(oe),S++}};do U();while(!a);if(h){if(Y.length>0)h.set("dummy"+(h.size+1),Y)}return b},y.relocateComponent=function(c,f,u){if(!u.fixedNodeConstraint){var{POSITIVE_INFINITY:h,NEGATIVE_INFINITY:r,POSITIVE_INFINITY:z,NEGATIVE_INFINITY:N}=Number;if(u.quality=="draft"){var o=!0,v=!1,C=void 0;try{for(var a=f.nodeIndexes[Symbol.iterator](),S;!(o=(S=a.next()).done);o=!0){var Y=S.value,b=x(Y,2),U=b[0],B=b[1],w=u.cy.getElementById(U);if(w){var _=w.boundingBox(),X=f.xCoords[B]-_.w/2,j=f.xCoords[B]+_.w/2,oe=f.yCoords[B]-_.h/2,ee=f.yCoords[B]+_.h/2;if(X<h)h=X;if(j>r)r=j;if(oe<z)z=oe;if(ee>N)N=ee}}}catch(H){v=!0,C=H}finally{try{if(!o&&a.return)a.return()}finally{if(v)throw C}}var fe=c.x-(r+h)/2,Ae=c.y-(N+z)/2;f.xCoords=f.xCoords.map(function(H){return H+fe}),f.yCoords=f.yCoords.map(function(H){return H+Ae})}else{Object.keys(f).forEach(function(H){var ae=f[H],Ie=ae.getRect().x,be=ae.getRect().x+ae.getRect().width,Ne=ae.getRect().y,xe=ae.getRect().y+ae.getRect().height;if(Ie<h)h=Ie;if(be>r)r=be;if(Ne<z)z=Ne;if(xe>N)N=xe});var Re=c.x-(r+h)/2,ce=c.y-(N+z)/2;Object.keys(f).forEach(function(H){var ae=f[H];ae.setCenter(ae.getCenterX()+Re,ae.getCenterY()+ce)})}}},y.calcBoundingBox=function(c,f,u,h){var{MAX_SAFE_INTEGER:r,MIN_SAFE_INTEGER:z,MAX_SAFE_INTEGER:N,MIN_SAFE_INTEGER:o}=Number,v=void 0,C=void 0,a=void 0,S=void 0,Y=c.descendants().not(":parent"),b=Y.length;for(var U=0;U<b;U++){var B=Y[U];if(v=f[h.get(B.id())]-B.width()/2,C=f[h.get(B.id())]+B.width()/2,a=u[h.get(B.id())]-B.height()/2,S=u[h.get(B.id())]+B.height()/2,r>v)r=v;if(z<C)z=C;if(N>a)N=a;if(o<S)o=S}var w={};return w.topLeftX=r,w.topLeftY=N,w.width=z-r,w.height=o-N,w},y.calcParentsWithoutChildren=function(c,f){var u=c.collection();return f.nodes(":parent").forEach(function(h){var r=!1;if(h.children().forEach(function(z){if(z.css("display")!="none")r=!0}),!r)u.merge(h)}),u},T.exports=y},816:(T,G,p)=>{var x=p(548),l=p(140).CoSELayout,y=p(140).CoSENode,c=p(140).layoutBase.PointD,f=p(140).layoutBase.DimensionD,u=p(140).layoutBase.LayoutConstants,h=p(140).layoutBase.FDLayoutConstants,r=p(140).CoSEConstants,z=function(o,v){var{cy:C,eles:a}=o,S=a.nodes(),Y=a.edges(),b=void 0,U=void 0,B=void 0,w={};if(o.randomize)b=v.nodeIndexes,U=v.xCoords,B=v.yCoords;var _=function(H){return typeof H==="function"},X=function(H,ae){if(_(H))return H(ae);else return H},j=x.calcParentsWithoutChildren(C,a),oe=function ce(H,ae,Ie,be){var Ne=ae.length;for(var xe=0;xe<Ne;xe++){var V=ae[xe],Te=null;if(V.intersection(j).length==0)Te=V.children();var te=void 0,ve=V.layoutDimensions({nodeDimensionsIncludeLabels:be.nodeDimensionsIncludeLabels});if(V.outerWidth()!=null&&V.outerHeight()!=null)if(be.randomize)if(!V.isParent())te=H.add(new y(Ie.graphManager,new c(U[b.get(V.id())]-ve.w/2,B[b.get(V.id())]-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else{var ke=x.calcBoundingBox(V,U,B,b);if(V.intersection(j).length==0)te=H.add(new y(Ie.graphManager,new c(ke.topLeftX,ke.topLeftY),new f(ke.width,ke.height)));else te=H.add(new y(Ie.graphManager,new c(ke.topLeftX,ke.topLeftY),new f(parseFloat(ve.w),parseFloat(ve.h))))}else te=H.add(new y(Ie.graphManager,new c(V.position("x")-ve.w/2,V.position("y")-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else te=H.add(new y(this.graphManager));if(te.id=V.data("id"),te.nodeRepulsion=X(be.nodeRepulsion,V),te.paddingLeft=parseInt(V.css("padding")),te.paddingTop=parseInt(V.css("padding")),te.paddingRight=parseInt(V.css("padding")),te.paddingBottom=parseInt(V.css("padding")),be.nodeDimensionsIncludeLabels)te.labelWidth=V.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,te.labelHeight=V.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,te.labelPosVertical=V.css("text-valign"),te.labelPosHorizontal=V.css("text-halign");if(w[V.data("id")]=te,isNaN(te.rect.x))te.rect.x=0;if(isNaN(te.rect.y))te.rect.y=0;if(Te!=null&&Te.length>0){var $e=void 0;$e=Ie.getGraphManager().add(Ie.newGraph(),te),ce($e,Te,Ie,be)}}},ee=function(H,ae,Ie){var be=0,Ne=0;for(var xe=0;xe<Ie.length;xe++){var V=Ie[xe],Te=w[V.data("source")],te=w[V.data("target")];if(Te&&te&&Te!==te&&Te.getEdgesBetween(te).length==0){var ve=ae.add(H.newEdge(),Te,te);ve.id=V.id(),ve.idealLength=X(o.idealEdgeLength,V),ve.edgeElasticity=X(o.edgeElasticity,V),be+=ve.idealLength,Ne++}}if(o.idealEdgeLength!=null){if(Ne>0)r.DEFAULT_EDGE_LENGTH=h.DEFAULT_EDGE_LENGTH=be/Ne;else if(!_(o.idealEdgeLength))r.DEFAULT_EDGE_LENGTH=h.DEFAULT_EDGE_LENGTH=o.idealEdgeLength;else r.DEFAULT_EDGE_LENGTH=h.DEFAULT_EDGE_LENGTH=50;r.MIN_REPULSION_DIST=h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,r.DEFAULT_RADIAL_SEPARATION=h.DEFAULT_EDGE_LENGTH}},fe=function(H,ae){if(ae.fixedNodeConstraint)H.constraints.fixedNodeConstraint=ae.fixedNodeConstraint;if(ae.alignmentConstraint)H.constraints.alignmentConstraint=ae.alignmentConstraint;if(ae.relativePlacementConstraint)H.constraints.relativePlacementConstraint=ae.relativePlacementConstraint};if(o.nestingFactor!=null)r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=o.nestingFactor;if(o.gravity!=null)r.DEFAULT_GRAVITY_STRENGTH=h.DEFAULT_GRAVITY_STRENGTH=o.gravity;if(o.numIter!=null)r.MAX_ITERATIONS=h.MAX_ITERATIONS=o.numIter;if(o.gravityRange!=null)r.DEFAULT_GRAVITY_RANGE_FACTOR=h.DEFAULT_GRAVITY_RANGE_FACTOR=o.gravityRange;if(o.gravityCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=o.gravityCompound;if(o.gravityRangeCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=o.gravityRangeCompound;if(o.initialEnergyOnIncremental!=null)r.DEFAULT_COOLING_FACTOR_INCREMENTAL=h.DEFAULT_COOLING_FACTOR_INCREMENTAL=o.initialEnergyOnIncremental;if(o.tilingCompareBy!=null)r.TILING_COMPARE_BY=o.tilingCompareBy;if(o.quality=="proof")u.QUALITY=2;else u.QUALITY=0;if(r.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=o.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!o.randomize,r.ANIMATE=h.ANIMATE=u.ANIMATE=o.animate,r.TILE=o.tile,r.TILING_PADDING_VERTICAL=typeof o.tilingPaddingVertical==="function"?o.tilingPaddingVertical.call():o.tilingPaddingVertical,r.TILING_PADDING_HORIZONTAL=typeof o.tilingPaddingHorizontal==="function"?o.tilingPaddingHorizontal.call():o.tilingPaddingHorizontal,r.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!0,r.PURE_INCREMENTAL=!o.randomize,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=o.uniformNodeDimensions,o.step=="transformed")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!1;if(o.step=="enforced")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!1;if(o.step=="cose")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!0;if(o.step=="all"){if(o.randomize)r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0}if(o.fixedNodeConstraint||o.alignmentConstraint||o.relativePlacementConstraint)r.TREE_REDUCTION_ON_INCREMENTAL=!1;else r.TREE_REDUCTION_ON_INCREMENTAL=!0;var Ae=new l,Re=Ae.newGraphManager();return oe(Re.addRoot(),x.getTopMostNodes(S),Ae,o),ee(Ae,Re,Y),fe(Ae,o),Ae.runLayout(),w};T.exports={coseLayout:z}},212:(T,G,p)=>{var x=function(){function o(v,C){for(var a=0;a<C.length;a++){var S=C[a];if(S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S)S.writable=!0;Object.defineProperty(v,S.key,S)}}return function(v,C,a){if(C)o(v.prototype,C);if(a)o(v,a);return v}}();function l(o,v){if(!(o instanceof v))throw TypeError("Cannot call a class as a function")}var y=p(658),c=p(548),f=p(657),u=f.spectralLayout,h=p(816),r=h.coseLayout,z=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(v){return 4500},idealEdgeLength:function(v){return 50},edgeElasticity:function(v){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),N=function(){function o(v){l(this,o),this.options=y({},z,v)}return x(o,[{key:"run",value:function(){var C=this,a=this.options,{cy:S,eles:Y}=a,b=[],U=void 0,B=void 0,w=[],_=void 0,X=[];if(a.fixedNodeConstraint&&(!Array.isArray(a.fixedNodeConstraint)||a.fixedNodeConstraint.length==0))a.fixedNodeConstraint=void 0;if(a.alignmentConstraint){if(a.alignmentConstraint.vertical&&(!Array.isArray(a.alignmentConstraint.vertical)||a.alignmentConstraint.vertical.length==0))a.alignmentConstraint.vertical=void 0;if(a.alignmentConstraint.horizontal&&(!Array.isArray(a.alignmentConstraint.horizontal)||a.alignmentConstraint.horizontal.length==0))a.alignmentConstraint.horizontal=void 0}if(a.relativePlacementConstraint&&(!Array.isArray(a.relativePlacementConstraint)||a.relativePlacementConstraint.length==0))a.relativePlacementConstraint=void 0;var j=a.fixedNodeConstraint||a.alignmentConstraint||a.relativePlacementConstraint;if(j)a.tile=!1,a.packComponents=!1;var oe=void 0,ee=!1;if(S.layoutUtilities&&a.packComponents){if(oe=S.layoutUtilities("get"),!oe)oe=S.layoutUtilities();ee=!0}if(Y.nodes().length>0)if(!ee){var fe=a.eles.boundingBox();if(X.push({x:fe.x1+fe.w/2,y:fe.y1+fe.h/2}),a.randomize){var Ae=u(a);b.push(Ae)}if(a.quality=="default"||a.quality=="proof")w.push(r(a,b[0])),c.relocateComponent(X[0],w[0],a);else c.relocateComponent(X[0],b[0],a)}else{var Re=c.getTopMostNodes(a.eles.nodes());if(_=c.connectComponents(S,a.eles,Re),_.forEach(function(W){var k=W.boundingBox();X.push({x:k.x1+k.w/2,y:k.y1+k.h/2})}),a.randomize)_.forEach(function(W){a.eles=W,b.push(u(a))});if(a.quality=="default"||a.quality=="proof"){var ce=S.collection();if(a.tile){var H=new Map,ae=[],Ie=[],be=0,Ne={nodeIndexes:H,xCoords:ae,yCoords:Ie},xe=[];if(_.forEach(function(W,k){if(W.edges().length==0)W.nodes().forEach(function(pe,se){if(ce.merge(W.nodes()[se]),!pe.isParent())Ne.nodeIndexes.set(W.nodes()[se].id(),be++),Ne.xCoords.push(W.nodes()[0].position().x),Ne.yCoords.push(W.nodes()[0].position().y)}),xe.push(k)}),ce.length>1){var V=ce.boundingBox();X.push({x:V.x1+V.w/2,y:V.y1+V.h/2}),_.push(ce),b.push(Ne);for(var Te=xe.length-1;Te>=0;Te--)_.splice(xe[Te],1),b.splice(xe[Te],1),X.splice(xe[Te],1)}}_.forEach(function(W,k){a.eles=W,w.push(r(a,b[k])),c.relocateComponent(X[k],w[k],a)})}else _.forEach(function(W,k){c.relocateComponent(X[k],b[k],a)});var te=new Set;if(_.length>1){var ve=[],ke=Y.filter(function(W){return W.css("display")=="none"});_.forEach(function(W,k){var pe=void 0;if(a.quality=="draft")pe=b[k].nodeIndexes;if(W.nodes().not(ke).length>0){var se={};se.edges=[],se.nodes=[];var me=void 0;if(W.nodes().not(ke).forEach(function(de){if(a.quality=="draft")if(!de.isParent())me=pe.get(de.id()),se.nodes.push({x:b[k].xCoords[me]-de.boundingbox().w/2,y:b[k].yCoords[me]-de.boundingbox().h/2,width:de.boundingbox().w,height:de.boundingbox().h});else{var he=c.calcBoundingBox(de,b[k].xCoords,b[k].yCoords,pe);se.nodes.push({x:he.topLeftX,y:he.topLeftY,width:he.width,height:he.height})}else if(w[k][de.id()])se.nodes.push({x:w[k][de.id()].getLeft(),y:w[k][de.id()].getTop(),width:w[k][de.id()].getWidth(),height:w[k][de.id()].getHeight()})}),W.edges().forEach(function(de){var he=de.source(),Ee=de.target();if(he.css("display")!="none"&&Ee.css("display")!="none"){if(a.quality=="draft"){var Pe=pe.get(he.id()),Je=pe.get(Ee.id()),Me=[],Ge=[];if(he.isParent()){var Ve=c.calcBoundingBox(he,b[k].xCoords,b[k].yCoords,pe);Me.push(Ve.topLeftX+Ve.width/2),Me.push(Ve.topLeftY+Ve.height/2)}else Me.push(b[k].xCoords[Pe]),Me.push(b[k].yCoords[Pe]);if(Ee.isParent()){var Xe=c.calcBoundingBox(Ee,b[k].xCoords,b[k].yCoords,pe);Ge.push(Xe.topLeftX+Xe.width/2),Ge.push(Xe.topLeftY+Xe.height/2)}else Ge.push(b[k].xCoords[Je]),Ge.push(b[k].yCoords[Je]);se.edges.push({startX:Me[0],startY:Me[1],endX:Ge[0],endY:Ge[1]})}else if(w[k][he.id()]&&w[k][Ee.id()])se.edges.push({startX:w[k][he.id()].getCenterX(),startY:w[k][he.id()].getCenterY(),endX:w[k][Ee.id()].getCenterX(),endY:w[k][Ee.id()].getCenterY()})}}),se.nodes.length>0)ve.push(se),te.add(k)}});var $e=oe.packComponents(ve,a.randomize).shifts;if(a.quality=="draft")b.forEach(function(W,k){var pe=W.xCoords.map(function(me){return me+$e[k].dx}),se=W.yCoords.map(function(me){return me+$e[k].dy});W.xCoords=pe,W.yCoords=se});else{var We=0;te.forEach(function(W){Object.keys(w[W]).forEach(function(k){var pe=w[W][k];pe.setCenter(pe.getCenterX()+$e[We].dx,pe.getCenterY()+$e[We].dy)}),We++})}}}var Ue=function(k,pe){if(a.quality=="default"||a.quality=="proof"){if(typeof k==="number")k=pe;var se=void 0,me=void 0,de=k.data("id");if(w.forEach(function(Ee){if(de in Ee)se={x:Ee[de].getRect().getCenterX(),y:Ee[de].getRect().getCenterY()},me=Ee[de]}),a.nodeDimensionsIncludeLabels){if(me.labelWidth){if(me.labelPosHorizontal=="left")se.x+=me.labelWidth/2;else if(me.labelPosHorizontal=="right")se.x-=me.labelWidth/2}if(me.labelHeight){if(me.labelPosVertical=="top")se.y+=me.labelHeight/2;else if(me.labelPosVertical=="bottom")se.y-=me.labelHeight/2}}if(se==null)se={x:k.position("x"),y:k.position("y")};return{x:se.x,y:se.y}}else{var he=void 0;if(b.forEach(function(Ee){var Pe=Ee.nodeIndexes.get(k.id());if(Pe!=null)he={x:Ee.xCoords[Pe],y:Ee.yCoords[Pe]}}),he==null)he={x:k.position("x"),y:k.position("y")};return{x:he.x,y:he.y}}};if(a.quality=="default"||a.quality=="proof"||a.randomize){var rt=c.calcParentsWithoutChildren(S,Y),He=Y.filter(function(W){return W.css("display")=="none"});if(a.eles=Y.not(He),Y.nodes().not(":parent").not(He).layoutPositions(C,a,Ue),rt.length>0)rt.forEach(function(W){W.position(Ue(W))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();T.exports=N},657:(T,G,p)=>{var x=p(548),l=p(140).layoutBase.Matrix,y=p(140).layoutBase.SVD,c=function(u){var{cy:h,eles:r}=u,z=r.nodes(),N=r.nodes(":parent"),o=new Map,v=new Map,C=new Map,a=[],S=[],Y=[],b=[],U=[],B=[],w=[],_=[],X=void 0,j=void 0,oe=1e8,ee=0.000000001,{piTol:fe,samplingType:Ae,nodeSeparation:Re}=u,ce=void 0,H=function(){var Z=0,K=0,re=!1;while(K<ce){Z=Math.floor(Math.random()*j),re=!1;for(var ne=0;ne<K;ne++)if(b[ne]==Z){re=!0;break}if(!re)b[K]=Z,K++;else continue}},ae=function(Z,K,re){var ne=[],we=0,ue=0,le=0,Le=void 0,Ce=[],De=0,Oe=1;for(var ze=0;ze<j;ze++)Ce[ze]=oe;ne[ue]=Z,Ce[Z]=0;while(ue>=we){le=ne[we++];var Ye=a[le];for(var Be=0;Be<Ye.length;Be++)if(Le=v.get(Ye[Be]),Ce[Le]==oe)Ce[Le]=Ce[le]+1,ne[++ue]=Le;B[le][K]=Ce[le]*Re}if(re){for(var Fe=0;Fe<j;Fe++)if(B[Fe][K]<U[Fe])U[Fe]=B[Fe][K];for(var Ke=0;Ke<j;Ke++)if(U[Ke]>De)De=U[Ke],Oe=Ke}return Oe},Ie=function(Z){var K=void 0;if(!Z){H();for(var re=0;re<ce;re++)ae(b[re],re,Z,!1)}else{K=Math.floor(Math.random()*j),X=K;for(var ne=0;ne<j;ne++)U[ne]=oe;for(var we=0;we<ce;we++)b[we]=K,K=ae(K,we,Z)}for(var ue=0;ue<j;ue++)for(var le=0;le<ce;le++)B[ue][le]*=B[ue][le];for(var Le=0;Le<ce;Le++)w[Le]=[];for(var Ce=0;Ce<ce;Ce++)for(var De=0;De<ce;De++)w[Ce][De]=B[b[De]][Ce]},be=function(){var Z=y.svd(w),{S:K,U:re,V:ne}=Z,we=K[0]*K[0]*K[0],ue=[];for(var le=0;le<ce;le++){ue[le]=[];for(var Le=0;Le<ce;Le++)if(ue[le][Le]=0,le==Le)ue[le][Le]=K[le]/(K[le]*K[le]+we/(K[le]*K[le]))}_=l.multMat(l.multMat(ne,ue),l.transpose(re))},Ne=function(){var Z=void 0,K=void 0,re=[],ne=[],we=[],ue=[];for(var le=0;le<j;le++)re[le]=Math.random(),ne[le]=Math.random();re=l.normalize(re),ne=l.normalize(ne);var Le=0,Ce=ee,De=ee,Oe=void 0;while(!0){Le++;for(var ze=0;ze<j;ze++)we[ze]=re[ze];if(re=l.multGamma(l.multL(l.multGamma(we),B,_)),Z=l.dotProduct(we,re),re=l.normalize(re),Ce=l.dotProduct(we,re),Oe=Math.abs(Ce/De),Oe<=1+fe&&Oe>=1)break;De=Ce}for(var Ye=0;Ye<j;Ye++)we[Ye]=re[Ye];Le=0,De=ee;while(!0){Le++;for(var Be=0;Be<j;Be++)ue[Be]=ne[Be];if(ue=l.minusOp(ue,l.multCons(we,l.dotProduct(we,ue))),ne=l.multGamma(l.multL(l.multGamma(ue),B,_)),K=l.dotProduct(ue,ne),ne=l.normalize(ne),Ce=l.dotProduct(ue,ne),Oe=Math.abs(Ce/De),Oe<=1+fe&&Oe>=1)break;De=Ce}for(var Fe=0;Fe<j;Fe++)ue[Fe]=ne[Fe];S=l.multCons(we,Math.sqrt(Math.abs(Z))),Y=l.multCons(ue,Math.sqrt(Math.abs(K)))};x.connectComponents(h,r,x.getTopMostNodes(z),o),N.forEach(function(ye){x.connectComponents(h,r,x.getTopMostNodes(ye.descendants().intersection(r)),o)});var xe=0;for(var V=0;V<z.length;V++)if(!z[V].isParent())v.set(z[V].id(),xe++);var Te=!0,te=!1,ve=void 0;try{for(var ke=o.keys()[Symbol.iterator](),$e;!(Te=($e=ke.next()).done);Te=!0){var We=$e.value;v.set(We,xe++)}}catch(ye){te=!0,ve=ye}finally{try{if(!Te&&ke.return)ke.return()}finally{if(te)throw ve}}for(var Ue=0;Ue<v.size;Ue++)a[Ue]=[];N.forEach(function(ye){var Z=ye.children().intersection(r);while(Z.nodes(":childless").length==0)Z=Z.nodes()[0].children().intersection(r);var K=0,re=Z.nodes(":childless")[0].connectedEdges().length;Z.nodes(":childless").forEach(function(ne,we){if(ne.connectedEdges().length<re)re=ne.connectedEdges().length,K=we}),C.set(ye.id(),Z.nodes(":childless")[K].id())}),z.forEach(function(ye){var Z=void 0;if(ye.isParent())Z=v.get(C.get(ye.id()));else Z=v.get(ye.id());ye.neighborhood().nodes().forEach(function(K){if(r.intersection(ye.edgesWith(K)).length>0)if(K.isParent())a[Z].push(C.get(K.id()));else a[Z].push(K.id())})});var rt=function(Z){var K=v.get(Z),re=void 0;o.get(Z).forEach(function(ne){if(h.getElementById(ne).isParent())re=C.get(ne);else re=ne;a[K].push(re),a[v.get(re)].push(Z)})},He=!0,W=!1,k=void 0;try{for(var pe=o.keys()[Symbol.iterator](),se;!(He=(se=pe.next()).done);He=!0){var me=se.value;rt(me)}}catch(ye){W=!0,k=ye}finally{try{if(!He&&pe.return)pe.return()}finally{if(W)throw k}}j=v.size;var de=void 0;if(j>2){ce=j<u.sampleSize?j:u.sampleSize;for(var he=0;he<j;he++)B[he]=[];for(var Ee=0;Ee<ce;Ee++)_[Ee]=[];if(u.quality=="draft"||u.step=="all")Ie(Ae),be(),Ne(),de={nodeIndexes:v,xCoords:S,yCoords:Y};else v.forEach(function(ye,Z){S.push(h.getElementById(Z).position("x")),Y.push(h.getElementById(Z).position("y"))}),de={nodeIndexes:v,xCoords:S,yCoords:Y};return de}else{var Pe=v.keys(),Je=h.getElementById(Pe.next().value),Me=Je.position(),Ge=Je.outerWidth();if(S.push(Me.x),Y.push(Me.y),j==2){var Ve=h.getElementById(Pe.next().value),Xe=Ve.outerWidth();S.push(Me.x+Ge/2+Xe/2+u.idealEdgeLength),Y.push(Me.y)}return de={nodeIndexes:v,xCoords:S,yCoords:Y},de}};T.exports={spectralLayout:c}},579:(T,G,p)=>{var x=p(212),l=function(c){if(!c)return;c("layout","fcose",x)};if(typeof cytoscape<"u")l(cytoscape);T.exports=l},140:(T)=>{T.exports=e}},s={};function E(T){var G=s[T];if(G!==void 0)return G.exports;var p=s[T]={exports:{}};return n[T](p,p.exports,E),p.exports}var m=E(579);return m})()})});var mt=Ze(lt(),1);var dt={L:"left",R:"right",T:"top",B:"bottom"},ft={L:t((e)=>`${e},${e/2} 0,${e} 0,0`,"L"),R:t((e)=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:t((e)=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:t((e)=>`${e/2},0 ${e},${e} 0,${e}`,"B")},it={L:t((e,n)=>e-n+2,"L"),R:t((e,n)=>e-2,"R"),T:t((e,n)=>e-n+2,"T"),B:t((e,n)=>e-2,"B")},It=t(function(e){if(Se(e))return e==="L"?"R":"L";else return e==="T"?"B":"T"},"getOppositeArchitectureDirection"),ut=t(function(e){let n=e;return n==="L"||n==="R"||n==="T"||n==="B"},"isArchitectureDirection"),Se=t(function(e){let n=e;return n==="L"||n==="R"},"isArchitectureDirectionX"),_e=t(function(e){let n=e;return n==="T"||n==="B"},"isArchitectureDirectionY"),st=t(function(e,n){let s=Se(e)&&_e(n),E=_e(e)&&Se(n);return s||E},"isArchitectureDirectionXY"),bt=t(function(e){let n=e[0],s=e[1],E=Se(n)&&_e(s),m=_e(n)&&Se(s);return E||m},"isArchitecturePairXY"),Nt=t(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),at=t(function(e,n){let s=`${e}${n}`;return Nt(s)?s:void 0},"getArchitectureDirectionPair"),St=t(function([e,n],s){let E=s[0],m=s[1];if(Se(E))if(_e(m))return[e+(E==="L"?-1:1),n+(m==="T"?1:-1)];else return[e+(E==="L"?-1:1),n];else if(Se(m))return[e+(m==="L"?1:-1),n+(E==="T"?1:-1)];else return[e,n+(E==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Dt=t(function(e){if(e==="LT"||e==="TL")return[1,1];else if(e==="BL"||e==="LB")return[1,-1];else if(e==="BR"||e==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),Rt=t(function(e,n){if(st(e,n))return"bend";else if(Se(e))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Mt=t(function(e){return e.type==="service"},"isArchitectureService"),Ft=t(function(e){return e.type==="junction"},"isArchitectureJunction"),gt=t((e,n)=>{let[s,E]=[e,n].sort();return`${JSON.stringify(s)}-${JSON.stringify(E)}`},"architectureGroupAlignmentKey"),ht=t((e)=>e.data(),"edgeData"),qe=t((e)=>e.data(),"nodeData"),$t=F.architecture,vt=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=M,this.getAccTitle=R,this.setDiagramTitle=O,this.getDiagramTitle=D,this.getAccDescription=I,this.setAccDescription=P,this.clear()}static{t(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",L()}addService({id:e,icon:n,in:s,title:E,iconText:m}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(s!==void 0){if(e===s)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(s)==="node")throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:n,iconText:m,title:E,edges:[],in:s})}getServices(){return[...this.nodes.values()].filter(Mt)}addJunction({id:e,in:n}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(n)==="node")throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:n})}getJunctions(){return[...this.nodes.values()].filter(Ft)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:n,in:s,title:E}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(s!==void 0){if(e===s)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(s)==="node")throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:n,title:E,in:s})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:n,lhsDir:s,rhsDir:E,lhsInto:m,rhsInto:T,lhsGroup:G,rhsGroup:p,title:x}){if(!ut(s))throw Error(`Invalid direction given for left hand side of edge ${e}--${n}. Expected (L,R,T,B) got ${String(s)}`);if(!ut(E))throw Error(`Invalid direction given for right hand side of edge ${e}--${n}. Expected (L,R,T,B) got ${String(E)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(n)&&!this.groups.has(n))throw Error(`The right-hand id [${n}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(e).in,y=this.nodes.get(n).in;if(G&&l&&y&&l==y)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(p&&l&&y&&l==y)throw Error(`The right-hand id [${n}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let c={lhsId:e,lhsDir:s,lhsInto:m,lhsGroup:G,rhsId:n,rhsDir:E,rhsInto:T,rhsGroup:p,title:x};this.edges.push(c);let f=this.nodes.get(e),u=this.nodes.get(n);if(f&&u)f.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let n=new Set;e.members.forEach((s)=>{if(this.registeredIds.get(s)!=="node")throw Error(`align ${e.direction} references [${s}], which is not a service or junction`);if(n.has(s))throw Error(`align ${e.direction} lists [${s}] more than once`);n.add(s)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,n=new Map;for(let[G,p]of this.nodes.entries()){let x=new Map;for(let l of p.edges){let y=this.getNode(l.lhsId)?.in,c=this.getNode(l.rhsId)?.in;if(y&&c&&y!==c){let f=Rt(l.lhsDir,l.rhsDir);if(f!=="bend")e.set(gt(y,c),f)}if(l.lhsId===G){let f=at(l.lhsDir,l.rhsDir);if(f)x.set(f,l.rhsId)}else{let f=at(l.rhsDir,l.lhsDir);if(f)x.set(f,l.lhsId)}}n.set(G,x)}let s=new Set,E=new Set(n.keys()),m=t((G)=>{let p=new Map([[G,[0,0]]]),x=[G];while(x.length>0){let l=x.shift();if(l){s.add(l),E.delete(l);let y=n.get(l);if(!y)throw Error(`BFS error: adjacency list for id ${l} not found. Please report this as a bug.`);let c=p.get(l);if(!c)throw Error(`BFS error: position for id ${l} not found in spatial map. Please report this as a bug.`);let[f,u]=c;y.forEach((h,r)=>{if(!s.has(h))p.set(h,St([f,u],r)),x.push(h)})}}return p},"BFS"),T=[];while(E.size>0){let G=E.values().next().value;T.push(m(G))}this.dataStructures={adjList:n,spatialMaps:T,groupAlignments:e}}return this.dataStructures}setElementForId(e,n){this.elements.set(e,n)}getElementById(e){return this.elements.get(e)}getConfig(){return Q({...$t,...A().architecture})}getConfigField(e){return this.getConfig()[e]}},Pt=t((e,n)=>{ie(e,n),e.groups.map((s)=>n.addGroup(s)),e.services.map((s)=>n.addService({...s,type:"service"})),e.junctions.map((s)=>n.addJunction({...s,type:"junction"})),e.edges.map((s)=>n.addEdge(s)),e.alignments?.map((s)=>n.addLayoutHint({direction:s.direction,members:[...s.members]}))},"populateDb"),pt={parser:{yy:void 0},parse:t(async(e)=>{let n=await ge("architecture",e);i.debug(n);let s=pt.parser?.yy;if(!(s instanceof vt))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Pt(n,s)},"parse")},Ot=t((e)=>`
2
2
  .edge {
3
3
  stroke-width: ${e.archEdgeWidth};
4
4
  stroke: ${e.archEdgeColor};
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- import{t,C,Y,L,M,R,P,I,O,D,d,J,Pt,v}from"./chunk-eq59kad4.js";var dt=function(){var e=t(function(j,i,n,s){for(n=n||{},s=j.length;s--;n[j[s]]=i);return n},"o"),y=[1,4],r=[1,14],l=[1,12],o=[1,13],f=[6,7,8],g=[1,20],u=[1,18],b=[1,19],c=[6,7,11],w=[1,6,13,14],m=[1,23],x=[1,24],S=[1,6,7,11,13,14],G={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:t(function(i,n,s,h,p,a,E){var _=a.length-1;switch(p){case 6:case 7:return h;case 15:h.addNode(a[_-1].length,a[_].trim());break;case 16:h.addNode(0,a[_].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:y},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:y},{6:r,7:[1,10],9:9,12:11,13:l,14:o},e(f,[2,3]),{1:[2,2]},e(f,[2,4]),e(f,[2,5]),{1:[2,6],6:r,12:15,13:l,14:o},{6:r,9:16,12:11,13:l,14:o},{6:g,7:u,10:17,11:b},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:g,7:u,10:22,11:b},{1:[2,7],6:r,12:15,13:l,14:o},e(w,[2,14],{7:m,11:x}),e(S,[2,8]),e(S,[2,9]),e(S,[2,10]),e(c,[2,15]),e(w,[2,13],{7:m,11:x}),e(S,[2,11]),e(S,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(i,n){if(n.recoverable)this.trace(i);else{var s=Error(i);throw s.hash=n,s}},"parseError"),parse:t(function(i){var n=this,s=[0],h=[],p=[null],a=[],E=this.table,_="",V=0,A=0,N=0,W=2,Z=1,rt=a.slice.call(arguments,1),k=Object.create(this.lexer),T={yy:{}};for(var K in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,K))T.yy[K]=this.yy[K];if(k.setInput(i,T.yy),T.yy.lexer=k,T.yy.parser=this,typeof k.yylloc>"u")k.yylloc={};var q=k.yylloc;a.push(q);var lt=k.options&&k.options.ranges;if(typeof T.yy.parseError==="function")this.parseError=T.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function xt(H){s.length=s.length-2*H,p.length=p.length-H,a.length=a.length-H}t(xt,"popStack");function yt(){var H=h.pop()||k.lex()||Z;if(typeof H!=="number"){if(H instanceof Array)h=H,H=h.pop();H=n.symbols_[H]||H}return H}t(yt,"lex");var F,ot,Q,z,Rt,ht,tt={},st,X,ft,nt;while(!0){if(Q=s[s.length-1],this.defaultActions[Q])z=this.defaultActions[Q];else{if(F===null||typeof F>"u")F=yt();z=E[Q]&&E[Q][F]}if(typeof z>"u"||!z.length||!z[0]){var ct="";nt=[];for(st in E[Q])if(this.terminals_[st]&&st>W)nt.push("'"+this.terminals_[st]+"'");if(k.showPosition)ct="Parse error on line "+(V+1)+`:
1
+ import{t,C,Y,L,M,R,P,I,O,D,d,J,Pt,v}from"./chunk-h4bzgvbg.js";var dt=function(){var e=t(function(j,i,n,s){for(n=n||{},s=j.length;s--;n[j[s]]=i);return n},"o"),y=[1,4],r=[1,14],l=[1,12],o=[1,13],f=[6,7,8],g=[1,20],u=[1,18],b=[1,19],c=[6,7,11],w=[1,6,13,14],m=[1,23],x=[1,24],S=[1,6,7,11,13,14],G={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:t(function(i,n,s,h,p,a,E){var _=a.length-1;switch(p){case 6:case 7:return h;case 15:h.addNode(a[_-1].length,a[_].trim());break;case 16:h.addNode(0,a[_].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:y},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:y},{6:r,7:[1,10],9:9,12:11,13:l,14:o},e(f,[2,3]),{1:[2,2]},e(f,[2,4]),e(f,[2,5]),{1:[2,6],6:r,12:15,13:l,14:o},{6:r,9:16,12:11,13:l,14:o},{6:g,7:u,10:17,11:b},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:g,7:u,10:22,11:b},{1:[2,7],6:r,12:15,13:l,14:o},e(w,[2,14],{7:m,11:x}),e(S,[2,8]),e(S,[2,9]),e(S,[2,10]),e(c,[2,15]),e(w,[2,13],{7:m,11:x}),e(S,[2,11]),e(S,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(i,n){if(n.recoverable)this.trace(i);else{var s=Error(i);throw s.hash=n,s}},"parseError"),parse:t(function(i){var n=this,s=[0],h=[],p=[null],a=[],E=this.table,_="",V=0,A=0,N=0,W=2,Z=1,rt=a.slice.call(arguments,1),k=Object.create(this.lexer),T={yy:{}};for(var K in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,K))T.yy[K]=this.yy[K];if(k.setInput(i,T.yy),T.yy.lexer=k,T.yy.parser=this,typeof k.yylloc>"u")k.yylloc={};var q=k.yylloc;a.push(q);var lt=k.options&&k.options.ranges;if(typeof T.yy.parseError==="function")this.parseError=T.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function xt(H){s.length=s.length-2*H,p.length=p.length-H,a.length=a.length-H}t(xt,"popStack");function yt(){var H=h.pop()||k.lex()||Z;if(typeof H!=="number"){if(H instanceof Array)h=H,H=h.pop();H=n.symbols_[H]||H}return H}t(yt,"lex");var F,ot,Q,z,Rt,ht,tt={},st,X,ft,nt;while(!0){if(Q=s[s.length-1],this.defaultActions[Q])z=this.defaultActions[Q];else{if(F===null||typeof F>"u")F=yt();z=E[Q]&&E[Q][F]}if(typeof z>"u"||!z.length||!z[0]){var ct="";nt=[];for(st in E[Q])if(this.terminals_[st]&&st>W)nt.push("'"+this.terminals_[st]+"'");if(k.showPosition)ct="Parse error on line "+(V+1)+`:
2
2
  `+k.showPosition()+`
3
3
  Expecting `+nt.join(", ")+", got '"+(this.terminals_[F]||F)+"'";else ct="Parse error on line "+(V+1)+": Unexpected "+(F==Z?"end of input":"'"+(this.terminals_[F]||F)+"'");this.parseError(ct,{text:k.match,token:this.terminals_[F]||F,line:k.yylineno,loc:q,expected:nt})}if(z[0]instanceof Array&&z.length>1)throw Error("Parse Error: multiple actions possible at state: "+Q+", token: "+F);switch(z[0]){case 1:if(s.push(F),p.push(k.yytext),a.push(k.yylloc),s.push(z[1]),F=null,!ot){if(A=k.yyleng,_=k.yytext,V=k.yylineno,q=k.yylloc,N>0)N--}else F=ot,ot=null;break;case 2:if(X=this.productions_[z[1]][1],tt.$=p[p.length-X],tt._$={first_line:a[a.length-(X||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(X||1)].first_column,last_column:a[a.length-1].last_column},lt)tt._$.range=[a[a.length-(X||1)].range[0],a[a.length-1].range[1]];if(ht=this.performAction.apply(tt,[_,A,V,T.yy,z[1],p,a].concat(rt)),typeof ht<"u")return ht;if(X)s=s.slice(0,-1*X*2),p=p.slice(0,-1*X),a=a.slice(0,-1*X);s.push(this.productions_[z[1]][0]),p.push(tt.$),a.push(tt._$),ft=E[s[s.length-2]][s[s.length-1]],s.push(ft);break;case 3:return!0}}return!0},"parse")},U=function(){var j={EOF:1,parseError:t(function(n,s){if(this.yy.parser)this.yy.parser.parseError(n,s);else throw Error(n)},"parseError"),setInput:t(function(i,n){if(this.yy=n||this.yy||{},this._input=i,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];return this.offset=0,this},"setInput"),input:t(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);if(n)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),i},"input"),unput:t(function(i){var n=i.length,s=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var h=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1)this.yylineno-=s.length-1;var p=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===h.length?this.yylloc.first_column:0)+h[h.length-s.length].length-s[0].length:this.yylloc.first_column-n},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-n];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(i){this.unput(this.match.slice(i))},"less"),pastInput:t(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var i=this.match;if(i.length<20)i+=this._input.substr(0,20-i.length);return(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var i=this.pastInput(),n=Array(i.length+1).join("-");return i+this.upcomingInput()+`
Binary file
Binary file