rdstudio 0.2.0__py3-none-any.whl

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 (251) hide show
  1. rdstudio/__init__.py +3 -0
  2. rdstudio/_node/rdstudio.mjs +59351 -0
  3. rdstudio/brief.py +46 -0
  4. rdstudio/build.py +218 -0
  5. rdstudio/classify.py +131 -0
  6. rdstudio/cli.py +369 -0
  7. rdstudio/config.py +115 -0
  8. rdstudio/gitlog.py +92 -0
  9. rdstudio/launcher.py +63 -0
  10. rdstudio/learner.py +187 -0
  11. rdstudio/mcp_server.py +313 -0
  12. rdstudio/okf.py +775 -0
  13. rdstudio/procedures.py +233 -0
  14. rdstudio/references.py +228 -0
  15. rdstudio/reports.py +75 -0
  16. rdstudio/scaffold.py +227 -0
  17. rdstudio/scopes.py +162 -0
  18. rdstudio/search.py +149 -0
  19. rdstudio/serve.py +214 -0
  20. rdstudio/store.py +161 -0
  21. rdstudio/templates/agents/critic.md +20 -0
  22. rdstudio/templates/agents/librarian.md +21 -0
  23. rdstudio/templates/agents/searcher.md +21 -0
  24. rdstudio/templates/agents_section.md +31 -0
  25. rdstudio/templates/claude_section.md +3 -0
  26. rdstudio/templates/knowledge/overview.md +20 -0
  27. rdstudio/templates/knowledge/tasks/bootstrap-knowledge-base.md +45 -0
  28. rdstudio/templates/skills/decision/SKILL.md +47 -0
  29. rdstudio/templates/skills/handoff/SKILL.md +18 -0
  30. rdstudio/templates/skills/ingest-ref/SKILL.md +32 -0
  31. rdstudio/templates/skills/lint-okf/SKILL.md +15 -0
  32. rdstudio/templates/skills/promote/SKILL.md +25 -0
  33. rdstudio/templates/skills/question/SKILL.md +33 -0
  34. rdstudio/templates/skills/record-okf/SKILL.md +61 -0
  35. rdstudio/templates/skills/report/SKILL.md +46 -0
  36. rdstudio/templates/skills/report/template.html +74 -0
  37. rdstudio/templates/skills/search-okf/SKILL.md +36 -0
  38. rdstudio/templates/skills/task/SKILL.md +51 -0
  39. rdstudio/web/app.js +140 -0
  40. rdstudio/web/fonts.css +48 -0
  41. rdstudio/web/icon-192.png +0 -0
  42. rdstudio/web/icon-512.png +0 -0
  43. rdstudio/web/index.html +109 -0
  44. rdstudio/web/js/data.js +125 -0
  45. rdstudio/web/js/diagrams.js +116 -0
  46. rdstudio/web/js/graph.js +396 -0
  47. rdstudio/web/js/knowledge.js +212 -0
  48. rdstudio/web/js/layout-worker.js +15 -0
  49. rdstudio/web/js/layout.js +226 -0
  50. rdstudio/web/js/learn.js +83 -0
  51. rdstudio/web/js/map.js +1293 -0
  52. rdstudio/web/js/markdown.js +173 -0
  53. rdstudio/web/js/pages.js +219 -0
  54. rdstudio/web/js/procedures.js +262 -0
  55. rdstudio/web/js/settings.js +95 -0
  56. rdstudio/web/js/util.js +99 -0
  57. rdstudio/web/report.css +35 -0
  58. rdstudio/web/report.js +104 -0
  59. rdstudio/web/style.css +566 -0
  60. rdstudio/web/sw.js +166 -0
  61. rdstudio/web/themes/cyber.css +139 -0
  62. rdstudio/web/themes/map.css +133 -0
  63. rdstudio/web/themes/notebook.css +134 -0
  64. rdstudio/web/themes/space.css +135 -0
  65. rdstudio/web/themes/studio.css +110 -0
  66. rdstudio/web/vendor/d3.min.js +2 -0
  67. rdstudio/web/vendor/fonts/atkinson-hyperlegible-next-latin-ext-wght-italic.woff2 +0 -0
  68. rdstudio/web/vendor/fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2 +0 -0
  69. rdstudio/web/vendor/fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2 +0 -0
  70. rdstudio/web/vendor/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2 +0 -0
  71. rdstudio/web/vendor/fonts/caveat-latin-wght-normal.woff2 +0 -0
  72. rdstudio/web/vendor/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
  73. rdstudio/web/vendor/fonts/ibm-plex-mono-latin-600-normal.woff2 +0 -0
  74. rdstudio/web/vendor/fonts/ibm-plex-sans-latin-wght-italic.woff2 +0 -0
  75. rdstudio/web/vendor/fonts/ibm-plex-sans-latin-wght-normal.woff2 +0 -0
  76. rdstudio/web/vendor/fonts/inter-latin-opsz-italic.woff2 +0 -0
  77. rdstudio/web/vendor/fonts/inter-latin-opsz-normal.woff2 +0 -0
  78. rdstudio/web/vendor/fonts/jetbrains-mono-latin-wght-italic.woff2 +0 -0
  79. rdstudio/web/vendor/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
  80. rdstudio/web/vendor/fonts/literata-latin-ext-opsz-italic.woff2 +0 -0
  81. rdstudio/web/vendor/fonts/literata-latin-ext-opsz-normal.woff2 +0 -0
  82. rdstudio/web/vendor/fonts/literata-latin-opsz-italic.woff2 +0 -0
  83. rdstudio/web/vendor/fonts/literata-latin-opsz-normal.woff2 +0 -0
  84. rdstudio/web/vendor/fonts/source-sans-3-latin-wght-italic.woff2 +0 -0
  85. rdstudio/web/vendor/fonts/source-sans-3-latin-wght-normal.woff2 +0 -0
  86. rdstudio/web/vendor/fonts/source-serif-4-latin-opsz-italic.woff2 +0 -0
  87. rdstudio/web/vendor/fonts/source-serif-4-latin-opsz-normal.woff2 +0 -0
  88. rdstudio/web/vendor/hljs/github-dark.min.css +10 -0
  89. rdstudio/web/vendor/hljs/github.min.css +10 -0
  90. rdstudio/web/vendor/hljs/highlight.min.js +1262 -0
  91. rdstudio/web/vendor/hljs/julia.min.js +18 -0
  92. rdstudio/web/vendor/hljs/latex.min.js +33 -0
  93. rdstudio/web/vendor/hljs/matlab.min.js +15 -0
  94. rdstudio/web/vendor/katex/auto-render.min.js +1 -0
  95. rdstudio/web/vendor/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  96. rdstudio/web/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  97. rdstudio/web/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  98. rdstudio/web/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  99. rdstudio/web/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  100. rdstudio/web/vendor/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
  101. rdstudio/web/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  102. rdstudio/web/vendor/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
  103. rdstudio/web/vendor/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
  104. rdstudio/web/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  105. rdstudio/web/vendor/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
  106. rdstudio/web/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  107. rdstudio/web/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  108. rdstudio/web/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  109. rdstudio/web/vendor/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
  110. rdstudio/web/vendor/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  111. rdstudio/web/vendor/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  112. rdstudio/web/vendor/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  113. rdstudio/web/vendor/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  114. rdstudio/web/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  115. rdstudio/web/vendor/katex/katex.min.css +1 -0
  116. rdstudio/web/vendor/katex/katex.min.js +1 -0
  117. rdstudio/web/vendor/licenses/atkinson-hyperlegible-next-OFL.txt +93 -0
  118. rdstudio/web/vendor/licenses/caveat-OFL.txt +93 -0
  119. rdstudio/web/vendor/licenses/d3-7.9.0.txt +13 -0
  120. rdstudio/web/vendor/licenses/highlightjs-cdn-assets-11.12.0.txt +29 -0
  121. rdstudio/web/vendor/licenses/ibm-plex-mono-OFL.txt +93 -0
  122. rdstudio/web/vendor/licenses/ibm-plex-sans-OFL.txt +93 -0
  123. rdstudio/web/vendor/licenses/inter-OFL.txt +93 -0
  124. rdstudio/web/vendor/licenses/jetbrains-mono-OFL.txt +93 -0
  125. rdstudio/web/vendor/licenses/katex-0.18.7.txt +21 -0
  126. rdstudio/web/vendor/licenses/literata-OFL.txt +93 -0
  127. rdstudio/web/vendor/licenses/markdown-it-15.0.2.txt +22 -0
  128. rdstudio/web/vendor/licenses/markdown-it-footnote-4.0.0.txt +22 -0
  129. rdstudio/web/vendor/licenses/markdown-it-texmath-1.0.0.txt +21 -0
  130. rdstudio/web/vendor/licenses/mermaid-12.0.0.txt +21 -0
  131. rdstudio/web/vendor/licenses/source-sans-3-OFL.txt +93 -0
  132. rdstudio/web/vendor/licenses/source-serif-4-OFL.txt +93 -0
  133. rdstudio/web/vendor/licenses/vega-6.4.0.txt +27 -0
  134. rdstudio/web/vendor/licenses/vega-embed-7.2.0.txt +27 -0
  135. rdstudio/web/vendor/licenses/vega-lite-6.4.3.txt +27 -0
  136. rdstudio/web/vendor/markdown-it-footnote.min.js +2 -0
  137. rdstudio/web/vendor/markdown-it.min.js +14 -0
  138. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/abnfDiagram-DGLNOSUI.mjs +1 -0
  139. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/architecture-7GRP2DOG-HF4J73XS.mjs +1 -0
  140. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/architectureDiagram-IU6H5EVY.mjs +36 -0
  141. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/blockDiagram-FSX6DT2V.mjs +140 -0
  142. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/c4Diagram-YNRVYILN.mjs +38 -0
  143. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-22SYA5HA.mjs +1 -0
  144. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-2FTYKNOQ.mjs +1 -0
  145. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-36VM3LGA.mjs +1 -0
  146. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-3SEI7E7V.mjs +1 -0
  147. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-3T2MNPEU.mjs +1 -0
  148. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-44AU3KAP.mjs +174 -0
  149. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-4MZOTL6B.mjs +1 -0
  150. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-52IMQVNL.mjs +1 -0
  151. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-5NYYYZGL.mjs +1 -0
  152. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-BOZ75642.mjs +15 -0
  153. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-CVBX6EWK.mjs +1 -0
  154. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-D36F7FYG.mjs +14 -0
  155. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-DEGLBX6O.mjs +213 -0
  156. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-F6PIGZHG.mjs +1 -0
  157. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-FE53TMRB.mjs +133 -0
  158. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-FNR2RGIF.mjs +1 -0
  159. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-GDOATIN3.mjs +32 -0
  160. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-H7BX327W.mjs +2 -0
  161. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-HI3EPXIC.mjs +2 -0
  162. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-JCBDXJ5W.mjs +1 -0
  163. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-JGXDHUYS.mjs +1 -0
  164. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-L2B47AAZ.mjs +1 -0
  165. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-LIEGGFIX.mjs +1 -0
  166. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-LLWYPJEZ.mjs +1 -0
  167. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-MFYRHTYG.mjs +1 -0
  168. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-MIE3LDYP.mjs +1 -0
  169. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-MLQVGYRW.mjs +1 -0
  170. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-MNT3HHAC.mjs +1 -0
  171. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-NRRTYJAG.mjs +1 -0
  172. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-OCMJQKYE.mjs +10 -0
  173. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-PKJCTQEK.mjs +339 -0
  174. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-QADHU5CF.mjs +2 -0
  175. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-QVIEFLGF.mjs +1 -0
  176. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-QX7LGXZU.mjs +1 -0
  177. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-R2KH53MI.mjs +1 -0
  178. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-RXM7Z7NK.mjs +2 -0
  179. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-S4TE5DX6.mjs +1 -0
  180. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-SDIBIOXT.mjs +1 -0
  181. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-TDFULVG6.mjs +1 -0
  182. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-TECWHJ6D.mjs +62 -0
  183. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-TINYC7RT.mjs +70 -0
  184. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-V3KJR4XU.mjs +1 -0
  185. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-VTMXW4ES.mjs +1 -0
  186. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-Y5NT6LW5.mjs +88 -0
  187. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-Y5O5OPKC.mjs +3 -0
  188. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-YZG4BXY6.mjs +1 -0
  189. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/chunk-ZZ52EIBP.mjs +1 -0
  190. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/classDiagram-v2-VV4INRHB.mjs +217 -0
  191. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/cose-bilkent-MSIMRU2B.mjs +1 -0
  192. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/cynefin-OW5HDTMX-KMPDV6GS.mjs +1 -0
  193. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/cynefinDiagram-KTGLXFXK.mjs +62 -0
  194. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/dagre-QJJCSHY4.mjs +4 -0
  195. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/diagram-2ZIM67RP.mjs +3 -0
  196. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/diagram-FYHH5O6R.mjs +24 -0
  197. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/diagram-LYLDACMS.mjs +200 -0
  198. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/diagram-TYT3HRBC.mjs +24 -0
  199. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/diagram-XVIN6YVD.mjs +30 -0
  200. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/diagram-ZO2NLLYC.mjs +41 -0
  201. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/ebnfDiagram-TU3FGH35.mjs +1 -0
  202. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/elk-GHAXNSLK.mjs +27 -0
  203. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/erDiagram-XID3VV23.mjs +99 -0
  204. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/eventmodeling-NTZA5JFV-P5QJSWSK.mjs +1 -0
  205. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/flowDiagram-WPHQAKTU.mjs +1 -0
  206. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/ganttDiagram-QACGSKG6.mjs +292 -0
  207. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/gitGraph-4MIJSDKK-V5NEQQYP.mjs +1 -0
  208. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/gitGraphDiagram-EB76O4HC.mjs +106 -0
  209. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/info-A6RAGUB7-IGBHH2L7.mjs +1 -0
  210. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/infoDiagram-343ZKIDN.mjs +2 -0
  211. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/ishikawaDiagram-UEEU5D75.mjs +70 -0
  212. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/journeyDiagram-4QTZOVLF.mjs +139 -0
  213. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/kanban-definition-VEJL4RG2.mjs +89 -0
  214. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/katex-QVRI4OIV.mjs +257 -0
  215. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/mindmap-definition-C5K5ZT7T.mjs +96 -0
  216. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/packet-AYTQ26CC-PJTKDECJ.mjs +1 -0
  217. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/pegDiagram-FHIILVJB.mjs +1 -0
  218. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/pie-WAS4IAKB-U3JFQXZN.mjs +1 -0
  219. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/pieDiagram-S76BU6V7.mjs +39 -0
  220. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/quadrantDiagram-HZBLWUZE.mjs +7 -0
  221. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/radar-RG4KPBEZ-7T2UW32D.mjs +1 -0
  222. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/railroad-74A4TZTK-DZY7ARDL.mjs +1 -0
  223. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/railroad-abnf-HS5TGJTU-LWS535ZK.mjs +1 -0
  224. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/railroad-ebnf-LZEXJU2U-EA3S4ZFM.mjs +1 -0
  225. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/railroad-peg-WCYAUIDC-DUKZONPX.mjs +1 -0
  226. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/railroadDiagram-R6RP3MQ2.mjs +1 -0
  227. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/requirementDiagram-SGBABQV6.mjs +84 -0
  228. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/sankeyDiagram-IM6M5BOW.mjs +40 -0
  229. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/sequenceDiagram-FGJOIFJ2.mjs +169 -0
  230. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/sizeCapture-ERV5D3W5.mjs +1 -0
  231. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/stateDiagram-v2-6KDGCZ5J.mjs +291 -0
  232. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/swimlanes-OJBUSBEF.mjs +1 -0
  233. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/swimlanesDiagram-LNXYTHDW.mjs +8 -0
  234. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/timeline-definition-7G6YQRTY.mjs +120 -0
  235. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/treeView-Q6P3EWNA-AABPVERA.mjs +1 -0
  236. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/treemap-WGGIJYW6-F2JSY3V3.mjs +1 -0
  237. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/usecaseDiagram-6Y6TMLBO.mjs +383 -0
  238. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/vennDiagram-6RODYPCK.mjs +34 -0
  239. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/wardley-WFR3VGLG-EIT5NWVN.mjs +1 -0
  240. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/wardleyDiagram-RFZKLAPA.mjs +78 -0
  241. rdstudio/web/vendor/mermaid/chunks/mermaid.esm.min/xychartDiagram-TWWI2QJZ.mjs +7 -0
  242. rdstudio/web/vendor/mermaid/mermaid.esm.min.mjs +14 -0
  243. rdstudio/web/vendor/texmath.js +368 -0
  244. rdstudio/web/vendor/vega/vega-embed.min.js +7 -0
  245. rdstudio/web/vendor/vega/vega-lite.min.js +2 -0
  246. rdstudio/web/vendor/vega/vega.min.js +1 -0
  247. rdstudio-0.2.0.dist-info/METADATA +201 -0
  248. rdstudio-0.2.0.dist-info/RECORD +251 -0
  249. rdstudio-0.2.0.dist-info/WHEEL +4 -0
  250. rdstudio-0.2.0.dist-info/entry_points.txt +3 -0
  251. rdstudio-0.2.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,96 @@
1
+ import{a as de}from"./chunk-SDIBIOXT.mjs";import{a as ge}from"./chunk-R2KH53MI.mjs";import{b as he,c as pe}from"./chunk-52IMQVNL.mjs";import"./chunk-MFYRHTYG.mjs";import"./chunk-JCBDXJ5W.mjs";import"./chunk-OCMJQKYE.mjs";import"./chunk-MNT3HHAC.mjs";import"./chunk-TECWHJ6D.mjs";import"./chunk-F6PIGZHG.mjs";import"./chunk-JGXDHUYS.mjs";import"./chunk-TINYC7RT.mjs";import"./chunk-TDFULVG6.mjs";import"./chunk-MIE3LDYP.mjs";import"./chunk-QADHU5CF.mjs";import"./chunk-ZZ52EIBP.mjs";import{$ as M,B as F,d as se,e as ae,f as oe,j as O,u as ce,x as le}from"./chunk-FE53TMRB.mjs";import{b as L}from"./chunk-L2B47AAZ.mjs";import{a as c}from"./chunk-QVIEFLGF.mjs";var q=(function(){var t=c(function(_,s,n,o){for(n=n||{},o=_.length;o--;n[_[o]]=s);return n},"o"),e=[1,4],a=[1,13],d=[1,12],i=[1,15],h=[1,16],m=[1,20],y=[1,19],b=[6,7,8],x=[1,26],w=[1,24],I=[1,25],p=[6,7,11],R=[1,6,13,15,16,19,22],Q=[1,33],ee=[1,34],A=[1,6,7,11,13,15,16,19,22],G={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:c(function(s,n,o,l,u,r,B){var g=r.length-1;switch(u){case 6:case 7:return l;case 8:l.getLogger().trace("Stop NL ");break;case 9:l.getLogger().trace("Stop EOF ");break;case 11:l.getLogger().trace("Stop NL2 ");break;case 12:l.getLogger().trace("Stop EOF2 ");break;case 15:l.getLogger().info("Node: ",r[g].id),l.addNode(r[g-1].length,r[g].id,r[g].descr,r[g].type);break;case 16:l.getLogger().trace("Icon: ",r[g]),l.decorateNode({icon:r[g]});break;case 17:case 21:l.decorateNode({class:r[g]});break;case 18:l.getLogger().trace("SPACELIST");break;case 19:l.getLogger().trace("Node: ",r[g].id),l.addNode(0,r[g].id,r[g].descr,r[g].type);break;case 20:l.decorateNode({icon:r[g]});break;case 25:l.getLogger().trace("node found ..",r[g-2]),this.$={id:r[g-1],descr:r[g-1],type:l.getType(r[g-2],r[g])};break;case 26:this.$={id:r[g],descr:r[g],type:l.nodeType.DEFAULT};break;case 27:l.getLogger().trace("node found ..",r[g-3]),this.$={id:r[g-3],descr:r[g-1],type:l.getType(r[g-2],r[g])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:a,7:[1,10],9:9,12:11,13:d,14:14,15:i,16:h,17:17,18:18,19:m,22:y},t(b,[2,3]),{1:[2,2]},t(b,[2,4]),t(b,[2,5]),{1:[2,6],6:a,12:21,13:d,14:14,15:i,16:h,17:17,18:18,19:m,22:y},{6:a,9:22,12:11,13:d,14:14,15:i,16:h,17:17,18:18,19:m,22:y},{6:x,7:w,10:23,11:I},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:m,22:y}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:x,7:w,10:32,11:I},{1:[2,7],6:a,12:21,13:d,14:14,15:i,16:h,17:17,18:18,19:m,22:y},t(R,[2,14],{7:Q,11:ee}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(R,[2,13],{7:Q,11:ee}),t(A,[2,11]),t(A,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=n,o}},"parseError"),parse:c(function(s){var n=this,o=[0],l=[],u=[null],r=[],B=this.table,g="",P=0,te=0,ie=0,Ee=2,ne=1,xe=r.slice.call(arguments,1),f=Object.create(this.lexer),v={yy:{}};for(var X in this.yy)Object.prototype.hasOwnProperty.call(this.yy,X)&&(v.yy[X]=this.yy[X]);f.setInput(s,v.yy),v.yy.lexer=f,v.yy.parser=this,typeof f.yylloc>"u"&&(f.yylloc={});var z=f.yylloc;r.push(z);var Se=f.options&&f.options.ranges;typeof v.yy.parseError=="function"?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ce(S){o.length=o.length-2*S,u.length=u.length-S,r.length=r.length-S}c(Ce,"popStack");function $e(){var S;return S=l.pop()||f.lex()||ne,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=n.symbols_[S]||S),S}c($e,"lex");for(var E,W,T,$,Oe,Y,C={},U,D,re,j;;){if(T=o[o.length-1],this.defaultActions[T]?$=this.defaultActions[T]:((E===null||typeof E>"u")&&(E=$e()),$=B[T]&&B[T][E]),typeof $>"u"||!$.length||!$[0]){var Z="";j=[];for(U in B[T])this.terminals_[U]&&U>Ee&&j.push("'"+this.terminals_[U]+"'");f.showPosition?Z="Parse error on line "+(P+1)+`:
2
+ `+f.showPosition()+`
3
+ Expecting `+j.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Z="Parse error on line "+(P+1)+": Unexpected "+(E==ne?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Z,{text:f.match,token:this.terminals_[E]||E,line:f.yylineno,loc:z,expected:j})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+E);switch($[0]){case 1:o.push(E),u.push(f.yytext),r.push(f.yylloc),o.push($[1]),E=null,W?(E=W,W=null):(te=f.yyleng,g=f.yytext,P=f.yylineno,z=f.yylloc,ie>0&&ie--);break;case 2:if(D=this.productions_[$[1]][1],C.$=u[u.length-D],C._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},Se&&(C._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),Y=this.performAction.apply(C,[g,te,P,v.yy,$[1],u,r].concat(xe)),typeof Y<"u")return Y;D&&(o=o.slice(0,-1*D*2),u=u.slice(0,-1*D),r=r.slice(0,-1*D)),o.push(this.productions_[$[1]][0]),u.push(C.$),r.push(C._$),re=B[o[o.length-2]][o[o.length-1]],o.push(re);break;case 3:return!0}}return!0},"parse")},ke=(function(){var _={EOF:1,parseError:c(function(n,o){if(this.yy.parser)this.yy.parser.parseError(n,o);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===l.length?this.yylloc.first_column:0)+l[l.length-o.length].length-o[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
+ `+n+"^"},"showPosition"),test_match:c(function(s,n){var o,l,u;if(this.options.backtrack_lexer&&(u={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(u.yylloc.range=this.yylloc.range.slice(0))),l=s[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var r in u)this[r]=u[r];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,o,l;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),r=0;r<u.length;r++)if(o=this._input.match(this.rules[u[r]]),o&&(!n||o[0].length>n[0].length)){if(n=o,l=r,this.options.backtrack_lexer){if(s=this.test_match(o,u[r]),s!==!1)return s;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(s=this.test_match(n,u[l]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:c(function(){var n=this.next();return n||this.lex()},"lex"),begin:c(function(n){this.conditionStack.push(n)},"begin"),popState:c(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:c(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:c(function(n){this.begin(n)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(n,o,l,u){var r=u;switch(l){case 0:return n.getLogger().trace("Found comment",o.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return n.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:n.getLogger().trace("end icon"),this.popState();break;case 10:return n.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return n.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return n.getLogger().trace("description:",o.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),n.getLogger().trace("node end ...",o.yytext),"NODE_DEND";break;case 30:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return n.getLogger().trace("Long description:",o.yytext),20;break;case 36:return n.getLogger().trace("Long description:",o.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return _})();G.lexer=ke;function H(){this.yy={}}return c(H,"Parser"),H.prototype=G,G.Parser=H,new H})();q.parser=q;var ue=q;var k=[];for(let t=0;t<256;++t)k.push((t+256).toString(16).slice(1));function me(t,e=0){return(k[t[e+0]]+k[t[e+1]]+k[t[e+2]]+k[t[e+3]]+"-"+k[t[e+4]]+k[t[e+5]]+"-"+k[t[e+6]]+k[t[e+7]]+"-"+k[t[e+8]]+k[t[e+9]]+"-"+k[t[e+10]]+k[t[e+11]]+k[t[e+12]]+k[t[e+13]]+k[t[e+14]]+k[t[e+15]]).toLowerCase()}c(me,"unsafeStringify");var De=new Uint8Array(16);function J(){return crypto.getRandomValues(De)}c(J,"rng");function Ne(t,e,a){return!e&&!t&&crypto.randomUUID?crypto.randomUUID():_e(t,e,a)}c(Ne,"v4");function _e(t,e,a){t=t||{};let d=t.random??t.rng?.()??J();if(d.length<16)throw new Error("Random bytes length must be >= 16");if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,e){if(a=a||0,a<0||a+16>e.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let i=0;i<16;++i)e[a+i]=d[i];return e}return me(d)}c(_e,"_v4");var K=Ne;var fe=12;var N={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},V=class{constructor(){this.nodes=[];this.count=0;this.elements={};this.getLogger=this.getLogger.bind(this),this.nodeType=N,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{c(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let a=this.nodes.length-1;a>=0;a--)if(this.nodes[a].level<e)return this.nodes[a];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,a,d,i){L.info("addNode",e,a,d,i);let h=!1;this.nodes.length===0?(this.baseLevel=e,e=0,h=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,h=!1);let m=M(),y=m.mindmap?.padding??O.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}let b={id:this.count++,nodeId:F(a,m),level:e,descr:F(d,m),type:i,children:[],width:m.mindmap?.maxNodeWidth??O.mindmap.maxNodeWidth,padding:y,isRoot:h},x=this.getParent(e);if(x)x.children.push(b),this.nodes.push(b);else if(h)this.nodes.push(b);else throw new Error(`There can be only one root. No parent could be found for ("${b.descr}")`)}getType(e,a){switch(L.debug("In get type",e,a),e){case"[":return this.nodeType.RECT;case"(":return a===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,a){this.elements[e]=a}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let a=M(),d=this.nodes[this.nodes.length-1];e.icon&&(d.icon=F(e.icon,a)),e.class&&(d.class=F(e.class,a))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,a){if(e.level===0?e.section=void 0:e.section=a,e.children)for(let[d,i]of e.children.entries()){let h=e.level===0?d%(fe-1):a;this.assignSections(i,h)}}flattenNodes(e,a){let d=M(),i=["mindmap-node"];e.isRoot===!0?i.push("section-root","section--1"):e.section!==void 0&&i.push(`section-${e.section}`),e.class&&i.push(e.class);let h=i.join(" "),m=c(b=>{let w=(d.theme?.toLowerCase()??"").includes("redux");switch(b){case N.CIRCLE:return"mindmapCircle";case N.RECT:return"rect";case N.ROUNDED_RECT:return"rounded";case N.CLOUD:return"cloud";case N.BANG:return"bang";case N.HEXAGON:return"hexagon";case N.DEFAULT:return w?"rounded":"defaultMindmapNode";case N.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:m(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:h,cssStyles:[],look:d.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(a.push(y),e.children)for(let b of e.children)this.flattenNodes(b,a)}generateEdges(e,a){if(!e.children)return;let d=M();for(let i of e.children){let h="edge";i.section!==void 0&&(h+=` section-edge-${i.section}`);let m=e.level+1;h+=` edge-depth-${m}`;let y={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:d.look,classes:h,depth:e.level,section:i.section};a.push(y),this.generateEdges(i,a)}}getData(){let e=this.getMindmap(),a=M(),i=le().layout!==void 0,h=a;if(i||(h.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:h};L.debug("getData: mindmapRoot",e,a),this.assignSections(e);let m=[],y=[];this.flattenNodes(e,m),this.generateEdges(e,y),L.debug(`getData: processed ${m.length} nodes and ${y.length} edges`);let b=new Map;for(let x of m)b.set(x.id,{shape:x.shape,width:x.width,height:x.height,padding:x.padding});return{nodes:m,edges:y,config:h,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(b),type:"mindmap",diagramId:"mindmap-"+K()}}getLogger(){return L}};var Le=c(async(t,e,a,d)=>{L.debug(`Rendering mindmap diagram
7
+ `+t);let i=d.db,h=i.getData(),m=de(e,h.config.securityLevel);if(h.type=d.type,h.layoutAlgorithm=pe(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e,!i.getMindmap())return;h.nodes.forEach(p=>{p.shape==="rounded"?(p.radius=15,p.taper=15,p.stroke="none",p.width=0,p.padding=15):p.shape==="circle"?p.padding=10:p.shape==="rect"?(p.width=0,p.padding=10):p.shape==="hexagon"&&(p.width=0,p.height=0)}),await he(h,m);let{themeVariables:b}=ce(),{useGradient:x,gradientStart:w,gradientStop:I}=b;if(x&&w&&I){let p=m.attr("id"),R=m.append("defs").append("linearGradient").attr("id",`${p}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");R.append("stop").attr("offset","0%").attr("stop-color",w).attr("stop-opacity",1),R.append("stop").attr("offset","100%").attr("stop-color",I).attr("stop-opacity",1)}ge(m,h.config.mindmap?.padding??O.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??O.mindmap.useMaxWidth)},"draw"),ye={draw:Le};var we=c(t=>{let{theme:e,look:a}=t,d="";for(let i=0;i<t.THEME_COLOR_LIMIT;i++)t["lineColor"+i]=t["lineColor"+i]||t["cScaleInv"+i],se(t["lineColor"+i])?t["lineColor"+i]=ae(t["lineColor"+i],20):t["lineColor"+i]=oe(t["lineColor"+i],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){let h=""+(a==="neo"?Math.max(10-(i-1)*2,2):17-3*i);d+=`
8
+ .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {
9
+ fill: ${t["cScale"+i]};
10
+ }
11
+ .section-${i-1} text {
12
+ fill: ${t["cScaleLabel"+i]};
13
+ }
14
+ .section-${i-1} span {
15
+ color: ${t["cScaleLabel"+i]};
16
+ }
17
+ .node-icon-${i-1} {
18
+ font-size: 40px;
19
+ color: ${t["cScaleLabel"+i]};
20
+ }
21
+ .section-edge-${i-1}{
22
+ stroke: ${t["cScale"+i]};
23
+ }
24
+ .edge-depth-${i-1}{
25
+ stroke-width: ${h};
26
+ }
27
+ .section-${i-1} line {
28
+ stroke: ${t["cScaleInv"+i]} ;
29
+ stroke-width: 3;
30
+ }
31
+
32
+ .disabled, .disabled circle, .disabled text {
33
+ fill: lightgray;
34
+ }
35
+ .disabled text {
36
+ fill: #efefef;
37
+ }
38
+ [data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {
39
+ fill: ${e==="redux"||e==="redux-dark"||e==="neutral"?t.mainBkg:t["cScale"+i]};
40
+ stroke: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScale"+i]};
41
+ stroke-width: ${t.strokeWidth??2}px;
42
+ }
43
+ [data-look="neo"].section-edge-${i-1}{
44
+ stroke: ${e?.includes("redux")||e==="neo-dark"?t.nodeBorder:t["cScale"+i]};
45
+ }
46
+ [data-look="neo"].mindmap-node.section-${i-1} text {
47
+ fill: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:i)]};
48
+ }
49
+ `}return d},"genSections"),ve=c((t,e,a)=>{let d="";for(let i=0;i<t;i++)d+=`
50
+ [data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {
51
+ stroke: url(${e}-gradient);
52
+ fill: ${a};
53
+ }
54
+ .section-${i-1} line {
55
+ stroke-width: 0;
56
+ }`;return d},"genGradient"),Te=c(t=>{let{theme:e}=t,a=t.svgId,d=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none";return`
57
+ .edge {
58
+ stroke-width: 3;
59
+ }
60
+ ${we(t)}
61
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
62
+ fill: ${t.git0};
63
+ }
64
+ .section-root text {
65
+ fill: ${t.gitBranchLabel0};
66
+ }
67
+ .section-root span {
68
+ color: ${e?.includes("redux")?t.nodeBorder:t.gitBranchLabel0};
69
+ }
70
+ .icon-container {
71
+ height:100%;
72
+ display: flex;
73
+ justify-content: center;
74
+ align-items: center;
75
+ }
76
+ .edge {
77
+ fill: none;
78
+ }
79
+ .mindmap-node-label {
80
+ dy: 1em;
81
+ alignment-baseline: middle;
82
+ text-anchor: middle;
83
+ dominant-baseline: middle;
84
+ text-align: center;
85
+ }
86
+ [data-look="neo"].mindmap-node {
87
+ filter: ${d};
88
+ }
89
+ [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
90
+ fill: ${e?.includes("redux")?t.mainBkg:t.git0};
91
+ }
92
+ [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
93
+ fill: ${e?.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)]};
94
+ }
95
+ ${t.useGradient&&a&&t.mainBkg?ve(t.THEME_COLOR_LIMIT,a,t.mainBkg):""}
96
+ `},"getStyles"),be=Te;var xt={get db(){return new V},renderer:ye,parser:ue,styles:be};export{xt as diagram};
@@ -0,0 +1 @@
1
+ import{a as e,b as r}from"./chunk-LLWYPJEZ.mjs";import"./chunk-44AU3KAP.mjs";import"./chunk-QVIEFLGF.mjs";export{e as PacketModule,r as createPacketServices};
@@ -0,0 +1 @@
1
+ import{a,b as l,c as m}from"./chunk-Y5NT6LW5.mjs";import{a as p}from"./chunk-V3KJR4XU.mjs";import{b as s}from"./chunk-Y5O5OPKC.mjs";import"./chunk-3T2MNPEU.mjs";import"./chunk-MLQVGYRW.mjs";import"./chunk-QX7LGXZU.mjs";import"./chunk-22SYA5HA.mjs";import"./chunk-YZG4BXY6.mjs";import"./chunk-NRRTYJAG.mjs";import"./chunk-CVBX6EWK.mjs";import"./chunk-RXM7Z7NK.mjs";import"./chunk-HI3EPXIC.mjs";import"./chunk-5NYYYZGL.mjs";import{b as i}from"./chunk-H7BX327W.mjs";import"./chunk-LIEGGFIX.mjs";import"./chunk-LLWYPJEZ.mjs";import"./chunk-2FTYKNOQ.mjs";import"./chunk-36VM3LGA.mjs";import"./chunk-44AU3KAP.mjs";import"./chunk-S4TE5DX6.mjs";import"./chunk-FE53TMRB.mjs";import{b as n}from"./chunk-L2B47AAZ.mjs";import{a as t}from"./chunk-QVIEFLGF.mjs";var c=i().RailroadPeg.parser.LangiumParser,g=t(e=>{let r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{let r=e.elements.map(f);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),f=t(e=>{let r=y(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${u(r)}`:`!${u(r)}`}:r},"transformPrefix"),u=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),y=t(e=>{let r=S(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),S=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return g(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),h=t(e=>({name:e.name,definition:g(e.definition)}),"transformRule"),R=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(h(r)))},"populateDb"),P={parse:t(e=>{a.clear(),n.debug("[PEG Parser] Starting Langium parse");let r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new s(r);let o=r.value;n.debug("[PEG Parser] Parsed rules:",o.rules.length),R(o),n.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}};var N={parser:P,db:a,renderer:m,styles:l};export{N as diagram};
@@ -0,0 +1 @@
1
+ import{a as e,b as r}from"./chunk-2FTYKNOQ.mjs";import"./chunk-44AU3KAP.mjs";import"./chunk-QVIEFLGF.mjs";export{e as PieModule,r as createPieServices};
@@ -0,0 +1,39 @@
1
+ import{a as ae}from"./chunk-V3KJR4XU.mjs";import{a as ne}from"./chunk-Y5O5OPKC.mjs";import"./chunk-3T2MNPEU.mjs";import"./chunk-MLQVGYRW.mjs";import"./chunk-QX7LGXZU.mjs";import"./chunk-22SYA5HA.mjs";import"./chunk-YZG4BXY6.mjs";import"./chunk-NRRTYJAG.mjs";import"./chunk-CVBX6EWK.mjs";import"./chunk-RXM7Z7NK.mjs";import"./chunk-HI3EPXIC.mjs";import"./chunk-5NYYYZGL.mjs";import"./chunk-H7BX327W.mjs";import"./chunk-LIEGGFIX.mjs";import"./chunk-LLWYPJEZ.mjs";import"./chunk-2FTYKNOQ.mjs";import"./chunk-36VM3LGA.mjs";import"./chunk-44AU3KAP.mjs";import{a as se}from"./chunk-S4TE5DX6.mjs";import{n as re,o as oe}from"./chunk-QADHU5CF.mjs";import"./chunk-ZZ52EIBP.mjs";import{$ as ee,P as V,T as U,U as X,V as Z,W as J,X as K,Y as Q,Z as Y,j as q}from"./chunk-FE53TMRB.mjs";import{F as O,I as ie,b as S,m as te}from"./chunk-L2B47AAZ.mjs";import{a as o}from"./chunk-QVIEFLGF.mjs";var ce=q.pie,_={sections:new Map,showData:!1,config:ce},A=_.sections,z=_.showData,Pe=structuredClone(ce),xe=o(()=>structuredClone(Pe),"getConfig"),Ce=o(()=>{A=new Map,z=_.showData,U()},"clear"),ve=o(({label:e,value:i})=>{if(i<0)throw new Error(`"${e}" has invalid value: ${i}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);A.has(e)||(A.set(e,i),S.debug(`added new section: ${e}, with value: ${i}`))},"addSection"),we=o(()=>A,"getSections"),Ae=o(e=>{z=e},"setShowData"),Te=o(()=>z,"getShowData"),T={getConfig:xe,clear:Ce,setDiagramTitle:Q,getDiagramTitle:Y,setAccTitle:X,getAccTitle:Z,setAccDescription:J,getAccDescription:K,addSection:ve,getSections:we,setShowData:Ae,getShowData:Te};var $e=o((e,i)=>{ae(e,i),i.setShowData(e.showData),e.sections.map(i.addSection)},"populateDb"),le={parse:o(async e=>{let i=await ne("pie",e);S.debug(i),$e(i,T)},"parse")};var ke=o(e=>`
2
+ .pieCircle{
3
+ stroke: ${e.pieStrokeColor};
4
+ stroke-width : ${e.pieStrokeWidth};
5
+ opacity : ${e.pieOpacity};
6
+ }
7
+ .pieCircle.highlighted{
8
+ scale: 1.05;
9
+ opacity: 1;
10
+ }
11
+ .pieCircle.highlightedOnHover:hover{
12
+ transition-duration: 250ms;
13
+ scale: 1.05;
14
+ opacity: 1;
15
+ }
16
+ .pieOuterCircle{
17
+ stroke: ${e.pieOuterStrokeColor};
18
+ stroke-width: ${e.pieOuterStrokeWidth};
19
+ fill: none;
20
+ }
21
+ .pieTitleText {
22
+ text-anchor: middle;
23
+ font-size: ${e.pieTitleTextSize};
24
+ fill: ${e.pieTitleTextColor};
25
+ font-family: ${e.fontFamily};
26
+ }
27
+ .slice {
28
+ font-family: ${e.fontFamily};
29
+ fill: ${e.pieSectionTextColor};
30
+ font-size:${e.pieSectionTextSize};
31
+ // fill: white;
32
+ }
33
+ .legend text {
34
+ fill: ${e.pieLegendTextColor};
35
+ font-family: ${e.fontFamily};
36
+ font-size: ${e.pieLegendTextSize};
37
+ }
38
+ `,"getStyles"),me=ke;var Re=o(e=>{let i=[...e.values()].reduce((s,h)=>s+h,0),B=[...e.entries()].map(([s,h])=>({label:s,value:h})).filter(s=>s.value/i*100>=1);return ie().value(s=>s.value).sort(null)(B)},"createPieArcs"),Ee=o((e,i,B,F)=>{S.debug(`rendering pie chart
39
+ `+e);let s=F.db,h=ee(),g=oe(s.getConfig(),h.pie),j=40,n=18,l=4,b=450,y=b,$=se(i),C=$.append("g");C.attr("transform","translate("+y/2+","+b/2+")");let{themeVariables:a}=h,[L]=re(a.pieOuterStrokeWidth);L??=2;let de=g.legendPosition,M=g.textPosition,ge=g.donutHole>0&&g.donutHole<=.9?g.donutHole:0,u=Math.min(y,b)/2-j,ue=O().innerRadius(ge*u).outerRadius(u),fe=O().innerRadius(u*M).outerRadius(u*M),P=C.append("g");P.append("circle").attr("cx",0).attr("cy",0).attr("r",u+L/2).attr("class","pieOuterCircle");let v=s.getSections(),he=Re(v),De=[a.pie1,a.pie2,a.pie3,a.pie4,a.pie5,a.pie6,a.pie7,a.pie8,a.pie9,a.pie10,a.pie11,a.pie12],k=0;v.forEach(t=>{k+=t});let W=he.filter(t=>(t.data.value/k*100).toFixed(0)!=="0"),R=te(De).domain([...v.keys()]);P.selectAll("mySlices").data(W).enter().append("path").attr("d",ue).attr("fill",t=>R(t.data.label)).attr("class",t=>{let r="pieCircle";return g.highlightSlice==="hover"?r+=" highlightedOnHover":g.highlightSlice===t.data.label&&(r+=" highlighted"),r}),P.selectAll("mySlices").data(W).enter().append("text").text(t=>(t.data.value/k*100).toFixed(0)+"%").attr("transform",t=>"translate("+fe.centroid(t)+")").style("text-anchor","middle").attr("class","slice");let Se=C.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-(b-50)/2).attr("class","pieTitleText"),x=[...v.entries()].map(([t,r])=>({label:t,value:r})),f=C.selectAll(".legend").data(x).enter().append("g").attr("class","legend");f.append("rect").attr("width",n).attr("height",n).style("fill",t=>R(t.label)).style("stroke",t=>R(t.label)),f.append("text").attr("x",n+l).attr("y",n-l).text(t=>s.getShowData()?`${t.label} [${t.value}]`:t.label);let D=Math.max(...f.selectAll("text").nodes().map(t=>t?.getBoundingClientRect().width??0)),w=b,E=y+j,c=n+l,G=x.length*c;switch(de){case"center":f.attr("transform",(t,r)=>{let m=c*x.length/2,p=-D/2-(n+l),d=r*c-m;return"translate("+p+","+d+")"});break;case"top":w+=G,f.attr("transform",(t,r)=>{let m=u,p=-D/2-(n+l),d=r*c-m;return`translate(${p}, ${d})`}),P.attr("transform",()=>`translate(0, ${G+c})`);break;case"bottom":w+=G,f.attr("transform",(t,r)=>{let m=-u-c,p=-D/2-(n+l),d=r*c-m;return"translate("+p+","+d+")"});break;case"left":E+=n+l+D,f.attr("transform",(t,r)=>{let m=c*x.length/2,p=-u-(n+l),d=r*c-m;return"translate("+p+","+d+")"}),P.attr("transform",()=>`translate(${D+n+l}, 0)`);break;case"right":default:E+=n+l+D,f.attr("transform",(t,r)=>{let m=c*x.length/2,p=12*n,d=r*c-m;return"translate("+p+","+d+")"});break}let H=Se.node()?.getBoundingClientRect().width??0,be=y/2-H/2,ye=y/2+H/2,N=Math.min(0,be),I=Math.max(E,ye)-N;$.attr("viewBox",`${N} 0 ${I} ${w}`),V($,w,I,g.useMaxWidth)},"draw"),pe={draw:Ee};var ot={parser:le,db:T,renderer:pe,styles:me};export{ot as diagram};
@@ -0,0 +1,7 @@
1
+ import{$ as xt,B as re,P as se,T as oe,U as le,V as de,W as ue,X as ce,Y as he,Z as vt,h as ne,j as D}from"./chunk-FE53TMRB.mjs";import{b as lt,h as mt,o as Dt}from"./chunk-L2B47AAZ.mjs";import{a as r}from"./chunk-QVIEFLGF.mjs";var Et=(function(){var t=r(function(M,o,l,x){for(l=l||{},x=M.length;x--;l[M[x]]=o);return l},"o"),n=[1,3],f=[1,4],u=[1,5],c=[1,6],g=[1,7],y=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],S=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],i=[55,56,57],P=[2,36],h=[1,37],T=[1,36],b=[1,38],m=[1,35],q=[1,43],p=[1,41],A=[1,45],dt=[1,14],ft=[1,23],pt=[1,18],gt=[1,19],ut=[1,20],kt=[1,21],ct=[1,22],a=[1,24],Bt=[1,25],wt=[1,26],It=[1,27],Ot=[1,28],Wt=[1,29],N=[1,32],R=[1,33],_=[1,34],F=[1,39],Q=[1,40],C=[1,42],L=[1,44],H=[1,63],U=[1,62],v=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Rt=[1,67],Ht=[1,68],Ut=[1,69],jt=[1,70],Xt=[1,71],Mt=[1,72],Yt=[1,73],Gt=[1,74],Kt=[1,75],Zt=[1,76],Jt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],Z=[1,91],J=[1,92],$=[1,93],tt=[1,100],et=[1,94],at=[1,97],it=[1,95],nt=[1,96],rt=[1,98],st=[1,99],St=[1,103],$t=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],At={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(o,l,x,d,k,e,ht){var s=e.length-1;switch(k){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],d.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:d.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:d.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:d.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:d.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:d.setXAxisLeftText(e[s-2]),d.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" \u27F6 ",d.setXAxisLeftText(e[s-1]);break;case 53:d.setXAxisLeftText(e[s]);break;case 54:d.setYAxisBottomText(e[s-2]),d.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" \u27F6 ",d.setYAxisBottomText(e[s-1]);break;case 56:d.setYAxisBottomText(e[s]);break;case 57:d.setQuadrant1Text(e[s]);break;case 58:d.setQuadrant2Text(e[s]);break;case 59:d.setQuadrant3Text(e[s]);break;case 60:d.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:f,55:u,56:c,57:g},{1:[3]},{18:n,26:8,27:2,28:f,55:u,56:c,57:g},{18:n,26:9,27:2,28:f,55:u,56:c,57:g},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(i,P,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:h,5:T,10:b,12:m,13:q,14:p,15:A,18:dt,25:ft,35:pt,37:gt,39:ut,41:kt,42:ct,48:a,50:Bt,51:wt,52:It,53:Ot,54:Wt,60:N,61:R,63:_,64:F,65:Q,66:C,67:L}),t(y,[2,34]),{27:46,55:u,56:c,57:g},t(i,[2,37]),t(i,P,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:h,5:T,10:b,12:m,13:q,14:p,15:A,18:dt,25:ft,35:pt,37:gt,39:ut,41:kt,42:ct,48:a,50:Bt,51:wt,52:It,53:Ot,54:Wt,60:N,61:R,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,39]),t(i,[2,40]),t(i,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(i,[2,45]),t(i,[2,46]),{18:[1,51]},{4:h,5:T,10:b,12:m,13:q,14:p,15:A,43:52,58:31,60:N,61:R,63:_,64:F,65:Q,66:C,67:L},{4:h,5:T,10:b,12:m,13:q,14:p,15:A,43:53,58:31,60:N,61:R,63:_,64:F,65:Q,66:C,67:L},{4:h,5:T,10:b,12:m,13:q,14:p,15:A,43:54,58:31,60:N,61:R,63:_,64:F,65:Q,66:C,67:L},{4:h,5:T,10:b,12:m,13:q,14:p,15:A,43:55,58:31,60:N,61:R,63:_,64:F,65:Q,66:C,67:L},{4:h,5:T,10:b,12:m,13:q,14:p,15:A,43:56,58:31,60:N,61:R,63:_,64:F,65:Q,66:C,67:L},{4:h,5:T,10:b,12:m,13:q,14:p,15:A,43:57,58:31,60:N,61:R,63:_,64:F,65:Q,66:C,67:L},{4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,44:[1,58],47:[1,59],58:61,59:60,63:_,64:F,65:Q,66:C,67:L},t(v,[2,64]),t(v,[2,66]),t(v,[2,67]),t(v,[2,70]),t(v,[2,71]),t(v,[2,72]),t(v,[2,73]),t(v,[2,74]),t(v,[2,75]),t(v,[2,76]),t(v,[2,77]),t(v,[2,78]),t(v,[2,79]),t(v,[2,80]),t(v,[2,81]),t(y,[2,35]),t(i,[2,38]),t(i,[2,42]),t(i,[2,43]),t(i,[2,44]),{3:65,4:Nt,5:Rt,6:Ht,7:Ut,8:jt,9:Xt,10:Mt,11:Yt,12:Gt,13:Kt,14:Zt,15:Jt,21:64},t(i,[2,53],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,49:[1,78],63:_,64:F,65:Q,66:C,67:L}),t(i,[2,56],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,49:[1,79],63:_,64:F,65:Q,66:C,67:L}),t(i,[2,57],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,58],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,59],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,60],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,63:_,64:F,65:Q,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(v,[2,65]),t(v,[2,82]),t(v,[2,83]),t(v,[2,84]),{3:83,4:Nt,5:Rt,6:Ht,7:Ut,8:jt,9:Xt,10:Mt,11:Yt,12:Gt,13:Kt,14:Zt,15:Jt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(i,[2,52],{58:31,43:84,4:h,5:T,10:b,12:m,13:q,14:p,15:A,60:N,61:R,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,55],{58:31,43:85,4:h,5:T,10:b,12:m,13:q,14:p,15:A,60:N,61:R,63:_,64:F,65:Q,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:Z,5:J,6:$,8:tt,11:et,13:at,16:90,17:it,18:nt,19:rt,20:st,22:89,23:88},t(w,[2,24]),t(i,[2,51],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,54],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,47],{22:89,16:90,23:101,4:Z,5:J,6:$,8:tt,11:et,13:at,17:it,18:nt,19:rt,20:st}),{46:[1,102]},t(i,[2,29],{10:St}),t($t,[2,27],{16:104,4:Z,5:J,6:$,8:tt,11:et,13:at,17:it,18:nt,19:rt,20:st}),t(O,[2,25]),t(O,[2,13]),t(O,[2,14]),t(O,[2,15]),t(O,[2,16]),t(O,[2,17]),t(O,[2,18]),t(O,[2,19]),t(O,[2,20]),t(O,[2,21]),t(O,[2,22]),t(i,[2,49],{10:St}),t(i,[2,48],{22:89,16:90,23:105,4:Z,5:J,6:$,8:tt,11:et,13:at,17:it,18:nt,19:rt,20:st}),{4:Z,5:J,6:$,8:tt,11:et,13:at,16:90,17:it,18:nt,19:rt,20:st,22:106},t(O,[2,26]),t(i,[2,50],{10:St}),t($t,[2,28],{16:104,4:Z,5:J,6:$,8:tt,11:et,13:at,17:it,18:nt,19:rt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(o,l){if(l.recoverable)this.trace(o);else{var x=new Error(o);throw x.hash=l,x}},"parseError"),parse:r(function(o){var l=this,x=[0],d=[],k=[null],e=[],ht=this.table,s="",yt=0,te=0,ee=0,be=2,ae=1,me=e.slice.call(arguments,1),E=Object.create(this.lexer),Y={yy:{}};for(var _t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_t)&&(Y.yy[_t]=this.yy[_t]);E.setInput(o,Y.yy),Y.yy.lexer=E,Y.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var Ft=E.yylloc;e.push(Ft);var qe=E.options&&E.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ie(I){x.length=x.length-2*I,k.length=k.length-I,e.length=e.length-I}r(Ie,"popStack");function ke(){var I;return I=d.pop()||E.lex()||ae,typeof I!="number"&&(I instanceof Array&&(d=I,I=d.pop()),I=l.symbols_[I]||I),I}r(ke,"lex");for(var V,Qt,G,W,Oe,Ct,ot={},Tt,j,ie,bt;;){if(G=x[x.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((V===null||typeof V>"u")&&(V=ke()),W=ht[G]&&ht[G][V]),typeof W>"u"||!W.length||!W[0]){var Lt="";bt=[];for(Tt in ht[G])this.terminals_[Tt]&&Tt>be&&bt.push("'"+this.terminals_[Tt]+"'");E.showPosition?Lt="Parse error on line "+(yt+1)+`:
2
+ `+E.showPosition()+`
3
+ Expecting `+bt.join(", ")+", got '"+(this.terminals_[V]||V)+"'":Lt="Parse error on line "+(yt+1)+": Unexpected "+(V==ae?"end of input":"'"+(this.terminals_[V]||V)+"'"),this.parseError(Lt,{text:E.match,token:this.terminals_[V]||V,line:E.yylineno,loc:Ft,expected:bt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+V);switch(W[0]){case 1:x.push(V),k.push(E.yytext),e.push(E.yylloc),x.push(W[1]),V=null,Qt?(V=Qt,Qt=null):(te=E.yyleng,s=E.yytext,yt=E.yylineno,Ft=E.yylloc,ee>0&&ee--);break;case 2:if(j=this.productions_[W[1]][1],ot.$=k[k.length-j],ot._$={first_line:e[e.length-(j||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(j||1)].first_column,last_column:e[e.length-1].last_column},qe&&(ot._$.range=[e[e.length-(j||1)].range[0],e[e.length-1].range[1]]),Ct=this.performAction.apply(ot,[s,te,yt,Y.yy,W[1],k,e].concat(me)),typeof Ct<"u")return Ct;j&&(x=x.slice(0,-1*j*2),k=k.slice(0,-1*j),e=e.slice(0,-1*j)),x.push(this.productions_[W[1]][0]),k.push(ot.$),e.push(ot._$),ie=ht[x[x.length-2]][x[x.length-1]],x.push(ie);break;case 3:return!0}}return!0},"parse")},Te=(function(){var M={EOF:1,parseError:r(function(l,x){if(this.yy.parser)this.yy.parser.parseError(l,x);else throw new Error(l)},"parseError"),setInput:r(function(o,l){return this.yy=l||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:r(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:r(function(o){var l=o.length,x=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var k=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===d.length?this.yylloc.first_column:0)+d[d.length-x.length].length-x[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:r(function(o){this.unput(this.match.slice(o))},"less"),pastInput:r(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
+ `+l+"^"},"showPosition"),test_match:r(function(o,l){var x,d,k;if(this.options.backtrack_lexer&&(k={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(k.yylloc.range=this.yylloc.range.slice(0))),d=o[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],x=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var e in k)this[e]=k[e];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,l,x,d;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),e=0;e<k.length;e++)if(x=this._input.match(this.rules[k[e]]),x&&(!l||x[0].length>l[0].length)){if(l=x,d=e,this.options.backtrack_lexer){if(o=this.test_match(x,k[e]),o!==!1)return o;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(o=this.test_match(l,k[d]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:r(function(){var l=this.next();return l||this.lex()},"lex"),begin:r(function(l){this.conditionStack.push(l)},"begin"),popState:r(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:r(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:r(function(l){this.begin(l)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(l,x,d,k){var e=k;switch(d){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return M})();At.lexer=Te;function Pt(){this.yy={}}return r(Pt,"Parser"),Pt.prototype=At,At.Parser=Pt,new Pt})();Et.parser=Et;var xe=Et;var B=ne(),qt=class{constructor(){this.classes=new Map;this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{r(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:D.quadrantChart?.chartWidth||500,chartWidth:D.quadrantChart?.chartHeight||500,titlePadding:D.quadrantChart?.titlePadding||10,titleFontSize:D.quadrantChart?.titleFontSize||20,quadrantPadding:D.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:D.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:D.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:D.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:D.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:D.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:D.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:D.quadrantChart?.pointTextPadding||5,pointLabelFontSize:D.quadrantChart?.pointLabelFontSize||12,pointRadius:D.quadrantChart?.pointRadius||5,xAxisPosition:D.quadrantChart?.xAxisPosition||"top",yAxisPosition:D.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:D.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:D.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:B.quadrant1Fill,quadrant2Fill:B.quadrant2Fill,quadrant3Fill:B.quadrant3Fill,quadrant4Fill:B.quadrant4Fill,quadrant1TextFill:B.quadrant1TextFill,quadrant2TextFill:B.quadrant2TextFill,quadrant3TextFill:B.quadrant3TextFill,quadrant4TextFill:B.quadrant4TextFill,quadrantPointFill:B.quadrantPointFill,quadrantPointTextFill:B.quadrantPointTextFill,quadrantXAxisTextFill:B.quadrantXAxisTextFill,quadrantYAxisTextFill:B.quadrantYAxisTextFill,quadrantTitleFill:B.quadrantTitleFill,quadrantInternalBorderStrokeFill:B.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:B.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,lt.info("clear called")}setData(n){this.data={...this.data,...n}}addPoints(n){this.data.points=[...n,...this.data.points]}addClass(n,f){this.classes.set(n,f)}setConfig(n){lt.trace("setConfig called with: ",n),this.config={...this.config,...n}}setThemeConfig(n){lt.trace("setThemeConfig called with: ",n),this.themeConfig={...this.themeConfig,...n}}calculateSpace(n,f,u,c){let g=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,y={top:n==="top"&&f?g:0,bottom:n==="bottom"&&f?g:0},S=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,i={left:this.config.yAxisPosition==="left"&&u?S:0,right:this.config.yAxisPosition==="right"&&u?S:0},P=this.config.titleFontSize+this.config.titlePadding*2,h={top:c?P:0},T=this.config.quadrantPadding+i.left,b=this.config.quadrantPadding+y.top+h.top,m=this.config.chartWidth-this.config.quadrantPadding*2-i.left-i.right,q=this.config.chartHeight-this.config.quadrantPadding*2-y.top-y.bottom-h.top,p=m/2,A=q/2;return{xAxisSpace:y,yAxisSpace:i,titleSpace:h,quadrantSpace:{quadrantLeft:T,quadrantTop:b,quadrantWidth:m,quadrantHalfWidth:p,quadrantHeight:q,quadrantHalfHeight:A}}}getAxisLabels(n,f,u,c){let{quadrantSpace:g,titleSpace:y}=c,{quadrantHalfHeight:S,quadrantHeight:i,quadrantLeft:P,quadrantHalfWidth:h,quadrantTop:T,quadrantWidth:b}=g,m=!!this.data.xAxisRightText,q=!!this.data.yAxisTopText,p=[];return this.data.xAxisLeftText&&f&&p.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:P+(m?h/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+i+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&f&&p.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:P+h+(m?h/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+i+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&u&&p.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+P+b+this.config.quadrantPadding,y:T+i-(q?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:q?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&u&&p.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+P+b+this.config.quadrantPadding,y:T+S-(q?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:q?"center":"left",horizontalPos:"top",rotation:-90}),p}getQuadrants(n){let{quadrantSpace:f}=n,{quadrantHalfHeight:u,quadrantLeft:c,quadrantHalfWidth:g,quadrantTop:y}=f,S=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:c+g,y,width:g,height:u,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:c,y,width:g,height:u,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:c,y:y+u,width:g,height:u,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:c+g,y:y+u,width:g,height:u,fill:this.themeConfig.quadrant4Fill}];for(let i of S)i.text.x=i.x+i.width/2,this.data.points.length===0?(i.text.y=i.y+i.height/2,i.text.horizontalPos="middle"):(i.text.y=i.y+this.config.quadrantTextTopPadding,i.text.horizontalPos="top");return S}getQuadrantPoints(n){let{quadrantSpace:f}=n,{quadrantHeight:u,quadrantLeft:c,quadrantTop:g,quadrantWidth:y}=f,S=Dt().domain([0,1]).range([c,y+c]),i=Dt().domain([0,1]).range([u+g,g]);return this.data.points.map(h=>{let T=this.classes.get(h.className);return T&&(h={...T,...h}),{x:S(h.x),y:i(h.y),fill:h.color??this.themeConfig.quadrantPointFill,radius:h.radius??this.config.pointRadius,text:{text:h.text,fill:this.themeConfig.quadrantPointTextFill,x:S(h.x),y:i(h.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:h.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:h.strokeWidth??"0px"}})}getBorders(n){let f=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:u}=n,{quadrantHalfHeight:c,quadrantHeight:g,quadrantLeft:y,quadrantHalfWidth:S,quadrantTop:i,quadrantWidth:P}=u;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-f,y1:i,x2:y+P+f,y2:i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y+P,y1:i+f,x2:y+P,y2:i+g-f},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-f,y1:i+g,x2:y+P+f,y2:i+g},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y,y1:i+f,x2:y,y2:i+g-f},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+S,y1:i+f,x2:y+S,y2:i+g-f},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+f,y1:i+c,x2:y+P-f,y2:i+c}]}getTitle(n){if(n)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let n=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),f=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),u=this.config.showTitle&&!!this.data.titleText,c=this.data.points.length>0?"bottom":this.config.xAxisPosition,g=this.calculateSpace(c,n,f,u);return{points:this.getQuadrantPoints(g),quadrants:this.getQuadrants(g),axisLabels:this.getAxisLabels(c,n,f,g),borderLines:this.getBorders(g),title:this.getTitle(u)}}};var K=class extends Error{static{r(this,"InvalidStyleError")}constructor(n,f,u){super(`value for ${n} ${f} is invalid, please use a valid ${u}`),this.name="InvalidStyleError"}};function zt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}r(zt,"validateHexCode");function fe(t){return!/^\d+$/.test(t)}r(fe,"validateNumber");function pe(t){return!/^\d+px$/.test(t)}r(pe,"validateSizeInPixels");function X(t){return re(t.trim(),xt())}r(X,"textSanitizer");var z=new qt;function Se(t){z.setData({quadrant1Text:X(t.text)})}r(Se,"setQuadrant1Text");function Ae(t){z.setData({quadrant2Text:X(t.text)})}r(Ae,"setQuadrant2Text");function Pe(t){z.setData({quadrant3Text:X(t.text)})}r(Pe,"setQuadrant3Text");function _e(t){z.setData({quadrant4Text:X(t.text)})}r(_e,"setQuadrant4Text");function Fe(t){z.setData({xAxisLeftText:X(t.text)})}r(Fe,"setXAxisLeftText");function Qe(t){z.setData({xAxisRightText:X(t.text)})}r(Qe,"setXAxisRightText");function Ce(t){z.setData({yAxisTopText:X(t.text)})}r(Ce,"setYAxisTopText");function Le(t){z.setData({yAxisBottomText:X(t.text)})}r(Le,"setYAxisBottomText");function Vt(t){let n={};for(let f of t){let[u,c]=f.trim().split(/\s*:\s*/);if(u==="radius"){if(fe(c))throw new K(u,c,"number");n.radius=parseInt(c)}else if(u==="color"){if(zt(c))throw new K(u,c,"hex code");n.color=c}else if(u==="stroke-color"){if(zt(c))throw new K(u,c,"hex code");n.strokeColor=c}else if(u==="stroke-width"){if(pe(c))throw new K(u,c,"number of pixels (eg. 10px)");n.strokeWidth=c}else throw new Error(`style named ${u} is not supported.`)}return n}r(Vt,"parseStyles");function ve(t,n,f,u,c){let g=Vt(c);z.addPoints([{x:f,y:u,text:X(t.text),className:n,...g}])}r(ve,"addPoint");function De(t,n){z.addClass(t,Vt(n))}r(De,"addClass");function Ee(t){z.setConfig({chartWidth:t})}r(Ee,"setWidth");function ze(t){z.setConfig({chartHeight:t})}r(ze,"setHeight");function Ve(){let t=xt(),{themeVariables:n,quadrantChart:f}=t;return f&&z.setConfig(f),z.setThemeConfig({quadrant1Fill:n.quadrant1Fill,quadrant2Fill:n.quadrant2Fill,quadrant3Fill:n.quadrant3Fill,quadrant4Fill:n.quadrant4Fill,quadrant1TextFill:n.quadrant1TextFill,quadrant2TextFill:n.quadrant2TextFill,quadrant3TextFill:n.quadrant3TextFill,quadrant4TextFill:n.quadrant4TextFill,quadrantPointFill:n.quadrantPointFill,quadrantPointTextFill:n.quadrantPointTextFill,quadrantXAxisTextFill:n.quadrantXAxisTextFill,quadrantYAxisTextFill:n.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:n.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:n.quadrantInternalBorderStrokeFill,quadrantTitleFill:n.quadrantTitleFill}),z.setData({titleText:vt()}),z.build()}r(Ve,"getQuadrantData");var Be=r(function(){z.clear(),oe()},"clear"),ge={setWidth:Ee,setHeight:ze,setQuadrant1Text:Se,setQuadrant2Text:Ae,setQuadrant3Text:Pe,setQuadrant4Text:_e,setXAxisLeftText:Fe,setXAxisRightText:Qe,setYAxisTopText:Ce,setYAxisBottomText:Le,parseStyles:Vt,addPoint:ve,addClass:De,getQuadrantData:Ve,clear:Be,setAccTitle:le,getAccTitle:de,setDiagramTitle:he,getDiagramTitle:vt,getAccDescription:ce,setAccDescription:ue};var we=r((t,n,f,u)=>{function c(a){return a==="top"?"hanging":"middle"}r(c,"getDominantBaseLine");function g(a){return a==="left"?"start":"middle"}r(g,"getTextAnchor");function y(a){return`translate(${a.x}, ${a.y}) rotate(${a.rotation||0})`}r(y,"getTransformation");let S=xt();lt.debug(`Rendering quadrant chart
7
+ `+t);let i=S.securityLevel,P;i==="sandbox"&&(P=mt("#i"+n));let T=(i==="sandbox"?mt(P.nodes()[0].contentDocument.body):mt("body")).select(`[id="${n}"]`),b=T.append("g").attr("class","main"),m=S.quadrantChart?.chartWidth??500,q=S.quadrantChart?.chartHeight??500;se(T,q,m,S.quadrantChart?.useMaxWidth??!0),T.attr("viewBox","0 0 "+m+" "+q),u.db.setHeight(q),u.db.setWidth(m);let p=u.db.getQuadrantData(),A=b.append("g").attr("class","quadrants"),dt=b.append("g").attr("class","border"),ft=b.append("g").attr("class","data-points"),pt=b.append("g").attr("class","labels"),gt=b.append("g").attr("class","title");p.title&&gt.append("text").attr("x",0).attr("y",0).attr("fill",p.title.fill).attr("font-size",p.title.fontSize).attr("dominant-baseline",c(p.title.horizontalPos)).attr("text-anchor",g(p.title.verticalPos)).attr("transform",y(p.title)).text(p.title.text),p.borderLines&&dt.selectAll("line").data(p.borderLines).enter().append("line").attr("x1",a=>a.x1).attr("y1",a=>a.y1).attr("x2",a=>a.x2).attr("y2",a=>a.y2).style("stroke",a=>a.strokeFill).style("stroke-width",a=>a.strokeWidth);let ut=A.selectAll("g.quadrant").data(p.quadrants).enter().append("g").attr("class","quadrant");ut.append("rect").attr("x",a=>a.x).attr("y",a=>a.y).attr("width",a=>a.width).attr("height",a=>a.height).attr("fill",a=>a.fill),ut.append("text").attr("x",0).attr("y",0).attr("fill",a=>a.text.fill).attr("font-size",a=>a.text.fontSize).attr("dominant-baseline",a=>c(a.text.horizontalPos)).attr("text-anchor",a=>g(a.text.verticalPos)).attr("transform",a=>y(a.text)).text(a=>a.text.text),pt.selectAll("g.label").data(p.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(a=>a.text).attr("fill",a=>a.fill).attr("font-size",a=>a.fontSize).attr("dominant-baseline",a=>c(a.horizontalPos)).attr("text-anchor",a=>g(a.verticalPos)).attr("transform",a=>y(a));let ct=ft.selectAll("g.data-point").data(p.points).enter().append("g").attr("class","data-point");ct.append("circle").attr("cx",a=>a.x).attr("cy",a=>a.y).attr("r",a=>a.radius).attr("fill",a=>a.fill).attr("stroke",a=>a.strokeColor).attr("stroke-width",a=>a.strokeWidth),ct.append("text").attr("x",0).attr("y",0).text(a=>a.text.text).attr("fill",a=>a.text.fill).attr("font-size",a=>a.text.fontSize).attr("dominant-baseline",a=>c(a.text.horizontalPos)).attr("text-anchor",a=>g(a.text.verticalPos)).attr("transform",a=>y(a.text))},"draw"),ye={draw:we};var ha={parser:xe,db:ge,renderer:ye,styles:r(()=>"","styles")};export{ha as diagram};
@@ -0,0 +1 @@
1
+ import{a as r,b as e}from"./chunk-CVBX6EWK.mjs";import"./chunk-44AU3KAP.mjs";import"./chunk-QVIEFLGF.mjs";export{r as RadarModule,e as createRadarServices};
@@ -0,0 +1 @@
1
+ import{a as r,b as o}from"./chunk-RXM7Z7NK.mjs";import"./chunk-44AU3KAP.mjs";import"./chunk-QVIEFLGF.mjs";export{r as RailroadModule,o as createRailroadServices};
@@ -0,0 +1 @@
1
+ import{a as r,b as o}from"./chunk-5NYYYZGL.mjs";import"./chunk-44AU3KAP.mjs";import"./chunk-QVIEFLGF.mjs";export{r as RailroadAbnfModule,o as createRailroadAbnfServices};
@@ -0,0 +1 @@
1
+ import{a as r,b as o}from"./chunk-HI3EPXIC.mjs";import"./chunk-44AU3KAP.mjs";import"./chunk-QVIEFLGF.mjs";export{r as RailroadEbnfModule,o as createRailroadEbnfServices};
@@ -0,0 +1 @@
1
+ import{a as e,b as r}from"./chunk-H7BX327W.mjs";import"./chunk-44AU3KAP.mjs";import"./chunk-QVIEFLGF.mjs";export{e as RailroadPegModule,r as createRailroadPegServices};
@@ -0,0 +1 @@
1
+ import{a,b as m,c as d}from"./chunk-Y5NT6LW5.mjs";import{a as s}from"./chunk-V3KJR4XU.mjs";import{b as p}from"./chunk-Y5O5OPKC.mjs";import"./chunk-3T2MNPEU.mjs";import"./chunk-MLQVGYRW.mjs";import"./chunk-QX7LGXZU.mjs";import"./chunk-22SYA5HA.mjs";import"./chunk-YZG4BXY6.mjs";import"./chunk-NRRTYJAG.mjs";import"./chunk-CVBX6EWK.mjs";import{b as n}from"./chunk-RXM7Z7NK.mjs";import"./chunk-HI3EPXIC.mjs";import"./chunk-5NYYYZGL.mjs";import"./chunk-H7BX327W.mjs";import"./chunk-LIEGGFIX.mjs";import"./chunk-LLWYPJEZ.mjs";import"./chunk-2FTYKNOQ.mjs";import"./chunk-36VM3LGA.mjs";import"./chunk-44AU3KAP.mjs";import"./chunk-S4TE5DX6.mjs";import"./chunk-FE53TMRB.mjs";import{b as t}from"./chunk-L2B47AAZ.mjs";import{a as o}from"./chunk-QVIEFLGF.mjs";var u=n().Railroad.parser.LangiumParser,i=o(r=>{switch(r.$type){case"RailroadTerminalExpr":return{type:"terminal",value:r.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:r.name};case"RailroadSpecialExpr":return{type:"special",text:r.text};case"RailroadSequenceExpr":{let e=r.elements.map(i);return e.length===1?e[0]:{type:"sequence",elements:e}}case"RailroadChoiceExpr":{let e=r.alternatives.map(i);return e.length===1?e[0]:{type:"choice",alternatives:e}}case"RailroadOptionalExpr":return{type:"optional",element:i(r.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:i(r.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:i(r.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${r.$type}`)}},"transformExpression"),c=o(r=>({name:r.name,definition:i(r.definition)}),"transformRule"),y=o(r=>{s(r,a),r.title&&a.setTitle(r.title),r.rules.map(e=>a.addRule(c(e)))},"populateDb"),R={parse:o(r=>{a.clear(),t.debug("[Railroad Parser] Starting Langium parse");let e=u.parse(r);if(e.lexerErrors.length>0||e.parserErrors.length>0)throw new p(e);let l=e.value;t.debug("[Railroad Parser] Parsed rules:",l.rules.length),y(l),t.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:a}};var E={parser:R,db:a,renderer:d,styles:m},b=E;export{b as default,E as diagram};
@@ -0,0 +1,84 @@
1
+ import{a as rt}from"./chunk-SDIBIOXT.mjs";import{a as lt}from"./chunk-R2KH53MI.mjs";import{b as nt,c as at}from"./chunk-52IMQVNL.mjs";import"./chunk-MFYRHTYG.mjs";import"./chunk-JCBDXJ5W.mjs";import"./chunk-OCMJQKYE.mjs";import"./chunk-MNT3HHAC.mjs";import"./chunk-TECWHJ6D.mjs";import"./chunk-F6PIGZHG.mjs";import"./chunk-JGXDHUYS.mjs";import"./chunk-TINYC7RT.mjs";import"./chunk-TDFULVG6.mjs";import{b as et,c as tt,d as it,e as st}from"./chunk-MIE3LDYP.mjs";import{p as Ze}from"./chunk-QADHU5CF.mjs";import"./chunk-ZZ52EIBP.mjs";import{$ as de,T as Ke,U as je,V as We,W as Ge,X as ze,Y as Xe,Z as Je,u as Ae}from"./chunk-FE53TMRB.mjs";import{b as pe}from"./chunk-L2B47AAZ.mjs";import{a as f,d as dt}from"./chunk-QVIEFLGF.mjs";var Ve=(function(){var e=f(function($,s,n,c){for(n=n||{},c=$.length;c--;n[$[c]]=s);return n},"o"),r=[1,3],u=[1,4],h=[1,5],m=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],o=[1,22],k=[2,7],d=[1,26],y=[1,27],_=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],D=[1,24],w=[1,31],O=[1,32],M=[1,30],g=[1,39],E=[1,40],b=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Le=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],be=[27,29],xe=[1,70],De=[1,71],we=[1,72],Oe=[1,73],Me=[1,74],Fe=[1,75],$e=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],ie=[1,86],se=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],oe=[1,92],ge=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Pe=[1,101],Ue=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],I=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],j=[1,109],W=[1,111],ce=[1,116],he=[1,117],ue=[1,114],me=[1,115],_e={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:f(function(s,n,c,i,p,t,fe){var l=t.length-1;switch(p){case 4:this.$=t[l].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(t[l-3],t[l-4]);break;case 22:i.addRequirement(t[l-5],t[l-6]),i.setClass([t[l-5]],t[l-3]);break;case 23:i.setNewReqId(t[l-2]);break;case 24:i.setNewReqText(t[l-2]);break;case 25:i.setNewReqRisk(t[l-2]);break;case 26:i.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(t[l-3]);break;case 43:i.addElement(t[l-5]),i.setClass([t[l-5]],t[l-3]);break;case 44:i.setNewElementType(t[l-2]);break;case 45:i.setNewElementDocRef(t[l-2]);break;case 48:i.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:i.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=t[l-2],i.defineClass(t[l-1],t[l]);break;case 58:i.setClass(t[l-1],t[l]);break;case 59:i.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],i.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:m},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:m},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:m},{1:[2,2]},{4:17,5:o,7:13,8:k,9:u,11:h,13:m,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:y,23:_,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:w,74:O,77:M,89:g,90:E},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:o,7:42,8:k,9:u,11:h,13:m,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:y,23:_,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:w,74:O,77:M,89:g,90:E},{4:17,5:o,7:43,8:k,9:u,11:h,13:m,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:y,23:_,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:w,74:O,77:M,89:g,90:E},{4:17,5:o,7:44,8:k,9:u,11:h,13:m,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:y,23:_,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:w,74:O,77:M,89:g,90:E},{4:17,5:o,7:45,8:k,9:u,11:h,13:m,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:y,23:_,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:w,74:O,77:M,89:g,90:E},{4:17,5:o,7:46,8:k,9:u,11:h,13:m,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:y,23:_,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:w,74:O,77:M,89:g,90:E},{4:17,5:o,7:47,8:k,9:u,11:h,13:m,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:y,23:_,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:w,74:O,77:M,89:g,90:E},{4:17,5:o,7:48,8:k,9:u,11:h,13:m,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:y,23:_,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:w,74:O,77:M,89:g,90:E},{4:17,5:o,7:49,8:k,9:u,11:h,13:m,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:y,23:_,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:w,74:O,77:M,89:g,90:E},{4:17,5:o,7:50,8:k,9:u,11:h,13:m,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:y,23:_,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:w,74:O,77:M,89:g,90:E},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(b,[2,17]),e(b,[2,18]),e(b,[2,19]),e(b,[2,20]),{30:60,33:62,75:P,89:g,90:E},{30:63,33:62,75:P,89:g,90:E},{30:64,33:62,75:P,89:g,90:E},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Le,[2,81]),e(Le,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(be,[2,79]),e(be,[2,80]),{27:[1,67],29:[1,68]},e(be,[2,85]),e(be,[2,86]),{62:69,65:xe,66:De,67:we,68:Oe,69:Me,70:Fe,71:$e},{62:77,65:xe,66:De,67:we,68:Oe,69:Me,70:Fe,71:$e},{30:78,33:62,75:P,89:g,90:E},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:ie,83:se,84:re,85:ne,86:ae,87:le,88:oe},e(ge,[2,60]),e(ge,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:ie,83:se,84:re,85:ne,86:ae,87:le,88:oe},{30:94,33:62,75:P,76:U,89:g,90:E},{5:[1,95]},{30:96,33:62,75:P,89:g,90:E},{5:[1,97]},{30:98,33:62,75:P,89:g,90:E},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(b,[2,59],{76:U}),e(b,[2,64],{76:Pe}),{33:103,75:[1,102],89:g,90:E},e(Ue,[2,65],{79:104,75:Z,80:ee,81:te,82:ie,83:se,84:re,85:ne,86:ae,87:le,88:oe}),e(I,[2,67]),e(I,[2,69]),e(I,[2,70]),e(I,[2,71]),e(I,[2,72]),e(I,[2,73]),e(I,[2,74]),e(I,[2,75]),e(I,[2,76]),e(I,[2,77]),e(I,[2,78]),e(b,[2,57],{76:Pe}),e(b,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:j,40:W},{27:[1,112],76:U},{5:ce,40:he,56:113,57:ue,59:me},{27:[1,118],76:U},{33:119,89:g,90:E},{33:120,89:g,90:E},{75:Z,78:121,79:82,80:ee,81:te,82:ie,83:se,84:re,85:ne,86:ae,87:le,88:oe},e(ge,[2,61]),e(ge,[2,63]),e(I,[2,68]),e(b,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:j,40:W},e(b,[2,28]),{5:[1,127]},e(b,[2,42]),{32:[1,128]},{32:[1,129]},{5:ce,40:he,56:130,57:ue,59:me},e(b,[2,47]),{5:[1,131]},e(b,[2,48]),e(b,[2,49]),e(Ue,[2,66],{79:104,75:Z,80:ee,81:te,82:ie,83:se,84:re,85:ne,86:ae,87:le,88:oe}),{33:132,89:g,90:E},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(b,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:j,40:W},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(b,[2,46]),{5:ce,40:he,56:152,57:ue,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(b,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(b,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:j,40:W},{5:B,28:160,31:Q,34:H,36:K,38:j,40:W},{5:B,28:161,31:Q,34:H,36:K,38:j,40:W},{5:B,28:162,31:Q,34:H,36:K,38:j,40:W},{5:ce,40:he,56:163,57:ue,59:me},{5:ce,40:he,56:164,57:ue,59:me},e(b,[2,23]),e(b,[2,24]),e(b,[2,25]),e(b,[2,26]),e(b,[2,44]),e(b,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:f(function(s,n){if(n.recoverable)this.trace(s);else{var c=new Error(s);throw c.hash=n,c}},"parseError"),parse:f(function(s){var n=this,c=[0],i=[],p=[null],t=[],fe=this.table,l="",Ee=0,Ye=0,Be=0,ut=2,Qe=1,mt=t.slice.call(arguments,1),R=Object.create(this.lexer),G={yy:{}};for(var Te in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Te)&&(G.yy[Te]=this.yy[Te]);R.setInput(s,G.yy),G.yy.lexer=R,G.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var Ie=R.yylloc;t.push(Ie);var ft=R.options&&R.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Rt(T){c.length=c.length-2*T,p.length=p.length-T,t.length=t.length-T}f(Rt,"popStack");function pt(){var T;return T=i.pop()||R.lex()||Qe,typeof T!="number"&&(T instanceof Array&&(i=T,T=i.pop()),T=n.symbols_[T]||T),T}f(pt,"lex");for(var S,Ne,z,N,yt,qe,J={},Re,F,He,ye;;){if(z=c[c.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((S===null||typeof S>"u")&&(S=pt()),N=fe[z]&&fe[z][S]),typeof N>"u"||!N.length||!N[0]){var Ce="";ye=[];for(Re in fe[z])this.terminals_[Re]&&Re>ut&&ye.push("'"+this.terminals_[Re]+"'");R.showPosition?Ce="Parse error on line "+(Ee+1)+`:
2
+ `+R.showPosition()+`
3
+ Expecting `+ye.join(", ")+", got '"+(this.terminals_[S]||S)+"'":Ce="Parse error on line "+(Ee+1)+": Unexpected "+(S==Qe?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(Ce,{text:R.match,token:this.terminals_[S]||S,line:R.yylineno,loc:Ie,expected:ye})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+S);switch(N[0]){case 1:c.push(S),p.push(R.yytext),t.push(R.yylloc),c.push(N[1]),S=null,Ne?(S=Ne,Ne=null):(Ye=R.yyleng,l=R.yytext,Ee=R.yylineno,Ie=R.yylloc,Be>0&&Be--);break;case 2:if(F=this.productions_[N[1]][1],J.$=p[p.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},ft&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),qe=this.performAction.apply(J,[l,Ye,Ee,G.yy,N[1],p,t].concat(mt)),typeof qe<"u")return qe;F&&(c=c.slice(0,-1*F*2),p=p.slice(0,-1*F),t=t.slice(0,-1*F)),c.push(this.productions_[N[1]][0]),p.push(J.$),t.push(J._$),He=fe[c[c.length-2]][c[c.length-1]],c.push(He);break;case 3:return!0}}return!0},"parse")},ht=(function(){var $={EOF:1,parseError:f(function(n,c){if(this.yy.parser)this.yy.parser.parseError(n,c);else throw new Error(n)},"parseError"),setInput:f(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:f(function(s){var n=s.length,c=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===i.length?this.yylloc.first_column:0)+i[i.length-c.length].length-c[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(s){this.unput(this.match.slice(s))},"less"),pastInput:f(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
+ `+n+"^"},"showPosition"),test_match:f(function(s,n){var c,i,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),i=s[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],c=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var t in p)this[t]=p[t];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,c,i;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),t=0;t<p.length;t++)if(c=this._input.match(this.rules[p[t]]),c&&(!n||c[0].length>n[0].length)){if(n=c,i=t,this.options.backtrack_lexer){if(s=this.test_match(c,p[t]),s!==!1)return s;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(s=this.test_match(n,p[i]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var n=this.next();return n||this.lex()},"lex"),begin:f(function(n){this.conditionStack.push(n)},"begin"),popState:f(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:f(function(n){this.begin(n)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(n,c,i,p){var t=p;switch(i){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return c.yytext=c.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return $})();_e.lexer=ht;function Se(){this.yy={}}return f(Se,"Parser"),Se.prototype=_e,_e.Parser=Se,new Se})();Ve.parser=Ve;var ot=Ve;var ke=class{constructor(){this.relations=[];this.latestRequirement=this.getInitialRequirement();this.requirements=new Map;this.latestElement=this.getInitialElement();this.elements=new Map;this.classes=new Map;this.direction="TB";this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"};this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"};this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"};this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"};this.setAccTitle=je;this.getAccTitle=We;this.setAccDescription=Ge;this.getAccDescription=ze;this.setDiagramTitle=Xe;this.getDiagramTitle=Je;this.getConfig=f(()=>de().requirement,"getConfig");this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{f(this,"RequirementDB")}getDirection(){return this.direction}setDirection(r){this.direction=r}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(r,u){return this.requirements.has(r)||this.requirements.set(r,{name:r,type:u,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(r)}getRequirements(){return this.requirements}setNewReqId(r){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=r)}setNewReqText(r){this.latestRequirement!==void 0&&(this.latestRequirement.text=r)}setNewReqRisk(r){this.latestRequirement!==void 0&&(this.latestRequirement.risk=r)}setNewReqVerifyMethod(r){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=r)}addElement(r){return this.elements.has(r)||(this.elements.set(r,{name:r,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),pe.info("Added new element: ",r)),this.resetLatestElement(),this.elements.get(r)}getElements(){return this.elements}setNewElementType(r){this.latestElement!==void 0&&(this.latestElement.type=r)}setNewElementDocRef(r){this.latestElement!==void 0&&(this.latestElement.docRef=r)}addRelationship(r,u,h){this.relations.push({type:r,src:u,dst:h})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,Ke()}setCssStyle(r,u){for(let h of r){let m=this.requirements.get(h)??this.elements.get(h);if(!u||!m)return;for(let a of u)a.includes(",")?m.cssStyles.push(...a.split(",")):m.cssStyles.push(a)}}setClass(r,u){for(let h of r){let m=this.requirements.get(h)??this.elements.get(h);if(m)for(let a of u){m.classes.push(a);let o=this.classes.get(a)?.styles;o&&m.cssStyles.push(...o)}}}defineClass(r,u){for(let h of r){let m=this.classes.get(h);m===void 0&&(m={id:h,styles:[],textStyles:[]},this.classes.set(h,m)),u&&u.forEach(function(a){if(/color/.exec(a)){let o=a.replace("fill","bgFill");m.textStyles.push(o)}m.styles.push(a)}),this.requirements.forEach(a=>{a.classes.includes(h)&&a.cssStyles.push(...u.flatMap(o=>o.split(",")))}),this.elements.forEach(a=>{a.classes.includes(h)&&a.cssStyles.push(...u.flatMap(o=>o.split(",")))})}}getClasses(){return this.classes}getData(){let r=de(),u=[],h=[];for(let a of this.requirements.values()){let o=a;o.id=a.name,o.cssStyles=a.cssStyles,o.cssClasses=a.classes.join(" "),o.shape="requirementBox",o.look=r.look,o.colorIndex=u.length,u.push(o)}for(let a of this.elements.values()){let o=a;o.shape="requirementBox",o.look=r.look,o.id=a.name,o.cssStyles=a.cssStyles,o.cssClasses=a.classes.join(" "),o.colorIndex=u.length,u.push(o)}let m=0;for(let a of this.relations){let o=a.type===this.Relationships.CONTAINS,k={id:`${a.src}-${a.dst}-${m++}`,start:this.requirements.get(a.src)?.name??this.elements.get(a.src)?.name,end:this.requirements.get(a.dst)?.name??this.elements.get(a.dst)?.name,label:`&lt;&lt;${a.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",o?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:o?"normal":"dashed",arrowTypeStart:o?"requirement_contains":"",arrowTypeEnd:o?"":"requirement_arrow",look:r.look,labelType:"markdown"};h.push(k)}return{nodes:u,edges:h,other:{},config:r,direction:this.getDirection()}}};var bt=f(()=>{let e=Ae(),{theme:r,themeVariables:u}=e,{bkgColorArray:h,borderColorArray:m}=u;if(!tt(r,m))return"";let a=it(e.look),o="",k=et(h);for(let d=0;d<st(m);d++){let y=m[d],_=k?`fill: ${h[d%h.length]};`:"";o+=`
7
+
8
+ [data-look="${a}"][data-color-id="color-${d}"].node path {
9
+ stroke: ${y};
10
+ ${_}
11
+ }
12
+
13
+ [data-look="${a}"][data-color-id="color-${d}"].node rect {
14
+ stroke: ${y};
15
+ ${_}
16
+ }
17
+ `}return o},"genColor"),gt=f(e=>{let r=Ae(),{look:u,themeVariables:h}=r,{requirementEdgeLabelBackground:m}=h;return`
18
+ ${bt()}
19
+ marker {
20
+ fill: ${e.relationColor};
21
+ stroke: ${e.relationColor};
22
+ }
23
+
24
+ marker.cross {
25
+ stroke: ${e.lineColor};
26
+ }
27
+
28
+ svg {
29
+ font-family: ${e.fontFamily};
30
+ font-size: ${e.fontSize};
31
+ }
32
+
33
+ .reqBox {
34
+ fill: ${e.requirementBackground};
35
+ fill-opacity: 1.0;
36
+ stroke: ${e.requirementBorderColor};
37
+ stroke-width: ${e.requirementBorderSize};
38
+ }
39
+
40
+ .reqTitle, .reqLabel{
41
+ fill: ${e.requirementTextColor};
42
+ }
43
+ .reqLabelBox {
44
+ fill: ${e.relationLabelBackground};
45
+ fill-opacity: 1.0;
46
+ }
47
+
48
+ .req-title-line {
49
+ stroke: ${e.requirementBorderColor};
50
+ stroke-width: ${e.requirementBorderSize};
51
+ }
52
+ .relationshipLine {
53
+ stroke: ${e.relationColor};
54
+ stroke-width: ${u==="neo"?e.strokeWidth:"1px"};
55
+ }
56
+ .relationshipLabel {
57
+ fill: ${e.relationLabelColor};
58
+ }
59
+ .edgeLabel {
60
+ background-color: ${e.edgeLabelBackground};
61
+ }
62
+ .edgeLabel .label rect {
63
+ fill: ${e.edgeLabelBackground};
64
+ }
65
+ .edgeLabel .label text {
66
+ fill: ${e.relationLabelColor};
67
+ }
68
+ .divider {
69
+ stroke: ${e.nodeBorder};
70
+ stroke-width: 1;
71
+ }
72
+ .label {
73
+ font-family: ${e.fontFamily};
74
+ color: ${e.nodeTextColor||e.textColor};
75
+ }
76
+ .label text,span {
77
+ fill: ${e.nodeTextColor||e.textColor};
78
+ color: ${e.nodeTextColor||e.textColor};
79
+ }
80
+ .labelBkg {
81
+ background-color: ${m??e.edgeLabelBackground};
82
+ }
83
+
84
+ `},"getStyles"),ct=gt;var ve={};dt(ve,{draw:()=>Et});var Et=f(async function(e,r,u,h){pe.info("REF0:"),pe.info("Drawing requirement diagram (unified)",r);let{securityLevel:m,state:a,layout:o,look:k}=de(),d=h.db.getData(),y=rt(r,m);d.type=h.type,d.layoutAlgorithm=at(o),d.nodeSpacing=a?.nodeSpacing??50,d.rankSpacing=a?.rankSpacing??50,d.markers=k==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],d.diagramId=r,await nt(d,y);let _=8;Ze.insertTitle(y,"requirementDiagramTitleText",a?.titleTopMargin??25,h.db.getDiagramTitle()),lt(y,_,"requirementDiagram",a?.useMaxWidth??!0)},"draw");var Yt={parser:ot,get db(){return new ke},renderer:ve,styles:ct};export{Yt as diagram};
@@ -0,0 +1,40 @@
1
+ import{$ as X,H as _t,Q as bt,T as vt,U as St,V as Lt,W as wt,X as Et,Y as At,Z as Tt,ba as Ct}from"./chunk-FE53TMRB.mjs";import{E as Mt,h as G,m as Nt}from"./chunk-L2B47AAZ.mjs";import{a as e}from"./chunk-QVIEFLGF.mjs";var lt=(function(){var t=e(function(g,a,l,h){for(l=l||{},h=g.length;h--;l[g[h]]=a);return l},"o"),o=[1,9],s=[1,10],u=[1,5,10,12],c={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:e(function(a,l,h,x,k,p,b){var A=p.length-1;switch(k){case 7:let E=x.findOrCreateNode(p[A-4].trim().replaceAll('""','"')),C=x.findOrCreateNode(p[A-2].trim().replaceAll('""','"')),N=parseFloat(p[A].trim());x.addLink(E,C,N);break;case 8:case 9:case 11:this.$=p[A];break;case 10:this.$=p[A-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:o,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(u,[2,8]),t(u,[2,9]),{19:[1,16]},t(u,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:o,20:s},{15:18,16:7,17:8,18:o,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(u,[2,10]),{15:21,16:7,17:8,18:o,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:e(function(a,l){if(l.recoverable)this.trace(a);else{var h=new Error(a);throw h.hash=l,h}},"parseError"),parse:e(function(a){var l=this,h=[0],x=[],k=[null],p=[],b=this.table,A="",E=0,C=0,N=0,M=2,P=1,D=p.slice.call(arguments,1),S=Object.create(this.lexer),O={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(O.yy[z]=this.yy[z]);S.setInput(a,O.yy),O.yy.lexer=S,O.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var $=S.yylloc;p.push($);var I=S.options&&S.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function q(w){h.length=h.length-2*w,k.length=k.length-w,p.length=p.length-w}e(q,"popStack");function W(){var w;return w=x.pop()||S.lex()||P,typeof w!="number"&&(w instanceof Array&&(x=w,w=x.pop()),w=l.symbols_[w]||w),w}e(W,"lex");for(var L,R,n,f,d,r,i={},m,v,B,T;;){if(n=h[h.length-1],this.defaultActions[n]?f=this.defaultActions[n]:((L===null||typeof L>"u")&&(L=W()),f=b[n]&&b[n][L]),typeof f>"u"||!f.length||!f[0]){var j="";T=[];for(m in b[n])this.terminals_[m]&&m>M&&T.push("'"+this.terminals_[m]+"'");S.showPosition?j="Parse error on line "+(E+1)+`:
2
+ `+S.showPosition()+`
3
+ Expecting `+T.join(", ")+", got '"+(this.terminals_[L]||L)+"'":j="Parse error on line "+(E+1)+": Unexpected "+(L==P?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(j,{text:S.match,token:this.terminals_[L]||L,line:S.yylineno,loc:$,expected:T})}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+n+", token: "+L);switch(f[0]){case 1:h.push(L),k.push(S.yytext),p.push(S.yylloc),h.push(f[1]),L=null,R?(L=R,R=null):(C=S.yyleng,A=S.yytext,E=S.yylineno,$=S.yylloc,N>0&&N--);break;case 2:if(v=this.productions_[f[1]][1],i.$=k[k.length-v],i._$={first_line:p[p.length-(v||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(v||1)].first_column,last_column:p[p.length-1].last_column},I&&(i._$.range=[p[p.length-(v||1)].range[0],p[p.length-1].range[1]]),r=this.performAction.apply(i,[A,C,E,O.yy,f[1],k,p].concat(D)),typeof r<"u")return r;v&&(h=h.slice(0,-1*v*2),k=k.slice(0,-1*v),p=p.slice(0,-1*v)),h.push(this.productions_[f[1]][0]),k.push(i.$),p.push(i._$),B=b[h[h.length-2]][h[h.length-1]],h.push(B);break;case 3:return!0}}return!0},"parse")},_=(function(){var g={EOF:1,parseError:e(function(l,h){if(this.yy.parser)this.yy.parser.parseError(l,h);else throw new Error(l)},"parseError"),setInput:e(function(a,l){return this.yy=l||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:e(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var l=a.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:e(function(a){var l=a.length,h=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var k=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===x.length?this.yylloc.first_column:0)+x[x.length-h.length].length-h[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(a){this.unput(this.match.slice(a))},"less"),pastInput:e(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var a=this.pastInput(),l=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
5
+ `+l+"^"},"showPosition"),test_match:e(function(a,l){var h,x,k;if(this.options.backtrack_lexer&&(k={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(k.yylloc.range=this.yylloc.range.slice(0))),x=a[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],h=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var p in k)this[p]=k[p];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,l,h,x;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),p=0;p<k.length;p++)if(h=this._input.match(this.rules[k[p]]),h&&(!l||h[0].length>l[0].length)){if(l=h,x=p,this.options.backtrack_lexer){if(a=this.test_match(h,k[p]),a!==!1)return a;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(a=this.test_match(l,k[x]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var l=this.next();return l||this.lex()},"lex"),begin:e(function(l){this.conditionStack.push(l)},"begin"),popState:e(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:e(function(l){this.begin(l)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(l,h,x,k){var p=k;switch(x){case 0:return this.pushState("csv"),4;break;case 1:return this.pushState("csv"),4;break;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;break;case 6:return 20;case 7:return this.popState("escaped_text"),18;break;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return g})();c.lexer=_;function y(){this.yy={}}return e(y,"Parser"),y.prototype=c,c.Parser=y,new y})();lt.parser=lt;var J=lt;var et=[],nt=[],tt=new Map,Ht=e(()=>{et=[],nt=[],tt=new Map,vt()},"clear"),ut=class{constructor(o,s,u=0){this.source=o;this.target=s;this.value=u}static{e(this,"SankeyLink")}},Yt=e((t,o,s)=>{et.push(new ut(t,o,s))},"addLink"),ft=class{constructor(o){this.ID=o}static{e(this,"SankeyNode")}},qt=e(t=>{t=_t.sanitizeText(t,X());let o=tt.get(t);return o===void 0&&(o=new ft(t),tt.set(t,o),nt.push(o)),o},"findOrCreateNode"),Ut=e(()=>nt,"getNodes"),Xt=e(()=>et,"getLinks"),Gt=e(()=>({nodes:nt.map(t=>({id:t.ID})),links:et.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),Ot={nodesMap:tt,getConfig:e(()=>X().sankey,"getConfig"),getNodes:Ut,getLinks:Xt,getGraph:Gt,addLink:Yt,findOrCreateNode:qt,getAccTitle:Lt,setAccTitle:St,getAccDescription:Et,setAccDescription:wt,getDiagramTitle:Tt,setDiagramTitle:At,clear:Ht};function Q(t,o){let s;if(o===void 0)for(let u of t)u!=null&&(s<u||s===void 0&&u>=u)&&(s=u);else{let u=-1;for(let c of t)(c=o(c,++u,t))!=null&&(s<c||s===void 0&&c>=c)&&(s=c)}return s}e(Q,"max");function F(t,o){let s;if(o===void 0)for(let u of t)u!=null&&(s>u||s===void 0&&u>=u)&&(s=u);else{let u=-1;for(let c of t)(c=o(c,++u,t))!=null&&(s>c||s===void 0&&c>=c)&&(s=c)}return s}e(F,"min");function H(t,o){let s=0;if(o===void 0)for(let u of t)(u=+u)&&(s+=u);else{let u=-1;for(let c of t)(c=+o(c,++u,t))&&(s+=c)}return s}e(H,"sum");function Jt(t){return t.target.depth}e(Jt,"targetDepth");function ct(t){return t.depth}e(ct,"left");function ht(t,o){return o-1-t.height}e(ht,"right");function K(t,o){return t.sourceLinks.length?t.depth:o-1}e(K,"justify");function dt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?F(t.sourceLinks,Jt)-1:0}e(dt,"center");function Y(t){return function(){return t}}e(Y,"constant");function It(t,o){return rt(t.source,o.source)||t.index-o.index}e(It,"ascendingSourceBreadth");function Pt(t,o){return rt(t.target,o.target)||t.index-o.index}e(Pt,"ascendingTargetBreadth");function rt(t,o){return t.y0-o.y0}e(rt,"ascendingBreadth");function pt(t){return t.value}e(pt,"value");function Qt(t){return t.index}e(Qt,"defaultId");function Kt(t){return t.nodes}e(Kt,"defaultNodes");function Zt(t){return t.links}e(Zt,"defaultLinks");function Dt(t,o){let s=t.get(o);if(!s)throw new Error("missing: "+o);return s}e(Dt,"find");function Rt({nodes:t}){for(let o of t){let s=o.y0,u=s;for(let c of o.sourceLinks)c.y0=s+c.width/2,s+=c.width;for(let c of o.targetLinks)c.y1=u+c.width/2,u+=c.width}}e(Rt,"computeLinkBreadths");function ot(){let t=0,o=0,s=1,u=1,c=24,_=8,y,g=Qt,a=K,l,h,x=Kt,k=Zt,p=6;function b(){let n={nodes:x.apply(null,arguments),links:k.apply(null,arguments)};return A(n),E(n),C(n),N(n),D(n),Rt(n),n}e(b,"sankey"),b.update=function(n){return Rt(n),n},b.nodeId=function(n){return arguments.length?(g=typeof n=="function"?n:Y(n),b):g},b.nodeAlign=function(n){return arguments.length?(a=typeof n=="function"?n:Y(n),b):a},b.nodeSort=function(n){return arguments.length?(l=n,b):l},b.nodeWidth=function(n){return arguments.length?(c=+n,b):c},b.nodePadding=function(n){return arguments.length?(_=y=+n,b):_},b.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:Y(n),b):x},b.links=function(n){return arguments.length?(k=typeof n=="function"?n:Y(n),b):k},b.linkSort=function(n){return arguments.length?(h=n,b):h},b.size=function(n){return arguments.length?(t=o=0,s=+n[0],u=+n[1],b):[s-t,u-o]},b.extent=function(n){return arguments.length?(t=+n[0][0],s=+n[1][0],o=+n[0][1],u=+n[1][1],b):[[t,o],[s,u]]},b.iterations=function(n){return arguments.length?(p=+n,b):p};function A({nodes:n,links:f}){for(let[r,i]of n.entries())i.index=r,i.sourceLinks=[],i.targetLinks=[];let d=new Map(n.map((r,i)=>[g(r,i,n),r]));for(let[r,i]of f.entries()){i.index=r;let{source:m,target:v}=i;typeof m!="object"&&(m=i.source=Dt(d,m)),typeof v!="object"&&(v=i.target=Dt(d,v)),m.sourceLinks.push(i),v.targetLinks.push(i)}if(h!=null)for(let{sourceLinks:r,targetLinks:i}of n)r.sort(h),i.sort(h)}e(A,"computeNodeLinks");function E({nodes:n}){for(let f of n)f.value=f.fixedValue===void 0?Math.max(H(f.sourceLinks,pt),H(f.targetLinks,pt)):f.fixedValue}e(E,"computeNodeValues");function C({nodes:n}){let f=n.length,d=new Set(n),r=new Set,i=0;for(;d.size;){for(let m of d){m.depth=i;for(let{target:v}of m.sourceLinks)r.add(v)}if(++i>f)throw new Error("circular link");d=r,r=new Set}}e(C,"computeNodeDepths");function N({nodes:n}){let f=n.length,d=new Set(n),r=new Set,i=0;for(;d.size;){for(let m of d){m.height=i;for(let{source:v}of m.targetLinks)r.add(v)}if(++i>f)throw new Error("circular link");d=r,r=new Set}}e(N,"computeNodeHeights");function M({nodes:n}){let f=Q(n,i=>i.depth)+1,d=(s-t-c)/(f-1),r=new Array(f);for(let i of n){let m=Math.max(0,Math.min(f-1,Math.floor(a.call(null,i,f))));i.layer=m,i.x0=t+m*d,i.x1=i.x0+c,r[m]?r[m].push(i):r[m]=[i]}if(l)for(let i of r)i.sort(l);return r}e(M,"computeNodeLayers");function P(n){let f=F(n,d=>(u-o-(d.length-1)*y)/H(d,pt));for(let d of n){let r=o;for(let i of d){i.y0=r,i.y1=r+i.value*f,r=i.y1+y;for(let m of i.sourceLinks)m.width=m.value*f}r=(u-r+y)/(d.length+1);for(let i=0;i<d.length;++i){let m=d[i];m.y0+=r*(i+1),m.y1+=r*(i+1)}W(d)}}e(P,"initializeNodeBreadths");function D(n){let f=M(n);y=Math.min(_,(u-o)/(Q(f,d=>d.length)-1)),P(f);for(let d=0;d<p;++d){let r=Math.pow(.99,d),i=Math.max(1-r,(d+1)/p);O(f,r,i),S(f,r,i)}}e(D,"computeNodeBreadths");function S(n,f,d){for(let r=1,i=n.length;r<i;++r){let m=n[r];for(let v of m){let B=0,T=0;for(let{source:w,value:at}of v.targetLinks){let U=at*(v.layer-w.layer);B+=L(w,v)*U,T+=U}if(!(T>0))continue;let j=(B/T-v.y0)*f;v.y0+=j,v.y1+=j,q(v)}l===void 0&&m.sort(rt),z(m,d)}}e(S,"relaxLeftToRight");function O(n,f,d){for(let r=n.length,i=r-2;i>=0;--i){let m=n[i];for(let v of m){let B=0,T=0;for(let{target:w,value:at}of v.sourceLinks){let U=at*(w.layer-v.layer);B+=R(v,w)*U,T+=U}if(!(T>0))continue;let j=(B/T-v.y0)*f;v.y0+=j,v.y1+=j,q(v)}l===void 0&&m.sort(rt),z(m,d)}}e(O,"relaxRightToLeft");function z(n,f){let d=n.length>>1,r=n[d];I(n,r.y0-y,d-1,f),$(n,r.y1+y,d+1,f),I(n,u,n.length-1,f),$(n,o,0,f)}e(z,"resolveCollisions");function $(n,f,d,r){for(;d<n.length;++d){let i=n[d],m=(f-i.y0)*r;m>1e-6&&(i.y0+=m,i.y1+=m),f=i.y1+y}}e($,"resolveCollisionsTopToBottom");function I(n,f,d,r){for(;d>=0;--d){let i=n[d],m=(i.y1-f)*r;m>1e-6&&(i.y0-=m,i.y1-=m),f=i.y0-y}}e(I,"resolveCollisionsBottomToTop");function q({sourceLinks:n,targetLinks:f}){if(h===void 0){for(let{source:{sourceLinks:d}}of f)d.sort(Pt);for(let{target:{targetLinks:d}}of n)d.sort(It)}}e(q,"reorderNodeLinks");function W(n){if(h===void 0)for(let{sourceLinks:f,targetLinks:d}of n)f.sort(Pt),d.sort(It)}e(W,"reorderLinks");function L(n,f){let d=n.y0-(n.sourceLinks.length-1)*y/2;for(let{target:r,width:i}of n.sourceLinks){if(r===f)break;d+=i+y}for(let{source:r,width:i}of f.targetLinks){if(r===n)break;d-=i}return d}e(L,"targetTop");function R(n,f){let d=f.y0-(f.targetLinks.length-1)*y/2;for(let{source:r,width:i}of f.targetLinks){if(r===n)break;d+=i+y}for(let{target:r,width:i}of n.sourceLinks){if(r===f)break;d-=i}return d}return e(R,"sourceTop"),b}e(ot,"Sankey");var yt=Math.PI,mt=2*yt,V=1e-6,te=mt-V;function gt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}e(gt,"Path");function jt(){return new gt}e(jt,"path");gt.prototype=jt.prototype={constructor:gt,moveTo:e(function(t,o){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+o)},"moveTo"),closePath:e(function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:e(function(t,o){this._+="L"+(this._x1=+t)+","+(this._y1=+o)},"lineTo"),quadraticCurveTo:e(function(t,o,s,u){this._+="Q"+ +t+","+ +o+","+(this._x1=+s)+","+(this._y1=+u)},"quadraticCurveTo"),bezierCurveTo:e(function(t,o,s,u,c,_){this._+="C"+ +t+","+ +o+","+ +s+","+ +u+","+(this._x1=+c)+","+(this._y1=+_)},"bezierCurveTo"),arcTo:e(function(t,o,s,u,c){t=+t,o=+o,s=+s,u=+u,c=+c;var _=this._x1,y=this._y1,g=s-t,a=u-o,l=_-t,h=y-o,x=l*l+h*h;if(c<0)throw new Error("negative radius: "+c);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=o);else if(x>V)if(!(Math.abs(h*g-a*l)>V)||!c)this._+="L"+(this._x1=t)+","+(this._y1=o);else{var k=s-_,p=u-y,b=g*g+a*a,A=k*k+p*p,E=Math.sqrt(b),C=Math.sqrt(x),N=c*Math.tan((yt-Math.acos((b+x-A)/(2*E*C)))/2),M=N/C,P=N/E;Math.abs(M-1)>V&&(this._+="L"+(t+M*l)+","+(o+M*h)),this._+="A"+c+","+c+",0,0,"+ +(h*k>l*p)+","+(this._x1=t+P*g)+","+(this._y1=o+P*a)}},"arcTo"),arc:e(function(t,o,s,u,c,_){t=+t,o=+o,s=+s,_=!!_;var y=s*Math.cos(u),g=s*Math.sin(u),a=t+y,l=o+g,h=1^_,x=_?u-c:c-u;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+a+","+l:(Math.abs(this._x1-a)>V||Math.abs(this._y1-l)>V)&&(this._+="L"+a+","+l),s&&(x<0&&(x=x%mt+mt),x>te?this._+="A"+s+","+s+",0,1,"+h+","+(t-y)+","+(o-g)+"A"+s+","+s+",0,1,"+h+","+(this._x1=a)+","+(this._y1=l):x>V&&(this._+="A"+s+","+s+",0,"+ +(x>=yt)+","+h+","+(this._x1=t+s*Math.cos(c))+","+(this._y1=o+s*Math.sin(c))))},"arc"),rect:e(function(t,o,s,u){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+o)+"h"+ +s+"v"+ +u+"h"+-s+"Z"},"rect"),toString:e(function(){return this._},"toString")};var xt=jt;function it(t){return e(function(){return t},"constant")}e(it,"default");function zt(t){return t[0]}e(zt,"x");function $t(t){return t[1]}e($t,"y");var Bt=Array.prototype.slice;function ee(t){return t.source}e(ee,"linkSource");function ne(t){return t.target}e(ne,"linkTarget");function re(t){var o=ee,s=ne,u=zt,c=$t,_=null;function y(){var g,a=Bt.call(arguments),l=o.apply(this,a),h=s.apply(this,a);if(_||(_=g=xt()),t(_,+u.apply(this,(a[0]=l,a)),+c.apply(this,a),+u.apply(this,(a[0]=h,a)),+c.apply(this,a)),g)return _=null,g+""||null}return e(y,"link"),y.source=function(g){return arguments.length?(o=g,y):o},y.target=function(g){return arguments.length?(s=g,y):s},y.x=function(g){return arguments.length?(u=typeof g=="function"?g:it(+g),y):u},y.y=function(g){return arguments.length?(c=typeof g=="function"?g:it(+g),y):c},y.context=function(g){return arguments.length?(_=g??null,y):_},y}e(re,"link");function oe(t,o,s,u,c){t.moveTo(o,s),t.bezierCurveTo(o=(o+u)/2,s,o,c,u,c)}e(oe,"curveHorizontal");function kt(){return re(oe)}e(kt,"linkHorizontal");function ie(t){return[t.source.x1,t.y0]}e(ie,"horizontalSource");function se(t){return[t.target.x0,t.y1]}e(se,"horizontalTarget");function st(){return kt().source(ie).target(se)}e(st,"default");var Z=class t{static{e(this,"Uid")}static{this.count=0}static next(o){return new t(o+ ++t.count)}constructor(o){this.id=o,this.href=`#${o}`}toString(){return"url("+this.href+")"}};var ae={left:ct,right:ht,center:dt,justify:K},le=e(t=>{let o=0,s=0;for(let u of t){let c=u.value??0;c>o&&(o=c,s=u.layer??0)}return s},"findCentralNodeLayer"),ue=e(function(t,o,s,u){let{securityLevel:c,sankey:_}=X(),y=Ct.sankey,g;c==="sandbox"&&(g=G("#i"+o));let a=c==="sandbox"?G(g.nodes()[0].contentDocument.body):G("body"),l=c==="sandbox"?a.select(`[id="${o}"]`):G(`[id="${o}"]`),h=_?.width??y.width,x=_?.height??y.width,k=_?.useMaxWidth??y.useMaxWidth,p=_?.nodeAlignment??y.nodeAlignment,b=_?.prefix??y.prefix,A=_?.suffix??y.suffix,E=_?.showValues??y.showValues,C=_?.nodeWidth??y.nodeWidth??10,N=_?.nodePadding??y.nodePadding??12,M=_?.labelStyle??y.labelStyle??"legacy",P=_?.nodeColors??{},D=u.db.getGraph(),S=ae[p];ot().nodeId(r=>r.id).nodeWidth(C).nodePadding(N+(E?15:0)).nodeAlign(S).extent([[0,0],[h,x]])(D);let z=le(D.nodes),$=Nt(Mt),I=e(r=>P[r]??$(r),"getNodeColor");l.append("g").attr("class","nodes").selectAll(".node").data(D.nodes).join("g").attr("class","node").attr("id",r=>(r.uid=Z.next("node-")).id).attr("transform",function(r){return"translate("+r.x0+","+r.y0+")"}).attr("x",r=>r.x0).attr("y",r=>r.y0).append("rect").attr("height",r=>r.y1-r.y0).attr("width",r=>r.x1-r.x0).attr("fill",r=>I(r.id));let q=e(({id:r,value:i})=>E?`${r}
7
+ ${b}${Math.round(i*100)/100}${A}`:r,"getText"),W=e(r=>M==="outlined"?(r.layer??0)<z?{x:r.x0-6,anchor:"end"}:{x:r.x1+6,anchor:"start"}:r.x0<h/2?{x:r.x1+6,anchor:"start"}:{x:r.x0-6,anchor:"end"},"getLabelPosition"),L=l.append("g").attr("class","node-labels").attr("font-size",14),R=e(r=>L.selectAll(r?`.${r}`:"text").data(D.nodes).join("text").attr("class",r??null).attr("x",i=>W(i).x).attr("y",i=>(i.y1+i.y0)/2).attr("dy",`${E?"0":"0.35"}em`).attr("text-anchor",i=>W(i).anchor).text(q),"appendLabel");M==="outlined"?(R("sankey-label-bg"),R("sankey-label-fg")):R();let n=l.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(D.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),f=_?.linkColor??"gradient";if(f==="gradient"){let r=n.append("linearGradient").attr("id",i=>(i.uid=Z.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",i=>i.source.x1).attr("x2",i=>i.target.x0);r.append("stop").attr("offset","0%").attr("stop-color",i=>I(i.source.id)),r.append("stop").attr("offset","100%").attr("stop-color",i=>I(i.target.id))}let d;switch(f){case"gradient":d=e(r=>r.uid,"coloring");break;case"source":d=e(r=>I(r.source.id),"coloring");break;case"target":d=e(r=>I(r.target.id),"coloring");break;default:d=f}n.append("path").attr("d",st()).attr("stroke",d).attr("stroke-width",r=>Math.max(1,r.width)),bt(void 0,l,0,k)},"draw"),Vt={draw:ue};var Wt=e(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
8
+ `).trim(),"prepareTextForParsing");var fe=e(t=>`.label {
9
+ font-family: ${t.fontFamily};
10
+ }
11
+
12
+ .node-labels {
13
+ font-family: ${t.fontFamily};
14
+ }
15
+
16
+ /* Outlined label style - background stroke for better readability */
17
+ .sankey-label-bg {
18
+ stroke: ${t.mainBkg||t.background||"#fff"};
19
+ stroke-width: 4px;
20
+ stroke-linejoin: round;
21
+ paint-order: stroke;
22
+ }
23
+
24
+ /* Foreground label text */
25
+ .sankey-label-fg {
26
+ fill: ${t.textColor};
27
+ }
28
+
29
+ /* Node styling */
30
+ .node rect {
31
+ shape-rendering: crispEdges;
32
+ }
33
+
34
+ /* Link styling */
35
+ .link {
36
+ fill: none;
37
+ stroke-opacity: 0.5;
38
+ mix-blend-mode: multiply;
39
+ }
40
+ `,"getStyles"),Ft=fe;var ce=J.parse.bind(J);J.parse=t=>ce(Wt(t));var Nn={styles:Ft,parser:J,db:Ot,renderer:Vt};export{Nn as diagram};