cc-viewer 1.6.192 → 1.6.193

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/assets/App-BCmqNn2_.js +1 -0
  2. package/dist/assets/AppHeader.module-wVvzNXcQ.js +2 -0
  3. package/dist/assets/Mobile-D8gW8cio.js +1 -0
  4. package/dist/assets/_baseUniq-ob5WCjfq.js +1 -0
  5. package/dist/assets/arc-tZK_aa2R.js +1 -0
  6. package/dist/assets/architectureDiagram-Q4EWVU46-CLUEAtql.js +1 -0
  7. package/dist/assets/blockDiagram-DXYQGD6D-xDM5WOZm.js +1 -0
  8. package/dist/assets/c4Diagram-AHTNJAMY-B6RZf0_O.js +1 -0
  9. package/dist/assets/{channel-G3S1FOvm.js → channel-yPGVmk7J.js} +1 -1
  10. package/dist/assets/chunk-4BX2VUAB-CEnrJ8lf.js +1 -0
  11. package/dist/assets/chunk-4TB4RGXK-rbexG5yC.js +1 -0
  12. package/dist/assets/chunk-55IACEB6-blt2QS_L.js +1 -0
  13. package/dist/assets/chunk-EDXVE4YY-CJab02SL.js +1 -0
  14. package/dist/assets/chunk-FMBD7UC4-b2SvZGni.js +1 -0
  15. package/dist/assets/chunk-OYMX7WX6-CTafJWoH.js +1 -0
  16. package/dist/assets/chunk-QZHKN3VN-DocThykI.js +1 -0
  17. package/dist/assets/{chunk-YZCP3GAM-BYW1PNda.js → chunk-YZCP3GAM-ntU--N7q.js} +1 -1
  18. package/dist/assets/classDiagram-6PBFFD2Q-RlKigyDm.js +1 -0
  19. package/dist/assets/classDiagram-v2-HSJHXN6E-RlKigyDm.js +1 -0
  20. package/dist/assets/clone-zoFVytWa.js +1 -0
  21. package/dist/assets/cose-bilkent-S5V4N54A-DOA8531R.js +1 -0
  22. package/dist/assets/cytoscape.esm-CT1mZavR.js +9 -0
  23. package/dist/assets/dagre-KV5264BT-B9TB-rx0.js +1 -0
  24. package/dist/assets/defaultLocale-DZ7E7S9R.js +1 -0
  25. package/dist/assets/diagram-5BDNPKRD-d4f64tiM.js +1 -0
  26. package/dist/assets/diagram-G4DWMVQ6-DAHZ4eKZ.js +1 -0
  27. package/dist/assets/diagram-MMDJMWI5-Dw-VpXtN.js +1 -0
  28. package/dist/assets/diagram-TYMM5635-BMF1VNan.js +1 -0
  29. package/dist/assets/erDiagram-SMLLAGMA-DARFHI5n.js +1 -0
  30. package/dist/assets/flowDiagram-DWJPFMVM-4zgN2SRF.js +1 -0
  31. package/dist/assets/ganttDiagram-T4ZO3ILL-DnxYMHQX.js +1 -0
  32. package/dist/assets/gitGraphDiagram-UUTBAWPF-Tkkak6GE.js +1 -0
  33. package/dist/assets/graph-C8koNCFy.js +1 -0
  34. package/dist/assets/html2canvas.esm-HFdlUwfn.js +20 -0
  35. package/dist/assets/index-Cg7laj9Y.js +2 -0
  36. package/dist/assets/infoDiagram-42DDH7IO-B3fxENEb.js +1 -0
  37. package/dist/assets/{init-C7FSzFHJ.js → init-DMZMl1PR.js} +1 -1
  38. package/dist/assets/ishikawaDiagram-UXIWVN3A-DSYRAz6c.js +1 -0
  39. package/dist/assets/journeyDiagram-VCZTEJTY-C1ULMq89.js +1 -0
  40. package/dist/assets/kanban-definition-6JOO6SKY-DiS9f1Ou.js +1 -0
  41. package/dist/assets/katex-DSO9-KAp.js +1 -0
  42. package/dist/assets/layout-Dw7PqMj_.js +1 -0
  43. package/dist/assets/linear-CzxAHmCK.js +1 -0
  44. package/dist/assets/mermaid.core-DaRhWNVu.js +7 -0
  45. package/dist/assets/min-CYyUMv00.js +1 -0
  46. package/dist/assets/mindmap-definition-QFDTVHPH-BSnxqws_.js +1 -0
  47. package/dist/assets/ordinal-DA-_8pMy.js +1 -0
  48. package/dist/assets/pieDiagram-DEJITSTG-DLqzHBqi.js +1 -0
  49. package/dist/assets/quadrantDiagram-34T5L4WZ-BxGLS3JO.js +1 -0
  50. package/dist/assets/requirementDiagram-MS252O5E-CFH2qTHK.js +1 -0
  51. package/dist/assets/sankeyDiagram-XADWPNL6-CbI11f-J.js +1 -0
  52. package/dist/assets/sequenceDiagram-FGHM5R23-WQeKqjGD.js +1 -0
  53. package/dist/assets/stateDiagram-FHFEXIEX--nhFK-dR.js +1 -0
  54. package/dist/assets/stateDiagram-v2-QKLJ7IA2-DpubT_1_.js +1 -0
  55. package/dist/assets/timeline-definition-GMOUNBTQ-Dvcn0Sjo.js +1 -0
  56. package/dist/assets/vendor-antd-n6I8Q8WX.js +17 -0
  57. package/dist/assets/vendor-codemirror-CXzpjiCu.js +1 -0
  58. package/dist/assets/vendor-highlight-IFTJ9nxW.js +1 -0
  59. package/dist/assets/vendor-markdown-Bpu4AByL.js +1 -0
  60. package/dist/assets/vendor-qrcode-CVdDMI3Y.js +6 -0
  61. package/dist/assets/vendor-virtuoso-bstsOWAx.js +1 -0
  62. package/dist/assets/vendor-xterm-DckPrCx1.js +37 -0
  63. package/dist/assets/vennDiagram-DHZGUBPP-Bjjoa-3c.js +1 -0
  64. package/dist/assets/wardley-RL74JXVD-D8p4v9Ts.js +1 -0
  65. package/dist/assets/wardleyDiagram-NUSXRM2D-DoGm-2Kz.js +1 -0
  66. package/dist/assets/xychartDiagram-5P7HB3ND-D2jULfQB.js +1 -0
  67. package/dist/index.html +3 -3
  68. package/package.json +2 -1
  69. package/dist/assets/App-DuGHwadX.js +0 -31
  70. package/dist/assets/AppHeader.module-CozRDKfP.js +0 -573
  71. package/dist/assets/Mobile-Bab634xx.js +0 -10
  72. package/dist/assets/_baseUniq-DJPPdHyT.js +0 -1
  73. package/dist/assets/arc-DZ3Bjq-l.js +0 -1
  74. package/dist/assets/architectureDiagram-Q4EWVU46-xy0J2lr0.js +0 -36
  75. package/dist/assets/blockDiagram-DXYQGD6D-CoUm8UC5.js +0 -132
  76. package/dist/assets/c4Diagram-AHTNJAMY-CFHX4Dfx.js +0 -10
  77. package/dist/assets/chunk-4BX2VUAB-CiktxOyY.js +0 -1
  78. package/dist/assets/chunk-4TB4RGXK-DHl7ZlQV.js +0 -206
  79. package/dist/assets/chunk-55IACEB6-DcgWxDD5.js +0 -1
  80. package/dist/assets/chunk-EDXVE4YY-DeUzWpQx.js +0 -1
  81. package/dist/assets/chunk-FMBD7UC4-BCaKpugk.js +0 -15
  82. package/dist/assets/chunk-OYMX7WX6-DKMEMbG9.js +0 -231
  83. package/dist/assets/chunk-QZHKN3VN-BREApeQ-.js +0 -1
  84. package/dist/assets/classDiagram-6PBFFD2Q-B0-7EUsz.js +0 -1
  85. package/dist/assets/classDiagram-v2-HSJHXN6E-B0-7EUsz.js +0 -1
  86. package/dist/assets/clone-CX_D5SrR.js +0 -1
  87. package/dist/assets/cose-bilkent-S5V4N54A-DpwiMCiq.js +0 -1
  88. package/dist/assets/cytoscape.esm-BMgRe88L.js +0 -331
  89. package/dist/assets/dagre-KV5264BT-Dc7qbya2.js +0 -4
  90. package/dist/assets/defaultLocale-CcTwRAjA.js +0 -1
  91. package/dist/assets/diagram-5BDNPKRD-v7FsHeLQ.js +0 -10
  92. package/dist/assets/diagram-G4DWMVQ6-BhKNBlcE.js +0 -24
  93. package/dist/assets/diagram-MMDJMWI5-C-3cRdzG.js +0 -43
  94. package/dist/assets/diagram-TYMM5635-HfNcJIfT.js +0 -24
  95. package/dist/assets/erDiagram-SMLLAGMA-Ckj0dkk7.js +0 -85
  96. package/dist/assets/flowDiagram-DWJPFMVM-yf315tJr.js +0 -162
  97. package/dist/assets/ganttDiagram-T4ZO3ILL-Ch2bINVC.js +0 -292
  98. package/dist/assets/gitGraphDiagram-UUTBAWPF-CesdgsJi.js +0 -106
  99. package/dist/assets/graph-CRpmapJV.js +0 -1
  100. package/dist/assets/html2canvas.esm-B8c0f9Wq.js +0 -22
  101. package/dist/assets/index-DJ0iGKLy.js +0 -2
  102. package/dist/assets/infoDiagram-42DDH7IO-CuD16P9Y.js +0 -2
  103. package/dist/assets/ishikawaDiagram-UXIWVN3A-4y8aG54G.js +0 -70
  104. package/dist/assets/journeyDiagram-VCZTEJTY-B6TtR2Zk.js +0 -139
  105. package/dist/assets/kanban-definition-6JOO6SKY-DTcNHYUS.js +0 -89
  106. package/dist/assets/katex-CJRKSY_b.js +0 -257
  107. package/dist/assets/layout-CX5hpkD2.js +0 -1
  108. package/dist/assets/linear-tWlC-NXc.js +0 -1
  109. package/dist/assets/mermaid.core-DNvsWVDx.js +0 -308
  110. package/dist/assets/min-CDExe3RN.js +0 -1
  111. package/dist/assets/mindmap-definition-QFDTVHPH-CW0yNQcb.js +0 -96
  112. package/dist/assets/ordinal-aRyHI6gl.js +0 -1
  113. package/dist/assets/pieDiagram-DEJITSTG-DNrnOqmz.js +0 -30
  114. package/dist/assets/quadrantDiagram-34T5L4WZ-Cl176vnh.js +0 -7
  115. package/dist/assets/requirementDiagram-MS252O5E-DKp3A5f_.js +0 -84
  116. package/dist/assets/sankeyDiagram-XADWPNL6-BMV0lAz8.js +0 -10
  117. package/dist/assets/sequenceDiagram-FGHM5R23-CQ4preep.js +0 -157
  118. package/dist/assets/stateDiagram-FHFEXIEX-BKqYYN8H.js +0 -1
  119. package/dist/assets/stateDiagram-v2-QKLJ7IA2-C1W1ECmZ.js +0 -1
  120. package/dist/assets/timeline-definition-GMOUNBTQ-4kgeuumv.js +0 -120
  121. package/dist/assets/vendor-antd-Dk5s46Ag.js +0 -406
  122. package/dist/assets/vendor-codemirror-DxvDOrio.js +0 -46
  123. package/dist/assets/vendor-highlight-DVwgAdJY.js +0 -3
  124. package/dist/assets/vendor-markdown-DO-Ppp4f.js +0 -60
  125. package/dist/assets/vendor-qrcode-hI5wlAgK.js +0 -9
  126. package/dist/assets/vendor-virtuoso-HW77kTCh.js +0 -1
  127. package/dist/assets/vendor-xterm-D2cUrYEx.js +0 -140
  128. package/dist/assets/vennDiagram-DHZGUBPP-CqBcUIdK.js +0 -34
  129. package/dist/assets/wardley-RL74JXVD-CbEnkKx8.js +0 -162
  130. package/dist/assets/wardleyDiagram-NUSXRM2D-BJrjkZMg.js +0 -20
  131. package/dist/assets/xychartDiagram-5P7HB3ND-D8aBEz8e.js +0 -7
@@ -0,0 +1 @@
1
+ import{_ as __name,as as markers_default,at as clear2,au as clear,av as clear$1,l as log,c as getConfig2,aw as updateNodeBounds,ax as setNodeElem,af as insertNode,al as getSubGraphTitleMargins,ag as positionNode,ae as insertCluster,ay as insertEdge,az as positionEdgeLabel,aA as insertEdgeLabel}from"./mermaid.core-DaRhWNVu.js";import{i as isUndefined,G as Graph}from"./graph-C8koNCFy.js";import{l as layout}from"./layout-Dw7PqMj_.js";import{c as clone}from"./clone-zoFVytWa.js";import{m as map}from"./min-CYyUMv00.js";import"./index-Cg7laj9Y.js";import"./vendor-codemirror-CXzpjiCu.js";import"./vendor-antd-n6I8Q8WX.js";import"./vendor-markdown-Bpu4AByL.js";import"./_baseUniq-ob5WCjfq.js";function write(g){var json={options:{directed:g.isDirected(),multigraph:g.isMultigraph(),compound:g.isCompound()},nodes:writeNodes(g),edges:writeEdges(g)};return isUndefined(g.graph())||(json.value=clone(g.graph())),json}function writeNodes(g){return map(g.nodes(),function(v){var nodeValue=g.node(v),parent=g.parent(v),node={v:v};return isUndefined(nodeValue)||(node.value=nodeValue),isUndefined(parent)||(node.parent=parent),node})}function writeEdges(g){return map(g.edges(),function(e){var edgeValue=g.edge(e),edge={v:e.v,w:e.w};return isUndefined(e.name)||(edge.name=e.name),isUndefined(edgeValue)||(edge.value=edgeValue),edge})}var clusterDb=new Map,descendants=new Map,parents=new Map,clear4=__name(()=>{descendants.clear(),parents.clear(),clusterDb.clear()},"clear"),isDescendant=__name((id,ancestorId)=>{const ancestorDescendants=descendants.get(ancestorId)||[];return log.trace("In isDescendant",ancestorId," ",id," = ",ancestorDescendants.includes(id)),ancestorDescendants.includes(id)},"isDescendant"),edgeInCluster=__name((edge,clusterId)=>{const clusterDescendants=descendants.get(clusterId)||[];return log.info("Descendants of ",clusterId," is ",clusterDescendants),log.info("Edge is ",edge),edge.v!==clusterId&&edge.w!==clusterId&&(clusterDescendants?clusterDescendants.includes(edge.v)||isDescendant(edge.v,clusterId)||isDescendant(edge.w,clusterId)||clusterDescendants.includes(edge.w):(log.debug("Tilt, ",clusterId,",not in descendants"),!1))},"edgeInCluster"),copy=__name((clusterId,graph,newGraph,rootId)=>{log.warn("Copying children of ",clusterId,"root",rootId,"data",graph.node(clusterId),rootId);const nodes=graph.children(clusterId)||[];clusterId!==rootId&&nodes.push(clusterId),log.warn("Copying (nodes) clusterId",clusterId,"nodes",nodes),nodes.forEach(node=>{if(graph.children(node).length>0)copy(node,graph,newGraph,rootId);else{const data=graph.node(node);log.info("cp ",node," to ",rootId," with parent ",clusterId),newGraph.setNode(node,data),rootId!==graph.parent(node)&&(log.warn("Setting parent",node,graph.parent(node)),newGraph.setParent(node,graph.parent(node))),clusterId!==rootId&&node!==clusterId?(log.debug("Setting parent",node,clusterId),newGraph.setParent(node,clusterId)):(log.info("In copy ",clusterId,"root",rootId,"data",graph.node(clusterId),rootId),log.debug("Not Setting parent for node=",node,"cluster!==rootId",clusterId!==rootId,"node!==clusterId",node!==clusterId));const edges=graph.edges(node);log.debug("Copying Edges",edges),edges.forEach(edge=>{log.info("Edge",edge);const data2=graph.edge(edge.v,edge.w,edge.name);log.info("Edge data",data2,rootId);try{edgeInCluster(edge,rootId)?(log.info("Copying as ",edge.v,edge.w,data2,edge.name),newGraph.setEdge(edge.v,edge.w,data2,edge.name),log.info("newGraph edges ",newGraph.edges(),newGraph.edge(newGraph.edges()[0]))):log.info("Skipping copy of edge ",edge.v,"--\x3e",edge.w," rootId: ",rootId," clusterId:",clusterId)}catch(e){log.error(e)}})}log.debug("Removing node",node),graph.removeNode(node)})},"copy"),extractDescendants=__name((id,graph)=>{const children=graph.children(id);let res=[...children];for(const child of children)parents.set(child,id),res=[...res,...extractDescendants(child,graph)];return res},"extractDescendants"),findCommonEdges=__name((graph,id1,id2)=>{const edges1=graph.edges().filter(edge=>edge.v===id1||edge.w===id1),edges2=graph.edges().filter(edge=>edge.v===id2||edge.w===id2),edges1Prim=edges1.map(edge=>({v:edge.v===id1?id2:edge.v,w:edge.w===id1?id1:edge.w})),edges2Prim=edges2.map(edge=>({v:edge.v,w:edge.w}));return edges1Prim.filter(edgeIn1=>edges2Prim.some(edge=>edgeIn1.v===edge.v&&edgeIn1.w===edge.w))},"findCommonEdges"),findNonClusterChild=__name((id,graph,clusterId)=>{const children=graph.children(id);if(log.trace("Searching children of id ",id,children),children.length<1)return id;let reserve;for(const child of children){const _id=findNonClusterChild(child,graph,clusterId),commonEdges=findCommonEdges(graph,clusterId,_id);if(_id){if(!(commonEdges.length>0))return _id;reserve=_id}}return reserve},"findNonClusterChild"),getAnchorId=__name(id=>clusterDb.has(id)&&clusterDb.get(id).externalConnections&&clusterDb.has(id)?clusterDb.get(id).id:id,"getAnchorId"),adjustClustersAndEdges=__name((graph,depth)=>{if(!graph||depth>10)log.debug("Opting out, no graph ");else{log.debug("Opting in, graph "),graph.nodes().forEach(function(id){graph.children(id).length>0&&(log.warn("Cluster identified",id," Replacement id in edges: ",findNonClusterChild(id,graph,id)),descendants.set(id,extractDescendants(id,graph)),clusterDb.set(id,{id:findNonClusterChild(id,graph,id),clusterData:graph.node(id)}))}),graph.nodes().forEach(function(id){const children=graph.children(id),edges=graph.edges();children.length>0?(log.debug("Cluster identified",id,descendants),edges.forEach(edge=>{isDescendant(edge.v,id)^isDescendant(edge.w,id)&&(log.warn("Edge: ",edge," leaves cluster ",id),log.warn("Descendants of XXX ",id,": ",descendants.get(id)),clusterDb.get(id).externalConnections=!0)})):log.debug("Not a cluster ",id,descendants)});for(let id of clusterDb.keys()){const nonClusterChild=clusterDb.get(id).id,parent=graph.parent(nonClusterChild);parent!==id&&clusterDb.has(parent)&&!clusterDb.get(parent).externalConnections&&(clusterDb.get(id).id=parent)}graph.edges().forEach(function(e){const edge=graph.edge(e);log.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),log.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(graph.edge(e)));let v=e.v,w=e.w;if(log.warn("Fix XXX",clusterDb,"ids:",e.v,e.w,"Translating: ",clusterDb.get(e.v)," --- ",clusterDb.get(e.w)),clusterDb.get(e.v)||clusterDb.get(e.w)){if(log.warn("Fixing and trying - removing XXX",e.v,e.w,e.name),v=getAnchorId(e.v),w=getAnchorId(e.w),graph.removeEdge(e.v,e.w,e.name),v!==e.v){const parent=graph.parent(v);clusterDb.get(parent).externalConnections=!0,edge.fromCluster=e.v}if(w!==e.w){const parent=graph.parent(w);clusterDb.get(parent).externalConnections=!0,edge.toCluster=e.w}log.warn("Fix Replacing with XXX",v,w,e.name),graph.setEdge(v,w,edge,e.name)}}),log.warn("Adjusted Graph",write(graph)),extractor(graph,0),log.trace(clusterDb)}},"adjustClustersAndEdges"),extractor=__name((graph,depth)=>{var _a,_b;if(log.warn("extractor - ",depth,write(graph),graph.children("D")),depth>10)return void log.error("Bailing out");let nodes=graph.nodes(),hasChildren=!1;for(const node of nodes){const children=graph.children(node);hasChildren=hasChildren||children.length>0}if(hasChildren){log.debug("Nodes = ",nodes,depth);for(const node of nodes)if(log.debug("Extracting node",node,clusterDb,clusterDb.has(node)&&!clusterDb.get(node).externalConnections,!graph.parent(node),graph.node(node),graph.children("D")," Depth ",depth),clusterDb.has(node))if(!clusterDb.get(node).externalConnections&&graph.children(node)&&graph.children(node).length>0){log.warn("Cluster without external connections, without a parent and with children",node,depth);let dir="TB"===graph.graph().rankdir?"LR":"TB";(null==(_b=null==(_a=clusterDb.get(node))?void 0:_a.clusterData)?void 0:_b.dir)&&(dir=clusterDb.get(node).clusterData.dir,log.warn("Fixing dir",clusterDb.get(node).clusterData.dir,dir));const clusterGraph=new Graph({multigraph:!0,compound:!0}).setGraph({rankdir:dir,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});log.warn("Old graph before copy",write(graph)),copy(node,graph,clusterGraph,node),graph.setNode(node,{clusterNode:!0,id:node,clusterData:clusterDb.get(node).clusterData,label:clusterDb.get(node).label,graph:clusterGraph}),log.warn("New graph after copy node: (",node,")",write(clusterGraph)),log.debug("Old graph after copy",write(graph))}else log.warn("Cluster ** ",node," **not meeting the criteria !externalConnections:",!clusterDb.get(node).externalConnections," no parent: ",!graph.parent(node)," children ",graph.children(node)&&graph.children(node).length>0,graph.children("D"),depth),log.debug(clusterDb);else log.debug("Not a cluster",node,depth);nodes=graph.nodes(),log.warn("New list of nodes",nodes);for(const node of nodes){const data=graph.node(node);log.warn(" Now next level",node,data),(null==data?void 0:data.clusterNode)&&extractor(data.graph,depth+1)}}else log.debug("Done, no node has children",graph.nodes())},"extractor"),sorter=__name((graph,nodes)=>{if(0===nodes.length)return[];let result=Object.assign([],nodes);return nodes.forEach(node=>{const children=graph.children(node),sorted=sorter(graph,children);result=[...result,...sorted]}),result},"sorter"),sortNodesByHierarchy=__name(graph=>sorter(graph,graph.children()),"sortNodesByHierarchy"),recursiveRender=__name(async(_elem,graph,diagramType,id,parentCluster,siteConfig)=>{log.warn("Graph in recursive render:XAX",write(graph),parentCluster);const dir=graph.graph().rankdir;log.trace("Dir in recursive render - dir:",dir);const elem=_elem.insert("g").attr("class","root");graph.nodes()?log.info("Recursive render XXX",graph.nodes()):log.info("No nodes found for",graph),graph.edges().length>0&&log.info("Recursive edges",graph.edge(graph.edges()[0]));const clusters=elem.insert("g").attr("class","clusters"),edgePaths=elem.insert("g").attr("class","edgePaths"),edgeLabels=elem.insert("g").attr("class","edgeLabels"),nodes=elem.insert("g").attr("class","nodes");await Promise.all(graph.nodes().map(async function(v){const node=graph.node(v);if(void 0!==parentCluster){const data=JSON.parse(JSON.stringify(parentCluster.clusterData));log.trace("Setting data for parent cluster XXX\n Node.id = ",v,"\n data=",data.height,"\nParent cluster",parentCluster.height),graph.setNode(parentCluster.id,data),graph.parent(v)||(log.trace("Setting parent",v,parentCluster.id),graph.setParent(v,parentCluster.id,data))}if(log.info("(Insert) Node XXX"+v+": "+JSON.stringify(graph.node(v))),null==node?void 0:node.clusterNode){log.info("Cluster identified XBX",v,node.width,graph.node(v));const{ranksep:ranksep,nodesep:nodesep}=graph.graph();node.graph.setGraph({...node.graph.graph(),ranksep:ranksep+25,nodesep:nodesep});const o=await recursiveRender(nodes,node.graph,diagramType,id,graph.node(v),siteConfig),newEl=o.elem;updateNodeBounds(node,newEl),node.diff=o.diff||0,log.info("New compound node after recursive render XAX",v,"width",node.width,"height",node.height),setNodeElem(newEl,node)}else graph.children(v).length>0?(log.trace("Cluster - the non recursive path XBX",v,node.id,node,node.width,"Graph:",graph),log.trace(findNonClusterChild(node.id,graph)),clusterDb.set(node.id,{id:findNonClusterChild(node.id,graph),node:node})):(log.trace("Node - the non recursive path XAX",v,nodes,graph.node(v),dir),await insertNode(nodes,graph.node(v),{config:siteConfig,dir:dir}))}));const processEdges=__name(async()=>{const edgePromises=graph.edges().map(async function(e){const edge=graph.edge(e.v,e.w,e.name);log.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),log.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(graph.edge(e))),log.info("Fix",clusterDb,"ids:",e.v,e.w,"Translating: ",clusterDb.get(e.v),clusterDb.get(e.w)),await insertEdgeLabel(edgeLabels,edge)});await Promise.all(edgePromises)},"processEdges");await processEdges(),log.info("Graph before layout:",JSON.stringify(write(graph))),log.info("############################################# XXX"),log.info("### Layout ### XXX"),log.info("############################################# XXX"),layout(graph),log.info("Graph after layout:",JSON.stringify(write(graph)));let diff=0,{subGraphTitleTotalMargin:subGraphTitleTotalMargin}=getSubGraphTitleMargins(siteConfig);return await Promise.all(sortNodesByHierarchy(graph).map(async function(v){var _a;const node=graph.node(v);if(log.info("Position XBX => "+v+": ("+node.x,","+node.y,") width: ",node.width," height: ",node.height),null==node?void 0:node.clusterNode)node.y+=subGraphTitleTotalMargin,log.info("A tainted cluster node XBX1",v,node.id,node.width,node.height,node.x,node.y,graph.parent(v)),clusterDb.get(node.id).node=node,positionNode(node);else if(graph.children(v).length>0){log.info("A pure cluster node XBX1",v,node.id,node.x,node.y,node.width,node.height,graph.parent(v)),node.height+=subGraphTitleTotalMargin,graph.node(node.parentId);const halfPadding=(null==node?void 0:node.padding)/2||0,labelHeight=(null==(_a=null==node?void 0:node.labelBBox)?void 0:_a.height)||0,offsetY=labelHeight-halfPadding||0;log.debug("OffsetY",offsetY,"labelHeight",labelHeight,"halfPadding",halfPadding),await insertCluster(clusters,node),clusterDb.get(node.id).node=node}else{const parent=graph.node(node.parentId);node.y+=subGraphTitleTotalMargin/2,log.info("A regular node XBX1 - using the padding",node.id,"parent",node.parentId,node.width,node.height,node.x,node.y,"offsetY",node.offsetY,"parent",parent,null==parent?void 0:parent.offsetY,node),positionNode(node)}})),graph.edges().forEach(function(e){const edge=graph.edge(e);log.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(edge),edge),edge.points.forEach(point=>point.y+=subGraphTitleTotalMargin/2);const startNode=graph.node(e.v);var endNode=graph.node(e.w);const paths=insertEdge(edgePaths,edge,clusterDb,diagramType,startNode,endNode,id);positionEdgeLabel(edge,paths)}),graph.nodes().forEach(function(v){const n=graph.node(v);log.info(v,n.type,n.diff),n.isGroup&&(diff=n.diff)}),log.warn("Returning from recursive render XAX",elem,diff),{elem:elem,diff:diff}},"recursiveRender"),render=__name(async(data4Layout,svg)=>{var _a,_b,_c,_d,_e,_f;const graph=new Graph({multigraph:!0,compound:!0}).setGraph({rankdir:data4Layout.direction,nodesep:(null==(_a=data4Layout.config)?void 0:_a.nodeSpacing)||(null==(_c=null==(_b=data4Layout.config)?void 0:_b.flowchart)?void 0:_c.nodeSpacing)||data4Layout.nodeSpacing,ranksep:(null==(_d=data4Layout.config)?void 0:_d.rankSpacing)||(null==(_f=null==(_e=data4Layout.config)?void 0:_e.flowchart)?void 0:_f.rankSpacing)||data4Layout.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),element=svg.select("g");markers_default(element,data4Layout.markers,data4Layout.type,data4Layout.diagramId),clear2(),clear(),clear$1(),clear4(),data4Layout.nodes.forEach(node=>{graph.setNode(node.id,{...node}),node.parentId&&graph.setParent(node.id,node.parentId)}),log.debug("Edges:",data4Layout.edges),data4Layout.edges.forEach(edge=>{if(edge.start===edge.end){const nodeId=edge.start,specialId1=nodeId+"---"+nodeId+"---1",specialId2=nodeId+"---"+nodeId+"---2",node=graph.node(nodeId);graph.setNode(specialId1,{domId:specialId1,id:specialId1,parentId:node.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),graph.setParent(specialId1,node.parentId),graph.setNode(specialId2,{domId:specialId2,id:specialId2,parentId:node.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),graph.setParent(specialId2,node.parentId);const edge1=structuredClone(edge),edgeMid=structuredClone(edge),edge2=structuredClone(edge);edge1.label="",edge1.arrowTypeEnd="none",edge1.id=nodeId+"-cyclic-special-1",edgeMid.arrowTypeStart="none",edgeMid.arrowTypeEnd="none",edgeMid.id=nodeId+"-cyclic-special-mid",edge2.label="",node.isGroup&&(edge1.fromCluster=nodeId,edge2.toCluster=nodeId),edge2.id=nodeId+"-cyclic-special-2",edge2.arrowTypeStart="none",graph.setEdge(nodeId,specialId1,edge1,nodeId+"-cyclic-special-0"),graph.setEdge(specialId1,specialId2,edgeMid,nodeId+"-cyclic-special-1"),graph.setEdge(specialId2,nodeId,edge2,nodeId+"-cyc<lic-special-2")}else graph.setEdge(edge.start,edge.end,{...edge},edge.id)}),log.warn("Graph at first:",JSON.stringify(write(graph))),adjustClustersAndEdges(graph),log.warn("Graph after XAX:",JSON.stringify(write(graph)));const siteConfig=getConfig2();await recursiveRender(element,graph,data4Layout.type,data4Layout.diagramId,void 0,siteConfig)},"render");export{render};
@@ -0,0 +1 @@
1
+ function formatDecimalParts(x,p){if(!isFinite(x)||0===x)return null;var i=(x=p?x.toExponential(p-1):x.toExponential()).indexOf("e"),coefficient=x.slice(0,i);return[coefficient.length>1?coefficient[0]+coefficient.slice(2):coefficient,+x.slice(i+1)]}function exponent(x){return(x=formatDecimalParts(Math.abs(x)))?x[1]:NaN}var prefixExponent,re=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier(specifier){if(!(match=re.exec(specifier)))throw new Error("invalid format: "+specifier);var match;return new FormatSpecifier({fill:match[1],align:match[2],sign:match[3],symbol:match[4],zero:match[5],width:match[6],comma:match[7],precision:match[8]&&match[8].slice(1),trim:match[9],type:match[10]})}function FormatSpecifier(specifier){this.fill=void 0===specifier.fill?" ":specifier.fill+"",this.align=void 0===specifier.align?">":specifier.align+"",this.sign=void 0===specifier.sign?"-":specifier.sign+"",this.symbol=void 0===specifier.symbol?"":specifier.symbol+"",this.zero=!!specifier.zero,this.width=void 0===specifier.width?void 0:+specifier.width,this.comma=!!specifier.comma,this.precision=void 0===specifier.precision?void 0:+specifier.precision,this.trim=!!specifier.trim,this.type=void 0===specifier.type?"":specifier.type+""}function formatRounded(x,p){var d=formatDecimalParts(x,p);if(!d)return x+"";var coefficient=d[0],exponent2=d[1];return exponent2<0?"0."+new Array(-exponent2).join("0")+coefficient:coefficient.length>exponent2+1?coefficient.slice(0,exponent2+1)+"."+coefficient.slice(exponent2+1):coefficient+new Array(exponent2-coefficient.length+2).join("0")}formatSpecifier.prototype=FormatSpecifier.prototype,FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const formatTypes={"%":(x,p)=>(100*x).toFixed(p),b:x=>Math.round(x).toString(2),c:x=>x+"",d:function(x){return Math.abs(x=Math.round(x))>=1e21?x.toLocaleString("en").replace(/,/g,""):x.toString(10)},e:(x,p)=>x.toExponential(p),f:(x,p)=>x.toFixed(p),g:(x,p)=>x.toPrecision(p),o:x=>Math.round(x).toString(8),p:(x,p)=>formatRounded(100*x,p),r:formatRounded,s:function(x,p){var d=formatDecimalParts(x,p);if(!d)return prefixExponent=void 0,x.toPrecision(p);var coefficient=d[0],exponent2=d[1],i=exponent2-(prefixExponent=3*Math.max(-8,Math.min(8,Math.floor(exponent2/3))))+1,n=coefficient.length;return i===n?coefficient:i>n?coefficient+new Array(i-n+1).join("0"):i>0?coefficient.slice(0,i)+"."+coefficient.slice(i):"0."+new Array(1-i).join("0")+formatDecimalParts(x,Math.max(0,p+i-1))[0]},X:x=>Math.round(x).toString(16).toUpperCase(),x:x=>Math.round(x).toString(16)};function identity(x){return x}var locale,format,formatPrefix,map=Array.prototype.map,prefixes=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function formatLocale(locale2){var grouping,thousands,group=void 0===locale2.grouping||void 0===locale2.thousands?identity:(grouping=map.call(locale2.grouping,Number),thousands=locale2.thousands+"",function(value,width){for(var i=value.length,t=[],j=0,g=grouping[0],length=0;i>0&&g>0&&(length+g+1>width&&(g=Math.max(1,width-length)),t.push(value.substring(i-=g,i+g)),!((length+=g+1)>width));)g=grouping[j=(j+1)%grouping.length];return t.reverse().join(thousands)}),currencyPrefix=void 0===locale2.currency?"":locale2.currency[0]+"",currencySuffix=void 0===locale2.currency?"":locale2.currency[1]+"",decimal=void 0===locale2.decimal?".":locale2.decimal+"",numerals=void 0===locale2.numerals?identity:function(numerals){return function(value){return value.replace(/[0-9]/g,function(i){return numerals[+i]})}}(map.call(locale2.numerals,String)),percent=void 0===locale2.percent?"%":locale2.percent+"",minus=void 0===locale2.minus?"−":locale2.minus+"",nan=void 0===locale2.nan?"NaN":locale2.nan+"";function newFormat(specifier,options){var fill=(specifier=formatSpecifier(specifier)).fill,align=specifier.align,sign=specifier.sign,symbol=specifier.symbol,zero=specifier.zero,width=specifier.width,comma=specifier.comma,precision=specifier.precision,trim=specifier.trim,type=specifier.type;"n"===type?(comma=!0,type="g"):formatTypes[type]||(void 0===precision&&(precision=12),trim=!0,type="g"),(zero||"0"===fill&&"="===align)&&(zero=!0,fill="0",align="=");var prefix=(options&&void 0!==options.prefix?options.prefix:"")+("$"===symbol?currencyPrefix:"#"===symbol&&/[boxX]/.test(type)?"0"+type.toLowerCase():""),suffix=("$"===symbol?currencySuffix:/[%p]/.test(type)?percent:"")+(options&&void 0!==options.suffix?options.suffix:""),formatType=formatTypes[type],maybeSuffix=/[defgprs%]/.test(type);function format2(value){var i,n,c,valuePrefix=prefix,valueSuffix=suffix;if("c"===type)valueSuffix=formatType(value)+valueSuffix,value="";else{var valueNegative=(value=+value)<0||1/value<0;if(value=isNaN(value)?nan:formatType(Math.abs(value),precision),trim&&(value=function(s){out:for(var i1,n=s.length,i=1,i0=-1;i<n;++i)switch(s[i]){case".":i0=i1=i;break;case"0":0===i0&&(i0=i),i1=i;break;default:if(!+s[i])break out;i0>0&&(i0=0)}return i0>0?s.slice(0,i0)+s.slice(i1+1):s}(value)),valueNegative&&0===+value&&"+"!==sign&&(valueNegative=!1),valuePrefix=(valueNegative?"("===sign?sign:minus:"-"===sign||"("===sign?"":sign)+valuePrefix,valueSuffix=("s"!==type||isNaN(value)||void 0===prefixExponent?"":prefixes[8+prefixExponent/3])+valueSuffix+(valueNegative&&"("===sign?")":""),maybeSuffix)for(i=-1,n=value.length;++i<n;)if(48>(c=value.charCodeAt(i))||c>57){valueSuffix=(46===c?decimal+value.slice(i+1):value.slice(i))+valueSuffix,value=value.slice(0,i);break}}comma&&!zero&&(value=group(value,1/0));var length=valuePrefix.length+value.length+valueSuffix.length,padding=length<width?new Array(width-length+1).join(fill):"";switch(comma&&zero&&(value=group(padding+value,padding.length?width-valueSuffix.length:1/0),padding=""),align){case"<":value=valuePrefix+value+valueSuffix+padding;break;case"=":value=valuePrefix+padding+value+valueSuffix;break;case"^":value=padding.slice(0,length=padding.length>>1)+valuePrefix+value+valueSuffix+padding.slice(length);break;default:value=padding+valuePrefix+value+valueSuffix}return numerals(value)}return precision=void 0===precision?6:/[gprs]/.test(type)?Math.max(1,Math.min(21,precision)):Math.max(0,Math.min(20,precision)),format2.toString=function(){return specifier+""},format2}return{format:newFormat,formatPrefix:function(specifier,value){var e=3*Math.max(-8,Math.min(8,Math.floor(exponent(value)/3))),k=Math.pow(10,-e),f=newFormat(((specifier=formatSpecifier(specifier)).type="f",specifier),{suffix:prefixes[8+e/3]});return function(value2){return f(k*value2)}}}}locale=formatLocale({thousands:",",grouping:[3],currency:["$",""]}),format=locale.format,formatPrefix=locale.formatPrefix;export{formatPrefix as a,format as b,exponent as e,formatSpecifier as f};
@@ -0,0 +1 @@
1
+ import{p as setDiagramTitle,b as setAccTitle,s as setAccDescription,q as getDiagramTitle,g as getAccDescription,a as getAccTitle,_ as __name,E as cleanAndMerge,l as log,H as selectSvgElement,e as configureSvgSize,C as getConfig,F as defaultConfig_default,y as clear}from"./mermaid.core-DaRhWNVu.js";import{p as populateCommonDb}from"./chunk-4BX2VUAB-CEnrJ8lf.js";import{I as ImperativeState}from"./chunk-QZHKN3VN-DocThykI.js";import{p as parse}from"./wardley-RL74JXVD-D8p4v9Ts.js";import"./index-Cg7laj9Y.js";import"./vendor-codemirror-CXzpjiCu.js";import"./vendor-antd-n6I8Q8WX.js";import"./vendor-markdown-Bpu4AByL.js";import"./min-CYyUMv00.js";import"./_baseUniq-ob5WCjfq.js";var state=new ImperativeState(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),clear2=__name(()=>{state.reset(),clear()},"clear"),getRoot=__name(()=>state.records.stack[0],"getRoot"),getCount=__name(()=>state.records.cnt,"getCount"),defaultConfig=defaultConfig_default.treeView,getConfig2=__name(()=>cleanAndMerge(defaultConfig,getConfig().treeView),"getConfig"),db_default={clear:clear2,addNode:__name((level,name)=>{for(;level<=state.records.stack[state.records.stack.length-1].level;)state.records.stack.pop();const node={id:state.records.cnt++,level:level,name:name,children:[]};state.records.stack[state.records.stack.length-1].children.push(node),state.records.stack.push(node)},"addNode"),getRoot:getRoot,getCount:getCount,getConfig:getConfig2,getAccTitle:getAccTitle,getAccDescription:getAccDescription,getDiagramTitle:getDiagramTitle,setAccDescription:setAccDescription,setAccTitle:setAccTitle,setDiagramTitle:setDiagramTitle},populate=__name(ast=>{populateCommonDb(ast,db_default),ast.nodes.map(node=>db_default.addNode(node.indent?parseInt(node.indent):0,node.name))},"populate"),parser={parse:__name(async input=>{const ast=await parse("treeView",input);log.debug(ast),populate(ast)},"parse")},positionLabel=__name((x,y,node,domElem,config)=>{const label=domElem.append("text").text(node.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:labelHeight,width:labelWidth}=label.node().getBBox(),height=labelHeight+2*config.paddingY,width=labelWidth+2*config.paddingX;label.attr("x",x+config.paddingX),label.attr("y",y+height/2),node.BBox={x:x,y:y,width:width,height:height}},"positionLabel"),positionLine=__name((domElem,x1,y1,x2,y2,lineThickness)=>domElem.append("line").attr("x1",x1).attr("y1",y1).attr("x2",x2).attr("y2",y2).attr("stroke-width",lineThickness).attr("class","treeView-node-line"),"positionLine"),drawTree=__name((elem,root,config)=>{let totalHeight=0,totalWidth=0;const drawNode=__name((elem2,node,config2,depth)=>{const indent=depth*(config2.rowIndent+config2.paddingX);positionLabel(indent,totalHeight,node,elem2,config2);const{height:height,width:width}=node.BBox;positionLine(elem2,indent-config2.rowIndent,totalHeight+height/2,indent,totalHeight+height/2,config2.lineThickness),totalWidth=Math.max(totalWidth,indent+width),totalHeight+=height},"drawNode"),processNode=__name((node,depth=0)=>{drawNode(elem,node,config,depth),node.children.forEach(child=>{processNode(child,depth+1)});const{x:x,y:y,height:height}=node.BBox;if(node.children.length){const{y:endY,height:endHeight}=node.children[node.children.length-1].BBox;positionLine(elem,x+config.paddingX,y+height,x+config.paddingX,endY+endHeight/2+config.lineThickness/2,config.lineThickness)}},"processNode");return processNode(root),{totalHeight:totalHeight,totalWidth:totalWidth}},"drawTree"),defaultTreeViewDiagramStyles={labelFontSize:"16px",labelColor:"black",lineColor:"black"},diagram={db:db_default,renderer:{draw:__name((text,id,_ver,diagObj)=>{log.debug("Rendering treeView diagram\n"+text);const db2=diagObj.db,root=db2.getRoot(),config=db2.getConfig(),svg=selectSvgElement(id),treeElem=svg.append("g");treeElem.attr("class","tree-view");const{totalHeight:totalHeight,totalWidth:totalWidth}=drawTree(treeElem,root,config);svg.attr("viewBox",`-${config.lineThickness/2} 0 ${totalWidth} ${totalHeight}`),configureSvgSize(svg,totalHeight,totalWidth,config.useMaxWidth)},"draw")},parser:parser,styles:__name(({treeView:treeView})=>{const{labelFontSize:labelFontSize,labelColor:labelColor,lineColor:lineColor}=cleanAndMerge(defaultTreeViewDiagramStyles,treeView);return`\n .treeView-node-label {\n font-size: ${labelFontSize};\n fill: ${labelColor};\n }\n .treeView-node-line {\n stroke: ${lineColor};\n }\n `},"styles")};export{diagram};
@@ -0,0 +1 @@
1
+ var _a;import{_ as __name,I as getThemeVariables3,C as getConfig,E as cleanAndMerge,H as selectSvgElement,e as configureSvgSize,l as log,ba as styles2String,d as select,b as setAccTitle,a as getAccTitle,p as setDiagramTitle,q as getDiagramTitle,g as getAccDescription,s as setAccDescription,F as defaultConfig_default,bb as isLabelStyle,y as clear}from"./mermaid.core-DaRhWNVu.js";import{s as setupViewPortForSVG}from"./chunk-EDXVE4YY-CJab02SL.js";import{p as populateCommonDb}from"./chunk-4BX2VUAB-CEnrJ8lf.js";import{p as parse}from"./wardley-RL74JXVD-D8p4v9Ts.js";import{b as format}from"./defaultLocale-DZ7E7S9R.js";import{o as ordinal}from"./ordinal-DA-_8pMy.js";import"./index-Cg7laj9Y.js";import"./vendor-codemirror-CXzpjiCu.js";import"./vendor-antd-n6I8Q8WX.js";import"./vendor-markdown-Bpu4AByL.js";import"./min-CYyUMv00.js";import"./_baseUniq-ob5WCjfq.js";import"./init-DMZMl1PR.js";function count(node){var sum=0,children=node.children,i=children&&children.length;if(i)for(;--i>=0;)sum+=children[i].value;else sum=1;node.value=sum}function hierarchy(data,children){data instanceof Map?(data=[void 0,data],void 0===children&&(children=mapChildren)):void 0===children&&(children=objectChildren);for(var node,child,childs,i,n,root=new Node(data),nodes=[root];node=nodes.pop();)if((childs=children(node.data))&&(n=(childs=Array.from(childs)).length))for(node.children=childs,i=n-1;i>=0;--i)nodes.push(child=childs[i]=new Node(childs[i])),child.parent=node,child.depth=node.depth+1;return root.eachBefore(computeHeight)}function objectChildren(d){return d.children}function mapChildren(d){return Array.isArray(d)?d[1]:null}function copyData(node){void 0!==node.data.value&&(node.value=node.data.value),node.data=node.data.data}function computeHeight(node){var height=0;do{node.height=height}while((node=node.parent)&&node.height<++height)}function Node(data){this.data=data,this.depth=this.height=0,this.parent=null}function constantZero(){return 0}function constant(x){return function(){return x}}function roundNode(node){node.x0=Math.round(node.x0),node.y0=Math.round(node.y0),node.x1=Math.round(node.x1),node.y1=Math.round(node.y1)}function treemapDice(parent,x0,y0,x1,y1){for(var node,nodes=parent.children,i=-1,n=nodes.length,k=parent.value&&(x1-x0)/parent.value;++i<n;)(node=nodes[i]).y0=y0,node.y1=y1,node.x0=x0,node.x1=x0+=node.value*k}function treemapSlice(parent,x0,y0,x1,y1){for(var node,nodes=parent.children,i=-1,n=nodes.length,k=parent.value&&(y1-y0)/parent.value;++i<n;)(node=nodes[i]).x0=x0,node.x1=x1,node.y0=y0,node.y1=y0+=node.value*k}Node.prototype=hierarchy.prototype={constructor:Node,count:function(){return this.eachAfter(count)},each:function(callback,that){let index=-1;for(const node of this)callback.call(that,node,++index,this);return this},eachAfter:function(callback,that){for(var children,i,n,node=this,nodes=[node],next=[],index=-1;node=nodes.pop();)if(next.push(node),children=node.children)for(i=0,n=children.length;i<n;++i)nodes.push(children[i]);for(;node=next.pop();)callback.call(that,node,++index,this);return this},eachBefore:function(callback,that){for(var children,i,node=this,nodes=[node],index=-1;node=nodes.pop();)if(callback.call(that,node,++index,this),children=node.children)for(i=children.length-1;i>=0;--i)nodes.push(children[i]);return this},find:function(callback,that){let index=-1;for(const node of this)if(callback.call(that,node,++index,this))return node},sum:function(value){return this.eachAfter(function(node){for(var sum=+value(node.data)||0,children=node.children,i=children&&children.length;--i>=0;)sum+=children[i].value;node.value=sum})},sort:function(compare){return this.eachBefore(function(node){node.children&&node.children.sort(compare)})},path:function(end){for(var start=this,ancestor=function(a,b){if(a===b)return a;var aNodes=a.ancestors(),bNodes=b.ancestors(),c=null;a=aNodes.pop(),b=bNodes.pop();for(;a===b;)c=a,a=aNodes.pop(),b=bNodes.pop();return c}(start,end),nodes=[start];start!==ancestor;)start=start.parent,nodes.push(start);for(var k=nodes.length;end!==ancestor;)nodes.splice(k,0,end),end=end.parent;return nodes},ancestors:function(){for(var node=this,nodes=[node];node=node.parent;)nodes.push(node);return nodes},descendants:function(){return Array.from(this)},leaves:function(){var leaves=[];return this.eachBefore(function(node){node.children||leaves.push(node)}),leaves},links:function(){var root=this,links=[];return root.each(function(node){node!==root&&links.push({source:node.parent,target:node})}),links},copy:function(){return hierarchy(this).eachBefore(copyData)},[Symbol.iterator]:function*(){var current,children,i,n,node=this,next=[node];do{for(current=next.reverse(),next=[];node=current.pop();)if(yield node,children=node.children)for(i=0,n=children.length;i<n;++i)next.push(children[i])}while(next.length)}};const squarify=function custom(ratio){function squarify2(parent,x0,y0,x1,y1){!function(ratio,parent,x0,y0,x1,y1){for(var row,nodeValue,dx,dy,sumValue,minValue,maxValue,newRatio,minRatio,alpha,beta,rows=[],nodes=parent.children,i0=0,i1=0,n=nodes.length,value=parent.value;i0<n;){dx=x1-x0,dy=y1-y0;do{sumValue=nodes[i1++].value}while(!sumValue&&i1<n);for(minValue=maxValue=sumValue,beta=sumValue*sumValue*(alpha=Math.max(dy/dx,dx/dy)/(value*ratio)),minRatio=Math.max(maxValue/beta,beta/minValue);i1<n;++i1){if(sumValue+=nodeValue=nodes[i1].value,nodeValue<minValue&&(minValue=nodeValue),nodeValue>maxValue&&(maxValue=nodeValue),beta=sumValue*sumValue*alpha,(newRatio=Math.max(maxValue/beta,beta/minValue))>minRatio){sumValue-=nodeValue;break}minRatio=newRatio}rows.push(row={value:sumValue,dice:dx<dy,children:nodes.slice(i0,i1)}),row.dice?treemapDice(row,x0,y0,x1,value?y0+=dy*sumValue/value:y1):treemapSlice(row,x0,y0,value?x0+=dx*sumValue/value:x1,y1),value-=sumValue,i0=i1}}(ratio,parent,x0,y0,x1,y1)}return squarify2.ratio=function(x){return custom((x=+x)>1?x:1)},squarify2}((1+Math.sqrt(5))/2);function treemap(){var tile=squarify,round=!1,dx=1,dy=1,paddingStack=[0],paddingInner=constantZero,paddingTop=constantZero,paddingRight=constantZero,paddingBottom=constantZero,paddingLeft=constantZero;function treemap2(root){return root.x0=root.y0=0,root.x1=dx,root.y1=dy,root.eachBefore(positionNode),paddingStack=[0],round&&root.eachBefore(roundNode),root}function positionNode(node){var p=paddingStack[node.depth],x0=node.x0+p,y0=node.y0+p,x1=node.x1-p,y1=node.y1-p;x1<x0&&(x0=x1=(x0+x1)/2),y1<y0&&(y0=y1=(y0+y1)/2),node.x0=x0,node.y0=y0,node.x1=x1,node.y1=y1,node.children&&(p=paddingStack[node.depth+1]=paddingInner(node)/2,x0+=paddingLeft(node)-p,y0+=paddingTop(node)-p,(x1-=paddingRight(node)-p)<x0&&(x0=x1=(x0+x1)/2),(y1-=paddingBottom(node)-p)<y0&&(y0=y1=(y0+y1)/2),tile(node,x0,y0,x1,y1))}return treemap2.round=function(x){return arguments.length?(round=!!x,treemap2):round},treemap2.size=function(x){return arguments.length?(dx=+x[0],dy=+x[1],treemap2):[dx,dy]},treemap2.tile=function(x){return arguments.length?(tile=function(f){if("function"!=typeof f)throw new Error;return f}(x),treemap2):tile},treemap2.padding=function(x){return arguments.length?treemap2.paddingInner(x).paddingOuter(x):treemap2.paddingInner()},treemap2.paddingInner=function(x){return arguments.length?(paddingInner="function"==typeof x?x:constant(+x),treemap2):paddingInner},treemap2.paddingOuter=function(x){return arguments.length?treemap2.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x):treemap2.paddingTop()},treemap2.paddingTop=function(x){return arguments.length?(paddingTop="function"==typeof x?x:constant(+x),treemap2):paddingTop},treemap2.paddingRight=function(x){return arguments.length?(paddingRight="function"==typeof x?x:constant(+x),treemap2):paddingRight},treemap2.paddingBottom=function(x){return arguments.length?(paddingBottom="function"==typeof x?x:constant(+x),treemap2):paddingBottom},treemap2.paddingLeft=function(x){return arguments.length?(paddingLeft="function"==typeof x?x:constant(+x),treemap2):paddingLeft},treemap2}var TreeMapDB=(__name(_a=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=setAccTitle,this.getAccTitle=getAccTitle,this.setDiagramTitle=setDiagramTitle,this.getDiagramTitle=getDiagramTitle,this.getAccDescription=getAccDescription,this.setAccDescription=setAccDescription}getNodes(){return this.nodes}getConfig(){const defaultConfig=defaultConfig_default,userConfig=getConfig();return cleanAndMerge({...defaultConfig.treemap,...userConfig.treemap??{}})}addNode(node,level){this.nodes.push(node),this.levels.set(node,level),0===level&&(this.outerNodes.push(node),this.root??(this.root=node))}getRoot(){return{name:"",children:this.outerNodes}}addClass(id,_style){const styleClass=this.classes.get(id)??{id:id,styles:[],textStyles:[]},styles=_style.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");styles&&styles.forEach(s=>{isLabelStyle(s)&&((null==styleClass?void 0:styleClass.textStyles)?styleClass.textStyles.push(s):styleClass.textStyles=[s]),(null==styleClass?void 0:styleClass.styles)?styleClass.styles.push(s):styleClass.styles=[s]}),this.classes.set(id,styleClass)}getClasses(){return this.classes}getStylesForClass(classSelector){var _a2;return(null==(_a2=this.classes.get(classSelector))?void 0:_a2.styles)??[]}clear(){clear(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},"TreeMapDB"),_a);function buildHierarchy(items){if(!items.length)return[];const root=[],stack=[];return items.forEach(item=>{const node={name:item.name,children:"Leaf"===item.type?void 0:[]};for(node.classSelector=null==item?void 0:item.classSelector,(null==item?void 0:item.cssCompiledStyles)&&(node.cssCompiledStyles=item.cssCompiledStyles),"Leaf"===item.type&&void 0!==item.value&&(node.value=item.value);stack.length>0&&stack[stack.length-1].level>=item.level;)stack.pop();if(0===stack.length)root.push(node);else{const parent=stack[stack.length-1].node;parent.children?parent.children.push(node):parent.children=[node]}"Leaf"!==item.type&&stack.push({node:node,level:item.level})}),root}__name(buildHierarchy,"buildHierarchy");var populate=__name((ast,db)=>{populateCommonDb(ast,db);const items=[];for(const row of ast.TreemapRows??[])"ClassDefStatement"===row.$type&&db.addClass(row.className??"",row.styleText??"");for(const row of ast.TreemapRows??[]){const item=row.item;if(!item)continue;const level=row.indent?parseInt(row.indent):0,name=getItemName(item),styles=item.classSelector?db.getStylesForClass(item.classSelector):[],cssCompiledStyles=styles.length>0?styles:void 0,itemData={level:level,name:name,type:item.$type,value:item.value,classSelector:item.classSelector,cssCompiledStyles:cssCompiledStyles};items.push(itemData)}const hierarchyNodes=buildHierarchy(items),addNodesRecursively=__name((nodes,level)=>{for(const node of nodes)db.addNode(node,level),node.children&&node.children.length>0&&addNodesRecursively(node.children,level+1)},"addNodesRecursively");addNodesRecursively(hierarchyNodes,0)},"populate"),getItemName=__name(item=>item.name?String(item.name):"","getItemName"),parser={parser:{yy:void 0},parse:__name(async text=>{var _a2;try{const parseFunc=parse,ast=await parseFunc("treemap",text);log.debug("Treemap AST:",ast);const db=null==(_a2=parser.parser)?void 0:_a2.yy;if(!(db instanceof TreeMapDB))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");populate(ast,db)}catch(error){throw log.error("Error parsing treemap:",error),error}},"parse")},renderer={draw:__name((_text,id,_version,diagram2)=>{const treemapDb=diagram2.db,config=treemapDb.getConfig(),treemapInnerPadding=config.padding??10,title=treemapDb.getDiagramTitle(),root=treemapDb.getRoot(),{themeVariables:themeVariables}=getConfig();if(!root)return;const titleHeight=title?30:0,svg=selectSvgElement(id),width=config.nodeWidth?10*config.nodeWidth:960,height=config.nodeHeight?10*config.nodeHeight:500,svgWidth=width,svgHeight=height+titleHeight;let valueFormat;svg.attr("viewBox",`0 0 ${svgWidth} ${svgHeight}`),configureSvgSize(svg,svgHeight,svgWidth,config.useMaxWidth);try{const formatStr=config.valueFormat||",";if("$0,0"===formatStr)valueFormat=__name(value=>"$"+format(",")(value),"valueFormat");else if(formatStr.startsWith("$")&&formatStr.includes(",")){const precision=/\.\d+/.exec(formatStr),precisionStr=precision?precision[0]:"";valueFormat=__name(value=>"$"+format(","+precisionStr)(value),"valueFormat")}else if(formatStr.startsWith("$")){const restOfFormat=formatStr.substring(1);valueFormat=__name(value=>"$"+format(restOfFormat||"")(value),"valueFormat")}else valueFormat=format(formatStr)}catch(error){log.error("Error creating format function:",error),valueFormat=format(",")}const colorScale=ordinal().range(["transparent",themeVariables.cScale0,themeVariables.cScale1,themeVariables.cScale2,themeVariables.cScale3,themeVariables.cScale4,themeVariables.cScale5,themeVariables.cScale6,themeVariables.cScale7,themeVariables.cScale8,themeVariables.cScale9,themeVariables.cScale10,themeVariables.cScale11]),colorScalePeer=ordinal().range(["transparent",themeVariables.cScalePeer0,themeVariables.cScalePeer1,themeVariables.cScalePeer2,themeVariables.cScalePeer3,themeVariables.cScalePeer4,themeVariables.cScalePeer5,themeVariables.cScalePeer6,themeVariables.cScalePeer7,themeVariables.cScalePeer8,themeVariables.cScalePeer9,themeVariables.cScalePeer10,themeVariables.cScalePeer11]),colorScaleLabel=ordinal().range([themeVariables.cScaleLabel0,themeVariables.cScaleLabel1,themeVariables.cScaleLabel2,themeVariables.cScaleLabel3,themeVariables.cScaleLabel4,themeVariables.cScaleLabel5,themeVariables.cScaleLabel6,themeVariables.cScaleLabel7,themeVariables.cScaleLabel8,themeVariables.cScaleLabel9,themeVariables.cScaleLabel10,themeVariables.cScaleLabel11]);title&&svg.append("text").attr("x",svgWidth/2).attr("y",titleHeight/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(title);const g=svg.append("g").attr("transform",`translate(0, ${titleHeight})`).attr("class","treemapContainer"),hierarchyRoot=hierarchy(root).sum(d=>d.value??0).sort((a,b)=>(b.value??0)-(a.value??0)),treemapData=treemap().size([width,height]).paddingTop(d=>d.children&&d.children.length>0?35:0).paddingInner(treemapInnerPadding).paddingLeft(d=>d.children&&d.children.length>0?10:0).paddingRight(d=>d.children&&d.children.length>0?10:0).paddingBottom(d=>d.children&&d.children.length>0?10:0).round(!0)(hierarchyRoot),branchNodes=treemapData.descendants().filter(d=>d.children&&d.children.length>0),sections=g.selectAll(".treemapSection").data(branchNodes).enter().append("g").attr("class","treemapSection").attr("transform",d=>`translate(${d.x0},${d.y0})`);sections.append("rect").attr("width",d=>d.x1-d.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",d=>0===d.depth?"display: none;":""),sections.append("clipPath").attr("id",(_d,i)=>`clip-section-${id}-${i}`).append("rect").attr("width",d=>Math.max(0,d.x1-d.x0-12)).attr("height",25),sections.append("rect").attr("width",d=>d.x1-d.x0).attr("height",d=>d.y1-d.y0).attr("class",(_d,i)=>`treemapSection section${i}`).attr("fill",d=>colorScale(d.data.name)).attr("fill-opacity",.6).attr("stroke",d=>colorScalePeer(d.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",d=>{if(0===d.depth)return"display: none;";const styles=styles2String({cssCompiledStyles:d.data.cssCompiledStyles});return styles.nodeStyles+";"+styles.borderStyles.join(";")}),sections.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(d=>0===d.depth?"":d.data.name).attr("font-weight","bold").attr("style",d=>{if(0===d.depth)return"display: none;";return"dominant-baseline: middle; font-size: 12px; fill:"+colorScaleLabel(d.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+styles2String({cssCompiledStyles:d.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")}).each(function(d){if(0===d.depth)return;const self=select(this),originalText=d.data.name;self.text(originalText);const totalHeaderWidth=d.x1-d.x0;let spaceForTextContent;if(!1!==config.showValues&&d.value){spaceForTextContent=totalHeaderWidth-10-30-10-6}else{spaceForTextContent=totalHeaderWidth-6-6}const actualAvailableWidth=Math.max(15,spaceForTextContent),textNode=self.node();if(textNode.getComputedTextLength()>actualAvailableWidth){const ellipsis="...";let currentTruncatedText=originalText;for(;currentTruncatedText.length>0;){if(currentTruncatedText=originalText.substring(0,currentTruncatedText.length-1),0===currentTruncatedText.length){self.text(ellipsis),textNode.getComputedTextLength()>actualAvailableWidth&&self.text("");break}if(self.text(currentTruncatedText+ellipsis),textNode.getComputedTextLength()<=actualAvailableWidth)break}}}),!1!==config.showValues&&sections.append("text").attr("class","treemapSectionValue").attr("x",d=>d.x1-d.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(d=>d.value?valueFormat(d.value):"").attr("font-style","italic").attr("style",d=>{if(0===d.depth)return"display: none;";return"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+colorScaleLabel(d.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+styles2String({cssCompiledStyles:d.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")});const leafNodes=treemapData.leaves(),cell=g.selectAll(".treemapLeafGroup").data(leafNodes).enter().append("g").attr("class",(d,i)=>`treemapNode treemapLeafGroup leaf${i}${d.data.classSelector?` ${d.data.classSelector}`:""}x`).attr("transform",d=>`translate(${d.x0},${d.y0})`);cell.append("rect").attr("width",d=>d.x1-d.x0).attr("height",d=>d.y1-d.y0).attr("class","treemapLeaf").attr("fill",d=>d.parent?colorScale(d.parent.data.name):colorScale(d.data.name)).attr("style",d=>styles2String({cssCompiledStyles:d.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",d=>d.parent?colorScale(d.parent.data.name):colorScale(d.data.name)).attr("stroke-width",3),cell.append("clipPath").attr("id",(_d,i)=>`clip-${id}-${i}`).append("rect").attr("width",d=>Math.max(0,d.x1-d.x0-4)).attr("height",d=>Math.max(0,d.y1-d.y0-4));if(cell.append("text").attr("class","treemapLabel").attr("x",d=>(d.x1-d.x0)/2).attr("y",d=>(d.y1-d.y0)/2).attr("style",d=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+colorScaleLabel(d.data.name)+";"+styles2String({cssCompiledStyles:d.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(_d,i)=>`url(#clip-${id}-${i})`).text(d=>d.data.name).each(function(d){const self=select(this),nodeWidth=d.x1-d.x0,nodeHeight=d.y1-d.y0,textNode=self.node(),availableWidth=nodeWidth-8,availableHeight=nodeHeight-8;if(availableWidth<10||availableHeight<10)return void self.style("display","none");let currentLabelFontSize=parseInt(self.style("font-size"),10);for(;textNode.getComputedTextLength()>availableWidth&&currentLabelFontSize>8;)currentLabelFontSize--,self.style("font-size",`${currentLabelFontSize}px`);let prospectiveValueFontSize=Math.max(6,Math.min(28,Math.round(.6*currentLabelFontSize))),combinedHeight=currentLabelFontSize+2+prospectiveValueFontSize;for(;combinedHeight>availableHeight&&currentLabelFontSize>8&&(currentLabelFontSize--,prospectiveValueFontSize=Math.max(6,Math.min(28,Math.round(.6*currentLabelFontSize))),!(prospectiveValueFontSize<6&&8===currentLabelFontSize));)self.style("font-size",`${currentLabelFontSize}px`),combinedHeight=currentLabelFontSize+2+prospectiveValueFontSize;self.style("font-size",`${currentLabelFontSize}px`),(textNode.getComputedTextLength()>availableWidth||currentLabelFontSize<8||availableHeight<currentLabelFontSize)&&self.style("display","none")}),!1!==config.showValues){cell.append("text").attr("class","treemapValue").attr("x",d=>(d.x1-d.x0)/2).attr("y",function(d){return(d.y1-d.y0)/2}).attr("style",d=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+colorScaleLabel(d.data.name)+";"+styles2String({cssCompiledStyles:d.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(_d,i)=>`url(#clip-${id}-${i})`).text(d=>d.value?valueFormat(d.value):"").each(function(d){const valueTextElement=select(this),parentCellNode=this.parentNode;if(!parentCellNode)return void valueTextElement.style("display","none");const labelElement=select(parentCellNode).select(".treemapLabel");if(labelElement.empty()||"none"===labelElement.style("display"))return void valueTextElement.style("display","none");const finalLabelFontSize=parseFloat(labelElement.style("font-size")),actualValueFontSize=Math.max(6,Math.min(28,Math.round(.6*finalLabelFontSize)));valueTextElement.style("font-size",`${actualValueFontSize}px`);const valueTopActualY=(d.y1-d.y0)/2+finalLabelFontSize/2+2;valueTextElement.attr("y",valueTopActualY);const nodeWidth=d.x1-d.x0,maxValueBottomY=d.y1-d.y0-4,availableWidthForValue=nodeWidth-8;valueTextElement.node().getComputedTextLength()>availableWidthForValue||valueTopActualY+actualValueFontSize>maxValueBottomY||actualValueFontSize<6?valueTextElement.style("display","none"):valueTextElement.style("display",null)})}const diagramPadding=config.diagramPadding??8;setupViewPortForSVG(svg,diagramPadding,"flowchart",(null==config?void 0:config.useMaxWidth)||!1)},"draw"),getClasses:__name(function(_text,diagramObj){return diagramObj.db.getClasses()},"getClasses")},defaultTreemapStyleOptions={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},styles_default=__name(({treemap:treemap2}={})=>{const defaultThemeVariables=getThemeVariables3(),currentConfig=getConfig(),themeVariables=cleanAndMerge(defaultThemeVariables,currentConfig.themeVariables),options=cleanAndMerge(defaultTreemapStyleOptions,treemap2),titleColor=options.titleColor??themeVariables.titleColor,labelColor=options.labelColor??themeVariables.textColor,valueColor=options.valueColor??themeVariables.textColor;return`\n .treemapNode.section {\n stroke: ${options.sectionStrokeColor};\n stroke-width: ${options.sectionStrokeWidth};\n fill: ${options.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${options.leafStrokeColor};\n stroke-width: ${options.leafStrokeWidth};\n fill: ${options.leafFillColor};\n }\n .treemapLabel {\n fill: ${labelColor};\n font-size: ${options.labelFontSize};\n }\n .treemapValue {\n fill: ${valueColor};\n font-size: ${options.valueFontSize};\n }\n .treemapTitle {\n fill: ${titleColor};\n font-size: ${options.titleFontSize};\n }\n `},"getStyles"),diagram={parser:parser,get db(){return new TreeMapDB},renderer:renderer,styles:styles_default};export{diagram};
@@ -0,0 +1 @@
1
+ import{s as setAccDescription,g as getAccDescription,q as getDiagramTitle,p as setDiagramTitle,a as getAccTitle,b as setAccTitle,_ as __name,H as selectSvgElement,y as clear,E as cleanAndMerge,F as defaultConfig_default,C as getConfig,l as log,I as getThemeVariables3,e as configureSvgSize}from"./mermaid.core-DaRhWNVu.js";import{p as populateCommonDb}from"./chunk-4BX2VUAB-CEnrJ8lf.js";import{p as parse}from"./wardley-RL74JXVD-D8p4v9Ts.js";import"./index-Cg7laj9Y.js";import"./vendor-codemirror-CXzpjiCu.js";import"./vendor-antd-n6I8Q8WX.js";import"./vendor-markdown-Bpu4AByL.js";import"./min-CYyUMv00.js";import"./_baseUniq-ob5WCjfq.js";var defaultOptions={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},defaultRadarData={axes:[],curves:[],options:defaultOptions},data=structuredClone(defaultRadarData),DEFAULT_RADAR_CONFIG=defaultConfig_default.radar,getConfig2=__name(()=>cleanAndMerge({...DEFAULT_RADAR_CONFIG,...getConfig().radar}),"getConfig"),getAxes=__name(()=>data.axes,"getAxes"),getCurves=__name(()=>data.curves,"getCurves"),getOptions=__name(()=>data.options,"getOptions"),setAxes=__name(axes=>{data.axes=axes.map(axis=>({name:axis.name,label:axis.label??axis.name}))},"setAxes"),setCurves=__name(curves=>{data.curves=curves.map(curve=>({name:curve.name,label:curve.label??curve.name,entries:computeCurveEntries(curve.entries)}))},"setCurves"),computeCurveEntries=__name(entries=>{if(null==entries[0].axis)return entries.map(entry=>entry.value);const axes=getAxes();if(0===axes.length)throw new Error("Axes must be populated before curves for reference entries");return axes.map(axis=>{const entry=entries.find(entry2=>{var _a;return(null==(_a=entry2.axis)?void 0:_a.$refText)===axis.name});if(void 0===entry)throw new Error("Missing entry for axis "+axis.label);return entry.value})},"computeCurveEntries"),db={getAxes:getAxes,getCurves:getCurves,getOptions:getOptions,setAxes:setAxes,setCurves:setCurves,setOptions:__name(options=>{var _a,_b,_c,_d,_e;const optionMap=options.reduce((acc,option)=>(acc[option.name]=option,acc),{});data.options={showLegend:(null==(_a=optionMap.showLegend)?void 0:_a.value)??defaultOptions.showLegend,ticks:(null==(_b=optionMap.ticks)?void 0:_b.value)??defaultOptions.ticks,max:(null==(_c=optionMap.max)?void 0:_c.value)??defaultOptions.max,min:(null==(_d=optionMap.min)?void 0:_d.value)??defaultOptions.min,graticule:(null==(_e=optionMap.graticule)?void 0:_e.value)??defaultOptions.graticule}},"setOptions"),getConfig:getConfig2,clear:__name(()=>{clear(),data=structuredClone(defaultRadarData)},"clear"),setAccTitle:setAccTitle,getAccTitle:getAccTitle,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle,getAccDescription:getAccDescription,setAccDescription:setAccDescription},populate=__name(ast=>{populateCommonDb(ast,db);const{axes:axes,curves:curves,options:options}=ast;db.setAxes(axes),db.setCurves(curves),db.setOptions(options)},"populate"),parser={parse:__name(async input=>{const ast=await parse("radar",input);log.debug(ast),populate(ast)},"parse")},draw=__name((_text,id,_version,diagram2)=>{const db2=diagram2.db,axes=db2.getAxes(),curves=db2.getCurves(),options=db2.getOptions(),config=db2.getConfig(),title=db2.getDiagramTitle(),svg=selectSvgElement(id),g=drawFrame(svg,config),maxValue=options.max??Math.max(...curves.map(curve=>Math.max(...curve.entries))),minValue=options.min,radius=Math.min(config.width,config.height)/2;drawGraticule(g,axes,radius,options.ticks,options.graticule),drawAxes(g,axes,radius,config),drawCurves(g,axes,curves,minValue,maxValue,options.graticule,config),drawLegend(g,curves,options.showLegend,config),g.append("text").attr("class","radarTitle").text(title).attr("x",0).attr("y",-config.height/2-config.marginTop)},"draw"),drawFrame=__name((svg,config)=>{const totalWidth=config.width+config.marginLeft+config.marginRight,totalHeight=config.height+config.marginTop+config.marginBottom,center_x=config.marginLeft+config.width/2,center_y=config.marginTop+config.height/2;return configureSvgSize(svg,totalHeight,totalWidth,config.useMaxWidth??!0),svg.attr("viewBox",`0 0 ${totalWidth} ${totalHeight}`),svg.append("g").attr("transform",`translate(${center_x}, ${center_y})`)},"drawFrame"),drawGraticule=__name((g,axes,radius,ticks,graticule)=>{if("circle"===graticule)for(let i=0;i<ticks;i++){const r=radius*(i+1)/ticks;g.append("circle").attr("r",r).attr("class","radarGraticule")}else if("polygon"===graticule){const numAxes=axes.length;for(let i=0;i<ticks;i++){const r=radius*(i+1)/ticks,points=axes.map((_,j)=>{const angle=2*j*Math.PI/numAxes-Math.PI/2;return`${r*Math.cos(angle)},${r*Math.sin(angle)}`}).join(" ");g.append("polygon").attr("points",points).attr("class","radarGraticule")}}},"drawGraticule"),drawAxes=__name((g,axes,radius,config)=>{const numAxes=axes.length;for(let i=0;i<numAxes;i++){const label=axes[i].label,angle=2*i*Math.PI/numAxes-Math.PI/2;g.append("line").attr("x1",0).attr("y1",0).attr("x2",radius*config.axisScaleFactor*Math.cos(angle)).attr("y2",radius*config.axisScaleFactor*Math.sin(angle)).attr("class","radarAxisLine"),g.append("text").text(label).attr("x",radius*config.axisLabelFactor*Math.cos(angle)).attr("y",radius*config.axisLabelFactor*Math.sin(angle)).attr("class","radarAxisLabel")}},"drawAxes");function drawCurves(g,axes,curves,minValue,maxValue,graticule,config){const numAxes=axes.length,radius=Math.min(config.width,config.height)/2;curves.forEach((curve,index)=>{if(curve.entries.length!==numAxes)return;const points=curve.entries.map((entry,i)=>{const angle=2*Math.PI*i/numAxes-Math.PI/2,r=relativeRadius(entry,minValue,maxValue,radius);return{x:r*Math.cos(angle),y:r*Math.sin(angle)}});"circle"===graticule?g.append("path").attr("d",closedRoundCurve(points,config.curveTension)).attr("class",`radarCurve-${index}`):"polygon"===graticule&&g.append("polygon").attr("points",points.map(p=>`${p.x},${p.y}`).join(" ")).attr("class",`radarCurve-${index}`)})}function relativeRadius(value,minValue,maxValue,radius){return radius*(Math.min(Math.max(value,minValue),maxValue)-minValue)/(maxValue-minValue)}function closedRoundCurve(points,tension){const numPoints=points.length;let d=`M${points[0].x},${points[0].y}`;for(let i=0;i<numPoints;i++){const p0=points[(i-1+numPoints)%numPoints],p1=points[i],p2=points[(i+1)%numPoints],p3=points[(i+2)%numPoints],cp1={x:p1.x+(p2.x-p0.x)*tension,y:p1.y+(p2.y-p0.y)*tension},cp2={x:p2.x-(p3.x-p1.x)*tension,y:p2.y-(p3.y-p1.y)*tension};d+=` C${cp1.x},${cp1.y} ${cp2.x},${cp2.y} ${p2.x},${p2.y}`}return`${d} Z`}function drawLegend(g,curves,showLegend,config){if(!showLegend)return;const legendX=3*(config.width/2+config.marginRight)/4,legendY=3*-(config.height/2+config.marginTop)/4;curves.forEach((curve,index)=>{const itemGroup=g.append("g").attr("transform",`translate(${legendX}, ${legendY+20*index})`);itemGroup.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${index}`),itemGroup.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(curve.label)})}__name(drawCurves,"drawCurves"),__name(relativeRadius,"relativeRadius"),__name(closedRoundCurve,"closedRoundCurve"),__name(drawLegend,"drawLegend");var renderer={draw:draw},genIndexStyles=__name((themeVariables,radarOptions)=>{let sections="";for(let i=0;i<themeVariables.THEME_COLOR_LIMIT;i++){const indexColor=themeVariables[`cScale${i}`];sections+=`\n\t\t.radarCurve-${i} {\n\t\t\tcolor: ${indexColor};\n\t\t\tfill: ${indexColor};\n\t\t\tfill-opacity: ${radarOptions.curveOpacity};\n\t\t\tstroke: ${indexColor};\n\t\t\tstroke-width: ${radarOptions.curveStrokeWidth};\n\t\t}\n\t\t.radarLegendBox-${i} {\n\t\t\tfill: ${indexColor};\n\t\t\tfill-opacity: ${radarOptions.curveOpacity};\n\t\t\tstroke: ${indexColor};\n\t\t}\n\t\t`}return sections},"genIndexStyles"),buildRadarStyleOptions=__name(radar=>{const defaultThemeVariables=getThemeVariables3(),currentConfig=getConfig(),themeVariables=cleanAndMerge(defaultThemeVariables,currentConfig.themeVariables);return{themeVariables:themeVariables,radarOptions:cleanAndMerge(themeVariables.radar,radar)}},"buildRadarStyleOptions"),diagram={parser:parser,db:db,renderer:renderer,styles:__name(({radar:radar}={})=>{const{themeVariables:themeVariables,radarOptions:radarOptions}=buildRadarStyleOptions(radar);return`\n\t.radarTitle {\n\t\tfont-size: ${themeVariables.fontSize};\n\t\tcolor: ${themeVariables.titleColor};\n\t\tdominant-baseline: hanging;\n\t\ttext-anchor: middle;\n\t}\n\t.radarAxisLine {\n\t\tstroke: ${radarOptions.axisColor};\n\t\tstroke-width: ${radarOptions.axisStrokeWidth};\n\t}\n\t.radarAxisLabel {\n\t\tdominant-baseline: middle;\n\t\ttext-anchor: middle;\n\t\tfont-size: ${radarOptions.axisLabelFontSize}px;\n\t\tcolor: ${radarOptions.axisColor};\n\t}\n\t.radarGraticule {\n\t\tfill: ${radarOptions.graticuleColor};\n\t\tfill-opacity: ${radarOptions.graticuleOpacity};\n\t\tstroke: ${radarOptions.graticuleColor};\n\t\tstroke-width: ${radarOptions.graticuleStrokeWidth};\n\t}\n\t.radarLegendText {\n\t\ttext-anchor: start;\n\t\tfont-size: ${radarOptions.legendFontSize}px;\n\t\tdominant-baseline: hanging;\n\t}\n\t${genIndexStyles(themeVariables,radarOptions)}\n\t`},"styles")};export{diagram};
@@ -0,0 +1 @@
1
+ var _a;import{_ as __name,E as cleanAndMerge,H as selectSvgElement,e as configureSvgSize,l as log,b as setAccTitle,a as getAccTitle,p as setDiagramTitle,q as getDiagramTitle,g as getAccDescription,s as setAccDescription,F as defaultConfig_default,C as getConfig,y as clear}from"./mermaid.core-DaRhWNVu.js";import{p as populateCommonDb}from"./chunk-4BX2VUAB-CEnrJ8lf.js";import{p as parse}from"./wardley-RL74JXVD-D8p4v9Ts.js";import"./index-Cg7laj9Y.js";import"./vendor-codemirror-CXzpjiCu.js";import"./vendor-antd-n6I8Q8WX.js";import"./vendor-markdown-Bpu4AByL.js";import"./min-CYyUMv00.js";import"./_baseUniq-ob5WCjfq.js";var DEFAULT_PACKET_CONFIG=defaultConfig_default.packet,PacketDB=(__name(_a=class{constructor(){this.packet=[],this.setAccTitle=setAccTitle,this.getAccTitle=getAccTitle,this.setDiagramTitle=setDiagramTitle,this.getDiagramTitle=getDiagramTitle,this.getAccDescription=getAccDescription,this.setAccDescription=setAccDescription}getConfig(){const config=cleanAndMerge({...DEFAULT_PACKET_CONFIG,...getConfig().packet});return config.showBits&&(config.paddingY+=10),config}getPacket(){return this.packet}pushWord(word){word.length>0&&this.packet.push(word)}clear(){clear(),this.packet=[]}},"PacketDB"),_a),populate=__name((ast,db)=>{populateCommonDb(ast,db);let lastBit=-1,word=[],row=1;const{bitsPerRow:bitsPerRow}=db.getConfig();for(let{start:start,end:end,bits:bits,label:label}of ast.blocks){if(void 0!==start&&void 0!==end&&end<start)throw new Error(`Packet block ${start} - ${end} is invalid. End must be greater than start.`);if(start??(start=lastBit+1),start!==lastBit+1)throw new Error(`Packet block ${start} - ${end??start} is not contiguous. It should start from ${lastBit+1}.`);if(0===bits)throw new Error(`Packet block ${start} is invalid. Cannot have a zero bit field.`);for(end??(end=start+(bits??1)-1),bits??(bits=end-start+1),lastBit=end,log.debug(`Packet block ${start} - ${lastBit} with label ${label}`);word.length<=bitsPerRow+1&&db.getPacket().length<1e4;){const[block,nextBlock]=getNextFittingBlock({start:start,end:end,bits:bits,label:label},row,bitsPerRow);if(word.push(block),block.end+1===row*bitsPerRow&&(db.pushWord(word),word=[],row++),!nextBlock)break;({start:start,end:end,bits:bits,label:label}=nextBlock)}}db.pushWord(word)},"populate"),getNextFittingBlock=__name((block,row,bitsPerRow)=>{if(void 0===block.start)throw new Error("start should have been set during first phase");if(void 0===block.end)throw new Error("end should have been set during first phase");if(block.start>block.end)throw new Error(`Block start ${block.start} is greater than block end ${block.end}.`);if(block.end+1<=row*bitsPerRow)return[block,void 0];const rowEnd=row*bitsPerRow-1,rowStart=row*bitsPerRow;return[{start:block.start,end:rowEnd,label:block.label,bits:rowEnd-block.start},{start:rowStart,end:block.end,label:block.label,bits:block.end-rowStart}]},"getNextFittingBlock"),parser={parser:{yy:void 0},parse:__name(async input=>{var _a2;const ast=await parse("packet",input),db=null==(_a2=parser.parser)?void 0:_a2.yy;if(!(db instanceof PacketDB))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");log.debug(ast),populate(ast,db)},"parse")},draw=__name((_text,id,_version,diagram2)=>{const db=diagram2.db,config=db.getConfig(),{rowHeight:rowHeight,paddingY:paddingY,bitWidth:bitWidth,bitsPerRow:bitsPerRow}=config,words=db.getPacket(),title=db.getDiagramTitle(),totalRowHeight=rowHeight+paddingY,svgHeight=totalRowHeight*(words.length+1)-(title?0:rowHeight),svgWidth=bitWidth*bitsPerRow+2,svg=selectSvgElement(id);svg.attr("viewBox",`0 0 ${svgWidth} ${svgHeight}`),configureSvgSize(svg,svgHeight,svgWidth,config.useMaxWidth);for(const[word,packet]of words.entries())drawWord(svg,packet,word,config);svg.append("text").text(title).attr("x",svgWidth/2).attr("y",svgHeight-totalRowHeight/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),drawWord=__name((svg,word,rowNumber,{rowHeight:rowHeight,paddingX:paddingX,paddingY:paddingY,bitWidth:bitWidth,bitsPerRow:bitsPerRow,showBits:showBits})=>{const group=svg.append("g"),wordY=rowNumber*(rowHeight+paddingY)+paddingY;for(const block of word){const blockX=block.start%bitsPerRow*bitWidth+1,width=(block.end-block.start+1)*bitWidth-paddingX;if(group.append("rect").attr("x",blockX).attr("y",wordY).attr("width",width).attr("height",rowHeight).attr("class","packetBlock"),group.append("text").attr("x",blockX+width/2).attr("y",wordY+rowHeight/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(block.label),!showBits)continue;const isSingleBlock=block.end===block.start,bitNumberY=wordY-2;group.append("text").attr("x",blockX+(isSingleBlock?width/2:0)).attr("y",bitNumberY).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",isSingleBlock?"middle":"start").text(block.start),isSingleBlock||group.append("text").attr("x",blockX+width).attr("y",bitNumberY).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(block.end)}},"drawWord"),renderer={draw:draw},defaultPacketStyleOptions={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},styles=__name(({packet:packet}={})=>{const options=cleanAndMerge(defaultPacketStyleOptions,packet);return`\n\t.packetByte {\n\t\tfont-size: ${options.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${options.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${options.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${options.labelColor};\n\t\tfont-size: ${options.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${options.titleColor};\n\t\tfont-size: ${options.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${options.blockStrokeColor};\n\t\tstroke-width: ${options.blockStrokeWidth};\n\t\tfill: ${options.blockFillColor};\n\t}\n\t`},"styles"),diagram={parser:parser,get db(){return new PacketDB},renderer:renderer,styles:styles};export{diagram};
@@ -0,0 +1 @@
1
+ var _a;import{g as getDiagramElement}from"./chunk-55IACEB6-blt2QS_L.js";import{s as setupViewPortForSVG}from"./chunk-EDXVE4YY-CJab02SL.js";import{_ as __name,b as setAccTitle,a as getAccTitle,s as setAccDescription,g as getAccDescription,p as setDiagramTitle,q as getDiagramTitle,c as getConfig2,l as log,y as clear,x as getEdgeId,A as rgba,B as __export,o as getRegisteredLayoutAlgorithm,r as render,d as select,u as utils_default}from"./mermaid.core-DaRhWNVu.js";import{c as channel}from"./channel-yPGVmk7J.js";import"./index-Cg7laj9Y.js";import"./vendor-codemirror-CXzpjiCu.js";import"./vendor-antd-n6I8Q8WX.js";import"./vendor-markdown-Bpu4AByL.js";var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],$V1=[1,10],$V2=[1,11],$V3=[1,12],$V4=[1,13],$V5=[1,23],$V6=[1,24],$V7=[1,25],$V8=[1,26],$V9=[1,27],$Va=[1,19],$Vb=[1,28],$Vc=[1,29],$Vd=[1,20],$Ve=[1,18],$Vf=[1,21],$Vg=[1,22],$Vh=[1,36],$Vi=[1,37],$Vj=[1,38],$Vk=[1,39],$Vl=[1,40],$Vm=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],$Vn=[1,45],$Vo=[1,46],$Vp=[1,55],$Vq=[40,48,50,51,52,70,71],$Vr=[1,66],$Vs=[1,64],$Vt=[1,61],$Vu=[1,65],$Vv=[1,67],$Vw=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],$Vx=[65,66,67,68,69],$Vy=[1,84],$Vz=[1,83],$VA=[1,81],$VB=[1,82],$VC=[6,10,42,47],$VD=[6,10,13,41,42,47,48,49],$VE=[1,92],$VF=[1,91],$VG=[1,90],$VH=[19,58],$VI=[1,101],$VJ=[1,100],$VK=[19,58,60,62],parser2={trace:__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:$$[$0-1].push($$[$0]),this.$=$$[$0-1];break;case 4:case 5:case 55:case 56:case 57:case 58:case 81:case 65:case 66:case 69:this.$=$$[$0];break;case 8:yy.addEntity($$[$0-4]),yy.addEntity($$[$0-2]),yy.addRelationship($$[$0-4],$$[$0],$$[$0-2],$$[$0-3]);break;case 9:yy.addEntity($$[$0-8]),yy.addEntity($$[$0-4]),yy.addRelationship($$[$0-8],$$[$0],$$[$0-4],$$[$0-5]),yy.setClass([$$[$0-8]],$$[$0-6]),yy.setClass([$$[$0-4]],$$[$0-2]);break;case 10:yy.addEntity($$[$0-6]),yy.addEntity($$[$0-2]),yy.addRelationship($$[$0-6],$$[$0],$$[$0-2],$$[$0-3]),yy.setClass([$$[$0-6]],$$[$0-4]);break;case 11:yy.addEntity($$[$0-6]),yy.addEntity($$[$0-4]),yy.addRelationship($$[$0-6],$$[$0],$$[$0-4],$$[$0-5]),yy.setClass([$$[$0-4]],$$[$0-2]);break;case 12:yy.addEntity($$[$0-3]),yy.addAttributes($$[$0-3],$$[$0-1]);break;case 13:yy.addEntity($$[$0-5]),yy.addAttributes($$[$0-5],$$[$0-1]),yy.setClass([$$[$0-5]],$$[$0-3]);break;case 14:yy.addEntity($$[$0-2]);break;case 15:yy.addEntity($$[$0-4]),yy.setClass([$$[$0-4]],$$[$0-2]);break;case 16:yy.addEntity($$[$0]);break;case 17:yy.addEntity($$[$0-2]),yy.setClass([$$[$0-2]],$$[$0]);break;case 18:yy.addEntity($$[$0-6],$$[$0-4]),yy.addAttributes($$[$0-6],$$[$0-1]);break;case 19:yy.addEntity($$[$0-8],$$[$0-6]),yy.addAttributes($$[$0-8],$$[$0-1]),yy.setClass([$$[$0-8]],$$[$0-3]);break;case 20:yy.addEntity($$[$0-5],$$[$0-3]);break;case 21:yy.addEntity($$[$0-7],$$[$0-5]),yy.setClass([$$[$0-7]],$$[$0-2]);break;case 22:yy.addEntity($$[$0-3],$$[$0-1]);break;case 23:yy.addEntity($$[$0-5],$$[$0-3]),yy.setClass([$$[$0-5]],$$[$0]);break;case 24:case 25:this.$=$$[$0].trim(),yy.setAccTitle(this.$);break;case 26:case 27:this.$=$$[$0].trim(),yy.setAccDescription(this.$);break;case 32:yy.setDirection("TB");break;case 33:yy.setDirection("BT");break;case 34:yy.setDirection("RL");break;case 35:yy.setDirection("LR");break;case 36:this.$=$$[$0-3],yy.addClass($$[$0-2],$$[$0-1]);break;case 37:case 38:case 59:case 67:case 43:this.$=[$$[$0]];break;case 39:case 40:this.$=$$[$0-2].concat([$$[$0]]);break;case 41:this.$=$$[$0-2],yy.setClass($$[$0-1],$$[$0]);break;case 42:this.$=$$[$0-3],yy.addCssStyles($$[$0-2],$$[$0-1]);break;case 44:case 68:$$[$0-2].push($$[$0]),this.$=$$[$0-2];break;case 46:this.$=$$[$0-1]+$$[$0];break;case 54:case 79:case 80:case 70:this.$=$$[$0].replace(/"/g,"");break;case 60:$$[$0].push($$[$0-1]),this.$=$$[$0];break;case 61:this.$={type:$$[$0-1],name:$$[$0]};break;case 62:this.$={type:$$[$0-2],name:$$[$0-1],keys:$$[$0]};break;case 63:this.$={type:$$[$0-2],name:$$[$0-1],comment:$$[$0]};break;case 64:this.$={type:$$[$0-3],name:$$[$0-2],keys:$$[$0-1],comment:$$[$0]};break;case 71:this.$={cardA:$$[$0],relType:$$[$0-1],cardB:$$[$0-2]};break;case 72:this.$=yy.Cardinality.ZERO_OR_ONE;break;case 73:this.$=yy.Cardinality.ZERO_OR_MORE;break;case 74:this.$=yy.Cardinality.ONE_OR_MORE;break;case 75:this.$=yy.Cardinality.ONLY_ONE;break;case 76:this.$=yy.Cardinality.MD_PARENT;break;case 77:this.$=yy.Identification.NON_IDENTIFYING;break;case 78:this.$=yy.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:$V1,24:$V2,26:$V3,28:$V4,29:14,30:15,31:16,32:17,33:$V5,34:$V6,35:$V7,36:$V8,37:$V9,40:$Va,43:$Vb,44:$Vc,48:$Vd,50:$Ve,51:$Vf,52:$Vg},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:30,11:9,22:$V1,24:$V2,26:$V3,28:$V4,29:14,30:15,31:16,32:17,33:$V5,34:$V6,35:$V7,36:$V8,37:$V9,40:$Va,43:$Vb,44:$Vc,48:$Vd,50:$Ve,51:$Vf,52:$Vg},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:$Vh,66:$Vi,67:$Vj,68:$Vk,69:$Vl}),{23:[1,41]},{25:[1,42]},{27:[1,43]},o($V0,[2,27]),o($V0,[2,28]),o($V0,[2,29]),o($V0,[2,30]),o($V0,[2,31]),o($Vm,[2,54]),o($Vm,[2,55]),o($Vm,[2,56]),o($Vm,[2,57]),o($Vm,[2,58]),o($V0,[2,32]),o($V0,[2,33]),o($V0,[2,34]),o($V0,[2,35]),{16:44,40:$Vn,41:$Vo},{16:47,40:$Vn,41:$Vo},{16:48,40:$Vn,41:$Vo},o($V0,[2,4]),{11:49,40:$Va,48:$Vd,50:$Ve,51:$Vf,52:$Vg},{16:50,40:$Vn,41:$Vo},{18:51,19:[1,52],53:53,54:54,58:$Vp},{11:56,40:$Va,48:$Vd,50:$Ve,51:$Vf,52:$Vg},{64:57,70:[1,58],71:[1,59]},o($Vq,[2,72]),o($Vq,[2,73]),o($Vq,[2,74]),o($Vq,[2,75]),o($Vq,[2,76]),o($V0,[2,24]),o($V0,[2,25]),o($V0,[2,26]),{13:$Vr,38:60,41:$Vs,42:$Vt,45:62,46:63,48:$Vu,49:$Vv},o($Vw,[2,37]),o($Vw,[2,38]),{16:68,40:$Vn,41:$Vo,42:$Vt},{13:$Vr,38:69,41:$Vs,42:$Vt,45:62,46:63,48:$Vu,49:$Vv},{13:[1,70],15:[1,71]},o($V0,[2,17],{63:35,12:72,17:[1,73],42:$Vt,65:$Vh,66:$Vi,67:$Vj,68:$Vk,69:$Vl}),{19:[1,74]},o($V0,[2,14]),{18:75,19:[2,59],53:53,54:54,58:$Vp},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:$Vh,66:$Vi,67:$Vj,68:$Vk,69:$Vl},o($Vx,[2,77]),o($Vx,[2,78]),{6:$Vy,10:$Vz,39:80,42:$VA,47:$VB},{40:[1,85],41:[1,86]},o($VC,[2,43],{46:87,13:$Vr,41:$Vs,48:$Vu,49:$Vv}),o($VD,[2,45]),o($VD,[2,50]),o($VD,[2,51]),o($VD,[2,52]),o($VD,[2,53]),o($V0,[2,41],{42:$Vt}),{6:$Vy,10:$Vz,39:88,42:$VA,47:$VB},{14:89,40:$VE,50:$VF,72:$VG},{16:93,40:$Vn,41:$Vo},{11:94,40:$Va,48:$Vd,50:$Ve,51:$Vf,52:$Vg},{18:95,19:[1,96],53:53,54:54,58:$Vp},o($V0,[2,12]),{19:[2,60]},o($VH,[2,61],{56:97,57:98,59:99,61:$VI,62:$VJ}),o([19,58,61,62],[2,66]),o($V0,[2,22],{15:[1,103],17:[1,102]}),o([40,48,50,51,52],[2,71]),o($V0,[2,36]),{13:$Vr,41:$Vs,45:104,46:63,48:$Vu,49:$Vv},o($V0,[2,47]),o($V0,[2,48]),o($V0,[2,49]),o($Vw,[2,39]),o($Vw,[2,40]),o($VD,[2,46]),o($V0,[2,42]),o($V0,[2,8]),o($V0,[2,79]),o($V0,[2,80]),o($V0,[2,81]),{13:[1,105],42:$Vt},{13:[1,107],15:[1,106]},{19:[1,108]},o($V0,[2,15]),o($VH,[2,62],{57:109,60:[1,110],62:$VJ}),o($VH,[2,63]),o($VK,[2,67]),o($VH,[2,70]),o($VK,[2,69]),{18:111,19:[1,112],53:53,54:54,58:$Vp},{16:113,40:$Vn,41:$Vo},o($VC,[2,44],{46:87,13:$Vr,41:$Vs,48:$Vu,49:$Vv}),{14:114,40:$VE,50:$VF,72:$VG},{16:115,40:$Vn,41:$Vo},{14:116,40:$VE,50:$VF,72:$VG},o($V0,[2,13]),o($VH,[2,64]),{59:117,61:$VI},{19:[1,118]},o($V0,[2,20]),o($V0,[2,23],{17:[1,119],42:$Vt}),o($V0,[2,11]),{13:[1,120],42:$Vt},o($V0,[2,10]),o($VK,[2,68]),o($V0,[2,18]),{18:121,19:[1,122],53:53,54:54,58:$Vp},{14:123,40:$VE,50:$VF,72:$VG},{19:[1,124]},o($V0,[2,21]),o($V0,[2,9]),o($V0,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:case 23:case 28:case 35:break;case 13:return 8;case 14:return 50;case 15:return 72;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:case 38:return 49;case 20:case 37:return 42;case 21:return 15;case 22:case 36:return 13;case 24:return 61;case 25:case 26:return 58;case 27:return 62;case 29:return this.popState(),19;case 30:case 77:return yy_.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 39:return this.begin("style"),37;case 40:return 43;case 41:case 45:case 46:case 64:return 65;case 42:case 43:case 44:case 52:case 54:case 66:return 67;case 47:case 48:case 49:case 50:case 51:case 53:case 65:return 66;case 55:case 56:case 58:case 59:case 60:case 63:return 68;case 57:return 51;case 61:return 52;case 62:return 48;case 67:return 69;case 68:case 71:case 72:case 73:return 70;case 69:case 70:return 71;case 74:return 41;case 75:return 47;case 76:return 40;case 78:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,74,75],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,76,77,78],inclusive:!0}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var erDiagram_default=parser,ErDB=(__name(_a=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=setAccTitle,this.getAccTitle=getAccTitle,this.setAccDescription=setAccDescription,this.getAccDescription=getAccDescription,this.setDiagramTitle=setDiagramTitle,this.getDiagramTitle=getDiagramTitle,this.getConfig=__name(()=>getConfig2().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}addEntity(name,alias=""){var _a2;return this.entities.has(name)?!(null==(_a2=this.entities.get(name))?void 0:_a2.alias)&&alias&&(this.entities.get(name).alias=alias,log.info(`Add alias '${alias}' to entity '${name}'`)):(this.entities.set(name,{id:`entity-${name}-${this.entities.size}`,label:name,attributes:[],alias:alias,shape:"erBox",look:getConfig2().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),log.info("Added new entity :",name)),this.entities.get(name)}getEntity(name){return this.entities.get(name)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(entityName,attribs){const entity=this.addEntity(entityName);let i;for(i=attribs.length-1;i>=0;i--)attribs[i].keys||(attribs[i].keys=[]),attribs[i].comment||(attribs[i].comment=""),entity.attributes.push(attribs[i]),log.debug("Added attribute ",attribs[i].name)}addRelationship(entA,rolA,entB,rSpec){const entityA=this.entities.get(entA),entityB=this.entities.get(entB);if(!entityA||!entityB)return;const rel={entityA:entityA.id,roleA:rolA,entityB:entityB.id,relSpec:rSpec};this.relationships.push(rel),log.debug("Added new relationship :",rel)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(dir){this.direction=dir}getCompiledStyles(classDefs){let compiledStyles=[];for(const customClass of classDefs){const cssClass=this.classes.get(customClass);(null==cssClass?void 0:cssClass.styles)&&(compiledStyles=[...compiledStyles,...cssClass.styles??[]].map(s=>s.trim())),(null==cssClass?void 0:cssClass.textStyles)&&(compiledStyles=[...compiledStyles,...cssClass.textStyles??[]].map(s=>s.trim()))}return compiledStyles}addCssStyles(ids,styles){for(const id of ids){const entity=this.entities.get(id);if(!styles||!entity)return;for(const style of styles)entity.cssStyles.push(style)}}addClass(ids,style){ids.forEach(id=>{let classNode=this.classes.get(id);void 0===classNode&&(classNode={id:id,styles:[],textStyles:[]},this.classes.set(id,classNode)),style&&style.forEach(function(s){if(/color/.exec(s)){const newStyle=s.replace("fill","bgFill");classNode.textStyles.push(newStyle)}classNode.styles.push(s)})})}setClass(ids,classNames){for(const id of ids){const entity=this.entities.get(id);if(entity)for(const className of classNames)entity.cssClasses+=" "+className}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],clear()}getData(){const nodes=[],edges=[],config=getConfig2();let colorIndex=0;for(const entityKey of this.entities.keys()){const entityNode=this.entities.get(entityKey);entityNode&&(entityNode.cssCompiledStyles=this.getCompiledStyles(entityNode.cssClasses.split(" ")),entityNode.colorIndex=colorIndex++,nodes.push(entityNode))}let count=0;for(const relationship of this.relationships){const edge={id:getEdgeId(relationship.entityA,relationship.entityB,{prefix:"id",counter:count++}),type:"normal",curve:"basis",start:relationship.entityA,end:relationship.entityB,label:relationship.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:relationship.relSpec.cardB.toLowerCase(),arrowTypeEnd:relationship.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==relationship.relSpec.relType?"solid":"dashed",look:config.look,labelType:"markdown"};edges.push(edge)}return{nodes:nodes,edges:edges,other:{},config:config,direction:"TB"}}},"ErDB"),_a),erRenderer_unified_exports={};__export(erRenderer_unified_exports,{draw:()=>draw});var draw=__name(async function(text,id,_version,diag){log.info("REF0:"),log.info("Drawing er diagram (unified)",id);const{securityLevel:securityLevel,er:conf,layout:layout}=getConfig2(),data4Layout=diag.db.getData(),svg=getDiagramElement(id,securityLevel);data4Layout.type=diag.type,data4Layout.layoutAlgorithm=getRegisteredLayoutAlgorithm(layout),data4Layout.config.flowchart.nodeSpacing=(null==conf?void 0:conf.nodeSpacing)||140,data4Layout.config.flowchart.rankSpacing=(null==conf?void 0:conf.rankSpacing)||80,data4Layout.direction=diag.db.getDirection();const{config:config}=data4Layout,{look:look}=config;data4Layout.markers="neo"===look?["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:["only_one","zero_or_one","one_or_more","zero_or_more"],data4Layout.diagramId=id,await render(data4Layout,svg),"elk"===data4Layout.layoutAlgorithm&&svg.select(".edges").lower();const backgroundNodes=svg.selectAll('[id*="-background"]');Array.from(backgroundNodes).length>0&&backgroundNodes.each(function(){const backgroundNode=select(this),nonBackgroundId=backgroundNode.attr("id").replace("-background",""),nonBackgroundNode=svg.select(`#${CSS.escape(nonBackgroundId)}`);if(!nonBackgroundNode.empty()){const transform=nonBackgroundNode.attr("transform");backgroundNode.attr("transform",transform)}});utils_default.insertTitle(svg,"erDiagramTitleText",(null==conf?void 0:conf.titleTopMargin)??25,diag.db.getDiagramTitle()),setupViewPortForSVG(svg,8,"erDiagram",(null==conf?void 0:conf.useMaxWidth)??!0)},"draw"),fade=__name((color,opacity)=>{const channel2=channel,r=channel2(color,"r"),g=channel2(color,"g"),b=channel2(color,"b");return rgba(r,g,b,opacity)},"fade"),COLOR_THEMES=new Set(["redux-color","redux-dark-color"]),genColor=__name(options=>{const{theme:theme,look:look,bkgColorArray:bkgColorArray,borderColorArray:borderColorArray}=options;if(!COLOR_THEMES.has(theme))return"";const hasBkgColors=(null==bkgColorArray?void 0:bkgColorArray.length)>0;let sections="";for(let i=0;i<options.THEME_COLOR_LIMIT;i++)sections+=`\n\n [data-look="${look}"][data-color-id="color-${i}"].node path {\n stroke: ${borderColorArray[i]};\n ${hasBkgColors?`fill: ${bkgColorArray[i]};`:""}\n }\n\n [data-look="${look}"][data-color-id="color-${i}"].node rect {\n stroke: ${borderColorArray[i]};\n ${hasBkgColors?`fill: ${bkgColorArray[i]};`:""}\n }\n `;return sections},"genColor"),styles_default=__name(options=>{const{look:look,theme:theme,erEdgeLabelBackground:erEdgeLabelBackground,strokeWidth:strokeWidth}=options;return`\n ${genColor(options)}\n .entityBox {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${options.tertiaryColor};\n opacity: 0.7;\n background-color: ${options.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .labelBkg {\n background-color: ${COLOR_THEMES.has(theme)&&erEdgeLabelBackground?erEdgeLabelBackground:fade(options.tertiaryColor,.5)};\n }\n\n .edgeLabel {\n background-color: ${COLOR_THEMES.has(theme)&&erEdgeLabelBackground?erEdgeLabelBackground:options.edgeLabelBackground};\n }\n .edgeLabel .label rect {\n fill: ${COLOR_THEMES.has(theme)&&erEdgeLabelBackground?erEdgeLabelBackground:options.edgeLabelBackground};\n }\n .edgeLabel .label text {\n fill: ${options.textColor};\n }\n\n .edgeLabel .label {\n fill: ${options.nodeBorder};\n font-size: 14px;\n }\n\n .label {\n font-family: ${options.fontFamily};\n color: ${options.nodeTextColor||options.textColor};\n }\n\n .edge-pattern-dashed {\n stroke-dasharray: 8,8;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon\n {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: ${"neo"===look?strokeWidth:"1px"};\n }\n\n .relationshipLine {\n stroke: ${options.lineColor};\n stroke-width: ${"neo"===look?strokeWidth:"1px"};\n fill: none;\n }\n\n .marker {\n fill: none !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n }\n [data-look=neo].labelBkg {\n background-color: ${fade(options.tertiaryColor,.5)};\n }\n`},"getStyles"),diagram={parser:erDiagram_default,get db(){return new ErDB},renderer:erRenderer_unified_exports,styles:styles_default};export{diagram};
@@ -0,0 +1 @@
1
+ var _a;import{g as getIconStyles}from"./chunk-FMBD7UC4-b2SvZGni.js";import{_ as __name,n as setConfig2,l as log,c as getConfig2,o as getRegisteredLayoutAlgorithm,r as render,u as utils_default,b as setAccTitle,s as setAccDescription,p as setDiagramTitle,a as getAccTitle,g as getAccDescription,q as getDiagramTitle,k as common_default,t as load,J as JSON_SCHEMA,v as isValidShape,x as getEdgeId,d as select,y as clear,z as defaultConfig2,A as rgba}from"./mermaid.core-DaRhWNVu.js";import{c as createTooltip}from"./chunk-YZCP3GAM-ntU--N7q.js";import{g as getDiagramElement}from"./chunk-55IACEB6-blt2QS_L.js";import{s as setupViewPortForSVG}from"./chunk-EDXVE4YY-CJab02SL.js";import{p as purify}from"./vendor-markdown-Bpu4AByL.js";import{c as channel}from"./channel-yPGVmk7J.js";import"./index-Cg7laj9Y.js";import"./vendor-codemirror-CXzpjiCu.js";import"./vendor-antd-n6I8Q8WX.js";var FlowDB=(__name(_a=class{constructor(){this.vertexCounter=0,this.config=getConfig2(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=setAccTitle,this.setAccDescription=setAccDescription,this.setDiagramTitle=setDiagramTitle,this.getAccTitle=getAccTitle,this.getAccDescription=getAccDescription,this.getDiagramTitle=getDiagramTitle,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(txt){return common_default.sanitizeText(txt,this.config)}sanitizeNodeLabelType(labelType){switch(labelType){case"markdown":case"string":case"text":return labelType;default:return"markdown"}}setDiagramId(svgElementId){this.diagramId=svgElementId}lookUpDomId(id){for(const vertex of this.vertices.values())if(vertex.id===id)return this.diagramId?`${this.diagramId}-${vertex.domId}`:vertex.domId;return this.diagramId?`${this.diagramId}-${id}`:id}addVertex(id,textObj,type,style,classes,dir,props={},metadata){var _a2,_b;if(!id||0===id.trim().length)return;let doc;if(void 0!==metadata){let yamlData;yamlData=metadata.includes("\n")?metadata+"\n":"{\n"+metadata+"\n}",doc=load(yamlData,{schema:JSON_SCHEMA})}const edge=this.edges.find(e=>e.id===id);if(edge){const edgeDoc=doc;return void 0!==(null==edgeDoc?void 0:edgeDoc.animate)&&(edge.animate=edgeDoc.animate),void 0!==(null==edgeDoc?void 0:edgeDoc.animation)&&(edge.animation=edgeDoc.animation),void(void 0!==(null==edgeDoc?void 0:edgeDoc.curve)&&(edge.interpolate=edgeDoc.curve))}let txt,vertex=this.vertices.get(id);if(void 0===vertex&&(void 0===textObj&&void 0===type&&null!=style&&log.warn(`Style applied to unknown node "${id}". This may indicate a typo. The node will be created automatically.`),vertex={id:id,labelType:"text",domId:"flowchart-"+id+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(id,vertex)),this.vertexCounter++,void 0!==textObj?(this.config=getConfig2(),txt=this.sanitizeText(textObj.text.trim()),vertex.labelType=textObj.type,txt.startsWith('"')&&txt.endsWith('"')&&(txt=txt.substring(1,txt.length-1)),vertex.text=txt):void 0===vertex.text&&(vertex.text=id),void 0!==type&&(vertex.type=type),null!=style&&style.forEach(s=>{vertex.styles.push(s)}),null!=classes&&classes.forEach(s=>{vertex.classes.push(s)}),void 0!==dir&&(vertex.dir=dir),void 0===vertex.props?vertex.props=props:void 0!==props&&Object.assign(vertex.props,props),void 0!==doc){if(doc.shape){if(doc.shape!==doc.shape.toLowerCase()||doc.shape.includes("_"))throw new Error(`No such shape: ${doc.shape}. Shape names should be lowercase.`);if(!isValidShape(doc.shape))throw new Error(`No such shape: ${doc.shape}.`);vertex.type=null==doc?void 0:doc.shape}(null==doc?void 0:doc.label)&&(vertex.text=null==doc?void 0:doc.label,vertex.labelType=this.sanitizeNodeLabelType(null==doc?void 0:doc.labelType)),(null==doc?void 0:doc.icon)&&(vertex.icon=null==doc?void 0:doc.icon,(null==(_a2=doc.label)?void 0:_a2.trim())||vertex.text!==id||(vertex.text="")),(null==doc?void 0:doc.form)&&(vertex.form=null==doc?void 0:doc.form),(null==doc?void 0:doc.pos)&&(vertex.pos=null==doc?void 0:doc.pos),(null==doc?void 0:doc.img)&&(vertex.img=null==doc?void 0:doc.img,(null==(_b=doc.label)?void 0:_b.trim())||vertex.text!==id||(vertex.text="")),(null==doc?void 0:doc.constraint)&&(vertex.constraint=doc.constraint),doc.w&&(vertex.assetWidth=Number(doc.w)),doc.h&&(vertex.assetHeight=Number(doc.h))}}addSingleLink(_start,_end,type,id){const edge={start:_start,end:_end,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};log.info("abc78 Got edge...",edge);const linkTextObj=type.text;if(void 0!==linkTextObj&&(edge.text=this.sanitizeText(linkTextObj.text.trim()),edge.text.startsWith('"')&&edge.text.endsWith('"')&&(edge.text=edge.text.substring(1,edge.text.length-1)),edge.labelType=this.sanitizeNodeLabelType(linkTextObj.type)),void 0!==type&&(edge.type=type.type,edge.stroke=type.stroke,edge.length=type.length>10?10:type.length),id&&!this.edges.some(e=>e.id===id))edge.id=id,edge.isUserDefinedId=!0;else{const existingLinks=this.edges.filter(e=>e.start===edge.start&&e.end===edge.end);0===existingLinks.length?edge.id=getEdgeId(edge.start,edge.end,{counter:0,prefix:"L"}):edge.id=getEdgeId(edge.start,edge.end,{counter:existingLinks.length+1,prefix:"L"})}if(!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);log.info("Pushing edge..."),this.edges.push(edge)}isLinkData(value){return null!==value&&"object"==typeof value&&"id"in value&&"string"==typeof value.id}addLink(_start,_end,linkData){const id=this.isLinkData(linkData)?linkData.id.replace("@",""):void 0;log.info("addLink",_start,_end,id);for(const start of _start)for(const end of _end){const isLastStart=start===_start[_start.length-1],isFirstEnd=end===_end[0];isLastStart&&isFirstEnd?this.addSingleLink(start,end,linkData,id):this.addSingleLink(start,end,linkData,void 0)}}updateLinkInterpolate(positions,interpolate){positions.forEach(pos=>{"default"===pos?this.edges.defaultInterpolate=interpolate:this.edges[pos].interpolate=interpolate})}updateLink(positions,style){positions.forEach(pos=>{var _a2,_b,_c,_d,_e,_f;if("number"==typeof pos&&pos>=this.edges.length)throw new Error(`The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===pos?this.edges.defaultStyle=style:(this.edges[pos].style=style,((null==(_b=null==(_a2=this.edges[pos])?void 0:_a2.style)?void 0:_b.length)??0)>0&&!(null==(_d=null==(_c=this.edges[pos])?void 0:_c.style)?void 0:_d.some(s=>null==s?void 0:s.startsWith("fill")))&&(null==(_f=null==(_e=this.edges[pos])?void 0:_e.style)||_f.push("fill:none")))})}addClass(ids,_style){const style=_style.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");ids.split(",").forEach(id=>{let classNode=this.classes.get(id);void 0===classNode&&(classNode={id:id,styles:[],textStyles:[]},this.classes.set(id,classNode)),null!=style&&style.forEach(s=>{if(/color/.exec(s)){const newStyle=s.replace("fill","bgFill");classNode.textStyles.push(newStyle)}classNode.styles.push(s)})})}setDirection(dir){this.direction=dir.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(ids,className){for(const id of ids.split(",")){const vertex=this.vertices.get(id);vertex&&vertex.classes.push(className);const edge=this.edges.find(e=>e.id===id);edge&&edge.classes.push(className);const subGraph=this.subGraphLookup.get(id);subGraph&&subGraph.classes.push(className)}}setTooltip(ids,tooltip){if(void 0!==tooltip){tooltip=this.sanitizeText(tooltip);for(const id of ids.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(id):id,tooltip)}}setClickFun(id,functionName,functionArgs){if("loose"!==getConfig2().securityLevel)return;if(void 0===functionName)return;let argList=[];if("string"==typeof functionArgs){argList=functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let i=0;i<argList.length;i++){let item=argList[i].trim();item.startsWith('"')&&item.endsWith('"')&&(item=item.substr(1,item.length-2)),argList[i]=item}}0===argList.length&&argList.push(id);const vertex=this.vertices.get(id);vertex&&(vertex.haveCallback=!0,this.funs.push(()=>{const domId=this.lookUpDomId(id),elem=document.querySelector(`[id="${domId}"]`);null!==elem&&elem.addEventListener("click",()=>{utils_default.runFunc(functionName,...argList)},!1)}))}setLink(ids,linkStr,target){ids.split(",").forEach(id=>{const vertex=this.vertices.get(id);void 0!==vertex&&(vertex.link=utils_default.formatUrl(linkStr,this.config),vertex.linkTarget=target)}),this.setClass(ids,"clickable")}getTooltip(id){return this.tooltips.get(id)}setClickEvent(ids,functionName,functionArgs){ids.split(",").forEach(id=>{this.setClickFun(id,functionName,functionArgs)}),this.setClass(ids,"clickable")}bindFunctions(element){this.funs.forEach(fun=>{fun(element)})}getDirection(){var _a2;return null==(_a2=this.direction)?void 0:_a2.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(element){const tooltipElem=createTooltip();select(element).select("svg").selectAll("g.node").on("mouseover",e=>{var _a2;const el=select(e.currentTarget),title=el.attr("title");if(null===title)return;const rect=null==(_a2=e.currentTarget)?void 0:_a2.getBoundingClientRect();tooltipElem.transition().duration(200).style("opacity",".9"),tooltipElem.text(el.attr("title")).style("left",window.scrollX+rect.left+(rect.right-rect.left)/2+"px").style("top",window.scrollY+rect.bottom+"px"),tooltipElem.html(purify.sanitize(title)),el.classed("hover",!0)}).on("mouseout",e=>{tooltipElem.transition().duration(500).style("opacity",0);select(e.currentTarget).classed("hover",!1)})}clear(ver="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=ver,this.config=getConfig2(),clear()}setGen(ver){this.version=ver||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(_id,list,_title){let id=_id.text.trim(),title=_title.text;_id===_title&&/\s/.exec(_title.text)&&(id=void 0);const result=__name(a=>{const prims={boolean:{},number:{},string:{}},objs=[];let dir2;return{nodeList:a.filter(function(item){const type=typeof item;return item.stmt&&"dir"===item.stmt?(dir2=item.value,!1):""!==item.trim()&&(type in prims?!prims[type].hasOwnProperty(item)&&(prims[type][item]=!0):!objs.includes(item)&&objs.push(item))}),dir:dir2}},"uniq")(list.flat()),nodeList=result.nodeList;let dir=result.dir;const flowchartConfig=getConfig2().flowchart??{};if(dir=dir??(flowchartConfig.inheritDir?this.getDirection()??getConfig2().direction??void 0:void 0),"gen-1"===this.version)for(let i=0;i<nodeList.length;i++)nodeList[i]=this.lookUpDomId(nodeList[i]);id=id??"subGraph"+this.subCount,title=title||"",title=this.sanitizeText(title),this.subCount=this.subCount+1;const subGraph={id:id,nodes:nodeList,title:title.trim(),classes:[],dir:dir,labelType:this.sanitizeNodeLabelType(null==_title?void 0:_title.type)};return log.info("Adding",subGraph.id,subGraph.nodes,subGraph.dir),subGraph.nodes=this.makeUniq(subGraph,this.subGraphs).nodes,this.subGraphs.push(subGraph),this.subGraphLookup.set(id,subGraph),id}getPosForId(id){for(const[i,subGraph]of this.subGraphs.entries())if(subGraph.id===id)return i;return-1}indexNodes2(id,pos){const nodes=this.subGraphs[pos].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=pos,this.subGraphs[pos].id===id)return{result:!0,count:0};let count=0,posCount=1;for(;count<nodes.length;){const childPos=this.getPosForId(nodes[count]);if(childPos>=0){const res=this.indexNodes2(id,childPos);if(res.result)return{result:!0,count:posCount+res.count};posCount+=res.count}count+=1}return{result:!1,count:posCount}}getDepthFirstPos(pos){return this.posCrossRef[pos]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&(this.firstGraphFlag=!1,!0)}destructStartLink(_str){let str=_str.trim(),type="arrow_open";switch(str[0]){case"<":type="arrow_point",str=str.slice(1);break;case"x":type="arrow_cross",str=str.slice(1);break;case"o":type="arrow_circle",str=str.slice(1)}let stroke="normal";return str.includes("=")&&(stroke="thick"),str.includes(".")&&(stroke="dotted"),{type:type,stroke:stroke}}countChar(char,str){const length=str.length;let count=0;for(let i=0;i<length;++i)str[i]===char&&++count;return count}destructEndLink(_str){const str=_str.trim();let line=str.slice(0,-1),type="arrow_open";switch(str.slice(-1)){case"x":type="arrow_cross",str.startsWith("x")&&(type="double_"+type,line=line.slice(1));break;case">":type="arrow_point",str.startsWith("<")&&(type="double_"+type,line=line.slice(1));break;case"o":type="arrow_circle",str.startsWith("o")&&(type="double_"+type,line=line.slice(1))}let stroke="normal",length=line.length-1;line.startsWith("=")&&(stroke="thick"),line.startsWith("~")&&(stroke="invisible");const dots=this.countChar(".",line);return dots&&(stroke="dotted",length=dots),{type:type,stroke:stroke,length:length}}destructLink(_str,_startStr){const info=this.destructEndLink(_str);let startInfo;if(_startStr){if(startInfo=this.destructStartLink(_startStr),startInfo.stroke!==info.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===startInfo.type)startInfo.type=info.type;else{if(startInfo.type!==info.type)return{type:"INVALID",stroke:"INVALID"};startInfo.type="double_"+startInfo.type}return"double_arrow"===startInfo.type&&(startInfo.type="double_arrow_point"),startInfo.length=info.length,startInfo}return info}exists(allSgs,_id){for(const sg of allSgs)if(sg.nodes.includes(_id))return!0;return!1}makeUniq(sg,allSubgraphs){const res=[];return sg.nodes.forEach((_id,pos)=>{this.exists(allSubgraphs,_id)||res.push(sg.nodes[pos])}),{nodes:res}}getTypeFromVertex(vertex){if(vertex.img)return"imageSquare";if(vertex.icon)return"circle"===vertex.form?"iconCircle":"square"===vertex.form?"iconSquare":"rounded"===vertex.form?"iconRounded":"icon";switch(vertex.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return vertex.type}}findNode(nodes,id){return nodes.find(node=>node.id===id)}destructEdgeType(type){let arrowTypeStart="none",arrowTypeEnd="arrow_point";switch(type){case"arrow_point":case"arrow_circle":case"arrow_cross":arrowTypeEnd=type;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":arrowTypeStart=type.replace("double_",""),arrowTypeEnd=arrowTypeStart}return{arrowTypeStart:arrowTypeStart,arrowTypeEnd:arrowTypeEnd}}addNodeFromVertex(vertex,nodes,parentDB,subGraphDB,config,look){var _a2;const parentId=parentDB.get(vertex.id),isGroup=subGraphDB.get(vertex.id)??!1,node=this.findNode(nodes,vertex.id);if(node)node.cssStyles=vertex.styles,node.cssCompiledStyles=this.getCompiledStyles(vertex.classes),node.cssClasses=vertex.classes.join(" ");else{const baseNode={id:vertex.id,label:vertex.text,labelType:vertex.labelType,labelStyle:"",parentId:parentId,padding:(null==(_a2=config.flowchart)?void 0:_a2.padding)||8,cssStyles:vertex.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...vertex.classes]),cssClasses:"default "+vertex.classes.join(" "),dir:vertex.dir,domId:vertex.domId,look:look,link:vertex.link,linkTarget:vertex.linkTarget,tooltip:this.getTooltip(vertex.id),icon:vertex.icon,pos:vertex.pos,img:vertex.img,assetWidth:vertex.assetWidth,assetHeight:vertex.assetHeight,constraint:vertex.constraint};isGroup?nodes.push({...baseNode,isGroup:!0,shape:"rect"}):nodes.push({...baseNode,isGroup:!1,shape:this.getTypeFromVertex(vertex)})}}getCompiledStyles(classDefs){let compiledStyles=[];for(const customClass of classDefs){const cssClass=this.classes.get(customClass);(null==cssClass?void 0:cssClass.styles)&&(compiledStyles=[...compiledStyles,...cssClass.styles??[]].map(s=>s.trim())),(null==cssClass?void 0:cssClass.textStyles)&&(compiledStyles=[...compiledStyles,...cssClass.textStyles??[]].map(s=>s.trim()))}return compiledStyles}getData(){const config=getConfig2(),nodes=[],edges=[],subGraphs=this.getSubGraphs(),parentDB=new Map,subGraphDB=new Map;for(let i=subGraphs.length-1;i>=0;i--){const subGraph=subGraphs[i];subGraph.nodes.length>0&&subGraphDB.set(subGraph.id,!0);for(const id of subGraph.nodes)parentDB.set(id,subGraph.id)}for(let i=subGraphs.length-1;i>=0;i--){const subGraph=subGraphs[i];nodes.push({id:subGraph.id,label:subGraph.title,labelStyle:"",labelType:subGraph.labelType,parentId:parentDB.get(subGraph.id),padding:8,cssCompiledStyles:this.getCompiledStyles(subGraph.classes),cssClasses:subGraph.classes.join(" "),shape:"rect",dir:subGraph.dir,isGroup:!0,look:config.look})}this.getVertices().forEach(vertex=>{this.addNodeFromVertex(vertex,nodes,parentDB,subGraphDB,config,config.look||"classic")});const e=this.getEdges();return e.forEach((rawEdge,index)=>{var _a2;const{arrowTypeStart:arrowTypeStart,arrowTypeEnd:arrowTypeEnd}=this.destructEdgeType(rawEdge.type),styles=[...e.defaultStyle??[]];rawEdge.style&&styles.push(...rawEdge.style);const edge={id:getEdgeId(rawEdge.start,rawEdge.end,{counter:index,prefix:"L"},rawEdge.id),isUserDefinedId:rawEdge.isUserDefinedId,start:rawEdge.start,end:rawEdge.end,type:rawEdge.type??"normal",label:rawEdge.text,labelType:rawEdge.labelType,labelpos:"c",thickness:rawEdge.stroke,minlen:rawEdge.length,classes:"invisible"===(null==rawEdge?void 0:rawEdge.stroke)?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===(null==rawEdge?void 0:rawEdge.stroke)||"arrow_open"===(null==rawEdge?void 0:rawEdge.type)?"none":arrowTypeStart,arrowTypeEnd:"invisible"===(null==rawEdge?void 0:rawEdge.stroke)||"arrow_open"===(null==rawEdge?void 0:rawEdge.type)?"none":arrowTypeEnd,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(rawEdge.classes),labelStyle:styles,style:styles,pattern:rawEdge.stroke,look:config.look,animate:rawEdge.animate,animation:rawEdge.animation,curve:rawEdge.interpolate||this.edges.defaultInterpolate||(null==(_a2=config.flowchart)?void 0:_a2.curve)};edges.push(edge)}),{nodes:nodes,edges:edges,other:{},config:config}}defaultConfig(){return defaultConfig2.flowchart}},"FlowDB"),_a),flowRenderer_v3_unified_default={getClasses:__name(function(text,diagramObj){return diagramObj.db.getClasses()},"getClasses"),draw:__name(async function(text,id,_version,diag){var _a2;log.info("REF0:"),log.info("Drawing state diagram (v2)",id);const{securityLevel:securityLevel,flowchart:conf,layout:layout}=getConfig2();diag.db.setDiagramId(id),log.debug("Before getData: ");const data4Layout=diag.db.getData();log.debug("Data: ",data4Layout);const svg=getDiagramElement(id,securityLevel),direction=diag.db.getDirection();data4Layout.type=diag.type,data4Layout.layoutAlgorithm=getRegisteredLayoutAlgorithm(layout),"dagre"===data4Layout.layoutAlgorithm&&"elk"===layout&&log.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),data4Layout.direction=direction,data4Layout.nodeSpacing=(null==conf?void 0:conf.nodeSpacing)||50,data4Layout.rankSpacing=(null==conf?void 0:conf.rankSpacing)||50,data4Layout.markers=["point","circle","cross"],data4Layout.diagramId=id,log.debug("REF1:",data4Layout),await render(data4Layout,svg);const padding=(null==(_a2=data4Layout.config.flowchart)?void 0:_a2.diagramPadding)??8;utils_default.insertTitle(svg,"flowchartTitleText",(null==conf?void 0:conf.titleTopMargin)||0,diag.db.getDiagramTitle()),setupViewPortForSVG(svg,padding,"flowchart",(null==conf?void 0:conf.useMaxWidth)||!1)},"draw")},parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,4],$V1=[1,3],$V2=[1,5],$V3=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],$V4=[2,2],$V5=[1,13],$V6=[1,14],$V7=[1,15],$V8=[1,16],$V9=[1,23],$Va=[1,25],$Vb=[1,26],$Vc=[1,27],$Vd=[1,50],$Ve=[1,49],$Vf=[1,29],$Vg=[1,30],$Vh=[1,31],$Vi=[1,32],$Vj=[1,33],$Vk=[1,45],$Vl=[1,47],$Vm=[1,43],$Vn=[1,48],$Vo=[1,44],$Vp=[1,51],$Vq=[1,46],$Vr=[1,52],$Vs=[1,53],$Vt=[1,34],$Vu=[1,35],$Vv=[1,36],$Vw=[1,37],$Vx=[1,38],$Vy=[1,58],$Vz=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],$VA=[1,62],$VB=[1,61],$VC=[1,63],$VD=[8,9,11,75,77,78],$VE=[1,79],$VF=[1,92],$VG=[1,97],$VH=[1,96],$VI=[1,93],$VJ=[1,89],$VK=[1,95],$VL=[1,91],$VM=[1,98],$VN=[1,94],$VO=[1,99],$VP=[1,90],$VQ=[8,9,10,11,40,75,77,78],$VR=[8,9,10,11,40,46,75,77,78],$VS=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],$VT=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],$VU=[44,60,89,102,105,106,109,111,114,115,116],$VV=[1,122],$VW=[1,123],$VX=[1,125],$VY=[1,124],$VZ=[44,60,62,74,89,102,105,106,109,111,114,115,116],$V_=[1,134],$V$=[1,148],$V01=[1,149],$V11=[1,150],$V21=[1,151],$V31=[1,136],$V41=[1,138],$V51=[1,142],$V61=[1,143],$V71=[1,144],$V81=[1,145],$V91=[1,146],$Va1=[1,147],$Vb1=[1,152],$Vc1=[1,153],$Vd1=[1,132],$Ve1=[1,133],$Vf1=[1,140],$Vg1=[1,135],$Vh1=[1,139],$Vi1=[1,137],$Vj1=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],$Vk1=[1,155],$Vl1=[1,157],$Vm1=[8,9,11],$Vn1=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],$Vo1=[1,177],$Vp1=[1,173],$Vq1=[1,174],$Vr1=[1,178],$Vs1=[1,175],$Vt1=[1,176],$Vu1=[77,116,119],$Vv1=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],$Vw1=[10,106],$Vx1=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],$Vy1=[1,248],$Vz1=[1,246],$VA1=[1,250],$VB1=[1,244],$VC1=[1,245],$VD1=[1,247],$VE1=[1,249],$VF1=[1,251],$VG1=[1,269],$VH1=[8,9,11,106],$VI1=[8,9,10,11,60,84,105,106,109,110,111,112],parser2={trace:__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray($$[$0])||$$[$0].length>0)&&$$[$0-1].push($$[$0]),this.$=$$[$0-1];break;case 4:case 183:case 44:case 54:case 76:case 181:this.$=$$[$0];break;case 11:yy.setDirection("TB"),this.$="TB";break;case 12:yy.setDirection($$[$0-1]),this.$=$$[$0-1];break;case 27:this.$=$$[$0-1].nodes;break;case 33:this.$=yy.addSubGraph($$[$0-6],$$[$0-1],$$[$0-4]);break;case 34:this.$=yy.addSubGraph($$[$0-3],$$[$0-1],$$[$0-3]);break;case 35:this.$=yy.addSubGraph(void 0,$$[$0-1],void 0);break;case 37:this.$=$$[$0].trim(),yy.setAccTitle(this.$);break;case 38:case 39:this.$=$$[$0].trim(),yy.setAccDescription(this.$);break;case 43:case 133:this.$=$$[$0-1]+$$[$0];break;case 45:yy.addVertex($$[$0-1][$$[$0-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,$$[$0]),yy.addLink($$[$0-3].stmt,$$[$0-1],$$[$0-2]),this.$={stmt:$$[$0-1],nodes:$$[$0-1].concat($$[$0-3].nodes)};break;case 46:yy.addLink($$[$0-2].stmt,$$[$0],$$[$0-1]),this.$={stmt:$$[$0],nodes:$$[$0].concat($$[$0-2].nodes)};break;case 47:yy.addLink($$[$0-3].stmt,$$[$0-1],$$[$0-2]),this.$={stmt:$$[$0-1],nodes:$$[$0-1].concat($$[$0-3].nodes)};break;case 48:this.$={stmt:$$[$0-1],nodes:$$[$0-1]};break;case 49:yy.addVertex($$[$0-1][$$[$0-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,$$[$0]),this.$={stmt:$$[$0-1],nodes:$$[$0-1],shapeData:$$[$0]};break;case 50:this.$={stmt:$$[$0],nodes:$$[$0]};break;case 51:case 128:case 130:this.$=[$$[$0]];break;case 52:yy.addVertex($$[$0-5][$$[$0-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,$$[$0-4]),this.$=$$[$0-5].concat($$[$0]);break;case 53:this.$=$$[$0-4].concat($$[$0]);break;case 55:this.$=$$[$0-2],yy.setClass($$[$0-2],$$[$0]);break;case 56:this.$=$$[$0-3],yy.addVertex($$[$0-3],$$[$0-1],"square");break;case 57:this.$=$$[$0-3],yy.addVertex($$[$0-3],$$[$0-1],"doublecircle");break;case 58:this.$=$$[$0-5],yy.addVertex($$[$0-5],$$[$0-2],"circle");break;case 59:this.$=$$[$0-3],yy.addVertex($$[$0-3],$$[$0-1],"ellipse");break;case 60:this.$=$$[$0-3],yy.addVertex($$[$0-3],$$[$0-1],"stadium");break;case 61:this.$=$$[$0-3],yy.addVertex($$[$0-3],$$[$0-1],"subroutine");break;case 62:this.$=$$[$0-7],yy.addVertex($$[$0-7],$$[$0-1],"rect",void 0,void 0,void 0,Object.fromEntries([[$$[$0-5],$$[$0-3]]]));break;case 63:this.$=$$[$0-3],yy.addVertex($$[$0-3],$$[$0-1],"cylinder");break;case 64:this.$=$$[$0-3],yy.addVertex($$[$0-3],$$[$0-1],"round");break;case 65:this.$=$$[$0-3],yy.addVertex($$[$0-3],$$[$0-1],"diamond");break;case 66:this.$=$$[$0-5],yy.addVertex($$[$0-5],$$[$0-2],"hexagon");break;case 67:this.$=$$[$0-3],yy.addVertex($$[$0-3],$$[$0-1],"odd");break;case 68:this.$=$$[$0-3],yy.addVertex($$[$0-3],$$[$0-1],"trapezoid");break;case 69:this.$=$$[$0-3],yy.addVertex($$[$0-3],$$[$0-1],"inv_trapezoid");break;case 70:this.$=$$[$0-3],yy.addVertex($$[$0-3],$$[$0-1],"lean_right");break;case 71:this.$=$$[$0-3],yy.addVertex($$[$0-3],$$[$0-1],"lean_left");break;case 72:this.$=$$[$0],yy.addVertex($$[$0]);break;case 73:$$[$0-1].text=$$[$0],this.$=$$[$0-1];break;case 74:case 75:$$[$0-2].text=$$[$0-1],this.$=$$[$0-2];break;case 77:var inf=yy.destructLink($$[$0],$$[$0-2]);this.$={type:inf.type,stroke:inf.stroke,length:inf.length,text:$$[$0-1]};break;case 78:inf=yy.destructLink($$[$0],$$[$0-2]);this.$={type:inf.type,stroke:inf.stroke,length:inf.length,text:$$[$0-1],id:$$[$0-3]};break;case 79:case 86:case 101:case 103:this.$={text:$$[$0],type:"text"};break;case 80:case 87:case 102:this.$={text:$$[$0-1].text+""+$$[$0],type:$$[$0-1].type};break;case 81:case 88:this.$={text:$$[$0],type:"string"};break;case 82:case 89:case 104:this.$={text:$$[$0],type:"markdown"};break;case 83:inf=yy.destructLink($$[$0]);this.$={type:inf.type,stroke:inf.stroke,length:inf.length};break;case 84:inf=yy.destructLink($$[$0]);this.$={type:inf.type,stroke:inf.stroke,length:inf.length,id:$$[$0-1]};break;case 85:this.$=$$[$0-1];break;case 105:this.$=$$[$0-4],yy.addClass($$[$0-2],$$[$0]);break;case 106:this.$=$$[$0-4],yy.setClass($$[$0-2],$$[$0]);break;case 107:case 115:this.$=$$[$0-1],yy.setClickEvent($$[$0-1],$$[$0]);break;case 108:case 116:this.$=$$[$0-3],yy.setClickEvent($$[$0-3],$$[$0-2]),yy.setTooltip($$[$0-3],$$[$0]);break;case 109:this.$=$$[$0-2],yy.setClickEvent($$[$0-2],$$[$0-1],$$[$0]);break;case 110:this.$=$$[$0-4],yy.setClickEvent($$[$0-4],$$[$0-3],$$[$0-2]),yy.setTooltip($$[$0-4],$$[$0]);break;case 111:this.$=$$[$0-2],yy.setLink($$[$0-2],$$[$0]);break;case 112:this.$=$$[$0-4],yy.setLink($$[$0-4],$$[$0-2]),yy.setTooltip($$[$0-4],$$[$0]);break;case 113:this.$=$$[$0-4],yy.setLink($$[$0-4],$$[$0-2],$$[$0]);break;case 114:this.$=$$[$0-6],yy.setLink($$[$0-6],$$[$0-4],$$[$0]),yy.setTooltip($$[$0-6],$$[$0-2]);break;case 117:this.$=$$[$0-1],yy.setLink($$[$0-1],$$[$0]);break;case 118:this.$=$$[$0-3],yy.setLink($$[$0-3],$$[$0-2]),yy.setTooltip($$[$0-3],$$[$0]);break;case 119:this.$=$$[$0-3],yy.setLink($$[$0-3],$$[$0-2],$$[$0]);break;case 120:this.$=$$[$0-5],yy.setLink($$[$0-5],$$[$0-4],$$[$0]),yy.setTooltip($$[$0-5],$$[$0-2]);break;case 121:this.$=$$[$0-4],yy.addVertex($$[$0-2],void 0,void 0,$$[$0]);break;case 122:this.$=$$[$0-4],yy.updateLink([$$[$0-2]],$$[$0]);break;case 123:this.$=$$[$0-4],yy.updateLink($$[$0-2],$$[$0]);break;case 124:this.$=$$[$0-8],yy.updateLinkInterpolate([$$[$0-6]],$$[$0-2]),yy.updateLink([$$[$0-6]],$$[$0]);break;case 125:this.$=$$[$0-8],yy.updateLinkInterpolate($$[$0-6],$$[$0-2]),yy.updateLink($$[$0-6],$$[$0]);break;case 126:this.$=$$[$0-6],yy.updateLinkInterpolate([$$[$0-4]],$$[$0]);break;case 127:this.$=$$[$0-6],yy.updateLinkInterpolate($$[$0-4],$$[$0]);break;case 129:case 131:$$[$0-2].push($$[$0]),this.$=$$[$0-2];break;case 182:case 184:this.$=$$[$0-1]+""+$$[$0];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"}}},"anonymous"),table:[{3:1,4:2,9:$V0,10:$V1,12:$V2},{1:[3]},o($V3,$V4,{5:6}),{4:7,9:$V0,10:$V1,12:$V2},{4:8,9:$V0,10:$V1,12:$V2},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:$V5,9:$V6,10:$V7,11:$V8,20:17,22:18,23:19,24:20,25:21,26:22,27:$V9,33:24,34:$Va,36:$Vb,38:$Vc,42:28,43:39,44:$Vd,45:40,47:41,60:$Ve,84:$Vf,85:$Vg,86:$Vh,87:$Vi,88:$Vj,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:42,114:$Vq,115:$Vr,116:$Vs,121:$Vt,122:$Vu,123:$Vv,124:$Vw,125:$Vx},o($V3,[2,9]),o($V3,[2,10]),o($V3,[2,11]),{8:[1,55],9:[1,56],10:$Vy,15:54,18:57},o($Vz,[2,3]),o($Vz,[2,4]),o($Vz,[2,5]),o($Vz,[2,6]),o($Vz,[2,7]),o($Vz,[2,8]),{8:$VA,9:$VB,11:$VC,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:$VA,9:$VB,11:$VC,21:68},{8:$VA,9:$VB,11:$VC,21:69},{8:$VA,9:$VB,11:$VC,21:70},{8:$VA,9:$VB,11:$VC,21:71},{8:$VA,9:$VB,11:$VC,21:72},{8:$VA,9:$VB,10:[1,73],11:$VC,21:74},o($Vz,[2,36]),{35:[1,75]},{37:[1,76]},o($Vz,[2,39]),o($VD,[2,50],{18:77,39:78,10:$Vy,40:$VE}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:$VF,44:$VG,60:$VH,80:[1,87],89:$VI,95:[1,84],97:[1,85],101:86,105:$VJ,106:$VK,109:$VL,111:$VM,114:$VN,115:$VO,116:$VP,120:88},o($Vz,[2,185]),o($Vz,[2,186]),o($Vz,[2,187]),o($Vz,[2,188]),o($Vz,[2,189]),o($VQ,[2,51]),o($VQ,[2,54],{46:[1,100]}),o($VR,[2,72],{113:113,29:[1,101],44:$Vd,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:$Ve,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,114:$Vq,115:$Vr,116:$Vs}),o($VS,[2,181]),o($VS,[2,142]),o($VS,[2,143]),o($VS,[2,144]),o($VS,[2,145]),o($VS,[2,146]),o($VS,[2,147]),o($VS,[2,148]),o($VS,[2,149]),o($VS,[2,150]),o($VS,[2,151]),o($VS,[2,152]),o($V3,[2,12]),o($V3,[2,18]),o($V3,[2,19]),{9:[1,114]},o($VT,[2,26],{18:115,10:$Vy}),o($Vz,[2,27]),{42:116,43:39,44:$Vd,45:40,47:41,60:$Ve,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:42,114:$Vq,115:$Vr,116:$Vs},o($Vz,[2,40]),o($Vz,[2,41]),o($Vz,[2,42]),o($VU,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:$VV,81:$VW,116:$VX,119:$VY},{75:[1,126],77:[1,127]},o($VZ,[2,83]),o($Vz,[2,28]),o($Vz,[2,29]),o($Vz,[2,30]),o($Vz,[2,31]),o($Vz,[2,32]),{10:$V_,12:$V$,14:$V01,27:$V11,28:128,32:$V21,44:$V31,60:$V41,75:$V51,80:[1,130],81:[1,131],83:141,84:$V61,85:$V71,86:$V81,87:$V91,88:$Va1,89:$Vb1,90:$Vc1,91:129,105:$Vd1,109:$Ve1,111:$Vf1,114:$Vg1,115:$Vh1,116:$Vi1},o($Vj1,$V4,{5:154}),o($Vz,[2,37]),o($Vz,[2,38]),o($VD,[2,48],{44:$Vk1}),o($VD,[2,49],{18:156,10:$Vy,40:$Vl1}),o($VQ,[2,44]),{44:$Vd,47:158,60:$Ve,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:42,114:$Vq,115:$Vr,116:$Vs},{102:[1,159],103:160,105:[1,161]},{44:$Vd,47:162,60:$Ve,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:42,114:$Vq,115:$Vr,116:$Vs},{44:$Vd,47:163,60:$Ve,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:42,114:$Vq,115:$Vr,116:$Vs},o($Vm1,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},o($Vm1,[2,115],{120:168,10:[1,167],14:$VF,44:$VG,60:$VH,89:$VI,105:$VJ,106:$VK,109:$VL,111:$VM,114:$VN,115:$VO,116:$VP}),o($Vm1,[2,117],{10:[1,169]}),o($Vn1,[2,183]),o($Vn1,[2,170]),o($Vn1,[2,171]),o($Vn1,[2,172]),o($Vn1,[2,173]),o($Vn1,[2,174]),o($Vn1,[2,175]),o($Vn1,[2,176]),o($Vn1,[2,177]),o($Vn1,[2,178]),o($Vn1,[2,179]),o($Vn1,[2,180]),{44:$Vd,47:170,60:$Ve,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:42,114:$Vq,115:$Vr,116:$Vs},{30:171,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},{30:179,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},{30:181,50:[1,180],67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},{30:182,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},{30:183,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},{30:184,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},{109:[1,185]},{30:186,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},{30:187,65:[1,188],67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},{30:189,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},{30:190,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},{30:191,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},o($VS,[2,182]),o($V3,[2,20]),o($VT,[2,25]),o($VD,[2,46],{39:192,18:193,10:$Vy,40:$VE}),o($VU,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},{77:[1,197],79:198,116:$VX,119:$VY},o($Vu1,[2,79]),o($Vu1,[2,81]),o($Vu1,[2,82]),o($Vu1,[2,168]),o($Vu1,[2,169]),{76:199,79:121,80:$VV,81:$VW,116:$VX,119:$VY},o($VZ,[2,84]),{8:$VA,9:$VB,10:$V_,11:$VC,12:$V$,14:$V01,21:201,27:$V11,29:[1,200],32:$V21,44:$V31,60:$V41,75:$V51,83:141,84:$V61,85:$V71,86:$V81,87:$V91,88:$Va1,89:$Vb1,90:$Vc1,91:202,105:$Vd1,109:$Ve1,111:$Vf1,114:$Vg1,115:$Vh1,116:$Vi1},o($Vv1,[2,101]),o($Vv1,[2,103]),o($Vv1,[2,104]),o($Vv1,[2,157]),o($Vv1,[2,158]),o($Vv1,[2,159]),o($Vv1,[2,160]),o($Vv1,[2,161]),o($Vv1,[2,162]),o($Vv1,[2,163]),o($Vv1,[2,164]),o($Vv1,[2,165]),o($Vv1,[2,166]),o($Vv1,[2,167]),o($Vv1,[2,90]),o($Vv1,[2,91]),o($Vv1,[2,92]),o($Vv1,[2,93]),o($Vv1,[2,94]),o($Vv1,[2,95]),o($Vv1,[2,96]),o($Vv1,[2,97]),o($Vv1,[2,98]),o($Vv1,[2,99]),o($Vv1,[2,100]),{6:11,7:12,8:$V5,9:$V6,10:$V7,11:$V8,20:17,22:18,23:19,24:20,25:21,26:22,27:$V9,32:[1,203],33:24,34:$Va,36:$Vb,38:$Vc,42:28,43:39,44:$Vd,45:40,47:41,60:$Ve,84:$Vf,85:$Vg,86:$Vh,87:$Vi,88:$Vj,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:42,114:$Vq,115:$Vr,116:$Vs,121:$Vt,122:$Vu,123:$Vv,124:$Vw,125:$Vx},{10:$Vy,18:204},{44:[1,205]},o($VQ,[2,43]),{10:[1,206],44:$Vd,60:$Ve,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:113,114:$Vq,115:$Vr,116:$Vs},{10:[1,207]},{10:[1,208],106:[1,209]},o($Vw1,[2,128]),{10:[1,210],44:$Vd,60:$Ve,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:113,114:$Vq,115:$Vr,116:$Vs},{10:[1,211],44:$Vd,60:$Ve,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:113,114:$Vq,115:$Vr,116:$Vs},{80:[1,212]},o($Vm1,[2,109],{10:[1,213]}),o($Vm1,[2,111],{10:[1,214]}),{80:[1,215]},o($Vn1,[2,184]),{80:[1,216],98:[1,217]},o($VQ,[2,55],{113:113,44:$Vd,60:$Ve,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,114:$Vq,115:$Vr,116:$Vs}),{31:[1,218],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},o($Vx1,[2,86]),o($Vx1,[2,88]),o($Vx1,[2,89]),o($Vx1,[2,153]),o($Vx1,[2,154]),o($Vx1,[2,155]),o($Vx1,[2,156]),{49:[1,220],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},{30:221,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},{51:[1,222],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},{53:[1,223],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},{55:[1,224],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},{57:[1,225],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},{60:[1,226]},{64:[1,227],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},{66:[1,228],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},{30:229,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},{31:[1,230],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},{67:$Vo1,69:[1,231],71:[1,232],82:219,116:$Vr1,117:$Vs1,118:$Vt1},{67:$Vo1,69:[1,234],71:[1,233],82:219,116:$Vr1,117:$Vs1,118:$Vt1},o($VD,[2,45],{18:156,10:$Vy,40:$Vl1}),o($VD,[2,47],{44:$Vk1}),o($VU,[2,75]),o($VU,[2,74]),{62:[1,235],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},o($VU,[2,77]),o($Vu1,[2,80]),{77:[1,236],79:198,116:$VX,119:$VY},{30:237,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},o($Vj1,$V4,{5:238}),o($Vv1,[2,102]),o($Vz,[2,35]),{43:239,44:$Vd,45:40,47:41,60:$Ve,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:42,114:$Vq,115:$Vr,116:$Vs},{10:$Vy,18:240},{10:$Vy1,60:$Vz1,84:$VA1,92:241,105:$VB1,107:242,108:243,109:$VC1,110:$VD1,111:$VE1,112:$VF1},{10:$Vy1,60:$Vz1,84:$VA1,92:252,104:[1,253],105:$VB1,107:242,108:243,109:$VC1,110:$VD1,111:$VE1,112:$VF1},{10:$Vy1,60:$Vz1,84:$VA1,92:254,104:[1,255],105:$VB1,107:242,108:243,109:$VC1,110:$VD1,111:$VE1,112:$VF1},{105:[1,256]},{10:$Vy1,60:$Vz1,84:$VA1,92:257,105:$VB1,107:242,108:243,109:$VC1,110:$VD1,111:$VE1,112:$VF1},{44:$Vd,47:258,60:$Ve,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:42,114:$Vq,115:$Vr,116:$Vs},o($Vm1,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},o($Vm1,[2,116]),o($Vm1,[2,118],{10:[1,262]}),o($Vm1,[2,119]),o($VR,[2,56]),o($Vx1,[2,87]),o($VR,[2,57]),{51:[1,263],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},o($VR,[2,64]),o($VR,[2,59]),o($VR,[2,60]),o($VR,[2,61]),{109:[1,264]},o($VR,[2,63]),o($VR,[2,65]),{66:[1,265],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},o($VR,[2,67]),o($VR,[2,68]),o($VR,[2,70]),o($VR,[2,69]),o($VR,[2,71]),o([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),o($VU,[2,78]),{31:[1,266],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},{6:11,7:12,8:$V5,9:$V6,10:$V7,11:$V8,20:17,22:18,23:19,24:20,25:21,26:22,27:$V9,32:[1,267],33:24,34:$Va,36:$Vb,38:$Vc,42:28,43:39,44:$Vd,45:40,47:41,60:$Ve,84:$Vf,85:$Vg,86:$Vh,87:$Vi,88:$Vj,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:42,114:$Vq,115:$Vr,116:$Vs,121:$Vt,122:$Vu,123:$Vv,124:$Vw,125:$Vx},o($VQ,[2,53]),{43:268,44:$Vd,45:40,47:41,60:$Ve,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:42,114:$Vq,115:$Vr,116:$Vs},o($Vm1,[2,121],{106:$VG1}),o($VH1,[2,130],{108:270,10:$Vy1,60:$Vz1,84:$VA1,105:$VB1,109:$VC1,110:$VD1,111:$VE1,112:$VF1}),o($VI1,[2,132]),o($VI1,[2,134]),o($VI1,[2,135]),o($VI1,[2,136]),o($VI1,[2,137]),o($VI1,[2,138]),o($VI1,[2,139]),o($VI1,[2,140]),o($VI1,[2,141]),o($Vm1,[2,122],{106:$VG1}),{10:[1,271]},o($Vm1,[2,123],{106:$VG1}),{10:[1,272]},o($Vw1,[2,129]),o($Vm1,[2,105],{106:$VG1}),o($Vm1,[2,106],{113:113,44:$Vd,60:$Ve,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,114:$Vq,115:$Vr,116:$Vs}),o($Vm1,[2,110]),o($Vm1,[2,112],{10:[1,273]}),o($Vm1,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:$VA,9:$VB,11:$VC,21:278},o($Vz,[2,34]),o($VQ,[2,52]),{10:$Vy1,60:$Vz1,84:$VA1,105:$VB1,107:279,108:243,109:$VC1,110:$VD1,111:$VE1,112:$VF1},o($VI1,[2,133]),{14:$VF,44:$VG,60:$VH,89:$VI,101:280,105:$VJ,106:$VK,109:$VL,111:$VM,114:$VN,115:$VO,116:$VP,120:88},{14:$VF,44:$VG,60:$VH,89:$VI,101:281,105:$VJ,106:$VK,109:$VL,111:$VM,114:$VN,115:$VO,116:$VP,120:88},{98:[1,282]},o($Vm1,[2,120]),o($VR,[2,58]),{30:283,67:$Vo1,80:$Vp1,81:$Vq1,82:172,116:$Vr1,117:$Vs1,118:$Vt1},o($VR,[2,66]),o($Vj1,$V4,{5:284}),o($VH1,[2,131],{108:270,10:$Vy1,60:$Vz1,84:$VA1,105:$VB1,109:$VC1,110:$VD1,111:$VE1,112:$VF1}),o($Vm1,[2,126],{120:168,10:[1,285],14:$VF,44:$VG,60:$VH,89:$VI,105:$VJ,106:$VK,109:$VL,111:$VM,114:$VN,115:$VO,116:$VP}),o($Vm1,[2,127],{120:168,10:[1,286],14:$VF,44:$VG,60:$VH,89:$VI,105:$VJ,106:$VK,109:$VL,111:$VM,114:$VN,115:$VO,116:$VP}),o($Vm1,[2,114]),{31:[1,287],67:$Vo1,82:219,116:$Vr1,117:$Vs1,118:$Vt1},{6:11,7:12,8:$V5,9:$V6,10:$V7,11:$V8,20:17,22:18,23:19,24:20,25:21,26:22,27:$V9,32:[1,288],33:24,34:$Va,36:$Vb,38:$Vc,42:28,43:39,44:$Vd,45:40,47:41,60:$Ve,84:$Vf,85:$Vg,86:$Vh,87:$Vi,88:$Vj,89:$Vk,102:$Vl,105:$Vm,106:$Vn,109:$Vo,111:$Vp,113:42,114:$Vq,115:$Vr,116:$Vs,121:$Vt,122:$Vu,123:$Vv,124:$Vw,125:$Vx},{10:$Vy1,60:$Vz1,84:$VA1,92:289,105:$VB1,107:242,108:243,109:$VC1,110:$VD1,111:$VE1,112:$VF1},{10:$Vy1,60:$Vz1,84:$VA1,92:290,105:$VB1,107:242,108:243,109:$VC1,110:$VD1,111:$VE1,112:$VF1},o($VR,[2,62]),o($Vz,[2,33]),o($Vm1,[2,124],{106:$VG1}),o($Vm1,[2,125],{106:$VG1})],defaultActions:{},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),yy_.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const re=/\n\s*/g;return yy_.yytext=yy_.yytext.replace(re,"<br/>"),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 18:return 96;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 34:return 88;case 35:case 36:case 37:return yy.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 98;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 78;case 61:return 105;case 62:case 103:return 111;case 63:return 46;case 64:return 60;case 65:case 104:return 44;case 66:return 8;case 67:return 106;case 68:case 102:return 115;case 69:case 72:case 75:return this.popState(),77;case 70:return this.pushState("edgeText"),75;case 71:case 74:case 77:return 119;case 73:return this.pushState("thickEdgeText"),75;case 76:return this.pushState("dottedEdgeText"),75;case 78:return 77;case 79:return this.popState(),53;case 80:case 116:return"TEXT";case 81:return this.pushState("ellipseText"),52;case 82:return this.popState(),55;case 83:return this.pushState("text"),54;case 84:return this.popState(),57;case 85:return this.pushState("text"),56;case 86:return 58;case 87:return this.pushState("text"),67;case 88:return this.popState(),64;case 89:return this.pushState("text"),63;case 90:return this.popState(),49;case 91:return this.pushState("text"),48;case 92:return this.popState(),69;case 93:return this.popState(),71;case 94:return 117;case 95:return this.pushState("trapText"),68;case 96:return this.pushState("trapText"),70;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return"SEP";case 101:return 89;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popState(),62;case 109:return this.pushState("text"),62;case 110:return this.popState(),51;case 111:return this.pushState("text"),50;case 112:return this.popState(),31;case 113:return this.pushState("text"),29;case 114:return this.popState(),66;case 115:return this.pushState("text"),65;case 117:return"QUOTE";case 118:return 9;case 119:return 10;case 120:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeData:{rules:[8,11,12,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackargs:{rules:[17,18,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackname:{rules:[14,15,16,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},href:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},click:{rules:[21,24,33,34,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dottedEdgeText:{rules:[21,24,75,77,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},thickEdgeText:{rules:[21,24,72,74,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},edgeText:{rules:[21,24,69,71,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},trapText:{rules:[21,24,78,81,83,85,89,91,92,93,94,95,96,109,111,113,115],inclusive:!1},ellipseText:{rules:[21,24,78,79,80,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},text:{rules:[21,24,78,81,82,83,84,85,88,89,90,91,95,96,108,109,110,111,112,113,114,115,116],inclusive:!1},vertex:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr:{rules:[3,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_title:{rules:[1,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},md_string:{rules:[19,20,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},string:{rules:[21,22,23,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,75,76,78,81,83,85,86,87,89,91,95,96,97,98,99,100,101,102,103,104,105,106,107,109,111,113,115,117,118,119,120],inclusive:!0}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var flow_default=parser,newParser=Object.assign({},flow_default);newParser.parse=src=>{const newSrc=src.replace(/}\s*\n/g,"}\n");return flow_default.parse(newSrc)};var flowParser_default=newParser,fade=__name((color,opacity)=>{const channel2=channel,r=channel2(color,"r"),g=channel2(color,"g"),b=channel2(color,"b");return rgba(r,g,b,opacity)},"fade"),styles_default=__name(options=>`.label {\n font-family: ${options.fontFamily};\n color: ${options.nodeTextColor||options.textColor};\n }\n .cluster-label text {\n fill: ${options.titleColor};\n }\n .cluster-label span {\n color: ${options.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${options.nodeTextColor||options.textColor};\n color: ${options.nodeTextColor||options.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: ${options.strokeWidth??1}px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${options.lineColor} !important;\n stroke-width: 0;\n stroke: ${options.lineColor};\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: ${options.strokeWidth??2}px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n p {\n background-color: ${options.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${fade(options.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${options.clusterBkg};\n stroke: ${options.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n .cluster span {\n color: ${options.titleColor};\n }\n /* .cluster div {\n color: ${options.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${options.fontFamily};\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${options.edgeLabelBackground};\n p {\n background-color: ${options.edgeLabelBackground};\n padding: 2px;\n }\n .label rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n }\n ${getIconStyles()}\n`,"getStyles"),diagram={parser:flowParser_default,get db(){return new FlowDB},renderer:flowRenderer_v3_unified_default,styles:styles_default,init:__name(cnf=>{cnf.flowchart||(cnf.flowchart={}),cnf.layout&&setConfig2({layout:cnf.layout}),cnf.flowchart.arrowMarkerAbsolute=cnf.arrowMarkerAbsolute,setConfig2({flowchart:{arrowMarkerAbsolute:cnf.arrowMarkerAbsolute}})},"init")};export{diagram};