jekyll-ham 1.0.4 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (366) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -2
  3. data/_layouts/default.html +6 -0
  4. data/_layouts/page.html +1 -1
  5. data/assets/mermaid/Diagram.d.ts +33 -0
  6. data/assets/mermaid/Tableau10-31042135.js +10 -0
  7. data/assets/mermaid/Tableau10-558cc280.js +9 -0
  8. data/assets/mermaid/__mocks__/mermaidAPI.d.ts +13 -0
  9. data/assets/mermaid/accessibility.d.ts +27 -0
  10. data/assets/mermaid/accessibility.spec.d.ts +1 -0
  11. data/assets/mermaid/arc-c0f908ab.js +148 -0
  12. data/assets/mermaid/arc-d1f6357e.js +86 -0
  13. data/assets/mermaid/array-2ff2c7a6.js +6 -0
  14. data/assets/mermaid/array-b7dcf730.js +6 -0
  15. data/assets/mermaid/assignWithDepth.d.ts +30 -0
  16. data/assets/mermaid/blockDiagram-5dc23a45.js +1230 -0
  17. data/assets/mermaid/blockDiagram-9f4a6865.js +1822 -0
  18. data/assets/mermaid/blockDiagram-efe38566.js +1818 -0
  19. data/assets/mermaid/c4Diagram-1e775db3.js +1579 -0
  20. data/assets/mermaid/c4Diagram-ae766693.js +2473 -0
  21. data/assets/mermaid/c4Diagram-af207393.js +2463 -0
  22. data/assets/mermaid/channel-ebbc4130.js +5 -0
  23. data/assets/mermaid/channel-f9001828.js +8 -0
  24. data/assets/mermaid/classDiagram-72b9c71d.js +356 -0
  25. data/assets/mermaid/classDiagram-f52caa06.js +220 -0
  26. data/assets/mermaid/classDiagram-fb54d2a0.js +363 -0
  27. data/assets/mermaid/classDiagram-v2-640c694e.js +206 -0
  28. data/assets/mermaid/classDiagram-v2-a2b738ad.js +298 -0
  29. data/assets/mermaid/classDiagram-v2-fedb80f6.js +290 -0
  30. data/assets/mermaid/clone-9ea6bfeb.js +8 -0
  31. data/assets/mermaid/clone-afc2f047.js +8 -0
  32. data/assets/mermaid/config.d.ts +98 -0
  33. data/assets/mermaid/config.spec.d.ts +1 -0
  34. data/assets/mermaid/config.type.d.ts +1534 -0
  35. data/assets/mermaid/createText-03b82060.js +2966 -0
  36. data/assets/mermaid/createText-b70fe78a.js +4929 -0
  37. data/assets/mermaid/createText-ca0c5216.js +251 -0
  38. data/assets/mermaid/dagre-wrapper/blockArrowHelper.d.ts +8 -0
  39. data/assets/mermaid/dagre-wrapper/clusters.d.ts +4 -0
  40. data/assets/mermaid/dagre-wrapper/createLabel.d.ts +9 -0
  41. data/assets/mermaid/dagre-wrapper/edgeMarker.d.ts +12 -0
  42. data/assets/mermaid/dagre-wrapper/edgeMarker.spec.d.ts +1 -0
  43. data/assets/mermaid/dagre-wrapper/edges.d.ts +14 -0
  44. data/assets/mermaid/dagre-wrapper/index.d.ts +1 -0
  45. data/assets/mermaid/dagre-wrapper/intersect/index.d.ts +13 -0
  46. data/assets/mermaid/dagre-wrapper/intersect/intersect-circle.d.ts +10 -0
  47. data/assets/mermaid/dagre-wrapper/intersect/intersect-ellipse.d.ts +11 -0
  48. data/assets/mermaid/dagre-wrapper/intersect/intersect-line.d.ts +13 -0
  49. data/assets/mermaid/dagre-wrapper/intersect/intersect-node.d.ts +6 -0
  50. data/assets/mermaid/dagre-wrapper/intersect/intersect-polygon.d.ts +10 -0
  51. data/assets/mermaid/dagre-wrapper/intersect/intersect-rect.d.ts +5 -0
  52. data/assets/mermaid/dagre-wrapper/markers.d.ts +2 -0
  53. data/assets/mermaid/dagre-wrapper/mermaid-graphlib.d.ts +8 -0
  54. data/assets/mermaid/dagre-wrapper/nodes.d.ts +4 -0
  55. data/assets/mermaid/dagre-wrapper/shapes/note.d.ts +2 -0
  56. data/assets/mermaid/dagre-wrapper/shapes/util.d.ts +14 -0
  57. data/assets/mermaid/defaultConfig.d.ts +12 -0
  58. data/assets/mermaid/diagram-api/comments.d.ts +6 -0
  59. data/assets/mermaid/diagram-api/comments.spec.d.ts +1 -0
  60. data/assets/mermaid/diagram-api/detectType.d.ts +42 -0
  61. data/assets/mermaid/diagram-api/diagram-orchestration.d.ts +1 -0
  62. data/assets/mermaid/diagram-api/diagram-orchestration.spec.d.ts +1 -0
  63. data/assets/mermaid/diagram-api/diagramAPI.d.ts +31 -0
  64. data/assets/mermaid/diagram-api/diagramAPI.spec.d.ts +1 -0
  65. data/assets/mermaid/diagram-api/frontmatter.d.ts +18 -0
  66. data/assets/mermaid/diagram-api/frontmatter.spec.d.ts +1 -0
  67. data/assets/mermaid/diagram-api/loadDiagram.d.ts +1 -0
  68. data/assets/mermaid/diagram-api/regexes.d.ts +3 -0
  69. data/assets/mermaid/diagram-api/types.d.ts +84 -0
  70. data/assets/mermaid/diagram.spec.d.ts +1 -0
  71. data/assets/mermaid/diagrams/block/blockDB.d.ts +54 -0
  72. data/assets/mermaid/diagrams/block/blockDetector.d.ts +3 -0
  73. data/assets/mermaid/diagrams/block/blockDiagram.d.ts +2 -0
  74. data/assets/mermaid/diagrams/block/blockRenderer.d.ts +15 -0
  75. data/assets/mermaid/diagrams/block/blockTypes.d.ts +36 -0
  76. data/assets/mermaid/diagrams/block/blockUtils.d.ts +1 -0
  77. data/assets/mermaid/diagrams/block/layout.d.ts +13 -0
  78. data/assets/mermaid/diagrams/block/layout.spec.d.ts +1 -0
  79. data/assets/mermaid/diagrams/block/parser/block.spec.d.ts +1 -0
  80. data/assets/mermaid/diagrams/block/renderHelpers.d.ts +10 -0
  81. data/assets/mermaid/diagrams/block/styles.d.ts +18 -0
  82. data/assets/mermaid/diagrams/c4/c4Db.d.ts +127 -0
  83. data/assets/mermaid/diagrams/c4/c4Detector.d.ts +3 -0
  84. data/assets/mermaid/diagrams/c4/c4Diagram.d.ts +2 -0
  85. data/assets/mermaid/diagrams/c4/c4Renderer.d.ts +12 -0
  86. data/assets/mermaid/diagrams/c4/styles.d.ts +2 -0
  87. data/assets/mermaid/diagrams/c4/svgDraw.d.ts +36 -0
  88. data/assets/mermaid/diagrams/class/classDb.d.ts +144 -0
  89. data/assets/mermaid/diagrams/class/classDetector-V2.d.ts +3 -0
  90. data/assets/mermaid/diagrams/class/classDetector.d.ts +3 -0
  91. data/assets/mermaid/diagrams/class/classDiagram-v2.d.ts +2 -0
  92. data/assets/mermaid/diagrams/class/classDiagram.d.ts +2 -0
  93. data/assets/mermaid/diagrams/class/classDiagram.spec.d.ts +1 -0
  94. data/assets/mermaid/diagrams/class/classRenderer-v2.d.ts +57 -0
  95. data/assets/mermaid/diagrams/class/classRenderer.d.ts +5 -0
  96. data/assets/mermaid/diagrams/class/classTypes.d.ts +78 -0
  97. data/assets/mermaid/diagrams/class/classTypes.spec.d.ts +1 -0
  98. data/assets/mermaid/diagrams/class/styles.d.ts +2 -0
  99. data/assets/mermaid/diagrams/class/svgDraw.d.ts +25 -0
  100. data/assets/mermaid/diagrams/common/common.d.ts +110 -0
  101. data/assets/mermaid/diagrams/common/common.spec.d.ts +1 -0
  102. data/assets/mermaid/diagrams/common/commonDb.d.ts +7 -0
  103. data/assets/mermaid/diagrams/common/commonTypes.d.ts +51 -0
  104. data/assets/mermaid/diagrams/common/svgDrawCommon.d.ts +15 -0
  105. data/assets/mermaid/diagrams/er/erDb.d.ts +49 -0
  106. data/assets/mermaid/diagrams/er/erDetector.d.ts +3 -0
  107. data/assets/mermaid/diagrams/er/erDiagram.d.ts +34 -0
  108. data/assets/mermaid/diagrams/er/erMarkers.d.ts +24 -0
  109. data/assets/mermaid/diagrams/er/erRenderer.d.ts +19 -0
  110. data/assets/mermaid/diagrams/er/erRenderer.spec.d.ts +1 -0
  111. data/assets/mermaid/diagrams/er/styles.d.ts +2 -0
  112. data/assets/mermaid/diagrams/error/errorDiagram.d.ts +3 -0
  113. data/assets/mermaid/diagrams/error/errorRenderer.d.ts +12 -0
  114. data/assets/mermaid/diagrams/flowchart/elk/detector.d.ts +3 -0
  115. data/assets/mermaid/diagrams/flowchart/elk/detector.spec.d.ts +1 -0
  116. data/assets/mermaid/diagrams/flowchart/elk/flowRenderer-elk.d.ts +10 -0
  117. data/assets/mermaid/diagrams/flowchart/elk/flowchart-elk-definition.d.ts +10 -0
  118. data/assets/mermaid/diagrams/flowchart/elk/render-utils.d.ts +5 -0
  119. data/assets/mermaid/diagrams/flowchart/elk/render-utils.spec.d.ts +1 -0
  120. data/assets/mermaid/diagrams/flowchart/elk/styles.d.ts +19 -0
  121. data/assets/mermaid/diagrams/flowchart/flowChartShapes.d.ts +9 -0
  122. data/assets/mermaid/diagrams/flowchart/flowDb.d.ts +87 -0
  123. data/assets/mermaid/diagrams/flowchart/flowDetector-v2.d.ts +3 -0
  124. data/assets/mermaid/diagrams/flowchart/flowDetector.d.ts +3 -0
  125. data/assets/mermaid/diagrams/flowchart/flowDiagram-v2.d.ts +57 -0
  126. data/assets/mermaid/diagrams/flowchart/flowDiagram.d.ts +57 -0
  127. data/assets/mermaid/diagrams/flowchart/flowRenderer-v2.d.ts +13 -0
  128. data/assets/mermaid/diagrams/flowchart/flowRenderer.d.ts +13 -0
  129. data/assets/mermaid/diagrams/flowchart/styles.d.ts +18 -0
  130. data/assets/mermaid/diagrams/gantt/ganttDb.d.ts +106 -0
  131. data/assets/mermaid/diagrams/gantt/ganttDb.spec.d.ts +1 -0
  132. data/assets/mermaid/diagrams/gantt/ganttDetector.d.ts +3 -0
  133. data/assets/mermaid/diagrams/gantt/ganttDiagram.d.ts +2 -0
  134. data/assets/mermaid/diagrams/gantt/ganttRenderer.d.ts +7 -0
  135. data/assets/mermaid/diagrams/gantt/styles.d.ts +2 -0
  136. data/assets/mermaid/diagrams/git/gitGraphAst.d.ts +61 -0
  137. data/assets/mermaid/diagrams/git/gitGraphDetector.d.ts +3 -0
  138. data/assets/mermaid/diagrams/git/gitGraphDiagram.d.ts +2 -0
  139. data/assets/mermaid/diagrams/git/gitGraphRenderer.d.ts +5 -0
  140. data/assets/mermaid/diagrams/git/styles.d.ts +2 -0
  141. data/assets/mermaid/diagrams/info/info.spec.d.ts +1 -0
  142. data/assets/mermaid/diagrams/info/infoDb.d.ts +5 -0
  143. data/assets/mermaid/diagrams/info/infoDetector.d.ts +2 -0
  144. data/assets/mermaid/diagrams/info/infoDiagram.d.ts +2 -0
  145. data/assets/mermaid/diagrams/info/infoRenderer.d.ts +4 -0
  146. data/assets/mermaid/diagrams/info/infoTypes.d.ts +9 -0
  147. data/assets/mermaid/diagrams/mindmap/detector.d.ts +3 -0
  148. data/assets/mermaid/diagrams/mindmap/mindmap-definition.d.ts +2 -0
  149. data/assets/mermaid/diagrams/mindmap/mindmap.spec.d.ts +1 -0
  150. data/assets/mermaid/diagrams/mindmap/mindmapDb.d.ts +30 -0
  151. data/assets/mermaid/diagrams/mindmap/mindmapRenderer.d.ts +21 -0
  152. data/assets/mermaid/diagrams/mindmap/mindmapTypes.d.ts +20 -0
  153. data/assets/mermaid/diagrams/mindmap/styles.d.ts +3 -0
  154. data/assets/mermaid/diagrams/mindmap/svgDraw.d.ts +13 -0
  155. data/assets/mermaid/diagrams/pie/pie.spec.d.ts +1 -0
  156. data/assets/mermaid/diagrams/pie/pieDb.d.ts +6 -0
  157. data/assets/mermaid/diagrams/pie/pieDetector.d.ts +2 -0
  158. data/assets/mermaid/diagrams/pie/pieDiagram.d.ts +2 -0
  159. data/assets/mermaid/diagrams/pie/pieRenderer.d.ts +13 -0
  160. data/assets/mermaid/diagrams/pie/pieStyles.d.ts +3 -0
  161. data/assets/mermaid/diagrams/pie/pieTypes.d.ts +53 -0
  162. data/assets/mermaid/diagrams/quadrant-chart/parser/quadrant.jison.spec.d.ts +1 -0
  163. data/assets/mermaid/diagrams/quadrant-chart/quadrantBuilder.d.ts +118 -0
  164. data/assets/mermaid/diagrams/quadrant-chart/quadrantDb.d.ts +38 -0
  165. data/assets/mermaid/diagrams/quadrant-chart/quadrantDetector.d.ts +3 -0
  166. data/assets/mermaid/diagrams/quadrant-chart/quadrantDiagram.d.ts +2 -0
  167. data/assets/mermaid/diagrams/quadrant-chart/quadrantRenderer.d.ts +6 -0
  168. data/assets/mermaid/diagrams/requirement/requirementDb.d.ts +70 -0
  169. data/assets/mermaid/diagrams/requirement/requirementDetector.d.ts +3 -0
  170. data/assets/mermaid/diagrams/requirement/requirementDiagram.d.ts +2 -0
  171. data/assets/mermaid/diagrams/requirement/requirementMarkers.d.ts +10 -0
  172. data/assets/mermaid/diagrams/requirement/requirementRenderer.d.ts +7 -0
  173. data/assets/mermaid/diagrams/requirement/styles.d.ts +2 -0
  174. data/assets/mermaid/diagrams/sankey/parser/sankey.spec.d.ts +1 -0
  175. data/assets/mermaid/diagrams/sankey/sankeyDB.d.ts +36 -0
  176. data/assets/mermaid/diagrams/sankey/sankeyDetector.d.ts +3 -0
  177. data/assets/mermaid/diagrams/sankey/sankeyDiagram.d.ts +2 -0
  178. data/assets/mermaid/diagrams/sankey/sankeyRenderer.d.ts +14 -0
  179. data/assets/mermaid/diagrams/sankey/sankeyUtils.d.ts +1 -0
  180. data/assets/mermaid/diagrams/sequence/sequenceDb.d.ts +153 -0
  181. data/assets/mermaid/diagrams/sequence/sequenceDetector.d.ts +3 -0
  182. data/assets/mermaid/diagrams/sequence/sequenceDiagram.d.ts +2 -0
  183. data/assets/mermaid/diagrams/sequence/sequenceRenderer.d.ts +202 -0
  184. data/assets/mermaid/diagrams/sequence/styles.d.ts +2 -0
  185. data/assets/mermaid/diagrams/sequence/svgDraw.d.ts +73 -0
  186. data/assets/mermaid/diagrams/state/id-cache.d.ts +11 -0
  187. data/assets/mermaid/diagrams/state/shapes.d.ts +14 -0
  188. data/assets/mermaid/diagrams/state/stateCommon.d.ts +22 -0
  189. data/assets/mermaid/diagrams/state/stateDb.d.ts +91 -0
  190. data/assets/mermaid/diagrams/state/stateDetector-V2.d.ts +3 -0
  191. data/assets/mermaid/diagrams/state/stateDetector.d.ts +3 -0
  192. data/assets/mermaid/diagrams/state/stateDiagram-v2.d.ts +2 -0
  193. data/assets/mermaid/diagrams/state/stateDiagram.d.ts +2 -0
  194. data/assets/mermaid/diagrams/state/stateRenderer-v2.d.ts +20 -0
  195. data/assets/mermaid/diagrams/state/stateRenderer.d.ts +7 -0
  196. data/assets/mermaid/diagrams/state/styles.d.ts +2 -0
  197. data/assets/mermaid/diagrams/timeline/detector.d.ts +3 -0
  198. data/assets/mermaid/diagrams/timeline/styles.d.ts +2 -0
  199. data/assets/mermaid/diagrams/timeline/svgDraw.d.ts +46 -0
  200. data/assets/mermaid/diagrams/timeline/timeline-definition.d.ts +10 -0
  201. data/assets/mermaid/diagrams/timeline/timelineDb.d.ts +20 -0
  202. data/assets/mermaid/diagrams/timeline/timelineRenderer.d.ts +19 -0
  203. data/assets/mermaid/diagrams/user-journey/journeyDb.d.ts +30 -0
  204. data/assets/mermaid/diagrams/user-journey/journeyDetector.d.ts +3 -0
  205. data/assets/mermaid/diagrams/user-journey/journeyDiagram.d.ts +2 -0
  206. data/assets/mermaid/diagrams/user-journey/journeyRenderer.d.ts +30 -0
  207. data/assets/mermaid/diagrams/user-journey/styles.d.ts +2 -0
  208. data/assets/mermaid/diagrams/user-journey/svgDraw.d.ts +20 -0
  209. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/bandAxis.d.ts +12 -0
  210. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/baseAxis.d.ts +38 -0
  211. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/index.d.ts +12 -0
  212. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/linearAxis.d.ts +11 -0
  213. data/assets/mermaid/diagrams/xychart/chartBuilder/components/chartTitle.d.ts +16 -0
  214. data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/barPlot.d.ts +12 -0
  215. data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/index.d.ts +20 -0
  216. data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/linePlot.d.ts +11 -0
  217. data/assets/mermaid/diagrams/xychart/chartBuilder/index.d.ts +5 -0
  218. data/assets/mermaid/diagrams/xychart/chartBuilder/interfaces.d.ts +132 -0
  219. data/assets/mermaid/diagrams/xychart/chartBuilder/orchestrator.d.ts +12 -0
  220. data/assets/mermaid/diagrams/xychart/chartBuilder/textDimensionCalculator.d.ts +10 -0
  221. data/assets/mermaid/diagrams/xychart/parser/xychart.jison.spec.d.ts +1 -0
  222. data/assets/mermaid/diagrams/xychart/xychartDb.d.ts +40 -0
  223. data/assets/mermaid/diagrams/xychart/xychartDetector.d.ts +3 -0
  224. data/assets/mermaid/diagrams/xychart/xychartDiagram.d.ts +2 -0
  225. data/assets/mermaid/diagrams/xychart/xychartRenderer.d.ts +6 -0
  226. data/assets/mermaid/docs/vite.config.d.ts +2 -0
  227. data/assets/mermaid/edges-066a5561.js +1840 -0
  228. data/assets/mermaid/edges-16357fde.js +1083 -0
  229. data/assets/mermaid/edges-ce5cfb7c.js +1840 -0
  230. data/assets/mermaid/erDiagram-09d1c15f.js +1176 -0
  231. data/assets/mermaid/erDiagram-543717f2.js +1321 -0
  232. data/assets/mermaid/erDiagram-c7ff1bec.js +931 -0
  233. data/assets/mermaid/errors.d.ts +3 -0
  234. data/assets/mermaid/flowDb-9a89ea33.js +1126 -0
  235. data/assets/mermaid/flowDb-ba9bd7fa.js +1713 -0
  236. data/assets/mermaid/flowDb-c1833063.js +1714 -0
  237. data/assets/mermaid/flowDiagram-aadb13b0.js +797 -0
  238. data/assets/mermaid/flowDiagram-b222e15a.js +614 -0
  239. data/assets/mermaid/flowDiagram-b5e7ba30.js +1278 -0
  240. data/assets/mermaid/flowDiagram-v2-13329dc7.js +40 -0
  241. data/assets/mermaid/flowDiagram-v2-54711e03.js +32 -0
  242. data/assets/mermaid/flowDiagram-v2-f2119625.js +25 -0
  243. data/assets/mermaid/flowchart-elk-definition-2d49707c.js +93397 -0
  244. data/assets/mermaid/flowchart-elk-definition-ae0efee6.js +814 -0
  245. data/assets/mermaid/flowchart-elk-definition-cf813a97.js +48407 -0
  246. data/assets/mermaid/ganttDiagram-12cf43db.js +3445 -0
  247. data/assets/mermaid/ganttDiagram-3c2fde2b.js +2501 -0
  248. data/assets/mermaid/ganttDiagram-b62c793e.js +2061 -0
  249. data/assets/mermaid/gitGraphDiagram-942e62fe.js +1800 -0
  250. data/assets/mermaid/gitGraphDiagram-b9392a12.js +1790 -0
  251. data/assets/mermaid/gitGraphDiagram-c3a0619c.js +1264 -0
  252. data/assets/mermaid/graph-0ee63739.js +881 -0
  253. data/assets/mermaid/graph-fe24fab6.js +1285 -0
  254. data/assets/mermaid/index-01f381cb.js +622 -0
  255. data/assets/mermaid/index-bb6d8841.js +373 -0
  256. data/assets/mermaid/index-fc479858.js +663 -0
  257. data/assets/mermaid/infoDiagram-2f5c50c0.js +319 -0
  258. data/assets/mermaid/infoDiagram-94cd232f.js +520 -0
  259. data/assets/mermaid/infoDiagram-d0d5c9bd.js +510 -0
  260. data/assets/mermaid/init-cc95ec8e.js +16 -0
  261. data/assets/mermaid/init-f9637058.js +16 -0
  262. data/assets/mermaid/interactionDb.d.ts +2 -0
  263. data/assets/mermaid/journeyDiagram-14fe341a.js +804 -0
  264. data/assets/mermaid/journeyDiagram-6625b456.js +1191 -0
  265. data/assets/mermaid/journeyDiagram-b56e6921.js +1183 -0
  266. data/assets/mermaid/katex-d90b6d29.js +11624 -0
  267. data/assets/mermaid/katex-ffb0e8f1.js +14432 -0
  268. data/assets/mermaid/layout-163b9689.js +2314 -0
  269. data/assets/mermaid/layout-fd473db2.js +1536 -0
  270. data/assets/mermaid/line-24d93f1b.js +34 -0
  271. data/assets/mermaid/line-87f517ef.js +50 -0
  272. data/assets/mermaid/linear-0ad15847.js +595 -0
  273. data/assets/mermaid/linear-9bcf74c4.js +447 -0
  274. data/assets/mermaid/logger.d.ts +9 -0
  275. data/assets/mermaid/mermaid-6dc72991.js +6461 -0
  276. data/assets/mermaid/mermaid-9f2aa176.js +8112 -0
  277. data/assets/mermaid/mermaid-dcacb631.js +12793 -0
  278. data/assets/mermaid/mermaid.core.mjs +14 -0
  279. data/assets/mermaid/mermaid.d.ts +146 -0
  280. data/assets/mermaid/mermaid.esm.min.mjs +4 -0
  281. data/assets/mermaid/mermaid.esm.mjs +4 -0
  282. data/assets/mermaid/mermaid.js +195755 -0
  283. data/assets/mermaid/mermaid.min.js +2029 -0
  284. data/assets/mermaid/mermaid.spec.d.ts +1 -0
  285. data/assets/mermaid/mermaidAPI.d.ts +170 -0
  286. data/assets/mermaid/mermaidAPI.spec.d.ts +1 -0
  287. data/assets/mermaid/mindmap-definition-307c710a.js +1177 -0
  288. data/assets/mermaid/mindmap-definition-696ddea4.js +32342 -0
  289. data/assets/mermaid/mindmap-definition-9399c7e6.js +18760 -0
  290. data/assets/mermaid/ordinal-475e0c0c.js +82 -0
  291. data/assets/mermaid/ordinal-5695958c.js +65 -0
  292. data/assets/mermaid/path-39bad7e2.js +118 -0
  293. data/assets/mermaid/path-428ebac9.js +91 -0
  294. data/assets/mermaid/pieDiagram-828dae43.js +502 -0
  295. data/assets/mermaid/pieDiagram-bb1d19e5.js +722 -0
  296. data/assets/mermaid/pieDiagram-e854eaf0.js +772 -0
  297. data/assets/mermaid/preprocess.d.ts +10 -0
  298. data/assets/mermaid/quadrantDiagram-25a9848b.js +1199 -0
  299. data/assets/mermaid/quadrantDiagram-5fa00455.js +904 -0
  300. data/assets/mermaid/quadrantDiagram-c759a472.js +1207 -0
  301. data/assets/mermaid/rendering-util/createText.d.ts +11 -0
  302. data/assets/mermaid/rendering-util/handle-markdown-text.d.ts +6 -0
  303. data/assets/mermaid/rendering-util/handle-markdown-text.spec.d.ts +1 -0
  304. data/assets/mermaid/rendering-util/selectSvgElement.d.ts +8 -0
  305. data/assets/mermaid/rendering-util/splitText.d.ts +24 -0
  306. data/assets/mermaid/rendering-util/splitText.spec.d.ts +1 -0
  307. data/assets/mermaid/rendering-util/uid.d.ts +8 -0
  308. data/assets/mermaid/requirementDiagram-03163dc4.js +769 -0
  309. data/assets/mermaid/requirementDiagram-87253d64.js +1098 -0
  310. data/assets/mermaid/requirementDiagram-a721e157.js +1091 -0
  311. data/assets/mermaid/sankeyDiagram-33525efb.js +1198 -0
  312. data/assets/mermaid/sankeyDiagram-52ec8976.js +818 -0
  313. data/assets/mermaid/sankeyDiagram-707fac0f.js +660 -0
  314. data/assets/mermaid/sequenceDiagram-6894f283.js +3346 -0
  315. data/assets/mermaid/sequenceDiagram-9813c129.js +3336 -0
  316. data/assets/mermaid/sequenceDiagram-b517d154.js +2234 -0
  317. data/assets/mermaid/setupGraphViewbox.d.ts +3 -0
  318. data/assets/mermaid/stateDiagram-5dee940d.js +474 -0
  319. data/assets/mermaid/stateDiagram-5ec31577.js +467 -0
  320. data/assets/mermaid/stateDiagram-fca82b5b.js +275 -0
  321. data/assets/mermaid/stateDiagram-v2-1992cada.js +333 -0
  322. data/assets/mermaid/stateDiagram-v2-992e82a1.js +325 -0
  323. data/assets/mermaid/stateDiagram-v2-ed04200a.js +190 -0
  324. data/assets/mermaid/styles-0784dbeb.js +1363 -0
  325. data/assets/mermaid/styles-11e81fdd.js +1089 -0
  326. data/assets/mermaid/styles-36a1a2e8.js +1483 -0
  327. data/assets/mermaid/styles-483fbfea.js +509 -0
  328. data/assets/mermaid/styles-727cdd61.js +571 -0
  329. data/assets/mermaid/styles-b83b31c9.js +1484 -0
  330. data/assets/mermaid/styles-cacbff60.js +960 -0
  331. data/assets/mermaid/styles-e75131e4.js +433 -0
  332. data/assets/mermaid/styles-f80da881.js +1363 -0
  333. data/assets/mermaid/styles.d.ts +12 -0
  334. data/assets/mermaid/styles.spec.d.ts +1 -0
  335. data/assets/mermaid/svgDrawCommon-5e1cfd1d.js +101 -0
  336. data/assets/mermaid/svgDrawCommon-d6ab583c.js +100 -0
  337. data/assets/mermaid/svgDrawCommon-ecc5f780.js +64 -0
  338. data/assets/mermaid/tests/MockedD3.d.ts +45 -0
  339. data/assets/mermaid/tests/setup.d.ts +1 -0
  340. data/assets/mermaid/tests/util.d.ts +3 -0
  341. data/assets/mermaid/themes/erDiagram-oldHardcodedValues.d.ts +7 -0
  342. data/assets/mermaid/themes/index.d.ts +24 -0
  343. data/assets/mermaid/themes/theme-base.d.ts +189 -0
  344. data/assets/mermaid/themes/theme-dark.d.ts +177 -0
  345. data/assets/mermaid/themes/theme-default.d.ts +188 -0
  346. data/assets/mermaid/themes/theme-forest.d.ts +185 -0
  347. data/assets/mermaid/themes/theme-helpers.d.ts +1 -0
  348. data/assets/mermaid/themes/theme-neutral.d.ts +182 -0
  349. data/assets/mermaid/timeline-definition-23ce0e2e.js +1211 -0
  350. data/assets/mermaid/timeline-definition-4ee9bff4.js +795 -0
  351. data/assets/mermaid/timeline-definition-bf702344.js +1219 -0
  352. data/assets/mermaid/types.d.ts +31 -0
  353. data/assets/mermaid/utils/imperativeState.d.ts +32 -0
  354. data/assets/mermaid/utils/imperativeState.spec.d.ts +1 -0
  355. data/assets/mermaid/utils/lineWithOffset.d.ts +5 -0
  356. data/assets/mermaid/utils/sanitizeDirective.d.ts +7 -0
  357. data/assets/mermaid/utils/subGraphTitleMargins.d.ts +8 -0
  358. data/assets/mermaid/utils/subGraphTitleMargins.spec.d.ts +1 -0
  359. data/assets/mermaid/utils.d.ts +286 -0
  360. data/assets/mermaid/utils.spec.d.ts +1 -0
  361. data/assets/mermaid/xychartDiagram-de2e5521.js +1800 -0
  362. data/assets/mermaid/xychartDiagram-e5e6b652.js +1284 -0
  363. data/assets/mermaid/xychartDiagram-f11f50a6.js +1745 -0
  364. data/assets/tables.css +23 -0
  365. data/assets/toURI.js +142 -0
  366. metadata +363 -2
@@ -0,0 +1,1363 @@
1
+ import { c as getConfig, g as getAccTitle, s as setAccTitle, a as getAccDescription, b as setAccDescription, q as setDiagramTitle, t as getDiagramTitle, l as log, e as common, v as clear$1, I as generateId } from "./mermaid-6dc72991.js";
2
+ var parser = function() {
3
+ var o = function(k, v, o2, l) {
4
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
5
+ ;
6
+ return o2;
7
+ }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 15], $V7 = [1, 16], $V8 = [1, 17], $V9 = [1, 18], $Va = [1, 30], $Vb = [1, 19], $Vc = [1, 20], $Vd = [1, 21], $Ve = [1, 22], $Vf = [1, 23], $Vg = [1, 25], $Vh = [1, 26], $Vi = [1, 27], $Vj = [1, 28], $Vk = [1, 29], $Vl = [1, 32], $Vm = [1, 33], $Vn = [1, 34], $Vo = [1, 35], $Vp = [1, 31], $Vq = [1, 4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vr = [1, 4, 5, 13, 14, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vs = [4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50];
8
+ var parser2 = {
9
+ trace: function trace() {
10
+ },
11
+ yy: {},
12
+ symbols_: { "error": 2, "start": 3, "SPACE": 4, "NL": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "classDefStatement": 10, "cssClassStatement": 11, "idStatement": 12, "DESCR": 13, "-->": 14, "HIDE_EMPTY": 15, "scale": 16, "WIDTH": 17, "COMPOSIT_STATE": 18, "STRUCT_START": 19, "STRUCT_STOP": 20, "STATE_DESCR": 21, "AS": 22, "ID": 23, "FORK": 24, "JOIN": 25, "CHOICE": 26, "CONCURRENT": 27, "note": 28, "notePosition": 29, "NOTE_TEXT": 30, "direction": 31, "acc_title": 32, "acc_title_value": 33, "acc_descr": 34, "acc_descr_value": 35, "acc_descr_multiline_value": 36, "classDef": 37, "CLASSDEF_ID": 38, "CLASSDEF_STYLEOPTS": 39, "DEFAULT": 40, "class": 41, "CLASSENTITY_IDS": 42, "STYLECLASS": 43, "direction_tb": 44, "direction_bt": 45, "direction_rl": 46, "direction_lr": 47, "eol": 48, ";": 49, "EDGE_STATE": 50, "STYLE_SEPARATOR": 51, "left_of": 52, "right_of": 53, "$accept": 0, "$end": 1 },
13
+ terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 13: "DESCR", 14: "-->", 15: "HIDE_EMPTY", 16: "scale", 17: "WIDTH", 18: "COMPOSIT_STATE", 19: "STRUCT_START", 20: "STRUCT_STOP", 21: "STATE_DESCR", 22: "AS", 23: "ID", 24: "FORK", 25: "JOIN", 26: "CHOICE", 27: "CONCURRENT", 28: "note", 30: "NOTE_TEXT", 32: "acc_title", 33: "acc_title_value", 34: "acc_descr", 35: "acc_descr_value", 36: "acc_descr_multiline_value", 37: "classDef", 38: "CLASSDEF_ID", 39: "CLASSDEF_STYLEOPTS", 40: "DEFAULT", 41: "class", 42: "CLASSENTITY_IDS", 43: "STYLECLASS", 44: "direction_tb", 45: "direction_bt", 46: "direction_rl", 47: "direction_lr", 49: ";", 50: "EDGE_STATE", 51: "STYLE_SEPARATOR", 52: "left_of", 53: "right_of" },
14
+ productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [10, 3], [10, 3], [11, 3], [31, 1], [31, 1], [31, 1], [31, 1], [48, 1], [48, 1], [12, 1], [12, 1], [12, 3], [12, 3], [29, 1], [29, 1]],
15
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
16
+ var $0 = $$.length - 1;
17
+ switch (yystate) {
18
+ case 3:
19
+ yy.setRootDoc($$[$0]);
20
+ return $$[$0];
21
+ case 4:
22
+ this.$ = [];
23
+ break;
24
+ case 5:
25
+ if ($$[$0] != "nl") {
26
+ $$[$0 - 1].push($$[$0]);
27
+ this.$ = $$[$0 - 1];
28
+ }
29
+ break;
30
+ case 6:
31
+ case 7:
32
+ this.$ = $$[$0];
33
+ break;
34
+ case 8:
35
+ this.$ = "nl";
36
+ break;
37
+ case 11:
38
+ this.$ = $$[$0];
39
+ break;
40
+ case 12:
41
+ const stateStmt = $$[$0 - 1];
42
+ stateStmt.description = yy.trimColon($$[$0]);
43
+ this.$ = stateStmt;
44
+ break;
45
+ case 13:
46
+ this.$ = { stmt: "relation", state1: $$[$0 - 2], state2: $$[$0] };
47
+ break;
48
+ case 14:
49
+ const relDescription = yy.trimColon($$[$0]);
50
+ this.$ = { stmt: "relation", state1: $$[$0 - 3], state2: $$[$0 - 1], description: relDescription };
51
+ break;
52
+ case 18:
53
+ this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: "", doc: $$[$0 - 1] };
54
+ break;
55
+ case 19:
56
+ var id = $$[$0];
57
+ var description = $$[$0 - 2].trim();
58
+ if ($$[$0].match(":")) {
59
+ var parts = $$[$0].split(":");
60
+ id = parts[0];
61
+ description = [description, parts[1]];
62
+ }
63
+ this.$ = { stmt: "state", id, type: "default", description };
64
+ break;
65
+ case 20:
66
+ this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: $$[$0 - 5], doc: $$[$0 - 1] };
67
+ break;
68
+ case 21:
69
+ this.$ = { stmt: "state", id: $$[$0], type: "fork" };
70
+ break;
71
+ case 22:
72
+ this.$ = { stmt: "state", id: $$[$0], type: "join" };
73
+ break;
74
+ case 23:
75
+ this.$ = { stmt: "state", id: $$[$0], type: "choice" };
76
+ break;
77
+ case 24:
78
+ this.$ = { stmt: "state", id: yy.getDividerId(), type: "divider" };
79
+ break;
80
+ case 25:
81
+ this.$ = { stmt: "state", id: $$[$0 - 1].trim(), note: { position: $$[$0 - 2].trim(), text: $$[$0].trim() } };
82
+ break;
83
+ case 28:
84
+ this.$ = $$[$0].trim();
85
+ yy.setAccTitle(this.$);
86
+ break;
87
+ case 29:
88
+ case 30:
89
+ this.$ = $$[$0].trim();
90
+ yy.setAccDescription(this.$);
91
+ break;
92
+ case 31:
93
+ case 32:
94
+ this.$ = { stmt: "classDef", id: $$[$0 - 1].trim(), classes: $$[$0].trim() };
95
+ break;
96
+ case 33:
97
+ this.$ = { stmt: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() };
98
+ break;
99
+ case 34:
100
+ yy.setDirection("TB");
101
+ this.$ = { stmt: "dir", value: "TB" };
102
+ break;
103
+ case 35:
104
+ yy.setDirection("BT");
105
+ this.$ = { stmt: "dir", value: "BT" };
106
+ break;
107
+ case 36:
108
+ yy.setDirection("RL");
109
+ this.$ = { stmt: "dir", value: "RL" };
110
+ break;
111
+ case 37:
112
+ yy.setDirection("LR");
113
+ this.$ = { stmt: "dir", value: "LR" };
114
+ break;
115
+ case 40:
116
+ case 41:
117
+ this.$ = { stmt: "state", id: $$[$0].trim(), type: "default", description: "" };
118
+ break;
119
+ case 42:
120
+ this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" };
121
+ break;
122
+ case 43:
123
+ this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" };
124
+ break;
125
+ }
126
+ },
127
+ table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 15, 16, 18, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 5]), { 9: 36, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 7]), o($Vq, [2, 8]), o($Vq, [2, 9]), o($Vq, [2, 10]), o($Vq, [2, 11], { 13: [1, 37], 14: [1, 38] }), o($Vq, [2, 15]), { 17: [1, 39] }, o($Vq, [2, 17], { 19: [1, 40] }), { 22: [1, 41] }, o($Vq, [2, 21]), o($Vq, [2, 22]), o($Vq, [2, 23]), o($Vq, [2, 24]), { 29: 42, 30: [1, 43], 52: [1, 44], 53: [1, 45] }, o($Vq, [2, 27]), { 33: [1, 46] }, { 35: [1, 47] }, o($Vq, [2, 30]), { 38: [1, 48], 40: [1, 49] }, { 42: [1, 50] }, o($Vr, [2, 40], { 51: [1, 51] }), o($Vr, [2, 41], { 51: [1, 52] }), o($Vq, [2, 34]), o($Vq, [2, 35]), o($Vq, [2, 36]), o($Vq, [2, 37]), o($Vq, [2, 6]), o($Vq, [2, 12]), { 12: 53, 23: $Va, 50: $Vp }, o($Vq, [2, 16]), o($Vs, $V3, { 7: 54 }), { 23: [1, 55] }, { 23: [1, 56] }, { 22: [1, 57] }, { 23: [2, 44] }, { 23: [2, 45] }, o($Vq, [2, 28]), o($Vq, [2, 29]), { 39: [1, 58] }, { 39: [1, 59] }, { 43: [1, 60] }, { 23: [1, 61] }, { 23: [1, 62] }, o($Vq, [2, 13], { 13: [1, 63] }), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 64], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 19], { 19: [1, 65] }), { 30: [1, 66] }, { 23: [1, 67] }, o($Vq, [2, 31]), o($Vq, [2, 32]), o($Vq, [2, 33]), o($Vr, [2, 42]), o($Vr, [2, 43]), o($Vq, [2, 14]), o($Vq, [2, 18]), o($Vs, $V3, { 7: 68 }), o($Vq, [2, 25]), o($Vq, [2, 26]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 69], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 20])],
128
+ defaultActions: { 5: [2, 1], 6: [2, 2], 44: [2, 44], 45: [2, 45] },
129
+ parseError: function parseError(str, hash) {
130
+ if (hash.recoverable) {
131
+ this.trace(str);
132
+ } else {
133
+ var error = new Error(str);
134
+ error.hash = hash;
135
+ throw error;
136
+ }
137
+ },
138
+ parse: function parse(input) {
139
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
140
+ var args = lstack.slice.call(arguments, 1);
141
+ var lexer2 = Object.create(this.lexer);
142
+ var sharedState = { yy: {} };
143
+ for (var k in this.yy) {
144
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
145
+ sharedState.yy[k] = this.yy[k];
146
+ }
147
+ }
148
+ lexer2.setInput(input, sharedState.yy);
149
+ sharedState.yy.lexer = lexer2;
150
+ sharedState.yy.parser = this;
151
+ if (typeof lexer2.yylloc == "undefined") {
152
+ lexer2.yylloc = {};
153
+ }
154
+ var yyloc = lexer2.yylloc;
155
+ lstack.push(yyloc);
156
+ var ranges = lexer2.options && lexer2.options.ranges;
157
+ if (typeof sharedState.yy.parseError === "function") {
158
+ this.parseError = sharedState.yy.parseError;
159
+ } else {
160
+ this.parseError = Object.getPrototypeOf(this).parseError;
161
+ }
162
+ function lex() {
163
+ var token;
164
+ token = tstack.pop() || lexer2.lex() || EOF;
165
+ if (typeof token !== "number") {
166
+ if (token instanceof Array) {
167
+ tstack = token;
168
+ token = tstack.pop();
169
+ }
170
+ token = self.symbols_[token] || token;
171
+ }
172
+ return token;
173
+ }
174
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
175
+ while (true) {
176
+ state = stack[stack.length - 1];
177
+ if (this.defaultActions[state]) {
178
+ action = this.defaultActions[state];
179
+ } else {
180
+ if (symbol === null || typeof symbol == "undefined") {
181
+ symbol = lex();
182
+ }
183
+ action = table[state] && table[state][symbol];
184
+ }
185
+ if (typeof action === "undefined" || !action.length || !action[0]) {
186
+ var errStr = "";
187
+ expected = [];
188
+ for (p in table[state]) {
189
+ if (this.terminals_[p] && p > TERROR) {
190
+ expected.push("'" + this.terminals_[p] + "'");
191
+ }
192
+ }
193
+ if (lexer2.showPosition) {
194
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
195
+ } else {
196
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
197
+ }
198
+ this.parseError(errStr, {
199
+ text: lexer2.match,
200
+ token: this.terminals_[symbol] || symbol,
201
+ line: lexer2.yylineno,
202
+ loc: yyloc,
203
+ expected
204
+ });
205
+ }
206
+ if (action[0] instanceof Array && action.length > 1) {
207
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
208
+ }
209
+ switch (action[0]) {
210
+ case 1:
211
+ stack.push(symbol);
212
+ vstack.push(lexer2.yytext);
213
+ lstack.push(lexer2.yylloc);
214
+ stack.push(action[1]);
215
+ symbol = null;
216
+ {
217
+ yyleng = lexer2.yyleng;
218
+ yytext = lexer2.yytext;
219
+ yylineno = lexer2.yylineno;
220
+ yyloc = lexer2.yylloc;
221
+ }
222
+ break;
223
+ case 2:
224
+ len = this.productions_[action[1]][1];
225
+ yyval.$ = vstack[vstack.length - len];
226
+ yyval._$ = {
227
+ first_line: lstack[lstack.length - (len || 1)].first_line,
228
+ last_line: lstack[lstack.length - 1].last_line,
229
+ first_column: lstack[lstack.length - (len || 1)].first_column,
230
+ last_column: lstack[lstack.length - 1].last_column
231
+ };
232
+ if (ranges) {
233
+ yyval._$.range = [
234
+ lstack[lstack.length - (len || 1)].range[0],
235
+ lstack[lstack.length - 1].range[1]
236
+ ];
237
+ }
238
+ r = this.performAction.apply(yyval, [
239
+ yytext,
240
+ yyleng,
241
+ yylineno,
242
+ sharedState.yy,
243
+ action[1],
244
+ vstack,
245
+ lstack
246
+ ].concat(args));
247
+ if (typeof r !== "undefined") {
248
+ return r;
249
+ }
250
+ if (len) {
251
+ stack = stack.slice(0, -1 * len * 2);
252
+ vstack = vstack.slice(0, -1 * len);
253
+ lstack = lstack.slice(0, -1 * len);
254
+ }
255
+ stack.push(this.productions_[action[1]][0]);
256
+ vstack.push(yyval.$);
257
+ lstack.push(yyval._$);
258
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
259
+ stack.push(newState);
260
+ break;
261
+ case 3:
262
+ return true;
263
+ }
264
+ }
265
+ return true;
266
+ }
267
+ };
268
+ var lexer = function() {
269
+ var lexer2 = {
270
+ EOF: 1,
271
+ parseError: function parseError(str, hash) {
272
+ if (this.yy.parser) {
273
+ this.yy.parser.parseError(str, hash);
274
+ } else {
275
+ throw new Error(str);
276
+ }
277
+ },
278
+ // resets the lexer, sets new input
279
+ setInput: function(input, yy) {
280
+ this.yy = yy || this.yy || {};
281
+ this._input = input;
282
+ this._more = this._backtrack = this.done = false;
283
+ this.yylineno = this.yyleng = 0;
284
+ this.yytext = this.matched = this.match = "";
285
+ this.conditionStack = ["INITIAL"];
286
+ this.yylloc = {
287
+ first_line: 1,
288
+ first_column: 0,
289
+ last_line: 1,
290
+ last_column: 0
291
+ };
292
+ if (this.options.ranges) {
293
+ this.yylloc.range = [0, 0];
294
+ }
295
+ this.offset = 0;
296
+ return this;
297
+ },
298
+ // consumes and returns one char from the input
299
+ input: function() {
300
+ var ch = this._input[0];
301
+ this.yytext += ch;
302
+ this.yyleng++;
303
+ this.offset++;
304
+ this.match += ch;
305
+ this.matched += ch;
306
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
307
+ if (lines) {
308
+ this.yylineno++;
309
+ this.yylloc.last_line++;
310
+ } else {
311
+ this.yylloc.last_column++;
312
+ }
313
+ if (this.options.ranges) {
314
+ this.yylloc.range[1]++;
315
+ }
316
+ this._input = this._input.slice(1);
317
+ return ch;
318
+ },
319
+ // unshifts one char (or a string) into the input
320
+ unput: function(ch) {
321
+ var len = ch.length;
322
+ var lines = ch.split(/(?:\r\n?|\n)/g);
323
+ this._input = ch + this._input;
324
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
325
+ this.offset -= len;
326
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
327
+ this.match = this.match.substr(0, this.match.length - 1);
328
+ this.matched = this.matched.substr(0, this.matched.length - 1);
329
+ if (lines.length - 1) {
330
+ this.yylineno -= lines.length - 1;
331
+ }
332
+ var r = this.yylloc.range;
333
+ this.yylloc = {
334
+ first_line: this.yylloc.first_line,
335
+ last_line: this.yylineno + 1,
336
+ first_column: this.yylloc.first_column,
337
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
338
+ };
339
+ if (this.options.ranges) {
340
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
341
+ }
342
+ this.yyleng = this.yytext.length;
343
+ return this;
344
+ },
345
+ // When called from action, caches matched text and appends it on next action
346
+ more: function() {
347
+ this._more = true;
348
+ return this;
349
+ },
350
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
351
+ reject: function() {
352
+ if (this.options.backtrack_lexer) {
353
+ this._backtrack = true;
354
+ } else {
355
+ 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).\n" + this.showPosition(), {
356
+ text: "",
357
+ token: null,
358
+ line: this.yylineno
359
+ });
360
+ }
361
+ return this;
362
+ },
363
+ // retain first n characters of the match
364
+ less: function(n) {
365
+ this.unput(this.match.slice(n));
366
+ },
367
+ // displays already matched input, i.e. for error messages
368
+ pastInput: function() {
369
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
370
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
371
+ },
372
+ // displays upcoming input, i.e. for error messages
373
+ upcomingInput: function() {
374
+ var next = this.match;
375
+ if (next.length < 20) {
376
+ next += this._input.substr(0, 20 - next.length);
377
+ }
378
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
379
+ },
380
+ // displays the character position where the lexing error occurred, i.e. for error messages
381
+ showPosition: function() {
382
+ var pre = this.pastInput();
383
+ var c = new Array(pre.length + 1).join("-");
384
+ return pre + this.upcomingInput() + "\n" + c + "^";
385
+ },
386
+ // test the lexed token: return FALSE when not a match, otherwise return token
387
+ test_match: function(match, indexed_rule) {
388
+ var token, lines, backup;
389
+ if (this.options.backtrack_lexer) {
390
+ backup = {
391
+ yylineno: this.yylineno,
392
+ yylloc: {
393
+ first_line: this.yylloc.first_line,
394
+ last_line: this.last_line,
395
+ first_column: this.yylloc.first_column,
396
+ last_column: this.yylloc.last_column
397
+ },
398
+ yytext: this.yytext,
399
+ match: this.match,
400
+ matches: this.matches,
401
+ matched: this.matched,
402
+ yyleng: this.yyleng,
403
+ offset: this.offset,
404
+ _more: this._more,
405
+ _input: this._input,
406
+ yy: this.yy,
407
+ conditionStack: this.conditionStack.slice(0),
408
+ done: this.done
409
+ };
410
+ if (this.options.ranges) {
411
+ backup.yylloc.range = this.yylloc.range.slice(0);
412
+ }
413
+ }
414
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
415
+ if (lines) {
416
+ this.yylineno += lines.length;
417
+ }
418
+ this.yylloc = {
419
+ first_line: this.yylloc.last_line,
420
+ last_line: this.yylineno + 1,
421
+ first_column: this.yylloc.last_column,
422
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
423
+ };
424
+ this.yytext += match[0];
425
+ this.match += match[0];
426
+ this.matches = match;
427
+ this.yyleng = this.yytext.length;
428
+ if (this.options.ranges) {
429
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
430
+ }
431
+ this._more = false;
432
+ this._backtrack = false;
433
+ this._input = this._input.slice(match[0].length);
434
+ this.matched += match[0];
435
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
436
+ if (this.done && this._input) {
437
+ this.done = false;
438
+ }
439
+ if (token) {
440
+ return token;
441
+ } else if (this._backtrack) {
442
+ for (var k in backup) {
443
+ this[k] = backup[k];
444
+ }
445
+ return false;
446
+ }
447
+ return false;
448
+ },
449
+ // return next match in input
450
+ next: function() {
451
+ if (this.done) {
452
+ return this.EOF;
453
+ }
454
+ if (!this._input) {
455
+ this.done = true;
456
+ }
457
+ var token, match, tempMatch, index;
458
+ if (!this._more) {
459
+ this.yytext = "";
460
+ this.match = "";
461
+ }
462
+ var rules = this._currentRules();
463
+ for (var i = 0; i < rules.length; i++) {
464
+ tempMatch = this._input.match(this.rules[rules[i]]);
465
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
466
+ match = tempMatch;
467
+ index = i;
468
+ if (this.options.backtrack_lexer) {
469
+ token = this.test_match(tempMatch, rules[i]);
470
+ if (token !== false) {
471
+ return token;
472
+ } else if (this._backtrack) {
473
+ match = false;
474
+ continue;
475
+ } else {
476
+ return false;
477
+ }
478
+ } else if (!this.options.flex) {
479
+ break;
480
+ }
481
+ }
482
+ }
483
+ if (match) {
484
+ token = this.test_match(match, rules[index]);
485
+ if (token !== false) {
486
+ return token;
487
+ }
488
+ return false;
489
+ }
490
+ if (this._input === "") {
491
+ return this.EOF;
492
+ } else {
493
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
494
+ text: "",
495
+ token: null,
496
+ line: this.yylineno
497
+ });
498
+ }
499
+ },
500
+ // return next match that has a token
501
+ lex: function lex() {
502
+ var r = this.next();
503
+ if (r) {
504
+ return r;
505
+ } else {
506
+ return this.lex();
507
+ }
508
+ },
509
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
510
+ begin: function begin(condition) {
511
+ this.conditionStack.push(condition);
512
+ },
513
+ // pop the previously active lexer condition state off the condition stack
514
+ popState: function popState() {
515
+ var n = this.conditionStack.length - 1;
516
+ if (n > 0) {
517
+ return this.conditionStack.pop();
518
+ } else {
519
+ return this.conditionStack[0];
520
+ }
521
+ },
522
+ // produce the lexer rule set which is active for the currently active lexer condition state
523
+ _currentRules: function _currentRules() {
524
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
525
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
526
+ } else {
527
+ return this.conditions["INITIAL"].rules;
528
+ }
529
+ },
530
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
531
+ topState: function topState(n) {
532
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
533
+ if (n >= 0) {
534
+ return this.conditionStack[n];
535
+ } else {
536
+ return "INITIAL";
537
+ }
538
+ },
539
+ // alias for begin(condition)
540
+ pushState: function pushState(condition) {
541
+ this.begin(condition);
542
+ },
543
+ // return the number of states currently on the stack
544
+ stateStackSize: function stateStackSize() {
545
+ return this.conditionStack.length;
546
+ },
547
+ options: { "case-insensitive": true },
548
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
549
+ switch ($avoiding_name_collisions) {
550
+ case 0:
551
+ return 40;
552
+ case 1:
553
+ return 44;
554
+ case 2:
555
+ return 45;
556
+ case 3:
557
+ return 46;
558
+ case 4:
559
+ return 47;
560
+ case 5:
561
+ break;
562
+ case 6:
563
+ break;
564
+ case 7:
565
+ return 5;
566
+ case 8:
567
+ break;
568
+ case 9:
569
+ break;
570
+ case 10:
571
+ break;
572
+ case 11:
573
+ break;
574
+ case 12:
575
+ this.pushState("SCALE");
576
+ return 16;
577
+ case 13:
578
+ return 17;
579
+ case 14:
580
+ this.popState();
581
+ break;
582
+ case 15:
583
+ this.begin("acc_title");
584
+ return 32;
585
+ case 16:
586
+ this.popState();
587
+ return "acc_title_value";
588
+ case 17:
589
+ this.begin("acc_descr");
590
+ return 34;
591
+ case 18:
592
+ this.popState();
593
+ return "acc_descr_value";
594
+ case 19:
595
+ this.begin("acc_descr_multiline");
596
+ break;
597
+ case 20:
598
+ this.popState();
599
+ break;
600
+ case 21:
601
+ return "acc_descr_multiline_value";
602
+ case 22:
603
+ this.pushState("CLASSDEF");
604
+ return 37;
605
+ case 23:
606
+ this.popState();
607
+ this.pushState("CLASSDEFID");
608
+ return "DEFAULT_CLASSDEF_ID";
609
+ case 24:
610
+ this.popState();
611
+ this.pushState("CLASSDEFID");
612
+ return 38;
613
+ case 25:
614
+ this.popState();
615
+ return 39;
616
+ case 26:
617
+ this.pushState("CLASS");
618
+ return 41;
619
+ case 27:
620
+ this.popState();
621
+ this.pushState("CLASS_STYLE");
622
+ return 42;
623
+ case 28:
624
+ this.popState();
625
+ return 43;
626
+ case 29:
627
+ this.pushState("SCALE");
628
+ return 16;
629
+ case 30:
630
+ return 17;
631
+ case 31:
632
+ this.popState();
633
+ break;
634
+ case 32:
635
+ this.pushState("STATE");
636
+ break;
637
+ case 33:
638
+ this.popState();
639
+ yy_.yytext = yy_.yytext.slice(0, -8).trim();
640
+ return 24;
641
+ case 34:
642
+ this.popState();
643
+ yy_.yytext = yy_.yytext.slice(0, -8).trim();
644
+ return 25;
645
+ case 35:
646
+ this.popState();
647
+ yy_.yytext = yy_.yytext.slice(0, -10).trim();
648
+ return 26;
649
+ case 36:
650
+ this.popState();
651
+ yy_.yytext = yy_.yytext.slice(0, -8).trim();
652
+ return 24;
653
+ case 37:
654
+ this.popState();
655
+ yy_.yytext = yy_.yytext.slice(0, -8).trim();
656
+ return 25;
657
+ case 38:
658
+ this.popState();
659
+ yy_.yytext = yy_.yytext.slice(0, -10).trim();
660
+ return 26;
661
+ case 39:
662
+ return 44;
663
+ case 40:
664
+ return 45;
665
+ case 41:
666
+ return 46;
667
+ case 42:
668
+ return 47;
669
+ case 43:
670
+ this.pushState("STATE_STRING");
671
+ break;
672
+ case 44:
673
+ this.pushState("STATE_ID");
674
+ return "AS";
675
+ case 45:
676
+ this.popState();
677
+ return "ID";
678
+ case 46:
679
+ this.popState();
680
+ break;
681
+ case 47:
682
+ return "STATE_DESCR";
683
+ case 48:
684
+ return 18;
685
+ case 49:
686
+ this.popState();
687
+ break;
688
+ case 50:
689
+ this.popState();
690
+ this.pushState("struct");
691
+ return 19;
692
+ case 51:
693
+ break;
694
+ case 52:
695
+ this.popState();
696
+ return 20;
697
+ case 53:
698
+ break;
699
+ case 54:
700
+ this.begin("NOTE");
701
+ return 28;
702
+ case 55:
703
+ this.popState();
704
+ this.pushState("NOTE_ID");
705
+ return 52;
706
+ case 56:
707
+ this.popState();
708
+ this.pushState("NOTE_ID");
709
+ return 53;
710
+ case 57:
711
+ this.popState();
712
+ this.pushState("FLOATING_NOTE");
713
+ break;
714
+ case 58:
715
+ this.popState();
716
+ this.pushState("FLOATING_NOTE_ID");
717
+ return "AS";
718
+ case 59:
719
+ break;
720
+ case 60:
721
+ return "NOTE_TEXT";
722
+ case 61:
723
+ this.popState();
724
+ return "ID";
725
+ case 62:
726
+ this.popState();
727
+ this.pushState("NOTE_TEXT");
728
+ return 23;
729
+ case 63:
730
+ this.popState();
731
+ yy_.yytext = yy_.yytext.substr(2).trim();
732
+ return 30;
733
+ case 64:
734
+ this.popState();
735
+ yy_.yytext = yy_.yytext.slice(0, -8).trim();
736
+ return 30;
737
+ case 65:
738
+ return 6;
739
+ case 66:
740
+ return 6;
741
+ case 67:
742
+ return 15;
743
+ case 68:
744
+ return 50;
745
+ case 69:
746
+ return 23;
747
+ case 70:
748
+ yy_.yytext = yy_.yytext.trim();
749
+ return 13;
750
+ case 71:
751
+ return 14;
752
+ case 72:
753
+ return 27;
754
+ case 73:
755
+ return 51;
756
+ case 74:
757
+ return 5;
758
+ case 75:
759
+ return "INVALID";
760
+ }
761
+ },
762
+ rules: [/^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<<fork>>)/i, /^(?:.*<<join>>)/i, /^(?:.*<<choice>>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i],
763
+ conditions: { "LINE": { "rules": [9, 10], "inclusive": false }, "struct": { "rules": [9, 10, 22, 26, 32, 39, 40, 41, 42, 51, 52, 53, 54, 68, 69, 70, 71, 72], "inclusive": false }, "FLOATING_NOTE_ID": { "rules": [61], "inclusive": false }, "FLOATING_NOTE": { "rules": [58, 59, 60], "inclusive": false }, "NOTE_TEXT": { "rules": [63, 64], "inclusive": false }, "NOTE_ID": { "rules": [62], "inclusive": false }, "NOTE": { "rules": [55, 56, 57], "inclusive": false }, "CLASS_STYLE": { "rules": [28], "inclusive": false }, "CLASS": { "rules": [27], "inclusive": false }, "CLASSDEFID": { "rules": [25], "inclusive": false }, "CLASSDEF": { "rules": [23, 24], "inclusive": false }, "acc_descr_multiline": { "rules": [20, 21], "inclusive": false }, "acc_descr": { "rules": [18], "inclusive": false }, "acc_title": { "rules": [16], "inclusive": false }, "SCALE": { "rules": [13, 14, 30, 31], "inclusive": false }, "ALIAS": { "rules": [], "inclusive": false }, "STATE_ID": { "rules": [45], "inclusive": false }, "STATE_STRING": { "rules": [46, 47], "inclusive": false }, "FORK_STATE": { "rules": [], "inclusive": false }, "STATE": { "rules": [9, 10, 33, 34, 35, 36, 37, 38, 43, 44, 48, 49, 50], "inclusive": false }, "ID": { "rules": [9, 10], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 17, 19, 22, 26, 29, 32, 50, 54, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75], "inclusive": true } }
764
+ };
765
+ return lexer2;
766
+ }();
767
+ parser2.lexer = lexer;
768
+ function Parser() {
769
+ this.yy = {};
770
+ }
771
+ Parser.prototype = parser2;
772
+ parser2.Parser = Parser;
773
+ return new Parser();
774
+ }();
775
+ parser.parser = parser;
776
+ const parser$1 = parser;
777
+ const DEFAULT_DIAGRAM_DIRECTION = "LR";
778
+ const DEFAULT_NESTED_DOC_DIR = "TB";
779
+ const STMT_STATE = "state";
780
+ const STMT_RELATION = "relation";
781
+ const STMT_CLASSDEF = "classDef";
782
+ const STMT_APPLYCLASS = "applyClass";
783
+ const DEFAULT_STATE_TYPE = "default";
784
+ const DIVIDER_TYPE = "divider";
785
+ const START_NODE = "[*]";
786
+ const START_TYPE = "start";
787
+ const END_NODE = START_NODE;
788
+ const END_TYPE = "end";
789
+ const COLOR_KEYWORD = "color";
790
+ const FILL_KEYWORD = "fill";
791
+ const BG_FILL = "bgFill";
792
+ const STYLECLASS_SEP = ",";
793
+ function newClassesList() {
794
+ return {};
795
+ }
796
+ let direction = DEFAULT_DIAGRAM_DIRECTION;
797
+ let rootDoc = [];
798
+ let classes = newClassesList();
799
+ const newDoc = () => {
800
+ return {
801
+ relations: [],
802
+ states: {},
803
+ documents: {}
804
+ };
805
+ };
806
+ let documents = {
807
+ root: newDoc()
808
+ };
809
+ let currentDocument = documents.root;
810
+ let startEndCount = 0;
811
+ let dividerCnt = 0;
812
+ const lineType = {
813
+ LINE: 0,
814
+ DOTTED_LINE: 1
815
+ };
816
+ const relationType = {
817
+ AGGREGATION: 0,
818
+ EXTENSION: 1,
819
+ COMPOSITION: 2,
820
+ DEPENDENCY: 3
821
+ };
822
+ const clone = (o) => JSON.parse(JSON.stringify(o));
823
+ const setRootDoc = (o) => {
824
+ log.info("Setting root doc", o);
825
+ rootDoc = o;
826
+ };
827
+ const getRootDoc = () => rootDoc;
828
+ const docTranslator = (parent, node, first) => {
829
+ if (node.stmt === STMT_RELATION) {
830
+ docTranslator(parent, node.state1, true);
831
+ docTranslator(parent, node.state2, false);
832
+ } else {
833
+ if (node.stmt === STMT_STATE) {
834
+ if (node.id === "[*]") {
835
+ node.id = first ? parent.id + "_start" : parent.id + "_end";
836
+ node.start = first;
837
+ } else {
838
+ node.id = node.id.trim();
839
+ }
840
+ }
841
+ if (node.doc) {
842
+ const doc = [];
843
+ let currentDoc = [];
844
+ let i;
845
+ for (i = 0; i < node.doc.length; i++) {
846
+ if (node.doc[i].type === DIVIDER_TYPE) {
847
+ const newNode = clone(node.doc[i]);
848
+ newNode.doc = clone(currentDoc);
849
+ doc.push(newNode);
850
+ currentDoc = [];
851
+ } else {
852
+ currentDoc.push(node.doc[i]);
853
+ }
854
+ }
855
+ if (doc.length > 0 && currentDoc.length > 0) {
856
+ const newNode = {
857
+ stmt: STMT_STATE,
858
+ id: generateId(),
859
+ type: "divider",
860
+ doc: clone(currentDoc)
861
+ };
862
+ doc.push(clone(newNode));
863
+ node.doc = doc;
864
+ }
865
+ node.doc.forEach((docNode) => docTranslator(node, docNode, true));
866
+ }
867
+ }
868
+ };
869
+ const getRootDocV2 = () => {
870
+ docTranslator({ id: "root" }, { id: "root", doc: rootDoc }, true);
871
+ return { id: "root", doc: rootDoc };
872
+ };
873
+ const extract = (_doc) => {
874
+ let doc;
875
+ if (_doc.doc) {
876
+ doc = _doc.doc;
877
+ } else {
878
+ doc = _doc;
879
+ }
880
+ log.info(doc);
881
+ clear(true);
882
+ log.info("Extract", doc);
883
+ doc.forEach((item) => {
884
+ switch (item.stmt) {
885
+ case STMT_STATE:
886
+ addState(
887
+ item.id.trim(),
888
+ item.type,
889
+ item.doc,
890
+ item.description,
891
+ item.note,
892
+ item.classes,
893
+ item.styles,
894
+ item.textStyles
895
+ );
896
+ break;
897
+ case STMT_RELATION:
898
+ addRelation(item.state1, item.state2, item.description);
899
+ break;
900
+ case STMT_CLASSDEF:
901
+ addStyleClass(item.id.trim(), item.classes);
902
+ break;
903
+ case STMT_APPLYCLASS:
904
+ setCssClass(item.id.trim(), item.styleClass);
905
+ break;
906
+ }
907
+ });
908
+ };
909
+ const addState = function(id, type = DEFAULT_STATE_TYPE, doc = null, descr = null, note = null, classes2 = null, styles2 = null, textStyles = null) {
910
+ const trimmedId = id == null ? void 0 : id.trim();
911
+ if (currentDocument.states[trimmedId] === void 0) {
912
+ log.info("Adding state ", trimmedId, descr);
913
+ currentDocument.states[trimmedId] = {
914
+ id: trimmedId,
915
+ descriptions: [],
916
+ type,
917
+ doc,
918
+ note,
919
+ classes: [],
920
+ styles: [],
921
+ textStyles: []
922
+ };
923
+ } else {
924
+ if (!currentDocument.states[trimmedId].doc) {
925
+ currentDocument.states[trimmedId].doc = doc;
926
+ }
927
+ if (!currentDocument.states[trimmedId].type) {
928
+ currentDocument.states[trimmedId].type = type;
929
+ }
930
+ }
931
+ if (descr) {
932
+ log.info("Setting state description", trimmedId, descr);
933
+ if (typeof descr === "string") {
934
+ addDescription(trimmedId, descr.trim());
935
+ }
936
+ if (typeof descr === "object") {
937
+ descr.forEach((des) => addDescription(trimmedId, des.trim()));
938
+ }
939
+ }
940
+ if (note) {
941
+ currentDocument.states[trimmedId].note = note;
942
+ currentDocument.states[trimmedId].note.text = common.sanitizeText(
943
+ currentDocument.states[trimmedId].note.text,
944
+ getConfig()
945
+ );
946
+ }
947
+ if (classes2) {
948
+ log.info("Setting state classes", trimmedId, classes2);
949
+ const classesList = typeof classes2 === "string" ? [classes2] : classes2;
950
+ classesList.forEach((cssClass) => setCssClass(trimmedId, cssClass.trim()));
951
+ }
952
+ if (styles2) {
953
+ log.info("Setting state styles", trimmedId, styles2);
954
+ const stylesList = typeof styles2 === "string" ? [styles2] : styles2;
955
+ stylesList.forEach((style) => setStyle(trimmedId, style.trim()));
956
+ }
957
+ if (textStyles) {
958
+ log.info("Setting state styles", trimmedId, styles2);
959
+ const textStylesList = typeof textStyles === "string" ? [textStyles] : textStyles;
960
+ textStylesList.forEach((textStyle) => setTextStyle(trimmedId, textStyle.trim()));
961
+ }
962
+ };
963
+ const clear = function(saveCommon) {
964
+ documents = {
965
+ root: newDoc()
966
+ };
967
+ currentDocument = documents.root;
968
+ startEndCount = 0;
969
+ classes = newClassesList();
970
+ if (!saveCommon) {
971
+ clear$1();
972
+ }
973
+ };
974
+ const getState = function(id) {
975
+ return currentDocument.states[id];
976
+ };
977
+ const getStates = function() {
978
+ return currentDocument.states;
979
+ };
980
+ const logDocuments = function() {
981
+ log.info("Documents = ", documents);
982
+ };
983
+ const getRelations = function() {
984
+ return currentDocument.relations;
985
+ };
986
+ function startIdIfNeeded(id = "") {
987
+ let fixedId = id;
988
+ if (id === START_NODE) {
989
+ startEndCount++;
990
+ fixedId = `${START_TYPE}${startEndCount}`;
991
+ }
992
+ return fixedId;
993
+ }
994
+ function startTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) {
995
+ return id === START_NODE ? START_TYPE : type;
996
+ }
997
+ function endIdIfNeeded(id = "") {
998
+ let fixedId = id;
999
+ if (id === END_NODE) {
1000
+ startEndCount++;
1001
+ fixedId = `${END_TYPE}${startEndCount}`;
1002
+ }
1003
+ return fixedId;
1004
+ }
1005
+ function endTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) {
1006
+ return id === END_NODE ? END_TYPE : type;
1007
+ }
1008
+ function addRelationObjs(item1, item2, relationTitle) {
1009
+ let id1 = startIdIfNeeded(item1.id.trim());
1010
+ let type1 = startTypeIfNeeded(item1.id.trim(), item1.type);
1011
+ let id2 = startIdIfNeeded(item2.id.trim());
1012
+ let type2 = startTypeIfNeeded(item2.id.trim(), item2.type);
1013
+ addState(
1014
+ id1,
1015
+ type1,
1016
+ item1.doc,
1017
+ item1.description,
1018
+ item1.note,
1019
+ item1.classes,
1020
+ item1.styles,
1021
+ item1.textStyles
1022
+ );
1023
+ addState(
1024
+ id2,
1025
+ type2,
1026
+ item2.doc,
1027
+ item2.description,
1028
+ item2.note,
1029
+ item2.classes,
1030
+ item2.styles,
1031
+ item2.textStyles
1032
+ );
1033
+ currentDocument.relations.push({
1034
+ id1,
1035
+ id2,
1036
+ relationTitle: common.sanitizeText(relationTitle, getConfig())
1037
+ });
1038
+ }
1039
+ const addRelation = function(item1, item2, title) {
1040
+ if (typeof item1 === "object") {
1041
+ addRelationObjs(item1, item2, title);
1042
+ } else {
1043
+ const id1 = startIdIfNeeded(item1.trim());
1044
+ const type1 = startTypeIfNeeded(item1);
1045
+ const id2 = endIdIfNeeded(item2.trim());
1046
+ const type2 = endTypeIfNeeded(item2);
1047
+ addState(id1, type1);
1048
+ addState(id2, type2);
1049
+ currentDocument.relations.push({
1050
+ id1,
1051
+ id2,
1052
+ title: common.sanitizeText(title, getConfig())
1053
+ });
1054
+ }
1055
+ };
1056
+ const addDescription = function(id, descr) {
1057
+ const theState = currentDocument.states[id];
1058
+ const _descr = descr.startsWith(":") ? descr.replace(":", "").trim() : descr;
1059
+ theState.descriptions.push(common.sanitizeText(_descr, getConfig()));
1060
+ };
1061
+ const cleanupLabel = function(label) {
1062
+ if (label.substring(0, 1) === ":") {
1063
+ return label.substr(2).trim();
1064
+ } else {
1065
+ return label.trim();
1066
+ }
1067
+ };
1068
+ const getDividerId = () => {
1069
+ dividerCnt++;
1070
+ return "divider-id-" + dividerCnt;
1071
+ };
1072
+ const addStyleClass = function(id, styleAttributes = "") {
1073
+ if (classes[id] === void 0) {
1074
+ classes[id] = { id, styles: [], textStyles: [] };
1075
+ }
1076
+ const foundClass = classes[id];
1077
+ if (styleAttributes !== void 0 && styleAttributes !== null) {
1078
+ styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => {
1079
+ const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim();
1080
+ if (attrib.match(COLOR_KEYWORD)) {
1081
+ const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL);
1082
+ const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD);
1083
+ foundClass.textStyles.push(newStyle2);
1084
+ }
1085
+ foundClass.styles.push(fixedAttrib);
1086
+ });
1087
+ }
1088
+ };
1089
+ const getClasses = function() {
1090
+ return classes;
1091
+ };
1092
+ const setCssClass = function(itemIds, cssClassName) {
1093
+ itemIds.split(",").forEach(function(id) {
1094
+ let foundState = getState(id);
1095
+ if (foundState === void 0) {
1096
+ const trimmedId = id.trim();
1097
+ addState(trimmedId);
1098
+ foundState = getState(trimmedId);
1099
+ }
1100
+ foundState.classes.push(cssClassName);
1101
+ });
1102
+ };
1103
+ const setStyle = function(itemId, styleText) {
1104
+ const item = getState(itemId);
1105
+ if (item !== void 0) {
1106
+ item.textStyles.push(styleText);
1107
+ }
1108
+ };
1109
+ const setTextStyle = function(itemId, cssClassName) {
1110
+ const item = getState(itemId);
1111
+ if (item !== void 0) {
1112
+ item.textStyles.push(cssClassName);
1113
+ }
1114
+ };
1115
+ const getDirection = () => direction;
1116
+ const setDirection = (dir) => {
1117
+ direction = dir;
1118
+ };
1119
+ const trimColon = (str) => str && str[0] === ":" ? str.substr(1).trim() : str.trim();
1120
+ const db = {
1121
+ getConfig: () => getConfig().state,
1122
+ addState,
1123
+ clear,
1124
+ getState,
1125
+ getStates,
1126
+ getRelations,
1127
+ getClasses,
1128
+ getDirection,
1129
+ addRelation,
1130
+ getDividerId,
1131
+ setDirection,
1132
+ cleanupLabel,
1133
+ lineType,
1134
+ relationType,
1135
+ logDocuments,
1136
+ getRootDoc,
1137
+ setRootDoc,
1138
+ getRootDocV2,
1139
+ extract,
1140
+ trimColon,
1141
+ getAccTitle,
1142
+ setAccTitle,
1143
+ getAccDescription,
1144
+ setAccDescription,
1145
+ addStyleClass,
1146
+ setCssClass,
1147
+ addDescription,
1148
+ setDiagramTitle,
1149
+ getDiagramTitle
1150
+ };
1151
+ const getStyles = (options) => `
1152
+ defs #statediagram-barbEnd {
1153
+ fill: ${options.transitionColor};
1154
+ stroke: ${options.transitionColor};
1155
+ }
1156
+ g.stateGroup text {
1157
+ fill: ${options.nodeBorder};
1158
+ stroke: none;
1159
+ font-size: 10px;
1160
+ }
1161
+ g.stateGroup text {
1162
+ fill: ${options.textColor};
1163
+ stroke: none;
1164
+ font-size: 10px;
1165
+
1166
+ }
1167
+ g.stateGroup .state-title {
1168
+ font-weight: bolder;
1169
+ fill: ${options.stateLabelColor};
1170
+ }
1171
+
1172
+ g.stateGroup rect {
1173
+ fill: ${options.mainBkg};
1174
+ stroke: ${options.nodeBorder};
1175
+ }
1176
+
1177
+ g.stateGroup line {
1178
+ stroke: ${options.lineColor};
1179
+ stroke-width: 1;
1180
+ }
1181
+
1182
+ .transition {
1183
+ stroke: ${options.transitionColor};
1184
+ stroke-width: 1;
1185
+ fill: none;
1186
+ }
1187
+
1188
+ .stateGroup .composit {
1189
+ fill: ${options.background};
1190
+ border-bottom: 1px
1191
+ }
1192
+
1193
+ .stateGroup .alt-composit {
1194
+ fill: #e0e0e0;
1195
+ border-bottom: 1px
1196
+ }
1197
+
1198
+ .state-note {
1199
+ stroke: ${options.noteBorderColor};
1200
+ fill: ${options.noteBkgColor};
1201
+
1202
+ text {
1203
+ fill: ${options.noteTextColor};
1204
+ stroke: none;
1205
+ font-size: 10px;
1206
+ }
1207
+ }
1208
+
1209
+ .stateLabel .box {
1210
+ stroke: none;
1211
+ stroke-width: 0;
1212
+ fill: ${options.mainBkg};
1213
+ opacity: 0.5;
1214
+ }
1215
+
1216
+ .edgeLabel .label rect {
1217
+ fill: ${options.labelBackgroundColor};
1218
+ opacity: 0.5;
1219
+ }
1220
+ .edgeLabel .label text {
1221
+ fill: ${options.transitionLabelColor || options.tertiaryTextColor};
1222
+ }
1223
+ .label div .edgeLabel {
1224
+ color: ${options.transitionLabelColor || options.tertiaryTextColor};
1225
+ }
1226
+
1227
+ .stateLabel text {
1228
+ fill: ${options.stateLabelColor};
1229
+ font-size: 10px;
1230
+ font-weight: bold;
1231
+ }
1232
+
1233
+ .node circle.state-start {
1234
+ fill: ${options.specialStateColor};
1235
+ stroke: ${options.specialStateColor};
1236
+ }
1237
+
1238
+ .node .fork-join {
1239
+ fill: ${options.specialStateColor};
1240
+ stroke: ${options.specialStateColor};
1241
+ }
1242
+
1243
+ .node circle.state-end {
1244
+ fill: ${options.innerEndBackground};
1245
+ stroke: ${options.background};
1246
+ stroke-width: 1.5
1247
+ }
1248
+ .end-state-inner {
1249
+ fill: ${options.compositeBackground || options.background};
1250
+ // stroke: ${options.background};
1251
+ stroke-width: 1.5
1252
+ }
1253
+
1254
+ .node rect {
1255
+ fill: ${options.stateBkg || options.mainBkg};
1256
+ stroke: ${options.stateBorder || options.nodeBorder};
1257
+ stroke-width: 1px;
1258
+ }
1259
+ .node polygon {
1260
+ fill: ${options.mainBkg};
1261
+ stroke: ${options.stateBorder || options.nodeBorder};;
1262
+ stroke-width: 1px;
1263
+ }
1264
+ #statediagram-barbEnd {
1265
+ fill: ${options.lineColor};
1266
+ }
1267
+
1268
+ .statediagram-cluster rect {
1269
+ fill: ${options.compositeTitleBackground};
1270
+ stroke: ${options.stateBorder || options.nodeBorder};
1271
+ stroke-width: 1px;
1272
+ }
1273
+
1274
+ .cluster-label, .nodeLabel {
1275
+ color: ${options.stateLabelColor};
1276
+ }
1277
+
1278
+ .statediagram-cluster rect.outer {
1279
+ rx: 5px;
1280
+ ry: 5px;
1281
+ }
1282
+ .statediagram-state .divider {
1283
+ stroke: ${options.stateBorder || options.nodeBorder};
1284
+ }
1285
+
1286
+ .statediagram-state .title-state {
1287
+ rx: 5px;
1288
+ ry: 5px;
1289
+ }
1290
+ .statediagram-cluster.statediagram-cluster .inner {
1291
+ fill: ${options.compositeBackground || options.background};
1292
+ }
1293
+ .statediagram-cluster.statediagram-cluster-alt .inner {
1294
+ fill: ${options.altBackground ? options.altBackground : "#efefef"};
1295
+ }
1296
+
1297
+ .statediagram-cluster .inner {
1298
+ rx:0;
1299
+ ry:0;
1300
+ }
1301
+
1302
+ .statediagram-state rect.basic {
1303
+ rx: 5px;
1304
+ ry: 5px;
1305
+ }
1306
+ .statediagram-state rect.divider {
1307
+ stroke-dasharray: 10,10;
1308
+ fill: ${options.altBackground ? options.altBackground : "#efefef"};
1309
+ }
1310
+
1311
+ .note-edge {
1312
+ stroke-dasharray: 5;
1313
+ }
1314
+
1315
+ .statediagram-note rect {
1316
+ fill: ${options.noteBkgColor};
1317
+ stroke: ${options.noteBorderColor};
1318
+ stroke-width: 1px;
1319
+ rx: 0;
1320
+ ry: 0;
1321
+ }
1322
+ .statediagram-note rect {
1323
+ fill: ${options.noteBkgColor};
1324
+ stroke: ${options.noteBorderColor};
1325
+ stroke-width: 1px;
1326
+ rx: 0;
1327
+ ry: 0;
1328
+ }
1329
+
1330
+ .statediagram-note text {
1331
+ fill: ${options.noteTextColor};
1332
+ }
1333
+
1334
+ .statediagram-note .nodeLabel {
1335
+ color: ${options.noteTextColor};
1336
+ }
1337
+ .statediagram .edgeLabel {
1338
+ color: red; // ${options.noteTextColor};
1339
+ }
1340
+
1341
+ #dependencyStart, #dependencyEnd {
1342
+ fill: ${options.lineColor};
1343
+ stroke: ${options.lineColor};
1344
+ stroke-width: 1;
1345
+ }
1346
+
1347
+ .statediagramTitleText {
1348
+ text-anchor: middle;
1349
+ font-size: 18px;
1350
+ fill: ${options.textColor};
1351
+ }
1352
+ `;
1353
+ const styles = getStyles;
1354
+ export {
1355
+ DEFAULT_STATE_TYPE as D,
1356
+ STMT_RELATION as S,
1357
+ DIVIDER_TYPE as a,
1358
+ STMT_STATE as b,
1359
+ DEFAULT_NESTED_DOC_DIR as c,
1360
+ db as d,
1361
+ parser$1 as p,
1362
+ styles as s
1363
+ };