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,2061 @@
1
+ import { sanitizeUrl } from "@braintree/sanitize-url";
2
+ import dayjs from "dayjs";
3
+ import dayjsIsoWeek from "dayjs/plugin/isoWeek.js";
4
+ import dayjsCustomParseFormat from "dayjs/plugin/customParseFormat.js";
5
+ import dayjsAdvancedFormat from "dayjs/plugin/advancedFormat.js";
6
+ import { c as getConfig, s as setAccTitle, g as getAccTitle, q as setDiagramTitle, t as getDiagramTitle, b as setAccDescription, a as getAccDescription, v as clear$1, u as utils, l as log, i as configureSvgSize, e as common } from "./mermaid-6dc72991.js";
7
+ import { select, scaleTime, min, max, scaleLinear, interpolateHcl, axisBottom, timeFormat, timeMonth, timeDay, timeHour, timeMinute, timeSecond, timeMillisecond, axisTop, timeMonday, timeTuesday, timeWednesday, timeThursday, timeFriday, timeSaturday, timeSunday } from "d3";
8
+ import "ts-dedent";
9
+ import "dompurify";
10
+ import "khroma";
11
+ import "lodash-es/memoize.js";
12
+ import "lodash-es/merge.js";
13
+ import "stylis";
14
+ import "lodash-es/isEmpty.js";
15
+ var parser = function() {
16
+ var o = function(k, v, o2, l) {
17
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
18
+ ;
19
+ return o2;
20
+ }, $V0 = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 35, 37], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 29], $V6 = [1, 30], $V7 = [1, 31], $V8 = [1, 9], $V9 = [1, 10], $Va = [1, 11], $Vb = [1, 12], $Vc = [1, 13], $Vd = [1, 14], $Ve = [1, 15], $Vf = [1, 16], $Vg = [1, 18], $Vh = [1, 19], $Vi = [1, 20], $Vj = [1, 21], $Vk = [1, 22], $Vl = [1, 24], $Vm = [1, 32];
21
+ var parser2 = {
22
+ trace: function trace() {
23
+ },
24
+ yy: {},
25
+ symbols_: { "error": 2, "start": 3, "gantt": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NL": 10, "weekday": 11, "weekday_monday": 12, "weekday_tuesday": 13, "weekday_wednesday": 14, "weekday_thursday": 15, "weekday_friday": 16, "weekday_saturday": 17, "weekday_sunday": 18, "dateFormat": 19, "inclusiveEndDates": 20, "topAxis": 21, "axisFormat": 22, "tickInterval": 23, "excludes": 24, "includes": 25, "todayMarker": 26, "title": 27, "acc_title": 28, "acc_title_value": 29, "acc_descr": 30, "acc_descr_value": 31, "acc_descr_multiline_value": 32, "section": 33, "clickStatement": 34, "taskTxt": 35, "taskData": 36, "click": 37, "callbackname": 38, "callbackargs": 39, "href": 40, "clickStatementDebug": 41, "$accept": 0, "$end": 1 },
26
+ terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 19: "dateFormat", 20: "inclusiveEndDates", 21: "topAxis", 22: "axisFormat", 23: "tickInterval", 24: "excludes", 25: "includes", 26: "todayMarker", 27: "title", 28: "acc_title", 29: "acc_title_value", 30: "acc_descr", 31: "acc_descr_value", 32: "acc_descr_multiline_value", 33: "section", 35: "taskTxt", 36: "taskData", 37: "click", 38: "callbackname", 39: "callbackargs", 40: "href" },
27
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [34, 2], [34, 3], [34, 3], [34, 4], [34, 3], [34, 4], [34, 2], [41, 2], [41, 3], [41, 3], [41, 4], [41, 3], [41, 4], [41, 2]],
28
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
29
+ var $0 = $$.length - 1;
30
+ switch (yystate) {
31
+ case 1:
32
+ return $$[$0 - 1];
33
+ case 2:
34
+ this.$ = [];
35
+ break;
36
+ case 3:
37
+ $$[$0 - 1].push($$[$0]);
38
+ this.$ = $$[$0 - 1];
39
+ break;
40
+ case 4:
41
+ case 5:
42
+ this.$ = $$[$0];
43
+ break;
44
+ case 6:
45
+ case 7:
46
+ this.$ = [];
47
+ break;
48
+ case 8:
49
+ yy.setWeekday("monday");
50
+ break;
51
+ case 9:
52
+ yy.setWeekday("tuesday");
53
+ break;
54
+ case 10:
55
+ yy.setWeekday("wednesday");
56
+ break;
57
+ case 11:
58
+ yy.setWeekday("thursday");
59
+ break;
60
+ case 12:
61
+ yy.setWeekday("friday");
62
+ break;
63
+ case 13:
64
+ yy.setWeekday("saturday");
65
+ break;
66
+ case 14:
67
+ yy.setWeekday("sunday");
68
+ break;
69
+ case 15:
70
+ yy.setDateFormat($$[$0].substr(11));
71
+ this.$ = $$[$0].substr(11);
72
+ break;
73
+ case 16:
74
+ yy.enableInclusiveEndDates();
75
+ this.$ = $$[$0].substr(18);
76
+ break;
77
+ case 17:
78
+ yy.TopAxis();
79
+ this.$ = $$[$0].substr(8);
80
+ break;
81
+ case 18:
82
+ yy.setAxisFormat($$[$0].substr(11));
83
+ this.$ = $$[$0].substr(11);
84
+ break;
85
+ case 19:
86
+ yy.setTickInterval($$[$0].substr(13));
87
+ this.$ = $$[$0].substr(13);
88
+ break;
89
+ case 20:
90
+ yy.setExcludes($$[$0].substr(9));
91
+ this.$ = $$[$0].substr(9);
92
+ break;
93
+ case 21:
94
+ yy.setIncludes($$[$0].substr(9));
95
+ this.$ = $$[$0].substr(9);
96
+ break;
97
+ case 22:
98
+ yy.setTodayMarker($$[$0].substr(12));
99
+ this.$ = $$[$0].substr(12);
100
+ break;
101
+ case 24:
102
+ yy.setDiagramTitle($$[$0].substr(6));
103
+ this.$ = $$[$0].substr(6);
104
+ break;
105
+ case 25:
106
+ this.$ = $$[$0].trim();
107
+ yy.setAccTitle(this.$);
108
+ break;
109
+ case 26:
110
+ case 27:
111
+ this.$ = $$[$0].trim();
112
+ yy.setAccDescription(this.$);
113
+ break;
114
+ case 28:
115
+ yy.addSection($$[$0].substr(8));
116
+ this.$ = $$[$0].substr(8);
117
+ break;
118
+ case 30:
119
+ yy.addTask($$[$0 - 1], $$[$0]);
120
+ this.$ = "task";
121
+ break;
122
+ case 31:
123
+ this.$ = $$[$0 - 1];
124
+ yy.setClickEvent($$[$0 - 1], $$[$0], null);
125
+ break;
126
+ case 32:
127
+ this.$ = $$[$0 - 2];
128
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
129
+ break;
130
+ case 33:
131
+ this.$ = $$[$0 - 2];
132
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], null);
133
+ yy.setLink($$[$0 - 2], $$[$0]);
134
+ break;
135
+ case 34:
136
+ this.$ = $$[$0 - 3];
137
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
138
+ yy.setLink($$[$0 - 3], $$[$0]);
139
+ break;
140
+ case 35:
141
+ this.$ = $$[$0 - 2];
142
+ yy.setClickEvent($$[$0 - 2], $$[$0], null);
143
+ yy.setLink($$[$0 - 2], $$[$0 - 1]);
144
+ break;
145
+ case 36:
146
+ this.$ = $$[$0 - 3];
147
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 1], $$[$0]);
148
+ yy.setLink($$[$0 - 3], $$[$0 - 2]);
149
+ break;
150
+ case 37:
151
+ this.$ = $$[$0 - 1];
152
+ yy.setLink($$[$0 - 1], $$[$0]);
153
+ break;
154
+ case 38:
155
+ case 44:
156
+ this.$ = $$[$0 - 1] + " " + $$[$0];
157
+ break;
158
+ case 39:
159
+ case 40:
160
+ case 42:
161
+ this.$ = $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0];
162
+ break;
163
+ case 41:
164
+ case 43:
165
+ this.$ = $$[$0 - 3] + " " + $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0];
166
+ break;
167
+ }
168
+ },
169
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 33, 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), o($V0, [2, 18]), o($V0, [2, 19]), o($V0, [2, 20]), o($V0, [2, 21]), o($V0, [2, 22]), o($V0, [2, 23]), o($V0, [2, 24]), { 29: [1, 34] }, { 31: [1, 35] }, o($V0, [2, 27]), o($V0, [2, 28]), o($V0, [2, 29]), { 36: [1, 36] }, o($V0, [2, 8]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), { 38: [1, 37], 40: [1, 38] }, o($V0, [2, 4]), o($V0, [2, 25]), o($V0, [2, 26]), o($V0, [2, 30]), o($V0, [2, 31], { 39: [1, 39], 40: [1, 40] }), o($V0, [2, 37], { 38: [1, 41] }), o($V0, [2, 32], { 40: [1, 42] }), o($V0, [2, 33]), o($V0, [2, 35], { 39: [1, 43] }), o($V0, [2, 34]), o($V0, [2, 36])],
170
+ defaultActions: {},
171
+ parseError: function parseError(str, hash) {
172
+ if (hash.recoverable) {
173
+ this.trace(str);
174
+ } else {
175
+ var error = new Error(str);
176
+ error.hash = hash;
177
+ throw error;
178
+ }
179
+ },
180
+ parse: function parse(input) {
181
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
182
+ var args = lstack.slice.call(arguments, 1);
183
+ var lexer2 = Object.create(this.lexer);
184
+ var sharedState = { yy: {} };
185
+ for (var k in this.yy) {
186
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
187
+ sharedState.yy[k] = this.yy[k];
188
+ }
189
+ }
190
+ lexer2.setInput(input, sharedState.yy);
191
+ sharedState.yy.lexer = lexer2;
192
+ sharedState.yy.parser = this;
193
+ if (typeof lexer2.yylloc == "undefined") {
194
+ lexer2.yylloc = {};
195
+ }
196
+ var yyloc = lexer2.yylloc;
197
+ lstack.push(yyloc);
198
+ var ranges = lexer2.options && lexer2.options.ranges;
199
+ if (typeof sharedState.yy.parseError === "function") {
200
+ this.parseError = sharedState.yy.parseError;
201
+ } else {
202
+ this.parseError = Object.getPrototypeOf(this).parseError;
203
+ }
204
+ function lex() {
205
+ var token;
206
+ token = tstack.pop() || lexer2.lex() || EOF;
207
+ if (typeof token !== "number") {
208
+ if (token instanceof Array) {
209
+ tstack = token;
210
+ token = tstack.pop();
211
+ }
212
+ token = self.symbols_[token] || token;
213
+ }
214
+ return token;
215
+ }
216
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
217
+ while (true) {
218
+ state = stack[stack.length - 1];
219
+ if (this.defaultActions[state]) {
220
+ action = this.defaultActions[state];
221
+ } else {
222
+ if (symbol === null || typeof symbol == "undefined") {
223
+ symbol = lex();
224
+ }
225
+ action = table[state] && table[state][symbol];
226
+ }
227
+ if (typeof action === "undefined" || !action.length || !action[0]) {
228
+ var errStr = "";
229
+ expected = [];
230
+ for (p in table[state]) {
231
+ if (this.terminals_[p] && p > TERROR) {
232
+ expected.push("'" + this.terminals_[p] + "'");
233
+ }
234
+ }
235
+ if (lexer2.showPosition) {
236
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
237
+ } else {
238
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
239
+ }
240
+ this.parseError(errStr, {
241
+ text: lexer2.match,
242
+ token: this.terminals_[symbol] || symbol,
243
+ line: lexer2.yylineno,
244
+ loc: yyloc,
245
+ expected
246
+ });
247
+ }
248
+ if (action[0] instanceof Array && action.length > 1) {
249
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
250
+ }
251
+ switch (action[0]) {
252
+ case 1:
253
+ stack.push(symbol);
254
+ vstack.push(lexer2.yytext);
255
+ lstack.push(lexer2.yylloc);
256
+ stack.push(action[1]);
257
+ symbol = null;
258
+ {
259
+ yyleng = lexer2.yyleng;
260
+ yytext = lexer2.yytext;
261
+ yylineno = lexer2.yylineno;
262
+ yyloc = lexer2.yylloc;
263
+ }
264
+ break;
265
+ case 2:
266
+ len = this.productions_[action[1]][1];
267
+ yyval.$ = vstack[vstack.length - len];
268
+ yyval._$ = {
269
+ first_line: lstack[lstack.length - (len || 1)].first_line,
270
+ last_line: lstack[lstack.length - 1].last_line,
271
+ first_column: lstack[lstack.length - (len || 1)].first_column,
272
+ last_column: lstack[lstack.length - 1].last_column
273
+ };
274
+ if (ranges) {
275
+ yyval._$.range = [
276
+ lstack[lstack.length - (len || 1)].range[0],
277
+ lstack[lstack.length - 1].range[1]
278
+ ];
279
+ }
280
+ r = this.performAction.apply(yyval, [
281
+ yytext,
282
+ yyleng,
283
+ yylineno,
284
+ sharedState.yy,
285
+ action[1],
286
+ vstack,
287
+ lstack
288
+ ].concat(args));
289
+ if (typeof r !== "undefined") {
290
+ return r;
291
+ }
292
+ if (len) {
293
+ stack = stack.slice(0, -1 * len * 2);
294
+ vstack = vstack.slice(0, -1 * len);
295
+ lstack = lstack.slice(0, -1 * len);
296
+ }
297
+ stack.push(this.productions_[action[1]][0]);
298
+ vstack.push(yyval.$);
299
+ lstack.push(yyval._$);
300
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
301
+ stack.push(newState);
302
+ break;
303
+ case 3:
304
+ return true;
305
+ }
306
+ }
307
+ return true;
308
+ }
309
+ };
310
+ var lexer = function() {
311
+ var lexer2 = {
312
+ EOF: 1,
313
+ parseError: function parseError(str, hash) {
314
+ if (this.yy.parser) {
315
+ this.yy.parser.parseError(str, hash);
316
+ } else {
317
+ throw new Error(str);
318
+ }
319
+ },
320
+ // resets the lexer, sets new input
321
+ setInput: function(input, yy) {
322
+ this.yy = yy || this.yy || {};
323
+ this._input = input;
324
+ this._more = this._backtrack = this.done = false;
325
+ this.yylineno = this.yyleng = 0;
326
+ this.yytext = this.matched = this.match = "";
327
+ this.conditionStack = ["INITIAL"];
328
+ this.yylloc = {
329
+ first_line: 1,
330
+ first_column: 0,
331
+ last_line: 1,
332
+ last_column: 0
333
+ };
334
+ if (this.options.ranges) {
335
+ this.yylloc.range = [0, 0];
336
+ }
337
+ this.offset = 0;
338
+ return this;
339
+ },
340
+ // consumes and returns one char from the input
341
+ input: function() {
342
+ var ch = this._input[0];
343
+ this.yytext += ch;
344
+ this.yyleng++;
345
+ this.offset++;
346
+ this.match += ch;
347
+ this.matched += ch;
348
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
349
+ if (lines) {
350
+ this.yylineno++;
351
+ this.yylloc.last_line++;
352
+ } else {
353
+ this.yylloc.last_column++;
354
+ }
355
+ if (this.options.ranges) {
356
+ this.yylloc.range[1]++;
357
+ }
358
+ this._input = this._input.slice(1);
359
+ return ch;
360
+ },
361
+ // unshifts one char (or a string) into the input
362
+ unput: function(ch) {
363
+ var len = ch.length;
364
+ var lines = ch.split(/(?:\r\n?|\n)/g);
365
+ this._input = ch + this._input;
366
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
367
+ this.offset -= len;
368
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
369
+ this.match = this.match.substr(0, this.match.length - 1);
370
+ this.matched = this.matched.substr(0, this.matched.length - 1);
371
+ if (lines.length - 1) {
372
+ this.yylineno -= lines.length - 1;
373
+ }
374
+ var r = this.yylloc.range;
375
+ this.yylloc = {
376
+ first_line: this.yylloc.first_line,
377
+ last_line: this.yylineno + 1,
378
+ first_column: this.yylloc.first_column,
379
+ 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
380
+ };
381
+ if (this.options.ranges) {
382
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
383
+ }
384
+ this.yyleng = this.yytext.length;
385
+ return this;
386
+ },
387
+ // When called from action, caches matched text and appends it on next action
388
+ more: function() {
389
+ this._more = true;
390
+ return this;
391
+ },
392
+ // 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.
393
+ reject: function() {
394
+ if (this.options.backtrack_lexer) {
395
+ this._backtrack = true;
396
+ } else {
397
+ 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(), {
398
+ text: "",
399
+ token: null,
400
+ line: this.yylineno
401
+ });
402
+ }
403
+ return this;
404
+ },
405
+ // retain first n characters of the match
406
+ less: function(n) {
407
+ this.unput(this.match.slice(n));
408
+ },
409
+ // displays already matched input, i.e. for error messages
410
+ pastInput: function() {
411
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
412
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
413
+ },
414
+ // displays upcoming input, i.e. for error messages
415
+ upcomingInput: function() {
416
+ var next = this.match;
417
+ if (next.length < 20) {
418
+ next += this._input.substr(0, 20 - next.length);
419
+ }
420
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
421
+ },
422
+ // displays the character position where the lexing error occurred, i.e. for error messages
423
+ showPosition: function() {
424
+ var pre = this.pastInput();
425
+ var c = new Array(pre.length + 1).join("-");
426
+ return pre + this.upcomingInput() + "\n" + c + "^";
427
+ },
428
+ // test the lexed token: return FALSE when not a match, otherwise return token
429
+ test_match: function(match, indexed_rule) {
430
+ var token, lines, backup;
431
+ if (this.options.backtrack_lexer) {
432
+ backup = {
433
+ yylineno: this.yylineno,
434
+ yylloc: {
435
+ first_line: this.yylloc.first_line,
436
+ last_line: this.last_line,
437
+ first_column: this.yylloc.first_column,
438
+ last_column: this.yylloc.last_column
439
+ },
440
+ yytext: this.yytext,
441
+ match: this.match,
442
+ matches: this.matches,
443
+ matched: this.matched,
444
+ yyleng: this.yyleng,
445
+ offset: this.offset,
446
+ _more: this._more,
447
+ _input: this._input,
448
+ yy: this.yy,
449
+ conditionStack: this.conditionStack.slice(0),
450
+ done: this.done
451
+ };
452
+ if (this.options.ranges) {
453
+ backup.yylloc.range = this.yylloc.range.slice(0);
454
+ }
455
+ }
456
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
457
+ if (lines) {
458
+ this.yylineno += lines.length;
459
+ }
460
+ this.yylloc = {
461
+ first_line: this.yylloc.last_line,
462
+ last_line: this.yylineno + 1,
463
+ first_column: this.yylloc.last_column,
464
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
465
+ };
466
+ this.yytext += match[0];
467
+ this.match += match[0];
468
+ this.matches = match;
469
+ this.yyleng = this.yytext.length;
470
+ if (this.options.ranges) {
471
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
472
+ }
473
+ this._more = false;
474
+ this._backtrack = false;
475
+ this._input = this._input.slice(match[0].length);
476
+ this.matched += match[0];
477
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
478
+ if (this.done && this._input) {
479
+ this.done = false;
480
+ }
481
+ if (token) {
482
+ return token;
483
+ } else if (this._backtrack) {
484
+ for (var k in backup) {
485
+ this[k] = backup[k];
486
+ }
487
+ return false;
488
+ }
489
+ return false;
490
+ },
491
+ // return next match in input
492
+ next: function() {
493
+ if (this.done) {
494
+ return this.EOF;
495
+ }
496
+ if (!this._input) {
497
+ this.done = true;
498
+ }
499
+ var token, match, tempMatch, index;
500
+ if (!this._more) {
501
+ this.yytext = "";
502
+ this.match = "";
503
+ }
504
+ var rules = this._currentRules();
505
+ for (var i = 0; i < rules.length; i++) {
506
+ tempMatch = this._input.match(this.rules[rules[i]]);
507
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
508
+ match = tempMatch;
509
+ index = i;
510
+ if (this.options.backtrack_lexer) {
511
+ token = this.test_match(tempMatch, rules[i]);
512
+ if (token !== false) {
513
+ return token;
514
+ } else if (this._backtrack) {
515
+ match = false;
516
+ continue;
517
+ } else {
518
+ return false;
519
+ }
520
+ } else if (!this.options.flex) {
521
+ break;
522
+ }
523
+ }
524
+ }
525
+ if (match) {
526
+ token = this.test_match(match, rules[index]);
527
+ if (token !== false) {
528
+ return token;
529
+ }
530
+ return false;
531
+ }
532
+ if (this._input === "") {
533
+ return this.EOF;
534
+ } else {
535
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
536
+ text: "",
537
+ token: null,
538
+ line: this.yylineno
539
+ });
540
+ }
541
+ },
542
+ // return next match that has a token
543
+ lex: function lex() {
544
+ var r = this.next();
545
+ if (r) {
546
+ return r;
547
+ } else {
548
+ return this.lex();
549
+ }
550
+ },
551
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
552
+ begin: function begin(condition) {
553
+ this.conditionStack.push(condition);
554
+ },
555
+ // pop the previously active lexer condition state off the condition stack
556
+ popState: function popState() {
557
+ var n = this.conditionStack.length - 1;
558
+ if (n > 0) {
559
+ return this.conditionStack.pop();
560
+ } else {
561
+ return this.conditionStack[0];
562
+ }
563
+ },
564
+ // produce the lexer rule set which is active for the currently active lexer condition state
565
+ _currentRules: function _currentRules() {
566
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
567
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
568
+ } else {
569
+ return this.conditions["INITIAL"].rules;
570
+ }
571
+ },
572
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
573
+ topState: function topState(n) {
574
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
575
+ if (n >= 0) {
576
+ return this.conditionStack[n];
577
+ } else {
578
+ return "INITIAL";
579
+ }
580
+ },
581
+ // alias for begin(condition)
582
+ pushState: function pushState(condition) {
583
+ this.begin(condition);
584
+ },
585
+ // return the number of states currently on the stack
586
+ stateStackSize: function stateStackSize() {
587
+ return this.conditionStack.length;
588
+ },
589
+ options: { "case-insensitive": true },
590
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
591
+ switch ($avoiding_name_collisions) {
592
+ case 0:
593
+ this.begin("open_directive");
594
+ return "open_directive";
595
+ case 1:
596
+ this.begin("acc_title");
597
+ return 28;
598
+ case 2:
599
+ this.popState();
600
+ return "acc_title_value";
601
+ case 3:
602
+ this.begin("acc_descr");
603
+ return 30;
604
+ case 4:
605
+ this.popState();
606
+ return "acc_descr_value";
607
+ case 5:
608
+ this.begin("acc_descr_multiline");
609
+ break;
610
+ case 6:
611
+ this.popState();
612
+ break;
613
+ case 7:
614
+ return "acc_descr_multiline_value";
615
+ case 8:
616
+ break;
617
+ case 9:
618
+ break;
619
+ case 10:
620
+ break;
621
+ case 11:
622
+ return 10;
623
+ case 12:
624
+ break;
625
+ case 13:
626
+ break;
627
+ case 14:
628
+ this.begin("href");
629
+ break;
630
+ case 15:
631
+ this.popState();
632
+ break;
633
+ case 16:
634
+ return 40;
635
+ case 17:
636
+ this.begin("callbackname");
637
+ break;
638
+ case 18:
639
+ this.popState();
640
+ break;
641
+ case 19:
642
+ this.popState();
643
+ this.begin("callbackargs");
644
+ break;
645
+ case 20:
646
+ return 38;
647
+ case 21:
648
+ this.popState();
649
+ break;
650
+ case 22:
651
+ return 39;
652
+ case 23:
653
+ this.begin("click");
654
+ break;
655
+ case 24:
656
+ this.popState();
657
+ break;
658
+ case 25:
659
+ return 37;
660
+ case 26:
661
+ return 4;
662
+ case 27:
663
+ return 19;
664
+ case 28:
665
+ return 20;
666
+ case 29:
667
+ return 21;
668
+ case 30:
669
+ return 22;
670
+ case 31:
671
+ return 23;
672
+ case 32:
673
+ return 25;
674
+ case 33:
675
+ return 24;
676
+ case 34:
677
+ return 26;
678
+ case 35:
679
+ return 12;
680
+ case 36:
681
+ return 13;
682
+ case 37:
683
+ return 14;
684
+ case 38:
685
+ return 15;
686
+ case 39:
687
+ return 16;
688
+ case 40:
689
+ return 17;
690
+ case 41:
691
+ return 18;
692
+ case 42:
693
+ return "date";
694
+ case 43:
695
+ return 27;
696
+ case 44:
697
+ return "accDescription";
698
+ case 45:
699
+ return 33;
700
+ case 46:
701
+ return 35;
702
+ case 47:
703
+ return 36;
704
+ case 48:
705
+ return ":";
706
+ case 49:
707
+ return 6;
708
+ case 50:
709
+ return "INVALID";
710
+ }
711
+ },
712
+ rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^\n]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^\n]+)/i, /^(?:[^:\n]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
713
+ conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "callbackargs": { "rules": [21, 22], "inclusive": false }, "callbackname": { "rules": [18, 19, 20], "inclusive": false }, "href": { "rules": [15, 16], "inclusive": false }, "click": { "rules": [24, 25], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 17, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], "inclusive": true } }
714
+ };
715
+ return lexer2;
716
+ }();
717
+ parser2.lexer = lexer;
718
+ function Parser() {
719
+ this.yy = {};
720
+ }
721
+ Parser.prototype = parser2;
722
+ parser2.Parser = Parser;
723
+ return new Parser();
724
+ }();
725
+ parser.parser = parser;
726
+ const ganttParser = parser;
727
+ dayjs.extend(dayjsIsoWeek);
728
+ dayjs.extend(dayjsCustomParseFormat);
729
+ dayjs.extend(dayjsAdvancedFormat);
730
+ let dateFormat = "";
731
+ let axisFormat = "";
732
+ let tickInterval = void 0;
733
+ let todayMarker = "";
734
+ let includes = [];
735
+ let excludes = [];
736
+ let links = {};
737
+ let sections = [];
738
+ let tasks = [];
739
+ let currentSection = "";
740
+ let displayMode = "";
741
+ const tags = ["active", "done", "crit", "milestone"];
742
+ let funs = [];
743
+ let inclusiveEndDates = false;
744
+ let topAxis = false;
745
+ let weekday = "sunday";
746
+ let lastOrder = 0;
747
+ const clear = function() {
748
+ sections = [];
749
+ tasks = [];
750
+ currentSection = "";
751
+ funs = [];
752
+ taskCnt = 0;
753
+ lastTask = void 0;
754
+ lastTaskID = void 0;
755
+ rawTasks = [];
756
+ dateFormat = "";
757
+ axisFormat = "";
758
+ displayMode = "";
759
+ tickInterval = void 0;
760
+ todayMarker = "";
761
+ includes = [];
762
+ excludes = [];
763
+ inclusiveEndDates = false;
764
+ topAxis = false;
765
+ lastOrder = 0;
766
+ links = {};
767
+ clear$1();
768
+ weekday = "sunday";
769
+ };
770
+ const setAxisFormat = function(txt) {
771
+ axisFormat = txt;
772
+ };
773
+ const getAxisFormat = function() {
774
+ return axisFormat;
775
+ };
776
+ const setTickInterval = function(txt) {
777
+ tickInterval = txt;
778
+ };
779
+ const getTickInterval = function() {
780
+ return tickInterval;
781
+ };
782
+ const setTodayMarker = function(txt) {
783
+ todayMarker = txt;
784
+ };
785
+ const getTodayMarker = function() {
786
+ return todayMarker;
787
+ };
788
+ const setDateFormat = function(txt) {
789
+ dateFormat = txt;
790
+ };
791
+ const enableInclusiveEndDates = function() {
792
+ inclusiveEndDates = true;
793
+ };
794
+ const endDatesAreInclusive = function() {
795
+ return inclusiveEndDates;
796
+ };
797
+ const enableTopAxis = function() {
798
+ topAxis = true;
799
+ };
800
+ const topAxisEnabled = function() {
801
+ return topAxis;
802
+ };
803
+ const setDisplayMode = function(txt) {
804
+ displayMode = txt;
805
+ };
806
+ const getDisplayMode = function() {
807
+ return displayMode;
808
+ };
809
+ const getDateFormat = function() {
810
+ return dateFormat;
811
+ };
812
+ const setIncludes = function(txt) {
813
+ includes = txt.toLowerCase().split(/[\s,]+/);
814
+ };
815
+ const getIncludes = function() {
816
+ return includes;
817
+ };
818
+ const setExcludes = function(txt) {
819
+ excludes = txt.toLowerCase().split(/[\s,]+/);
820
+ };
821
+ const getExcludes = function() {
822
+ return excludes;
823
+ };
824
+ const getLinks = function() {
825
+ return links;
826
+ };
827
+ const addSection = function(txt) {
828
+ currentSection = txt;
829
+ sections.push(txt);
830
+ };
831
+ const getSections = function() {
832
+ return sections;
833
+ };
834
+ const getTasks = function() {
835
+ let allItemsProcessed = compileTasks();
836
+ const maxDepth = 10;
837
+ let iterationCount = 0;
838
+ while (!allItemsProcessed && iterationCount < maxDepth) {
839
+ allItemsProcessed = compileTasks();
840
+ iterationCount++;
841
+ }
842
+ tasks = rawTasks;
843
+ return tasks;
844
+ };
845
+ const isInvalidDate = function(date, dateFormat2, excludes2, includes2) {
846
+ if (includes2.includes(date.format(dateFormat2.trim()))) {
847
+ return false;
848
+ }
849
+ if (date.isoWeekday() >= 6 && excludes2.includes("weekends")) {
850
+ return true;
851
+ }
852
+ if (excludes2.includes(date.format("dddd").toLowerCase())) {
853
+ return true;
854
+ }
855
+ return excludes2.includes(date.format(dateFormat2.trim()));
856
+ };
857
+ const setWeekday = function(txt) {
858
+ weekday = txt;
859
+ };
860
+ const getWeekday = function() {
861
+ return weekday;
862
+ };
863
+ const checkTaskDates = function(task, dateFormat2, excludes2, includes2) {
864
+ if (!excludes2.length || task.manualEndTime) {
865
+ return;
866
+ }
867
+ let startTime;
868
+ if (task.startTime instanceof Date) {
869
+ startTime = dayjs(task.startTime);
870
+ } else {
871
+ startTime = dayjs(task.startTime, dateFormat2, true);
872
+ }
873
+ startTime = startTime.add(1, "d");
874
+ let originalEndTime;
875
+ if (task.endTime instanceof Date) {
876
+ originalEndTime = dayjs(task.endTime);
877
+ } else {
878
+ originalEndTime = dayjs(task.endTime, dateFormat2, true);
879
+ }
880
+ const [fixedEndTime, renderEndTime] = fixTaskDates(
881
+ startTime,
882
+ originalEndTime,
883
+ dateFormat2,
884
+ excludes2,
885
+ includes2
886
+ );
887
+ task.endTime = fixedEndTime.toDate();
888
+ task.renderEndTime = renderEndTime;
889
+ };
890
+ const fixTaskDates = function(startTime, endTime, dateFormat2, excludes2, includes2) {
891
+ let invalid = false;
892
+ let renderEndTime = null;
893
+ while (startTime <= endTime) {
894
+ if (!invalid) {
895
+ renderEndTime = endTime.toDate();
896
+ }
897
+ invalid = isInvalidDate(startTime, dateFormat2, excludes2, includes2);
898
+ if (invalid) {
899
+ endTime = endTime.add(1, "d");
900
+ }
901
+ startTime = startTime.add(1, "d");
902
+ }
903
+ return [endTime, renderEndTime];
904
+ };
905
+ const getStartDate = function(prevTime, dateFormat2, str) {
906
+ str = str.trim();
907
+ const afterRePattern = /^after\s+(?<ids>[\d\w- ]+)/;
908
+ const afterStatement = afterRePattern.exec(str);
909
+ if (afterStatement !== null) {
910
+ let latestTask = null;
911
+ for (const id of afterStatement.groups.ids.split(" ")) {
912
+ let task = findTaskById(id);
913
+ if (task !== void 0 && (!latestTask || task.endTime > latestTask.endTime)) {
914
+ latestTask = task;
915
+ }
916
+ }
917
+ if (latestTask) {
918
+ return latestTask.endTime;
919
+ }
920
+ const today = /* @__PURE__ */ new Date();
921
+ today.setHours(0, 0, 0, 0);
922
+ return today;
923
+ }
924
+ let mDate = dayjs(str, dateFormat2.trim(), true);
925
+ if (mDate.isValid()) {
926
+ return mDate.toDate();
927
+ } else {
928
+ log.debug("Invalid date:" + str);
929
+ log.debug("With date format:" + dateFormat2.trim());
930
+ const d = new Date(str);
931
+ if (d === void 0 || isNaN(d.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously
932
+ // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.
933
+ // This can cause virtually infinite loops while rendering, so for the
934
+ // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as
935
+ // invalid.
936
+ d.getFullYear() < -1e4 || d.getFullYear() > 1e4) {
937
+ throw new Error("Invalid date:" + str);
938
+ }
939
+ return d;
940
+ }
941
+ };
942
+ const parseDuration = function(str) {
943
+ const statement = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(str.trim());
944
+ if (statement !== null) {
945
+ return [Number.parseFloat(statement[1]), statement[2]];
946
+ }
947
+ return [NaN, "ms"];
948
+ };
949
+ const getEndDate = function(prevTime, dateFormat2, str, inclusive = false) {
950
+ str = str.trim();
951
+ const untilRePattern = /^until\s+(?<ids>[\d\w- ]+)/;
952
+ const untilStatement = untilRePattern.exec(str);
953
+ if (untilStatement !== null) {
954
+ let earliestTask = null;
955
+ for (const id of untilStatement.groups.ids.split(" ")) {
956
+ let task = findTaskById(id);
957
+ if (task !== void 0 && (!earliestTask || task.startTime < earliestTask.startTime)) {
958
+ earliestTask = task;
959
+ }
960
+ }
961
+ if (earliestTask) {
962
+ return earliestTask.startTime;
963
+ }
964
+ const today = /* @__PURE__ */ new Date();
965
+ today.setHours(0, 0, 0, 0);
966
+ return today;
967
+ }
968
+ let parsedDate = dayjs(str, dateFormat2.trim(), true);
969
+ if (parsedDate.isValid()) {
970
+ if (inclusive) {
971
+ parsedDate = parsedDate.add(1, "d");
972
+ }
973
+ return parsedDate.toDate();
974
+ }
975
+ let endTime = dayjs(prevTime);
976
+ const [durationValue, durationUnit] = parseDuration(str);
977
+ if (!Number.isNaN(durationValue)) {
978
+ const newEndTime = endTime.add(durationValue, durationUnit);
979
+ if (newEndTime.isValid()) {
980
+ endTime = newEndTime;
981
+ }
982
+ }
983
+ return endTime.toDate();
984
+ };
985
+ let taskCnt = 0;
986
+ const parseId = function(idStr) {
987
+ if (idStr === void 0) {
988
+ taskCnt = taskCnt + 1;
989
+ return "task" + taskCnt;
990
+ }
991
+ return idStr;
992
+ };
993
+ const compileData = function(prevTask, dataStr) {
994
+ let ds;
995
+ if (dataStr.substr(0, 1) === ":") {
996
+ ds = dataStr.substr(1, dataStr.length);
997
+ } else {
998
+ ds = dataStr;
999
+ }
1000
+ const data = ds.split(",");
1001
+ const task = {};
1002
+ getTaskTags(data, task, tags);
1003
+ for (let i = 0; i < data.length; i++) {
1004
+ data[i] = data[i].trim();
1005
+ }
1006
+ let endTimeData = "";
1007
+ switch (data.length) {
1008
+ case 1:
1009
+ task.id = parseId();
1010
+ task.startTime = prevTask.endTime;
1011
+ endTimeData = data[0];
1012
+ break;
1013
+ case 2:
1014
+ task.id = parseId();
1015
+ task.startTime = getStartDate(void 0, dateFormat, data[0]);
1016
+ endTimeData = data[1];
1017
+ break;
1018
+ case 3:
1019
+ task.id = parseId(data[0]);
1020
+ task.startTime = getStartDate(void 0, dateFormat, data[1]);
1021
+ endTimeData = data[2];
1022
+ break;
1023
+ }
1024
+ if (endTimeData) {
1025
+ task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);
1026
+ task.manualEndTime = dayjs(endTimeData, "YYYY-MM-DD", true).isValid();
1027
+ checkTaskDates(task, dateFormat, excludes, includes);
1028
+ }
1029
+ return task;
1030
+ };
1031
+ const parseData = function(prevTaskId, dataStr) {
1032
+ let ds;
1033
+ if (dataStr.substr(0, 1) === ":") {
1034
+ ds = dataStr.substr(1, dataStr.length);
1035
+ } else {
1036
+ ds = dataStr;
1037
+ }
1038
+ const data = ds.split(",");
1039
+ const task = {};
1040
+ getTaskTags(data, task, tags);
1041
+ for (let i = 0; i < data.length; i++) {
1042
+ data[i] = data[i].trim();
1043
+ }
1044
+ switch (data.length) {
1045
+ case 1:
1046
+ task.id = parseId();
1047
+ task.startTime = {
1048
+ type: "prevTaskEnd",
1049
+ id: prevTaskId
1050
+ };
1051
+ task.endTime = {
1052
+ data: data[0]
1053
+ };
1054
+ break;
1055
+ case 2:
1056
+ task.id = parseId();
1057
+ task.startTime = {
1058
+ type: "getStartDate",
1059
+ startData: data[0]
1060
+ };
1061
+ task.endTime = {
1062
+ data: data[1]
1063
+ };
1064
+ break;
1065
+ case 3:
1066
+ task.id = parseId(data[0]);
1067
+ task.startTime = {
1068
+ type: "getStartDate",
1069
+ startData: data[1]
1070
+ };
1071
+ task.endTime = {
1072
+ data: data[2]
1073
+ };
1074
+ break;
1075
+ }
1076
+ return task;
1077
+ };
1078
+ let lastTask;
1079
+ let lastTaskID;
1080
+ let rawTasks = [];
1081
+ const taskDb = {};
1082
+ const addTask = function(descr, data) {
1083
+ const rawTask = {
1084
+ section: currentSection,
1085
+ type: currentSection,
1086
+ processed: false,
1087
+ manualEndTime: false,
1088
+ renderEndTime: null,
1089
+ raw: { data },
1090
+ task: descr,
1091
+ classes: []
1092
+ };
1093
+ const taskInfo = parseData(lastTaskID, data);
1094
+ rawTask.raw.startTime = taskInfo.startTime;
1095
+ rawTask.raw.endTime = taskInfo.endTime;
1096
+ rawTask.id = taskInfo.id;
1097
+ rawTask.prevTaskId = lastTaskID;
1098
+ rawTask.active = taskInfo.active;
1099
+ rawTask.done = taskInfo.done;
1100
+ rawTask.crit = taskInfo.crit;
1101
+ rawTask.milestone = taskInfo.milestone;
1102
+ rawTask.order = lastOrder;
1103
+ lastOrder++;
1104
+ const pos = rawTasks.push(rawTask);
1105
+ lastTaskID = rawTask.id;
1106
+ taskDb[rawTask.id] = pos - 1;
1107
+ };
1108
+ const findTaskById = function(id) {
1109
+ const pos = taskDb[id];
1110
+ return rawTasks[pos];
1111
+ };
1112
+ const addTaskOrg = function(descr, data) {
1113
+ const newTask = {
1114
+ section: currentSection,
1115
+ type: currentSection,
1116
+ description: descr,
1117
+ task: descr,
1118
+ classes: []
1119
+ };
1120
+ const taskInfo = compileData(lastTask, data);
1121
+ newTask.startTime = taskInfo.startTime;
1122
+ newTask.endTime = taskInfo.endTime;
1123
+ newTask.id = taskInfo.id;
1124
+ newTask.active = taskInfo.active;
1125
+ newTask.done = taskInfo.done;
1126
+ newTask.crit = taskInfo.crit;
1127
+ newTask.milestone = taskInfo.milestone;
1128
+ lastTask = newTask;
1129
+ tasks.push(newTask);
1130
+ };
1131
+ const compileTasks = function() {
1132
+ const compileTask = function(pos) {
1133
+ const task = rawTasks[pos];
1134
+ let startTime = "";
1135
+ switch (rawTasks[pos].raw.startTime.type) {
1136
+ case "prevTaskEnd": {
1137
+ const prevTask = findTaskById(task.prevTaskId);
1138
+ task.startTime = prevTask.endTime;
1139
+ break;
1140
+ }
1141
+ case "getStartDate":
1142
+ startTime = getStartDate(void 0, dateFormat, rawTasks[pos].raw.startTime.startData);
1143
+ if (startTime) {
1144
+ rawTasks[pos].startTime = startTime;
1145
+ }
1146
+ break;
1147
+ }
1148
+ if (rawTasks[pos].startTime) {
1149
+ rawTasks[pos].endTime = getEndDate(
1150
+ rawTasks[pos].startTime,
1151
+ dateFormat,
1152
+ rawTasks[pos].raw.endTime.data,
1153
+ inclusiveEndDates
1154
+ );
1155
+ if (rawTasks[pos].endTime) {
1156
+ rawTasks[pos].processed = true;
1157
+ rawTasks[pos].manualEndTime = dayjs(
1158
+ rawTasks[pos].raw.endTime.data,
1159
+ "YYYY-MM-DD",
1160
+ true
1161
+ ).isValid();
1162
+ checkTaskDates(rawTasks[pos], dateFormat, excludes, includes);
1163
+ }
1164
+ }
1165
+ return rawTasks[pos].processed;
1166
+ };
1167
+ let allProcessed = true;
1168
+ for (const [i, rawTask] of rawTasks.entries()) {
1169
+ compileTask(i);
1170
+ allProcessed = allProcessed && rawTask.processed;
1171
+ }
1172
+ return allProcessed;
1173
+ };
1174
+ const setLink = function(ids, _linkStr) {
1175
+ let linkStr = _linkStr;
1176
+ if (getConfig().securityLevel !== "loose") {
1177
+ linkStr = sanitizeUrl(_linkStr);
1178
+ }
1179
+ ids.split(",").forEach(function(id) {
1180
+ let rawTask = findTaskById(id);
1181
+ if (rawTask !== void 0) {
1182
+ pushFun(id, () => {
1183
+ window.open(linkStr, "_self");
1184
+ });
1185
+ links[id] = linkStr;
1186
+ }
1187
+ });
1188
+ setClass(ids, "clickable");
1189
+ };
1190
+ const setClass = function(ids, className) {
1191
+ ids.split(",").forEach(function(id) {
1192
+ let rawTask = findTaskById(id);
1193
+ if (rawTask !== void 0) {
1194
+ rawTask.classes.push(className);
1195
+ }
1196
+ });
1197
+ };
1198
+ const setClickFun = function(id, functionName, functionArgs) {
1199
+ if (getConfig().securityLevel !== "loose") {
1200
+ return;
1201
+ }
1202
+ if (functionName === void 0) {
1203
+ return;
1204
+ }
1205
+ let argList = [];
1206
+ if (typeof functionArgs === "string") {
1207
+ argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
1208
+ for (let i = 0; i < argList.length; i++) {
1209
+ let item = argList[i].trim();
1210
+ if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') {
1211
+ item = item.substr(1, item.length - 2);
1212
+ }
1213
+ argList[i] = item;
1214
+ }
1215
+ }
1216
+ if (argList.length === 0) {
1217
+ argList.push(id);
1218
+ }
1219
+ let rawTask = findTaskById(id);
1220
+ if (rawTask !== void 0) {
1221
+ pushFun(id, () => {
1222
+ utils.runFunc(functionName, ...argList);
1223
+ });
1224
+ }
1225
+ };
1226
+ const pushFun = function(id, callbackFunction) {
1227
+ funs.push(
1228
+ function() {
1229
+ const elem = document.querySelector(`[id="${id}"]`);
1230
+ if (elem !== null) {
1231
+ elem.addEventListener("click", function() {
1232
+ callbackFunction();
1233
+ });
1234
+ }
1235
+ },
1236
+ function() {
1237
+ const elem = document.querySelector(`[id="${id}-text"]`);
1238
+ if (elem !== null) {
1239
+ elem.addEventListener("click", function() {
1240
+ callbackFunction();
1241
+ });
1242
+ }
1243
+ }
1244
+ );
1245
+ };
1246
+ const setClickEvent = function(ids, functionName, functionArgs) {
1247
+ ids.split(",").forEach(function(id) {
1248
+ setClickFun(id, functionName, functionArgs);
1249
+ });
1250
+ setClass(ids, "clickable");
1251
+ };
1252
+ const bindFunctions = function(element) {
1253
+ funs.forEach(function(fun) {
1254
+ fun(element);
1255
+ });
1256
+ };
1257
+ const ganttDb = {
1258
+ getConfig: () => getConfig().gantt,
1259
+ clear,
1260
+ setDateFormat,
1261
+ getDateFormat,
1262
+ enableInclusiveEndDates,
1263
+ endDatesAreInclusive,
1264
+ enableTopAxis,
1265
+ topAxisEnabled,
1266
+ setAxisFormat,
1267
+ getAxisFormat,
1268
+ setTickInterval,
1269
+ getTickInterval,
1270
+ setTodayMarker,
1271
+ getTodayMarker,
1272
+ setAccTitle,
1273
+ getAccTitle,
1274
+ setDiagramTitle,
1275
+ getDiagramTitle,
1276
+ setDisplayMode,
1277
+ getDisplayMode,
1278
+ setAccDescription,
1279
+ getAccDescription,
1280
+ addSection,
1281
+ getSections,
1282
+ getTasks,
1283
+ addTask,
1284
+ findTaskById,
1285
+ addTaskOrg,
1286
+ setIncludes,
1287
+ getIncludes,
1288
+ setExcludes,
1289
+ getExcludes,
1290
+ setClickEvent,
1291
+ setLink,
1292
+ getLinks,
1293
+ bindFunctions,
1294
+ parseDuration,
1295
+ isInvalidDate,
1296
+ setWeekday,
1297
+ getWeekday
1298
+ };
1299
+ function getTaskTags(data, task, tags2) {
1300
+ let matchFound = true;
1301
+ while (matchFound) {
1302
+ matchFound = false;
1303
+ tags2.forEach(function(t) {
1304
+ const pattern = "^\\s*" + t + "\\s*$";
1305
+ const regex = new RegExp(pattern);
1306
+ if (data[0].match(regex)) {
1307
+ task[t] = true;
1308
+ data.shift(1);
1309
+ matchFound = true;
1310
+ }
1311
+ });
1312
+ }
1313
+ }
1314
+ const setConf = function() {
1315
+ log.debug("Something is calling, setConf, remove the call");
1316
+ };
1317
+ const mapWeekdayToTimeFunction = {
1318
+ monday: timeMonday,
1319
+ tuesday: timeTuesday,
1320
+ wednesday: timeWednesday,
1321
+ thursday: timeThursday,
1322
+ friday: timeFriday,
1323
+ saturday: timeSaturday,
1324
+ sunday: timeSunday
1325
+ };
1326
+ const getMaxIntersections = (tasks2, orderOffset) => {
1327
+ let timeline = [...tasks2].map(() => -Infinity);
1328
+ let sorted = [...tasks2].sort((a, b) => a.startTime - b.startTime || a.order - b.order);
1329
+ let maxIntersections = 0;
1330
+ for (const element of sorted) {
1331
+ for (let j = 0; j < timeline.length; j++) {
1332
+ if (element.startTime >= timeline[j]) {
1333
+ timeline[j] = element.endTime;
1334
+ element.order = j + orderOffset;
1335
+ if (j > maxIntersections) {
1336
+ maxIntersections = j;
1337
+ }
1338
+ break;
1339
+ }
1340
+ }
1341
+ }
1342
+ return maxIntersections;
1343
+ };
1344
+ let w;
1345
+ const draw = function(text, id, version, diagObj) {
1346
+ const conf = getConfig().gantt;
1347
+ const securityLevel = getConfig().securityLevel;
1348
+ let sandboxElement;
1349
+ if (securityLevel === "sandbox") {
1350
+ sandboxElement = select("#i" + id);
1351
+ }
1352
+ const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
1353
+ const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
1354
+ const elem = doc.getElementById(id);
1355
+ w = elem.parentElement.offsetWidth;
1356
+ if (w === void 0) {
1357
+ w = 1200;
1358
+ }
1359
+ if (conf.useWidth !== void 0) {
1360
+ w = conf.useWidth;
1361
+ }
1362
+ const taskArray = diagObj.db.getTasks();
1363
+ let categories = [];
1364
+ for (const element of taskArray) {
1365
+ categories.push(element.type);
1366
+ }
1367
+ categories = checkUnique(categories);
1368
+ const categoryHeights = {};
1369
+ let h = 2 * conf.topPadding;
1370
+ if (diagObj.db.getDisplayMode() === "compact" || conf.displayMode === "compact") {
1371
+ const categoryElements = {};
1372
+ for (const element of taskArray) {
1373
+ if (categoryElements[element.section] === void 0) {
1374
+ categoryElements[element.section] = [element];
1375
+ } else {
1376
+ categoryElements[element.section].push(element);
1377
+ }
1378
+ }
1379
+ let intersections = 0;
1380
+ for (const category of Object.keys(categoryElements)) {
1381
+ const categoryHeight = getMaxIntersections(categoryElements[category], intersections) + 1;
1382
+ intersections += categoryHeight;
1383
+ h += categoryHeight * (conf.barHeight + conf.barGap);
1384
+ categoryHeights[category] = categoryHeight;
1385
+ }
1386
+ } else {
1387
+ h += taskArray.length * (conf.barHeight + conf.barGap);
1388
+ for (const category of categories) {
1389
+ categoryHeights[category] = taskArray.filter((task) => task.type === category).length;
1390
+ }
1391
+ }
1392
+ elem.setAttribute("viewBox", "0 0 " + w + " " + h);
1393
+ const svg = root.select(`[id="${id}"]`);
1394
+ const timeScale = scaleTime().domain([
1395
+ min(taskArray, function(d) {
1396
+ return d.startTime;
1397
+ }),
1398
+ max(taskArray, function(d) {
1399
+ return d.endTime;
1400
+ })
1401
+ ]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]);
1402
+ function taskCompare(a, b) {
1403
+ const taskA = a.startTime;
1404
+ const taskB = b.startTime;
1405
+ let result = 0;
1406
+ if (taskA > taskB) {
1407
+ result = 1;
1408
+ } else if (taskA < taskB) {
1409
+ result = -1;
1410
+ }
1411
+ return result;
1412
+ }
1413
+ taskArray.sort(taskCompare);
1414
+ makeGantt(taskArray, w, h);
1415
+ configureSvgSize(svg, h, w, conf.useMaxWidth);
1416
+ svg.append("text").text(diagObj.db.getDiagramTitle()).attr("x", w / 2).attr("y", conf.titleTopMargin).attr("class", "titleText");
1417
+ function makeGantt(tasks2, pageWidth, pageHeight) {
1418
+ const barHeight = conf.barHeight;
1419
+ const gap = barHeight + conf.barGap;
1420
+ const topPadding = conf.topPadding;
1421
+ const leftPadding = conf.leftPadding;
1422
+ const colorScale = scaleLinear().domain([0, categories.length]).range(["#00B9FA", "#F95002"]).interpolate(interpolateHcl);
1423
+ drawExcludeDays(
1424
+ gap,
1425
+ topPadding,
1426
+ leftPadding,
1427
+ pageWidth,
1428
+ pageHeight,
1429
+ tasks2,
1430
+ diagObj.db.getExcludes(),
1431
+ diagObj.db.getIncludes()
1432
+ );
1433
+ makeGrid(leftPadding, topPadding, pageWidth, pageHeight);
1434
+ drawRects(tasks2, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth);
1435
+ vertLabels(gap, topPadding);
1436
+ drawToday(leftPadding, topPadding, pageWidth, pageHeight);
1437
+ }
1438
+ function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w2) {
1439
+ const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))];
1440
+ const uniqueTasks = uniqueTaskOrderIds.map((id2) => theArray.find((item) => item.order === id2));
1441
+ svg.append("g").selectAll("rect").data(uniqueTasks).enter().append("rect").attr("x", 0).attr("y", function(d, i) {
1442
+ i = d.order;
1443
+ return i * theGap + theTopPad - 2;
1444
+ }).attr("width", function() {
1445
+ return w2 - conf.rightPadding / 2;
1446
+ }).attr("height", theGap).attr("class", function(d) {
1447
+ for (const [i, category] of categories.entries()) {
1448
+ if (d.type === category) {
1449
+ return "section section" + i % conf.numberSectionStyles;
1450
+ }
1451
+ }
1452
+ return "section section0";
1453
+ });
1454
+ const rectangles = svg.append("g").selectAll("rect").data(theArray).enter();
1455
+ const links2 = diagObj.db.getLinks();
1456
+ rectangles.append("rect").attr("id", function(d) {
1457
+ return d.id;
1458
+ }).attr("rx", 3).attr("ry", 3).attr("x", function(d) {
1459
+ if (d.milestone) {
1460
+ return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
1461
+ }
1462
+ return timeScale(d.startTime) + theSidePad;
1463
+ }).attr("y", function(d, i) {
1464
+ i = d.order;
1465
+ return i * theGap + theTopPad;
1466
+ }).attr("width", function(d) {
1467
+ if (d.milestone) {
1468
+ return theBarHeight;
1469
+ }
1470
+ return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);
1471
+ }).attr("height", theBarHeight).attr("transform-origin", function(d, i) {
1472
+ i = d.order;
1473
+ return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + "px " + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + "px";
1474
+ }).attr("class", function(d) {
1475
+ const res = "task";
1476
+ let classStr = "";
1477
+ if (d.classes.length > 0) {
1478
+ classStr = d.classes.join(" ");
1479
+ }
1480
+ let secNum = 0;
1481
+ for (const [i, category] of categories.entries()) {
1482
+ if (d.type === category) {
1483
+ secNum = i % conf.numberSectionStyles;
1484
+ }
1485
+ }
1486
+ let taskClass = "";
1487
+ if (d.active) {
1488
+ if (d.crit) {
1489
+ taskClass += " activeCrit";
1490
+ } else {
1491
+ taskClass = " active";
1492
+ }
1493
+ } else if (d.done) {
1494
+ if (d.crit) {
1495
+ taskClass = " doneCrit";
1496
+ } else {
1497
+ taskClass = " done";
1498
+ }
1499
+ } else {
1500
+ if (d.crit) {
1501
+ taskClass += " crit";
1502
+ }
1503
+ }
1504
+ if (taskClass.length === 0) {
1505
+ taskClass = " task";
1506
+ }
1507
+ if (d.milestone) {
1508
+ taskClass = " milestone " + taskClass;
1509
+ }
1510
+ taskClass += secNum;
1511
+ taskClass += " " + classStr;
1512
+ return res + taskClass;
1513
+ });
1514
+ rectangles.append("text").attr("id", function(d) {
1515
+ return d.id + "-text";
1516
+ }).text(function(d) {
1517
+ return d.task;
1518
+ }).attr("font-size", conf.fontSize).attr("x", function(d) {
1519
+ let startX = timeScale(d.startTime);
1520
+ let endX = timeScale(d.renderEndTime || d.endTime);
1521
+ if (d.milestone) {
1522
+ startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
1523
+ }
1524
+ if (d.milestone) {
1525
+ endX = startX + theBarHeight;
1526
+ }
1527
+ const textWidth = this.getBBox().width;
1528
+ if (textWidth > endX - startX) {
1529
+ if (endX + textWidth + 1.5 * conf.leftPadding > w2) {
1530
+ return startX + theSidePad - 5;
1531
+ } else {
1532
+ return endX + theSidePad + 5;
1533
+ }
1534
+ } else {
1535
+ return (endX - startX) / 2 + startX + theSidePad;
1536
+ }
1537
+ }).attr("y", function(d, i) {
1538
+ i = d.order;
1539
+ return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;
1540
+ }).attr("text-height", theBarHeight).attr("class", function(d) {
1541
+ const startX = timeScale(d.startTime);
1542
+ let endX = timeScale(d.endTime);
1543
+ if (d.milestone) {
1544
+ endX = startX + theBarHeight;
1545
+ }
1546
+ const textWidth = this.getBBox().width;
1547
+ let classStr = "";
1548
+ if (d.classes.length > 0) {
1549
+ classStr = d.classes.join(" ");
1550
+ }
1551
+ let secNum = 0;
1552
+ for (const [i, category] of categories.entries()) {
1553
+ if (d.type === category) {
1554
+ secNum = i % conf.numberSectionStyles;
1555
+ }
1556
+ }
1557
+ let taskType = "";
1558
+ if (d.active) {
1559
+ if (d.crit) {
1560
+ taskType = "activeCritText" + secNum;
1561
+ } else {
1562
+ taskType = "activeText" + secNum;
1563
+ }
1564
+ }
1565
+ if (d.done) {
1566
+ if (d.crit) {
1567
+ taskType = taskType + " doneCritText" + secNum;
1568
+ } else {
1569
+ taskType = taskType + " doneText" + secNum;
1570
+ }
1571
+ } else {
1572
+ if (d.crit) {
1573
+ taskType = taskType + " critText" + secNum;
1574
+ }
1575
+ }
1576
+ if (d.milestone) {
1577
+ taskType += " milestoneText";
1578
+ }
1579
+ if (textWidth > endX - startX) {
1580
+ if (endX + textWidth + 1.5 * conf.leftPadding > w2) {
1581
+ return classStr + " taskTextOutsideLeft taskTextOutside" + secNum + " " + taskType;
1582
+ } else {
1583
+ return classStr + " taskTextOutsideRight taskTextOutside" + secNum + " " + taskType + " width-" + textWidth;
1584
+ }
1585
+ } else {
1586
+ return classStr + " taskText taskText" + secNum + " " + taskType + " width-" + textWidth;
1587
+ }
1588
+ });
1589
+ const securityLevel2 = getConfig().securityLevel;
1590
+ if (securityLevel2 === "sandbox") {
1591
+ let sandboxElement2;
1592
+ sandboxElement2 = select("#i" + id);
1593
+ const doc2 = sandboxElement2.nodes()[0].contentDocument;
1594
+ rectangles.filter(function(d) {
1595
+ return links2[d.id] !== void 0;
1596
+ }).each(function(o) {
1597
+ var taskRect = doc2.querySelector("#" + o.id);
1598
+ var taskText = doc2.querySelector("#" + o.id + "-text");
1599
+ const oldParent = taskRect.parentNode;
1600
+ var Link = doc2.createElement("a");
1601
+ Link.setAttribute("xlink:href", links2[o.id]);
1602
+ Link.setAttribute("target", "_top");
1603
+ oldParent.appendChild(Link);
1604
+ Link.appendChild(taskRect);
1605
+ Link.appendChild(taskText);
1606
+ });
1607
+ }
1608
+ }
1609
+ function drawExcludeDays(theGap, theTopPad, theSidePad, w2, h2, tasks2, excludes2, includes2) {
1610
+ if (excludes2.length === 0 && includes2.length === 0) {
1611
+ return;
1612
+ }
1613
+ let minTime;
1614
+ let maxTime;
1615
+ for (const { startTime, endTime } of tasks2) {
1616
+ if (minTime === void 0 || startTime < minTime) {
1617
+ minTime = startTime;
1618
+ }
1619
+ if (maxTime === void 0 || endTime > maxTime) {
1620
+ maxTime = endTime;
1621
+ }
1622
+ }
1623
+ if (!minTime || !maxTime) {
1624
+ return;
1625
+ }
1626
+ if (dayjs(maxTime).diff(dayjs(minTime), "year") > 5) {
1627
+ log.warn(
1628
+ "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days."
1629
+ );
1630
+ return;
1631
+ }
1632
+ const dateFormat2 = diagObj.db.getDateFormat();
1633
+ const excludeRanges = [];
1634
+ let range = null;
1635
+ let d = dayjs(minTime);
1636
+ while (d.valueOf() <= maxTime) {
1637
+ if (diagObj.db.isInvalidDate(d, dateFormat2, excludes2, includes2)) {
1638
+ if (!range) {
1639
+ range = {
1640
+ start: d,
1641
+ end: d
1642
+ };
1643
+ } else {
1644
+ range.end = d;
1645
+ }
1646
+ } else {
1647
+ if (range) {
1648
+ excludeRanges.push(range);
1649
+ range = null;
1650
+ }
1651
+ }
1652
+ d = d.add(1, "d");
1653
+ }
1654
+ const rectangles = svg.append("g").selectAll("rect").data(excludeRanges).enter();
1655
+ rectangles.append("rect").attr("id", function(d2) {
1656
+ return "exclude-" + d2.start.format("YYYY-MM-DD");
1657
+ }).attr("x", function(d2) {
1658
+ return timeScale(d2.start) + theSidePad;
1659
+ }).attr("y", conf.gridLineStartPadding).attr("width", function(d2) {
1660
+ const renderEnd = d2.end.add(1, "day");
1661
+ return timeScale(renderEnd) - timeScale(d2.start);
1662
+ }).attr("height", h2 - theTopPad - conf.gridLineStartPadding).attr("transform-origin", function(d2, i) {
1663
+ return (timeScale(d2.start) + theSidePad + 0.5 * (timeScale(d2.end) - timeScale(d2.start))).toString() + "px " + (i * theGap + 0.5 * h2).toString() + "px";
1664
+ }).attr("class", "exclude-range");
1665
+ }
1666
+ function makeGrid(theSidePad, theTopPad, w2, h2) {
1667
+ let bottomXAxis = axisBottom(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d"));
1668
+ const reTickInterval = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/;
1669
+ const resultTickInterval = reTickInterval.exec(
1670
+ diagObj.db.getTickInterval() || conf.tickInterval
1671
+ );
1672
+ if (resultTickInterval !== null) {
1673
+ const every = resultTickInterval[1];
1674
+ const interval = resultTickInterval[2];
1675
+ const weekday2 = diagObj.db.getWeekday() || conf.weekday;
1676
+ switch (interval) {
1677
+ case "millisecond":
1678
+ bottomXAxis.ticks(timeMillisecond.every(every));
1679
+ break;
1680
+ case "second":
1681
+ bottomXAxis.ticks(timeSecond.every(every));
1682
+ break;
1683
+ case "minute":
1684
+ bottomXAxis.ticks(timeMinute.every(every));
1685
+ break;
1686
+ case "hour":
1687
+ bottomXAxis.ticks(timeHour.every(every));
1688
+ break;
1689
+ case "day":
1690
+ bottomXAxis.ticks(timeDay.every(every));
1691
+ break;
1692
+ case "week":
1693
+ bottomXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every));
1694
+ break;
1695
+ case "month":
1696
+ bottomXAxis.ticks(timeMonth.every(every));
1697
+ break;
1698
+ }
1699
+ }
1700
+ svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + (h2 - 50) + ")").call(bottomXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em");
1701
+ if (diagObj.db.topAxisEnabled() || conf.topAxis) {
1702
+ let topXAxis = axisTop(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d"));
1703
+ if (resultTickInterval !== null) {
1704
+ const every = resultTickInterval[1];
1705
+ const interval = resultTickInterval[2];
1706
+ const weekday2 = diagObj.db.getWeekday() || conf.weekday;
1707
+ switch (interval) {
1708
+ case "millisecond":
1709
+ topXAxis.ticks(timeMillisecond.every(every));
1710
+ break;
1711
+ case "second":
1712
+ topXAxis.ticks(timeSecond.every(every));
1713
+ break;
1714
+ case "minute":
1715
+ topXAxis.ticks(timeMinute.every(every));
1716
+ break;
1717
+ case "hour":
1718
+ topXAxis.ticks(timeHour.every(every));
1719
+ break;
1720
+ case "day":
1721
+ topXAxis.ticks(timeDay.every(every));
1722
+ break;
1723
+ case "week":
1724
+ topXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every));
1725
+ break;
1726
+ case "month":
1727
+ topXAxis.ticks(timeMonth.every(every));
1728
+ break;
1729
+ }
1730
+ }
1731
+ svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + theTopPad + ")").call(topXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
1732
+ }
1733
+ }
1734
+ function vertLabels(theGap, theTopPad) {
1735
+ let prevGap = 0;
1736
+ const numOccurrences = Object.keys(categoryHeights).map((d) => [d, categoryHeights[d]]);
1737
+ svg.append("g").selectAll("text").data(numOccurrences).enter().append(function(d) {
1738
+ const rows = d[0].split(common.lineBreakRegex);
1739
+ const dy = -(rows.length - 1) / 2;
1740
+ const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text");
1741
+ svgLabel.setAttribute("dy", dy + "em");
1742
+ for (const [j, row] of rows.entries()) {
1743
+ const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan");
1744
+ tspan.setAttribute("alignment-baseline", "central");
1745
+ tspan.setAttribute("x", "10");
1746
+ if (j > 0) {
1747
+ tspan.setAttribute("dy", "1em");
1748
+ }
1749
+ tspan.textContent = row;
1750
+ svgLabel.appendChild(tspan);
1751
+ }
1752
+ return svgLabel;
1753
+ }).attr("x", 10).attr("y", function(d, i) {
1754
+ if (i > 0) {
1755
+ for (let j = 0; j < i; j++) {
1756
+ prevGap += numOccurrences[i - 1][1];
1757
+ return d[1] * theGap / 2 + prevGap * theGap + theTopPad;
1758
+ }
1759
+ } else {
1760
+ return d[1] * theGap / 2 + theTopPad;
1761
+ }
1762
+ }).attr("font-size", conf.sectionFontSize).attr("class", function(d) {
1763
+ for (const [i, category] of categories.entries()) {
1764
+ if (d[0] === category) {
1765
+ return "sectionTitle sectionTitle" + i % conf.numberSectionStyles;
1766
+ }
1767
+ }
1768
+ return "sectionTitle";
1769
+ });
1770
+ }
1771
+ function drawToday(theSidePad, theTopPad, w2, h2) {
1772
+ const todayMarker2 = diagObj.db.getTodayMarker();
1773
+ if (todayMarker2 === "off") {
1774
+ return;
1775
+ }
1776
+ const todayG = svg.append("g").attr("class", "today");
1777
+ const today = /* @__PURE__ */ new Date();
1778
+ const todayLine = todayG.append("line");
1779
+ todayLine.attr("x1", timeScale(today) + theSidePad).attr("x2", timeScale(today) + theSidePad).attr("y1", conf.titleTopMargin).attr("y2", h2 - conf.titleTopMargin).attr("class", "today");
1780
+ if (todayMarker2 !== "") {
1781
+ todayLine.attr("style", todayMarker2.replace(/,/g, ";"));
1782
+ }
1783
+ }
1784
+ function checkUnique(arr) {
1785
+ const hash = {};
1786
+ const result = [];
1787
+ for (let i = 0, l = arr.length; i < l; ++i) {
1788
+ if (!Object.prototype.hasOwnProperty.call(hash, arr[i])) {
1789
+ hash[arr[i]] = true;
1790
+ result.push(arr[i]);
1791
+ }
1792
+ }
1793
+ return result;
1794
+ }
1795
+ };
1796
+ const ganttRenderer = {
1797
+ setConf,
1798
+ draw
1799
+ };
1800
+ const getStyles = (options) => `
1801
+ .mermaid-main-font {
1802
+ font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
1803
+ }
1804
+
1805
+ .exclude-range {
1806
+ fill: ${options.excludeBkgColor};
1807
+ }
1808
+
1809
+ .section {
1810
+ stroke: none;
1811
+ opacity: 0.2;
1812
+ }
1813
+
1814
+ .section0 {
1815
+ fill: ${options.sectionBkgColor};
1816
+ }
1817
+
1818
+ .section2 {
1819
+ fill: ${options.sectionBkgColor2};
1820
+ }
1821
+
1822
+ .section1,
1823
+ .section3 {
1824
+ fill: ${options.altSectionBkgColor};
1825
+ opacity: 0.2;
1826
+ }
1827
+
1828
+ .sectionTitle0 {
1829
+ fill: ${options.titleColor};
1830
+ }
1831
+
1832
+ .sectionTitle1 {
1833
+ fill: ${options.titleColor};
1834
+ }
1835
+
1836
+ .sectionTitle2 {
1837
+ fill: ${options.titleColor};
1838
+ }
1839
+
1840
+ .sectionTitle3 {
1841
+ fill: ${options.titleColor};
1842
+ }
1843
+
1844
+ .sectionTitle {
1845
+ text-anchor: start;
1846
+ font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
1847
+ }
1848
+
1849
+
1850
+ /* Grid and axis */
1851
+
1852
+ .grid .tick {
1853
+ stroke: ${options.gridColor};
1854
+ opacity: 0.8;
1855
+ shape-rendering: crispEdges;
1856
+ }
1857
+
1858
+ .grid .tick text {
1859
+ font-family: ${options.fontFamily};
1860
+ fill: ${options.textColor};
1861
+ }
1862
+
1863
+ .grid path {
1864
+ stroke-width: 0;
1865
+ }
1866
+
1867
+
1868
+ /* Today line */
1869
+
1870
+ .today {
1871
+ fill: none;
1872
+ stroke: ${options.todayLineColor};
1873
+ stroke-width: 2px;
1874
+ }
1875
+
1876
+
1877
+ /* Task styling */
1878
+
1879
+ /* Default task */
1880
+
1881
+ .task {
1882
+ stroke-width: 2;
1883
+ }
1884
+
1885
+ .taskText {
1886
+ text-anchor: middle;
1887
+ font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
1888
+ }
1889
+
1890
+ .taskTextOutsideRight {
1891
+ fill: ${options.taskTextDarkColor};
1892
+ text-anchor: start;
1893
+ font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
1894
+ }
1895
+
1896
+ .taskTextOutsideLeft {
1897
+ fill: ${options.taskTextDarkColor};
1898
+ text-anchor: end;
1899
+ }
1900
+
1901
+
1902
+ /* Special case clickable */
1903
+
1904
+ .task.clickable {
1905
+ cursor: pointer;
1906
+ }
1907
+
1908
+ .taskText.clickable {
1909
+ cursor: pointer;
1910
+ fill: ${options.taskTextClickableColor} !important;
1911
+ font-weight: bold;
1912
+ }
1913
+
1914
+ .taskTextOutsideLeft.clickable {
1915
+ cursor: pointer;
1916
+ fill: ${options.taskTextClickableColor} !important;
1917
+ font-weight: bold;
1918
+ }
1919
+
1920
+ .taskTextOutsideRight.clickable {
1921
+ cursor: pointer;
1922
+ fill: ${options.taskTextClickableColor} !important;
1923
+ font-weight: bold;
1924
+ }
1925
+
1926
+
1927
+ /* Specific task settings for the sections*/
1928
+
1929
+ .taskText0,
1930
+ .taskText1,
1931
+ .taskText2,
1932
+ .taskText3 {
1933
+ fill: ${options.taskTextColor};
1934
+ }
1935
+
1936
+ .task0,
1937
+ .task1,
1938
+ .task2,
1939
+ .task3 {
1940
+ fill: ${options.taskBkgColor};
1941
+ stroke: ${options.taskBorderColor};
1942
+ }
1943
+
1944
+ .taskTextOutside0,
1945
+ .taskTextOutside2
1946
+ {
1947
+ fill: ${options.taskTextOutsideColor};
1948
+ }
1949
+
1950
+ .taskTextOutside1,
1951
+ .taskTextOutside3 {
1952
+ fill: ${options.taskTextOutsideColor};
1953
+ }
1954
+
1955
+
1956
+ /* Active task */
1957
+
1958
+ .active0,
1959
+ .active1,
1960
+ .active2,
1961
+ .active3 {
1962
+ fill: ${options.activeTaskBkgColor};
1963
+ stroke: ${options.activeTaskBorderColor};
1964
+ }
1965
+
1966
+ .activeText0,
1967
+ .activeText1,
1968
+ .activeText2,
1969
+ .activeText3 {
1970
+ fill: ${options.taskTextDarkColor} !important;
1971
+ }
1972
+
1973
+
1974
+ /* Completed task */
1975
+
1976
+ .done0,
1977
+ .done1,
1978
+ .done2,
1979
+ .done3 {
1980
+ stroke: ${options.doneTaskBorderColor};
1981
+ fill: ${options.doneTaskBkgColor};
1982
+ stroke-width: 2;
1983
+ }
1984
+
1985
+ .doneText0,
1986
+ .doneText1,
1987
+ .doneText2,
1988
+ .doneText3 {
1989
+ fill: ${options.taskTextDarkColor} !important;
1990
+ }
1991
+
1992
+
1993
+ /* Tasks on the critical line */
1994
+
1995
+ .crit0,
1996
+ .crit1,
1997
+ .crit2,
1998
+ .crit3 {
1999
+ stroke: ${options.critBorderColor};
2000
+ fill: ${options.critBkgColor};
2001
+ stroke-width: 2;
2002
+ }
2003
+
2004
+ .activeCrit0,
2005
+ .activeCrit1,
2006
+ .activeCrit2,
2007
+ .activeCrit3 {
2008
+ stroke: ${options.critBorderColor};
2009
+ fill: ${options.activeTaskBkgColor};
2010
+ stroke-width: 2;
2011
+ }
2012
+
2013
+ .doneCrit0,
2014
+ .doneCrit1,
2015
+ .doneCrit2,
2016
+ .doneCrit3 {
2017
+ stroke: ${options.critBorderColor};
2018
+ fill: ${options.doneTaskBkgColor};
2019
+ stroke-width: 2;
2020
+ cursor: pointer;
2021
+ shape-rendering: crispEdges;
2022
+ }
2023
+
2024
+ .milestone {
2025
+ transform: rotate(45deg) scale(0.8,0.8);
2026
+ }
2027
+
2028
+ .milestoneText {
2029
+ font-style: italic;
2030
+ }
2031
+ .doneCritText0,
2032
+ .doneCritText1,
2033
+ .doneCritText2,
2034
+ .doneCritText3 {
2035
+ fill: ${options.taskTextDarkColor} !important;
2036
+ }
2037
+
2038
+ .activeCritText0,
2039
+ .activeCritText1,
2040
+ .activeCritText2,
2041
+ .activeCritText3 {
2042
+ fill: ${options.taskTextDarkColor} !important;
2043
+ }
2044
+
2045
+ .titleText {
2046
+ text-anchor: middle;
2047
+ font-size: 18px;
2048
+ fill: ${options.titleColor || options.textColor};
2049
+ font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
2050
+ }
2051
+ `;
2052
+ const ganttStyles = getStyles;
2053
+ const diagram = {
2054
+ parser: ganttParser,
2055
+ db: ganttDb,
2056
+ renderer: ganttRenderer,
2057
+ styles: ganttStyles
2058
+ };
2059
+ export {
2060
+ diagram
2061
+ };