jekyll-ham 1.0.2 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (369) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -6
  3. data/_layouts/default.html +6 -0
  4. data/_layouts/page.html +1 -1
  5. data/assets/bootstrap-icons.min.css +3 -3
  6. data/assets/fonts/bootstrap-icons.woff +0 -0
  7. data/assets/fonts/bootstrap-icons.woff2 +0 -0
  8. data/assets/mermaid/Diagram.d.ts +33 -0
  9. data/assets/mermaid/Tableau10-31042135.js +10 -0
  10. data/assets/mermaid/Tableau10-558cc280.js +9 -0
  11. data/assets/mermaid/__mocks__/mermaidAPI.d.ts +13 -0
  12. data/assets/mermaid/accessibility.d.ts +27 -0
  13. data/assets/mermaid/accessibility.spec.d.ts +1 -0
  14. data/assets/mermaid/arc-c0f908ab.js +148 -0
  15. data/assets/mermaid/arc-d1f6357e.js +86 -0
  16. data/assets/mermaid/array-2ff2c7a6.js +6 -0
  17. data/assets/mermaid/array-b7dcf730.js +6 -0
  18. data/assets/mermaid/assignWithDepth.d.ts +30 -0
  19. data/assets/mermaid/blockDiagram-5dc23a45.js +1230 -0
  20. data/assets/mermaid/blockDiagram-9f4a6865.js +1822 -0
  21. data/assets/mermaid/blockDiagram-efe38566.js +1818 -0
  22. data/assets/mermaid/c4Diagram-1e775db3.js +1579 -0
  23. data/assets/mermaid/c4Diagram-ae766693.js +2473 -0
  24. data/assets/mermaid/c4Diagram-af207393.js +2463 -0
  25. data/assets/mermaid/channel-ebbc4130.js +5 -0
  26. data/assets/mermaid/channel-f9001828.js +8 -0
  27. data/assets/mermaid/classDiagram-72b9c71d.js +356 -0
  28. data/assets/mermaid/classDiagram-f52caa06.js +220 -0
  29. data/assets/mermaid/classDiagram-fb54d2a0.js +363 -0
  30. data/assets/mermaid/classDiagram-v2-640c694e.js +206 -0
  31. data/assets/mermaid/classDiagram-v2-a2b738ad.js +298 -0
  32. data/assets/mermaid/classDiagram-v2-fedb80f6.js +290 -0
  33. data/assets/mermaid/clone-9ea6bfeb.js +8 -0
  34. data/assets/mermaid/clone-afc2f047.js +8 -0
  35. data/assets/mermaid/config.d.ts +98 -0
  36. data/assets/mermaid/config.spec.d.ts +1 -0
  37. data/assets/mermaid/config.type.d.ts +1534 -0
  38. data/assets/mermaid/createText-03b82060.js +2966 -0
  39. data/assets/mermaid/createText-b70fe78a.js +4929 -0
  40. data/assets/mermaid/createText-ca0c5216.js +251 -0
  41. data/assets/mermaid/dagre-wrapper/blockArrowHelper.d.ts +8 -0
  42. data/assets/mermaid/dagre-wrapper/clusters.d.ts +4 -0
  43. data/assets/mermaid/dagre-wrapper/createLabel.d.ts +9 -0
  44. data/assets/mermaid/dagre-wrapper/edgeMarker.d.ts +12 -0
  45. data/assets/mermaid/dagre-wrapper/edgeMarker.spec.d.ts +1 -0
  46. data/assets/mermaid/dagre-wrapper/edges.d.ts +14 -0
  47. data/assets/mermaid/dagre-wrapper/index.d.ts +1 -0
  48. data/assets/mermaid/dagre-wrapper/intersect/index.d.ts +13 -0
  49. data/assets/mermaid/dagre-wrapper/intersect/intersect-circle.d.ts +10 -0
  50. data/assets/mermaid/dagre-wrapper/intersect/intersect-ellipse.d.ts +11 -0
  51. data/assets/mermaid/dagre-wrapper/intersect/intersect-line.d.ts +13 -0
  52. data/assets/mermaid/dagre-wrapper/intersect/intersect-node.d.ts +6 -0
  53. data/assets/mermaid/dagre-wrapper/intersect/intersect-polygon.d.ts +10 -0
  54. data/assets/mermaid/dagre-wrapper/intersect/intersect-rect.d.ts +5 -0
  55. data/assets/mermaid/dagre-wrapper/markers.d.ts +2 -0
  56. data/assets/mermaid/dagre-wrapper/mermaid-graphlib.d.ts +8 -0
  57. data/assets/mermaid/dagre-wrapper/nodes.d.ts +4 -0
  58. data/assets/mermaid/dagre-wrapper/shapes/note.d.ts +2 -0
  59. data/assets/mermaid/dagre-wrapper/shapes/util.d.ts +14 -0
  60. data/assets/mermaid/defaultConfig.d.ts +12 -0
  61. data/assets/mermaid/diagram-api/comments.d.ts +6 -0
  62. data/assets/mermaid/diagram-api/comments.spec.d.ts +1 -0
  63. data/assets/mermaid/diagram-api/detectType.d.ts +42 -0
  64. data/assets/mermaid/diagram-api/diagram-orchestration.d.ts +1 -0
  65. data/assets/mermaid/diagram-api/diagram-orchestration.spec.d.ts +1 -0
  66. data/assets/mermaid/diagram-api/diagramAPI.d.ts +31 -0
  67. data/assets/mermaid/diagram-api/diagramAPI.spec.d.ts +1 -0
  68. data/assets/mermaid/diagram-api/frontmatter.d.ts +18 -0
  69. data/assets/mermaid/diagram-api/frontmatter.spec.d.ts +1 -0
  70. data/assets/mermaid/diagram-api/loadDiagram.d.ts +1 -0
  71. data/assets/mermaid/diagram-api/regexes.d.ts +3 -0
  72. data/assets/mermaid/diagram-api/types.d.ts +84 -0
  73. data/assets/mermaid/diagram.spec.d.ts +1 -0
  74. data/assets/mermaid/diagrams/block/blockDB.d.ts +54 -0
  75. data/assets/mermaid/diagrams/block/blockDetector.d.ts +3 -0
  76. data/assets/mermaid/diagrams/block/blockDiagram.d.ts +2 -0
  77. data/assets/mermaid/diagrams/block/blockRenderer.d.ts +15 -0
  78. data/assets/mermaid/diagrams/block/blockTypes.d.ts +36 -0
  79. data/assets/mermaid/diagrams/block/blockUtils.d.ts +1 -0
  80. data/assets/mermaid/diagrams/block/layout.d.ts +13 -0
  81. data/assets/mermaid/diagrams/block/layout.spec.d.ts +1 -0
  82. data/assets/mermaid/diagrams/block/parser/block.spec.d.ts +1 -0
  83. data/assets/mermaid/diagrams/block/renderHelpers.d.ts +10 -0
  84. data/assets/mermaid/diagrams/block/styles.d.ts +18 -0
  85. data/assets/mermaid/diagrams/c4/c4Db.d.ts +127 -0
  86. data/assets/mermaid/diagrams/c4/c4Detector.d.ts +3 -0
  87. data/assets/mermaid/diagrams/c4/c4Diagram.d.ts +2 -0
  88. data/assets/mermaid/diagrams/c4/c4Renderer.d.ts +12 -0
  89. data/assets/mermaid/diagrams/c4/styles.d.ts +2 -0
  90. data/assets/mermaid/diagrams/c4/svgDraw.d.ts +36 -0
  91. data/assets/mermaid/diagrams/class/classDb.d.ts +144 -0
  92. data/assets/mermaid/diagrams/class/classDetector-V2.d.ts +3 -0
  93. data/assets/mermaid/diagrams/class/classDetector.d.ts +3 -0
  94. data/assets/mermaid/diagrams/class/classDiagram-v2.d.ts +2 -0
  95. data/assets/mermaid/diagrams/class/classDiagram.d.ts +2 -0
  96. data/assets/mermaid/diagrams/class/classDiagram.spec.d.ts +1 -0
  97. data/assets/mermaid/diagrams/class/classRenderer-v2.d.ts +57 -0
  98. data/assets/mermaid/diagrams/class/classRenderer.d.ts +5 -0
  99. data/assets/mermaid/diagrams/class/classTypes.d.ts +78 -0
  100. data/assets/mermaid/diagrams/class/classTypes.spec.d.ts +1 -0
  101. data/assets/mermaid/diagrams/class/styles.d.ts +2 -0
  102. data/assets/mermaid/diagrams/class/svgDraw.d.ts +25 -0
  103. data/assets/mermaid/diagrams/common/common.d.ts +110 -0
  104. data/assets/mermaid/diagrams/common/common.spec.d.ts +1 -0
  105. data/assets/mermaid/diagrams/common/commonDb.d.ts +7 -0
  106. data/assets/mermaid/diagrams/common/commonTypes.d.ts +51 -0
  107. data/assets/mermaid/diagrams/common/svgDrawCommon.d.ts +15 -0
  108. data/assets/mermaid/diagrams/er/erDb.d.ts +49 -0
  109. data/assets/mermaid/diagrams/er/erDetector.d.ts +3 -0
  110. data/assets/mermaid/diagrams/er/erDiagram.d.ts +34 -0
  111. data/assets/mermaid/diagrams/er/erMarkers.d.ts +24 -0
  112. data/assets/mermaid/diagrams/er/erRenderer.d.ts +19 -0
  113. data/assets/mermaid/diagrams/er/erRenderer.spec.d.ts +1 -0
  114. data/assets/mermaid/diagrams/er/styles.d.ts +2 -0
  115. data/assets/mermaid/diagrams/error/errorDiagram.d.ts +3 -0
  116. data/assets/mermaid/diagrams/error/errorRenderer.d.ts +12 -0
  117. data/assets/mermaid/diagrams/flowchart/elk/detector.d.ts +3 -0
  118. data/assets/mermaid/diagrams/flowchart/elk/detector.spec.d.ts +1 -0
  119. data/assets/mermaid/diagrams/flowchart/elk/flowRenderer-elk.d.ts +10 -0
  120. data/assets/mermaid/diagrams/flowchart/elk/flowchart-elk-definition.d.ts +10 -0
  121. data/assets/mermaid/diagrams/flowchart/elk/render-utils.d.ts +5 -0
  122. data/assets/mermaid/diagrams/flowchart/elk/render-utils.spec.d.ts +1 -0
  123. data/assets/mermaid/diagrams/flowchart/elk/styles.d.ts +19 -0
  124. data/assets/mermaid/diagrams/flowchart/flowChartShapes.d.ts +9 -0
  125. data/assets/mermaid/diagrams/flowchart/flowDb.d.ts +87 -0
  126. data/assets/mermaid/diagrams/flowchart/flowDetector-v2.d.ts +3 -0
  127. data/assets/mermaid/diagrams/flowchart/flowDetector.d.ts +3 -0
  128. data/assets/mermaid/diagrams/flowchart/flowDiagram-v2.d.ts +57 -0
  129. data/assets/mermaid/diagrams/flowchart/flowDiagram.d.ts +57 -0
  130. data/assets/mermaid/diagrams/flowchart/flowRenderer-v2.d.ts +13 -0
  131. data/assets/mermaid/diagrams/flowchart/flowRenderer.d.ts +13 -0
  132. data/assets/mermaid/diagrams/flowchart/styles.d.ts +18 -0
  133. data/assets/mermaid/diagrams/gantt/ganttDb.d.ts +106 -0
  134. data/assets/mermaid/diagrams/gantt/ganttDb.spec.d.ts +1 -0
  135. data/assets/mermaid/diagrams/gantt/ganttDetector.d.ts +3 -0
  136. data/assets/mermaid/diagrams/gantt/ganttDiagram.d.ts +2 -0
  137. data/assets/mermaid/diagrams/gantt/ganttRenderer.d.ts +7 -0
  138. data/assets/mermaid/diagrams/gantt/styles.d.ts +2 -0
  139. data/assets/mermaid/diagrams/git/gitGraphAst.d.ts +61 -0
  140. data/assets/mermaid/diagrams/git/gitGraphDetector.d.ts +3 -0
  141. data/assets/mermaid/diagrams/git/gitGraphDiagram.d.ts +2 -0
  142. data/assets/mermaid/diagrams/git/gitGraphRenderer.d.ts +5 -0
  143. data/assets/mermaid/diagrams/git/styles.d.ts +2 -0
  144. data/assets/mermaid/diagrams/info/info.spec.d.ts +1 -0
  145. data/assets/mermaid/diagrams/info/infoDb.d.ts +5 -0
  146. data/assets/mermaid/diagrams/info/infoDetector.d.ts +2 -0
  147. data/assets/mermaid/diagrams/info/infoDiagram.d.ts +2 -0
  148. data/assets/mermaid/diagrams/info/infoRenderer.d.ts +4 -0
  149. data/assets/mermaid/diagrams/info/infoTypes.d.ts +9 -0
  150. data/assets/mermaid/diagrams/mindmap/detector.d.ts +3 -0
  151. data/assets/mermaid/diagrams/mindmap/mindmap-definition.d.ts +2 -0
  152. data/assets/mermaid/diagrams/mindmap/mindmap.spec.d.ts +1 -0
  153. data/assets/mermaid/diagrams/mindmap/mindmapDb.d.ts +30 -0
  154. data/assets/mermaid/diagrams/mindmap/mindmapRenderer.d.ts +21 -0
  155. data/assets/mermaid/diagrams/mindmap/mindmapTypes.d.ts +20 -0
  156. data/assets/mermaid/diagrams/mindmap/styles.d.ts +3 -0
  157. data/assets/mermaid/diagrams/mindmap/svgDraw.d.ts +13 -0
  158. data/assets/mermaid/diagrams/pie/pie.spec.d.ts +1 -0
  159. data/assets/mermaid/diagrams/pie/pieDb.d.ts +6 -0
  160. data/assets/mermaid/diagrams/pie/pieDetector.d.ts +2 -0
  161. data/assets/mermaid/diagrams/pie/pieDiagram.d.ts +2 -0
  162. data/assets/mermaid/diagrams/pie/pieRenderer.d.ts +13 -0
  163. data/assets/mermaid/diagrams/pie/pieStyles.d.ts +3 -0
  164. data/assets/mermaid/diagrams/pie/pieTypes.d.ts +53 -0
  165. data/assets/mermaid/diagrams/quadrant-chart/parser/quadrant.jison.spec.d.ts +1 -0
  166. data/assets/mermaid/diagrams/quadrant-chart/quadrantBuilder.d.ts +118 -0
  167. data/assets/mermaid/diagrams/quadrant-chart/quadrantDb.d.ts +38 -0
  168. data/assets/mermaid/diagrams/quadrant-chart/quadrantDetector.d.ts +3 -0
  169. data/assets/mermaid/diagrams/quadrant-chart/quadrantDiagram.d.ts +2 -0
  170. data/assets/mermaid/diagrams/quadrant-chart/quadrantRenderer.d.ts +6 -0
  171. data/assets/mermaid/diagrams/requirement/requirementDb.d.ts +70 -0
  172. data/assets/mermaid/diagrams/requirement/requirementDetector.d.ts +3 -0
  173. data/assets/mermaid/diagrams/requirement/requirementDiagram.d.ts +2 -0
  174. data/assets/mermaid/diagrams/requirement/requirementMarkers.d.ts +10 -0
  175. data/assets/mermaid/diagrams/requirement/requirementRenderer.d.ts +7 -0
  176. data/assets/mermaid/diagrams/requirement/styles.d.ts +2 -0
  177. data/assets/mermaid/diagrams/sankey/parser/sankey.spec.d.ts +1 -0
  178. data/assets/mermaid/diagrams/sankey/sankeyDB.d.ts +36 -0
  179. data/assets/mermaid/diagrams/sankey/sankeyDetector.d.ts +3 -0
  180. data/assets/mermaid/diagrams/sankey/sankeyDiagram.d.ts +2 -0
  181. data/assets/mermaid/diagrams/sankey/sankeyRenderer.d.ts +14 -0
  182. data/assets/mermaid/diagrams/sankey/sankeyUtils.d.ts +1 -0
  183. data/assets/mermaid/diagrams/sequence/sequenceDb.d.ts +153 -0
  184. data/assets/mermaid/diagrams/sequence/sequenceDetector.d.ts +3 -0
  185. data/assets/mermaid/diagrams/sequence/sequenceDiagram.d.ts +2 -0
  186. data/assets/mermaid/diagrams/sequence/sequenceRenderer.d.ts +202 -0
  187. data/assets/mermaid/diagrams/sequence/styles.d.ts +2 -0
  188. data/assets/mermaid/diagrams/sequence/svgDraw.d.ts +73 -0
  189. data/assets/mermaid/diagrams/state/id-cache.d.ts +11 -0
  190. data/assets/mermaid/diagrams/state/shapes.d.ts +14 -0
  191. data/assets/mermaid/diagrams/state/stateCommon.d.ts +22 -0
  192. data/assets/mermaid/diagrams/state/stateDb.d.ts +91 -0
  193. data/assets/mermaid/diagrams/state/stateDetector-V2.d.ts +3 -0
  194. data/assets/mermaid/diagrams/state/stateDetector.d.ts +3 -0
  195. data/assets/mermaid/diagrams/state/stateDiagram-v2.d.ts +2 -0
  196. data/assets/mermaid/diagrams/state/stateDiagram.d.ts +2 -0
  197. data/assets/mermaid/diagrams/state/stateRenderer-v2.d.ts +20 -0
  198. data/assets/mermaid/diagrams/state/stateRenderer.d.ts +7 -0
  199. data/assets/mermaid/diagrams/state/styles.d.ts +2 -0
  200. data/assets/mermaid/diagrams/timeline/detector.d.ts +3 -0
  201. data/assets/mermaid/diagrams/timeline/styles.d.ts +2 -0
  202. data/assets/mermaid/diagrams/timeline/svgDraw.d.ts +46 -0
  203. data/assets/mermaid/diagrams/timeline/timeline-definition.d.ts +10 -0
  204. data/assets/mermaid/diagrams/timeline/timelineDb.d.ts +20 -0
  205. data/assets/mermaid/diagrams/timeline/timelineRenderer.d.ts +19 -0
  206. data/assets/mermaid/diagrams/user-journey/journeyDb.d.ts +30 -0
  207. data/assets/mermaid/diagrams/user-journey/journeyDetector.d.ts +3 -0
  208. data/assets/mermaid/diagrams/user-journey/journeyDiagram.d.ts +2 -0
  209. data/assets/mermaid/diagrams/user-journey/journeyRenderer.d.ts +30 -0
  210. data/assets/mermaid/diagrams/user-journey/styles.d.ts +2 -0
  211. data/assets/mermaid/diagrams/user-journey/svgDraw.d.ts +20 -0
  212. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/bandAxis.d.ts +12 -0
  213. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/baseAxis.d.ts +38 -0
  214. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/index.d.ts +12 -0
  215. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/linearAxis.d.ts +11 -0
  216. data/assets/mermaid/diagrams/xychart/chartBuilder/components/chartTitle.d.ts +16 -0
  217. data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/barPlot.d.ts +12 -0
  218. data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/index.d.ts +20 -0
  219. data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/linePlot.d.ts +11 -0
  220. data/assets/mermaid/diagrams/xychart/chartBuilder/index.d.ts +5 -0
  221. data/assets/mermaid/diagrams/xychart/chartBuilder/interfaces.d.ts +132 -0
  222. data/assets/mermaid/diagrams/xychart/chartBuilder/orchestrator.d.ts +12 -0
  223. data/assets/mermaid/diagrams/xychart/chartBuilder/textDimensionCalculator.d.ts +10 -0
  224. data/assets/mermaid/diagrams/xychart/parser/xychart.jison.spec.d.ts +1 -0
  225. data/assets/mermaid/diagrams/xychart/xychartDb.d.ts +40 -0
  226. data/assets/mermaid/diagrams/xychart/xychartDetector.d.ts +3 -0
  227. data/assets/mermaid/diagrams/xychart/xychartDiagram.d.ts +2 -0
  228. data/assets/mermaid/diagrams/xychart/xychartRenderer.d.ts +6 -0
  229. data/assets/mermaid/docs/vite.config.d.ts +2 -0
  230. data/assets/mermaid/edges-066a5561.js +1840 -0
  231. data/assets/mermaid/edges-16357fde.js +1083 -0
  232. data/assets/mermaid/edges-ce5cfb7c.js +1840 -0
  233. data/assets/mermaid/erDiagram-09d1c15f.js +1176 -0
  234. data/assets/mermaid/erDiagram-543717f2.js +1321 -0
  235. data/assets/mermaid/erDiagram-c7ff1bec.js +931 -0
  236. data/assets/mermaid/errors.d.ts +3 -0
  237. data/assets/mermaid/flowDb-9a89ea33.js +1126 -0
  238. data/assets/mermaid/flowDb-ba9bd7fa.js +1713 -0
  239. data/assets/mermaid/flowDb-c1833063.js +1714 -0
  240. data/assets/mermaid/flowDiagram-aadb13b0.js +797 -0
  241. data/assets/mermaid/flowDiagram-b222e15a.js +614 -0
  242. data/assets/mermaid/flowDiagram-b5e7ba30.js +1278 -0
  243. data/assets/mermaid/flowDiagram-v2-13329dc7.js +40 -0
  244. data/assets/mermaid/flowDiagram-v2-54711e03.js +32 -0
  245. data/assets/mermaid/flowDiagram-v2-f2119625.js +25 -0
  246. data/assets/mermaid/flowchart-elk-definition-2d49707c.js +93397 -0
  247. data/assets/mermaid/flowchart-elk-definition-ae0efee6.js +814 -0
  248. data/assets/mermaid/flowchart-elk-definition-cf813a97.js +48407 -0
  249. data/assets/mermaid/ganttDiagram-12cf43db.js +3445 -0
  250. data/assets/mermaid/ganttDiagram-3c2fde2b.js +2501 -0
  251. data/assets/mermaid/ganttDiagram-b62c793e.js +2061 -0
  252. data/assets/mermaid/gitGraphDiagram-942e62fe.js +1800 -0
  253. data/assets/mermaid/gitGraphDiagram-b9392a12.js +1790 -0
  254. data/assets/mermaid/gitGraphDiagram-c3a0619c.js +1264 -0
  255. data/assets/mermaid/graph-0ee63739.js +881 -0
  256. data/assets/mermaid/graph-fe24fab6.js +1285 -0
  257. data/assets/mermaid/index-01f381cb.js +622 -0
  258. data/assets/mermaid/index-bb6d8841.js +373 -0
  259. data/assets/mermaid/index-fc479858.js +663 -0
  260. data/assets/mermaid/infoDiagram-2f5c50c0.js +319 -0
  261. data/assets/mermaid/infoDiagram-94cd232f.js +520 -0
  262. data/assets/mermaid/infoDiagram-d0d5c9bd.js +510 -0
  263. data/assets/mermaid/init-cc95ec8e.js +16 -0
  264. data/assets/mermaid/init-f9637058.js +16 -0
  265. data/assets/mermaid/interactionDb.d.ts +2 -0
  266. data/assets/mermaid/journeyDiagram-14fe341a.js +804 -0
  267. data/assets/mermaid/journeyDiagram-6625b456.js +1191 -0
  268. data/assets/mermaid/journeyDiagram-b56e6921.js +1183 -0
  269. data/assets/mermaid/katex-d90b6d29.js +11624 -0
  270. data/assets/mermaid/katex-ffb0e8f1.js +14432 -0
  271. data/assets/mermaid/layout-163b9689.js +2314 -0
  272. data/assets/mermaid/layout-fd473db2.js +1536 -0
  273. data/assets/mermaid/line-24d93f1b.js +34 -0
  274. data/assets/mermaid/line-87f517ef.js +50 -0
  275. data/assets/mermaid/linear-0ad15847.js +595 -0
  276. data/assets/mermaid/linear-9bcf74c4.js +447 -0
  277. data/assets/mermaid/logger.d.ts +9 -0
  278. data/assets/mermaid/mermaid-6dc72991.js +6461 -0
  279. data/assets/mermaid/mermaid-9f2aa176.js +8112 -0
  280. data/assets/mermaid/mermaid-dcacb631.js +12793 -0
  281. data/assets/mermaid/mermaid.core.mjs +14 -0
  282. data/assets/mermaid/mermaid.d.ts +146 -0
  283. data/assets/mermaid/mermaid.esm.min.mjs +4 -0
  284. data/assets/mermaid/mermaid.esm.mjs +4 -0
  285. data/assets/mermaid/mermaid.js +195755 -0
  286. data/assets/mermaid/mermaid.min.js +2029 -0
  287. data/assets/mermaid/mermaid.spec.d.ts +1 -0
  288. data/assets/mermaid/mermaidAPI.d.ts +170 -0
  289. data/assets/mermaid/mermaidAPI.spec.d.ts +1 -0
  290. data/assets/mermaid/mindmap-definition-307c710a.js +1177 -0
  291. data/assets/mermaid/mindmap-definition-696ddea4.js +32342 -0
  292. data/assets/mermaid/mindmap-definition-9399c7e6.js +18760 -0
  293. data/assets/mermaid/ordinal-475e0c0c.js +82 -0
  294. data/assets/mermaid/ordinal-5695958c.js +65 -0
  295. data/assets/mermaid/path-39bad7e2.js +118 -0
  296. data/assets/mermaid/path-428ebac9.js +91 -0
  297. data/assets/mermaid/pieDiagram-828dae43.js +502 -0
  298. data/assets/mermaid/pieDiagram-bb1d19e5.js +722 -0
  299. data/assets/mermaid/pieDiagram-e854eaf0.js +772 -0
  300. data/assets/mermaid/preprocess.d.ts +10 -0
  301. data/assets/mermaid/quadrantDiagram-25a9848b.js +1199 -0
  302. data/assets/mermaid/quadrantDiagram-5fa00455.js +904 -0
  303. data/assets/mermaid/quadrantDiagram-c759a472.js +1207 -0
  304. data/assets/mermaid/rendering-util/createText.d.ts +11 -0
  305. data/assets/mermaid/rendering-util/handle-markdown-text.d.ts +6 -0
  306. data/assets/mermaid/rendering-util/handle-markdown-text.spec.d.ts +1 -0
  307. data/assets/mermaid/rendering-util/selectSvgElement.d.ts +8 -0
  308. data/assets/mermaid/rendering-util/splitText.d.ts +24 -0
  309. data/assets/mermaid/rendering-util/splitText.spec.d.ts +1 -0
  310. data/assets/mermaid/rendering-util/uid.d.ts +8 -0
  311. data/assets/mermaid/requirementDiagram-03163dc4.js +769 -0
  312. data/assets/mermaid/requirementDiagram-87253d64.js +1098 -0
  313. data/assets/mermaid/requirementDiagram-a721e157.js +1091 -0
  314. data/assets/mermaid/sankeyDiagram-33525efb.js +1198 -0
  315. data/assets/mermaid/sankeyDiagram-52ec8976.js +818 -0
  316. data/assets/mermaid/sankeyDiagram-707fac0f.js +660 -0
  317. data/assets/mermaid/sequenceDiagram-6894f283.js +3346 -0
  318. data/assets/mermaid/sequenceDiagram-9813c129.js +3336 -0
  319. data/assets/mermaid/sequenceDiagram-b517d154.js +2234 -0
  320. data/assets/mermaid/setupGraphViewbox.d.ts +3 -0
  321. data/assets/mermaid/stateDiagram-5dee940d.js +474 -0
  322. data/assets/mermaid/stateDiagram-5ec31577.js +467 -0
  323. data/assets/mermaid/stateDiagram-fca82b5b.js +275 -0
  324. data/assets/mermaid/stateDiagram-v2-1992cada.js +333 -0
  325. data/assets/mermaid/stateDiagram-v2-992e82a1.js +325 -0
  326. data/assets/mermaid/stateDiagram-v2-ed04200a.js +190 -0
  327. data/assets/mermaid/styles-0784dbeb.js +1363 -0
  328. data/assets/mermaid/styles-11e81fdd.js +1089 -0
  329. data/assets/mermaid/styles-36a1a2e8.js +1483 -0
  330. data/assets/mermaid/styles-483fbfea.js +509 -0
  331. data/assets/mermaid/styles-727cdd61.js +571 -0
  332. data/assets/mermaid/styles-b83b31c9.js +1484 -0
  333. data/assets/mermaid/styles-cacbff60.js +960 -0
  334. data/assets/mermaid/styles-e75131e4.js +433 -0
  335. data/assets/mermaid/styles-f80da881.js +1363 -0
  336. data/assets/mermaid/styles.d.ts +12 -0
  337. data/assets/mermaid/styles.spec.d.ts +1 -0
  338. data/assets/mermaid/svgDrawCommon-5e1cfd1d.js +101 -0
  339. data/assets/mermaid/svgDrawCommon-d6ab583c.js +100 -0
  340. data/assets/mermaid/svgDrawCommon-ecc5f780.js +64 -0
  341. data/assets/mermaid/tests/MockedD3.d.ts +45 -0
  342. data/assets/mermaid/tests/setup.d.ts +1 -0
  343. data/assets/mermaid/tests/util.d.ts +3 -0
  344. data/assets/mermaid/themes/erDiagram-oldHardcodedValues.d.ts +7 -0
  345. data/assets/mermaid/themes/index.d.ts +24 -0
  346. data/assets/mermaid/themes/theme-base.d.ts +189 -0
  347. data/assets/mermaid/themes/theme-dark.d.ts +177 -0
  348. data/assets/mermaid/themes/theme-default.d.ts +188 -0
  349. data/assets/mermaid/themes/theme-forest.d.ts +185 -0
  350. data/assets/mermaid/themes/theme-helpers.d.ts +1 -0
  351. data/assets/mermaid/themes/theme-neutral.d.ts +182 -0
  352. data/assets/mermaid/timeline-definition-23ce0e2e.js +1211 -0
  353. data/assets/mermaid/timeline-definition-4ee9bff4.js +795 -0
  354. data/assets/mermaid/timeline-definition-bf702344.js +1219 -0
  355. data/assets/mermaid/types.d.ts +31 -0
  356. data/assets/mermaid/utils/imperativeState.d.ts +32 -0
  357. data/assets/mermaid/utils/imperativeState.spec.d.ts +1 -0
  358. data/assets/mermaid/utils/lineWithOffset.d.ts +5 -0
  359. data/assets/mermaid/utils/sanitizeDirective.d.ts +7 -0
  360. data/assets/mermaid/utils/subGraphTitleMargins.d.ts +8 -0
  361. data/assets/mermaid/utils/subGraphTitleMargins.spec.d.ts +1 -0
  362. data/assets/mermaid/utils.d.ts +286 -0
  363. data/assets/mermaid/utils.spec.d.ts +1 -0
  364. data/assets/mermaid/xychartDiagram-de2e5521.js +1800 -0
  365. data/assets/mermaid/xychartDiagram-e5e6b652.js +1284 -0
  366. data/assets/mermaid/xychartDiagram-f11f50a6.js +1745 -0
  367. data/assets/tables.css +23 -0
  368. data/assets/toURI.js +142 -0
  369. metadata +368 -7
@@ -0,0 +1,1198 @@
1
+ import { c as getConfig, g as getAccTitle, s as setAccTitle, a as getAccDescription, b as setAccDescription, D as getDiagramTitle, C as setDiagramTitle, E as clear$1, f as common, ar as defaultConfig, j as d3select, t as setupGraphViewbox } from "./mermaid-dcacb631.js";
2
+ import { o as ordinal } from "./ordinal-475e0c0c.js";
3
+ import { d as d3schemeTableau10 } from "./Tableau10-31042135.js";
4
+ import "./init-cc95ec8e.js";
5
+ var parser = function() {
6
+ var o = function(k, v, o2, l) {
7
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
8
+ ;
9
+ return o2;
10
+ }, $V0 = [1, 9], $V1 = [1, 10], $V2 = [1, 5, 10, 12];
11
+ var parser2 = {
12
+ trace: function trace() {
13
+ },
14
+ yy: {},
15
+ 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 },
16
+ 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" },
17
+ productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],
18
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
19
+ var $0 = $$.length - 1;
20
+ switch (yystate) {
21
+ case 7:
22
+ const source = yy.findOrCreateNode($$[$0 - 4].trim().replaceAll('""', '"'));
23
+ const target = yy.findOrCreateNode($$[$0 - 2].trim().replaceAll('""', '"'));
24
+ const value2 = parseFloat($$[$0].trim());
25
+ yy.addLink(source, target, value2);
26
+ break;
27
+ case 8:
28
+ case 9:
29
+ case 11:
30
+ this.$ = $$[$0];
31
+ break;
32
+ case 10:
33
+ this.$ = $$[$0 - 1];
34
+ break;
35
+ }
36
+ },
37
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 1: [2, 6], 7: 11, 10: [1, 12] }, o($V1, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, o($V2, [2, 8]), o($V2, [2, 9]), { 19: [1, 16] }, o($V2, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, o($V1, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 15: 18, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 18: [1, 19] }, o($V1, [2, 3]), { 12: [1, 20] }, o($V2, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: $V0, 20: $V1 }, o([1, 5, 10], [2, 7])],
38
+ defaultActions: { 11: [2, 1], 12: [2, 5] },
39
+ parseError: function parseError(str, hash) {
40
+ if (hash.recoverable) {
41
+ this.trace(str);
42
+ } else {
43
+ var error = new Error(str);
44
+ error.hash = hash;
45
+ throw error;
46
+ }
47
+ },
48
+ parse: function parse(input) {
49
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
50
+ var args = lstack.slice.call(arguments, 1);
51
+ var lexer2 = Object.create(this.lexer);
52
+ var sharedState = { yy: {} };
53
+ for (var k in this.yy) {
54
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
55
+ sharedState.yy[k] = this.yy[k];
56
+ }
57
+ }
58
+ lexer2.setInput(input, sharedState.yy);
59
+ sharedState.yy.lexer = lexer2;
60
+ sharedState.yy.parser = this;
61
+ if (typeof lexer2.yylloc == "undefined") {
62
+ lexer2.yylloc = {};
63
+ }
64
+ var yyloc = lexer2.yylloc;
65
+ lstack.push(yyloc);
66
+ var ranges = lexer2.options && lexer2.options.ranges;
67
+ if (typeof sharedState.yy.parseError === "function") {
68
+ this.parseError = sharedState.yy.parseError;
69
+ } else {
70
+ this.parseError = Object.getPrototypeOf(this).parseError;
71
+ }
72
+ function lex() {
73
+ var token;
74
+ token = tstack.pop() || lexer2.lex() || EOF;
75
+ if (typeof token !== "number") {
76
+ if (token instanceof Array) {
77
+ tstack = token;
78
+ token = tstack.pop();
79
+ }
80
+ token = self.symbols_[token] || token;
81
+ }
82
+ return token;
83
+ }
84
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
85
+ while (true) {
86
+ state = stack[stack.length - 1];
87
+ if (this.defaultActions[state]) {
88
+ action = this.defaultActions[state];
89
+ } else {
90
+ if (symbol === null || typeof symbol == "undefined") {
91
+ symbol = lex();
92
+ }
93
+ action = table[state] && table[state][symbol];
94
+ }
95
+ if (typeof action === "undefined" || !action.length || !action[0]) {
96
+ var errStr = "";
97
+ expected = [];
98
+ for (p in table[state]) {
99
+ if (this.terminals_[p] && p > TERROR) {
100
+ expected.push("'" + this.terminals_[p] + "'");
101
+ }
102
+ }
103
+ if (lexer2.showPosition) {
104
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
105
+ } else {
106
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
107
+ }
108
+ this.parseError(errStr, {
109
+ text: lexer2.match,
110
+ token: this.terminals_[symbol] || symbol,
111
+ line: lexer2.yylineno,
112
+ loc: yyloc,
113
+ expected
114
+ });
115
+ }
116
+ if (action[0] instanceof Array && action.length > 1) {
117
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
118
+ }
119
+ switch (action[0]) {
120
+ case 1:
121
+ stack.push(symbol);
122
+ vstack.push(lexer2.yytext);
123
+ lstack.push(lexer2.yylloc);
124
+ stack.push(action[1]);
125
+ symbol = null;
126
+ {
127
+ yyleng = lexer2.yyleng;
128
+ yytext = lexer2.yytext;
129
+ yylineno = lexer2.yylineno;
130
+ yyloc = lexer2.yylloc;
131
+ }
132
+ break;
133
+ case 2:
134
+ len = this.productions_[action[1]][1];
135
+ yyval.$ = vstack[vstack.length - len];
136
+ yyval._$ = {
137
+ first_line: lstack[lstack.length - (len || 1)].first_line,
138
+ last_line: lstack[lstack.length - 1].last_line,
139
+ first_column: lstack[lstack.length - (len || 1)].first_column,
140
+ last_column: lstack[lstack.length - 1].last_column
141
+ };
142
+ if (ranges) {
143
+ yyval._$.range = [
144
+ lstack[lstack.length - (len || 1)].range[0],
145
+ lstack[lstack.length - 1].range[1]
146
+ ];
147
+ }
148
+ r = this.performAction.apply(yyval, [
149
+ yytext,
150
+ yyleng,
151
+ yylineno,
152
+ sharedState.yy,
153
+ action[1],
154
+ vstack,
155
+ lstack
156
+ ].concat(args));
157
+ if (typeof r !== "undefined") {
158
+ return r;
159
+ }
160
+ if (len) {
161
+ stack = stack.slice(0, -1 * len * 2);
162
+ vstack = vstack.slice(0, -1 * len);
163
+ lstack = lstack.slice(0, -1 * len);
164
+ }
165
+ stack.push(this.productions_[action[1]][0]);
166
+ vstack.push(yyval.$);
167
+ lstack.push(yyval._$);
168
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
169
+ stack.push(newState);
170
+ break;
171
+ case 3:
172
+ return true;
173
+ }
174
+ }
175
+ return true;
176
+ }
177
+ };
178
+ var lexer = function() {
179
+ var lexer2 = {
180
+ EOF: 1,
181
+ parseError: function parseError(str, hash) {
182
+ if (this.yy.parser) {
183
+ this.yy.parser.parseError(str, hash);
184
+ } else {
185
+ throw new Error(str);
186
+ }
187
+ },
188
+ // resets the lexer, sets new input
189
+ setInput: function(input, yy) {
190
+ this.yy = yy || this.yy || {};
191
+ this._input = input;
192
+ this._more = this._backtrack = this.done = false;
193
+ this.yylineno = this.yyleng = 0;
194
+ this.yytext = this.matched = this.match = "";
195
+ this.conditionStack = ["INITIAL"];
196
+ this.yylloc = {
197
+ first_line: 1,
198
+ first_column: 0,
199
+ last_line: 1,
200
+ last_column: 0
201
+ };
202
+ if (this.options.ranges) {
203
+ this.yylloc.range = [0, 0];
204
+ }
205
+ this.offset = 0;
206
+ return this;
207
+ },
208
+ // consumes and returns one char from the input
209
+ input: function() {
210
+ var ch = this._input[0];
211
+ this.yytext += ch;
212
+ this.yyleng++;
213
+ this.offset++;
214
+ this.match += ch;
215
+ this.matched += ch;
216
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
217
+ if (lines) {
218
+ this.yylineno++;
219
+ this.yylloc.last_line++;
220
+ } else {
221
+ this.yylloc.last_column++;
222
+ }
223
+ if (this.options.ranges) {
224
+ this.yylloc.range[1]++;
225
+ }
226
+ this._input = this._input.slice(1);
227
+ return ch;
228
+ },
229
+ // unshifts one char (or a string) into the input
230
+ unput: function(ch) {
231
+ var len = ch.length;
232
+ var lines = ch.split(/(?:\r\n?|\n)/g);
233
+ this._input = ch + this._input;
234
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
235
+ this.offset -= len;
236
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
237
+ this.match = this.match.substr(0, this.match.length - 1);
238
+ this.matched = this.matched.substr(0, this.matched.length - 1);
239
+ if (lines.length - 1) {
240
+ this.yylineno -= lines.length - 1;
241
+ }
242
+ var r = this.yylloc.range;
243
+ this.yylloc = {
244
+ first_line: this.yylloc.first_line,
245
+ last_line: this.yylineno + 1,
246
+ first_column: this.yylloc.first_column,
247
+ 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
248
+ };
249
+ if (this.options.ranges) {
250
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
251
+ }
252
+ this.yyleng = this.yytext.length;
253
+ return this;
254
+ },
255
+ // When called from action, caches matched text and appends it on next action
256
+ more: function() {
257
+ this._more = true;
258
+ return this;
259
+ },
260
+ // 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.
261
+ reject: function() {
262
+ if (this.options.backtrack_lexer) {
263
+ this._backtrack = true;
264
+ } else {
265
+ 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(), {
266
+ text: "",
267
+ token: null,
268
+ line: this.yylineno
269
+ });
270
+ }
271
+ return this;
272
+ },
273
+ // retain first n characters of the match
274
+ less: function(n) {
275
+ this.unput(this.match.slice(n));
276
+ },
277
+ // displays already matched input, i.e. for error messages
278
+ pastInput: function() {
279
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
280
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
281
+ },
282
+ // displays upcoming input, i.e. for error messages
283
+ upcomingInput: function() {
284
+ var next = this.match;
285
+ if (next.length < 20) {
286
+ next += this._input.substr(0, 20 - next.length);
287
+ }
288
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
289
+ },
290
+ // displays the character position where the lexing error occurred, i.e. for error messages
291
+ showPosition: function() {
292
+ var pre = this.pastInput();
293
+ var c = new Array(pre.length + 1).join("-");
294
+ return pre + this.upcomingInput() + "\n" + c + "^";
295
+ },
296
+ // test the lexed token: return FALSE when not a match, otherwise return token
297
+ test_match: function(match, indexed_rule) {
298
+ var token, lines, backup;
299
+ if (this.options.backtrack_lexer) {
300
+ backup = {
301
+ yylineno: this.yylineno,
302
+ yylloc: {
303
+ first_line: this.yylloc.first_line,
304
+ last_line: this.last_line,
305
+ first_column: this.yylloc.first_column,
306
+ last_column: this.yylloc.last_column
307
+ },
308
+ yytext: this.yytext,
309
+ match: this.match,
310
+ matches: this.matches,
311
+ matched: this.matched,
312
+ yyleng: this.yyleng,
313
+ offset: this.offset,
314
+ _more: this._more,
315
+ _input: this._input,
316
+ yy: this.yy,
317
+ conditionStack: this.conditionStack.slice(0),
318
+ done: this.done
319
+ };
320
+ if (this.options.ranges) {
321
+ backup.yylloc.range = this.yylloc.range.slice(0);
322
+ }
323
+ }
324
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
325
+ if (lines) {
326
+ this.yylineno += lines.length;
327
+ }
328
+ this.yylloc = {
329
+ first_line: this.yylloc.last_line,
330
+ last_line: this.yylineno + 1,
331
+ first_column: this.yylloc.last_column,
332
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
333
+ };
334
+ this.yytext += match[0];
335
+ this.match += match[0];
336
+ this.matches = match;
337
+ this.yyleng = this.yytext.length;
338
+ if (this.options.ranges) {
339
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
340
+ }
341
+ this._more = false;
342
+ this._backtrack = false;
343
+ this._input = this._input.slice(match[0].length);
344
+ this.matched += match[0];
345
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
346
+ if (this.done && this._input) {
347
+ this.done = false;
348
+ }
349
+ if (token) {
350
+ return token;
351
+ } else if (this._backtrack) {
352
+ for (var k in backup) {
353
+ this[k] = backup[k];
354
+ }
355
+ return false;
356
+ }
357
+ return false;
358
+ },
359
+ // return next match in input
360
+ next: function() {
361
+ if (this.done) {
362
+ return this.EOF;
363
+ }
364
+ if (!this._input) {
365
+ this.done = true;
366
+ }
367
+ var token, match, tempMatch, index;
368
+ if (!this._more) {
369
+ this.yytext = "";
370
+ this.match = "";
371
+ }
372
+ var rules = this._currentRules();
373
+ for (var i = 0; i < rules.length; i++) {
374
+ tempMatch = this._input.match(this.rules[rules[i]]);
375
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
376
+ match = tempMatch;
377
+ index = i;
378
+ if (this.options.backtrack_lexer) {
379
+ token = this.test_match(tempMatch, rules[i]);
380
+ if (token !== false) {
381
+ return token;
382
+ } else if (this._backtrack) {
383
+ match = false;
384
+ continue;
385
+ } else {
386
+ return false;
387
+ }
388
+ } else if (!this.options.flex) {
389
+ break;
390
+ }
391
+ }
392
+ }
393
+ if (match) {
394
+ token = this.test_match(match, rules[index]);
395
+ if (token !== false) {
396
+ return token;
397
+ }
398
+ return false;
399
+ }
400
+ if (this._input === "") {
401
+ return this.EOF;
402
+ } else {
403
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
404
+ text: "",
405
+ token: null,
406
+ line: this.yylineno
407
+ });
408
+ }
409
+ },
410
+ // return next match that has a token
411
+ lex: function lex() {
412
+ var r = this.next();
413
+ if (r) {
414
+ return r;
415
+ } else {
416
+ return this.lex();
417
+ }
418
+ },
419
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
420
+ begin: function begin(condition) {
421
+ this.conditionStack.push(condition);
422
+ },
423
+ // pop the previously active lexer condition state off the condition stack
424
+ popState: function popState() {
425
+ var n = this.conditionStack.length - 1;
426
+ if (n > 0) {
427
+ return this.conditionStack.pop();
428
+ } else {
429
+ return this.conditionStack[0];
430
+ }
431
+ },
432
+ // produce the lexer rule set which is active for the currently active lexer condition state
433
+ _currentRules: function _currentRules() {
434
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
435
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
436
+ } else {
437
+ return this.conditions["INITIAL"].rules;
438
+ }
439
+ },
440
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
441
+ topState: function topState(n) {
442
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
443
+ if (n >= 0) {
444
+ return this.conditionStack[n];
445
+ } else {
446
+ return "INITIAL";
447
+ }
448
+ },
449
+ // alias for begin(condition)
450
+ pushState: function pushState(condition) {
451
+ this.begin(condition);
452
+ },
453
+ // return the number of states currently on the stack
454
+ stateStackSize: function stateStackSize() {
455
+ return this.conditionStack.length;
456
+ },
457
+ options: { "case-insensitive": true },
458
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
459
+ switch ($avoiding_name_collisions) {
460
+ case 0:
461
+ this.pushState("csv");
462
+ return 4;
463
+ case 1:
464
+ return 10;
465
+ case 2:
466
+ return 5;
467
+ case 3:
468
+ return 12;
469
+ case 4:
470
+ this.pushState("escaped_text");
471
+ return 18;
472
+ case 5:
473
+ return 20;
474
+ case 6:
475
+ this.popState("escaped_text");
476
+ return 18;
477
+ case 7:
478
+ return 19;
479
+ }
480
+ },
481
+ rules: [/^(?:sankey-beta\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],
482
+ conditions: { "csv": { "rules": [1, 2, 3, 4, 5, 6, 7], "inclusive": false }, "escaped_text": { "rules": [6, 7], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7], "inclusive": true } }
483
+ };
484
+ return lexer2;
485
+ }();
486
+ parser2.lexer = lexer;
487
+ function Parser() {
488
+ this.yy = {};
489
+ }
490
+ Parser.prototype = parser2;
491
+ parser2.Parser = Parser;
492
+ return new Parser();
493
+ }();
494
+ parser.parser = parser;
495
+ const parser$1 = parser;
496
+ let links = [];
497
+ let nodes = [];
498
+ let nodesMap = {};
499
+ const clear = () => {
500
+ links = [];
501
+ nodes = [];
502
+ nodesMap = {};
503
+ clear$1();
504
+ };
505
+ class SankeyLink {
506
+ constructor(source, target, value2 = 0) {
507
+ this.source = source;
508
+ this.target = target;
509
+ this.value = value2;
510
+ }
511
+ }
512
+ const addLink = (source, target, value2) => {
513
+ links.push(new SankeyLink(source, target, value2));
514
+ };
515
+ class SankeyNode {
516
+ constructor(ID) {
517
+ this.ID = ID;
518
+ }
519
+ }
520
+ const findOrCreateNode = (ID) => {
521
+ ID = common.sanitizeText(ID, getConfig());
522
+ if (!nodesMap[ID]) {
523
+ nodesMap[ID] = new SankeyNode(ID);
524
+ nodes.push(nodesMap[ID]);
525
+ }
526
+ return nodesMap[ID];
527
+ };
528
+ const getNodes = () => nodes;
529
+ const getLinks = () => links;
530
+ const getGraph = () => ({
531
+ nodes: nodes.map((node) => ({ id: node.ID })),
532
+ links: links.map((link2) => ({
533
+ source: link2.source.ID,
534
+ target: link2.target.ID,
535
+ value: link2.value
536
+ }))
537
+ });
538
+ const db = {
539
+ nodesMap,
540
+ getConfig: () => getConfig().sankey,
541
+ getNodes,
542
+ getLinks,
543
+ getGraph,
544
+ addLink,
545
+ findOrCreateNode,
546
+ getAccTitle,
547
+ setAccTitle,
548
+ getAccDescription,
549
+ setAccDescription,
550
+ getDiagramTitle,
551
+ setDiagramTitle,
552
+ clear
553
+ };
554
+ function max(values, valueof) {
555
+ let max2;
556
+ if (valueof === void 0) {
557
+ for (const value2 of values) {
558
+ if (value2 != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) {
559
+ max2 = value2;
560
+ }
561
+ }
562
+ } else {
563
+ let index = -1;
564
+ for (let value2 of values) {
565
+ if ((value2 = valueof(value2, ++index, values)) != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) {
566
+ max2 = value2;
567
+ }
568
+ }
569
+ }
570
+ return max2;
571
+ }
572
+ function min(values, valueof) {
573
+ let min2;
574
+ if (valueof === void 0) {
575
+ for (const value2 of values) {
576
+ if (value2 != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) {
577
+ min2 = value2;
578
+ }
579
+ }
580
+ } else {
581
+ let index = -1;
582
+ for (let value2 of values) {
583
+ if ((value2 = valueof(value2, ++index, values)) != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) {
584
+ min2 = value2;
585
+ }
586
+ }
587
+ }
588
+ return min2;
589
+ }
590
+ function sum(values, valueof) {
591
+ let sum2 = 0;
592
+ if (valueof === void 0) {
593
+ for (let value2 of values) {
594
+ if (value2 = +value2) {
595
+ sum2 += value2;
596
+ }
597
+ }
598
+ } else {
599
+ let index = -1;
600
+ for (let value2 of values) {
601
+ if (value2 = +valueof(value2, ++index, values)) {
602
+ sum2 += value2;
603
+ }
604
+ }
605
+ }
606
+ return sum2;
607
+ }
608
+ function targetDepth(d) {
609
+ return d.target.depth;
610
+ }
611
+ function left(node) {
612
+ return node.depth;
613
+ }
614
+ function right(node, n) {
615
+ return n - 1 - node.height;
616
+ }
617
+ function justify(node, n) {
618
+ return node.sourceLinks.length ? node.depth : n - 1;
619
+ }
620
+ function center(node) {
621
+ return node.targetLinks.length ? node.depth : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1 : 0;
622
+ }
623
+ function constant$1(x2) {
624
+ return function() {
625
+ return x2;
626
+ };
627
+ }
628
+ function ascendingSourceBreadth(a, b) {
629
+ return ascendingBreadth(a.source, b.source) || a.index - b.index;
630
+ }
631
+ function ascendingTargetBreadth(a, b) {
632
+ return ascendingBreadth(a.target, b.target) || a.index - b.index;
633
+ }
634
+ function ascendingBreadth(a, b) {
635
+ return a.y0 - b.y0;
636
+ }
637
+ function value(d) {
638
+ return d.value;
639
+ }
640
+ function defaultId(d) {
641
+ return d.index;
642
+ }
643
+ function defaultNodes(graph) {
644
+ return graph.nodes;
645
+ }
646
+ function defaultLinks(graph) {
647
+ return graph.links;
648
+ }
649
+ function find(nodeById, id) {
650
+ const node = nodeById.get(id);
651
+ if (!node)
652
+ throw new Error("missing: " + id);
653
+ return node;
654
+ }
655
+ function computeLinkBreadths({ nodes: nodes2 }) {
656
+ for (const node of nodes2) {
657
+ let y0 = node.y0;
658
+ let y1 = y0;
659
+ for (const link2 of node.sourceLinks) {
660
+ link2.y0 = y0 + link2.width / 2;
661
+ y0 += link2.width;
662
+ }
663
+ for (const link2 of node.targetLinks) {
664
+ link2.y1 = y1 + link2.width / 2;
665
+ y1 += link2.width;
666
+ }
667
+ }
668
+ }
669
+ function Sankey() {
670
+ let x0 = 0, y0 = 0, x1 = 1, y1 = 1;
671
+ let dx = 24;
672
+ let dy = 8, py;
673
+ let id = defaultId;
674
+ let align = justify;
675
+ let sort;
676
+ let linkSort;
677
+ let nodes2 = defaultNodes;
678
+ let links2 = defaultLinks;
679
+ let iterations = 6;
680
+ function sankey() {
681
+ const graph = { nodes: nodes2.apply(null, arguments), links: links2.apply(null, arguments) };
682
+ computeNodeLinks(graph);
683
+ computeNodeValues(graph);
684
+ computeNodeDepths(graph);
685
+ computeNodeHeights(graph);
686
+ computeNodeBreadths(graph);
687
+ computeLinkBreadths(graph);
688
+ return graph;
689
+ }
690
+ sankey.update = function(graph) {
691
+ computeLinkBreadths(graph);
692
+ return graph;
693
+ };
694
+ sankey.nodeId = function(_) {
695
+ return arguments.length ? (id = typeof _ === "function" ? _ : constant$1(_), sankey) : id;
696
+ };
697
+ sankey.nodeAlign = function(_) {
698
+ return arguments.length ? (align = typeof _ === "function" ? _ : constant$1(_), sankey) : align;
699
+ };
700
+ sankey.nodeSort = function(_) {
701
+ return arguments.length ? (sort = _, sankey) : sort;
702
+ };
703
+ sankey.nodeWidth = function(_) {
704
+ return arguments.length ? (dx = +_, sankey) : dx;
705
+ };
706
+ sankey.nodePadding = function(_) {
707
+ return arguments.length ? (dy = py = +_, sankey) : dy;
708
+ };
709
+ sankey.nodes = function(_) {
710
+ return arguments.length ? (nodes2 = typeof _ === "function" ? _ : constant$1(_), sankey) : nodes2;
711
+ };
712
+ sankey.links = function(_) {
713
+ return arguments.length ? (links2 = typeof _ === "function" ? _ : constant$1(_), sankey) : links2;
714
+ };
715
+ sankey.linkSort = function(_) {
716
+ return arguments.length ? (linkSort = _, sankey) : linkSort;
717
+ };
718
+ sankey.size = function(_) {
719
+ return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];
720
+ };
721
+ sankey.extent = function(_) {
722
+ return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];
723
+ };
724
+ sankey.iterations = function(_) {
725
+ return arguments.length ? (iterations = +_, sankey) : iterations;
726
+ };
727
+ function computeNodeLinks({ nodes: nodes3, links: links3 }) {
728
+ for (const [i, node] of nodes3.entries()) {
729
+ node.index = i;
730
+ node.sourceLinks = [];
731
+ node.targetLinks = [];
732
+ }
733
+ const nodeById = new Map(nodes3.map((d, i) => [id(d, i, nodes3), d]));
734
+ for (const [i, link2] of links3.entries()) {
735
+ link2.index = i;
736
+ let { source, target } = link2;
737
+ if (typeof source !== "object")
738
+ source = link2.source = find(nodeById, source);
739
+ if (typeof target !== "object")
740
+ target = link2.target = find(nodeById, target);
741
+ source.sourceLinks.push(link2);
742
+ target.targetLinks.push(link2);
743
+ }
744
+ if (linkSort != null) {
745
+ for (const { sourceLinks, targetLinks } of nodes3) {
746
+ sourceLinks.sort(linkSort);
747
+ targetLinks.sort(linkSort);
748
+ }
749
+ }
750
+ }
751
+ function computeNodeValues({ nodes: nodes3 }) {
752
+ for (const node of nodes3) {
753
+ node.value = node.fixedValue === void 0 ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value)) : node.fixedValue;
754
+ }
755
+ }
756
+ function computeNodeDepths({ nodes: nodes3 }) {
757
+ const n = nodes3.length;
758
+ let current = new Set(nodes3);
759
+ let next = /* @__PURE__ */ new Set();
760
+ let x2 = 0;
761
+ while (current.size) {
762
+ for (const node of current) {
763
+ node.depth = x2;
764
+ for (const { target } of node.sourceLinks) {
765
+ next.add(target);
766
+ }
767
+ }
768
+ if (++x2 > n)
769
+ throw new Error("circular link");
770
+ current = next;
771
+ next = /* @__PURE__ */ new Set();
772
+ }
773
+ }
774
+ function computeNodeHeights({ nodes: nodes3 }) {
775
+ const n = nodes3.length;
776
+ let current = new Set(nodes3);
777
+ let next = /* @__PURE__ */ new Set();
778
+ let x2 = 0;
779
+ while (current.size) {
780
+ for (const node of current) {
781
+ node.height = x2;
782
+ for (const { source } of node.targetLinks) {
783
+ next.add(source);
784
+ }
785
+ }
786
+ if (++x2 > n)
787
+ throw new Error("circular link");
788
+ current = next;
789
+ next = /* @__PURE__ */ new Set();
790
+ }
791
+ }
792
+ function computeNodeLayers({ nodes: nodes3 }) {
793
+ const x2 = max(nodes3, (d) => d.depth) + 1;
794
+ const kx = (x1 - x0 - dx) / (x2 - 1);
795
+ const columns = new Array(x2);
796
+ for (const node of nodes3) {
797
+ const i = Math.max(0, Math.min(x2 - 1, Math.floor(align.call(null, node, x2))));
798
+ node.layer = i;
799
+ node.x0 = x0 + i * kx;
800
+ node.x1 = node.x0 + dx;
801
+ if (columns[i])
802
+ columns[i].push(node);
803
+ else
804
+ columns[i] = [node];
805
+ }
806
+ if (sort)
807
+ for (const column of columns) {
808
+ column.sort(sort);
809
+ }
810
+ return columns;
811
+ }
812
+ function initializeNodeBreadths(columns) {
813
+ const ky = min(columns, (c) => (y1 - y0 - (c.length - 1) * py) / sum(c, value));
814
+ for (const nodes3 of columns) {
815
+ let y2 = y0;
816
+ for (const node of nodes3) {
817
+ node.y0 = y2;
818
+ node.y1 = y2 + node.value * ky;
819
+ y2 = node.y1 + py;
820
+ for (const link2 of node.sourceLinks) {
821
+ link2.width = link2.value * ky;
822
+ }
823
+ }
824
+ y2 = (y1 - y2 + py) / (nodes3.length + 1);
825
+ for (let i = 0; i < nodes3.length; ++i) {
826
+ const node = nodes3[i];
827
+ node.y0 += y2 * (i + 1);
828
+ node.y1 += y2 * (i + 1);
829
+ }
830
+ reorderLinks(nodes3);
831
+ }
832
+ }
833
+ function computeNodeBreadths(graph) {
834
+ const columns = computeNodeLayers(graph);
835
+ py = Math.min(dy, (y1 - y0) / (max(columns, (c) => c.length) - 1));
836
+ initializeNodeBreadths(columns);
837
+ for (let i = 0; i < iterations; ++i) {
838
+ const alpha = Math.pow(0.99, i);
839
+ const beta = Math.max(1 - alpha, (i + 1) / iterations);
840
+ relaxRightToLeft(columns, alpha, beta);
841
+ relaxLeftToRight(columns, alpha, beta);
842
+ }
843
+ }
844
+ function relaxLeftToRight(columns, alpha, beta) {
845
+ for (let i = 1, n = columns.length; i < n; ++i) {
846
+ const column = columns[i];
847
+ for (const target of column) {
848
+ let y2 = 0;
849
+ let w = 0;
850
+ for (const { source, value: value2 } of target.targetLinks) {
851
+ let v = value2 * (target.layer - source.layer);
852
+ y2 += targetTop(source, target) * v;
853
+ w += v;
854
+ }
855
+ if (!(w > 0))
856
+ continue;
857
+ let dy2 = (y2 / w - target.y0) * alpha;
858
+ target.y0 += dy2;
859
+ target.y1 += dy2;
860
+ reorderNodeLinks(target);
861
+ }
862
+ if (sort === void 0)
863
+ column.sort(ascendingBreadth);
864
+ resolveCollisions(column, beta);
865
+ }
866
+ }
867
+ function relaxRightToLeft(columns, alpha, beta) {
868
+ for (let n = columns.length, i = n - 2; i >= 0; --i) {
869
+ const column = columns[i];
870
+ for (const source of column) {
871
+ let y2 = 0;
872
+ let w = 0;
873
+ for (const { target, value: value2 } of source.sourceLinks) {
874
+ let v = value2 * (target.layer - source.layer);
875
+ y2 += sourceTop(source, target) * v;
876
+ w += v;
877
+ }
878
+ if (!(w > 0))
879
+ continue;
880
+ let dy2 = (y2 / w - source.y0) * alpha;
881
+ source.y0 += dy2;
882
+ source.y1 += dy2;
883
+ reorderNodeLinks(source);
884
+ }
885
+ if (sort === void 0)
886
+ column.sort(ascendingBreadth);
887
+ resolveCollisions(column, beta);
888
+ }
889
+ }
890
+ function resolveCollisions(nodes3, alpha) {
891
+ const i = nodes3.length >> 1;
892
+ const subject = nodes3[i];
893
+ resolveCollisionsBottomToTop(nodes3, subject.y0 - py, i - 1, alpha);
894
+ resolveCollisionsTopToBottom(nodes3, subject.y1 + py, i + 1, alpha);
895
+ resolveCollisionsBottomToTop(nodes3, y1, nodes3.length - 1, alpha);
896
+ resolveCollisionsTopToBottom(nodes3, y0, 0, alpha);
897
+ }
898
+ function resolveCollisionsTopToBottom(nodes3, y2, i, alpha) {
899
+ for (; i < nodes3.length; ++i) {
900
+ const node = nodes3[i];
901
+ const dy2 = (y2 - node.y0) * alpha;
902
+ if (dy2 > 1e-6)
903
+ node.y0 += dy2, node.y1 += dy2;
904
+ y2 = node.y1 + py;
905
+ }
906
+ }
907
+ function resolveCollisionsBottomToTop(nodes3, y2, i, alpha) {
908
+ for (; i >= 0; --i) {
909
+ const node = nodes3[i];
910
+ const dy2 = (node.y1 - y2) * alpha;
911
+ if (dy2 > 1e-6)
912
+ node.y0 -= dy2, node.y1 -= dy2;
913
+ y2 = node.y0 - py;
914
+ }
915
+ }
916
+ function reorderNodeLinks({ sourceLinks, targetLinks }) {
917
+ if (linkSort === void 0) {
918
+ for (const { source: { sourceLinks: sourceLinks2 } } of targetLinks) {
919
+ sourceLinks2.sort(ascendingTargetBreadth);
920
+ }
921
+ for (const { target: { targetLinks: targetLinks2 } } of sourceLinks) {
922
+ targetLinks2.sort(ascendingSourceBreadth);
923
+ }
924
+ }
925
+ }
926
+ function reorderLinks(nodes3) {
927
+ if (linkSort === void 0) {
928
+ for (const { sourceLinks, targetLinks } of nodes3) {
929
+ sourceLinks.sort(ascendingTargetBreadth);
930
+ targetLinks.sort(ascendingSourceBreadth);
931
+ }
932
+ }
933
+ }
934
+ function targetTop(source, target) {
935
+ let y2 = source.y0 - (source.sourceLinks.length - 1) * py / 2;
936
+ for (const { target: node, width } of source.sourceLinks) {
937
+ if (node === target)
938
+ break;
939
+ y2 += width + py;
940
+ }
941
+ for (const { source: node, width } of target.targetLinks) {
942
+ if (node === source)
943
+ break;
944
+ y2 -= width;
945
+ }
946
+ return y2;
947
+ }
948
+ function sourceTop(source, target) {
949
+ let y2 = target.y0 - (target.targetLinks.length - 1) * py / 2;
950
+ for (const { source: node, width } of target.targetLinks) {
951
+ if (node === source)
952
+ break;
953
+ y2 += width + py;
954
+ }
955
+ for (const { target: node, width } of source.sourceLinks) {
956
+ if (node === target)
957
+ break;
958
+ y2 -= width;
959
+ }
960
+ return y2;
961
+ }
962
+ return sankey;
963
+ }
964
+ var pi = Math.PI, tau = 2 * pi, epsilon = 1e-6, tauEpsilon = tau - epsilon;
965
+ function Path() {
966
+ this._x0 = this._y0 = // start of current subpath
967
+ this._x1 = this._y1 = null;
968
+ this._ = "";
969
+ }
970
+ function path() {
971
+ return new Path();
972
+ }
973
+ Path.prototype = path.prototype = {
974
+ constructor: Path,
975
+ moveTo: function(x2, y2) {
976
+ this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2);
977
+ },
978
+ closePath: function() {
979
+ if (this._x1 !== null) {
980
+ this._x1 = this._x0, this._y1 = this._y0;
981
+ this._ += "Z";
982
+ }
983
+ },
984
+ lineTo: function(x2, y2) {
985
+ this._ += "L" + (this._x1 = +x2) + "," + (this._y1 = +y2);
986
+ },
987
+ quadraticCurveTo: function(x1, y1, x2, y2) {
988
+ this._ += "Q" + +x1 + "," + +y1 + "," + (this._x1 = +x2) + "," + (this._y1 = +y2);
989
+ },
990
+ bezierCurveTo: function(x1, y1, x2, y2, x3, y3) {
991
+ this._ += "C" + +x1 + "," + +y1 + "," + +x2 + "," + +y2 + "," + (this._x1 = +x3) + "," + (this._y1 = +y3);
992
+ },
993
+ arcTo: function(x1, y1, x2, y2, r) {
994
+ x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
995
+ var x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01;
996
+ if (r < 0)
997
+ throw new Error("negative radius: " + r);
998
+ if (this._x1 === null) {
999
+ this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1);
1000
+ } else if (!(l01_2 > epsilon))
1001
+ ;
1002
+ else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
1003
+ this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
1004
+ } else {
1005
+ var x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21;
1006
+ if (Math.abs(t01 - 1) > epsilon) {
1007
+ this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
1008
+ }
1009
+ this._ += "A" + r + "," + r + ",0,0," + +(y01 * x20 > x01 * y20) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21);
1010
+ }
1011
+ },
1012
+ arc: function(x2, y2, r, a0, a1, ccw) {
1013
+ x2 = +x2, y2 = +y2, r = +r, ccw = !!ccw;
1014
+ var dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x2 + dx, y0 = y2 + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0;
1015
+ if (r < 0)
1016
+ throw new Error("negative radius: " + r);
1017
+ if (this._x1 === null) {
1018
+ this._ += "M" + x0 + "," + y0;
1019
+ } else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
1020
+ this._ += "L" + x0 + "," + y0;
1021
+ }
1022
+ if (!r)
1023
+ return;
1024
+ if (da < 0)
1025
+ da = da % tau + tau;
1026
+ if (da > tauEpsilon) {
1027
+ this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x2 - dx) + "," + (y2 - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0);
1028
+ } else if (da > epsilon) {
1029
+ this._ += "A" + r + "," + r + ",0," + +(da >= pi) + "," + cw + "," + (this._x1 = x2 + r * Math.cos(a1)) + "," + (this._y1 = y2 + r * Math.sin(a1));
1030
+ }
1031
+ },
1032
+ rect: function(x2, y2, w, h) {
1033
+ this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2) + "h" + +w + "v" + +h + "h" + -w + "Z";
1034
+ },
1035
+ toString: function() {
1036
+ return this._;
1037
+ }
1038
+ };
1039
+ function constant(x2) {
1040
+ return function constant2() {
1041
+ return x2;
1042
+ };
1043
+ }
1044
+ function x(p) {
1045
+ return p[0];
1046
+ }
1047
+ function y(p) {
1048
+ return p[1];
1049
+ }
1050
+ var slice = Array.prototype.slice;
1051
+ function linkSource(d) {
1052
+ return d.source;
1053
+ }
1054
+ function linkTarget(d) {
1055
+ return d.target;
1056
+ }
1057
+ function link(curve) {
1058
+ var source = linkSource, target = linkTarget, x$1 = x, y$1 = y, context = null;
1059
+ function link2() {
1060
+ var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);
1061
+ if (!context)
1062
+ context = buffer = path();
1063
+ curve(context, +x$1.apply(this, (argv[0] = s, argv)), +y$1.apply(this, argv), +x$1.apply(this, (argv[0] = t, argv)), +y$1.apply(this, argv));
1064
+ if (buffer)
1065
+ return context = null, buffer + "" || null;
1066
+ }
1067
+ link2.source = function(_) {
1068
+ return arguments.length ? (source = _, link2) : source;
1069
+ };
1070
+ link2.target = function(_) {
1071
+ return arguments.length ? (target = _, link2) : target;
1072
+ };
1073
+ link2.x = function(_) {
1074
+ return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), link2) : x$1;
1075
+ };
1076
+ link2.y = function(_) {
1077
+ return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), link2) : y$1;
1078
+ };
1079
+ link2.context = function(_) {
1080
+ return arguments.length ? (context = _ == null ? null : _, link2) : context;
1081
+ };
1082
+ return link2;
1083
+ }
1084
+ function curveHorizontal(context, x0, y0, x1, y1) {
1085
+ context.moveTo(x0, y0);
1086
+ context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);
1087
+ }
1088
+ function linkHorizontal() {
1089
+ return link(curveHorizontal);
1090
+ }
1091
+ function horizontalSource(d) {
1092
+ return [d.source.x1, d.y0];
1093
+ }
1094
+ function horizontalTarget(d) {
1095
+ return [d.target.x0, d.y1];
1096
+ }
1097
+ function d3SankeyLinkHorizontal() {
1098
+ return linkHorizontal().source(horizontalSource).target(horizontalTarget);
1099
+ }
1100
+ const _Uid = class _Uid2 {
1101
+ static next(name) {
1102
+ return new _Uid2(name + ++_Uid2.count);
1103
+ }
1104
+ constructor(id) {
1105
+ this.id = id;
1106
+ this.href = `#${id}`;
1107
+ }
1108
+ toString() {
1109
+ return "url(" + this.href + ")";
1110
+ }
1111
+ };
1112
+ _Uid.count = 0;
1113
+ let Uid = _Uid;
1114
+ const alignmentsMap = {
1115
+ left,
1116
+ right,
1117
+ center,
1118
+ justify
1119
+ };
1120
+ const draw = function(text, id, _version, diagObj) {
1121
+ const { securityLevel, sankey: conf } = getConfig();
1122
+ const defaultSankeyConfig = defaultConfig.sankey;
1123
+ let sandboxElement;
1124
+ if (securityLevel === "sandbox") {
1125
+ sandboxElement = d3select("#i" + id);
1126
+ }
1127
+ const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body");
1128
+ const svg = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : d3select(`[id="${id}"]`);
1129
+ const width = (conf == null ? void 0 : conf.width) ?? defaultSankeyConfig.width;
1130
+ const height = (conf == null ? void 0 : conf.height) ?? defaultSankeyConfig.width;
1131
+ const useMaxWidth = (conf == null ? void 0 : conf.useMaxWidth) ?? defaultSankeyConfig.useMaxWidth;
1132
+ const nodeAlignment = (conf == null ? void 0 : conf.nodeAlignment) ?? defaultSankeyConfig.nodeAlignment;
1133
+ const prefix = (conf == null ? void 0 : conf.prefix) ?? defaultSankeyConfig.prefix;
1134
+ const suffix = (conf == null ? void 0 : conf.suffix) ?? defaultSankeyConfig.suffix;
1135
+ const showValues = (conf == null ? void 0 : conf.showValues) ?? defaultSankeyConfig.showValues;
1136
+ const graph = diagObj.db.getGraph();
1137
+ const nodeAlign = alignmentsMap[nodeAlignment];
1138
+ const nodeWidth = 10;
1139
+ const sankey = Sankey().nodeId((d) => d.id).nodeWidth(nodeWidth).nodePadding(10 + (showValues ? 15 : 0)).nodeAlign(nodeAlign).extent([
1140
+ [0, 0],
1141
+ [width, height]
1142
+ ]);
1143
+ sankey(graph);
1144
+ const colorScheme = ordinal(d3schemeTableau10);
1145
+ svg.append("g").attr("class", "nodes").selectAll(".node").data(graph.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = Uid.next("node-")).id).attr("transform", function(d) {
1146
+ return "translate(" + d.x0 + "," + d.y0 + ")";
1147
+ }).attr("x", (d) => d.x0).attr("y", (d) => d.y0).append("rect").attr("height", (d) => {
1148
+ return d.y1 - d.y0;
1149
+ }).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => colorScheme(d.id));
1150
+ const getText = ({ id: id2, value: value2 }) => {
1151
+ if (!showValues) {
1152
+ return id2;
1153
+ }
1154
+ return `${id2}
1155
+ ${prefix}${Math.round(value2 * 100) / 100}${suffix}`;
1156
+ };
1157
+ svg.append("g").attr("class", "node-labels").attr("font-family", "sans-serif").attr("font-size", 14).selectAll("text").data(graph.nodes).join("text").attr("x", (d) => d.x0 < width / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${showValues ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < width / 2 ? "start" : "end").text(getText);
1158
+ const link2 = svg.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(graph.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply");
1159
+ const linkColor = (conf == null ? void 0 : conf.linkColor) || "gradient";
1160
+ if (linkColor === "gradient") {
1161
+ const gradient = link2.append("linearGradient").attr("id", (d) => (d.uid = Uid.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (d) => d.source.x1).attr("x2", (d) => d.target.x0);
1162
+ gradient.append("stop").attr("offset", "0%").attr("stop-color", (d) => colorScheme(d.source.id));
1163
+ gradient.append("stop").attr("offset", "100%").attr("stop-color", (d) => colorScheme(d.target.id));
1164
+ }
1165
+ let coloring;
1166
+ switch (linkColor) {
1167
+ case "gradient":
1168
+ coloring = (d) => d.uid;
1169
+ break;
1170
+ case "source":
1171
+ coloring = (d) => colorScheme(d.source.id);
1172
+ break;
1173
+ case "target":
1174
+ coloring = (d) => colorScheme(d.target.id);
1175
+ break;
1176
+ default:
1177
+ coloring = linkColor;
1178
+ }
1179
+ link2.append("path").attr("d", d3SankeyLinkHorizontal()).attr("stroke", coloring).attr("stroke-width", (d) => Math.max(1, d.width));
1180
+ setupGraphViewbox(void 0, svg, 0, useMaxWidth);
1181
+ };
1182
+ const renderer = {
1183
+ draw
1184
+ };
1185
+ const prepareTextForParsing = (text) => {
1186
+ const textToParse = text.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, "\n").trim();
1187
+ return textToParse;
1188
+ };
1189
+ const originalParse = parser$1.parse.bind(parser$1);
1190
+ parser$1.parse = (text) => originalParse(prepareTextForParsing(text));
1191
+ const diagram = {
1192
+ parser: parser$1,
1193
+ db,
1194
+ renderer
1195
+ };
1196
+ export {
1197
+ diagram
1198
+ };