@kabmo-labs/kabmo 0.43.1 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (433) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +337 -337
  3. package/dist/client/static/js/{CsvGrid-g67pk2zy.js → CsvGrid-z74weshk.js} +2 -2
  4. package/dist/client/static/js/{DocxView-pyh6p2kb.js → DocxView-dpe5x9ab.js} +5 -5
  5. package/dist/client/static/js/{DrawioView-g48r6y2m.js → DrawioView-ftzwjf8v.js} +2 -2
  6. package/dist/client/static/js/ImageView-vchn6wyq.js +1 -0
  7. package/dist/client/static/js/LayoutWrapper-1x0gnppc.js +2 -0
  8. package/dist/client/static/js/{Modal-edw446r8.js → Modal-tteg7vtb.js} +20 -20
  9. package/dist/client/static/js/{PdfView-6z3cgj37.js → PdfView-vjec8z3z.js} +1 -1
  10. package/dist/client/static/js/SessionsView-g7z3fxbp.js +1 -0
  11. package/dist/client/static/js/{SheetView-64076z1j.js → SheetView-hhtfkdhe.js} +25 -25
  12. package/dist/client/static/js/{SvgPreview-dmpgavgd.js → SvgPreview-48n3ex6p.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-nfz5z1vw.js → abnfDiagram-O67JEVCF-bpvzdara.js} +1 -1
  14. package/dist/client/static/js/architecture-7GRP2DOG-bch3nye9.js +1 -0
  15. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-jra2jyzw.js → architectureDiagram-NJMV4G6O-xw62cr7j.js} +11 -11
  16. package/dist/client/static/js/{astro-dpfdhc5e.js → astro-56b0as3q.js} +1 -1
  17. package/dist/client/static/js/bash-mevzaywf.js +1 -0
  18. package/dist/client/static/js/{blockDiagram-BEXU5L5S-3szktxam.js → blockDiagram-BEXU5L5S-x3a6cgar.js} +6 -6
  19. package/dist/client/static/js/c-y1y6v00q.js +1 -0
  20. package/dist/client/static/js/{c4Diagram-YGBWAQC7-xe9vbppt.js → c4Diagram-YGBWAQC7-katvaxbj.js} +6 -6
  21. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-egzhj1xn.js → classDiagram-v2-NBCMYWYE-bjz4mqqh.js} +5 -5
  22. package/dist/client/static/js/{cose-bilkent-JH36ORCC-dfrk1wnr.js → cose-bilkent-JH36ORCC-fsn80psf.js} +1 -1
  23. package/dist/client/static/js/cpp-wk9z0c5g.js +1 -0
  24. package/dist/client/static/js/css-3w3p9s67.js +1 -0
  25. package/dist/client/static/js/css-g85rwzty.js +1 -0
  26. package/dist/client/static/js/cynefin-OW5HDTMX-vqy5jtnk.js +1 -0
  27. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-xefpcmpg.js → cynefinDiagram-VND7K2PF-cfhbsnkm.js} +2 -2
  28. package/dist/client/static/js/{dagre-6A5THRUB-vtzjnrt9.js → dagre-6A5THRUB-j2wt7ns6.js} +2 -2
  29. package/dist/client/static/js/{diagram-22UHCM2B-4vvn790v.js → diagram-22UHCM2B-abrdj714.js} +21 -21
  30. package/dist/client/static/js/{diagram-3UASUU5V-tmht3bew.js → diagram-3UASUU5V-dbn15bxn.js} +2 -2
  31. package/dist/client/static/js/{diagram-ATOU4E4O-p5wa5ztx.js → diagram-ATOU4E4O-y79pwf7w.js} +3 -3
  32. package/dist/client/static/js/{diagram-CDSNMT55-8myesjfc.js → diagram-CDSNMT55-f8ryt86n.js} +4 -4
  33. package/dist/client/static/js/{diagram-MLGK6HIB-9t3x2d5f.js → diagram-MLGK6HIB-ws7wn3q9.js} +2 -2
  34. package/dist/client/static/js/{diagram-MPIPVDR6-8ahgnmhy.js → diagram-MPIPVDR6-zmznrg13.js} +2 -2
  35. package/dist/client/static/js/{dockerfile-x8aa0543.js → dockerfile-qgc921kw.js} +1 -1
  36. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-5semw111.js → ebnfDiagram-ZINNZB2B-y5q7hy1v.js} +1 -1
  37. package/dist/client/static/js/{elixir-5ewfhvfh.js → elixir-12pgbgtq.js} +1 -1
  38. package/dist/client/static/js/{elk-276RUBZZ-jmhs58ww.js → elk-276RUBZZ-vddwbn6q.js} +1 -1
  39. package/dist/client/static/js/{erDiagram-OPXOYQCR-31wvbpdr.js → erDiagram-OPXOYQCR-qdqcx4g4.js} +6 -6
  40. package/dist/client/static/js/{erlang-jqqa3ehb.js → erlang-811btv6p.js} +1 -1
  41. package/dist/client/static/js/eventmodeling-NTZA5JFV-65ph4s3m.js +1 -0
  42. package/dist/client/static/js/flowDiagram-KWPJA3E3-nh2tb65b.js +1 -0
  43. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-c2dycjrf.js → ganttDiagram-FUAMR5RP-763hk9rm.js} +4 -4
  44. package/dist/client/static/js/gitGraph-4MIJSDKK-t45ekjb6.js +1 -0
  45. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-y4k4pdd8.js → gitGraphDiagram-X574FWY7-bgx1q5nw.js} +10 -10
  46. package/dist/client/static/js/graphql-027z8sc0.js +1 -0
  47. package/dist/client/static/js/html-fqda6wxx.js +1 -0
  48. package/dist/client/static/js/{index-38v0781h.js → index-03j5j1j0.js} +2 -2
  49. package/dist/client/static/js/{index-3588r3wg.js → index-05hx4ftf.js} +2 -2
  50. package/dist/client/static/js/index-0vk6v4y4.js +2 -0
  51. package/dist/client/static/js/{index-7dp90ad1.js → index-1nwwvv29.js} +2 -2
  52. package/dist/client/static/js/{index-aar68x31.js → index-228yzebd.js} +5 -5
  53. package/dist/client/static/js/{index-xf36nmbm.js → index-2b1wnvez.js} +2 -2
  54. package/dist/client/static/js/index-34ff2vq6.js +2 -0
  55. package/dist/client/static/js/{index-6fpd55cq.js → index-3d21hpk7.js} +2 -2
  56. package/dist/client/static/js/{index-181p91hf.js → index-3h2mr90j.js} +2 -2
  57. package/dist/client/static/js/{index-efra065v.js → index-3sqndc9n.js} +2 -2
  58. package/dist/client/static/js/{index-kc5znr75.js → index-47wn2gjx.js} +2 -2
  59. package/dist/client/static/js/{index-nt7nhchn.js → index-4b5b6g0k.js} +1 -1
  60. package/dist/client/static/js/index-5b2vsbcf.js +1 -0
  61. package/dist/client/static/js/index-5mrqfs82.js +12 -0
  62. package/dist/client/static/js/{index-m94f4ngb.js → index-61j9qkck.js} +3 -3
  63. package/dist/client/static/js/index-6bm4pw90.css +1 -0
  64. package/dist/client/static/js/{index-qhytrsyb.js → index-6sqmhdyv.js} +2 -2
  65. package/dist/client/static/js/{index-jz93j0at.js → index-8dtp7mt0.js} +2 -2
  66. package/dist/client/static/js/index-a11ptyzf.js +1 -0
  67. package/dist/client/static/js/index-acphtw1r.js +2 -0
  68. package/dist/client/static/js/{index-s78n0dtv.js → index-as1wptfa.js} +2 -2
  69. package/dist/client/static/js/index-cj39b26c.js +1 -0
  70. package/dist/client/static/js/index-dgjerk4w.js +3 -0
  71. package/dist/client/static/js/{index-sesghshh.js → index-dmv2zasz.js} +2 -2
  72. package/dist/client/static/js/index-dn6pqym4.js +9 -0
  73. package/dist/client/static/js/{index-ynaxep06.js → index-ehg2ftnp.js} +2 -2
  74. package/dist/client/static/js/{index-e7yf273s.js → index-f51jxezc.js} +2 -2
  75. package/dist/client/static/js/index-f7paep2f.js +2 -0
  76. package/dist/client/static/js/index-f98dhbt4.js +4 -0
  77. package/dist/client/static/js/{index-ys0xpw3q.js → index-fbct0jcf.js} +2 -2
  78. package/dist/client/static/js/index-fqatn0vh.js +1 -0
  79. package/dist/client/static/js/{index-bvjct7sp.js → index-gcwmpfr4.js} +2 -2
  80. package/dist/client/static/js/{index-cgzw43bc.js → index-gmq5pbcv.js} +67 -67
  81. package/dist/client/static/js/{index-q81rxwh7.js → index-gzafyqsr.js} +43 -43
  82. package/dist/client/static/js/{index-gmnmnfm0.js → index-gzp4j2h5.js} +2 -2
  83. package/dist/client/static/js/{index-cjhvtzdd.js → index-h0rmkz9n.js} +2 -2
  84. package/dist/client/static/js/{index-sk9ej289.js → index-jaqjvk22.js} +2 -2
  85. package/dist/client/static/js/{index-pt8440xh.js → index-jpp0zm7t.js} +15 -15
  86. package/dist/client/static/js/index-kg2sk8cf.js +1 -0
  87. package/dist/client/static/js/index-mrw7qweg.js +1 -0
  88. package/dist/client/static/js/index-mwm8aptp.js +1 -0
  89. package/dist/client/static/js/{index-yvgbr7ek.js → index-n1ga63de.js} +2 -2
  90. package/dist/client/static/js/{index-cqnpsw2m.js → index-nzhwd6t3.js} +2 -2
  91. package/dist/client/static/js/{index-vyw4tbn8.js → index-p21mvqc2.js} +2 -2
  92. package/dist/client/static/js/{index-fjnkzk12.js → index-pfj3sd1n.js} +3 -3
  93. package/dist/client/static/js/{index-fg965t62.js → index-pxq4v81r.js} +2 -2
  94. package/dist/client/static/js/index-q76jfb54.js +1 -0
  95. package/dist/client/static/js/{index-m9s9rg5k.js → index-qt9jc4ck.js} +2 -2
  96. package/dist/client/static/js/{index-48pb18zj.js → index-r6e44vkx.js} +2 -2
  97. package/dist/client/static/js/{index-2cbnjc32.js → index-szk3vk8h.js} +2 -2
  98. package/dist/client/static/js/{index-ycks7gyg.js → index-t0yv1375.js} +2 -2
  99. package/dist/client/static/js/{index-0c6vpk89.js → index-vgcm2g0g.js} +2 -2
  100. package/dist/client/static/js/{index-f7djda1g.js → index-vkerrwpa.js} +2 -2
  101. package/dist/client/static/js/{index-dkwhs38j.js → index-w57zbym7.js} +2 -2
  102. package/dist/client/static/js/{index-n9scbxy5.js → index-wqrdgt1g.js} +2 -2
  103. package/dist/client/static/js/{index-j17h4z6f.js → index-x2wvq4ae.js} +2 -2
  104. package/dist/client/static/js/{index-2b46dzw8.js → index-x7rfmwg8.js} +4 -4
  105. package/dist/client/static/js/{index-f77c3ag0.js → index-xkwybnf3.js} +200 -200
  106. package/dist/client/static/js/info-A6RAGUB7-mw29xbwf.js +1 -0
  107. package/dist/client/static/js/{infoDiagram-VRGFBTTK-z3pqx7w8.js → infoDiagram-VRGFBTTK-e66pw8d9.js} +1 -1
  108. package/dist/client/static/js/ini-3cx6tmv4.js +1 -0
  109. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-f5v6z8yr.js → ishikawaDiagram-OU5B5YK6-ehc0q24d.js} +3 -3
  110. package/dist/client/static/js/java-zs6qh1dm.js +1 -0
  111. package/dist/client/static/js/javascript-b9mkygak.js +1 -0
  112. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-js1yxatk.js → journeyDiagram-ZHPQQLJL-hye05qtd.js} +5 -5
  113. package/dist/client/static/js/json-qn73s8xb.js +1 -0
  114. package/dist/client/static/js/jsx-gahhfczw.js +1 -0
  115. package/dist/client/static/js/{julia-0h9krgsd.js → julia-mgsev9df.js} +1 -1
  116. package/dist/client/static/js/{kanban-definition-PNTS6WVX-m0a6069c.js → kanban-definition-PNTS6WVX-vce614m8.js} +7 -7
  117. package/dist/client/static/js/lua-d8enp14s.js +1 -0
  118. package/dist/client/static/js/markdown-qetaj4vp.js +1 -0
  119. package/dist/client/static/js/{mermaid.core-6xvbnm63.js → mermaid.core-gc79re5p.js} +7 -7
  120. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-a9f9yzc0.js → mindmap-definition-NLK3R4M7-ft1whaf5.js} +3 -3
  121. package/dist/client/static/js/one-dark-pro-rvg5xm1a.js +1 -0
  122. package/dist/client/static/js/one-light-2b5w3ksh.js +1 -0
  123. package/dist/client/static/js/packet-AYTQ26CC-md85wpjq.js +1 -0
  124. package/dist/client/static/js/{pegDiagram-GJSIUBJH-4v4pf1h1.js → pegDiagram-GJSIUBJH-2s4ykhaa.js} +1 -1
  125. package/dist/client/static/js/{perl-rptyx23q.js → perl-6n93vjsa.js} +1 -1
  126. package/dist/client/static/js/{php-sagvq3wz.js → php-w23nmbtc.js} +1 -1
  127. package/dist/client/static/js/pie-WAS4IAKB-4grcqnp8.js +1 -0
  128. package/dist/client/static/js/{pieDiagram-5QR66LMP-a54yrmfm.js → pieDiagram-5QR66LMP-7h8dp0z3.js} +2 -2
  129. package/dist/client/static/js/properties-g6tpq003.js +1 -0
  130. package/dist/client/static/js/python-cy06fzhg.js +1 -0
  131. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-1twhvnp2.js → quadrantDiagram-O4NWA36T-pteyxjxr.js} +6 -6
  132. package/dist/client/static/js/r-vw8berfv.js +1 -0
  133. package/dist/client/static/js/radar-RG4KPBEZ-7j9prhg1.js +1 -0
  134. package/dist/client/static/js/railroad-74A4TZTK-g8x2jps1.js +1 -0
  135. package/dist/client/static/js/railroad-abnf-HS5TGJTU-cbg7k68h.js +1 -0
  136. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-xfvjk9f8.js +1 -0
  137. package/dist/client/static/js/railroad-peg-WCYAUIDC-7w97805z.js +1 -0
  138. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-83tqfdcy.js → railroadDiagram-XR7U4H2S-68z9wdt0.js} +1 -1
  139. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-73e3pzw6.js → requirementDiagram-PLB6GJNP-c08nmey6.js} +4 -4
  140. package/dist/client/static/js/{ruby-9qyx7knh.js → ruby-ag3b3t9t.js} +1 -1
  141. package/dist/client/static/js/{rust-jds4e4r7.js → rust-ke5ec0w5.js} +1 -1
  142. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-1bzwj6sb.js → sankeyDiagram-IPEJSGJF-2r3kvjs5.js} +5 -5
  143. package/dist/client/static/js/{sass-07rteya0.js → sass-x0eez0kp.js} +1 -1
  144. package/dist/client/static/js/{scss-e2dndbfa.js → scss-qycakpjn.js} +1 -1
  145. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-yh3h988k.js → sequenceDiagram-PO4LG4MO-ctjycd88.js} +19 -19
  146. package/dist/client/static/js/{sizeCapture-INFHLROL-1n121yp6.js → sizeCapture-INFHLROL-97ndea95.js} +1 -1
  147. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-0tdrzn06.js → stateDiagram-v2-GCMORJYK-aqnmsb96.js} +5 -5
  148. package/dist/client/static/js/{svelte-w365cpwa.js → svelte-tg19by0f.js} +1 -1
  149. package/dist/client/static/js/{swimlanes-2SLR337P-77n1ttdw.js → swimlanes-2SLR337P-v50cx1nx.js} +1 -1
  150. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-e227mz39.js +8 -0
  151. package/dist/client/static/js/{timeline-definition-EJHVYXUP-b6r0k3e8.js → timeline-definition-EJHVYXUP-1ggrtdcj.js} +7 -7
  152. package/dist/client/static/js/treeView-Q6P3EWNA-xhf1r6c3.js +1 -0
  153. package/dist/client/static/js/treemap-WGGIJYW6-4n3j7ekq.js +1 -0
  154. package/dist/client/static/js/tsx-3dzv8h6k.js +1 -0
  155. package/dist/client/static/js/typescript-44vs0wn4.js +1 -0
  156. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-efq58m3m.js → usecaseDiagram-POWQR4AR-ybcwhpzs.js} +39 -39
  157. package/dist/client/static/js/{vennDiagram-UO4OBE2U-ad4gvd5r.js → vennDiagram-UO4OBE2U-p9ggrt07.js} +8 -8
  158. package/dist/client/static/js/{vue-d6cesny1.js → vue-mhj4sme0.js} +1 -1
  159. package/dist/client/static/js/wardley-WFR3VGLG-fb0py35r.js +1 -0
  160. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-v89tys2p.js → wardleyDiagram-VNRHLVJA-v79nb9kx.js} +4 -4
  161. package/dist/client/static/js/xml-yvv5fn3k.js +1 -0
  162. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-xtgzmknw.js → xychartDiagram-PMCCYNJV-43thqscz.js} +5 -5
  163. package/dist/client/static/js/yaml-avewh7n5.js +1 -0
  164. package/marketplace/marketplace.json +7 -0
  165. package/marketplace/plugins/github-actions/README.md +142 -0
  166. package/marketplace/plugins/github-actions/icon.svg +12 -0
  167. package/marketplace/plugins/github-actions/package.json +30 -0
  168. package/marketplace/plugins/github-actions/settings-schema.json +27 -0
  169. package/marketplace/plugins/github-actions/src/app.tsx +32 -0
  170. package/marketplace/plugins/github-actions/src/panel/Actions.tsx +105 -0
  171. package/marketplace/plugins/github-actions/src/panel/LogView.tsx +76 -0
  172. package/marketplace/plugins/github-actions/src/panel/Row.tsx +59 -0
  173. package/marketplace/plugins/github-actions/src/panel/RunView.tsx +197 -0
  174. package/marketplace/plugins/github-actions/src/panel/format.ts +74 -0
  175. package/marketplace/plugins/github-actions/src/panel/index.test.tsx +86 -0
  176. package/marketplace/plugins/github-actions/src/panel/index.tsx +256 -0
  177. package/marketplace/plugins/github-actions/src/panel/picker.test.tsx +68 -0
  178. package/marketplace/plugins/github-actions/src/panel/test-fixtures.ts +98 -0
  179. package/marketplace/plugins/github-actions/src/panel/test-harness.tsx +175 -0
  180. package/marketplace/plugins/github-actions/src/protocol.ts +156 -0
  181. package/marketplace/plugins/github-actions/src/server/github.test.ts +264 -0
  182. package/marketplace/plugins/github-actions/src/server/github.ts +309 -0
  183. package/marketplace/plugins/github-actions/src/server/http.test.ts +150 -0
  184. package/marketplace/plugins/github-actions/src/server/http.ts +202 -0
  185. package/marketplace/plugins/github-actions/src/server/json.ts +44 -0
  186. package/marketplace/plugins/github-actions/src/server/logtext.test.ts +84 -0
  187. package/marketplace/plugins/github-actions/src/server/logtext.ts +59 -0
  188. package/marketplace/plugins/github-actions/src/server/progress.test.ts +96 -0
  189. package/marketplace/plugins/github-actions/src/server/progress.ts +62 -0
  190. package/marketplace/plugins/github-actions/src/server/remote.ts +84 -0
  191. package/marketplace/plugins/github-actions/src/server/scope.ts +51 -0
  192. package/marketplace/plugins/github-actions/src/server/token.ts +84 -0
  193. package/marketplace/plugins/github-actions/src/server.ts +163 -0
  194. package/marketplace/plugins/github-actions/src/state.test.ts +55 -0
  195. package/marketplace/plugins/github-actions/src/state.ts +63 -0
  196. package/marketplace/plugins/github-actions/tsconfig.json +16 -0
  197. package/marketplace/plugins/stats/package.json +2 -2
  198. package/marketplace/plugins/stats/src/proc/identity.ts +4 -3
  199. package/package.json +2 -2
  200. package/src/client/App.tsx +1 -1
  201. package/src/client/borders.css +143 -0
  202. package/src/client/components/common/context-usage-button/Ring.tsx +34 -9
  203. package/src/client/components/common/context-usage-button/index.test.tsx +19 -2
  204. package/src/client/components/common/context-usage-button/index.tsx +4 -4
  205. package/src/client/components/common/header-controls/index.test.tsx +26 -59
  206. package/src/client/components/common/header-controls/index.tsx +41 -52
  207. package/src/client/components/common/header-controls/phone-row.test.tsx +265 -0
  208. package/src/client/components/common/header-controls/plugin-entry.test.tsx +25 -3
  209. package/src/client/components/common/header-controls/shell-chrome.test.tsx +2 -2
  210. package/src/client/components/layout/LeftDock.tsx +7 -0
  211. package/src/client/components/layout/desktop-layout/DesktopOverlays.tsx +51 -0
  212. package/src/client/components/layout/desktop-layout/LeftColumn.tsx +117 -15
  213. package/src/client/components/layout/desktop-layout/RightColumn.tsx +257 -0
  214. package/src/client/components/layout/desktop-layout/TopNavbar.tsx +23 -24
  215. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +50 -78
  216. package/src/client/components/layout/desktop-layout/index.tsx +73 -73
  217. package/src/client/components/layout/session-sidebar/Footer.test.tsx +20 -0
  218. package/src/client/components/layout/session-sidebar/Footer.tsx +24 -2
  219. package/src/client/components/layout/session-sidebar/Header.test.ts +10 -0
  220. package/src/client/components/layout/session-sidebar/Header.tsx +2 -2
  221. package/src/client/components/mobile/RightSidebar.tsx +164 -66
  222. package/src/client/components/mobile/header-titlebar.test.tsx +92 -0
  223. package/src/client/components/mobile/mobile-main-view/Header.test.tsx +2 -3
  224. package/src/client/components/mobile/mobile-main-view/Header.tsx +12 -10
  225. package/src/client/components/mobile/mobile-right-sidebar/Chrome.tsx +179 -0
  226. package/src/client/components/mobile/panel-chips.test.tsx +12 -0
  227. package/src/client/components/mobile/panel-chips.tsx +5 -1
  228. package/src/client/components/mobile/right-drawer-nav.test.tsx +258 -0
  229. package/src/client/components/settings/Modal.tsx +14 -9
  230. package/src/client/components/settings/ProjectSelectorDropdown.tsx +18 -6
  231. package/src/client/components/settings/SettingsSidebarList.tsx +2 -1
  232. package/src/client/components/settings/Sidebar.tsx +6 -4
  233. package/src/client/components/settings/apply-side-effects.test.ts +17 -0
  234. package/src/client/components/settings/apply-side-effects.ts +32 -5
  235. package/src/client/components/settings/band-height.test.tsx +122 -0
  236. package/src/client/components/settings/categories/AppearanceSettings.test.tsx +144 -0
  237. package/src/client/components/settings/categories/AppearanceSettings.tsx +81 -39
  238. package/src/client/components/settings/categories/ChatSettings.tsx +9 -15
  239. package/src/client/components/settings/categories/UsageSettings.tsx +2 -1
  240. package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx +101 -0
  241. package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx +134 -0
  242. package/src/client/components/settings/categories/appearance-settings/EditorBlameSection.tsx +2 -2
  243. package/src/client/components/settings/categories/appearance-settings/EditorFontSection.tsx +5 -5
  244. package/src/client/components/settings/categories/appearance-settings/EditorIndentSection.tsx +2 -2
  245. package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.tsx +6 -6
  246. package/src/client/components/settings/categories/appearance-settings/EditorTypingSection.tsx +2 -2
  247. package/src/client/components/settings/categories/appearance-settings/IconStyleSection.tsx +2 -2
  248. package/src/client/components/settings/categories/appearance-settings/PanelNavSection.tsx +288 -0
  249. package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.tsx +2 -2
  250. package/src/client/components/settings/categories/appearance-settings/SurfaceStyleSection.tsx +2 -2
  251. package/src/client/components/settings/categories/appearance-settings/ThemeSection.tsx +42 -0
  252. package/src/client/components/settings/categories/appearance-settings/TrayIconSection.tsx +2 -2
  253. package/src/client/components/settings/categories/appearance-settings/groups.test.ts +47 -0
  254. package/src/client/components/settings/categories/appearance-settings/groups.ts +95 -0
  255. package/src/client/components/settings/categories/chat-settings/LayoutSection.tsx +31 -14
  256. package/src/client/components/settings/categories/mcp-settings/SidebarList.tsx +2 -1
  257. package/src/client/components/settings/categories/project-settings/SidebarList.tsx +2 -1
  258. package/src/client/components/settings/categories/provider-settings/SidebarList.tsx +2 -1
  259. package/src/client/components/settings/categories/usage-settings/SidebarList.tsx +2 -1
  260. package/src/client/components/settings/master-detail/GroupDetail.tsx +38 -0
  261. package/src/client/components/settings/{categories/chat-settings/SidebarList.tsx → master-detail/GroupSidebar.tsx} +35 -12
  262. package/src/client/components/settings/master-detail/index.tsx +3 -1
  263. package/src/client/components/settings/pane-header.ts +25 -0
  264. package/src/client/components/workspace/browser-toolbar/index.test.tsx +39 -1
  265. package/src/client/components/workspace/browser-toolbar/index.tsx +53 -17
  266. package/src/client/components/workspace/chat-timeline/ColumnResizeHandle.tsx +107 -0
  267. package/src/client/components/workspace/chat-timeline/ComposerDockFrame.tsx +9 -3
  268. package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +35 -26
  269. package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +6 -0
  270. package/src/client/components/workspace/chat-timeline/column-resize.test.tsx +292 -0
  271. package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +5 -3
  272. package/src/client/components/workspace/context-panel/index.tsx +10 -4
  273. package/src/client/components/workspace/editor/EditorHideButton.tsx +41 -0
  274. package/src/client/components/workspace/editor/EmptyEditor.tsx +11 -2
  275. package/src/client/components/workspace/editor/PluginColumn.tsx +11 -1
  276. package/src/client/components/workspace/editor/Tabs.tsx +8 -0
  277. package/src/client/components/workspace/editor/editor-hide-button.test.ts +144 -0
  278. package/src/client/components/workspace/editor/index.tsx +8 -2
  279. package/src/client/components/workspace/editor/props.ts +9 -0
  280. package/src/client/components/workspace/file-explorer/RowLabel.test.tsx +90 -0
  281. package/src/client/components/workspace/file-explorer/RowLabel.tsx +1 -4
  282. package/src/client/components/workspace/git-panel/commit-modal/CommitRow.test.ts +52 -46
  283. package/src/client/components/workspace/git-panel/commit-modal/CommitRow.tsx +41 -21
  284. package/src/client/components/workspace/git-panel/commit-modal/GraphCanvas.tsx +6 -5
  285. package/src/client/components/workspace/git-panel/commit-modal/index.tsx +19 -22
  286. package/src/client/components/workspace/panel-header/title-policy.test.tsx +62 -0
  287. package/src/client/components/workspace/panel-header/title-policy.tsx +83 -0
  288. package/src/client/components/workspace/panel-tabs/Home.density.test.tsx +122 -0
  289. package/src/client/components/workspace/panel-tabs/Home.test.tsx +137 -0
  290. package/src/client/components/workspace/panel-tabs/Home.tsx +118 -0
  291. package/src/client/components/workspace/panel-tabs/TabChip.tsx +173 -0
  292. package/src/client/components/workspace/panel-tabs/TabStrip.test.tsx +339 -0
  293. package/src/client/components/workspace/panel-tabs/TabStrip.tsx +302 -0
  294. package/src/client/components/workspace/panel-tabs/index.tsx +105 -0
  295. package/src/client/components/workspace/panels/builtin.tsx +9 -0
  296. package/src/client/components/workspace/plan-panel/index.tsx +7 -2
  297. package/src/client/components/workspace/repo-picker/Modal.tsx +1 -1
  298. package/src/client/components/workspace/repo-picker/index.test.tsx +32 -8
  299. package/src/client/components/workspace/repo-picker/index.tsx +2 -2
  300. package/src/client/components/workspace/search-panel/Body.tsx +7 -1
  301. package/src/client/components/workspace/search-panel/index.tsx +2 -1
  302. package/src/client/components/workspace/terminal-panel/Header.tsx +10 -3
  303. package/src/client/components/workspace/terminal-panel/index.tsx +4 -1
  304. package/src/client/components/workspace/todo-panel/index.tsx +6 -1
  305. package/src/client/components/workspace/usage-panel/index.tsx +7 -2
  306. package/src/client/components/workspace/user-browser-panel/AddressBar.tsx +43 -4
  307. package/src/client/components/workspace/user-browser-panel/Frame.tsx +101 -45
  308. package/src/client/components/workspace/user-browser-panel/TabStrip.tsx +107 -0
  309. package/src/client/components/workspace/user-browser-panel/index.tsx +31 -6
  310. package/src/client/glass.test.ts +1 -1
  311. package/src/client/hooks/browser/use-annotate.ts +6 -5
  312. package/src/client/hooks/browser/use-user-browser.test.tsx +279 -0
  313. package/src/client/hooks/browser/use-user-browser.ts +190 -44
  314. package/src/client/hooks/chat/timeline/column-drag.ts +171 -0
  315. package/src/client/hooks/chat/timeline/width-mode.test.ts +112 -11
  316. package/src/client/hooks/chat/timeline/width-mode.ts +91 -18
  317. package/src/client/hooks/ui/border-style.test.ts +172 -0
  318. package/src/client/hooks/ui/border-style.ts +60 -0
  319. package/src/client/hooks/ui/navbar-controls.test.ts +27 -1
  320. package/src/client/hooks/ui/navbar-controls.ts +95 -20
  321. package/src/client/hooks/ui/style-attributes.test.ts +2 -0
  322. package/src/client/hooks/workspace/active-project.ts +46 -0
  323. package/src/client/hooks/workspace/commit-expansion.test.ts +135 -0
  324. package/src/client/hooks/workspace/commit-expansion.ts +56 -0
  325. package/src/client/hooks/workspace/mobile-right-panel-nav.ts +63 -0
  326. package/src/client/hooks/workspace/panel-nav.test.ts +140 -0
  327. package/src/client/hooks/workspace/panel-nav.ts +95 -0
  328. package/src/client/hooks/workspace/panel-tabs.session.test.tsx +235 -0
  329. package/src/client/hooks/workspace/panel-tabs.ts +194 -0
  330. package/src/client/hooks/workspace/right-open-request.ts +53 -0
  331. package/src/client/hooks/workspace/right-side.test.ts +204 -0
  332. package/src/client/hooks/workspace/right-side.ts +142 -0
  333. package/src/client/lib/ui/control-plate.ts +33 -0
  334. package/src/client/main.tsx +9 -4
  335. package/src/client/tailwind.css +6 -0
  336. package/src/server/lib/assets/shell-attributes.server.ts +26 -10
  337. package/src/server/lib/assets/shell-attributes.test.ts +26 -0
  338. package/src/server/lib/bundler/titlebar-css.test.ts +5 -3
  339. package/src/server/lib/harness/acp/background-replay.test.ts +16 -1
  340. package/src/server/lib/harness/acp/background-replay.ts +6 -1
  341. package/src/server/lib/harness/acp/background-work.ts +44 -31
  342. package/src/server/lib/harness/acp/session-turns.ts +4 -3
  343. package/src/server/lib/harness/acp/session-wiring.test.ts +53 -0
  344. package/src/server/lib/harness/acp/session-wiring.ts +11 -2
  345. package/src/server/lib/harness/session-lease.server.ts +3 -2
  346. package/src/server/lib/omp/session/lease-probe.server.test.ts +82 -0
  347. package/src/server/lib/omp/session/lease-probe.server.ts +180 -0
  348. package/src/server/lib/omp/session/ownership.server.test.ts +17 -6
  349. package/src/server/lib/omp/session/ownership.server.ts +7 -5
  350. package/src/server/plugins/ssr.ts +6 -3
  351. package/src/shared/lib/browser/user-tabs.test.ts +165 -0
  352. package/src/shared/lib/browser/user-tabs.ts +172 -0
  353. package/src/shared/lib/chat/timeline/width-mode.test.ts +34 -2
  354. package/src/shared/lib/chat/timeline/width-mode.ts +71 -22
  355. package/src/shared/lib/commands/catalog.ts +2 -2
  356. package/src/shared/lib/fs/git-status.test.ts +23 -0
  357. package/src/shared/lib/fs/git-status.ts +15 -0
  358. package/src/shared/lib/icons/tint-hues.generated.ts +20 -20
  359. package/src/shared/lib/settings/defaults.ts +8 -1
  360. package/src/shared/lib/theme/border-style.test.ts +83 -0
  361. package/src/shared/lib/theme/border-style.ts +122 -0
  362. package/src/shared/lib/workspace/keymap.ts +2 -1
  363. package/src/shared/lib/workspace/panel-nav.test.ts +198 -0
  364. package/src/shared/lib/workspace/panel-nav.ts +148 -0
  365. package/src/shared/lib/workspace/panel-tabs-close.test.ts +154 -0
  366. package/src/shared/lib/workspace/panel-tabs.ts +105 -0
  367. package/src/shared/lib/workspace/session-state/cache.ts +22 -0
  368. package/src/shared/lib/workspace/session-state/merge.ts +6 -0
  369. package/src/shared/lib/workspace/session-state/store.ts +23 -0
  370. package/src/shared/types/settings/state.ts +58 -3
  371. package/src/test-support/header-controls-harness.ts +22 -0
  372. package/src/test-support/peer-harness.ts +2 -2
  373. package/dist/client/static/js/ImageView-rnzf5tve.js +0 -1
  374. package/dist/client/static/js/LayoutWrapper-rekrgth6.js +0 -2
  375. package/dist/client/static/js/SessionsView-e84tjbcr.js +0 -1
  376. package/dist/client/static/js/architecture-7GRP2DOG-7j23x20s.js +0 -1
  377. package/dist/client/static/js/bash-vv2ysp0a.js +0 -1
  378. package/dist/client/static/js/c-8jf64j6h.js +0 -1
  379. package/dist/client/static/js/cpp-vh94zee0.js +0 -1
  380. package/dist/client/static/js/css-a13jmmnc.js +0 -1
  381. package/dist/client/static/js/css-p57h1fme.js +0 -1
  382. package/dist/client/static/js/cynefin-OW5HDTMX-me5xnx6a.js +0 -1
  383. package/dist/client/static/js/eventmodeling-NTZA5JFV-5zbvjj84.js +0 -1
  384. package/dist/client/static/js/flowDiagram-KWPJA3E3-36ygrbvm.js +0 -1
  385. package/dist/client/static/js/gitGraph-4MIJSDKK-tjhkv71w.js +0 -1
  386. package/dist/client/static/js/graphql-kesh8gk0.js +0 -1
  387. package/dist/client/static/js/html-sxpfydga.js +0 -1
  388. package/dist/client/static/js/index-0q2qfcjn.js +0 -1
  389. package/dist/client/static/js/index-48gh56ka.js +0 -3
  390. package/dist/client/static/js/index-4rv388z7.js +0 -2
  391. package/dist/client/static/js/index-52xmdeh2.js +0 -1
  392. package/dist/client/static/js/index-8kqepehd.js +0 -12
  393. package/dist/client/static/js/index-cje5gg45.js +0 -1
  394. package/dist/client/static/js/index-fbcg8y95.js +0 -1
  395. package/dist/client/static/js/index-g3shdymf.js +0 -1
  396. package/dist/client/static/js/index-h5n1btqy.js +0 -1
  397. package/dist/client/static/js/index-m1n4v0z7.js +0 -9
  398. package/dist/client/static/js/index-rn8w29pv.js +0 -2
  399. package/dist/client/static/js/index-s00j9042.js +0 -2
  400. package/dist/client/static/js/index-s7rfbydk.js +0 -4
  401. package/dist/client/static/js/index-sg6sz3g8.js +0 -1
  402. package/dist/client/static/js/index-vcrh95gf.css +0 -1
  403. package/dist/client/static/js/index-w5rw8f7w.js +0 -1
  404. package/dist/client/static/js/index-x6v37h3j.js +0 -1
  405. package/dist/client/static/js/info-A6RAGUB7-m6qz24p8.js +0 -1
  406. package/dist/client/static/js/ini-1x0ad976.js +0 -1
  407. package/dist/client/static/js/java-3944nq02.js +0 -1
  408. package/dist/client/static/js/javascript-zegm06a1.js +0 -1
  409. package/dist/client/static/js/json-g5ggnd94.js +0 -1
  410. package/dist/client/static/js/jsx-f6p72qpc.js +0 -1
  411. package/dist/client/static/js/lua-edn2b3wn.js +0 -1
  412. package/dist/client/static/js/markdown-9dhg1fax.js +0 -1
  413. package/dist/client/static/js/one-dark-pro-hteqzfb0.js +0 -1
  414. package/dist/client/static/js/one-light-dapnh0rs.js +0 -1
  415. package/dist/client/static/js/packet-AYTQ26CC-ng6wq5xj.js +0 -1
  416. package/dist/client/static/js/pie-WAS4IAKB-rf6jhxf6.js +0 -1
  417. package/dist/client/static/js/properties-fcmj08pv.js +0 -1
  418. package/dist/client/static/js/python-532d8ezm.js +0 -1
  419. package/dist/client/static/js/r-ptmdxs2a.js +0 -1
  420. package/dist/client/static/js/radar-RG4KPBEZ-ygp6hxq4.js +0 -1
  421. package/dist/client/static/js/railroad-74A4TZTK-rxgnrb2g.js +0 -1
  422. package/dist/client/static/js/railroad-abnf-HS5TGJTU-xkv52a2p.js +0 -1
  423. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-bvcktbqh.js +0 -1
  424. package/dist/client/static/js/railroad-peg-WCYAUIDC-9c3v7jsq.js +0 -1
  425. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-akjqm31r.js +0 -8
  426. package/dist/client/static/js/treeView-Q6P3EWNA-fb58a7z1.js +0 -1
  427. package/dist/client/static/js/treemap-WGGIJYW6-ej4qhksx.js +0 -1
  428. package/dist/client/static/js/tsx-zfy727zs.js +0 -1
  429. package/dist/client/static/js/typescript-683kkkaw.js +0 -1
  430. package/dist/client/static/js/wardley-WFR3VGLG-mkp0kanv.js +0 -1
  431. package/dist/client/static/js/xml-6ct32gys.js +0 -1
  432. package/dist/client/static/js/yaml-1d5m3bfj.js +0 -1
  433. package/src/server/lib/omp/session/lease-flock.server.ts +0 -117
@@ -1,34 +1,34 @@
1
- import{t,l,mt,ua,w,R,L,z,P,U,q,G,p,da,Di,h,ir,sr,V,En,ft,Xe,et,Hn,Jl,Ft,Lt,Dn,Mt,gt}from"./index-cgzw43bc.js";import{Ot}from"./index-f77c3ag0.js";import{Ma}from"./index-cjhvtzdd.js";var h1="flowchart-",d1=class{constructor(){this.vertexCounter=0,this.config=p(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=L,this.setAccDescription=P,this.setDiagramTitle=q,this.getAccTitle=z,this.getAccDescription=U,this.getDiagramTitle=G,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{t(this,"FlowDB")}sanitizeText(e){return w.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let r of this.vertices.values())if(r.id===e)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,r,a,n,o,k,c={},A){if(!e||e.trim().length===0)return;let f;if(A!==void 0){let T;if(!A.includes(`
1
+ import{t,l,pt,ua,w,R,M,G,z,j,H,q,p,da,Ri,h,lr,cr,V,Bn,mt,et,tt,Vn,nc,Ft,Lt,Qn,Mt,ft}from"./index-gmq5pbcv.js";import{$t}from"./index-xkwybnf3.js";import{Pa}from"./index-h0rmkz9n.js";var h1="flowchart-",d1=class{constructor(){this.vertexCounter=0,this.config=p(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=M,this.setAccDescription=z,this.setDiagramTitle=H,this.getAccTitle=G,this.getAccDescription=j,this.getDiagramTitle=q,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{t(this,"FlowDB")}sanitizeText(e){return w.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let r of this.vertices.values())if(r.id===e)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,r,a,n,o,k,c={},A){if(!e||e.trim().length===0)return;let f;if(A!==void 0){let T;if(!A.includes(`
2
2
  `))T=`{
3
3
  `+A+`
4
4
  }`;else T=A+`
5
- `;f=sr(T,{schema:ir})}let O=this.subGraphLookup.get(e);if(O&&f){O.metadata={...O.metadata,...f};return}let F=this.edges.find((T)=>T.id===e);if(F){let T=f;if(T?.animate!==void 0)F.animate=T.animate;if(T?.animation!==void 0)F.animation=T.animation;if(T?.curve!==void 0)F.interpolate=T.curve;return}let v,D=this.vertices.get(e);if(D===void 0){if(r===void 0&&a===void 0&&n!==void 0&&n!==null)l.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`);D={id:e,labelType:"text",domId:h1+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,D)}if(this.vertexCounter++,r!==void 0){if(this.config=p(),v=this.sanitizeText(r.text.trim()),D.labelType=r.type,v.startsWith('"')&&v.endsWith('"'))v=v.substring(1,v.length-1);D.text=v}else if(D.text===void 0)D.text=e;if(a!==void 0)D.type=a;if(n!==void 0&&n!==null)n.forEach((T)=>{D.styles.push(T)});if(o!==void 0&&o!==null)o.forEach((T)=>{D.classes.push(T)});if(k!==void 0)D.dir=k;if(D.props===void 0)D.props=c;else if(c!==void 0)Object.assign(D.props,c);if(f!==void 0){if(f.shape){if(f.shape!==f.shape.toLowerCase()||f.shape.includes("_"))throw Error(`No such shape: ${f.shape}. Shape names should be lowercase.`);else if(!Jl(f.shape))throw Error(`No such shape: ${f.shape}.`);D.type=f?.shape}if(f?.label)D.text=f?.label,D.labelType=this.sanitizeNodeLabelType(f?.labelType);if(f?.icon){if(D.icon=f?.icon,!f.label?.trim()&&D.text===e)D.text=""}if(f?.form)D.form=f?.form;if(f?.pos)D.pos=f?.pos;if(f?.img){if(D.img=f?.img,!f.label?.trim()&&D.text===e)D.text=""}if(f?.constraint)D.constraint=f.constraint;if(f.w)D.assetWidth=Number(f.w);if(f.h)D.assetHeight=Number(f.h)}}addSingleLink(e,r,a,n){let c={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};l.info("abc78 Got edge...",c);let A=a.text;if(A!==void 0){if(c.text=this.sanitizeText(A.text.trim()),c.text.startsWith('"')&&c.text.endsWith('"'))c.text=c.text.substring(1,c.text.length-1);c.labelType=this.sanitizeNodeLabelType(A.type)}if(a!==void 0)c.type=a.type,c.stroke=a.stroke,c.length=a.length>10?10:a.length;if(n&&!this.edges.some((f)=>f.id===n))c.id=n,c.isUserDefinedId=!0;else{let f=this.edges.filter((O)=>O.start===c.start&&O.end===c.end);if(f.length===0)c.id=En(c.start,c.end,{counter:0,prefix:"L"});else c.id=En(c.start,c.end,{counter:f.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))l.info("Pushing edge..."),this.edges.push(c);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
5
+ `;f=cr(T,{schema:lr})}let N=this.subGraphLookup.get(e);if(N&&f){N.metadata={...N.metadata,...f};return}let F=this.edges.find((T)=>T.id===e);if(F){let T=f;if(T?.animate!==void 0)F.animate=T.animate;if(T?.animation!==void 0)F.animation=T.animation;if(T?.curve!==void 0)F.interpolate=T.curve;return}let v,D=this.vertices.get(e);if(D===void 0){if(r===void 0&&a===void 0&&n!==void 0&&n!==null)l.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`);D={id:e,labelType:"text",domId:h1+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,D)}if(this.vertexCounter++,r!==void 0){if(this.config=p(),v=this.sanitizeText(r.text.trim()),D.labelType=r.type,v.startsWith('"')&&v.endsWith('"'))v=v.substring(1,v.length-1);D.text=v}else if(D.text===void 0)D.text=e;if(a!==void 0)D.type=a;if(n!==void 0&&n!==null)n.forEach((T)=>{D.styles.push(T)});if(o!==void 0&&o!==null)o.forEach((T)=>{D.classes.push(T)});if(k!==void 0)D.dir=k;if(D.props===void 0)D.props=c;else if(c!==void 0)Object.assign(D.props,c);if(f!==void 0){if(f.shape){if(f.shape!==f.shape.toLowerCase()||f.shape.includes("_"))throw Error(`No such shape: ${f.shape}. Shape names should be lowercase.`);else if(!nc(f.shape))throw Error(`No such shape: ${f.shape}.`);D.type=f?.shape}if(f?.label)D.text=f?.label,D.labelType=this.sanitizeNodeLabelType(f?.labelType);if(f?.icon){if(D.icon=f?.icon,!f.label?.trim()&&D.text===e)D.text=""}if(f?.form)D.form=f?.form;if(f?.pos)D.pos=f?.pos;if(f?.img){if(D.img=f?.img,!f.label?.trim()&&D.text===e)D.text=""}if(f?.constraint)D.constraint=f.constraint;if(f.w)D.assetWidth=Number(f.w);if(f.h)D.assetHeight=Number(f.h)}}addSingleLink(e,r,a,n){let c={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};l.info("abc78 Got edge...",c);let A=a.text;if(A!==void 0){if(c.text=this.sanitizeText(A.text.trim()),c.text.startsWith('"')&&c.text.endsWith('"'))c.text=c.text.substring(1,c.text.length-1);c.labelType=this.sanitizeNodeLabelType(A.type)}if(a!==void 0)c.type=a.type,c.stroke=a.stroke,c.length=a.length>10?10:a.length;if(n&&!this.edges.some((f)=>f.id===n))c.id=n,c.isUserDefinedId=!0;else{let f=this.edges.filter((N)=>N.start===c.start&&N.end===c.end);if(f.length===0)c.id=Bn(c.start,c.end,{counter:0,prefix:"L"});else c.id=Bn(c.start,c.end,{counter:f.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))l.info("Pushing edge..."),this.edges.push(c);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
6
6
 
7
7
  Initialize mermaid with maxEdges set to a higher number to allow more edges.
8
8
  You cannot set this config via configuration inside the diagram as it is a secure config.
9
- You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e==="object"&&"id"in e&&typeof e.id==="string"}addLink(e,r,a){let n=this.isLinkData(a)?a.id.replace("@",""):void 0;l.info("addLink",e,r,n);for(let o of e)for(let k of r){let c=o===e[e.length-1],A=k===r[0];if(c&&A)this.addSingleLink(o,k,a,n);else this.addSingleLink(o,k,a,void 0)}}updateLinkInterpolate(e,r){e.forEach((a)=>{if(a==="default")this.edges.defaultInterpolate=r;else this.edges[a].interpolate=r})}updateLink(e,r){e.forEach((a)=>{if(typeof a==="number"&&a>=this.edges.length)throw Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(a==="default")this.edges.defaultStyle=r;else if(this.edges[a].style=r,(this.edges[a]?.style?.length??0)>0&&!this.edges[a]?.style?.some((n)=>n?.startsWith("fill")))this.edges[a]?.style?.push("fill:none")})}addClass(e,r){let a=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach((n)=>{let o=this.classes.get(n);if(o===void 0)o={id:n,styles:[],textStyles:[]},this.classes.set(n,o);if(a!==void 0&&a!==null)a.forEach((k)=>{if(/color/.exec(k)){let c=k.replace("fill","bgFill");o.textStyles.push(c)}o.styles.push(k)})})}setDirection(e){if(this.direction=e.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(e,r){for(let a of e.split(",")){let n=this.vertices.get(a);if(n)n.classes.push(r);let o=this.edges.find((c)=>c.id===a);if(o)o.classes.push(r);let k=this.subGraphLookup.get(a);if(k)k.classes.push(r)}}setTooltip(e,r){if(r===void 0)return;r=this.sanitizeText(r);for(let a of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,r)}setClickFun(e,r,a){if(p().securityLevel!=="loose")return;if(r===void 0)return;let n=[];if(typeof a==="string"){n=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k<n.length;k++){let c=n[k].trim();if(c.startsWith('"')&&c.endsWith('"'))c=c.substr(1,c.length-2);n[k]=c}}if(n.length===0)n.push(e);let o=this.vertices.get(e);if(o)o.haveCallback=!0,this.funs.push(()=>{let k=this.lookUpDomId(e),c=document.querySelector(`[id="${k}"]`);if(c!==null)c.addEventListener("click",()=>{V.runFunc(r,...n)},!1)})}setLink(e,r,a){e.split(",").forEach((n)=>{let o=this.vertices.get(n);if(o!==void 0)o.link=V.formatUrl(r,this.config),o.linkTarget=a}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,a){e.split(",").forEach((n)=>{this.setClickFun(n,r,a)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach((r)=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let r=Ma();h(e).select("svg").selectAll("g.node").on("mouseover",(o)=>{let k=h(o.currentTarget),c=k.attr("title");if(c===null)return;let A=o.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(k.attr("title")).style("left",window.scrollX+A.left+(A.right-A.left)/2+"px").style("top",window.scrollY+A.bottom+"px"),r.html(Ot.sanitize(c)),k.classed("hover",!0)}).on("mouseout",(o)=>{r.transition().duration(500).style("opacity",0),h(o.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=p(),R()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,a){let n=e.text.trim(),o=a.text;if(e===a&&/\s/.exec(a.text))n=void 0;let c=t((v)=>{let D={boolean:{},number:{},string:{}},T=[],_;return{nodeList:v.filter(function(ie){let d=typeof ie;if(ie.stmt&&ie.stmt==="dir")return _=ie.value,!1;if(ie.trim()==="")return!1;if(d in D)return D[d].hasOwnProperty(ie)?!1:D[d][ie]=!0;else return T.includes(ie)?!1:T.push(ie)}),dir:_}},"uniq")(r.flat()),{nodeList:A,dir:f}=c,O=p().flowchart??{};if(f=f??(O.inheritDir?this.getDirection()??p().direction??void 0:void 0),this.version==="gen-1")for(let v=0;v<A.length;v++)A[v]=this.lookUpDomId(A[v]);n=n??"subGraph"+this.subCount,o=o||"",o=this.sanitizeText(o),this.subCount=this.subCount+1;let F={id:n,nodes:A,title:o.trim(),classes:[],dir:f,labelType:this.sanitizeNodeLabelType(a?.type)};return l.info("Adding",F.id,F.nodes,F.dir),F.nodes=this.makeUniq(F,this.subGraphs).nodes,this.subGraphs.push(F),this.subGraphLookup.set(n,F),n}getPosForId(e){for(let[r,a]of this.subGraphs.entries())if(a.id===e)return r;return-1}indexNodes2(e,r){let a=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let n=0,o=1;while(n<a.length){let k=this.getPosForId(a[n]);if(k>=0){let c=this.indexNodes2(e,k);if(c.result)return{result:!0,count:o+c.count};else o=o+c.count}n=n+1}return{result:!1,count:o}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}destructStartLink(e){let r=e.trim(),a="arrow_open";switch(r[0]){case"<":a="arrow_point",r=r.slice(1);break;case"x":a="arrow_cross",r=r.slice(1);break;case"o":a="arrow_circle",r=r.slice(1);break}let n="normal";if(r.includes("="))n="thick";if(r.includes("."))n="dotted";return{type:a,stroke:n}}countChar(e,r){let a=r.length,n=0;for(let o=0;o<a;++o)if(r[o]===e)++n;return n}destructEndLink(e){let r=e.trim(),a=r.slice(0,-1),n="arrow_open";switch(r.slice(-1)){case"x":if(n="arrow_cross",r.startsWith("x"))n="double_"+n,a=a.slice(1);break;case">":if(n="arrow_point",r.startsWith("<"))n="double_"+n,a=a.slice(1);break;case"o":if(n="arrow_circle",r.startsWith("o"))n="double_"+n,a=a.slice(1);break}let o="normal",k=a.length-1;if(a.startsWith("="))o="thick";if(a.startsWith("~"))o="invisible";let c=this.countChar(".",a);if(c)o="dotted",k=c;return{type:n,stroke:o,length:k}}destructLink(e,r){let a=this.destructEndLink(e),n;if(r){if(n=this.destructStartLink(r),n.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=a.type;else{if(n.type!==a.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}if(n.type==="double_arrow")n.type="double_arrow_point";return n.length=a.length,n}return a}exists(e,r){for(let a of e)if(a.nodes.includes(r))return!0;return!1}makeUniq(e,r){let a=[];return e.nodes.forEach((n,o)=>{if(!this.exists(r,n))a.push(e.nodes[o])}),{nodes:a}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon){if(e.form==="circle")return"iconCircle";if(e.form==="square")return"iconSquare";if(e.form==="rounded")return"iconRounded";return"icon"}switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,r){return e.find((a)=>a.id===r)}destructEdgeType(e){let r="none",a="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":a=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),a=r;break}return{arrowTypeStart:r,arrowTypeEnd:a}}addNodeFromVertex(e,r,a,n,o,k){let c=a.get(e.id),A=n.get(e.id)??!1,f=this.findNode(r,e.id);if(f)f.cssStyles=e.styles,f.cssCompiledStyles=this.getCompiledStyles(e.classes),f.cssClasses=e.classes.join(" ");else{let O={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:c,padding:o.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:k,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};if(A)r.push({...O,isGroup:!0,shape:"rect"});else r.push({...O,isGroup:!1,shape:this.getTypeFromVertex(e),minWidth:o.flowchart?.minNodeWidth})}}getCompiledStyles(e){let r=[];for(let a of e){let n=this.classes.get(a);if(n?.styles)r=[...r,...n.styles??[]].map((o)=>o.trim());if(n?.textStyles)r=[...r,...n.textStyles??[]].map((o)=>o.trim())}return r}getData(){let e=p(),r=[],a=[],n=this.getSubGraphs(),o=new Map,k=new Map,c=new Map;for(let d of n)for(let m of d.nodes)if(this.subGraphLookup.has(m))c.set(m,d.id);let A=new Map,f=new Map;for(let d of n){let m=c.get(d.id);if(m!==void 0)f.set(m,[...f.get(m)??[],d.id])}let O=0,F=t((d)=>{A.set(d,O++);for(let m of f.get(d)??[])F(m)},"walk");for(let d of n)if(!c.has(d.id))F(d.id);let v=t((d)=>this.subGraphLookup.get(d)?.metadata?.view==="collapsed","isCollapsed"),D=t((d)=>{let m,ue=new Set,le=d;while(le!==void 0&&!ue.has(le)){if(ue.add(le),v(le))m=le;le=c.get(le)}return m},"outermostCollapsed"),T=new Set,_=new Map;for(let d of n){let m=D(d.id);if(m===void 0)continue;if(d.id!==m)T.add(d.id),_.set(d.id,m);for(let ue of d.nodes){if(ue===m)continue;T.add(ue),_.set(ue,m)}}for(let d=n.length-1;d>=0;d--){let m=n[d];if(T.has(m.id))continue;if(m.nodes.length>0)k.set(m.id,!0);for(let ue of m.nodes)o.set(ue,m.id)}for(let d=n.length-1;d>=0;d--){let m=n[d];if(T.has(m.id))continue;if(m.metadata?.view==="collapsed")r.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:o.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssClasses:m.classes.join(" "),shape:"collapsedGroup",dir:m.dir,isGroup:!1,look:e.look,colorIndex:A.get(m.id)});else r.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:o.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssClasses:m.classes.join(" "),shape:"rect",dir:m.dir,isGroup:!0,look:e.look,colorIndex:A.get(m.id),metadata:m.metadata})}this.getVertices().forEach((d)=>{if(T.has(d.id))return;this.addNodeFromVertex(d,r,o,k,e,e.look||"classic")});let ie=this.getEdges();return ie.forEach((d,m)=>{let{arrowTypeStart:ue,arrowTypeEnd:le}=this.destructEdgeType(d.type),W=[...ie.defaultStyle??[]],j=_.get(d.start)??d.start,K=_.get(d.end)??d.end;if(j===K&&(_.has(d.start)||_.has(d.end)))return;if(d.style)W.push(...d.style);let H={id:En(j,K,{counter:m,prefix:"L"},d.id),isUserDefinedId:d.isUserDefinedId,start:j,end:K,type:d.type??"normal",label:d.text,labelType:d.labelType,labelpos:"c",thickness:d.stroke,minlen:d.length,classes:d?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":ue,arrowTypeEnd:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":le,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(d.classes),labelStyle:W,style:W,pattern:d.stroke,look:e.look,animate:d.animate,animation:d.animation,curve:d.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};a.push(H)}),{nodes:r,edges:a,other:{},config:e}}defaultConfig(){return Di.flowchart}},p1=t(function(e,r){return r.db.getClasses()},"getClasses"),f1=t(async function(e,r,a,n){l.info("REF0:"),l.info("Drawing state diagram (v2)",r);let{securityLevel:o,flowchart:k,layout:c}=p();n.db.setDiagramId(r),l.debug("Before getData: ");let A=n.db.getData();l.debug("Data: ",A);let f=Mt(r,o),O=n.db.getDirection();A.type=n.type,A.layoutAlgorithm=Lt(c),A.direction=O,A.nodeSpacing=k?.nodeSpacing||50,A.rankSpacing=k?.rankSpacing||50,A.markers=["point","circle","cross"],A.diagramId=r,l.debug("REF1:",A),await Ft(A,f);let F=A.config.flowchart?.diagramPadding??8;V.insertTitle(f,"flowchartTitleText",k?.titleTopMargin||0,n.db.getDiagramTitle()),gt(f,F,"flowchart",k?.useMaxWidth||!1)},"draw"),b1={getClasses:p1,draw:f1},kt=function(){var e=t(function(Be,b,g,C){for(g=g||{},C=Be.length;C--;g[Be[C]]=b);return g},"o"),r=[1,4],a=[1,3],n=[1,5],o=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],k=[2,2],c=[1,13],A=[1,14],f=[1,15],O=[1,16],F=[1,23],v=[1,25],D=[1,26],T=[1,27],_=[1,50],Y=[1,49],ie=[1,29],d=[1,30],m=[1,31],ue=[1,32],le=[1,33],W=[1,45],j=[1,47],K=[1,43],H=[1,48],Q=[1,44],J=[1,51],Z=[1,46],ee=[1,52],te=[1,53],Je=[1,34],Ze=[1,35],$e=[1,36],tt=[1,37],st=[1,38],Fe=[1,58],B=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],be=[1,62],ke=[1,61],ge=[1,63],Ie=[8,9,11,75,77,78],At=[1,79],Re=[1,92],Ne=[1,97],Ge=[1,96],Pe=[1,93],Oe=[1,89],Me=[1,95],Ue=[1,91],We=[1,98],ze=[1,94],je=[1,99],Ke=[1,90],ve=[8,9,10,11,40,75,77,78],re=[8,9,10,11,40,46,75,77,78],ce=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],Ct=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Ye=[44,60,89,102,105,106,109,111,114,115,116],Dt=[1,122],Tt=[1,123],it=[1,125],rt=[1,124],Et=[44,60,62,74,89,102,105,106,109,111,114,115,116],St=[1,134],yt=[1,148],xt=[1,149],_t=[1,150],Bt=[1,151],vt=[1,136],Vt=[1,138],wt=[1,142],It=[1,143],Rt=[1,144],Nt=[1,145],Gt=[1,146],Pt=[1,147],Ut=[1,152],Wt=[1,153],zt=[1,132],jt=[1,133],Kt=[1,140],Yt=[1,135],Ht=[1,139],qt=[1,137],ot=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Xt=[1,155],Qt=[1,157],M=[8,9,11],he=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],E=[1,177],ae=[1,173],ne=[1,174],S=[1,178],y=[1,175],x=[1,176],He=[77,116,119],I=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Jt=[10,106],_e=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Ae=[1,248],me=[1,246],Ce=[1,250],De=[1,244],Te=[1,245],Ee=[1,247],Se=[1,249],ye=[1,251],qe=[1,269],Zt=[8,9,11,106],fe=[8,9,10,11,60,84,105,106,109,110,111,112],lt={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:t(function(b,g,C,u,N,s,Le){var i=s.length-1;switch(N){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 183:this.$=s[i];break;case 11:u.setDirection("TB"),this.$="TB";break;case 12:u.setDirection(s[i-1]),this.$=s[i-1];break;case 27:this.$=s[i-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=u.addSubGraph(s[i-6],s[i-1],s[i-4]);break;case 34:this.$=u.addSubGraph(s[i-3],s[i-1],s[i-3]);break;case 35:this.$=u.addSubGraph(void 0,s[i-1],void 0);break;case 37:this.$=s[i].trim(),u.setAccTitle(this.$);break;case 38:case 39:this.$=s[i].trim(),u.setAccDescription(this.$);break;case 43:this.$=s[i-1]+s[i];break;case 44:this.$=s[i];break;case 45:u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i]),u.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 46:u.addLink(s[i-2].stmt,s[i],s[i-1]),this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 47:u.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 48:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 49:u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i]),this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 50:this.$={stmt:s[i],nodes:s[i]};break;case 51:this.$=[s[i]];break;case 52:u.addVertex(s[i-5][s[i-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4]),this.$=s[i-5].concat(s[i]);break;case 53:this.$=s[i-4].concat(s[i]);break;case 54:this.$=s[i];break;case 55:this.$=s[i-2],u.setClass(s[i-2],s[i]);break;case 56:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"square");break;case 57:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"doublecircle");break;case 58:this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"circle");break;case 59:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"ellipse");break;case 60:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"stadium");break;case 61:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"subroutine");break;case 62:this.$=s[i-7],u.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]]));break;case 63:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"cylinder");break;case 64:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"round");break;case 65:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"diamond");break;case 66:this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"hexagon");break;case 67:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"odd");break;case 68:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"trapezoid");break;case 69:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"inv_trapezoid");break;case 70:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_right");break;case 71:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_left");break;case 72:this.$=s[i],u.addVertex(s[i]);break;case 73:s[i-1].text=s[i],this.$=s[i-1];break;case 74:case 75:s[i-2].text=s[i-1],this.$=s[i-2];break;case 76:this.$=s[i];break;case 77:var X=u.destructLink(s[i],s[i-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:s[i-1]};break;case 78:var X=u.destructLink(s[i],s[i-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:s[i-1],id:s[i-3]};break;case 79:this.$={text:s[i],type:"text"};break;case 80:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 81:this.$={text:s[i],type:"string"};break;case 82:this.$={text:s[i],type:"markdown"};break;case 83:var X=u.destructLink(s[i]);this.$={type:X.type,stroke:X.stroke,length:X.length};break;case 84:var X=u.destructLink(s[i]);this.$={type:X.type,stroke:X.stroke,length:X.length,id:s[i-1]};break;case 85:this.$=s[i-1];break;case 86:this.$={text:s[i],type:"text"};break;case 87:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 88:this.$={text:s[i],type:"string"};break;case 89:case 104:this.$={text:s[i],type:"markdown"};break;case 101:this.$={text:s[i],type:"text"};break;case 102:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 103:this.$={text:s[i],type:"text"};break;case 105:this.$=s[i-4],u.addClass(s[i-2],s[i]);break;case 106:this.$=s[i-4],u.setClass(s[i-2],s[i]);break;case 107:case 115:this.$=s[i-1],u.setClickEvent(s[i-1],s[i]);break;case 108:case 116:this.$=s[i-3],u.setClickEvent(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 109:this.$=s[i-2],u.setClickEvent(s[i-2],s[i-1],s[i]);break;case 110:this.$=s[i-4],u.setClickEvent(s[i-4],s[i-3],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 111:this.$=s[i-2],u.setLink(s[i-2],s[i]);break;case 112:this.$=s[i-4],u.setLink(s[i-4],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 113:this.$=s[i-4],u.setLink(s[i-4],s[i-2],s[i]);break;case 114:this.$=s[i-6],u.setLink(s[i-6],s[i-4],s[i]),u.setTooltip(s[i-6],s[i-2]);break;case 117:this.$=s[i-1],u.setLink(s[i-1],s[i]);break;case 118:this.$=s[i-3],u.setLink(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 119:this.$=s[i-3],u.setLink(s[i-3],s[i-2],s[i]);break;case 120:this.$=s[i-5],u.setLink(s[i-5],s[i-4],s[i]),u.setTooltip(s[i-5],s[i-2]);break;case 121:this.$=s[i-4],u.addVertex(s[i-2],void 0,void 0,s[i]);break;case 122:this.$=s[i-4],u.updateLink([s[i-2]],s[i]);break;case 123:this.$=s[i-4],u.updateLink(s[i-2],s[i]);break;case 124:this.$=s[i-8],u.updateLinkInterpolate([s[i-6]],s[i-2]),u.updateLink([s[i-6]],s[i]);break;case 125:this.$=s[i-8],u.updateLinkInterpolate(s[i-6],s[i-2]),u.updateLink(s[i-6],s[i]);break;case 126:this.$=s[i-6],u.updateLinkInterpolate([s[i-4]],s[i]);break;case 127:this.$=s[i-6],u.updateLinkInterpolate(s[i-4],s[i]);break;case 128:case 130:this.$=[s[i]];break;case 129:case 131:s[i-2].push(s[i]),this.$=s[i-2];break;case 133:this.$=s[i-1]+s[i];break;case 181:this.$=s[i];break;case 182:this.$=s[i-1]+""+s[i];break;case 184:this.$=s[i-1]+""+s[i];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:r,10:a,12:n},{1:[3]},e(o,k,{5:6}),{4:7,9:r,10:a,12:n},{4:8,9:r,10:a,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:c,9:A,10:f,11:O,20:17,22:18,23:19,24:20,25:21,26:22,27:F,33:24,34:v,36:D,38:T,42:28,43:39,44:_,45:40,47:41,60:Y,84:ie,85:d,86:m,87:ue,88:le,89:W,102:j,105:K,106:H,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Je,122:Ze,123:$e,124:tt,125:st},e(o,[2,9]),e(o,[2,10]),e(o,[2,11]),{8:[1,55],9:[1,56],10:Fe,15:54,18:57},e(B,[2,3]),e(B,[2,4]),e(B,[2,5]),e(B,[2,6]),e(B,[2,7]),e(B,[2,8]),{8:be,9:ke,11:ge,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:be,9:ke,11:ge,21:68},{8:be,9:ke,11:ge,21:69},{8:be,9:ke,11:ge,21:70},{8:be,9:ke,11:ge,21:71},{8:be,9:ke,11:ge,21:72},{8:be,9:ke,10:[1,73],11:ge,21:74},e(B,[2,36]),{35:[1,75]},{37:[1,76]},e(B,[2,39]),e(Ie,[2,50],{18:77,39:78,10:Fe,40:At}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:Re,44:Ne,60:Ge,80:[1,87],89:Pe,95:[1,84],97:[1,85],101:86,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},e(B,[2,185]),e(B,[2,186]),e(B,[2,187]),e(B,[2,188]),e(B,[2,189]),e(ve,[2,51]),e(ve,[2,54],{46:[1,100]}),e(re,[2,72],{113:113,29:[1,101],44:_,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:Y,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:W,102:j,105:K,106:H,109:Q,111:J,114:Z,115:ee,116:te}),e(ce,[2,181]),e(ce,[2,142]),e(ce,[2,143]),e(ce,[2,144]),e(ce,[2,145]),e(ce,[2,146]),e(ce,[2,147]),e(ce,[2,148]),e(ce,[2,149]),e(ce,[2,150]),e(ce,[2,151]),e(ce,[2,152]),e(o,[2,12]),e(o,[2,18]),e(o,[2,19]),{9:[1,114]},e(Ct,[2,26],{18:115,10:Fe}),e(B,[2,27]),{42:116,43:39,44:_,45:40,47:41,60:Y,89:W,102:j,105:K,106:H,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(B,[2,40]),e(B,[2,41]),e(B,[2,42]),e(Ye,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Dt,81:Tt,116:it,119:rt},{75:[1,126],77:[1,127]},e(Et,[2,83]),e(B,[2,28]),e(B,[2,29]),e(B,[2,30]),e(B,[2,31]),e(B,[2,32]),{10:St,12:yt,14:xt,27:_t,28:128,32:Bt,44:vt,60:Vt,75:wt,80:[1,130],81:[1,131],83:141,84:It,85:Rt,86:Nt,87:Gt,88:Pt,89:Ut,90:Wt,91:129,105:zt,109:jt,111:Kt,114:Yt,115:Ht,116:qt},e(ot,k,{5:154}),e(B,[2,37]),e(B,[2,38]),e(Ie,[2,48],{44:Xt}),e(Ie,[2,49],{18:156,10:Fe,40:Qt}),e(ve,[2,44]),{44:_,47:158,60:Y,89:W,102:j,105:K,106:H,109:Q,111:J,113:42,114:Z,115:ee,116:te},{102:[1,159],103:160,105:[1,161]},{44:_,47:162,60:Y,89:W,102:j,105:K,106:H,109:Q,111:J,113:42,114:Z,115:ee,116:te},{44:_,47:163,60:Y,89:W,102:j,105:K,106:H,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(M,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(M,[2,115],{120:168,10:[1,167],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(M,[2,117],{10:[1,169]}),e(he,[2,183]),e(he,[2,170]),e(he,[2,171]),e(he,[2,172]),e(he,[2,173]),e(he,[2,174]),e(he,[2,175]),e(he,[2,176]),e(he,[2,177]),e(he,[2,178]),e(he,[2,179]),e(he,[2,180]),{44:_,47:170,60:Y,89:W,102:j,105:K,106:H,109:Q,111:J,113:42,114:Z,115:ee,116:te},{30:171,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:179,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:181,50:[1,180],67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:182,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:183,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:184,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{109:[1,185]},{30:186,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:187,65:[1,188],67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:189,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:190,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:191,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},e(ce,[2,182]),e(o,[2,20]),e(Ct,[2,25]),e(Ie,[2,46],{39:192,18:193,10:Fe,40:At}),e(Ye,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{77:[1,197],79:198,116:it,119:rt},e(He,[2,79]),e(He,[2,81]),e(He,[2,82]),e(He,[2,168]),e(He,[2,169]),{76:199,79:121,80:Dt,81:Tt,116:it,119:rt},e(Et,[2,84]),{8:be,9:ke,10:St,11:ge,12:yt,14:xt,21:201,27:_t,29:[1,200],32:Bt,44:vt,60:Vt,75:wt,83:141,84:It,85:Rt,86:Nt,87:Gt,88:Pt,89:Ut,90:Wt,91:202,105:zt,109:jt,111:Kt,114:Yt,115:Ht,116:qt},e(I,[2,101]),e(I,[2,103]),e(I,[2,104]),e(I,[2,157]),e(I,[2,158]),e(I,[2,159]),e(I,[2,160]),e(I,[2,161]),e(I,[2,162]),e(I,[2,163]),e(I,[2,164]),e(I,[2,165]),e(I,[2,166]),e(I,[2,167]),e(I,[2,90]),e(I,[2,91]),e(I,[2,92]),e(I,[2,93]),e(I,[2,94]),e(I,[2,95]),e(I,[2,96]),e(I,[2,97]),e(I,[2,98]),e(I,[2,99]),e(I,[2,100]),{6:11,7:12,8:c,9:A,10:f,11:O,20:17,22:18,23:19,24:20,25:21,26:22,27:F,32:[1,203],33:24,34:v,36:D,38:T,42:28,43:39,44:_,45:40,47:41,60:Y,84:ie,85:d,86:m,87:ue,88:le,89:W,102:j,105:K,106:H,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Je,122:Ze,123:$e,124:tt,125:st},{10:Fe,18:204},{44:[1,205]},e(ve,[2,43]),{10:[1,206],44:_,60:Y,89:W,102:j,105:K,106:H,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,207]},{10:[1,208],106:[1,209]},e(Jt,[2,128]),{10:[1,210],44:_,60:Y,89:W,102:j,105:K,106:H,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,211],44:_,60:Y,89:W,102:j,105:K,106:H,109:Q,111:J,113:113,114:Z,115:ee,116:te},{80:[1,212]},e(M,[2,109],{10:[1,213]}),e(M,[2,111],{10:[1,214]}),{80:[1,215]},e(he,[2,184]),{80:[1,216],98:[1,217]},e(ve,[2,55],{113:113,44:_,60:Y,89:W,102:j,105:K,106:H,109:Q,111:J,114:Z,115:ee,116:te}),{31:[1,218],67:E,82:219,116:S,117:y,118:x},e(_e,[2,86]),e(_e,[2,88]),e(_e,[2,89]),e(_e,[2,153]),e(_e,[2,154]),e(_e,[2,155]),e(_e,[2,156]),{49:[1,220],67:E,82:219,116:S,117:y,118:x},{30:221,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{51:[1,222],67:E,82:219,116:S,117:y,118:x},{53:[1,223],67:E,82:219,116:S,117:y,118:x},{55:[1,224],67:E,82:219,116:S,117:y,118:x},{57:[1,225],67:E,82:219,116:S,117:y,118:x},{60:[1,226]},{64:[1,227],67:E,82:219,116:S,117:y,118:x},{66:[1,228],67:E,82:219,116:S,117:y,118:x},{30:229,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{31:[1,230],67:E,82:219,116:S,117:y,118:x},{67:E,69:[1,231],71:[1,232],82:219,116:S,117:y,118:x},{67:E,69:[1,234],71:[1,233],82:219,116:S,117:y,118:x},e(Ie,[2,45],{18:156,10:Fe,40:Qt}),e(Ie,[2,47],{44:Xt}),e(Ye,[2,75]),e(Ye,[2,74]),{62:[1,235],67:E,82:219,116:S,117:y,118:x},e(Ye,[2,77]),e(He,[2,80]),{77:[1,236],79:198,116:it,119:rt},{30:237,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},e(ot,k,{5:238}),e(I,[2,102]),e(B,[2,35]),{43:239,44:_,45:40,47:41,60:Y,89:W,102:j,105:K,106:H,109:Q,111:J,113:42,114:Z,115:ee,116:te},{10:Fe,18:240},{10:Ae,60:me,84:Ce,92:241,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:252,104:[1,253],105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:254,104:[1,255],105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{105:[1,256]},{10:Ae,60:me,84:Ce,92:257,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{44:_,47:258,60:Y,89:W,102:j,105:K,106:H,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(M,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(M,[2,116]),e(M,[2,118],{10:[1,262]}),e(M,[2,119]),e(re,[2,56]),e(_e,[2,87]),e(re,[2,57]),{51:[1,263],67:E,82:219,116:S,117:y,118:x},e(re,[2,64]),e(re,[2,59]),e(re,[2,60]),e(re,[2,61]),{109:[1,264]},e(re,[2,63]),e(re,[2,65]),{66:[1,265],67:E,82:219,116:S,117:y,118:x},e(re,[2,67]),e(re,[2,68]),e(re,[2,70]),e(re,[2,69]),e(re,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(Ye,[2,78]),{31:[1,266],67:E,82:219,116:S,117:y,118:x},{6:11,7:12,8:c,9:A,10:f,11:O,20:17,22:18,23:19,24:20,25:21,26:22,27:F,32:[1,267],33:24,34:v,36:D,38:T,42:28,43:39,44:_,45:40,47:41,60:Y,84:ie,85:d,86:m,87:ue,88:le,89:W,102:j,105:K,106:H,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Je,122:Ze,123:$e,124:tt,125:st},e(ve,[2,53]),{43:268,44:_,45:40,47:41,60:Y,89:W,102:j,105:K,106:H,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(M,[2,121],{106:qe}),e(Zt,[2,130],{108:270,10:Ae,60:me,84:Ce,105:De,109:Te,110:Ee,111:Se,112:ye}),e(fe,[2,132]),e(fe,[2,134]),e(fe,[2,135]),e(fe,[2,136]),e(fe,[2,137]),e(fe,[2,138]),e(fe,[2,139]),e(fe,[2,140]),e(fe,[2,141]),e(M,[2,122],{106:qe}),{10:[1,271]},e(M,[2,123],{106:qe}),{10:[1,272]},e(Jt,[2,129]),e(M,[2,105],{106:qe}),e(M,[2,106],{113:113,44:_,60:Y,89:W,102:j,105:K,106:H,109:Q,111:J,114:Z,115:ee,116:te}),e(M,[2,110]),e(M,[2,112],{10:[1,273]}),e(M,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:be,9:ke,11:ge,21:278},e(B,[2,34]),e(ve,[2,52]),{10:Ae,60:me,84:Ce,105:De,107:279,108:243,109:Te,110:Ee,111:Se,112:ye},e(fe,[2,133]),{14:Re,44:Ne,60:Ge,89:Pe,101:280,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},{14:Re,44:Ne,60:Ge,89:Pe,101:281,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},{98:[1,282]},e(M,[2,120]),e(re,[2,58]),{30:283,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},e(re,[2,66]),e(ot,k,{5:284}),e(Zt,[2,131],{108:270,10:Ae,60:me,84:Ce,105:De,109:Te,110:Ee,111:Se,112:ye}),e(M,[2,126],{120:168,10:[1,285],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(M,[2,127],{120:168,10:[1,286],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(M,[2,114]),{31:[1,287],67:E,82:219,116:S,117:y,118:x},{6:11,7:12,8:c,9:A,10:f,11:O,20:17,22:18,23:19,24:20,25:21,26:22,27:F,32:[1,288],33:24,34:v,36:D,38:T,42:28,43:39,44:_,45:40,47:41,60:Y,84:ie,85:d,86:m,87:ue,88:le,89:W,102:j,105:K,106:H,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Je,122:Ze,123:$e,124:tt,125:st},{10:Ae,60:me,84:Ce,92:289,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:290,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},e(re,[2,62]),e(B,[2,33]),e(M,[2,124],{106:qe}),e(M,[2,125],{106:qe})],defaultActions:{},parseError:t(function(b,g){if(g.recoverable)this.trace(b);else{var C=Error(b);throw C.hash=g,C}},"parseError"),parse:t(function(b){var g=this,C=[0],u=[],N=[null],s=[],Le=this.table,i="",X=0,$t=0,e1=0,u1=2,t1=1,o1=s.slice.call(arguments,1),se=Object.create(this.lexer),Ve={yy:{}};for(var ct in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ct))Ve.yy[ct]=this.yy[ct];if(se.setInput(b,Ve.yy),Ve.yy.lexer=se,Ve.yy.parser=this,typeof se.yylloc>"u")se.yylloc={};var ht=se.yylloc;s.push(ht);var l1=se.options&&se.options.ranges;if(typeof Ve.yy.parseError==="function")this.parseError=Ve.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function c1(pe){C.length=C.length-2*pe,N.length=N.length-pe,s.length=s.length-pe}t(c1,"popStack");function s1(){var pe=u.pop()||se.lex()||t1;if(typeof pe!=="number"){if(pe instanceof Array)u=pe,pe=u.pop();pe=g.symbols_[pe]||pe}return pe}t(s1,"lex");var oe,dt,we,de,C1,pt,Qe={},nt,xe,i1,ut;while(!0){if(we=C[C.length-1],this.defaultActions[we])de=this.defaultActions[we];else{if(oe===null||typeof oe>"u")oe=s1();de=Le[we]&&Le[we][oe]}if(typeof de>"u"||!de.length||!de[0]){var bt="";ut=[];for(nt in Le[we])if(this.terminals_[nt]&&nt>u1)ut.push("'"+this.terminals_[nt]+"'");if(se.showPosition)bt="Parse error on line "+(X+1)+`:
9
+ You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e==="object"&&"id"in e&&typeof e.id==="string"}addLink(e,r,a){let n=this.isLinkData(a)?a.id.replace("@",""):void 0;l.info("addLink",e,r,n);for(let o of e)for(let k of r){let c=o===e[e.length-1],A=k===r[0];if(c&&A)this.addSingleLink(o,k,a,n);else this.addSingleLink(o,k,a,void 0)}}updateLinkInterpolate(e,r){e.forEach((a)=>{if(a==="default")this.edges.defaultInterpolate=r;else this.edges[a].interpolate=r})}updateLink(e,r){e.forEach((a)=>{if(typeof a==="number"&&a>=this.edges.length)throw Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(a==="default")this.edges.defaultStyle=r;else if(this.edges[a].style=r,(this.edges[a]?.style?.length??0)>0&&!this.edges[a]?.style?.some((n)=>n?.startsWith("fill")))this.edges[a]?.style?.push("fill:none")})}addClass(e,r){let a=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach((n)=>{let o=this.classes.get(n);if(o===void 0)o={id:n,styles:[],textStyles:[]},this.classes.set(n,o);if(a!==void 0&&a!==null)a.forEach((k)=>{if(/color/.exec(k)){let c=k.replace("fill","bgFill");o.textStyles.push(c)}o.styles.push(k)})})}setDirection(e){if(this.direction=e.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(e,r){for(let a of e.split(",")){let n=this.vertices.get(a);if(n)n.classes.push(r);let o=this.edges.find((c)=>c.id===a);if(o)o.classes.push(r);let k=this.subGraphLookup.get(a);if(k)k.classes.push(r)}}setTooltip(e,r){if(r===void 0)return;r=this.sanitizeText(r);for(let a of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,r)}setClickFun(e,r,a){if(p().securityLevel!=="loose")return;if(r===void 0)return;let n=[];if(typeof a==="string"){n=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k<n.length;k++){let c=n[k].trim();if(c.startsWith('"')&&c.endsWith('"'))c=c.substr(1,c.length-2);n[k]=c}}if(n.length===0)n.push(e);let o=this.vertices.get(e);if(o)o.haveCallback=!0,this.funs.push(()=>{let k=this.lookUpDomId(e),c=document.querySelector(`[id="${k}"]`);if(c!==null)c.addEventListener("click",()=>{V.runFunc(r,...n)},!1)})}setLink(e,r,a){e.split(",").forEach((n)=>{let o=this.vertices.get(n);if(o!==void 0)o.link=V.formatUrl(r,this.config),o.linkTarget=a}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,a){e.split(",").forEach((n)=>{this.setClickFun(n,r,a)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach((r)=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let r=Pa();h(e).select("svg").selectAll("g.node").on("mouseover",(o)=>{let k=h(o.currentTarget),c=k.attr("title");if(c===null)return;let A=o.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(k.attr("title")).style("left",window.scrollX+A.left+(A.right-A.left)/2+"px").style("top",window.scrollY+A.bottom+"px"),r.html($t.sanitize(c)),k.classed("hover",!0)}).on("mouseout",(o)=>{r.transition().duration(500).style("opacity",0),h(o.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=p(),R()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,a){let n=e.text.trim(),o=a.text;if(e===a&&/\s/.exec(a.text))n=void 0;let c=t((v)=>{let D={boolean:{},number:{},string:{}},T=[],_;return{nodeList:v.filter(function(ie){let d=typeof ie;if(ie.stmt&&ie.stmt==="dir")return _=ie.value,!1;if(ie.trim()==="")return!1;if(d in D)return D[d].hasOwnProperty(ie)?!1:D[d][ie]=!0;else return T.includes(ie)?!1:T.push(ie)}),dir:_}},"uniq")(r.flat()),{nodeList:A,dir:f}=c,N=p().flowchart??{};if(f=f??(N.inheritDir?this.getDirection()??p().direction??void 0:void 0),this.version==="gen-1")for(let v=0;v<A.length;v++)A[v]=this.lookUpDomId(A[v]);n=n??"subGraph"+this.subCount,o=o||"",o=this.sanitizeText(o),this.subCount=this.subCount+1;let F={id:n,nodes:A,title:o.trim(),classes:[],dir:f,labelType:this.sanitizeNodeLabelType(a?.type)};return l.info("Adding",F.id,F.nodes,F.dir),F.nodes=this.makeUniq(F,this.subGraphs).nodes,this.subGraphs.push(F),this.subGraphLookup.set(n,F),n}getPosForId(e){for(let[r,a]of this.subGraphs.entries())if(a.id===e)return r;return-1}indexNodes2(e,r){let a=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let n=0,o=1;while(n<a.length){let k=this.getPosForId(a[n]);if(k>=0){let c=this.indexNodes2(e,k);if(c.result)return{result:!0,count:o+c.count};else o=o+c.count}n=n+1}return{result:!1,count:o}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}destructStartLink(e){let r=e.trim(),a="arrow_open";switch(r[0]){case"<":a="arrow_point",r=r.slice(1);break;case"x":a="arrow_cross",r=r.slice(1);break;case"o":a="arrow_circle",r=r.slice(1);break}let n="normal";if(r.includes("="))n="thick";if(r.includes("."))n="dotted";return{type:a,stroke:n}}countChar(e,r){let a=r.length,n=0;for(let o=0;o<a;++o)if(r[o]===e)++n;return n}destructEndLink(e){let r=e.trim(),a=r.slice(0,-1),n="arrow_open";switch(r.slice(-1)){case"x":if(n="arrow_cross",r.startsWith("x"))n="double_"+n,a=a.slice(1);break;case">":if(n="arrow_point",r.startsWith("<"))n="double_"+n,a=a.slice(1);break;case"o":if(n="arrow_circle",r.startsWith("o"))n="double_"+n,a=a.slice(1);break}let o="normal",k=a.length-1;if(a.startsWith("="))o="thick";if(a.startsWith("~"))o="invisible";let c=this.countChar(".",a);if(c)o="dotted",k=c;return{type:n,stroke:o,length:k}}destructLink(e,r){let a=this.destructEndLink(e),n;if(r){if(n=this.destructStartLink(r),n.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=a.type;else{if(n.type!==a.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}if(n.type==="double_arrow")n.type="double_arrow_point";return n.length=a.length,n}return a}exists(e,r){for(let a of e)if(a.nodes.includes(r))return!0;return!1}makeUniq(e,r){let a=[];return e.nodes.forEach((n,o)=>{if(!this.exists(r,n))a.push(e.nodes[o])}),{nodes:a}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon){if(e.form==="circle")return"iconCircle";if(e.form==="square")return"iconSquare";if(e.form==="rounded")return"iconRounded";return"icon"}switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,r){return e.find((a)=>a.id===r)}destructEdgeType(e){let r="none",a="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":a=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),a=r;break}return{arrowTypeStart:r,arrowTypeEnd:a}}addNodeFromVertex(e,r,a,n,o,k){let c=a.get(e.id),A=n.get(e.id)??!1,f=this.findNode(r,e.id);if(f)f.cssStyles=e.styles,f.cssCompiledStyles=this.getCompiledStyles(e.classes),f.cssClasses=e.classes.join(" ");else{let N={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:c,padding:o.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:k,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};if(A)r.push({...N,isGroup:!0,shape:"rect"});else r.push({...N,isGroup:!1,shape:this.getTypeFromVertex(e),minWidth:o.flowchart?.minNodeWidth})}}getCompiledStyles(e){let r=[];for(let a of e){let n=this.classes.get(a);if(n?.styles)r=[...r,...n.styles??[]].map((o)=>o.trim());if(n?.textStyles)r=[...r,...n.textStyles??[]].map((o)=>o.trim())}return r}getData(){let e=p(),r=[],a=[],n=this.getSubGraphs(),o=new Map,k=new Map,c=new Map;for(let d of n)for(let m of d.nodes)if(this.subGraphLookup.has(m))c.set(m,d.id);let A=new Map,f=new Map;for(let d of n){let m=c.get(d.id);if(m!==void 0)f.set(m,[...f.get(m)??[],d.id])}let N=0,F=t((d)=>{A.set(d,N++);for(let m of f.get(d)??[])F(m)},"walk");for(let d of n)if(!c.has(d.id))F(d.id);let v=t((d)=>this.subGraphLookup.get(d)?.metadata?.view==="collapsed","isCollapsed"),D=t((d)=>{let m,ue=new Set,le=d;while(le!==void 0&&!ue.has(le)){if(ue.add(le),v(le))m=le;le=c.get(le)}return m},"outermostCollapsed"),T=new Set,_=new Map;for(let d of n){let m=D(d.id);if(m===void 0)continue;if(d.id!==m)T.add(d.id),_.set(d.id,m);for(let ue of d.nodes){if(ue===m)continue;T.add(ue),_.set(ue,m)}}for(let d=n.length-1;d>=0;d--){let m=n[d];if(T.has(m.id))continue;if(m.nodes.length>0)k.set(m.id,!0);for(let ue of m.nodes)o.set(ue,m.id)}for(let d=n.length-1;d>=0;d--){let m=n[d];if(T.has(m.id))continue;if(m.metadata?.view==="collapsed")r.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:o.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssClasses:m.classes.join(" "),shape:"collapsedGroup",dir:m.dir,isGroup:!1,look:e.look,colorIndex:A.get(m.id)});else r.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:o.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssClasses:m.classes.join(" "),shape:"rect",dir:m.dir,isGroup:!0,look:e.look,colorIndex:A.get(m.id),metadata:m.metadata})}this.getVertices().forEach((d)=>{if(T.has(d.id))return;this.addNodeFromVertex(d,r,o,k,e,e.look||"classic")});let ie=this.getEdges();return ie.forEach((d,m)=>{let{arrowTypeStart:ue,arrowTypeEnd:le}=this.destructEdgeType(d.type),O=[...ie.defaultStyle??[]],U=_.get(d.start)??d.start,W=_.get(d.end)??d.end;if(U===W&&(_.has(d.start)||_.has(d.end)))return;if(d.style)O.push(...d.style);let Y={id:Bn(U,W,{counter:m,prefix:"L"},d.id),isUserDefinedId:d.isUserDefinedId,start:U,end:W,type:d.type??"normal",label:d.text,labelType:d.labelType,labelpos:"c",thickness:d.stroke,minlen:d.length,classes:d?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":ue,arrowTypeEnd:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":le,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(d.classes),labelStyle:O,style:O,pattern:d.stroke,look:e.look,animate:d.animate,animation:d.animation,curve:d.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};a.push(Y)}),{nodes:r,edges:a,other:{},config:e}}defaultConfig(){return Ri.flowchart}},p1=t(function(e,r){return r.db.getClasses()},"getClasses"),f1=t(async function(e,r,a,n){l.info("REF0:"),l.info("Drawing state diagram (v2)",r);let{securityLevel:o,flowchart:k,layout:c}=p();n.db.setDiagramId(r),l.debug("Before getData: ");let A=n.db.getData();l.debug("Data: ",A);let f=Mt(r,o),N=n.db.getDirection();A.type=n.type,A.layoutAlgorithm=Lt(c),A.direction=N,A.nodeSpacing=k?.nodeSpacing||50,A.rankSpacing=k?.rankSpacing||50,A.markers=["point","circle","cross"],A.diagramId=r,l.debug("REF1:",A),await Ft(A,f);let F=A.config.flowchart?.diagramPadding??8;V.insertTitle(f,"flowchartTitleText",k?.titleTopMargin||0,n.db.getDiagramTitle()),ft(f,F,"flowchart",k?.useMaxWidth||!1)},"draw"),b1={getClasses:p1,draw:f1},gt=function(){var e=t(function(Be,b,g,C){for(g=g||{},C=Be.length;C--;g[Be[C]]=b);return g},"o"),r=[1,4],a=[1,3],n=[1,5],o=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],k=[2,2],c=[1,13],A=[1,14],f=[1,15],N=[1,16],F=[1,23],v=[1,25],D=[1,26],T=[1,27],_=[1,50],K=[1,49],ie=[1,29],d=[1,30],m=[1,31],ue=[1,32],le=[1,33],O=[1,45],U=[1,47],W=[1,43],Y=[1,48],Q=[1,44],J=[1,51],Z=[1,46],ee=[1,52],te=[1,53],Qe=[1,34],Je=[1,35],Ze=[1,36],$e=[1,37],st=[1,38],Fe=[1,58],B=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],be=[1,62],ke=[1,61],ge=[1,63],Ie=[8,9,11,75,77,78],At=[1,79],Re=[1,92],Ne=[1,97],Ge=[1,96],Pe=[1,93],Oe=[1,89],Me=[1,95],Ue=[1,91],We=[1,98],ze=[1,94],je=[1,99],Ke=[1,90],ve=[8,9,10,11,40,75,77,78],re=[8,9,10,11,40,46,75,77,78],ce=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],Ct=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Ye=[44,60,89,102,105,106,109,111,114,115,116],Dt=[1,122],Tt=[1,123],it=[1,125],rt=[1,124],Et=[44,60,62,74,89,102,105,106,109,111,114,115,116],St=[1,134],yt=[1,148],xt=[1,149],_t=[1,150],Bt=[1,151],vt=[1,136],Vt=[1,138],wt=[1,142],It=[1,143],Rt=[1,144],Nt=[1,145],Gt=[1,146],Pt=[1,147],Ot=[1,152],Ut=[1,153],Wt=[1,132],zt=[1,133],jt=[1,140],Kt=[1,135],Yt=[1,139],Ht=[1,137],ot=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],qt=[1,155],Xt=[1,157],P=[8,9,11],he=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],E=[1,177],ae=[1,173],ne=[1,174],S=[1,178],y=[1,175],x=[1,176],He=[77,116,119],L=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Qt=[10,106],_e=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Ae=[1,248],me=[1,246],Ce=[1,250],De=[1,244],Te=[1,245],Ee=[1,247],Se=[1,249],ye=[1,251],qe=[1,269],Jt=[8,9,11,106],fe=[8,9,10,11,60,84,105,106,109,110,111,112],lt={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:t(function(b,g,C,u,I,s,Le){var i=s.length-1;switch(I){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 183:this.$=s[i];break;case 11:u.setDirection("TB"),this.$="TB";break;case 12:u.setDirection(s[i-1]),this.$=s[i-1];break;case 27:this.$=s[i-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=u.addSubGraph(s[i-6],s[i-1],s[i-4]);break;case 34:this.$=u.addSubGraph(s[i-3],s[i-1],s[i-3]);break;case 35:this.$=u.addSubGraph(void 0,s[i-1],void 0);break;case 37:this.$=s[i].trim(),u.setAccTitle(this.$);break;case 38:case 39:this.$=s[i].trim(),u.setAccDescription(this.$);break;case 43:this.$=s[i-1]+s[i];break;case 44:this.$=s[i];break;case 45:u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i]),u.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 46:u.addLink(s[i-2].stmt,s[i],s[i-1]),this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 47:u.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 48:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 49:u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i]),this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 50:this.$={stmt:s[i],nodes:s[i]};break;case 51:this.$=[s[i]];break;case 52:u.addVertex(s[i-5][s[i-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4]),this.$=s[i-5].concat(s[i]);break;case 53:this.$=s[i-4].concat(s[i]);break;case 54:this.$=s[i];break;case 55:this.$=s[i-2],u.setClass(s[i-2],s[i]);break;case 56:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"square");break;case 57:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"doublecircle");break;case 58:this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"circle");break;case 59:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"ellipse");break;case 60:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"stadium");break;case 61:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"subroutine");break;case 62:this.$=s[i-7],u.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]]));break;case 63:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"cylinder");break;case 64:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"round");break;case 65:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"diamond");break;case 66:this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"hexagon");break;case 67:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"odd");break;case 68:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"trapezoid");break;case 69:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"inv_trapezoid");break;case 70:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_right");break;case 71:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_left");break;case 72:this.$=s[i],u.addVertex(s[i]);break;case 73:s[i-1].text=s[i],this.$=s[i-1];break;case 74:case 75:s[i-2].text=s[i-1],this.$=s[i-2];break;case 76:this.$=s[i];break;case 77:var X=u.destructLink(s[i],s[i-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:s[i-1]};break;case 78:var X=u.destructLink(s[i],s[i-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:s[i-1],id:s[i-3]};break;case 79:this.$={text:s[i],type:"text"};break;case 80:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 81:this.$={text:s[i],type:"string"};break;case 82:this.$={text:s[i],type:"markdown"};break;case 83:var X=u.destructLink(s[i]);this.$={type:X.type,stroke:X.stroke,length:X.length};break;case 84:var X=u.destructLink(s[i]);this.$={type:X.type,stroke:X.stroke,length:X.length,id:s[i-1]};break;case 85:this.$=s[i-1];break;case 86:this.$={text:s[i],type:"text"};break;case 87:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 88:this.$={text:s[i],type:"string"};break;case 89:case 104:this.$={text:s[i],type:"markdown"};break;case 101:this.$={text:s[i],type:"text"};break;case 102:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 103:this.$={text:s[i],type:"text"};break;case 105:this.$=s[i-4],u.addClass(s[i-2],s[i]);break;case 106:this.$=s[i-4],u.setClass(s[i-2],s[i]);break;case 107:case 115:this.$=s[i-1],u.setClickEvent(s[i-1],s[i]);break;case 108:case 116:this.$=s[i-3],u.setClickEvent(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 109:this.$=s[i-2],u.setClickEvent(s[i-2],s[i-1],s[i]);break;case 110:this.$=s[i-4],u.setClickEvent(s[i-4],s[i-3],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 111:this.$=s[i-2],u.setLink(s[i-2],s[i]);break;case 112:this.$=s[i-4],u.setLink(s[i-4],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 113:this.$=s[i-4],u.setLink(s[i-4],s[i-2],s[i]);break;case 114:this.$=s[i-6],u.setLink(s[i-6],s[i-4],s[i]),u.setTooltip(s[i-6],s[i-2]);break;case 117:this.$=s[i-1],u.setLink(s[i-1],s[i]);break;case 118:this.$=s[i-3],u.setLink(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 119:this.$=s[i-3],u.setLink(s[i-3],s[i-2],s[i]);break;case 120:this.$=s[i-5],u.setLink(s[i-5],s[i-4],s[i]),u.setTooltip(s[i-5],s[i-2]);break;case 121:this.$=s[i-4],u.addVertex(s[i-2],void 0,void 0,s[i]);break;case 122:this.$=s[i-4],u.updateLink([s[i-2]],s[i]);break;case 123:this.$=s[i-4],u.updateLink(s[i-2],s[i]);break;case 124:this.$=s[i-8],u.updateLinkInterpolate([s[i-6]],s[i-2]),u.updateLink([s[i-6]],s[i]);break;case 125:this.$=s[i-8],u.updateLinkInterpolate(s[i-6],s[i-2]),u.updateLink(s[i-6],s[i]);break;case 126:this.$=s[i-6],u.updateLinkInterpolate([s[i-4]],s[i]);break;case 127:this.$=s[i-6],u.updateLinkInterpolate(s[i-4],s[i]);break;case 128:case 130:this.$=[s[i]];break;case 129:case 131:s[i-2].push(s[i]),this.$=s[i-2];break;case 133:this.$=s[i-1]+s[i];break;case 181:this.$=s[i];break;case 182:this.$=s[i-1]+""+s[i];break;case 184:this.$=s[i-1]+""+s[i];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:r,10:a,12:n},{1:[3]},e(o,k,{5:6}),{4:7,9:r,10:a,12:n},{4:8,9:r,10:a,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:c,9:A,10:f,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:F,33:24,34:v,36:D,38:T,42:28,43:39,44:_,45:40,47:41,60:K,84:ie,85:d,86:m,87:ue,88:le,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Qe,122:Je,123:Ze,124:$e,125:st},e(o,[2,9]),e(o,[2,10]),e(o,[2,11]),{8:[1,55],9:[1,56],10:Fe,15:54,18:57},e(B,[2,3]),e(B,[2,4]),e(B,[2,5]),e(B,[2,6]),e(B,[2,7]),e(B,[2,8]),{8:be,9:ke,11:ge,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:be,9:ke,11:ge,21:68},{8:be,9:ke,11:ge,21:69},{8:be,9:ke,11:ge,21:70},{8:be,9:ke,11:ge,21:71},{8:be,9:ke,11:ge,21:72},{8:be,9:ke,10:[1,73],11:ge,21:74},e(B,[2,36]),{35:[1,75]},{37:[1,76]},e(B,[2,39]),e(Ie,[2,50],{18:77,39:78,10:Fe,40:At}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:Re,44:Ne,60:Ge,80:[1,87],89:Pe,95:[1,84],97:[1,85],101:86,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},e(B,[2,185]),e(B,[2,186]),e(B,[2,187]),e(B,[2,188]),e(B,[2,189]),e(ve,[2,51]),e(ve,[2,54],{46:[1,100]}),e(re,[2,72],{113:113,29:[1,101],44:_,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:K,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:O,102:U,105:W,106:Y,109:Q,111:J,114:Z,115:ee,116:te}),e(ce,[2,181]),e(ce,[2,142]),e(ce,[2,143]),e(ce,[2,144]),e(ce,[2,145]),e(ce,[2,146]),e(ce,[2,147]),e(ce,[2,148]),e(ce,[2,149]),e(ce,[2,150]),e(ce,[2,151]),e(ce,[2,152]),e(o,[2,12]),e(o,[2,18]),e(o,[2,19]),{9:[1,114]},e(Ct,[2,26],{18:115,10:Fe}),e(B,[2,27]),{42:116,43:39,44:_,45:40,47:41,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(B,[2,40]),e(B,[2,41]),e(B,[2,42]),e(Ye,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Dt,81:Tt,116:it,119:rt},{75:[1,126],77:[1,127]},e(Et,[2,83]),e(B,[2,28]),e(B,[2,29]),e(B,[2,30]),e(B,[2,31]),e(B,[2,32]),{10:St,12:yt,14:xt,27:_t,28:128,32:Bt,44:vt,60:Vt,75:wt,80:[1,130],81:[1,131],83:141,84:It,85:Rt,86:Nt,87:Gt,88:Pt,89:Ot,90:Ut,91:129,105:Wt,109:zt,111:jt,114:Kt,115:Yt,116:Ht},e(ot,k,{5:154}),e(B,[2,37]),e(B,[2,38]),e(Ie,[2,48],{44:qt}),e(Ie,[2,49],{18:156,10:Fe,40:Xt}),e(ve,[2,44]),{44:_,47:158,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},{102:[1,159],103:160,105:[1,161]},{44:_,47:162,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},{44:_,47:163,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(P,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(P,[2,115],{120:168,10:[1,167],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(P,[2,117],{10:[1,169]}),e(he,[2,183]),e(he,[2,170]),e(he,[2,171]),e(he,[2,172]),e(he,[2,173]),e(he,[2,174]),e(he,[2,175]),e(he,[2,176]),e(he,[2,177]),e(he,[2,178]),e(he,[2,179]),e(he,[2,180]),{44:_,47:170,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},{30:171,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:179,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:181,50:[1,180],67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:182,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:183,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:184,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{109:[1,185]},{30:186,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:187,65:[1,188],67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:189,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:190,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:191,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},e(ce,[2,182]),e(o,[2,20]),e(Ct,[2,25]),e(Ie,[2,46],{39:192,18:193,10:Fe,40:At}),e(Ye,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{77:[1,197],79:198,116:it,119:rt},e(He,[2,79]),e(He,[2,81]),e(He,[2,82]),e(He,[2,168]),e(He,[2,169]),{76:199,79:121,80:Dt,81:Tt,116:it,119:rt},e(Et,[2,84]),{8:be,9:ke,10:St,11:ge,12:yt,14:xt,21:201,27:_t,29:[1,200],32:Bt,44:vt,60:Vt,75:wt,83:141,84:It,85:Rt,86:Nt,87:Gt,88:Pt,89:Ot,90:Ut,91:202,105:Wt,109:zt,111:jt,114:Kt,115:Yt,116:Ht},e(L,[2,101]),e(L,[2,103]),e(L,[2,104]),e(L,[2,157]),e(L,[2,158]),e(L,[2,159]),e(L,[2,160]),e(L,[2,161]),e(L,[2,162]),e(L,[2,163]),e(L,[2,164]),e(L,[2,165]),e(L,[2,166]),e(L,[2,167]),e(L,[2,90]),e(L,[2,91]),e(L,[2,92]),e(L,[2,93]),e(L,[2,94]),e(L,[2,95]),e(L,[2,96]),e(L,[2,97]),e(L,[2,98]),e(L,[2,99]),e(L,[2,100]),{6:11,7:12,8:c,9:A,10:f,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:F,32:[1,203],33:24,34:v,36:D,38:T,42:28,43:39,44:_,45:40,47:41,60:K,84:ie,85:d,86:m,87:ue,88:le,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Qe,122:Je,123:Ze,124:$e,125:st},{10:Fe,18:204},{44:[1,205]},e(ve,[2,43]),{10:[1,206],44:_,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,207]},{10:[1,208],106:[1,209]},e(Qt,[2,128]),{10:[1,210],44:_,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,211],44:_,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:113,114:Z,115:ee,116:te},{80:[1,212]},e(P,[2,109],{10:[1,213]}),e(P,[2,111],{10:[1,214]}),{80:[1,215]},e(he,[2,184]),{80:[1,216],98:[1,217]},e(ve,[2,55],{113:113,44:_,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,114:Z,115:ee,116:te}),{31:[1,218],67:E,82:219,116:S,117:y,118:x},e(_e,[2,86]),e(_e,[2,88]),e(_e,[2,89]),e(_e,[2,153]),e(_e,[2,154]),e(_e,[2,155]),e(_e,[2,156]),{49:[1,220],67:E,82:219,116:S,117:y,118:x},{30:221,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{51:[1,222],67:E,82:219,116:S,117:y,118:x},{53:[1,223],67:E,82:219,116:S,117:y,118:x},{55:[1,224],67:E,82:219,116:S,117:y,118:x},{57:[1,225],67:E,82:219,116:S,117:y,118:x},{60:[1,226]},{64:[1,227],67:E,82:219,116:S,117:y,118:x},{66:[1,228],67:E,82:219,116:S,117:y,118:x},{30:229,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{31:[1,230],67:E,82:219,116:S,117:y,118:x},{67:E,69:[1,231],71:[1,232],82:219,116:S,117:y,118:x},{67:E,69:[1,234],71:[1,233],82:219,116:S,117:y,118:x},e(Ie,[2,45],{18:156,10:Fe,40:Xt}),e(Ie,[2,47],{44:qt}),e(Ye,[2,75]),e(Ye,[2,74]),{62:[1,235],67:E,82:219,116:S,117:y,118:x},e(Ye,[2,77]),e(He,[2,80]),{77:[1,236],79:198,116:it,119:rt},{30:237,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},e(ot,k,{5:238}),e(L,[2,102]),e(B,[2,35]),{43:239,44:_,45:40,47:41,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},{10:Fe,18:240},{10:Ae,60:me,84:Ce,92:241,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:252,104:[1,253],105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:254,104:[1,255],105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{105:[1,256]},{10:Ae,60:me,84:Ce,92:257,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{44:_,47:258,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(P,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(P,[2,116]),e(P,[2,118],{10:[1,262]}),e(P,[2,119]),e(re,[2,56]),e(_e,[2,87]),e(re,[2,57]),{51:[1,263],67:E,82:219,116:S,117:y,118:x},e(re,[2,64]),e(re,[2,59]),e(re,[2,60]),e(re,[2,61]),{109:[1,264]},e(re,[2,63]),e(re,[2,65]),{66:[1,265],67:E,82:219,116:S,117:y,118:x},e(re,[2,67]),e(re,[2,68]),e(re,[2,70]),e(re,[2,69]),e(re,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(Ye,[2,78]),{31:[1,266],67:E,82:219,116:S,117:y,118:x},{6:11,7:12,8:c,9:A,10:f,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:F,32:[1,267],33:24,34:v,36:D,38:T,42:28,43:39,44:_,45:40,47:41,60:K,84:ie,85:d,86:m,87:ue,88:le,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Qe,122:Je,123:Ze,124:$e,125:st},e(ve,[2,53]),{43:268,44:_,45:40,47:41,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(P,[2,121],{106:qe}),e(Jt,[2,130],{108:270,10:Ae,60:me,84:Ce,105:De,109:Te,110:Ee,111:Se,112:ye}),e(fe,[2,132]),e(fe,[2,134]),e(fe,[2,135]),e(fe,[2,136]),e(fe,[2,137]),e(fe,[2,138]),e(fe,[2,139]),e(fe,[2,140]),e(fe,[2,141]),e(P,[2,122],{106:qe}),{10:[1,271]},e(P,[2,123],{106:qe}),{10:[1,272]},e(Qt,[2,129]),e(P,[2,105],{106:qe}),e(P,[2,106],{113:113,44:_,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,114:Z,115:ee,116:te}),e(P,[2,110]),e(P,[2,112],{10:[1,273]}),e(P,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:be,9:ke,11:ge,21:278},e(B,[2,34]),e(ve,[2,52]),{10:Ae,60:me,84:Ce,105:De,107:279,108:243,109:Te,110:Ee,111:Se,112:ye},e(fe,[2,133]),{14:Re,44:Ne,60:Ge,89:Pe,101:280,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},{14:Re,44:Ne,60:Ge,89:Pe,101:281,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},{98:[1,282]},e(P,[2,120]),e(re,[2,58]),{30:283,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},e(re,[2,66]),e(ot,k,{5:284}),e(Jt,[2,131],{108:270,10:Ae,60:me,84:Ce,105:De,109:Te,110:Ee,111:Se,112:ye}),e(P,[2,126],{120:168,10:[1,285],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(P,[2,127],{120:168,10:[1,286],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(P,[2,114]),{31:[1,287],67:E,82:219,116:S,117:y,118:x},{6:11,7:12,8:c,9:A,10:f,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:F,32:[1,288],33:24,34:v,36:D,38:T,42:28,43:39,44:_,45:40,47:41,60:K,84:ie,85:d,86:m,87:ue,88:le,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Qe,122:Je,123:Ze,124:$e,125:st},{10:Ae,60:me,84:Ce,92:289,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:290,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},e(re,[2,62]),e(B,[2,33]),e(P,[2,124],{106:qe}),e(P,[2,125],{106:qe})],defaultActions:{},parseError:t(function(b,g){if(g.recoverable)this.trace(b);else{var C=Error(b);throw C.hash=g,C}},"parseError"),parse:t(function(b){var g=this,C=[0],u=[],I=[null],s=[],Le=this.table,i="",X=0,Zt=0,e1=0,u1=2,t1=1,o1=s.slice.call(arguments,1),se=Object.create(this.lexer),Ve={yy:{}};for(var ct in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ct))Ve.yy[ct]=this.yy[ct];if(se.setInput(b,Ve.yy),Ve.yy.lexer=se,Ve.yy.parser=this,typeof se.yylloc>"u")se.yylloc={};var ht=se.yylloc;s.push(ht);var l1=se.options&&se.options.ranges;if(typeof Ve.yy.parseError==="function")this.parseError=Ve.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function c1(pe){C.length=C.length-2*pe,I.length=I.length-pe,s.length=s.length-pe}t(c1,"popStack");function s1(){var pe=u.pop()||se.lex()||t1;if(typeof pe!=="number"){if(pe instanceof Array)u=pe,pe=u.pop();pe=g.symbols_[pe]||pe}return pe}t(s1,"lex");var oe,dt,we,de,C1,bt,Xe={},nt,xe,i1,ut;while(!0){if(we=C[C.length-1],this.defaultActions[we])de=this.defaultActions[we];else{if(oe===null||typeof oe>"u")oe=s1();de=Le[we]&&Le[we][oe]}if(typeof de>"u"||!de.length||!de[0]){var kt="";ut=[];for(nt in Le[we])if(this.terminals_[nt]&&nt>u1)ut.push("'"+this.terminals_[nt]+"'");if(se.showPosition)kt="Parse error on line "+(X+1)+`:
10
10
  `+se.showPosition()+`
11
- Expecting `+ut.join(", ")+", got '"+(this.terminals_[oe]||oe)+"'";else bt="Parse error on line "+(X+1)+": Unexpected "+(oe==t1?"end of input":"'"+(this.terminals_[oe]||oe)+"'");this.parseError(bt,{text:se.match,token:this.terminals_[oe]||oe,line:se.yylineno,loc:ht,expected:ut})}if(de[0]instanceof Array&&de.length>1)throw Error("Parse Error: multiple actions possible at state: "+we+", token: "+oe);switch(de[0]){case 1:if(C.push(oe),N.push(se.yytext),s.push(se.yylloc),C.push(de[1]),oe=null,!dt){if($t=se.yyleng,i=se.yytext,X=se.yylineno,ht=se.yylloc,e1>0)e1--}else oe=dt,dt=null;break;case 2:if(xe=this.productions_[de[1]][1],Qe.$=N[N.length-xe],Qe._$={first_line:s[s.length-(xe||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(xe||1)].first_column,last_column:s[s.length-1].last_column},l1)Qe._$.range=[s[s.length-(xe||1)].range[0],s[s.length-1].range[1]];if(pt=this.performAction.apply(Qe,[i,$t,X,Ve.yy,de[1],N,s].concat(o1)),typeof pt<"u")return pt;if(xe)C=C.slice(0,-1*xe*2),N=N.slice(0,-1*xe),s=s.slice(0,-1*xe);C.push(this.productions_[de[1]][0]),N.push(Qe.$),s.push(Qe._$),i1=Le[C[C.length-2]][C[C.length-1]],C.push(i1);break;case 3:return!0}}return!0},"parse")},n1=function(){var Be={EOF:1,parseError:t(function(g,C){if(this.yy.parser)this.yy.parser.parseError(g,C);else throw Error(g)},"parseError"),setInput:t(function(b,g){if(this.yy=g||this.yy||{},this._input=b,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 b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var g=b.match(/(?:\r\n?|\n).*/g);if(g)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),b},"input"),unput:t(function(b){var g=b.length,C=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var u=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),C.length-1)this.yylineno-=C.length-1;var N=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:C?(C.length===u.length?this.yylloc.first_column:0)+u[u.length-C.length].length-C[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[N[0],N[0]+this.yyleng-g];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).
11
+ Expecting `+ut.join(", ")+", got '"+(this.terminals_[oe]||oe)+"'";else kt="Parse error on line "+(X+1)+": Unexpected "+(oe==t1?"end of input":"'"+(this.terminals_[oe]||oe)+"'");this.parseError(kt,{text:se.match,token:this.terminals_[oe]||oe,line:se.yylineno,loc:ht,expected:ut})}if(de[0]instanceof Array&&de.length>1)throw Error("Parse Error: multiple actions possible at state: "+we+", token: "+oe);switch(de[0]){case 1:if(C.push(oe),I.push(se.yytext),s.push(se.yylloc),C.push(de[1]),oe=null,!dt){if(Zt=se.yyleng,i=se.yytext,X=se.yylineno,ht=se.yylloc,e1>0)e1--}else oe=dt,dt=null;break;case 2:if(xe=this.productions_[de[1]][1],Xe.$=I[I.length-xe],Xe._$={first_line:s[s.length-(xe||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(xe||1)].first_column,last_column:s[s.length-1].last_column},l1)Xe._$.range=[s[s.length-(xe||1)].range[0],s[s.length-1].range[1]];if(bt=this.performAction.apply(Xe,[i,Zt,X,Ve.yy,de[1],I,s].concat(o1)),typeof bt<"u")return bt;if(xe)C=C.slice(0,-1*xe*2),I=I.slice(0,-1*xe),s=s.slice(0,-1*xe);C.push(this.productions_[de[1]][0]),I.push(Xe.$),s.push(Xe._$),i1=Le[C[C.length-2]][C[C.length-1]],C.push(i1);break;case 3:return!0}}return!0},"parse")},n1=function(){var Be={EOF:1,parseError:t(function(g,C){if(this.yy.parser)this.yy.parser.parseError(g,C);else throw Error(g)},"parseError"),setInput:t(function(b,g){if(this.yy=g||this.yy||{},this._input=b,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 b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var g=b.match(/(?:\r\n?|\n).*/g);if(g)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),b},"input"),unput:t(function(b){var g=b.length,C=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var u=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),C.length-1)this.yylineno-=C.length-1;var I=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:C?(C.length===u.length?this.yylloc.first_column:0)+u[u.length-C.length].length-C[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[I[0],I[0]+this.yyleng-g];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).
12
12
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(b){this.unput(this.match.slice(b))},"less"),pastInput:t(function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var b=this.match;if(b.length<20)b+=this._input.substr(0,20-b.length);return(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var b=this.pastInput(),g=Array(b.length+1).join("-");return b+this.upcomingInput()+`
13
- `+g+"^"},"showPosition"),test_match:t(function(b,g){var C,u,N;if(this.options.backtrack_lexer){if(N={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)N.yylloc.range=this.yylloc.range.slice(0)}if(u=b[0].match(/(?:\r\n?|\n).*/g),u)this.yylineno+=u.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],C=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(C)return C;else if(this._backtrack){for(var s in N)this[s]=N[s];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var b,g,C,u;if(!this._more)this.yytext="",this.match="";var N=this._currentRules();for(var s=0;s<N.length;s++)if(C=this._input.match(this.rules[N[s]]),C&&(!g||C[0].length>g[0].length)){if(g=C,u=s,this.options.backtrack_lexer)if(b=this.test_match(C,N[s]),b!==!1)return b;else if(this._backtrack){g=!1;continue}else return!1;else if(!this.options.flex)break}if(g){if(b=this.test_match(g,N[u]),b!==!1)return b;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
14
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:t(function(g){this.conditionStack.push(g)},"begin"),popState:t(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:t(function(g){this.begin(g)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:t(function(g,C,u,N){var s=N;switch(u){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),C.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let Le=/\n\s*/g;return C.yytext=C.yytext.replace(Le,"<br/>"),40;break;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:if(g.lex.firstGraph())this.begin("dir");return 12;case 36:if(g.lex.firstGraph())this.begin("dir");return 12;case 37:if(g.lex.firstGraph())this.begin("dir");return 12;case 38:if(g.lex.firstGraph())this.begin("dir");return 12;case 39:return 27;case 40:return 32;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return 98;case 45:return this.popState(),13;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;case 55:return this.popState(),14;break;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:return 111;case 64:return 46;case 65:return 60;case 66:return 44;case 67:return 8;case 68:return 106;case 69:return 115;case 70:return this.popState(),77;break;case 71:return this.pushState("edgeText"),75;break;case 72:return 119;case 73:return this.popState(),77;break;case 74:return this.pushState("thickEdgeText"),75;break;case 75:return 119;case 76:return this.popState(),77;break;case 77:return this.pushState("dottedEdgeText"),75;break;case 78:return 119;case 79:return 77;case 80:return this.popState(),53;break;case 81:return"TEXT";case 82:return this.pushState("ellipseText"),52;break;case 83:return this.popState(),55;break;case 84:return this.pushState("text"),54;break;case 85:return this.popState(),57;break;case 86:return this.pushState("text"),56;break;case 87:return 58;case 88:return this.pushState("text"),67;break;case 89:return this.popState(),64;break;case 90:return this.pushState("text"),63;break;case 91:return this.popState(),49;break;case 92:return this.pushState("text"),48;break;case 93:return this.popState(),69;break;case 94:return this.popState(),71;break;case 95:return 117;case 96:return this.pushState("trapText"),68;break;case 97:return this.pushState("trapText"),70;break;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return"SEP";case 102:return 89;case 103:return 115;case 104:return 111;case 105:return 44;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;break;case 110:return this.pushState("text"),62;break;case 111:return this.popState(),51;break;case 112:return this.pushState("text"),50;break;case 113:return this.popState(),31;break;case 114:return this.pushState("text"),29;break;case 115:return this.popState(),66;break;case 116:return this.pushState("text"),65;break;case 117:return"TEXT";case 118:return"QUOTE";case 119:return 9;case 120:return 10;case 121:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:[^\S\n\r]+)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}};return Be}();lt.lexer=n1;function at(){this.yy={}}return t(at,"Parser"),at.prototype=lt,lt.Parser=at,new at}();kt.parser=kt;var r1=kt,a1=Object.assign({},r1);a1.parse=(e)=>{let r=e.replace(/}\s*\n/g,`}
15
- `);return r1.parse(r)};var k1=a1,g1=t((e)=>{let{theme:r,bkgColorArray:a,borderColorArray:n}=e;if(!Xe(r,n))return"";let o=et(e.look),k=ft(a),c="";for(let A=0;A<Hn(e.THEME_COLOR_LIMIT,n);A++){let f=n[A%n.length],O=k?`fill: ${a[A%a.length]};`:"",F=`[data-look="${o}"][data-color-id="color-${A}"]`,v=t((T)=>`${F}.node ${T}, ${F}.rough-node ${T}`,"collapsedRule"),D=t((T)=>`${F}.swimlane.cluster .swimlane-title${T}, ${F}.swimlane.cluster .swimlane-body${T}`,"laneRule");c+=`
13
+ `+g+"^"},"showPosition"),test_match:t(function(b,g){var C,u,I;if(this.options.backtrack_lexer){if(I={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)I.yylloc.range=this.yylloc.range.slice(0)}if(u=b[0].match(/(?:\r\n?|\n).*/g),u)this.yylineno+=u.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],C=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(C)return C;else if(this._backtrack){for(var s in I)this[s]=I[s];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var b,g,C,u;if(!this._more)this.yytext="",this.match="";var I=this._currentRules();for(var s=0;s<I.length;s++)if(C=this._input.match(this.rules[I[s]]),C&&(!g||C[0].length>g[0].length)){if(g=C,u=s,this.options.backtrack_lexer)if(b=this.test_match(C,I[s]),b!==!1)return b;else if(this._backtrack){g=!1;continue}else return!1;else if(!this.options.flex)break}if(g){if(b=this.test_match(g,I[u]),b!==!1)return b;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
14
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:t(function(g){this.conditionStack.push(g)},"begin"),popState:t(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:t(function(g){this.begin(g)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:t(function(g,C,u,I){var s=I;switch(u){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),C.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let Le=/\n\s*/g;return C.yytext=C.yytext.replace(Le,"<br/>"),40;break;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:if(g.lex.firstGraph())this.begin("dir");return 12;case 36:if(g.lex.firstGraph())this.begin("dir");return 12;case 37:if(g.lex.firstGraph())this.begin("dir");return 12;case 38:if(g.lex.firstGraph())this.begin("dir");return 12;case 39:return 27;case 40:return 32;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return 98;case 45:return this.popState(),13;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;case 55:return this.popState(),14;break;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:return 111;case 64:return 46;case 65:return 60;case 66:return 44;case 67:return 8;case 68:return 106;case 69:return 115;case 70:return this.popState(),77;break;case 71:return this.pushState("edgeText"),75;break;case 72:return 119;case 73:return this.popState(),77;break;case 74:return this.pushState("thickEdgeText"),75;break;case 75:return 119;case 76:return this.popState(),77;break;case 77:return this.pushState("dottedEdgeText"),75;break;case 78:return 119;case 79:return 77;case 80:return this.popState(),53;break;case 81:return"TEXT";case 82:return this.pushState("ellipseText"),52;break;case 83:return this.popState(),55;break;case 84:return this.pushState("text"),54;break;case 85:return this.popState(),57;break;case 86:return this.pushState("text"),56;break;case 87:return 58;case 88:return this.pushState("text"),67;break;case 89:return this.popState(),64;break;case 90:return this.pushState("text"),63;break;case 91:return this.popState(),49;break;case 92:return this.pushState("text"),48;break;case 93:return this.popState(),69;break;case 94:return this.popState(),71;break;case 95:return 117;case 96:return this.pushState("trapText"),68;break;case 97:return this.pushState("trapText"),70;break;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return"SEP";case 102:return 89;case 103:return 115;case 104:return 111;case 105:return 44;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;break;case 110:return this.pushState("text"),62;break;case 111:return this.popState(),51;break;case 112:return this.pushState("text"),50;break;case 113:return this.popState(),31;break;case 114:return this.pushState("text"),29;break;case 115:return this.popState(),66;break;case 116:return this.pushState("text"),65;break;case 117:return"TEXT";case 118:return"QUOTE";case 119:return 9;case 120:return 10;case 121:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:[^\S\n\r]+)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}};return Be}();lt.lexer=n1;function at(){this.yy={}}return t(at,"Parser"),at.prototype=lt,lt.Parser=at,new at}();gt.parser=gt;var r1=gt,a1=Object.assign({},r1);a1.parse=(e)=>{let r=e.replace(/}\s*\n/g,`}
15
+ `);return r1.parse(r)};var k1=a1,g1=t((e)=>{let{theme:r,bkgColorArray:a,borderColorArray:n}=e;if(!et(r,n))return"";let o=tt(e.look),k=mt(a),c="";for(let A=0;A<Vn(e.THEME_COLOR_LIMIT,n);A++){let f=n[A%n.length],N=k?`fill: ${a[A%a.length]};`:"",F=`[data-look="${o}"][data-color-id="color-${A}"]`,v=t((T)=>`${F}.node ${T}, ${F}.rough-node ${T}`,"collapsedRule"),D=t((T)=>`${F}.swimlane.cluster .swimlane-title${T}, ${F}.swimlane.cluster .swimlane-body${T}`,"laneRule");c+=`
16
16
 
17
17
  ${F}.cluster:not(.swimlane) rect {
18
18
  stroke: ${f};
19
- ${O}
19
+ ${N}
20
20
  }
21
21
 
22
22
  ${F}.cluster:not(.swimlane) path {
23
23
  stroke: ${f};
24
- ${O}
24
+ ${N}
25
25
  }
26
26
 
27
27
  /* Lane, classic and neo. */
28
28
  ${F}.swimlane.cluster rect.swimlane-title,
29
29
  ${F}.swimlane.cluster rect.swimlane-body {
30
30
  stroke: ${f};
31
- ${O}
31
+ ${N}
32
32
  }
33
33
 
34
34
  /* Lane, handDrawn: roughjs emits the hachure fill first, then the outline. */
@@ -44,7 +44,7 @@ ${k?`
44
44
  ${v(".collapsed-group")},
45
45
  ${v(".collapsed-group path")} {
46
46
  stroke: ${f};
47
- ${O}
47
+ ${N}
48
48
  }
49
49
 
50
50
  /* The ellipsis dots and the separator take clusterBorder further down, so without
@@ -56,7 +56,7 @@ ${k?`
56
56
  ${v(".collapsed-separator")} {
57
57
  stroke: ${f};
58
58
  }
59
- `}return c},"genColor"),A1=t((e,r)=>{let a=ua,n=a(e,"r"),o=a(e,"g"),k=a(e,"b");return mt(n,o,k,r)},"fade"),m1=t((e)=>`${g1(e)}
59
+ `}return c},"genColor"),A1=t((e,r)=>{let a=ua,n=a(e,"r"),o=a(e,"g"),k=a(e,"b");return pt(n,o,k,r)},"fade"),m1=t((e)=>`${g1(e)}
60
60
  .label {
61
61
  font-family: ${e.fontFamily};
62
62
  color: ${e.nodeTextColor||e.textColor};
@@ -209,6 +209,6 @@ ${k?`
209
209
  }
210
210
  text-align: center;
211
211
  }
212
- ${Dn()}
213
- `,"getStyles"),_f=m1,Sf=t(({styles:e=_f}={})=>({parser:k1,get db(){return new d1},renderer:b1,styles:e,init:t((r)=>{if(!r.flowchart)r.flowchart={};r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,da({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),Bh=Sf();
214
- export{_f,Sf,Bh};
212
+ ${Qn()}
213
+ `,"getStyles"),Pf=m1,Of=t(({styles:e=Pf}={})=>({parser:k1,get db(){return new d1},renderer:b1,styles:e,init:t((r)=>{if(!r.flowchart)r.flowchart={};r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,da({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),Yh=Of();
214
+ export{Pf,Of,Yh};
@@ -0,0 +1 @@
1
+ import{d,n,o,i,u,a,xr,Ge,oe,e,s,Ln,L,nt,B,se,ko,re,Ee,He,oi,cn,ii,Vr,D,U,b,Xn,x,uA,Be,Ks,_,fr,gr,At,ot,me,xt,Yu,st,lt,kA,xA,Xi,es,Ju,qe,ns}from"./index-xkwybnf3.js";import{Gu,ju,Xo,qu,Hu}from"./index-61j9qkck.js";import{kr}from"./index-05hx4ftf.js";var Qt={name:"pen",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],aliases:["edit-2"]},Ue=s(Qt);var Yt={name:"copy-plus",size:24,node:[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]},Ve=s(Yt);var Jt={name:"package-open",size:24,node:[["path",{d:"M12 22v-9",key:"x3hkom"}],["path",{d:"M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z",key:"2ntwy6"}],["path",{d:"M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13",key:"1pmm1c"}],["path",{d:"M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z",key:"12ttoo"}]]},Xe=s(Jt);var Zt={name:"scissors",size:24,node:[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]},Re=s(Zt);function Qe({rootPath:t,activeRepo:r,repos:l,reposScanning:c,onRefreshRepos:p,onSelectRepo:f,searchQuery:v,onSearchChange:h,onRefresh:y,refreshing:g}){return e("div",{className:"border-b border-ink/10",children:[e(At,{className:"border-b-0",left:e(kr,{rootPath:t,activeRepo:r,onSelectRepo:f,repos:l,scanning:c,onRefreshRepos:p}),right:e(ot,{label:"Refresh",onClick:y,busy:g})}),e("div",{className:"px-3 pb-3",children:e("div",{className:"relative",children:[e(U,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-ink/40"}),e("input",{type:"text",placeholder:"Search files...",value:v,onChange:(m)=>h(m.currentTarget.value),className:"w-full bg-canvas border border-ink/20 rounded pl-8 pr-3 py-1.5 text-xs focus:outline-none focus:border-ink transition-colors text-ink placeholder-ink/40"})]})})]})}function Ye({name:t,path:r,isFolder:l,isOpen:c,ignored:p,selected:f,gitStatus:v,folderStatus:h}){let y=f?"text-ink font-semibold":v?v.colorClass:h?h.colorClass:p?"text-ink/40":"";return e(d,{children:[l?c?e(B,{size:12,className:"flex-shrink-0 text-ink/40"}):e(se,{size:12,className:"flex-shrink-0 text-ink/40"}):e("span",{className:"w-3 flex-shrink-0"}),e(st,{name:t,isFolder:l,isOpen:c,size:12,className:`flex-shrink-0${p?" opacity-40":""}`}),e("span",{className:`truncate min-w-0 flex-1 ${y}`,title:p?`${r} — git-ignored`:void 0,children:t}),v&&e("span",{className:`font-mono text-[10px] font-bold px-1 rounded flex-shrink-0 ${v.colorClass}`,title:`Git: ${v.label}`,children:v.charStatus}),h&&e("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${h.dotClass}`,title:`${h.count} changed file${h.count>1?"s":""}`})]})}var en=28,tn=9,nn=8;function rn(t){let{isFolder:r,hasGitStatus:l,pasteLabel:c,busy:p,chainLabel:f,foldable:v,selectionCount:h,isArchive:y}=t,g=[],m=h>1,C=h===1?"":` ${h} items`;if(m)return g.push({kind:"item",id:"cut",label:`Cut${C}`,icon:e(Re,{size:13,className:"text-ink/60"}),disabled:p}),g.push({kind:"item",id:"copy",label:`Copy${C}`,icon:e(re,{size:13,className:"text-ink/60"}),disabled:p}),g.push({kind:"separator"}),g.push({kind:"item",id:"compress",label:`Compress${C} to…`,icon:e(nt,{size:13,className:"text-ink/60"}),disabled:p}),g.push({kind:"separator"}),g.push({kind:"item",id:"delete",label:`Delete${C}`,icon:e(L,{size:13,className:"text-error"}),tone:"text-error"}),g;if(r){if(g.push({kind:"item",id:"new_file",label:"New File",icon:e(oi,{size:13,className:"text-ink/60"})}),g.push({kind:"item",id:"new_folder",label:"New Folder",icon:e(cn,{size:13,className:"text-ink/60"})}),f)g.push({kind:"item",id:"unfold",label:"Unfold Folders",icon:e(B,{size:13,className:"text-ink/60"})});if(v)g.push({kind:"item",id:"fold",label:"Fold Folders",icon:e(se,{size:13,className:"text-ink/60"})});g.push({kind:"separator"})}else{if(g.push({kind:"item",id:"view",label:"View",icon:e(He,{size:13,className:"text-ink/60"})}),y)g.push({kind:"item",id:"extract",label:"Extract…",icon:e(Xe,{size:13,className:"text-ink/60"}),disabled:p});if(l)g.push({kind:"item",id:"diff",label:"Open in Diff Panel",icon:e(ii,{size:13,className:"text-warning"}),tone:"font-medium"});g.push({kind:"separator"})}if(g.push({kind:"item",id:"cut",label:"Cut",icon:e(Re,{size:13,className:"text-ink/60"}),disabled:p}),g.push({kind:"item",id:"copy",label:"Copy",icon:e(re,{size:13,className:"text-ink/60"}),disabled:p}),g.push({kind:"item",id:"compress",label:"Compress to…",icon:e(nt,{size:13,className:"text-ink/60"}),disabled:p}),g.push({kind:"item",id:"duplicate",label:"Duplicate",icon:e(Ve,{size:13,className:"text-ink/60"}),disabled:p}),c)g.push({kind:"item",id:"paste",label:c,icon:e(ko,{size:13,className:"text-ink/60"}),disabled:p});return g.push({kind:"separator"}),g.push({kind:"item",id:"explorer",label:"Go to Explorer",icon:e(Ee,{size:13,className:"text-ink/60"})}),g.push({kind:"item",id:"copy_path",label:"Copy Path",icon:e(re,{size:13,className:"text-ink/60"})}),g.push({kind:"item",id:"copy_relative",label:"Copy Relative Path",icon:e(re,{size:13,className:"text-ink/60"})}),g.push({kind:"separator"}),g.push({kind:"item",id:"history",label:"Show Git History",icon:e(Ln,{size:13,className:"text-ink/60"})}),g.push({kind:"separator"}),g.push({kind:"item",id:"rename",label:"Rename",icon:e(Ue,{size:13,className:"text-ink/60"})}),g.push({kind:"item",id:"delete",label:"Delete",icon:e(L,{size:13,className:"text-error"}),tone:"text-error"}),g}function on(t){let r=t.filter((c)=>c.kind==="item").length,l=t.length-r;return r*en+l*tn+nn}function Je({x:t,y:r,isFolder:l,hasGitStatus:c,pasteLabel:p,chainLabel:f,foldable:v,busy:h,selectionCount:y,isArchive:g,onAction:m,menuRef:C}){let N=rn({isFolder:l,hasGitStatus:c,pasteLabel:p,busy:h,chainLabel:f,foldable:v,selectionCount:y,isArchive:g}),T=on(N),F=typeof window<"u"?Math.max(10,Math.min(t,window.innerWidth-210-12)):t,A=typeof window<"u"?Math.max(10,Math.min(r,window.innerHeight-T-12)):r;return oe(e("div",{className:"fixed inset-0 z-50 bg-ink/20",onClick:()=>m("close"),onContextMenu:(R)=>{R.preventDefault(),m("close")},children:e("div",{ref:C,className:"glass-popover fixed z-50 bg-paper border border-ink/15 shadow-2xl rounded-lg py-1 min-w-[185px] text-xs text-ink font-sans",style:{top:A,left:F},onClick:(R)=>R.stopPropagation(),children:N.map((R,w)=>R.kind==="separator"?e("div",{className:"my-1 border-t border-ink/10"},`sep-${w}`):e("button",{type:"button",disabled:R.disabled,onClick:()=>m(R.id),className:`w-full text-left px-3 py-1.5 flex items-center space-x-2 transition-colors ${R.disabled?"opacity-40 cursor-default":"hover:bg-ink/5"} ${R.tone??""}`,children:[R.icon,e("span",{children:R.label})]},R.id))})}),document.body)}function Ce({folderPath:t,kind:r,value:l,error:c,isLoading:p,onChange:f,onCancel:v,onSubmit:h}){let y=r==="folder"?"Folder":"File";return oe(e("div",{className:"fixed inset-0 modal-scrim z-[100] flex items-center justify-center p-4 backdrop-blur-sm",children:e("form",{onSubmit:h,className:"glass-overlay bg-paper rounded shadow-xl p-4 w-full max-w-sm border border-ink/10 font-sans",children:[e("h3",{className:"font-semibold text-ink mb-3 text-sm",children:["New ",y]}),e("div",{className:"flex items-center gap-1 mb-1 text-xs font-mono text-ink/50 min-w-0",children:e("span",{className:"truncate",title:t,children:[t||".","/"]})}),e("input",{autoFocus:!0,type:"text",value:l,onChange:(g)=>f(g.currentTarget.value),placeholder:r==="folder"?"folder name or nested/path":"file name or nested/path","aria-label":`New ${y.toLowerCase()} name`,className:`w-full bg-paper border rounded px-2 py-1.5 text-xs font-mono focus:outline-none mb-1 ${c?"border-error":"border-ink/20 focus:border-ink"}`}),e("p",{className:"text-[10px] text-ink/40 mb-2",children:["Nested paths create the folders they need — ",e("span",{className:"font-mono",children:"lib/parse.ts"}),"."]}),c&&e("p",{className:"text-[11px] text-error mb-2",children:c}),e("div",{className:"flex justify-end space-x-2 mt-2",children:[e("button",{type:"button",onClick:v,className:"px-3 py-1.5 text-xs text-ink hover:bg-ink/5 rounded transition-colors",disabled:p,children:"Cancel"}),e("button",{type:"submit",className:"px-3 py-1.5 text-xs bg-ink text-canvas rounded hover:bg-ink/90 transition-colors flex items-center",disabled:p||!l.trim(),children:p?"Creating...":"Create"})]})]})}),document.body)}function Ze({fileName:t,displayName:r,isFolder:l,count:c=1,isLoading:p,onCancel:f,onConfirm:v}){let h=c>1;return oe(e("div",{className:"fixed inset-0 modal-scrim z-[100] flex items-center justify-center p-4 backdrop-blur-sm",children:e("div",{className:"glass-overlay bg-paper rounded shadow-xl p-4 w-full max-w-sm border border-ink/10 font-sans",children:[e("h3",{className:"font-semibold text-ink mb-2 text-sm",children:["Delete ",h?`${c} Items`:l?"Folder":"File"]}),e("p",{className:"text-xs text-ink/70 mb-4",children:["Are you sure you want to delete ",h?e(d,{children:["the ",c," selected entries"]}):e("span",{className:"font-mono bg-canvas px-1 rounded",children:t}),"? This action cannot be undone."]}),r&&r!==t&&e("p",{className:"text-[11px] text-ink/50 mb-4",children:["The row is ",e("span",{className:"font-mono",children:r}),"; this deletes"," ",e("span",{className:"font-mono",children:t})," only."]}),e("div",{className:"flex justify-end space-x-2",children:[e("button",{onClick:f,className:"px-3 py-1.5 text-xs text-ink hover:bg-ink/5 rounded transition-colors",disabled:p,children:"Cancel"}),e("button",{onClick:v,className:"px-3 py-1.5 text-xs bg-error text-white rounded hover:bg-error/90 transition-colors flex items-center",disabled:p,children:p?"Deleting...":"Delete"})]})]})}),document.body)}function et({isFolder:t,renameValue:r,originalPath:l,displayName:c,error:p,isLoading:f,onChange:v,onCancel:h,onSubmit:y}){return oe(e("div",{className:"fixed inset-0 modal-scrim z-[100] flex items-center justify-center p-4 backdrop-blur-sm",children:e("form",{onSubmit:y,className:"glass-overlay bg-paper rounded shadow-xl p-4 w-full max-w-sm border border-ink/10 font-sans",children:[e("h3",{className:"font-semibold text-ink mb-3 text-sm",children:["Rename ",t?"Folder":"File"]}),e("input",{autoFocus:!0,type:"text",value:r,onChange:(g)=>v(g.currentTarget.value),"aria-label":`Rename ${t?"folder":"file"} path`,className:`w-full bg-paper border rounded px-2 py-1.5 text-xs font-mono focus:outline-none mb-1 ${p?"border-error":"border-ink/20 focus:border-ink"}`}),e("p",{className:"text-[10px] text-ink/40 mb-2",children:["Paths are relative to the tree — ",e("span",{className:"font-mono",children:"lib/deep/name.ts"})," moves it too."]}),c&&e("p",{className:"text-[11px] text-ink/50 mb-2",children:["The row is ",e("span",{className:"font-mono",children:c}),"; this renames"," ",e("span",{className:"font-mono",children:l}),". Use"," ",e("span",{className:"font-mono",children:"Unfold Folders"})," to rename a folder inside the chain."]}),p&&e("p",{className:"text-[11px] text-error mb-2",children:p}),e("div",{className:"flex justify-end space-x-2",children:[e("button",{type:"button",onClick:h,className:"px-3 py-1.5 text-xs text-ink hover:bg-ink/5 rounded transition-colors",disabled:f,children:"Cancel"}),e("button",{type:"submit",className:"px-3 py-1.5 text-xs bg-ink text-canvas rounded hover:bg-ink/90 transition-colors flex items-center",disabled:f||!r.trim()||r===l,children:f?"Renaming...":"Rename"})]})]})}),document.body)}function tt({filePath:t,fetcherState:r,fetcherData:l,onClose:c}){let p=l?.type==="history"?l.data:void 0;return oe(e("div",{className:"fixed inset-0 modal-scrim z-[100] flex items-center justify-center p-4 backdrop-blur-sm",children:e("div",{className:"glass-overlay bg-paper rounded-lg shadow-xl w-full max-w-4xl border border-ink/10 flex flex-col max-h-[85vh]",children:[e("div",{className:"flex items-center justify-between p-4 border-b border-ink/10",children:[e("h3",{className:"text-sm font-semibold text-ink flex items-center space-x-2",children:[e(Ln,{size:16,className:"text-ink/60"}),e("span",{children:["Git History: ",e("span",{className:"font-mono font-normal opacity-80",children:t})]})]}),e("button",{onClick:c,className:"p-1 hover:bg-ink/5 rounded text-ink/60 transition-colors",children:e(b,{size:14})})]}),e("div",{className:"flex-1 scrollbar-overlay-container p-2",children:r==="idle"?p?p.length>0?e("table",{className:"w-full text-left border-collapse text-[11px]",children:[e("thead",{className:"bg-canvas sticky top-0 z-10 border-b border-ink/10",children:e("tr",{children:[e("th",{className:"px-3 py-2 font-semibold text-ink/70 rounded-tl",children:"Description"}),e("th",{className:"px-3 py-2 font-semibold text-ink/70 w-32",children:"Date"}),e("th",{className:"px-3 py-2 font-semibold text-ink/70 w-32",children:"Author"}),e("th",{className:"px-3 py-2 font-semibold text-ink/70 w-24 text-right rounded-tr",children:"Commit"})]})}),e("tbody",{className:"divide-y divide-ink/5",children:p.map((f,v)=>e("tr",{className:"hover:bg-ink/[0.03] transition-colors group",children:[e("td",{className:"px-3 py-2 text-ink",children:f.message?e("span",{className:"font-medium text-ink/90 group-hover:text-ink",children:f.message}):null}),e("td",{className:"px-3 py-2 text-ink/60 whitespace-nowrap font-mono text-[10.5px]",children:f.time}),e("td",{className:"px-3 py-2 text-ink/70 whitespace-nowrap truncate max-w-[120px]",children:f.author}),e("td",{className:"px-3 py-2 text-right",children:f.hash?e("span",{className:"font-mono text-ink/50 group-hover:text-ink font-semibold transition-colors bg-canvas px-1.5 py-0.5 rounded border border-ink/10",children:f.hash}):null})]},v))})]}):e("div",{className:"p-8 text-center text-ink/40 font-mono text-xs",children:"No commit history found for this file."}):l?.error?e("div",{className:"p-8 text-center text-error font-mono text-xs",children:l.error}):e("div",{className:"p-8 text-center text-ink/40 font-mono text-xs",children:"Loading history..."}):e("div",{className:"p-8 text-center text-ink/40 font-mono text-xs flex items-center justify-center space-x-2",children:[e(D,{size:14,className:"animate-spin"}),e("span",{children:"Loading history..."})]})})]})}),document.body)}function rt({actions:t,file:r,isFolder:l,chainLabel:c}){let p=t.selectionCount;return e(d,{children:[t.showCreateModal&&e(Ce,{folderPath:r.path,kind:t.createKind,value:t.createName,error:t.createError,isLoading:t.busy,onChange:t.setCreateName,onCancel:t.closeCreate,onSubmit:t.submitCreate}),t.showDeleteModal&&e(Ze,{fileName:r.path,displayName:p>1?void 0:c,isFolder:l,count:p,isLoading:t.busy,onCancel:t.closeDelete,onConfirm:t.submitDelete}),t.showRenameModal&&e(et,{isFolder:l,renameValue:t.renameValue,originalPath:r.path,displayName:l?c:void 0,error:t.renameError,isLoading:t.busy,onChange:t.setRenameValue,onCancel:t.closeRename,onSubmit:t.submitRename}),t.showHistoryModal&&e(tt,{filePath:r.path,fetcherState:t.fetcherState,fetcherData:t.fetcherData,onClose:t.closeHistory})]})}function Se(t){let r=t.map(sn);return r.some((l,c)=>l!==t[c])?r:t}function sn(t){if(t.type!=="folder"||!Array.isArray(t.children))return t;let r=Se(t.children),l=r===t.children?t:{...t,children:r};while(Array.isArray(l.children)&&l.children.length===1){let c=l.children[0];if(c.type!=="folder")break;l={...l,name:`${l.name}/${c.name}`,path:c.path,children:c.children,ignored:c.ignored??l.ignored}}return l}function Te(t){return t.type==="folder"&&t.name.includes("/")}function Ae(t,r){let l=r.split("/"),c=t.split("/");if(l.length<2||l.length>c.length||l.some((f)=>!f))return null;let p=c.slice(0,c.length-l.length);return l.map((f,v)=>[...p,...l.slice(0,v+1)].join("/"))}function it(t,r){let l=new Map;if(r.size===0)return{nodes:t,roots:l};let c=!1,p=(v)=>v.flatMap((h)=>{if(h.type!=="folder")return[h];let y=Array.isArray(h.children)?p(h.children):h.children,g=y===h.children?h:{...h,children:y},m=r.has(h.path)?Ae(h.path,h.name):null;if(!m)return[g];c=!0,l.set(m[0],h.path);let C={...g,name:m[m.length-1].split("/").pop()};for(let k=m.length-1;k>0;k-=1){let N=m[k-1];C={name:N.split("/").pop(),path:N,type:"folder",ignored:g.ignored,children:[C]}}return[C]}),f=p(t);return{nodes:c?f:t,roots:l}}function at(t,r){let l=new Set,c=(v)=>{for(let h of v){if(h.type!=="folder")continue;if(l.add(h.path),Array.isArray(h.children))c(h.children)}};c(t);let p=r.split("/").slice(0,-1),f=[];for(let v=0;v<p.length;v+=1){let h=p.slice(0,v+1).join("/");if(l.has(h))f.push(h)}return f}function Fe({folderPath:t,rootPath:r,repo:l,onCreated:c,onOpenCreated:p}){let f=lt(),[v,h]=n(!1),[y,g]=n("file"),[m,C]=n(""),[k,N]=n(null),T=i(null);return o(()=>{if(f.state!=="idle"||!f.data)return;let F=f.data;if(T.current===F)return;if(T.current=F,F.success&&F.path){let A=F.kind==="folder"?"folder":"file";h(!1),C(""),N(null);let R=F.path.split("/").pop()||F.path;if(c({path:F.path,name:R,kind:A}),A==="file")p?.({path:F.path,name:R})}else N(F.error||`Could not create the ${y}`)},[f.state,f.data]),{open:v,kind:y,name:m,setName:C,error:k,busy:f.state!=="idle",openDialog:(F="file")=>{g(F),C(""),N(null),h(!0)},closeDialog:()=>h(!1),submit:(F)=>{F.preventDefault();let A=m.trim();if(!A)return;N(null);let R=new FormData;if(R.append("actionType","create"),R.append("path",t),R.append("name",A),y==="folder")R.append("kind","folder");if(l&&l!==".")R.append("repo",l);if(r)R.append("root",r);f.submit(R,{method:"post",action:"/api/fs/action"})}}}function Ne(t){if(!t)return null;if(t.entries.length===1)return t.entries[0].name;return`${t.entries.length} items`}function ct(t,r){return`${t??""}\x00${r}`}function Me(t,r){if(r==="folder")return t;let l=t.lastIndexOf("/");return l===-1?".":t.slice(0,l)}function dt(t){let r=t.lastIndexOf("/");return r===-1?".":t.slice(0,r)}function pt(t,r){if(t.path===""||t.path===".")return"The workspace root cannot be moved or copied";if(t.kind==="folder"&&(r===t.path||r.startsWith(`${t.path}/`)))return"Cannot paste a folder into itself";return null}function ut(t,r){let l=pt(t,r);if(l)return l;if(r===dt(t.path))return"Already in this folder";return null}function ft(t,r,l){if(!t||t.entries.length===0)return"Nothing to paste";if(t.scope!==r)return"The clipboard holds an entry from another workspace";if(t.mode==="cut"&&t.entries.some((c)=>l===dt(c.path)))return"Already in this folder";for(let c of t.entries){let p=pt(c,l);if(p)return p}return null}function mt(t){if(typeof t!=="object"||t===null)return null;let r=t;if(typeof r.scope!=="string")return null;if(r.mode!=="copy"&&r.mode!=="cut")return null;let l=Array.isArray(r.entries)?r.entries:typeof r.path==="string"?[{path:r.path,name:r.name,kind:r.kind}]:[],c=[];for(let p of l){let f=an(p);if(!f)return null;c.push(f)}if(c.length===0)return null;return{scope:r.scope,entries:c,mode:r.mode}}function an(t){if(typeof t!=="object"||t===null)return null;let r=t;if(typeof r.path!=="string"||typeof r.name!=="string")return null;if(r.kind!=="file"&&r.kind!=="folder")return null;let l=r.path.split("/");if(r.path===""||r.path.startsWith("/")||l.some((c)=>c===""||c==="."||c===".."))return null;return{path:r.path,name:r.name,kind:r.kind}}var Le=[{id:"zip",label:"ZIP",extension:"zip"},{id:"7z",label:"7Z",extension:"7z"},{id:"rar",label:"RAR",extension:"rar"},{id:"tar",label:"TAR",extension:"tar"},{id:"tar.gz",label:"TAR.GZ",extension:"tar.gz"}],ht=[[".tar.gz","tar.gz"],[".tar.bz2","tar.bz2"],[".tar.xz","tar.xz"],[".tgz","tar.gz"],[".tbz2","tar.bz2"],[".txz","tar.xz"],[".tar","tar"],[".zip","zip"],[".7z","7z"],[".rar","rar"],[".gz","gz"],[".bz2","bz2"],[".xz","xz"]];function $e(t){let r=t.toLowerCase();for(let[l,c]of ht)if(r.endsWith(l))return c;return null}function gt(t){return $e(t)!==null}function ln(t){return Le.find((r)=>r.id===t)}function dn(t){return ln(t)?.extension??"zip"}function bt(t){let r=t.toLowerCase();for(let[l]of ht)if(r.endsWith(l))return t.slice(0,-l.length);return t}function vt(t){let r=t.lastIndexOf("/");return r===-1?".":t.slice(0,r)||"."}function yt(t){let r=t.lastIndexOf("/");return r===-1?t:t.slice(r+1)}function kt(t){if(t.length===0)return".";let r=t.map((c)=>vt(c).split("/").filter((p)=>p!==".")),l=r[0]??[];for(let c of r.slice(1)){let p=0;while(p<l.length&&p<c.length&&l[p]===c[p])p+=1;l=l.slice(0,p)}return l.length===0?".":l.join("/")}function we(t,r){let l=dn(r);if(t.length===1){let f=t[0],v=bt(f.name),h=v.lastIndexOf(".");return`${(f.kind==="folder"?f.name:h>0?v.slice(0,h):v)||"archive"}.${l}`}let c=kt(t.map((f)=>f.path)),p=yt(c);return`${p==="."||p===""?"archive":p}.${l}`}function Ct(t){return kt(t.map((r)=>r.path))}function Ft(t){let r=vt(t),l=bt(yt(t));if(!l)return r;return r==="."?l:`${r}/${l}`}function Nt(t){return t.toUpperCase()}function wt({file:t,diff:r,onOpenFile:l,onActionComplete:c,onCreated:p,onRenamed:f,onUnfold:v,onFold:h,clipboard:y,isFolder:g,selection:m,selected:C,archive:k}){let N=lt(),[T,F]=n(null),A=i(null),[R,w]=n(!1),[S,P]=n(!1),[j,ee]=n(!1),[te,ae]=n(t.path),[I,O]=n(null),{repo:M,rootPath:H}=t,G=Fe({folderPath:t.path,rootPath:H,repo:M,onCreated:(E)=>p?p(E):c(),onOpenCreated:(E)=>l?.({...E,root:H,repo:M||"."})}),ne=i(null);o(()=>{if(N.state!=="idle"||!N.data)return;let E=N.data;if(ne.current===E)return;if(ne.current=E,E.success&&!E.type)if(w(!1),P(!1),O(null),E.previousPath&&E.path&&f)f(E.previousPath,E.path);else c();else if(!E.success&&E.error&&R)O(E.error)},[N.state,N.data]);let q=(E)=>{if(M&&M!==".")E.append("repo",M);if(H)E.append("root",H);N.submit(E,{method:"post",action:"/api/fs/action"})},X=()=>{l?.({path:t.path,name:t.name,root:H,repo:M||"."})},J={path:t.path,name:t.name,kind:g?"folder":"file"},ie=C&&m.length>1?m:[J],he=gt(t.name),Q=y.clip&&!y.refusalFor(J)?`Paste ${Ne(y.clip)??"item"}`:null,ue=(E)=>{if(F(null),O(null),E==="view")X();else if(E==="diff")window.dispatchEvent(new CustomEvent("omp:open-diff",{detail:{file:t.path,staged:r?.staged,status:r?.status||"M",repo:M||".",root:H}}));else if(E==="explorer"){let K=new FormData;K.append("actionType","open_explorer"),K.append("path",t.path),q(K)}else if(E==="copy_path")xt(Yu(t.basePath,t.path));else if(E==="copy_relative")xt(t.path);else if(E==="history"){ee(!0);let K=new FormData;K.append("actionType","git_history"),K.append("path",t.path),q(K)}else if(E==="rename")ae(t.path),w(!0);else if(E==="unfold")v?.();else if(E==="fold")h?.();else if(E==="new_file")G.openDialog("file");else if(E==="new_folder")G.openDialog("folder");else if(E==="delete")P(!0);else if(E==="cut")y.cut(ie);else if(E==="copy")y.copy(ie);else if(E==="compress")k.openCompress(ie);else if(E==="extract")k.openExtract(J);else if(E==="duplicate")y.duplicate(J);else if(E==="paste")y.paste(J)},le=(E)=>{E.preventDefault(),O(null);let K=new FormData;K.append("actionType","rename"),K.append("path",t.path),K.append("newPath",te),q(K)},xe=()=>{let E=new FormData;if(E.append("actionType","delete"),ie.length>1)E.append("paths",JSON.stringify(ie.map((K)=>K.path)));else E.append("path",t.path);q(E)};return{contextMenu:T,contextMenuRef:A,openContextMenu:(E,K)=>F({x:E,y:K}),closeContextMenu:()=>F(null),showRenameModal:R,showDeleteModal:S,showHistoryModal:j,showCreateModal:G.open,createKind:G.kind,createError:G.error,createName:G.name,setCreateName:G.setName,renameValue:te,setRenameValue:ae,renameError:I,busy:N.state!=="idle"||G.busy||y.busy||k.busy,pasteLabel:Q,selectionCount:ie.length,isArchive:he,chainLabel:v!==void 0,foldable:h!==void 0,fetcherState:N.state,fetcherData:N.data,handleAction:ue,submitCreate:G.submit,submitRename:le,submitDelete:xe,closeCreate:G.closeDialog,closeDelete:()=>P(!1),closeRename:()=>w(!1),closeHistory:()=>ee(!1)}}function Dt({target:t,dragging:r,clipboard:l,onDragStart:c,onDragEnd:p,onDropOn:f,onHoverAccept:v}){let h=r?.path===t.path,y=Boolean(r)&&!h&&l.moveRefusalFor(r,t)===null,[g,m]=n(!1);return o(()=>{if(!r)m(!1)},[r]),{isDragging:h,acceptsDrop:y,isDropHovered:g&&y,onDragStart:(k)=>{if(k.dataTransfer?.setData("text/plain",t.path),k.dataTransfer)k.dataTransfer.effectAllowed="move";c(t)},onDragEnd:p,onDragOver:(k)=>{if(!r)return;if(k.stopPropagation(),m(y),!y)return;if(k.preventDefault(),k.dataTransfer)k.dataTransfer.dropEffect="move";v?.(t)},onDragLeave:()=>m(!1),onDrop:(k)=>{if(!r)return;if(k.stopPropagation(),!y)return;k.preventDefault(),f(t)}}}function pn(t,r,l){if(r||l)return!1;return!Array.isArray(t.children)}function ze({file:t,rootPath:r,basePath:l,repo:c,onLoadChildren:p,onOpenFile:f,onActionComplete:v,onCreated:h,onRenamed:y,expandedPaths:g,onToggleFolder:m,gitFileMap:C,gitFolderMap:k,clipboard:N,archive:T,selection:F,selectionTargets:A,dragging:R,onDragStart:w,onDragEnd:S,onDropOn:P,onUnfold:j,onFold:ee,foldRoots:te,touch:ae=!1}){let I=t.type==="folder",[O,M]=n(!1),[H,G]=n(!1),[ne,q]=n(!1),[X,J]=n(!1),ie=Array.isArray(t.children)?t.children:[],he=(t.path||"").replace(/^\/+/,""),Q=!I?C?.get(he)||C?.get(t.path):void 0,ue=Q?Xn(Q.status,Q.staged):null,le=I?k?.get(he)||k?.get(t.path):null,xe=Boolean(ue),E=t.ignored===!0,K=g?g.has(t.path):O,ce=t.forceExpanded!==void 0?t.forceExpanded:K;o(()=>{J(!0)},[]),o(()=>{if(I&&g)M(g.has(t.path))},[g,t.path,I]),o(()=>{if(I&&ce&&pn(t,H,ne)&&p)q(!0),G(!0),Promise.resolve(p(t.path)).finally(()=>G(!1))},[I,ce,t.children,t.path,p,H,ne]);let ye={path:t.path,name:t.name,kind:I?"folder":"file"},be=F.selected.has(t.path),W=wt({file:{path:t.path,name:t.name,basePath:l,rootPath:r,repo:c},selection:A,selected:be,archive:T,diff:{staged:Q?.staged||(Q?.status?Q.status[0]!==" "&&Q.status[0]!=="?":!1),status:ue?.charStatus},onOpenFile:f,onActionComplete:v,onCreated:h,onRenamed:y,onUnfold:j&&Te({type:I?"folder":"file",name:t.name})?()=>j(ye):void 0,onFold:ee&&te?.has(t.path)?()=>ee(te.get(t.path)):void 0,clipboard:N,isFolder:I});me(W.contextMenuRef,W.closeContextMenu);let Y=Gu({enabled:ae,onLongPress:(V,ge)=>W.openContextMenu(V,ge)}),ke=(V)=>{if(V.stopPropagation(),Y.consume())return;let ge=F.gestureOf(V);if(ge!=="plain"){F.applyGesture(ge,t.path);return}if(F.applyGesture("plain",t.path),I){let pe=!ce;if(M(pe),t.forceExpanded!==void 0)t.forceExpanded=void 0;if(m?.(t.path,pe),!pe)q(!1)}else if(f)f({...t,root:r,repo:c||"."})},ve=(V)=>{V.preventDefault(),V.stopPropagation(),F.ensureForContext(t.path),W.openContextMenu(V.clientX,V.clientY)},de=Dt({target:ye,dragging:R,clipboard:N,onDragStart:w,onDragEnd:S,onDropOn:P,onHoverAccept:j});return e("div",{children:[e("div",{className:`flex items-center space-x-1.5 py-1 px-2 cursor-pointer rounded group select-none ${de.isDragging?"opacity-40":""} ${de.isDropHovered?"bg-info/10 ring-1 ring-info/40 ring-inset":be?"bg-ink/[0.08] ring-1 ring-ink/20 ring-inset":"hover:bg-ink/5"}`,draggable:!ae,onClick:ke,onContextMenu:ve,onDragStart:de.onDragStart,onDragEnd:de.onDragEnd,onDragOver:de.onDragOver,onDragLeave:de.onDragLeave,onDrop:de.onDrop,onTouchStart:Y.onTouchStart,onTouchMove:Y.onTouchMove,onTouchEnd:Y.onTouchEnd,onTouchCancel:Y.onTouchCancel,children:e(Ye,{name:t.name,path:t.path,isFolder:I,isOpen:ce,ignored:E,selected:be,gitStatus:ue,folderStatus:le})}),ce&&H&&e("div",{className:"ml-3 border-l border-ink/10 pl-3 py-0.5 text-[10px] text-ink/30",children:"Loading…"}),ce&&!H&&ie.length>0&&e("div",{className:"ml-3 border-l border-ink/10 pl-1",children:ie.map((V)=>e(ze,{file:V,rootPath:r,basePath:l,repo:c,onLoadChildren:p,onOpenFile:f,onActionComplete:v,onCreated:h,onRenamed:y,expandedPaths:g,onToggleFolder:m,gitFileMap:C,gitFolderMap:k,clipboard:N,archive:T,selection:F,selectionTargets:A,dragging:R,onDragStart:w,onDragEnd:S,onDropOn:P,onUnfold:j,onFold:ee,foldRoots:te,touch:ae},V.path))}),X&&W.contextMenu&&e(Je,{x:W.contextMenu.x,y:W.contextMenu.y,isFolder:I,hasGitStatus:xe,pasteLabel:W.pasteLabel,chainLabel:W.chainLabel,foldable:W.foldable,busy:W.busy,selectionCount:W.selectionCount,isArchive:W.isArchive,onAction:W.handleAction}),X&&e(rt,{actions:W,file:t,isFolder:I,chainLabel:Te({type:I?"folder":"file",name:t.name})?t.name:void 0})]})}function Rt({x:t,y:r,pasteLabel:l,busy:c,onAction:p,menuRef:f}){let h=l?104:76,y=typeof window<"u"?Math.max(10,Math.min(t,window.innerWidth-190-12)):t,g=typeof window<"u"?Math.max(10,Math.min(r,window.innerHeight-h-12)):r;return oe(e("div",{className:"fixed inset-0 z-50 bg-ink/20",onClick:()=>p("close"),onContextMenu:(m)=>{m.preventDefault(),p("close")},children:e("div",{ref:f,className:"glass-popover fixed z-50 bg-paper border border-ink/15 shadow-2xl rounded-lg py-1 min-w-[185px] text-xs text-ink font-sans",style:{top:g,left:y},onClick:(m)=>m.stopPropagation(),children:[e("button",{type:"button",onClick:()=>p("new_file"),className:"w-full text-left px-3 py-1.5 hover:bg-ink/5 flex items-center space-x-2 transition-colors",children:[e(oi,{size:13,className:"text-ink/60"}),e("span",{children:"New File"})]}),e("button",{type:"button",onClick:()=>p("new_folder"),className:"w-full text-left px-3 py-1.5 hover:bg-ink/5 flex items-center space-x-2 transition-colors",children:[e(cn,{size:13,className:"text-ink/60"}),e("span",{children:"New Folder"})]}),l&&e("button",{type:"button",disabled:c,onClick:()=>p("paste"),className:`w-full text-left px-3 py-1.5 flex items-center space-x-2 transition-colors ${c?"opacity-40 cursor-default":"hover:bg-ink/5"}`,children:[e(ko,{size:13,className:"text-ink/60"}),e("span",{children:l})]})]})}),document.body)}function St({menu:t,menuRef:r,pasteLabel:l,busy:c,onAction:p,create:f}){return e(d,{children:[t&&e(Rt,{x:t.x,y:t.y,menuRef:r,pasteLabel:l,busy:c,onAction:p}),f.open&&e(Ce,{folderPath:".",kind:f.kind,value:f.name,error:f.error,isLoading:f.busy,onChange:f.setName,onCancel:f.closeDialog,onSubmit:f.submit})]})}function Tt({title:t,subject:r,error:l,busy:c,submitLabel:p,busyLabel:f,onSubmit:v,onCancel:h,children:y}){return oe(e("div",{className:"fixed inset-0 modal-scrim z-[100] flex items-center justify-center p-4 backdrop-blur-sm",children:e("form",{onSubmit:v,className:"glass-overlay bg-paper rounded shadow-xl p-4 w-full max-w-sm border border-ink/10 font-sans",children:[e("h3",{className:"font-semibold text-ink mb-1 text-sm",children:t}),e("p",{className:"text-[11px] text-ink/50 mb-3 break-words",children:r}),y,l&&e("p",{className:"text-[11px] text-error mb-2",children:l}),e("div",{className:"flex justify-end space-x-2 mt-3",children:[e("button",{type:"button",onClick:h,className:"px-3 py-1.5 text-xs text-ink hover:bg-ink/5 rounded transition-colors",disabled:c,children:"Cancel"}),e("button",{type:"submit",className:"px-3 py-1.5 text-xs bg-ink text-canvas rounded hover:bg-ink/90 transition-colors flex items-center",disabled:c,children:c?f:p})]})]})}),document.body)}function un({entries:t,format:r,name:l,destination:c,formats:p,error:f,busy:v,onFormatChange:h,onNameChange:y,onDestinationChange:g,onCancel:m,onSubmit:C}){let k=t.slice(0,4).map((T)=>T.name).join(", "),N=t.length>4?` +${t.length-4} more`:"";return e(Tt,{title:`Compress ${t.length===1?t[0].name:`${t.length} items`}`,subject:`${k}${N}`,error:f,busy:v,submitLabel:"Compress",busyLabel:"Compressing...",onCancel:m,onSubmit:(T)=>{T.preventDefault(),C()},children:[e("label",{className:"block text-[10px] uppercase tracking-wide text-ink/40 mb-1",htmlFor:"archive-format",children:"Format"}),e("select",{id:"archive-format",value:r,onChange:(T)=>h(T.currentTarget.value),className:"w-full bg-paper border border-ink/20 rounded px-2 py-1.5 text-xs font-mono focus:outline-none focus:border-ink mb-3",children:p.map((T)=>e("option",{value:T.id,disabled:!T.available,children:[T.label,T.available?"":` — ${T.tool} not installed`]},T.id))}),e("label",{className:"block text-[10px] uppercase tracking-wide text-ink/40 mb-1",htmlFor:"archive-name",children:"Archive name"}),e("input",{id:"archive-name",autoFocus:!0,type:"text",value:l,onChange:(T)=>y(T.currentTarget.value),"aria-label":"Archive name",className:`w-full bg-paper border rounded px-2 py-1.5 text-xs font-mono focus:outline-none mb-3 ${f?"border-error":"border-ink/20 focus:border-ink"}`}),e("label",{className:"block text-[10px] uppercase tracking-wide text-ink/40 mb-1",htmlFor:"archive-destination",children:"Destination folder"}),e("input",{id:"archive-destination",type:"text",value:c,onChange:(T)=>g(T.currentTarget.value),"aria-label":"Archive destination",className:"w-full bg-paper border border-ink/20 rounded px-2 py-1.5 text-xs font-mono focus:outline-none focus:border-ink"})]})}function fn({archive:t,kindLabel:r,destination:l,error:c,busy:p,onDestinationChange:f,onCancel:v,onSubmit:h}){return e(Tt,{title:`Extract ${t.name}`,subject:`${r} archive · extracts into a folder`,error:c,busy:p,submitLabel:"Extract",busyLabel:"Extracting...",onCancel:v,onSubmit:(y)=>{y.preventDefault(),h()},children:[e("label",{className:"block text-[10px] uppercase tracking-wide text-ink/40 mb-1",htmlFor:"extract-destination",children:"Extract to folder"}),e("input",{id:"extract-destination",autoFocus:!0,type:"text",value:l,onChange:(y)=>f(y.currentTarget.value),"aria-label":"Extract destination",className:`w-full bg-paper border rounded px-2 py-1.5 text-xs font-mono focus:outline-none ${c?"border-error":"border-ink/20 focus:border-ink"}`})]})}function Et({archive:t}){if(t.compress)return e(un,{entries:t.compress.entries,format:t.compress.format,name:t.compress.name,destination:t.compress.destination,formats:t.formats,error:t.error,busy:t.busy,onFormatChange:t.setFormat,onNameChange:t.setName,onDestinationChange:t.setCompressDestination,onCancel:t.cancel,onSubmit:t.submitCompress});if(t.extract)return e(fn,{archive:t.extract.archive,kindLabel:Nt($e(t.extract.archive.name)??"zip"),destination:t.extract.destination,error:t.error,busy:t.busy,onDestinationChange:t.setExtractDestination,onCancel:t.cancel,onSubmit:t.submitExtract});return null}function Mt(){let[t,r]=_("files.outlineExpanded",!1),l=xr(),c=Ge(xA,kA),{symbols:p,total:f,truncated:v,notice:h}=Hu({content:c.content,language:c.language,state:c.state,note:c.note,path:c.path});if(c.state==="diff")return null;let y=c.preview,g=(m,C)=>{if(!c.path)return;if(y){let k=Ju(p,C);if(k)es({path:c.path,...k});return}Xi({path:c.path,line:m.line,column:m.column,length:m.name.length})};return e("div",{className:"border-t border-ink/10 bg-canvas/30 flex-shrink-0",children:[e("div",{className:"flex items-center hover:bg-ink/5 transition-colors",children:e("button",{type:"button",onClick:()=>r(!t),"aria-expanded":t,"aria-controls":l,"aria-label":"Outline",title:t?"Hide outline":"Show outline",className:"flex flex-1 min-w-0 items-center space-x-1 py-1.5 pl-3 pr-2 text-left font-semibold text-xs text-ink transition-colors cursor-pointer",children:[e("span",{className:"w-3 text-center font-mono","aria-hidden":"true",children:t?"▾":"▸"}),e(Vr,{size:12}),e("span",{children:"Outline"}),f>0&&e("span",{className:"font-normal ml-1 border border-ink/20 rounded-full px-1.5 text-[10px] text-ink/50",children:v?`${p.length}/${f.toLocaleString()}`:f})]})}),e("div",{className:"section-reveal","data-expanded":t,id:l,inert:!t,children:e("div",{children:e("div",{className:"px-2 pb-2",children:p.length===0?e("div",{className:"px-1 text-[10px] text-ink/40 italic py-1",children:h}):e("div",{className:"max-h-48 overflow-y-auto scrollbar-overlay-container flex flex-col",children:[p.map((m,C)=>e("button",{type:"button",onClick:()=>g(m,C),"aria-label":y?`${Xo(m.kind)} ${m.name}`:`${Xo(m.kind)} ${m.name}, line ${m.line}`,title:y?`Jump to ${Xo(m.kind).toLowerCase()}`:`${Xo(m.kind)} · line ${m.line}`,className:"flex w-full min-w-0 items-center gap-1.5 rounded px-1 py-0.5 text-left transition-colors hover:bg-ink/5 active:bg-ink/10",style:{paddingLeft:`${4+m.depth*12}px`},children:[e(ju,{kind:m.kind}),e("span",{className:"min-w-0 flex-1 truncate text-[11px] font-mono text-ink/80",children:m.name}),!y&&e("span",{className:"flex-shrink-0 font-mono text-[10px] text-ink/35",children:m.line})]},`${m.line}:${m.kind}:${m.name}`)),v&&e("div",{className:"px-1 py-1 text-[10px] italic text-ink/40",children:qu(f)})]})})})})]})}function Oe(t,r){return Se(t.map((l)=>mn(l,r)))}function mn(t,r){if(t.type!=="folder")return t;let l=r[t.path];if(!l)return t;return{...t,children:Oe(l,r)}}function hn(t){let r=t.lastIndexOf("/");return r===-1?".":t.slice(0,r)}function $t(t){let r=t.lastIndexOf("/");return r===-1?t:t.slice(r+1)}function Lt(t){return[...t].sort((r,l)=>{if(r.type!==l.type)return r.type==="folder"?-1:1;return r.name.localeCompare(l.name)})}function Pe(t,r,l){let c=l.path.split("/"),p=c.slice(0,-1).join("/"),f=[...t],v={...r},h=f,y=null;for(let g=0;g<c.length-1;){let m=c.slice(0,g+1).join("/"),C=h.find((A)=>A.type==="folder"&&A.path===m),k=C?null:h.find((A)=>A.type==="folder"&&A.path.startsWith(`${m}/`)&&(p===A.path||p.startsWith(`${A.path}/`))),N=C??k,T=N?v[N.path]??N.children:null;if(N&&!Array.isArray(T))return{nodes:t,cache:r};if(!N){let A=gn(h,v,m);if(A){h=A;let R=h.find((S)=>S.path===m),w=Array.isArray(R?.children)?[...R.children]:[];v[m]=w,h=w,y=m,g+=1;continue}}let F=Array.isArray(T)?[...T]:[];if(N){v[N.path]=F,h=F,y=N.path,g=N.path.split("/").length;continue}h.push({name:c[g],path:m,type:"folder",ignored:!1}),v[m]=F,h=F,y=m,g+=1}if(h.push(l),y!==null)v[y]=Lt(h);return f=Lt(f),{nodes:f,cache:v}}function gn(t,r,l){let c=t.findIndex((y)=>y.type==="folder"&&y.path.startsWith(`${l}/`));if(c===-1)return null;let p=t[c],f=p.path.slice(l.length+1).split("/"),v=r[p.path]??p.children;if(Array.isArray(v))r[p.path]=v;let h={name:f[f.length-1],path:p.path,type:"folder",ignored:p.ignored,...Array.isArray(v)?{children:v}:{}};for(let y=f.length-2;y>=0;y-=1)h={name:f[y],path:`${l}/${f.slice(0,y+1).join("/")}`,type:"folder",ignored:!1,children:[h]};return t[c]={name:$t(l),path:l,type:"folder",ignored:!1,children:[h]},t}function zt(t,r,l){let c=t.find((m)=>m.path===l);if(c)return{entry:c,nodes:t.filter((m)=>m.path!==l),cache:r};let p=hn(l),f=r[p],v=f?.find((m)=>m.path===l);if(f&&v)return{entry:v,nodes:t,cache:{...r,[p]:f.filter((m)=>m.path!==l)}};let y=Object.keys(r).filter((m)=>l.startsWith(`${m}/`)&&r[m].some((C)=>C.path===l)).sort((m,C)=>C.length-m.length)[0];if(!y)return{entry:null,nodes:t,cache:r};let g=r[y];return{entry:g.find((m)=>m.path===l),nodes:t,cache:{...r,[y]:g.filter((m)=>m.path!==l)}}}function Ot(t,r,l){let c=!1,p=t.map((f)=>{let v=f.path===r||f.path.startsWith(`${r}/`),h=Array.isArray(f.children)?Ot(f.children,r,l):void 0;if(!v&&h===f.children)return f;c=!0;let y=v?f.path===r?l:`${l}${f.path.slice(r.length)}`:f.path,g=v?{...f,path:y,name:$t(y)}:{...f};if(h!==void 0)g.children=h;return g});return c?p:t}function Pt(t,r,l){let c={};for(let[p,f]of Object.entries(t)){let v=p===r?l:p.startsWith(`${r}/`)?`${l}${p.slice(r.length)}`:p;c[v]=v===p?f:Ot(f,r,l)}return c}function It(t,r,l){let c=new Set;for(let p of t)if(p===r)c.add(l);else if(p.startsWith(`${r}/`))c.add(`${l}${p.slice(r.length)}`);else c.add(p);return c}function Ht(t){if(!x(t))return{status:"missing"};if(typeof t.root!=="string"||t.root==="")return{status:"missing"};return{status:"ok",files:Array.isArray(t.files)?t.files.filter((r)=>x(r)):[],root:t.root}}async function Ie(t){try{return Ht(await(await fetch(t)).json())}catch{return{status:"failed"}}}function Gt({enabled:t,rootPath:r,activeRepo:l,expandedPaths:c,onExpansionPruned:p}){let f=`${r??""}\x00${l}`,[v,h]=n({scope:"",files:[],root:""}),[y,g]=n(!1),m=i({}),C=i([]),k=i(f);k.current=f;let N=i(""),T=i(""),F=i(c);F.current=c;let A=(O)=>{let M=new URLSearchParams;if(r)M.set("root",r);if(l&&l!==".")M.set("repo",l);if(O)M.set("path",O);return M.set("t",String(Date.now())),`/api/fs/dir?${M.toString()}`},R=(O,M)=>{N.current=O,T.current=M;let H=Oe(C.current,m.current);return h({scope:O,files:H,root:M}),H},w=async(O)=>{let M=[...F.current];if(M.length===0)return;let H=await Promise.all(M.map(async(X)=>({path:X,read:await Ie(A(X))})));if(k.current!==O)return;let G=[];for(let{path:X,read:J}of H)if(J.status==="ok")m.current[X]=J.files;else if(J.status==="missing")G.push(X);if(G.length===0)return;let ne=new Set(G);for(let X of G)delete m.current[X];let q=new Set([...F.current].filter((X)=>!ne.has(X)));F.current=q,p(q)},S=async()=>{if(!t)return;let O=k.current;g(!0);try{let M=await Ie(A());if(k.current!==O)return;if(M.status!=="ok")return;if(N.current!==O)m.current={};if(C.current=M.files,R(O,M.root),await w(O),k.current!==O)return;R(O,M.root)}finally{if(k.current===O)g(!1)}},P=async(O)=>{let M=k.current,H=await Ie(A(O));if(k.current!==M||H.status!=="ok")return;if(m.current[O]=H.files,N.current===M)R(M,T.current)},j=(O)=>{let M=Ht(O);if(M.status!=="ok")return;let H=k.current;if(N.current!==H)m.current={};C.current=M.files,R(H,M.root),w(H).then(()=>{if(k.current===H)R(H,M.root)})},ee=()=>{m.current={},C.current=[],N.current="",T.current="",h({scope:"",files:[],root:""})},te=(O)=>{let M=k.current;if(N.current!==M)return null;let H={name:O.path.slice(O.path.lastIndexOf("/")+1),path:O.path,type:O.kind,ignored:!1},G=Pe(C.current,m.current,H);if(G.nodes===C.current)return null;return C.current=G.nodes,m.current=G.cache,R(M,T.current)},ae=(O,M)=>{let H=k.current;if(N.current!==H)return null;let G=zt(C.current,m.current,O);if(!G.entry)return null;m.current=Pt(G.cache,O,M);let ne={...G.entry,path:M,name:M.slice(M.lastIndexOf("/")+1)},q=Pe(G.nodes,m.current,ne);return C.current=q.nodes,m.current=q.cache,R(H,T.current)},I=v.scope===f;return{scope:f,files:I?v.files:[],root:I?v.root:"",isLoading:y,reload:S,loadChildren:P,adoptRoot:j,insertEntry:te,moveEntry:ae,reset:ee}}function Kt({rootPath:t,repo:r,onComplete:l,onError:c}){let p=lt(),[f,v]=_("files.clipboard",null),h=mt(f),y=ct(t,r),g=i(!1),m=i(null);o(()=>{if(p.state!=="idle"||!p.data)return;let F=p.data;if(m.current===F)return;m.current=F;let A=g.current;if(g.current=!1,F.success){if(A)v(null);if(F.failures?.length)c(`${F.failures.length} item(s) could not be moved: ${F.failures[0].error}`);l()}else c(F.error||"The transfer did not complete")},[p.state,p.data]);let C=a((F,A)=>{g.current=A;let R=new FormData;for(let[w,S]of Object.entries(F))R.append(w,S);if(r&&r!==".")R.append("repo",r);if(t)R.append("root",t);p.submit(R,{method:"post",action:"/api/fs/action"})},[p,r,t]),k=a((F)=>ft(h,y,Me(F.path,F.kind)),[h,y]),N=a((F,A)=>ut(F,Me(A.path,A.kind)),[]),T=a((F,A,R,w)=>{let S=new FormData;S.append("actionType","paste"),S.append("mode",R),S.append("targetPath",A.path),S.append("targetKind",A.kind);for(let P of F)S.append("sourcePath",P.path);if(r&&r!==".")S.append("repo",r);if(t)S.append("root",t);g.current=w,p.submit(S,{method:"post",action:"/api/fs/action"})},[p,r,t]);return{clip:h,busy:p.state!=="idle",refusalFor:k,moveRefusalFor:N,copy:(F)=>{if(F.length===0)return;v({scope:y,entries:F.map(({path:A,name:R,kind:w})=>({path:A,name:R,kind:w})),mode:"copy"})},cut:(F)=>{if(F.length===0)return;v({scope:y,entries:F.map(({path:A,name:R,kind:w})=>({path:A,name:R,kind:w})),mode:"cut"})},duplicate:(F)=>{C({actionType:"duplicate",path:F.path},!1)},move:(F,A)=>{let R=N(F,A);if(R){c(R);return}T([F],A,"cut",Boolean(h?.mode==="cut"&&h.entries.some((w)=>w.path===F.path)))},paste:(F)=>{if(!h)return;let A=k(F);if(A){c(A);return}T(h.entries.map(({path:R,name:w,kind:S})=>({path:R,name:w,kind:S})),F,h.mode,h.mode==="cut")}}}var bn=Le.map((t)=>({...t,available:!0,tool:t.id}));function jt({rootPath:t,repo:r,onComplete:l}){let c=lt(),[p,f]=n(bn),[v,h]=n(null),[y,g]=n(null),[m,C]=n(null),k=i(null),N=i(null);o(()=>{let w=!1;return(async()=>{try{let P=await(await fetch("/api/fs/archive")).json();if(!w&&Array.isArray(P.formats)&&P.formats.length>0)f(P.formats)}catch{}})(),()=>{w=!0}},[]),o(()=>{if(c.state!=="idle"||!c.data)return;let w=c.data;if(N.current===w)return;N.current=w;let S=k.current;if(k.current=null,w.success){if(C(null),S==="compress")h(null);if(S==="extract")g(null);l()}else if(S)C(w.error||"The archive request failed")},[c.state,c.data]);let T=a((w)=>{let S=new FormData;for(let[P,j]of Object.entries(w))S.append(P,j);if(r&&r!==".")S.append("repo",r);if(t)S.append("root",t);c.submit(S,{method:"post",action:"/api/fs/action"})},[c,r,t]),F=a((w)=>{if(w.length===0)return;let S=p.find((P)=>P.id==="zip"&&P.available)?.id??p.find((P)=>P.available)?.id??"zip";C(null),g(null),h({entries:w.map(({path:P,name:j,kind:ee})=>({path:P,name:j,kind:ee})),format:S,name:we(w,S),destination:Ct(w)})},[p]),A=a((w)=>{C(null),h(null),g({archive:w,destination:Ft(w.path)})},[]),R=a((w)=>{h((S)=>{if(!S)return S;let P=we(S.entries,S.format),j=S.name===P?we(S.entries,w):S.name;return{...S,format:w,name:j}})},[]);return{formats:p,compress:v,extract:y,error:m,busy:c.state!=="idle",openCompress:F,openExtract:A,setFormat:R,setName:(w)=>h((S)=>S&&{...S,name:w}),setCompressDestination:(w)=>h((S)=>S&&{...S,destination:w}),setExtractDestination:(w)=>g((S)=>S&&{...S,destination:w}),cancel:()=>{h(null),g(null),C(null)},submitCompress:()=>{let w=v;if(!w)return;k.current="compress",C(null),T({actionType:"compress",format:w.format,name:w.name.trim(),destination:w.destination.trim()||".",paths:JSON.stringify(w.entries.map((S)=>S.path))})},submitExtract:()=>{let w=y;if(!w)return;k.current="extract",C(null),T({actionType:"extract",path:w.archive.path,destination:w.destination.trim()||"."})}}}function xn(t){if(t.shiftKey)return"range";if(t.metaKey||t.ctrlKey)return"toggle";return"plain"}function vn(t,r,l){if(!r)return[l];let c=t.indexOf(r),p=t.indexOf(l);if(c===-1||p===-1)return[l];let f=Math.min(c,p),v=Math.max(c,p);return t.slice(f,v+1)}function _t(t){let[r,l]=n(()=>new Set),[c,p]=n(null),f=a((g,m)=>{if(g==="range"){l(new Set(vn(t,c,m)));return}if(p(m),g==="toggle"){l((C)=>{let k=new Set(C);if(k.has(m))k.delete(m);else k.add(m);return k});return}l(new Set([m]))},[c,t]),v=a((g)=>{l((m)=>{if(m.has(g))return m;return new Set([g])}),p(g)},[]),h=a(()=>{l(new Set),p(null)},[]),y=a(xn,[]);return u(()=>({selected:r,count:r.size,anchor:c,gestureOf:y,applyGesture:f,ensureForContext:v,clear:h}),[r,c,y,f,v,h])}function Ke(t,r,l=0,c=[]){for(let p of t)if(c.push({path:p.path,name:p.name,kind:p.type==="folder"?"folder":"file",depth:l}),p.type==="folder"&&r(p)&&Array.isArray(p.children))Ke(p.children,r,l+1,c);return c}function Wt({listing:t,setExpandedPaths:r,setStoredExpandedPaths:l,reload:c,onMoved:p}){let f=a((y,g)=>{let m=at(g,y);if(m.length===0)return;r((C)=>{if(m.every((N)=>C.has(N)))return C;let k=new Set(C);for(let N of m)k.add(N);return l(Array.from(k)),k})},[r,l]),v=a((y)=>{let g=t.insertEntry(y);if(!g){c();return}f(y.path,g)},[t,c,f]),h=a((y,g)=>{p?.(y,g),r((C)=>{let k=It(C,y,g);return l(Array.from(k)),k});let m=t.moveEntry(y,g);if(!m){c();return}f(g,m)},[t,c,f,r,l,p]);return{insertCreated:v,moveRenamed:h}}var yn=new Set;function Ut({scope:t,setExpandedPaths:r,setStoredExpandedPaths:l}){let[c,p]=n({scope:t,chains:new Map}),f=a((y)=>{let g=Ae(y.path,y.name);if(!g)return;p((C)=>{let k=C.scope===t?C.chains:new Map;if(k.get(y.path)?.length===g.length)return C;let T=new Map(k);return T.set(y.path,g),{scope:t,chains:T}});let m=g.slice(0,-1);r((C)=>{if(m.every((N)=>C.has(N)))return C;let k=new Set(C);for(let N of m)k.add(N);return l(Array.from(k)),k})},[t,r,l]),v=a((y)=>{let g=c.scope===t?c.chains.get(y):void 0;if(!g)return;let m=g.slice(0,-1);p((C)=>{if(C.scope!==t)return C;let k=new Map(C.chains);return k.delete(y),{scope:t,chains:k}}),r((C)=>{if(!m.some((N)=>C.has(N)))return C;let k=new Set(C);for(let N of m)k.delete(N);return l(Array.from(k)),k})},[t,c,r,l]),h=a((y,g)=>{let m=c.scope===t?c.chains:null;if(!m)return;let C=new Map,k=[],N=!1;for(let[T,F]of m){if(F.findIndex((S,P)=>S===y&&P>0&&P<F.length-1)!==-1){N=!0;continue}let R=F.map((S)=>S===y?g:S.startsWith(`${y}/`)?`${g}${S.slice(y.length)}`:S),w=R[R.length-1];if(w!==T||R.some((S,P)=>S!==F[P]))N=!0;C.set(w,R),k.push(...R.slice(0,-1))}if(!N)return;p({scope:t,chains:C}),r((T)=>{if(k.every((A)=>T.has(A)))return T;let F=new Set(T);for(let A of k)F.add(A);return l(Array.from(F)),F})},[t,c,r,l]);return{unfolded:c.scope===t&&c.chains.size>0?new Set(c.chains.keys()):yn,unfold:f,fold:v,rekey:h}}function Vt(t,r){let l=r.trim().toLowerCase();if(!l)return t;let c=(p)=>{let f=p.name.toLowerCase().includes(l);if(p.type==="folder"){let v=(p.children||[]).map(c).filter((h)=>h!==null);if(f||v.length>0)return{...p,children:f&&v.length===0?p.children:v,forceExpanded:!0};return null}return f?p:null};return t.map(c).filter((p)=>p!==null)}function Xt({dragging:t,clipboard:r,target:l}){let c=Boolean(t)&&r.moveRefusalFor(t,l)===null,[p,f]=n(!1);return o(()=>{if(!t)f(!1)},[t]),{accepts:c,highlighted:p&&c,onDragEnter:()=>{if(t)f(!0)},onDragLeave:(v)=>{if(!v.currentTarget.contains(v.relatedTarget))f(!1)},onDragOver:(v)=>{if(!c)return;if(v.preventDefault(),v.dataTransfer)v.dataTransfer.dropEffect="move"},onDrop:(v)=>{if(!c)return;v.preventDefault(),f(!1),r.move(t,l)}}}function ni({className:t="",enabled:r=!0,active:l=!0,rootPath:c,onOpenFile:p,refreshKey:f=0,onRefresh:v}){let[h,y]=_("files.searchQuery",""),[g,m,C]=_("files.expandedPaths",[]),[k,N]=n(()=>new Set(g)),{activeRepo:T,setActiveRepo:F}=fr(c),{repos:A,scanning:R,rescan:w}=gr(c,r),{fileMap:S,folderMap:P,refreshGitStatus:j}=Ks(c,T,r),[ee,te]=n(null),ae=i(null);o(()=>{if(!C)return;N((z)=>{let Z=new Set(g);if(z.size===Z.size&&Array.from(Z).every((fe)=>z.has(fe)))return z;return Z})},[C,g]);let I=Gt({enabled:r,rootPath:c,activeRepo:T,expandedPaths:k,onExpansionPruned:(z)=>{N(z),m(Array.from(z))}});o(()=>{if(!C||!l)return;I.reload()},[f,c,r,T,C,l]);let O=r&&C?uA(I.scope):null,M=Be(O);o(()=>{if(M.data)I.adoptRoot(M.data)},[M.data]);let H=(z)=>(j(),I.loadChildren(z)),G=(z,Z)=>{let fe=new Set(k);if(Z)fe.add(z);else fe.delete(z);N(fe),m(Array.from(fe))},{unfolded:ne,unfold:q,fold:X,rekey:J}=Ut({scope:I.scope,setExpandedPaths:N,setStoredExpandedPaths:m}),ie=I.files,he=it(ie,ne),Q=Vt(he.nodes,h),ue=Ke(Q,(z)=>z.forceExpanded!==void 0?z.forceExpanded:k.has(z.path)),le=_t(ue.map((z)=>z.path)),xe=ue.filter((z)=>le.selected.has(z.path)).map(({path:z,name:Z,kind:fe})=>({path:z,name:Z,kind:fe})),E=(z)=>{if(z===T)return;I.reset(),N(new Set),m([]),le.clear(),F(z)},K=()=>{if(j(),v)v();else I.reload()},{insertCreated:ce,moveRenamed:ye}=Wt({listing:I,setExpandedPaths:N,setStoredExpandedPaths:m,reload:K,onMoved:(z,Z)=>J(z,Z)}),be=ns(),{pushToast:W}=qe(),Y=Kt({rootPath:c,repo:T,onComplete:K,onError:(z)=>W(z,"error")}),ke=jt({rootPath:c,repo:T,onComplete:K}),ve={path:".",name:".",kind:"folder"},de=Y.clip&&!Y.refusalFor(ve)?`Paste ${Ne(Y.clip)??"item"}`:null,[V,ge]=n(null),pe=Xt({dragging:V,clipboard:Y,target:ve}),De=Fe({folderPath:".",rootPath:c,repo:T,onCreated:ce,onOpenCreated:(z)=>p?.({...z,root:c,repo:T})}),[je,qt]=n(!1);o(()=>qt(!0),[]);let{count:_e,clear:We}=le;if(o(()=>{if(!l)return;let z=(Z)=>{if(Z.key==="Escape"&&_e>0)We()};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[l,_e,We]),!r)return e("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${t}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});let Bt=I.isLoading||M.refreshing;return e("div",{className:`flex flex-col h-full bg-paper ${t}`,children:[e(Qe,{rootPath:c,activeRepo:T,repos:A,reposScanning:R,onRefreshRepos:w,onSelectRepo:E,searchQuery:h,onSearchChange:y,onRefresh:K,refreshing:Bt}),e("div",{className:`flex-1 scrollbar-overlay-container p-2 font-mono text-[11px] text-ink/80 ${be?"file-tree-touch":""} ${pe.highlighted?"bg-info/[0.06]":""}`,onContextMenu:(z)=>{z.preventDefault(),te({x:z.clientX,y:z.clientY})},onDragEnter:pe.onDragEnter,onDragLeave:pe.onDragLeave,onDragOver:pe.onDragOver,onDrop:pe.onDrop,children:I.isLoading&&Q.length===0?e("div",{className:"p-4 text-center text-ink/40",children:"Loading files..."}):Q.length===0?e("div",{className:"p-4 text-center text-ink/40",children:"No files found"}):Q.map((z)=>e(ze,{file:z,rootPath:c,basePath:I.root,repo:T,onLoadChildren:H,onOpenFile:p,onActionComplete:K,onCreated:ce,onRenamed:ye,expandedPaths:k,onToggleFolder:G,gitFileMap:S,gitFolderMap:P,clipboard:Y,archive:ke,selection:le,selectionTargets:xe,dragging:V,onDragStart:ge,onDragEnd:()=>ge(null),onDropOn:(Z)=>{if(!V)return;Y.move(V,Z)},onUnfold:q,onFold:X,foldRoots:he.roots,touch:be},z.path))}),e(Mt,{}),je&&e(St,{menu:ee,menuRef:ae,pasteLabel:de,busy:Y.busy,create:De,onAction:(z)=>{if(te(null),z==="new_file")De.openDialog("file");if(z==="new_folder")De.openDialog("folder");if(z==="paste")Y.paste(ve)}}),je&&e(Et,{archive:ke})]})}export{ni as FileExplorer};
@@ -0,0 +1 @@
1
+ import{d,e,E,pA,Be,At,Ha,ot}from"./index-xkwybnf3.js";import{oa,Cu,Fs,Eu,Bu}from"./index-w57zbym7.js";function u(t,r){if(!t)return r;if(!r)return t;let s=Date.parse(t.generatedAt),o=Date.parse(r.generatedAt);if(Number.isNaN(s)||Number.isNaN(o))return t;return o>s?r:t}function A({className:t="",active:r=!0,tabsMode:s=!1}){let{report:o,isLoading:i,error:n,reload:l}=Bu(),p=Be(pA,{enabled:r}),a=u(p.data,o),m=a?Fs(a):[];if(n&&!a)return e("div",{className:`flex h-full w-full flex-col items-center justify-center gap-2 p-8 text-center text-xs ${t}`,children:[e(E,{size:16,className:"text-error"}),e("p",{className:"text-error text-xs",children:n}),e("button",{type:"button",onClick:()=>l(),className:"text-[11px] font-semibold text-ink/70 hover:text-ink underline underline-offset-2",children:"Try again"})]});if(!a)return e("div",{className:`flex h-full w-full items-center justify-center text-ink/40 text-xs ${t}`,children:"Loading provider usage..."});return e("div",{className:`flex h-full w-full min-w-0 min-h-0 flex-col overflow-hidden bg-paper text-xs text-ink ${t}`,children:[e(At,{left:e(d,{children:[e(Ha,{id:"usage",tabsMode:s,children:e("h2",{className:"text-xs font-semibold text-ink uppercase tracking-wider",children:"Usage"})}),e("span",{className:"text-[11px] text-ink/50 truncate",children:["Updated ",oa(a.generatedAt)]}),a.isMock&&e("span",{className:"text-[10px] font-mono uppercase tracking-wider bg-ink/5 border border-ink/15 rounded px-1.5 py-0.5 text-ink/60",children:"Mock"})]}),right:e(ot,{label:"Refresh usage",onClick:()=>l({force:!0}),busy:i||p.refreshing,disabled:i})}),e("div",{className:"flex-1 min-w-0 min-h-0 w-full overflow-y-auto scrollbar-overlay-container p-3.5 space-y-4",children:[n&&e("p",{className:"text-error text-xs",children:n}),m.length>0?m.map((f)=>e(Cu,{summary:f.summary},f.id)):e("p",{className:"text-[11px] text-ink/50 leading-relaxed",children:"No provider credentials detected. Add an API key in Settings → Providers and it will appear here."}),e(Eu,{})]})]})}export{A as UsagePanel};
@@ -0,0 +1 @@
1
+ import{d,u,le,e,E,B,se,Er,lA,Be,Ys,At,ug,ot,ed,rm,GA,am,om}from"./index-xkwybnf3.js";function g({phase:t,index:s,collapsed:r,currentKey:f,onToggle:i}){let m=am(t),x=t.tasks.length>0&&m===t.tasks.length;return e("div",{className:"overflow-hidden rounded-lg border border-ink/10 bg-paper",children:[e("button",{type:"button",onClick:i,"aria-expanded":!r,className:"flex w-full items-center gap-1.5 border-b border-ink/8 bg-canvas/40 px-2.5 py-1.5 text-left hover:bg-ink/5",children:[r?e(se,{size:12,className:"shrink-0 text-ink/40"}):e(B,{size:12,className:"shrink-0 text-ink/40"}),e("span",{className:`min-w-0 flex-1 truncate text-[10px] font-semibold uppercase tracking-wider ${x?"text-ink/35":"text-ink/60"}`,title:t.name,children:[s+1,". ",t.name]}),e("span",{className:"shrink-0 font-mono text-[10px] text-ink/40",children:[m,"/",t.tasks.length]})]}),!r&&e("div",{className:"divide-y divide-ink/[0.05] p-0.5",children:t.tasks.length===0?e("div",{className:"px-2.5 py-1.5 text-[11px] text-ink/40",children:"No tasks in this phase"}):t.tasks.map((n,l)=>e(om,{task:n,current:f===`${s}:${l}`},`${l}-${n.content}`))})]})}function q({className:t="",active:s=!0,tabsMode:r=!1}){let[f]=le(),i=f.get("sessionId"),[m,x]=Ys("todo.collapsedPhases",{}),{data:n,isLoading:l,refreshing:k,stale:b,refresh:v}=Be(i?lA(i):null,{enabled:s}),o=n?.snapshot??null,p=n?.progress??null,N=u(()=>{let a=GA(o?.phases??[]);return a?`${a.phase}:${a.task}`:null},[o]);if(!i)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${t}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});return e("div",{className:`flex h-full w-full min-w-0 flex-col overflow-hidden bg-paper text-ink ${t}`,children:[ug("todo",r)?e(At,{left:e(d,{children:[e("h2",{className:"text-xs font-semibold uppercase tracking-wider text-ink",children:"Todos"}),o&&e("span",{className:"truncate font-mono text-[10.5px] text-ink/50",title:ed(p),children:ed(p)}),n?.isMock&&e("span",{className:"flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5 font-mono text-[10px] uppercase tracking-wider text-ink/60",children:"Mock"})]}),right:e(ot,{label:"Refresh todos",onClick:v,busy:l||k,disabled:l})}):null,p&&p.total>0&&e("div",{className:"flex-shrink-0 border-b border-ink/10 px-3.5 py-2.5",children:e("div",{className:"h-1.5 overflow-hidden rounded-full bg-ink/8",children:e("div",{className:"h-full rounded-full bg-success transition-all duration-300",style:{width:`${rm(p)}%`}})})}),e("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto scrollbar-overlay-container p-3.5",children:[b&&e("div",{className:"flex items-start gap-2 rounded-lg border border-ink/15 bg-ink/5 px-3 py-2 text-[11px] text-ink/60",children:[e(E,{size:13,className:"mt-[1px] shrink-0"}),e("span",{className:"min-w-0 break-words",children:"Reconnecting: this list may be out of date."})]}),!o?e("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-center text-ink/40",children:[e(Er,{size:20}),e("p",{className:"max-w-[240px] text-[11.5px] leading-relaxed",children:["No todo list in this session. The agent writes one with the ",e("span",{className:"font-mono",children:"todo"})," tool when a task is worth planning."]})]}):e(d,{children:[o.phases.map((a,c)=>e(g,{phase:a,index:c,collapsed:Boolean(m[String(c)]),currentKey:N,onToggle:()=>x((h)=>({...h,[String(c)]:!h[String(c)]}))},`${c}-${a.name}`)),e("p",{className:"pt-1 text-[10.5px] leading-relaxed text-ink/35",children:["Read from this session's transcript",o.updatedAt?` · updated ${y(o.updatedAt)}`:"",o.source==="custom"?" · edited by hand":"","."]})]})]})]})}function y(t){let s=new Date(t);if(Number.isNaN(s.getTime()))return t;return s.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}export{q as TodoPanel};