{
"version": 3,
"sources": ["../../node_modules/dagre-d3-es/src/dagre-js/arrows.js", "../../node_modules/dagre-d3-es/src/dagre-js/label/add-svg-label.js", "../../node_modules/dagre-d3-es/src/dagre-js/label/add-text-label.js", "../../node_modules/dagre-d3-es/src/dagre-js/label/add-label.js", "../../node_modules/dagre-d3-es/src/dagre-js/create-clusters.js", "../../node_modules/dagre-d3-es/src/dagre-js/create-edge-labels.js", "../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-node.js", "../../node_modules/dagre-d3-es/src/dagre-js/create-edge-paths.js", "../../node_modules/dagre-d3-es/src/dagre-js/create-nodes.js", "../../node_modules/dagre-d3-es/src/dagre-js/position-clusters.js", "../../node_modules/dagre-d3-es/src/dagre-js/position-edge-labels.js", "../../node_modules/dagre-d3-es/src/dagre-js/position-nodes.js", "../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-ellipse.js", "../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-circle.js", "../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-line.js", "../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-polygon.js", "../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-rect.js", "../../node_modules/dagre-d3-es/src/dagre-js/shapes.js", "../../node_modules/dagre-d3-es/src/dagre-js/render.js", "../../node_modules/mermaid/dist/flowDiagram-b222e15a.js"],
"sourcesContent": ["import * as util from './util.js';\n\nexport { arrows, setArrows };\n\nvar arrows = {\n normal,\n vee,\n undirected,\n};\n\nfunction setArrows(value) {\n arrows = value;\n}\n\nfunction normal(parent, id, edge, type) {\n var marker = parent\n .append('marker')\n .attr('id', id)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 9)\n .attr('refY', 5)\n .attr('markerUnits', 'strokeWidth')\n .attr('markerWidth', 8)\n .attr('markerHeight', 6)\n .attr('orient', 'auto');\n\n var path = marker\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n util.applyStyle(path, edge[type + 'Style']);\n if (edge[type + 'Class']) {\n path.attr('class', edge[type + 'Class']);\n }\n}\n\nfunction vee(parent, id, edge, type) {\n var marker = parent\n .append('marker')\n .attr('id', id)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 9)\n .attr('refY', 5)\n .attr('markerUnits', 'strokeWidth')\n .attr('markerWidth', 8)\n .attr('markerHeight', 6)\n .attr('orient', 'auto');\n\n var path = marker\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 L 4 5 z')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n util.applyStyle(path, edge[type + 'Style']);\n if (edge[type + 'Class']) {\n path.attr('class', edge[type + 'Class']);\n }\n}\n\nfunction undirected(parent, id, edge, type) {\n var marker = parent\n .append('marker')\n .attr('id', id)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 9)\n .attr('refY', 5)\n .attr('markerUnits', 'strokeWidth')\n .attr('markerWidth', 8)\n .attr('markerHeight', 6)\n .attr('orient', 'auto');\n\n var path = marker\n .append('path')\n .attr('d', 'M 0 5 L 10 5')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n util.applyStyle(path, edge[type + 'Style']);\n if (edge[type + 'Class']) {\n path.attr('class', edge[type + 'Class']);\n }\n}\n", "import * as util from '../util.js';\n\nexport { addSVGLabel };\n\nfunction addSVGLabel(root, node) {\n var domNode = root;\n\n domNode.node().appendChild(node.label);\n\n util.applyStyle(domNode, node.labelStyle);\n\n return domNode;\n}\n", "import * as util from '../util.js';\n\nexport { addTextLabel };\n\n/*\n * Attaches a text label to the specified root. Handles escape sequences.\n */\nfunction addTextLabel(root, node) {\n var domNode = root.append('text');\n\n var lines = processEscapeSequences(node.label).split('\\n');\n for (var i = 0; i < lines.length; i++) {\n domNode\n .append('tspan')\n .attr('xml:space', 'preserve')\n .attr('dy', '1em')\n .attr('x', '1')\n .text(lines[i]);\n }\n\n util.applyStyle(domNode, node.labelStyle);\n\n return domNode;\n}\n\nfunction processEscapeSequences(text) {\n var newText = '';\n var escaped = false;\n var ch;\n for (var i = 0; i < text.length; ++i) {\n ch = text[i];\n if (escaped) {\n switch (ch) {\n case 'n':\n newText += '\\n';\n break;\n default:\n newText += ch;\n }\n escaped = false;\n } else if (ch === '\\\\') {\n escaped = true;\n } else {\n newText += ch;\n }\n }\n return newText;\n}\n", "import { addHtmlLabel } from './add-html-label.js';\nimport { addSVGLabel } from './add-svg-label.js';\nimport { addTextLabel } from './add-text-label.js';\n\nexport { addLabel };\n\nfunction addLabel(root, node, location) {\n var label = node.label;\n var labelSvg = root.append('g');\n\n // Allow the label to be a string, a function that returns a DOM element, or\n // a DOM element itself.\n if (node.labelType === 'svg') {\n addSVGLabel(labelSvg, node);\n } else if (typeof label !== 'string' || node.labelType === 'html') {\n addHtmlLabel(labelSvg, node);\n } else {\n addTextLabel(labelSvg, node);\n }\n\n var labelBBox = labelSvg.node().getBBox();\n var y;\n switch (location) {\n case 'top':\n y = -node.height / 2;\n break;\n case 'bottom':\n y = node.height / 2 - labelBBox.height;\n break;\n default:\n y = -labelBBox.height / 2;\n }\n labelSvg.attr('transform', 'translate(' + -labelBBox.width / 2 + ',' + y + ')');\n\n return labelSvg;\n}\n", "import * as d3 from 'd3';\nimport { addLabel } from './label/add-label.js';\nimport * as util from './util.js';\n\nexport { createClusters, setCreateClusters };\n\nvar createClusters = function (selection, g) {\n var clusters = g.nodes().filter(function (v) {\n return util.isSubgraph(g, v);\n });\n var svgClusters = selection.selectAll('g.cluster').data(clusters, function (v) {\n return v;\n });\n\n util.applyTransition(svgClusters.exit(), g).style('opacity', 0).remove();\n\n var enterSelection = svgClusters\n .enter()\n .append('g')\n .attr('class', 'cluster')\n .attr('id', function (v) {\n var node = g.node(v);\n return node.id;\n })\n .style('opacity', 0)\n .each(function (v) {\n var node = g.node(v);\n var thisGroup = d3.select(this);\n d3.select(this).append('rect');\n var labelGroup = thisGroup.append('g').attr('class', 'label');\n addLabel(labelGroup, node, node.clusterLabelPos);\n });\n\n svgClusters = svgClusters.merge(enterSelection);\n\n svgClusters = util.applyTransition(svgClusters, g).style('opacity', 1);\n\n svgClusters.selectAll('rect').each(function (c) {\n var node = g.node(c);\n var domCluster = d3.select(this);\n util.applyStyle(domCluster, node.style);\n });\n\n return svgClusters;\n};\n\nfunction setCreateClusters(value) {\n createClusters = value;\n}\n", "import * as d3 from 'd3';\nimport * as _ from 'lodash-es';\nimport { addLabel } from './label/add-label.js';\nimport * as util from './util.js';\n\nexport { createEdgeLabels, setCreateEdgeLabels };\n\nlet createEdgeLabels = function (selection, g) {\n var svgEdgeLabels = selection\n .selectAll('g.edgeLabel')\n .data(g.edges(), function (e) {\n return util.edgeToId(e);\n })\n .classed('update', true);\n\n svgEdgeLabels.exit().remove();\n svgEdgeLabels.enter().append('g').classed('edgeLabel', true).style('opacity', 0);\n\n svgEdgeLabels = selection.selectAll('g.edgeLabel');\n\n svgEdgeLabels.each(function (e) {\n var root = d3.select(this);\n root.select('.label').remove();\n var edge = g.edge(e);\n var label = addLabel(root, g.edge(e), 0).classed('label', true);\n var bbox = label.node().getBBox();\n\n if (edge.labelId) {\n label.attr('id', edge.labelId);\n }\n if (!_.has(edge, 'width')) {\n edge.width = bbox.width;\n }\n if (!_.has(edge, 'height')) {\n edge.height = bbox.height;\n }\n });\n\n var exitSelection;\n\n if (svgEdgeLabels.exit) {\n exitSelection = svgEdgeLabels.exit();\n } else {\n exitSelection = svgEdgeLabels.selectAll(null); // empty selection\n }\n\n util.applyTransition(exitSelection, g).style('opacity', 0).remove();\n\n return svgEdgeLabels;\n};\n\nfunction setCreateEdgeLabels(value) {\n createEdgeLabels = value;\n}\n", "export { intersectNode };\n\nfunction intersectNode(node, point) {\n return node.intersect(point);\n}\n", "import * as d3 from 'd3';\nimport * as _ from 'lodash-es';\nimport { intersectNode } from './intersect/intersect-node.js';\nimport * as util from './util.js';\n\nexport { createEdgePaths, setCreateEdgePaths };\n\nvar createEdgePaths = function (selection, g, arrows) {\n var previousPaths = selection\n .selectAll('g.edgePath')\n .data(g.edges(), function (e) {\n return util.edgeToId(e);\n })\n .classed('update', true);\n\n var newPaths = enter(previousPaths, g);\n exit(previousPaths, g);\n\n var svgPaths = previousPaths.merge !== undefined ? previousPaths.merge(newPaths) : previousPaths;\n util.applyTransition(svgPaths, g).style('opacity', 1);\n\n // Save DOM element in the path group, and set ID and class\n svgPaths.each(function (e) {\n var domEdge = d3.select(this);\n var edge = g.edge(e);\n edge.elem = this;\n\n if (edge.id) {\n domEdge.attr('id', edge.id);\n }\n\n util.applyClass(\n domEdge,\n edge['class'],\n (domEdge.classed('update') ? 'update ' : '') + 'edgePath'\n );\n });\n\n svgPaths.selectAll('path.path').each(function (e) {\n var edge = g.edge(e);\n edge.arrowheadId = _.uniqueId('arrowhead');\n\n var domEdge = d3\n .select(this)\n .attr('marker-end', function () {\n return 'url(' + makeFragmentRef(location.href, edge.arrowheadId) + ')';\n })\n .style('fill', 'none');\n\n util.applyTransition(domEdge, g).attr('d', function (e) {\n return calcPoints(g, e);\n });\n\n util.applyStyle(domEdge, edge.style);\n });\n\n svgPaths.selectAll('defs *').remove();\n svgPaths.selectAll('defs').each(function (e) {\n var edge = g.edge(e);\n var arrowhead = arrows[edge.arrowhead];\n arrowhead(d3.select(this), edge.arrowheadId, edge, 'arrowhead');\n });\n\n return svgPaths;\n};\n\nfunction setCreateEdgePaths(value) {\n createEdgePaths = value;\n}\n\nfunction makeFragmentRef(url, fragmentId) {\n var baseUrl = url.split('#')[0];\n return baseUrl + '#' + fragmentId;\n}\n\nfunction calcPoints(g, e) {\n var edge = g.edge(e);\n var tail = g.node(e.v);\n var head = g.node(e.w);\n var points = edge.points.slice(1, edge.points.length - 1);\n points.unshift(intersectNode(tail, points[0]));\n points.push(intersectNode(head, points[points.length - 1]));\n\n return createLine(edge, points);\n}\n\nfunction createLine(edge, points) {\n // @ts-expect-error\n var line = (d3.line || d3.svg.line)()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n });\n\n (line.curve || line.interpolate)(edge.curve);\n\n return line(points);\n}\n\nfunction getCoords(elem) {\n var bbox = elem.getBBox();\n var matrix = elem.ownerSVGElement\n .getScreenCTM()\n .inverse()\n .multiply(elem.getScreenCTM())\n .translate(bbox.width / 2, bbox.height / 2);\n return { x: matrix.e, y: matrix.f };\n}\n\nfunction enter(svgPaths, g) {\n var svgPathsEnter = svgPaths.enter().append('g').attr('class', 'edgePath').style('opacity', 0);\n svgPathsEnter\n .append('path')\n .attr('class', 'path')\n .attr('d', function (e) {\n var edge = g.edge(e);\n var sourceElem = g.node(e.v).elem;\n var points = _.range(edge.points.length).map(function () {\n return getCoords(sourceElem);\n });\n return createLine(edge, points);\n });\n svgPathsEnter.append('defs');\n return svgPathsEnter;\n}\n\nfunction exit(svgPaths, g) {\n var svgPathExit = svgPaths.exit();\n util.applyTransition(svgPathExit, g).style('opacity', 0).remove();\n}\n", "import * as d3 from 'd3';\nimport * as _ from 'lodash-es';\nimport { addLabel } from './label/add-label.js';\nimport * as util from './util.js';\n\nexport { createNodes, setCreateNodes };\n\nvar createNodes = function (selection, g, shapes) {\n var simpleNodes = g.nodes().filter(function (v) {\n return !util.isSubgraph(g, v);\n });\n var svgNodes = selection\n .selectAll('g.node')\n .data(simpleNodes, function (v) {\n return v;\n })\n .classed('update', true);\n\n svgNodes.exit().remove();\n\n svgNodes.enter().append('g').attr('class', 'node').style('opacity', 0);\n\n svgNodes = selection.selectAll('g.node');\n\n svgNodes.each(function (v) {\n var node = g.node(v);\n var thisGroup = d3.select(this);\n util.applyClass(\n thisGroup,\n node['class'],\n (thisGroup.classed('update') ? 'update ' : '') + 'node'\n );\n\n thisGroup.select('g.label').remove();\n var labelGroup = thisGroup.append('g').attr('class', 'label');\n var labelDom = addLabel(labelGroup, node);\n var shape = shapes[node.shape];\n var bbox = _.pick(labelDom.node().getBBox(), 'width', 'height');\n\n node.elem = this;\n\n if (node.id) {\n thisGroup.attr('id', node.id);\n }\n if (node.labelId) {\n labelGroup.attr('id', node.labelId);\n }\n\n if (_.has(node, 'width')) {\n bbox.width = node.width;\n }\n if (_.has(node, 'height')) {\n bbox.height = node.height;\n }\n\n bbox.width += node.paddingLeft + node.paddingRight;\n bbox.height += node.paddingTop + node.paddingBottom;\n labelGroup.attr(\n 'transform',\n 'translate(' +\n (node.paddingLeft - node.paddingRight) / 2 +\n ',' +\n (node.paddingTop - node.paddingBottom) / 2 +\n ')'\n );\n\n var root = d3.select(this);\n root.select('.label-container').remove();\n var shapeSvg = shape(root, bbox, node).classed('label-container', true);\n util.applyStyle(shapeSvg, node.style);\n\n var shapeBBox = shapeSvg.node().getBBox();\n node.width = shapeBBox.width;\n node.height = shapeBBox.height;\n });\n\n var exitSelection;\n\n if (svgNodes.exit) {\n exitSelection = svgNodes.exit();\n } else {\n exitSelection = svgNodes.selectAll(null); // empty selection\n }\n\n util.applyTransition(exitSelection, g).style('opacity', 0).remove();\n\n return svgNodes;\n};\n\nfunction setCreateNodes(value) {\n createNodes = value;\n}\n", "import * as d3 from 'd3';\nimport * as util from './util.js';\n\nexport { positionClusters };\n\nfunction positionClusters(selection, g) {\n var created = selection.filter(function () {\n return !d3.select(this).classed('update');\n });\n\n function translate(v) {\n var node = g.node(v);\n return 'translate(' + node.x + ',' + node.y + ')';\n }\n\n created.attr('transform', translate);\n\n util.applyTransition(selection, g).style('opacity', 1).attr('transform', translate);\n\n util\n .applyTransition(created.selectAll('rect'), g)\n .attr('width', function (v) {\n return g.node(v).width;\n })\n .attr('height', function (v) {\n return g.node(v).height;\n })\n .attr('x', function (v) {\n var node = g.node(v);\n return -node.width / 2;\n })\n .attr('y', function (v) {\n var node = g.node(v);\n return -node.height / 2;\n });\n}\n", "import * as d3 from 'd3';\nimport * as _ from 'lodash-es';\nimport * as util from './util.js';\n\nexport { positionEdgeLabels };\n\nfunction positionEdgeLabels(selection, g) {\n var created = selection.filter(function () {\n return !d3.select(this).classed('update');\n });\n\n function translate(e) {\n var edge = g.edge(e);\n return _.has(edge, 'x') ? 'translate(' + edge.x + ',' + edge.y + ')' : '';\n }\n\n created.attr('transform', translate);\n\n util.applyTransition(selection, g).style('opacity', 1).attr('transform', translate);\n}\n", "import * as d3 from 'd3';\nimport * as util from './util.js';\n\nexport { positionNodes };\n\nfunction positionNodes(selection, g) {\n var created = selection.filter(function () {\n return !d3.select(this).classed('update');\n });\n\n function translate(v) {\n var node = g.node(v);\n return 'translate(' + node.x + ',' + node.y + ')';\n }\n\n created.attr('transform', translate);\n\n util.applyTransition(selection, g).style('opacity', 1).attr('transform', translate);\n}\n", "export { intersectEllipse };\n\nfunction intersectEllipse(node, rx, ry, point) {\n // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html\n\n var cx = node.x;\n var cy = node.y;\n\n var px = cx - point.x;\n var py = cy - point.y;\n\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n\n var dx = Math.abs((rx * ry * px) / det);\n if (point.x < cx) {\n dx = -dx;\n }\n var dy = Math.abs((rx * ry * py) / det);\n if (point.y < cy) {\n dy = -dy;\n }\n\n return { x: cx + dx, y: cy + dy };\n}\n", "import { intersectEllipse } from './intersect-ellipse.js';\n\nexport { intersectCircle };\n\nfunction intersectCircle(node, rx, point) {\n return intersectEllipse(node, rx, rx, point);\n}\n", "export { intersectLine };\n\n/*\n * Returns the point at which two lines, p and q, intersect or returns\n * undefined if they do not intersect.\n */\nfunction intersectLine(p1, p2, q1, q2) {\n // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,\n // p7 and p473.\n\n var a1, a2, b1, b2, c1, c2;\n var r1, r2, r3, r4;\n var denom, offset, num;\n var x, y;\n\n // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +\n // b1 y + c1 = 0.\n a1 = p2.y - p1.y;\n b1 = p1.x - p2.x;\n c1 = p2.x * p1.y - p1.x * p2.y;\n\n // Compute r3 and r4.\n r3 = a1 * q1.x + b1 * q1.y + c1;\n r4 = a1 * q2.x + b1 * q2.y + c1;\n\n // Check signs of r3 and r4. If both point 3 and point 4 lie on\n // same side of line 1, the line segments do not intersect.\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return /*DONT_INTERSECT*/;\n }\n\n // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0\n a2 = q2.y - q1.y;\n b2 = q1.x - q2.x;\n c2 = q2.x * q1.y - q1.x * q2.y;\n\n // Compute r1 and r2\n r1 = a2 * p1.x + b2 * p1.y + c2;\n r2 = a2 * p2.x + b2 * p2.y + c2;\n\n // Check signs of r1 and r2. If both point 1 and point 2 lie\n // on same side of second line segment, the line segments do\n // not intersect.\n if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n return /*DONT_INTERSECT*/;\n }\n\n // Line segments intersect: compute intersection point.\n denom = a1 * b2 - a2 * b1;\n if (denom === 0) {\n return /*COLLINEAR*/;\n }\n\n offset = Math.abs(denom / 2);\n\n // The denom/2 is to get rounding instead of truncating. It\n // is added or subtracted to the numerator, depending upon the\n // sign of the numerator.\n num = b1 * c2 - b2 * c1;\n x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n num = a2 * c1 - a1 * c2;\n y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n return { x: x, y: y };\n}\n\nfunction sameSign(r1, r2) {\n return r1 * r2 > 0;\n}\n", "import { intersectLine } from './intersect-line.js';\n\nexport { intersectPolygon };\n\n/*\n * Returns the point ({x, y}) at which the point argument intersects with the\n * node argument assuming that it has the shape specified by polygon.\n */\nfunction intersectPolygon(node, polyPoints, point) {\n var x1 = node.x;\n var y1 = node.y;\n\n var intersections = [];\n\n var minX = Number.POSITIVE_INFINITY;\n var minY = Number.POSITIVE_INFINITY;\n polyPoints.forEach(function (entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n\n var left = x1 - node.width / 2 - minX;\n var top = y1 - node.height / 2 - minY;\n\n for (var i = 0; i < polyPoints.length; i++) {\n var p1 = polyPoints[i];\n var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n var intersect = intersectLine(\n node,\n point,\n { x: left + p1.x, y: top + p1.y },\n { x: left + p2.x, y: top + p2.y }\n );\n if (intersect) {\n intersections.push(intersect);\n }\n }\n\n if (!intersections.length) {\n console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node);\n return node;\n }\n\n if (intersections.length > 1) {\n // More intersections, find the one nearest to edge end point\n intersections.sort(function (p, q) {\n var pdx = p.x - point.x;\n var pdy = p.y - point.y;\n var distp = Math.sqrt(pdx * pdx + pdy * pdy);\n\n var qdx = q.x - point.x;\n var qdy = q.y - point.y;\n var distq = Math.sqrt(qdx * qdx + qdy * qdy);\n\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n return intersections[0];\n}\n", "export { intersectRect };\n\nfunction intersectRect(node, point) {\n var x = node.x;\n var y = node.y;\n\n // Rectangle intersection algorithm from:\n // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n var dx = point.x - x;\n var dy = point.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n sx = dy === 0 ? 0 : (h * dx) / dy;\n sy = h;\n } else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = dx === 0 ? 0 : (w * dy) / dx;\n }\n\n return { x: x + sx, y: y + sy };\n}\n", "import { intersectCircle } from './intersect/intersect-circle.js';\nimport { intersectEllipse } from './intersect/intersect-ellipse.js';\nimport { intersectPolygon } from './intersect/intersect-polygon.js';\nimport { intersectRect } from './intersect/intersect-rect.js';\n\nexport { shapes, setShapes };\n\nvar shapes = {\n rect,\n ellipse,\n circle,\n diamond,\n};\n\nfunction setShapes(value) {\n shapes = value;\n}\n\nfunction rect(parent, bbox, node) {\n var shapeSvg = parent\n .insert('rect', ':first-child')\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', -bbox.width / 2)\n .attr('y', -bbox.height / 2)\n .attr('width', bbox.width)\n .attr('height', bbox.height);\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n}\n\nfunction ellipse(parent, bbox, node) {\n var rx = bbox.width / 2;\n var ry = bbox.height / 2;\n var shapeSvg = parent\n .insert('ellipse', ':first-child')\n .attr('x', -bbox.width / 2)\n .attr('y', -bbox.height / 2)\n .attr('rx', rx)\n .attr('ry', ry);\n\n node.intersect = function (point) {\n return intersectEllipse(node, rx, ry, point);\n };\n\n return shapeSvg;\n}\n\nfunction circle(parent, bbox, node) {\n var r = Math.max(bbox.width, bbox.height) / 2;\n var shapeSvg = parent\n .insert('circle', ':first-child')\n .attr('x', -bbox.width / 2)\n .attr('y', -bbox.height / 2)\n .attr('r', r);\n\n node.intersect = function (point) {\n return intersectCircle(node, r, point);\n };\n\n return shapeSvg;\n}\n\n// Circumscribe an ellipse for the bounding box with a diamond shape. I derived\n// the function to calculate the diamond shape from:\n// http://mathforum.org/kb/message.jspa?messageID=3750236\nfunction diamond(parent, bbox, node) {\n var w = (bbox.width * Math.SQRT2) / 2;\n var h = (bbox.height * Math.SQRT2) / 2;\n var points = [\n { x: 0, y: -h },\n { x: -w, y: 0 },\n { x: 0, y: h },\n { x: w, y: 0 },\n ];\n var shapeSvg = parent.insert('polygon', ':first-child').attr(\n 'points',\n points\n .map(function (p) {\n return p.x + ',' + p.y;\n })\n .join(' ')\n );\n\n node.intersect = function (p) {\n return intersectPolygon(node, points, p);\n };\n\n return shapeSvg;\n}\n", "import * as d3 from 'd3';\nimport * as _ from 'lodash-es';\nimport { layout } from '../dagre/index.js';\nimport { arrows, setArrows } from './arrows.js';\nimport { createClusters, setCreateClusters } from './create-clusters.js';\nimport { createEdgeLabels, setCreateEdgeLabels } from './create-edge-labels.js';\nimport { createEdgePaths, setCreateEdgePaths } from './create-edge-paths.js';\nimport { createNodes, setCreateNodes } from './create-nodes.js';\nimport { positionClusters } from './position-clusters.js';\nimport { positionEdgeLabels } from './position-edge-labels.js';\nimport { positionNodes } from './position-nodes.js';\nimport { shapes, setShapes } from './shapes.js';\n\nexport { render };\n\n// This design is based on http://bost.ocks.org/mike/chart/.\nfunction render() {\n var fn = function (svg, g) {\n preProcessGraph(g);\n\n var outputGroup = createOrSelectGroup(svg, 'output');\n var clustersGroup = createOrSelectGroup(outputGroup, 'clusters');\n var edgePathsGroup = createOrSelectGroup(outputGroup, 'edgePaths');\n var edgeLabels = createEdgeLabels(createOrSelectGroup(outputGroup, 'edgeLabels'), g);\n var nodes = createNodes(createOrSelectGroup(outputGroup, 'nodes'), g, shapes);\n\n layout(g);\n\n positionNodes(nodes, g);\n positionEdgeLabels(edgeLabels, g);\n createEdgePaths(edgePathsGroup, g, arrows);\n\n var clusters = createClusters(clustersGroup, g);\n positionClusters(clusters, g);\n\n postProcessGraph(g);\n };\n\n fn.createNodes = function (value) {\n if (!arguments.length) return createNodes;\n setCreateNodes(value);\n return fn;\n };\n\n fn.createClusters = function (value) {\n if (!arguments.length) return createClusters;\n setCreateClusters(value);\n return fn;\n };\n\n fn.createEdgeLabels = function (value) {\n if (!arguments.length) return createEdgeLabels;\n setCreateEdgeLabels(value);\n return fn;\n };\n\n fn.createEdgePaths = function (value) {\n if (!arguments.length) return createEdgePaths;\n setCreateEdgePaths(value);\n return fn;\n };\n\n fn.shapes = function (value) {\n if (!arguments.length) return shapes;\n setShapes(value);\n return fn;\n };\n\n fn.arrows = function (value) {\n if (!arguments.length) return arrows;\n setArrows(value);\n return fn;\n };\n\n return fn;\n}\n\nvar NODE_DEFAULT_ATTRS = {\n paddingLeft: 10,\n paddingRight: 10,\n paddingTop: 10,\n paddingBottom: 10,\n rx: 0,\n ry: 0,\n shape: 'rect',\n};\n\nvar EDGE_DEFAULT_ATTRS = {\n arrowhead: 'normal',\n curve: d3.curveLinear,\n};\n\nfunction preProcessGraph(g) {\n g.nodes().forEach(function (v) {\n var node = g.node(v);\n if (!_.has(node, 'label') && !g.children(v).length) {\n node.label = v;\n }\n\n if (_.has(node, 'paddingX')) {\n _.defaults(node, {\n paddingLeft: node.paddingX,\n paddingRight: node.paddingX,\n });\n }\n\n if (_.has(node, 'paddingY')) {\n _.defaults(node, {\n paddingTop: node.paddingY,\n paddingBottom: node.paddingY,\n });\n }\n\n if (_.has(node, 'padding')) {\n _.defaults(node, {\n paddingLeft: node.padding,\n paddingRight: node.padding,\n paddingTop: node.padding,\n paddingBottom: node.padding,\n });\n }\n\n _.defaults(node, NODE_DEFAULT_ATTRS);\n\n _.each(['paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom'], function (k) {\n node[k] = Number(node[k]);\n });\n\n // Save dimensions for restore during post-processing\n if (_.has(node, 'width')) {\n node._prevWidth = node.width;\n }\n if (_.has(node, 'height')) {\n node._prevHeight = node.height;\n }\n });\n\n g.edges().forEach(function (e) {\n var edge = g.edge(e);\n if (!_.has(edge, 'label')) {\n edge.label = '';\n }\n _.defaults(edge, EDGE_DEFAULT_ATTRS);\n });\n}\n\nfunction postProcessGraph(g) {\n _.each(g.nodes(), function (v) {\n var node = g.node(v);\n\n // Restore original dimensions\n if (_.has(node, '_prevWidth')) {\n node.width = node._prevWidth;\n } else {\n delete node.width;\n }\n\n if (_.has(node, '_prevHeight')) {\n node.height = node._prevHeight;\n } else {\n delete node.height;\n }\n\n delete node._prevWidth;\n delete node._prevHeight;\n });\n}\n\nfunction createOrSelectGroup(root, name) {\n var selection = root.select('g.' + name);\n if (selection.empty()) {\n selection = root.append('g').attr('class', name);\n }\n return selection;\n}\n", "import { p as parser, f as flowDb } from \"./flowDb-c1833063.js\";\nimport * as graphlib from \"dagre-d3-es/src/graphlib/index.js\";\nimport { select, curveLinear, selectAll } from \"d3\";\nimport { k as getStylesFromArray, m as evaluate, c as getConfig, r as renderKatex, e as common, l as log, n as interpolateToCurve, o as setupGraphViewbox } from \"./mermaid-6dc72991.js\";\nimport { render } from \"dagre-d3-es\";\nimport { applyStyle } from \"dagre-d3-es/src/dagre-js/util.js\";\nimport { addHtmlLabel } from \"dagre-d3-es/src/dagre-js/label/add-html-label.js\";\nimport { intersectPolygon } from \"dagre-d3-es/src/dagre-js/intersect/intersect-polygon.js\";\nimport { intersectRect } from \"dagre-d3-es/src/dagre-js/intersect/intersect-rect.js\";\nimport { f as flowRendererV2, a as flowStyles } from \"./styles-483fbfea.js\";\nimport \"ts-dedent\";\nimport \"dayjs\";\nimport \"@braintree/sanitize-url\";\nimport \"dompurify\";\nimport \"khroma\";\nimport \"lodash-es/memoize.js\";\nimport \"lodash-es/merge.js\";\nimport \"stylis\";\nimport \"lodash-es/isEmpty.js\";\nimport \"./index-01f381cb.js\";\nimport \"dagre-d3-es/src/dagre/index.js\";\nimport \"dagre-d3-es/src/graphlib/json.js\";\nimport \"./edges-066a5561.js\";\nimport \"./createText-ca0c5216.js\";\nimport \"mdast-util-from-markdown\";\nfunction question(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const s = (w + h) * 0.9;\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 }\n ];\n const shapeSvg = insertPolygonShape(parent, s, s, points);\n node.intersect = function(point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\nfunction hexagon(parent, bbox, node) {\n const f = 4;\n const h = bbox.height;\n const m = h / f;\n const w = bbox.width + 2 * m;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\nfunction rect_left_inv_arrow(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: -h / 2, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: -h / 2, y: -h },\n { x: 0, y: -h / 2 }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\nfunction lean_right(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: -2 * h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + 2 * h / 6, y: -h },\n { x: h / 6, y: -h }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\nfunction lean_left(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: 2 * h / 6, y: 0 },\n { x: w + h / 6, y: 0 },\n { x: w - 2 * h / 6, y: -h },\n { x: -h / 6, y: -h }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\nfunction trapezoid(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: -2 * h / 6, y: 0 },\n { x: w + 2 * h / 6, y: 0 },\n { x: w - h / 6, y: -h },\n { x: h / 6, y: -h }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\nfunction inv_trapezoid(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + 2 * h / 6, y: -h },\n { x: -2 * h / 6, y: -h }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\nfunction rect_right_inv_arrow(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: 0, y: 0 },\n { x: w + h / 2, y: 0 },\n { x: w, y: -h / 2 },\n { x: w + h / 2, y: -h },\n { x: 0, y: -h }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\nfunction stadium(parent, bbox, node) {\n const h = bbox.height;\n const w = bbox.width + h / 4;\n const shapeSvg = parent.insert(\"rect\", \":first-child\").attr(\"rx\", h / 2).attr(\"ry\", h / 2).attr(\"x\", -w / 2).attr(\"y\", -h / 2).attr(\"width\", w).attr(\"height\", h);\n node.intersect = function(point) {\n return intersectRect(node, point);\n };\n return shapeSvg;\n}\nfunction subroutine(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return intersectPolygon(node, points, point);\n };\n return shapeSvg;\n}\nfunction cylinder(parent, bbox, node) {\n const w = bbox.width;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = bbox.height + ry;\n const shape = \"M 0,\" + ry + \" a \" + rx + \",\" + ry + \" 0,0,0 \" + w + \" 0 a \" + rx + \",\" + ry + \" 0,0,0 \" + -w + \" 0 l 0,\" + h + \" a \" + rx + \",\" + ry + \" 0,0,0 \" + w + \" 0 l 0,\" + -h;\n const shapeSvg = parent.attr(\"label-offset-y\", ry).insert(\"path\", \":first-child\").attr(\"d\", shape).attr(\"transform\", \"translate(\" + -w / 2 + \",\" + -(h / 2 + ry) + \")\");\n node.intersect = function(point) {\n const pos = intersectRect(node, point);\n const x = pos.x - node.x;\n if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {\n let y = ry * ry * (1 - x * x / (rx * rx));\n if (y != 0) {\n y = Math.sqrt(y);\n }\n y = ry - y;\n if (point.y - node.y > 0) {\n y = -y;\n }\n pos.y += y;\n }\n return pos;\n };\n return shapeSvg;\n}\nfunction addToRender(render2) {\n render2.shapes().question = question;\n render2.shapes().hexagon = hexagon;\n render2.shapes().stadium = stadium;\n render2.shapes().subroutine = subroutine;\n render2.shapes().cylinder = cylinder;\n render2.shapes().rect_left_inv_arrow = rect_left_inv_arrow;\n render2.shapes().lean_right = lean_right;\n render2.shapes().lean_left = lean_left;\n render2.shapes().trapezoid = trapezoid;\n render2.shapes().inv_trapezoid = inv_trapezoid;\n render2.shapes().rect_right_inv_arrow = rect_right_inv_arrow;\n}\nfunction addToRenderV2(addShape) {\n addShape({ question });\n addShape({ hexagon });\n addShape({ stadium });\n addShape({ subroutine });\n addShape({ cylinder });\n addShape({ rect_left_inv_arrow });\n addShape({ lean_right });\n addShape({ lean_left });\n addShape({ trapezoid });\n addShape({ inv_trapezoid });\n addShape({ rect_right_inv_arrow });\n}\nfunction insertPolygonShape(parent, w, h, points) {\n return parent.insert(\"polygon\", \":first-child\").attr(\n \"points\",\n points.map(function(d) {\n return d.x + \",\" + d.y;\n }).join(\" \")\n ).attr(\"transform\", \"translate(\" + -w / 2 + \",\" + h / 2 + \")\");\n}\nconst flowChartShapes = {\n addToRender,\n addToRenderV2\n};\nconst conf = {};\nconst setConf = function(cnf) {\n const keys = Object.keys(cnf);\n for (const key of keys) {\n conf[key] = cnf[key];\n }\n};\nconst addVertices = async function(vert, g, svgId, root, _doc, diagObj) {\n const svg = !root ? select(`[id=\"${svgId}\"]`) : root.select(`[id=\"${svgId}\"]`);\n const doc = !_doc ? document : _doc;\n const keys = Object.keys(vert);\n for (const id of keys) {\n const vertex = vert[id];\n let classStr = \"default\";\n if (vertex.classes.length > 0) {\n classStr = vertex.classes.join(\" \");\n }\n const styles = getStylesFromArray(vertex.styles);\n let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id;\n let vertexNode;\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const node = {\n label: await renderKatex(\n vertexText.replace(\n /fa[blrs]?:fa-[\\w-]+/g,\n // cspell:disable-line\n (s) => ``\n ),\n getConfig()\n )\n };\n vertexNode = addHtmlLabel(svg, node).node();\n vertexNode.parentNode.removeChild(vertexNode);\n } else {\n const svgLabel = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\n svgLabel.setAttribute(\"style\", styles.labelStyle.replace(\"color:\", \"fill:\"));\n const rows = vertexText.split(common.lineBreakRegex);\n for (const row of rows) {\n const tspan = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"tspan\");\n tspan.setAttributeNS(\"http://www.w3.org/XML/1998/namespace\", \"xml:space\", \"preserve\");\n tspan.setAttribute(\"dy\", \"1em\");\n tspan.setAttribute(\"x\", \"1\");\n tspan.textContent = row;\n svgLabel.appendChild(tspan);\n }\n vertexNode = svgLabel;\n }\n let radius = 0;\n let _shape = \"\";\n switch (vertex.type) {\n case \"round\":\n radius = 5;\n _shape = \"rect\";\n break;\n case \"square\":\n _shape = \"rect\";\n break;\n case \"diamond\":\n _shape = \"question\";\n break;\n case \"hexagon\":\n _shape = \"hexagon\";\n break;\n case \"odd\":\n _shape = \"rect_left_inv_arrow\";\n break;\n case \"lean_right\":\n _shape = \"lean_right\";\n break;\n case \"lean_left\":\n _shape = \"lean_left\";\n break;\n case \"trapezoid\":\n _shape = \"trapezoid\";\n break;\n case \"inv_trapezoid\":\n _shape = \"inv_trapezoid\";\n break;\n case \"odd_right\":\n _shape = \"rect_left_inv_arrow\";\n break;\n case \"circle\":\n _shape = \"circle\";\n break;\n case \"ellipse\":\n _shape = \"ellipse\";\n break;\n case \"stadium\":\n _shape = \"stadium\";\n break;\n case \"subroutine\":\n _shape = \"subroutine\";\n break;\n case \"cylinder\":\n _shape = \"cylinder\";\n break;\n case \"group\":\n _shape = \"rect\";\n break;\n default:\n _shape = \"rect\";\n }\n log.warn(\"Adding node\", vertex.id, vertex.domId);\n g.setNode(diagObj.db.lookUpDomId(vertex.id), {\n labelType: \"svg\",\n labelStyle: styles.labelStyle,\n shape: _shape,\n label: vertexNode,\n rx: radius,\n ry: radius,\n class: classStr,\n style: styles.style,\n id: diagObj.db.lookUpDomId(vertex.id)\n });\n }\n};\nconst addEdges = async function(edges, g, diagObj) {\n let cnt = 0;\n let defaultStyle;\n let defaultLabelStyle;\n if (edges.defaultStyle !== void 0) {\n const defaultStyles = getStylesFromArray(edges.defaultStyle);\n defaultStyle = defaultStyles.style;\n defaultLabelStyle = defaultStyles.labelStyle;\n }\n for (const edge of edges) {\n cnt++;\n const linkId = \"L-\" + edge.start + \"-\" + edge.end;\n const linkNameStart = \"LS-\" + edge.start;\n const linkNameEnd = \"LE-\" + edge.end;\n const edgeData = {};\n if (edge.type === \"arrow_open\") {\n edgeData.arrowhead = \"none\";\n } else {\n edgeData.arrowhead = \"normal\";\n }\n let style = \"\";\n let labelStyle = \"\";\n if (edge.style !== void 0) {\n const styles = getStylesFromArray(edge.style);\n style = styles.style;\n labelStyle = styles.labelStyle;\n } else {\n switch (edge.stroke) {\n case \"normal\":\n style = \"fill:none\";\n if (defaultStyle !== void 0) {\n style = defaultStyle;\n }\n if (defaultLabelStyle !== void 0) {\n labelStyle = defaultLabelStyle;\n }\n break;\n case \"dotted\":\n style = \"fill:none;stroke-width:2px;stroke-dasharray:3;\";\n break;\n case \"thick\":\n style = \" stroke-width: 3.5px;fill:none\";\n break;\n }\n }\n edgeData.style = style;\n edgeData.labelStyle = labelStyle;\n if (edge.interpolate !== void 0) {\n edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear);\n } else if (edges.defaultInterpolate !== void 0) {\n edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear);\n } else {\n edgeData.curve = interpolateToCurve(conf.curve, curveLinear);\n }\n if (edge.text === void 0) {\n if (edge.style !== void 0) {\n edgeData.arrowheadStyle = \"fill: #333\";\n }\n } else {\n edgeData.arrowheadStyle = \"fill: #333\";\n edgeData.labelpos = \"c\";\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n edgeData.labelType = \"html\";\n edgeData.label = `${await renderKatex(\n edge.text.replace(\n /fa[blrs]?:fa-[\\w-]+/g,\n // cspell:disable-line\n (s) => ``\n ),\n getConfig()\n )}`;\n } else {\n edgeData.labelType = \"text\";\n edgeData.label = edge.text.replace(common.lineBreakRegex, \"\\n\");\n if (edge.style === void 0) {\n edgeData.style = edgeData.style || \"stroke: #333; stroke-width: 1.5px;fill:none\";\n }\n edgeData.labelStyle = edgeData.labelStyle.replace(\"color:\", \"fill:\");\n }\n }\n edgeData.id = linkId;\n edgeData.class = linkNameStart + \" \" + linkNameEnd;\n edgeData.minlen = edge.length || 1;\n g.setEdge(diagObj.db.lookUpDomId(edge.start), diagObj.db.lookUpDomId(edge.end), edgeData, cnt);\n }\n};\nconst getClasses = function(text, diagObj) {\n log.info(\"Extracting classes\");\n return diagObj.db.getClasses();\n};\nconst draw = async function(text, id, _version, diagObj) {\n log.info(\"Drawing flowchart\");\n const { securityLevel, flowchart: conf2 } = getConfig();\n let sandboxElement;\n if (securityLevel === \"sandbox\") {\n sandboxElement = select(\"#i\" + id);\n }\n const root = securityLevel === \"sandbox\" ? select(sandboxElement.nodes()[0].contentDocument.body) : select(\"body\");\n const doc = securityLevel === \"sandbox\" ? sandboxElement.nodes()[0].contentDocument : document;\n let dir = diagObj.db.getDirection();\n if (dir === void 0) {\n dir = \"TD\";\n }\n const nodeSpacing = conf2.nodeSpacing || 50;\n const rankSpacing = conf2.rankSpacing || 50;\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: dir,\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n let subG;\n const subGraphs = diagObj.db.getSubGraphs();\n for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) {\n subG = subGraphs[i2];\n diagObj.db.addVertex(subG.id, subG.title, \"group\", void 0, subG.classes);\n }\n const vert = diagObj.db.getVertices();\n log.warn(\"Get vertices\", vert);\n const edges = diagObj.db.getEdges();\n let i = 0;\n for (i = subGraphs.length - 1; i >= 0; i--) {\n subG = subGraphs[i];\n selectAll(\"cluster\").append(\"text\");\n for (let j = 0; j < subG.nodes.length; j++) {\n log.warn(\n \"Setting subgraph\",\n subG.nodes[j],\n diagObj.db.lookUpDomId(subG.nodes[j]),\n diagObj.db.lookUpDomId(subG.id)\n );\n g.setParent(diagObj.db.lookUpDomId(subG.nodes[j]), diagObj.db.lookUpDomId(subG.id));\n }\n }\n await addVertices(vert, g, id, root, doc, diagObj);\n await addEdges(edges, g, diagObj);\n const render$1 = new render();\n flowChartShapes.addToRender(render$1);\n render$1.arrows().none = function normal(parent, id2, edge, type) {\n const marker = parent.append(\"marker\").attr(\"id\", id2).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 9).attr(\"refY\", 5).attr(\"markerUnits\", \"strokeWidth\").attr(\"markerWidth\", 8).attr(\"markerHeight\", 6).attr(\"orient\", \"auto\");\n const path = marker.append(\"path\").attr(\"d\", \"M 0 0 L 0 0 L 0 0 z\");\n applyStyle(path, edge[type + \"Style\"]);\n };\n render$1.arrows().normal = function normal(parent, id2) {\n const marker = parent.append(\"marker\").attr(\"id\", id2).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 9).attr(\"refY\", 5).attr(\"markerUnits\", \"strokeWidth\").attr(\"markerWidth\", 8).attr(\"markerHeight\", 6).attr(\"orient\", \"auto\");\n marker.append(\"path\").attr(\"d\", \"M 0 0 L 10 5 L 0 10 z\").attr(\"class\", \"arrowheadPath\").style(\"stroke-width\", 1).style(\"stroke-dasharray\", \"1,0\");\n };\n const svg = root.select(`[id=\"${id}\"]`);\n const element = root.select(\"#\" + id + \" g\");\n render$1(element, g);\n element.selectAll(\"g.node\").attr(\"title\", function() {\n return diagObj.db.getTooltip(this.id);\n });\n diagObj.db.indexNodes(\"subGraph\" + i);\n for (i = 0; i < subGraphs.length; i++) {\n subG = subGraphs[i];\n if (subG.title !== \"undefined\") {\n const clusterRects = doc.querySelectorAll(\n \"#\" + id + ' [id=\"' + diagObj.db.lookUpDomId(subG.id) + '\"] rect'\n );\n const clusterEl = doc.querySelectorAll(\n \"#\" + id + ' [id=\"' + diagObj.db.lookUpDomId(subG.id) + '\"]'\n );\n const xPos = clusterRects[0].x.baseVal.value;\n const yPos = clusterRects[0].y.baseVal.value;\n const _width = clusterRects[0].width.baseVal.value;\n const cluster = select(clusterEl[0]);\n const te = cluster.select(\".label\");\n te.attr(\"transform\", `translate(${xPos + _width / 2}, ${yPos + 14})`);\n te.attr(\"id\", id + \"Text\");\n for (let j = 0; j < subG.classes.length; j++) {\n clusterEl[0].classList.add(subG.classes[j]);\n }\n }\n }\n if (!conf2.htmlLabels) {\n const labels = doc.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n for (const label of labels) {\n const dim = label.getBBox();\n const rect = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\");\n rect.setAttribute(\"rx\", 0);\n rect.setAttribute(\"ry\", 0);\n rect.setAttribute(\"width\", dim.width);\n rect.setAttribute(\"height\", dim.height);\n label.insertBefore(rect, label.firstChild);\n }\n }\n setupGraphViewbox(g, svg, conf2.diagramPadding, conf2.useMaxWidth);\n const keys = Object.keys(vert);\n keys.forEach(function(key) {\n const vertex = vert[key];\n if (vertex.link) {\n const node = root.select(\"#\" + id + ' [id=\"' + diagObj.db.lookUpDomId(key) + '\"]');\n if (node) {\n const link = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"a\");\n link.setAttributeNS(\"http://www.w3.org/2000/svg\", \"class\", vertex.classes.join(\" \"));\n link.setAttributeNS(\"http://www.w3.org/2000/svg\", \"href\", vertex.link);\n link.setAttributeNS(\"http://www.w3.org/2000/svg\", \"rel\", \"noopener\");\n if (securityLevel === \"sandbox\") {\n link.setAttributeNS(\"http://www.w3.org/2000/svg\", \"target\", \"_top\");\n } else if (vertex.linkTarget) {\n link.setAttributeNS(\"http://www.w3.org/2000/svg\", \"target\", vertex.linkTarget);\n }\n const linkNode = node.insert(function() {\n return link;\n }, \":first-child\");\n const shape = node.select(\".label-container\");\n if (shape) {\n linkNode.append(function() {\n return shape.node();\n });\n }\n const label = node.select(\".label\");\n if (label) {\n linkNode.append(function() {\n return label.node();\n });\n }\n }\n }\n });\n};\nconst flowRenderer = {\n setConf,\n addVertices,\n addEdges,\n getClasses,\n draw\n};\nconst diagram = {\n parser,\n db: flowDb,\n renderer: flowRendererV2,\n styles: flowStyles,\n init: (cnf) => {\n if (!cnf.flowchart) {\n cnf.flowchart = {};\n }\n cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n flowRenderer.setConf(cnf.flowchart);\n flowDb.clear();\n flowDb.setGen(\"gen-1\");\n }\n};\nexport {\n diagram\n};\n"],
"mappings": "+kBAIA,IAAIA,EAAS,CACX,OAAAC,GACA,IAAAC,GACA,WAAAC,EACF,EAEA,SAASC,GAAUC,EAAO,CACxBL,EAASK,CACX,CAEA,SAASJ,GAAOK,EAAQC,EAAIC,EAAMC,EAAM,CACtC,IAAIC,EAASJ,EACV,OAAO,QAAQ,EACf,KAAK,KAAMC,CAAE,EACb,KAAK,UAAW,WAAW,EAC3B,KAAK,OAAQ,CAAC,EACd,KAAK,OAAQ,CAAC,EACd,KAAK,cAAe,aAAa,EACjC,KAAK,cAAe,CAAC,EACrB,KAAK,eAAgB,CAAC,EACtB,KAAK,SAAU,MAAM,EAEpBI,EAAOD,EACR,OAAO,MAAM,EACb,KAAK,IAAK,uBAAuB,EACjC,MAAM,eAAgB,CAAC,EACvB,MAAM,mBAAoB,KAAK,EAC7BE,EAAWD,EAAMH,EAAKC,EAAO,OAAO,CAAC,EACtCD,EAAKC,EAAO,OAAO,GACrBE,EAAK,KAAK,QAASH,EAAKC,EAAO,OAAO,CAAC,CAE3C,CAEA,SAASP,GAAII,EAAQC,EAAIC,EAAMC,EAAM,C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rE,EAAO,QAAQ,KAAK,GAAG,CAAC,EACnFqE,EAAK,eAAe,6BAA8B,OAAQrE,EAAO,IAAI,EACrEqE,EAAK,eAAe,6BAA8B,MAAO,UAAU,EAC/D/B,IAAkB,UACpB+B,EAAK,eAAe,6BAA8B,SAAU,MAAM,EACzDrE,EAAO,YAChBqE,EAAK,eAAe,6BAA8B,SAAUrE,EAAO,UAAU,EAE/E,IAAMsE,EAAWtH,EAAK,OAAO,UAAW,CACtC,OAAOqH,CACT,EAAG,cAAc,EACX/F,EAAQtB,EAAK,OAAO,kBAAkB,EACxCsB,GACFgG,EAAS,OAAO,UAAW,CACzB,OAAOhG,EAAM,KAAK,CACpB,CAAC,EAEH,IAAM2F,EAAQjH,EAAK,OAAO,QAAQ,EAC9BiH,GACFK,EAAS,OAAO,UAAW,CACzB,OAAOL,EAAM,KAAK,CACpB,CAAC,CAEL,CACF,CACF,CAAC,CACH,EACMM,GAAe,CACnB,QAAAtF,GACA,YAAAI,GACA,SAAA8B,GACA,WAAAe,GACA,KAAAE,EACF,EACMoC,GAAU,CACd,OAAAC,GACA,GAAIC,EACJ,SAAUC,GACV,OAAQC,GACR,KAAO1F,GAAQ,CACRA,EAAI,YACPA,EAAI,UAAY,CAAC,GAEnBA,EAAI,UAAU,oBAAsBA,EAAI,oBACxCqF,GAAa,QAAQrF,EAAI,SAAS,EAClCwF,EAAO,MAAM,EACbA,EAAO,OAAO,OAAO,CACvB,CACF",
"names": ["arrows", "normal", "vee", "undirected", "setArrows", "value", "parent", "id", "edge", "type", "marker", "path", "applyStyle", "addSVGLabel", "root", "node", "domNode", "applyStyle", "addTextLabel", "root", "node", "domNode", "lines", "processEscapeSequences", "i", "applyStyle", "text", "newText", "escaped", "ch", "addLabel", "root", "node", "location", "label", "labelSvg", "addSVGLabel", "addHtmlLabel", "addTextLabel", "labelBBox", "y", "createClusters", "selection", "g", "clusters", "v", "isSubgraph", "svgClusters", "applyTransition", "enterSelection", "node", "thisGroup", "select_default", "labelGroup", "addLabel", "c", "domCluster", "applyStyle", "setCreateClusters", "value", "createEdgeLabels", "selection", "g", "svgEdgeLabels", "e", "edgeToId", "root", "select_default", "edge", "label", "addLabel", "bbox", "has_default", "exitSelection", "applyTransition", "setCreateEdgeLabels", "value", "intersectNode", "node", "point", "createEdgePaths", "selection", "g", "arrows", "previousPaths", "e", "edgeToId", "newPaths", "enter", "exit", "svgPaths", "applyTransition", "domEdge", "select_default", "edge", "applyClass", "uniqueId_default", "makeFragmentRef", "calcPoints", "applyStyle", "arrowhead", "setCreateEdgePaths", "value", "url", "fragmentId", "baseUrl", "tail", "head", "points", "intersectNode", "createLine", "line", "line_default", "svg", "d", "getCoords", "elem", "bbox", "matrix", "svgPathsEnter", "sourceElem", "range_default", "svgPathExit", "createNodes", "selection", "g", "shapes", "simpleNodes", "v", "isSubgraph", "svgNodes", "node", "thisGroup", "select_default", "applyClass", "labelGroup", "labelDom", "addLabel", "shape", "bbox", "pick_default", "has_default", "root", "shapeSvg", "applyStyle", "shapeBBox", "exitSelection", "applyTransition", "setCreateNodes", "value", "positionClusters", "selection", "g", "created", "select_default", "translate", "v", "node", "applyTransition", "positionEdgeLabels", "selection", "g", "created", "select_default", "translate", "e", "edge", "has_default", "applyTransition", "positionNodes", "selection", "g", "created", "select_default", "translate", "v", "node", "applyTransition", "intersectEllipse", "node", "rx", "ry", "point", "cx", "cy", "px", "py", "det", "dx", "dy", "intersectCircle", "node", "rx", "point", "intersectEllipse", "intersectLine", "p1", "p2", "q1", "q2", "a1", "a2", "b1", "b2", "c1", "c2", "r1", "r2", "r3", "r4", "denom", "offset", "num", "x", "y", "sameSign", "intersectPolygon", "node", "polyPoints", "point", "x1", "y1", "intersections", "minX", "minY", "entry", "left", "top", "i", "p1", "p2", "intersect", "intersectLine", "p", "q", "pdx", "pdy", "distp", "qdx", "qdy", "distq", "intersectRect", "node", "point", "x", "y", "dx", "dy", "w", "h", "sx", "sy", "shapes", "rect", "ellipse", "circle", "diamond", "setShapes", "value", "parent", "bbox", "node", "shapeSvg", "point", "intersectRect", "rx", "ry", "intersectEllipse", "r", "intersectCircle", "w", "h", "points", "p", "intersectPolygon", "render", "fn", "svg", "g", "preProcessGraph", "outputGroup", "createOrSelectGroup", "clustersGroup", "edgePathsGroup", "edgeLabels", "createEdgeLabels", "nodes", "createNodes", "shapes", "layout", "positionNodes", "positionEdgeLabels", "createEdgePaths", "arrows", "clusters", "createClusters", "positionClusters", "postProcessGraph", "value", "setCreateNodes", "setCreateClusters", "setCreateEdgeLabels", "setCreateEdgePaths", "setShapes", "setArrows", "NODE_DEFAULT_ATTRS", "EDGE_DEFAULT_ATTRS", "linear_default", "v", "node", "has_default", "defaults_default", "forEach_default", "k", "edge", "root", "name", "selection", "import_dayjs", "import_sanitize_url", "import_dompurify", "question", "parent", "bbox", "node", "w", "h", "points", "shapeSvg", "insertPolygonShape", "point", "intersectPolygon", "hexagon", "m", "rect_left_inv_arrow", "lean_right", "lean_left", "trapezoid", "inv_trapezoid", "rect_right_inv_arrow", "stadium", "intersectRect", "subroutine", "cylinder", "rx", "ry", "shape", "pos", "x", "y", "addToRender", "render2", "addToRenderV2", "addShape", "d", "flowChartShapes", "conf", "setConf", "cnf", "keys", "key", "addVertices", "vert", "g", "svgId", "root", "_doc", "diagObj", "svg", "select_default", "doc", "id", "vertex", "classStr", "styles", "getStylesFromArray", "vertexText", "vertexNode", "evaluate", "getConfig", "renderKatex", "s", "addHtmlLabel", "svgLabel", "rows", "common$1", "row", "tspan", "radius", "_shape", "log$1", "addEdges", "edges", "cnt", "defaultStyle", "defaultLabelStyle", "defaultStyles", "edge", "linkId", "linkNameStart", "linkNameEnd", "edgeData", "style", "labelStyle", "interpolateToCurve", "linear_default", "getClasses", "text", "draw", "_version", "securityLevel", "conf2", "sandboxElement", "dir", "nodeSpacing", "rankSpacing", "Graph", "subG", "subGraphs", "i2", "i", "selectAll_default", "j", "render$1", "render", "id2", "type", "path", "applyStyle", "element", "clusterRects", "clusterEl", "xPos", "yPos", "_width", "te", "labels", "label", "dim", "rect", "setupGraphViewbox$1", "link", "linkNode", "flowRenderer", "diagram", "parser$1", "flowDb", "flowRendererV2", "flowStyles"]
}