@kabmo-labs/kabmo 0.34.0 → 0.36.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 (210) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +435 -432
  3. package/dist/client/static/js/{CsvGrid-vze4m5ag.js → CsvGrid-1h3bcak7.js} +2 -2
  4. package/dist/client/static/js/{DocxView-jbf21gmh.js → DocxView-ndca8jch.js} +3 -3
  5. package/dist/client/static/js/{DrawioView-b52qybx5.js → DrawioView-kpzd6y0b.js} +2 -2
  6. package/dist/client/static/js/{ImageView-mdgzj8px.js → ImageView-79prn3dg.js} +1 -1
  7. package/dist/client/static/js/{LayoutWrapper-3c49dvtt.js → LayoutWrapper-v2wn2sb2.js} +2 -2
  8. package/dist/client/static/js/{Modal-sqp864vd.js → Modal-99j0zz3z.js} +16 -16
  9. package/dist/client/static/js/{PdfView-g06rxqb1.js → PdfView-2rjd87ay.js} +1 -1
  10. package/dist/client/static/js/{SessionsView-521adxyr.js → SessionsView-t7f3s71b.js} +1 -1
  11. package/dist/client/static/js/{SheetView-h8xmsz7q.js → SheetView-ehb976st.js} +4 -4
  12. package/dist/client/static/js/{SvgPreview-1j4jvcvz.js → SvgPreview-de2bbba6.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-pasxh4b6.js → abnfDiagram-O67JEVCF-nx9jzn7m.js} +1 -1
  14. package/dist/client/static/js/architecture-7GRP2DOG-aqft2erp.js +1 -0
  15. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-ms14g0bm.js → architectureDiagram-NJMV4G6O-170v67rr.js} +2 -2
  16. package/dist/client/static/js/{blockDiagram-BEXU5L5S-ycn78fcq.js → blockDiagram-BEXU5L5S-16q285n1.js} +2 -2
  17. package/dist/client/static/js/{c4Diagram-YGBWAQC7-vn2gpjfm.js → c4Diagram-YGBWAQC7-rn3qt45h.js} +1 -1
  18. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-fyrm1pr5.js → classDiagram-v2-NBCMYWYE-r26wg74e.js} +3 -3
  19. package/dist/client/static/js/{cose-bilkent-JH36ORCC-ea5nwvgq.js → cose-bilkent-JH36ORCC-82kwe7ha.js} +1 -1
  20. package/dist/client/static/js/css-r2nhvzff.js +1 -0
  21. package/dist/client/static/js/cynefin-OW5HDTMX-v2sz60t6.js +1 -0
  22. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-j6bsjpre.js → cynefinDiagram-VND7K2PF-tcxdn6pa.js} +1 -1
  23. package/dist/client/static/js/{dagre-6A5THRUB-4smdkwv8.js → dagre-6A5THRUB-g833ata3.js} +2 -2
  24. package/dist/client/static/js/{diagram-22UHCM2B-9sm4kqwc.js → diagram-22UHCM2B-f1fq8xec.js} +4 -4
  25. package/dist/client/static/js/{diagram-3UASUU5V-2h3qxaed.js → diagram-3UASUU5V-6j2w016f.js} +1 -1
  26. package/dist/client/static/js/{diagram-ATOU4E4O-1981bc94.js → diagram-ATOU4E4O-6t2qxsk4.js} +1 -1
  27. package/dist/client/static/js/{diagram-CDSNMT55-3vgsxavc.js → diagram-CDSNMT55-7abar8s7.js} +1 -1
  28. package/dist/client/static/js/{diagram-MLGK6HIB-c9gf2r3f.js → diagram-MLGK6HIB-s68rgy16.js} +1 -1
  29. package/dist/client/static/js/{diagram-MPIPVDR6-gjqeq92d.js → diagram-MPIPVDR6-azgkm6w8.js} +1 -1
  30. package/dist/client/static/js/{dockerfile-8v935dkn.js → dockerfile-47e33kqa.js} +1 -1
  31. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-4vbsgh99.js → ebnfDiagram-ZINNZB2B-esrjz750.js} +1 -1
  32. package/dist/client/static/js/{elixir-vcbg60wv.js → elixir-rpa1g4gy.js} +1 -1
  33. package/dist/client/static/js/{elk-276RUBZZ-nca3t891.js → elk-276RUBZZ-fhr4b4jj.js} +1 -1
  34. package/dist/client/static/js/{erDiagram-OPXOYQCR-5kfkev03.js → erDiagram-OPXOYQCR-5r3fmdnz.js} +2 -2
  35. package/dist/client/static/js/{erlang-qt876zrq.js → erlang-bh5cbm8m.js} +1 -1
  36. package/dist/client/static/js/eventmodeling-NTZA5JFV-8qbefe4m.js +1 -0
  37. package/dist/client/static/js/flowDiagram-KWPJA3E3-krsvgcq7.js +1 -0
  38. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-mxc73wmq.js → ganttDiagram-FUAMR5RP-j4pf6rdn.js} +2 -2
  39. package/dist/client/static/js/gitGraph-4MIJSDKK-9bx1a38k.js +1 -0
  40. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-7en3ag0e.js → gitGraphDiagram-X574FWY7-x5epk0gr.js} +1 -1
  41. package/dist/client/static/js/graphql-xnpp5gn9.js +1 -0
  42. package/dist/client/static/js/html-pv88ny12.js +1 -0
  43. package/dist/client/static/js/{index-j51d5a5m.js → index-0b1kwsam.js} +28 -28
  44. package/dist/client/static/js/{index-52rqxgya.js → index-3kgrcaq1.js} +1 -1
  45. package/dist/client/static/js/{index-vhqe0y82.js → index-3vdmwpbh.js} +2 -2
  46. package/dist/client/static/js/{index-g2dyfze9.js → index-40ve7zzv.js} +1 -1
  47. package/dist/client/static/js/{index-eyfcm0cy.js → index-44qrckd2.js} +1 -1
  48. package/dist/client/static/js/{index-qckv9nte.js → index-55pqvh82.js} +2 -2
  49. package/dist/client/static/js/{index-r014brzs.js → index-5kjpacvd.js} +1 -1
  50. package/dist/client/static/js/{index-ev3yt353.js → index-5rzk1226.js} +1 -1
  51. package/dist/client/static/js/{index-p0nz38bm.js → index-60ceydzn.js} +1 -1
  52. package/dist/client/static/js/{index-ybm2x4vh.js → index-63c6t75t.js} +1 -1
  53. package/dist/client/static/js/{index-ahv9y42z.js → index-63jbb4kf.js} +2 -2
  54. package/dist/client/static/js/{index-nccwxv0s.js → index-6xzfta4b.js} +1 -1
  55. package/dist/client/static/js/{index-cgzrpvzj.js → index-75haaj8g.js} +169 -169
  56. package/dist/client/static/js/{index-ag2rmtas.js → index-7r1hw2gd.js} +1 -1
  57. package/dist/client/static/js/{index-hf52f59k.js → index-8cy3x2y8.js} +2 -2
  58. package/dist/client/static/js/{index-vy6termr.js → index-8e15fzax.js} +1 -1
  59. package/dist/client/static/js/{index-rzxcj7cg.js → index-97t3mv1v.js} +1 -1
  60. package/dist/client/static/js/{index-km2zb6wk.js → index-982jyfsb.js} +2 -2
  61. package/dist/client/static/js/{index-jsyekbx9.js → index-9gf8b73w.js} +1 -1
  62. package/dist/client/static/js/{index-s7gkkkyz.js → index-a293pdg7.js} +2 -2
  63. package/dist/client/static/js/{index-dbe6afkf.js → index-af24nes6.js} +2 -2
  64. package/dist/client/static/js/{index-ptcwae2n.js → index-b48p8d1j.js} +2 -2
  65. package/dist/client/static/js/{index-cd65zqba.js → index-be6gevq8.js} +1 -1
  66. package/dist/client/static/js/{index-231241f4.js → index-c09a5s1n.js} +9 -9
  67. package/dist/client/static/js/{index-fvmfge3p.js → index-c1j0xb0w.js} +1 -1
  68. package/dist/client/static/js/{index-fta1y9pc.js → index-ctgefatv.js} +10 -10
  69. package/dist/client/static/js/{index-7a64yjrm.js → index-d2km9egp.js} +4 -4
  70. package/dist/client/static/js/index-dh1vd0d9.js +1 -0
  71. package/dist/client/static/js/{index-j0r5hj0j.js → index-dmgawfhw.js} +2 -2
  72. package/dist/client/static/js/{index-1ksg88qf.js → index-h1e1abpt.js} +2 -2
  73. package/dist/client/static/js/{index-4g46wbdw.js → index-htt8qxm3.js} +1 -1
  74. package/dist/client/static/js/{index-c3ek61zv.js → index-k1xt92h4.js} +1 -1
  75. package/dist/client/static/js/{index-f7jhhqtk.js → index-ktvbsj6w.js} +1 -1
  76. package/dist/client/static/js/{index-a0fmsv1d.js → index-ky0prc71.js} +6 -6
  77. package/dist/client/static/js/{index-2svnq5gg.js → index-mm1rf116.js} +1 -1
  78. package/dist/client/static/js/{index-h5bn97p6.js → index-nws03exw.js} +1 -1
  79. package/dist/client/static/js/{index-xx6mqpxm.js → index-pyx8n25s.js} +2 -2
  80. package/dist/client/static/js/{index-rs80cwsv.js → index-q5t4sy22.js} +3 -3
  81. package/dist/client/static/js/{index-76zb4m0n.js → index-r8pckaqe.js} +2 -2
  82. package/dist/client/static/js/{index-4qwzxj81.js → index-sar2ggde.js} +1 -1
  83. package/dist/client/static/js/{index-1b0t1428.js → index-skm6k5w2.js} +3 -3
  84. package/dist/client/static/js/{index-b29afsjh.js → index-v5t761a1.js} +1 -1
  85. package/dist/client/static/js/{index-7y6rpsrp.js → index-v8qd8ypc.js} +2 -2
  86. package/dist/client/static/js/{index-354mqqra.js → index-w3n97x4b.js} +2 -2
  87. package/dist/client/static/js/{index-0vm41je9.js → index-ydvfc9td.js} +1 -1
  88. package/dist/client/static/js/{index-ptcrwswj.js → index-ye450a7z.js} +1 -1
  89. package/dist/client/static/js/{index-rytaa8ca.js → index-z6g74h7g.js} +2 -2
  90. package/dist/client/static/js/{index-sd66wv26.js → index-zdtsvnpq.js} +2 -2
  91. package/dist/client/static/js/{index-pm6xxwz1.js → index-zp73zexp.js} +2 -2
  92. package/dist/client/static/js/info-A6RAGUB7-j51t7jhh.js +1 -0
  93. package/dist/client/static/js/{infoDiagram-VRGFBTTK-sef80132.js → infoDiagram-VRGFBTTK-ktc8nb8g.js} +1 -1
  94. package/dist/client/static/js/ini-ygfyhprj.js +1 -0
  95. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-yhvepp1q.js → ishikawaDiagram-OU5B5YK6-n3dk6227.js} +2 -2
  96. package/dist/client/static/js/java-gm49vw59.js +1 -0
  97. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-5w77y95w.js → journeyDiagram-ZHPQQLJL-f0p1h8qn.js} +3 -3
  98. package/dist/client/static/js/jsx-ksxw1byz.js +1 -0
  99. package/dist/client/static/js/{julia-d4j6wgvf.js → julia-73zjh2w6.js} +1 -1
  100. package/dist/client/static/js/{kanban-definition-PNTS6WVX-02znqtna.js → kanban-definition-PNTS6WVX-7jdt7dv1.js} +2 -2
  101. package/dist/client/static/js/lua-53gzb9bx.js +1 -0
  102. package/dist/client/static/js/markdown-tk3cd3vs.js +1 -0
  103. package/dist/client/static/js/{mermaid.core-a6e6vck4.js → mermaid.core-e8rzrjt9.js} +6 -6
  104. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-y4n74q9x.js → mindmap-definition-NLK3R4M7-7shv6ge0.js} +2 -2
  105. package/dist/client/static/js/one-dark-pro-39bt34v9.js +1 -0
  106. package/dist/client/static/js/one-light-xec0sehr.js +1 -0
  107. package/dist/client/static/js/packet-AYTQ26CC-n83gfj2g.js +1 -0
  108. package/dist/client/static/js/{pegDiagram-GJSIUBJH-pr7ehgzb.js → pegDiagram-GJSIUBJH-17ak2zx3.js} +1 -1
  109. package/dist/client/static/js/{perl-srptw5vm.js → perl-8z46dmze.js} +1 -1
  110. package/dist/client/static/js/{php-n89g3fk7.js → php-6qvnp2t6.js} +1 -1
  111. package/dist/client/static/js/pie-WAS4IAKB-5c5pctwz.js +1 -0
  112. package/dist/client/static/js/{pieDiagram-5QR66LMP-39wpsk08.js → pieDiagram-5QR66LMP-at4x1g4q.js} +2 -2
  113. package/dist/client/static/js/properties-2tcybqjk.js +1 -0
  114. package/dist/client/static/js/python-qph3dntq.js +1 -0
  115. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-esm913km.js → quadrantDiagram-O4NWA36T-apzhwrn4.js} +1 -1
  116. package/dist/client/static/js/r-gd26x93y.js +1 -0
  117. package/dist/client/static/js/radar-RG4KPBEZ-52e5n99a.js +1 -0
  118. package/dist/client/static/js/railroad-74A4TZTK-44nqxxpy.js +1 -0
  119. package/dist/client/static/js/railroad-abnf-HS5TGJTU-25jxgwg7.js +1 -0
  120. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-64pqpf2y.js +1 -0
  121. package/dist/client/static/js/railroad-peg-WCYAUIDC-0p5sxzpx.js +1 -0
  122. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-wy2mgya6.js → railroadDiagram-XR7U4H2S-rw8cj5f3.js} +1 -1
  123. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-6z9xdgbq.js → requirementDiagram-PLB6GJNP-qyrse7mb.js} +1 -1
  124. package/dist/client/static/js/{ruby-r81ytgcm.js → ruby-qy8mhstq.js} +1 -1
  125. package/dist/client/static/js/{rust-frn3szvc.js → rust-fpshqnk0.js} +1 -1
  126. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-rtmxk3ys.js → sankeyDiagram-IPEJSGJF-254qr59q.js} +1 -1
  127. package/dist/client/static/js/{sass-9bxped7y.js → sass-kbwea482.js} +1 -1
  128. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-awzcrafg.js → sequenceDiagram-PO4LG4MO-y9xjxfc5.js} +3 -3
  129. package/dist/client/static/js/{sizeCapture-INFHLROL-03gy196j.js → sizeCapture-INFHLROL-sc5e60t3.js} +1 -1
  130. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-an8v3q5n.js → stateDiagram-v2-GCMORJYK-r134s4xr.js} +2 -2
  131. package/dist/client/static/js/{swimlanes-2SLR337P-n9yb4wcs.js → swimlanes-2SLR337P-xc7rbawt.js} +1 -1
  132. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-kdcdamkj.js +8 -0
  133. package/dist/client/static/js/{timeline-definition-EJHVYXUP-jceb575g.js → timeline-definition-EJHVYXUP-cgjd8shk.js} +2 -2
  134. package/dist/client/static/js/treeView-Q6P3EWNA-8j14nnd1.js +1 -0
  135. package/dist/client/static/js/treemap-WGGIJYW6-esf993kk.js +1 -0
  136. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-888h3100.js → usecaseDiagram-POWQR4AR-9qsmjhm6.js} +4 -4
  137. package/dist/client/static/js/{vennDiagram-UO4OBE2U-wbfz0rzv.js → vennDiagram-UO4OBE2U-4grw9awx.js} +1 -1
  138. package/dist/client/static/js/{vue-c0rtg1wf.js → vue-j8vb9d7r.js} +1 -1
  139. package/dist/client/static/js/wardley-WFR3VGLG-v4dxm2sb.js +1 -0
  140. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-rn8c5qf9.js → wardleyDiagram-VNRHLVJA-8gxy0wat.js} +1 -1
  141. package/dist/client/static/js/xml-0py2vkw7.js +1 -0
  142. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-8sn1apt6.js → xychartDiagram-PMCCYNJV-5sh7tdrx.js} +2 -2
  143. package/dist/client/static/js/yaml-vghdz0f0.js +1 -0
  144. package/package.json +1 -1
  145. package/src/client/components/settings/categories/ConnectSettings.tsx +8 -1
  146. package/src/client/components/settings/categories/connect-settings/CloudflareConfig.test.tsx +84 -0
  147. package/src/client/components/settings/categories/connect-settings/CloudflareConfig.tsx +68 -0
  148. package/src/client/components/settings/categories/connect-settings/PairDialog.test.tsx +159 -0
  149. package/src/client/components/settings/categories/connect-settings/PairDialog.tsx +40 -7
  150. package/src/client/components/workspace/git-panel/init-state.test.ts +5 -0
  151. package/src/client/hooks/chat/composer/speech-to-text.ts +24 -17
  152. package/src/client/hooks/connect/use-connect-status.ts +44 -19
  153. package/src/client/hooks/connect/use-pairing.ts +5 -0
  154. package/src/client/hooks/editor/file-actions.ts +3 -11
  155. package/src/client/hooks/editor/font.test.ts +2 -1
  156. package/src/client/hooks/editor/use-file-transfer.ts +2 -1
  157. package/src/client/lib/browser/download.ts +22 -0
  158. package/src/client/lib/notifications/watch.ts +4 -1
  159. package/src/server/lib/connect/cloudflared-config.server.ts +236 -0
  160. package/src/server/lib/connect/cloudflared-config.test.ts +245 -0
  161. package/src/server/lib/connect/cloudflared.lifecycle.test.ts +116 -15
  162. package/src/server/lib/connect/cloudflared.server.ts +53 -66
  163. package/src/server/lib/connect/pairing.server.ts +33 -0
  164. package/src/server/lib/connect/qr-png.server.test.ts +93 -0
  165. package/src/server/lib/connect/qr-png.server.ts +119 -0
  166. package/src/server/lib/connect/status.server.ts +10 -4
  167. package/src/server/routes/connect/index.ts +2 -0
  168. package/src/server/routes/connect/pair-qr.test.ts +72 -0
  169. package/src/server/routes/connect/pair-qr.ts +44 -0
  170. package/src/server/routes/connect/pair.ts +8 -2
  171. package/src/server/routes/connect/tunnels.test.ts +141 -0
  172. package/src/server/routes/connect/tunnels.ts +32 -7
  173. package/src/server/routes/notifications/stream.ts +11 -2
  174. package/src/shared/lib/connect/types.ts +7 -0
  175. package/src/shared/lib/dictation/capture-failure.test.ts +46 -0
  176. package/src/shared/lib/dictation/capture-failure.ts +36 -0
  177. package/dist/client/static/js/architecture-7GRP2DOG-fc9kmq1w.js +0 -1
  178. package/dist/client/static/js/css-6vj0d308.js +0 -1
  179. package/dist/client/static/js/cynefin-OW5HDTMX-a4t8992q.js +0 -1
  180. package/dist/client/static/js/eventmodeling-NTZA5JFV-18bdrkv5.js +0 -1
  181. package/dist/client/static/js/flowDiagram-KWPJA3E3-fg0yqx0h.js +0 -1
  182. package/dist/client/static/js/gitGraph-4MIJSDKK-8fa6y40p.js +0 -1
  183. package/dist/client/static/js/graphql-n43pd5fs.js +0 -1
  184. package/dist/client/static/js/html-dbrwss36.js +0 -1
  185. package/dist/client/static/js/index-6sf2vsp2.js +0 -1
  186. package/dist/client/static/js/info-A6RAGUB7-3hk844f7.js +0 -1
  187. package/dist/client/static/js/ini-j5dyq6gm.js +0 -1
  188. package/dist/client/static/js/java-g4dgwbfd.js +0 -1
  189. package/dist/client/static/js/jsx-7t5ecz9s.js +0 -1
  190. package/dist/client/static/js/lua-1g6w30de.js +0 -1
  191. package/dist/client/static/js/markdown-afx21x8c.js +0 -1
  192. package/dist/client/static/js/one-dark-pro-vwhfpzr8.js +0 -1
  193. package/dist/client/static/js/one-light-y5t9x6zh.js +0 -1
  194. package/dist/client/static/js/packet-AYTQ26CC-4nj2yy10.js +0 -1
  195. package/dist/client/static/js/pie-WAS4IAKB-k7rde3f9.js +0 -1
  196. package/dist/client/static/js/properties-thd83wey.js +0 -1
  197. package/dist/client/static/js/python-264ns4xw.js +0 -1
  198. package/dist/client/static/js/r-qw82kkv9.js +0 -1
  199. package/dist/client/static/js/radar-RG4KPBEZ-513dpw4f.js +0 -1
  200. package/dist/client/static/js/railroad-74A4TZTK-9bqnst9c.js +0 -1
  201. package/dist/client/static/js/railroad-abnf-HS5TGJTU-7367d5bv.js +0 -1
  202. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-b806b1mj.js +0 -1
  203. package/dist/client/static/js/railroad-peg-WCYAUIDC-5a67rwf8.js +0 -1
  204. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-nx5nfnf0.js +0 -8
  205. package/dist/client/static/js/treeView-Q6P3EWNA-kcy40evb.js +0 -1
  206. package/dist/client/static/js/treemap-WGGIJYW6-fsrvqxf4.js +0 -1
  207. package/dist/client/static/js/wardley-WFR3VGLG-36dmxww4.js +0 -1
  208. package/dist/client/static/js/xml-dz51p1m3.js +0 -1
  209. package/dist/client/static/js/yaml-2cfkd30t.js +0 -1
  210. package/src/server/lib/connect/cloudflared.server.test.ts +0 -65
@@ -1,9 +1,9 @@
1
- import{n,i,o,u,a,Ht,e,f,ae,Dn}from"./index-cgzrpvzj.js";function j(t,s){return{top:Math.min(t.row,s.row),left:Math.min(t.col,s.col),bottom:Math.max(t.row,s.row),right:Math.max(t.col,s.col)}}function q(t){return t.bottom-t.top+1}function z(t){return t.right-t.left+1}function H(t){let s=t+1,r="";while(s>0){let d=(s-1)%26;r=String.fromCharCode(65+d)+r,s=Math.floor((s-1)/26)}return r}function X(t){return`${H(t.col)}${t.row+1}`}function F(t){let s=X({row:t.top,col:t.left}),r=X({row:t.bottom,col:t.right});return s===r?s:`${s}:${r}`}function I(t,s,r){return{row:Math.min(Math.max(t.row,0),Math.max(s-1,0)),col:Math.min(Math.max(t.col,0),Math.max(r-1,0))}}function U(t,s,r,d,p){return I({row:t.row+s,col:t.col+r},d,p)}function W(t,s){if(t<=0||s<=0)return null;return{top:0,left:0,bottom:t-1,right:s-1}}function K(t,s){let r=[];for(let d=s.top;d<=s.bottom;d+=1){let p=[];for(let c=s.left;c<=s.right;c+=1){let g=t[d]?.[c]??"";p.push(/[\t\r\n"]/.test(g)?`"${g.replace(/"/g,'""')}"`:g)}r.push(p.join("\t"))}return r.join(`\r
2
- `)}function B(t,s){let[r,d]=n(null),[p,c]=n(null),[g,C]=n(!1),b=o(!1),m=a((v)=>I(v,t,s),[t,s]),y=a((v,E)=>{let G=m(v);if(E&&r)c(G);else d(G),c(G);b.current=!0,C(!0)},[r,m]),k=a((v)=>{if(!b.current)return;c(m(v))},[m]),N=a(()=>{b.current=!1,C(!1)},[]),T=a((v,E,G)=>{let S=U(p??{row:0,col:0},v,E,t,s);if(G&&r)c(S);else d(S),c(S)},[r,p,t,s]),A=a(()=>{let v=W(t,s);if(!v)return;d({row:v.top,col:v.left}),c({row:v.bottom,col:v.right})},[t,s]),L=a((v,E)=>{let G=m({row:t-1,col:v});if(E&&r)c(G);else d(m({row:0,col:v})),c(G)},[r,m,t]),P=a((v,E)=>{let G=m({row:v,col:s-1});if(E&&r)c(G);else d(m({row:v,col:0})),c(G)},[r,m,s]),l=a(()=>{d(null),c(null)},[]),x=u(()=>{if(!r||!p)return null;return j(m(r),m(p))},[r,p,m]),R=u(()=>p?m(p):null,[p,m]);return{range:x,active:R,dragging:g,begin:y,extendTo:k,endDrag:N,move:T,selectAll:A,selectColumn:L,selectRow:P,clear:l}}function Y(t){let[s,r]=n(null),d=a((C,b,m,y)=>{r({section:C,row:b,col:m,value:y,initial:y})},[]),p=a((C)=>{r((b)=>b?{...b,value:C}:b)},[]),c=a(()=>{if(s&&s.value!==s.initial)t(s);r(null)},[s,t]),g=a(()=>r(null),[]);return{edit:s,begin:d,change:p,commit:c,cancel:g}}function V(t){let s=t.target?.closest?.("[data-row][data-col]");if(!s)return null;return{row:Number(s.dataset.row),col:Number(s.dataset.col)}}function J({cells:t,width:s,selection:r,editor:d,scrollerRef:p,startEdit:c,onEditCell:g,setCopyState:C}){let b=d.edit,m=r.active;return{onPointerDown:(l)=>{if(l.button!==0)return;let x=l.target;if(x?.closest?.("[data-edit-input]"))return;if(b)d.commit();let R=V(l);if(R){p.current?.focus(),r.begin(R,l.shiftKey),l.preventDefault();return}let v=x?.closest?.("[data-col-header]");if(v){p.current?.focus(),r.selectColumn(Number(v.dataset.colHeader),l.shiftKey),l.preventDefault();return}let E=x?.closest?.("[data-row-header]");if(E){p.current?.focus(),r.selectRow(Number(E.dataset.rowHeader),l.shiftKey),l.preventDefault();return}if(x?.closest?.("[data-corner]"))p.current?.focus(),r.selectAll(),l.preventDefault()},onPointerOver:(l)=>{let x=V(l);if(x)r.extendTo(x)},onDoubleClick:(l)=>{let x=V(l);if(x){c("data",x.row,x.col);return}let R=l.target?.closest?.("[data-col-header]");if(R)c("header",0,Number(R.dataset.colHeader))},onInput:(l)=>{let x=l.target;if(x.matches?.("[data-edit-input]"))d.change(x.value)},onKeyDown:(l)=>{if(b){if(l.key==="Enter"){l.preventDefault(),d.commit(),r.move(l.shiftKey?-1:1,0,!1);return}if(l.key==="Tab"){l.preventDefault(),d.commit(),r.move(0,l.shiftKey?-1:1,!1);return}if(l.key==="Escape"){l.preventDefault(),d.cancel();return}return}let x=l.metaKey||l.ctrlKey;if(x&&l.key.toLowerCase()==="a"){l.preventDefault(),r.selectAll();return}if(l.key==="Escape"){r.clear();return}if(l.key==="Enter"||l.key==="F2"){if(!g||!m)return;l.preventDefault(),c("data",m.row,m.col);return}if(l.key==="Delete"||l.key==="Backspace"){if(!g||!m)return;l.preventDefault(),g(m.row,m.col,"");return}if(l.key.length===1&&!x&&!l.altKey){if(!g||!m)return;l.preventDefault(),c("data",m.row,m.col,l.key);return}let v={ArrowUp:[-1,0],ArrowDown:[1,0],ArrowLeft:[0,-1],ArrowRight:[0,1]}[l.key];if(v){l.preventDefault(),r.move(v[0],v[1],l.shiftKey);return}if(l.key==="Home"||l.key==="End"){l.preventDefault();let E=l.key==="Home"?0:s-1,G=x?l.key==="Home"?0:t.length-1:m?.row??0;r.move(G-(m?.row??0),E-(m?.col??0),l.shiftKey)}},onCopy:(l)=>{if(b)return;if(!r.range)return;l.clipboardData?.setData("text/plain",K(t,r.range)),l.preventDefault(),C("copied")},onPaste:(l)=>{if(b)return;l.preventDefault(),C("refused")}}}var Q=Ht(function({cells:s,rowIndex:r,selectedLeft:d,selectedRight:p,activeCol:c,editingCol:g,editingValue:C}){let b=d>=0;return e("tr",{className:"odd:bg-ink/[0.02]",children:[e("th",{"data-row-header":r,className:`cursor-pointer border-b border-r border-ink/10 px-2 py-0.5 text-right font-normal tabular-nums ${b?"bg-info/10 text-ink/60":"text-ink/30"}`,title:`Select row ${r+1}`,children:r+1}),s.map((m,y)=>{let k=b&&y>=d&&y<=p;return e("td",{"data-row":r,"data-col":y,title:m,className:`cursor-cell border-b border-ink/10 px-2 py-0.5 text-ink ${k?"bg-info/10":""} ${y===c?"ring-1 ring-inset ring-info":""}`,children:y===g?e("input",{"data-edit-input":"true",value:C,spellcheck:!1,className:"w-full min-w-0 bg-transparent font-mono text-[11px] text-ink outline-none"}):e("span",{className:"block truncate",children:m})},y)})]})});function Z({status:t,tone:s="muted",actions:r,canCopy:d,copyState:p,onCopy:c}){return e("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-ink/10 bg-canvas px-2 py-1 font-sans text-[11px]",children:[e("span",{className:`truncate ${s==="warning"?"text-warning":"text-ink/50"}`,children:t}),e("div",{className:"flex shrink-0 items-center gap-2",children:[r,e("button",{type:"button",onClick:c,disabled:!d,title:"Copy the selected cells as tab-separated text",className:`flex items-center gap-1 rounded px-1.5 py-0.5 transition-colors ${d?"text-ink/60 hover:bg-ink/5 hover:text-ink":"cursor-default text-ink/25"} ${p==="failed"?"text-error":""}`,children:[p==="copied"?e(f,{size:12}):e(ae,{size:12}),e("span",{children:p==="copied"?"Copied":p==="failed"?"Copy failed":"Copy"})]})]})]})}var ne=44,re=1600;function xc({header:t,rows:s,truncated:r,label:d,readOnlyNote:p,onEditCell:c,onEditHeader:g,actions:C}){let b=u(()=>s.reduce((h,w)=>Math.max(h,w.length),t.length),[t,s]),m=u(()=>Array.from({length:b},(h,w)=>t[w]??H(w)),[t,b]),y=u(()=>s.map((h)=>h.length===b?h:Array.from({length:b},(w,M)=>h[M]??"")),[s,b]),k=B(y.length,b),N=o(null),[T,A]=n("idle"),L=a((h)=>{if(h.section==="header")g?.(h.col,h.value);else c?.(h.row,h.col,h.value)},[c,g]),P=Y(L),l=P.edit,x=a((h,w,M,_)=>{if(h==="header"?!g:!c)return;let te=h==="header"?m[M]??"":y[w]?.[M]??"";P.begin(h,w,M,_??te)},[y,P,m,c,g]),R=a(async()=>{if(!k.range)return;let h=await Dn(K(y,k.range));A(h?"copied":"failed")},[y,k.range]);i(()=>{if(T==="idle")return;let h=setTimeout(()=>A("idle"),re);return()=>clearTimeout(h)},[T]);let{dragging:v,endDrag:E}=k;i(()=>{if(!v)return;let h=()=>E();return window.addEventListener("pointerup",h),window.addEventListener("pointercancel",h),()=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h)}},[v,E]);let G=k.active;i(()=>{if(!G)return;N.current?.querySelector(`[data-row="${G.row}"][data-col="${G.col}"]`)?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[G]);let O=l?`${l.section}:${l.row}:${l.col}`:"";i(()=>{if(!O)return;let h=N.current?.querySelector("[data-edit-input]");h?.focus(),h?.select()},[O]);let S=J({cells:y,width:b,selection:k,editor:P,scrollerRef:N,startEdit:x,onEditCell:c,setCopyState:A});if(b===0&&y.length===0)return e("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-xs text-ink/50",children:"This file has no rows."});let D=k.range,ee=T==="refused"?p??"This grid is read-only.":D?`${F(D)} · ${q(D)}×${z(D)}`:"Click a cell, drag to select a block";return e("div",{className:"flex min-h-0 flex-1 flex-col",children:[r&&e("div",{className:"shrink-0 border-b border-warning/30 bg-warning/10 px-3 py-1 font-sans text-[11px] text-warning",children:["Showing the first ",y.length.toLocaleString()," rows."]}),e(Z,{status:ee,tone:T==="refused"?"warning":"muted",actions:C,canCopy:D!==null,copyState:T,onCopy:()=>void R()}),e("div",{ref:N,tabIndex:0,role:"grid","aria-label":d??"Spreadsheet",className:"flex-1 overflow-auto outline-none",onPointerDown:S.onPointerDown,onPointerOver:S.onPointerOver,onDblClick:S.onDoubleClick,onInput:S.onInput,onKeyDown:S.onKeyDown,onCopy:S.onCopy,onPaste:S.onPaste,children:e("table",{className:"w-full table-fixed select-none border-collapse font-mono text-[11px]",children:[e("colgroup",{children:[e("col",{style:{width:`${ne}px`}}),m.map((h,w)=>e("col",{},w))]}),e("thead",{className:"sticky top-0 z-10 bg-canvas",children:e("tr",{children:[e("th",{"data-corner":!0,title:"Select all",className:"cursor-pointer border-b border-r border-ink/10 px-2 py-1 text-right font-normal text-ink/30",children:"#"}),m.map((h,w)=>{let M=D!==null&&w>=D.left&&w<=D.right,_=l?.section==="header"&&l.col===w;return e("th",{"data-col-header":w,title:h,className:`cursor-pointer border-b border-ink/10 px-2 py-1 text-left font-semibold ${M?"bg-info/10 text-ink":"text-ink/80"}`,children:_?e("input",{"data-edit-input":"true",value:l.value,spellcheck:!1,className:"w-full min-w-0 bg-transparent font-mono text-[11px] font-semibold text-ink outline-none"}):e("span",{className:"block truncate",children:h})},w)})]})}),e("tbody",{children:y.map((h,w)=>{let M=D!==null&&w>=D.top&&w<=D.bottom;return e(Q,{cells:h,rowIndex:w,selectedLeft:M?D.left:-1,selectedRight:M?D.right:-1,activeCol:G?.row===w?G.col:-1,editingCol:l?.section==="data"&&l.row===w?l.col:-1,editingValue:l?.section==="data"&&l.row===w?l.value:""},w)})})]})})]})}var Ym=2000,Jm=100;function oe(t,s){if(/\.tsv$/i.test(s??""))return"\t";let r=t.slice(0,t.indexOf(`
1
+ import{n,i,o,u,a,Ht,e,f,ae,nn}from"./index-75haaj8g.js";function j(t,s){return{top:Math.min(t.row,s.row),left:Math.min(t.col,s.col),bottom:Math.max(t.row,s.row),right:Math.max(t.col,s.col)}}function q(t){return t.bottom-t.top+1}function z(t){return t.right-t.left+1}function H(t){let s=t+1,r="";while(s>0){let d=(s-1)%26;r=String.fromCharCode(65+d)+r,s=Math.floor((s-1)/26)}return r}function X(t){return`${H(t.col)}${t.row+1}`}function F(t){let s=X({row:t.top,col:t.left}),r=X({row:t.bottom,col:t.right});return s===r?s:`${s}:${r}`}function I(t,s,r){return{row:Math.min(Math.max(t.row,0),Math.max(s-1,0)),col:Math.min(Math.max(t.col,0),Math.max(r-1,0))}}function U(t,s,r,d,p){return I({row:t.row+s,col:t.col+r},d,p)}function W(t,s){if(t<=0||s<=0)return null;return{top:0,left:0,bottom:t-1,right:s-1}}function K(t,s){let r=[];for(let d=s.top;d<=s.bottom;d+=1){let p=[];for(let c=s.left;c<=s.right;c+=1){let g=t[d]?.[c]??"";p.push(/[\t\r\n"]/.test(g)?`"${g.replace(/"/g,'""')}"`:g)}r.push(p.join("\t"))}return r.join(`\r
2
+ `)}function B(t,s){let[r,d]=n(null),[p,c]=n(null),[g,C]=n(!1),b=o(!1),m=a((v)=>I(v,t,s),[t,s]),y=a((v,E)=>{let G=m(v);if(E&&r)c(G);else d(G),c(G);b.current=!0,C(!0)},[r,m]),k=a((v)=>{if(!b.current)return;c(m(v))},[m]),N=a(()=>{b.current=!1,C(!1)},[]),T=a((v,E,G)=>{let S=U(p??{row:0,col:0},v,E,t,s);if(G&&r)c(S);else d(S),c(S)},[r,p,t,s]),A=a(()=>{let v=W(t,s);if(!v)return;d({row:v.top,col:v.left}),c({row:v.bottom,col:v.right})},[t,s]),L=a((v,E)=>{let G=m({row:t-1,col:v});if(E&&r)c(G);else d(m({row:0,col:v})),c(G)},[r,m,t]),P=a((v,E)=>{let G=m({row:v,col:s-1});if(E&&r)c(G);else d(m({row:v,col:0})),c(G)},[r,m,s]),l=a(()=>{d(null),c(null)},[]),x=u(()=>{if(!r||!p)return null;return j(m(r),m(p))},[r,p,m]),R=u(()=>p?m(p):null,[p,m]);return{range:x,active:R,dragging:g,begin:y,extendTo:k,endDrag:N,move:T,selectAll:A,selectColumn:L,selectRow:P,clear:l}}function Y(t){let[s,r]=n(null),d=a((C,b,m,y)=>{r({section:C,row:b,col:m,value:y,initial:y})},[]),p=a((C)=>{r((b)=>b?{...b,value:C}:b)},[]),c=a(()=>{if(s&&s.value!==s.initial)t(s);r(null)},[s,t]),g=a(()=>r(null),[]);return{edit:s,begin:d,change:p,commit:c,cancel:g}}function V(t){let s=t.target?.closest?.("[data-row][data-col]");if(!s)return null;return{row:Number(s.dataset.row),col:Number(s.dataset.col)}}function J({cells:t,width:s,selection:r,editor:d,scrollerRef:p,startEdit:c,onEditCell:g,setCopyState:C}){let b=d.edit,m=r.active;return{onPointerDown:(l)=>{if(l.button!==0)return;let x=l.target;if(x?.closest?.("[data-edit-input]"))return;if(b)d.commit();let R=V(l);if(R){p.current?.focus(),r.begin(R,l.shiftKey),l.preventDefault();return}let v=x?.closest?.("[data-col-header]");if(v){p.current?.focus(),r.selectColumn(Number(v.dataset.colHeader),l.shiftKey),l.preventDefault();return}let E=x?.closest?.("[data-row-header]");if(E){p.current?.focus(),r.selectRow(Number(E.dataset.rowHeader),l.shiftKey),l.preventDefault();return}if(x?.closest?.("[data-corner]"))p.current?.focus(),r.selectAll(),l.preventDefault()},onPointerOver:(l)=>{let x=V(l);if(x)r.extendTo(x)},onDoubleClick:(l)=>{let x=V(l);if(x){c("data",x.row,x.col);return}let R=l.target?.closest?.("[data-col-header]");if(R)c("header",0,Number(R.dataset.colHeader))},onInput:(l)=>{let x=l.target;if(x.matches?.("[data-edit-input]"))d.change(x.value)},onKeyDown:(l)=>{if(b){if(l.key==="Enter"){l.preventDefault(),d.commit(),r.move(l.shiftKey?-1:1,0,!1);return}if(l.key==="Tab"){l.preventDefault(),d.commit(),r.move(0,l.shiftKey?-1:1,!1);return}if(l.key==="Escape"){l.preventDefault(),d.cancel();return}return}let x=l.metaKey||l.ctrlKey;if(x&&l.key.toLowerCase()==="a"){l.preventDefault(),r.selectAll();return}if(l.key==="Escape"){r.clear();return}if(l.key==="Enter"||l.key==="F2"){if(!g||!m)return;l.preventDefault(),c("data",m.row,m.col);return}if(l.key==="Delete"||l.key==="Backspace"){if(!g||!m)return;l.preventDefault(),g(m.row,m.col,"");return}if(l.key.length===1&&!x&&!l.altKey){if(!g||!m)return;l.preventDefault(),c("data",m.row,m.col,l.key);return}let v={ArrowUp:[-1,0],ArrowDown:[1,0],ArrowLeft:[0,-1],ArrowRight:[0,1]}[l.key];if(v){l.preventDefault(),r.move(v[0],v[1],l.shiftKey);return}if(l.key==="Home"||l.key==="End"){l.preventDefault();let E=l.key==="Home"?0:s-1,G=x?l.key==="Home"?0:t.length-1:m?.row??0;r.move(G-(m?.row??0),E-(m?.col??0),l.shiftKey)}},onCopy:(l)=>{if(b)return;if(!r.range)return;l.clipboardData?.setData("text/plain",K(t,r.range)),l.preventDefault(),C("copied")},onPaste:(l)=>{if(b)return;l.preventDefault(),C("refused")}}}var Q=Ht(function({cells:s,rowIndex:r,selectedLeft:d,selectedRight:p,activeCol:c,editingCol:g,editingValue:C}){let b=d>=0;return e("tr",{className:"odd:bg-ink/[0.02]",children:[e("th",{"data-row-header":r,className:`cursor-pointer border-b border-r border-ink/10 px-2 py-0.5 text-right font-normal tabular-nums ${b?"bg-info/10 text-ink/60":"text-ink/30"}`,title:`Select row ${r+1}`,children:r+1}),s.map((m,y)=>{let k=b&&y>=d&&y<=p;return e("td",{"data-row":r,"data-col":y,title:m,className:`cursor-cell border-b border-ink/10 px-2 py-0.5 text-ink ${k?"bg-info/10":""} ${y===c?"ring-1 ring-inset ring-info":""}`,children:y===g?e("input",{"data-edit-input":"true",value:C,spellcheck:!1,className:"w-full min-w-0 bg-transparent font-mono text-[11px] text-ink outline-none"}):e("span",{className:"block truncate",children:m})},y)})]})});function Z({status:t,tone:s="muted",actions:r,canCopy:d,copyState:p,onCopy:c}){return e("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-ink/10 bg-canvas px-2 py-1 font-sans text-[11px]",children:[e("span",{className:`truncate ${s==="warning"?"text-warning":"text-ink/50"}`,children:t}),e("div",{className:"flex shrink-0 items-center gap-2",children:[r,e("button",{type:"button",onClick:c,disabled:!d,title:"Copy the selected cells as tab-separated text",className:`flex items-center gap-1 rounded px-1.5 py-0.5 transition-colors ${d?"text-ink/60 hover:bg-ink/5 hover:text-ink":"cursor-default text-ink/25"} ${p==="failed"?"text-error":""}`,children:[p==="copied"?e(f,{size:12}):e(ae,{size:12}),e("span",{children:p==="copied"?"Copied":p==="failed"?"Copy failed":"Copy"})]})]})]})}var ne=44,re=1600;function xc({header:t,rows:s,truncated:r,label:d,readOnlyNote:p,onEditCell:c,onEditHeader:g,actions:C}){let b=u(()=>s.reduce((h,w)=>Math.max(h,w.length),t.length),[t,s]),m=u(()=>Array.from({length:b},(h,w)=>t[w]??H(w)),[t,b]),y=u(()=>s.map((h)=>h.length===b?h:Array.from({length:b},(w,M)=>h[M]??"")),[s,b]),k=B(y.length,b),N=o(null),[T,A]=n("idle"),L=a((h)=>{if(h.section==="header")g?.(h.col,h.value);else c?.(h.row,h.col,h.value)},[c,g]),P=Y(L),l=P.edit,x=a((h,w,M,_)=>{if(h==="header"?!g:!c)return;let te=h==="header"?m[M]??"":y[w]?.[M]??"";P.begin(h,w,M,_??te)},[y,P,m,c,g]),R=a(async()=>{if(!k.range)return;let h=await nn(K(y,k.range));A(h?"copied":"failed")},[y,k.range]);i(()=>{if(T==="idle")return;let h=setTimeout(()=>A("idle"),re);return()=>clearTimeout(h)},[T]);let{dragging:v,endDrag:E}=k;i(()=>{if(!v)return;let h=()=>E();return window.addEventListener("pointerup",h),window.addEventListener("pointercancel",h),()=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h)}},[v,E]);let G=k.active;i(()=>{if(!G)return;N.current?.querySelector(`[data-row="${G.row}"][data-col="${G.col}"]`)?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[G]);let O=l?`${l.section}:${l.row}:${l.col}`:"";i(()=>{if(!O)return;let h=N.current?.querySelector("[data-edit-input]");h?.focus(),h?.select()},[O]);let S=J({cells:y,width:b,selection:k,editor:P,scrollerRef:N,startEdit:x,onEditCell:c,setCopyState:A});if(b===0&&y.length===0)return e("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-xs text-ink/50",children:"This file has no rows."});let D=k.range,ee=T==="refused"?p??"This grid is read-only.":D?`${F(D)} · ${q(D)}×${z(D)}`:"Click a cell, drag to select a block";return e("div",{className:"flex min-h-0 flex-1 flex-col",children:[r&&e("div",{className:"shrink-0 border-b border-warning/30 bg-warning/10 px-3 py-1 font-sans text-[11px] text-warning",children:["Showing the first ",y.length.toLocaleString()," rows."]}),e(Z,{status:ee,tone:T==="refused"?"warning":"muted",actions:C,canCopy:D!==null,copyState:T,onCopy:()=>void R()}),e("div",{ref:N,tabIndex:0,role:"grid","aria-label":d??"Spreadsheet",className:"flex-1 overflow-auto outline-none",onPointerDown:S.onPointerDown,onPointerOver:S.onPointerOver,onDblClick:S.onDoubleClick,onInput:S.onInput,onKeyDown:S.onKeyDown,onCopy:S.onCopy,onPaste:S.onPaste,children:e("table",{className:"w-full table-fixed select-none border-collapse font-mono text-[11px]",children:[e("colgroup",{children:[e("col",{style:{width:`${ne}px`}}),m.map((h,w)=>e("col",{},w))]}),e("thead",{className:"sticky top-0 z-10 bg-canvas",children:e("tr",{children:[e("th",{"data-corner":!0,title:"Select all",className:"cursor-pointer border-b border-r border-ink/10 px-2 py-1 text-right font-normal text-ink/30",children:"#"}),m.map((h,w)=>{let M=D!==null&&w>=D.left&&w<=D.right,_=l?.section==="header"&&l.col===w;return e("th",{"data-col-header":w,title:h,className:`cursor-pointer border-b border-ink/10 px-2 py-1 text-left font-semibold ${M?"bg-info/10 text-ink":"text-ink/80"}`,children:_?e("input",{"data-edit-input":"true",value:l.value,spellcheck:!1,className:"w-full min-w-0 bg-transparent font-mono text-[11px] font-semibold text-ink outline-none"}):e("span",{className:"block truncate",children:h})},w)})]})}),e("tbody",{children:y.map((h,w)=>{let M=D!==null&&w>=D.top&&w<=D.bottom;return e(Q,{cells:h,rowIndex:w,selectedLeft:M?D.left:-1,selectedRight:M?D.right:-1,activeCol:G?.row===w?G.col:-1,editingCol:l?.section==="data"&&l.row===w?l.col:-1,editingValue:l?.section==="data"&&l.row===w?l.value:""},w)})})]})})]})}var Jm=2000,Zm=100;function oe(t,s){if(/\.tsv$/i.test(s??""))return"\t";let r=t.slice(0,t.indexOf(`
3
3
  `)===-1?t.length:t.indexOf(`
4
4
  `)),d=0,p=0,c=!1;for(let g=0;g<r.length;g+=1){let C=r[g];if(C==='"')c=!c;else if(!c&&C==="\t")d+=1;else if(!c&&C===",")p+=1}return d>p?"\t":","}function ie(t,s,r){let d=[],p=[],c="",g=!1,C=0,b=()=>{if(C<r)p.push(c);c="",C+=1},m=()=>{b(),d.push(p),p=[],C=0};for(let y=0;y<t.length;y+=1){let k=t[y];if(g){if(k==='"')if(t[y+1]==='"')c+='"',y+=1;else g=!1;else c+=k;continue}if(k==='"'&&c.length===0){g=!0;continue}if(k===s){b();continue}if(k==="\r"){if(t[y+1]===`
5
5
  `)y+=1;m();continue}if(k===`
6
- `){m();continue}c+=k}if(c.length>0||p.length>0)m();return d}function eA(t,s){let r=oe(t,s),d=ie(t,r,100),p=d.length>2000,c=p?d.slice(0,2000):d,[g=[],...C]=c,b=g.length,m=C.map((y)=>y.length===b?y:le(y,b));return{header:g,rows:m,truncated:p,delimiter:r}}function le(t,s){if(t.length>s)return t.slice(0,s);let r=t.slice();while(r.length<s)r.push("");return r}function Zm(t,s,r,d=!1){let p=(C)=>C.includes(r)||/["\r\n]/.test(C)?`"${C.replace(/"/g,'""')}"`:C,c=(C)=>{let b=C.length;while(b>1&&C[b-1]==="")b-=1;return C.slice(0,b).map(p).join(r)},g=[t,...s].map(c).join(`
6
+ `){m();continue}c+=k}if(c.length>0||p.length>0)m();return d}function tA(t,s){let r=oe(t,s),d=ie(t,r,100),p=d.length>2000,c=p?d.slice(0,2000):d,[g=[],...C]=c,b=g.length,m=C.map((y)=>y.length===b?y:le(y,b));return{header:g,rows:m,truncated:p,delimiter:r}}function le(t,s){if(t.length>s)return t.slice(0,s);let r=t.slice();while(r.length<s)r.push("");return r}function Xm(t,s,r,d=!1){let p=(C)=>C.includes(r)||/["\r\n]/.test(C)?`"${C.replace(/"/g,'""')}"`:C,c=(C)=>{let b=C.length;while(b>1&&C[b-1]==="")b-=1;return C.slice(0,b).map(p).join(r)},g=[t,...s].map(c).join(`
7
7
  `);return d?`${g}
8
8
  `:g}function wc(t,s,r,d){return t.map((p,c)=>{if(c!==s)return p;let g=p.slice();while(g.length<=r)g.push("");return g[r]=d,g})}
9
- export{xc,Ym,Jm,eA,Zm,wc};
9
+ export{xc,Jm,Zm,tA,Xm,wc};
@@ -0,0 +1 @@
1
+ import{Mn,Ni,Dm,es,so,Js,qu,Zs,Kf,Hu,Qm,Nm,Rm,Fm,Jg,Xs,Wu,Zg,Ku,Br,Xg}from"./index-75haaj8g.js";export{Zs as IndentContext,Xg as StreamLanguage,Ku as bracketMatching,Xs as codeFolding,Rm as foldAll,Qm as foldCode,Wu as foldGutter,Jg as foldKeymap,Hu as foldService,so as getIndentUnit,qu as getIndentation,Zg as highlightingFor,Kf as indentOnInput,Dm as indentService,Js as indentString,es as indentUnit,Ni as language,Br as matchBrackets,Mn as syntaxTree,Fm as unfoldAll,Nm as unfoldCode};
@@ -1,2 +1,2 @@
1
- var n=Object.freeze(JSON.parse(`{"displayName":"INI","name":"ini","patterns":[{"begin":"(^[\\\\t ]+)?(?=#)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.ini"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.ini"}},"end":"\\\\n","name":"comment.line.number-sign.ini"}]},{"begin":"(^[\\\\t ]+)?(?=;)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.ini"}},"end":"(?!\\\\G)","patterns":[{"begin":";","beginCaptures":{"0":{"name":"punctuation.definition.comment.ini"}},"end":"\\\\n","name":"comment.line.semicolon.ini"}]},{"captures":{"1":{"name":"keyword.other.definition.ini"},"2":{"name":"punctuation.separator.key-value.ini"}},"match":"\\\\b([-.0-9A-Z_a-z]+)\\\\b\\\\s*(=)"},{"captures":{"1":{"name":"punctuation.definition.entity.ini"},"3":{"name":"punctuation.definition.entity.ini"}},"match":"^(\\\\[)(.*?)(])","name":"entity.name.section.group-title.ini"},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ini"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.ini"}},"name":"string.quoted.single.ini","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.ini"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ini"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.ini"}},"name":"string.quoted.double.ini"}],"scopeName":"source.ini","aliases":["properties"]}`)),BA=[n];
2
- export{BA};
1
+ var n=Object.freeze(JSON.parse(`{"displayName":"INI","name":"ini","patterns":[{"begin":"(^[\\\\t ]+)?(?=#)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.ini"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.ini"}},"end":"\\\\n","name":"comment.line.number-sign.ini"}]},{"begin":"(^[\\\\t ]+)?(?=;)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.ini"}},"end":"(?!\\\\G)","patterns":[{"begin":";","beginCaptures":{"0":{"name":"punctuation.definition.comment.ini"}},"end":"\\\\n","name":"comment.line.semicolon.ini"}]},{"captures":{"1":{"name":"keyword.other.definition.ini"},"2":{"name":"punctuation.separator.key-value.ini"}},"match":"\\\\b([-.0-9A-Z_a-z]+)\\\\b\\\\s*(=)"},{"captures":{"1":{"name":"punctuation.definition.entity.ini"},"3":{"name":"punctuation.definition.entity.ini"}},"match":"^(\\\\[)(.*?)(])","name":"entity.name.section.group-title.ini"},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ini"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.ini"}},"name":"string.quoted.single.ini","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.ini"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ini"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.ini"}},"name":"string.quoted.double.ini"}],"scopeName":"source.ini","aliases":["properties"]}`)),IA=[n];
2
+ export{IA};
@@ -1,2 +1,2 @@
1
- import{t,xs,h,Es}from"./index-fta1y9pc.js";import{an}from"./index-pm6xxwz1.js";var o=an(Es(),1);var Oi=t((s,e)=>{let r=s.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name)r.attr("name",e.name);if(e.rx)r.attr("rx",e.rx);if(e.ry)r.attr("ry",e.ry);if(e.attrs!==void 0)for(let a in e.attrs)r.attr(a,e.attrs[a]);if(e.class)r.attr("class",e.class);return r},"drawRect"),fu=t((s,e)=>{let r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};Oi(s,r).lower()},"drawBackgroundRect"),dA=t((s,e)=>{let r=e.text.replace(xs," "),a=s.append("text");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("class","legend"),a.style("text-anchor",e.anchor),e.class)a.attr("class",e.class);let i=a.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),a},"drawText"),Qd=t((s,e,r,a)=>{let i=s.append("image");i.attr("x",e),i.attr("y",r);let n=o.sanitizeUrl(a);i.attr("xlink:href",n)},"drawImage"),Nd=t((s,e,r,a)=>{let i=s.append("use");i.attr("x",e),i.attr("y",r);let n=o.sanitizeUrl(a);i.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),tr=t(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Rd=t(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),Na=t(()=>{let s=h(".mermaidTooltip");if(s.empty())s=h("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100");return s},"createTooltip");
2
- export{Oi,fu,dA,Qd,Nd,tr,Rd,Na};
1
+ import{t,xs,h,Es}from"./index-ctgefatv.js";import{on}from"./index-zp73zexp.js";var o=on(Es(),1);var Oi=t((s,e)=>{let r=s.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name)r.attr("name",e.name);if(e.rx)r.attr("rx",e.rx);if(e.ry)r.attr("ry",e.ry);if(e.attrs!==void 0)for(let a in e.attrs)r.attr(a,e.attrs[a]);if(e.class)r.attr("class",e.class);return r},"drawRect"),fu=t((s,e)=>{let r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};Oi(s,r).lower()},"drawBackgroundRect"),pA=t((s,e)=>{let r=e.text.replace(xs," "),a=s.append("text");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("class","legend"),a.style("text-anchor",e.anchor),e.class)a.attr("class",e.class);let i=a.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),a},"drawText"),Qd=t((s,e,r,a)=>{let i=s.append("image");i.attr("x",e),i.attr("y",r);let n=o.sanitizeUrl(a);i.attr("xlink:href",n)},"drawImage"),Nd=t((s,e,r,a)=>{let i=s.append("use");i.attr("x",e),i.attr("y",r);let n=o.sanitizeUrl(a);i.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),tr=t(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Rd=t(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),Na=t(()=>{let s=h(".mermaidTooltip");if(s.empty())s=h("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100");return s},"createTooltip");
2
+ export{Oi,fu,pA,Qd,Nd,tr,Rd,Na};
@@ -1 +1 @@
1
- import{n,i,o,u,a,e,DA,we,S,ir,or,I,m,Vt,Yt,Ce,Gr,C,F,J,ee}from"./index-cgzrpvzj.js";import{fr}from"./index-f7jhhqtk.js";function K({sections:c,selected:t,onSelect:l}){let[r,d]=n(""),k=u(()=>{let p=r.trim().toLowerCase();if(!p)return c;return c.map((x)=>({...x,links:x.links.filter((s)=>s.label.toLowerCase().includes(p)||(s.path??s.target).toLowerCase().includes(p))})).filter((x)=>x.links.length>0)},[c,r]),f=c.some((p)=>p.links.length>0);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-canvas/40",children:[e("div",{className:"flex items-center gap-1.5 border-b border-ink/10 px-2 py-1.5 flex-shrink-0",children:[e(F,{size:11,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"text",value:r,onChange:(p)=>d(p.currentTarget.value),placeholder:"Filter pages…",title:"Filter wiki pages",className:"w-full min-w-0 bg-transparent text-xs text-ink outline-none placeholder-ink/40"}),r&&e("button",{type:"button",onClick:()=>d(""),title:"Clear filter",className:"flex-shrink-0 text-ink/40 hover:text-ink",children:"×"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:k.length===0?e("p",{className:"px-3 py-2 text-[11px] italic text-ink/40",children:f?"No page matches the filter":"This wiki has no pages"}):k.map((p,x)=>e("div",{className:"py-0.5",children:[p.title&&e("div",{className:"px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wider text-ink/40",children:p.title}),p.links.map((s,h)=>{let v=s.path!==null&&s.path===t,b=`${s.path??s.target}-${h}`;if(s.path)return e("button",{type:"button",onClick:()=>l(s.path),title:s.path,"aria-current":v?"page":void 0,className:`flex w-full items-center gap-1 px-2.5 py-1 text-left text-xs transition-colors ${v?"bg-ink/8 font-medium text-ink":"text-ink/70 hover:bg-ink/5 hover:text-ink"}`,children:e("span",{className:"truncate",children:s.label})},b);if(s.url)return e("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",title:s.url,className:"flex w-full items-center gap-1 px-2.5 py-1 text-left text-xs text-ink/70 hover:bg-ink/5 hover:text-ink",children:[e("span",{className:"truncate",children:s.label}),e(Ce,{size:10,className:"flex-shrink-0 text-ink/30"})]},b);return e("div",{title:`Not in this wiki: ${s.target}`,className:"flex w-full items-center px-2.5 py-1 text-left text-xs text-ink/35 line-through decoration-ink/20",children:e("span",{className:"truncate",children:s.label})},b)}),p.notes.map((s,h)=>e("p",{className:"px-2.5 py-0.5 text-[10px] leading-snug text-ink/50",children:s},`note-${h}`))]},`${p.title??"links"}-${x}`))})]})}function q({open:c,onClick:t}){return e("button",{type:"button",onClick:t,title:"Browse wiki pages","aria-label":"Browse wiki pages","aria-expanded":c,className:"absolute bottom-3 right-3 z-20 flex h-9 w-9 items-center justify-center rounded-full border border-ink/20 bg-paper text-ink/60 shadow-sm transition-all hover:bg-ink/5 hover:text-ink active:scale-95",children:e(Gr,{size:16})})}function V({open:c,sections:t,selected:l,onSelect:r,onClose:d}){if(i(()=>{if(!c)return;let k=(f)=>{if(f.key==="Escape")d()};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[c,d]),!c)return null;return e(J,{onClose:d,maxWidthClass:"max-w-sm",zClass:"z-[70]",ariaLabel:"Wiki pages",header:e("div",{className:"flex min-w-0 items-center gap-2",children:[e(Gr,{size:15,className:"flex-shrink-0 text-ink/50"}),e("span",{className:"text-sm font-medium",children:"Wiki pages"})]}),children:e("div",{className:"flex h-[60vh] min-h-0 flex-col",children:e(K,{sections:t,selected:l,onSelect:(k)=>{r(k),d()}})})})}function re(c,t){if(!c.webUrl)return null;let r=(t.split("/").pop()??t).replace(/\.(md|markdown)$/i,"");return c.provider==="gitlab"?`${c.webUrl.replace(/\/home$/,"")}/${encodeURIComponent(t.replace(/\.(md|markdown)$/i,""))}`:`${c.webUrl}/${encodeURIComponent(r)}`}function G({repo:c,entries:t,path:l,page:r,isLoading:d,error:k,rootPath:f,repoScope:p,onNavigate:x,onBack:s}){let h=re(c,l),v=u(()=>({path:l,entries:t,root:f,repo:p}),[l,t,f,p]);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-paper",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2.5 py-1.5",children:[s&&e("button",{type:"button",onClick:s,title:"Back to the page list","aria-label":"Back to the page list",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink @[520px]:hidden",children:e(Vt,{size:13})}),e("span",{className:"min-w-0 flex-1 truncate text-[11px] text-ink/50",title:l,children:l}),d&&e(m,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"}),h&&e("a",{href:h,target:"_blank",rel:"noopener noreferrer",title:"Open this page on the wiki host","aria-label":"Open this page on the wiki host",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink",children:e(Ce,{size:13})})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:k?e("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[e(I,{size:16,className:"text-error"}),e("p",{className:"text-xs text-error",children:k})]}):!r?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:d?"Loading page…":"No page selected"}):e("article",{className:"mx-auto max-w-4xl px-5 py-4",children:[e(ee,{content:r.content,className:"max-w-none",wikiScope:v,onWikiNavigate:x}),r.truncated&&e("p",{className:"mt-4 border-t border-ink/10 pt-2 text-[11px] text-ink/50",children:"This page is longer than the reader's budget and was cut off."})]})})]})}function B(c,t){return`${c??""}\x00${t}`}function X(c,t){let l=new URLSearchParams;if(c)l.set("root",c);if(t&&t!==".")l.set("repo",t);return l}function H(c){let{rootPath:t,repo:l,enabled:r,active:d,revisionKey:k=0}=c,f=B(t,l),[p,x]=n(null),s=o(f);s.current=f;let h=we(DA(f),{enabled:r&&d}),{refresh:v}=h;i(()=>{x(null)},[f]);let b=a((P)=>{if(!r)return;if(!P?.force){v();return}let y=s.current,R=X(t,l);R.set("refresh","1"),fetch(`/api/wiki?${R.toString()}`).then(async(w)=>{let N=await w.json();if(!w.ok)throw Error(N?.error||`Wiki request failed (${w.status})`)}).then(()=>{if(s.current!==y)return;x(null),v()}).catch((w)=>{if(s.current!==y)return;x(w instanceof Error?w.message:"Failed to load the wiki")})},[r,t,l,v]);return i(()=>{if(k>0)v()},[k]),{data:h.data,isLoading:h.isLoading,refreshing:h.refreshing,error:p,reload:b}}function Q(c){let{rootPath:t,repo:l,path:r,enabled:d,active:k,revisionKey:f=0}=c,p=`${B(t,l)}\x00${r??""}`,[x,s]=n({scope:p,data:null}),[h,v]=n(!1),[b,P]=n(null),y=o(0);return i(()=>{if(!d||!k||!r){s({scope:p,data:null}),P(null);return}let R=++y.current;v(!0);let w=X(t,l);w.set("path",r),fetch(`/api/wiki/page?${w.toString()}`).then(async(N)=>{let T=await N.json();if(!N.ok)throw Error(T?.error||`Page request failed (${N.status})`);return T}).then((N)=>{if(y.current!==R)return;s({scope:p,data:N}),P(null)}).catch((N)=>{if(y.current!==R)return;P(N instanceof Error?N.message:"Failed to load the page")}).finally(()=>{if(y.current===R)v(!1)})},[p,t,l,r,d,k,f]),{data:x.scope===p?x.data:null,isLoading:h,error:b}}function Y(c){let t=[];for(let l of c){if(!l.isMarkdown)continue;let r=t[t.length-1],d={label:l.title,target:l.path,path:l.path,url:null};if(r&&r.title===(l.folder||"Pages")){r.links.push(d);continue}t.push({title:l.folder||"Pages",links:[d],notes:[]})}return t}var ae={"no-remote":"This repository has no origin remote, so there is no wiki to find.","unsupported-remote":"The origin remote is not a URL a wiki can be derived from.","no-wiki":"This project has no wiki (or Kabmo cannot read it).",unreachable:"The wiki could not be reached."};function Oe({className:c="",enabled:t=!0,active:l=!0,rootPath:r,refreshKey:d=0,layout:k="desktop"}){let f=k==="phone",{activeRepo:p,setActiveRepo:x}=ir(r),{repos:s,scanning:h,rescan:v}=or(r,t),b=B(r,p),[P,y]=S("wiki.selectedPage",null),[R,w]=n(!1),[N,T]=n(!1),[Z,te]=n(0),g=H({rootPath:r,repo:p,enabled:t,active:l,revisionKey:d}),z=g.data?.entries??[],A=u(()=>z.filter((L)=>L.isMarkdown),[z]),M=u(()=>g.data?.sidebar??Y(z),[g.data?.sidebar,z]),ie=u(()=>M.some((L)=>L.links.length>0),[M]),_=P&&P.scope===b?P.path:null,E=u(()=>{if(_&&A.some((j)=>j.path===_))return _;return(A.find((j)=>j.title.toLowerCase()==="home")??A[0])?.path??null},[_,A]),O=Q({rootPath:r,repo:p,path:E,enabled:t,active:l,revisionKey:Z});i(()=>{if(!E||E===_)return;y({scope:b,path:E})},[E,_,b,y]),i(()=>{w(!1),T(!1)},[b]);let D=(L)=>{if(y({scope:b,path:L}),!f)T(!0)},ne=()=>{g.reload({force:!0}),te((L)=>L+1)},W=g.data?.repo??null,U=g.data&&!W?g.data:null;if(!t)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${c}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});return e("div",{className:`@container flex h-full min-h-0 w-full flex-col bg-paper text-xs text-ink ${c}`,children:[e("div",{className:"flex flex-shrink-0 items-center justify-between gap-2 border-b border-ink/10 px-2 py-1.5",children:[e("div",{className:"flex min-w-0 items-center gap-1.5",children:[e(fr,{rootPath:r,activeRepo:p,onSelectRepo:x,repos:s,scanning:h,onRefreshRepos:v}),W&&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",title:`${W.host}/${W.slug} · ${W.revision.slice(0,8)}`,children:W.provider})]}),e("div",{className:"flex flex-shrink-0 items-center gap-0.5",children:[W?.webUrl&&e("a",{href:W.webUrl,target:"_blank",rel:"noopener noreferrer",title:"Open the wiki on its host","aria-label":"Open the wiki on its host",className:"rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink",children:e(Ce,{size:13})}),e("button",{type:"button",onClick:ne,disabled:g.isLoading,title:"Re-fetch the wiki","aria-label":"Re-fetch the wiki",className:"rounded p-1 text-ink/60 transition-colors hover:bg-ink/5 hover:text-ink disabled:opacity-50",children:e(C,{size:13,className:g.isLoading||g.refreshing?"animate-spin":""})})]})]}),g.error&&!g.data?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(I,{size:16,className:"text-error"}),e("p",{className:"text-error",children:g.error}),e("button",{type:"button",onClick:()=>g.reload(),className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!g.data?e("div",{className:"flex flex-1 items-center justify-center gap-2 text-ink/40",children:[e(m,{size:14,className:"animate-spin"}),e("span",{children:"Reading the wiki…"})]}):U?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(Yt,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:ae[U.reason??"no-wiki"]}),U.detail&&e("p",{className:"max-w-sm break-words font-mono text-[10px] text-ink/40",children:U.detail})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`${f?"hidden":N?"hidden @[520px]:flex":"flex"} min-h-0 w-full flex-col @[520px]:w-52 @[520px]:flex-shrink-0 @[520px]:border-l @[520px]:border-ink/10`,children:e(K,{sections:M,selected:E,onSelect:D})}),e("div",{className:`relative min-w-0 min-h-0 flex-1 ${f?"flex":N?"flex":"hidden @[520px]:flex"} flex-col`,children:[W&&E?e(G,{repo:W,entries:z,path:E,page:O.data,isLoading:O.isLoading,error:O.error,rootPath:r,repoScope:p,onNavigate:D,onBack:f?void 0:()=>T(!1)}):e("div",{className:"flex h-full items-center justify-center px-6 text-center text-[11px] text-ink/40",children:"This wiki has no markdown pages."}),f&&ie&&e(q,{open:R,onClick:()=>w(!0)}),e(V,{open:R,sections:M,selected:E,onSelect:D,onClose:()=>w(!1)})]})]})]})}export{Oe as WikiPanel};
1
+ import{n,i,o,u,a,e,QA,we,S,ir,or,I,m,Vt,Yt,Ce,Gr,C,F,J,ee}from"./index-75haaj8g.js";import{fr}from"./index-ktvbsj6w.js";function K({sections:c,selected:t,onSelect:l}){let[r,d]=n(""),k=u(()=>{let p=r.trim().toLowerCase();if(!p)return c;return c.map((x)=>({...x,links:x.links.filter((s)=>s.label.toLowerCase().includes(p)||(s.path??s.target).toLowerCase().includes(p))})).filter((x)=>x.links.length>0)},[c,r]),f=c.some((p)=>p.links.length>0);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-canvas/40",children:[e("div",{className:"flex items-center gap-1.5 border-b border-ink/10 px-2 py-1.5 flex-shrink-0",children:[e(F,{size:11,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"text",value:r,onChange:(p)=>d(p.currentTarget.value),placeholder:"Filter pages…",title:"Filter wiki pages",className:"w-full min-w-0 bg-transparent text-xs text-ink outline-none placeholder-ink/40"}),r&&e("button",{type:"button",onClick:()=>d(""),title:"Clear filter",className:"flex-shrink-0 text-ink/40 hover:text-ink",children:"×"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:k.length===0?e("p",{className:"px-3 py-2 text-[11px] italic text-ink/40",children:f?"No page matches the filter":"This wiki has no pages"}):k.map((p,x)=>e("div",{className:"py-0.5",children:[p.title&&e("div",{className:"px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wider text-ink/40",children:p.title}),p.links.map((s,h)=>{let v=s.path!==null&&s.path===t,b=`${s.path??s.target}-${h}`;if(s.path)return e("button",{type:"button",onClick:()=>l(s.path),title:s.path,"aria-current":v?"page":void 0,className:`flex w-full items-center gap-1 px-2.5 py-1 text-left text-xs transition-colors ${v?"bg-ink/8 font-medium text-ink":"text-ink/70 hover:bg-ink/5 hover:text-ink"}`,children:e("span",{className:"truncate",children:s.label})},b);if(s.url)return e("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",title:s.url,className:"flex w-full items-center gap-1 px-2.5 py-1 text-left text-xs text-ink/70 hover:bg-ink/5 hover:text-ink",children:[e("span",{className:"truncate",children:s.label}),e(Ce,{size:10,className:"flex-shrink-0 text-ink/30"})]},b);return e("div",{title:`Not in this wiki: ${s.target}`,className:"flex w-full items-center px-2.5 py-1 text-left text-xs text-ink/35 line-through decoration-ink/20",children:e("span",{className:"truncate",children:s.label})},b)}),p.notes.map((s,h)=>e("p",{className:"px-2.5 py-0.5 text-[10px] leading-snug text-ink/50",children:s},`note-${h}`))]},`${p.title??"links"}-${x}`))})]})}function q({open:c,onClick:t}){return e("button",{type:"button",onClick:t,title:"Browse wiki pages","aria-label":"Browse wiki pages","aria-expanded":c,className:"absolute bottom-3 right-3 z-20 flex h-9 w-9 items-center justify-center rounded-full border border-ink/20 bg-paper text-ink/60 shadow-sm transition-all hover:bg-ink/5 hover:text-ink active:scale-95",children:e(Gr,{size:16})})}function V({open:c,sections:t,selected:l,onSelect:r,onClose:d}){if(i(()=>{if(!c)return;let k=(f)=>{if(f.key==="Escape")d()};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[c,d]),!c)return null;return e(J,{onClose:d,maxWidthClass:"max-w-sm",zClass:"z-[70]",ariaLabel:"Wiki pages",header:e("div",{className:"flex min-w-0 items-center gap-2",children:[e(Gr,{size:15,className:"flex-shrink-0 text-ink/50"}),e("span",{className:"text-sm font-medium",children:"Wiki pages"})]}),children:e("div",{className:"flex h-[60vh] min-h-0 flex-col",children:e(K,{sections:t,selected:l,onSelect:(k)=>{r(k),d()}})})})}function re(c,t){if(!c.webUrl)return null;let r=(t.split("/").pop()??t).replace(/\.(md|markdown)$/i,"");return c.provider==="gitlab"?`${c.webUrl.replace(/\/home$/,"")}/${encodeURIComponent(t.replace(/\.(md|markdown)$/i,""))}`:`${c.webUrl}/${encodeURIComponent(r)}`}function G({repo:c,entries:t,path:l,page:r,isLoading:d,error:k,rootPath:f,repoScope:p,onNavigate:x,onBack:s}){let h=re(c,l),v=u(()=>({path:l,entries:t,root:f,repo:p}),[l,t,f,p]);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-paper",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2.5 py-1.5",children:[s&&e("button",{type:"button",onClick:s,title:"Back to the page list","aria-label":"Back to the page list",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink @[520px]:hidden",children:e(Vt,{size:13})}),e("span",{className:"min-w-0 flex-1 truncate text-[11px] text-ink/50",title:l,children:l}),d&&e(m,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"}),h&&e("a",{href:h,target:"_blank",rel:"noopener noreferrer",title:"Open this page on the wiki host","aria-label":"Open this page on the wiki host",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink",children:e(Ce,{size:13})})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:k?e("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[e(I,{size:16,className:"text-error"}),e("p",{className:"text-xs text-error",children:k})]}):!r?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:d?"Loading page…":"No page selected"}):e("article",{className:"mx-auto max-w-4xl px-5 py-4",children:[e(ee,{content:r.content,className:"max-w-none",wikiScope:v,onWikiNavigate:x}),r.truncated&&e("p",{className:"mt-4 border-t border-ink/10 pt-2 text-[11px] text-ink/50",children:"This page is longer than the reader's budget and was cut off."})]})})]})}function B(c,t){return`${c??""}\x00${t}`}function X(c,t){let l=new URLSearchParams;if(c)l.set("root",c);if(t&&t!==".")l.set("repo",t);return l}function H(c){let{rootPath:t,repo:l,enabled:r,active:d,revisionKey:k=0}=c,f=B(t,l),[p,x]=n(null),s=o(f);s.current=f;let h=we(QA(f),{enabled:r&&d}),{refresh:v}=h;i(()=>{x(null)},[f]);let b=a((P)=>{if(!r)return;if(!P?.force){v();return}let y=s.current,R=X(t,l);R.set("refresh","1"),fetch(`/api/wiki?${R.toString()}`).then(async(w)=>{let N=await w.json();if(!w.ok)throw Error(N?.error||`Wiki request failed (${w.status})`)}).then(()=>{if(s.current!==y)return;x(null),v()}).catch((w)=>{if(s.current!==y)return;x(w instanceof Error?w.message:"Failed to load the wiki")})},[r,t,l,v]);return i(()=>{if(k>0)v()},[k]),{data:h.data,isLoading:h.isLoading,refreshing:h.refreshing,error:p,reload:b}}function Q(c){let{rootPath:t,repo:l,path:r,enabled:d,active:k,revisionKey:f=0}=c,p=`${B(t,l)}\x00${r??""}`,[x,s]=n({scope:p,data:null}),[h,v]=n(!1),[b,P]=n(null),y=o(0);return i(()=>{if(!d||!k||!r){s({scope:p,data:null}),P(null);return}let R=++y.current;v(!0);let w=X(t,l);w.set("path",r),fetch(`/api/wiki/page?${w.toString()}`).then(async(N)=>{let T=await N.json();if(!N.ok)throw Error(T?.error||`Page request failed (${N.status})`);return T}).then((N)=>{if(y.current!==R)return;s({scope:p,data:N}),P(null)}).catch((N)=>{if(y.current!==R)return;P(N instanceof Error?N.message:"Failed to load the page")}).finally(()=>{if(y.current===R)v(!1)})},[p,t,l,r,d,k,f]),{data:x.scope===p?x.data:null,isLoading:h,error:b}}function Y(c){let t=[];for(let l of c){if(!l.isMarkdown)continue;let r=t[t.length-1],d={label:l.title,target:l.path,path:l.path,url:null};if(r&&r.title===(l.folder||"Pages")){r.links.push(d);continue}t.push({title:l.folder||"Pages",links:[d],notes:[]})}return t}var ae={"no-remote":"This repository has no origin remote, so there is no wiki to find.","unsupported-remote":"The origin remote is not a URL a wiki can be derived from.","no-wiki":"This project has no wiki (or Kabmo cannot read it).",unreachable:"The wiki could not be reached."};function Oe({className:c="",enabled:t=!0,active:l=!0,rootPath:r,refreshKey:d=0,layout:k="desktop"}){let f=k==="phone",{activeRepo:p,setActiveRepo:x}=ir(r),{repos:s,scanning:h,rescan:v}=or(r,t),b=B(r,p),[P,y]=S("wiki.selectedPage",null),[R,w]=n(!1),[N,T]=n(!1),[Z,te]=n(0),g=H({rootPath:r,repo:p,enabled:t,active:l,revisionKey:d}),z=g.data?.entries??[],A=u(()=>z.filter((L)=>L.isMarkdown),[z]),M=u(()=>g.data?.sidebar??Y(z),[g.data?.sidebar,z]),ie=u(()=>M.some((L)=>L.links.length>0),[M]),_=P&&P.scope===b?P.path:null,E=u(()=>{if(_&&A.some((j)=>j.path===_))return _;return(A.find((j)=>j.title.toLowerCase()==="home")??A[0])?.path??null},[_,A]),O=Q({rootPath:r,repo:p,path:E,enabled:t,active:l,revisionKey:Z});i(()=>{if(!E||E===_)return;y({scope:b,path:E})},[E,_,b,y]),i(()=>{w(!1),T(!1)},[b]);let D=(L)=>{if(y({scope:b,path:L}),!f)T(!0)},ne=()=>{g.reload({force:!0}),te((L)=>L+1)},W=g.data?.repo??null,U=g.data&&!W?g.data:null;if(!t)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${c}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});return e("div",{className:`@container flex h-full min-h-0 w-full flex-col bg-paper text-xs text-ink ${c}`,children:[e("div",{className:"flex flex-shrink-0 items-center justify-between gap-2 border-b border-ink/10 px-2 py-1.5",children:[e("div",{className:"flex min-w-0 items-center gap-1.5",children:[e(fr,{rootPath:r,activeRepo:p,onSelectRepo:x,repos:s,scanning:h,onRefreshRepos:v}),W&&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",title:`${W.host}/${W.slug} · ${W.revision.slice(0,8)}`,children:W.provider})]}),e("div",{className:"flex flex-shrink-0 items-center gap-0.5",children:[W?.webUrl&&e("a",{href:W.webUrl,target:"_blank",rel:"noopener noreferrer",title:"Open the wiki on its host","aria-label":"Open the wiki on its host",className:"rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink",children:e(Ce,{size:13})}),e("button",{type:"button",onClick:ne,disabled:g.isLoading,title:"Re-fetch the wiki","aria-label":"Re-fetch the wiki",className:"rounded p-1 text-ink/60 transition-colors hover:bg-ink/5 hover:text-ink disabled:opacity-50",children:e(C,{size:13,className:g.isLoading||g.refreshing?"animate-spin":""})})]})]}),g.error&&!g.data?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(I,{size:16,className:"text-error"}),e("p",{className:"text-error",children:g.error}),e("button",{type:"button",onClick:()=>g.reload(),className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!g.data?e("div",{className:"flex flex-1 items-center justify-center gap-2 text-ink/40",children:[e(m,{size:14,className:"animate-spin"}),e("span",{children:"Reading the wiki…"})]}):U?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(Yt,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:ae[U.reason??"no-wiki"]}),U.detail&&e("p",{className:"max-w-sm break-words font-mono text-[10px] text-ink/40",children:U.detail})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`${f?"hidden":N?"hidden @[520px]:flex":"flex"} min-h-0 w-full flex-col @[520px]:w-52 @[520px]:flex-shrink-0 @[520px]:border-l @[520px]:border-ink/10`,children:e(K,{sections:M,selected:E,onSelect:D})}),e("div",{className:`relative min-w-0 min-h-0 flex-1 ${f?"flex":N?"flex":"hidden @[520px]:flex"} flex-col`,children:[W&&E?e(G,{repo:W,entries:z,path:E,page:O.data,isLoading:O.isLoading,error:O.error,rootPath:r,repoScope:p,onNavigate:D,onBack:f?void 0:()=>T(!1)}):e("div",{className:"flex h-full items-center justify-center px-6 text-center text-[11px] text-ink/40",children:"This wiki has no markdown pages."}),f&&ie&&e(q,{open:R,onClick:()=>w(!0)}),e(V,{open:R,sections:M,selected:E,onSelect:D,onClose:()=>w(!1)})]})]})]})}export{Oe as WikiPanel};
@@ -1,2 +1,2 @@
1
- import{d,n,V,o,e,s,f,B,ae,Ce,za,ha,ct,va,ur,zt,Ut}from"./index-cgzrpvzj.js";import{_a,Sa,fo}from"./index-vy6termr.js";var J={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]},y=s(J);var K={name:"laptop",size:24,node:[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]},Z=s(K);var Q={name:"ratio",size:24,node:[["rect",{width:"12",height:"20",x:"6",y:"2",rx:"2",key:"1oxtiu"}],["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}]]},w=s(Q);var Y={name:"tablet",size:24,node:[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]},C=s(Y);var k=[{id:"responsive",label:"Responsive (100% Fluid)",category:"responsive",icon:ha},{id:"desktop-16-9",label:"Desktop 16:9 (Auto H:W)",category:"responsive",icon:w},{id:"laptop",label:"Laptop (1024 × 768)",category:"responsive",icon:Z},{id:"tablet",label:"Tablet (768 × 1024)",category:"mobile",icon:C},{id:"mobile",label:"Mobile Phone (375 × 667)",category:"mobile",icon:ur},{id:"mobile-lg",label:"Mobile Large (414 × 896)",category:"mobile",icon:ur}];function j(i){switch(i){case"desktop-16-9":return"Desktop 16:9";case"laptop":return"Laptop 1024p";case"tablet":return"Tablet 768p";case"mobile":return"Mobile 375p";case"mobile-lg":return"Mobile Lg 414p";case"responsive":default:return"Responsive"}}function z({viewportMode:i,onChangeViewport:r,zoomLevel:a=100,onSetZoom:l}){let[p,c]=n(null);return e("div",{className:"flex items-center space-x-1.5 flex-shrink-0",children:[e("div",{className:"hidden sm:flex items-center bg-canvas border border-ink/10 rounded-md p-0.5",children:[e("button",{type:"button",onClick:()=>r("responsive"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${i==="responsive"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Responsive (100% Fluid)",children:e(ha,{size:12})}),e("button",{type:"button",onClick:()=>r("desktop-16-9"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${i==="desktop-16-9"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Desktop 16:9 (Auto Height following Width)",children:e(w,{size:12})}),e("button",{type:"button",onClick:()=>r("tablet"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${i==="tablet"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Tablet (768px)",children:e(C,{size:12})}),e("button",{type:"button",onClick:()=>r("mobile"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${i==="mobile"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Mobile (375px)",children:e(ur,{size:12})})]}),e("button",{type:"button","aria-haspopup":"menu","aria-expanded":p!==null,onClick:(t)=>c(p?null:zt(t.currentTarget)),className:"flex items-center space-x-1 px-2 py-1 rounded bg-canvas border border-ink/15 hover:border-ink/30 text-ink text-[11px] font-mono transition-colors cursor-pointer",title:"Device & Responsive Testing Menu",children:[e("span",{className:"hidden md:inline text-[10px] font-medium",children:j(i)}),e(B,{size:11,className:"text-ink/60"})]}),e(Ut,{anchor:p,ariaLabel:"Device & Responsive Testing Menu",className:"w-56 bg-paper border border-ink/15 rounded-lg shadow-xl py-1 text-xs font-mono",onClose:()=>c(null),children:[e("div",{className:"px-2.5 py-1 text-[10px] text-ink/40 uppercase tracking-wider font-semibold",children:"Responsive Testing"}),k.filter((t)=>t.category==="responsive").map((t)=>{let u=t.icon,b=i===t.id;return e("button",{type:"button",onClick:()=>{r(t.id),c(null)},className:`w-full px-2.5 py-1.5 flex items-center justify-between text-left hover:bg-ink/5 cursor-pointer ${b?"bg-ink/10 font-semibold text-ink":"text-ink/75"}`,children:[e("div",{className:"flex items-center space-x-2",children:[e(u,{size:13,className:"text-ink/60"}),e("span",{children:t.label})]}),b&&e(f,{size:12,className:"text-success"})]},t.id)}),e("div",{className:"mt-1 pt-1 border-t border-ink/10 px-2.5 py-1 text-[10px] text-ink/40 uppercase tracking-wider font-semibold",children:"Mobile Testing"}),k.filter((t)=>t.category==="mobile").map((t)=>{let u=t.icon,b=i===t.id;return e("button",{type:"button",onClick:()=>{r(t.id),c(null)},className:`w-full px-2.5 py-1.5 flex items-center justify-between text-left hover:bg-ink/5 cursor-pointer ${b?"bg-ink/10 font-semibold text-ink":"text-ink/75"}`,children:[e("div",{className:"flex items-center space-x-2",children:[e(u,{size:13,className:"text-ink/60"}),e("span",{children:t.label})]}),b&&e(f,{size:12,className:"text-success"})]},t.id)}),l&&e(d,{children:[e("div",{className:"mt-1 pt-1 border-t border-ink/10 px-2.5 py-1 text-[10px] text-ink/40 uppercase tracking-wider font-semibold",children:["Zoom Scale (",a,"%)"]}),e("div",{className:"grid grid-cols-3 gap-1 px-2 py-1",children:[50,75,100,125,150,200].map((t)=>e("button",{type:"button",onClick:()=>{l(t),c(null)},className:`px-1.5 py-1 text-center rounded text-[11px] font-mono cursor-pointer transition-colors ${a===t?"bg-ink text-canvas font-semibold":"bg-canvas border border-ink/10 text-ink/75 hover:bg-ink/5"}`,children:[t,"%"]},t))})]})]})]})}function L({zoomLevel:i,onZoomIn:r,onZoomOut:a,onResetZoom:l}){return e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-md p-0.5 space-x-0.5 text-xs font-mono",children:[e("button",{type:"button",onClick:a,disabled:i<=50,"aria-label":"Perkecil tampilan",title:"Zoom Out (-10%)",className:"p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors",children:e(Sa,{size:12})}),e("button",{type:"button",onClick:l,className:"px-1 text-[10px] font-medium text-ink/75 hover:text-ink hover:underline cursor-pointer select-none",title:"Reset Zoom (100%)",children:[i,"%"]}),e("button",{type:"button",onClick:r,disabled:i>=200,"aria-label":"Perbesar tampilan",title:"Zoom In (+10%)",className:"p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors",children:e(_a,{size:12})})]})}var h="p-1.5 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink transition-colors cursor-pointer disabled:cursor-not-allowed";function O(i){let r=[],{url:a,zoomLevel:l,copied:p,included:c}=i;if(i.viewportMode&&i.onChangeViewport){let{viewportMode:t,onChangeViewport:u,onSetZoom:b}=i;r.push({id:"viewport",actions:k.map((m)=>({label:m.label,icon:m.icon,onSelect:()=>u(m.id),active:t===m.id})),children:e(z,{viewportMode:t,onChangeViewport:u,zoomLevel:l,onSetZoom:b})})}if(r.push({id:"zoom",actions:[{label:"Zoom in (+10%)",icon:_a,onSelect:i.onZoomIn,disabled:l>=200},{label:"Zoom out (-10%)",icon:Sa,onSelect:i.onZoomOut,disabled:l<=50},{label:"Reset zoom (100%)",icon:ct,onSelect:i.onResetZoom,active:l===100}],children:e(L,{zoomLevel:l,onZoomIn:i.onZoomIn,onZoomOut:i.onZoomOut,onResetZoom:i.onResetZoom})}),r.push({id:"include",actions:[{label:c?"Page context added to the draft":"Include this page in the chat draft",icon:za,onSelect:i.onIncludeInChat,disabled:!a}],children:e("button",{type:"button",onClick:i.onIncludeInChat,disabled:!a,"aria-label":"Include this page in the chat draft",title:c?"Page context added to the draft":"Include this page in the chat draft",className:h,children:c?e(f,{size:14,className:"text-success"}):e(za,{size:14})})}),i.annotate){let t=i.annotate;r.push({id:"annotate",actions:[{label:t.count>0?`${t.active?"Tutup mode anotasi":"Buka mode anotasi"} (${t.count})`:"Mark a part of the page, then send it to the chat",icon:y,onSelect:t.onToggle,active:t.active,disabled:!a}],children:e("button",{type:"button",onClick:t.onToggle,disabled:!a,"aria-label":"Page annotation mode","aria-pressed":t.active,title:t.active?"Tutup mode anotasi":t.count>0?`Anotasi (${t.count}) — buka lagi`:"Mark a part of the page, then send it to the chat",className:`${h} relative ${t.active?"bg-ink/10 text-ink":""}`,children:[e(y,{size:14}),t.count>0&&e("span",{className:"absolute -top-0.5 -right-0.5 min-w-[13px] h-[13px] px-0.5 rounded-full bg-error text-paper text-[10px] leading-[13px] font-mono text-center",children:t.count})]})})}if(r.push({id:"copy",actions:[{label:p?"Copied URL!":"Copy URL",icon:ae,onSelect:i.onCopy,disabled:!a}],children:e("button",{type:"button",onClick:i.onCopy,disabled:!a,"aria-label":"Salin URL",title:p?"Copied URL!":"Copy URL",className:h,children:p?e(f,{size:14,className:"text-success"}):e(ae,{size:14})})}),i.onReconnect){let t=i.onReconnect;r.push({id:"reconnect",actions:[{label:"Sambungkan ulang live view",icon:va,onSelect:t}],children:e("button",{type:"button",onClick:t,"aria-label":"Sambungkan ulang live view",title:"Reconnect live view",className:h,children:e(va,{size:14})})})}return r.push({id:"open-external",actions:[{label:i.openExternalLabel,icon:Ce,onSelect:i.onOpenExternal,disabled:!a}],children:e("button",{type:"button",onClick:i.onOpenExternal,disabled:!a,"aria-label":i.openExternalLabel,title:i.openExternalTitle,className:h,children:e(Ce,{size:14})})}),r}var P=108,ee=280,oe=18,te=140,ne=36;function cu({url:i,statusDotClass:r,statusLabel:a,viewportMode:l,zoomLevel:p,onChangeViewport:c,onZoomIn:t,onZoomOut:u,onResetZoom:b,onSetZoom:m,annotate:A,onIncludeInChat:E,onOpenExternal:D,onReconnect:_,openExternalLabel:U,openExternalTitle:W,children:H}){let[X,T]=n(!1),[q,N]=n(!1),g=o(null),[x,R]=n(0),F=O({url:i,zoomLevel:p,copied:X,included:q,viewportMode:l,onChangeViewport:c,annotate:A,onReconnect:_,onIncludeInChat:()=>{E(),N(!0),setTimeout(()=>N(!1),2500)},onCopy:()=>{if(!i)return;navigator.clipboard.writeText(i).then(()=>{T(!0),setTimeout(()=>T(!1),2000)}).catch(()=>{})},onOpenExternal:D,onZoomIn:t,onZoomOut:u,onResetZoom:b,onSetZoom:m,openExternalLabel:U,openExternalTitle:W});V(()=>{let v=g.current;if(!v)return;R(v.clientWidth)}),V(()=>{let v=g.current;if(!v||typeof ResizeObserver>"u")return;let M=new ResizeObserver(()=>R(v.clientWidth));return M.observe(v),()=>M.disconnect()},[]);let I=x===0||x>=ee,S=I?x>0?Math.min(P,x*0.25):P:oe,G=x>0?Math.max(0,x-S-te-ne):void 0;return e("div",{ref:g,"data-browser-toolbar":"",className:"h-10 px-2.5 border-b border-ink/10 bg-paper flex items-center gap-x-2 flex-shrink-0 select-none",children:[e("div",{className:"flex items-center space-x-1.5 flex-shrink-0 min-w-0",style:{maxWidth:`${S}px`},title:a,children:[e("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${r}`}),I&&e("span",{className:"text-[10px] font-mono uppercase tracking-wide text-ink/60 truncate",children:a})]}),e("div",{className:"flex flex-1 min-w-0 items-center",children:H}),e(fo,{clusters:F,available:G})]})}
1
+ import{d,n,V,o,e,s,f,B,ae,Ce,za,ha,ct,va,ur,zt,Ut}from"./index-75haaj8g.js";import{_a,Sa,fo}from"./index-8e15fzax.js";var J={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]},y=s(J);var K={name:"laptop",size:24,node:[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]},Z=s(K);var Q={name:"ratio",size:24,node:[["rect",{width:"12",height:"20",x:"6",y:"2",rx:"2",key:"1oxtiu"}],["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}]]},w=s(Q);var Y={name:"tablet",size:24,node:[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]},C=s(Y);var k=[{id:"responsive",label:"Responsive (100% Fluid)",category:"responsive",icon:ha},{id:"desktop-16-9",label:"Desktop 16:9 (Auto H:W)",category:"responsive",icon:w},{id:"laptop",label:"Laptop (1024 × 768)",category:"responsive",icon:Z},{id:"tablet",label:"Tablet (768 × 1024)",category:"mobile",icon:C},{id:"mobile",label:"Mobile Phone (375 × 667)",category:"mobile",icon:ur},{id:"mobile-lg",label:"Mobile Large (414 × 896)",category:"mobile",icon:ur}];function j(i){switch(i){case"desktop-16-9":return"Desktop 16:9";case"laptop":return"Laptop 1024p";case"tablet":return"Tablet 768p";case"mobile":return"Mobile 375p";case"mobile-lg":return"Mobile Lg 414p";case"responsive":default:return"Responsive"}}function z({viewportMode:i,onChangeViewport:r,zoomLevel:a=100,onSetZoom:l}){let[p,c]=n(null);return e("div",{className:"flex items-center space-x-1.5 flex-shrink-0",children:[e("div",{className:"hidden sm:flex items-center bg-canvas border border-ink/10 rounded-md p-0.5",children:[e("button",{type:"button",onClick:()=>r("responsive"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${i==="responsive"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Responsive (100% Fluid)",children:e(ha,{size:12})}),e("button",{type:"button",onClick:()=>r("desktop-16-9"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${i==="desktop-16-9"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Desktop 16:9 (Auto Height following Width)",children:e(w,{size:12})}),e("button",{type:"button",onClick:()=>r("tablet"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${i==="tablet"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Tablet (768px)",children:e(C,{size:12})}),e("button",{type:"button",onClick:()=>r("mobile"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${i==="mobile"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Mobile (375px)",children:e(ur,{size:12})})]}),e("button",{type:"button","aria-haspopup":"menu","aria-expanded":p!==null,onClick:(t)=>c(p?null:zt(t.currentTarget)),className:"flex items-center space-x-1 px-2 py-1 rounded bg-canvas border border-ink/15 hover:border-ink/30 text-ink text-[11px] font-mono transition-colors cursor-pointer",title:"Device & Responsive Testing Menu",children:[e("span",{className:"hidden md:inline text-[10px] font-medium",children:j(i)}),e(B,{size:11,className:"text-ink/60"})]}),e(Ut,{anchor:p,ariaLabel:"Device & Responsive Testing Menu",className:"w-56 bg-paper border border-ink/15 rounded-lg shadow-xl py-1 text-xs font-mono",onClose:()=>c(null),children:[e("div",{className:"px-2.5 py-1 text-[10px] text-ink/40 uppercase tracking-wider font-semibold",children:"Responsive Testing"}),k.filter((t)=>t.category==="responsive").map((t)=>{let u=t.icon,b=i===t.id;return e("button",{type:"button",onClick:()=>{r(t.id),c(null)},className:`w-full px-2.5 py-1.5 flex items-center justify-between text-left hover:bg-ink/5 cursor-pointer ${b?"bg-ink/10 font-semibold text-ink":"text-ink/75"}`,children:[e("div",{className:"flex items-center space-x-2",children:[e(u,{size:13,className:"text-ink/60"}),e("span",{children:t.label})]}),b&&e(f,{size:12,className:"text-success"})]},t.id)}),e("div",{className:"mt-1 pt-1 border-t border-ink/10 px-2.5 py-1 text-[10px] text-ink/40 uppercase tracking-wider font-semibold",children:"Mobile Testing"}),k.filter((t)=>t.category==="mobile").map((t)=>{let u=t.icon,b=i===t.id;return e("button",{type:"button",onClick:()=>{r(t.id),c(null)},className:`w-full px-2.5 py-1.5 flex items-center justify-between text-left hover:bg-ink/5 cursor-pointer ${b?"bg-ink/10 font-semibold text-ink":"text-ink/75"}`,children:[e("div",{className:"flex items-center space-x-2",children:[e(u,{size:13,className:"text-ink/60"}),e("span",{children:t.label})]}),b&&e(f,{size:12,className:"text-success"})]},t.id)}),l&&e(d,{children:[e("div",{className:"mt-1 pt-1 border-t border-ink/10 px-2.5 py-1 text-[10px] text-ink/40 uppercase tracking-wider font-semibold",children:["Zoom Scale (",a,"%)"]}),e("div",{className:"grid grid-cols-3 gap-1 px-2 py-1",children:[50,75,100,125,150,200].map((t)=>e("button",{type:"button",onClick:()=>{l(t),c(null)},className:`px-1.5 py-1 text-center rounded text-[11px] font-mono cursor-pointer transition-colors ${a===t?"bg-ink text-canvas font-semibold":"bg-canvas border border-ink/10 text-ink/75 hover:bg-ink/5"}`,children:[t,"%"]},t))})]})]})]})}function L({zoomLevel:i,onZoomIn:r,onZoomOut:a,onResetZoom:l}){return e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-md p-0.5 space-x-0.5 text-xs font-mono",children:[e("button",{type:"button",onClick:a,disabled:i<=50,"aria-label":"Perkecil tampilan",title:"Zoom Out (-10%)",className:"p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors",children:e(Sa,{size:12})}),e("button",{type:"button",onClick:l,className:"px-1 text-[10px] font-medium text-ink/75 hover:text-ink hover:underline cursor-pointer select-none",title:"Reset Zoom (100%)",children:[i,"%"]}),e("button",{type:"button",onClick:r,disabled:i>=200,"aria-label":"Perbesar tampilan",title:"Zoom In (+10%)",className:"p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors",children:e(_a,{size:12})})]})}var h="p-1.5 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink transition-colors cursor-pointer disabled:cursor-not-allowed";function O(i){let r=[],{url:a,zoomLevel:l,copied:p,included:c}=i;if(i.viewportMode&&i.onChangeViewport){let{viewportMode:t,onChangeViewport:u,onSetZoom:b}=i;r.push({id:"viewport",actions:k.map((m)=>({label:m.label,icon:m.icon,onSelect:()=>u(m.id),active:t===m.id})),children:e(z,{viewportMode:t,onChangeViewport:u,zoomLevel:l,onSetZoom:b})})}if(r.push({id:"zoom",actions:[{label:"Zoom in (+10%)",icon:_a,onSelect:i.onZoomIn,disabled:l>=200},{label:"Zoom out (-10%)",icon:Sa,onSelect:i.onZoomOut,disabled:l<=50},{label:"Reset zoom (100%)",icon:ct,onSelect:i.onResetZoom,active:l===100}],children:e(L,{zoomLevel:l,onZoomIn:i.onZoomIn,onZoomOut:i.onZoomOut,onResetZoom:i.onResetZoom})}),r.push({id:"include",actions:[{label:c?"Page context added to the draft":"Include this page in the chat draft",icon:za,onSelect:i.onIncludeInChat,disabled:!a}],children:e("button",{type:"button",onClick:i.onIncludeInChat,disabled:!a,"aria-label":"Include this page in the chat draft",title:c?"Page context added to the draft":"Include this page in the chat draft",className:h,children:c?e(f,{size:14,className:"text-success"}):e(za,{size:14})})}),i.annotate){let t=i.annotate;r.push({id:"annotate",actions:[{label:t.count>0?`${t.active?"Tutup mode anotasi":"Buka mode anotasi"} (${t.count})`:"Mark a part of the page, then send it to the chat",icon:y,onSelect:t.onToggle,active:t.active,disabled:!a}],children:e("button",{type:"button",onClick:t.onToggle,disabled:!a,"aria-label":"Page annotation mode","aria-pressed":t.active,title:t.active?"Tutup mode anotasi":t.count>0?`Anotasi (${t.count}) — buka lagi`:"Mark a part of the page, then send it to the chat",className:`${h} relative ${t.active?"bg-ink/10 text-ink":""}`,children:[e(y,{size:14}),t.count>0&&e("span",{className:"absolute -top-0.5 -right-0.5 min-w-[13px] h-[13px] px-0.5 rounded-full bg-error text-paper text-[10px] leading-[13px] font-mono text-center",children:t.count})]})})}if(r.push({id:"copy",actions:[{label:p?"Copied URL!":"Copy URL",icon:ae,onSelect:i.onCopy,disabled:!a}],children:e("button",{type:"button",onClick:i.onCopy,disabled:!a,"aria-label":"Salin URL",title:p?"Copied URL!":"Copy URL",className:h,children:p?e(f,{size:14,className:"text-success"}):e(ae,{size:14})})}),i.onReconnect){let t=i.onReconnect;r.push({id:"reconnect",actions:[{label:"Sambungkan ulang live view",icon:va,onSelect:t}],children:e("button",{type:"button",onClick:t,"aria-label":"Sambungkan ulang live view",title:"Reconnect live view",className:h,children:e(va,{size:14})})})}return r.push({id:"open-external",actions:[{label:i.openExternalLabel,icon:Ce,onSelect:i.onOpenExternal,disabled:!a}],children:e("button",{type:"button",onClick:i.onOpenExternal,disabled:!a,"aria-label":i.openExternalLabel,title:i.openExternalTitle,className:h,children:e(Ce,{size:14})})}),r}var P=108,ee=280,oe=18,te=140,ne=36;function cu({url:i,statusDotClass:r,statusLabel:a,viewportMode:l,zoomLevel:p,onChangeViewport:c,onZoomIn:t,onZoomOut:u,onResetZoom:b,onSetZoom:m,annotate:A,onIncludeInChat:E,onOpenExternal:D,onReconnect:_,openExternalLabel:U,openExternalTitle:W,children:H}){let[X,T]=n(!1),[q,N]=n(!1),g=o(null),[x,R]=n(0),F=O({url:i,zoomLevel:p,copied:X,included:q,viewportMode:l,onChangeViewport:c,annotate:A,onReconnect:_,onIncludeInChat:()=>{E(),N(!0),setTimeout(()=>N(!1),2500)},onCopy:()=>{if(!i)return;navigator.clipboard.writeText(i).then(()=>{T(!0),setTimeout(()=>T(!1),2000)}).catch(()=>{})},onOpenExternal:D,onZoomIn:t,onZoomOut:u,onResetZoom:b,onSetZoom:m,openExternalLabel:U,openExternalTitle:W});V(()=>{let v=g.current;if(!v)return;R(v.clientWidth)}),V(()=>{let v=g.current;if(!v||typeof ResizeObserver>"u")return;let M=new ResizeObserver(()=>R(v.clientWidth));return M.observe(v),()=>M.disconnect()},[]);let I=x===0||x>=ee,S=I?x>0?Math.min(P,x*0.25):P:oe,G=x>0?Math.max(0,x-S-te-ne):void 0;return e("div",{ref:g,"data-browser-toolbar":"",className:"h-10 px-2.5 border-b border-ink/10 bg-paper flex items-center gap-x-2 flex-shrink-0 select-none",children:[e("div",{className:"flex items-center space-x-1.5 flex-shrink-0 min-w-0",style:{maxWidth:`${S}px`},title:a,children:[e("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${r}`}),I&&e("span",{className:"text-[10px] font-mono uppercase tracking-wide text-ink/60 truncate",children:a})]}),e("div",{className:"flex flex-1 min-w-0 items-center",children:H}),e(fo,{clusters:F,available:G})]})}
2
2
  export{cu};
@@ -1,2 +1,2 @@
1
- import{d,n,i,o,u,a,e,li,s,m,D,$r,No,f,ae,Dt,fe,C,F,wp,J,Dn,Gl,Cp,Du}from"./index-cgzrpvzj.js";var Y={name:"clipboard-paste",size:24,node:[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]]},Ss=s(Y);var K={name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]},pp=s(K);function _({row:t,active:r,name:p,loading:c,onSelect:l,onCopyPath:g,onReveal:M}){return e("div",{className:"grid grid-cols-[1rem_minmax(0,1fr)_3.5rem] items-start gap-x-2 px-4 py-2 border-b border-ink/5 last:border-b-0 hover:bg-ink/[0.02] group/row transition-colors",children:[e("div",{className:"h-5 flex items-center justify-center",children:r&&e(f,{size:12,className:"text-ink","aria-label":"Selected repository"})}),e("button",{type:"button",onClick:l,disabled:r||!t.isRepo,title:!t.isRepo?t.error??"Not a git repository":r?"Already showing this repository":`Show ${t.path}`,className:"min-w-0 text-left cursor-pointer disabled:cursor-default",children:e("div",{className:"h-5 flex items-center gap-1.5 min-w-0",children:[e(fe,{size:11,className:r?"text-ink/60 flex-shrink-0":"text-ink/40 flex-shrink-0"}),e("span",{className:`truncate text-xs ${r?"font-semibold text-ink":"text-ink/90"}`,children:p})]})}),e("div",{className:"h-5 flex items-center justify-end gap-0.5 touch-visible opacity-0 group-hover/row:opacity-100",children:[e("button",{type:"button",onClick:g,disabled:c,title:`Copy the absolute path of ${t.path}`,"aria-label":`Copy path of ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors disabled:opacity-30 disabled:cursor-default",children:e(ae,{size:11})}),e("button",{type:"button",onClick:M,title:`Reveal ${t.path} in the file manager`,"aria-label":`Reveal ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(Dt,{size:11})})]}),e("div",{className:"col-start-2 col-span-2 flex flex-wrap items-center gap-x-2 gap-y-0.5 min-w-0 mt-0.5",children:[t.isRepo?e(d,{children:[e("span",{className:`text-[10px] font-mono truncate ${t.detached?"text-warning":"text-ink/50"}`,title:t.detached?`Detached HEAD at ${t.branch}`:`On branch ${t.branch}`,children:t.branch}),e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e(X,{row:t})]}):e("span",{className:"text-[10px] text-ink/40 truncate",children:t.error??"Not a git repository"}),t.isRepo&&t.subject&&e(d,{children:[e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e("span",{className:"text-[10px] text-ink/40 truncate min-w-0",title:t.subject,children:t.subject})]})]})]})}function X({row:t}){let r=[];if(t.operation)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:t.operation==="stash-pop"?`A stash pop stopped on ${t.conflicts} conflict(s)`:`A ${li[t.operation]} is in progress, stopped on ${t.conflicts} conflict(s)`,children:[e(D,{size:9}),li[t.operation]]},"operation"));else if(t.conflicts>0)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.conflicts} conflicted path(s)`,children:[e(D,{size:9}),t.conflicts]},"conflicts"));if(t.changed>0||t.untracked>0)r.push(e("span",{className:"flex-shrink-0 rounded border border-info/30 px-1 text-[10px] font-mono tabular-nums text-info",title:`${t.changed} changed, ${t.untracked} untracked`,children:[t.changed>0?`${t.changed}±`:"",t.changed>0&&t.untracked>0?" ":"",t.untracked>0?`${t.untracked}?`:""]},"dirty"));if(t.gone)r.push(e("span",{className:"flex-shrink-0 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.upstream} no longer exists on the remote — fetch --prune to drop it`,children:"gone"},"gone"));else if(t.upstream&&(t.ahead>0||t.behind>0))r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 text-[10px] font-mono tabular-nums text-ink/60",title:`${t.ahead} ahead of, ${t.behind} behind ${t.upstream}`,children:[t.ahead>0&&e("span",{className:"flex items-center",children:[e(No,{size:9}),t.ahead]}),t.behind>0&&e("span",{className:"flex items-center",children:[e($r,{size:9}),t.behind]})]},"track"));if(r.length===0)return e("span",{className:"text-[10px] font-mono text-ink/30",title:"Nothing to report: clean and in sync",children:"clean, in sync"});return e(d,{children:r})}function q(t){let{open:r,rootPath:p,scanning:c}=t,[l,g]=n([]),[M,y]=n(!1),[S,P]=n(!1),[k,v]=n(null),[w,j]=n(0),E=t.repos.join("\x00"),G=o(!0),b=o(null);i(()=>(G.current=!0,()=>{G.current=!1,b.current?.abort(),b.current=null}),[]);let A=a(async()=>{b.current?.abort();let R=new AbortController;b.current=R,P(!0),y(!0);try{let N=new URLSearchParams({repoDetails:"1"});if(p)N.set("root",p);let L=await fetch(`/api/fs/git?${N.toString()}`,{signal:R.signal}),T=await L.json();if(!G.current||b.current!==R)return;if(!L.ok||!Array.isArray(T.details)){v(T.error||`Failed to read repositories (HTTP ${L.status})`);return}g(T.details),v(null)}catch(N){if(!G.current||b.current!==R)return;if(N instanceof Error&&N.name==="AbortError")return;v(N instanceof Error?N.message:"Failed to read repositories")}finally{if(G.current&&b.current===R)b.current=null,P(!1),y(!1)}},[p]);i(()=>{if(!r){g([]),v(null),y(!1);return}A()},[r,A,E,c,w]);let O=a(()=>j((R)=>R+1),[]);return{details:l,loading:M,reading:S,error:k,refresh:O}}function I(t){let r=new Map;for(let p of t){if(!p||p==="."){if(!r.has(""))r.set("",{key:"",label:null,paths:[]});r.get("").paths.push(".");continue}let c=p.indexOf("/"),l=c===-1?"":p.slice(0,c),g=r.get(l);if(!g)g={key:l,label:l===""?null:l,paths:[]},r.set(l,g);g.paths.push(p)}for(let p of r.values())p.paths.sort((c,l)=>c==="."?-1:l==="."?1:c.localeCompare(l));return[...r.values()].sort((p,c)=>{if(p.key==="")return-1;if(c.key==="")return 1;return p.key.localeCompare(c.key)})}function B(t,r){if(t===".")return"workspace root";if(r==="")return t;return t.slice(r.length+1)}function U({isOpen:t,rootPath:r,activeRepo:p,repos:c,scanning:l,onSelectRepo:g,onRefreshRepos:M,onClose:y}){let[S,P]=n(""),[k,v]=n(null),{details:w,loading:j,reading:E,error:G,refresh:b}=q({open:t,rootPath:r,repos:c,scanning:l});i(()=>{if(!t)P(""),v(null)},[t]);let A=u(()=>{let x=S.trim().toLowerCase();if(!x)return w;return w.filter((h)=>h.path.toLowerCase().includes(x))},[w,S]),O=u(()=>I(A.map((x)=>x.path)),[A]),R=u(()=>{let x=new Map;for(let h of w)x.set(h.path,h);return x},[w]),N=a(()=>{M(),b()},[M,b]),L=a(async(x)=>{let h=r?Du(r,x==="."?"":x):x,z=await Dn(h);v(z?{text:`Copied ${h}`,kind:"success"}:{text:"Clipboard unavailable",kind:"error"})},[r]),T=a(async(x)=>{let h=new FormData;if(h.append("actionType","open_explorer"),h.append("path","."),h.append("repo",x),r)h.append("root",r);try{let z=await fetch("/api/fs/action",{method:"POST",body:h}),H=await z.json();if(!z.ok||H.error)v({text:H.error||"Could not open the file manager",kind:"error"})}catch{v({text:"Could not open the file manager",kind:"error"})}},[r]);if(!t)return null;return e(J,{onClose:y,maxWidthClass:"max-w-[min(96vw,720px)]",header:e("div",{className:"flex items-center gap-2 min-w-0",children:[e(pp,{size:14,className:"text-ink/60 flex-shrink-0"}),e("h2",{className:"text-sm font-semibold text-ink",children:"Repositories"}),e("span",{className:"text-[10px] font-mono text-ink/50 truncate",children:[c.length," in this workspace"]})]}),children:[e("div",{className:"px-5 py-3 flex items-center gap-2 border-b border-ink/10",children:[e(F,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{type:"text",value:S,onChange:(x)=>P(x.currentTarget.value),placeholder:"Filter repositories…","aria-label":"Filter repositories",className:"flex-1 min-w-0 bg-transparent outline-none text-xs text-ink placeholder-ink/40",autoFocus:!0}),e("button",{type:"button",onClick:N,disabled:E||l,title:"Re-discover repositories and re-read their state","aria-label":"Refresh repositories",className:"text-ink/40 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 flex-shrink-0",children:e(C,{size:12,className:E||l?"animate-spin":""})})]}),l&&e("div",{className:"px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono text-ink/50 flex items-center gap-1.5",children:[e(m,{size:10,className:"animate-spin"}),"Still discovering repositories in this workspace…"]}),k&&e("div",{className:`px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono truncate ${k.kind==="error"?"text-error":"text-ink/60"}`,title:k.text,role:"status",children:k.text}),e("div",{className:"min-h-[40vh] max-h-[60vh] overflow-y-auto scrollbar-overlay-container",children:j&&w.length===0?e("div",{className:"flex items-center justify-center gap-2 py-12 text-xs text-ink/50 font-mono",children:[e(m,{size:14,className:"animate-spin text-info"}),"Reading repositories…"]}):G?e("div",{className:"py-12 px-6 text-center text-xs text-error font-mono",children:G}):A.length===0?e("div",{className:"py-12 text-center text-xs text-ink/40 font-mono",children:S.trim()?"No matching repositories.":"No repositories in this workspace."}):O.map((x)=>e("div",{children:[e("div",{className:"px-4 py-1 text-[10px] uppercase tracking-wider text-ink/40 font-semibold bg-canvas/40 border-b border-ink/5 sticky top-0",children:x.label??Gl(".",r)}),x.paths.map((h)=>{let z=R.get(h);if(!z)return null;return e(_,{row:z,active:h===p,name:B(h,x.key),loading:E,onSelect:()=>{g(h),y()},onCopyPath:()=>void L(h),onReveal:()=>void T(h)},h)})]},x.key))})]})}function fr({rootPath:t,activeRepo:r,onSelectRepo:p,repos:c,scanning:l,onRefreshRepos:g}){let[M,y]=n(!1),S=u(()=>({root:t??null,repo:r,rows:c.map((k)=>({repo:k,label:Gl(k,t),short:Cp(k,t)})),scanning:l,ready:!0,setRepo:p,refresh:g}),[t,r,c,l,p,g]),P=a(()=>y(!0),[]);return e("div",{className:"relative",children:[e(wp,{scope:S,onManage:P}),e(U,{isOpen:M,rootPath:t,activeRepo:r,repos:c,scanning:l,onSelectRepo:p,onRefreshRepos:g,onClose:()=>y(!1)})]})}var W="(pointer: coarse)",V="(hover: none)";function Q(){if(typeof window>"u")return!1;if(window.matchMedia(W).matches)return!0;return navigator.maxTouchPoints>0&&window.matchMedia(V).matches}function _u(){let[t,r]=n(Q);return i(()=>{let p=[W,V].map((l)=>window.matchMedia(l)),c=()=>r(Q());for(let l of p)l.addEventListener("change",c);return()=>{for(let l of p)l.removeEventListener("change",c)}},[]),t}
1
+ import{d,n,i,o,u,a,e,li,s,m,D,$r,No,f,ae,Dt,fe,C,F,wp,J,nn,Gl,Cp,Du}from"./index-75haaj8g.js";var Y={name:"clipboard-paste",size:24,node:[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]]},Ss=s(Y);var K={name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]},pp=s(K);function _({row:t,active:r,name:p,loading:c,onSelect:l,onCopyPath:g,onReveal:M}){return e("div",{className:"grid grid-cols-[1rem_minmax(0,1fr)_3.5rem] items-start gap-x-2 px-4 py-2 border-b border-ink/5 last:border-b-0 hover:bg-ink/[0.02] group/row transition-colors",children:[e("div",{className:"h-5 flex items-center justify-center",children:r&&e(f,{size:12,className:"text-ink","aria-label":"Selected repository"})}),e("button",{type:"button",onClick:l,disabled:r||!t.isRepo,title:!t.isRepo?t.error??"Not a git repository":r?"Already showing this repository":`Show ${t.path}`,className:"min-w-0 text-left cursor-pointer disabled:cursor-default",children:e("div",{className:"h-5 flex items-center gap-1.5 min-w-0",children:[e(fe,{size:11,className:r?"text-ink/60 flex-shrink-0":"text-ink/40 flex-shrink-0"}),e("span",{className:`truncate text-xs ${r?"font-semibold text-ink":"text-ink/90"}`,children:p})]})}),e("div",{className:"h-5 flex items-center justify-end gap-0.5 touch-visible opacity-0 group-hover/row:opacity-100",children:[e("button",{type:"button",onClick:g,disabled:c,title:`Copy the absolute path of ${t.path}`,"aria-label":`Copy path of ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors disabled:opacity-30 disabled:cursor-default",children:e(ae,{size:11})}),e("button",{type:"button",onClick:M,title:`Reveal ${t.path} in the file manager`,"aria-label":`Reveal ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(Dt,{size:11})})]}),e("div",{className:"col-start-2 col-span-2 flex flex-wrap items-center gap-x-2 gap-y-0.5 min-w-0 mt-0.5",children:[t.isRepo?e(d,{children:[e("span",{className:`text-[10px] font-mono truncate ${t.detached?"text-warning":"text-ink/50"}`,title:t.detached?`Detached HEAD at ${t.branch}`:`On branch ${t.branch}`,children:t.branch}),e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e(X,{row:t})]}):e("span",{className:"text-[10px] text-ink/40 truncate",children:t.error??"Not a git repository"}),t.isRepo&&t.subject&&e(d,{children:[e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e("span",{className:"text-[10px] text-ink/40 truncate min-w-0",title:t.subject,children:t.subject})]})]})]})}function X({row:t}){let r=[];if(t.operation)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:t.operation==="stash-pop"?`A stash pop stopped on ${t.conflicts} conflict(s)`:`A ${li[t.operation]} is in progress, stopped on ${t.conflicts} conflict(s)`,children:[e(D,{size:9}),li[t.operation]]},"operation"));else if(t.conflicts>0)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.conflicts} conflicted path(s)`,children:[e(D,{size:9}),t.conflicts]},"conflicts"));if(t.changed>0||t.untracked>0)r.push(e("span",{className:"flex-shrink-0 rounded border border-info/30 px-1 text-[10px] font-mono tabular-nums text-info",title:`${t.changed} changed, ${t.untracked} untracked`,children:[t.changed>0?`${t.changed}±`:"",t.changed>0&&t.untracked>0?" ":"",t.untracked>0?`${t.untracked}?`:""]},"dirty"));if(t.gone)r.push(e("span",{className:"flex-shrink-0 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.upstream} no longer exists on the remote — fetch --prune to drop it`,children:"gone"},"gone"));else if(t.upstream&&(t.ahead>0||t.behind>0))r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 text-[10px] font-mono tabular-nums text-ink/60",title:`${t.ahead} ahead of, ${t.behind} behind ${t.upstream}`,children:[t.ahead>0&&e("span",{className:"flex items-center",children:[e(No,{size:9}),t.ahead]}),t.behind>0&&e("span",{className:"flex items-center",children:[e($r,{size:9}),t.behind]})]},"track"));if(r.length===0)return e("span",{className:"text-[10px] font-mono text-ink/30",title:"Nothing to report: clean and in sync",children:"clean, in sync"});return e(d,{children:r})}function q(t){let{open:r,rootPath:p,scanning:c}=t,[l,g]=n([]),[M,y]=n(!1),[S,P]=n(!1),[k,v]=n(null),[w,j]=n(0),E=t.repos.join("\x00"),G=o(!0),b=o(null);i(()=>(G.current=!0,()=>{G.current=!1,b.current?.abort(),b.current=null}),[]);let A=a(async()=>{b.current?.abort();let R=new AbortController;b.current=R,P(!0),y(!0);try{let N=new URLSearchParams({repoDetails:"1"});if(p)N.set("root",p);let L=await fetch(`/api/fs/git?${N.toString()}`,{signal:R.signal}),T=await L.json();if(!G.current||b.current!==R)return;if(!L.ok||!Array.isArray(T.details)){v(T.error||`Failed to read repositories (HTTP ${L.status})`);return}g(T.details),v(null)}catch(N){if(!G.current||b.current!==R)return;if(N instanceof Error&&N.name==="AbortError")return;v(N instanceof Error?N.message:"Failed to read repositories")}finally{if(G.current&&b.current===R)b.current=null,P(!1),y(!1)}},[p]);i(()=>{if(!r){g([]),v(null),y(!1);return}A()},[r,A,E,c,w]);let O=a(()=>j((R)=>R+1),[]);return{details:l,loading:M,reading:S,error:k,refresh:O}}function I(t){let r=new Map;for(let p of t){if(!p||p==="."){if(!r.has(""))r.set("",{key:"",label:null,paths:[]});r.get("").paths.push(".");continue}let c=p.indexOf("/"),l=c===-1?"":p.slice(0,c),g=r.get(l);if(!g)g={key:l,label:l===""?null:l,paths:[]},r.set(l,g);g.paths.push(p)}for(let p of r.values())p.paths.sort((c,l)=>c==="."?-1:l==="."?1:c.localeCompare(l));return[...r.values()].sort((p,c)=>{if(p.key==="")return-1;if(c.key==="")return 1;return p.key.localeCompare(c.key)})}function B(t,r){if(t===".")return"workspace root";if(r==="")return t;return t.slice(r.length+1)}function U({isOpen:t,rootPath:r,activeRepo:p,repos:c,scanning:l,onSelectRepo:g,onRefreshRepos:M,onClose:y}){let[S,P]=n(""),[k,v]=n(null),{details:w,loading:j,reading:E,error:G,refresh:b}=q({open:t,rootPath:r,repos:c,scanning:l});i(()=>{if(!t)P(""),v(null)},[t]);let A=u(()=>{let x=S.trim().toLowerCase();if(!x)return w;return w.filter((h)=>h.path.toLowerCase().includes(x))},[w,S]),O=u(()=>I(A.map((x)=>x.path)),[A]),R=u(()=>{let x=new Map;for(let h of w)x.set(h.path,h);return x},[w]),N=a(()=>{M(),b()},[M,b]),L=a(async(x)=>{let h=r?Du(r,x==="."?"":x):x,z=await nn(h);v(z?{text:`Copied ${h}`,kind:"success"}:{text:"Clipboard unavailable",kind:"error"})},[r]),T=a(async(x)=>{let h=new FormData;if(h.append("actionType","open_explorer"),h.append("path","."),h.append("repo",x),r)h.append("root",r);try{let z=await fetch("/api/fs/action",{method:"POST",body:h}),H=await z.json();if(!z.ok||H.error)v({text:H.error||"Could not open the file manager",kind:"error"})}catch{v({text:"Could not open the file manager",kind:"error"})}},[r]);if(!t)return null;return e(J,{onClose:y,maxWidthClass:"max-w-[min(96vw,720px)]",header:e("div",{className:"flex items-center gap-2 min-w-0",children:[e(pp,{size:14,className:"text-ink/60 flex-shrink-0"}),e("h2",{className:"text-sm font-semibold text-ink",children:"Repositories"}),e("span",{className:"text-[10px] font-mono text-ink/50 truncate",children:[c.length," in this workspace"]})]}),children:[e("div",{className:"px-5 py-3 flex items-center gap-2 border-b border-ink/10",children:[e(F,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{type:"text",value:S,onChange:(x)=>P(x.currentTarget.value),placeholder:"Filter repositories…","aria-label":"Filter repositories",className:"flex-1 min-w-0 bg-transparent outline-none text-xs text-ink placeholder-ink/40",autoFocus:!0}),e("button",{type:"button",onClick:N,disabled:E||l,title:"Re-discover repositories and re-read their state","aria-label":"Refresh repositories",className:"text-ink/40 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 flex-shrink-0",children:e(C,{size:12,className:E||l?"animate-spin":""})})]}),l&&e("div",{className:"px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono text-ink/50 flex items-center gap-1.5",children:[e(m,{size:10,className:"animate-spin"}),"Still discovering repositories in this workspace…"]}),k&&e("div",{className:`px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono truncate ${k.kind==="error"?"text-error":"text-ink/60"}`,title:k.text,role:"status",children:k.text}),e("div",{className:"min-h-[40vh] max-h-[60vh] overflow-y-auto scrollbar-overlay-container",children:j&&w.length===0?e("div",{className:"flex items-center justify-center gap-2 py-12 text-xs text-ink/50 font-mono",children:[e(m,{size:14,className:"animate-spin text-info"}),"Reading repositories…"]}):G?e("div",{className:"py-12 px-6 text-center text-xs text-error font-mono",children:G}):A.length===0?e("div",{className:"py-12 text-center text-xs text-ink/40 font-mono",children:S.trim()?"No matching repositories.":"No repositories in this workspace."}):O.map((x)=>e("div",{children:[e("div",{className:"px-4 py-1 text-[10px] uppercase tracking-wider text-ink/40 font-semibold bg-canvas/40 border-b border-ink/5 sticky top-0",children:x.label??Gl(".",r)}),x.paths.map((h)=>{let z=R.get(h);if(!z)return null;return e(_,{row:z,active:h===p,name:B(h,x.key),loading:E,onSelect:()=>{g(h),y()},onCopyPath:()=>void L(h),onReveal:()=>void T(h)},h)})]},x.key))})]})}function fr({rootPath:t,activeRepo:r,onSelectRepo:p,repos:c,scanning:l,onRefreshRepos:g}){let[M,y]=n(!1),S=u(()=>({root:t??null,repo:r,rows:c.map((k)=>({repo:k,label:Gl(k,t),short:Cp(k,t)})),scanning:l,ready:!0,setRepo:p,refresh:g}),[t,r,c,l,p,g]),P=a(()=>y(!0),[]);return e("div",{className:"relative",children:[e(wp,{scope:S,onManage:P}),e(U,{isOpen:M,rootPath:t,activeRepo:r,repos:c,scanning:l,onSelectRepo:p,onRefreshRepos:g,onClose:()=>y(!1)})]})}var W="(pointer: coarse)",V="(hover: none)";function Q(){if(typeof window>"u")return!1;if(window.matchMedia(W).matches)return!0;return navigator.maxTouchPoints>0&&window.matchMedia(V).matches}function _u(){let[t,r]=n(Q);return i(()=>{let p=[W,V].map((l)=>window.matchMedia(l)),c=()=>r(Q());for(let l of p)l.addEventListener("change",c);return()=>{for(let l of p)l.removeEventListener("change",c)}},[]),t}
2
2
  export{Ss,pp,fr,_u};
@@ -1,12 +1,12 @@
1
- import{t,l,ot,ia,x,R,L,z,O,U,j,G,p,oa,Bo,h,nr,rr,W,An,st,Ye,Je,zn,Ol,_t,St,kn,Tt,lt}from"./index-fta1y9pc.js";import{Nt}from"./index-cgzrpvzj.js";import{Na}from"./index-1ksg88qf.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=O,this.setDiagramTitle=j,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 x.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,ot,ia,x,R,L,z,O,U,j,G,p,oa,Bo,h,nr,rr,W,gn,st,Ye,Je,zn,Ol,_t,St,xn,Tt,lt}from"./index-ctgefatv.js";import{Nt}from"./index-75haaj8g.js";import{Na}from"./index-h1e1abpt.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=O,this.setDiagramTitle=j,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 x.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=rr(T,{schema:nr})}let N=this.subGraphLookup.get(e);if(N&&f){N.metadata={...N.metadata,...f};return}let _=this.edges.find((T)=>T.id===e);if(_){let T=f;if(T?.animate!==void 0)_.animate=T.animate;if(T?.animation!==void 0)_.animation=T.animation;if(T?.curve!==void 0)_.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(!Ol(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=An(c.start,c.end,{counter:0,prefix:"L"});else c.id=An(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=rr(T,{schema:nr})}let N=this.subGraphLookup.get(e);if(N&&f){N.metadata={...N.metadata,...f};return}let _=this.edges.find((T)=>T.id===e);if(_){let T=f;if(T?.animate!==void 0)_.animate=T.animate;if(T?.animation!==void 0)_.animation=T.animation;if(T?.curve!==void 0)_.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(!Ol(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=gn(c.start,c.end,{counter:0,prefix:"L"});else c.id=gn(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",()=>{W.runFunc(r,...n)},!1)})}setLink(e,r,a){e.split(",").forEach((n)=>{let o=this.vertices.get(n);if(o!==void 0)o.link=W.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=Na();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(Nt.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=[],B;return{nodeList:V.filter(function(ie){let d=typeof ie;if(ie.stmt&&ie.stmt==="dir")return B=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:B}},"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 _={id:n,nodes:A,title:o.trim(),classes:[],dir:f,labelType:this.sanitizeNodeLabelType(a?.type)};return l.info("Adding",_.id,_.nodes,_.dir),_.nodes=this.makeUniq(_,this.subGraphs).nodes,this.subGraphs.push(_),this.subGraphLookup.set(n,_),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,_=t((d)=>{A.set(d,N++);for(let m of f.get(d)??[])_(m)},"walk");for(let d of n)if(!c.has(d.id))_(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,B=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),B.set(d.id,m);for(let ue of d.nodes){if(ue===m)continue;T.add(ue),B.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),M=[...ie.defaultStyle??[]],K=B.get(d.start)??d.start,Y=B.get(d.end)??d.end;if(K===Y&&(B.has(d.start)||B.has(d.end)))return;if(d.style)M.push(...d.style);let q={id:An(K,Y,{counter:m,prefix:"L"},d.id),isUserDefinedId:d.isUserDefinedId,start:K,end:Y,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:M,style:M,pattern:d.stroke,look:e.look,animate:d.animate,animation:d.animation,curve:d.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};a.push(q)}),{nodes:r,edges:a,other:{},config:e}}defaultConfig(){return Bo.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=Tt(r,o),N=n.db.getDirection();A.type=n.type,A.layoutAlgorithm=St(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 _t(A,f);let _=A.config.flowchart?.diagramPadding??8;W.insertTitle(f,"flowchartTitleText",k?.titleTopMargin||0,n.db.getDiagramTitle()),lt(f,_,"flowchart",k?.useMaxWidth||!1)},"draw"),b1={getClasses:p1,draw:f1},At=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],_=[1,23],V=[1,25],D=[1,26],T=[1,27],B=[1,50],H=[1,49],ie=[1,29],d=[1,30],m=[1,31],ue=[1,32],le=[1,33],M=[1,45],K=[1,47],Y=[1,43],q=[1,48],Q=[1,44],J=[1,51],Z=[1,46],ee=[1,52],te=[1,53],Ze=[1,34],$e=[1,35],et=[1,36],tt=[1,37],it=[1,38],Fe=[1,58],v=[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],mt=[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],He=[44,60,89,102,105,106,109,111,114,115,116],Dt=[1,122],Et=[1,123],rt=[1,125],at=[1,124],yt=[44,60,62,74,89,102,105,106,109,111,114,115,116],xt=[1,134],Ft=[1,148],Bt=[1,149],vt=[1,150],Lt=[1,151],Vt=[1,136],wt=[1,138],It=[1,142],Rt=[1,143],Gt=[1,144],Pt=[1,145],Ot=[1,146],Mt=[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],ht=[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],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],F=[1,176],qe=[77,116,119],w=[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],Xe=[1,269],Zt=[8,9,11,106],fe=[8,9,10,11,60,84,105,106,109,110,111,112],dt={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:_,33:24,34:V,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:H,84:ie,85:d,86:m,87:ue,88:le,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},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(v,[2,3]),e(v,[2,4]),e(v,[2,5]),e(v,[2,6]),e(v,[2,7]),e(v,[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(v,[2,36]),{35:[1,75]},{37:[1,76]},e(v,[2,39]),e(Ie,[2,50],{18:77,39:78,10:Fe,40:mt}),{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(v,[2,185]),e(v,[2,186]),e(v,[2,187]),e(v,[2,188]),e(v,[2,189]),e(ve,[2,51]),e(ve,[2,54],{46:[1,100]}),e(re,[2,72],{113:113,29:[1,101],44:B,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:H,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:M,102:K,105:Y,106:q,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(v,[2,27]),{42:116,43:39,44:B,45:40,47:41,60:H,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(v,[2,40]),e(v,[2,41]),e(v,[2,42]),e(He,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Dt,81:Et,116:rt,119:at},{75:[1,126],77:[1,127]},e(yt,[2,83]),e(v,[2,28]),e(v,[2,29]),e(v,[2,30]),e(v,[2,31]),e(v,[2,32]),{10:xt,12:Ft,14:Bt,27:vt,28:128,32:Lt,44:Vt,60:wt,75:It,80:[1,130],81:[1,131],83:141,84:Rt,85:Gt,86:Pt,87:Ot,88:Mt,89:Ut,90:Wt,91:129,105:zt,109:jt,111:Kt,114:Yt,115:Ht,116:qt},e(ht,k,{5:154}),e(v,[2,37]),e(v,[2,38]),e(Ie,[2,48],{44:Xt}),e(Ie,[2,49],{18:156,10:Fe,40:Qt}),e(ve,[2,44]),{44:B,47:158,60:H,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},{102:[1,159],103:160,105:[1,161]},{44:B,47:162,60:H,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},{44:B,47:163,60:H,89:M,102:K,105:Y,106:q,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:B,47:170,60:H,89:M,102:K,105:Y,106:q,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:F},{30:179,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:181,50:[1,180],67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:182,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:183,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:184,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{109:[1,185]},{30:186,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:187,65:[1,188],67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:189,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:190,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:191,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},e(ce,[2,182]),e(o,[2,20]),e(Ct,[2,25]),e(Ie,[2,46],{39:192,18:193,10:Fe,40:mt}),e(He,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{77:[1,197],79:198,116:rt,119:at},e(qe,[2,79]),e(qe,[2,81]),e(qe,[2,82]),e(qe,[2,168]),e(qe,[2,169]),{76:199,79:121,80:Dt,81:Et,116:rt,119:at},e(yt,[2,84]),{8:be,9:ke,10:xt,11:ge,12:Ft,14:Bt,21:201,27:vt,29:[1,200],32:Lt,44:Vt,60:wt,75:It,83:141,84:Rt,85:Gt,86:Pt,87:Ot,88:Mt,89:Ut,90:Wt,91:202,105:zt,109:jt,111:Kt,114:Yt,115:Ht,116:qt},e(w,[2,101]),e(w,[2,103]),e(w,[2,104]),e(w,[2,157]),e(w,[2,158]),e(w,[2,159]),e(w,[2,160]),e(w,[2,161]),e(w,[2,162]),e(w,[2,163]),e(w,[2,164]),e(w,[2,165]),e(w,[2,166]),e(w,[2,167]),e(w,[2,90]),e(w,[2,91]),e(w,[2,92]),e(w,[2,93]),e(w,[2,94]),e(w,[2,95]),e(w,[2,96]),e(w,[2,97]),e(w,[2,98]),e(w,[2,99]),e(w,[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:_,32:[1,203],33:24,34:V,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:H,84:ie,85:d,86:m,87:ue,88:le,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},{10:Fe,18:204},{44:[1,205]},e(ve,[2,43]),{10:[1,206],44:B,60:H,89:M,102:K,105:Y,106:q,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:B,60:H,89:M,102:K,105:Y,106:q,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,211],44:B,60:H,89:M,102:K,105:Y,106:q,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:B,60:H,89:M,102:K,105:Y,106:q,109:Q,111:J,114:Z,115:ee,116:te}),{31:[1,218],67:E,82:219,116:S,117:y,118:F},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:F},{30:221,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{51:[1,222],67:E,82:219,116:S,117:y,118:F},{53:[1,223],67:E,82:219,116:S,117:y,118:F},{55:[1,224],67:E,82:219,116:S,117:y,118:F},{57:[1,225],67:E,82:219,116:S,117:y,118:F},{60:[1,226]},{64:[1,227],67:E,82:219,116:S,117:y,118:F},{66:[1,228],67:E,82:219,116:S,117:y,118:F},{30:229,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{31:[1,230],67:E,82:219,116:S,117:y,118:F},{67:E,69:[1,231],71:[1,232],82:219,116:S,117:y,118:F},{67:E,69:[1,234],71:[1,233],82:219,116:S,117:y,118:F},e(Ie,[2,45],{18:156,10:Fe,40:Qt}),e(Ie,[2,47],{44:Xt}),e(He,[2,75]),e(He,[2,74]),{62:[1,235],67:E,82:219,116:S,117:y,118:F},e(He,[2,77]),e(qe,[2,80]),{77:[1,236],79:198,116:rt,119:at},{30:237,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},e(ht,k,{5:238}),e(w,[2,102]),e(v,[2,35]),{43:239,44:B,45:40,47:41,60:H,89:M,102:K,105:Y,106:q,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:B,47:258,60:H,89:M,102:K,105:Y,106:q,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:F},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:F},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(He,[2,78]),{31:[1,266],67:E,82:219,116:S,117:y,118:F},{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:_,32:[1,267],33:24,34:V,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:H,84:ie,85:d,86:m,87:ue,88:le,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},e(ve,[2,53]),{43:268,44:B,45:40,47:41,60:H,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(P,[2,121],{106:Xe}),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(P,[2,122],{106:Xe}),{10:[1,271]},e(P,[2,123],{106:Xe}),{10:[1,272]},e(Jt,[2,129]),e(P,[2,105],{106:Xe}),e(P,[2,106],{113:113,44:B,60:H,89:M,102:K,105:Y,106:q,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(v,[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:F},e(re,[2,66]),e(ht,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(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:F},{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:_,32:[1,288],33:24,34:V,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:H,84:ie,85:d,86:m,87:ue,88:le,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},{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(v,[2,33]),e(P,[2,124],{106:Xe}),e(P,[2,125],{106:Xe})],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,$t=0,e1=0,u1=2,t1=1,o1=s.slice.call(arguments,1),se=Object.create(this.lexer),Ve={yy:{}};for(var pt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,pt))Ve.yy[pt]=this.yy[pt];if(se.setInput(b,Ve.yy),Ve.yy.lexer=se,Ve.yy.parser=this,typeof se.yylloc>"u")se.yylloc={};var ft=se.yylloc;s.push(ft);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,bt,we,de,C1,kt,Qe={},ut,xe,i1,ct;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 gt="";ct=[];for(ut in Le[we])if(this.terminals_[ut]&&ut>u1)ct.push("'"+this.terminals_[ut]+"'");if(se.showPosition)gt="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",()=>{W.runFunc(r,...n)},!1)})}setLink(e,r,a){e.split(",").forEach((n)=>{let o=this.vertices.get(n);if(o!==void 0)o.link=W.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=Na();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(Nt.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=[],B;return{nodeList:V.filter(function(ie){let d=typeof ie;if(ie.stmt&&ie.stmt==="dir")return B=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:B}},"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 _={id:n,nodes:A,title:o.trim(),classes:[],dir:f,labelType:this.sanitizeNodeLabelType(a?.type)};return l.info("Adding",_.id,_.nodes,_.dir),_.nodes=this.makeUniq(_,this.subGraphs).nodes,this.subGraphs.push(_),this.subGraphLookup.set(n,_),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,_=t((d)=>{A.set(d,N++);for(let m of f.get(d)??[])_(m)},"walk");for(let d of n)if(!c.has(d.id))_(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,B=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),B.set(d.id,m);for(let ue of d.nodes){if(ue===m)continue;T.add(ue),B.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),M=[...ie.defaultStyle??[]],K=B.get(d.start)??d.start,Y=B.get(d.end)??d.end;if(K===Y&&(B.has(d.start)||B.has(d.end)))return;if(d.style)M.push(...d.style);let q={id:gn(K,Y,{counter:m,prefix:"L"},d.id),isUserDefinedId:d.isUserDefinedId,start:K,end:Y,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:M,style:M,pattern:d.stroke,look:e.look,animate:d.animate,animation:d.animation,curve:d.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};a.push(q)}),{nodes:r,edges:a,other:{},config:e}}defaultConfig(){return Bo.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=Tt(r,o),N=n.db.getDirection();A.type=n.type,A.layoutAlgorithm=St(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 _t(A,f);let _=A.config.flowchart?.diagramPadding??8;W.insertTitle(f,"flowchartTitleText",k?.titleTopMargin||0,n.db.getDiagramTitle()),lt(f,_,"flowchart",k?.useMaxWidth||!1)},"draw"),b1={getClasses:p1,draw:f1},At=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],_=[1,23],V=[1,25],D=[1,26],T=[1,27],B=[1,50],H=[1,49],ie=[1,29],d=[1,30],m=[1,31],ue=[1,32],le=[1,33],M=[1,45],K=[1,47],Y=[1,43],q=[1,48],Q=[1,44],J=[1,51],Z=[1,46],ee=[1,52],te=[1,53],Ze=[1,34],$e=[1,35],et=[1,36],tt=[1,37],it=[1,38],Fe=[1,58],v=[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],mt=[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],He=[44,60,89,102,105,106,109,111,114,115,116],Dt=[1,122],Et=[1,123],rt=[1,125],at=[1,124],yt=[44,60,62,74,89,102,105,106,109,111,114,115,116],xt=[1,134],Ft=[1,148],Bt=[1,149],vt=[1,150],Lt=[1,151],Vt=[1,136],wt=[1,138],It=[1,142],Rt=[1,143],Gt=[1,144],Pt=[1,145],Ot=[1,146],Mt=[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],ht=[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],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],F=[1,176],qe=[77,116,119],w=[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],Xe=[1,269],Zt=[8,9,11,106],fe=[8,9,10,11,60,84,105,106,109,110,111,112],dt={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:_,33:24,34:V,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:H,84:ie,85:d,86:m,87:ue,88:le,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},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(v,[2,3]),e(v,[2,4]),e(v,[2,5]),e(v,[2,6]),e(v,[2,7]),e(v,[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(v,[2,36]),{35:[1,75]},{37:[1,76]},e(v,[2,39]),e(Ie,[2,50],{18:77,39:78,10:Fe,40:mt}),{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(v,[2,185]),e(v,[2,186]),e(v,[2,187]),e(v,[2,188]),e(v,[2,189]),e(ve,[2,51]),e(ve,[2,54],{46:[1,100]}),e(re,[2,72],{113:113,29:[1,101],44:B,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:H,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:M,102:K,105:Y,106:q,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(v,[2,27]),{42:116,43:39,44:B,45:40,47:41,60:H,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(v,[2,40]),e(v,[2,41]),e(v,[2,42]),e(He,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Dt,81:Et,116:rt,119:at},{75:[1,126],77:[1,127]},e(yt,[2,83]),e(v,[2,28]),e(v,[2,29]),e(v,[2,30]),e(v,[2,31]),e(v,[2,32]),{10:xt,12:Ft,14:Bt,27:vt,28:128,32:Lt,44:Vt,60:wt,75:It,80:[1,130],81:[1,131],83:141,84:Rt,85:Gt,86:Pt,87:Ot,88:Mt,89:Ut,90:Wt,91:129,105:zt,109:jt,111:Kt,114:Yt,115:Ht,116:qt},e(ht,k,{5:154}),e(v,[2,37]),e(v,[2,38]),e(Ie,[2,48],{44:Xt}),e(Ie,[2,49],{18:156,10:Fe,40:Qt}),e(ve,[2,44]),{44:B,47:158,60:H,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},{102:[1,159],103:160,105:[1,161]},{44:B,47:162,60:H,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},{44:B,47:163,60:H,89:M,102:K,105:Y,106:q,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:B,47:170,60:H,89:M,102:K,105:Y,106:q,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:F},{30:179,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:181,50:[1,180],67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:182,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:183,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:184,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{109:[1,185]},{30:186,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:187,65:[1,188],67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:189,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:190,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:191,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},e(ce,[2,182]),e(o,[2,20]),e(Ct,[2,25]),e(Ie,[2,46],{39:192,18:193,10:Fe,40:mt}),e(He,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{77:[1,197],79:198,116:rt,119:at},e(qe,[2,79]),e(qe,[2,81]),e(qe,[2,82]),e(qe,[2,168]),e(qe,[2,169]),{76:199,79:121,80:Dt,81:Et,116:rt,119:at},e(yt,[2,84]),{8:be,9:ke,10:xt,11:ge,12:Ft,14:Bt,21:201,27:vt,29:[1,200],32:Lt,44:Vt,60:wt,75:It,83:141,84:Rt,85:Gt,86:Pt,87:Ot,88:Mt,89:Ut,90:Wt,91:202,105:zt,109:jt,111:Kt,114:Yt,115:Ht,116:qt},e(w,[2,101]),e(w,[2,103]),e(w,[2,104]),e(w,[2,157]),e(w,[2,158]),e(w,[2,159]),e(w,[2,160]),e(w,[2,161]),e(w,[2,162]),e(w,[2,163]),e(w,[2,164]),e(w,[2,165]),e(w,[2,166]),e(w,[2,167]),e(w,[2,90]),e(w,[2,91]),e(w,[2,92]),e(w,[2,93]),e(w,[2,94]),e(w,[2,95]),e(w,[2,96]),e(w,[2,97]),e(w,[2,98]),e(w,[2,99]),e(w,[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:_,32:[1,203],33:24,34:V,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:H,84:ie,85:d,86:m,87:ue,88:le,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},{10:Fe,18:204},{44:[1,205]},e(ve,[2,43]),{10:[1,206],44:B,60:H,89:M,102:K,105:Y,106:q,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:B,60:H,89:M,102:K,105:Y,106:q,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,211],44:B,60:H,89:M,102:K,105:Y,106:q,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:B,60:H,89:M,102:K,105:Y,106:q,109:Q,111:J,114:Z,115:ee,116:te}),{31:[1,218],67:E,82:219,116:S,117:y,118:F},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:F},{30:221,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{51:[1,222],67:E,82:219,116:S,117:y,118:F},{53:[1,223],67:E,82:219,116:S,117:y,118:F},{55:[1,224],67:E,82:219,116:S,117:y,118:F},{57:[1,225],67:E,82:219,116:S,117:y,118:F},{60:[1,226]},{64:[1,227],67:E,82:219,116:S,117:y,118:F},{66:[1,228],67:E,82:219,116:S,117:y,118:F},{30:229,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{31:[1,230],67:E,82:219,116:S,117:y,118:F},{67:E,69:[1,231],71:[1,232],82:219,116:S,117:y,118:F},{67:E,69:[1,234],71:[1,233],82:219,116:S,117:y,118:F},e(Ie,[2,45],{18:156,10:Fe,40:Qt}),e(Ie,[2,47],{44:Xt}),e(He,[2,75]),e(He,[2,74]),{62:[1,235],67:E,82:219,116:S,117:y,118:F},e(He,[2,77]),e(qe,[2,80]),{77:[1,236],79:198,116:rt,119:at},{30:237,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},e(ht,k,{5:238}),e(w,[2,102]),e(v,[2,35]),{43:239,44:B,45:40,47:41,60:H,89:M,102:K,105:Y,106:q,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:B,47:258,60:H,89:M,102:K,105:Y,106:q,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:F},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:F},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(He,[2,78]),{31:[1,266],67:E,82:219,116:S,117:y,118:F},{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:_,32:[1,267],33:24,34:V,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:H,84:ie,85:d,86:m,87:ue,88:le,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},e(ve,[2,53]),{43:268,44:B,45:40,47:41,60:H,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(P,[2,121],{106:Xe}),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(P,[2,122],{106:Xe}),{10:[1,271]},e(P,[2,123],{106:Xe}),{10:[1,272]},e(Jt,[2,129]),e(P,[2,105],{106:Xe}),e(P,[2,106],{113:113,44:B,60:H,89:M,102:K,105:Y,106:q,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(v,[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:F},e(re,[2,66]),e(ht,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(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:F},{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:_,32:[1,288],33:24,34:V,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:H,84:ie,85:d,86:m,87:ue,88:le,89:M,102:K,105:Y,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},{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(v,[2,33]),e(P,[2,124],{106:Xe}),e(P,[2,125],{106:Xe})],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,$t=0,e1=0,u1=2,t1=1,o1=s.slice.call(arguments,1),se=Object.create(this.lexer),Ve={yy:{}};for(var pt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,pt))Ve.yy[pt]=this.yy[pt];if(se.setInput(b,Ve.yy),Ve.yy.lexer=se,Ve.yy.parser=this,typeof se.yylloc>"u")se.yylloc={};var ft=se.yylloc;s.push(ft);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,bt,we,de,C1,kt,Qe={},ut,xe,i1,ct;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 gt="";ct=[];for(ut in Le[we])if(this.terminals_[ut]&&ut>u1)ct.push("'"+this.terminals_[ut]+"'");if(se.showPosition)gt="Parse error on line "+(X+1)+`:
10
10
  `+se.showPosition()+`
11
11
  Expecting `+ct.join(", ")+", got '"+(this.terminals_[oe]||oe)+"'";else gt="Parse error on line "+(X+1)+": Unexpected "+(oe==t1?"end of input":"'"+(this.terminals_[oe]||oe)+"'");this.parseError(gt,{text:se.match,token:this.terminals_[oe]||oe,line:se.yylineno,loc:ft,expected:ct})}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,!bt){if($t=se.yyleng,i=se.yytext,X=se.yylineno,ft=se.yylloc,e1>0)e1--}else oe=bt,bt=null;break;case 2:if(xe=this.productions_[de[1]][1],Qe.$=I[I.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(kt=this.performAction.apply(Qe,[i,$t,X,Ve.yy,de[1],I,s].concat(o1)),typeof kt<"u")return kt;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(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 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()+`
@@ -209,6 +209,6 @@ ${k?`
209
209
  }
210
210
  text-align: center;
211
211
  }
212
- ${kn()}
213
- `,"getStyles"),df=m1,pf=t(({styles:e=df}={})=>({parser:k1,get db(){return new d1},renderer:b1,styles:e,init:t((r)=>{if(!r.flowchart)r.flowchart={};r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,oa({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),rh=pf();
214
- export{df,pf,rh};
212
+ ${xn()}
213
+ `,"getStyles"),pf=m1,mf=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,oa({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),ah=mf();
214
+ export{pf,mf,ah};
@@ -1,2 +1,2 @@
1
- import{Df}from"./index-hf52f59k.js";var e=Object.freeze(JSON.parse('{"displayName":"XML","name":"xml","patterns":[{"begin":"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml","patterns":[{"match":" ([-A-Za-z]+)","name":"entity.other.attribute-name.xml"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"begin":"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.doctype.xml"},"3":{"name":"variable.language.documentroot.xml"}},"end":"\\\\s*(>)","name":"meta.tag.sgml.doctype.xml","patterns":[{"include":"#internalSubset"}]},{"include":"#comments"},{"begin":"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"entity.name.tag.namespace.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml","patterns":[{"include":"#tagStuff"}]},{"begin":"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(/?>)","name":"meta.tag.xml","patterns":[{"include":"#tagStuff"}]},{"include":"#entity"},{"include":"#bare-ampersand"},{"begin":"<%@","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java-props.embedded.xml","patterns":[{"match":"page|include|taglib","name":"keyword.other.page-props.xml"}]},{"begin":"<%[!=]?(?!--)","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"(?!--)%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java.embedded.xml","patterns":[{"include":"source.java"}]},{"begin":"<!\\\\[CDATA\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"]]>","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.unquoted.cdata.xml"}],"repository":{"EntityDecl":{"begin":"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.entity.xml"},"3":{"name":"punctuation.definition.entity.xml"},"4":{"name":"variable.language.entity.xml"},"5":{"name":"keyword.other.entitytype.xml"}},"end":"(>)","patterns":[{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},"bare-ampersand":{"match":"&","name":"invalid.illegal.bad-ampersand.xml"},"comments":{"patterns":[{"begin":"<%--","captures":{"0":{"name":"punctuation.definition.comment.xml"},"end":"--%>","name":"comment.block.xml"}},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.xml"}},"end":"-->","name":"comment.block.xml","patterns":[{"begin":"--(?!>)","captures":{"0":{"name":"invalid.illegal.bad-comments-or-CDATA.xml"}}}]}]},"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"entity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.xml"},"internalSubset":{"begin":"(\\\\[)","captures":{"1":{"name":"punctuation.definition.constant.xml"}},"end":"(])","name":"meta.internalsubset.xml","patterns":[{"include":"#EntityDecl"},{"include":"#parameterEntity"},{"include":"#comments"}]},"parameterEntity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)","name":"constant.character.parameter-entity.xml"},"singlequotedString":{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"tagStuff":{"patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*="},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]}},"scopeName":"text.xml","embeddedLangs":["java"]}')),Hi=[...Df,e];
1
+ import{Qf}from"./index-8cy3x2y8.js";var e=Object.freeze(JSON.parse('{"displayName":"XML","name":"xml","patterns":[{"begin":"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml","patterns":[{"match":" ([-A-Za-z]+)","name":"entity.other.attribute-name.xml"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"begin":"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.doctype.xml"},"3":{"name":"variable.language.documentroot.xml"}},"end":"\\\\s*(>)","name":"meta.tag.sgml.doctype.xml","patterns":[{"include":"#internalSubset"}]},{"include":"#comments"},{"begin":"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"entity.name.tag.namespace.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml","patterns":[{"include":"#tagStuff"}]},{"begin":"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(/?>)","name":"meta.tag.xml","patterns":[{"include":"#tagStuff"}]},{"include":"#entity"},{"include":"#bare-ampersand"},{"begin":"<%@","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java-props.embedded.xml","patterns":[{"match":"page|include|taglib","name":"keyword.other.page-props.xml"}]},{"begin":"<%[!=]?(?!--)","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"(?!--)%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java.embedded.xml","patterns":[{"include":"source.java"}]},{"begin":"<!\\\\[CDATA\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"]]>","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.unquoted.cdata.xml"}],"repository":{"EntityDecl":{"begin":"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.entity.xml"},"3":{"name":"punctuation.definition.entity.xml"},"4":{"name":"variable.language.entity.xml"},"5":{"name":"keyword.other.entitytype.xml"}},"end":"(>)","patterns":[{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},"bare-ampersand":{"match":"&","name":"invalid.illegal.bad-ampersand.xml"},"comments":{"patterns":[{"begin":"<%--","captures":{"0":{"name":"punctuation.definition.comment.xml"},"end":"--%>","name":"comment.block.xml"}},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.xml"}},"end":"-->","name":"comment.block.xml","patterns":[{"begin":"--(?!>)","captures":{"0":{"name":"invalid.illegal.bad-comments-or-CDATA.xml"}}}]}]},"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"entity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.xml"},"internalSubset":{"begin":"(\\\\[)","captures":{"1":{"name":"punctuation.definition.constant.xml"}},"end":"(])","name":"meta.internalsubset.xml","patterns":[{"include":"#EntityDecl"},{"include":"#parameterEntity"},{"include":"#comments"}]},"parameterEntity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)","name":"constant.character.parameter-entity.xml"},"singlequotedString":{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"tagStuff":{"patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*="},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]}},"scopeName":"text.xml","embeddedLangs":["java"]}')),Hi=[...Qf,e];
2
2
  export{Hi};