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.
- checksums.yaml +4 -4
- data/README.md +11 -2
- data/_layouts/default.html +6 -0
- data/_layouts/page.html +1 -1
- data/assets/mermaid/Diagram.d.ts +33 -0
- data/assets/mermaid/Tableau10-31042135.js +10 -0
- data/assets/mermaid/Tableau10-558cc280.js +9 -0
- data/assets/mermaid/__mocks__/mermaidAPI.d.ts +13 -0
- data/assets/mermaid/accessibility.d.ts +27 -0
- data/assets/mermaid/accessibility.spec.d.ts +1 -0
- data/assets/mermaid/arc-c0f908ab.js +148 -0
- data/assets/mermaid/arc-d1f6357e.js +86 -0
- data/assets/mermaid/array-2ff2c7a6.js +6 -0
- data/assets/mermaid/array-b7dcf730.js +6 -0
- data/assets/mermaid/assignWithDepth.d.ts +30 -0
- data/assets/mermaid/blockDiagram-5dc23a45.js +1230 -0
- data/assets/mermaid/blockDiagram-9f4a6865.js +1822 -0
- data/assets/mermaid/blockDiagram-efe38566.js +1818 -0
- data/assets/mermaid/c4Diagram-1e775db3.js +1579 -0
- data/assets/mermaid/c4Diagram-ae766693.js +2473 -0
- data/assets/mermaid/c4Diagram-af207393.js +2463 -0
- data/assets/mermaid/channel-ebbc4130.js +5 -0
- data/assets/mermaid/channel-f9001828.js +8 -0
- data/assets/mermaid/classDiagram-72b9c71d.js +356 -0
- data/assets/mermaid/classDiagram-f52caa06.js +220 -0
- data/assets/mermaid/classDiagram-fb54d2a0.js +363 -0
- data/assets/mermaid/classDiagram-v2-640c694e.js +206 -0
- data/assets/mermaid/classDiagram-v2-a2b738ad.js +298 -0
- data/assets/mermaid/classDiagram-v2-fedb80f6.js +290 -0
- data/assets/mermaid/clone-9ea6bfeb.js +8 -0
- data/assets/mermaid/clone-afc2f047.js +8 -0
- data/assets/mermaid/config.d.ts +98 -0
- data/assets/mermaid/config.spec.d.ts +1 -0
- data/assets/mermaid/config.type.d.ts +1534 -0
- data/assets/mermaid/createText-03b82060.js +2966 -0
- data/assets/mermaid/createText-b70fe78a.js +4929 -0
- data/assets/mermaid/createText-ca0c5216.js +251 -0
- data/assets/mermaid/dagre-wrapper/blockArrowHelper.d.ts +8 -0
- data/assets/mermaid/dagre-wrapper/clusters.d.ts +4 -0
- data/assets/mermaid/dagre-wrapper/createLabel.d.ts +9 -0
- data/assets/mermaid/dagre-wrapper/edgeMarker.d.ts +12 -0
- data/assets/mermaid/dagre-wrapper/edgeMarker.spec.d.ts +1 -0
- data/assets/mermaid/dagre-wrapper/edges.d.ts +14 -0
- data/assets/mermaid/dagre-wrapper/index.d.ts +1 -0
- data/assets/mermaid/dagre-wrapper/intersect/index.d.ts +13 -0
- data/assets/mermaid/dagre-wrapper/intersect/intersect-circle.d.ts +10 -0
- data/assets/mermaid/dagre-wrapper/intersect/intersect-ellipse.d.ts +11 -0
- data/assets/mermaid/dagre-wrapper/intersect/intersect-line.d.ts +13 -0
- data/assets/mermaid/dagre-wrapper/intersect/intersect-node.d.ts +6 -0
- data/assets/mermaid/dagre-wrapper/intersect/intersect-polygon.d.ts +10 -0
- data/assets/mermaid/dagre-wrapper/intersect/intersect-rect.d.ts +5 -0
- data/assets/mermaid/dagre-wrapper/markers.d.ts +2 -0
- data/assets/mermaid/dagre-wrapper/mermaid-graphlib.d.ts +8 -0
- data/assets/mermaid/dagre-wrapper/nodes.d.ts +4 -0
- data/assets/mermaid/dagre-wrapper/shapes/note.d.ts +2 -0
- data/assets/mermaid/dagre-wrapper/shapes/util.d.ts +14 -0
- data/assets/mermaid/defaultConfig.d.ts +12 -0
- data/assets/mermaid/diagram-api/comments.d.ts +6 -0
- data/assets/mermaid/diagram-api/comments.spec.d.ts +1 -0
- data/assets/mermaid/diagram-api/detectType.d.ts +42 -0
- data/assets/mermaid/diagram-api/diagram-orchestration.d.ts +1 -0
- data/assets/mermaid/diagram-api/diagram-orchestration.spec.d.ts +1 -0
- data/assets/mermaid/diagram-api/diagramAPI.d.ts +31 -0
- data/assets/mermaid/diagram-api/diagramAPI.spec.d.ts +1 -0
- data/assets/mermaid/diagram-api/frontmatter.d.ts +18 -0
- data/assets/mermaid/diagram-api/frontmatter.spec.d.ts +1 -0
- data/assets/mermaid/diagram-api/loadDiagram.d.ts +1 -0
- data/assets/mermaid/diagram-api/regexes.d.ts +3 -0
- data/assets/mermaid/diagram-api/types.d.ts +84 -0
- data/assets/mermaid/diagram.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/block/blockDB.d.ts +54 -0
- data/assets/mermaid/diagrams/block/blockDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/block/blockDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/block/blockRenderer.d.ts +15 -0
- data/assets/mermaid/diagrams/block/blockTypes.d.ts +36 -0
- data/assets/mermaid/diagrams/block/blockUtils.d.ts +1 -0
- data/assets/mermaid/diagrams/block/layout.d.ts +13 -0
- data/assets/mermaid/diagrams/block/layout.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/block/parser/block.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/block/renderHelpers.d.ts +10 -0
- data/assets/mermaid/diagrams/block/styles.d.ts +18 -0
- data/assets/mermaid/diagrams/c4/c4Db.d.ts +127 -0
- data/assets/mermaid/diagrams/c4/c4Detector.d.ts +3 -0
- data/assets/mermaid/diagrams/c4/c4Diagram.d.ts +2 -0
- data/assets/mermaid/diagrams/c4/c4Renderer.d.ts +12 -0
- data/assets/mermaid/diagrams/c4/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/c4/svgDraw.d.ts +36 -0
- data/assets/mermaid/diagrams/class/classDb.d.ts +144 -0
- data/assets/mermaid/diagrams/class/classDetector-V2.d.ts +3 -0
- data/assets/mermaid/diagrams/class/classDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/class/classDiagram-v2.d.ts +2 -0
- data/assets/mermaid/diagrams/class/classDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/class/classDiagram.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/class/classRenderer-v2.d.ts +57 -0
- data/assets/mermaid/diagrams/class/classRenderer.d.ts +5 -0
- data/assets/mermaid/diagrams/class/classTypes.d.ts +78 -0
- data/assets/mermaid/diagrams/class/classTypes.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/class/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/class/svgDraw.d.ts +25 -0
- data/assets/mermaid/diagrams/common/common.d.ts +110 -0
- data/assets/mermaid/diagrams/common/common.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/common/commonDb.d.ts +7 -0
- data/assets/mermaid/diagrams/common/commonTypes.d.ts +51 -0
- data/assets/mermaid/diagrams/common/svgDrawCommon.d.ts +15 -0
- data/assets/mermaid/diagrams/er/erDb.d.ts +49 -0
- data/assets/mermaid/diagrams/er/erDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/er/erDiagram.d.ts +34 -0
- data/assets/mermaid/diagrams/er/erMarkers.d.ts +24 -0
- data/assets/mermaid/diagrams/er/erRenderer.d.ts +19 -0
- data/assets/mermaid/diagrams/er/erRenderer.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/er/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/error/errorDiagram.d.ts +3 -0
- data/assets/mermaid/diagrams/error/errorRenderer.d.ts +12 -0
- data/assets/mermaid/diagrams/flowchart/elk/detector.d.ts +3 -0
- data/assets/mermaid/diagrams/flowchart/elk/detector.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/flowchart/elk/flowRenderer-elk.d.ts +10 -0
- data/assets/mermaid/diagrams/flowchart/elk/flowchart-elk-definition.d.ts +10 -0
- data/assets/mermaid/diagrams/flowchart/elk/render-utils.d.ts +5 -0
- data/assets/mermaid/diagrams/flowchart/elk/render-utils.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/flowchart/elk/styles.d.ts +19 -0
- data/assets/mermaid/diagrams/flowchart/flowChartShapes.d.ts +9 -0
- data/assets/mermaid/diagrams/flowchart/flowDb.d.ts +87 -0
- data/assets/mermaid/diagrams/flowchart/flowDetector-v2.d.ts +3 -0
- data/assets/mermaid/diagrams/flowchart/flowDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/flowchart/flowDiagram-v2.d.ts +57 -0
- data/assets/mermaid/diagrams/flowchart/flowDiagram.d.ts +57 -0
- data/assets/mermaid/diagrams/flowchart/flowRenderer-v2.d.ts +13 -0
- data/assets/mermaid/diagrams/flowchart/flowRenderer.d.ts +13 -0
- data/assets/mermaid/diagrams/flowchart/styles.d.ts +18 -0
- data/assets/mermaid/diagrams/gantt/ganttDb.d.ts +106 -0
- data/assets/mermaid/diagrams/gantt/ganttDb.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/gantt/ganttDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/gantt/ganttDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/gantt/ganttRenderer.d.ts +7 -0
- data/assets/mermaid/diagrams/gantt/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/git/gitGraphAst.d.ts +61 -0
- data/assets/mermaid/diagrams/git/gitGraphDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/git/gitGraphDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/git/gitGraphRenderer.d.ts +5 -0
- data/assets/mermaid/diagrams/git/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/info/info.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/info/infoDb.d.ts +5 -0
- data/assets/mermaid/diagrams/info/infoDetector.d.ts +2 -0
- data/assets/mermaid/diagrams/info/infoDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/info/infoRenderer.d.ts +4 -0
- data/assets/mermaid/diagrams/info/infoTypes.d.ts +9 -0
- data/assets/mermaid/diagrams/mindmap/detector.d.ts +3 -0
- data/assets/mermaid/diagrams/mindmap/mindmap-definition.d.ts +2 -0
- data/assets/mermaid/diagrams/mindmap/mindmap.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/mindmap/mindmapDb.d.ts +30 -0
- data/assets/mermaid/diagrams/mindmap/mindmapRenderer.d.ts +21 -0
- data/assets/mermaid/diagrams/mindmap/mindmapTypes.d.ts +20 -0
- data/assets/mermaid/diagrams/mindmap/styles.d.ts +3 -0
- data/assets/mermaid/diagrams/mindmap/svgDraw.d.ts +13 -0
- data/assets/mermaid/diagrams/pie/pie.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/pie/pieDb.d.ts +6 -0
- data/assets/mermaid/diagrams/pie/pieDetector.d.ts +2 -0
- data/assets/mermaid/diagrams/pie/pieDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/pie/pieRenderer.d.ts +13 -0
- data/assets/mermaid/diagrams/pie/pieStyles.d.ts +3 -0
- data/assets/mermaid/diagrams/pie/pieTypes.d.ts +53 -0
- data/assets/mermaid/diagrams/quadrant-chart/parser/quadrant.jison.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/quadrant-chart/quadrantBuilder.d.ts +118 -0
- data/assets/mermaid/diagrams/quadrant-chart/quadrantDb.d.ts +38 -0
- data/assets/mermaid/diagrams/quadrant-chart/quadrantDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/quadrant-chart/quadrantDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/quadrant-chart/quadrantRenderer.d.ts +6 -0
- data/assets/mermaid/diagrams/requirement/requirementDb.d.ts +70 -0
- data/assets/mermaid/diagrams/requirement/requirementDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/requirement/requirementDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/requirement/requirementMarkers.d.ts +10 -0
- data/assets/mermaid/diagrams/requirement/requirementRenderer.d.ts +7 -0
- data/assets/mermaid/diagrams/requirement/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/sankey/parser/sankey.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/sankey/sankeyDB.d.ts +36 -0
- data/assets/mermaid/diagrams/sankey/sankeyDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/sankey/sankeyDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/sankey/sankeyRenderer.d.ts +14 -0
- data/assets/mermaid/diagrams/sankey/sankeyUtils.d.ts +1 -0
- data/assets/mermaid/diagrams/sequence/sequenceDb.d.ts +153 -0
- data/assets/mermaid/diagrams/sequence/sequenceDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/sequence/sequenceDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/sequence/sequenceRenderer.d.ts +202 -0
- data/assets/mermaid/diagrams/sequence/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/sequence/svgDraw.d.ts +73 -0
- data/assets/mermaid/diagrams/state/id-cache.d.ts +11 -0
- data/assets/mermaid/diagrams/state/shapes.d.ts +14 -0
- data/assets/mermaid/diagrams/state/stateCommon.d.ts +22 -0
- data/assets/mermaid/diagrams/state/stateDb.d.ts +91 -0
- data/assets/mermaid/diagrams/state/stateDetector-V2.d.ts +3 -0
- data/assets/mermaid/diagrams/state/stateDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/state/stateDiagram-v2.d.ts +2 -0
- data/assets/mermaid/diagrams/state/stateDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/state/stateRenderer-v2.d.ts +20 -0
- data/assets/mermaid/diagrams/state/stateRenderer.d.ts +7 -0
- data/assets/mermaid/diagrams/state/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/timeline/detector.d.ts +3 -0
- data/assets/mermaid/diagrams/timeline/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/timeline/svgDraw.d.ts +46 -0
- data/assets/mermaid/diagrams/timeline/timeline-definition.d.ts +10 -0
- data/assets/mermaid/diagrams/timeline/timelineDb.d.ts +20 -0
- data/assets/mermaid/diagrams/timeline/timelineRenderer.d.ts +19 -0
- data/assets/mermaid/diagrams/user-journey/journeyDb.d.ts +30 -0
- data/assets/mermaid/diagrams/user-journey/journeyDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/user-journey/journeyDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/user-journey/journeyRenderer.d.ts +30 -0
- data/assets/mermaid/diagrams/user-journey/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/user-journey/svgDraw.d.ts +20 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/bandAxis.d.ts +12 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/baseAxis.d.ts +38 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/index.d.ts +12 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/linearAxis.d.ts +11 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/chartTitle.d.ts +16 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/barPlot.d.ts +12 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/index.d.ts +20 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/linePlot.d.ts +11 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/index.d.ts +5 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/interfaces.d.ts +132 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/orchestrator.d.ts +12 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/textDimensionCalculator.d.ts +10 -0
- data/assets/mermaid/diagrams/xychart/parser/xychart.jison.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/xychart/xychartDb.d.ts +40 -0
- data/assets/mermaid/diagrams/xychart/xychartDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/xychart/xychartDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/xychart/xychartRenderer.d.ts +6 -0
- data/assets/mermaid/docs/vite.config.d.ts +2 -0
- data/assets/mermaid/edges-066a5561.js +1840 -0
- data/assets/mermaid/edges-16357fde.js +1083 -0
- data/assets/mermaid/edges-ce5cfb7c.js +1840 -0
- data/assets/mermaid/erDiagram-09d1c15f.js +1176 -0
- data/assets/mermaid/erDiagram-543717f2.js +1321 -0
- data/assets/mermaid/erDiagram-c7ff1bec.js +931 -0
- data/assets/mermaid/errors.d.ts +3 -0
- data/assets/mermaid/flowDb-9a89ea33.js +1126 -0
- data/assets/mermaid/flowDb-ba9bd7fa.js +1713 -0
- data/assets/mermaid/flowDb-c1833063.js +1714 -0
- data/assets/mermaid/flowDiagram-aadb13b0.js +797 -0
- data/assets/mermaid/flowDiagram-b222e15a.js +614 -0
- data/assets/mermaid/flowDiagram-b5e7ba30.js +1278 -0
- data/assets/mermaid/flowDiagram-v2-13329dc7.js +40 -0
- data/assets/mermaid/flowDiagram-v2-54711e03.js +32 -0
- data/assets/mermaid/flowDiagram-v2-f2119625.js +25 -0
- data/assets/mermaid/flowchart-elk-definition-2d49707c.js +93397 -0
- data/assets/mermaid/flowchart-elk-definition-ae0efee6.js +814 -0
- data/assets/mermaid/flowchart-elk-definition-cf813a97.js +48407 -0
- data/assets/mermaid/ganttDiagram-12cf43db.js +3445 -0
- data/assets/mermaid/ganttDiagram-3c2fde2b.js +2501 -0
- data/assets/mermaid/ganttDiagram-b62c793e.js +2061 -0
- data/assets/mermaid/gitGraphDiagram-942e62fe.js +1800 -0
- data/assets/mermaid/gitGraphDiagram-b9392a12.js +1790 -0
- data/assets/mermaid/gitGraphDiagram-c3a0619c.js +1264 -0
- data/assets/mermaid/graph-0ee63739.js +881 -0
- data/assets/mermaid/graph-fe24fab6.js +1285 -0
- data/assets/mermaid/index-01f381cb.js +622 -0
- data/assets/mermaid/index-bb6d8841.js +373 -0
- data/assets/mermaid/index-fc479858.js +663 -0
- data/assets/mermaid/infoDiagram-2f5c50c0.js +319 -0
- data/assets/mermaid/infoDiagram-94cd232f.js +520 -0
- data/assets/mermaid/infoDiagram-d0d5c9bd.js +510 -0
- data/assets/mermaid/init-cc95ec8e.js +16 -0
- data/assets/mermaid/init-f9637058.js +16 -0
- data/assets/mermaid/interactionDb.d.ts +2 -0
- data/assets/mermaid/journeyDiagram-14fe341a.js +804 -0
- data/assets/mermaid/journeyDiagram-6625b456.js +1191 -0
- data/assets/mermaid/journeyDiagram-b56e6921.js +1183 -0
- data/assets/mermaid/katex-d90b6d29.js +11624 -0
- data/assets/mermaid/katex-ffb0e8f1.js +14432 -0
- data/assets/mermaid/layout-163b9689.js +2314 -0
- data/assets/mermaid/layout-fd473db2.js +1536 -0
- data/assets/mermaid/line-24d93f1b.js +34 -0
- data/assets/mermaid/line-87f517ef.js +50 -0
- data/assets/mermaid/linear-0ad15847.js +595 -0
- data/assets/mermaid/linear-9bcf74c4.js +447 -0
- data/assets/mermaid/logger.d.ts +9 -0
- data/assets/mermaid/mermaid-6dc72991.js +6461 -0
- data/assets/mermaid/mermaid-9f2aa176.js +8112 -0
- data/assets/mermaid/mermaid-dcacb631.js +12793 -0
- data/assets/mermaid/mermaid.core.mjs +14 -0
- data/assets/mermaid/mermaid.d.ts +146 -0
- data/assets/mermaid/mermaid.esm.min.mjs +4 -0
- data/assets/mermaid/mermaid.esm.mjs +4 -0
- data/assets/mermaid/mermaid.js +195755 -0
- data/assets/mermaid/mermaid.min.js +2029 -0
- data/assets/mermaid/mermaid.spec.d.ts +1 -0
- data/assets/mermaid/mermaidAPI.d.ts +170 -0
- data/assets/mermaid/mermaidAPI.spec.d.ts +1 -0
- data/assets/mermaid/mindmap-definition-307c710a.js +1177 -0
- data/assets/mermaid/mindmap-definition-696ddea4.js +32342 -0
- data/assets/mermaid/mindmap-definition-9399c7e6.js +18760 -0
- data/assets/mermaid/ordinal-475e0c0c.js +82 -0
- data/assets/mermaid/ordinal-5695958c.js +65 -0
- data/assets/mermaid/path-39bad7e2.js +118 -0
- data/assets/mermaid/path-428ebac9.js +91 -0
- data/assets/mermaid/pieDiagram-828dae43.js +502 -0
- data/assets/mermaid/pieDiagram-bb1d19e5.js +722 -0
- data/assets/mermaid/pieDiagram-e854eaf0.js +772 -0
- data/assets/mermaid/preprocess.d.ts +10 -0
- data/assets/mermaid/quadrantDiagram-25a9848b.js +1199 -0
- data/assets/mermaid/quadrantDiagram-5fa00455.js +904 -0
- data/assets/mermaid/quadrantDiagram-c759a472.js +1207 -0
- data/assets/mermaid/rendering-util/createText.d.ts +11 -0
- data/assets/mermaid/rendering-util/handle-markdown-text.d.ts +6 -0
- data/assets/mermaid/rendering-util/handle-markdown-text.spec.d.ts +1 -0
- data/assets/mermaid/rendering-util/selectSvgElement.d.ts +8 -0
- data/assets/mermaid/rendering-util/splitText.d.ts +24 -0
- data/assets/mermaid/rendering-util/splitText.spec.d.ts +1 -0
- data/assets/mermaid/rendering-util/uid.d.ts +8 -0
- data/assets/mermaid/requirementDiagram-03163dc4.js +769 -0
- data/assets/mermaid/requirementDiagram-87253d64.js +1098 -0
- data/assets/mermaid/requirementDiagram-a721e157.js +1091 -0
- data/assets/mermaid/sankeyDiagram-33525efb.js +1198 -0
- data/assets/mermaid/sankeyDiagram-52ec8976.js +818 -0
- data/assets/mermaid/sankeyDiagram-707fac0f.js +660 -0
- data/assets/mermaid/sequenceDiagram-6894f283.js +3346 -0
- data/assets/mermaid/sequenceDiagram-9813c129.js +3336 -0
- data/assets/mermaid/sequenceDiagram-b517d154.js +2234 -0
- data/assets/mermaid/setupGraphViewbox.d.ts +3 -0
- data/assets/mermaid/stateDiagram-5dee940d.js +474 -0
- data/assets/mermaid/stateDiagram-5ec31577.js +467 -0
- data/assets/mermaid/stateDiagram-fca82b5b.js +275 -0
- data/assets/mermaid/stateDiagram-v2-1992cada.js +333 -0
- data/assets/mermaid/stateDiagram-v2-992e82a1.js +325 -0
- data/assets/mermaid/stateDiagram-v2-ed04200a.js +190 -0
- data/assets/mermaid/styles-0784dbeb.js +1363 -0
- data/assets/mermaid/styles-11e81fdd.js +1089 -0
- data/assets/mermaid/styles-36a1a2e8.js +1483 -0
- data/assets/mermaid/styles-483fbfea.js +509 -0
- data/assets/mermaid/styles-727cdd61.js +571 -0
- data/assets/mermaid/styles-b83b31c9.js +1484 -0
- data/assets/mermaid/styles-cacbff60.js +960 -0
- data/assets/mermaid/styles-e75131e4.js +433 -0
- data/assets/mermaid/styles-f80da881.js +1363 -0
- data/assets/mermaid/styles.d.ts +12 -0
- data/assets/mermaid/styles.spec.d.ts +1 -0
- data/assets/mermaid/svgDrawCommon-5e1cfd1d.js +101 -0
- data/assets/mermaid/svgDrawCommon-d6ab583c.js +100 -0
- data/assets/mermaid/svgDrawCommon-ecc5f780.js +64 -0
- data/assets/mermaid/tests/MockedD3.d.ts +45 -0
- data/assets/mermaid/tests/setup.d.ts +1 -0
- data/assets/mermaid/tests/util.d.ts +3 -0
- data/assets/mermaid/themes/erDiagram-oldHardcodedValues.d.ts +7 -0
- data/assets/mermaid/themes/index.d.ts +24 -0
- data/assets/mermaid/themes/theme-base.d.ts +189 -0
- data/assets/mermaid/themes/theme-dark.d.ts +177 -0
- data/assets/mermaid/themes/theme-default.d.ts +188 -0
- data/assets/mermaid/themes/theme-forest.d.ts +185 -0
- data/assets/mermaid/themes/theme-helpers.d.ts +1 -0
- data/assets/mermaid/themes/theme-neutral.d.ts +182 -0
- data/assets/mermaid/timeline-definition-23ce0e2e.js +1211 -0
- data/assets/mermaid/timeline-definition-4ee9bff4.js +795 -0
- data/assets/mermaid/timeline-definition-bf702344.js +1219 -0
- data/assets/mermaid/types.d.ts +31 -0
- data/assets/mermaid/utils/imperativeState.d.ts +32 -0
- data/assets/mermaid/utils/imperativeState.spec.d.ts +1 -0
- data/assets/mermaid/utils/lineWithOffset.d.ts +5 -0
- data/assets/mermaid/utils/sanitizeDirective.d.ts +7 -0
- data/assets/mermaid/utils/subGraphTitleMargins.d.ts +8 -0
- data/assets/mermaid/utils/subGraphTitleMargins.spec.d.ts +1 -0
- data/assets/mermaid/utils.d.ts +286 -0
- data/assets/mermaid/utils.spec.d.ts +1 -0
- data/assets/mermaid/xychartDiagram-de2e5521.js +1800 -0
- data/assets/mermaid/xychartDiagram-e5e6b652.js +1284 -0
- data/assets/mermaid/xychartDiagram-f11f50a6.js +1745 -0
- data/assets/tables.css +23 -0
- data/assets/toURI.js +142 -0
- metadata +363 -2
@@ -0,0 +1,1191 @@
|
|
1
|
+
import { c as getConfig, q as setDiagramTitle, t as getDiagramTitle, s as setAccTitle, g as getAccTitle, b as setAccDescription, a as getAccDescription, v as clear$1, i as configureSvgSize } from "./mermaid-6dc72991.js";
|
2
|
+
import { arc, select } from "d3";
|
3
|
+
import { d as drawRect$1, f as drawText$1, a as drawBackgroundRect$1, g as getNoteRect } from "./svgDrawCommon-5e1cfd1d.js";
|
4
|
+
import "ts-dedent";
|
5
|
+
import "dayjs";
|
6
|
+
import "@braintree/sanitize-url";
|
7
|
+
import "dompurify";
|
8
|
+
import "khroma";
|
9
|
+
import "lodash-es/memoize.js";
|
10
|
+
import "lodash-es/merge.js";
|
11
|
+
import "stylis";
|
12
|
+
import "lodash-es/isEmpty.js";
|
13
|
+
var parser = function() {
|
14
|
+
var o = function(k, v, o2, l) {
|
15
|
+
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
|
16
|
+
;
|
17
|
+
return o2;
|
18
|
+
}, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 18], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 14];
|
19
|
+
var parser2 = {
|
20
|
+
trace: function trace() {
|
21
|
+
},
|
22
|
+
yy: {},
|
23
|
+
symbols_: { "error": 2, "start": 3, "journey": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "taskName": 18, "taskData": 19, "$accept": 0, "$end": 1 },
|
24
|
+
terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" },
|
25
|
+
productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]],
|
26
|
+
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
27
|
+
var $0 = $$.length - 1;
|
28
|
+
switch (yystate) {
|
29
|
+
case 1:
|
30
|
+
return $$[$0 - 1];
|
31
|
+
case 2:
|
32
|
+
this.$ = [];
|
33
|
+
break;
|
34
|
+
case 3:
|
35
|
+
$$[$0 - 1].push($$[$0]);
|
36
|
+
this.$ = $$[$0 - 1];
|
37
|
+
break;
|
38
|
+
case 4:
|
39
|
+
case 5:
|
40
|
+
this.$ = $$[$0];
|
41
|
+
break;
|
42
|
+
case 6:
|
43
|
+
case 7:
|
44
|
+
this.$ = [];
|
45
|
+
break;
|
46
|
+
case 8:
|
47
|
+
yy.setDiagramTitle($$[$0].substr(6));
|
48
|
+
this.$ = $$[$0].substr(6);
|
49
|
+
break;
|
50
|
+
case 9:
|
51
|
+
this.$ = $$[$0].trim();
|
52
|
+
yy.setAccTitle(this.$);
|
53
|
+
break;
|
54
|
+
case 10:
|
55
|
+
case 11:
|
56
|
+
this.$ = $$[$0].trim();
|
57
|
+
yy.setAccDescription(this.$);
|
58
|
+
break;
|
59
|
+
case 12:
|
60
|
+
yy.addSection($$[$0].substr(8));
|
61
|
+
this.$ = $$[$0].substr(8);
|
62
|
+
break;
|
63
|
+
case 13:
|
64
|
+
yy.addTask($$[$0 - 1], $$[$0]);
|
65
|
+
this.$ = "task";
|
66
|
+
break;
|
67
|
+
}
|
68
|
+
},
|
69
|
+
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: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 15, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, o($V0, [2, 11]), o($V0, [2, 12]), { 19: [1, 18] }, o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 13])],
|
70
|
+
defaultActions: {},
|
71
|
+
parseError: function parseError(str, hash) {
|
72
|
+
if (hash.recoverable) {
|
73
|
+
this.trace(str);
|
74
|
+
} else {
|
75
|
+
var error = new Error(str);
|
76
|
+
error.hash = hash;
|
77
|
+
throw error;
|
78
|
+
}
|
79
|
+
},
|
80
|
+
parse: function parse(input) {
|
81
|
+
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
|
82
|
+
var args = lstack.slice.call(arguments, 1);
|
83
|
+
var lexer2 = Object.create(this.lexer);
|
84
|
+
var sharedState = { yy: {} };
|
85
|
+
for (var k in this.yy) {
|
86
|
+
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
87
|
+
sharedState.yy[k] = this.yy[k];
|
88
|
+
}
|
89
|
+
}
|
90
|
+
lexer2.setInput(input, sharedState.yy);
|
91
|
+
sharedState.yy.lexer = lexer2;
|
92
|
+
sharedState.yy.parser = this;
|
93
|
+
if (typeof lexer2.yylloc == "undefined") {
|
94
|
+
lexer2.yylloc = {};
|
95
|
+
}
|
96
|
+
var yyloc = lexer2.yylloc;
|
97
|
+
lstack.push(yyloc);
|
98
|
+
var ranges = lexer2.options && lexer2.options.ranges;
|
99
|
+
if (typeof sharedState.yy.parseError === "function") {
|
100
|
+
this.parseError = sharedState.yy.parseError;
|
101
|
+
} else {
|
102
|
+
this.parseError = Object.getPrototypeOf(this).parseError;
|
103
|
+
}
|
104
|
+
function lex() {
|
105
|
+
var token;
|
106
|
+
token = tstack.pop() || lexer2.lex() || EOF;
|
107
|
+
if (typeof token !== "number") {
|
108
|
+
if (token instanceof Array) {
|
109
|
+
tstack = token;
|
110
|
+
token = tstack.pop();
|
111
|
+
}
|
112
|
+
token = self.symbols_[token] || token;
|
113
|
+
}
|
114
|
+
return token;
|
115
|
+
}
|
116
|
+
var symbol, state, action, r, yyval = {}, p, len, newState, expected;
|
117
|
+
while (true) {
|
118
|
+
state = stack[stack.length - 1];
|
119
|
+
if (this.defaultActions[state]) {
|
120
|
+
action = this.defaultActions[state];
|
121
|
+
} else {
|
122
|
+
if (symbol === null || typeof symbol == "undefined") {
|
123
|
+
symbol = lex();
|
124
|
+
}
|
125
|
+
action = table[state] && table[state][symbol];
|
126
|
+
}
|
127
|
+
if (typeof action === "undefined" || !action.length || !action[0]) {
|
128
|
+
var errStr = "";
|
129
|
+
expected = [];
|
130
|
+
for (p in table[state]) {
|
131
|
+
if (this.terminals_[p] && p > TERROR) {
|
132
|
+
expected.push("'" + this.terminals_[p] + "'");
|
133
|
+
}
|
134
|
+
}
|
135
|
+
if (lexer2.showPosition) {
|
136
|
+
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
137
|
+
} else {
|
138
|
+
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
139
|
+
}
|
140
|
+
this.parseError(errStr, {
|
141
|
+
text: lexer2.match,
|
142
|
+
token: this.terminals_[symbol] || symbol,
|
143
|
+
line: lexer2.yylineno,
|
144
|
+
loc: yyloc,
|
145
|
+
expected
|
146
|
+
});
|
147
|
+
}
|
148
|
+
if (action[0] instanceof Array && action.length > 1) {
|
149
|
+
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
150
|
+
}
|
151
|
+
switch (action[0]) {
|
152
|
+
case 1:
|
153
|
+
stack.push(symbol);
|
154
|
+
vstack.push(lexer2.yytext);
|
155
|
+
lstack.push(lexer2.yylloc);
|
156
|
+
stack.push(action[1]);
|
157
|
+
symbol = null;
|
158
|
+
{
|
159
|
+
yyleng = lexer2.yyleng;
|
160
|
+
yytext = lexer2.yytext;
|
161
|
+
yylineno = lexer2.yylineno;
|
162
|
+
yyloc = lexer2.yylloc;
|
163
|
+
}
|
164
|
+
break;
|
165
|
+
case 2:
|
166
|
+
len = this.productions_[action[1]][1];
|
167
|
+
yyval.$ = vstack[vstack.length - len];
|
168
|
+
yyval._$ = {
|
169
|
+
first_line: lstack[lstack.length - (len || 1)].first_line,
|
170
|
+
last_line: lstack[lstack.length - 1].last_line,
|
171
|
+
first_column: lstack[lstack.length - (len || 1)].first_column,
|
172
|
+
last_column: lstack[lstack.length - 1].last_column
|
173
|
+
};
|
174
|
+
if (ranges) {
|
175
|
+
yyval._$.range = [
|
176
|
+
lstack[lstack.length - (len || 1)].range[0],
|
177
|
+
lstack[lstack.length - 1].range[1]
|
178
|
+
];
|
179
|
+
}
|
180
|
+
r = this.performAction.apply(yyval, [
|
181
|
+
yytext,
|
182
|
+
yyleng,
|
183
|
+
yylineno,
|
184
|
+
sharedState.yy,
|
185
|
+
action[1],
|
186
|
+
vstack,
|
187
|
+
lstack
|
188
|
+
].concat(args));
|
189
|
+
if (typeof r !== "undefined") {
|
190
|
+
return r;
|
191
|
+
}
|
192
|
+
if (len) {
|
193
|
+
stack = stack.slice(0, -1 * len * 2);
|
194
|
+
vstack = vstack.slice(0, -1 * len);
|
195
|
+
lstack = lstack.slice(0, -1 * len);
|
196
|
+
}
|
197
|
+
stack.push(this.productions_[action[1]][0]);
|
198
|
+
vstack.push(yyval.$);
|
199
|
+
lstack.push(yyval._$);
|
200
|
+
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
201
|
+
stack.push(newState);
|
202
|
+
break;
|
203
|
+
case 3:
|
204
|
+
return true;
|
205
|
+
}
|
206
|
+
}
|
207
|
+
return true;
|
208
|
+
}
|
209
|
+
};
|
210
|
+
var lexer = function() {
|
211
|
+
var lexer2 = {
|
212
|
+
EOF: 1,
|
213
|
+
parseError: function parseError(str, hash) {
|
214
|
+
if (this.yy.parser) {
|
215
|
+
this.yy.parser.parseError(str, hash);
|
216
|
+
} else {
|
217
|
+
throw new Error(str);
|
218
|
+
}
|
219
|
+
},
|
220
|
+
// resets the lexer, sets new input
|
221
|
+
setInput: function(input, yy) {
|
222
|
+
this.yy = yy || this.yy || {};
|
223
|
+
this._input = input;
|
224
|
+
this._more = this._backtrack = this.done = false;
|
225
|
+
this.yylineno = this.yyleng = 0;
|
226
|
+
this.yytext = this.matched = this.match = "";
|
227
|
+
this.conditionStack = ["INITIAL"];
|
228
|
+
this.yylloc = {
|
229
|
+
first_line: 1,
|
230
|
+
first_column: 0,
|
231
|
+
last_line: 1,
|
232
|
+
last_column: 0
|
233
|
+
};
|
234
|
+
if (this.options.ranges) {
|
235
|
+
this.yylloc.range = [0, 0];
|
236
|
+
}
|
237
|
+
this.offset = 0;
|
238
|
+
return this;
|
239
|
+
},
|
240
|
+
// consumes and returns one char from the input
|
241
|
+
input: function() {
|
242
|
+
var ch = this._input[0];
|
243
|
+
this.yytext += ch;
|
244
|
+
this.yyleng++;
|
245
|
+
this.offset++;
|
246
|
+
this.match += ch;
|
247
|
+
this.matched += ch;
|
248
|
+
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
249
|
+
if (lines) {
|
250
|
+
this.yylineno++;
|
251
|
+
this.yylloc.last_line++;
|
252
|
+
} else {
|
253
|
+
this.yylloc.last_column++;
|
254
|
+
}
|
255
|
+
if (this.options.ranges) {
|
256
|
+
this.yylloc.range[1]++;
|
257
|
+
}
|
258
|
+
this._input = this._input.slice(1);
|
259
|
+
return ch;
|
260
|
+
},
|
261
|
+
// unshifts one char (or a string) into the input
|
262
|
+
unput: function(ch) {
|
263
|
+
var len = ch.length;
|
264
|
+
var lines = ch.split(/(?:\r\n?|\n)/g);
|
265
|
+
this._input = ch + this._input;
|
266
|
+
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
267
|
+
this.offset -= len;
|
268
|
+
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
269
|
+
this.match = this.match.substr(0, this.match.length - 1);
|
270
|
+
this.matched = this.matched.substr(0, this.matched.length - 1);
|
271
|
+
if (lines.length - 1) {
|
272
|
+
this.yylineno -= lines.length - 1;
|
273
|
+
}
|
274
|
+
var r = this.yylloc.range;
|
275
|
+
this.yylloc = {
|
276
|
+
first_line: this.yylloc.first_line,
|
277
|
+
last_line: this.yylineno + 1,
|
278
|
+
first_column: this.yylloc.first_column,
|
279
|
+
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
|
280
|
+
};
|
281
|
+
if (this.options.ranges) {
|
282
|
+
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
283
|
+
}
|
284
|
+
this.yyleng = this.yytext.length;
|
285
|
+
return this;
|
286
|
+
},
|
287
|
+
// When called from action, caches matched text and appends it on next action
|
288
|
+
more: function() {
|
289
|
+
this._more = true;
|
290
|
+
return this;
|
291
|
+
},
|
292
|
+
// 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.
|
293
|
+
reject: function() {
|
294
|
+
if (this.options.backtrack_lexer) {
|
295
|
+
this._backtrack = true;
|
296
|
+
} else {
|
297
|
+
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(), {
|
298
|
+
text: "",
|
299
|
+
token: null,
|
300
|
+
line: this.yylineno
|
301
|
+
});
|
302
|
+
}
|
303
|
+
return this;
|
304
|
+
},
|
305
|
+
// retain first n characters of the match
|
306
|
+
less: function(n) {
|
307
|
+
this.unput(this.match.slice(n));
|
308
|
+
},
|
309
|
+
// displays already matched input, i.e. for error messages
|
310
|
+
pastInput: function() {
|
311
|
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
312
|
+
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
313
|
+
},
|
314
|
+
// displays upcoming input, i.e. for error messages
|
315
|
+
upcomingInput: function() {
|
316
|
+
var next = this.match;
|
317
|
+
if (next.length < 20) {
|
318
|
+
next += this._input.substr(0, 20 - next.length);
|
319
|
+
}
|
320
|
+
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
321
|
+
},
|
322
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
323
|
+
showPosition: function() {
|
324
|
+
var pre = this.pastInput();
|
325
|
+
var c = new Array(pre.length + 1).join("-");
|
326
|
+
return pre + this.upcomingInput() + "\n" + c + "^";
|
327
|
+
},
|
328
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
329
|
+
test_match: function(match, indexed_rule) {
|
330
|
+
var token, lines, backup;
|
331
|
+
if (this.options.backtrack_lexer) {
|
332
|
+
backup = {
|
333
|
+
yylineno: this.yylineno,
|
334
|
+
yylloc: {
|
335
|
+
first_line: this.yylloc.first_line,
|
336
|
+
last_line: this.last_line,
|
337
|
+
first_column: this.yylloc.first_column,
|
338
|
+
last_column: this.yylloc.last_column
|
339
|
+
},
|
340
|
+
yytext: this.yytext,
|
341
|
+
match: this.match,
|
342
|
+
matches: this.matches,
|
343
|
+
matched: this.matched,
|
344
|
+
yyleng: this.yyleng,
|
345
|
+
offset: this.offset,
|
346
|
+
_more: this._more,
|
347
|
+
_input: this._input,
|
348
|
+
yy: this.yy,
|
349
|
+
conditionStack: this.conditionStack.slice(0),
|
350
|
+
done: this.done
|
351
|
+
};
|
352
|
+
if (this.options.ranges) {
|
353
|
+
backup.yylloc.range = this.yylloc.range.slice(0);
|
354
|
+
}
|
355
|
+
}
|
356
|
+
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
357
|
+
if (lines) {
|
358
|
+
this.yylineno += lines.length;
|
359
|
+
}
|
360
|
+
this.yylloc = {
|
361
|
+
first_line: this.yylloc.last_line,
|
362
|
+
last_line: this.yylineno + 1,
|
363
|
+
first_column: this.yylloc.last_column,
|
364
|
+
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
365
|
+
};
|
366
|
+
this.yytext += match[0];
|
367
|
+
this.match += match[0];
|
368
|
+
this.matches = match;
|
369
|
+
this.yyleng = this.yytext.length;
|
370
|
+
if (this.options.ranges) {
|
371
|
+
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
372
|
+
}
|
373
|
+
this._more = false;
|
374
|
+
this._backtrack = false;
|
375
|
+
this._input = this._input.slice(match[0].length);
|
376
|
+
this.matched += match[0];
|
377
|
+
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
378
|
+
if (this.done && this._input) {
|
379
|
+
this.done = false;
|
380
|
+
}
|
381
|
+
if (token) {
|
382
|
+
return token;
|
383
|
+
} else if (this._backtrack) {
|
384
|
+
for (var k in backup) {
|
385
|
+
this[k] = backup[k];
|
386
|
+
}
|
387
|
+
return false;
|
388
|
+
}
|
389
|
+
return false;
|
390
|
+
},
|
391
|
+
// return next match in input
|
392
|
+
next: function() {
|
393
|
+
if (this.done) {
|
394
|
+
return this.EOF;
|
395
|
+
}
|
396
|
+
if (!this._input) {
|
397
|
+
this.done = true;
|
398
|
+
}
|
399
|
+
var token, match, tempMatch, index;
|
400
|
+
if (!this._more) {
|
401
|
+
this.yytext = "";
|
402
|
+
this.match = "";
|
403
|
+
}
|
404
|
+
var rules = this._currentRules();
|
405
|
+
for (var i = 0; i < rules.length; i++) {
|
406
|
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
407
|
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
408
|
+
match = tempMatch;
|
409
|
+
index = i;
|
410
|
+
if (this.options.backtrack_lexer) {
|
411
|
+
token = this.test_match(tempMatch, rules[i]);
|
412
|
+
if (token !== false) {
|
413
|
+
return token;
|
414
|
+
} else if (this._backtrack) {
|
415
|
+
match = false;
|
416
|
+
continue;
|
417
|
+
} else {
|
418
|
+
return false;
|
419
|
+
}
|
420
|
+
} else if (!this.options.flex) {
|
421
|
+
break;
|
422
|
+
}
|
423
|
+
}
|
424
|
+
}
|
425
|
+
if (match) {
|
426
|
+
token = this.test_match(match, rules[index]);
|
427
|
+
if (token !== false) {
|
428
|
+
return token;
|
429
|
+
}
|
430
|
+
return false;
|
431
|
+
}
|
432
|
+
if (this._input === "") {
|
433
|
+
return this.EOF;
|
434
|
+
} else {
|
435
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
436
|
+
text: "",
|
437
|
+
token: null,
|
438
|
+
line: this.yylineno
|
439
|
+
});
|
440
|
+
}
|
441
|
+
},
|
442
|
+
// return next match that has a token
|
443
|
+
lex: function lex() {
|
444
|
+
var r = this.next();
|
445
|
+
if (r) {
|
446
|
+
return r;
|
447
|
+
} else {
|
448
|
+
return this.lex();
|
449
|
+
}
|
450
|
+
},
|
451
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
452
|
+
begin: function begin(condition) {
|
453
|
+
this.conditionStack.push(condition);
|
454
|
+
},
|
455
|
+
// pop the previously active lexer condition state off the condition stack
|
456
|
+
popState: function popState() {
|
457
|
+
var n = this.conditionStack.length - 1;
|
458
|
+
if (n > 0) {
|
459
|
+
return this.conditionStack.pop();
|
460
|
+
} else {
|
461
|
+
return this.conditionStack[0];
|
462
|
+
}
|
463
|
+
},
|
464
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
465
|
+
_currentRules: function _currentRules() {
|
466
|
+
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
467
|
+
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
468
|
+
} else {
|
469
|
+
return this.conditions["INITIAL"].rules;
|
470
|
+
}
|
471
|
+
},
|
472
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
473
|
+
topState: function topState(n) {
|
474
|
+
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
475
|
+
if (n >= 0) {
|
476
|
+
return this.conditionStack[n];
|
477
|
+
} else {
|
478
|
+
return "INITIAL";
|
479
|
+
}
|
480
|
+
},
|
481
|
+
// alias for begin(condition)
|
482
|
+
pushState: function pushState(condition) {
|
483
|
+
this.begin(condition);
|
484
|
+
},
|
485
|
+
// return the number of states currently on the stack
|
486
|
+
stateStackSize: function stateStackSize() {
|
487
|
+
return this.conditionStack.length;
|
488
|
+
},
|
489
|
+
options: { "case-insensitive": true },
|
490
|
+
performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
491
|
+
switch ($avoiding_name_collisions) {
|
492
|
+
case 0:
|
493
|
+
break;
|
494
|
+
case 1:
|
495
|
+
break;
|
496
|
+
case 2:
|
497
|
+
return 10;
|
498
|
+
case 3:
|
499
|
+
break;
|
500
|
+
case 4:
|
501
|
+
break;
|
502
|
+
case 5:
|
503
|
+
return 4;
|
504
|
+
case 6:
|
505
|
+
return 11;
|
506
|
+
case 7:
|
507
|
+
this.begin("acc_title");
|
508
|
+
return 12;
|
509
|
+
case 8:
|
510
|
+
this.popState();
|
511
|
+
return "acc_title_value";
|
512
|
+
case 9:
|
513
|
+
this.begin("acc_descr");
|
514
|
+
return 14;
|
515
|
+
case 10:
|
516
|
+
this.popState();
|
517
|
+
return "acc_descr_value";
|
518
|
+
case 11:
|
519
|
+
this.begin("acc_descr_multiline");
|
520
|
+
break;
|
521
|
+
case 12:
|
522
|
+
this.popState();
|
523
|
+
break;
|
524
|
+
case 13:
|
525
|
+
return "acc_descr_multiline_value";
|
526
|
+
case 14:
|
527
|
+
return 17;
|
528
|
+
case 15:
|
529
|
+
return 18;
|
530
|
+
case 16:
|
531
|
+
return 19;
|
532
|
+
case 17:
|
533
|
+
return ":";
|
534
|
+
case 18:
|
535
|
+
return 6;
|
536
|
+
case 19:
|
537
|
+
return "INVALID";
|
538
|
+
}
|
539
|
+
},
|
540
|
+
rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
|
541
|
+
conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], "inclusive": true } }
|
542
|
+
};
|
543
|
+
return lexer2;
|
544
|
+
}();
|
545
|
+
parser2.lexer = lexer;
|
546
|
+
function Parser() {
|
547
|
+
this.yy = {};
|
548
|
+
}
|
549
|
+
Parser.prototype = parser2;
|
550
|
+
parser2.Parser = Parser;
|
551
|
+
return new Parser();
|
552
|
+
}();
|
553
|
+
parser.parser = parser;
|
554
|
+
const parser$1 = parser;
|
555
|
+
let currentSection = "";
|
556
|
+
const sections = [];
|
557
|
+
const tasks = [];
|
558
|
+
const rawTasks = [];
|
559
|
+
const clear = function() {
|
560
|
+
sections.length = 0;
|
561
|
+
tasks.length = 0;
|
562
|
+
currentSection = "";
|
563
|
+
rawTasks.length = 0;
|
564
|
+
clear$1();
|
565
|
+
};
|
566
|
+
const addSection = function(txt) {
|
567
|
+
currentSection = txt;
|
568
|
+
sections.push(txt);
|
569
|
+
};
|
570
|
+
const getSections = function() {
|
571
|
+
return sections;
|
572
|
+
};
|
573
|
+
const getTasks = function() {
|
574
|
+
let allItemsProcessed = compileTasks();
|
575
|
+
const maxDepth = 100;
|
576
|
+
let iterationCount = 0;
|
577
|
+
while (!allItemsProcessed && iterationCount < maxDepth) {
|
578
|
+
allItemsProcessed = compileTasks();
|
579
|
+
iterationCount++;
|
580
|
+
}
|
581
|
+
tasks.push(...rawTasks);
|
582
|
+
return tasks;
|
583
|
+
};
|
584
|
+
const updateActors = function() {
|
585
|
+
const tempActors = [];
|
586
|
+
tasks.forEach((task) => {
|
587
|
+
if (task.people) {
|
588
|
+
tempActors.push(...task.people);
|
589
|
+
}
|
590
|
+
});
|
591
|
+
const unique = new Set(tempActors);
|
592
|
+
return [...unique].sort();
|
593
|
+
};
|
594
|
+
const addTask = function(descr, taskData) {
|
595
|
+
const pieces = taskData.substr(1).split(":");
|
596
|
+
let score = 0;
|
597
|
+
let peeps = [];
|
598
|
+
if (pieces.length === 1) {
|
599
|
+
score = Number(pieces[0]);
|
600
|
+
peeps = [];
|
601
|
+
} else {
|
602
|
+
score = Number(pieces[0]);
|
603
|
+
peeps = pieces[1].split(",");
|
604
|
+
}
|
605
|
+
const peopleList = peeps.map((s) => s.trim());
|
606
|
+
const rawTask = {
|
607
|
+
section: currentSection,
|
608
|
+
type: currentSection,
|
609
|
+
people: peopleList,
|
610
|
+
task: descr,
|
611
|
+
score
|
612
|
+
};
|
613
|
+
rawTasks.push(rawTask);
|
614
|
+
};
|
615
|
+
const addTaskOrg = function(descr) {
|
616
|
+
const newTask = {
|
617
|
+
section: currentSection,
|
618
|
+
type: currentSection,
|
619
|
+
description: descr,
|
620
|
+
task: descr,
|
621
|
+
classes: []
|
622
|
+
};
|
623
|
+
tasks.push(newTask);
|
624
|
+
};
|
625
|
+
const compileTasks = function() {
|
626
|
+
const compileTask = function(pos) {
|
627
|
+
return rawTasks[pos].processed;
|
628
|
+
};
|
629
|
+
let allProcessed = true;
|
630
|
+
for (const [i, rawTask] of rawTasks.entries()) {
|
631
|
+
compileTask(i);
|
632
|
+
allProcessed = allProcessed && rawTask.processed;
|
633
|
+
}
|
634
|
+
return allProcessed;
|
635
|
+
};
|
636
|
+
const getActors = function() {
|
637
|
+
return updateActors();
|
638
|
+
};
|
639
|
+
const db = {
|
640
|
+
getConfig: () => getConfig().journey,
|
641
|
+
clear,
|
642
|
+
setDiagramTitle,
|
643
|
+
getDiagramTitle,
|
644
|
+
setAccTitle,
|
645
|
+
getAccTitle,
|
646
|
+
setAccDescription,
|
647
|
+
getAccDescription,
|
648
|
+
addSection,
|
649
|
+
getSections,
|
650
|
+
getTasks,
|
651
|
+
addTask,
|
652
|
+
addTaskOrg,
|
653
|
+
getActors
|
654
|
+
};
|
655
|
+
const getStyles = (options) => `.label {
|
656
|
+
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
657
|
+
font-family: var(--mermaid-font-family);
|
658
|
+
color: ${options.textColor};
|
659
|
+
}
|
660
|
+
.mouth {
|
661
|
+
stroke: #666;
|
662
|
+
}
|
663
|
+
|
664
|
+
line {
|
665
|
+
stroke: ${options.textColor}
|
666
|
+
}
|
667
|
+
|
668
|
+
.legend {
|
669
|
+
fill: ${options.textColor};
|
670
|
+
}
|
671
|
+
|
672
|
+
.label text {
|
673
|
+
fill: #333;
|
674
|
+
}
|
675
|
+
.label {
|
676
|
+
color: ${options.textColor}
|
677
|
+
}
|
678
|
+
|
679
|
+
.face {
|
680
|
+
${options.faceColor ? `fill: ${options.faceColor}` : "fill: #FFF8DC"};
|
681
|
+
stroke: #999;
|
682
|
+
}
|
683
|
+
|
684
|
+
.node rect,
|
685
|
+
.node circle,
|
686
|
+
.node ellipse,
|
687
|
+
.node polygon,
|
688
|
+
.node path {
|
689
|
+
fill: ${options.mainBkg};
|
690
|
+
stroke: ${options.nodeBorder};
|
691
|
+
stroke-width: 1px;
|
692
|
+
}
|
693
|
+
|
694
|
+
.node .label {
|
695
|
+
text-align: center;
|
696
|
+
}
|
697
|
+
.node.clickable {
|
698
|
+
cursor: pointer;
|
699
|
+
}
|
700
|
+
|
701
|
+
.arrowheadPath {
|
702
|
+
fill: ${options.arrowheadColor};
|
703
|
+
}
|
704
|
+
|
705
|
+
.edgePath .path {
|
706
|
+
stroke: ${options.lineColor};
|
707
|
+
stroke-width: 1.5px;
|
708
|
+
}
|
709
|
+
|
710
|
+
.flowchart-link {
|
711
|
+
stroke: ${options.lineColor};
|
712
|
+
fill: none;
|
713
|
+
}
|
714
|
+
|
715
|
+
.edgeLabel {
|
716
|
+
background-color: ${options.edgeLabelBackground};
|
717
|
+
rect {
|
718
|
+
opacity: 0.5;
|
719
|
+
}
|
720
|
+
text-align: center;
|
721
|
+
}
|
722
|
+
|
723
|
+
.cluster rect {
|
724
|
+
}
|
725
|
+
|
726
|
+
.cluster text {
|
727
|
+
fill: ${options.titleColor};
|
728
|
+
}
|
729
|
+
|
730
|
+
div.mermaidTooltip {
|
731
|
+
position: absolute;
|
732
|
+
text-align: center;
|
733
|
+
max-width: 200px;
|
734
|
+
padding: 2px;
|
735
|
+
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
736
|
+
font-family: var(--mermaid-font-family);
|
737
|
+
font-size: 12px;
|
738
|
+
background: ${options.tertiaryColor};
|
739
|
+
border: 1px solid ${options.border2};
|
740
|
+
border-radius: 2px;
|
741
|
+
pointer-events: none;
|
742
|
+
z-index: 100;
|
743
|
+
}
|
744
|
+
|
745
|
+
.task-type-0, .section-type-0 {
|
746
|
+
${options.fillType0 ? `fill: ${options.fillType0}` : ""};
|
747
|
+
}
|
748
|
+
.task-type-1, .section-type-1 {
|
749
|
+
${options.fillType0 ? `fill: ${options.fillType1}` : ""};
|
750
|
+
}
|
751
|
+
.task-type-2, .section-type-2 {
|
752
|
+
${options.fillType0 ? `fill: ${options.fillType2}` : ""};
|
753
|
+
}
|
754
|
+
.task-type-3, .section-type-3 {
|
755
|
+
${options.fillType0 ? `fill: ${options.fillType3}` : ""};
|
756
|
+
}
|
757
|
+
.task-type-4, .section-type-4 {
|
758
|
+
${options.fillType0 ? `fill: ${options.fillType4}` : ""};
|
759
|
+
}
|
760
|
+
.task-type-5, .section-type-5 {
|
761
|
+
${options.fillType0 ? `fill: ${options.fillType5}` : ""};
|
762
|
+
}
|
763
|
+
.task-type-6, .section-type-6 {
|
764
|
+
${options.fillType0 ? `fill: ${options.fillType6}` : ""};
|
765
|
+
}
|
766
|
+
.task-type-7, .section-type-7 {
|
767
|
+
${options.fillType0 ? `fill: ${options.fillType7}` : ""};
|
768
|
+
}
|
769
|
+
|
770
|
+
.actor-0 {
|
771
|
+
${options.actor0 ? `fill: ${options.actor0}` : ""};
|
772
|
+
}
|
773
|
+
.actor-1 {
|
774
|
+
${options.actor1 ? `fill: ${options.actor1}` : ""};
|
775
|
+
}
|
776
|
+
.actor-2 {
|
777
|
+
${options.actor2 ? `fill: ${options.actor2}` : ""};
|
778
|
+
}
|
779
|
+
.actor-3 {
|
780
|
+
${options.actor3 ? `fill: ${options.actor3}` : ""};
|
781
|
+
}
|
782
|
+
.actor-4 {
|
783
|
+
${options.actor4 ? `fill: ${options.actor4}` : ""};
|
784
|
+
}
|
785
|
+
.actor-5 {
|
786
|
+
${options.actor5 ? `fill: ${options.actor5}` : ""};
|
787
|
+
}
|
788
|
+
`;
|
789
|
+
const styles = getStyles;
|
790
|
+
const drawRect = function(elem, rectData) {
|
791
|
+
return drawRect$1(elem, rectData);
|
792
|
+
};
|
793
|
+
const drawFace = function(element, faceData) {
|
794
|
+
const radius = 15;
|
795
|
+
const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible");
|
796
|
+
const face = element.append("g");
|
797
|
+
face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
|
798
|
+
face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
|
799
|
+
function smile(face2) {
|
800
|
+
const arc$1 = arc().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
|
801
|
+
face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")");
|
802
|
+
}
|
803
|
+
function sad(face2) {
|
804
|
+
const arc$1 = arc().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
|
805
|
+
face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")");
|
806
|
+
}
|
807
|
+
function ambivalent(face2) {
|
808
|
+
face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
|
809
|
+
}
|
810
|
+
if (faceData.score > 3) {
|
811
|
+
smile(face);
|
812
|
+
} else if (faceData.score < 3) {
|
813
|
+
sad(face);
|
814
|
+
} else {
|
815
|
+
ambivalent(face);
|
816
|
+
}
|
817
|
+
return circleElement;
|
818
|
+
};
|
819
|
+
const drawCircle = function(element, circleData) {
|
820
|
+
const circleElement = element.append("circle");
|
821
|
+
circleElement.attr("cx", circleData.cx);
|
822
|
+
circleElement.attr("cy", circleData.cy);
|
823
|
+
circleElement.attr("class", "actor-" + circleData.pos);
|
824
|
+
circleElement.attr("fill", circleData.fill);
|
825
|
+
circleElement.attr("stroke", circleData.stroke);
|
826
|
+
circleElement.attr("r", circleData.r);
|
827
|
+
if (circleElement.class !== void 0) {
|
828
|
+
circleElement.attr("class", circleElement.class);
|
829
|
+
}
|
830
|
+
if (circleData.title !== void 0) {
|
831
|
+
circleElement.append("title").text(circleData.title);
|
832
|
+
}
|
833
|
+
return circleElement;
|
834
|
+
};
|
835
|
+
const drawText = function(elem, textData) {
|
836
|
+
return drawText$1(elem, textData);
|
837
|
+
};
|
838
|
+
const drawLabel = function(elem, txtObject) {
|
839
|
+
function genPoints(x, y, width, height, cut) {
|
840
|
+
return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height);
|
841
|
+
}
|
842
|
+
const polygon = elem.append("polygon");
|
843
|
+
polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7));
|
844
|
+
polygon.attr("class", "labelBox");
|
845
|
+
txtObject.y = txtObject.y + txtObject.labelMargin;
|
846
|
+
txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
|
847
|
+
drawText(elem, txtObject);
|
848
|
+
};
|
849
|
+
const drawSection = function(elem, section, conf2) {
|
850
|
+
const g = elem.append("g");
|
851
|
+
const rect = getNoteRect();
|
852
|
+
rect.x = section.x;
|
853
|
+
rect.y = section.y;
|
854
|
+
rect.fill = section.fill;
|
855
|
+
rect.width = conf2.width * section.taskCount + // width of the tasks
|
856
|
+
conf2.diagramMarginX * (section.taskCount - 1);
|
857
|
+
rect.height = conf2.height;
|
858
|
+
rect.class = "journey-section section-type-" + section.num;
|
859
|
+
rect.rx = 3;
|
860
|
+
rect.ry = 3;
|
861
|
+
drawRect(g, rect);
|
862
|
+
_drawTextCandidateFunc(conf2)(
|
863
|
+
section.text,
|
864
|
+
g,
|
865
|
+
rect.x,
|
866
|
+
rect.y,
|
867
|
+
rect.width,
|
868
|
+
rect.height,
|
869
|
+
{ class: "journey-section section-type-" + section.num },
|
870
|
+
conf2,
|
871
|
+
section.colour
|
872
|
+
);
|
873
|
+
};
|
874
|
+
let taskCount = -1;
|
875
|
+
const drawTask = function(elem, task, conf2) {
|
876
|
+
const center = task.x + conf2.width / 2;
|
877
|
+
const g = elem.append("g");
|
878
|
+
taskCount++;
|
879
|
+
const maxHeight = 300 + 5 * 30;
|
880
|
+
g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666");
|
881
|
+
drawFace(g, {
|
882
|
+
cx: center,
|
883
|
+
cy: 300 + (5 - task.score) * 30,
|
884
|
+
score: task.score
|
885
|
+
});
|
886
|
+
const rect = getNoteRect();
|
887
|
+
rect.x = task.x;
|
888
|
+
rect.y = task.y;
|
889
|
+
rect.fill = task.fill;
|
890
|
+
rect.width = conf2.width;
|
891
|
+
rect.height = conf2.height;
|
892
|
+
rect.class = "task task-type-" + task.num;
|
893
|
+
rect.rx = 3;
|
894
|
+
rect.ry = 3;
|
895
|
+
drawRect(g, rect);
|
896
|
+
let xPos = task.x + 14;
|
897
|
+
task.people.forEach((person) => {
|
898
|
+
const colour = task.actors[person].color;
|
899
|
+
const circle = {
|
900
|
+
cx: xPos,
|
901
|
+
cy: task.y,
|
902
|
+
r: 7,
|
903
|
+
fill: colour,
|
904
|
+
stroke: "#000",
|
905
|
+
title: person,
|
906
|
+
pos: task.actors[person].position
|
907
|
+
};
|
908
|
+
drawCircle(g, circle);
|
909
|
+
xPos += 10;
|
910
|
+
});
|
911
|
+
_drawTextCandidateFunc(conf2)(
|
912
|
+
task.task,
|
913
|
+
g,
|
914
|
+
rect.x,
|
915
|
+
rect.y,
|
916
|
+
rect.width,
|
917
|
+
rect.height,
|
918
|
+
{ class: "task" },
|
919
|
+
conf2,
|
920
|
+
task.colour
|
921
|
+
);
|
922
|
+
};
|
923
|
+
const drawBackgroundRect = function(elem, bounds2) {
|
924
|
+
drawBackgroundRect$1(elem, bounds2);
|
925
|
+
};
|
926
|
+
const _drawTextCandidateFunc = function() {
|
927
|
+
function byText(content, g, x, y, width, height, textAttrs, colour) {
|
928
|
+
const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content);
|
929
|
+
_setTextAttrs(text, textAttrs);
|
930
|
+
}
|
931
|
+
function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) {
|
932
|
+
const { taskFontSize, taskFontFamily } = conf2;
|
933
|
+
const lines = content.split(/<br\s*\/?>/gi);
|
934
|
+
for (let i = 0; i < lines.length; i++) {
|
935
|
+
const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;
|
936
|
+
const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily);
|
937
|
+
text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]);
|
938
|
+
text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
|
939
|
+
_setTextAttrs(text, textAttrs);
|
940
|
+
}
|
941
|
+
}
|
942
|
+
function byFo(content, g, x, y, width, height, textAttrs, conf2) {
|
943
|
+
const body = g.append("switch");
|
944
|
+
const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed");
|
945
|
+
const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
946
|
+
text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
|
947
|
+
byTspan(content, body, x, y, width, height, textAttrs, conf2);
|
948
|
+
_setTextAttrs(text, textAttrs);
|
949
|
+
}
|
950
|
+
function _setTextAttrs(toText, fromTextAttrsDict) {
|
951
|
+
for (const key in fromTextAttrsDict) {
|
952
|
+
if (key in fromTextAttrsDict) {
|
953
|
+
toText.attr(key, fromTextAttrsDict[key]);
|
954
|
+
}
|
955
|
+
}
|
956
|
+
}
|
957
|
+
return function(conf2) {
|
958
|
+
return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
|
959
|
+
};
|
960
|
+
}();
|
961
|
+
const initGraphics = function(graphics) {
|
962
|
+
graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
|
963
|
+
};
|
964
|
+
const svgDraw = {
|
965
|
+
drawRect,
|
966
|
+
drawCircle,
|
967
|
+
drawSection,
|
968
|
+
drawText,
|
969
|
+
drawLabel,
|
970
|
+
drawTask,
|
971
|
+
drawBackgroundRect,
|
972
|
+
initGraphics
|
973
|
+
};
|
974
|
+
const setConf = function(cnf) {
|
975
|
+
const keys = Object.keys(cnf);
|
976
|
+
keys.forEach(function(key) {
|
977
|
+
conf[key] = cnf[key];
|
978
|
+
});
|
979
|
+
};
|
980
|
+
const actors = {};
|
981
|
+
function drawActorLegend(diagram2) {
|
982
|
+
const conf2 = getConfig().journey;
|
983
|
+
let yPos = 60;
|
984
|
+
Object.keys(actors).forEach((person) => {
|
985
|
+
const colour = actors[person].color;
|
986
|
+
const circleData = {
|
987
|
+
cx: 20,
|
988
|
+
cy: yPos,
|
989
|
+
r: 7,
|
990
|
+
fill: colour,
|
991
|
+
stroke: "#000",
|
992
|
+
pos: actors[person].position
|
993
|
+
};
|
994
|
+
svgDraw.drawCircle(diagram2, circleData);
|
995
|
+
const labelData = {
|
996
|
+
x: 40,
|
997
|
+
y: yPos + 7,
|
998
|
+
fill: "#666",
|
999
|
+
text: person,
|
1000
|
+
textMargin: conf2.boxTextMargin | 5
|
1001
|
+
};
|
1002
|
+
svgDraw.drawText(diagram2, labelData);
|
1003
|
+
yPos += 20;
|
1004
|
+
});
|
1005
|
+
}
|
1006
|
+
const conf = getConfig().journey;
|
1007
|
+
const LEFT_MARGIN = conf.leftMargin;
|
1008
|
+
const draw = function(text, id, version, diagObj) {
|
1009
|
+
const conf2 = getConfig().journey;
|
1010
|
+
const securityLevel = getConfig().securityLevel;
|
1011
|
+
let sandboxElement;
|
1012
|
+
if (securityLevel === "sandbox") {
|
1013
|
+
sandboxElement = select("#i" + id);
|
1014
|
+
}
|
1015
|
+
const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
|
1016
|
+
bounds.init();
|
1017
|
+
const diagram2 = root.select("#" + id);
|
1018
|
+
svgDraw.initGraphics(diagram2);
|
1019
|
+
const tasks2 = diagObj.db.getTasks();
|
1020
|
+
const title = diagObj.db.getDiagramTitle();
|
1021
|
+
const actorNames = diagObj.db.getActors();
|
1022
|
+
for (const member in actors) {
|
1023
|
+
delete actors[member];
|
1024
|
+
}
|
1025
|
+
let actorPos = 0;
|
1026
|
+
actorNames.forEach((actorName) => {
|
1027
|
+
actors[actorName] = {
|
1028
|
+
color: conf2.actorColours[actorPos % conf2.actorColours.length],
|
1029
|
+
position: actorPos
|
1030
|
+
};
|
1031
|
+
actorPos++;
|
1032
|
+
});
|
1033
|
+
drawActorLegend(diagram2);
|
1034
|
+
bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);
|
1035
|
+
drawTasks(diagram2, tasks2, 0);
|
1036
|
+
const box = bounds.getBounds();
|
1037
|
+
if (title) {
|
1038
|
+
diagram2.append("text").text(title).attr("x", LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
|
1039
|
+
}
|
1040
|
+
const height = box.stopy - box.starty + 2 * conf2.diagramMarginY;
|
1041
|
+
const width = LEFT_MARGIN + box.stopx + 2 * conf2.diagramMarginX;
|
1042
|
+
configureSvgSize(diagram2, height, width, conf2.useMaxWidth);
|
1043
|
+
diagram2.append("line").attr("x1", LEFT_MARGIN).attr("y1", conf2.height * 4).attr("x2", width - LEFT_MARGIN - 4).attr("y2", conf2.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
|
1044
|
+
const extraVertForTitle = title ? 70 : 0;
|
1045
|
+
diagram2.attr("viewBox", `${box.startx} -25 ${width} ${height + extraVertForTitle}`);
|
1046
|
+
diagram2.attr("preserveAspectRatio", "xMinYMin meet");
|
1047
|
+
diagram2.attr("height", height + extraVertForTitle + 25);
|
1048
|
+
};
|
1049
|
+
const bounds = {
|
1050
|
+
data: {
|
1051
|
+
startx: void 0,
|
1052
|
+
stopx: void 0,
|
1053
|
+
starty: void 0,
|
1054
|
+
stopy: void 0
|
1055
|
+
},
|
1056
|
+
verticalPos: 0,
|
1057
|
+
sequenceItems: [],
|
1058
|
+
init: function() {
|
1059
|
+
this.sequenceItems = [];
|
1060
|
+
this.data = {
|
1061
|
+
startx: void 0,
|
1062
|
+
stopx: void 0,
|
1063
|
+
starty: void 0,
|
1064
|
+
stopy: void 0
|
1065
|
+
};
|
1066
|
+
this.verticalPos = 0;
|
1067
|
+
},
|
1068
|
+
updateVal: function(obj, key, val, fun) {
|
1069
|
+
if (obj[key] === void 0) {
|
1070
|
+
obj[key] = val;
|
1071
|
+
} else {
|
1072
|
+
obj[key] = fun(val, obj[key]);
|
1073
|
+
}
|
1074
|
+
},
|
1075
|
+
updateBounds: function(startx, starty, stopx, stopy) {
|
1076
|
+
const conf2 = getConfig().journey;
|
1077
|
+
const _self = this;
|
1078
|
+
let cnt = 0;
|
1079
|
+
function updateFn(type) {
|
1080
|
+
return function updateItemBounds(item) {
|
1081
|
+
cnt++;
|
1082
|
+
const n = _self.sequenceItems.length - cnt + 1;
|
1083
|
+
_self.updateVal(item, "starty", starty - n * conf2.boxMargin, Math.min);
|
1084
|
+
_self.updateVal(item, "stopy", stopy + n * conf2.boxMargin, Math.max);
|
1085
|
+
_self.updateVal(bounds.data, "startx", startx - n * conf2.boxMargin, Math.min);
|
1086
|
+
_self.updateVal(bounds.data, "stopx", stopx + n * conf2.boxMargin, Math.max);
|
1087
|
+
if (!(type === "activation")) {
|
1088
|
+
_self.updateVal(item, "startx", startx - n * conf2.boxMargin, Math.min);
|
1089
|
+
_self.updateVal(item, "stopx", stopx + n * conf2.boxMargin, Math.max);
|
1090
|
+
_self.updateVal(bounds.data, "starty", starty - n * conf2.boxMargin, Math.min);
|
1091
|
+
_self.updateVal(bounds.data, "stopy", stopy + n * conf2.boxMargin, Math.max);
|
1092
|
+
}
|
1093
|
+
};
|
1094
|
+
}
|
1095
|
+
this.sequenceItems.forEach(updateFn());
|
1096
|
+
},
|
1097
|
+
insert: function(startx, starty, stopx, stopy) {
|
1098
|
+
const _startx = Math.min(startx, stopx);
|
1099
|
+
const _stopx = Math.max(startx, stopx);
|
1100
|
+
const _starty = Math.min(starty, stopy);
|
1101
|
+
const _stopy = Math.max(starty, stopy);
|
1102
|
+
this.updateVal(bounds.data, "startx", _startx, Math.min);
|
1103
|
+
this.updateVal(bounds.data, "starty", _starty, Math.min);
|
1104
|
+
this.updateVal(bounds.data, "stopx", _stopx, Math.max);
|
1105
|
+
this.updateVal(bounds.data, "stopy", _stopy, Math.max);
|
1106
|
+
this.updateBounds(_startx, _starty, _stopx, _stopy);
|
1107
|
+
},
|
1108
|
+
bumpVerticalPos: function(bump) {
|
1109
|
+
this.verticalPos = this.verticalPos + bump;
|
1110
|
+
this.data.stopy = this.verticalPos;
|
1111
|
+
},
|
1112
|
+
getVerticalPos: function() {
|
1113
|
+
return this.verticalPos;
|
1114
|
+
},
|
1115
|
+
getBounds: function() {
|
1116
|
+
return this.data;
|
1117
|
+
}
|
1118
|
+
};
|
1119
|
+
const fills = conf.sectionFills;
|
1120
|
+
const textColours = conf.sectionColours;
|
1121
|
+
const drawTasks = function(diagram2, tasks2, verticalPos) {
|
1122
|
+
const conf2 = getConfig().journey;
|
1123
|
+
let lastSection = "";
|
1124
|
+
const sectionVHeight = conf2.height * 2 + conf2.diagramMarginY;
|
1125
|
+
const taskPos = verticalPos + sectionVHeight;
|
1126
|
+
let sectionNumber = 0;
|
1127
|
+
let fill = "#CCC";
|
1128
|
+
let colour = "black";
|
1129
|
+
let num = 0;
|
1130
|
+
for (const [i, task] of tasks2.entries()) {
|
1131
|
+
if (lastSection !== task.section) {
|
1132
|
+
fill = fills[sectionNumber % fills.length];
|
1133
|
+
num = sectionNumber % fills.length;
|
1134
|
+
colour = textColours[sectionNumber % textColours.length];
|
1135
|
+
let taskInSectionCount = 0;
|
1136
|
+
const currentSection2 = task.section;
|
1137
|
+
for (let taskIndex = i; taskIndex < tasks2.length; taskIndex++) {
|
1138
|
+
if (tasks2[taskIndex].section == currentSection2) {
|
1139
|
+
taskInSectionCount = taskInSectionCount + 1;
|
1140
|
+
} else {
|
1141
|
+
break;
|
1142
|
+
}
|
1143
|
+
}
|
1144
|
+
const section = {
|
1145
|
+
x: i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN,
|
1146
|
+
y: 50,
|
1147
|
+
text: task.section,
|
1148
|
+
fill,
|
1149
|
+
num,
|
1150
|
+
colour,
|
1151
|
+
taskCount: taskInSectionCount
|
1152
|
+
};
|
1153
|
+
svgDraw.drawSection(diagram2, section, conf2);
|
1154
|
+
lastSection = task.section;
|
1155
|
+
sectionNumber++;
|
1156
|
+
}
|
1157
|
+
const taskActors = task.people.reduce((acc, actorName) => {
|
1158
|
+
if (actors[actorName]) {
|
1159
|
+
acc[actorName] = actors[actorName];
|
1160
|
+
}
|
1161
|
+
return acc;
|
1162
|
+
}, {});
|
1163
|
+
task.x = i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN;
|
1164
|
+
task.y = taskPos;
|
1165
|
+
task.width = conf2.diagramMarginX;
|
1166
|
+
task.height = conf2.diagramMarginY;
|
1167
|
+
task.colour = colour;
|
1168
|
+
task.fill = fill;
|
1169
|
+
task.num = num;
|
1170
|
+
task.actors = taskActors;
|
1171
|
+
svgDraw.drawTask(diagram2, task, conf2);
|
1172
|
+
bounds.insert(task.x, task.y, task.x + task.width + conf2.taskMargin, 300 + 5 * 30);
|
1173
|
+
}
|
1174
|
+
};
|
1175
|
+
const renderer = {
|
1176
|
+
setConf,
|
1177
|
+
draw
|
1178
|
+
};
|
1179
|
+
const diagram = {
|
1180
|
+
parser: parser$1,
|
1181
|
+
db,
|
1182
|
+
renderer,
|
1183
|
+
styles,
|
1184
|
+
init: (cnf) => {
|
1185
|
+
renderer.setConf(cnf.journey);
|
1186
|
+
db.clear();
|
1187
|
+
}
|
1188
|
+
};
|
1189
|
+
export {
|
1190
|
+
diagram
|
1191
|
+
};
|