{"version":3,"file":"edges-e0da2a9e-CfclYjfq.chunk.mjs","sources":["../node_modules/mermaid/dist/edges-e0da2a9e.js"],"sourcesContent":["import { l as log, m as evaluate, c as getConfig, M as decodeEntities, d as sanitizeText, u as utils } from \"./mermaid-b5860b54.js\";\nimport { select, line, curveBasis } from \"d3\";\nimport { a as createText } from \"./createText-2e5e7dd3.js\";\nconst insertMarkers = (elem, markerArray, type, id) => {\n markerArray.forEach((markerName) => {\n markers[markerName](elem, type, id);\n });\n};\nconst extension = (elem, type, id) => {\n log.trace(\"Making markers for \", id);\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-extensionStart\").attr(\"class\", \"marker extension \" + type).attr(\"refX\", 18).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 1,7 L18,13 V 1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-extensionEnd\").attr(\"class\", \"marker extension \" + type).attr(\"refX\", 1).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 1,1 V 13 L18,7 Z\");\n};\nconst composition = (elem, type, id) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-compositionStart\").attr(\"class\", \"marker composition \" + type).attr(\"refX\", 18).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-compositionEnd\").attr(\"class\", \"marker composition \" + type).attr(\"refX\", 1).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n};\nconst aggregation = (elem, type, id) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-aggregationStart\").attr(\"class\", \"marker aggregation \" + type).attr(\"refX\", 18).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-aggregationEnd\").attr(\"class\", \"marker aggregation \" + type).attr(\"refX\", 1).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n};\nconst dependency = (elem, type, id) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-dependencyStart\").attr(\"class\", \"marker dependency \" + type).attr(\"refX\", 6).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 5,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-dependencyEnd\").attr(\"class\", \"marker dependency \" + type).attr(\"refX\", 13).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L14,7 L9,1 Z\");\n};\nconst lollipop = (elem, type, id) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-lollipopStart\").attr(\"class\", \"marker lollipop \" + type).attr(\"refX\", 13).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"circle\").attr(\"stroke\", \"black\").attr(\"fill\", \"transparent\").attr(\"cx\", 7).attr(\"cy\", 7).attr(\"r\", 6);\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-lollipopEnd\").attr(\"class\", \"marker lollipop \" + type).attr(\"refX\", 1).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"circle\").attr(\"stroke\", \"black\").attr(\"fill\", \"transparent\").attr(\"cx\", 7).attr(\"cy\", 7).attr(\"r\", 6);\n};\nconst point = (elem, type, id) => {\n elem.append(\"marker\").attr(\"id\", id + \"_\" + type + \"-pointEnd\").attr(\"class\", \"marker \" + type).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 6).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 12).attr(\"markerHeight\", 12).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 0 0 L 10 5 L 0 10 z\").attr(\"class\", \"arrowMarkerPath\").style(\"stroke-width\", 1).style(\"stroke-dasharray\", \"1,0\");\n elem.append(\"marker\").attr(\"id\", id + \"_\" + type + \"-pointStart\").attr(\"class\", \"marker \" + type).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 4.5).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 12).attr(\"markerHeight\", 12).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 0 5 L 10 10 L 10 0 z\").attr(\"class\", \"arrowMarkerPath\").style(\"stroke-width\", 1).style(\"stroke-dasharray\", \"1,0\");\n};\nconst circle$1 = (elem, type, id) => {\n elem.append(\"marker\").attr(\"id\", id + \"_\" + type + \"-circleEnd\").attr(\"class\", \"marker \" + type).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 11).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 11).attr(\"markerHeight\", 11).attr(\"orient\", \"auto\").append(\"circle\").attr(\"cx\", \"5\").attr(\"cy\", \"5\").attr(\"r\", \"5\").attr(\"class\", \"arrowMarkerPath\").style(\"stroke-width\", 1).style(\"stroke-dasharray\", \"1,0\");\n elem.append(\"marker\").attr(\"id\", id + \"_\" + type + \"-circleStart\").attr(\"class\", \"marker \" + type).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", -1).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 11).attr(\"markerHeight\", 11).attr(\"orient\", \"auto\").append(\"circle\").attr(\"cx\", \"5\").attr(\"cy\", \"5\").attr(\"r\", \"5\").attr(\"class\", \"arrowMarkerPath\").style(\"stroke-width\", 1).style(\"stroke-dasharray\", \"1,0\");\n};\nconst cross = (elem, type, id) => {\n elem.append(\"marker\").attr(\"id\", id + \"_\" + type + \"-crossEnd\").attr(\"class\", \"marker cross \" + type).attr(\"viewBox\", \"0 0 11 11\").attr(\"refX\", 12).attr(\"refY\", 5.2).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 11).attr(\"markerHeight\", 11).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 1,1 l 9,9 M 10,1 l -9,9\").attr(\"class\", \"arrowMarkerPath\").style(\"stroke-width\", 2).style(\"stroke-dasharray\", \"1,0\");\n elem.append(\"marker\").attr(\"id\", id + \"_\" + type + \"-crossStart\").attr(\"class\", \"marker cross \" + type).attr(\"viewBox\", \"0 0 11 11\").attr(\"refX\", -1).attr(\"refY\", 5.2).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 11).attr(\"markerHeight\", 11).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 1,1 l 9,9 M 10,1 l -9,9\").attr(\"class\", \"arrowMarkerPath\").style(\"stroke-width\", 2).style(\"stroke-dasharray\", \"1,0\");\n};\nconst barb = (elem, type, id) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-barbEnd\").attr(\"refX\", 19).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 14).attr(\"markerUnits\", \"strokeWidth\").attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 19,7 L9,13 L14,7 L9,1 Z\");\n};\nconst markers = {\n extension,\n composition,\n aggregation,\n dependency,\n lollipop,\n point,\n circle: circle$1,\n cross,\n barb\n};\nconst insertMarkers$1 = insertMarkers;\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr(\"style\", styleFn);\n }\n}\nfunction addHtmlLabel(node) {\n const fo = select(document.createElementNS(\"http://www.w3.org/2000/svg\", \"foreignObject\"));\n const div = fo.append(\"xhtml:div\");\n const label = node.label;\n const labelClass = node.isNode ? \"nodeLabel\" : \"edgeLabel\";\n div.html(\n '\" + label + \"\"\n );\n applyStyle(div, node.labelStyle);\n div.style(\"display\", \"inline-block\");\n div.style(\"white-space\", \"nowrap\");\n div.attr(\"xmlns\", \"http://www.w3.org/1999/xhtml\");\n return fo.node();\n}\nconst createLabel = (_vertexText, style, isTitle, isNode) => {\n let vertexText = _vertexText || \"\";\n if (typeof vertexText === \"object\") {\n vertexText = vertexText[0];\n }\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n vertexText = vertexText.replace(/\\\\n|\\n/g, \"
\");\n log.debug(\"vertexText\" + vertexText);\n const node = {\n isNode,\n label: decodeEntities(vertexText).replace(\n /fa[blrs]?:fa-[\\w-]+/g,\n // cspell: disable-line\n (s) => ``\n ),\n labelStyle: style.replace(\"fill:\", \"color:\")\n };\n let vertexNode = addHtmlLabel(node);\n return vertexNode;\n } else {\n const svgLabel = document.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\n svgLabel.setAttribute(\"style\", style.replace(\"color:\", \"fill:\"));\n let rows = [];\n if (typeof vertexText === \"string\") {\n rows = vertexText.split(/\\\\n|\\n|/gi);\n } else if (Array.isArray(vertexText)) {\n rows = vertexText;\n } else {\n rows = [];\n }\n for (const row of rows) {\n const tspan = document.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\", \"0\");\n if (isTitle) {\n tspan.setAttribute(\"class\", \"title-row\");\n } else {\n tspan.setAttribute(\"class\", \"row\");\n }\n tspan.textContent = row.trim();\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n }\n};\nconst createLabel$1 = createLabel;\nconst labelHelper = async (parent, node, _classes, isNode) => {\n let classes;\n const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig().flowchart.htmlLabels);\n if (!_classes) {\n classes = \"node default\";\n } else {\n classes = _classes;\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", classes).attr(\"id\", node.domId || node.id);\n const label = shapeSvg.insert(\"g\").attr(\"class\", \"label\").attr(\"style\", node.labelStyle);\n let labelText;\n if (node.labelText === void 0) {\n labelText = \"\";\n } else {\n labelText = typeof node.labelText === \"string\" ? node.labelText : node.labelText[0];\n }\n const textNode = label.node();\n let text;\n if (node.labelType === \"markdown\") {\n text = createText(label, sanitizeText(decodeEntities(labelText), getConfig()), {\n useHtmlLabels,\n width: node.width || getConfig().flowchart.wrappingWidth,\n classes: \"markdown-node-label\"\n });\n } else {\n text = textNode.appendChild(\n createLabel$1(\n sanitizeText(decodeEntities(labelText), getConfig()),\n node.labelStyle,\n false,\n isNode\n )\n );\n }\n let bbox = text.getBBox();\n const halfPadding = node.padding / 2;\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n const images = div.getElementsByTagName(\"img\");\n if (images) {\n const noImgText = labelText.replace(/]*>/g, \"\").trim() === \"\";\n await Promise.all(\n [...images].map(\n (img) => new Promise((res) => {\n function setupImage() {\n img.style.display = \"flex\";\n img.style.flexDirection = \"column\";\n if (noImgText) {\n const bodyFontSize = getConfig().fontSize ? getConfig().fontSize : window.getComputedStyle(document.body).fontSize;\n const enlargingFactor = 5;\n const width = parseInt(bodyFontSize, 10) * enlargingFactor + \"px\";\n img.style.minWidth = width;\n img.style.maxWidth = width;\n } else {\n img.style.width = \"100%\";\n }\n res(img);\n }\n setTimeout(() => {\n if (img.complete) {\n setupImage();\n }\n });\n img.addEventListener(\"error\", setupImage);\n img.addEventListener(\"load\", setupImage);\n })\n )\n );\n }\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n if (useHtmlLabels) {\n label.attr(\"transform\", \"translate(\" + -bbox.width / 2 + \", \" + -bbox.height / 2 + \")\");\n } else {\n label.attr(\"transform\", \"translate(0, \" + -bbox.height / 2 + \")\");\n }\n if (node.centerLabel) {\n label.attr(\"transform\", \"translate(\" + -bbox.width / 2 + \", \" + -bbox.height / 2 + \")\");\n }\n label.insert(\"rect\", \":first-child\");\n return { shapeSvg, bbox, halfPadding, label };\n};\nconst updateNodeBounds = (node, element) => {\n const bbox = element.node().getBBox();\n node.width = bbox.width;\n node.height = bbox.height;\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(\"class\", \"label-container\").attr(\"transform\", \"translate(\" + -w / 2 + \",\" + h / 2 + \")\");\n}\nfunction intersectNode(node, point2) {\n return node.intersect(point2);\n}\nfunction intersectEllipse(node, rx, ry, point2) {\n var cx = node.x;\n var cy = node.y;\n var px = cx - point2.x;\n var py = cy - point2.y;\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n var dx = Math.abs(rx * ry * px / det);\n if (point2.x < cx) {\n dx = -dx;\n }\n var dy = Math.abs(rx * ry * py / det);\n if (point2.y < cy) {\n dy = -dy;\n }\n return { x: cx + dx, y: cy + dy };\n}\nfunction intersectCircle(node, rx, point2) {\n return intersectEllipse(node, rx, rx, point2);\n}\nfunction intersectLine(p1, p2, q1, q2) {\n var a1, a2, b1, b2, c1, c2;\n var r1, r2, r3, r4;\n var denom, offset, num;\n var x, y;\n a1 = p2.y - p1.y;\n b1 = p1.x - p2.x;\n c1 = p2.x * p1.y - p1.x * p2.y;\n r3 = a1 * q1.x + b1 * q1.y + c1;\n r4 = a1 * q2.x + b1 * q2.y + c1;\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return;\n }\n a2 = q2.y - q1.y;\n b2 = q1.x - q2.x;\n c2 = q2.x * q1.y - q1.x * q2.y;\n r1 = a2 * p1.x + b2 * p1.y + c2;\n r2 = a2 * p2.x + b2 * p2.y + c2;\n if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n return;\n }\n denom = a1 * b2 - a2 * b1;\n if (denom === 0) {\n return;\n }\n offset = Math.abs(denom / 2);\n num = b1 * c2 - b2 * c1;\n x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n num = a2 * c1 - a1 * c2;\n y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n return { x, y };\n}\nfunction sameSign(r1, r2) {\n return r1 * r2 > 0;\n}\nfunction intersectPolygon(node, polyPoints, point2) {\n var x1 = node.x;\n var y1 = node.y;\n var intersections = [];\n var minX = Number.POSITIVE_INFINITY;\n var minY = Number.POSITIVE_INFINITY;\n if (typeof polyPoints.forEach === \"function\") {\n polyPoints.forEach(function(entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n } else {\n minX = Math.min(minX, polyPoints.x);\n minY = Math.min(minY, polyPoints.y);\n }\n var left = x1 - node.width / 2 - minX;\n var top = y1 - node.height / 2 - minY;\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 intersect2 = intersectLine(\n node,\n point2,\n { x: left + p1.x, y: top + p1.y },\n { x: left + p2.x, y: top + p2.y }\n );\n if (intersect2) {\n intersections.push(intersect2);\n }\n }\n if (!intersections.length) {\n return node;\n }\n if (intersections.length > 1) {\n intersections.sort(function(p, q) {\n var pdx = p.x - point2.x;\n var pdy = p.y - point2.y;\n var distp = Math.sqrt(pdx * pdx + pdy * pdy);\n var qdx = q.x - point2.x;\n var qdy = q.y - point2.y;\n var distq = Math.sqrt(qdx * qdx + qdy * qdy);\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n return intersections[0];\n}\nconst intersectRect = (node, point2) => {\n var x = node.x;\n var y = node.y;\n var dx = point2.x - x;\n var dy = point2.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n if (dy < 0) {\n h = -h;\n }\n sx = dy === 0 ? 0 : h * dx / dy;\n sy = h;\n } else {\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = dx === 0 ? 0 : w * dy / dx;\n }\n return { x: x + sx, y: y + sy };\n};\nconst intersectRect$1 = intersectRect;\nconst intersect = {\n node: intersectNode,\n circle: intersectCircle,\n ellipse: intersectEllipse,\n polygon: intersectPolygon,\n rect: intersectRect$1\n};\nconst note = async (parent, node) => {\n const useHtmlLabels = node.useHtmlLabels || getConfig().flowchart.htmlLabels;\n if (!useHtmlLabels) {\n node.centerLabel = true;\n }\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n \"node \" + node.classes,\n true\n );\n log.info(\"Classes = \", node.classes);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n rect2.attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"x\", -bbox.width / 2 - halfPadding).attr(\"y\", -bbox.height / 2 - halfPadding).attr(\"width\", bbox.width + node.padding).attr(\"height\", bbox.height + node.padding);\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nconst note$1 = note;\nconst expandAndDeduplicateDirections = (directions) => {\n const uniqueDirections = /* @__PURE__ */ new Set();\n for (const direction of directions) {\n switch (direction) {\n case \"x\":\n uniqueDirections.add(\"right\");\n uniqueDirections.add(\"left\");\n break;\n case \"y\":\n uniqueDirections.add(\"up\");\n uniqueDirections.add(\"down\");\n break;\n default:\n uniqueDirections.add(direction);\n break;\n }\n }\n return uniqueDirections;\n};\nconst getArrowPoints = (duplicatedDirections, bbox, node) => {\n const directions = expandAndDeduplicateDirections(duplicatedDirections);\n const f = 2;\n const height = bbox.height + 2 * node.padding;\n const midpoint = height / f;\n const width = bbox.width + 2 * midpoint + node.padding;\n const padding = node.padding / 2;\n if (directions.has(\"right\") && directions.has(\"left\") && directions.has(\"up\") && directions.has(\"down\")) {\n return [\n // Bottom\n { x: 0, y: 0 },\n { x: midpoint, y: 0 },\n { x: width / 2, y: 2 * padding },\n { x: width - midpoint, y: 0 },\n { x: width, y: 0 },\n // Right\n { x: width, y: -height / 3 },\n { x: width + 2 * padding, y: -height / 2 },\n { x: width, y: -2 * height / 3 },\n { x: width, y: -height },\n // Top\n { x: width - midpoint, y: -height },\n { x: width / 2, y: -height - 2 * padding },\n { x: midpoint, y: -height },\n // Left\n { x: 0, y: -height },\n { x: 0, y: -2 * height / 3 },\n { x: -2 * padding, y: -height / 2 },\n { x: 0, y: -height / 3 }\n ];\n }\n if (directions.has(\"right\") && directions.has(\"left\") && directions.has(\"up\")) {\n return [\n { x: midpoint, y: 0 },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 }\n ];\n }\n if (directions.has(\"right\") && directions.has(\"left\") && directions.has(\"down\")) {\n return [\n { x: 0, y: 0 },\n { x: midpoint, y: -height },\n { x: width - midpoint, y: -height },\n { x: width, y: 0 }\n ];\n }\n if (directions.has(\"right\") && directions.has(\"up\") && directions.has(\"down\")) {\n return [\n { x: 0, y: 0 },\n { x: width, y: -midpoint },\n { x: width, y: -height + midpoint },\n { x: 0, y: -height }\n ];\n }\n if (directions.has(\"left\") && directions.has(\"up\") && directions.has(\"down\")) {\n return [\n { x: width, y: 0 },\n { x: 0, y: -midpoint },\n { x: 0, y: -height + midpoint },\n { x: width, y: -height }\n ];\n }\n if (directions.has(\"right\") && directions.has(\"left\")) {\n return [\n { x: midpoint, y: 0 },\n { x: midpoint, y: -padding },\n { x: width - midpoint, y: -padding },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: width - midpoint, y: -height + padding },\n { x: midpoint, y: -height + padding },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 }\n ];\n }\n if (directions.has(\"up\") && directions.has(\"down\")) {\n return [\n // Bottom center\n { x: width / 2, y: 0 },\n // Left pont of bottom arrow\n { x: 0, y: -padding },\n { x: midpoint, y: -padding },\n // Left top over vertical section\n { x: midpoint, y: -height + padding },\n { x: 0, y: -height + padding },\n // Top of arrow\n { x: width / 2, y: -height },\n { x: width, y: -height + padding },\n // Top of right vertical bar\n { x: width - midpoint, y: -height + padding },\n { x: width - midpoint, y: -padding },\n { x: width, y: -padding }\n ];\n }\n if (directions.has(\"right\") && directions.has(\"up\")) {\n return [\n { x: 0, y: 0 },\n { x: width, y: -midpoint },\n { x: 0, y: -height }\n ];\n }\n if (directions.has(\"right\") && directions.has(\"down\")) {\n return [\n { x: 0, y: 0 },\n { x: width, y: 0 },\n { x: 0, y: -height }\n ];\n }\n if (directions.has(\"left\") && directions.has(\"up\")) {\n return [\n { x: width, y: 0 },\n { x: 0, y: -midpoint },\n { x: width, y: -height }\n ];\n }\n if (directions.has(\"left\") && directions.has(\"down\")) {\n return [\n { x: width, y: 0 },\n { x: 0, y: 0 },\n { x: width, y: -height }\n ];\n }\n if (directions.has(\"right\")) {\n return [\n { x: midpoint, y: -padding },\n { x: midpoint, y: -padding },\n { x: width - midpoint, y: -padding },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: width - midpoint, y: -height + padding },\n // top left corner of arrow\n { x: midpoint, y: -height + padding },\n { x: midpoint, y: -height + padding }\n ];\n }\n if (directions.has(\"left\")) {\n return [\n { x: midpoint, y: 0 },\n { x: midpoint, y: -padding },\n // Two points, the right corners\n { x: width - midpoint, y: -padding },\n { x: width - midpoint, y: -height + padding },\n { x: midpoint, y: -height + padding },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 }\n ];\n }\n if (directions.has(\"up\")) {\n return [\n // Bottom center\n { x: midpoint, y: -padding },\n // Left top over vertical section\n { x: midpoint, y: -height + padding },\n { x: 0, y: -height + padding },\n // Top of arrow\n { x: width / 2, y: -height },\n { x: width, y: -height + padding },\n // Top of right vertical bar\n { x: width - midpoint, y: -height + padding },\n { x: width - midpoint, y: -padding }\n ];\n }\n if (directions.has(\"down\")) {\n return [\n // Bottom center\n { x: width / 2, y: 0 },\n // Left pont of bottom arrow\n { x: 0, y: -padding },\n { x: midpoint, y: -padding },\n // Left top over vertical section\n { x: midpoint, y: -height + padding },\n { x: width - midpoint, y: -height + padding },\n { x: width - midpoint, y: -padding },\n { x: width, y: -padding }\n ];\n }\n return [{ x: 0, y: 0 }];\n};\nconst formatClass = (str) => {\n if (str) {\n return \" \" + str;\n }\n return \"\";\n};\nconst getClassesFromNode = (node, otherClasses) => {\n return `${otherClasses ? otherClasses : \"node default\"}${formatClass(node.classes)} ${formatClass(\n node.class\n )}`;\n};\nconst question = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const s = w + h;\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 log.info(\"Question main (Circle)\");\n const questionElem = insertPolygonShape(shapeSvg, s, s, points);\n questionElem.attr(\"style\", node.style);\n updateNodeBounds(node, questionElem);\n node.intersect = function(point2) {\n log.warn(\"Intersect called\");\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst choice = (parent, node) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId || node.id);\n const s = 28;\n const points = [\n { x: 0, y: s / 2 },\n { x: s / 2, y: 0 },\n { x: 0, y: -s / 2 },\n { x: -s / 2, y: 0 }\n ];\n const choice2 = shapeSvg.insert(\"polygon\", \":first-child\").attr(\n \"points\",\n points.map(function(d) {\n return d.x + \",\" + d.y;\n }).join(\" \")\n );\n choice2.attr(\"class\", \"state-start\").attr(\"r\", 7).attr(\"width\", 28).attr(\"height\", 28);\n node.width = 28;\n node.height = 28;\n node.intersect = function(point2) {\n return intersect.circle(node, 14, point2);\n };\n return shapeSvg;\n};\nconst hexagon = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const f = 4;\n const h = bbox.height + node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\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 hex = insertPolygonShape(shapeSvg, w, h, points);\n hex.attr(\"style\", node.style);\n updateNodeBounds(node, hex);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst block_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true);\n const f = 2;\n const h = bbox.height + 2 * node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\n const points = getArrowPoints(node.directions, bbox, node);\n const blockArrow = insertPolygonShape(shapeSvg, w, h, points);\n blockArrow.attr(\"style\", node.style);\n updateNodeBounds(node, blockArrow);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst rect_left_inv_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\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 el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n node.width = w + h;\n node.height = h;\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst lean_right = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true);\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\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 el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst lean_left = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\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 el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst trapezoid = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\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 el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst inv_trapezoid = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\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 el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst rect_right_inv_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\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 el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst cylinder = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = bbox.height + ry + node.padding;\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 el = shapeSvg.attr(\"label-offset-y\", ry).insert(\"path\", \":first-child\").attr(\"style\", node.style).attr(\"d\", shape).attr(\"transform\", \"translate(\" + -w / 2 + \",\" + -(h / 2 + ry) + \")\");\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n const pos = intersect.rect(node, point2);\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 (point2.y - node.y > 0) {\n y = -y;\n }\n pos.y += y;\n }\n return pos;\n };\n return shapeSvg;\n};\nconst rect = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n \"node \" + node.classes + \" \" + node.class,\n true\n );\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const totalWidth = node.positioned ? node.width : bbox.width + node.padding;\n const totalHeight = node.positioned ? node.height : bbox.height + node.padding;\n const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;\n const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;\n rect2.attr(\"class\", \"basic label-container\").attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"x\", x).attr(\"y\", y).attr(\"width\", totalWidth).attr(\"height\", totalHeight);\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);\n propKeys.delete(\"borders\");\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nconst composite = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n \"node \" + node.classes,\n true\n );\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const totalWidth = node.positioned ? node.width : bbox.width + node.padding;\n const totalHeight = node.positioned ? node.height : bbox.height + node.padding;\n const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;\n const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;\n rect2.attr(\"class\", \"basic cluster composite label-container\").attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"x\", x).attr(\"y\", y).attr(\"width\", totalWidth).attr(\"height\", totalHeight);\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);\n propKeys.delete(\"borders\");\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nconst labelRect = async (parent, node) => {\n const { shapeSvg } = await labelHelper(parent, node, \"label\", true);\n log.trace(\"Classes = \", node.class);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const totalWidth = 0;\n const totalHeight = 0;\n rect2.attr(\"width\", totalWidth).attr(\"height\", totalHeight);\n shapeSvg.attr(\"class\", \"label edgeLabel\");\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);\n propKeys.delete(\"borders\");\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nfunction applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) {\n const strokeDashArray = [];\n const addBorder = (length) => {\n strokeDashArray.push(length, 0);\n };\n const skipBorder = (length) => {\n strokeDashArray.push(0, length);\n };\n if (borders.includes(\"t\")) {\n log.debug(\"add top border\");\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes(\"r\")) {\n log.debug(\"add right border\");\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n if (borders.includes(\"b\")) {\n log.debug(\"add bottom border\");\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes(\"l\")) {\n log.debug(\"add left border\");\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n rect2.attr(\"stroke-dasharray\", strokeDashArray.join(\" \"));\n}\nconst rectWithTitle = (parent, node) => {\n let classes;\n if (!node.classes) {\n classes = \"node default\";\n } else {\n classes = \"node \" + node.classes;\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", classes).attr(\"id\", node.domId || node.id);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const innerLine = shapeSvg.insert(\"line\");\n const label = shapeSvg.insert(\"g\").attr(\"class\", \"label\");\n const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText;\n let title = \"\";\n if (typeof text2 === \"object\") {\n title = text2[0];\n } else {\n title = text2;\n }\n log.info(\"Label text abc79\", title, text2, typeof text2 === \"object\");\n const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true));\n let bbox = { width: 0, height: 0 };\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n log.info(\"Text 2\", text2);\n const textRows = text2.slice(1, text2.length);\n let titleBox = text.getBBox();\n const descr = label.node().appendChild(\n createLabel$1(textRows.join ? textRows.join(\"
\") : textRows, node.labelStyle, true, true)\n );\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = descr.children[0];\n const dv = select(descr);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n const halfPadding = node.padding / 2;\n select(descr).attr(\n \"transform\",\n \"translate( \" + // (titleBox.width - bbox.width) / 2 +\n (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + \", \" + (titleBox.height + halfPadding + 5) + \")\"\n );\n select(text).attr(\n \"transform\",\n \"translate( \" + // (titleBox.width - bbox.width) / 2 +\n (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + \", 0)\"\n );\n bbox = label.node().getBBox();\n label.attr(\n \"transform\",\n \"translate(\" + -bbox.width / 2 + \", \" + (-bbox.height / 2 - halfPadding + 3) + \")\"\n );\n rect2.attr(\"class\", \"outer title-state\").attr(\"x\", -bbox.width / 2 - halfPadding).attr(\"y\", -bbox.height / 2 - halfPadding).attr(\"width\", bbox.width + node.padding).attr(\"height\", bbox.height + node.padding);\n innerLine.attr(\"class\", \"divider\").attr(\"x1\", -bbox.width / 2 - halfPadding).attr(\"x2\", bbox.width / 2 + halfPadding).attr(\"y1\", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr(\"y2\", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nconst stadium = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const h = bbox.height + node.padding;\n const w = bbox.width + h / 4 + node.padding;\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\").attr(\"style\", node.style).attr(\"rx\", h / 2).attr(\"ry\", h / 2).attr(\"x\", -w / 2).attr(\"y\", -h / 2).attr(\"width\", w).attr(\"height\", h);\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nconst circle = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const circle2 = shapeSvg.insert(\"circle\", \":first-child\");\n circle2.attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"r\", bbox.width / 2 + halfPadding).attr(\"width\", bbox.width + node.padding).attr(\"height\", bbox.height + node.padding);\n log.info(\"Circle main\");\n updateNodeBounds(node, circle2);\n node.intersect = function(point2) {\n log.info(\"Circle intersect\", node, bbox.width / 2 + halfPadding, point2);\n return intersect.circle(node, bbox.width / 2 + halfPadding, point2);\n };\n return shapeSvg;\n};\nconst doublecircle = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const gap = 5;\n const circleGroup = shapeSvg.insert(\"g\", \":first-child\");\n const outerCircle = circleGroup.insert(\"circle\");\n const innerCircle = circleGroup.insert(\"circle\");\n circleGroup.attr(\"class\", node.class);\n outerCircle.attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"r\", bbox.width / 2 + halfPadding + gap).attr(\"width\", bbox.width + node.padding + gap * 2).attr(\"height\", bbox.height + node.padding + gap * 2);\n innerCircle.attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"r\", bbox.width / 2 + halfPadding).attr(\"width\", bbox.width + node.padding).attr(\"height\", bbox.height + node.padding);\n log.info(\"DoubleCircle main\");\n updateNodeBounds(node, outerCircle);\n node.intersect = function(point2) {\n log.info(\"DoubleCircle intersect\", node, bbox.width / 2 + halfPadding + gap, point2);\n return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2);\n };\n return shapeSvg;\n};\nconst subroutine = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\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 el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst start = (parent, node) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId || node.id);\n const circle2 = shapeSvg.insert(\"circle\", \":first-child\");\n circle2.attr(\"class\", \"state-start\").attr(\"r\", 7).attr(\"width\", 14).attr(\"height\", 14);\n updateNodeBounds(node, circle2);\n node.intersect = function(point2) {\n return intersect.circle(node, 7, point2);\n };\n return shapeSvg;\n};\nconst forkJoin = (parent, node, dir) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId || node.id);\n let width = 70;\n let height = 10;\n if (dir === \"LR\") {\n width = 10;\n height = 70;\n }\n const shape = shapeSvg.append(\"rect\").attr(\"x\", -1 * width / 2).attr(\"y\", -1 * height / 2).attr(\"width\", width).attr(\"height\", height).attr(\"class\", \"fork-join\");\n updateNodeBounds(node, shape);\n node.height = node.height + node.padding / 2;\n node.width = node.width + node.padding / 2;\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nconst end = (parent, node) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId || node.id);\n const innerCircle = shapeSvg.insert(\"circle\", \":first-child\");\n const circle2 = shapeSvg.insert(\"circle\", \":first-child\");\n circle2.attr(\"class\", \"state-start\").attr(\"r\", 7).attr(\"width\", 14).attr(\"height\", 14);\n innerCircle.attr(\"class\", \"state-end\").attr(\"r\", 5).attr(\"width\", 10).attr(\"height\", 10);\n updateNodeBounds(node, circle2);\n node.intersect = function(point2) {\n return intersect.circle(node, 7, point2);\n };\n return shapeSvg;\n};\nconst class_box = (parent, node) => {\n const halfPadding = node.padding / 2;\n const rowPadding = 4;\n const lineHeight = 8;\n let classes;\n if (!node.classes) {\n classes = \"node default\";\n } else {\n classes = \"node \" + node.classes;\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", classes).attr(\"id\", node.domId || node.id);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const topLine = shapeSvg.insert(\"line\");\n const bottomLine = shapeSvg.insert(\"line\");\n let maxWidth = 0;\n let maxHeight = rowPadding;\n const labelContainer = shapeSvg.insert(\"g\").attr(\"class\", \"label\");\n let verticalPos = 0;\n const hasInterface = node.classData.annotations && node.classData.annotations[0];\n const interfaceLabelText = node.classData.annotations[0] ? \"«\" + node.classData.annotations[0] + \"»\" : \"\";\n const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true));\n let interfaceBBox = interfaceLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = interfaceLabel.children[0];\n const dv = select(interfaceLabel);\n interfaceBBox = div.getBoundingClientRect();\n dv.attr(\"width\", interfaceBBox.width);\n dv.attr(\"height\", interfaceBBox.height);\n }\n if (node.classData.annotations[0]) {\n maxHeight += interfaceBBox.height + rowPadding;\n maxWidth += interfaceBBox.width;\n }\n let classTitleString = node.classData.label;\n if (node.classData.type !== void 0 && node.classData.type !== \"\") {\n if (getConfig().flowchart.htmlLabels) {\n classTitleString += \"<\" + node.classData.type + \">\";\n } else {\n classTitleString += \"<\" + node.classData.type + \">\";\n }\n }\n const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true));\n select(classTitleLabel).attr(\"class\", \"classTitle\");\n let classTitleBBox = classTitleLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = classTitleLabel.children[0];\n const dv = select(classTitleLabel);\n classTitleBBox = div.getBoundingClientRect();\n dv.attr(\"width\", classTitleBBox.width);\n dv.attr(\"height\", classTitleBBox.height);\n }\n maxHeight += classTitleBBox.height + rowPadding;\n if (classTitleBBox.width > maxWidth) {\n maxWidth = classTitleBBox.width;\n }\n const classAttributes = [];\n node.classData.members.forEach((member) => {\n const parsedInfo = member.getDisplayDetails();\n let parsedText = parsedInfo.displayText;\n if (getConfig().flowchart.htmlLabels) {\n parsedText = parsedText.replace(//g, \">\");\n }\n const lbl = labelContainer.node().appendChild(\n createLabel$1(\n parsedText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n )\n );\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n classAttributes.push(lbl);\n });\n maxHeight += lineHeight;\n const classMethods = [];\n node.classData.methods.forEach((member) => {\n const parsedInfo = member.getDisplayDetails();\n let displayText = parsedInfo.displayText;\n if (getConfig().flowchart.htmlLabels) {\n displayText = displayText.replace(//g, \">\");\n }\n const lbl = labelContainer.node().appendChild(\n createLabel$1(\n displayText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n )\n );\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n classMethods.push(lbl);\n });\n maxHeight += lineHeight;\n if (hasInterface) {\n let diffX2 = (maxWidth - interfaceBBox.width) / 2;\n select(interfaceLabel).attr(\n \"transform\",\n \"translate( \" + (-1 * maxWidth / 2 + diffX2) + \", \" + -1 * maxHeight / 2 + \")\"\n );\n verticalPos = interfaceBBox.height + rowPadding;\n }\n let diffX = (maxWidth - classTitleBBox.width) / 2;\n select(classTitleLabel).attr(\n \"transform\",\n \"translate( \" + (-1 * maxWidth / 2 + diffX) + \", \" + (-1 * maxHeight / 2 + verticalPos) + \")\"\n );\n verticalPos += classTitleBBox.height + rowPadding;\n topLine.attr(\"class\", \"divider\").attr(\"x1\", -maxWidth / 2 - halfPadding).attr(\"x2\", maxWidth / 2 + halfPadding).attr(\"y1\", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr(\"y2\", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n verticalPos += lineHeight;\n classAttributes.forEach((lbl) => {\n select(lbl).attr(\n \"transform\",\n \"translate( \" + -maxWidth / 2 + \", \" + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + \")\"\n );\n const memberBBox = lbl == null ? void 0 : lbl.getBBox();\n verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding;\n });\n verticalPos += lineHeight;\n bottomLine.attr(\"class\", \"divider\").attr(\"x1\", -maxWidth / 2 - halfPadding).attr(\"x2\", maxWidth / 2 + halfPadding).attr(\"y1\", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr(\"y2\", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n verticalPos += lineHeight;\n classMethods.forEach((lbl) => {\n select(lbl).attr(\n \"transform\",\n \"translate( \" + -maxWidth / 2 + \", \" + (-1 * maxHeight / 2 + verticalPos) + \")\"\n );\n const memberBBox = lbl == null ? void 0 : lbl.getBBox();\n verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding;\n });\n rect2.attr(\"style\", node.style).attr(\"class\", \"outer title-state\").attr(\"x\", -maxWidth / 2 - halfPadding).attr(\"y\", -(maxHeight / 2) - halfPadding).attr(\"width\", maxWidth + node.padding).attr(\"height\", maxHeight + node.padding);\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nconst shapes = {\n rhombus: question,\n composite,\n question,\n rect,\n labelRect,\n rectWithTitle,\n choice,\n circle,\n doublecircle,\n stadium,\n hexagon,\n block_arrow,\n rect_left_inv_arrow,\n lean_right,\n lean_left,\n trapezoid,\n inv_trapezoid,\n rect_right_inv_arrow,\n cylinder,\n start,\n end,\n note: note$1,\n subroutine,\n fork: forkJoin,\n join: forkJoin,\n class_box\n};\nlet nodeElems = {};\nconst insertNode = async (elem, node, dir) => {\n let newEl;\n let el;\n if (node.link) {\n let target;\n if (getConfig().securityLevel === \"sandbox\") {\n target = \"_top\";\n } else if (node.linkTarget) {\n target = node.linkTarget || \"_blank\";\n }\n newEl = elem.insert(\"svg:a\").attr(\"xlink:href\", node.link).attr(\"target\", target);\n el = await shapes[node.shape](newEl, node, dir);\n } else {\n el = await shapes[node.shape](elem, node, dir);\n newEl = el;\n }\n if (node.tooltip) {\n el.attr(\"title\", node.tooltip);\n }\n if (node.class) {\n el.attr(\"class\", \"node default \" + node.class);\n }\n newEl.attr(\"data-node\", \"true\");\n newEl.attr(\"data-id\", node.id);\n nodeElems[node.id] = newEl;\n if (node.haveCallback) {\n nodeElems[node.id].attr(\"class\", nodeElems[node.id].attr(\"class\") + \" clickable\");\n }\n return newEl;\n};\nconst setNodeElem = (elem, node) => {\n nodeElems[node.id] = elem;\n};\nconst clear$1 = () => {\n nodeElems = {};\n};\nconst positionNode = (node) => {\n const el = nodeElems[node.id];\n log.trace(\n \"Transforming node\",\n node.diff,\n node,\n \"translate(\" + (node.x - node.width / 2 - 5) + \", \" + node.width / 2 + \")\"\n );\n const padding = 8;\n const diff = node.diff || 0;\n if (node.clusterNode) {\n el.attr(\n \"transform\",\n \"translate(\" + (node.x + diff - node.width / 2) + \", \" + (node.y - node.height / 2 - padding) + \")\"\n );\n } else {\n el.attr(\"transform\", \"translate(\" + node.x + \", \" + node.y + \")\");\n }\n return diff;\n};\nconst getSubGraphTitleMargins = ({\n flowchart\n}) => {\n var _a, _b;\n const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0;\n const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0;\n const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin;\n return {\n subGraphTitleTopMargin,\n subGraphTitleBottomMargin,\n subGraphTitleTotalMargin\n };\n};\nconst markerOffsets = {\n aggregation: 18,\n extension: 18,\n composition: 18,\n dependency: 6,\n lollipop: 13.5,\n arrow_point: 5.3\n};\nfunction calculateDeltaAndAngle(point1, point2) {\n if (point1 === void 0 || point2 === void 0) {\n return { angle: 0, deltaX: 0, deltaY: 0 };\n }\n point1 = pointTransformer(point1);\n point2 = pointTransformer(point2);\n const [x1, y1] = [point1.x, point1.y];\n const [x2, y2] = [point2.x, point2.y];\n const deltaX = x2 - x1;\n const deltaY = y2 - y1;\n return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY };\n}\nconst pointTransformer = (data) => {\n if (Array.isArray(data)) {\n return { x: data[0], y: data[1] };\n }\n return data;\n};\nconst getLineFunctionsWithOffset = (edge) => {\n return {\n x: function(d, i, data) {\n let offset = 0;\n if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) {\n const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]);\n offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1);\n } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) {\n const { angle, deltaX } = calculateDeltaAndAngle(\n data[data.length - 1],\n data[data.length - 2]\n );\n offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1);\n }\n return pointTransformer(d).x + offset;\n },\n y: function(d, i, data) {\n let offset = 0;\n if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) {\n const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]);\n offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1);\n } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) {\n const { angle, deltaY } = calculateDeltaAndAngle(\n data[data.length - 1],\n data[data.length - 2]\n );\n offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1);\n }\n return pointTransformer(d).y + offset;\n }\n };\n};\nconst addEdgeMarkers = (svgPath, edge, url, id, diagramType) => {\n if (edge.arrowTypeStart) {\n addEdgeMarker(svgPath, \"start\", edge.arrowTypeStart, url, id, diagramType);\n }\n if (edge.arrowTypeEnd) {\n addEdgeMarker(svgPath, \"end\", edge.arrowTypeEnd, url, id, diagramType);\n }\n};\nconst arrowTypesMap = {\n arrow_cross: \"cross\",\n arrow_point: \"point\",\n arrow_barb: \"barb\",\n arrow_circle: \"circle\",\n aggregation: \"aggregation\",\n extension: \"extension\",\n composition: \"composition\",\n dependency: \"dependency\",\n lollipop: \"lollipop\"\n};\nconst addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => {\n const endMarkerType = arrowTypesMap[arrowType];\n if (!endMarkerType) {\n log.warn(`Unknown arrow type: ${arrowType}`);\n return;\n }\n const suffix = position === \"start\" ? \"Start\" : \"End\";\n svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`);\n};\nlet edgeLabels = {};\nlet terminalLabels = {};\nconst clear = () => {\n edgeLabels = {};\n terminalLabels = {};\n};\nconst insertEdgeLabel = (elem, edge) => {\n const useHtmlLabels = evaluate(getConfig().flowchart.htmlLabels);\n const labelElement = edge.labelType === \"markdown\" ? createText(elem, edge.label, {\n style: edge.labelStyle,\n useHtmlLabels,\n addSvgBackground: true\n }) : createLabel$1(edge.label, edge.labelStyle);\n const edgeLabel = elem.insert(\"g\").attr(\"class\", \"edgeLabel\");\n const label = edgeLabel.insert(\"g\").attr(\"class\", \"label\");\n label.node().appendChild(labelElement);\n let bbox = labelElement.getBBox();\n if (useHtmlLabels) {\n const div = labelElement.children[0];\n const dv = select(labelElement);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n label.attr(\"transform\", \"translate(\" + -bbox.width / 2 + \", \" + -bbox.height / 2 + \")\");\n edgeLabels[edge.id] = edgeLabel;\n edge.width = bbox.width;\n edge.height = bbox.height;\n let fo;\n if (edge.startLabelLeft) {\n const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle);\n const startEdgeLabelLeft = elem.insert(\"g\").attr(\"class\", \"edgeTerminals\");\n const inner = startEdgeLabelLeft.insert(\"g\").attr(\"class\", \"inner\");\n fo = inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr(\"transform\", \"translate(\" + -slBox.width / 2 + \", \" + -slBox.height / 2 + \")\");\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startLeft = startEdgeLabelLeft;\n setTerminalWidth(fo, edge.startLabelLeft);\n }\n if (edge.startLabelRight) {\n const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle);\n const startEdgeLabelRight = elem.insert(\"g\").attr(\"class\", \"edgeTerminals\");\n const inner = startEdgeLabelRight.insert(\"g\").attr(\"class\", \"inner\");\n fo = startEdgeLabelRight.node().appendChild(startLabelElement);\n inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr(\"transform\", \"translate(\" + -slBox.width / 2 + \", \" + -slBox.height / 2 + \")\");\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startRight = startEdgeLabelRight;\n setTerminalWidth(fo, edge.startLabelRight);\n }\n if (edge.endLabelLeft) {\n const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle);\n const endEdgeLabelLeft = elem.insert(\"g\").attr(\"class\", \"edgeTerminals\");\n const inner = endEdgeLabelLeft.insert(\"g\").attr(\"class\", \"inner\");\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr(\"transform\", \"translate(\" + -slBox.width / 2 + \", \" + -slBox.height / 2 + \")\");\n endEdgeLabelLeft.node().appendChild(endLabelElement);\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endLeft = endEdgeLabelLeft;\n setTerminalWidth(fo, edge.endLabelLeft);\n }\n if (edge.endLabelRight) {\n const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle);\n const endEdgeLabelRight = elem.insert(\"g\").attr(\"class\", \"edgeTerminals\");\n const inner = endEdgeLabelRight.insert(\"g\").attr(\"class\", \"inner\");\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr(\"transform\", \"translate(\" + -slBox.width / 2 + \", \" + -slBox.height / 2 + \")\");\n endEdgeLabelRight.node().appendChild(endLabelElement);\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endRight = endEdgeLabelRight;\n setTerminalWidth(fo, edge.endLabelRight);\n }\n return labelElement;\n};\nfunction setTerminalWidth(fo, value) {\n if (getConfig().flowchart.htmlLabels && fo) {\n fo.style.width = value.length * 9 + \"px\";\n fo.style.height = \"12px\";\n }\n}\nconst positionEdgeLabel = (edge, paths) => {\n log.debug(\"Moving label abc88 \", edge.id, edge.label, edgeLabels[edge.id], paths);\n let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n const siteConfig = getConfig();\n const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n if (edge.label) {\n const el = edgeLabels[edge.id];\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcLabelPosition(path);\n log.debug(\n \"Moving label \" + edge.label + \" from (\",\n x,\n \",\",\n y,\n \") to (\",\n pos.x,\n \",\",\n pos.y,\n \") abc88\"\n );\n if (paths.updatedPath) {\n x = pos.x;\n y = pos.y;\n }\n }\n el.attr(\"transform\", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`);\n }\n if (edge.startLabelLeft) {\n const el = terminalLabels[edge.id].startLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, \"start_left\", path);\n x = pos.x;\n y = pos.y;\n }\n el.attr(\"transform\", `translate(${x}, ${y})`);\n }\n if (edge.startLabelRight) {\n const el = terminalLabels[edge.id].startRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(\n edge.arrowTypeStart ? 10 : 0,\n \"start_right\",\n path\n );\n x = pos.x;\n y = pos.y;\n }\n el.attr(\"transform\", `translate(${x}, ${y})`);\n }\n if (edge.endLabelLeft) {\n const el = terminalLabels[edge.id].endLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, \"end_left\", path);\n x = pos.x;\n y = pos.y;\n }\n el.attr(\"transform\", `translate(${x}, ${y})`);\n }\n if (edge.endLabelRight) {\n const el = terminalLabels[edge.id].endRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, \"end_right\", path);\n x = pos.x;\n y = pos.y;\n }\n el.attr(\"transform\", `translate(${x}, ${y})`);\n }\n};\nconst outsideNode = (node, point2) => {\n const x = node.x;\n const y = node.y;\n const dx = Math.abs(point2.x - x);\n const dy = Math.abs(point2.y - y);\n const w = node.width / 2;\n const h = node.height / 2;\n if (dx >= w || dy >= h) {\n return true;\n }\n return false;\n};\nconst intersection = (node, outsidePoint, insidePoint) => {\n log.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(outsidePoint)}\n insidePoint : ${JSON.stringify(insidePoint)}\n node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);\n const x = node.x;\n const y = node.y;\n const dx = Math.abs(x - insidePoint.x);\n const w = node.width / 2;\n let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;\n const h = node.height / 2;\n const Q = Math.abs(outsidePoint.y - insidePoint.y);\n const R = Math.abs(outsidePoint.x - insidePoint.x);\n if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {\n let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n r = R * q / Q;\n const res = {\n x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,\n y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q\n };\n if (r === 0) {\n res.x = outsidePoint.x;\n res.y = outsidePoint.y;\n }\n if (R === 0) {\n res.x = outsidePoint.x;\n }\n if (Q === 0) {\n res.y = outsidePoint.y;\n }\n log.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);\n return res;\n } else {\n if (insidePoint.x < outsidePoint.x) {\n r = outsidePoint.x - w - x;\n } else {\n r = x - w - outsidePoint.x;\n }\n let q = Q * r / R;\n let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;\n let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;\n log.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });\n if (r === 0) {\n _x = outsidePoint.x;\n _y = outsidePoint.y;\n }\n if (R === 0) {\n _x = outsidePoint.x;\n }\n if (Q === 0) {\n _y = outsidePoint.y;\n }\n return { x: _x, y: _y };\n }\n};\nconst cutPathAtIntersect = (_points, boundaryNode) => {\n log.debug(\"abc88 cutPathAtIntersect\", _points, boundaryNode);\n let points = [];\n let lastPointOutside = _points[0];\n let isInside = false;\n _points.forEach((point2) => {\n if (!outsideNode(boundaryNode, point2) && !isInside) {\n const inter = intersection(boundaryNode, lastPointOutside, point2);\n let pointPresent = false;\n points.forEach((p) => {\n pointPresent = pointPresent || p.x === inter.x && p.y === inter.y;\n });\n if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {\n points.push(inter);\n }\n isInside = true;\n } else {\n lastPointOutside = point2;\n if (!isInside) {\n points.push(point2);\n }\n }\n });\n return points;\n};\nconst insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) {\n let points = edge.points;\n log.debug(\"abc88 InsertEdge: edge=\", edge, \"e=\", e);\n let pointsHasChanged = false;\n const tail = graph.node(e.v);\n var head = graph.node(e.w);\n if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) {\n points = points.slice(1, edge.points.length - 1);\n points.unshift(tail.intersect(points[0]));\n points.push(head.intersect(points[points.length - 1]));\n }\n if (edge.toCluster) {\n log.debug(\"to cluster abc88\", clusterDb[edge.toCluster]);\n points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);\n pointsHasChanged = true;\n }\n if (edge.fromCluster) {\n log.debug(\"from cluster abc88\", clusterDb[edge.fromCluster]);\n points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse();\n pointsHasChanged = true;\n }\n const lineData = points.filter((p) => !Number.isNaN(p.y));\n let curve = curveBasis;\n if (edge.curve && (diagramType === \"graph\" || diagramType === \"flowchart\")) {\n curve = edge.curve;\n }\n const { x, y } = getLineFunctionsWithOffset(edge);\n const lineFunction = line().x(x).y(y).curve(curve);\n let strokeClasses;\n switch (edge.thickness) {\n case \"normal\":\n strokeClasses = \"edge-thickness-normal\";\n break;\n case \"thick\":\n strokeClasses = \"edge-thickness-thick\";\n break;\n case \"invisible\":\n strokeClasses = \"edge-thickness-thick\";\n break;\n default:\n strokeClasses = \"\";\n }\n switch (edge.pattern) {\n case \"solid\":\n strokeClasses += \" edge-pattern-solid\";\n break;\n case \"dotted\":\n strokeClasses += \" edge-pattern-dotted\";\n break;\n case \"dashed\":\n strokeClasses += \" edge-pattern-dashed\";\n break;\n }\n const svgPath = elem.append(\"path\").attr(\"d\", lineFunction(lineData)).attr(\"id\", edge.id).attr(\"class\", \" \" + strokeClasses + (edge.classes ? \" \" + edge.classes : \"\")).attr(\"style\", edge.style);\n let url = \"\";\n if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) {\n url = window.location.protocol + \"//\" + window.location.host + window.location.pathname + window.location.search;\n url = url.replace(/\\(/g, \"\\\\(\");\n url = url.replace(/\\)/g, \"\\\\)\");\n }\n addEdgeMarkers(svgPath, edge, url, id, diagramType);\n let paths = {};\n if (pointsHasChanged) {\n paths.updatedPath = points;\n }\n paths.originalPath = edge.points;\n return paths;\n};\nexport {\n insertMarkers$1 as a,\n clear$1 as b,\n createLabel$1 as c,\n clear as d,\n insertNode as e,\n insertEdgeLabel as f,\n getSubGraphTitleMargins as g,\n insertEdge as h,\n intersectRect$1 as i,\n positionEdgeLabel as j,\n getLineFunctionsWithOffset as k,\n labelHelper as l,\n addEdgeMarkers as m,\n positionNode as p,\n setNodeElem as s,\n updateNodeBounds as u\n};\n"],"names":["insertMarkers","elem","markerArray","type","id","markerName","markers","extension","log","composition","aggregation","dependency","lollipop","point","circle$1","cross","barb","insertMarkers$1","applyStyle","dom","styleFn","addHtmlLabel","node","fo","select","div","label","labelClass","createLabel","_vertexText","style","isTitle","isNode","vertexText","evaluate","getConfig","decodeEntities","s","svgLabel","rows","row","tspan","createLabel$1","labelHelper","parent","_classes","classes","useHtmlLabels","shapeSvg","labelText","textNode","text","createText","sanitizeText","bbox","halfPadding","dv","images","noImgText","img","res","setupImage","bodyFontSize","width","updateNodeBounds","element","insertPolygonShape","w","h","points","d","intersectNode","point2","intersectEllipse","rx","ry","cx","cy","px","py","det","dx","dy","intersectCircle","intersectLine","p1","p2","q1","q2","a1","a2","b1","b2","c1","c2","r1","r2","r3","r4","denom","offset","num","x","y","sameSign","intersectPolygon","polyPoints","x1","y1","intersections","minX","minY","entry","left","top","i","intersect2","p","q","pdx","pdy","distp","qdx","qdy","distq","intersectRect","sx","sy","intersectRect$1","intersect","note","rect2","note$1","expandAndDeduplicateDirections","directions","uniqueDirections","direction","getArrowPoints","duplicatedDirections","f","height","midpoint","padding","formatClass","str","getClassesFromNode","otherClasses","question","questionElem","choice","hexagon","m","hex","block_arrow","blockArrow","rect_left_inv_arrow","lean_right","el","lean_left","trapezoid","inv_trapezoid","rect_right_inv_arrow","cylinder","shape","pos","rect","totalWidth","totalHeight","propKeys","applyNodePropertyBorders","propKey","composite","labelRect","borders","strokeDashArray","addBorder","length","skipBorder","rectWithTitle","innerLine","text2","title","textRows","titleBox","descr","stadium","circle","circle2","doublecircle","gap","circleGroup","outerCircle","innerCircle","subroutine","start","forkJoin","dir","end","class_box","rowPadding","lineHeight","topLine","bottomLine","maxWidth","maxHeight","labelContainer","verticalPos","hasInterface","interfaceLabelText","interfaceLabel","interfaceBBox","classTitleString","classTitleLabel","classTitleBBox","classAttributes","member","parsedInfo","parsedText","lbl","classMethods","displayText","diffX2","diffX","memberBBox","shapes","nodeElems","insertNode","newEl","target","setNodeElem","clear$1","positionNode","diff","getSubGraphTitleMargins","flowchart","_a","_b","subGraphTitleTopMargin","subGraphTitleBottomMargin","subGraphTitleTotalMargin","markerOffsets","calculateDeltaAndAngle","point1","pointTransformer","x2","y2","deltaX","deltaY","data","getLineFunctionsWithOffset","edge","angle","addEdgeMarkers","svgPath","url","diagramType","addEdgeMarker","arrowTypesMap","position","arrowType","endMarkerType","suffix","edgeLabels","terminalLabels","clear","insertEdgeLabel","labelElement","edgeLabel","startLabelElement","startEdgeLabelLeft","inner","slBox","setTerminalWidth","startEdgeLabelRight","endLabelElement","endEdgeLabelLeft","endEdgeLabelRight","value","positionEdgeLabel","paths","path","siteConfig","utils","outsideNode","intersection","outsidePoint","insidePoint","r","Q","R","_x","_y","cutPathAtIntersect","_points","boundaryNode","lastPointOutside","isInside","inter","pointPresent","e","insertEdge","clusterDb","graph","pointsHasChanged","tail","head","lineData","curve","curveBasis","lineFunction","line","strokeClasses"],"mappings":";uNAGA,MAAMA,GAAgB,CAACC,EAAMC,EAAaC,EAAMC,IAAO,CACrDF,EAAY,QAASG,GAAe,CAClCC,GAAQD,CAAU,EAAEJ,EAAME,EAAMC,CAAE,CACtC,CAAG,CACH,EACMG,GAAY,CAACN,EAAME,EAAMC,IAAO,CACpCI,EAAI,MAAM,sBAAuBJ,CAAE,EACnCH,EAAK,OAAO,MAAM,EAAE,OAAO,QAAQ,EAAE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