cmcts-c-agent-embedding 1.0.65-vib → 1.1.2-cmcuni

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 (127) hide show
  1. package/dist/_basePickBy-1057a1b4.js +1 -0
  2. package/dist/_basePickBy-cbf78fb3.js +1 -0
  3. package/dist/_baseUniq-38ea2195.js +1 -0
  4. package/dist/_baseUniq-52a47b7b.js +1 -0
  5. package/dist/arc-6b847bc0.js +1 -0
  6. package/dist/arc-8928af28.js +1 -0
  7. package/dist/architecture-O4VJ6CD3-42323263.js +1 -0
  8. package/dist/architecture-O4VJ6CD3-b506967f.js +1 -0
  9. package/dist/architectureDiagram-VXUJARFQ-1bd867b6.js +1 -0
  10. package/dist/architectureDiagram-VXUJARFQ-2b851c59.js +1 -0
  11. package/dist/blockDiagram-VD42YOAC-5cea96b0.js +1 -0
  12. package/dist/blockDiagram-VD42YOAC-a909b757.js +1 -0
  13. package/dist/c4Diagram-YG6GDRKO-24d24519.js +1 -0
  14. package/dist/c4Diagram-YG6GDRKO-54783ab3.js +1 -0
  15. package/dist/channel-2af69aa2.js +1 -0
  16. package/dist/channel-f240e622.js +1 -0
  17. package/dist/chunk-4BX2VUAB-7747ae72.js +1 -0
  18. package/dist/chunk-4BX2VUAB-d05d937e.js +1 -0
  19. package/dist/chunk-55IACEB6-5a7b1be3.js +1 -0
  20. package/dist/chunk-55IACEB6-78729976.js +1 -0
  21. package/dist/chunk-B4BG7PRW-a97e69ff.js +1 -0
  22. package/dist/chunk-B4BG7PRW-cbf800c4.js +1 -0
  23. package/dist/chunk-DI55MBZ5-5dc4f926.js +1 -0
  24. package/dist/chunk-DI55MBZ5-95d71f6f.js +1 -0
  25. package/dist/chunk-FMBD7UC4-2c653fda.js +1 -0
  26. package/dist/chunk-FMBD7UC4-d75ed695.js +1 -0
  27. package/dist/chunk-QN33PNHL-0bf10733.js +1 -0
  28. package/dist/chunk-QN33PNHL-b00655c9.js +1 -0
  29. package/dist/chunk-QZHKN3VN-a979a9fe.js +1 -0
  30. package/dist/chunk-QZHKN3VN-d57979be.js +1 -0
  31. package/dist/chunk-TZMSLE5B-6755c559.js +1 -0
  32. package/dist/chunk-TZMSLE5B-ed6d6d7e.js +1 -0
  33. package/dist/classDiagram-2ON5EDUG-8b5a2a93.js +1 -0
  34. package/dist/classDiagram-2ON5EDUG-fa9ecfbb.js +1 -0
  35. package/dist/classDiagram-v2-WZHVMYZB-8b5a2a93.js +1 -0
  36. package/dist/classDiagram-v2-WZHVMYZB-fa9ecfbb.js +1 -0
  37. package/dist/clone-6cd174cf.js +1 -0
  38. package/dist/clone-8494eb3f.js +1 -0
  39. package/dist/components/Bot.d.ts.map +1 -1
  40. package/dist/components/bubbles/BotBubble.d.ts +0 -1
  41. package/dist/components/bubbles/BotBubble.d.ts.map +1 -1
  42. package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -1
  43. package/dist/components/buttons/ConsultationButton.d.ts.map +1 -1
  44. package/dist/components/icons/AddImageIcon.d.ts.map +1 -1
  45. package/dist/components/index.d.ts +2 -0
  46. package/dist/components/index.d.ts.map +1 -1
  47. package/dist/components/inputs/textInput/components/TextInput.d.ts +3 -0
  48. package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -1
  49. package/dist/components/modals/ZaloQRModal.d.ts.map +1 -1
  50. package/dist/cose-bilkent-S5V4N54A-2f5eb275.js +1 -0
  51. package/dist/cose-bilkent-S5V4N54A-3cda82b5.js +1 -0
  52. package/dist/cytoscape.esm-9acb9bfe.js +1 -0
  53. package/dist/dagre-6UL2VRFP-9b648c54.js +1 -0
  54. package/dist/dagre-6UL2VRFP-e997588d.js +1 -0
  55. package/dist/defaultLocale-1fe70b7d.js +1 -0
  56. package/dist/diagram-PSM6KHXK-1234d08d.js +1 -0
  57. package/dist/diagram-PSM6KHXK-15013de5.js +1 -0
  58. package/dist/diagram-QEK2KX5R-489b9505.js +1 -0
  59. package/dist/diagram-QEK2KX5R-9e94df2a.js +1 -0
  60. package/dist/diagram-S2PKOQOG-6fef3823.js +1 -0
  61. package/dist/diagram-S2PKOQOG-c943ed25.js +1 -0
  62. package/dist/erDiagram-Q2GNP2WA-2b1823f2.js +1 -0
  63. package/dist/erDiagram-Q2GNP2WA-7e6c6a04.js +1 -0
  64. package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -1
  65. package/dist/flowDiagram-NV44I4VS-709c6479.js +1 -0
  66. package/dist/flowDiagram-NV44I4VS-98a84da9.js +1 -0
  67. package/dist/ganttDiagram-LVOFAZNH-1d379d6a.js +1 -0
  68. package/dist/ganttDiagram-LVOFAZNH-d8342586.js +1 -0
  69. package/dist/gitGraph-ZV4HHKMB-788776f3.js +1 -0
  70. package/dist/gitGraph-ZV4HHKMB-ba420dcc.js +1 -0
  71. package/dist/gitGraphDiagram-NY62KEGX-804d1363.js +1 -0
  72. package/dist/gitGraphDiagram-NY62KEGX-919097ea.js +1 -0
  73. package/dist/graph-834f6046.js +1 -0
  74. package/dist/graph-db4953aa.js +1 -0
  75. package/dist/info-63CPKGFF-2dccc483.js +1 -0
  76. package/dist/info-63CPKGFF-ef40f1c4.js +1 -0
  77. package/dist/infoDiagram-F6ZHWCRC-579d50b4.js +1 -0
  78. package/dist/infoDiagram-F6ZHWCRC-c9877bad.js +1 -0
  79. package/dist/init-cf76ae07.js +1 -0
  80. package/dist/journeyDiagram-XKPGCS4Q-25d3c922.js +1 -0
  81. package/dist/journeyDiagram-XKPGCS4Q-2d2cda1c.js +1 -0
  82. package/dist/kanban-definition-3W4ZIXB7-c556bee0.js +1 -0
  83. package/dist/kanban-definition-3W4ZIXB7-cdb93ec0.js +1 -0
  84. package/dist/katex-0a18b0df.js +1 -0
  85. package/dist/layout-40652dba.js +1 -0
  86. package/dist/layout-54ffc604.js +1 -0
  87. package/dist/linear-2f639b72.js +1 -0
  88. package/dist/linear-ed2367ff.js +1 -0
  89. package/dist/mermaid-parser.core-0cfa7d2a.js +1 -0
  90. package/dist/mermaid-parser.core-10bed742.js +1 -0
  91. package/dist/mindmap-definition-VGOIOE7T-169f5fe5.js +1 -0
  92. package/dist/mindmap-definition-VGOIOE7T-dea1c792.js +1 -0
  93. package/dist/ordinal-221e41d7.js +1 -0
  94. package/dist/packet-HUATNLJX-6f2471ea.js +1 -0
  95. package/dist/packet-HUATNLJX-c69e28eb.js +1 -0
  96. package/dist/pie-WTHONI2E-4143e44b.js +1 -0
  97. package/dist/pie-WTHONI2E-82b1fe3f.js +1 -0
  98. package/dist/pieDiagram-ADFJNKIX-499eec78.js +1 -0
  99. package/dist/pieDiagram-ADFJNKIX-657effd5.js +1 -0
  100. package/dist/quadrantDiagram-AYHSOK5B-138a0c93.js +1 -0
  101. package/dist/quadrantDiagram-AYHSOK5B-91137c4d.js +1 -0
  102. package/dist/radar-NJJJXTRR-5e934a95.js +1 -0
  103. package/dist/radar-NJJJXTRR-94d77527.js +1 -0
  104. package/dist/requirementDiagram-UZGBJVZJ-a5d9fb39.js +1 -0
  105. package/dist/requirementDiagram-UZGBJVZJ-d7aeec99.js +1 -0
  106. package/dist/sankeyDiagram-TZEHDZUN-15053ae0.js +1 -0
  107. package/dist/sankeyDiagram-TZEHDZUN-aadd2125.js +1 -0
  108. package/dist/sequenceDiagram-WL72ISMW-12e778ef.js +1 -0
  109. package/dist/sequenceDiagram-WL72ISMW-9330a98a.js +1 -0
  110. package/dist/stateDiagram-FKZM4ZOC-01225f0f.js +1 -0
  111. package/dist/stateDiagram-FKZM4ZOC-af4836d7.js +1 -0
  112. package/dist/stateDiagram-v2-4FDKWEC3-4774cc10.js +1 -0
  113. package/dist/stateDiagram-v2-4FDKWEC3-5ef8e019.js +1 -0
  114. package/dist/timeline-definition-IT6M3QCI-9921f937.js +1 -0
  115. package/dist/timeline-definition-IT6M3QCI-a7a9bbec.js +1 -0
  116. package/dist/treemap-75Q7IDZK-100ddeb7.js +1 -0
  117. package/dist/treemap-75Q7IDZK-851117b4.js +1 -0
  118. package/dist/utils/index.d.ts +27 -5
  119. package/dist/utils/index.d.ts.map +1 -1
  120. package/dist/web-0016ac81.js +1 -0
  121. package/dist/web-4e6d8ea9.js +1 -0
  122. package/dist/web.js +1 -1
  123. package/dist/window.d.ts.map +1 -1
  124. package/dist/xychartDiagram-PRI3JC2R-003630a4.js +1 -0
  125. package/dist/xychartDiagram-PRI3JC2R-df869780.js +1 -0
  126. package/package.json +5 -3
  127. package/public/index.html +45 -32
@@ -0,0 +1 @@
1
+ import{_ as e,ar as n,as as r,at as t,au as a,l as i,d,av as o,aw as s,ag as g,al as c,ah as l,af as f,ax as h,ay as p,az as u}from"./web-0016ac81.js";import{G as w}from"./graph-db4953aa.js";import{l as v}from"./layout-40652dba.js";import{c as m}from"./clone-8494eb3f.js";import{m as y}from"./_basePickBy-cbf78fb3.js";import{i as X}from"./_baseUniq-38ea2195.js";function b(e){var n,r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:(n=e,y(n.nodes(),(function(e){var r=n.node(e),t=n.parent(e),e={v:e};return X(r)||(e.value=r),X(t)||(e.parent=t),e}))),edges:E(e)};return X(e.graph())||(r.value=m(e.graph())),r}function E(e){return y(e.edges(),(function(n){var r=e.edge(n),t={v:n.v,w:n.w};return X(n.name)||(t.name=n.name),X(r)||(t.value=r),t}))}var N=new Map,C=new Map,x=new Map,S=e((()=>{C.clear(),x.clear(),N.clear()}),"clear"),I=e(((e,n)=>{var r=C.get(n)||[];return i.trace("In isDescendant",n," ",e," = ",r.includes(e)),r.includes(e)}),"isDescendant"),D=e(((e,n)=>{var r=C.get(n)||[];return i.info("Descendants of ",n," is ",r),i.info("Edge is ",e),e.v!==n&&e.w!==n&&(r?r.includes(e.v)||I(e.v,n)||I(e.w,n)||r.includes(e.w):(i.debug("Tilt, ",n,",not in descendants"),!1))}),"edgeInCluster"),O=e(((e,n,r,t)=>{i.warn("Copying children of ",e,"root",t,"data",n.node(e),t);var a=n.children(e)||[];e!==t&&a.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach((a=>{var d;0<n.children(a).length?O(a,n,r,t):(d=n.node(a),i.info("cp ",a," to ",t," with parent ",e),r.setNode(a,d),t!==n.parent(a)&&(i.warn("Setting parent",a,n.parent(a)),r.setParent(a,n.parent(a))),e!==t&&a!==e?(i.debug("Setting parent",a,e),r.setParent(a,e)):(i.info("In copy ",e,"root",t,"data",n.node(e),t),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==t,"node!==clusterId",a!==e)),d=n.edges(a),i.debug("Copying Edges",d),d.forEach((a=>{i.info("Edge",a);var d=n.edge(a.v,a.w,a.name);i.info("Edge data",d,t);try{D(a,t)?(i.info("Copying as ",a.v,a.w,d,a.name),r.setEdge(a.v,a.w,d,a.name),i.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):i.info("Skipping copy of edge ",a.v,"--\x3e",a.w," rootId: ",t," clusterId:",e)}catch(a){i.error(a)}}))),i.debug("Removing node",a),n.removeNode(a)}))}),"copy"),k=e(((e,n)=>{var r=n.children(e);let t=[...r];for(const a of r)x.set(a,e),t=[...t,...k(a,n)];return t}),"extractDescendants"),G=e(((e,n,r)=>{var t=e.edges().filter((e=>e.v===n||e.w===n));e=e.edges().filter((e=>e.v===r||e.w===r)),t=t.map((e=>({v:e.v===n?r:e.v,w:e.w===n?n:e.w})));const a=e.map((e=>({v:e.v,w:e.w})));return t.filter((e=>a.some((n=>e.v===n.v&&e.w===n.w))))}),"findCommonEdges"),B=e(((e,n,r)=>{var t=n.children(e);if(i.trace("Searching children of id ",e,t),t.length<1)return e;let a;for(const e of t){var d=B(e,n,r),o=G(n,r,d);if(d){if(!(0<o.length))return d;a=d}}return a}),"findNonClusterChild"),P=e((e=>N.has(e)&&N.get(e).externalConnections&&N.has(e)?N.get(e).id:e),"getAnchorId"),A=e(((e,n)=>{if(!e||10<n)i.debug("Opting out, no graph ");else{for(var r of(i.debug("Opting in, graph "),e.nodes().forEach((function(n){0<e.children(n).length&&(i.warn("Cluster identified",n," Replacement id in edges: ",B(n,e,n)),C.set(n,k(n,e)),N.set(n,{id:B(n,e,n),clusterData:e.node(n)}))})),e.nodes().forEach((function(n){var r=e.children(n),t=e.edges();0<r.length?(i.debug("Cluster identified",n,C),t.forEach((e=>{I(e.v,n)^I(e.w,n)&&(i.warn("Edge: ",e," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",C.get(n)),N.get(n).externalConnections=!0)}))):i.debug("Not a cluster ",n,C)})),N.keys())){var t=N.get(r).id;(t=e.parent(t))!==r&&N.has(t)&&!N.get(t).externalConnections&&(N.get(r).id=t)}e.edges().forEach((function(n){var r,t,a,d=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n))),n.v,n.w,i.warn("Fix XXX",N,"ids:",n.v,n.w,"Translating: ",N.get(n.v)," --- ",N.get(n.w)),(N.get(n.v)||N.get(n.w))&&(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=P(n.v),t=P(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v&&(a=e.parent(r),N.get(a).externalConnections=!0,d.fromCluster=n.v),t!==n.w&&(a=e.parent(t),N.get(a).externalConnections=!0,d.toCluster=n.w),i.warn("Fix Replacing with XXX",r,t,n.name),e.setEdge(r,t,d,n.name))})),i.warn("Adjusted Graph",b(e)),J(e,0),i.trace(N)}}),"adjustClustersAndEdges"),J=e(((e,n)=>{if(i.warn("extractor - ",n,b(e),e.children("D")),10<n)i.error("Bailing out");else{var r=e.nodes();let o=!1;for(const n of r){var t=e.children(n);o=o||0<t.length}if(o){i.debug("Nodes = ",r,n);for(const t of r)if(i.debug("Extracting node",t,N,N.has(t)&&!N.get(t).externalConnections,!e.parent(t),e.node(t),e.children("D")," Depth ",n),N.has(t))if(!N.get(t).externalConnections&&e.children(t)&&0<e.children(t).length){i.warn("Cluster without external connections, without a parent and with children",t,n);let r="TB"===e.graph().rankdir?"LR":"TB";N.get(t)?.clusterData?.dir&&(r=N.get(t).clusterData.dir,i.warn("Fixing dir",N.get(t).clusterData.dir,r));var a=new w({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));i.warn("Old graph before copy",b(e)),O(t,e,a,t),e.setNode(t,{clusterNode:!0,id:t,clusterData:N.get(t).clusterData,label:N.get(t).label,graph:a}),i.warn("New graph after copy node: (",t,")",b(a)),i.debug("Old graph after copy",b(e))}else i.warn("Cluster ** ",t," **not meeting the criteria !externalConnections:",!N.get(t).externalConnections," no parent: ",!e.parent(t)," children ",e.children(t)&&0<e.children(t).length,e.children("D"),n),i.debug(N);else i.debug("Not a cluster",t,n);r=e.nodes(),i.warn("New list of nodes",r);for(const t of r){var d=e.node(t);i.warn(" Now next level",t,d),d?.clusterNode&&J(d.graph,n+1)}}else i.debug("Done, no node has children",e.nodes())}}),"extractor"),T=e(((e,n)=>{if(0===n.length)return[];let r=Object.assign([],n);return n.forEach((n=>{n=e.children(n),n=T(e,n),r=[...r,...n]})),r}),"sorter"),R=e((e=>T(e,e.children())),"sortNodesByHierarchy"),j=e((async(n,r,t,a,d,w)=>{i.warn("Graph in recursive render:XAX",b(r),d);const m=r.graph().rankdir;i.trace("Dir in recursive render - dir:",m),n=n.insert("g").attr("class","root"),r.nodes()?i.info("Recursive render XXX",r.nodes()):i.info("No nodes found for",r),0<r.edges().length&&i.info("Recursive edges",r.edge(r.edges()[0]));const y=n.insert("g").attr("class","clusters"),X=n.insert("g").attr("class","edgePaths"),E=n.insert("g").attr("class","edgeLabels"),C=n.insert("g").attr("class","nodes");await Promise.all(r.nodes().map((async function(e){var n,c,l=r.node(e);void 0!==d&&(n=JSON.parse(JSON.stringify(d.clusterData)),i.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",n.height,"\nParent cluster",d.height),r.setNode(d.id,n),r.parent(e)||(i.trace("Setting parent",e,d.id),r.setParent(e,d.id,n))),i.info("(Insert) Node XXX"+e+": "+JSON.stringify(r.node(e))),l?.clusterNode?(i.info("Cluster identified XBX",e,l.width,r.node(e)),({ranksep:n,nodesep:c}=r.graph()),l.graph.setGraph({...l.graph.graph(),ranksep:n+25,nodesep:c}),c=(n=await j(C,l.graph,t,a,r.node(e),w)).elem,o(l,c),l.diff=n.diff||0,i.info("New compound node after recursive render XAX",e,"width",l.width,"height",l.height),s(c,l)):0<r.children(e).length?(i.trace("Cluster - the non recursive path XBX",e,l.id,l,l.width,"Graph:",r),i.trace(B(l.id,r)),N.set(l.id,{id:B(l.id,r),node:l})):(i.trace("Node - the non recursive path XAX",e,C,r.node(e),m),await g(C,r.node(e),{config:w,dir:m}))}))),await e((async()=>{var e=r.edges().map((async function(e){var n=r.edge(e.v,e.w,e.name);i.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),i.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(r.edge(e))),i.info("Fix",N,"ids:",e.v,e.w,"Translating: ",N.get(e.v),N.get(e.w)),await u(E,n)}));await Promise.all(e)}),"processEdges")(),i.info("Graph before layout:",JSON.stringify(b(r))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),v(r),i.info("Graph after layout:",JSON.stringify(b(r)));let x=0,S=c(w).subGraphTitleTotalMargin;return await Promise.all(R(r).map((async function(e){var n,t=r.node(e);i.info("Position XBX => "+e+": ("+t.x,","+t.y,") width: ",t.width," height: ",t.height),t?.clusterNode?(t.y+=S,i.info("A tainted cluster node XBX1",e,t.id,t.width,t.height,t.x,t.y,r.parent(e)),N.get(t.id).node=t,l(t)):0<r.children(e).length?(i.info("A pure cluster node XBX1",e,t.id,t.x,t.y,t.width,t.height,r.parent(e)),t.height+=S,r.node(t.parentId),e=t?.padding/2||0,n=t?.labelBBox?.height||0,i.debug("OffsetY",n-e||0,"labelHeight",n,"halfPadding",e),await f(y,t),N.get(t.id).node=t):(n=r.node(t.parentId),t.y+=S/2,i.info("A regular node XBX1 - using the padding",t.id,"parent",t.parentId,t.width,t.height,t.x,t.y,"offsetY",t.offsetY,"parent",n,n?.offsetY,t),l(t))}))),r.edges().forEach((function(e){var n=r.edge(e),d=(i.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(n),n),n.points.forEach((e=>e.y+=S/2)),r.node(e.v));e=r.node(e.w),d=h(X,n,N,t,d,e,a);p(n,d)})),r.nodes().forEach((function(e){var n=r.node(e);i.info(e,n.type,n.diff),n.isGroup&&(x=n.diff)})),i.warn("Returning from recursive render XAX",n,x),{elem:n,diff:x}}),"recursiveRender"),F=e((async(e,o)=>{const s=new w({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));o=o.select("g");var g=(n(o,e.markers,e.type,e.diagramId),r(),t(),a(),S(),e.nodes.forEach((e=>{s.setNode(e.id,{...e}),e.parentId&&s.setParent(e.id,e.parentId)})),i.debug("Edges:",e.edges),e.edges.forEach((e=>{var n,r,t,a,i,d,o;e.start===e.end?(r=(n=e.start)+"---"+n+"---1",t=n+"---"+n+"---2",a=s.node(n),s.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),s.setParent(r,a.parentId),s.setNode(t,{domId:t,id:t,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),s.setParent(t,a.parentId),i=structuredClone(e),d=structuredClone(e),o=structuredClone(e),i.label="",i.arrowTypeEnd="none",i.id=n+"-cyclic-special-1",d.arrowTypeStart="none",d.arrowTypeEnd="none",d.id=n+"-cyclic-special-mid",o.label="",a.isGroup&&(i.fromCluster=n,o.toCluster=n),o.id=n+"-cyclic-special-2",o.arrowTypeStart="none",s.setEdge(n,r,i,n+"-cyclic-special-0"),s.setEdge(r,t,d,n+"-cyclic-special-1"),s.setEdge(t,n,o,n+"-cyc<lic-special-2")):s.setEdge(e.start,e.end,{...e},e.id)})),i.warn("Graph at first:",JSON.stringify(b(s))),A(s),i.warn("Graph after XAX:",JSON.stringify(b(s))),d());await j(o,s,e.type,e.diagramId,void 0,g)}),"render");export{F as render};
@@ -0,0 +1 @@
1
+ import{_ as e,ar as n,as as r,at as t,au as a,l as i,d,av as o,aw as s,ag as g,al as c,ah as l,af as f,ax as h,ay as p,az as u}from"./web-4e6d8ea9.js";import{G as w}from"./graph-834f6046.js";import{l as v}from"./layout-54ffc604.js";import{c as m}from"./clone-6cd174cf.js";import{m as y}from"./_basePickBy-1057a1b4.js";import{i as X}from"./_baseUniq-52a47b7b.js";function b(e){var n,r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:(n=e,y(n.nodes(),(function(e){var r=n.node(e),t=n.parent(e),e={v:e};return X(r)||(e.value=r),X(t)||(e.parent=t),e}))),edges:E(e)};return X(e.graph())||(r.value=m(e.graph())),r}function E(e){return y(e.edges(),(function(n){var r=e.edge(n),t={v:n.v,w:n.w};return X(n.name)||(t.name=n.name),X(r)||(t.value=r),t}))}var N=new Map,C=new Map,x=new Map,S=e((()=>{C.clear(),x.clear(),N.clear()}),"clear"),I=e(((e,n)=>{var r=C.get(n)||[];return i.trace("In isDescendant",n," ",e," = ",r.includes(e)),r.includes(e)}),"isDescendant"),D=e(((e,n)=>{var r=C.get(n)||[];return i.info("Descendants of ",n," is ",r),i.info("Edge is ",e),e.v!==n&&e.w!==n&&(r?r.includes(e.v)||I(e.v,n)||I(e.w,n)||r.includes(e.w):(i.debug("Tilt, ",n,",not in descendants"),!1))}),"edgeInCluster"),O=e(((e,n,r,t)=>{i.warn("Copying children of ",e,"root",t,"data",n.node(e),t);var a=n.children(e)||[];e!==t&&a.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach((a=>{var d;0<n.children(a).length?O(a,n,r,t):(d=n.node(a),i.info("cp ",a," to ",t," with parent ",e),r.setNode(a,d),t!==n.parent(a)&&(i.warn("Setting parent",a,n.parent(a)),r.setParent(a,n.parent(a))),e!==t&&a!==e?(i.debug("Setting parent",a,e),r.setParent(a,e)):(i.info("In copy ",e,"root",t,"data",n.node(e),t),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==t,"node!==clusterId",a!==e)),d=n.edges(a),i.debug("Copying Edges",d),d.forEach((a=>{i.info("Edge",a);var d=n.edge(a.v,a.w,a.name);i.info("Edge data",d,t);try{D(a,t)?(i.info("Copying as ",a.v,a.w,d,a.name),r.setEdge(a.v,a.w,d,a.name),i.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):i.info("Skipping copy of edge ",a.v,"--\x3e",a.w," rootId: ",t," clusterId:",e)}catch(a){i.error(a)}}))),i.debug("Removing node",a),n.removeNode(a)}))}),"copy"),k=e(((e,n)=>{var r=n.children(e);let t=[...r];for(const a of r)x.set(a,e),t=[...t,...k(a,n)];return t}),"extractDescendants"),G=e(((e,n,r)=>{var t=e.edges().filter((e=>e.v===n||e.w===n));e=e.edges().filter((e=>e.v===r||e.w===r)),t=t.map((e=>({v:e.v===n?r:e.v,w:e.w===n?n:e.w})));const a=e.map((e=>({v:e.v,w:e.w})));return t.filter((e=>a.some((n=>e.v===n.v&&e.w===n.w))))}),"findCommonEdges"),B=e(((e,n,r)=>{var t=n.children(e);if(i.trace("Searching children of id ",e,t),t.length<1)return e;let a;for(const e of t){var d=B(e,n,r),o=G(n,r,d);if(d){if(!(0<o.length))return d;a=d}}return a}),"findNonClusterChild"),P=e((e=>N.has(e)&&N.get(e).externalConnections&&N.has(e)?N.get(e).id:e),"getAnchorId"),A=e(((e,n)=>{if(!e||10<n)i.debug("Opting out, no graph ");else{for(var r of(i.debug("Opting in, graph "),e.nodes().forEach((function(n){0<e.children(n).length&&(i.warn("Cluster identified",n," Replacement id in edges: ",B(n,e,n)),C.set(n,k(n,e)),N.set(n,{id:B(n,e,n),clusterData:e.node(n)}))})),e.nodes().forEach((function(n){var r=e.children(n),t=e.edges();0<r.length?(i.debug("Cluster identified",n,C),t.forEach((e=>{I(e.v,n)^I(e.w,n)&&(i.warn("Edge: ",e," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",C.get(n)),N.get(n).externalConnections=!0)}))):i.debug("Not a cluster ",n,C)})),N.keys())){var t=N.get(r).id;(t=e.parent(t))!==r&&N.has(t)&&!N.get(t).externalConnections&&(N.get(r).id=t)}e.edges().forEach((function(n){var r,t,a,d=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n))),n.v,n.w,i.warn("Fix XXX",N,"ids:",n.v,n.w,"Translating: ",N.get(n.v)," --- ",N.get(n.w)),(N.get(n.v)||N.get(n.w))&&(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=P(n.v),t=P(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v&&(a=e.parent(r),N.get(a).externalConnections=!0,d.fromCluster=n.v),t!==n.w&&(a=e.parent(t),N.get(a).externalConnections=!0,d.toCluster=n.w),i.warn("Fix Replacing with XXX",r,t,n.name),e.setEdge(r,t,d,n.name))})),i.warn("Adjusted Graph",b(e)),J(e,0),i.trace(N)}}),"adjustClustersAndEdges"),J=e(((e,n)=>{if(i.warn("extractor - ",n,b(e),e.children("D")),10<n)i.error("Bailing out");else{var r=e.nodes();let o=!1;for(const n of r){var t=e.children(n);o=o||0<t.length}if(o){i.debug("Nodes = ",r,n);for(const t of r)if(i.debug("Extracting node",t,N,N.has(t)&&!N.get(t).externalConnections,!e.parent(t),e.node(t),e.children("D")," Depth ",n),N.has(t))if(!N.get(t).externalConnections&&e.children(t)&&0<e.children(t).length){i.warn("Cluster without external connections, without a parent and with children",t,n);let r="TB"===e.graph().rankdir?"LR":"TB";N.get(t)?.clusterData?.dir&&(r=N.get(t).clusterData.dir,i.warn("Fixing dir",N.get(t).clusterData.dir,r));var a=new w({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));i.warn("Old graph before copy",b(e)),O(t,e,a,t),e.setNode(t,{clusterNode:!0,id:t,clusterData:N.get(t).clusterData,label:N.get(t).label,graph:a}),i.warn("New graph after copy node: (",t,")",b(a)),i.debug("Old graph after copy",b(e))}else i.warn("Cluster ** ",t," **not meeting the criteria !externalConnections:",!N.get(t).externalConnections," no parent: ",!e.parent(t)," children ",e.children(t)&&0<e.children(t).length,e.children("D"),n),i.debug(N);else i.debug("Not a cluster",t,n);r=e.nodes(),i.warn("New list of nodes",r);for(const t of r){var d=e.node(t);i.warn(" Now next level",t,d),d?.clusterNode&&J(d.graph,n+1)}}else i.debug("Done, no node has children",e.nodes())}}),"extractor"),T=e(((e,n)=>{if(0===n.length)return[];let r=Object.assign([],n);return n.forEach((n=>{n=e.children(n),n=T(e,n),r=[...r,...n]})),r}),"sorter"),R=e((e=>T(e,e.children())),"sortNodesByHierarchy"),j=e((async(n,r,t,a,d,w)=>{i.warn("Graph in recursive render:XAX",b(r),d);const m=r.graph().rankdir;i.trace("Dir in recursive render - dir:",m),n=n.insert("g").attr("class","root"),r.nodes()?i.info("Recursive render XXX",r.nodes()):i.info("No nodes found for",r),0<r.edges().length&&i.info("Recursive edges",r.edge(r.edges()[0]));const y=n.insert("g").attr("class","clusters"),X=n.insert("g").attr("class","edgePaths"),E=n.insert("g").attr("class","edgeLabels"),C=n.insert("g").attr("class","nodes");await Promise.all(r.nodes().map((async function(e){var n,c,l=r.node(e);void 0!==d&&(n=JSON.parse(JSON.stringify(d.clusterData)),i.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",n.height,"\nParent cluster",d.height),r.setNode(d.id,n),r.parent(e)||(i.trace("Setting parent",e,d.id),r.setParent(e,d.id,n))),i.info("(Insert) Node XXX"+e+": "+JSON.stringify(r.node(e))),l?.clusterNode?(i.info("Cluster identified XBX",e,l.width,r.node(e)),({ranksep:n,nodesep:c}=r.graph()),l.graph.setGraph({...l.graph.graph(),ranksep:n+25,nodesep:c}),c=(n=await j(C,l.graph,t,a,r.node(e),w)).elem,o(l,c),l.diff=n.diff||0,i.info("New compound node after recursive render XAX",e,"width",l.width,"height",l.height),s(c,l)):0<r.children(e).length?(i.trace("Cluster - the non recursive path XBX",e,l.id,l,l.width,"Graph:",r),i.trace(B(l.id,r)),N.set(l.id,{id:B(l.id,r),node:l})):(i.trace("Node - the non recursive path XAX",e,C,r.node(e),m),await g(C,r.node(e),{config:w,dir:m}))}))),await e((async()=>{var e=r.edges().map((async function(e){var n=r.edge(e.v,e.w,e.name);i.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),i.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(r.edge(e))),i.info("Fix",N,"ids:",e.v,e.w,"Translating: ",N.get(e.v),N.get(e.w)),await u(E,n)}));await Promise.all(e)}),"processEdges")(),i.info("Graph before layout:",JSON.stringify(b(r))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),v(r),i.info("Graph after layout:",JSON.stringify(b(r)));let x=0,S=c(w).subGraphTitleTotalMargin;return await Promise.all(R(r).map((async function(e){var n,t=r.node(e);i.info("Position XBX => "+e+": ("+t.x,","+t.y,") width: ",t.width," height: ",t.height),t?.clusterNode?(t.y+=S,i.info("A tainted cluster node XBX1",e,t.id,t.width,t.height,t.x,t.y,r.parent(e)),N.get(t.id).node=t,l(t)):0<r.children(e).length?(i.info("A pure cluster node XBX1",e,t.id,t.x,t.y,t.width,t.height,r.parent(e)),t.height+=S,r.node(t.parentId),e=t?.padding/2||0,n=t?.labelBBox?.height||0,i.debug("OffsetY",n-e||0,"labelHeight",n,"halfPadding",e),await f(y,t),N.get(t.id).node=t):(n=r.node(t.parentId),t.y+=S/2,i.info("A regular node XBX1 - using the padding",t.id,"parent",t.parentId,t.width,t.height,t.x,t.y,"offsetY",t.offsetY,"parent",n,n?.offsetY,t),l(t))}))),r.edges().forEach((function(e){var n=r.edge(e),d=(i.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(n),n),n.points.forEach((e=>e.y+=S/2)),r.node(e.v));e=r.node(e.w),d=h(X,n,N,t,d,e,a);p(n,d)})),r.nodes().forEach((function(e){var n=r.node(e);i.info(e,n.type,n.diff),n.isGroup&&(x=n.diff)})),i.warn("Returning from recursive render XAX",n,x),{elem:n,diff:x}}),"recursiveRender"),F=e((async(e,o)=>{const s=new w({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));o=o.select("g");var g=(n(o,e.markers,e.type,e.diagramId),r(),t(),a(),S(),e.nodes.forEach((e=>{s.setNode(e.id,{...e}),e.parentId&&s.setParent(e.id,e.parentId)})),i.debug("Edges:",e.edges),e.edges.forEach((e=>{var n,r,t,a,i,d,o;e.start===e.end?(r=(n=e.start)+"---"+n+"---1",t=n+"---"+n+"---2",a=s.node(n),s.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),s.setParent(r,a.parentId),s.setNode(t,{domId:t,id:t,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),s.setParent(t,a.parentId),i=structuredClone(e),d=structuredClone(e),o=structuredClone(e),i.label="",i.arrowTypeEnd="none",i.id=n+"-cyclic-special-1",d.arrowTypeStart="none",d.arrowTypeEnd="none",d.id=n+"-cyclic-special-mid",o.label="",a.isGroup&&(i.fromCluster=n,o.toCluster=n),o.id=n+"-cyclic-special-2",o.arrowTypeStart="none",s.setEdge(n,r,i,n+"-cyclic-special-0"),s.setEdge(r,t,d,n+"-cyclic-special-1"),s.setEdge(t,n,o,n+"-cyc<lic-special-2")):s.setEdge(e.start,e.end,{...e},e.id)})),i.warn("Graph at first:",JSON.stringify(b(s))),A(s),i.warn("Graph after XAX:",JSON.stringify(b(s))),d());await j(o,s,e.type,e.diagramId,void 0,g)}),"render");export{F as render};
@@ -0,0 +1 @@
1
+ function t(t,i){var n;return(i=(t=i?t.toExponential(i-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,i)).length?n[0]+n.slice(2):n,+t.slice(i+1)]}function i(i){return(i=t(Math.abs(i)))?i[1]:NaN}var n,r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function e(t){var i;if(i=r.exec(t))return new o({fill:i[1],align:i[2],sign:i[3],symbol:i[4],zero:i[5],width:i[6],comma:i[7],precision:i[8]&&i[8].slice(1),trim:i[9],type:i[10]});throw new Error("invalid format: "+t)}function o(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function a(i,n){var r;return(n=t(i,n))?(r=n[0],(n=n[1])<0?"0."+new Array(-n).join("0")+r:r.length>n+1?r.slice(0,n+1)+"."+r.slice(n+1):r+new Array(n-r.length+2).join("0")):i+""}e.prototype=o.prototype,o.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};var s={"%":(t,i)=>(100*t).toFixed(i),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,i)=>t.toExponential(i),f:(t,i)=>t.toFixed(i),g:(t,i)=>t.toPrecision(i),o:t=>Math.round(t).toString(8),p:(t,i)=>a(100*t,i),r:a,s:function(i,r){var e,o,a=t(i,r);return a?(e=a[0],(a=(a=a[1])-(n=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1)===(o=e.length)?e:o<a?e+new Array(a-o+1).join("0"):0<a?e.slice(0,a)+"."+e.slice(a):"0."+new Array(1-a).join("0")+t(i,Math.max(0,r+a-1))[0]):i+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function c(t){return t}var l,h,u,d=Array.prototype.map,f=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function g(t){var r,o,a,l=void 0===t.grouping||void 0===t.thousands?c:(o=d.call(t.grouping,Number),a=t.thousands+"",function(t,i){for(var n=t.length,r=[],e=0,s=o[0],c=0;0<n&&0<s&&(i<c+s+1&&(s=Math.max(1,i-c)),r.push(t.substring(n-=s,n+s)),!((c+=s+1)>i));)s=o[e=(e+1)%o.length];return r.reverse().join(a)}),h=void 0===t.currency?"":t.currency[0]+"",u=void 0===t.currency?"":t.currency[1]+"",g=void 0===t.decimal?".":t.decimal+"",m=void 0===t.numerals?c:(r=d.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,(function(t){return r[+t]}))}),p=void 0===t.percent?"%":t.percent+"",v=void 0===t.minus?"−":t.minus+"",y=void 0===t.nan?"NaN":t.nan+"";function M(t){var i=(t=e(t)).fill,r=t.align,o=t.sign,a=t.symbol,c=t.zero,d=t.width,M=t.comma,b=t.precision,x=t.trim,w=t.type,S=("n"===w?(M=!0,w="g"):s[w]||(void 0===b&&(b=12),x=!0,w="g"),(c||"0"===i&&"="===r)&&(c=!0,i="0",r="="),"$"===a?h:"#"===a&&/[boxX]/.test(w)?"0"+w.toLowerCase():""),k="$"===a?u:/[%p]/.test(w)?p:"",z=s[w],A=/[defgprs%]/.test(w);function N(t){var e,a,s,h=S,u=k;if("c"===w)u=z(t)+u,t="";else{var p=(t=+t)<0||1/t<0;if(t=isNaN(t)?y:z(Math.abs(t),b),x&&(t=function(t){t:for(var i,n=t.length,r=1,e=-1;r<n;++r)switch(t[r]){case".":e=i=r;break;case"0":0===e&&(e=r),i=r;break;default:if(!+t[r])break t;0<e&&(e=0)}return 0<e?t.slice(0,e)+t.slice(i+1):t}(t)),h=((p=(!p||0!=+t||"+"===o)&&p)?"("===o?o:v:"-"===o||"("===o?"":o)+h,u=("s"===w?f[8+n/3]:"")+u+(p&&"("===o?")":""),A)for(e=-1,a=t.length;++e<a;)if((s=t.charCodeAt(e))<48||57<s){u=(46===s?g+t.slice(e+1):t.slice(e))+u,t=t.slice(0,e);break}}M&&!c&&(t=l(t,1/0));var N=h.length+t.length+u.length,j=N<d?new Array(d-N+1).join(i):"";switch(M&&c&&(t=l(j+t,j.length?d-u.length:1/0),j=""),r){case"<":t=h+t+u+j;break;case"=":t=h+j+t+u;break;case"^":t=j.slice(0,N=j.length>>1)+h+t+u+j.slice(N);break;default:t=j+h+t+u}return m(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),N.toString=function(){return t+""},N}return{format:M,formatPrefix:function(t,n){var r=M(((t=e(t)).type="f",t)),o=(t=3*Math.max(-8,Math.min(8,Math.floor(i(n)/3))),Math.pow(10,-t)),a=f[8+t/3];return function(t){return r(o*t)+a}}}}l=g({thousands:",",grouping:[3],currency:["$",""]}),h=l.format,u=l.formatPrefix;export{u as a,h as b,i as e,e as f};
@@ -0,0 +1 @@
1
+ import{s as e,g as t,n as a,o as r,b as n,c as l,_ as s,E as i,D as o,a$ as c,t as d,C as p,l as h,H as u,k as f,b0 as m,j as y}from"./web-4e6d8ea9.js";import{s as g}from"./chunk-QN33PNHL-0bf10733.js";import{p as x}from"./chunk-4BX2VUAB-d05d937e.js";import{p as v}from"./mermaid-parser.core-10bed742.js";import{b as S}from"./defaultLocale-1fe70b7d.js";import{o as b}from"./ordinal-221e41d7.js";import"./_baseUniq-52a47b7b.js";import"./_basePickBy-1057a1b4.js";import"./clone-6cd174cf.js";import"./init-cf76ae07.js";function C(e){var t=0,a=e.children,r=a&&a.length;if(r)for(;0<=--r;)t+=a[r].value;else t=1;e.value=t}function w(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=L)):void 0===t&&(t=$);for(var a,r,n,l,s,i=[e=new T(e)];a=i.pop();)if((n=t(a.data))&&(s=(n=Array.from(n)).length))for(a.children=n,l=s-1;0<=l;--l)i.push(r=n[l]=new T(n[l])),r.parent=a,r.depth=a.depth+1;return e.eachBefore(M)}function $(e){return e.children}function L(e){return Array.isArray(e)?e[1]:null}function k(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function M(e){for(var t=0;e.height=t,(e=e.parent)&&e.height<++t;);}function T(e){this.data=e,this.depth=this.height=0,this.parent=null}function z(){return 0}function F(e){return function(){return e}}function P(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function B(e,t,a,r,n){for(var l,s=e.children,i=-1,o=s.length,c=e.value&&(r-t)/e.value;++i<o;)(l=s[i]).y0=a,l.y1=n,l.x0=t,l.x1=t+=l.value*c}function N(e,t,a,r,n){for(var l,s=e.children,i=-1,o=s.length,c=e.value&&(n-a)/e.value;++i<o;)(l=s[i]).x0=t,l.x1=r,l.y0=a,l.y1=a+=l.value*c}T.prototype=w.prototype={constructor:T,count:function(){return this.eachAfter(C)},each:function(e,t){let a=-1;for(const r of this)e.call(t,r,++a,this);return this},eachAfter:function(e,t){for(var a,r,n,l=this,s=[l],i=[],o=-1;l=s.pop();)if(i.push(l),a=l.children)for(r=0,n=a.length;r<n;++r)s.push(a[r]);for(;l=i.pop();)e.call(t,l,++o,this);return this},eachBefore:function(e,t){for(var a,r,n,l=[this],s=-1;a=l.pop();)if(e.call(t,a,++s,this),r=a.children)for(n=r.length-1;0<=n;--n)l.push(r[n]);return this},find:function(e,t){let a=-1;for(const r of this)if(e.call(t,r,++a,this))return r},sum:function(e){return this.eachAfter((function(t){for(var a=+e(t.data)||0,r=t.children,n=r&&r.length;0<=--n;)a+=r[n].value;t.value=a}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,a=function(e,t){if(e===t)return e;var a=e.ancestors(),r=t.ancestors(),n=null;for(e=a.pop(),t=r.pop();e===t;)n=e,e=a.pop(),t=r.pop();return n}(t,e),r=[t];t!==a;)t=t.parent,r.push(t);for(var n=r.length;e!==a;)r.splice(n,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(a){a!==e&&t.push({source:a.parent,target:a})})),t},copy:function(){return w(this).eachBefore(k)},[Symbol.iterator]:function*(){var e,t,a,r,n,l=[this];do{for(t=l.reverse(),l=[];e=t.pop();)if(yield e,a=e.children)for(r=0,n=a.length;r<n;++r)l.push(a[r])}while(l.length)}};var A=function e(t){function a(e,a,r,n,l){!function(e,t,a,r,n,l){for(var s,i,o,c,d,p,h,u,f,m,y,g=[],x=t.children,v=0,S=0,b=x.length,C=t.value;v<b;){for(o=n-a,c=l-r;!(d=x[S++].value)&&S<b;);for(y=(p=h=d)*d*(m=Math.max(c/o,o/c)/(C*e)),f=Math.max(h/y,y/p);S<b;++S){if(d+=i=x[S].value,i<p&&(p=i),h<i&&(h=i),y=d*d*m,f<(u=Math.max(h/y,y/p))){d-=i;break}f=u}g.push(s={value:d,dice:o<c,children:x.slice(v,S)}),s.dice?B(s,a,r,n,C?r+=c*d/C:l):N(s,a,r,C?a+=o*d/C:n,l),C-=d,v=S}}(t,e,a,r,n,l)}return a.ratio=function(t){return e(1<(t=+t)?t:1)},a}((1+Math.sqrt(5))/2);function j(){var e=A,t=!1,a=1,r=1,n=[0],l=z,s=z,i=z,o=z,c=z;function d(e){return e.x0=e.y0=0,e.x1=a,e.y1=r,e.eachBefore(p),n=[0],t&&e.eachBefore(P),e}function p(t){var a=n[t.depth],r=t.x0+a,d=t.y0+a,p=t.x1-a,h=t.y1-a;p<r&&(r=p=(r+p)/2),h<d&&(d=h=(d+h)/2),t.x0=r,t.y0=d,t.x1=p,t.y1=h,t.children&&(a=n[t.depth+1]=l(t)/2,r+=c(t)-a,d+=s(t)-a,(p-=i(t)-a)<r&&(r=p=(r+p)/2),(h-=o(t)-a)<d&&(d=h=(d+h)/2),e(t,r,d,p,h))}return d.round=function(e){return arguments.length?(t=!!e,d):t},d.size=function(e){return arguments.length?(a=+e[0],r=+e[1],d):[a,r]},d.tile=function(t){return arguments.length?(e=function(e){if("function"!=typeof e)throw new Error;return e}(t),d):e},d.padding=function(e){return arguments.length?d.paddingInner(e).paddingOuter(e):d.paddingInner()},d.paddingInner=function(e){return arguments.length?(l="function"==typeof e?e:F(+e),d):l},d.paddingOuter=function(e){return arguments.length?d.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):d.paddingTop()},d.paddingTop=function(e){return arguments.length?(s="function"==typeof e?e:F(+e),d):s},d.paddingRight=function(e){return arguments.length?(i="function"==typeof e?e:F(+e),d):i},d.paddingBottom=function(e){return arguments.length?(o="function"==typeof e?e:F(+e),d):o},d.paddingLeft=function(e){return arguments.length?(c="function"==typeof e?e:F(+e),d):c},d}var W=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=e,this.getAccTitle=t,this.setDiagramTitle=a,this.getDiagramTitle=r,this.getAccDescription=n,this.setAccDescription=l}static{s(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){var e=p,t=i();return o({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){const a=this.classes.get(e)??{id:e,styles:[],textStyles:[]};(t=t.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";"))&&t.forEach((e=>{c(e)&&(a?.textStyles?a.textStyles.push(e):a.textStyles=[e]),a?.styles?a.styles.push(e):a.styles=[e]})),this.classes.set(e,a)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){d(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function D(e){if(!e.length)return[];const t=[],a=[];return e.forEach((e=>{var r,n={name:e.name,children:"Leaf"===e.type?void 0:[]};for(n.classSelector=e?.classSelector,e?.cssCompiledStyles&&(n.cssCompiledStyles=[e.cssCompiledStyles]),"Leaf"===e.type&&void 0!==e.value&&(n.value=e.value);0<a.length&&a[a.length-1].level>=e.level;)a.pop();0===a.length?t.push(n):(r=a[a.length-1].node).children?r.children.push(n):r.children=[n],"Leaf"!==e.type&&a.push({node:n,level:e.level})})),t}s(D,"buildHierarchy");var R=s(((e,t)=>{x(e,t);var a=[];for(const a of e.TreemapRows??[])"ClassDefStatement"===a.$type&&t.addClass(a.className??"",a.styleText??"");for(const s of e.TreemapRows??[]){var r,n,l,i=s.item;i&&(l=s.indent?parseInt(s.indent):0,r=V(i),n=0<(n=i.classSelector?t.getStylesForClass(i.classSelector):[]).length?n.join(";"):void 0,l={level:l,name:r,type:i.$type,value:i.value,classSelector:i.classSelector,cssCompiledStyles:n},a.push(l))}e=D(a);const o=s(((e,a)=>{for(const r of e)t.addNode(r,a),r.children&&0<r.children.length&&o(r.children,a+1)}),"addNodesRecursively");o(e,0)}),"populate"),V=s((e=>e.name?String(e.name):""),"getItemName"),E={parser:{yy:void 0},parse:s((async e=>{try{var t=await v("treemap",e),a=(h.debug("Treemap AST:",t),E.parser?.yy);if(!(a instanceof W))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.");R(t,a)}catch(e){throw h.error("Error parsing treemap:",e),e}}),"parse")},I=10,H={draw:s(((e,t,a,r)=>{const n=(r=r.db).getConfig();var l=n.padding??10,o=r.getDiagramTitle(),c=(r=r.getRoot(),i().themeVariables);if(r){var d=o?30:0,p=u(t),x=n.nodeWidth?n.nodeWidth*I:960,v=n.nodeHeight?n.nodeHeight*I:500,C=x,$=v+d;let a;p.attr("viewBox",`0 0 ${C} `+$),f(p,$,C,n.useMaxWidth);try{var L=n.valueFormat||",";if("$0,0"===L)a=s((e=>"$"+S(",")(e)),"valueFormat");else if(L.startsWith("$")&&L.includes(",")){var k=/\.\d+/.exec(L);const e=k?k[0]:"";a=s((t=>"$"+S(","+e)(t)),"valueFormat")}else if(L.startsWith("$")){const e=L.substring(1);a=s((t=>"$"+S(e||"")(t)),"valueFormat")}else a=S(L)}catch(e){h.error("Error creating format function:",e),a=S(",")}const i=b().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=b().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),T=b().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);o&&p.append("text").attr("x",C/2).attr("y",d/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(o),$=p.append("g").attr("transform",`translate(0, ${d})`).attr("class","treemapContainer"),k=w(r).sum((e=>e.value??0)).sort(((e,t)=>(t.value??0)-(e.value??0))),L=j().size([x,v]).paddingTop((e=>e.children&&0<e.children.length?35:0)).paddingInner(l).paddingLeft((e=>e.children&&0<e.children.length?I:0)).paddingRight((e=>e.children&&0<e.children.length?I:0)).paddingBottom((e=>e.children&&0<e.children.length?I:0)).round(!0)(k),c=L.descendants().filter((e=>e.children&&0<e.children.length)),C=$.selectAll(".treemapSection").data(c).enter().append("g").attr("class","treemapSection").attr("transform",(e=>`translate(${e.x0},${e.y0})`)),C.append("rect").attr("width",(e=>e.x1-e.x0)).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",(e=>0===e.depth?"display: none;":"")),C.append("clipPath").attr("id",((e,a)=>`clip-section-${t}-`+a)).append("rect").attr("width",(e=>Math.max(0,e.x1-e.x0-12))).attr("height",25),C.append("rect").attr("width",(e=>e.x1-e.x0)).attr("height",(e=>e.y1-e.y0)).attr("class",((e,t)=>"treemapSection section"+t)).attr("fill",(e=>i(e.data.name))).attr("fill-opacity",.6).attr("stroke",(e=>M(e.data.name))).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",(e=>0===e.depth?"display: none;":(e=m({cssCompiledStyles:e.data.cssCompiledStyles})).nodeStyles+";"+e.borderStyles.join(";"))),C.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text((e=>0===e.depth?"":e.data.name)).attr("font-weight","bold").attr("style",(e=>0===e.depth?"display: none;":"dominant-baseline: middle; font-size: 12px; fill:"+T(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+m({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:"))).each((function(e){if(0!==e.depth){var t=y(this),a=e.data.name,r=(t.text(a),e.x1-e.x0);let i;i=!1!==n.showValues&&e.value?r-10-30-10-6:r-6-6;var l=Math.max(15,i),s=t.node();if(l<s.getComputedTextLength()){let e=a;for(;0<e.length;){if(0===(e=a.substring(0,e.length-1)).length){t.text("..."),s.getComputedTextLength()>l&&t.text("");break}if(t.text(e+"..."),s.getComputedTextLength()<=l)break}}}})),!1!==n.showValues&&C.append("text").attr("class","treemapSectionValue").attr("x",(e=>e.x1-e.x0-10)).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text((e=>e.value?a(e.value):"")).attr("font-style","italic").attr("style",(e=>0===e.depth?"display: none;":"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+T(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+m({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:"))),o=L.leaves(),d=$.selectAll(".treemapLeafGroup").data(o).enter().append("g").attr("class",((e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?" "+e.data.classSelector:""}x`)).attr("transform",(e=>`translate(${e.x0},${e.y0})`)),d.append("rect").attr("width",(e=>e.x1-e.x0)).attr("height",(e=>e.y1-e.y0)).attr("class","treemapLeaf").attr("fill",(e=>e.parent?i(e.parent.data.name):i(e.data.name))).attr("style",(e=>m({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles)).attr("fill-opacity",.3).attr("stroke",(e=>e.parent?i(e.parent.data.name):i(e.data.name))).attr("stroke-width",3),d.append("clipPath").attr("id",((e,a)=>`clip-${t}-`+a)).append("rect").attr("width",(e=>Math.max(0,e.x1-e.x0-4))).attr("height",(e=>Math.max(0,e.y1-e.y0-4))),d.append("text").attr("class","treemapLabel").attr("x",(e=>(e.x1-e.x0)/2)).attr("y",(e=>(e.y1-e.y0)/2)).attr("style",(e=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+T(e.data.name)+";"+m({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:"))).attr("clip-path",((e,a)=>`url(#clip-${t}-${a})`)).text((e=>e.data.name)).each((function(e){var t=y(this),a=e.x1-e.x0,r=(e=e.y1-e.y0,t.node()),n=a-8,l=e-8;if(n<10||l<10)t.style("display","none");else{let e=parseInt(t.style("font-size"),10);for(;r.getComputedTextLength()>n&&8<e;)e--,t.style("font-size",e+"px");var s=Math.max(6,Math.min(28,Math.round(.6*e)));let a=e+2+s;for(;a>l&&8<e&&(e--,!((s=Math.max(6,Math.min(28,Math.round(.6*e))))<6&&8===e));)t.style("font-size",e+"px"),a=e+2+s;t.style("font-size",e+"px"),(r.getComputedTextLength()>n||e<8||l<e)&&t.style("display","none")}})),!1!==n.showValues&&d.append("text").attr("class","treemapValue").attr("x",(e=>(e.x1-e.x0)/2)).attr("y",(function(e){return(e.y1-e.y0)/2})).attr("style",(e=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+T(e.data.name)+";"+m({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:"))).attr("clip-path",((e,a)=>`url(#clip-${t}-${a})`)).text((e=>e.value?a(e.value):"")).each((function(e){var t,a,r=y(this),n=this.parentNode;!n||(n=y(n).select(".treemapLabel")).empty()||"none"===n.style("display")||(n=parseFloat(n.style("font-size")),t=Math.max(6,Math.min(28,Math.round(.6*n))),r.style("font-size",t+"px"),a=(e.y1-e.y0)/2,r.attr("y",a=a+n/2+2),n=e.x1-e.x0,e=e.y1-e.y0-4,n-=8,r.node().getComputedTextLength()>n)||e<a+t||t<6?r.style("display","none"):r.style("display",null)})),r=n.diagramPadding??8,g(p,r,"flowchart",n?.useMaxWidth||!1)}}),"draw"),getClasses:s((function(e,t){return t.db.getClasses()}),"getClasses")},_={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},q=s((({treemap:e}={})=>`\n .treemapNode.section {\n stroke: ${(e=o(_,e)).sectionStrokeColor};\n stroke-width: ${e.sectionStrokeWidth};\n fill: ${e.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${e.leafStrokeColor};\n stroke-width: ${e.leafStrokeWidth};\n fill: ${e.leafFillColor};\n }\n .treemapLabel {\n fill: ${e.labelColor};\n font-size: ${e.labelFontSize};\n }\n .treemapValue {\n fill: ${e.valueColor};\n font-size: ${e.valueFontSize};\n }\n .treemapTitle {\n fill: ${e.titleColor};\n font-size: ${e.titleFontSize};\n }\n `),"getStyles"),G={parser:E,get db(){return new W},renderer:H,styles:q};export{G as diagram};
@@ -0,0 +1 @@
1
+ import{s as e,g as t,n as a,o as r,b as n,c as l,_ as s,E as i,D as o,a$ as c,t as d,C as p,l as h,H as u,k as f,b0 as m,j as y}from"./web-0016ac81.js";import{s as g}from"./chunk-QN33PNHL-b00655c9.js";import{p as x}from"./chunk-4BX2VUAB-7747ae72.js";import{p as v}from"./mermaid-parser.core-0cfa7d2a.js";import{b as S}from"./defaultLocale-1fe70b7d.js";import{o as b}from"./ordinal-221e41d7.js";import"./_baseUniq-38ea2195.js";import"./_basePickBy-cbf78fb3.js";import"./clone-8494eb3f.js";import"./init-cf76ae07.js";function C(e){var t=0,a=e.children,r=a&&a.length;if(r)for(;0<=--r;)t+=a[r].value;else t=1;e.value=t}function w(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=L)):void 0===t&&(t=$);for(var a,r,n,l,s,i=[e=new T(e)];a=i.pop();)if((n=t(a.data))&&(s=(n=Array.from(n)).length))for(a.children=n,l=s-1;0<=l;--l)i.push(r=n[l]=new T(n[l])),r.parent=a,r.depth=a.depth+1;return e.eachBefore(M)}function $(e){return e.children}function L(e){return Array.isArray(e)?e[1]:null}function k(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function M(e){for(var t=0;e.height=t,(e=e.parent)&&e.height<++t;);}function T(e){this.data=e,this.depth=this.height=0,this.parent=null}function z(){return 0}function F(e){return function(){return e}}function P(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function B(e,t,a,r,n){for(var l,s=e.children,i=-1,o=s.length,c=e.value&&(r-t)/e.value;++i<o;)(l=s[i]).y0=a,l.y1=n,l.x0=t,l.x1=t+=l.value*c}function N(e,t,a,r,n){for(var l,s=e.children,i=-1,o=s.length,c=e.value&&(n-a)/e.value;++i<o;)(l=s[i]).x0=t,l.x1=r,l.y0=a,l.y1=a+=l.value*c}T.prototype=w.prototype={constructor:T,count:function(){return this.eachAfter(C)},each:function(e,t){let a=-1;for(const r of this)e.call(t,r,++a,this);return this},eachAfter:function(e,t){for(var a,r,n,l=this,s=[l],i=[],o=-1;l=s.pop();)if(i.push(l),a=l.children)for(r=0,n=a.length;r<n;++r)s.push(a[r]);for(;l=i.pop();)e.call(t,l,++o,this);return this},eachBefore:function(e,t){for(var a,r,n,l=[this],s=-1;a=l.pop();)if(e.call(t,a,++s,this),r=a.children)for(n=r.length-1;0<=n;--n)l.push(r[n]);return this},find:function(e,t){let a=-1;for(const r of this)if(e.call(t,r,++a,this))return r},sum:function(e){return this.eachAfter((function(t){for(var a=+e(t.data)||0,r=t.children,n=r&&r.length;0<=--n;)a+=r[n].value;t.value=a}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,a=function(e,t){if(e===t)return e;var a=e.ancestors(),r=t.ancestors(),n=null;for(e=a.pop(),t=r.pop();e===t;)n=e,e=a.pop(),t=r.pop();return n}(t,e),r=[t];t!==a;)t=t.parent,r.push(t);for(var n=r.length;e!==a;)r.splice(n,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(a){a!==e&&t.push({source:a.parent,target:a})})),t},copy:function(){return w(this).eachBefore(k)},[Symbol.iterator]:function*(){var e,t,a,r,n,l=[this];do{for(t=l.reverse(),l=[];e=t.pop();)if(yield e,a=e.children)for(r=0,n=a.length;r<n;++r)l.push(a[r])}while(l.length)}};var A=function e(t){function a(e,a,r,n,l){!function(e,t,a,r,n,l){for(var s,i,o,c,d,p,h,u,f,m,y,g=[],x=t.children,v=0,S=0,b=x.length,C=t.value;v<b;){for(o=n-a,c=l-r;!(d=x[S++].value)&&S<b;);for(y=(p=h=d)*d*(m=Math.max(c/o,o/c)/(C*e)),f=Math.max(h/y,y/p);S<b;++S){if(d+=i=x[S].value,i<p&&(p=i),h<i&&(h=i),y=d*d*m,f<(u=Math.max(h/y,y/p))){d-=i;break}f=u}g.push(s={value:d,dice:o<c,children:x.slice(v,S)}),s.dice?B(s,a,r,n,C?r+=c*d/C:l):N(s,a,r,C?a+=o*d/C:n,l),C-=d,v=S}}(t,e,a,r,n,l)}return a.ratio=function(t){return e(1<(t=+t)?t:1)},a}((1+Math.sqrt(5))/2);function j(){var e=A,t=!1,a=1,r=1,n=[0],l=z,s=z,i=z,o=z,c=z;function d(e){return e.x0=e.y0=0,e.x1=a,e.y1=r,e.eachBefore(p),n=[0],t&&e.eachBefore(P),e}function p(t){var a=n[t.depth],r=t.x0+a,d=t.y0+a,p=t.x1-a,h=t.y1-a;p<r&&(r=p=(r+p)/2),h<d&&(d=h=(d+h)/2),t.x0=r,t.y0=d,t.x1=p,t.y1=h,t.children&&(a=n[t.depth+1]=l(t)/2,r+=c(t)-a,d+=s(t)-a,(p-=i(t)-a)<r&&(r=p=(r+p)/2),(h-=o(t)-a)<d&&(d=h=(d+h)/2),e(t,r,d,p,h))}return d.round=function(e){return arguments.length?(t=!!e,d):t},d.size=function(e){return arguments.length?(a=+e[0],r=+e[1],d):[a,r]},d.tile=function(t){return arguments.length?(e=function(e){if("function"!=typeof e)throw new Error;return e}(t),d):e},d.padding=function(e){return arguments.length?d.paddingInner(e).paddingOuter(e):d.paddingInner()},d.paddingInner=function(e){return arguments.length?(l="function"==typeof e?e:F(+e),d):l},d.paddingOuter=function(e){return arguments.length?d.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):d.paddingTop()},d.paddingTop=function(e){return arguments.length?(s="function"==typeof e?e:F(+e),d):s},d.paddingRight=function(e){return arguments.length?(i="function"==typeof e?e:F(+e),d):i},d.paddingBottom=function(e){return arguments.length?(o="function"==typeof e?e:F(+e),d):o},d.paddingLeft=function(e){return arguments.length?(c="function"==typeof e?e:F(+e),d):c},d}var W=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=e,this.getAccTitle=t,this.setDiagramTitle=a,this.getDiagramTitle=r,this.getAccDescription=n,this.setAccDescription=l}static{s(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){var e=p,t=i();return o({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){const a=this.classes.get(e)??{id:e,styles:[],textStyles:[]};(t=t.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";"))&&t.forEach((e=>{c(e)&&(a?.textStyles?a.textStyles.push(e):a.textStyles=[e]),a?.styles?a.styles.push(e):a.styles=[e]})),this.classes.set(e,a)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){d(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function D(e){if(!e.length)return[];const t=[],a=[];return e.forEach((e=>{var r,n={name:e.name,children:"Leaf"===e.type?void 0:[]};for(n.classSelector=e?.classSelector,e?.cssCompiledStyles&&(n.cssCompiledStyles=[e.cssCompiledStyles]),"Leaf"===e.type&&void 0!==e.value&&(n.value=e.value);0<a.length&&a[a.length-1].level>=e.level;)a.pop();0===a.length?t.push(n):(r=a[a.length-1].node).children?r.children.push(n):r.children=[n],"Leaf"!==e.type&&a.push({node:n,level:e.level})})),t}s(D,"buildHierarchy");var R=s(((e,t)=>{x(e,t);var a=[];for(const a of e.TreemapRows??[])"ClassDefStatement"===a.$type&&t.addClass(a.className??"",a.styleText??"");for(const s of e.TreemapRows??[]){var r,n,l,i=s.item;i&&(l=s.indent?parseInt(s.indent):0,r=V(i),n=0<(n=i.classSelector?t.getStylesForClass(i.classSelector):[]).length?n.join(";"):void 0,l={level:l,name:r,type:i.$type,value:i.value,classSelector:i.classSelector,cssCompiledStyles:n},a.push(l))}e=D(a);const o=s(((e,a)=>{for(const r of e)t.addNode(r,a),r.children&&0<r.children.length&&o(r.children,a+1)}),"addNodesRecursively");o(e,0)}),"populate"),V=s((e=>e.name?String(e.name):""),"getItemName"),E={parser:{yy:void 0},parse:s((async e=>{try{var t=await v("treemap",e),a=(h.debug("Treemap AST:",t),E.parser?.yy);if(!(a instanceof W))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.");R(t,a)}catch(e){throw h.error("Error parsing treemap:",e),e}}),"parse")},I=10,H={draw:s(((e,t,a,r)=>{const n=(r=r.db).getConfig();var l=n.padding??10,o=r.getDiagramTitle(),c=(r=r.getRoot(),i().themeVariables);if(r){var d=o?30:0,p=u(t),x=n.nodeWidth?n.nodeWidth*I:960,v=n.nodeHeight?n.nodeHeight*I:500,C=x,$=v+d;let a;p.attr("viewBox",`0 0 ${C} `+$),f(p,$,C,n.useMaxWidth);try{var L=n.valueFormat||",";if("$0,0"===L)a=s((e=>"$"+S(",")(e)),"valueFormat");else if(L.startsWith("$")&&L.includes(",")){var k=/\.\d+/.exec(L);const e=k?k[0]:"";a=s((t=>"$"+S(","+e)(t)),"valueFormat")}else if(L.startsWith("$")){const e=L.substring(1);a=s((t=>"$"+S(e||"")(t)),"valueFormat")}else a=S(L)}catch(e){h.error("Error creating format function:",e),a=S(",")}const i=b().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=b().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),T=b().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);o&&p.append("text").attr("x",C/2).attr("y",d/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(o),$=p.append("g").attr("transform",`translate(0, ${d})`).attr("class","treemapContainer"),k=w(r).sum((e=>e.value??0)).sort(((e,t)=>(t.value??0)-(e.value??0))),L=j().size([x,v]).paddingTop((e=>e.children&&0<e.children.length?35:0)).paddingInner(l).paddingLeft((e=>e.children&&0<e.children.length?I:0)).paddingRight((e=>e.children&&0<e.children.length?I:0)).paddingBottom((e=>e.children&&0<e.children.length?I:0)).round(!0)(k),c=L.descendants().filter((e=>e.children&&0<e.children.length)),C=$.selectAll(".treemapSection").data(c).enter().append("g").attr("class","treemapSection").attr("transform",(e=>`translate(${e.x0},${e.y0})`)),C.append("rect").attr("width",(e=>e.x1-e.x0)).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",(e=>0===e.depth?"display: none;":"")),C.append("clipPath").attr("id",((e,a)=>`clip-section-${t}-`+a)).append("rect").attr("width",(e=>Math.max(0,e.x1-e.x0-12))).attr("height",25),C.append("rect").attr("width",(e=>e.x1-e.x0)).attr("height",(e=>e.y1-e.y0)).attr("class",((e,t)=>"treemapSection section"+t)).attr("fill",(e=>i(e.data.name))).attr("fill-opacity",.6).attr("stroke",(e=>M(e.data.name))).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",(e=>0===e.depth?"display: none;":(e=m({cssCompiledStyles:e.data.cssCompiledStyles})).nodeStyles+";"+e.borderStyles.join(";"))),C.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text((e=>0===e.depth?"":e.data.name)).attr("font-weight","bold").attr("style",(e=>0===e.depth?"display: none;":"dominant-baseline: middle; font-size: 12px; fill:"+T(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+m({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:"))).each((function(e){if(0!==e.depth){var t=y(this),a=e.data.name,r=(t.text(a),e.x1-e.x0);let i;i=!1!==n.showValues&&e.value?r-10-30-10-6:r-6-6;var l=Math.max(15,i),s=t.node();if(l<s.getComputedTextLength()){let e=a;for(;0<e.length;){if(0===(e=a.substring(0,e.length-1)).length){t.text("..."),s.getComputedTextLength()>l&&t.text("");break}if(t.text(e+"..."),s.getComputedTextLength()<=l)break}}}})),!1!==n.showValues&&C.append("text").attr("class","treemapSectionValue").attr("x",(e=>e.x1-e.x0-10)).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text((e=>e.value?a(e.value):"")).attr("font-style","italic").attr("style",(e=>0===e.depth?"display: none;":"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+T(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+m({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:"))),o=L.leaves(),d=$.selectAll(".treemapLeafGroup").data(o).enter().append("g").attr("class",((e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?" "+e.data.classSelector:""}x`)).attr("transform",(e=>`translate(${e.x0},${e.y0})`)),d.append("rect").attr("width",(e=>e.x1-e.x0)).attr("height",(e=>e.y1-e.y0)).attr("class","treemapLeaf").attr("fill",(e=>e.parent?i(e.parent.data.name):i(e.data.name))).attr("style",(e=>m({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles)).attr("fill-opacity",.3).attr("stroke",(e=>e.parent?i(e.parent.data.name):i(e.data.name))).attr("stroke-width",3),d.append("clipPath").attr("id",((e,a)=>`clip-${t}-`+a)).append("rect").attr("width",(e=>Math.max(0,e.x1-e.x0-4))).attr("height",(e=>Math.max(0,e.y1-e.y0-4))),d.append("text").attr("class","treemapLabel").attr("x",(e=>(e.x1-e.x0)/2)).attr("y",(e=>(e.y1-e.y0)/2)).attr("style",(e=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+T(e.data.name)+";"+m({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:"))).attr("clip-path",((e,a)=>`url(#clip-${t}-${a})`)).text((e=>e.data.name)).each((function(e){var t=y(this),a=e.x1-e.x0,r=(e=e.y1-e.y0,t.node()),n=a-8,l=e-8;if(n<10||l<10)t.style("display","none");else{let e=parseInt(t.style("font-size"),10);for(;r.getComputedTextLength()>n&&8<e;)e--,t.style("font-size",e+"px");var s=Math.max(6,Math.min(28,Math.round(.6*e)));let a=e+2+s;for(;a>l&&8<e&&(e--,!((s=Math.max(6,Math.min(28,Math.round(.6*e))))<6&&8===e));)t.style("font-size",e+"px"),a=e+2+s;t.style("font-size",e+"px"),(r.getComputedTextLength()>n||e<8||l<e)&&t.style("display","none")}})),!1!==n.showValues&&d.append("text").attr("class","treemapValue").attr("x",(e=>(e.x1-e.x0)/2)).attr("y",(function(e){return(e.y1-e.y0)/2})).attr("style",(e=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+T(e.data.name)+";"+m({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:"))).attr("clip-path",((e,a)=>`url(#clip-${t}-${a})`)).text((e=>e.value?a(e.value):"")).each((function(e){var t,a,r=y(this),n=this.parentNode;!n||(n=y(n).select(".treemapLabel")).empty()||"none"===n.style("display")||(n=parseFloat(n.style("font-size")),t=Math.max(6,Math.min(28,Math.round(.6*n))),r.style("font-size",t+"px"),a=(e.y1-e.y0)/2,r.attr("y",a=a+n/2+2),n=e.x1-e.x0,e=e.y1-e.y0-4,n-=8,r.node().getComputedTextLength()>n)||e<a+t||t<6?r.style("display","none"):r.style("display",null)})),r=n.diagramPadding??8,g(p,r,"flowchart",n?.useMaxWidth||!1)}}),"draw"),getClasses:s((function(e,t){return t.db.getClasses()}),"getClasses")},_={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},q=s((({treemap:e}={})=>`\n .treemapNode.section {\n stroke: ${(e=o(_,e)).sectionStrokeColor};\n stroke-width: ${e.sectionStrokeWidth};\n fill: ${e.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${e.leafStrokeColor};\n stroke-width: ${e.leafStrokeWidth};\n fill: ${e.leafFillColor};\n }\n .treemapLabel {\n fill: ${e.labelColor};\n font-size: ${e.labelFontSize};\n }\n .treemapValue {\n fill: ${e.valueColor};\n font-size: ${e.valueFontSize};\n }\n .treemapTitle {\n fill: ${e.titleColor};\n font-size: ${e.titleFontSize};\n }\n `),"getStyles"),G={parser:E,get db(){return new W},renderer:H,styles:q};export{G as diagram};
@@ -0,0 +1 @@
1
+ import{C as t,_ as a,s as e,g as r,n,o as i,b as s,c as o,l,D as c,E as d,t as g,H as p,K as h}from"./web-4e6d8ea9.js";import{p as x}from"./chunk-4BX2VUAB-d05d937e.js";import{p as m}from"./mermaid-parser.core-10bed742.js";import"./_baseUniq-52a47b7b.js";import"./_basePickBy-1057a1b4.js";import"./clone-6cd174cf.js";var u={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},v={axes:[],curves:[],options:u},f=structuredClone(v),y=t.radar,$=a((()=>c({...y,...d().radar})),"getConfig"),b=a((()=>f.axes),"getAxes"),w=a((()=>f.curves),"getCurves"),C=a((()=>f.options),"getOptions"),M=a((t=>{f.axes=t.map((t=>({name:t.name,label:t.label??t.name})))}),"setAxes"),L=a((t=>{f.curves=t.map((t=>({name:t.name,label:t.label??t.name,entries:k(t.entries)})))}),"setCurves"),k=a((t=>{if(null==t[0].axis)return t.map((t=>t.value));var a=b();if(0===a.length)throw new Error("Axes must be populated before curves for reference entries");return a.map((a=>{var e=t.find((t=>t.axis?.$refText===a.name));if(void 0===e)throw new Error("Missing entry for axis "+a.label);return e.value}))}),"computeCurveEntries"),A=a((t=>{t=t.reduce(((t,a)=>(t[a.name]=a,t)),{}),f.options={showLegend:t.showLegend?.value??u.showLegend,ticks:t.ticks?.value??u.ticks,max:t.max?.value??u.max,min:t.min?.value??u.min,graticule:t.graticule?.value??u.graticule}}),"setOptions"),T=a((()=>{g(),f=structuredClone(v)}),"clear"),O={getAxes:b,getCurves:w,getOptions:C,setAxes:M,setCurves:L,setOptions:A,getConfig:$,clear:T,setAccTitle:e,getAccTitle:r,setDiagramTitle:n,getDiagramTitle:i,getAccDescription:s,setAccDescription:o},S=a((t=>{x(t,O);var{axes:t,curves:a,options:e}=t;O.setAxes(t),O.setCurves(a),O.setOptions(e)}),"populate"),I={parse:a((async t=>{t=await m("radar",t),l.debug(t),S(t)}),"parse")},j=a(((t,a,e,r)=>{var n=(r=r.db).getAxes(),i=r.getCurves(),s=r.getOptions(),o=r.getConfig(),l=(r=r.getDiagramTitle(),a=p(a),a=E(a,o),s.max??Math.max(...i.map((t=>Math.max(...t.entries))))),c=s.min,d=Math.min(o.width,o.height)/2;F(a,n,d,s.ticks,s.graticule),P(a,n,d,o),z(a,n,i,c,l,s.graticule,o),R(a,i,s.showLegend,o),a.append("text").attr("class","radarTitle").text(r).attr("x",0).attr("y",-o.height/2-o.marginTop)}),"draw"),E=a(((t,a)=>{var e=a.width+a.marginLeft+a.marginRight,r=a.height+a.marginTop+a.marginBottom;const n=a.marginLeft+a.width/2,i=a.marginTop+a.height/2;return t.attr("viewbox",`0 0 ${e} `+r).attr("width",e).attr("height",r),t.append("g").attr("transform",`translate(${n}, ${i})`)}),"drawFrame"),F=a(((t,a,e,r,n)=>{if("circle"===n)for(let a=0;a<r;a++){var i=e*(a+1)/r;t.append("circle").attr("r",i).attr("class","radarGraticule")}else if("polygon"===n){const n=a.length;for(let i=0;i<r;i++){const o=e*(i+1)/r;var s=a.map(((t,a)=>(a=2*a*Math.PI/n-Math.PI/2,o*Math.cos(a)+","+o*Math.sin(a)))).join(" ");t.append("polygon").attr("points",s).attr("class","radarGraticule")}}}),"drawGraticule"),P=a(((t,a,e,r)=>{var n=a.length;for(let o=0;o<n;o++){var i=a[o].label,s=2*o*Math.PI/n-Math.PI/2;t.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*Math.cos(s)).attr("y2",e*r.axisScaleFactor*Math.sin(s)).attr("class","radarAxisLine"),t.append("text").text(i).attr("x",e*r.axisLabelFactor*Math.cos(s)).attr("y",e*r.axisLabelFactor*Math.sin(s)).attr("class","radarAxisLabel")}}),"drawAxes");function z(t,a,e,r,n,i,s){const o=a.length,l=Math.min(s.width,s.height)/2;e.forEach(((a,e)=>{a.entries.length===o&&(a=a.entries.map(((t,a)=>(a=2*Math.PI*a/o-Math.PI/2,{x:(t=B(t,r,n,l))*Math.cos(a),y:t*Math.sin(a)}))),"circle"===i?t.append("path").attr("d",D(a,s.curveTension)).attr("class","radarCurve-"+e):"polygon"===i&&t.append("polygon").attr("points",a.map((t=>t.x+","+t.y)).join(" ")).attr("class","radarCurve-"+e))}))}function B(t,a,e,r){return r*(Math.min(Math.max(t,a),e)-a)/(e-a)}function D(t,a){var e=t.length;let r=`M${t[0].x},`+t[0].y;for(let l=0;l<e;l++){var n=t[(l-1+e)%e],i=t[l],s=t[(l+1)%e],o=t[(l+2)%e];n={x:i.x+(s.x-n.x)*a,y:i.y+(s.y-n.y)*a},o={x:s.x-(o.x-i.x)*a,y:s.y-(o.y-i.y)*a};r+=` C${n.x},${n.y} ${o.x},${o.y} ${s.x},`+s.y}return r+" Z"}function R(t,a,e,r){if(e){const e=3*(r.width/2+r.marginRight)/4,n=3*-(r.height/2+r.marginTop)/4;a.forEach(((a,r)=>{var i=t.append("g").attr("transform",`translate(${e}, ${n+20*r})`);i.append("rect").attr("width",12).attr("height",12).attr("class","radarLegendBox-"+r),i.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(a.label)}))}}a(z,"drawCurves"),a(B,"relativeRadius"),a(D,"closedRoundCurve"),a(R,"drawLegend");var _={draw:j},G=a(((t,a)=>{let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++){var r=t["cScale"+n];e+=`\n\t\t.radarCurve-${n} {\n\t\t\tcolor: ${r};\n\t\t\tfill: ${r};\n\t\t\tfill-opacity: ${a.curveOpacity};\n\t\t\tstroke: ${r};\n\t\t\tstroke-width: ${a.curveStrokeWidth};\n\t\t}\n\t\t.radarLegendBox-${n} {\n\t\t\tfill: ${r};\n\t\t\tfill-opacity: ${a.curveOpacity};\n\t\t\tstroke: ${r};\n\t\t}\n\t\t`}return e}),"genIndexStyles"),V=a((t=>{var a=h(),e=d();return{themeVariables:a=c(a,e.themeVariables),radarOptions:c(a.radar,t)}}),"buildRadarStyleOptions"),W=a((({radar:t}={})=>{var{themeVariables:t,radarOptions:a}=V(t);return`\n\t.radarTitle {\n\t\tfont-size: ${t.fontSize};\n\t\tcolor: ${t.titleColor};\n\t\tdominant-baseline: hanging;\n\t\ttext-anchor: middle;\n\t}\n\t.radarAxisLine {\n\t\tstroke: ${a.axisColor};\n\t\tstroke-width: ${a.axisStrokeWidth};\n\t}\n\t.radarAxisLabel {\n\t\tdominant-baseline: middle;\n\t\ttext-anchor: middle;\n\t\tfont-size: ${a.axisLabelFontSize}px;\n\t\tcolor: ${a.axisColor};\n\t}\n\t.radarGraticule {\n\t\tfill: ${a.graticuleColor};\n\t\tfill-opacity: ${a.graticuleOpacity};\n\t\tstroke: ${a.graticuleColor};\n\t\tstroke-width: ${a.graticuleStrokeWidth};\n\t}\n\t.radarLegendText {\n\t\ttext-anchor: start;\n\t\tfont-size: ${a.legendFontSize}px;\n\t\tdominant-baseline: hanging;\n\t}\n\t${G(t,a)}\n\t`}),"styles"),H={parser:I,db:O,renderer:_,styles:W};export{H as diagram};
@@ -0,0 +1 @@
1
+ import{C as t,_ as a,s as e,g as r,n,o as i,b as s,c as o,l,D as c,E as d,t as g,H as p,K as h}from"./web-0016ac81.js";import{p as x}from"./chunk-4BX2VUAB-7747ae72.js";import{p as m}from"./mermaid-parser.core-0cfa7d2a.js";import"./_baseUniq-38ea2195.js";import"./_basePickBy-cbf78fb3.js";import"./clone-8494eb3f.js";var u={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},v={axes:[],curves:[],options:u},f=structuredClone(v),y=t.radar,$=a((()=>c({...y,...d().radar})),"getConfig"),b=a((()=>f.axes),"getAxes"),w=a((()=>f.curves),"getCurves"),C=a((()=>f.options),"getOptions"),M=a((t=>{f.axes=t.map((t=>({name:t.name,label:t.label??t.name})))}),"setAxes"),L=a((t=>{f.curves=t.map((t=>({name:t.name,label:t.label??t.name,entries:k(t.entries)})))}),"setCurves"),k=a((t=>{if(null==t[0].axis)return t.map((t=>t.value));var a=b();if(0===a.length)throw new Error("Axes must be populated before curves for reference entries");return a.map((a=>{var e=t.find((t=>t.axis?.$refText===a.name));if(void 0===e)throw new Error("Missing entry for axis "+a.label);return e.value}))}),"computeCurveEntries"),A=a((t=>{t=t.reduce(((t,a)=>(t[a.name]=a,t)),{}),f.options={showLegend:t.showLegend?.value??u.showLegend,ticks:t.ticks?.value??u.ticks,max:t.max?.value??u.max,min:t.min?.value??u.min,graticule:t.graticule?.value??u.graticule}}),"setOptions"),T=a((()=>{g(),f=structuredClone(v)}),"clear"),O={getAxes:b,getCurves:w,getOptions:C,setAxes:M,setCurves:L,setOptions:A,getConfig:$,clear:T,setAccTitle:e,getAccTitle:r,setDiagramTitle:n,getDiagramTitle:i,getAccDescription:s,setAccDescription:o},S=a((t=>{x(t,O);var{axes:t,curves:a,options:e}=t;O.setAxes(t),O.setCurves(a),O.setOptions(e)}),"populate"),I={parse:a((async t=>{t=await m("radar",t),l.debug(t),S(t)}),"parse")},j=a(((t,a,e,r)=>{var n=(r=r.db).getAxes(),i=r.getCurves(),s=r.getOptions(),o=r.getConfig(),l=(r=r.getDiagramTitle(),a=p(a),a=E(a,o),s.max??Math.max(...i.map((t=>Math.max(...t.entries))))),c=s.min,d=Math.min(o.width,o.height)/2;F(a,n,d,s.ticks,s.graticule),P(a,n,d,o),z(a,n,i,c,l,s.graticule,o),R(a,i,s.showLegend,o),a.append("text").attr("class","radarTitle").text(r).attr("x",0).attr("y",-o.height/2-o.marginTop)}),"draw"),E=a(((t,a)=>{var e=a.width+a.marginLeft+a.marginRight,r=a.height+a.marginTop+a.marginBottom;const n=a.marginLeft+a.width/2,i=a.marginTop+a.height/2;return t.attr("viewbox",`0 0 ${e} `+r).attr("width",e).attr("height",r),t.append("g").attr("transform",`translate(${n}, ${i})`)}),"drawFrame"),F=a(((t,a,e,r,n)=>{if("circle"===n)for(let a=0;a<r;a++){var i=e*(a+1)/r;t.append("circle").attr("r",i).attr("class","radarGraticule")}else if("polygon"===n){const n=a.length;for(let i=0;i<r;i++){const o=e*(i+1)/r;var s=a.map(((t,a)=>(a=2*a*Math.PI/n-Math.PI/2,o*Math.cos(a)+","+o*Math.sin(a)))).join(" ");t.append("polygon").attr("points",s).attr("class","radarGraticule")}}}),"drawGraticule"),P=a(((t,a,e,r)=>{var n=a.length;for(let o=0;o<n;o++){var i=a[o].label,s=2*o*Math.PI/n-Math.PI/2;t.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*Math.cos(s)).attr("y2",e*r.axisScaleFactor*Math.sin(s)).attr("class","radarAxisLine"),t.append("text").text(i).attr("x",e*r.axisLabelFactor*Math.cos(s)).attr("y",e*r.axisLabelFactor*Math.sin(s)).attr("class","radarAxisLabel")}}),"drawAxes");function z(t,a,e,r,n,i,s){const o=a.length,l=Math.min(s.width,s.height)/2;e.forEach(((a,e)=>{a.entries.length===o&&(a=a.entries.map(((t,a)=>(a=2*Math.PI*a/o-Math.PI/2,{x:(t=B(t,r,n,l))*Math.cos(a),y:t*Math.sin(a)}))),"circle"===i?t.append("path").attr("d",D(a,s.curveTension)).attr("class","radarCurve-"+e):"polygon"===i&&t.append("polygon").attr("points",a.map((t=>t.x+","+t.y)).join(" ")).attr("class","radarCurve-"+e))}))}function B(t,a,e,r){return r*(Math.min(Math.max(t,a),e)-a)/(e-a)}function D(t,a){var e=t.length;let r=`M${t[0].x},`+t[0].y;for(let l=0;l<e;l++){var n=t[(l-1+e)%e],i=t[l],s=t[(l+1)%e],o=t[(l+2)%e];n={x:i.x+(s.x-n.x)*a,y:i.y+(s.y-n.y)*a},o={x:s.x-(o.x-i.x)*a,y:s.y-(o.y-i.y)*a};r+=` C${n.x},${n.y} ${o.x},${o.y} ${s.x},`+s.y}return r+" Z"}function R(t,a,e,r){if(e){const e=3*(r.width/2+r.marginRight)/4,n=3*-(r.height/2+r.marginTop)/4;a.forEach(((a,r)=>{var i=t.append("g").attr("transform",`translate(${e}, ${n+20*r})`);i.append("rect").attr("width",12).attr("height",12).attr("class","radarLegendBox-"+r),i.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(a.label)}))}}a(z,"drawCurves"),a(B,"relativeRadius"),a(D,"closedRoundCurve"),a(R,"drawLegend");var _={draw:j},G=a(((t,a)=>{let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++){var r=t["cScale"+n];e+=`\n\t\t.radarCurve-${n} {\n\t\t\tcolor: ${r};\n\t\t\tfill: ${r};\n\t\t\tfill-opacity: ${a.curveOpacity};\n\t\t\tstroke: ${r};\n\t\t\tstroke-width: ${a.curveStrokeWidth};\n\t\t}\n\t\t.radarLegendBox-${n} {\n\t\t\tfill: ${r};\n\t\t\tfill-opacity: ${a.curveOpacity};\n\t\t\tstroke: ${r};\n\t\t}\n\t\t`}return e}),"genIndexStyles"),V=a((t=>{var a=h(),e=d();return{themeVariables:a=c(a,e.themeVariables),radarOptions:c(a.radar,t)}}),"buildRadarStyleOptions"),W=a((({radar:t}={})=>{var{themeVariables:t,radarOptions:a}=V(t);return`\n\t.radarTitle {\n\t\tfont-size: ${t.fontSize};\n\t\tcolor: ${t.titleColor};\n\t\tdominant-baseline: hanging;\n\t\ttext-anchor: middle;\n\t}\n\t.radarAxisLine {\n\t\tstroke: ${a.axisColor};\n\t\tstroke-width: ${a.axisStrokeWidth};\n\t}\n\t.radarAxisLabel {\n\t\tdominant-baseline: middle;\n\t\ttext-anchor: middle;\n\t\tfont-size: ${a.axisLabelFontSize}px;\n\t\tcolor: ${a.axisColor};\n\t}\n\t.radarGraticule {\n\t\tfill: ${a.graticuleColor};\n\t\tfill-opacity: ${a.graticuleOpacity};\n\t\tstroke: ${a.graticuleColor};\n\t\tstroke-width: ${a.graticuleStrokeWidth};\n\t}\n\t.radarLegendText {\n\t\ttext-anchor: start;\n\t\tfont-size: ${a.legendFontSize}px;\n\t\tdominant-baseline: hanging;\n\t}\n\t${G(t,a)}\n\t`}),"styles"),H={parser:I,db:O,renderer:_,styles:W};export{H as diagram};
@@ -0,0 +1 @@
1
+ import{C as t,s as e,g as a,n as r,o as s,b as i,c as o,_ as n,D as l,E as d,t as c,l as p,H as b,k as h}from"./web-4e6d8ea9.js";import{p as k}from"./chunk-4BX2VUAB-d05d937e.js";import{p as g}from"./mermaid-parser.core-10bed742.js";import"./_baseUniq-52a47b7b.js";import"./_basePickBy-1057a1b4.js";import"./clone-6cd174cf.js";var f=t.packet,w=class{constructor(){this.packet=[],this.setAccTitle=e,this.getAccTitle=a,this.setDiagramTitle=r,this.getDiagramTitle=s,this.getAccDescription=i,this.setAccDescription=o}static{n(this,"PacketDB")}getConfig(){var t=l({...f,...d().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){0<t.length&&this.packet.push(t)}clear(){c(),this.packet=[]}},m=n(((t,e)=>{k(t,e);let a=-1,r=[],s=1;var i,o,n,l,d=e.getConfig().bitsPerRow;for({start:i,end:o,bits:n,label:l}of t.blocks){if(void 0!==i&&void 0!==o&&o<i)throw new Error(`Packet block ${i} - ${o} is invalid. End must be greater than start.`);if((i??=a+1)!==a+1)throw new Error(`Packet block ${i} - ${o??i} is not contiguous. It should start from ${a+1}.`);if(0===n)throw new Error(`Packet block ${i} is invalid. Cannot have a zero bit field.`);for(o??=i+(n??1)-1,n??=o-i+1,a=o,p.debug(`Packet block ${i} - ${a} with label `+l);r.length<=d+1&&e.getPacket().length<1e4;){var[c,b]=u({start:i,end:o,bits:n,label:l},s,d);if(r.push(c),c.end+1===s*d&&(e.pushWord(r),r=[],s++),!b)break;({start:i,end:o,bits:n,label:l}=b)}}e.pushWord(r)}),"populate"),u=n(((t,e,a)=>{if(void 0===t.start)throw new Error("start should have been set during first phase");if(void 0===t.end)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);var r;return t.end+1<=e*a?[t,void 0]:[{start:t.start,end:r=e*a-1,label:t.label,bits:r-t.start},{start:r=e*a,end:t.end,label:t.label,bits:t.end-r}]}),"getNextFittingBlock"),y={parser:{yy:void 0},parse:n((async t=>{t=await g("packet",t);var e=y.parser?.yy;if(!(e instanceof w))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.");p.debug(t),m(t,e)}),"parse")},x=n(((t,e,a,r)=>{var s,i,o,n=(r=r.db).getConfig(),{rowHeight:l,paddingY:o,bitWidth:d,bitsPerRow:c}=n,p=r.getPacket(),l=(r=r.getDiagramTitle(),(o=l+o)*(p.length+1)-(r?0:l)),d=d*c+2,k=b(e);for([s,i]of(k.attr("viewbox",`0 0 ${d} `+l),h(k,l,d,n.useMaxWidth),p.entries()))v(k,i,s,n);k.append("text").text(r).attr("x",d/2).attr("y",l-o/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")}),"draw"),v=n(((t,e,a,{rowHeight:r,paddingX:s,paddingY:i,bitWidth:o,bitsPerRow:n,showBits:l})=>{var d=t.append("g"),c=a*(r+i)+i;for(const t of e){var p,b,h=t.start%n*o+1,k=(t.end-t.start+1)*o-s;d.append("rect").attr("x",h).attr("y",c).attr("width",k).attr("height",r).attr("class","packetBlock"),d.append("text").attr("x",h+k/2).attr("y",c+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(t.label),l&&(p=t.end===t.start,b=c-2,d.append("text").attr("x",h+(p?k/2:0)).attr("y",b).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",p?"middle":"start").text(t.start),p||d.append("text").attr("x",h+k).attr("y",b).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(t.end))}}),"drawWord"),$={draw:x},B={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},C=n((({packet:t}={})=>`\n\t.packetByte {\n\t\tfont-size: ${(t=l(B,t)).byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${t.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${t.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${t.labelColor};\n\t\tfont-size: ${t.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${t.titleColor};\n\t\tfont-size: ${t.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${t.blockStrokeColor};\n\t\tstroke-width: ${t.blockStrokeWidth};\n\t\tfill: ${t.blockFillColor};\n\t}\n\t`),"styles"),P={parser:y,get db(){return new w},renderer:$,styles:C};export{P as diagram};
@@ -0,0 +1 @@
1
+ import{C as t,s as e,g as a,n as r,o as s,b as i,c as o,_ as n,D as l,E as d,t as c,l as p,H as b,k as h}from"./web-0016ac81.js";import{p as k}from"./chunk-4BX2VUAB-7747ae72.js";import{p as g}from"./mermaid-parser.core-0cfa7d2a.js";import"./_baseUniq-38ea2195.js";import"./_basePickBy-cbf78fb3.js";import"./clone-8494eb3f.js";var f=t.packet,w=class{constructor(){this.packet=[],this.setAccTitle=e,this.getAccTitle=a,this.setDiagramTitle=r,this.getDiagramTitle=s,this.getAccDescription=i,this.setAccDescription=o}static{n(this,"PacketDB")}getConfig(){var t=l({...f,...d().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){0<t.length&&this.packet.push(t)}clear(){c(),this.packet=[]}},m=n(((t,e)=>{k(t,e);let a=-1,r=[],s=1;var i,o,n,l,d=e.getConfig().bitsPerRow;for({start:i,end:o,bits:n,label:l}of t.blocks){if(void 0!==i&&void 0!==o&&o<i)throw new Error(`Packet block ${i} - ${o} is invalid. End must be greater than start.`);if((i??=a+1)!==a+1)throw new Error(`Packet block ${i} - ${o??i} is not contiguous. It should start from ${a+1}.`);if(0===n)throw new Error(`Packet block ${i} is invalid. Cannot have a zero bit field.`);for(o??=i+(n??1)-1,n??=o-i+1,a=o,p.debug(`Packet block ${i} - ${a} with label `+l);r.length<=d+1&&e.getPacket().length<1e4;){var[c,b]=u({start:i,end:o,bits:n,label:l},s,d);if(r.push(c),c.end+1===s*d&&(e.pushWord(r),r=[],s++),!b)break;({start:i,end:o,bits:n,label:l}=b)}}e.pushWord(r)}),"populate"),u=n(((t,e,a)=>{if(void 0===t.start)throw new Error("start should have been set during first phase");if(void 0===t.end)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);var r;return t.end+1<=e*a?[t,void 0]:[{start:t.start,end:r=e*a-1,label:t.label,bits:r-t.start},{start:r=e*a,end:t.end,label:t.label,bits:t.end-r}]}),"getNextFittingBlock"),y={parser:{yy:void 0},parse:n((async t=>{t=await g("packet",t);var e=y.parser?.yy;if(!(e instanceof w))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.");p.debug(t),m(t,e)}),"parse")},x=n(((t,e,a,r)=>{var s,i,o,n=(r=r.db).getConfig(),{rowHeight:l,paddingY:o,bitWidth:d,bitsPerRow:c}=n,p=r.getPacket(),l=(r=r.getDiagramTitle(),(o=l+o)*(p.length+1)-(r?0:l)),d=d*c+2,k=b(e);for([s,i]of(k.attr("viewbox",`0 0 ${d} `+l),h(k,l,d,n.useMaxWidth),p.entries()))v(k,i,s,n);k.append("text").text(r).attr("x",d/2).attr("y",l-o/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")}),"draw"),v=n(((t,e,a,{rowHeight:r,paddingX:s,paddingY:i,bitWidth:o,bitsPerRow:n,showBits:l})=>{var d=t.append("g"),c=a*(r+i)+i;for(const t of e){var p,b,h=t.start%n*o+1,k=(t.end-t.start+1)*o-s;d.append("rect").attr("x",h).attr("y",c).attr("width",k).attr("height",r).attr("class","packetBlock"),d.append("text").attr("x",h+k/2).attr("y",c+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(t.label),l&&(p=t.end===t.start,b=c-2,d.append("text").attr("x",h+(p?k/2:0)).attr("y",b).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",p?"middle":"start").text(t.start),p||d.append("text").attr("x",h+k).attr("y",b).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(t.end))}}),"drawWord"),$={draw:x},B={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},C=n((({packet:t}={})=>`\n\t.packetByte {\n\t\tfont-size: ${(t=l(B,t)).byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${t.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${t.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${t.labelColor};\n\t\tfont-size: ${t.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${t.titleColor};\n\t\tfont-size: ${t.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${t.blockStrokeColor};\n\t\tstroke-width: ${t.blockStrokeWidth};\n\t\tfill: ${t.blockFillColor};\n\t}\n\t`),"styles"),P={parser:y,get db(){return new w},renderer:$,styles:C};export{P as diagram};
@@ -0,0 +1 @@
1
+ import{g as t}from"./chunk-55IACEB6-5a7b1be3.js";import{s as e}from"./chunk-QN33PNHL-b00655c9.js";import{_ as s,s as i,g as n,c as a,b as r,n as c,o,d as l,l as h,t as y,r as u,B as d,y as p,z as _,j as g,u as b,A as m}from"./web-0016ac81.js";import{c as f}from"./channel-2af69aa2.js";var E=function(){var t=s((function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s}),"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],i=[1,10],n=[1,11],a=[1,12],r=[1,13],c=[1,20],o=[1,21],l=[1,22],h=[1,23],y=[1,24],u=[1,19],d=[1,25],p=[1,26],_=[1,18],g=[1,33],b=[1,34],m=[1,35],f=[1,36],E=[1,37],k=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],O=[1,42],S=[1,43],T=[1,52],N=[40,50,68,69],A=[1,63],R=[1,61],I=[1,58],C=[1,62],x=[1,64],v=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],D=[63,64,65,66,67],$=[1,81],w=[1,80],L=[1,78],M=[1,79],B=[6,10,42,47],F=[6,10,13,41,42,47,48,49],Y=[1,89],P=[1,88],j=[1,87],z=[19,56],G=[1,98],K=[1,97],Z=[19,56,58,60];i={trace:s((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,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$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",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"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],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:s((function(t,e,s,i,n,a,r){var c=a.length-1;switch(n){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:a[c-1].push(a[c]),this.$=a[c-1];break;case 4:case 5:case 55:case 78:case 62:case 63:case 66:this.$=a[c];break;case 8:i.addEntity(a[c-4]),i.addEntity(a[c-2]),i.addRelationship(a[c-4],a[c],a[c-2],a[c-3]);break;case 9:i.addEntity(a[c-8]),i.addEntity(a[c-4]),i.addRelationship(a[c-8],a[c],a[c-4],a[c-5]),i.setClass([a[c-8]],a[c-6]),i.setClass([a[c-4]],a[c-2]);break;case 10:i.addEntity(a[c-6]),i.addEntity(a[c-2]),i.addRelationship(a[c-6],a[c],a[c-2],a[c-3]),i.setClass([a[c-6]],a[c-4]);break;case 11:i.addEntity(a[c-6]),i.addEntity(a[c-4]),i.addRelationship(a[c-6],a[c],a[c-4],a[c-5]),i.setClass([a[c-4]],a[c-2]);break;case 12:i.addEntity(a[c-3]),i.addAttributes(a[c-3],a[c-1]);break;case 13:i.addEntity(a[c-5]),i.addAttributes(a[c-5],a[c-1]),i.setClass([a[c-5]],a[c-3]);break;case 14:i.addEntity(a[c-2]);break;case 15:i.addEntity(a[c-4]),i.setClass([a[c-4]],a[c-2]);break;case 16:i.addEntity(a[c]);break;case 17:i.addEntity(a[c-2]),i.setClass([a[c-2]],a[c]);break;case 18:i.addEntity(a[c-6],a[c-4]),i.addAttributes(a[c-6],a[c-1]);break;case 19:i.addEntity(a[c-8],a[c-6]),i.addAttributes(a[c-8],a[c-1]),i.setClass([a[c-8]],a[c-3]);break;case 20:i.addEntity(a[c-5],a[c-3]);break;case 21:i.addEntity(a[c-7],a[c-5]),i.setClass([a[c-7]],a[c-2]);break;case 22:i.addEntity(a[c-3],a[c-1]);break;case 23:i.addEntity(a[c-5],a[c-3]),i.setClass([a[c-5]],a[c]);break;case 24:case 25:this.$=a[c].trim(),i.setAccTitle(this.$);break;case 26:case 27:this.$=a[c].trim(),i.setAccDescription(this.$);break;case 32:i.setDirection("TB");break;case 33:i.setDirection("BT");break;case 34:i.setDirection("RL");break;case 35:i.setDirection("LR");break;case 36:this.$=a[c-3],i.addClass(a[c-2],a[c-1]);break;case 37:case 38:case 56:case 64:case 43:this.$=[a[c]];break;case 39:case 40:this.$=a[c-2].concat([a[c]]);break;case 41:this.$=a[c-2],i.setClass(a[c-1],a[c]);break;case 42:this.$=a[c-3],i.addCssStyles(a[c-2],a[c-1]);break;case 44:case 65:a[c-2].push(a[c]),this.$=a[c-2];break;case 46:this.$=a[c-1]+a[c];break;case 54:case 76:case 77:case 67:this.$=a[c].replace(/"/g,"");break;case 57:a[c].push(a[c-1]),this.$=a[c];break;case 58:this.$={type:a[c-1],name:a[c]};break;case 59:this.$={type:a[c-2],name:a[c-1],keys:a[c]};break;case 60:this.$={type:a[c-2],name:a[c-1],comment:a[c]};break;case 61:this.$={type:a[c-3],name:a[c-2],keys:a[c-1],comment:a[c]};break;case 68:this.$={cardA:a[c],relType:a[c-1],cardB:a[c-2]};break;case 69:this.$=i.Cardinality.ZERO_OR_ONE;break;case 70:this.$=i.Cardinality.ZERO_OR_MORE;break;case 71:this.$=i.Cardinality.ONE_OR_MORE;break;case 72:this.$=i.Cardinality.ONLY_ONE;break;case 73:this.$=i.Cardinality.MD_PARENT;break;case 74:this.$=i.Identification.NON_IDENTIFYING;break;case 75:this.$=i.Identification.IDENTIFYING}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:i,24:n,26:a,28:r,29:14,30:15,31:16,32:17,33:c,34:o,35:l,36:h,37:y,40:u,43:d,44:p,50:_},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:27,11:9,22:i,24:n,26:a,28:r,29:14,30:15,31:16,32:17,33:c,34:o,35:l,36:h,37:y,40:u,43:d,44:p,50:_},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:g,64:b,65:m,66:f,67:E}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(k,[2,54]),t(k,[2,55]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:41,40:O,41:S},{16:44,40:O,41:S},{16:45,40:O,41:S},t(e,[2,4]),{11:46,40:u,50:_},{16:47,40:O,41:S},{18:48,19:[1,49],51:50,52:51,56:T},{11:53,40:u,50:_},{62:54,68:[1,55],69:[1,56]},t(N,[2,69]),t(N,[2,70]),t(N,[2,71]),t(N,[2,72]),t(N,[2,73]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:A,38:57,41:R,42:I,45:59,46:60,48:C,49:x},t(v,[2,37]),t(v,[2,38]),{16:65,40:O,41:S,42:I},{13:A,38:66,41:R,42:I,45:59,46:60,48:C,49:x},{13:[1,67],15:[1,68]},t(e,[2,17],{61:32,12:69,17:[1,70],42:I,63:g,64:b,65:m,66:f,67:E}),{19:[1,71]},t(e,[2,14]),{18:72,19:[2,56],51:50,52:51,56:T},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:g,64:b,65:m,66:f,67:E},t(D,[2,74]),t(D,[2,75]),{6:$,10:w,39:77,42:L,47:M},{40:[1,82],41:[1,83]},t(B,[2,43],{46:84,13:A,41:R,48:C,49:x}),t(F,[2,45]),t(F,[2,50]),t(F,[2,51]),t(F,[2,52]),t(F,[2,53]),t(e,[2,41],{42:I}),{6:$,10:w,39:85,42:L,47:M},{14:86,40:Y,50:P,70:j},{16:90,40:O,41:S},{11:91,40:u,50:_},{18:92,19:[1,93],51:50,52:51,56:T},t(e,[2,12]),{19:[2,57]},t(z,[2,58],{54:94,55:95,57:96,59:G,60:K}),t([19,56,59,60],[2,63]),t(e,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(e,[2,36]),{13:A,41:R,45:101,46:60,48:C,49:x},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(v,[2,39]),t(v,[2,40]),t(F,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,76]),t(e,[2,77]),t(e,[2,78]),{13:[1,102],42:I},{13:[1,104],15:[1,103]},{19:[1,105]},t(e,[2,15]),t(z,[2,59],{55:106,58:[1,107],60:K}),t(z,[2,60]),t(Z,[2,64]),t(z,[2,67]),t(Z,[2,66]),{18:108,19:[1,109],51:50,52:51,56:T},{16:110,40:O,41:S},t(B,[2,44],{46:84,13:A,41:R,48:C,49:x}),{14:111,40:Y,50:P,70:j},{16:112,40:O,41:S},{14:113,40:Y,50:P,70:j},t(e,[2,13]),t(z,[2,61]),{57:114,59:G},{19:[1,115]},t(e,[2,20]),t(e,[2,23],{17:[1,116],42:I}),t(e,[2,11]),{13:[1,117],42:I},t(e,[2,10]),t(Z,[2,65]),t(e,[2,18]),{18:118,19:[1,119],51:50,52:51,56:T},{14:120,40:Y,50:P,70:j},{19:[1,121]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:s((function(t,e){var s;if(!e.recoverable)throw(s=new Error(t)).hash=e,s;this.trace(t)}),"parseError"),parse:s((function(t){var e,i=this,n=[0],a=[],r=[null],c=[],o=this.table,l="",h=0,y=0,u=c.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(p.yy[e]=this.yy[e]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var _=d.yylloc,g=(c.push(_),d.options&&d.options.ranges);function b(){var t=a.pop()||d.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(a=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,s((function(t){n.length=n.length-2*t,r.length=r.length-t,c.length=c.length-t}),"popStack"),s(b,"lex");for(var m,f,E,k,O,S,T={};;){if(f=n[n.length-1],void 0===(E=this.defaultActions[f]||(null==m&&(m=b()),o[f]&&o[f][m]))||!E.length||!E[0]){var N,A=[];for(k in o[f])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");N=d.showPosition?"Parse error on line "+(h+1)+":\n"+d.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(N,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:_,expected:A})}if(E[0]instanceof Array&&1<E.length)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+m);switch(E[0]){case 1:n.push(m),r.push(d.yytext),c.push(d.yylloc),n.push(E[1]),m=null,y=d.yyleng,l=d.yytext,h=d.yylineno,_=d.yylloc;break;case 2:if(O=this.productions_[E[1]][1],T.$=r[r.length-O],T._$={first_line:c[c.length-(O||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(O||1)].first_column,last_column:c[c.length-1].last_column},g&&(T._$.range=[c[c.length-(O||1)].range[0],c[c.length-1].range[1]]),void 0!==(S=this.performAction.apply(T,[l,y,h,p.yy,E[1],r,c].concat(u))))return S;O&&(n=n.slice(0,-1*O*2),r=r.slice(0,-1*O),c=c.slice(0,-1*O)),n.push(this.productions_[E[1]][0]),r.push(T.$),c.push(T._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},n={EOF:1,parseError:s((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:s((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:s((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t}),"input"),unput:s((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g),i=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),s.length-1&&(this.yylineno-=s.length-1),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:s?(s.length===t.length?this.yylloc.first_column:0)+t[t.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:s((function(){return this._more=!0,this}),"more"),reject:s((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:s((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:s((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:s((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:s((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:s((function(t,e){var s,i;if(this.options.backtrack_lexer&&(i={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)&&(i.yylloc.range=this.yylloc.range.slice(0)),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var n in i)this[n]=i[n];return!1}),"test_match"),next:s((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,s,i,n=this._currentRules(),a=0;a<n.length;a++)if((s=this._input.match(this.rules[n[a]]))&&(!e||s[0].length>e[0].length))if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[a])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:s((function(){return this.next()||this.lex()}),"lex"),begin:s((function(t){this.conditionStack.push(t)}),"begin"),popState:s((function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:s((function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:s((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:s((function(t){this.begin(t)}),"pushState"),stateStackSize:s((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:s((function(t,e,s,i){switch(s){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 70;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 59;case 25:case 26:return 56;case 27:return 60;case 29:return this.popState(),19;case 30:case 73:return e.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 59:return 63;case 42:case 43:case 44:case 52:case 54:case 61:return 65;case 47:case 48:case 49:case 50:case 51:case 53:case 60:return 64;case 55:case 56:case 57:case 58:return 66;case 62:return 67;case 63:case 66:case 67:case 68:return 68;case 64:case 65:return 69;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 74: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,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],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,71,72,73,74],inclusive:!0}}};function U(){this.yy={}}return i.lexer=n,s(U,"Parser"),new((U.prototype=i).Parser=U)}(),k=E.parser=E,O=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=i,this.getAccTitle=n,this.setAccDescription=a,this.getAccDescription=r,this.setDiagramTitle=c,this.getDiagramTitle=o,this.getConfig=s((()=>l().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)}static{s(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,h.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-`+this.entities.size,label:t,attributes:[],alias:e,shape:"erBox",look:l().look??"default",cssClasses:"default",cssStyles:[]}),h.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){var s=this.addEntity(t);let i;for(i=e.length-1;0<=i;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),s.attributes.push(e[i]),h.debug("Added attribute ",e[i].name)}addRelationship(t,e,s,i){t=this.entities.get(t),s=this.entities.get(s);t&&s&&(t={entityA:t.id,roleA:e,entityB:s.id,relSpec:i},this.relationships.push(t),h.debug("Added new relationship :",t))}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(const i of t){var s=this.classes.get(i);s?.styles&&(e=[...e,...s.styles??[]].map((t=>t.trim()))),s?.textStyles&&(e=[...e,...s.textStyles??[]].map((t=>t.trim())))}return e}addCssStyles(t,e){for(const i of t){var s=this.entities.get(i);if(!e||!s)return;for(const t of e)s.cssStyles.push(t)}}addClass(t,e){t.forEach((t=>{let s=this.classes.get(t);void 0===s&&(s={id:t,styles:[],textStyles:[]},this.classes.set(t,s)),e&&e.forEach((function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),s.textStyles.push(e)),s.styles.push(t)}))}))}setClass(t,e){for(const i of t){var s=this.entities.get(i);if(s)for(const t of e)s.cssClasses+=" "+t}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],y()}getData(){var t=[],e=[],s=l();for(const e of this.entities.keys()){var i=this.entities.get(e);i&&(i.cssCompiledStyles=this.getCompiledStyles(i.cssClasses.split(" ")),t.push(i))}let n=0;for(const t of this.relationships){var a={id:u(t.entityA,t.entityB,{prefix:"id",counter:n++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:s.look};e.push(a)}return{nodes:t,edges:e,other:{},config:s,direction:"TB"}}},S={},T=(d(S,{draw:()=>T}),s((async function(s,i,n,a){h.info("REF0:"),h.info("Drawing er diagram (unified)",i);var{securityLevel:r,er:c,layout:o}=l(),y=a.db.getData();const u=t(i,r);y.type=a.type,y.layoutAlgorithm=p(o),y.config.flowchart.nodeSpacing=c?.nodeSpacing||140,y.config.flowchart.rankSpacing=c?.rankSpacing||80,y.direction=a.db.getDirection(),y.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],y.diagramId=i,await _(y,u),"elk"===y.layoutAlgorithm&&u.select(".edges").lower(),r=u.selectAll('[id*="-background"]'),0<Array.from(r).length&&r.each((function(){var t=g(this),e=t.attr("id").replace("-background","");(e=u.select("#"+CSS.escape(e))).empty()||(e=e.attr("transform"),t.attr("transform",e))})),b.insertTitle(u,"erDiagramTitleText",c?.titleTopMargin??25,a.db.getDiagramTitle()),e(u,8,"erDiagram",c?.useMaxWidth??!0)}),"draw")),N=s(((t,e)=>{var s=(n=f)(t,"r"),i=n(t,"g"),n=n(t,"b");return m(s,i,n,e)}),"fade"),A={parser:k,get db(){return new O},renderer:S,styles:s((t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .labelBkg {\n background-color: ${N(t.tertiaryColor,.5)};\n }\n\n .edgeLabel .label {\n fill: ${t.nodeBorder};\n font-size: 14px;\n }\n\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.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: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n }\n\n .marker {\n fill: none !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n`),"getStyles")};export{A as diagram};
@@ -0,0 +1 @@
1
+ import{g as t}from"./chunk-55IACEB6-78729976.js";import{s as e}from"./chunk-QN33PNHL-0bf10733.js";import{_ as s,s as i,g as n,c as a,b as r,n as c,o,d as l,l as h,t as y,r as u,B as d,y as p,z as _,j as g,u as b,A as m}from"./web-4e6d8ea9.js";import{c as f}from"./channel-f240e622.js";var E=function(){var t=s((function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s}),"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],i=[1,10],n=[1,11],a=[1,12],r=[1,13],c=[1,20],o=[1,21],l=[1,22],h=[1,23],y=[1,24],u=[1,19],d=[1,25],p=[1,26],_=[1,18],g=[1,33],b=[1,34],m=[1,35],f=[1,36],E=[1,37],k=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],O=[1,42],S=[1,43],T=[1,52],N=[40,50,68,69],A=[1,63],R=[1,61],I=[1,58],C=[1,62],x=[1,64],v=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],D=[63,64,65,66,67],$=[1,81],w=[1,80],L=[1,78],M=[1,79],B=[6,10,42,47],F=[6,10,13,41,42,47,48,49],Y=[1,89],P=[1,88],j=[1,87],z=[19,56],G=[1,98],K=[1,97],Z=[19,56,58,60];i={trace:s((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,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$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",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"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],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:s((function(t,e,s,i,n,a,r){var c=a.length-1;switch(n){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:a[c-1].push(a[c]),this.$=a[c-1];break;case 4:case 5:case 55:case 78:case 62:case 63:case 66:this.$=a[c];break;case 8:i.addEntity(a[c-4]),i.addEntity(a[c-2]),i.addRelationship(a[c-4],a[c],a[c-2],a[c-3]);break;case 9:i.addEntity(a[c-8]),i.addEntity(a[c-4]),i.addRelationship(a[c-8],a[c],a[c-4],a[c-5]),i.setClass([a[c-8]],a[c-6]),i.setClass([a[c-4]],a[c-2]);break;case 10:i.addEntity(a[c-6]),i.addEntity(a[c-2]),i.addRelationship(a[c-6],a[c],a[c-2],a[c-3]),i.setClass([a[c-6]],a[c-4]);break;case 11:i.addEntity(a[c-6]),i.addEntity(a[c-4]),i.addRelationship(a[c-6],a[c],a[c-4],a[c-5]),i.setClass([a[c-4]],a[c-2]);break;case 12:i.addEntity(a[c-3]),i.addAttributes(a[c-3],a[c-1]);break;case 13:i.addEntity(a[c-5]),i.addAttributes(a[c-5],a[c-1]),i.setClass([a[c-5]],a[c-3]);break;case 14:i.addEntity(a[c-2]);break;case 15:i.addEntity(a[c-4]),i.setClass([a[c-4]],a[c-2]);break;case 16:i.addEntity(a[c]);break;case 17:i.addEntity(a[c-2]),i.setClass([a[c-2]],a[c]);break;case 18:i.addEntity(a[c-6],a[c-4]),i.addAttributes(a[c-6],a[c-1]);break;case 19:i.addEntity(a[c-8],a[c-6]),i.addAttributes(a[c-8],a[c-1]),i.setClass([a[c-8]],a[c-3]);break;case 20:i.addEntity(a[c-5],a[c-3]);break;case 21:i.addEntity(a[c-7],a[c-5]),i.setClass([a[c-7]],a[c-2]);break;case 22:i.addEntity(a[c-3],a[c-1]);break;case 23:i.addEntity(a[c-5],a[c-3]),i.setClass([a[c-5]],a[c]);break;case 24:case 25:this.$=a[c].trim(),i.setAccTitle(this.$);break;case 26:case 27:this.$=a[c].trim(),i.setAccDescription(this.$);break;case 32:i.setDirection("TB");break;case 33:i.setDirection("BT");break;case 34:i.setDirection("RL");break;case 35:i.setDirection("LR");break;case 36:this.$=a[c-3],i.addClass(a[c-2],a[c-1]);break;case 37:case 38:case 56:case 64:case 43:this.$=[a[c]];break;case 39:case 40:this.$=a[c-2].concat([a[c]]);break;case 41:this.$=a[c-2],i.setClass(a[c-1],a[c]);break;case 42:this.$=a[c-3],i.addCssStyles(a[c-2],a[c-1]);break;case 44:case 65:a[c-2].push(a[c]),this.$=a[c-2];break;case 46:this.$=a[c-1]+a[c];break;case 54:case 76:case 77:case 67:this.$=a[c].replace(/"/g,"");break;case 57:a[c].push(a[c-1]),this.$=a[c];break;case 58:this.$={type:a[c-1],name:a[c]};break;case 59:this.$={type:a[c-2],name:a[c-1],keys:a[c]};break;case 60:this.$={type:a[c-2],name:a[c-1],comment:a[c]};break;case 61:this.$={type:a[c-3],name:a[c-2],keys:a[c-1],comment:a[c]};break;case 68:this.$={cardA:a[c],relType:a[c-1],cardB:a[c-2]};break;case 69:this.$=i.Cardinality.ZERO_OR_ONE;break;case 70:this.$=i.Cardinality.ZERO_OR_MORE;break;case 71:this.$=i.Cardinality.ONE_OR_MORE;break;case 72:this.$=i.Cardinality.ONLY_ONE;break;case 73:this.$=i.Cardinality.MD_PARENT;break;case 74:this.$=i.Identification.NON_IDENTIFYING;break;case 75:this.$=i.Identification.IDENTIFYING}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:i,24:n,26:a,28:r,29:14,30:15,31:16,32:17,33:c,34:o,35:l,36:h,37:y,40:u,43:d,44:p,50:_},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:27,11:9,22:i,24:n,26:a,28:r,29:14,30:15,31:16,32:17,33:c,34:o,35:l,36:h,37:y,40:u,43:d,44:p,50:_},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:g,64:b,65:m,66:f,67:E}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(k,[2,54]),t(k,[2,55]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:41,40:O,41:S},{16:44,40:O,41:S},{16:45,40:O,41:S},t(e,[2,4]),{11:46,40:u,50:_},{16:47,40:O,41:S},{18:48,19:[1,49],51:50,52:51,56:T},{11:53,40:u,50:_},{62:54,68:[1,55],69:[1,56]},t(N,[2,69]),t(N,[2,70]),t(N,[2,71]),t(N,[2,72]),t(N,[2,73]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:A,38:57,41:R,42:I,45:59,46:60,48:C,49:x},t(v,[2,37]),t(v,[2,38]),{16:65,40:O,41:S,42:I},{13:A,38:66,41:R,42:I,45:59,46:60,48:C,49:x},{13:[1,67],15:[1,68]},t(e,[2,17],{61:32,12:69,17:[1,70],42:I,63:g,64:b,65:m,66:f,67:E}),{19:[1,71]},t(e,[2,14]),{18:72,19:[2,56],51:50,52:51,56:T},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:g,64:b,65:m,66:f,67:E},t(D,[2,74]),t(D,[2,75]),{6:$,10:w,39:77,42:L,47:M},{40:[1,82],41:[1,83]},t(B,[2,43],{46:84,13:A,41:R,48:C,49:x}),t(F,[2,45]),t(F,[2,50]),t(F,[2,51]),t(F,[2,52]),t(F,[2,53]),t(e,[2,41],{42:I}),{6:$,10:w,39:85,42:L,47:M},{14:86,40:Y,50:P,70:j},{16:90,40:O,41:S},{11:91,40:u,50:_},{18:92,19:[1,93],51:50,52:51,56:T},t(e,[2,12]),{19:[2,57]},t(z,[2,58],{54:94,55:95,57:96,59:G,60:K}),t([19,56,59,60],[2,63]),t(e,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(e,[2,36]),{13:A,41:R,45:101,46:60,48:C,49:x},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(v,[2,39]),t(v,[2,40]),t(F,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,76]),t(e,[2,77]),t(e,[2,78]),{13:[1,102],42:I},{13:[1,104],15:[1,103]},{19:[1,105]},t(e,[2,15]),t(z,[2,59],{55:106,58:[1,107],60:K}),t(z,[2,60]),t(Z,[2,64]),t(z,[2,67]),t(Z,[2,66]),{18:108,19:[1,109],51:50,52:51,56:T},{16:110,40:O,41:S},t(B,[2,44],{46:84,13:A,41:R,48:C,49:x}),{14:111,40:Y,50:P,70:j},{16:112,40:O,41:S},{14:113,40:Y,50:P,70:j},t(e,[2,13]),t(z,[2,61]),{57:114,59:G},{19:[1,115]},t(e,[2,20]),t(e,[2,23],{17:[1,116],42:I}),t(e,[2,11]),{13:[1,117],42:I},t(e,[2,10]),t(Z,[2,65]),t(e,[2,18]),{18:118,19:[1,119],51:50,52:51,56:T},{14:120,40:Y,50:P,70:j},{19:[1,121]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:s((function(t,e){var s;if(!e.recoverable)throw(s=new Error(t)).hash=e,s;this.trace(t)}),"parseError"),parse:s((function(t){var e,i=this,n=[0],a=[],r=[null],c=[],o=this.table,l="",h=0,y=0,u=c.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(p.yy[e]=this.yy[e]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var _=d.yylloc,g=(c.push(_),d.options&&d.options.ranges);function b(){var t=a.pop()||d.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(a=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,s((function(t){n.length=n.length-2*t,r.length=r.length-t,c.length=c.length-t}),"popStack"),s(b,"lex");for(var m,f,E,k,O,S,T={};;){if(f=n[n.length-1],void 0===(E=this.defaultActions[f]||(null==m&&(m=b()),o[f]&&o[f][m]))||!E.length||!E[0]){var N,A=[];for(k in o[f])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");N=d.showPosition?"Parse error on line "+(h+1)+":\n"+d.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(N,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:_,expected:A})}if(E[0]instanceof Array&&1<E.length)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+m);switch(E[0]){case 1:n.push(m),r.push(d.yytext),c.push(d.yylloc),n.push(E[1]),m=null,y=d.yyleng,l=d.yytext,h=d.yylineno,_=d.yylloc;break;case 2:if(O=this.productions_[E[1]][1],T.$=r[r.length-O],T._$={first_line:c[c.length-(O||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(O||1)].first_column,last_column:c[c.length-1].last_column},g&&(T._$.range=[c[c.length-(O||1)].range[0],c[c.length-1].range[1]]),void 0!==(S=this.performAction.apply(T,[l,y,h,p.yy,E[1],r,c].concat(u))))return S;O&&(n=n.slice(0,-1*O*2),r=r.slice(0,-1*O),c=c.slice(0,-1*O)),n.push(this.productions_[E[1]][0]),r.push(T.$),c.push(T._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}),"parse")},n={EOF:1,parseError:s((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:s((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:s((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t}),"input"),unput:s((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g),i=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),s.length-1&&(this.yylineno-=s.length-1),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:s?(s.length===t.length?this.yylloc.first_column:0)+t[t.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:s((function(){return this._more=!0,this}),"more"),reject:s((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:s((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:s((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:s((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:s((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:s((function(t,e){var s,i;if(this.options.backtrack_lexer&&(i={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)&&(i.yylloc.range=this.yylloc.range.slice(0)),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var n in i)this[n]=i[n];return!1}),"test_match"),next:s((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,s,i,n=this._currentRules(),a=0;a<n.length;a++)if((s=this._input.match(this.rules[n[a]]))&&(!e||s[0].length>e[0].length))if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[a])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:s((function(){return this.next()||this.lex()}),"lex"),begin:s((function(t){this.conditionStack.push(t)}),"begin"),popState:s((function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:s((function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:s((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:s((function(t){this.begin(t)}),"pushState"),stateStackSize:s((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:s((function(t,e,s,i){switch(s){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 70;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 59;case 25:case 26:return 56;case 27:return 60;case 29:return this.popState(),19;case 30:case 73:return e.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 59:return 63;case 42:case 43:case 44:case 52:case 54:case 61:return 65;case 47:case 48:case 49:case 50:case 51:case 53:case 60:return 64;case 55:case 56:case 57:case 58:return 66;case 62:return 67;case 63:case 66:case 67:case 68:return 68;case 64:case 65:return 69;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 74: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,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],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,71,72,73,74],inclusive:!0}}};function U(){this.yy={}}return i.lexer=n,s(U,"Parser"),new((U.prototype=i).Parser=U)}(),k=E.parser=E,O=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=i,this.getAccTitle=n,this.setAccDescription=a,this.getAccDescription=r,this.setDiagramTitle=c,this.getDiagramTitle=o,this.getConfig=s((()=>l().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)}static{s(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,h.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-`+this.entities.size,label:t,attributes:[],alias:e,shape:"erBox",look:l().look??"default",cssClasses:"default",cssStyles:[]}),h.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){var s=this.addEntity(t);let i;for(i=e.length-1;0<=i;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),s.attributes.push(e[i]),h.debug("Added attribute ",e[i].name)}addRelationship(t,e,s,i){t=this.entities.get(t),s=this.entities.get(s);t&&s&&(t={entityA:t.id,roleA:e,entityB:s.id,relSpec:i},this.relationships.push(t),h.debug("Added new relationship :",t))}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(const i of t){var s=this.classes.get(i);s?.styles&&(e=[...e,...s.styles??[]].map((t=>t.trim()))),s?.textStyles&&(e=[...e,...s.textStyles??[]].map((t=>t.trim())))}return e}addCssStyles(t,e){for(const i of t){var s=this.entities.get(i);if(!e||!s)return;for(const t of e)s.cssStyles.push(t)}}addClass(t,e){t.forEach((t=>{let s=this.classes.get(t);void 0===s&&(s={id:t,styles:[],textStyles:[]},this.classes.set(t,s)),e&&e.forEach((function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),s.textStyles.push(e)),s.styles.push(t)}))}))}setClass(t,e){for(const i of t){var s=this.entities.get(i);if(s)for(const t of e)s.cssClasses+=" "+t}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],y()}getData(){var t=[],e=[],s=l();for(const e of this.entities.keys()){var i=this.entities.get(e);i&&(i.cssCompiledStyles=this.getCompiledStyles(i.cssClasses.split(" ")),t.push(i))}let n=0;for(const t of this.relationships){var a={id:u(t.entityA,t.entityB,{prefix:"id",counter:n++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:s.look};e.push(a)}return{nodes:t,edges:e,other:{},config:s,direction:"TB"}}},S={},T=(d(S,{draw:()=>T}),s((async function(s,i,n,a){h.info("REF0:"),h.info("Drawing er diagram (unified)",i);var{securityLevel:r,er:c,layout:o}=l(),y=a.db.getData();const u=t(i,r);y.type=a.type,y.layoutAlgorithm=p(o),y.config.flowchart.nodeSpacing=c?.nodeSpacing||140,y.config.flowchart.rankSpacing=c?.rankSpacing||80,y.direction=a.db.getDirection(),y.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],y.diagramId=i,await _(y,u),"elk"===y.layoutAlgorithm&&u.select(".edges").lower(),r=u.selectAll('[id*="-background"]'),0<Array.from(r).length&&r.each((function(){var t=g(this),e=t.attr("id").replace("-background","");(e=u.select("#"+CSS.escape(e))).empty()||(e=e.attr("transform"),t.attr("transform",e))})),b.insertTitle(u,"erDiagramTitleText",c?.titleTopMargin??25,a.db.getDiagramTitle()),e(u,8,"erDiagram",c?.useMaxWidth??!0)}),"draw")),N=s(((t,e)=>{var s=(n=f)(t,"r"),i=n(t,"g"),n=n(t,"b");return m(s,i,n,e)}),"fade"),A={parser:k,get db(){return new O},renderer:S,styles:s((t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .labelBkg {\n background-color: ${N(t.tertiaryColor,.5)};\n }\n\n .edgeLabel .label {\n fill: ${t.nodeBorder};\n font-size: 14px;\n }\n\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.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: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n }\n\n .marker {\n fill: none !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n`),"getStyles")};export{A as diagram};
@@ -1 +1 @@
1
- {"version":3,"file":"BubbleButton.d.ts","sourceRoot":"","sources":["../../../../src/features/bubble/components/BubbleButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,KAAK,KAAK,GAAG,WAAW,GAAG;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,EAAE,CAAC,QAAQ,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACzE,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAOF,eAAO,MAAM,YAAY,UAAW,KAAK,mCA8HxC,CAAC"}
1
+ {"version":3,"file":"BubbleButton.d.ts","sourceRoot":"","sources":["../../../../src/features/bubble/components/BubbleButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,KAAK,KAAK,GAAG,WAAW,GAAG;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,EAAE,CAAC,QAAQ,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACzE,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAOF,eAAO,MAAM,YAAY,UAAW,KAAK,mCAkHxC,CAAC"}
@@ -0,0 +1 @@
1
+ import{g as t}from"./chunk-FMBD7UC4-d75ed695.js";import{d as e,s,c as i,n as r,g as n,b as a,o as u,_ as o,e as l,p as c,J as h,q as d,l as p,r as g,u as A,j as b,t as y,v as k,x as f,y as m,z as E,A as C}from"./web-4e6d8ea9.js";import{g as D}from"./chunk-55IACEB6-78729976.js";import{s as x}from"./chunk-QN33PNHL-0bf10733.js";import{c as T}from"./channel-f240e622.js";var F=class{constructor(){this.vertexCounter=0,this.config=e(),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=s,this.setAccDescription=i,this.setDiagramTitle=r,this.getAccTitle=n,this.getAccDescription=a,this.getDiagramTitle=u,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")}static{o(this,"FlowDB")}sanitizeText(t){return l.sanitizeText(t,this.config)}lookUpDomId(t){for(const e of this.vertices.values())if(e.id===t)return e.domId;return t}addVertex(t,s,i,r,n,a,u={},o){if(t&&0!==t.trim().length){let p;if(void 0!==o){let t;t=o.includes("\n")?o+"\n":"{\n"+o+"\n}",p=c(t,{schema:h})}var l;o=this.edges.find((e=>e.id===t));if(o)void 0!==(l=p)?.animate&&(o.animate=l.animate),void 0!==l?.animation&&(o.animation=l.animation),void 0!==l?.curve&&(o.interpolate=l.curve);else{let o,l=this.vertices.get(t);if(void 0===l&&(l={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,l)),this.vertexCounter++,void 0!==s?(this.config=e(),o=this.sanitizeText(s.text.trim()),l.labelType=s.type,o.startsWith('"')&&o.endsWith('"')&&(o=o.substring(1,o.length-1)),l.text=o):void 0===l.text&&(l.text=t),void 0!==i&&(l.type=i),null!=r&&r.forEach((t=>{l.styles.push(t)})),null!=n&&n.forEach((t=>{l.classes.push(t)})),void 0!==a&&(l.dir=a),void 0===l.props?l.props=u:void 0!==u&&Object.assign(l.props,u),void 0!==p){if(p.shape){if(p.shape!==p.shape.toLowerCase()||p.shape.includes("_"))throw new Error(`No such shape: ${p.shape}. Shape names should be lowercase.`);if(!d(p.shape))throw new Error(`No such shape: ${p.shape}.`);l.type=p?.shape}p?.label&&(l.text=p?.label),p?.icon&&(l.icon=p?.icon,p.label?.trim()||l.text!==t||(l.text="")),p?.form&&(l.form=p?.form),p?.pos&&(l.pos=p?.pos),p?.img&&(l.img=p?.img,p.label?.trim()||l.text!==t||(l.text="")),p?.constraint&&(l.constraint=p.constraint),p.w&&(l.assetWidth=Number(p.w)),p.h&&(l.assetHeight=Number(p.h))}}}}addSingleLink(t,e,s,i){const r={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};if(p.info("abc78 Got edge...",r),void 0!==(t=s.text)&&(r.text=this.sanitizeText(t.text.trim()),r.text.startsWith('"')&&r.text.endsWith('"')&&(r.text=r.text.substring(1,r.text.length-1)),r.labelType=t.type),void 0!==s&&(r.type=s.type,r.stroke=s.stroke,r.length=10<s.length?10:s.length),i&&!this.edges.some((t=>t.id===i))?(r.id=i,r.isUserDefinedId=!0):0===(e=this.edges.filter((t=>t.start===r.start&&t.end===r.end))).length?r.id=g(r.start,r.end,{counter:0,prefix:"L"}):r.id=g(r.start,r.end,{counter:e.length+1,prefix:"L"}),!(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.`);p.info("Pushing edge..."),this.edges.push(r)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,s){var i=this.isLinkData(s)?s.id.replace("@",""):void 0;p.info("addLink",t,e,i);for(const a of t)for(const u of e){var r=a===t[t.length-1],n=u===e[0];r&&n?this.addSingleLink(a,u,s,i):this.addSingleLink(a,u,s,void 0)}}updateLinkInterpolate(t,e){t.forEach((t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e}))}updateLink(t,e){t.forEach((t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} 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"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,0<(this.edges[t]?.style?.length??0)&&!this.edges[t]?.style?.some((t=>t?.startsWith("fill")))&&this.edges[t]?.style?.push("fill:none"))}))}addClass(t,e){const s=e.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach((t=>{let e=this.classes.get(t);void 0===e&&(e={id:t,styles:[],textStyles:[]},this.classes.set(t,e)),null!=s&&s.forEach((t=>{var s;/color/.exec(t)&&(s=t.replace("fill","bgFill"),e.textStyles.push(s)),e.styles.push(t)}))}))}setDirection(t){this.direction=t.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(t,e){for(const i of t.split(",")){var s=((s=this.vertices.get(i))&&s.classes.push(e),this.edges.find((t=>t.id===i)));(s=(s&&s.classes.push(e),this.subGraphLookup.get(i)))&&s.classes.push(e)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(const s of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(s):s,e)}}setClickFun(t,s,i){const r=this.lookUpDomId(t);if("loose"===e().securityLevel&&void 0!==s){let e=[];if("string"==typeof i){e=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<e.length;t++){let s=e[t].trim();s.startsWith('"')&&s.endsWith('"')&&(s=s.substr(1,s.length-2)),e[t]=s}}0===e.length&&e.push(t),(i=this.vertices.get(t))&&(i.haveCallback=!0,this.funs.push((()=>{var t=document.querySelector(`[id="${r}"]`);null!==t&&t.addEventListener("click",(()=>{A.runFunc(s,...e)}),!1)})))}}setLink(t,e,s){t.split(",").forEach((t=>{void 0!==(t=this.vertices.get(t))&&(t.link=A.formatUrl(e,this.config),t.linkTarget=s)})),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,s){t.split(",").forEach((t=>{this.setClickFun(t,e,s)})),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach((e=>{e(t)}))}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let e=b(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=b("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),b(t).select("svg").selectAll("g.node").on("mouseover",(t=>{var s=b(t.currentTarget);null!==s.attr("title")&&(t=t.currentTarget?.getBoundingClientRect(),e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+t.left+(t.right-t.left)/2+"px").style("top",window.scrollY+t.bottom+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),s.classed("hover",!0))})).on("mouseout",(t=>{e.transition().duration(500).style("opacity",0),b(t.currentTarget).classed("hover",!1)}))}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=e(),y()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,s,i){let r=t.text.trim();var n=i.text;t===i&&/\s/.exec(i.text)&&(r=void 0);t=o((t=>{const e={boolean:{},number:{},string:{}},s=[];let i;return{nodeList:t.filter((function(t){var r=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(r in e?!e[r].hasOwnProperty(t)&&(e[r][t]=!0):!s.includes(t)&&s.push(t))})),dir:i}}),"uniq")(s.flat());var a=t.nodeList;s=t.dir,t=e().flowchart??{},s=s??(t.inheritDir?this.getDirection()??e().direction??void 0:void 0);if("gen-1"===this.version)for(let t=0;t<a.length;t++)a[t]=this.lookUpDomId(a[t]);return r=r??"subGraph"+this.subCount,n=this.sanitizeText(n=n||""),this.subCount=this.subCount+1,t={id:r,nodes:a,title:n.trim(),classes:[],dir:s,labelType:i.type},p.info("Adding",t.id,t.nodes,t.dir),t.nodes=this.makeUniq(t,this.subGraphs).nodes,this.subGraphs.push(t),this.subGraphLookup.set(r,t),r}getPosForId(t){for(var[e,s]of this.subGraphs.entries())if(s.id===t)return e;return-1}indexNodes2(t,e){var s=this.subGraphs[e].nodes;if(this.secCount=this.secCount+1,2e3<this.secCount)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let i=0,r=1;for(;i<s.length;){var n=this.getPosForId(s[i]);if(0<=n){if((n=this.indexNodes2(t,n)).result)return{result:!0,count:r+n.count};r+=n.count}i+=1}return{result:!1,count:r}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,0<this.subGraphs.length&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&!(this.firstGraphFlag=!1)}destructStartLink(t){let e=t.trim(),s="arrow_open";switch(e[0]){case"<":s="arrow_point",e=e.slice(1);break;case"x":s="arrow_cross",e=e.slice(1);break;case"o":s="arrow_circle",e=e.slice(1)}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:s,stroke:i}}countChar(t,e){var s=e.length;let i=0;for(let r=0;r<s;++r)e[r]===t&&++i;return i}destructEndLink(t){var e=t.trim();let s=e.slice(0,-1),i="arrow_open";switch(e.slice(-1)){case"x":i="arrow_cross",e.startsWith("x")&&(i="double_"+i,s=s.slice(1));break;case">":i="arrow_point",e.startsWith("<")&&(i="double_"+i,s=s.slice(1));break;case"o":i="arrow_circle",e.startsWith("o")&&(i="double_"+i,s=s.slice(1))}let r="normal",n=s.length-1;return s.startsWith("=")&&(r="thick"),s.startsWith("~")&&(r="invisible"),(t=this.countChar(".",s))&&(r="dotted",n=t),{type:i,stroke:r,length:n}}destructLink(t,e){if(t=this.destructEndLink(t),e){if((e=this.destructStartLink(e)).stroke!==t.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===e.type)e.type=t.type;else{if(e.type!==t.type)return{type:"INVALID",stroke:"INVALID"};e.type="double_"+e.type}return"double_arrow"===e.type&&(e.type="double_arrow_point"),e.length=t.length,e}return t}exists(t,e){for(const s of t)if(s.nodes.includes(e))return!0;return!1}makeUniq(t,e){const s=[];return t.nodes.forEach(((i,r)=>{this.exists(e,i)||s.push(t.nodes[r])})),{nodes:s}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find((t=>t.id===e))}destructEdgeType(t){let e="none",s="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":s=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),s=e}return{arrowTypeStart:e,arrowTypeEnd:s}}addNodeFromVertex(t,e,s,i,r,n){s=s.get(t.id),i=i.get(t.id)??!1;var a=this.findNode(e,t.id);a?(a.cssStyles=t.styles,a.cssCompiledStyles=this.getCompiledStyles(t.classes),a.cssClasses=t.classes.join(" ")):(a={id:t.id,label:t.text,labelStyle:"",parentId:s,padding:r.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:n,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint},i?e.push({...a,isGroup:!0,shape:"rect"}):e.push({...a,isGroup:!1,shape:this.getTypeFromVertex(t)}))}getCompiledStyles(t){let e=[];for(const i of t){var s=this.classes.get(i);s?.styles&&(e=[...e,...s.styles??[]].map((t=>t.trim()))),s?.textStyles&&(e=[...e,...s.textStyles??[]].map((t=>t.trim())))}return e}getData(){const t=e(),s=[],i=[];var r=this.getSubGraphs();const n=new Map,a=new Map;for(let t=r.length-1;0<=t;t--){var u=r[t];0<u.nodes.length&&a.set(u.id,!0);for(const t of u.nodes)n.set(t,u.id)}for(let e=r.length-1;0<=e;e--){var o=r[e];s.push({id:o.id,label:o.title,labelStyle:"",parentId:n.get(o.id),padding:8,cssCompiledStyles:this.getCompiledStyles(o.classes),cssClasses:o.classes.join(" "),shape:"rect",dir:o.dir,isGroup:!0,look:t.look})}this.getVertices().forEach((e=>{this.addNodeFromVertex(e,s,n,a,t,t.look||"classic")}));const l=this.getEdges();return l.forEach(((e,s)=>{var{arrowTypeStart:r,arrowTypeEnd:n}=this.destructEdgeType(e.type),a=[...l.defaultStyle??[]];e.style&&a.push(...e.style),s={id:g(e.start,e.end,{counter:s,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":r,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":n,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:a,style:a,pattern:e.stroke,look:t.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};i.push(s)})),{nodes:s,edges:i,other:{},config:t}}defaultConfig(){return k.flowchart}},S={getClasses:o((function(t,e){return e.db.getClasses()}),"getClasses"),draw:o((async function(t,s,i,r){p.info("REF0:"),p.info("Drawing state diagram (v2)",s);var{securityLevel:n,flowchart:a,layout:u}=e();let o;"sandbox"===n&&(o=b("#i"+s));var l="sandbox"===n?o.nodes()[0].contentDocument:document,c=(p.debug("Before getData: "),r.db.getData()),h=(p.debug("Data: ",c),D(s,n)),d=r.db.getDirection(),u=(c.type=r.type,c.layoutAlgorithm=m(u),"dagre"===c.layoutAlgorithm&&"elk"===u&&p.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."),c.direction=d,c.nodeSpacing=a?.nodeSpacing||50,c.rankSpacing=a?.rankSpacing||50,c.markers=["point","circle","cross"],c.diagramId=s,p.debug("REF1:",c),await E(c,h),c.config.flowchart?.diagramPadding??8);A.insertTitle(h,"flowchartTitleText",a?.titleTopMargin||0,r.db.getDiagramTitle()),x(h,u,"flowchart",a?.useMaxWidth||!1);for(const t of c.nodes){var g=b(`#${s} [id="${t.id}"]`);if(g&&t.link){const e=l.createElementNS("http://www.w3.org/2000/svg","a");e.setAttributeNS("http://www.w3.org/2000/svg","class",t.cssClasses),e.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===n?e.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):t.linkTarget&&e.setAttributeNS("http://www.w3.org/2000/svg","target",t.linkTarget);var y=g.insert((function(){return e}),":first-child");const s=g.select(".label-container"),i=(s&&y.append((function(){return s.node()})),g.select(".label"));i&&y.append((function(){return i.node()}))}}}),"draw")},_=function(){var t=o((function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s}),"o"),e=[1,4],s=[1,3],i=[1,5],r=[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],n=[2,2],a=[1,13],u=[1,14],l=[1,15],c=[1,16],h=[1,23],d=[1,25],p=[1,26],g=[1,27],A=[1,49],b=[1,48],y=[1,29],k=[1,30],f=[1,31],m=[1,32],E=[1,33],C=[1,44],D=[1,46],x=[1,42],T=[1,47],F=[1,43],S=[1,50],_=[1,45],v=[1,51],B=[1,52],w=[1,34],L=[1,35],$=[1,36],I=[1,37],N=[1,57],R=[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],P=[1,61],G=[1,60],O=[1,62],M=[8,9,11,75,77,78],U=[1,78],V=[1,91],j=[1,96],W=[1,95],z=[1,92],K=[1,88],Y=[1,94],H=[1,90],q=[1,97],X=[1,93],Q=[1,98],J=[1,89],Z=[8,9,10,11,40,75,77,78],tt=[8,9,10,11,40,46,75,77,78],et=[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],st=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],it=[44,60,89,102,105,106,109,111,114,115,116],rt=[1,121],nt=[1,122],at=[1,124],ut=[1,123],ot=[44,60,62,74,89,102,105,106,109,111,114,115,116],lt=[1,133],ct=[1,147],ht=[1,148],dt=[1,149],pt=[1,150],gt=[1,135],At=[1,137],bt=[1,141],yt=[1,142],kt=[1,143],ft=[1,144],mt=[1,145],Et=[1,146],Ct=[1,151],Dt=[1,152],xt=[1,131],Tt=[1,132],Ft=[1,139],St=[1,134],_t=[1,138],vt=[1,136],Bt=[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],wt=[1,154],Lt=[1,156],$t=[8,9,11],It=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],Nt=[1,176],Rt=[1,172],Pt=[1,173],Gt=[1,177],Ot=[1,174],Mt=[1,175],Ut=[77,116,119],Vt=[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],jt=[10,106],Wt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],zt=[1,247],Kt=[1,245],Yt=[1,249],Ht=[1,243],qt=[1,244],Xt=[1,246],Qt=[1,248],Jt=[1,250],Zt=[1,268],te=[8,9,11,106],ee=[8,9,10,11,60,84,105,106,109,110,111,112];e={trace:o((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,$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"},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]],performAction:o((function(t,e,s,i,r,n,a){var u=n.length-1;switch(r){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(n[u])||0<n[u].length)&&n[u-1].push(n[u]),this.$=n[u-1];break;case 4:case 183:case 44:case 54:case 76:case 181:this.$=n[u];break;case 11:i.setDirection("TB"),this.$="TB";break;case 12:i.setDirection(n[u-1]),this.$=n[u-1];break;case 27:this.$=n[u-1].nodes;break;case 33:this.$=i.addSubGraph(n[u-6],n[u-1],n[u-4]);break;case 34:this.$=i.addSubGraph(n[u-3],n[u-1],n[u-3]);break;case 35:this.$=i.addSubGraph(void 0,n[u-1],void 0);break;case 37:this.$=n[u].trim(),i.setAccTitle(this.$);break;case 38:case 39:this.$=n[u].trim(),i.setAccDescription(this.$);break;case 43:case 133:this.$=n[u-1]+n[u];break;case 45:i.addVertex(n[u-1][n[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,n[u]),i.addLink(n[u-3].stmt,n[u-1],n[u-2]),this.$={stmt:n[u-1],nodes:n[u-1].concat(n[u-3].nodes)};break;case 46:i.addLink(n[u-2].stmt,n[u],n[u-1]),this.$={stmt:n[u],nodes:n[u].concat(n[u-2].nodes)};break;case 47:i.addLink(n[u-3].stmt,n[u-1],n[u-2]),this.$={stmt:n[u-1],nodes:n[u-1].concat(n[u-3].nodes)};break;case 48:this.$={stmt:n[u-1],nodes:n[u-1]};break;case 49:i.addVertex(n[u-1][n[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,n[u]),this.$={stmt:n[u-1],nodes:n[u-1],shapeData:n[u]};break;case 50:this.$={stmt:n[u],nodes:n[u]};break;case 51:case 128:case 130:this.$=[n[u]];break;case 52:i.addVertex(n[u-5][n[u-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,n[u-4]),this.$=n[u-5].concat(n[u]);break;case 53:this.$=n[u-4].concat(n[u]);break;case 55:this.$=n[u-2],i.setClass(n[u-2],n[u]);break;case 56:this.$=n[u-3],i.addVertex(n[u-3],n[u-1],"square");break;case 57:this.$=n[u-3],i.addVertex(n[u-3],n[u-1],"doublecircle");break;case 58:this.$=n[u-5],i.addVertex(n[u-5],n[u-2],"circle");break;case 59:this.$=n[u-3],i.addVertex(n[u-3],n[u-1],"ellipse");break;case 60:this.$=n[u-3],i.addVertex(n[u-3],n[u-1],"stadium");break;case 61:this.$=n[u-3],i.addVertex(n[u-3],n[u-1],"subroutine");break;case 62:this.$=n[u-7],i.addVertex(n[u-7],n[u-1],"rect",void 0,void 0,void 0,Object.fromEntries([[n[u-5],n[u-3]]]));break;case 63:this.$=n[u-3],i.addVertex(n[u-3],n[u-1],"cylinder");break;case 64:this.$=n[u-3],i.addVertex(n[u-3],n[u-1],"round");break;case 65:this.$=n[u-3],i.addVertex(n[u-3],n[u-1],"diamond");break;case 66:this.$=n[u-5],i.addVertex(n[u-5],n[u-2],"hexagon");break;case 67:this.$=n[u-3],i.addVertex(n[u-3],n[u-1],"odd");break;case 68:this.$=n[u-3],i.addVertex(n[u-3],n[u-1],"trapezoid");break;case 69:this.$=n[u-3],i.addVertex(n[u-3],n[u-1],"inv_trapezoid");break;case 70:this.$=n[u-3],i.addVertex(n[u-3],n[u-1],"lean_right");break;case 71:this.$=n[u-3],i.addVertex(n[u-3],n[u-1],"lean_left");break;case 72:this.$=n[u],i.addVertex(n[u]);break;case 73:n[u-1].text=n[u],this.$=n[u-1];break;case 74:case 75:n[u-2].text=n[u-1],this.$=n[u-2];break;case 77:var o=i.destructLink(n[u],n[u-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:n[u-1]};break;case 78:o=i.destructLink(n[u],n[u-2]),this.$={type:o.type,stroke:o.stroke,length:o.length,text:n[u-1],id:n[u-3]};break;case 79:case 86:case 101:case 103:this.$={text:n[u],type:"text"};break;case 80:case 87:case 102:this.$={text:n[u-1].text+""+n[u],type:n[u-1].type};break;case 81:case 88:this.$={text:n[u],type:"string"};break;case 82:case 89:case 104:this.$={text:n[u],type:"markdown"};break;case 83:o=i.destructLink(n[u]),this.$={type:o.type,stroke:o.stroke,length:o.length};break;case 84:o=i.destructLink(n[u]),this.$={type:o.type,stroke:o.stroke,length:o.length,id:n[u-1]};break;case 85:this.$=n[u-1];break;case 105:this.$=n[u-4],i.addClass(n[u-2],n[u]);break;case 106:this.$=n[u-4],i.setClass(n[u-2],n[u]);break;case 107:case 115:this.$=n[u-1],i.setClickEvent(n[u-1],n[u]);break;case 108:case 116:this.$=n[u-3],i.setClickEvent(n[u-3],n[u-2]),i.setTooltip(n[u-3],n[u]);break;case 109:this.$=n[u-2],i.setClickEvent(n[u-2],n[u-1],n[u]);break;case 110:this.$=n[u-4],i.setClickEvent(n[u-4],n[u-3],n[u-2]),i.setTooltip(n[u-4],n[u]);break;case 111:this.$=n[u-2],i.setLink(n[u-2],n[u]);break;case 112:this.$=n[u-4],i.setLink(n[u-4],n[u-2]),i.setTooltip(n[u-4],n[u]);break;case 113:this.$=n[u-4],i.setLink(n[u-4],n[u-2],n[u]);break;case 114:this.$=n[u-6],i.setLink(n[u-6],n[u-4],n[u]),i.setTooltip(n[u-6],n[u-2]);break;case 117:this.$=n[u-1],i.setLink(n[u-1],n[u]);break;case 118:this.$=n[u-3],i.setLink(n[u-3],n[u-2]),i.setTooltip(n[u-3],n[u]);break;case 119:this.$=n[u-3],i.setLink(n[u-3],n[u-2],n[u]);break;case 120:this.$=n[u-5],i.setLink(n[u-5],n[u-4],n[u]),i.setTooltip(n[u-5],n[u-2]);break;case 121:this.$=n[u-4],i.addVertex(n[u-2],void 0,void 0,n[u]);break;case 122:this.$=n[u-4],i.updateLink([n[u-2]],n[u]);break;case 123:this.$=n[u-4],i.updateLink(n[u-2],n[u]);break;case 124:this.$=n[u-8],i.updateLinkInterpolate([n[u-6]],n[u-2]),i.updateLink([n[u-6]],n[u]);break;case 125:this.$=n[u-8],i.updateLinkInterpolate(n[u-6],n[u-2]),i.updateLink(n[u-6],n[u]);break;case 126:this.$=n[u-6],i.updateLinkInterpolate([n[u-4]],n[u]);break;case 127:this.$=n[u-6],i.updateLinkInterpolate(n[u-4],n[u]);break;case 129:case 131:n[u-2].push(n[u]),this.$=n[u-2];break;case 182:case 184:this.$=n[u-1]+""+n[u];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"}}}),"anonymous"),table:[{3:1,4:2,9:e,10:s,12:i},{1:[3]},t(r,n,{5:6}),{4:7,9:e,10:s,12:i},{4:8,9:e,10:s,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:a,9:u,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:d,36:p,38:g,42:28,43:38,44:A,45:39,47:40,60:b,84:y,85:k,86:f,87:m,88:E,89:C,102:D,105:x,106:T,109:F,111:S,113:41,114:_,115:v,116:B,121:w,122:L,123:$,124:I},t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),{8:[1,54],9:[1,55],10:N,15:53,18:56},t(R,[2,3]),t(R,[2,4]),t(R,[2,5]),t(R,[2,6]),t(R,[2,7]),t(R,[2,8]),{8:P,9:G,11:O,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:P,9:G,11:O,21:67},{8:P,9:G,11:O,21:68},{8:P,9:G,11:O,21:69},{8:P,9:G,11:O,21:70},{8:P,9:G,11:O,21:71},{8:P,9:G,10:[1,72],11:O,21:73},t(R,[2,36]),{35:[1,74]},{37:[1,75]},t(R,[2,39]),t(M,[2,50],{18:76,39:77,10:N,40:U}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:V,44:j,60:W,80:[1,86],89:z,95:[1,83],97:[1,84],101:85,105:K,106:Y,109:H,111:q,114:X,115:Q,116:J,120:87},t(R,[2,185]),t(R,[2,186]),t(R,[2,187]),t(R,[2,188]),t(Z,[2,51]),t(Z,[2,54],{46:[1,99]}),t(tt,[2,72],{113:112,29:[1,100],44:A,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:b,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:C,102:D,105:x,106:T,109:F,111:S,114:_,115:v,116:B}),t(et,[2,181]),t(et,[2,142]),t(et,[2,143]),t(et,[2,144]),t(et,[2,145]),t(et,[2,146]),t(et,[2,147]),t(et,[2,148]),t(et,[2,149]),t(et,[2,150]),t(et,[2,151]),t(et,[2,152]),t(r,[2,12]),t(r,[2,18]),t(r,[2,19]),{9:[1,113]},t(st,[2,26],{18:114,10:N}),t(R,[2,27]),{42:115,43:38,44:A,45:39,47:40,60:b,89:C,102:D,105:x,106:T,109:F,111:S,113:41,114:_,115:v,116:B},t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(it,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:rt,81:nt,116:at,119:ut},{75:[1,125],77:[1,126]},t(ot,[2,83]),t(R,[2,28]),t(R,[2,29]),t(R,[2,30]),t(R,[2,31]),t(R,[2,32]),{10:lt,12:ct,14:ht,27:dt,28:127,32:pt,44:gt,60:At,75:bt,80:[1,129],81:[1,130],83:140,84:yt,85:kt,86:ft,87:mt,88:Et,89:Ct,90:Dt,91:128,105:xt,109:Tt,111:Ft,114:St,115:_t,116:vt},t(Bt,n,{5:153}),t(R,[2,37]),t(R,[2,38]),t(M,[2,48],{44:wt}),t(M,[2,49],{18:155,10:N,40:Lt}),t(Z,[2,44]),{44:A,47:157,60:b,89:C,102:D,105:x,106:T,109:F,111:S,113:41,114:_,115:v,116:B},{102:[1,158],103:159,105:[1,160]},{44:A,47:161,60:b,89:C,102:D,105:x,106:T,109:F,111:S,113:41,114:_,115:v,116:B},{44:A,47:162,60:b,89:C,102:D,105:x,106:T,109:F,111:S,113:41,114:_,115:v,116:B},t($t,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},t($t,[2,115],{120:167,10:[1,166],14:V,44:j,60:W,89:z,105:K,106:Y,109:H,111:q,114:X,115:Q,116:J}),t($t,[2,117],{10:[1,168]}),t(It,[2,183]),t(It,[2,170]),t(It,[2,171]),t(It,[2,172]),t(It,[2,173]),t(It,[2,174]),t(It,[2,175]),t(It,[2,176]),t(It,[2,177]),t(It,[2,178]),t(It,[2,179]),t(It,[2,180]),{44:A,47:169,60:b,89:C,102:D,105:x,106:T,109:F,111:S,113:41,114:_,115:v,116:B},{30:170,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},{30:178,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},{30:180,50:[1,179],67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},{30:181,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},{30:182,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},{30:183,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},{109:[1,184]},{30:185,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},{30:186,65:[1,187],67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},{30:188,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},{30:189,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},{30:190,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},t(et,[2,182]),t(r,[2,20]),t(st,[2,25]),t(M,[2,46],{39:191,18:192,10:N,40:U}),t(it,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},{77:[1,196],79:197,116:at,119:ut},t(Ut,[2,79]),t(Ut,[2,81]),t(Ut,[2,82]),t(Ut,[2,168]),t(Ut,[2,169]),{76:198,79:120,80:rt,81:nt,116:at,119:ut},t(ot,[2,84]),{8:P,9:G,10:lt,11:O,12:ct,14:ht,21:200,27:dt,29:[1,199],32:pt,44:gt,60:At,75:bt,83:140,84:yt,85:kt,86:ft,87:mt,88:Et,89:Ct,90:Dt,91:201,105:xt,109:Tt,111:Ft,114:St,115:_t,116:vt},t(Vt,[2,101]),t(Vt,[2,103]),t(Vt,[2,104]),t(Vt,[2,157]),t(Vt,[2,158]),t(Vt,[2,159]),t(Vt,[2,160]),t(Vt,[2,161]),t(Vt,[2,162]),t(Vt,[2,163]),t(Vt,[2,164]),t(Vt,[2,165]),t(Vt,[2,166]),t(Vt,[2,167]),t(Vt,[2,90]),t(Vt,[2,91]),t(Vt,[2,92]),t(Vt,[2,93]),t(Vt,[2,94]),t(Vt,[2,95]),t(Vt,[2,96]),t(Vt,[2,97]),t(Vt,[2,98]),t(Vt,[2,99]),t(Vt,[2,100]),{6:11,7:12,8:a,9:u,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,202],33:24,34:d,36:p,38:g,42:28,43:38,44:A,45:39,47:40,60:b,84:y,85:k,86:f,87:m,88:E,89:C,102:D,105:x,106:T,109:F,111:S,113:41,114:_,115:v,116:B,121:w,122:L,123:$,124:I},{10:N,18:203},{44:[1,204]},t(Z,[2,43]),{10:[1,205],44:A,60:b,89:C,102:D,105:x,106:T,109:F,111:S,113:112,114:_,115:v,116:B},{10:[1,206]},{10:[1,207],106:[1,208]},t(jt,[2,128]),{10:[1,209],44:A,60:b,89:C,102:D,105:x,106:T,109:F,111:S,113:112,114:_,115:v,116:B},{10:[1,210],44:A,60:b,89:C,102:D,105:x,106:T,109:F,111:S,113:112,114:_,115:v,116:B},{80:[1,211]},t($t,[2,109],{10:[1,212]}),t($t,[2,111],{10:[1,213]}),{80:[1,214]},t(It,[2,184]),{80:[1,215],98:[1,216]},t(Z,[2,55],{113:112,44:A,60:b,89:C,102:D,105:x,106:T,109:F,111:S,114:_,115:v,116:B}),{31:[1,217],67:Nt,82:218,116:Gt,117:Ot,118:Mt},t(Wt,[2,86]),t(Wt,[2,88]),t(Wt,[2,89]),t(Wt,[2,153]),t(Wt,[2,154]),t(Wt,[2,155]),t(Wt,[2,156]),{49:[1,219],67:Nt,82:218,116:Gt,117:Ot,118:Mt},{30:220,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},{51:[1,221],67:Nt,82:218,116:Gt,117:Ot,118:Mt},{53:[1,222],67:Nt,82:218,116:Gt,117:Ot,118:Mt},{55:[1,223],67:Nt,82:218,116:Gt,117:Ot,118:Mt},{57:[1,224],67:Nt,82:218,116:Gt,117:Ot,118:Mt},{60:[1,225]},{64:[1,226],67:Nt,82:218,116:Gt,117:Ot,118:Mt},{66:[1,227],67:Nt,82:218,116:Gt,117:Ot,118:Mt},{30:228,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},{31:[1,229],67:Nt,82:218,116:Gt,117:Ot,118:Mt},{67:Nt,69:[1,230],71:[1,231],82:218,116:Gt,117:Ot,118:Mt},{67:Nt,69:[1,233],71:[1,232],82:218,116:Gt,117:Ot,118:Mt},t(M,[2,45],{18:155,10:N,40:Lt}),t(M,[2,47],{44:wt}),t(it,[2,75]),t(it,[2,74]),{62:[1,234],67:Nt,82:218,116:Gt,117:Ot,118:Mt},t(it,[2,77]),t(Ut,[2,80]),{77:[1,235],79:197,116:at,119:ut},{30:236,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},t(Bt,n,{5:237}),t(Vt,[2,102]),t(R,[2,35]),{43:238,44:A,45:39,47:40,60:b,89:C,102:D,105:x,106:T,109:F,111:S,113:41,114:_,115:v,116:B},{10:N,18:239},{10:zt,60:Kt,84:Yt,92:240,105:Ht,107:241,108:242,109:qt,110:Xt,111:Qt,112:Jt},{10:zt,60:Kt,84:Yt,92:251,104:[1,252],105:Ht,107:241,108:242,109:qt,110:Xt,111:Qt,112:Jt},{10:zt,60:Kt,84:Yt,92:253,104:[1,254],105:Ht,107:241,108:242,109:qt,110:Xt,111:Qt,112:Jt},{105:[1,255]},{10:zt,60:Kt,84:Yt,92:256,105:Ht,107:241,108:242,109:qt,110:Xt,111:Qt,112:Jt},{44:A,47:257,60:b,89:C,102:D,105:x,106:T,109:F,111:S,113:41,114:_,115:v,116:B},t($t,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},t($t,[2,116]),t($t,[2,118],{10:[1,261]}),t($t,[2,119]),t(tt,[2,56]),t(Wt,[2,87]),t(tt,[2,57]),{51:[1,262],67:Nt,82:218,116:Gt,117:Ot,118:Mt},t(tt,[2,64]),t(tt,[2,59]),t(tt,[2,60]),t(tt,[2,61]),{109:[1,263]},t(tt,[2,63]),t(tt,[2,65]),{66:[1,264],67:Nt,82:218,116:Gt,117:Ot,118:Mt},t(tt,[2,67]),t(tt,[2,68]),t(tt,[2,70]),t(tt,[2,69]),t(tt,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(it,[2,78]),{31:[1,265],67:Nt,82:218,116:Gt,117:Ot,118:Mt},{6:11,7:12,8:a,9:u,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,266],33:24,34:d,36:p,38:g,42:28,43:38,44:A,45:39,47:40,60:b,84:y,85:k,86:f,87:m,88:E,89:C,102:D,105:x,106:T,109:F,111:S,113:41,114:_,115:v,116:B,121:w,122:L,123:$,124:I},t(Z,[2,53]),{43:267,44:A,45:39,47:40,60:b,89:C,102:D,105:x,106:T,109:F,111:S,113:41,114:_,115:v,116:B},t($t,[2,121],{106:Zt}),t(te,[2,130],{108:269,10:zt,60:Kt,84:Yt,105:Ht,109:qt,110:Xt,111:Qt,112:Jt}),t(ee,[2,132]),t(ee,[2,134]),t(ee,[2,135]),t(ee,[2,136]),t(ee,[2,137]),t(ee,[2,138]),t(ee,[2,139]),t(ee,[2,140]),t(ee,[2,141]),t($t,[2,122],{106:Zt}),{10:[1,270]},t($t,[2,123],{106:Zt}),{10:[1,271]},t(jt,[2,129]),t($t,[2,105],{106:Zt}),t($t,[2,106],{113:112,44:A,60:b,89:C,102:D,105:x,106:T,109:F,111:S,114:_,115:v,116:B}),t($t,[2,110]),t($t,[2,112],{10:[1,272]}),t($t,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:P,9:G,11:O,21:277},t(R,[2,34]),t(Z,[2,52]),{10:zt,60:Kt,84:Yt,105:Ht,107:278,108:242,109:qt,110:Xt,111:Qt,112:Jt},t(ee,[2,133]),{14:V,44:j,60:W,89:z,101:279,105:K,106:Y,109:H,111:q,114:X,115:Q,116:J,120:87},{14:V,44:j,60:W,89:z,101:280,105:K,106:Y,109:H,111:q,114:X,115:Q,116:J,120:87},{98:[1,281]},t($t,[2,120]),t(tt,[2,58]),{30:282,67:Nt,80:Rt,81:Pt,82:171,116:Gt,117:Ot,118:Mt},t(tt,[2,66]),t(Bt,n,{5:283}),t(te,[2,131],{108:269,10:zt,60:Kt,84:Yt,105:Ht,109:qt,110:Xt,111:Qt,112:Jt}),t($t,[2,126],{120:167,10:[1,284],14:V,44:j,60:W,89:z,105:K,106:Y,109:H,111:q,114:X,115:Q,116:J}),t($t,[2,127],{120:167,10:[1,285],14:V,44:j,60:W,89:z,105:K,106:Y,109:H,111:q,114:X,115:Q,116:J}),t($t,[2,114]),{31:[1,286],67:Nt,82:218,116:Gt,117:Ot,118:Mt},{6:11,7:12,8:a,9:u,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,287],33:24,34:d,36:p,38:g,42:28,43:38,44:A,45:39,47:40,60:b,84:y,85:k,86:f,87:m,88:E,89:C,102:D,105:x,106:T,109:F,111:S,113:41,114:_,115:v,116:B,121:w,122:L,123:$,124:I},{10:zt,60:Kt,84:Yt,92:288,105:Ht,107:241,108:242,109:qt,110:Xt,111:Qt,112:Jt},{10:zt,60:Kt,84:Yt,92:289,105:Ht,107:241,108:242,109:qt,110:Xt,111:Qt,112:Jt},t(tt,[2,62]),t(R,[2,33]),t($t,[2,124],{106:Zt}),t($t,[2,125],{106:Zt})],defaultActions:{},parseError:o((function(t,e){var s;if(!e.recoverable)throw(s=new Error(t)).hash=e,s;this.trace(t)}),"parseError"),parse:o((function(t){var e,s=this,i=[0],r=[],n=[null],a=[],u=this.table,l="",c=0,h=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(g.yy[e]=this.yy[e]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var A=p.yylloc,b=(a.push(A),p.options&&p.options.ranges);function y(){var t=r.pop()||p.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(r=t).pop()),t=s.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o((function(t){i.length=i.length-2*t,n.length=n.length-t,a.length=a.length-t}),"popStack"),o(y,"lex");for(var k,f,m,E,C,D,x={};;){if(f=i[i.length-1],void 0===(m=this.defaultActions[f]||(null==k&&(k=y()),u[f]&&u[f][k]))||!m.length||!m[0]){var T,F=[];for(E in u[f])this.terminals_[E]&&2<E&&F.push("'"+this.terminals_[E]+"'");T=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+F.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(T,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:A,expected:F})}if(m[0]instanceof Array&&1<m.length)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+k);switch(m[0]){case 1:i.push(k),n.push(p.yytext),a.push(p.yylloc),i.push(m[1]),k=null,h=p.yyleng,l=p.yytext,c=p.yylineno,A=p.yylloc;break;case 2:if(C=this.productions_[m[1]][1],x.$=n[n.length-C],x._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},b&&(x._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(D=this.performAction.apply(x,[l,h,c,g.yy,m[1],n,a].concat(d))))return D;C&&(i=i.slice(0,-1*C*2),n=n.slice(0,-1*C),a=a.slice(0,-1*C)),i.push(this.productions_[m[1]][0]),n.push(x.$),a.push(x._$),D=u[i[i.length-2]][i[i.length-1]],i.push(D);break;case 3:return!0}}return!0}),"parse")},s={EOF:1,parseError:o((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:o((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:o((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t}),"input"),unput:o((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g),i=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),s.length-1&&(this.yylineno-=s.length-1),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:s?(s.length===t.length?this.yylloc.first_column:0)+t[t.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:o((function(){return this._more=!0,this}),"more"),reject:o((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:o((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:o((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:o((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:o((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:o((function(t,e){var s,i;if(this.options.backtrack_lexer&&(i={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)&&(i.yylloc.range=this.yylloc.range.slice(0)),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var r in i)this[r]=i[r];return!1}),"test_match"),next:o((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,s,i,r=this._currentRules(),n=0;n<r.length;n++)if((s=this._input.match(this.rules[r[n]]))&&(!e||s[0].length>e[0].length))if(e=s,i=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[n])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,r[i]))&&t:""===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:o((function(){return this.next()||this.lex()}),"lex"),begin:o((function(t){this.conditionStack.push(t)}),"begin"),popState:o((function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:o((function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:o((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:o((function(t){this.begin(t)}),"pushState"),stateStackSize:o((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:o((function(t,e,s,i){switch(s){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"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:return e.yytext=e.yytext.replace(/\n\s*/g,"<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 t.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 78;case 60:return 105;case 61:case 102:return 111;case 62:return 46;case 63:return 60;case 64:case 103:return 44;case 65:return 8;case 66:return 106;case 67:case 101:return 115;case 68:case 71:case 74:return this.popState(),77;case 69:return this.pushState("edgeText"),75;case 70:case 73:case 76:return 119;case 72:return this.pushState("thickEdgeText"),75;case 75:return this.pushState("dottedEdgeText"),75;case 77:return 77;case 78:return this.popState(),53;case 79:case 115:return"TEXT";case 80:return this.pushState("ellipseText"),52;case 81:return this.popState(),55;case 82:return this.pushState("text"),54;case 83:return this.popState(),57;case 84:return this.pushState("text"),56;case 85:return 58;case 86:return this.pushState("text"),67;case 87:return this.popState(),64;case 88:return this.pushState("text"),63;case 89:return this.popState(),49;case 90:return this.pushState("text"),48;case 91:return this.popState(),69;case 92:return this.popState(),71;case 93:return 117;case 94:return this.pushState("trapText"),68;case 95:return this.pushState("trapText"),70;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;case 108:return this.pushState("text"),62;case 109:return this.popState(),51;case 110:return this.pushState("text"),50;case 111:return this.popState(),31;case 112:return this.pushState("text"),29;case 113:return this.popState(),66;case 114:return this.pushState("text"),65;case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119: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]*)/,/^(?:[^\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,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],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,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};function se(){this.yy={}}return e.lexer=s,o(se,"Parser"),new((se.prototype=e).Parser=se)}(),v=_.parser=_,B=Object.assign({},v),w=(B.parse=t=>(t=t.replace(/}\s*\n/g,"}\n"),v.parse(t)),o(((t,e)=>{var s=(r=T)(t,"r"),i=r(t,"g"),r=r(t,"b");return C(s,i,r,e)}),"fade")),L={parser:B,get db(){return new F},renderer:S,styles:o((e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span {\n color: ${e.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\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: ${e.lineColor} !important;\n stroke-width: 0;\n stroke: ${e.lineColor};\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n p {\n background-color: ${e.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${w(e.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${e.clusterBkg};\n stroke: ${e.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.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: ${e.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${e.edgeLabelBackground};\n p {\n background-color: ${e.edgeLabelBackground};\n padding: 2px;\n }\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n ${t()}\n`),"getStyles"),init:o((t=>{t.flowchart||(t.flowchart={}),t.layout&&f({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,f({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})}),"init")};export{L as diagram};